/* RustRunner project site. System fonts, no external resources.
   Colours are tokens; dark mode follows the system setting. */
:root {
  --bg: #fbfbfa;
  --surface: #ffffff;
  --surface-muted: #f1f2f0;
  --text: #1d2229;
  --text-muted: #4d5663;
  --border: #d5d9de;
  --accent: #1f4fb4;
  --accent-text: #ffffff;
  --accent-hover: #173f93;
  --warn-bg: #fff4d6;
  --warn-border: #a9780a;
  --focus: #1f4fb4;
  --radius: 8px;
  --font-sans: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #14181d;
    --surface: #1b2027;
    --surface-muted: #232932;
    --text: #e7eaee;
    --text-muted: #aab3bf;
    --border: #38414d;
    --accent: #8ab4ff;
    --accent-text: #0e1522;
    --accent-hover: #a9c7ff;
    --warn-bg: #3a2f10;
    --warn-border: #d2a23a;
    --focus: #8ab4ff;
  }
}

* { box-sizing: border-box; }

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 16px/1.6 var(--font-sans);
}

.wrap { max-width: 1040px; margin: 0 auto; padding: 0 16px; }

a { color: var(--accent); text-underline-offset: 2px; }
a:hover { color: var(--accent-hover); }
a:focus-visible, button:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; border-radius: 2px; }

.skip { position: absolute; left: -999px; top: 8px; background: var(--surface); padding: 8px 12px; border: 1px solid var(--border); z-index: 10; }
.skip:focus { left: 8px; }

.site-header { background: var(--surface); border-bottom: 1px solid var(--border); }
.bar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 24px; padding-top: 12px; padding-bottom: 12px; }
.brand { font-weight: 700; font-size: 20px; color: var(--text); text-decoration: none; }
.brand:hover { color: var(--text); }
nav { display: flex; flex-wrap: wrap; gap: 4px 20px; }
nav a { color: var(--text-muted); text-decoration: none; padding: 4px 0; }
nav a:hover, nav a[aria-current="page"] { color: var(--text); text-decoration: underline; }

.badge {
  display: inline-block; vertical-align: middle; margin-left: 6px; padding: 1px 10px;
  border: 1px solid var(--warn-border); background: var(--warn-bg); color: var(--text);
  border-radius: 999px; font-size: 12px; font-weight: 600; letter-spacing: .02em;
}

main { padding-top: 32px; padding-bottom: 48px; }
section { margin: 0 0 40px; }

h1 { font-size: 32px; line-height: 1.2; margin: 0 0 16px; }
h2 { font-size: 24px; line-height: 1.3; margin: 40px 0 12px; }
h3 { font-size: 18px; margin: 24px 0 8px; }
.hero h1 { font-size: 36px; }
.lead { font-size: 18px; color: var(--text-muted); max-width: 46em; }

.actions { display: flex; flex-wrap: wrap; gap: 12px; margin: 24px 0; }
.button {
  display: inline-block; padding: 10px 20px; border-radius: var(--radius); border: 1px solid var(--border);
  background: var(--surface); color: var(--text); text-decoration: none; font-weight: 600;
}
.button:hover { background: var(--surface-muted); color: var(--text); }
.button.primary { background: var(--accent); border-color: var(--accent); color: var(--accent-text); }
.button.primary:hover { background: var(--accent-hover); border-color: var(--accent-hover); color: var(--accent-text); }

.notice { border: 1px solid var(--warn-border); background: var(--warn-bg); padding: 12px 16px; border-radius: var(--radius); max-width: 46em; }

figure { margin: 16px 0 0; }
figure img { display: block; width: 100%; height: auto; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); }
figcaption { margin-top: 8px; color: var(--text-muted); font-size: 14px; }

.grid { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 16px; }
.card h3 { margin: 0 0 8px; }
.card p { margin: 0; }

.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
table { border-collapse: collapse; width: 100%; background: var(--surface); border: 1px solid var(--border); font-size: 15px; }
th, td { text-align: left; vertical-align: top; padding: 8px 12px; border-bottom: 1px solid var(--border); }
thead th { background: var(--surface-muted); font-size: 13px; text-transform: uppercase; letter-spacing: .04em; color: var(--text-muted); }
tbody th { font-weight: 600; }
table.wide { min-width: 640px; }
td, th { overflow-wrap: break-word; }
code { overflow-wrap: anywhere; }

.small { font-size: 13px; color: var(--text-muted); font-weight: 400; }
.count { font-size: 14px; color: var(--text-muted); font-weight: 400; }

code { font: 14px var(--font-mono); background: var(--surface-muted); padding: 1px 5px; border-radius: 4px; overflow-wrap: anywhere; }

.refs { font-size: 14px; color: var(--text-muted); }

.site-footer { border-top: 1px solid var(--border); background: var(--surface); padding: 16px 0; color: var(--text-muted); font-size: 14px; }
.site-footer p { margin: 0; }

@media (max-width: 600px) {
  body { font-size: 15px; }
  h1, .hero h1 { font-size: 26px; }
  h2 { font-size: 21px; }
  .lead { font-size: 16px; }
  .button { width: 100%; text-align: center; }
}

@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}
