/* ==========================================================================
   Gott och Blandat — Base
   Global canvas, typography, layout container, links, tables, views.
   Component specifics live in css/components/.
   ========================================================================== */

body {
  background: var(--color-canvas);
  color: var(--color-ink);
  font-family: var(--font-sans);
  font-size: var(--text-md);
  line-height: var(--leading-normal);
  margin: 0;
}

.layout-container {
  max-width: 1040px;
  margin: 0 auto;
  padding: 0 var(--space-6);
}

main[role="main"] {
  padding-bottom: var(--space-10);
}

/* --- Headings: rounded display face, tight tracking --- */
h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: var(--weight-display);
  letter-spacing: var(--tracking-tight);
  line-height: var(--leading-tight);
  color: var(--color-ink);
}

h1 { font-size: var(--text-3xl); margin: var(--space-7) 0 var(--space-5); }
h2 { font-size: var(--text-xl);  margin: var(--space-6) 0 var(--space-4); }
h3 { font-size: var(--text-lg);  margin: var(--space-5) 0 var(--space-3); }
h4 { font-size: var(--text-md);  margin: var(--space-4) 0 var(--space-2); }

/* --- Links --- */
a {
  color: var(--color-accent-strong);
  text-decoration: none;
}

a:hover {
  color: var(--color-accent-hover);
  text-decoration: underline;
}

a:focus-visible {
  outline: none;
  box-shadow: var(--focus-ring);
  border-radius: var(--radius-xs);
}

/* --- Content panels: nodes and views sit on a light surface --- */
.node,
.view {
  background: var(--color-surface);
  border: var(--border-hairline);
  border-radius: var(--radius-lg);
  padding: var(--space-7);
}

.node + .node,
.view + .view {
  margin-top: var(--space-6);
}

/* --- Tables: dense rows, hairline separators, eyebrow headers --- */
table {
  width: 100%;
  border-collapse: collapse;
  font-size: var(--text-base);
}

th {
  font-size: var(--text-xs);
  font-weight: var(--weight-semibold);
  letter-spacing: var(--tracking-wide);
  text-transform: uppercase;
  color: var(--color-ink-tertiary);
  text-align: left;
  padding: var(--space-3) var(--space-4);
  border-bottom: var(--border-strong);
}

td {
  padding: var(--space-3) var(--space-4);
  border-bottom: var(--border-hairline);
  vertical-align: top;
}

tr:hover > td {
  background: var(--color-accent-tint);
}

/* --- Forms: quiet fields on raised surface --- */
input[type="text"],
input[type="email"],
input[type="tel"],
input[type="password"],
input[type="search"],
input[type="number"],
input[type="date"],
textarea,
select {
  font-family: var(--font-sans);
  font-size: var(--text-base);
  color: var(--color-ink);
  background: var(--color-surface-raised);
  border: var(--border-strong);
  border-radius: var(--radius-md);
  padding: 0.5em 0.75em;
  /* Text inputs otherwise size themselves off their HTML "size"
     attribute (e.g. size="60"), which overflows any container
     narrower than that - the auth cards being the clearest case. */
  width: 100%;
  box-sizing: border-box;
}

input:focus-visible,
textarea:focus-visible,
select:focus-visible {
  outline: none;
  box-shadow: var(--focus-ring);
}

label {
  font-size: var(--text-sm);
  font-weight: var(--weight-semibold);
  color: var(--color-ink);
}

/* --- Footer --- */
footer[role="contentinfo"] {
  border-top: var(--border-hairline);
  margin-top: var(--space-10);
  padding: var(--space-7) 0 var(--space-9);
  font-size: var(--text-sm);
  color: var(--color-ink-secondary);
}

/* --- Utility: voice-part dot --- */
.gob-dot {
  display: inline-block;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  vertical-align: baseline;
}

/* --- Reduced motion: kill transitions and animations globally --- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
