/*
 * FLATS Info Site: design system
 *
 * The :root token block below is copied VERBATIM from registration/registration.css.
 * That file is the source of record (see info/website-plan.md §8); if the tokens
 * change there, change them here too. Everything after the token block is either
 * a reused component class (same name, same rules) or a genuinely new component
 * the portals don't need (hero, drawer, accordion, prose, etc).
 */

.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; }

:root {
  --navy:          #262626;
  --navy-700:      #000000;
  --royal:         #DB9A4B;
  --royal-50:      #fbf3e8;
  --royal-100:     #f3e0c2;
  --bg:            #EBEEF2;
  --surface:       #ffffff;
  --surface-2:     #F7F5F4;
  --border:        #E2E4E8;
  --border-strong: #C2C5CC;
  --ink:           #262626;
  --ink-2:         #383737;
  --muted:         #4D4D4D;
  --muted-2:       #9F9B9B;
  --green:         #157C17;
  --green-50:      #e1f1e1;
  --error:         #C91B1B;
  --error-50:      #fbe5e5;
  --amber:         #DB9A4B;
  --amber-50:      #fbf2dc;

  --font-sans:      "Source Sans 3", system-ui, sans-serif;
  --font-display:   "Source Serif 4", Georgia, serif;
  --font-wordmark:  "Archivo Black", serif;
  --font-mono:      "IBM Plex Mono", ui-monospace, monospace;

  --radius:    6px;
  --radius-lg: 10px;
  --shadow-sm: 0 1px 2px rgba(13,23,39,0.04);
  --shadow:    0 1px 2px rgba(13,23,39,0.04), 0 4px 12px rgba(13,23,39,0.04);

  /* New tokens, not in the portal set */
  --max-w: 1120px;
  --max-prose: 68ch;
  --gutter: 24px;
  --nav-h: 56px;
  --space-1: 4px;  --space-2: 8px;  --space-3: 12px; --space-4: 16px;
  --space-5: 24px; --space-6: 32px; --space-7: 48px; --space-8: 64px; --space-9: 96px;
  --fs-1: clamp(0.85rem, 0.82rem + 0.15vw, 0.95rem);
  --fs-2: 1rem;
  --fs-3: clamp(1.1rem, 1.02rem + 0.4vw, 1.35rem);
  --fs-4: clamp(1.4rem, 1.2rem + 1vw, 1.9rem);
  --fs-5: clamp(1.8rem, 1.4rem + 2vw, 2.6rem);
  --fs-6: clamp(2.2rem, 1.6rem + 3vw, 3.4rem);
  --fs-7: clamp(2.6rem, 1.8rem + 4vw, 4.2rem);
  --hero-scrim: linear-gradient(180deg, rgba(38,38,38,.35) 0%, rgba(38,38,38,.55) 55%, rgba(38,38,38,.85) 100%);
  --shadow-lift: 0 8px 24px rgba(13,23,39,0.10);
}

*, *::before, *::after { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: 15px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

button { font-family: inherit; cursor: pointer; }
input, select, textarea { font-family: inherit; }
a { color: inherit; text-decoration: none; }

body { min-height: 100vh; display: flex; flex-direction: column; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.001ms !important; animation-iteration-count: 1 !important; transition-duration: 0.001ms !important; scroll-behavior: auto !important; }
}

:focus-visible {
  outline: 2px solid var(--royal);
  outline-offset: 2px;
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 1000;
  background: var(--navy);
  color: white;
  padding: 10px 16px;
  border-radius: 0 0 var(--radius) 0;
}
.skip-link:focus {
  left: 0;
}

/* ===== Brand bar / site header (reused shape, new nav + drawer) ===== */
.brand-bar, .site-header {
  background: var(--navy);
  color: white;
  height: var(--nav-h);
  display: flex;
  align-items: center;
  padding: 0 var(--gutter);
  gap: 20px;
  flex-shrink: 0;
  position: sticky;
  top: 0;
  z-index: 100;
}
.brand-bar .wm, .site-header .wm {
  font-family: var(--font-wordmark);
  font-weight: 900;
  font-size: 22px;
  letter-spacing: 0.01em;
  line-height: 1;
  color: white;
}
.brand-bar .product-label, .site-header .product-label {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 17px;
  color: rgba(255,255,255,0.75);
  padding-left: 16px;
  border-left: 1px solid rgba(255,255,255,0.18);
}
.brand-bar .spacer, .site-header .spacer { flex: 1; }
.brand-bar .help-link { font-size: 13px; color: rgba(255,255,255,0.65); display: flex; align-items: center; gap: 6px; }
.brand-bar .help-link:hover { color: white; }

.nav-toggle {
  display: none;
  background: transparent;
  border: none;
  color: white;
  padding: 6px;
  border-radius: var(--radius);
}
.nav-toggle:hover { background: rgba(255,255,255,0.1); }

.site-nav { display: flex; gap: 24px; margin-left: 12px; }
.site-nav a {
  color: rgba(255,255,255,0.8);
  font-size: 14px;
  font-weight: 500;
  padding: 6px 2px;
  border-bottom: 2px solid transparent;
}
.site-nav a:hover, .site-nav a[aria-current="page"] {
  color: white;
  border-bottom-color: var(--royal);
}

@media (max-width: 860px) {
  .site-nav { display: none; }
  .site-header .product-label { display: none; }
  .nav-toggle { display: inline-flex; align-items: center; justify-content: center; }
}

/* ===== Drawer ===== */
.drawer {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: none;
}
.drawer.drawer-open { display: block; }
.drawer::before {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.45);
}
.drawer-panel {
  position: absolute;
  top: 0; right: 0;
  height: 100%;
  width: min(340px, 88vw);
  background: var(--navy);
  color: white;
  padding: var(--space-5);
  overflow-y: auto;
  box-shadow: var(--shadow-lift);
}
.drawer-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: var(--space-6); }
.drawer .icon-btn { background: transparent; border: none; color: white; padding: 4px; }
.drawer-group { margin-bottom: var(--space-6); }
.drawer-group h3 { font-size: 12px; text-transform: uppercase; letter-spacing: 0.06em; color: rgba(255,255,255,0.5); margin: 0 0 var(--space-3); }
.drawer-group a { display: block; padding: 10px 0; font-size: 16px; color: rgba(255,255,255,0.9); border-bottom: 1px solid rgba(255,255,255,0.08); }
.drawer-group a[aria-current="page"] { color: var(--royal); }

/* ===== Buttons (reused) ===== */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 10px 18px; font-size: 14px; font-weight: 500; border-radius: var(--radius);
  border: 1px solid var(--border-strong); background: white; color: var(--ink-2);
  cursor: pointer; transition: all 120ms ease; text-decoration: none; line-height: 1;
}
.btn.primary { background: var(--navy); color: white; border-color: var(--navy); }
.btn.primary:hover { background: var(--navy-700); border-color: var(--navy-700); }
.btn.gold { background: var(--royal); color: var(--navy); border-color: var(--royal); }
.btn.gold:hover { background: #c48840; border-color: #c48840; }
.btn.ghost { background: transparent; border-color: transparent; color: var(--muted); }
.btn.ghost:hover { color: var(--ink); background: var(--surface-2); }
.btn.lg { padding: 13px 24px; font-size: 15px; }

/* ===== Cards / callouts (reused) ===== */
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); box-shadow: var(--shadow-sm); overflow: hidden; }
.card .card-h { padding: 16px 20px; border-bottom: 1px solid var(--border); }
.card .card-h h2 { margin: 0; font-size: 16px; font-family: var(--font-display); }
.card .card-b { padding: 20px; }

.callout { display: flex; gap: 10px; padding: 14px 16px; border-radius: var(--radius); font-size: 14px; }
.callout .callout-icon { flex-shrink: 0; margin-top: 1px; }
.callout.info { background: var(--royal-50); color: #6b4712; border: 1px solid var(--royal-100); }
.callout.info .callout-icon { color: var(--royal); }
.callout.error { background: var(--error-50); color: var(--error); border: 1px solid #f5c6c6; }
.callout.success { background: var(--green-50); color: var(--green); border: 1px solid #b8e0b8; }
.callout.warning { background: var(--amber-50); color: #7a4f0d; border: 1px solid #f3d99a; }

/* Content slot: visibly-marked placeholder for support-staff-owned copy.
   See website-plan.md §8: never invent final copy, mark what's missing. */
.content-slot {
  border: 1px dashed var(--border-strong);
  background: repeating-linear-gradient(45deg, var(--surface-2), var(--surface-2) 10px, var(--surface) 10px, var(--surface) 20px);
  color: var(--muted);
  font-size: 13px;
  padding: var(--space-4);
  border-radius: var(--radius);
}
.content-slot::before { content: 'CONTENT SLOT: '; font-weight: 700; }

.lang-tag {
  display: inline-flex; align-items: center; padding: 3px 10px; border-radius: 999px;
  background: var(--surface-2); border: 1px solid var(--border); font-size: 13px; color: var(--ink-2);
}
.lang-tag.sm { font-size: 11px; }

.tbl { width: 100%; border-collapse: collapse; }
.tbl thead th { text-align: left; font-size: 12px; text-transform: uppercase; letter-spacing: 0.04em; color: var(--muted); padding: 10px 14px; border-bottom: 1px solid var(--border); }
.tbl tbody td { padding: 12px 14px; border-bottom: 1px solid var(--border); font-size: 14px; }
.tbl tbody tr:hover { background: var(--surface-2); }

/* ===== Layout ===== */
main { flex: 1; }
.wrap { max-width: var(--max-w); margin: 0 auto; padding: 0 var(--gutter); }
.section { padding: var(--space-8) 0; }
.section-head { text-align: center; max-width: 640px; margin: 0 auto var(--space-6); }
.section-head .eyebrow { font-size: 12px; text-transform: uppercase; letter-spacing: 0.08em; color: var(--muted); font-weight: 600; }
.section-head h2 { font-family: var(--font-display); font-size: var(--fs-4); margin: 8px 0 0; }

/* ===== Hero ===== */
.hero {
  position: relative;
  display: flex;
  align-items: flex-end;
  min-height: 480px;
  color: white;
  background-color: var(--navy);
  overflow: hidden;
}
.hero-media {
  position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: 0;
}
.hero-scrim { position: absolute; inset: 0; background: var(--hero-scrim); z-index: 1; }
.hero-inner { position: relative; z-index: 2; padding: var(--space-8) var(--gutter); max-width: var(--max-w); margin: 0 auto; width: 100%; }
.hero-inner.center { text-align: center; }
.hero-inner.center h1 { max-width: 16ch; margin-left: auto; margin-right: auto; }
.hero h1 { font-family: var(--font-display); font-size: var(--fs-6); line-height: 1.08; margin: 0 0 var(--space-5); max-width: 14ch; }
.hero p { font-size: var(--fs-3); max-width: 52ch; color: rgba(255,255,255,0.9); margin: 0 0 var(--space-5); }
.hero .hero-lookup-label { font-size: 16px; color: rgba(255,255,255,0.9); max-width: none; margin: 0 auto var(--space-3); }
.hero.compact { min-height: 260px; }
.hero.full { min-height: calc(100vh - var(--nav-h)); align-items: center; }
.hero-credit {
  position: absolute; right: var(--gutter); bottom: 10px; z-index: 2;
  font-size: 11px; color: rgba(255,255,255,0.65);
}
.hero-credit a { color: rgba(255,255,255,0.85); text-decoration: underline; }

/* ===== Prose ===== */
.prose { max-width: var(--max-prose); font-size: 16px; line-height: 1.7; }
.prose h2 { font-family: var(--font-display); font-size: var(--fs-4); margin-top: var(--space-7); }
.prose h3 { font-family: var(--font-display); font-size: var(--fs-3); margin-top: var(--space-6); }
.prose p, .prose ul, .prose ol { margin: 0 0 var(--space-4); }
.prose a { color: var(--navy); text-decoration: underline; text-underline-offset: 2px; }
.prose a:hover { color: var(--royal); }
.prose blockquote { border-left: 3px solid var(--royal); margin: var(--space-5) 0; padding: var(--space-2) var(--space-5); color: var(--muted); font-family: var(--font-display); font-style: italic; }

/* ===== Accordion (native details/summary) ===== */
.accordion { border-top: 1px solid var(--border); max-width: var(--max-prose); }
.acc-item { border-bottom: 1px solid var(--border); }
.acc-item summary {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: var(--space-4) var(--space-1); cursor: pointer; font-weight: 600; list-style: none;
}
.acc-item summary::-webkit-details-marker { display: none; }
.acc-item summary .acc-chev { transition: transform 150ms ease; color: var(--muted); flex-shrink: 0; }
.acc-item[open] summary .acc-chev { transform: rotate(180deg); }
.acc-body { padding: 0 var(--space-1) var(--space-4); color: var(--muted); }

/* ===== Thumbnail cards ===== */
.thumb-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: var(--space-5); }
.thumb-card {
  display: block; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg);
  padding: var(--space-5); transition: box-shadow 150ms ease, transform 150ms ease;
}
.thumb-card:hover { box-shadow: var(--shadow-lift); transform: translateY(-2px); }
.thumb-card h3 { font-family: var(--font-display); font-size: 18px; margin: var(--space-3) 0 var(--space-2); }
.thumb-card p { color: var(--muted); font-size: 14px; margin: 0; }
.thumb-card .thumb-icon { color: var(--royal); }

/* ===== Feature rows ===== */
.feature-row { display: grid; grid-template-columns: 1fr 1fr; gap: var(--space-7); align-items: center; }
.feature-row.flip { direction: rtl; }
.feature-row.flip > * { direction: ltr; }
.feature-media img, .feature-media svg { width: 100%; border-radius: var(--radius-lg); display: block; }
.feature-body h2 { font-family: var(--font-display); font-size: var(--fs-4); margin-top: 0; }
@media (max-width: 760px) { .feature-row { grid-template-columns: 1fr; } .feature-row.flip { direction: ltr; } }

/* ===== Bands / CTA ===== */
.band { padding: var(--space-8) 0; }
.band.tinted { background: var(--surface-2); }
.band.invert { background: var(--navy); color: white; }
.cta-band { text-align: center; }
.cta-band h2 { font-family: var(--font-display); font-size: var(--fs-5); margin: 0 0 var(--space-5); }

/* ===== Typeahead / lookup ===== */
.typeahead { position: relative; max-width: 480px; }
.ta-field { display: flex; align-items: center; gap: 8px; background: white; color: var(--muted); border: 1px solid var(--border-strong); border-radius: var(--radius); padding: 12px 16px; }
.ta-field input { border: none; outline: none; flex: 1; font-size: 15px; color: var(--ink); background: transparent; }
.ta-list { position: absolute; top: calc(100% + 4px); left: 0; right: 0; background: white; color: var(--ink); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow-lift); max-height: 320px; overflow-y: auto; z-index: 20; list-style: none; margin: 0; padding: 4px; text-align: left; }
.ta-item { padding: 10px 12px; border-radius: var(--radius); cursor: pointer; font-size: 14px; color: var(--ink); }
.ta-item:hover, .ta-item[aria-selected="true"] { background: var(--surface-2); }
.ta-empty { padding: 12px; color: var(--muted); font-size: 14px; }

.hint { font-size: 13px; color: var(--muted); }
.answer { margin-top: var(--space-5); padding: var(--space-5); background: white; color: var(--ink); border: 1px solid var(--border); border-radius: var(--radius-lg); text-align: left; }
.answer .hint { color: var(--muted); }
.answer-h { font-family: var(--font-display); font-size: 18px; margin: 0 0 var(--space-2); }
.pill { display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; border-radius: 999px; font-size: 12px; font-weight: 600; }
.pill.ok { background: var(--green-50); color: var(--green); }
.pill.warn { background: var(--amber-50); color: #7a4f0d; }
.pill.info { background: var(--royal-50); color: #6b4712; }

/* ===== Footer ===== */
.site-foot { background: var(--navy); color: rgba(255,255,255,0.85); padding: var(--space-8) var(--gutter) var(--space-5); margin-top: auto; }
.site-foot .wm { font-family: var(--font-wordmark); color: white; font-size: 20px; }
.foot-brand { max-width: var(--max-w); margin: 0 auto var(--space-6); }
.foot-brand p { color: rgba(255,255,255,0.6); font-size: 13px; margin: var(--space-2) 0 0; }
.foot-cols { max-width: var(--max-w); margin: 0 auto; display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: var(--space-6); }
.foot-col h3 { font-size: 12px; text-transform: uppercase; letter-spacing: 0.05em; color: rgba(255,255,255,0.5); margin: 0 0 var(--space-3); }
.foot-col a { display: block; padding: 4px 0; font-size: 14px; color: rgba(255,255,255,0.8); }
.foot-col a:hover { color: white; }
.foot-bottom { max-width: var(--max-w); margin: var(--space-7) auto 0; padding-top: var(--space-5); border-top: 1px solid rgba(255,255,255,0.12); display: flex; justify-content: space-between; flex-wrap: wrap; gap: 8px; font-size: 12px; color: rgba(255,255,255,0.55); }

/* ===== Utilities =====
   CSP forbids inline style="" (style-src has no unsafe-inline; see
   includes/meta.php). Every one-off spacing/width tweak lives here instead. */
.u-center { margin-left: auto; margin-right: auto; }
.u-text-center { text-align: center; }
.u-max-xs { max-width: 480px; }
.u-max-sm { max-width: 520px; }
.u-max-md { max-width: 640px; }
.u-max-lg { max-width: 800px; }
.u-max-prose { max-width: var(--max-prose); }
.u-mt-3 { margin-top: var(--space-3); }
.u-mt-5 { margin-top: var(--space-5); }
.u-mt-6 { margin-top: var(--space-6); }
.u-mt-7 { margin-top: var(--space-7); }
.u-mb-3 { margin-bottom: var(--space-3); }
.u-mb-5 { margin-bottom: var(--space-5); }
.u-mb-6 { margin-bottom: var(--space-6); }
.u-mb-7 { margin-bottom: var(--space-7); }
.u-pt-8 { padding-top: var(--space-8); }
.u-pt-9 { padding-top: var(--space-9); }

/* ===== Small components that were previously one-off inline styles ===== */
.section-cta { text-align: center; margin-top: var(--space-5); }
.accordion.centered { margin-left: auto; margin-right: auto; }
.lang-grid { max-width: 800px; margin: 0 auto; display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; }

.contact-row { display: flex; align-items: center; gap: 10px; margin: 0 0 var(--space-4); }
.contact-row.top { align-items: flex-start; }
.contact-row:last-child { margin-bottom: 0; }

.search-form { max-width: 480px; margin: 0 auto var(--space-7); }
.search-results { max-width: var(--max-prose); margin: 0 auto; padding: 0; list-style: none; }
.search-results li { padding: var(--space-4) 0; border-bottom: 1px solid var(--border); }
.search-results .result-title { margin: var(--space-2) 0 0; font-weight: 600; }
.search-results .result-snippet { margin: 4px 0 0; color: var(--muted); font-size: 14px; }

.stub-card { max-width: 520px; margin: 0 auto; text-align: center; }
.stub-card .stub-icon { color: var(--royal); margin-bottom: var(--space-3); }
.stub-card h2 { font-family: var(--font-display); margin: 0 0 var(--space-3); }
.stub-card p { color: var(--muted); margin: 0 0 var(--space-5); }

@media print {
  .site-header, .drawer, .site-foot, .nav-toggle, script { display: none !important; }
}
