/* Self-hosted fonts, the same files Flinger serves (Arimo: Apache-2.0 / OFL; Gelasio, Inconsolata: OFL. /static/fonts/LICENSE-*.txt) */
@font-face { font-family: "Arimo"; font-style: normal; font-weight: 400; font-display: swap;
  src: url("/static/fonts/arimo-latin-400-normal.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Arimo"; font-style: normal; font-weight: 400; font-display: swap;
  src: url("/static/fonts/arimo-latin-ext-400-normal.woff2") format("woff2");
  unicode-range: U+0100-02AF, U+0304, U+0308, U+0329, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Arimo"; font-style: normal; font-weight: 700; font-display: swap;
  src: url("/static/fonts/arimo-latin-700-normal.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Arimo"; font-style: normal; font-weight: 700; font-display: swap;
  src: url("/static/fonts/arimo-latin-ext-700-normal.woff2") format("woff2");
  unicode-range: U+0100-02AF, U+0304, U+0308, U+0329, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Gelasio"; font-style: italic; font-weight: 400; font-display: swap;
  src: url("/static/fonts/gelasio-latin-400-italic.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Gelasio"; font-style: italic; font-weight: 400; font-display: swap;
  src: url("/static/fonts/gelasio-latin-ext-400-italic.woff2") format("woff2");
  unicode-range: U+0100-02AF, U+0304, U+0308, U+0329, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
/* upright Gelasio is only for the app-preview miniature: an app with a serif face should not look italic */
@font-face { font-family: "Gelasio"; font-style: normal; font-weight: 400; font-display: swap;
  src: url("/static/fonts/gelasio-latin-400-normal.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Inconsolata"; font-style: normal; font-weight: 400; font-display: swap;
  src: url("/static/fonts/inconsolata-latin-400-normal.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Inconsolata"; font-style: normal; font-weight: 400; font-display: swap;
  src: url("/static/fonts/inconsolata-latin-ext-400-normal.woff2") format("woff2");
  unicode-range: U+0100-02AF, U+0304, U+0308, U+0329, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Inconsolata"; font-style: normal; font-weight: 700; font-display: swap;
  src: url("/static/fonts/inconsolata-latin-700-normal.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Inconsolata"; font-style: normal; font-weight: 700; font-display: swap;
  src: url("/static/fonts/inconsolata-latin-ext-700-normal.woff2") format("woff2");
  unicode-range: U+0100-02AF, U+0304, U+0308, U+0329, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }

/* FLINGER BRAND BOOK V2 (2 Nov 2026) — the same names and values as Flinger's frontend/src/styles/tokens.css.
 *
 * Light is the book's Humans mode; dark is its Agents mode, chosen by the person's system setting. Same names in both, so
 * nothing below asks which mode it is in. Lime and acid are never swapped across modes.
 * The contrast rules that shaped them (test/brand.test.js measures each pair):
 *   - orange on cream is 2.5:1 and lime on cream is 1.1:1: both are FILLS with ink on them, never text on a light page.
 *   - the book has no status colours, so success, warn and danger are ours, marked "not in the book", same as Flinger.
 *   - the main button is ink words on orange (--cta); on a full orange field it is the ink button with cream words (--primary).
 *
 * No shadows anywhere, the same call Flinger made on 2 Nov (differs from the book's R.03): edges and tone separate things.
 * Nothing glows and nothing blurs. That is the book's own rule.
 */
:root {
  color-scheme: light;

  /* The book's fields and accents, by name */
  --orange: #FF6B35;
  --lilac: #F2D7F2;           /* dialog cards */
  --sky: #C2D4F6;             /* picker cards */
  --purple: #6228BF;          /* imagery only */

  /* Surfaces */
  --bg: #F4F0E5;              /* cream: the page */
  --surface: #FFFBEE;         /* paper: cards, chat, inputs */
  --surface-2: #E6E3D6;       /* sand: quiet fills */
  --surface-3: #DAD7C9;       /* sand, pressed. Not in the book */
  --hairline: #CFCCBF;        /* 1px structure lines */
  --line-strong: #1C2119;     /* ink: input and card edges */
  --hover: rgba(28, 33, 25, 0.06);

  /* Text */
  --ink: #1C2119;
  --muted: #55594E;           /* not in the book: ink softened, 6.2:1 on cream */

  /* Brand */
  --brand: #1C2119;           /* brand text and links: ink, since orange fails as text here */
  --mint: #CEFF3F;            /* the signal fill: lime on this mode */
  --on-mint: #1C2119;
  --mark: #1C2119;            /* the logo: ink, cream or lime only */

  /* Actions */
  --primary: #1C2119;         /* ink field */
  --on-primary: #F4F0E5;
  --cta: #FF6B35;             /* the main button: ink words on orange */
  --on-cta: #1C2119;
  --cta-hover: #FF8254;       /* not in the book */

  /* The machine: the bars and panels that are ink in light and terminal in dark */
  --machine: #1C2119;
  --on-machine: #F4F0E5;
  --machine-signal: #CEFF3F;
  --machine-line: #3A4034;

  /* The field that opens and closes a page */
  --field: #FF6B35;
  --on-field: #1C2119;
  --on-field-soft: #1C2119;
  --on-field-twist: #1C2119;
  --field-line: #1C2119;

  /* Status: not in the book, the same values as Flinger */
  --success: #3F6E0E;
  --success-bg: #E4F7B0;
  --warn: #8A5200;
  --warn-bg: #FBE7BE;
  --danger: #A82A20;
  --danger-bg: #FBDFD8;
  --focus: #1C2119;

  /* Type: Arimo states, Gelasio twists, Inconsolata labels */
  --font-ui: "Arimo", Arial, system-ui, sans-serif;
  --font-serif: "Gelasio", Georgia, serif;
  --font-mono: "Inconsolata", ui-monospace, Menlo, monospace;
  --serif: var(--font-serif);  /* the app-preview miniature's serif, public/js/preview.js */
  --sans: var(--font-ui);
  /* what switches between modes: headline type */
  --font-head: var(--font-ui);
  --head-weight: 700;
  --head-tracking: -.05em;
  --head-case: none;
  --font-twist: var(--font-serif);
  --twist-style: italic;
  --twist-weight: 400;
  --twist-colour: inherit;

  /* Shape: soft, never bubbly. 3px buttons, 7px cards, 16px toy apps; pills stay round */
  --r-sm: 3px;
  --r: 7px;
  --r-xl: 16px;
  --edge: 2px;                /* ink on card edges; hairlines are 1px */
}

@media (prefers-color-scheme: dark) {
  :root {
    color-scheme: dark;

    --lilac: #152316;
    --sky: #152316;

    --bg: #080E0A;            /* night */
    --surface: #0E1B0F;       /* card */
    --surface-2: #152316;     /* forest */
    --surface-3: #1C2F1E;     /* not in the book */
    --hairline: #26392A;
    --line-strong: #8AC969;   /* leaf: card edges */
    --hover: rgba(212, 237, 204, 0.07);

    --ink: #D4EDCC;           /* mint */
    --muted: #86A681;         /* moss */

    --brand: #B8FF53;         /* acid */
    --mint: #B8FF53;
    --on-mint: #080E0A;
    --mark: #CEFF3F;          /* lime: the book's "night, lime logo" */

    --primary: #D4EDCC;       /* mint field, night words */
    --on-primary: #080E0A;
    --cta: #D4EDCC;
    --on-cta: #080E0A;
    --cta-hover: #E6F6E0;

    --machine: #10180E;       /* terminal */
    --on-machine: #D4EDCC;
    --machine-signal: #B8FF53;
    --machine-line: #26392A;

    --field: #080E0A;
    --on-field: #D4EDCC;
    --on-field-soft: #86A681;
    --on-field-twist: #B8FF53;
    --field-line: #8AC969;

    --success: #8AC969;
    --success-bg: #1C3313;
    --warn: #F5B524;
    --warn-bg: #2B2208;
    --danger: #FF8A7A;
    --danger-bg: #33140F;
    --focus: #B8FF53;

    --font-head: var(--font-mono);
    --head-weight: 700;
    --head-tracking: -.01em;
    --head-case: uppercase;
    --font-twist: var(--font-mono);
    --twist-style: normal;
    --twist-weight: 400;
    --twist-colour: #B8FF53;
  }
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-ui);
  font-size: 1rem;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}
img, svg { max-width: 100%; }
a { color: var(--brand); }
button, input, textarea, select { font: inherit; color: inherit; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; }

.visually-hidden {
  position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

/* The logo is the design team's file, never redrawn: a mask, so its colour is the one --mark token. Min 24px wide. */
.brand { display: inline-flex; align-items: center; gap: .55rem; text-decoration: none; color: var(--ink); }
.brand-mark { display: inline-flex; align-items: center; gap: .5rem; font-family: var(--font-mono); font-weight: 700; letter-spacing: .08em; font-size: 1rem; }
.brand-mark::before {
  content: ""; flex: none; width: 34px; height: 24px; background: var(--mark);
  -webkit-mask: url("/static/brand/flinger-icon.svg") center / contain no-repeat;
  mask: url("/static/brand/flinger-icon.svg") center / contain no-repeat;
}
.brand-by { color: var(--muted); font-family: var(--font-mono); font-size: .85rem; }

/* Sans states, serif twists. The word that turns is always an <em>. */
.display { font-family: var(--font-head); font-weight: var(--head-weight); line-height: 1; letter-spacing: var(--head-tracking); text-transform: var(--head-case); margin: 0; }
.display em, h1 em, h2 em { font-family: var(--font-twist); font-style: var(--twist-style); font-weight: var(--twist-weight); color: var(--twist-colour); letter-spacing: -.03em; }
.lede { font-size: 1.15rem; max-width: 34rem; color: var(--muted); margin: .75rem 0 0; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
  min-height: 48px; padding: .7rem 1.2rem; border-radius: var(--r-sm);
  border: var(--edge) solid var(--line-strong); cursor: pointer; text-decoration: none;
  font-weight: 700; font-size: 1rem;
  transition: transform .12s ease, background .12s ease;
}
.btn:active { transform: translate(1px, 1px); }
.btn[disabled] { opacity: .55; cursor: not-allowed; }
.btn-green { background: var(--cta); color: var(--on-cta); }
.btn-green:hover { background: var(--cta-hover); }
.btn-cream { background: var(--surface); color: var(--ink); }
.btn-cream:hover { background: var(--surface-2); }
.btn-ghost { background: transparent; color: var(--ink); border-color: var(--line-strong); }
.btn-ghost:hover { background: var(--hover); }
.btn-dark { background: var(--primary); color: var(--on-primary); border-color: var(--primary); }

.object {
  background: var(--surface); color: var(--ink);
  border-radius: var(--r); border: var(--edge) solid var(--line-strong);
}

.notice {
  background: var(--danger-bg); border: 1px solid var(--danger); color: var(--ink);
  padding: .7rem 1rem; border-radius: var(--r-sm); max-width: 30rem;
}

/* simple pages: login, shared idea */
.page-simple .login { max-width: 34rem; margin: 0 auto; padding: 2.5rem 1.25rem 4rem; }
.page-simple .login .display { font-size: clamp(3rem, 12vw, 5.5rem); margin-top: 3rem; }
.login-form { margin-top: 2rem; padding: 1.5rem; display: grid; gap: .8rem; }
.login-form label { font-weight: 700; }
.login-form input {
  min-height: 48px; padding: .6rem .8rem; border-radius: var(--r-sm);
  border: var(--edge) solid var(--line-strong); background: var(--surface); color: var(--ink);
}
.shared .card { margin: 1.5rem 0 2rem; padding: 1.4rem 1.5rem; }
.card dl { margin: 0; display: grid; gap: .9rem; }
.card dl > div { display: grid; grid-template-columns: 7.5rem 1fr; gap: 1rem; }
.card dt { font-family: var(--font-mono); font-weight: 700; font-size: .82rem; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); padding-top: .15rem; }
.card dd { margin: 0; font-size: 1.05rem; }
@media (max-width: 480px) {
  .card dl > div { grid-template-columns: 1fr; gap: .1rem; }
}

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

[hidden] { display: none !important; }
