/* Direction: formal stationery — warm paper, deep navy ink, a bookish serif display */
/* Completed by the platform from the short form: both modes, every
   palette token, each text-on-ground pair at its floor. To restyle, write the
   short form again (the decisions in one :root) and it is completed again. */

:root {
  --canvas: #f4f1ea;
  --surface: #faf9f6;
  --surface-2: #e8e5df;
  --border: #d2d0cb;
  --border-strong: #acaba8;
  --ink: #1b2233;
  --muted: #616369;
  --accent: #1f3a6e;
  --accent-hover: #1a315e;
  --accent-ink: #ffffff;
  --accent-text: #1f3a6e;
  --accent-strong: #1f3a6e;
  --accent-soft: #d6d7d9;
  --accent-border: #949fb2;
  --success: #15803d;
  --success-ink: #ffffff;
  --success-soft: #d9e3d5;
  --success-strong: #116d34;
  --warning: #b45309;
  --warning-ink: #ffffff;
  --warning-soft: #ecdecf;
  --warning-strong: #994607;
  --danger: #b91c1c;
  --danger-ink: #ffffff;
  --danger-soft: #edd7d1;
  --danger-strong: #b91c1c;
  --chart-1: #1f3a6e;
  --chart-2: #75377e;
  --chart-3: #86262b;
  --chart-4: #5a5007;
  --chart-5: #0c6b6c;
  --chart-6: #3c74be;

  --font-display: "Newsreader", Georgia, serif;
  --font-body: "Inter", system-ui, sans-serif;
  --radius-card: 10px;
  --x-paper: #ffffff;
  --x-paper-ink: #1c1c1c;
  --x-paper-rule: #c9c3b5;
  --font-mono: "JetBrains Mono Variable", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  --font-sans: "Inter", system-ui, sans-serif;
  --display-weight: 700;
  --display-tracking: -0.02em;
  --eyebrow-tracking: 0.08em;
}

html[data-theme="dark"] {
  --canvas: #04080f;
  --surface: #1d2127;
  --surface-2: #11141b;
  --border: #272b31;
  --border-strong: #4f5257;
  --ink: #f4f1ea;
  --muted: #949492;
  --accent: #1f3a6e;
  --accent-hover: #415884;
  --accent-ink: #ffffff;
  --accent-text: #8290af;
  --accent-strong: #7786a8;
  --accent-soft: #0a1324;
  --accent-border: #101e3a;
  --success: #15803d;
  --success-ink: #ffffff;
  --success-soft: #082219;
  --success-strong: #499c68;
  --warning: #b45309;
  --warning-ink: #ffffff;
  --warning-soft: #2b190e;
  --warning-strong: #c57a40;
  --danger: #b91c1c;
  --danger-ink: #ffffff;
  --danger-soft: #2c0c12;
  --danger-strong: #cd5c5c;
  --chart-1: #4f6da6;
  --chart-2: #ad6cb6;
  --chart-3: #c25d5c;
  --chart-4: #a57a14;
  --chart-5: #4d9348;
  --chart-6: #1eabb5;
}

.sheet {
  background: var(--x-paper);
  color: var(--x-paper-ink);
  font-family: var(--font-display);
  box-shadow: 0 1px 2px rgba(0,0,0,.08), 0 12px 40px rgba(0,0,0,.12);
  border-radius: 4px;
  min-height: 42rem;
  padding: clamp(1.5rem, 5vw, 3.5rem);
  line-height: 1.65;
  font-size: 1.05rem;
}
.sheet .rule { border-color: var(--x-paper-rule); }
.sheet-in { animation: sheet-in .4s ease-out; }
@keyframes sheet-in { from { transform: translateY(6px); } to { transform: none; } }
html.reduced-motion .sheet-in { animation: none; }

@media print {
  body * { visibility: hidden; }
  #letter, #letter * { visibility: visible; }
  #letter { position: absolute; left: 0; top: 0; width: 100%; }
  .sheet { box-shadow: none; border-radius: 0; padding: 0; min-height: 0; }
  @page { margin: 22mm; }
}
