*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; } /* component display rules must never un-hide things */

html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }

body {
  margin: 0;
  min-height: 100vh;
  min-height: 100dvh;
  font-family: var(--font);
  font-size: var(--text-base);
  line-height: 1.5;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  -webkit-tap-highlight-color: transparent;
}

h1, h2, h3, h4, p { margin: 0; }
h1, h2, h3 { letter-spacing: -0.02em; line-height: 1.2; }
a { color: inherit; text-decoration: none; }
img, svg { display: block; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
/* Phones: quick repeated taps are taps, never a double-tap zoom. */
a, button, label, input, select, textarea, [role="button"] { touch-action: manipulation; }

::selection { background: var(--amber-100); color: var(--stone-900); }

:focus { outline: none; }
:focus-visible { outline: none; box-shadow: var(--focus); }

/* Custom scrollbars — no browser defaults */
* { scrollbar-width: thin; scrollbar-color: var(--stone-300) transparent; }
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--stone-300); border-radius: 10px; border: 3px solid var(--bg); }
::-webkit-scrollbar-thumb:hover { background: var(--stone-400); }

.icon { width: 20px; height: 20px; flex: none; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.icon-sm { width: 16px; height: 16px; }
.icon-lg { width: 24px; height: 24px; }

.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}

.muted { color: var(--text-muted); }
.eyebrow { margin-bottom: var(--s-1); font-size: var(--text-sm); font-weight: 600; color: var(--amber-700); }
.section-title { margin-bottom: var(--s-3); font-size: 12px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--text-muted); }
.stack > * + * { margin-top: var(--s-4); }
.stack-lg > * + * { margin-top: var(--s-6); }
.stack-xl > * + * { margin-top: var(--s-8); }
.clamp-2 { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.row-start { display: flex; align-items: center; gap: var(--s-4); min-width: 0; }
@media (max-width: 639px) { .hide-sm { display: none; } }
@media (min-width: 1024px) { .hide-lg { display: none; } }
.skip-link { position: fixed; z-index: 200; top: var(--s-2); left: var(--s-2); padding: var(--s-2) var(--s-4); border-radius: var(--radius-sm); background: var(--stone-900); color: #fff; font-weight: 600; transform: translateY(-150%); transition: transform var(--medium) var(--ease); }
.skip-link:focus { transform: none; }
@keyframes rise { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
@keyframes pop { from { transform: scale(0.6); opacity: 0; } to { transform: none; opacity: 1; } }
.row { display: flex; align-items: center; gap: var(--s-3); }
.grow { flex: 1; min-width: 0; }
.truncate { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
