/* MAPu website. One stylesheet for every page; site/build.js copies it to release/assets/site.css.
   System fonts only (nothing is downloaded), light and dark from prefers-color-scheme. */
:root {
  color-scheme: light dark;
  --bg: #f6f7fb;
  --bg-2: #eef1f7;
  --surface: #ffffff;
  --text: #0e1525;
  --muted: #4a5568;
  --line: #dfe4ee;
  --accent: #2563eb;
  --accent-ink: #ffffff;
  --accent-soft: rgba(37, 99, 235, .10);
  --glow: rgba(37, 99, 235, .18);
  --shadow: 0 1px 2px rgba(15, 23, 42, .06), 0 12px 32px -12px rgba(15, 23, 42, .22);
  --radius: 14px;
  --wrap: 1160px;
  --font: ui-sans-serif, system-ui, -apple-system, "Segoe UI Variable Text", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, "Cascadia Mono", "Segoe UI Mono", Consolas, monospace;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0a0d14;
    --bg-2: #0f141e;
    --surface: #131926;
    --text: #e8ecf3;
    --muted: #a0aabb;
    --line: #232b3a;
    --accent: #4d8ffa;
    --accent-ink: #06101f;
    --accent-soft: rgba(77, 143, 250, .14);
    --glow: rgba(77, 143, 250, .22);
    --shadow: 0 1px 2px rgba(0, 0, 0, .4), 0 16px 40px -16px rgba(0, 0, 0, .7);
  }
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 84px; }
body {
  margin: 0; background: var(--bg); color: var(--text);
  font: 16px/1.6 var(--font); text-rendering: optimizeLegibility;
  overflow-wrap: break-word;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--accent); text-underline-offset: 3px; }
a:hover { text-decoration-thickness: 2px; }
code { font-family: var(--mono); font-size: .88em; background: var(--bg-2); border: 1px solid var(--line); border-radius: 6px; padding: .05em .35em; overflow-wrap: anywhere; }
h1, h2, h3 { line-height: 1.2; letter-spacing: -.015em; margin: 0 0 .5em; }
h1 { font-size: clamp(2rem, 4.6vw, 3.3rem); letter-spacing: -.03em; }
h2 { font-size: clamp(1.4rem, 2.6vw, 1.9rem); }
h3 { font-size: 1.08rem; }
p { margin: 0 0 1em; }
.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 20px; }
.skip { position: absolute; left: -999px; top: 8px; background: var(--surface); padding: 8px 12px; border-radius: 8px; z-index: 10; }
.skip:focus { left: 8px; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 4px; }

/* ---- header ---- */
.top { position: sticky; top: 0; z-index: 5; background: color-mix(in srgb, var(--bg) 82%, transparent); backdrop-filter: saturate(1.4) blur(14px); -webkit-backdrop-filter: saturate(1.4) blur(14px); border-bottom: 1px solid var(--line); }
.top .wrap { display: flex; align-items: center; gap: 18px; min-height: 64px; flex-wrap: wrap; }
.brand { display: flex; align-items: center; gap: 10px; color: var(--text); text-decoration: none; font-weight: 700; font-size: 1.15rem; }
.brand img { width: 30px; height: 30px; }
.ea { font-size: .72rem; font-weight: 600; letter-spacing: .02em; color: var(--muted); border: 1px solid var(--line); border-radius: 999px; padding: 2px 9px; white-space: nowrap; }
.nav { display: flex; gap: 4px; margin-left: auto; }
.nav a { color: var(--muted); text-decoration: none; padding: 7px 11px; border-radius: 9px; font-size: .95rem; white-space: nowrap; }
.nav a:hover { color: var(--text); background: var(--bg-2); }
.nav a[aria-current="page"] { color: var(--text); background: var(--accent-soft); }
.tools { display: flex; align-items: center; gap: 10px; }
.lang { font-size: .9rem; color: var(--muted); text-decoration: none; border: 1px solid var(--line); border-radius: 9px; padding: 6px 10px; }
.lang:hover { color: var(--text); }
.btn { display: inline-flex; align-items: center; gap: 8px; background: var(--accent); color: var(--accent-ink); text-decoration: none; font-weight: 650; border-radius: 11px; padding: 11px 18px; border: 0; box-shadow: 0 6px 20px -8px var(--glow); }
.btn:hover { filter: brightness(1.08); }
.btn.compact { padding: 7px 13px; font-size: .92rem; border-radius: 9px; }
.btn.ghost { background: transparent; color: var(--text); border: 1px solid var(--line); box-shadow: none; }
.btn svg { flex: none; }
@media (max-width: 980px) {
  .nav { order: 3; width: 100%; margin: 0 -8px; padding: 0 0 8px; overflow-x: auto; scrollbar-width: none; }
  .nav::-webkit-scrollbar { display: none; }
  .tools { margin-left: auto; }
}
.lang .short { display: none; }
@media (max-width: 420px) {
  .top .wrap { gap: 10px; }
  .top .btn.compact span, .lang .long { display: none; }
  .lang .short { display: inline; }
  .ea { font-size: .66rem; padding: 2px 7px; }
}

/* ---- blocks ---- */
main { display: block; }
.hero { padding: 64px 0 28px; position: relative; }
.hero::before { content: ""; position: absolute; inset: -40px 0 auto; height: 520px; z-index: -1; background: radial-gradient(60% 60% at 70% 20%, var(--glow), transparent 70%), radial-gradient(40% 50% at 10% 10%, var(--accent-soft), transparent 70%); pointer-events: none; }
.hero .lead { font-size: clamp(1.05rem, 1.8vw, 1.25rem); color: var(--muted); max-width: 720px; }
.hero .cta { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 16px; margin: 26px 0 8px; }
.meta { color: var(--muted); font-size: .92rem; }
.page-head { padding: 52px 0 12px; }
.page-head .lead { color: var(--muted); font-size: 1.1rem; max-width: 760px; }
section { padding: 36px 0; }
.eyebrow { color: var(--accent); font-weight: 650; font-size: .85rem; letter-spacing: .08em; text-transform: uppercase; margin-bottom: 8px; }

.shot { margin: 0; }
.shot .frame { border-radius: var(--radius); overflow: hidden; border: 1px solid var(--line); background: var(--bg-2); box-shadow: var(--shadow); }
.shot figcaption { color: var(--muted); font-size: .9rem; margin-top: 10px; }
.hero .shot { margin-top: 34px; }
.hero .shot .frame { box-shadow: var(--shadow), 0 30px 80px -30px var(--glow); }

.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; margin: 32px 0 0; padding: 0; list-style: none; }
.stats li { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px 18px; }
.stats b { display: block; font-size: 1.9rem; line-height: 1.1; letter-spacing: -.02em; }
.stats span { color: var(--muted); font-size: .92rem; }

.grid { display: grid; gap: 20px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr)); }
.grid.two { grid-template-columns: repeat(auto-fit, minmax(min(100%, 440px), 1fr)); }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px 22px; }
.card h3 { margin-bottom: .35em; }
.card p { color: var(--muted); margin: 0; }
.tile { display: flex; flex-direction: column; text-decoration: none; color: inherit; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; transition: transform .15s ease, box-shadow .15s ease; }
.tile:hover { transform: translateY(-2px); box-shadow: var(--shadow); }
.tile .frame { border-bottom: 1px solid var(--line); aspect-ratio: 16 / 9; overflow: hidden; }
.tile .frame img { width: 100%; height: 100%; object-fit: cover; }
.tile .body { padding: 16px 18px 18px; }
.tile h3 { margin: 0 0 4px; }
.tile p { margin: 0; color: var(--muted); font-size: .95rem; }
.tile .more { color: var(--accent); font-weight: 600; font-size: .92rem; margin-top: 10px; display: inline-block; }


/* features: one sentence per line */
.flist { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px 28px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 420px), 1fr)); }
.flist li { padding: 12px 0 12px 30px; border-bottom: 1px solid var(--line); position: relative; color: var(--muted); }
.flist li::before { content: ""; position: absolute; left: 4px; top: 20px; width: 10px; height: 10px; border-radius: 3px; background: var(--accent); opacity: .85; }
.flist b { color: var(--text); font-weight: 650; }
.fgroups { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 340px), 1fr)); }
.fgroup { padding: 18px 20px 8px; }
.fgroup h3 { margin: 0 0 4px; font-size: 1.05rem; }
.fgroup h3 a { color: var(--text); text-decoration: none; }
.fgroup .flist { grid-template-columns: 1fr; gap: 0; }
.fgroup .flist li:last-child { border-bottom: 0; }
.split { display: grid; gap: 28px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 460px), 1fr)); align-items: start; }

/* widgets */
.cats { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 330px), 1fr)); }
.cat h3 { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.cat h3 small { color: var(--accent); font-weight: 700; font-size: 1rem; }
.chips { list-style: none; padding: 0; margin: 10px 0 0; display: flex; flex-wrap: wrap; gap: 6px; }
.chips li { font-size: .86rem; background: var(--bg-2); border: 1px solid var(--line); border-radius: 999px; padding: 3px 10px; color: var(--text); }

/* tables */
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
table { border-collapse: collapse; width: 100%; font-size: .95rem; }
th, td { text-align: left; padding: 11px 16px; border-bottom: 1px solid var(--line); vertical-align: top; }
th { font-size: .8rem; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); font-weight: 650; background: var(--bg-2); }
tr:last-child td { border-bottom: 0; }
td code { word-break: normal; white-space: nowrap; }

/* download */
.dl { display: grid; gap: 20px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 380px), 1fr)); align-items: start; }
.dl .main { padding: 26px; }
.ver { font-size: 1.6rem; font-weight: 700; margin: 0 0 4px; }
.ver span { color: var(--muted); font-weight: 500; font-size: 1rem; }
.small { font-size: .88rem; color: var(--muted); }
.note { border-left: 3px solid var(--accent); background: var(--accent-soft); padding: 12px 16px; border-radius: 0 10px 10px 0; color: var(--text); }
.card ul, .card ol, .prose ul, .prose ol { padding-left: 1.2em; margin: .4em 0 0; }
.card li, .prose li { margin: .3em 0; color: var(--muted); }
.card li b, .prose li b, .prose li strong { color: var(--text); }

/* changelog, legal, about */
.prose { max-width: 800px; }
.prose p, .prose li { color: var(--muted); }
.prose strong { color: var(--text); }
.prose h2 { margin-top: 1.8em; font-size: 1.25rem; }
.release { border-top: 1px solid var(--line); padding: 28px 0 8px; }
.release h2 { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 12px; margin: 0 0 12px; font-size: 1.45rem; }
.release h2 time { color: var(--muted); font-size: 1rem; font-weight: 500; }
.release ul { padding-left: 1.2em; }
.release li { margin: .45em 0; color: var(--muted); }
.release li strong { color: var(--text); }
.pending { border: 1px dashed var(--accent); border-radius: var(--radius); padding: 16px 20px; color: var(--muted); }
.legal-meta { font-size: .92rem; }
.src { font-size: .88rem; color: var(--muted); border-top: 1px solid var(--line); margin-top: 36px; padding-top: 14px; }

/* footer */
footer { border-top: 1px solid var(--line); margin-top: 48px; padding: 30px 0 40px; color: var(--muted); font-size: .9rem; background: var(--bg-2); }
footer .cols { display: flex; flex-wrap: wrap; gap: 18px 40px; justify-content: space-between; }
footer nav { display: flex; flex-wrap: wrap; gap: 6px 18px; }
footer a { color: var(--muted); }
footer a:hover { color: var(--text); }
footer p { margin: 0 0 6px; }
