/* KYsee shared tokens, fonts and controls (portal + app). Style B: official and editorial.
   Off-white paper, black ink, deep green for action, gold for seals. Fonts are self-hosted: no third-party requests. */
@font-face { font-family: "Instrument Serif"; font-weight: 400; font-style: normal; font-display: swap; src: url("fonts/instrument-serif-latin-400-normal.woff2") format("woff2"); }
@font-face { font-family: "Instrument Serif"; font-weight: 400; font-style: italic; font-display: swap; src: url("fonts/instrument-serif-latin-400-italic.woff2") format("woff2"); }
@font-face { font-family: "Public Sans"; font-weight: 400; font-display: swap; src: url("fonts/public-sans-latin-400-normal.woff2") format("woff2"); }
@font-face { font-family: "Public Sans"; font-weight: 600; font-display: swap; src: url("fonts/public-sans-latin-600-normal.woff2") format("woff2"); }
@font-face { font-family: "Public Sans"; font-weight: 700; font-display: swap; src: url("fonts/public-sans-latin-700-normal.woff2") format("woff2"); }
@font-face { font-family: "Plex Hebrew"; font-weight: 400; font-display: swap; src: url("fonts/ibm-plex-sans-hebrew-hebrew-400-normal.woff2") format("woff2"); }
@font-face { font-family: "Plex Hebrew"; font-weight: 600; font-display: swap; src: url("fonts/ibm-plex-sans-hebrew-hebrew-600-normal.woff2") format("woff2"); }
@font-face { font-family: "Plex Arabic"; font-weight: 400; font-display: swap; src: url("fonts/ibm-plex-sans-arabic-arabic-400-normal.woff2") format("woff2"); }
@font-face { font-family: "Plex Arabic"; font-weight: 600; font-display: swap; src: url("fonts/ibm-plex-sans-arabic-arabic-600-normal.woff2") format("woff2"); }
@font-face { font-family: "Plex Mono"; font-weight: 500; font-display: swap; src: url("fonts/ibm-plex-mono-latin-500-normal.woff2") format("woff2"); }
@font-face { font-family: "Plex Mono"; font-weight: 600; font-display: swap; src: url("fonts/ibm-plex-mono-latin-600-normal.woff2") format("woff2"); }

:root {
  --bg: #FAFAF7;          /* paper */
  --soft: #F0EFE8;        /* tinted paper bands */
  --card: #FFFFFF;
  --text: #141414;        /* ink */
  --muted: #55554F;
  --rule: #DAD9D2;        /* hairlines */
  --line: #141414;        /* strong rules */
  --self: #0E6B4F;        /* action green */
  --self-soft: #E3F0EA;
  --pro: #7A5A12;         /* gold, readable as text */
  --pro-soft: #F6EEDB;
  --gold: #B8892B;        /* seals and ornaments only */
  --hi: #FFE58A;
  --hi-text: #2E2600;
  --bad: #A3261B;
  --bad-soft: #FBEDEA;
  --on: #FFFFFF;
  --hero: #FAFAF7;
  --shadow: none;
  --focus: #D98E04;
  --display: "Instrument Serif", "Iowan Old Style", Georgia, serif;
  --body: "Public Sans", "Plex Hebrew", "Plex Arabic", system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "Plex Mono", ui-monospace, Consolas, monospace;
  --he: "Plex Hebrew", "Arial Hebrew", sans-serif;
  --ar: "Plex Arabic", "Geeza Pro", "Segoe UI", sans-serif;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #121411; --soft: #191C18; --card: #1C1F1B; --text: #ECEBE4; --muted: #A6A69C; --rule: #34372F; --line: #ECEBE4;
    --self: #5CC79E; --self-soft: #183329; --pro: #D9B35A; --pro-soft: #3A2F14; --gold: #D9B35A; --hi: #E2C55A; --hi-text: #1E1900;
    --bad: #FF8C7C; --bad-soft: #3A1D1A; --on: #0F1210; --hero: #121411; color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #121411; --soft: #191C18; --card: #1C1F1B; --text: #ECEBE4; --muted: #A6A69C; --rule: #34372F; --line: #ECEBE4;
  --self: #5CC79E; --self-soft: #183329; --pro: #D9B35A; --pro-soft: #3A2F14; --gold: #D9B35A; --hi: #E2C55A; --hi-text: #1E1900;
  --bad: #FF8C7C; --bad-soft: #3A1D1A; --on: #0F1210; --hero: #121411; color-scheme: dark;
}
*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--text); font-family: var(--body); font-size: 1.03rem; line-height: 1.6; }
h1, h2, h3 { font-family: var(--display); font-weight: 400; margin: 0; text-wrap: balance; letter-spacing: -0.005em; }
h1 i, h2 i { font-style: italic; }
p { margin: 0; }
a { color: inherit; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }
.wrap { width: 100%; max-width: 1160px; margin: 0 auto; padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px)); }
@media (min-width: 760px) { .wrap { padding-left: max(24px, env(safe-area-inset-left, 0px)); padding-right: max(24px, env(safe-area-inset-right, 0px)); } }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.sprite { position: absolute; width: 0; height: 0; }
.num { font-family: var(--mono); font-variant-numeric: tabular-nums; }
.ck { width: 18px; height: 18px; flex: none; }
.c-self { color: var(--self); } .c-pro { color: var(--pro); }
.label { font: 700 0.78rem/1.3 var(--body); letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted); }

.btn { white-space: nowrap; display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 48px; padding: 0 22px; border-radius: 2px; border: 1px solid transparent; font: 600 1rem/1 var(--body); cursor: pointer; text-decoration: none; }
.btn[disabled] { opacity: .55; cursor: progress; }
.btn-self { background: var(--self); color: var(--on); }
.btn-ink { background: var(--text); color: var(--bg); }
.btn-pro { background: var(--self); color: var(--on); }
.btn-self:hover, .btn-pro:hover, .btn-ink:hover { filter: brightness(1.12); }
.btn-ghost { background: transparent; color: var(--text); border-color: var(--line); }
.btn-ghost:hover { background: var(--soft); }
.btn-bad { background: var(--bad); color: var(--on); }
.btn-sm { min-height: 40px; padding: 0 16px; font-size: 0.93rem; }

.brand { display: inline-flex; align-items: center; text-decoration: none; color: var(--text); font: 400 2rem/1 var(--display); letter-spacing: -0.01em; }
.brand svg { display: none; }

.field { display: grid; gap: 6px; font-size: 0.92rem; font-weight: 600; }
.field input, .field select { font: 400 1rem var(--body); padding: 11px 13px; border-radius: 2px; border: 1px solid var(--rule); border-bottom-color: var(--muted); background: var(--card); color: var(--text); min-height: 48px; width: 100%; }
.field input:focus { border-color: var(--self); }
.field .hint { font-weight: 400; color: var(--muted); font-size: 0.86rem; }
.check { display: flex; gap: 10px; align-items: flex-start; font-size: 0.92rem; color: var(--text); }
.check input { margin-top: 3px; width: 18px; height: 18px; accent-color: var(--self); flex: none; }
.msg { font-size: 0.93rem; padding: 11px 13px; border-left: 3px solid currentColor; font-weight: 600; }
.msg.ok { background: var(--self-soft); color: var(--self); }
.msg.err { background: var(--bad-soft); color: var(--bad); }
.linkish { background: none; border: 0; color: var(--self); font: 600 0.93rem var(--body); cursor: pointer; padding: 0; text-decoration: underline; text-underline-offset: 3px; justify-self: start; }
