/* Base styles: reset, layout, navigation and the shared components drawn in
   the mock-ups (buttons, inputs, pills, cards, states). Pages add only what
   is specific to them. Copy sizes: body 15/16, headings Plus Jakarta Sans. */
*, *::before, *::after { box-sizing: border-box; }
html { height: 100%; }
body { margin: 0; min-height: 100%; font-family: var(--font-ui); font-size: 15px; line-height: 1.5; color: var(--text); background: var(--page); -webkit-font-smoothing: antialiased; }
a { color: var(--link); }
a:hover { color: var(--link-hover); }
h1, h2, h3 { font-family: var(--font-heading); font-weight: 700; letter-spacing: -0.025em; margin: 0; line-height: 1.2; }
h1 { font-size: 32px; } h2 { font-size: 26px; } h3 { font-size: 19px; }
p { margin: 0; }
code, .mono { font-family: var(--font-mono); font-size: 13px; }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
[hidden] { display: none !important; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* Navigation */
.nav { height: var(--nav-h); padding: 0 32px; display: flex; align-items: center; justify-content: space-between; gap: 24px; border-bottom: 1px solid var(--border); background: var(--surface); }
.nav-left { display: flex; align-items: center; gap: 36px; min-width: 0; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--text); font-family: var(--font-heading); font-size: 19px; font-weight: 700; letter-spacing: -0.02em; white-space: nowrap; }
.brand span { font-weight: 600; color: var(--link); }
.brand svg { width: 30px; height: 30px; flex-shrink: 0; }
.nav-links { display: flex; align-items: center; gap: 26px; font-size: 15px; }
.nav-links a { color: var(--muted); text-decoration: none; display: flex; align-items: center; }
.nav-links a[aria-current="page"] { color: var(--text); font-weight: 600; }
.nav-phone { display: none; align-items: center; gap: 22px; padding: 0 20px; height: 44px; overflow-x: auto; border-bottom: 1px solid var(--border); background: var(--surface); font-size: 14px; white-space: nowrap; }
.nav-phone a { color: var(--muted); text-decoration: none; display: flex; align-items: center; height: 44px; flex-shrink: 0; }
.nav-phone a[aria-current="page"] { color: var(--text); font-weight: 600; box-shadow: inset 0 -2px 0 var(--action); }
.nav-right { display: flex; align-items: center; gap: 12px; font-size: 15px; color: var(--muted); }
.nav-badge { padding: 3px 10px; border-radius: 9999px; background: var(--border); font-size: 13px; font-weight: 600; color: var(--neutral-text); }
.avatar { width: 36px; height: 36px; border-radius: 9999px; background: var(--avatar-bg); color: var(--avatar-text); display: inline-flex; align-items: center; justify-content: center; font-size: 13px; font-weight: 600; flex-shrink: 0; }
.avatar.alt { background: var(--avatar-alt-bg); color: var(--avatar-alt-text); }
.app-icon { width: 44px; height: 44px; border-radius: var(--radius-m); background: var(--tint); color: var(--tint-text); display: inline-flex; align-items: center; justify-content: center; font-family: var(--font-heading); font-size: 18px; font-weight: 700; flex-shrink: 0; }

/* Page frame */
.page { max-width: 1152px; margin: 0 auto; padding: 36px 64px; display: flex; flex-direction: column; gap: 24px; }
.page-narrow { max-width: 720px; margin: 0 auto; padding: 48px 16px; display: flex; flex-direction: column; gap: 24px; }
.page-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 24px; }
.lede { font-size: 17px; color: var(--muted); }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.stack { display: flex; flex-direction: column; gap: 8px; }
.row { display: flex; align-items: center; gap: 12px; }
.grow { flex-grow: 1; min-width: 0; }

/* Buttons and fields: 44px touch targets */
.btn { min-height: 44px; padding: 0 16px; border: 1px solid var(--border-strong); border-radius: var(--radius-s); background: var(--surface); font: inherit; font-size: 14px; font-weight: 500; color: var(--text); cursor: pointer; white-space: nowrap; display: inline-flex; align-items: center; justify-content: center; gap: 8px; text-decoration: none; }
.btn:hover { border-color: var(--muted); color: var(--text); }
.btn-primary { border: none; background: var(--action); color: var(--on-action); font-weight: 600; padding: 0 18px; }
.btn-primary:hover { background: var(--action-hover); color: var(--on-action); }
.btn-large { min-height: 52px; padding: 0 32px; font-size: 17px; border-radius: var(--radius-l); }
.btn-quiet { border-color: transparent; background: transparent; }
.field { display: flex; flex-direction: column; gap: 8px; }
.field label { font-size: 14px; font-weight: 600; }
.input, textarea.input { min-height: 48px; padding: 0 14px; border: 1px solid var(--border-strong); border-radius: var(--radius-s); background: var(--surface); font: inherit; font-size: 16px; color: var(--text); width: 100%; }
textarea.input { padding: 12px 14px; line-height: 1.5; resize: none; }
.readonly { background: var(--raised); border-color: var(--border); color: var(--text-2); display: flex; align-items: center; }

/* Pills: status is never colour alone, every pill carries words */
.pill { display: inline-block; padding: 3px 10px; border-radius: 9999px; font-size: 13px; font-weight: 600; white-space: nowrap; background: var(--neutral-bg); color: var(--neutral-text); }
.pill-good { background: var(--good-bg); color: var(--good-text); }
.pill-review { background: var(--review-bg); color: var(--review-text); }
.pill-attention { background: var(--attention-bg); color: var(--attention-text); }
.pill-tint { background: var(--tint); color: var(--tint-text); }

/* Cards and lists */
.card { border: 1px solid var(--border); border-radius: var(--radius-m); background: var(--surface); }
.card-pad { padding: 20px 24px; }
.list > * { padding: 18px 24px; border-bottom: 1px solid var(--divider); }
.list > *:last-child { border-bottom: none; }
.notice { padding: 16px 20px; border-radius: var(--radius-m); background: var(--tint); color: var(--tint-text); display: flex; gap: 14px; align-items: flex-start; }
.notice-review { background: var(--review-bg); color: var(--review-text); }
.notice-attention { background: var(--attention-bg); color: var(--attention-text); }
.section-label { font-size: 13px; font-weight: 600; color: var(--muted); }
.divider-top { padding-top: 20px; border-top: 1px solid var(--border); }

/* States: what happened, whose problem it is, the one thing you can do */
.state { padding: 28px; border: 1px solid var(--border); border-radius: var(--radius-l); background: var(--surface); display: flex; flex-direction: column; align-items: flex-start; gap: 14px; max-width: 520px; }
.state-icon { width: 48px; height: 48px; border-radius: 9999px; display: inline-flex; align-items: center; justify-content: center; background: var(--tint); color: var(--tint-text); }
.state-icon.good { background: var(--good-bg); color: var(--good-text); }
.state-icon.review { background: var(--review-bg); color: var(--review-text); }
.state-icon.attention { background: var(--attention-bg); color: var(--attention-text); }
.state h1 { font-size: 21px; letter-spacing: -0.02em; }

/* Responsive: phone-first screens widen at 720 and 1080 */
@media (max-width: 719px) {
  .nav { padding: 0 20px; height: 60px; }
  .nav-links, .nav-org { display: none; }
  .nav-phone { display: flex; }
  .page { padding: 20px; gap: 18px; }
  .page-head { flex-direction: column; align-items: stretch; }
  h1 { font-size: 26px; }
}

/* Utilities: the console CSP forbids inline styles, so spacing and small
   type variations are classes. Gaps are in pixels. */
.g-2 { gap: 2px; } .g-4 { gap: 4px; } .g-5 { gap: 5px; } .g-8 { gap: 8px; } .g-10 { gap: 10px; } .g-12 { gap: 12px; }
.g-16 { gap: 16px; } .g-18 { gap: 18px; } .g-20 { gap: 20px; } .g-24 { gap: 24px; }
.wrap { flex-wrap: wrap; } .shrink-0 { flex-shrink: 0; } .between { justify-content: space-between; }
.top { align-items: flex-start; } .centre { align-items: center; } .stretch { align-items: stretch; }
.fs-14 { font-size: 14px; } .fs-16 { font-size: 16px; } .fs-40 { font-size: 40px; }
.fw-500 { font-weight: 500; } .fw-600 { font-weight: 600; } .text-2 { color: var(--text-2); }
.mt-1 { margin-top: 1px; } .mh-44 { min-height: 44px; } .pt-80 { padding-top: 80px; } .mw-480 { max-width: 480px; }
.checkbox { width: 20px; height: 20px; margin-top: 2px; flex-shrink: 0; }
@media (max-width: 719px) { .fs-40 { font-size: 28px; } .pt-80 { padding-top: 40px; } }
