/* Rankyst Academy — the download page.
 *
 * The app's own palette: warm paper rather than white, navy ink, and gold
 * used once, as the rule under the title.
 * System fonts only, so the page makes no request to anyone but its own host.
 */

:root {
  --paper: #F8F7F4;
  --surface: #FFFFFF;
  --ink: #12222E;
  --muted: #5C6270;
  --hairline: #E4E1D9;
  --navy: #1B4965;
  --navy-deep: #133649;
  --gold: #C9A227;
  --on-button: #FFFFFF;
  --focus: #C9A227;
  --code-ground: #F1EFEA;
}

@media (prefers-color-scheme: dark) {
  :root {
    --paper: #10161A;
    --surface: #172026;
    --ink: #E8E6E1;
    --muted: #A7ADB3;
    --hairline: #2A343B;
    --navy: #8EC1E0;
    --navy-deep: #B3D6EB;
    --gold: #D9A93A;
    --on-button: #0B1E2A;
    --focus: #D9A93A;
    --code-ground: #0C1115;
  }
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 17px/1.6 "Segoe UI", system-ui, -apple-system, Roboto, "Noto Sans", sans-serif;
}

main {
  max-width: 720px;
  margin: 0 auto;
  padding: 48px 16px 24px;
}

h1, h2, h3 {
  font-family: Georgia, Cambria, "Times New Roman", serif;
  line-height: 1.2;
  font-weight: 700;
}

h1 { font-size: 2.1rem; margin: 20px 0 0; }
h2 { font-size: 1.35rem; margin: 0 0 12px; }
h3 { font-size: 1.1rem; margin: 24px 0 8px; }

p { margin: 0 0 12px; }

a { color: var(--navy); }

/* ---- The top of the page: the mark, the title and the one button. ---- */

.hero {
  text-align: center;
  padding-bottom: 16px;
}

.mark {
  display: block;
  width: 128px;
  height: 128px;
  margin: 0 auto;
}

.rule {
  width: 48px;
  height: 3px;
  margin: 16px auto 20px;
  background: var(--gold);
  border-radius: 2px;
}

.lead {
  font-size: 1.1rem;
  max-width: 34em;
  margin: 0 auto 8px;
}

.aside {
  color: var(--muted);
  margin: 0 auto 28px;
}

.download {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 52px;
  padding: 12px 28px;
  border-radius: 12px;
  background: var(--navy);
  color: var(--on-button);
  font-size: 1.1rem;
  font-weight: 600;
  text-decoration: none;
  box-shadow: 0 1px 2px rgba(18, 34, 46, 0.18), 0 6px 18px rgba(27, 73, 101, 0.22);
  transition: background-color 120ms ease, transform 120ms ease;
}

.download:hover { background: var(--navy-deep); }
.download:active { transform: translateY(1px); }

.download:focus-visible,
a:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 3px;
}

.file {
  margin: 14px 0 0;
  color: var(--muted);
  font-size: 0.95rem;
  overflow-wrap: anywhere;
}

.dot { margin: 0 4px; }

/* ---- The sections below it. ---- */

.card {
  background: var(--surface);
  border: 1px solid var(--hairline);
  border-radius: 14px;
  padding: 22px 22px 14px;
  margin: 24px 0 0;
}

.specs {
  display: grid;
  grid-template-columns: max-content 1fr;
  gap: 0;
  margin: 0 0 8px;
}

.specs dt,
.specs dd {
  margin: 0;
  padding: 10px 0;
  border-top: 1px solid var(--hairline);
}

.specs dt {
  padding-right: 24px;
  color: var(--muted);
  font-weight: 600;
}

.specs dt:first-of-type,
.specs dt:first-of-type + dd { border-top: 0; }

.steps,
.notes {
  margin: 0 0 12px;
  padding-left: 1.4em;
}

.steps > li,
.notes > li { margin: 0 0 10px; }

.steps ul {
  margin: 8px 0 0;
  padding-left: 1.2em;
}

.steps ul li { margin: 0 0 4px; }

.muted { color: var(--muted); }

.nowrap { white-space: nowrap; }

code, pre {
  font-family: "Cascadia Mono", Consolas, "SFMono-Regular", Menlo, monospace;
  font-size: 0.9rem;
}

.hash code,
pre {
  display: block;
  background: var(--code-ground);
  border: 1px solid var(--hairline);
  border-radius: 8px;
  padding: 10px 12px;
}

.hash code {
  word-break: break-all;
  letter-spacing: 0.02em;
}

pre {
  margin: 0 0 12px;
  overflow-x: auto;
  white-space: pre;
}

footer {
  max-width: 720px;
  margin: 0 auto;
  padding: 24px 16px 40px;
  color: var(--muted);
  font-size: 0.9rem;
  text-align: center;
}

/* ---- Phone width. ---- */

@media (max-width: 520px) {
  main { padding-top: 32px; }
  h1 { font-size: 1.7rem; }
  .mark { width: 104px; height: 104px; }
  .download { display: flex; justify-content: center; width: 100%; }
  .card { padding: 18px 16px 10px; }
  .specs { grid-template-columns: 1fr; }
  .specs dt { padding: 10px 0 0; }
  .specs dd { padding: 2px 0 10px; border-top: 0; }
}

@media (prefers-reduced-motion: reduce) {
  .download { transition: none; }
}
