/* Design tokens: "sổ điểm danh" — notebook paper, mực tím (violet ink), bút đỏ (red pen).
   Source of truth: design-system/zalo-diem-danh/MASTER.md. Light and dark were designed (and contrast-checked) together. */
:root {
  color-scheme: light dark;

  --c-paper: #F4F3F8;
  --c-surface: #FFFFFF;
  --c-surface-2: #EFEDF6;
  --c-ink: #1D1830;
  --c-ink-muted: #585170;
  --c-rule: #E2DEF0;
  --c-rule-strong: #8F86B3;
  --c-primary: #4B33B0;
  --c-primary-hover: #3D2896;
  --c-on-primary: #FFFFFF;
  --c-primary-tint: #EEEAFB;
  --c-done: #1E7349;
  --c-done-bg: #E2F3E9;
  --c-pending: #8A5300;
  --c-pending-bg: #FFF1D6;
  --c-danger: #B3261E;
  --c-danger-bg: #FCE8E6;
  --c-guess: #0E6673;      /* guessed by name: calm teal, 6.6:1 on white */
  --c-guess-bg: #DFF1F3;
  --c-scrim: rgba(29, 24, 48, 0.55);

  --font-ui: 'Be Vietnam Pro', system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  --font-title: 'Literata', 'Noto Serif', Georgia, 'Times New Roman', serif;

  --fs-xs: 0.8125rem;  /* 13 */
  --fs-sm: 0.875rem;   /* 14 */
  --fs-md: 1rem;       /* 16 */
  --fs-lg: 1.1875rem;  /* 19 */
  --fs-xl: 1.4375rem;  /* 23 */
  --fs-2xl: 1.75rem;   /* 28 */

  --s-1: 0.25rem;
  --s-2: 0.5rem;
  --s-3: 0.75rem;
  --s-4: 1rem;
  --s-5: 1.5rem;
  --s-6: 2rem;
  --s-7: 3rem;

  --r-control: 6px;
  --r-panel: 10px;
  --r-dialog: 14px;

  --shadow-pop: 0 10px 30px rgba(29, 24, 48, 0.16), 0 2px 6px rgba(29, 24, 48, 0.08);
  --shadow-bar: 0 -1px 0 var(--c-rule), 0 -6px 18px rgba(29, 24, 48, 0.06);

  --t-fast: 120ms;
  --t-enter: 180ms;
  --ease-out: cubic-bezier(0.2, 0.8, 0.2, 1);

  --tap: 44px;
  --topbar-h: 56px;
  --bottomnav-h: 64px;
  --gutter: 16px;
  --content-max: 70rem;

  --z-sticky: 10;
  --z-bar: 20;
  --z-toast: 40;
}

@media (prefers-color-scheme: dark) {
  :root {
    --c-paper: #16131F;
    --c-surface: #1F1B2C;
    --c-surface-2: #262137;
    --c-ink: #ECE9F6;
    --c-ink-muted: #ADA6C6;
    --c-rule: #2F2A42;
    --c-rule-strong: #6E6690;
    --c-primary: #B9A9FF;
    --c-primary-hover: #CDC1FF;
    --c-on-primary: #16131F;
    --c-primary-tint: #2A2442;
    --c-done: #74D39C;
    --c-done-bg: #183324;
    --c-pending: #F2C25C;
    --c-pending-bg: #3A2E12;
    --c-danger: #FF968C;
    --c-danger-bg: #43201E;
    --c-guess: #7FD3DF;
    --c-guess-bg: #14313A;
    --c-scrim: rgba(5, 4, 10, 0.7);
    --shadow-pop: 0 10px 30px rgba(0, 0, 0, 0.5), 0 2px 6px rgba(0, 0, 0, 0.4);
    --shadow-bar: 0 -1px 0 var(--c-rule), 0 -6px 18px rgba(0, 0, 0, 0.35);
  }
}

@media (min-width: 600px) {
  :root { --gutter: 24px; }
}
@media (min-width: 960px) {
  :root { --gutter: 32px; --bottomnav-h: 0px; }
}
