/* AGO Brandbook - its own small design system, deliberately not shared with ago-landing's
 * styles.css or ago-console's tokens.css: this page's whole job is to *display* those two files'
 * values as data (swatches, a type scale, the five icons), not to build a UI out of them. Sharing a
 * stylesheet would blur which colors are "the brand" and which are just this page's own chrome.
 *
 * No build step, no framework - the same shape ago-landing's own styles.css states the reasoning
 * for: there is nothing here that needs one.
 *
 * `25-184`: dark-first three-state cascade, the same shape `ago-landing/styles.css` and
 * `ago-console/src/design/tokens.css` both use - bare `:root` is the dark palette (already was, and
 * stays the source of truth), `:root[data-theme="light"]` is the manual override, and the
 * `prefers-color-scheme` block now guards itself with `:not([data-theme="dark"])` so an explicit
 * dark choice can win over a light OS setting too, not just the reverse. Same light values as
 * before, just no longer the only way to reach them - see `theme.js` for what writes the attribute.
 */
:root{
  --bg:#0c101c;
  --panel:#151c30;
  --panel-2:#1b2440;
  --line:#25304d;
  --ink:#eef2fb;
  --ink-soft:#9aa7c4;
  --ink-faint:#6b7797;
  --page-accent:#4c8dff;
  --r:14px;
  --r-lg:22px;
}
:root[data-theme="light"]{
  --bg:#f4f6fb;
  --panel:#ffffff;
  --panel-2:#f2f5fc;
  --line:#dbe3f2;
  --ink:#0f1728;
  --ink-soft:#4c5878;
  --ink-faint:#7c88a6;
  --page-accent:#2f6ce0;
}
@media (prefers-color-scheme: light){
  :root:not([data-theme="dark"]){
    --bg:#f4f6fb;
    --panel:#ffffff;
    --panel-2:#f2f5fc;
    --line:#dbe3f2;
    --ink:#0f1728;
    --ink-soft:#4c5878;
    --ink-faint:#7c88a6;
    --page-accent:#2f6ce0;
  }
}

*{box-sizing:border-box;}
body{
  margin:0;background:var(--bg);color:var(--ink);
  font-family:'Manrope',system-ui,-apple-system,'Segoe UI',Roboto,sans-serif;
  font-size:15.5px;line-height:1.6;-webkit-font-smoothing:antialiased;
}
h1,h2,h3{font-family:'Unbounded','Manrope',sans-serif;margin:0;line-height:1.15;font-weight:700;}
p{margin:0;}
a{color:inherit;}
code{font-family:'JetBrains Mono',ui-monospace,'Consolas',monospace;}

.wrap{max-width:1080px;margin:0 auto;padding:0 22px;}
.kicker{font-family:'JetBrains Mono',monospace;font-size:11.5px;letter-spacing:.14em;text-transform:uppercase;color:var(--page-accent);}
.lede{color:var(--ink-soft);font-size:16px;max-width:70ch;}

header.top{padding:34px 0 30px;border-bottom:1px solid var(--line);}
.wordmark{display:inline-flex;align-items:center;gap:10px;font-family:'Unbounded',sans-serif;font-weight:700;font-size:26px;text-decoration:none;color:inherit;}
.wordmark .g{width:34px;height:34px;border-radius:9px;background:linear-gradient(140deg,#4c8dff,#9d6bff);display:grid;place-items:center;color:#fff;font-size:17px;}
header.top .lede{margin-top:14px;}
header.top .src{margin-top:10px;font-family:'JetBrains Mono',monospace;font-size:12px;color:var(--ink-faint);}

/* Page nav - 25-183. Five real .html files now, not one scroll; this is the one bit of markup
   copy-pasted by hand into every page's own <header> to keep it consistent, the shape a static site
   with no templating has to accept (see the item's own "no build step" note). */
.topbar{display:flex;align-items:center;justify-content:space-between;gap:20px;flex-wrap:wrap;padding-bottom:26px;margin-bottom:26px;border-bottom:1px solid var(--line);}
/* 25-184: the page nav and the theme toggle sit together at the trailing end of the topbar, the
   same "everything after the brand drifts right" grouping ago-landing's own .nav-row uses - kept as
   one wrapper here instead of ago-landing's margin-left:auto so .topbar's existing two-child
   space-between behaviour (wordmark vs. "the rest") doesn't have to change shape for a third item. */
.topbar-end{display:flex;align-items:center;gap:14px;flex-wrap:wrap;}
.pagenav{display:flex;gap:2px;flex-wrap:wrap;font-family:'Manrope',sans-serif;}
.pagenav a{padding:8px 14px;border-radius:999px;font-size:13.5px;font-weight:700;color:var(--ink-soft);text-decoration:none;transition:.15s;}
.pagenav a:hover{color:var(--ink);background:var(--panel-2);}
.pagenav a[aria-current="page"]{color:var(--ink);background:var(--panel-2);box-shadow:inset 0 0 0 1px var(--line);}

/* Theme toggle - 25-184. Same idea as ago-landing's own .theme-toggle (a small square icon button
   beside the nav), redrawn in this page's own chrome rather than importing its CSS class wholesale:
   this page has no Material Symbols font loaded, so the icon is a plain character (this repository's
   own idiom already - see the ✕/✓/i alert glyphs on components.html) instead of an icon-font glyph. */
.theme-toggle{display:flex;align-items:center;justify-content:center;width:36px;height:36px;flex:0 0 auto;
  border:1px solid var(--line);border-radius:10px;background:transparent;color:var(--ink-soft);cursor:pointer;
  font-size:15px;line-height:1;transition:border-color .15s,color .15s,background .15s;}
.theme-toggle:hover{border-color:var(--page-accent);color:var(--ink);background:var(--panel-2);}

section{padding:52px 0;border-bottom:1px solid var(--line);}
section:last-of-type{border-bottom:none;}
.head{max-width:70ch;display:flex;flex-direction:column;gap:10px;margin-bottom:32px;}
.head h2{font-size:clamp(22px,3vw,30px);}
.note{font-size:13.5px;color:var(--ink-faint);max-width:80ch;margin-top:6px;}
.note code{color:var(--ink-soft);}

/* color swatches */
.swatch-group{margin-bottom:34px;}
.swatch-group h3{font-size:15px;font-weight:700;margin-bottom:4px;}
.swatch-group .group-note{font-size:13px;color:var(--ink-faint);max-width:78ch;margin-bottom:16px;}
.swatches{display:grid;grid-template-columns:repeat(auto-fill,minmax(190px,1fr));gap:14px;}
.swatch{border:1px solid var(--line);border-radius:var(--r);overflow:hidden;background:var(--panel);}
.swatch .fill{height:64px;}
.swatch .meta{padding:10px 12px;}
.swatch .name{font-family:'JetBrains Mono',monospace;font-size:12.5px;font-weight:600;}
.swatch .hex{font-family:'JetBrains Mono',monospace;font-size:11.5px;color:var(--ink-faint);margin-top:2px;}
.swatch .usage{font-size:12px;color:var(--ink-soft);margin-top:6px;line-height:1.45;}

/* type */
.type-row{display:flex;align-items:baseline;gap:22px;padding:16px 0;border-bottom:1px solid var(--line);flex-wrap:wrap;}
.type-row:last-child{border-bottom:none;}
.type-row .tok{font-family:'JetBrains Mono',monospace;font-size:11.5px;color:var(--ink-faint);width:220px;flex:0 0 auto;}
.type-row .sample{flex:1 1 320px;}
.families{display:grid;grid-template-columns:repeat(auto-fit,minmax(230px,1fr));gap:16px;margin-bottom:36px;}
.family-card{border:1px solid var(--line);border-radius:var(--r);padding:18px 20px;background:var(--panel);}
.family-card .fam-name{font-size:13px;color:var(--ink-faint);font-family:'JetBrains Mono',monospace;margin-bottom:8px;}
.family-card .fam-sample{font-size:26px;margin-bottom:8px;}
.family-card .fam-role{font-size:12.5px;color:var(--ink-soft);}

/* icons */
.icon-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(150px,1fr));gap:14px;}
.icon-card{border:1px solid var(--line);border-radius:var(--r);padding:20px 14px;background:var(--panel);display:flex;flex-direction:column;align-items:center;gap:10px;text-align:center;}
.icon-card img{width:40px;height:40px;}
.icon-card .icon-name{font-size:13px;font-weight:600;}
.icon-card .icon-file{font-family:'JetBrains Mono',monospace;font-size:11px;color:var(--ink-faint);}

/* logo */
.logo-block{display:flex;align-items:center;gap:28px;flex-wrap:wrap;}
.logo-demo{border:1px solid var(--line);border-radius:var(--r-lg);padding:34px 44px;background:var(--panel-2);display:flex;align-items:center;justify-content:center;}
.logo-demo .wordmark{font-size:34px;}
.logo-block .lede{flex:1 1 320px;}

/* Typography page - two systems, side by side, 25-183 */
.type-systems{display:grid;grid-template-columns:1fr 1fr;gap:28px;margin-bottom:40px;}
@media (max-width:760px){.type-systems{grid-template-columns:1fr;}}
.system-block{border:1px solid var(--line);border-radius:var(--r-lg);padding:24px 26px;background:var(--panel);}
.system-block .system-kicker{font-family:'JetBrains Mono',monospace;font-size:11px;letter-spacing:.12em;text-transform:uppercase;color:var(--ink-faint);}
.system-block h3{font-size:18px;margin-top:6px;margin-bottom:4px;}
.system-block .system-src{font-family:'JetBrains Mono',monospace;font-size:11.5px;color:var(--ink-faint);margin-bottom:18px;}
.system-block .families{margin-bottom:0;}

.type-scale-cols{display:grid;grid-template-columns:1fr 1fr;gap:28px;margin:28px 0 40px;}
@media (max-width:760px){.type-scale-cols{grid-template-columns:1fr;}}
.type-scale-cols h4{font-size:14px;margin-bottom:10px;color:var(--ink-soft);}

.info-table{width:100%;border-collapse:collapse;margin-top:8px;}
.info-table th,.info-table td{text-align:left;padding:11px 14px;border-bottom:1px solid var(--line);font-size:13.5px;}
.info-table thead th{font-family:'JetBrains Mono',monospace;font-size:11px;letter-spacing:.08em;text-transform:uppercase;color:var(--ink-faint);font-weight:600;}
.info-table td.fam{font-weight:700;}
.info-table td.lic{font-family:'JetBrains Mono',monospace;font-size:12.5px;}
.info-table tbody tr:last-child td{border-bottom:none;}
.callout{border:1px solid var(--line);border-left:3px solid var(--page-accent);border-radius:0 var(--r) var(--r) 0;background:var(--panel);padding:16px 18px;font-size:13.5px;color:var(--ink-soft);margin:22px 0;max-width:80ch;}
.callout code{color:var(--ink-soft);}

/* Components page scaffolding - the brandbook's own chrome around each demo, never the component
   styling itself (that lives in components.css, matching ago-console's real classes/tokens). */
.demo-block{margin-bottom:52px;}
.demo-block h3{font-size:17px;margin-bottom:4px;}
.demo-block .demo-note{font-size:13px;color:var(--ink-faint);max-width:78ch;margin-bottom:18px;}
.demo-stage{border:1px solid var(--line);border-radius:var(--r-lg);background:var(--panel-2);padding:26px;}
.demo-row{display:flex;flex-wrap:wrap;align-items:center;gap:12px;margin-bottom:14px;}
.demo-row:last-child{margin-bottom:0;}
.demo-row-label{font-family:'JetBrains Mono',monospace;font-size:11px;letter-spacing:.06em;text-transform:uppercase;color:var(--ink-faint);width:100%;margin-bottom:2px;}
.demo-col{display:flex;flex-direction:column;gap:14px;}
.demo-item{display:flex;flex-direction:column;align-items:flex-start;gap:8px;}
.demo-cap{font-family:'JetBrains Mono',monospace;font-size:10.5px;letter-spacing:.05em;text-transform:uppercase;color:var(--ink-faint);}
.jump-nav{display:flex;flex-wrap:wrap;gap:8px 16px;margin:18px 0 0;padding:0;list-style:none;font-family:'JetBrains Mono',monospace;font-size:11.5px;}
.jump-nav a{color:var(--ink-faint);text-decoration:none;}
.jump-nav a:hover{color:var(--page-accent);}

footer{padding:36px 0 60px;}
.foot-row{display:flex;gap:16px;flex-wrap:wrap;align-items:center;font-size:13px;color:var(--ink-faint);}
.foot-row a{color:var(--ink-soft);text-decoration:none;}
.foot-row a:hover{color:var(--page-accent);}
