/* YSMS Design: tokens and component styles.
   Copied from the YSMS Design system (see CLAUDE.md). Change the design system first, then refresh this file. */

@import url('https://fonts.googleapis.com/css2?family=IBM+Plex+Mono:wght@400;500&family=Newsreader:ital,opsz,wght@0,6..72,400;1,6..72,400&display=swap');

:root, [data-theme="light"] {
  --paper: #fafafa;
  --sheet: #ffffff;
  --ink: #000000;
  --text: #222222;
  --text-soft: #333333;
  --muted: #666666;
  --faint: #999999;
  --rule: #e0e0e0;
  --rule-soft: #eeeeee;
  --wash: #f5f5f5;
  --panel: #000000;
  --on-panel: #ffffff;
  --oxblood: #6b0f0f;
  --on-oxblood: #ffffff;
  --flash: #dfff00;
  --on-flash: #000000;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
  --paper: #0a0a0a;
  --sheet: #111111;
  --ink: #f2f2f2;
  --text: #e2e2e2;
  --text-soft: #cfcfcf;
  --muted: #9a9a9a;
  --faint: #6e6e6e;
  --rule: #2a2a2a;
  --rule-soft: #1f1f1f;
  --wash: #1a1a1a;
  --panel: #000000;
  --on-panel: #f2f2f2;
  --oxblood: #7a1a1a;
  --on-oxblood: #ffffff;
  --flash: #dfff00;
  --on-flash: #000000;
    color-scheme: dark;
  }
}
[data-theme="dark"] {
  --paper: #0a0a0a;
  --sheet: #111111;
  --ink: #f2f2f2;
  --text: #e2e2e2;
  --text-soft: #cfcfcf;
  --muted: #9a9a9a;
  --faint: #6e6e6e;
  --rule: #2a2a2a;
  --rule-soft: #1f1f1f;
  --wash: #1a1a1a;
  --panel: #000000;
  --on-panel: #f2f2f2;
  --oxblood: #7a1a1a;
  --on-oxblood: #ffffff;
  --flash: #dfff00;
  --on-flash: #000000;
  color-scheme: dark;
}

:root {
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 24px;
  --space-6: 32px;
  --space-7: 48px;
  --space-8: 64px;
  --space-9: 96px;
  --radius-0: 0;
  --radius-dot: 50%;
  --hairline: 1px;
  --bar: 3px;
  --measure-text: 64ch;
  --measure-sheet: 1120px;
  --font-serif: "Newsreader", Georgia, "Times New Roman", serif;
  --font-mono: "IBM Plex Mono", "Courier New", monospace;
  --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.ys-type-display { font-family: var(--font-serif); font-size: 56px; line-height: 60px; font-weight: 400; letter-spacing: -0.02em; }
.ys-type-title { font-family: var(--font-serif); font-size: 40px; line-height: 46px; font-weight: 400; letter-spacing: -0.01em; }
.ys-type-section { font-family: var(--font-serif); font-size: 26px; line-height: 32px; font-weight: 400; letter-spacing: -0.01em; }
.ys-type-aside { font-family: var(--font-serif); font-size: 20px; line-height: 28px; font-weight: 400; font-style: italic; }
.ys-type-lead { font-family: var(--font-mono); font-size: 16px; line-height: 28px; font-weight: 400; }
.ys-type-body { font-family: var(--font-mono); font-size: 14px; line-height: 24px; font-weight: 400; }
.ys-type-small { font-family: var(--font-mono); font-size: 12px; line-height: 20px; font-weight: 400; }
.ys-type-label { font-family: var(--font-mono); font-size: 11px; line-height: 16px; font-weight: 500; letter-spacing: 0.18em; text-transform: uppercase; }
.ys-type-readout { font-family: var(--font-mono); font-size: 28px; line-height: 32px; font-weight: 400; letter-spacing: 0.2em; }
.ys-type-logo { font-family: var(--font-mono); font-size: 13px; line-height: 18px; font-weight: 400; letter-spacing: 0.2em; }

/* YSMS Design: component styles. Every value comes from tokens.css. */
.ys { font-family: var(--font-mono); color: var(--text); }
.ys *, .ys *::before, .ys *::after { box-sizing: border-box; }
.ys :focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }

/* The strike: fluorescent yellow for a fraction of a second, then gone. */
@keyframes ys-strike {
  0%   { background-color: var(--flash); color: var(--on-flash); }
  14%  { background-color: transparent; color: inherit; }
  24%  { background-color: var(--flash); color: var(--on-flash); }
  36%, 100% { background-color: transparent; color: inherit; }
}
@keyframes ys-strike-solid {
  0%   { background-color: var(--flash); color: var(--on-flash); border-color: var(--flash); }
  16%  { background-color: var(--ink); color: var(--sheet); border-color: var(--ink); }
  26%  { background-color: var(--flash); color: var(--on-flash); border-color: var(--flash); }
  38%, 100% { background-color: var(--ink); color: var(--sheet); border-color: var(--ink); }
}
.ys-strike.is-struck { animation: ys-strike 380ms steps(1, end); }
.ys-strikebar { display: block; height: var(--bar); background: transparent; }
.ys-strikebar.is-struck { animation: ys-strike 380ms steps(1, end); }

/* Masthead */
.ys-masthead { background: var(--panel); color: var(--on-panel); border-bottom: var(--hairline) solid var(--rule); }
.ys-masthead__inner { max-width: var(--measure-sheet); margin: 0 auto; padding: var(--space-6) var(--space-7); display: flex; align-items: end; justify-content: space-between; gap: var(--space-5); flex-wrap: wrap; }
.ys-masthead a { color: inherit; text-decoration: none; }
.ys-logo { margin: 0; font-family: var(--font-mono); font-size: 13px; line-height: 18px; letter-spacing: 0.2em; white-space: pre; }
.ys-tagline { margin-top: var(--space-3); font-family: var(--font-mono); font-size: 11px; line-height: 16px; letter-spacing: 0.18em; text-transform: uppercase; color: var(--on-panel); opacity: .72; }
.ys-epbar { font-size: 11px; line-height: 16px; letter-spacing: 0.18em; text-transform: uppercase; display: flex; gap: var(--space-2); flex-wrap: wrap; }
.ys-epbar .sep { opacity: .5; }

/* Links */
.ys-link { color: inherit; text-decoration: underline; text-decoration-thickness: var(--hairline); text-underline-offset: 3px; }
.ys-link:hover { animation: ys-strike 380ms steps(1, end); }

/* Buttons */
.ys-btn { display: inline-flex; align-items: center; gap: var(--space-2); padding: var(--space-3) var(--space-5); border: var(--hairline) solid var(--ink); border-radius: var(--radius-0); background: transparent; color: var(--ink); font: 500 11px/16px var(--font-mono); letter-spacing: 0.18em; text-transform: uppercase; text-decoration: none; cursor: pointer; }
.ys-btn:hover { background: var(--ink); color: var(--sheet); animation: ys-strike-solid 360ms steps(1, end); }
.ys-btn--solid { background: var(--ink); color: var(--sheet); }
.ys-btn--on-panel { border-color: var(--on-panel); color: var(--on-panel); }
.ys-btn--on-panel:hover { background: var(--on-panel); color: var(--panel); }
.ys-btn:disabled { opacity: .45; cursor: default; animation: none; }

/* Announcement */
.ys-announce { background: var(--panel); color: var(--on-panel); border: var(--hairline) solid var(--rule); padding: var(--space-7); display: flex; gap: var(--space-7); align-items: center; }
.ys-announce__text { flex: 1; min-width: 0; }
.ys-announce__label { font-size: 11px; line-height: 16px; letter-spacing: 0.18em; text-transform: uppercase; opacity: .72; margin: 0 0 var(--space-4); }
.ys-announce__title { font-family: var(--font-serif); font-weight: 400; font-size: 26px; line-height: 32px; letter-spacing: -0.01em; margin: 0 0 var(--space-4); color: var(--on-panel); }
.ys-announce__body { font-size: 14px; line-height: 24px; max-width: var(--measure-text); margin: 0 0 var(--space-6); opacity: .88; }
.ys-announce__img { flex: 0 0 200px; width: 200px; max-width: 100%; height: auto; filter: grayscale(.25); opacity: .8; }
@media (max-width: 640px) { .ys-announce { flex-direction: column; align-items: flex-start; padding: var(--space-6); gap: var(--space-6); } }

/* Status readout */
.ys-status { border-top: var(--hairline) solid var(--rule); border-bottom: var(--hairline) solid var(--rule); padding: var(--space-4) 0; display: flex; justify-content: space-between; align-items: baseline; gap: var(--space-4); }
.ys-status__label { font-size: 11px; line-height: 16px; letter-spacing: 0.18em; text-transform: uppercase; color: var(--muted); }
.ys-status__value { font-size: 28px; line-height: 32px; letter-spacing: 0.2em; color: var(--ink); display: inline-flex; align-items: center; gap: var(--space-3); }
.ys-status__dot { width: 10px; height: 10px; border-radius: var(--radius-dot); background: var(--ink); }
.ys-status__dot.is-closed { background: transparent; border: var(--hairline) solid var(--muted); }

/* Response table */
.ys-table { width: 100%; border-collapse: collapse; font-family: var(--font-mono); }
.ys-table caption { text-align: left; font-size: 11px; letter-spacing: 0.18em; text-transform: uppercase; color: var(--muted); padding-bottom: var(--space-3); }
.ys-table th, .ys-table td { padding: var(--space-4) 0; border-bottom: var(--hairline) solid var(--rule-soft); }
.ys-table th { text-align: left; font-weight: 400; font-size: 11px; letter-spacing: 0.18em; text-transform: uppercase; color: var(--muted); }
.ys-table td { text-align: right; font-size: 18px; color: var(--ink); font-variant-numeric: tabular-nums; }
.ys-table td span { padding: 0 var(--space-1); }

/* Notice */
.ys-notice { background: var(--wash); border-left: var(--bar) solid var(--ink); padding: var(--space-4) var(--space-5); font-size: 12px; line-height: 20px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink); }

/* Field Notices */
.ys-fieldnotices { background: var(--wash); border-top: var(--hairline) solid var(--rule); padding: var(--space-7) var(--space-5); text-align: center; }
.ys-fieldnotices__label { font-size: 11px; letter-spacing: 0.18em; text-transform: uppercase; color: var(--muted); margin: 0 0 var(--space-3); }
.ys-fieldnotices__text { font-size: 13px; line-height: 22px; color: var(--text-soft); max-width: 46ch; margin: 0 auto var(--space-5); }
.ys-form { display: flex; max-width: 480px; margin: 0 auto; }
.ys-input { flex: 1; min-width: 0; padding: var(--space-3) var(--space-4); border: var(--hairline) solid var(--ink); border-right: 0; border-radius: var(--radius-0); background: var(--sheet); color: var(--ink); font: 13px/20px var(--font-mono); }
.ys-input::placeholder { color: var(--muted); }
.ys-form .ys-btn { border-color: var(--ink); }
@media (max-width: 520px) { .ys-form { flex-direction: column; gap: var(--space-3); } .ys-input { border-right: var(--hairline) solid var(--ink); } }

/* Colophon */
.ys-colophon { padding: var(--space-6) var(--space-5); text-align: center; font-size: 11px; line-height: 16px; letter-spacing: 0.18em; text-transform: uppercase; color: var(--muted); border-top: var(--hairline) solid var(--rule); }

@media (prefers-reduced-motion: reduce) {
  .ys-strike.is-struck, .ys-strikebar.is-struck, .ys-link:hover, .ys-btn:hover { animation: none; }
}
