/* Shared by every page: the four looks in light and dark (docs/AESTHETIC.md has every token and its measured
   contrast), their typefaces (self-hosted, OFL, site/fonts/*-OFL.txt) and the look pickers. */
/* Scripts. Each face is split by unicode-range as Google Fonts serves it, so a page downloads only the files its text
   needs. Instrument's headings face ships Latin only. The Flight and Night faces ship Latin and Latin Extended, and no
   Cyrillic or Greek. Terminal's face ships Latin, Latin Extended, Cyrillic and Greek. Where a look's face lacks the
   script, the end of this file hands the page to the system font for that look, so a heading is never half one face and
   half another. scripts/font-coverage.py prints the table. */
@font-face { font-family: "B612"; font-style: normal; font-weight: 400; font-display: swap; src: url(/fonts/b612-400-latin.woff2) format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "B612"; font-style: normal; font-weight: 700; font-display: swap; src: url(/fonts/b612-700-latin.woff2) format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Figtree"; font-style: normal; font-weight: 400 700; font-display: optional; src: url(/fonts/figtree-var-latin.woff2) format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Figtree"; font-style: normal; font-weight: 400 700; font-display: optional; src: url(/fonts/figtree-var-latin-ext.woff2) format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Hanken Grotesk"; font-style: normal; font-weight: 400 700; font-display: swap; src: url(/fonts/hanken-grotesk-var-latin.woff2) format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Hanken Grotesk"; font-style: normal; font-weight: 400 700; font-display: swap; src: url(/fonts/hanken-grotesk-var-latin-ext.woff2) format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Fira Code"; font-style: normal; font-weight: 400 600; font-display: swap; src: url(/fonts/fira-code-var-latin.woff2) format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Fira Code"; font-style: normal; font-weight: 400 600; font-display: swap; src: url(/fonts/fira-code-var-latin-ext.woff2) format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Fira Code"; font-style: normal; font-weight: 400 600; font-display: swap; src: url(/fonts/fira-code-var-cyrillic.woff2) format("woff2");
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: "Fira Code"; font-style: normal; font-weight: 400 600; font-display: swap; src: url(/fonts/fira-code-var-cyrillic-ext.woff2) format("woff2");
  unicode-range: U+0460-052F, U+1C80-1C8A, U+20B4, U+2DE0-2DFF, U+A640-A69F, U+FE2E-FE2F; }
@font-face { font-family: "Fira Code"; font-style: normal; font-weight: 400 600; font-display: swap; src: url(/fonts/fira-code-var-greek.woff2) format("woff2");
  unicode-range: U+0370-0377, U+037A-037F, U+0384-038A, U+038C, U+038E-03A1, U+03A3-03FF; }
@font-face { font-family: "Fira Code"; font-style: normal; font-weight: 400 600; font-display: swap; src: url(/fonts/fira-code-var-greek-ext.woff2) format("woff2");
  unicode-range: U+1F00-1FFF; }
:root {
  --system: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --codefont: "Fira Code", ui-monospace, "SF Mono", Menlo, monospace;
  /* Instrument, light: the default. */
  --display: "B612", var(--system); --text: var(--system); --display-weight: 700; --display-track: -0.02em;
  /* Colours: the role-based palette, scripts/palette.py and docs/PALETTE.md. */
  --ground: #FFFFFF; --surface: #F6F7F8; --hairline: #CFCFD0; --ink: #111316; --ink2: #5B6169; --ink3: #8E8F91;
  --accent: #CA4300; --on-accent: #FFFFFF; --accent-ink: #BB490F; --focus: #CA4300;
  --positive: #1F7C46; --caution: #95630C; --critical: #D12A1E;
  --syn-key: #111316; --syn-str: #5B6169; --syn-num: #BB490F; --syn-com: #5B6169;
  --radius: 8px; --card-radius: 8px; --card-border: 1px solid var(--hairline); --card-shadow: none;
  --field-a: #5B6169; --field-b: #CA4300;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) { :root:not([data-theme]) { --ground: #0E1013; --surface: #16191D; --hairline: #343639; --ink: #ECEEF1; --ink2: #9AA1AA; --ink3: #626467; --accent: #CA4300; --on-accent: #FFFFFF; --accent-ink: #E55913; --focus: #CA4300; --positive: #269956; --caution: #B6790F; --critical: #E5554A; --field-a: #9AA1AA; --field-b: #E55913; color-scheme: dark; } }
html[data-theme="instrument-dark"] { --ground: #0E1013; --surface: #16191D; --hairline: #343639; --ink: #ECEEF1; --ink2: #9AA1AA; --ink3: #626467;
  --accent: #CA4300; --on-accent: #FFFFFF; --accent-ink: #E55913; --focus: #CA4300;
  --positive: #269956; --caution: #B6790F; --critical: #E5554A;
  --syn-key: #ECEEF1; --syn-str: #9AA1AA; --syn-num: #E55913; --syn-com: #9AA1AA;
  --field-a: #9AA1AA; --field-b: #E55913; color-scheme: dark; }
/* Flight (the default look since 19 Nov; tokens are the app's Look.flight, apps/mac/Sources/Tailwing/Look.swift): canvas #F8F8F7, white cards with a 1 px rgba(0,0,0,.06) hairline and a 0 8px 24px rgba(0,0,0,.01) shadow,
   #EEEEED chips and rules, #26222A text, #58535C small text, pill buttons in #1A6BC8 with white text (5.3:1),
   #1A6BC8 for focus, the mark, glints and accent text, sky blues for the field. Dark is the same family on
   #161518 with #1E1D21 panels (the app's Look.flight). Sources and contrast in docs/AESTHETIC.md and docs/PALETTE.md. */
html[data-look="flight"] { --display: "Figtree", var(--system); --text: "Figtree", var(--system); --display-weight: 600; --display-track: -0.025em;
  --radius: 12px; --btn-radius: 999px; --card-radius: 24px; --card-border: 1px solid rgba(0, 0, 0, 0.06); --card-shadow: 0 8px 24px rgba(0, 0, 0, 0.01); }
html[data-theme="flight-light"] { --ground: #F8F8F7; --surface: #FFFFFF; --hairline: #CAC9CA; --ink: #26222A; --ink2: #58535C; --ink3: #6B666F;
  --accent: #1A6BC8; --on-accent: #FFFFFF; --accent-ink: #1A6BC8; --focus: #1A6BC8;
  --positive: #1F7D46; --caution: #96630C; --critical: #D22A1E;
  --syn-key: #26222A; --syn-str: #58535C; --syn-num: #1A6BC8; --syn-com: #58535C;
  --field-a: #50BEF2; --field-b: #ABE2FC; --chip: #EEEEED; --mark: #1A6BC8; color-scheme: light; }
html[data-theme="flight-dark"] { --ground: #161518; --surface: #1E1D21; --hairline: #39383B; --ink: #F4F4F3; --ink2: #B0ADB4; --ink3: #959299;
  --accent: #5AA9F0; --on-accent: #161518; --accent-ink: #5AA9F0; --focus: #5AA9F0;
  --positive: #2CAB61; --caution: #C98611; --critical: #EB6E65;
  --syn-key: #F4F4F3; --syn-str: #B0ADB4; --syn-num: #5AA9F0; --syn-com: #B0ADB4;
  --field-a: #1E1D21; --field-b: #1B2A3D; --chip: #2A292D; --mark: #5AA9F0;
  --card-border: 1px solid rgba(255, 255, 255, 0.06); color-scheme: dark; }
/* Night: an observatory instrument. Hanken Grotesk, tight, with tabular figures; a near-black ground with only a
   trace of blue, crisp near-white text and one cold accent. Light is a modern star chart: cool white, ink blue. The
   starfield fills the whole page; text sits on near-solid panels. */
html[data-look="night"] { --display: "Hanken Grotesk", var(--system); --text: "Hanken Grotesk", var(--system); --display-weight: 650; --display-track: -0.03em; --radius: 6px; --card-radius: 6px; }
html[data-theme="night-dark"] { --ground: #07090D; --surface: #14161A; --hairline: #303236; --ink: #F2F5F8; --ink2: #9AA4B2; --ink3: #5F6165;
  --accent: #9BE7FF; --on-accent: #07090D; --accent-ink: #9BE7FF; --focus: #9BE7FF;
  --positive: #259654; --caution: #B4770F; --critical: #E55046;
  --syn-key: #F2F5F8; --syn-str: #9AA4B2; --syn-num: #9BE7FF; --syn-com: #9AA4B2;
  --field-a: #F2F5F8; --field-b: #9BE7FF; color-scheme: dark; }
html[data-theme="night-light"] { --ground: #FBFCFE; --surface: #F2F5F9; --hairline: #CACDD3; --ink: #0E1A2B; --ink2: #4A586B; --ink3: #888E98;
  --accent: #1F4F99; --on-accent: #FFFFFF; --accent-ink: #1F4F99; --focus: #1F4F99;
  --positive: #1F7B45; --caution: #93620C; --critical: #CF291E;
  --syn-key: #0E1A2B; --syn-str: #4A586B; --syn-num: #1F4F99; --syn-com: #4A586B;
  --field-a: #0E1A2B; --field-b: #1F4F99; color-scheme: light; }
/* Terminal: an editor. Fira Code for everything, a restrained syntax palette, denser spacing. */
html[data-look="terminal"] { --display: var(--codefont); --text: var(--codefont); --display-weight: 600; --display-track: -0.01em;
  --radius: 4px; --card-radius: 4px; --section: var(--space-8); --stack: var(--space-5); }
html[data-theme="terminal-dark"] { --ground: #0F1115; --surface: #1A1C20; --hairline: #33363A; --ink: #D7DAE0; --ink2: #8D95A3; --ink3: #626569;
  --accent: #5AA9FF; --on-accent: #0F1115; --accent-ink: #5AA9FF; --focus: #5AA9FF;
  --positive: #279B57; --caution: #BA7B0F; --critical: #E65A50;
  --syn-key: #7FB2FF; --syn-str: #9BCF86; --syn-num: #E2B46E; --syn-com: #8D95A3;
  --field-a: #8D95A3; --field-b: #5AA9FF; color-scheme: dark; }
html[data-theme="terminal-light"] { --ground: #FBFBFC; --surface: #F2F3F5; --hairline: #CBCCCE; --ink: #1F2328; --ink2: #57606A; --ink3: #8B8D91;
  --accent: #0B5FC7; --on-accent: #FFFFFF; --accent-ink: #0B5FC7; --focus: #0B5FC7;
  --positive: #1F7A45; --caution: #92610C; --critical: #CD291D;
  --syn-key: #0550AE; --syn-str: #1A6B32; --syn-num: #8A4A00; --syn-com: #57606A;
  --field-a: #57606A; --field-b: #0B5FC7; color-scheme: light; }


/* The look picker: a quiet utility strip across the top of every page, right-aligned inside the gutter, so it reads
   as a setting rather than part of the nav. 28 px pills in 12 px text; each one's hit area reaches 44 px through an
   invisible extension, so the strip stays small and the targets don't. */
.lookbar { position: relative; z-index: 3; display: flex; justify-content: flex-end; align-items: center; padding: 8px 0; }
.lookbar .looks { display: flex; flex-wrap: nowrap; align-items: center; gap: 4px; }
.lookbar .lab { font: 500 12px/1 var(--codefont); color: var(--ink2); margin-right: 4px; }
.lookbar button { position: relative; font: 500 12px/1 var(--codefont); height: 28px; min-height: 0; min-width: 44px; padding: 0 10px; border: 0; border-radius: 999px;
  background: transparent; color: var(--ink2); box-shadow: 0 0 0 1px var(--hairline) inset; cursor: pointer; white-space: nowrap; }
.lookbar button::before { content: ""; position: absolute; inset: -8px -2px; }
.lookbar button:hover { color: var(--ink); box-shadow: 0 0 0 1px var(--ink2) inset; }
.lookbar button[aria-pressed="true"] { background: var(--ink); color: var(--ground); box-shadow: none; }
.lookbar button:focus-visible { outline: 2px solid var(--focus, var(--accent)); outline-offset: 2px; }
@media (max-width: 359px) { .lookbar .lab { display: none; } .lookbar button { font-size: 11px; padding: 0 8px; } }

/* The logo: one fixed lockup in every look and on every page, the swept-wing mark and the wordmark as the brand
   assets set it, outlined to paths, so no look's typeface touches it. Only the wordmark's ink flips for dark. */
.logo { display: block; height: 28px; width: auto; }
@media (min-width: 600px) { .logo { height: 32px; } }
.logo .wm { fill: #111316; }
html[data-theme$="-dark"] .logo .wm { fill: #ECEEF1; }
@media (prefers-color-scheme: dark) { :root:not([data-theme]) .logo .wm { fill: #ECEEF1; } }

/* Language fallbacks (see the note above the @font-face rules). Instrument's headings face covers the Latin-1 languages
   only; the Flight and Night faces have no Cyrillic or Greek. Terminal covers every language. */
:root:not([data-look]):lang(bg),
:root:not([data-look]):lang(cs),
:root:not([data-look]):lang(el),
:root:not([data-look]):lang(et),
:root:not([data-look]):lang(hr),
:root:not([data-look]):lang(hu),
:root:not([data-look]):lang(lt),
:root:not([data-look]):lang(lv),
:root:not([data-look]):lang(mt),
:root:not([data-look]):lang(pl),
:root:not([data-look]):lang(ro),
:root:not([data-look]):lang(sk),
:root:not([data-look]):lang(sl),
:root:not([data-look]):lang(uk),
html[data-look="instrument"]:lang(bg),
html[data-look="instrument"]:lang(cs),
html[data-look="instrument"]:lang(el),
html[data-look="instrument"]:lang(et),
html[data-look="instrument"]:lang(hr),
html[data-look="instrument"]:lang(hu),
html[data-look="instrument"]:lang(lt),
html[data-look="instrument"]:lang(lv),
html[data-look="instrument"]:lang(mt),
html[data-look="instrument"]:lang(pl),
html[data-look="instrument"]:lang(ro),
html[data-look="instrument"]:lang(sk),
html[data-look="instrument"]:lang(sl),
html[data-look="instrument"]:lang(uk) { --display: var(--system); }
html[data-look="flight"]:lang(bg),
html[data-look="flight"]:lang(el),
html[data-look="flight"]:lang(uk),
html[data-look="night"]:lang(bg),
html[data-look="night"]:lang(el),
html[data-look="night"]:lang(uk) { --display: var(--system); --text: var(--system); }

/* Language pulldown in the look bar, and the one-line language suggestion (site/lang.js). */
.lookbar { flex-wrap: wrap; gap: 4px 12px; }
.langmenu { position: relative; margin-right: auto; }
.langmenu summary { position: relative; list-style: none; cursor: pointer; display: inline-flex; align-items: center; gap: 8px; height: 28px; padding: 0 12px; border-radius: 999px; font: 500 12px/1 var(--codefont); color: var(--ink2); box-shadow: 0 0 0 1px var(--hairline) inset; }
.langmenu summary::-webkit-details-marker { display: none; }
.langmenu summary::before { content: ""; position: absolute; inset: -8px -2px; }
.langmenu summary::after { content: ""; width: 5px; height: 5px; border-right: 1.5px solid currentColor; border-bottom: 1.5px solid currentColor; transform: rotate(45deg) translateY(-2px); }
.langmenu[open] summary { color: var(--ink); box-shadow: 0 0 0 1px var(--ink2) inset; }
.langmenu summary:focus-visible, .langmenu a:focus-visible { outline: 2px solid var(--focus, var(--accent)); outline-offset: 2px; }
.langmenu nav { position: absolute; left: 0; top: calc(100% + 8px); z-index: 20; min-width: 200px; max-height: min(70vh, 440px); overflow: auto; background: var(--surface, var(--ground)); border: 1px solid var(--hairline); border-radius: 8px; padding: 6px; box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12); }
.langmenu ul { list-style: none; margin: 0; padding: 0; }
.langmenu a, .langmenu [aria-current] { display: block; padding: 10px 12px; min-height: 44px; box-sizing: border-box; color: var(--ink); text-decoration: none; border-radius: 6px; font: 400 15px/1.4 var(--text); }
.langmenu a:hover { box-shadow: 0 0 0 1px var(--hairline) inset; }
.langmenu [aria-current] { font-weight: 600; color: var(--ink2); }
.langsuggest { display: flex; align-items: center; justify-content: center; gap: 4px; padding: 0 8px 0 16px; background: var(--surface, var(--ground)); border-bottom: 1px solid var(--hairline); font: 400 14px/1.4 var(--text); color: var(--ink); text-align: center; }
.langsuggest a { color: var(--accent-ink); padding: 10px 0; }
.langsuggest button { min-width: 44px; min-height: 44px; border: 0; background: none; color: var(--ink2); font: 400 22px/1 var(--text); cursor: pointer; border-radius: 6px; }
.langsuggest button:focus-visible { outline: 2px solid var(--focus, var(--accent)); outline-offset: -2px; }

/* The demo window's sidebar rows: a long meeting title in another language is cut with an ellipsis instead of running into the page. */
.side p span:first-child { min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.side p span:last-child { flex: none; }
/* Translated pages: a wider sidebar in the demo window, because other languages' meeting titles run longer than English. */
@media (min-width: 640px) { html:not(:lang(en)) .body { grid-template-columns: 250px 1fr; } }
html:not(:lang(en)) .tabs { flex-wrap: wrap; column-gap: var(--space-3); }
html:not(:lang(en)) .tabs span { white-space: nowrap; }

/* Colour surfaces (scripts/site-contrast.py measures every pair below, in all eight themes). One accent, the look's own,
   and two supporting colours from the app's looks: the sky of Flight (#50BEF2, #ABE2FC) and the blue of Terminal
   (#0B5FC7 light, #5AA9FF dark). Colour sits in surfaces, icons and art. Text stays on plain ground or surface, or
   on a wash light enough that ink, ink2 and accent-ink keep their contrast. */
:root, html[data-theme$="-light"] {
  --sky: #50BEF2; --sky-soft: #ABE2FC; --sky-circle: #0F8FCC; --on-sky: #0E1013; --blue: #0B5FC7; --on-blue: #FFFFFF;
  --wash-accent: color-mix(in srgb, var(--accent) 8%, var(--ground));
  --wash-sky: color-mix(in srgb, var(--sky) 14%, var(--ground));
  --wash-blue: color-mix(in srgb, var(--blue) 8%, var(--ground));
}
html[data-theme$="-dark"] {
  --sky: #50BEF2; --sky-soft: #ABE2FC; --sky-circle: #50BEF2; --on-sky: #0E1013; --blue: #5AA9FF; --on-blue: #0F1115;
  --wash-accent: color-mix(in srgb, var(--accent) 13%, var(--ground));
  --wash-sky: color-mix(in srgb, var(--sky) 13%, var(--ground));
  --wash-blue: color-mix(in srgb, var(--blue) 13%, var(--ground));
}
/* A long translated "Look" label must not push the pills off the left edge of a phone. */
@media (max-width: 480px) { .lookbar .lab { display: none; } }
