/* StartLine design tokens: one file for the workspace, the identity app, the event site and the public
   homepage (UI/UX guidelines §3). Each runtime serves this same file from platform/core/ui; the homepage,
   progress site and design site keep checked byte-identical copies. Light values are the guidelines'
   baseline colours; dark keeps the same meanings. A page follows the theme picked in the account menu
   (data-theme on <html>), otherwise the system; any element with its own data-theme (the full-screen
   desks, the scoring console) takes that theme for everything inside it. */
@import url("fonts/noto-sans-sc.css");
@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url("fonts/inter-latin.woff2") format("woff2");
}
:root, [data-theme="light"] {
  color-scheme: light;
  --bg: #f4f5f7; --soft: #fafbfc; --paper: #ffffff; --raised: #ffffff;
  --ink: #111522; --ink-2: #3a4152; --muted: #676f82; --faint: #9aa1af; --dot-neutral: #b9bfca;
  --line: #e2e5eb; --line-soft: #eceef2; --control-line: #858ea0; --button-line: #cdd2dc;
  --hover: #f7f8fa; --table-head: #fafbfc; --track: #eceef3;
  --accent: #3f4f99; --accent-hover: #2f3c7e; --accent-soft: #f0f2fa; --accent-line: #d9def0;
  --on-accent: #ffffff;
  --focus: #596bb0; --focus-ring: var(--focus);
  --good: #2e7a55; --good-soft: #eef7f2; --good-line: #c7e2d3;
  --warn: #96590a; --warn-soft: #fbf4e7; --warn-line: #e9d5b2;
  --danger: #be3a45; --danger-soft: #fceff0; --danger-line: #ecc7cb; --on-danger: #ffffff;
  --backdrop: hsl(228 24% 18% / .46);
  --shadow-soft: 0 3px 18px hsl(228 24% 28% / .035);
  --shadow-sheet: 0 0 0 1px rgb(17 21 34 / .05), 0 1px 2px rgb(17 21 34 / .04), 0 12px 32px -16px rgb(17 21 34 / .14);
  --sheet: var(--paper);
  --shadow-nav: 0 0 0 1px rgb(17 21 34 / .05), 0 1px 2px rgb(17 21 34 / .06);
  --shadow-overlay: 0 12px 32px hsl(228 24% 18% / .14);
  --shadow-modal: 0 20px 80px hsl(228 24% 18% / .3);
}
:root {
  /* Corners. Control, panel and composer use the continuous shape; tag (badges, code) and item (a row inside
     a 10px menu: 10 - 4px inset) are the two small steps. Native controls keep an accessible rounded fallback. */
  --radius-tag: 4px; --radius-item: 6px; --radius-control: 8px; --radius-panel: 14px; --radius-composer: 24px;
  --corner-shape: superellipse(1.5);
  --control-height: 44px; --control-radius: var(--radius-control);
  --control-pad-block: 10px; --control-pad-inline: 12px; --control-gap: 8px;
  --control-select-caret-width: 4px; --control-select-caret-offset: 0px;
  --control-select-inset: calc(var(--control-pad-inline) + 2px);
  /* 箭头宽度 4px×2，另留 4px 文字间距，避免使用 rem 导致随根字号漂移。 */
  --control-select-pad-right: calc(var(--control-select-inset) + var(--control-select-caret-width) * 2 + 4px);
  /* Spacing: 8px steps, 4px for details (guidelines §3). */
  --space-4: 4px; --space-8: 8px; --space-12: 12px; --space-16: 16px;
  --space-24: 24px; --space-32: 32px; --space-48: 48px;
  /* Page widths (guidelines §3): 3 centered measures across all non-fullscreen apps.
     --page-shell-* includes desktop 40px inline padding on each side (.content / .page). */
  --page-width-narrow: 920px; --page-width: 1120px; --page-width-wide: 1408px;
  --page-shell-narrow: calc(var(--page-width-narrow) + 80px);
  --page-shell: calc(var(--page-width) + 80px);
  --page-shell-wide: calc(var(--page-width-wide) + 80px);
  /* Type in CSS px. Inputs never go below --text-input, so phones do not zoom on focus. */
  --font-ui: "Noto Sans SC Variable", "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans CJK SC", sans-serif;
  --font-num: "Inter", "Noto Sans SC Variable", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --text-caption: 12px; --text-meta: 13px; --text-body: 14px; --text-input: 16px;
  --text-title: 16px; --text-section: 18px; --text-page: 26px; --text-display: 30px;
  --tracking-tight: -.015em; --tracking-label: .04em;
  /* Page-level stacking, lowest first. A component's own stacking (z-index 0–10 inside it) keeps numbers.
     Dropdowns are attached to <body> and must cover the drawer they open from, so they sit above drawers;
     <dialog> modals use the browser's top layer and need no number. */
  --layer-sticky: 20; --layer-shell: 60; --layer-launcher: 70; --layer-popover: 80; --layer-drawer: 100;
  --layer-dropdown: 320; --layer-modal: 360; --layer-toast: 380; --layer-skip: 390; --layer-progress: 400;
  /* Motion (guidelines §9): short, continuous, interruptible; reduced motion turns movement off. */
  --motion-fast: 120ms; --motion-base: 160ms; --motion-slow: 220ms; --ease-standard: cubic-bezier(.2, .7, .2, 1);
  /* Focus: one ring width everywhere. Outside a free-standing control; inside (negative offset) a row or tab. */
  --focus-width: 2px; --focus-offset: 2px;
  --control-select-position: calc(100% - var(--control-select-inset) - var(--control-select-caret-width)) calc(50% + var(--control-select-caret-offset)),
    calc(100% - var(--control-select-inset)) calc(50% + var(--control-select-caret-offset));
}
@media (min-width: 600px) and (pointer: fine) {
  [data-density="precise"] {
    --control-height: 36px;
    --control-pad-block: 6px;
    --control-pad-inline: 12px;
  }
}
/* The caret takes --muted / --faint where it is computed, so every themed element recomputes it. */
:root, [data-theme] {
  --control-select-icon:
    linear-gradient(45deg, transparent 40%, var(--muted) 40%, var(--muted) 60%, transparent 60%),
    linear-gradient(135deg, transparent 40%, var(--muted) 40%, var(--muted) 60%, transparent 60%);
  --control-select-icon-faint:
    linear-gradient(45deg, transparent 40%, var(--faint) 40%, var(--faint) 60%, transparent 60%),
    linear-gradient(135deg, transparent 40%, var(--faint) 40%, var(--faint) 60%, transparent 60%);
}
[data-theme="dark"] {
  color-scheme: dark;
  --bg: hsl(228 16% 10%); --soft: hsl(228 16% 12%); --paper: hsl(228 16% 14%); --raised: hsl(228 16% 16%);
  --ink: #e4e8f2; --ink-2: #c6ccd9; --muted: #9ea7bc; --faint: #6c7487; --dot-neutral: #5f677a;
  --line: hsl(228 28% 72% / .15); --line-soft: hsl(228 28% 72% / .09); --control-line: #656e84; --button-line: #444b60;
  --hover: hsl(228 16% 18%); --table-head: hsl(228 16% 16%); --track: hsl(228 16% 9%);
  --accent: #a7b6ff; --accent-hover: #bcc8ff; --accent-soft: #28314c; --accent-line: #3b486e;
  --on-accent: #1b2442;
  --focus: #9aaef1; --focus-ring: var(--focus);
  --good: #94cfb0; --good-soft: #1f372c; --good-line: #355847;
  --warn: #e3be85; --warn-soft: #3a3022; --warn-line: #594932;
  --danger: #f09fa6; --danger-soft: #3d262b; --danger-line: #633e46; --on-danger: #2a1216;
  --backdrop: hsl(228 24% 7% / .6);
  --shadow-soft: 0 3px 18px hsl(228 30% 7% / .14);
  /* Dark shadows barely show: a lifted sheet is a touch lighter and carries a 1px inner highlight. */
  --shadow-sheet: inset 0 1px 0 rgb(255 255 255 / .05), 0 0 0 1px rgb(255 255 255 / .07), 0 2px 4px rgb(0 0 0 / .24), 0 14px 36px -16px rgb(0 0 0 / .55);
  --sheet: var(--raised);
  --shadow-nav: 0 0 0 1px rgb(255 255 255 / .08), 0 1px 2px rgb(0 0 0 / .35);
  --shadow-overlay: 0 12px 32px hsl(228 30% 4% / .5);
  --shadow-modal: 0 20px 80px hsl(228 30% 4% / .6);
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --bg: hsl(228 16% 10%); --soft: hsl(228 16% 12%); --paper: hsl(228 16% 14%); --raised: hsl(228 16% 16%);
    --ink: #e4e8f2; --ink-2: #c6ccd9; --muted: #9ea7bc; --faint: #6c7487; --dot-neutral: #5f677a;
    --line: hsl(228 28% 72% / .15); --line-soft: hsl(228 28% 72% / .09); --control-line: #656e84; --button-line: #444b60;
    --hover: hsl(228 16% 18%); --table-head: hsl(228 16% 16%); --track: hsl(228 16% 9%);
    --accent: #a7b6ff; --accent-hover: #bcc8ff; --accent-soft: #28314c; --accent-line: #3b486e;
    --on-accent: #1b2442;
    --focus: #9aaef1; --focus-ring: var(--focus);
    --good: #94cfb0; --good-soft: #1f372c; --good-line: #355847;
    --warn: #e3be85; --warn-soft: #3a3022; --warn-line: #594932;
    --danger: #f09fa6; --danger-soft: #3d262b; --danger-line: #633e46; --on-danger: #2a1216;
    --backdrop: hsl(228 24% 7% / .6);
    --shadow-soft: 0 3px 18px hsl(228 30% 7% / .14);
    --shadow-sheet: inset 0 1px 0 rgb(255 255 255 / .05), 0 0 0 1px rgb(255 255 255 / .07), 0 2px 4px rgb(0 0 0 / .24), 0 14px 36px -16px rgb(0 0 0 / .55);
    --sheet: var(--raised);
    --shadow-nav: 0 0 0 1px rgb(255 255 255 / .08), 0 1px 2px rgb(0 0 0 / .35);
    --shadow-overlay: 0 12px 32px hsl(228 30% 4% / .5);
    --shadow-modal: 0 20px 80px hsl(228 30% 4% / .6);
  }
}
