/* ============================================================
   base.css — shared foundation (owned by Javis / integrator)
   Fonts, design tokens, reset, a11y, toast, dialog, loading.
   Page-specific styling lives in css/site.css (public + auth)
   and css/workspace.css (portal + admin).
   ============================================================ */
@import url("/fonts/fonts.css?v=dQuaDWyax5AM");
:root {
  /* Typography */
  /* One family: Noto Sans for Latin (EN/NL and Latin inside Chinese text), Noto Sans SC for Chinese.
     --serif is kept only as a legacy alias so older rules resolve to the same sans. */
  --sans: "Noto Sans", "Noto Sans SC", -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  --serif: var(--sans);
  /* Type scale: calibrated against jrkdm.com and the Sparkdesign template
     (medium-weight headings, tight tracking, 16px body). Applied in css/type.css. */
  --hero-size: 46px;  --hero-weight: 300; --hero-lh: 1.12; --hero-ls: -0.01em;
  --page-size: 46px;  --page-weight: 300;
  --h2-size: 36px;    --h2-weight: 400;   --h2-lh: 1.2;   --h2-ls: -0.005em;
  --h3-size: 19px;    --h3-weight: 500;   --h3-lh: 1.35;  --h3-ls: 0;
  --body-size: 16px;  --body-lh: 1.6;     --lead-size: 17.5px;
  --small-size: 14px; --fine-size: 13px;
  --ui-size: 14.5px;  --ui-weight: 400;   /* nav, tabs */
  --btn-size: 15px;   --btn-weight: 500;
  --badge-size: 12px; --badge-weight: 500; --badge-ls: .02em;
  --eyebrow-size: 12px; --eyebrow-ls: .14em;
  /* Palette sampled from the hi-fi designs */
  --black: #0b0a09;      /* public header / hero */
  --side: #151412;       /* workspace sidebar */
  --gold: #b9996e;       /* active nav, accents */
  --gold-ink: #8a6a43;   /* eyebrow / link text on light */
  --cream: #f2ede6;      /* breadcrumb band, light CTA button */
  --paper: #fffdfa;      /* public page background */
  --canvas: #f7f5f0;     /* workspace main background */
  --card: #fffcf8;       /* cards */
  --line: #ece5da;       /* hairlines / card borders */
  --ink: #1a1714;
  --muted: #6f675e;
  font: 400 16px/1.65 var(--sans);
  color: var(--ink);
  background: var(--paper);
  font-synthesis: none;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
*, *::before, *::after { box-sizing: border-box; }
body { margin: 0; }
img, svg, video { display: block; max-width: 100%; }
button, input, textarea, select { font: inherit; color: inherit; }
a { color: inherit; text-decoration: none; }
button { cursor: pointer; background: transparent; border: 0; padding: 0; }
button:disabled { opacity: .55; cursor: wait; }
h1, h2, h3, h4, p, figure, blockquote { margin: 0; }
:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.loading {
  display: grid;
  gap: 30px;
  place-content: center;
  min-height: 85dvh;
}
.loading img {
  width: 72px;
  margin: auto;
}
.loading progress {
  height: 3px;
  accent-color: var(--brown);
}
.skip {
  position: fixed;
  top: -100px;
  left: 12px;
  z-index: 100;
  background: white;
  padding: 10px;
}
.skip:focus {
  top: 10px;
}
[hidden] {
  display: none !important;
}
dialog {
  width: min(650px, 92vw);
  max-height: 87dvh;
  overflow: auto;
  background: var(--paper);
  border: 1px solid var(--rule);
  border-radius: 13px;
  padding: 25px;
  color: var(--ink);
  box-shadow: 0 24px 90px #30221535;
}
dialog::backdrop {
  background: #291d1459;
  backdrop-filter: blur(3px);
}
dialog[open] {
  animation: arrive 0.22s ease-out;
}
#toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translate(-50%, 12px);
  z-index: 100;
  background: #34281d;
  color: #fff;
  padding: 10px 20px;
  border-radius: 30px;
  opacity: 0;
  pointer-events: none;
  transition: 0.2s;
  max-width: 90vw;
  text-align: center;
}
#toast.show {
  transform: translate(-50%, 0);
  opacity: 1;
}
.ico {
  vertical-align: middle;
  flex: none;
}

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

/* Brand mark: official "Sushi LIN" artwork (client-supplied). logo() = white for dark
   backgrounds, logo("dark") = near-black for light backgrounds. Size it with height. */
.brandmark { display: block; height: 56px; width: auto; }

/* Chinese pages: one family, Noto Sans SC (self-hosted, variable), for both
   Chinese and Latin so weights stay consistent. Light hero, regular body and nav,
   500 for buttons, table headers and key figures; generous leading. */
html[lang^="zh"] {
  --hero-size: 46px; --hero-weight: 300; --hero-lh: 1.3;  --hero-ls: 0.01em;
  --page-size: 44px; --page-weight: 300;
  --h2-size: 34px;   --h2-weight: 400;   --h2-lh: 1.35;  --h2-ls: 0;
  --h3-size: 19px;   --h3-weight: 500;   --h3-lh: 1.5;   --h3-ls: 0;
  --body-size: 16px; --body-lh: 1.75;    --lead-size: 17px;
  --ui-size: 15px;   --ui-weight: 400;
  --btn-size: 15.5px; --btn-weight: 500;
  --badge-weight: 500;
}
@media (max-width: 760px) {
  :root { --hero-size: 31px; --page-size: 32px; --h2-size: 27px; --h3-size: 18px; --lead-size: 16px; }
  html[lang^="zh"] { --hero-size: min(26px, calc((100vw - 50px) / 13.4)); --hero-lh: 1.35; --page-size: 30px; --h2-size: 26px; --h3-size: 18px; }
}
