/* The chrome every public page shares: fonts, colour and type tokens, the
   top bar, the phone menu, breadcrumbs, the section tab bar, buttons, the
   footer and "back to top". Loaded first by the website (site.css), the
   economy guide (guide.css), the event pages, careers, appeals, web
   verification and the sign-in notices, so a visitor moving between them
   never sees the frame change. Page content lives in each page's own
   stylesheet.

   Served as-is (CSP: style-src 'self', no inline styles; fonts self-hosted
   from /site/static/fonts).

   The look is the dashboard's Classic theme (2026-11-11, Krishna: the
   website follows the same product design as the dashboard): cool grey
   surfaces, cards a step darker than the page, filled buttons, one blue
   accent for the primary action, the current page, links and keyboard
   focus, and Figtree for headings and text alike. Tabular figures for
   every number. No purple or dark-blue gradients. Dark by default, light
   when the system asks for it; every text colour passes WCAG AA on the
   surfaces it is used on in both. */

@font-face { font-family: 'Figtree'; font-style: normal; font-weight: 300 900; font-display: swap; src: url('/site/static/fonts/figtree-latin-var.woff2') format('woff2'); }

:root {
    color-scheme: dark;
    /* surfaces: page #272934, cards and bands #1f2129, wells #17181e */
    --canvas: #272934;
    --sunken: #1f2129;
    --s1: #1f2129;
    --s2: #313442;
    --s3: #3d4155;
    --field: #17181e;
    /* text: 13.2 / 7.7 / 4.9 : 1 on the page (button labels on the blue: 3.1 : 1, the dashboard's pairing, bold and 15.5px+) */
    --text: #f2f4fb;
    --text-2: #b9bccc;
    --text-3: #9195ab;
    /* the one accent */
    --accent: #3994ff;
    --accent-hover: #5ba8ff;
    --on-accent: #ffffff;
    --accent-text: #6cb2ff;
    --accent-dim: rgba(57, 148, 255, 0.12);
    --accent-border: rgba(57, 148, 255, 0.45);
    --focus: #6cb2ff;
    --glow: rgba(57, 148, 255, 0.10);
    /* the bots' own tones, for small marks only */
    --ember: #f08a5d;
    --forest: #3ba55d;
    --sakura: #f497b6;
    --danger: #ed4245;
    /* lines */
    --ink: #3d4155;
    --rule: rgba(242, 244, 251, 0.07);
    --border: rgba(242, 244, 251, 0.07);
    --border-strong: #3d4155;
    --shadow: 0 18px 40px -16px rgba(0, 0, 0, 0.6);
    --radius: 8px;
    --radius-lg: 12px;
    /* grid */
    --wrap: 1200px;
    --gutter: 20px;
    --gap: 24px;
    --bar-h: 64px;
    /* type: one scale for every page (1.25 steps from 17px) */
    --display: 'Figtree', ui-sans-serif, system-ui, -apple-system, 'Segoe UI', sans-serif;
    --font: 'Figtree', ui-sans-serif, system-ui, -apple-system, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
    --mono: ui-monospace, 'SF Mono', Menlo, Consolas, monospace;
    --fs-xs: 13px;
    --fs-sm: 15px;
    --fs-base: 17px;
    --fs-md: 19px;
    --fs-lg: 23px;
    --fs-xl: clamp(26px, 2.6vw, 32px);
    --fs-2xl: clamp(34px, 4.2vw, 50px);
    --fs-3xl: clamp(42px, 6.2vw, 78px);
}
@media (prefers-color-scheme: light) {
    :root {
        color-scheme: light;
        --canvas: #eef0f5;
        --sunken: #e5e7ee;
        --s1: #ffffff;
        --s2: #dfe2eb;
        --s3: #cfd3df;
        --field: #ffffff;
        /* 15.5 / 7.1 / 5.2 : 1 on the page; white on the blue 4.9 : 1 */
        --text: #17181e;
        --text-2: #4b4f63;
        --text-3: #5f6378;
        --accent: #1f6fd6;
        --accent-hover: #1a60bb;
        --on-accent: #ffffff;
        --accent-text: #1a62c2;
        --accent-dim: rgba(57, 148, 255, 0.12);
        --accent-border: rgba(31, 111, 214, 0.4);
        --focus: #1a62c2;
        --glow: rgba(57, 148, 255, 0.12);
        --ember: #a8461f;
        --forest: #24894a;
        --sakura: #b5335f;
        --danger: #d1393c;
        --ink: rgba(23, 24, 30, 0.18);
        --rule: rgba(23, 24, 30, 0.10);
        --border: rgba(23, 24, 30, 0.10);
        --border-strong: rgba(23, 24, 30, 0.18);
        --shadow: 0 16px 40px -14px rgba(23, 24, 30, 0.25);
    }
}
@media (min-width: 720px) { :root { --gutter: 40px; --gap: 32px; } }

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 88px; }
:root:has(.subnav) { scroll-padding-top: 136px; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } *, *::before, *::after { animation: none !important; transition: none !important; } }
body {
    margin: 0;
    background: var(--canvas);
    color: var(--text);
    font: 400 var(--fs-base)/1.6 var(--font);
    font-feature-settings: 'ss01' 0;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
    overflow-x: hidden;
    /* short pages (a notice, a sign-in card) keep the footer at the bottom */
    min-height: 100vh; min-height: 100dvh; display: flex; flex-direction: column;
}
#main { flex: 1 0 auto; }
img { max-width: 100%; }
h1, h2, h3, h4 {
    font-family: var(--display); font-weight: 800; font-optical-sizing: auto;
    letter-spacing: -0.02em; text-wrap: balance; color: var(--text);
}
p, li { text-wrap: pretty; }
a { color: var(--accent-text); text-underline-offset: 3px; text-decoration-thickness: 1px; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 3px; border-radius: 4px; }
::selection { background: rgba(57, 148, 255, 0.35); }
[hidden] { display: none !important; }
.num, time { font-variant-numeric: tabular-nums; }

.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 var(--gutter); }

.skip { position: absolute; left: -9999px; }
.skip:focus { left: 16px; top: 12px; z-index: 50; background: var(--s1); color: var(--text); padding: 8px 12px; border-radius: 8px; }
.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; }

/* ---- top bar ---------------------------------------------------------- */
.bar {
    position: sticky; top: 0; z-index: 30;
    background: color-mix(in srgb, var(--canvas) 92%, transparent);
    backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--rule);
}
.bar-in { display: flex; align-items: stretch; gap: 28px; height: var(--bar-h); }
/* The brand is the way home: it carries the hover and focus states a home
   link would. */
.brand {
    align-self: center; display: inline-flex; align-items: center; gap: 10px; margin-left: -6px; padding: 6px 10px 6px 6px; border-radius: 10px;
    color: var(--text); text-decoration: none; font: 800 21px/1 var(--display); letter-spacing: -0.02em;
    transition: background .15s, color .15s;
}
.brand img { width: 28px; height: 28px; border-radius: 8px; display: block; }
.brand:hover { background: var(--s2); color: var(--text); }
.brand:focus-visible { outline-offset: 0; }
/* Main links: the current page is marked on the bar's bottom edge. */
.nav { display: flex; align-items: stretch; gap: 26px; }
.nav a { position: relative; display: flex; align-items: center; padding: 0 6px; margin: 0 -6px; color: var(--text-2); text-decoration: none; font-size: var(--fs-sm); font-weight: 500; }
.nav a:hover { color: var(--text); }
.nav a[aria-current="page"] { color: var(--text); font-weight: 600; }
.nav a[aria-current="page"]::after { content: ""; position: absolute; left: 6px; right: 6px; bottom: -1px; height: 2px; background: var(--accent); }
.nav a:focus-visible { outline: none; }
.nav a:focus-visible::before { content: ""; position: absolute; inset: 15px -2px; border: 2px solid var(--focus); border-radius: 6px; }
.bar-end { margin-left: auto; display: flex; align-items: center; gap: 18px; }

/* phone menu: a <details>, no script; opens as a sheet under the bar */
.menu { display: none; }
.menu summary { list-style: none; cursor: pointer; display: grid; place-items: center; width: 42px; height: 42px; border-radius: 10px; border: 1px solid var(--border-strong); }
.menu summary::-webkit-details-marker { display: none; }
.menu summary:hover { background: var(--s2); }
.burger, .burger::before, .burger::after { display: block; width: 16px; height: 2px; border-radius: 2px; background: var(--text); position: relative; transition: transform .2s, background .2s; }
.burger::before, .burger::after { content: ""; position: absolute; left: 0; }
.burger::before { top: -5px; }
.burger::after { top: 5px; }
.menu[open] .burger { background: transparent; }
.menu[open] .burger::before { transform: translateY(5px) rotate(45deg); }
.menu[open] .burger::after { transform: translateY(-5px) rotate(-45deg); }
.menu-panel {
    position: absolute; left: 0; right: 0; top: 100%; padding: 8px var(--gutter) 20px;
    display: grid; background: var(--canvas); border-bottom: 1px solid var(--border-strong); box-shadow: var(--shadow);
}
.menu-panel a { display: flex; align-items: center; min-height: 52px; padding: 0 2px; border-bottom: 1px solid var(--rule); color: var(--text); text-decoration: none; font: 600 var(--fs-md)/1.2 var(--display); font-stretch: 92%; letter-spacing: -0.01em; }
.menu-panel a:hover { color: var(--accent-text); }
.menu-panel a[aria-current="page"] { color: var(--accent-text); }
.menu-panel a[aria-current="page"]::before { content: ""; width: 6px; height: 6px; margin-right: 10px; border-radius: 50%; background: var(--accent); }
.menu-panel hr { display: none; }
.menu-panel .menu-sub { min-height: 44px; font: 500 var(--fs-sm)/1.2 var(--font); color: var(--text-2); border-bottom: 0; }
.menu-panel .menu-sub + .menu-sub { min-height: 36px; }
.menu-panel .menu-first-sub { margin-top: 8px; }
@media (max-width: 1000px) { .nav { display: none; } .menu { display: block; } .bar-in { gap: 12px; } .bar-end { gap: 10px; } }
/* Phones: the brand never shrinks (it was squeezed to "Dexte" behind the
   search button), and the join button drops "the server" so brand, search,
   join and menu fit on one 360px row. */
.brand { flex-shrink: 0; }
.bar-join { flex-shrink: 0; }
@media (max-width: 480px) { .bar-join-more { display: none; } .bar-in { gap: 8px; } .bar-end { gap: 8px; } .bar-end .btn-sm { padding: 0 12px; } }
@media (max-width: 340px) { .bar-in, .bar-end { gap: 6px; } .brand { gap: 8px; font-size: 19px; } .bar-end .btn-sm { padding: 0 10px; } }

/* breadcrumb under the bar, only where a page sits below another one */
.crumbs { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding-top: 24px; padding-bottom: 0; font-size: 14px; color: var(--text-3); }
.crumbs a { color: var(--text-3); text-decoration: none; }
.crumbs a:hover { color: var(--accent-text); text-decoration: underline; }
.crumbs [aria-current] { color: var(--text-2); }
.crumbs .sep { opacity: .6; }

/* section tab bar: a section's own pages (the guide, an event), under the
   top bar and sticky with it; scrolls sideways on phones */
.subnav {
    position: sticky; top: var(--bar-h); z-index: 29;
    background: color-mix(in srgb, var(--canvas) 94%, transparent);
    backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--rule);
}
.subnav-in { display: flex; align-items: center; gap: 4px 20px; min-width: 0; }
.subnav-label {
    flex: none; display: inline-flex; align-items: center; gap: 8px; padding: 0 20px 0 0; border-right: 1px solid var(--rule);
    color: var(--text); text-decoration: none; font: 700 15px/1.2 var(--display); font-stretch: 92%; letter-spacing: -0.01em;
}
.subnav-label:hover { color: var(--accent-text); }
.subnav-end { flex: none; margin-left: auto; padding-left: 12px; font-size: 14px; color: var(--text-2); white-space: nowrap; }
.subnav-end time { color: var(--text); font-weight: 600; font-variant-numeric: tabular-nums; }
.tabs { display: flex; gap: 2px; min-width: 0; overflow-x: auto; scrollbar-width: none; -webkit-mask-image: linear-gradient(to right, #000 calc(100% - 24px), transparent); mask-image: linear-gradient(to right, #000 calc(100% - 24px), transparent); }
.tabs::-webkit-scrollbar { display: none; }
.tabs a { flex: none; padding: 13px 12px 12px; color: var(--text-2); text-decoration: none; font-weight: 500; font-size: var(--fs-sm); border-bottom: 2px solid transparent; white-space: nowrap; }
.tabs a:first-child { margin-left: -12px; }
.subnav-label + .tabs a:first-child { margin-left: 0; }
.tabs a:hover { color: var(--text); }
.tabs a[aria-current="page"] { color: var(--text); font-weight: 600; border-bottom-color: var(--accent); }
.tabs a:focus-visible { outline-offset: -3px; }
@media (min-width: 1100px) { .tabs { -webkit-mask-image: none; mask-image: none; } }
@media (max-width: 720px) {
    .subnav-label, .subnav-end { display: none; }
    .tabs a { padding: 12px 11px 11px; font-size: 14.5px; }
}

/* back to top: a link in the footer; floating once the page has scrolled */
.to-top {
    position: fixed; right: max(16px, env(safe-area-inset-right)); bottom: max(16px, env(safe-area-inset-bottom)); z-index: 25;
    display: grid; place-items: center; width: 44px; height: 44px; border-radius: 50%;
    background: var(--s1); color: var(--text); border: 1px solid var(--border-strong); box-shadow: var(--shadow);
    opacity: 0; visibility: hidden; transition: background .15s, border-color .15s;
}
.to-top svg { width: 18px; height: 18px; }
.to-top:hover { border-color: var(--accent-border); color: var(--accent-text); }
@supports (animation-timeline: scroll()) {
    .to-top { animation: to-top-in linear both; animation-timeline: scroll(root); animation-range: 400px 700px; }
    @keyframes to-top-in { from { opacity: 0; visibility: hidden; } to { opacity: 1; visibility: visible; } }
}

/* ---- buttons and links ------------------------------------------------ */
.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    min-height: 46px; padding: 0 20px; border-radius: 10px; cursor: pointer;
    font: 600 15.5px/1 var(--font); text-decoration: none; white-space: nowrap;
    border: 1px solid transparent; color: var(--text); background: var(--s2);
    transition: background .15s, border-color .15s, color .15s;
}
.btn:hover { background: var(--s3); }
.btn svg { width: 18px; height: 18px; flex: none; }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn-primary { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
.btn-primary:hover { background: var(--accent-hover); border-color: var(--accent-hover); color: var(--on-accent); }
.btn-sm { min-height: 38px; padding: 0 14px; font-size: 14.5px; }
.btn-sm svg { width: 16px; height: 16px; }
.btn-ghost { background: transparent; border-color: var(--border-strong); }
.btn-ghost:hover { background: var(--s2); }
.link-arrow, .more { display: inline-flex; align-items: center; gap: 6px; font-weight: 600; text-decoration: none; color: var(--accent-text); }
.link-arrow svg, .more svg { width: 16px; height: 16px; transition: transform .15s; }
.link-arrow:hover, .more:hover { text-decoration: underline; }
.link-arrow:hover svg, .more:hover svg { transform: translateX(3px); }
.dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--forest); }
.cta-row { display: flex; flex-wrap: wrap; align-items: center; gap: 14px 24px; }

/* ---- footer ----------------------------------------------------------- */
.foot { border-top: 1px solid var(--rule); background: var(--sunken); padding: 56px 0 32px; margin-top: 0; }
.foot-grid { display: grid; gap: 28px var(--gap); grid-template-columns: repeat(2, minmax(0, 1fr)); }
.foot-about { grid-column: 1 / -1; margin: 0; }
.foot-about .brand { margin-bottom: 10px; }
.foot-about p { margin: 0; color: var(--text-3); font-size: var(--fs-sm); max-width: 34ch; }
@media (min-width: 860px) { .foot-grid { grid-template-columns: 5fr repeat(3, 2fr); } .foot-about { grid-column: auto; } }
.foot h2, .foot h4 { margin: 4px 0 14px; font: 700 var(--fs-sm)/1.2 var(--font); letter-spacing: 0; color: var(--text); }
.foot ul { list-style: none; margin: 0; padding: 0; }
.foot li { margin: 7px 0; }
.foot li a { color: var(--text-3); text-decoration: none; font-size: var(--fs-sm); }
.foot li a:hover { color: var(--accent-text); text-decoration: underline; }
.fine { margin-top: 32px; padding-top: 16px; border-top: 1px solid var(--rule); display: flex; flex-wrap: wrap; align-items: center; gap: 8px 20px; color: var(--text-3); font-size: var(--fs-xs); }
.fine a { color: inherit; }
.fine .foot-up { margin-left: auto; display: inline-flex; align-items: center; gap: 6px; color: var(--text-2); text-decoration: none; font-weight: 600; }
.fine .foot-up svg { width: 14px; height: 14px; }
.fine .foot-up:hover { color: var(--accent-text); }

/* Saved event guides (served byte for byte after an event ends) keep the
   footer markup of the day they were saved; these keep the older form
   (brand row with "Back to top", the about line as a bare paragraph)
   laid out. */
.foot-top { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding-bottom: 24px; margin-bottom: 24px; border-bottom: 1px solid var(--rule); }
.foot-top .foot-up { display: inline-flex; align-items: center; gap: 6px; color: var(--text-2); text-decoration: none; font-weight: 600; font-size: 14px; }
.foot-top .foot-up svg { width: 14px; height: 14px; }
p.foot-about { color: var(--text-3); font-size: var(--fs-sm); max-width: 34ch; }

/* ---- site-wide helpers (nav.js) ----------------------------------------
   Search dialog (Ctrl/Cmd+K, "/"), the back-to-top fallback for browsers
   without scroll-driven animations, the footer's way home, and the reading
   aids long documents get: contents highlight and "find on this page".
   Everything that needs the script is hidden until nav.js marks <html>
   with .js, so a page without JavaScript shows no dead controls. */
.search-open {
    display: none; align-items: center; gap: 8px; height: 38px; padding: 0 10px 0 12px; border-radius: 10px; cursor: pointer;
    background: var(--s1); color: var(--text-2); border: 1px solid var(--border-strong); font: 500 var(--fs-sm)/1 var(--font);
}
.js .search-open { display: inline-flex; }
.search-open svg { width: 16px; height: 16px; flex: none; }
.search-open:hover { color: var(--text); border-color: var(--accent-border); }
.search-open kbd, .sr-close { font: 600 11.5px/1 var(--font); padding: 4px 6px; border-radius: 6px; border: 1px solid var(--border-strong); color: var(--text-3); background: var(--canvas); }
@media (max-width: 1000px) { .search-open { width: 42px; height: 42px; padding: 0; justify-content: center; } .search-open .search-label, .search-open kbd { display: none; } }

.sr { position: fixed; inset: 0; z-index: 60; display: grid; justify-items: center; align-items: start; padding: max(10vh, 56px) 16px 16px; }
.sr[hidden] { display: none; }
.sr-backdrop { position: absolute; inset: 0; background: color-mix(in srgb, var(--sunken) 72%, transparent); backdrop-filter: blur(3px); -webkit-backdrop-filter: blur(3px); }
.sr-panel {
    position: relative; width: min(640px, 100%); max-height: min(70vh, 640px); display: flex; flex-direction: column;
    background: var(--s1); border: 1px solid var(--border-strong); border-radius: var(--radius-lg); box-shadow: var(--shadow); overflow: hidden;
}
.sr-head { display: flex; align-items: center; gap: 10px; padding: 0 14px; border-bottom: 1px solid var(--rule); }
.sr-head svg { width: 18px; height: 18px; color: var(--accent-text); flex: none; }
.sr-head input { flex: 1; min-width: 0; height: 56px; border: 0; outline: 0; background: transparent; color: var(--text); font: 500 var(--fs-md)/1.2 var(--font); }
.sr-head input::-webkit-search-cancel-button { display: none; }
.sr-close { cursor: pointer; }
.sr-close:hover { color: var(--text); border-color: var(--accent-border); }
.sr-status { margin: 0; padding: 10px 16px 4px; color: var(--text-3); font-size: var(--fs-xs); }
.sr-list { list-style: none; margin: 0; padding: 4px 8px 10px; overflow: auto; }
.sr-hit { display: flex; flex-direction: column; gap: 2px; padding: 10px; border-radius: 9px; color: var(--text); text-decoration: none; }
.sr-hit:hover, .sr-hit:focus-visible { background: var(--accent-dim); outline: none; box-shadow: inset 0 0 0 1px var(--accent-border); }
.sr-title { font-weight: 600; }
.sr-where { font-size: var(--fs-xs); color: var(--text-3); }
.sr-open body { overflow: hidden; }

/* back to top: shown by nav.js where scroll-driven animations aren't supported */
.to-top.is-shown { opacity: 1; visibility: visible; }

/* the footer's way home, beside "Back to top" */
.fine .foot-home { margin-left: auto; display: inline-flex; align-items: center; gap: 6px; color: var(--text-2); text-decoration: none; font-weight: 600; }
.fine .foot-home svg { width: 14px; height: 14px; }
.fine .foot-home:hover { color: var(--accent-text); }
.fine .foot-home + .foot-up, .fine .foot-staff + .foot-up { margin-left: 0; }
/* the staff area's one, discreet entry point (staff reach /staff directly) */
.fine .foot-staff { color: var(--text-3); text-decoration: none; }
.fine .foot-staff:hover { color: var(--accent-text); }

/* long documents: the section you're reading, and find on this page */
.toc a[aria-current="location"] { color: var(--accent-text); font-weight: 600; }
.toc .toc-group { margin: 16px 0 6px; color: var(--text-3); }
.find { margin: 0 0 18px; }
.find label { display: block; margin: 0 0 6px; font-size: var(--fs-xs); font-weight: 600; color: var(--text-2); }
.find-row { display: flex; gap: 6px; }
.find input { flex: 1; min-width: 0; height: 38px; padding: 0 10px; border-radius: 9px; border: 1px solid var(--border-strong); background: var(--field); color: var(--text); font: 400 var(--fs-sm)/1 var(--font); }
.find input:focus { outline: 2px solid var(--focus); outline-offset: 1px; }
.find-step { width: 38px; height: 38px; border-radius: 9px; border: 1px solid var(--border-strong); background: var(--s1); color: var(--text-2); cursor: pointer; font: 600 15px/1 var(--font); }
.find-step:hover { color: var(--text); border-color: var(--accent-border); }
.find-count { min-height: 1.2em; margin: 6px 0 0; font-size: var(--fs-xs); color: var(--text-3); }
mark.find-hit { background: var(--accent-dim); color: inherit; border-radius: 3px; box-shadow: 0 0 0 1px var(--accent-border); }
mark.find-hit.is-current { background: var(--accent); color: var(--on-accent); }
