/* NEON - the web runner's face (design/starters/neon/runner.css). Contract version 1.

   A night-club sign after midnight: a near-black wall, hot-pink and ice-blue tube light, letters that hum.

   A STARTER DESIGN (designer-css-plan section 2.6): ours, read-only, loaded and changed and saved as a workspace's own
   design. Written ONLY against the --cv-* tokens and the data-cv-* parts, moments, turns, states and screens of
   design/contract.json - never a class name, never an !important. A design's CSS lands in the cascade layer cv.design (the
   server wraps it; on the go site's stage, Tests/Design/ShotCases.Starters.cs does), so it beats our default bundle
   without a specificity war. url() reaches only this package's own files.

   1. THE TOKENS - on the runner's root ([data-cv-face="runner"] - the <html> element). They equal manifest.json's
      tokens, value for value (Tests/Design/StarterLibraryTests).
   2. THE LOOK - every shape, glow, picture and motion is scoped to the conversation's own screen
      ([data-cv-screen="thread"]). A protected screen (confirm, consent, payment, sign-in) and a protected part (the
      verified note, Powered by, a signature, an action's confirm) take COLOURS ONLY, inside the contrast floor - so when
      the locked layer lands (P1) nothing here has to move. Motion runs only when the reader has not asked for less. */

[data-cv-face="runner"] {
  /* reference */
  --cv-color-brand: #ff2bd6;
  --cv-color-ink: #f6eaff;
  --cv-color-paper: #0d0716;
  --cv-font-body: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --cv-font-display: "Neon Oxanium", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --cv-radius-s: 10px;
  --cv-radius-m: 14px;
  --cv-radius-l: 18px;
  --cv-shadow-1: 0 0 6px rgba(255, 43, 214, .35);
  --cv-shadow-2: 0 0 16px rgba(255, 43, 214, .4);
  --cv-shadow-3: 0 0 44px rgba(33, 230, 255, .3);
  --cv-motion-fast: 140ms;
  --cv-motion-slow: 1800ms;
  /* semantic */
  --cv-surface: #150b22;
  --cv-on-surface: var(--cv-color-ink);
  --cv-accent: #ff2bd6;
  --cv-on-accent: #14001c;
  --cv-muted: #bba6d8;
  --cv-danger: #ff7a95;
  --cv-focus: #21e6ff;
  --cv-bubble-me-bg: #2a0b35;
  --cv-bubble-me-ink: #ffe6fb;
  --cv-bubble-them-bg: #0e1a2c;
  --cv-bubble-them-ink: #e2fbff;
  --cv-field-font-size: 16px;
  /* component */
  --cv-header-bg: #120a1e;
  --cv-color-scheme: light;
  --cv-signin-bg: #0d0716;
  --cv-signin-picture: radial-gradient(ellipse at 30% 20%, rgba(255, 43, 214, .28), transparent 55%), radial-gradient(ellipse at 70% 80%, rgba(33, 230, 255, .2), transparent 55%), linear-gradient(160deg, #0d0716, #150b22);
  /* the runner's palette - every tone the web runner paints with, from this design's surface, ink, accent and focus */
  --cv-on-surface-2: color-mix(in srgb, var(--cv-on-surface) 80%, var(--cv-surface));
  --cv-on-surface-strong: var(--cv-on-surface);
  --cv-placeholder: color-mix(in srgb, var(--cv-on-surface) 45%, var(--cv-surface));
  --cv-surface-subtle: color-mix(in srgb, var(--cv-on-surface) 5%, var(--cv-surface));
  --cv-surface-raised: var(--cv-surface);
  --cv-surface-hover: color-mix(in srgb, var(--cv-on-surface) 8%, var(--cv-surface));
  --cv-surface-active: color-mix(in srgb, var(--cv-on-surface) 13%, var(--cv-surface));
  --cv-panel: color-mix(in srgb, var(--cv-on-surface) 4%, var(--cv-surface));
  --cv-panel-muted: color-mix(in srgb, var(--cv-on-surface) 6%, var(--cv-surface));
  --cv-panel-hover: color-mix(in srgb, var(--cv-on-surface) 8%, var(--cv-surface));
  --cv-card-bg: #120a1e;
  --cv-line: color-mix(in srgb, var(--cv-on-surface) 16%, var(--cv-surface));
  --cv-line-2: color-mix(in srgb, var(--cv-on-surface) 26%, var(--cv-surface));
  --cv-line-light: color-mix(in srgb, var(--cv-on-surface) 11%, var(--cv-surface));
  --cv-accent-hover: color-mix(in srgb, var(--cv-accent) 85%, var(--cv-on-surface));
  --cv-accent-muted: color-mix(in srgb, var(--cv-accent) 14%, transparent);
  --cv-accent-soft: color-mix(in srgb, var(--cv-accent) 24%, transparent);
  --cv-accent-strong: color-mix(in srgb, var(--cv-accent) 78%, black);
  --cv-focus-ring: 0 0 0 3px color-mix(in srgb, var(--cv-focus) 35%, transparent);
  --cv-buttons-bg: rgba(13, 7, 22, .92);
}

/* ── the page ──────────────────────────────────────────────────────────────────────────────────────────────────────
   The runner reads its colours from the tokens above on EVERY screen - the protected ones (the confirm, a payment,
   sign-in, the end) included, where a design sets colours only - so the page, the bar of buttons, the title and the pay
   button all wear this design. Shapes, pictures and motion stay on the conversation's own screen. */
[data-cv-face="runner"] body:has([data-cv-screen="thread"]) { background-color: var(--cv-surface); color: var(--cv-on-surface); }
[data-cv-screen="thread"] { background-color: var(--cv-surface); color: var(--cv-on-surface); font-family: var(--cv-font-body); }

/* ── the header (outside every screen - never protected) ───────────────────────────────────────────────────────── */
[data-cv-part="header"] { border-bottom-color: color-mix(in srgb, var(--cv-on-surface) 14%, transparent); }
[data-cv-part="header"] [data-cv-part="brand-name"] { color: var(--cv-accent); font-family: var(--cv-font-display); }
[data-cv-part="header"] button { background-color: transparent; color: var(--cv-on-surface); border-color: color-mix(in srgb, var(--cv-on-surface) 26%, transparent); }

/* ── a moment: its words, its choices, its answer ───────────────────────────────────────────────────────────── */
[data-cv-screen="thread"] [data-cv-part="question"] { color: var(--cv-on-surface); font-family: var(--cv-font-display); }
[data-cv-screen="thread"] [data-cv-part="extra-info"] { color: var(--cv-muted); }
[data-cv-screen="thread"] [data-cv-part="extra-info"] :is(a, button) { color: var(--cv-accent); }
[data-cv-screen="thread"] [data-cv-part="error"] { color: var(--cv-danger); }
[data-cv-screen="thread"] [data-cv-part="moment"]:not([data-cv-moment="signature"], [data-cv-moment="action"], [data-cv-moment="payment"]) [data-cv-part="option"] {
  background-color: var(--cv-surface); color: var(--cv-on-surface);
  border-color: color-mix(in srgb, var(--cv-on-surface) 24%, transparent); border-radius: var(--cv-radius-m);
}
[data-cv-screen="thread"] [data-cv-part="moment"]:not([data-cv-moment="signature"], [data-cv-moment="action"], [data-cv-moment="payment"]) [data-cv-part="option"] :is(i, svg) { color: var(--cv-accent); }
[data-cv-screen="thread"] [data-cv-part="moment"]:not([data-cv-moment="signature"], [data-cv-moment="action"], [data-cv-moment="payment"]) [data-cv-part="option"][data-cv-state="selected"] {
  background-color: color-mix(in srgb, var(--cv-accent) 14%, var(--cv-surface));
  border-color: var(--cv-accent); box-shadow: 0 0 0 1px var(--cv-accent);
}
[data-cv-screen="thread"] [data-cv-part="moment"]:not([data-cv-moment="signature"], [data-cv-moment="action"], [data-cv-moment="payment"]) [data-cv-part="answer"] :is(input, textarea, select) {
  background-color: var(--cv-surface); color: var(--cv-on-surface);
  border-color: color-mix(in srgb, var(--cv-on-surface) 26%, transparent); border-radius: var(--cv-radius-s);
  font-family: var(--cv-font-body);
}
[data-cv-screen="thread"] [data-cv-part="moment"]:not([data-cv-moment="signature"], [data-cv-moment="action"], [data-cv-moment="payment"]) [data-cv-part="answer"] button {
  background-color: var(--cv-surface); color: var(--cv-on-surface);
  border-color: color-mix(in srgb, var(--cv-on-surface) 18%, transparent); border-radius: var(--cv-radius-s);
  font-family: var(--cv-font-body);
}
[data-cv-screen="thread"] [data-cv-part="moment"]:not([data-cv-moment="signature"], [data-cv-moment="action"], [data-cv-moment="payment"]) [data-cv-part="answer"] button:disabled { color: color-mix(in srgb, var(--cv-on-surface) 38%, transparent); }

/* ── the moment kinds - each one looks like what it asks ────────────────────────────────────────────────────── */
/* A date, a date and a time: a page off a calendar - a band across the top. */
[data-cv-screen="thread"] :is([data-cv-moment="date"], [data-cv-moment="datetime"]) [data-cv-part="answer"] {
  border-top: 12px solid var(--cv-accent); border-radius: var(--cv-radius-m); padding: 14px 12px 12px;
  background-color: var(--cv-surface); color: var(--cv-on-surface); box-shadow: var(--cv-shadow-2);
}
/* The date's own figures sit on the page itself, in its ink. */
[data-cv-screen="thread"] :is([data-cv-moment="date"], [data-cv-moment="datetime"], [data-cv-moment="time"]) [data-cv-part="answer"] :is(div, span) {
  background-color: transparent; color: inherit;
}
/* A time: the face of a clock - a ring around the keys. */
[data-cv-screen="thread"] [data-cv-moment="time"] [data-cv-part="answer"] {
  border: 3px solid var(--cv-accent); border-radius: 28px; padding: 14px 12px;
}
/* A number, an amount: figures that line up. An amount sits on a ledger's double rule. */
[data-cv-screen="thread"] :is([data-cv-moment="number"], [data-cv-moment="currency"]) [data-cv-part="answer"] {
  font-variant-numeric: tabular-nums; font-feature-settings: "tnum" 1;
}
[data-cv-screen="thread"] [data-cv-moment="currency"] [data-cv-part="answer"] { border-bottom: 3px double var(--cv-accent); padding-bottom: 8px; }
/* A place and a person's card: the accent's edge. */
[data-cv-screen="thread"] :is([data-cv-moment="location"], [data-cv-moment="contact"]) [data-cv-part="answer"] {
  border-left: 4px solid var(--cv-accent); padding-left: 12px;
}

/* A SIGNATURE is ink on paper - COLOURS ONLY (a protected part: designer-css-plan 5.2). */
[data-cv-screen="thread"] [data-cv-moment="signature"] [data-cv-part="answer"] { background-color: #fffaf0; color: #16245a; }
[data-cv-screen="thread"] [data-cv-moment="signature"] [data-cv-part="answer"] :is(canvas, div) { background-color: #fffaf0; border-color: #16245a; color: #16245a; }
[data-cv-screen="thread"] [data-cv-moment="signature"] [data-cv-part="answer"] button { background-color: #fffaf0; border-color: #16245a; color: #16245a; }

/* A PAYMENT is money - COLOURS ONLY (its screen and its pieces are protected): the amount due in the colours of a
   banknote; the pay button wears the accent and its ink, "Use a different card" the panel and the accent (the tokens). */
[data-cv-part="amount-due"] { background-color: #e9f7ef; color: #0a3b22; border-color: #1f7a48; }
[data-cv-part="amount-due"] strong { color: #0a3b22; }

/* ── Back and Next ─────────────────────────────────────────────────────────────────────────────────────────── */
[data-cv-part="buttons"] button { background-color: var(--cv-surface); color: var(--cv-on-surface); border-color: color-mix(in srgb, var(--cv-on-surface) 22%, transparent); }
[data-cv-part="buttons"] [data-cv-part="next"]:where(:not([data-cv-state="muted"])) { background-color: var(--cv-accent); color: var(--cv-on-accent); border-color: var(--cv-accent); }
[data-cv-screen="thread"] [data-cv-part="buttons"] button { border-radius: var(--cv-radius-m); font-family: var(--cv-font-body); }

/* ── Neon ─────────────────────────────────────────────────────────────────────────────────────── */

@font-face {
  font-family: "Neon Oxanium";
  src: url("assets/fonts/oxanium-latin.woff2") format("woff2");
  font-weight: 200 800;
  font-style: normal;
  font-display: swap;
}

[data-cv-screen="thread"] { color-scheme: dark; }
/* The page: the same glow as the other faces' thread - magenta above, ice-blue below - while the conversation is on screen. */
[data-cv-screen="thread"] {
  background-image:
    radial-gradient(120% 50% at 50% 0%, rgba(255, 43, 214, .14), transparent 62%),
    radial-gradient(120% 50% at 50% 100%, rgba(33, 230, 255, .1), transparent 62%);
}
[data-cv-part="header"] [data-cv-part="brand-name"] { font-weight: 700; letter-spacing: .04em; text-shadow: 0 0 8px rgba(255, 43, 214, .85); }

/* The question is a sign; the choices are tubes; the one picked is lit. */
[data-cv-screen="thread"] [data-cv-part="question"] { font-weight: 700; letter-spacing: .02em; text-shadow: 0 0 10px rgba(255, 43, 214, .6); }
[data-cv-screen="thread"] [data-cv-part="moment"]:not([data-cv-moment="signature"], [data-cv-moment="action"], [data-cv-moment="payment"]) [data-cv-part="option"] {
  border: 1px solid #21e6ff; background-color: rgba(33, 230, 255, .04);
  box-shadow: 0 0 6px rgba(33, 230, 255, .45), inset 0 0 8px rgba(33, 230, 255, .14);
}
[data-cv-screen="thread"] [data-cv-part="moment"]:not([data-cv-moment="signature"], [data-cv-moment="action"], [data-cv-moment="payment"]) [data-cv-part="option"][data-cv-state="selected"] {
  border-color: #ff2bd6; background-color: rgba(255, 43, 214, .12);
  box-shadow: 0 0 6px #ff2bd6, 0 0 20px rgba(255, 43, 214, .45), inset 0 0 12px rgba(255, 43, 214, .3);
}

/* A date reads like an LED clock in ice-blue tube light. */
[data-cv-screen="thread"] :is([data-cv-moment="date"], [data-cv-moment="datetime"], [data-cv-moment="time"]) [data-cv-part="answer"] {
  font-family: var(--cv-font-display); border-top-color: #21e6ff; background-color: #090512;
  box-shadow: 0 0 16px rgba(33, 230, 255, .3), inset 0 0 18px rgba(33, 230, 255, .08);
  text-shadow: 0 0 8px rgba(33, 230, 255, .85);
}
[data-cv-screen="thread"] :is([data-cv-moment="date"], [data-cv-moment="datetime"], [data-cv-moment="time"]) [data-cv-part="answer"] button {
  border-color: rgba(33, 230, 255, .45); color: #e2fbff; background-color: transparent;
}

[data-cv-screen="thread"] [data-cv-part="buttons"] [data-cv-part="next"]:where(:not([data-cv-state="muted"])) { box-shadow: 0 0 12px #ff2bd6; }
