/* Design-system components shared by redesigned pages (home, sign-in). Tokens live in theme.css. */
* { box-sizing: border-box; }
html { background: var(--surface-page); scroll-behavior: smooth; }
body { margin: 0; font-family: var(--font-sans); color: var(--text-strong); -webkit-font-smoothing: antialiased; }
button, input, textarea, select { font: inherit; }
a { color: var(--text-strong); text-underline-offset: 3px; }
a:hover { color: var(--accent-text); }
:focus-visible { outline: 3px solid var(--focus-ring); outline-offset: 3px; }
[hidden] { display: none !important; }
.page-bg { min-height: 100vh; background: radial-gradient(circle at 82% 8%, rgba(199,255,74,.2), transparent 27rem), linear-gradient(180deg, #f8f5ef 0%, var(--paper-100) 45%, #eee9df 100%); }
.skip-link { position: absolute; left: 16px; top: -60px; padding: 10px 14px; border-radius: 999px; background: var(--ink-900); color: #fff; z-index: 10; }
.skip-link:focus { top: 16px; }
.wrap { width: min(1180px, calc(100% - 48px)); margin: 0 auto; }
.section { scroll-margin-top: 24px; padding-bottom: clamp(64px, 9vw, 112px); }
.icon { width: 18px; height: 18px; flex: none; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.site-header { width: min(1180px, calc(100% - 48px)); margin: 0 auto; min-height: 84px; display: flex; align-items: center; justify-content: space-between; gap: 20px; border-bottom: 1px solid var(--border-subtle); flex-wrap: wrap; }
.brand { display: inline-flex; align-items: center; gap: 13px; text-decoration: none; }
.brand-mark { width: 42px; height: 42px; display: grid; place-items: center; flex: none; border-radius: 13px; background: var(--ink-900); color: var(--accent); font-weight: 800; letter-spacing: -.04em; font-size: 16px; }
.brand-mark.sm { width: 36px; height: 36px; border-radius: 11px; font-size: 13.7px; }
.brand-copy { display: grid; gap: 2px; }
.brand-copy strong { font-size: .95rem; letter-spacing: -.02em; }
.brand-copy span { font-size: .75rem; color: var(--text-muted); }
.site-nav { display: flex; align-items: center; gap: 4px; flex-wrap: wrap; }
.site-nav > a { padding: 9px 14px; border-radius: 999px; font-size: .86rem; font-weight: 500; text-decoration: none; }
.site-nav > a:hover { background: rgba(21,23,22,.06); color: var(--text-strong); }
.header-actions { margin-left: 10px; display: flex; gap: 8px; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 9px; min-height: 48px; padding: 0 20px; border-radius: 999px; border: 1px solid transparent; font-family: var(--font-sans); font-size: .92rem; font-weight: 720; letter-spacing: -.02em; text-decoration: none; cursor: pointer; white-space: nowrap; transition: transform .15s var(--ease-out), background .15s ease, box-shadow .15s ease; }
.btn:hover:not(:disabled) { transform: translateY(-1px); }
.btn:active:not(:disabled) { transform: scale(.98); }
.btn:disabled { cursor: not-allowed; opacity: .42; box-shadow: none; }
.btn-sm { min-height: 36px; padding: 0 14px; font-size: .82rem; }
.btn-lg { min-height: 52px; padding: 0 24px; font-size: 1rem; }
.btn-full { width: 100%; }
.btn-primary { background: var(--ink-900); color: #fff; box-shadow: var(--shadow-button); }
.btn-primary:hover:not(:disabled) { background: var(--ink-700); color: #fff; }
.btn-accent { background: var(--accent); color: var(--accent-ink); box-shadow: 0 12px 30px rgba(95,118,25,.22); }
.btn-accent:hover:not(:disabled) { background: #d4ff6e; color: var(--accent-ink); }
.btn-secondary { background: rgba(255,255,255,.66); color: var(--text-strong); border-color: var(--border-subtle); }
.btn-secondary:hover:not(:disabled) { background: #fff; color: var(--text-strong); }
.btn-ghost { background: transparent; color: var(--text-strong); }
.btn-ghost:hover:not(:disabled) { background: rgba(21,23,22,.06); color: var(--text-strong); }
.btn-inverse { background: rgba(255,255,255,.08); color: var(--text-inverse); border-color: rgba(255,255,255,.16); }
.btn-inverse:hover:not(:disabled) { background: rgba(255,255,255,.14); color: var(--text-inverse); }
.pill { min-height: 36px; padding: 0 14px; border-radius: 999px; border: 1px solid var(--border-subtle); background: rgba(255,255,255,.66); color: var(--text-strong); font-size: .84rem; font-weight: 650; cursor: pointer; transition: all .15s ease; }
.pill:hover { border-color: var(--border-hover); }
.pill[aria-pressed="true"] { border-color: var(--ink-900); background: var(--ink-900); color: #fff; }
.display { margin: 0; font-family: var(--font-display); font-weight: 500; text-wrap: balance; }
.display-xl { font-size: var(--text-display-xl); line-height: .94; letter-spacing: -.05em; }
.display-l { font-size: var(--text-display-l); line-height: .96; letter-spacing: -.05em; }
.display-m { font-size: var(--text-display-m); line-height: 1.05; letter-spacing: -.045em; }
.actions { display: flex; gap: 10px; flex-wrap: wrap; }
.mono-count { margin: 0; color: var(--text-muted); font-size: .88rem; font-family: var(--font-mono); }
.pill-row { display: flex; gap: 8px; flex-wrap: wrap; }
.empty-state { display: grid; justify-items: center; gap: 12px; text-align: center; padding: 48px 24px; border-radius: 20px; border: 1px dashed var(--border-hover); background: rgba(255,255,255,.3); }
.empty-icon { width: 48px; height: 48px; border-radius: 50%; display: grid; place-items: center; background: var(--paper-200); }
.empty-state h3 { margin: 0; font-family: var(--font-display); font-weight: 500; font-size: 1.6rem; letter-spacing: -.03em; }
.empty-state p { margin: 0; max-width: 420px; color: var(--text-muted); font-size: .9rem; line-height: 1.55; }
.field { display: grid; gap: 9px; }
.field-label { font-size: .86rem; font-weight: 720; }
.field-meta { display: flex; justify-content: space-between; gap: 16px; }
.field-note { margin: 0; font-size: .73rem; line-height: 1.45; color: var(--text-subtle); }
.field-note.is-error { color: var(--clay-700); }
.field-count { margin: 0; font-size: .73rem; color: var(--text-subtle); font-family: var(--font-mono); font-variant-numeric: tabular-nums; white-space: nowrap; }
.control { width: 100%; border: 1px solid var(--border-field); background: var(--surface-field); color: var(--text-strong); border-radius: 15px; padding: 14px 15px; font-size: .95rem; line-height: 1.55; outline: none; transition: border-color .15s ease, box-shadow .15s ease, background .15s ease; }
.control:hover { border-color: var(--border-hover); }
.control:focus { border-color: rgba(21,23,22,.5); background: #fff; box-shadow: var(--ring-field); }
.control[aria-invalid="true"] { border-color: rgba(127,44,29,.55); background: rgba(255,241,235,.42); box-shadow: none; }
textarea.control { resize: vertical; }
.select-wrap { position: relative; }
.select-wrap select { appearance: none; -webkit-appearance: none; min-height: 50px; padding: 0 42px 0 15px; cursor: pointer; }
.select-wrap .icon { position: absolute; right: 15px; top: 50%; margin-top: -8px; width: 16px; height: 16px; color: var(--text-muted); pointer-events: none; }
.notice { display: flex; align-items: flex-start; gap: 14px; padding: 16px 18px; border-radius: 18px; background: var(--paper-200); }
.notice .icon { margin-top: 1px; }
.notice strong { display: block; font-size: .88rem; margin-bottom: 4px; }
.notice div div { font-size: .82rem; line-height: 1.5; color: var(--text-muted); }
.site-footer { padding: 32px 0 48px; border-top: 1px solid var(--border-subtle); display: flex; justify-content: space-between; align-items: center; gap: 24px; flex-wrap: wrap; }
.footer-nav { display: flex; gap: 20px; flex-wrap: wrap; font-size: .86rem; }
.footer-nav a { text-decoration: none; }
.copyright { margin: 0; font-family: var(--font-mono); font-size: .74rem; color: var(--text-subtle); }

@media (max-width: 720px) {
  .site-header { padding: 14px 0; }
  .header-actions { margin-left: 0; }
}
/* Header, footer and page content share one width, so their edges line up. */
@media (max-width: 620px) {
  .site-header, .wrap { width: calc(100% - 32px); }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition-duration: .001ms !important; animation-duration: .001ms !important; }
}
