/* Court Stratagem — site styles. Colours are the game's (ui/theme/court_theme.gd):
   NIGHT #17152c, NAVY #454268, PAPER #f7f1e6, INK #220901, CRIMSON #852d37, GOLD #efdcb1.
   Display face: Jua (SIL Open Font License 1.1 — /assets/OFL-Jua.txt), cut to the
   characters these pages use. Everything else is the system font. */
@font-face {
  font-family: "Jua";
  src: url("/assets/jua-site.woff") format("woff");
  font-display: swap;
}
:root {
  --night: #17152c;
  --navy: #454268;
  --paper: #f7f1e6;
  --paper-dim: #e9e0cf;
  --ink: #220901;
  --ink-soft: #5d3321;
  --crimson: #852d37;
  --crimson-deep: #3e0610;
  --gold: #efdcb1;
  --gold-mid: #bca261;
  --gold-deep: #83681b;
  --display: "Jua", system-ui, -apple-system, "Apple SD Gothic Neo", "Noto Sans KR", sans-serif;
  --text: system-ui, -apple-system, "Apple SD Gothic Neo", "Malgun Gothic", "Noto Sans KR", "Segoe UI", Roboto, sans-serif;
  color-scheme: light;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--text);
  font-size: 1rem;
  line-height: 1.65;
  color: var(--ink);
  background: var(--paper);
  overflow-wrap: break-word;
  word-break: keep-all;
}
img { max-width: 100%; height: auto; }
a { color: var(--crimson); text-underline-offset: 2px; }
a:hover { color: var(--crimson-deep); }
:focus-visible { outline: 3px solid var(--gold-mid); outline-offset: 2px; }
.wrap { width: 100%; max-width: 960px; margin: 0 auto; padding: 0 16px; }
.skip-link { position: absolute; left: -9999px; top: 8px; background: var(--paper); color: var(--ink); padding: 8px 12px; z-index: 10; }
.skip-link:focus { left: 8px; }

/* header */
.bar { background: var(--night); color: var(--paper); border-bottom: 2px solid var(--gold-mid); }
.bar-inner { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 60px; flex-wrap: wrap; padding-top: 8px; padding-bottom: 8px; }
.brand { display: flex; align-items: center; gap: 10px; color: var(--gold); text-decoration: none; font-family: var(--display); font-size: 1.25rem; }
.brand img { border-radius: 10px; }
.brand:hover { color: var(--paper); }
.bar nav { display: flex; gap: 4px 14px; flex-wrap: wrap; font-size: 0.92rem; }
.bar nav a { color: var(--paper); text-decoration: none; padding: 4px 0; }
.bar nav a:hover, .bar nav a[aria-current="page"] { color: var(--gold); text-decoration: underline; }
.bar nav .language { border: 1px solid var(--gold-mid); border-radius: 999px; padding: 3px 12px; }

/* landing */
.home { background: var(--night); }
.hero { color: var(--paper); background: radial-gradient(120% 80% at 70% 20%, var(--navy) 0%, var(--night) 70%); }
.hero-inner { display: grid; gap: 24px; padding-top: 32px; padding-bottom: 40px; align-items: center; }
.hero-icon { border-radius: 22px; box-shadow: 0 6px 20px rgba(0, 0, 0, 0.45); border: 2px solid var(--gold-mid); }
.kicker { color: var(--gold); font-family: var(--display); letter-spacing: 0.02em; margin: 18px 0 0; font-size: 1.05rem; }
.hero h1 { font-family: var(--display); font-weight: normal; font-size: clamp(2.4rem, 9vw, 3.8rem); line-height: 1.1; margin: 6px 0 12px; color: var(--paper); text-shadow: 0 3px 0 var(--crimson-deep); }
.lead { font-size: 1.12rem; margin: 0 0 20px; max-width: 34em; }
.soon { display: inline-block; margin: 0; padding: 10px 18px; border-radius: 999px; background: var(--crimson); color: var(--paper); font-weight: 600; border: 2px solid var(--gold-mid); box-shadow: inset 0 -3px 0 var(--crimson-deep); }
.hero-art { margin: 0; justify-self: center; }
.hero-art img { display: block; width: min(100%, 360px); border-radius: 18px; border: 3px solid var(--gold-mid); box-shadow: 0 12px 36px rgba(0, 0, 0, 0.55); }
.paper { background: var(--paper); padding: 36px 0 44px; }
.paper h2 { font-family: var(--display); font-weight: normal; color: var(--crimson); font-size: 1.6rem; margin: 32px 0 8px; }
.story { font-size: 1.08rem; font-style: italic; color: var(--ink-soft); border-left: 3px solid var(--gold-mid); padding-left: 14px; margin: 0; }
.features { list-style: none; padding: 0; margin: 24px 0 0; display: grid; gap: 14px; }
.features li { background: #fffaf1; border: 1px solid var(--gold-mid); border-radius: 14px; padding: 16px 18px; box-shadow: 0 2px 0 var(--paper-dim); }
.features h3 { font-family: var(--display); font-weight: normal; margin: 0 0 4px; font-size: 1.2rem; color: var(--ink); }
.features p { margin: 0; }
.free { margin-top: 20px; color: var(--ink-soft); }
@media (min-width: 760px) {
  .hero-inner { grid-template-columns: 1.15fr 0.85fr; padding-top: 56px; padding-bottom: 64px; }
  .features { grid-template-columns: 1fr 1fr; }
}

/* documents */
.doc { padding-top: 24px; padding-bottom: 48px; max-width: 820px; }
.back { margin: 0 0 12px; font-size: 0.92rem; }
.doc h1 { font-family: var(--display); font-weight: normal; color: var(--crimson); font-size: clamp(1.8rem, 6vw, 2.4rem); line-height: 1.2; margin: 0 0 6px; }
.doc-meta { color: var(--ink-soft); font-size: 0.92rem; margin: 0 0 20px; }
.doc h2 { font-family: var(--display); font-weight: normal; font-size: 1.3rem; color: var(--ink); margin: 32px 0 8px; padding-bottom: 4px; border-bottom: 1px solid var(--gold-mid); scroll-margin-top: 12px; }
.doc-body ul, .doc-body ol { padding-left: 1.4em; }
.doc-body li { margin: 4px 0; }
.toc { background: #fffaf1; border: 1px solid var(--gold-mid); border-radius: 12px; padding: 12px 16px; margin: 0 0 8px; font-size: 0.95rem; }
.toc-title { margin: 0 0 4px; font-weight: 700; }
.toc ol { margin: 0; padding-left: 0; list-style: none; columns: 2 220px; column-gap: 24px; }
.toc li { break-inside: avoid; }
.table-scroll { overflow-x: auto; margin: 12px 0; border: 1px solid var(--paper-dim); border-radius: 10px; }
table { border-collapse: collapse; width: 100%; min-width: 520px; font-size: 0.93rem; background: #fffdf8; }
th, td { text-align: left; vertical-align: top; padding: 8px 10px; border-bottom: 1px solid var(--paper-dim); }
th { background: var(--paper-dim); font-weight: 700; }
tr:last-child td { border-bottom: 0; }
code { font-size: 0.9em; background: var(--paper-dim); padding: 0 4px; border-radius: 4px; }
.note { background: #fffaf1; border-left: 3px solid var(--gold-mid); padding: 8px 12px; }
.missing { min-height: 50vh; }

/* footer */
.foot { background: var(--night); color: var(--paper-dim); font-size: 0.9rem; padding: 20px 0 28px; border-top: 2px solid var(--gold-mid); }
.foot p { margin: 4px 0; }
.foot a { color: var(--gold); }
.foot a:hover { color: var(--paper); }

@media (prefers-reduced-motion: reduce) { * { scroll-behavior: auto !important; } }
@media print { .bar, .foot, .toc, .back, .skip-link { display: none; } body { background: #fff; } }

/* the account-deletion form (DELETE-ACCOUNT.md option 2) */
.delete-form { display: grid; gap: 6px; max-width: 360px; margin: 16px 0 20px; }
.delete-form label { font-weight: 700; margin-top: 6px; }
.delete-form input { font: inherit; font-size: 1.05rem; letter-spacing: .08em; text-transform: uppercase; padding: 10px 12px; border: 1px solid currentColor; border-radius: 8px; background: transparent; color: inherit; }
.delete-form button { font: inherit; font-weight: 700; margin-top: 10px; padding: 12px 16px; border: 0; border-radius: 8px; background: #8e1b2b; color: #fff; cursor: pointer; }
.delete-form button:disabled { opacity: .6; cursor: default; }
.form-result { min-height: 1.5em; margin: 6px 0 0; font-weight: 700; }
.form-result.ok { color: #1f7a52; }
.form-result.no { color: #b3263a; }
