/* KEYNEX — site styles. System fonts, no external resources. */
:root {
  --primary: #007AFF;
  --secondary: #005FCC;
  --bg: #F5F7FA;
  --surface: #FFFFFF;
  --surface-2: #E8EDF4;
  --text: #0C1017;
  --muted: #4A5566;
  --border: #D5DCE6;
  --link: #005FCC;          /* 6.0:1 on white; #007AFF is kept for non-text accents */
  --button-bg: #005FCC;
  --button-text: #FFFFFF;
  --note-bg: #FFF7E0;
  --note-border: #C98A00;
  --note-text: #4A3500;
  --focus: #007AFF;
  --radius: 18px;
  --shadow: 0 1px 2px rgba(12, 16, 23, .06), 0 8px 24px rgba(12, 16, 23, .05);
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0C1017; --surface: #171E29; --surface-2: #1F2835; --text: #EEF2F7; --muted: #A9B4C4;
    --border: #2A3545; --link: #60A5FA; --button-bg: #60A5FA; --button-text: #0C1017;
    --note-bg: #2A2310; --note-border: #C98A00; --note-text: #F5DFA6; --focus: #60A5FA;
    --shadow: none; color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #0C1017; --surface: #171E29; --surface-2: #1F2835; --text: #EEF2F7; --muted: #A9B4C4;
  --border: #2A3545; --link: #60A5FA; --button-bg: #60A5FA; --button-text: #0C1017;
  --note-bg: #2A2310; --note-border: #C98A00; --note-text: #F5DFA6; --focus: #60A5FA;
  --shadow: none; color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0; background: var(--bg); color: var(--text);
  font: 17px/1.6 -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", system-ui, Roboto, "Helvetica Neue", Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3 { font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Segoe UI", system-ui, sans-serif; line-height: 1.15; letter-spacing: -.02em; margin: 0 0 .5em; }
h1 { font-size: clamp(2.1rem, 5vw, 3.6rem); font-weight: 700; }
h2 { font-size: clamp(1.6rem, 3.4vw, 2.3rem); font-weight: 700; }
h3 { font-size: 1.2rem; font-weight: 650; letter-spacing: -.01em; }
p, ul, ol, dl { margin: 0 0 1em; }
ul, ol { padding-left: 1.3em; }
li + li { margin-top: .35em; }
a { color: var(--link); text-underline-offset: .18em; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; border-radius: 6px; }
img, svg { max-width: 100%; height: auto; }
code { font: .92em ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; background: var(--surface-2); padding: .1em .35em; border-radius: 6px; overflow-wrap: anywhere; }
strong { font-weight: 650; }
table { width: 100%; border-collapse: collapse; margin: 0 0 1.2em; font-size: .95rem; }
th, td { text-align: left; vertical-align: top; padding: .65em .75em; border-bottom: 1px solid var(--border); }
th { font-weight: 650; }
.table-wrap { overflow-x: auto; }

.skip { position: absolute; left: -9999px; top: 0; background: var(--surface); color: var(--text); padding: .6em 1em; z-index: 10; }
.skip:focus { left: 16px; top: 12px; }
.wrap { width: min(1120px, 100% - 32px); margin-inline: auto; }
.narrow { width: min(780px, 100% - 32px); margin-inline: auto; }

/* Header */
.site-header { position: sticky; top: 0; z-index: 5; background: color-mix(in srgb, var(--bg) 92%, transparent); border-bottom: 1px solid var(--border); }
@supports not (background: color-mix(in srgb, red, blue)) { .site-header { background: var(--bg); } }
.bar { position: relative; display: flex; align-items: center; gap: 16px; min-height: 64px; }
.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--text); text-decoration: none; font-weight: 700; letter-spacing: .04em; }
.brand img { width: 30px; height: 30px; }
.nav { margin-left: auto; }
.nav ul { list-style: none; display: flex; gap: 4px; margin: 0; padding: 0; }
.nav li + li { margin: 0; }
.nav a { display: block; padding: .45em .7em; border-radius: 10px; color: var(--text); text-decoration: none; font-size: .95rem; }
.nav a:hover, .nav a[aria-current="page"] { background: var(--surface-2); }
.tools { display: flex; align-items: center; gap: 8px; }
.lang { font-size: .9rem; font-weight: 600; padding: .4em .65em; border: 1px solid var(--border); border-radius: 10px; color: var(--text); text-decoration: none; }
.theme { display: none; border: 1px solid var(--border); border-radius: 10px; overflow: hidden; }
.js .theme { display: inline-flex; }
.theme button { appearance: none; border: 0; background: transparent; color: var(--muted); font: inherit; font-size: .82rem; padding: .4em .6em; cursor: pointer; }
.theme button[aria-pressed="true"] { background: var(--surface-2); color: var(--text); font-weight: 650; }
.menu { display: none; }
@media (max-width: 900px) {
  .nav { display: none; }
  .menu { display: block; margin-left: auto; position: static; }
  .menu summary { list-style: none; cursor: pointer; padding: .45em .75em; border: 1px solid var(--border); border-radius: 10px; font-weight: 600; font-size: .95rem; }
  .menu summary::-webkit-details-marker { display: none; }
  .menu ul { position: absolute; left: 0; right: 0; top: calc(100% + 1px); background: var(--surface); border: 1px solid var(--border); border-radius: 14px; box-shadow: var(--shadow); list-style: none; padding: 8px; margin: 0; }
  .menu li + li { margin: 0; }
  .menu a { display: block; padding: .6em .8em; border-radius: 10px; color: var(--text); text-decoration: none; }
  .menu a[aria-current="page"] { background: var(--surface-2); }
}
@media (max-width: 520px) { .theme button { padding: .4em .45em; } }

/* Sections */
main { display: block; }
.hero { padding: clamp(56px, 9vw, 112px) 0 clamp(40px, 6vw, 72px); text-align: center; }
.hero .mark { width: 84px; height: 84px; margin: 0 auto 24px; display: block; }
.hero .lead { max-width: 720px; margin: 0 auto 1.4em; }
.eyebrow { display: inline-block; font-size: .85rem; font-weight: 650; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); margin-bottom: .8em; }
.lead { font-size: clamp(1.1rem, 2vw, 1.3rem); color: var(--muted); }
.slogan { font-weight: 650; color: var(--text); }
.badge { display: inline-flex; align-items: center; gap: .5em; padding: .55em 1em; border-radius: 999px; background: var(--surface); border: 1px solid var(--border); font-weight: 650; font-size: .95rem; }
.badge::before { content: ""; width: .55em; height: .55em; border-radius: 50%; background: var(--note-border); }
.section { padding: clamp(48px, 7vw, 88px) 0; }
.section + .section { border-top: 1px solid var(--border); }
.section-head { max-width: 760px; margin-bottom: 32px; }
.grid { display: grid; gap: 20px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr)); }
.grid.two { grid-template-columns: repeat(auto-fit, minmax(min(100%, 420px), 1fr)); }
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 26px; box-shadow: var(--shadow); transition: transform .2s ease, border-color .2s ease; }
.card:hover { border-color: color-mix(in srgb, var(--primary) 45%, var(--border)); }
.card h3 { margin-bottom: .4em; }
.card p:last-child, .card ul:last-child { margin-bottom: 0; }
.card .status { display: inline-block; margin-top: .8em; font-size: .82rem; font-weight: 650; color: var(--muted); }
.platforms { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; list-style: none; padding: 0; margin: 0 0 1.6em; }
.platforms li { margin: 0; padding: .45em .95em; border-radius: 999px; background: var(--surface); border: 1px solid var(--border); font-weight: 600; font-size: .95rem; }
.split { display: grid; gap: 28px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 380px), 1fr)); align-items: start; }
.button { display: inline-block; padding: .75em 1.3em; border-radius: 12px; background: var(--button-bg); color: var(--button-text); font-weight: 650; text-decoration: none; }
.button.secondary { background: transparent; color: var(--link); border: 1px solid var(--border); }
.actions { display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; }

/* Documents */
.doc { padding: clamp(40px, 6vw, 72px) 0 72px; }
.doc header { margin-bottom: 28px; }
.doc .meta { color: var(--muted); font-size: .95rem; }
.doc h2 { font-size: 1.5rem; margin-top: 1.8em; }
.doc h3 { margin-top: 1.4em; }
.doc section { scroll-margin-top: 84px; }
.toc { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 20px 24px; margin: 0 0 28px; }
.toc h2 { font-size: 1rem; margin: 0 0 .6em; }
.toc ol { margin: 0; columns: 2 240px; column-gap: 32px; }
.toc li { break-inside: avoid; }
.note { background: var(--note-bg); border: 1px solid var(--note-border); color: var(--note-text); border-radius: 14px; padding: 14px 18px; margin: 0 0 1.4em; }
.note a { color: inherit; }
.note strong { color: inherit; }
.pending { background: var(--note-bg); color: var(--note-text); border: 1px dashed var(--note-border); border-radius: 6px; padding: 0 .35em; font-weight: 600; }
.faq details { background: var(--surface); border: 1px solid var(--border); border-radius: 14px; padding: 0 20px; margin-bottom: 12px; }
.faq summary { cursor: pointer; padding: 16px 0; font-weight: 650; list-style-position: outside; }
.faq details[open] summary { border-bottom: 1px solid var(--border); margin-bottom: 14px; }
.faq details > *:last-child { margin-bottom: 16px; }

/* Footer */
.site-footer { border-top: 1px solid var(--border); padding: 40px 0 48px; color: var(--muted); font-size: .92rem; }
.footer-grid { display: grid; gap: 24px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 200px), 1fr)); margin-bottom: 24px; }
.site-footer h2 { font-size: .95rem; color: var(--text); margin: 0 0 .6em; letter-spacing: 0; }
.site-footer ul { list-style: none; padding: 0; margin: 0; }
.site-footer a { color: var(--muted); }
.site-footer a:hover { color: var(--text); }

@media (prefers-reduced-motion: no-preference) {
  .card:hover { transform: translateY(-2px); }
  .reveal { animation: rise .5s ease both; }
  @keyframes rise { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; animation: none !important; }
}
@media print {
  .site-header, .site-footer, .toc, .skip { display: none; }
  body { background: #fff; color: #000; }
  a { color: #000; }
}

/* ===== Design 2.0: shared by every page (homepage adds home.css) ===== */
:root { --soft: #5B6575; --rule: #D5DCE6; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) { --soft: #97A3B4; --rule: #222B38; } }
:root[data-theme="dark"] { --soft: #97A3B4; --rule: #222B38; }

.kicker { display: block; font-size: .8rem; font-weight: 650; letter-spacing: .14em; text-transform: uppercase; color: var(--soft); margin-bottom: 1.1em; }
.arrow-link { font-weight: 600; text-decoration: none; }
.arrow-link::after { content: " →"; }
.arrow-link:hover { text-decoration: underline; }
.availability { display: flex; align-items: center; gap: .6em; font-size: .95rem; color: var(--soft); margin: 0; }
.availability::before { content: ""; flex: none; width: 8px; height: 8px; border-radius: 50%; background: #C98A00; }

/* Header: quieter, one line */
.site-header { border-bottom: 1px solid transparent; }
.nav a { font-size: .93rem; color: var(--soft); }
.nav a:hover, .nav a[aria-current="page"] { background: transparent; color: var(--text); }
.nav a[aria-current="page"] { font-weight: 600; }

/* Documents */
.doc { padding: clamp(40px, 6vw, 88px) 0 clamp(64px, 8vw, 120px); }
.doc header { margin-bottom: clamp(32px, 4vw, 48px); padding-bottom: 28px; border-bottom: 1px solid var(--rule); }
.doc h1 { font-size: clamp(2.3rem, 5vw, 3.8rem); line-height: 1.03; letter-spacing: -.035em; margin-bottom: .35em; }
.doc header .lead { font-size: clamp(1.1rem, 1.8vw, 1.3rem); color: var(--soft); margin: 0 0 1em; }
.doc .meta { font-size: .92rem; color: var(--soft); margin: 0; }
.doc .narrow { width: min(720px, 100% - 32px); }
.doc section { padding-top: .2em; }
.doc h2 { font-size: clamp(1.3rem, 2.2vw, 1.6rem); letter-spacing: -.02em; margin: 2.2em 0 .6em; }
.doc section:first-of-type h2 { margin-top: .6em; }
.doc h3 { font-size: 1.08rem; margin: 1.6em 0 .4em; }
.doc p, .doc li, .doc dd { line-height: 1.72; }
.doc dt { margin-top: 1.1em; }
.doc dd { margin: .2em 0 0; }

/* Notes: a rule, not a coloured box */
.note { background: transparent; border: 0; border-left: 3px solid #C98A00; border-radius: 0; color: var(--text); padding: 4px 0 4px 18px; margin: 0 0 2em; }
.note strong { color: var(--text); }
.pending { background: transparent; border: 0; border-bottom: 2px dotted #C98A00; border-radius: 0; color: var(--text); padding: 0; }

/* Contents: a quiet list; beside the text on wide screens */
.toc { background: transparent; border: 0; border-top: 1px solid var(--rule); border-bottom: 1px solid var(--rule); border-radius: 0; padding: 18px 0; margin: 0 0 2.4em; }
.toc h2 { font-size: .8rem; font-weight: 650; letter-spacing: .14em; text-transform: uppercase; color: var(--soft); margin: 0 0 .8em; }
.toc ol { font-size: .93rem; padding-left: 2.1em; }
.toc a { color: var(--text); text-decoration: none; }
.toc a:hover { color: var(--link); text-decoration: underline; }
@media (min-width: 1180px) {
  .doc .narrow:has(> .toc) { width: min(1040px, 100% - 64px); display: grid; grid-template-columns: 240px minmax(0, 720px); column-gap: 72px; align-items: start; }
  .doc .narrow:has(> .toc) > * { grid-column: 2; }
  .doc .narrow:has(> .toc) > .toc { grid-column: 1; grid-row: 1 / span 60; position: sticky; top: 88px; max-height: calc(100vh - 110px); overflow: auto; border-bottom: 0; margin: 0; }
  .doc .narrow:has(> .toc) > .toc ol { columns: 1; padding-left: 2.1em; }
  .doc .narrow:has(> .toc) > .toc li + li { margin-top: .25em; }
}

/* Tables */
.doc table { font-size: .95rem; margin: 1em 0 1.6em; }
.doc th { font-size: .8rem; font-weight: 650; letter-spacing: .08em; text-transform: uppercase; color: var(--soft); }
.doc tbody th { font-size: inherit; letter-spacing: 0; text-transform: none; color: var(--text); }
.doc th, .doc td { padding: .8em .9em .8em 0; border-bottom: 1px solid var(--rule); }

/* Questions: rules between them, a plus that turns */
.faq details { background: transparent; border: 0; border-bottom: 1px solid var(--rule); border-radius: 0; padding: 0; margin: 0; }
.faq details:first-of-type { border-top: 1px solid var(--rule); }
.faq summary { list-style: none; position: relative; padding: 20px 40px 20px 0; font-size: 1.08rem; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; position: absolute; right: 4px; top: 50%; transform: translateY(-50%); font-size: 1.5rem; font-weight: 300; color: var(--soft); }
.faq details[open] summary { border-bottom: 0; margin-bottom: 0; }
.faq details[open] summary::after { content: "−"; }
.faq details > p { margin: 0 0 22px; color: var(--soft); max-width: 40em; }
@media (prefers-reduced-motion: no-preference) { .faq details[open] > p { animation: rise .25s ease both; } }

/* Status lines inside pages (Chrome) */
.doc .status-line { margin-top: 1.2em; }

/* Footer: three quiet columns */
.site-footer { border-top: 1px solid var(--rule); }
.site-footer h2 { font-size: .8rem; font-weight: 650; letter-spacing: .14em; text-transform: uppercase; color: var(--soft); }
.site-footer li + li { margin-top: .35em; }
.site-footer a { text-decoration: none; }
.site-footer a:hover { text-decoration: underline; }
.faq header { border-bottom: 0; padding-bottom: 0; }

/* v2.1 header: the brand reads first */
.brand { gap: 11px; font-size: 1.14rem; font-weight: 760; letter-spacing: .09em; }
.brand img { width: 32px; height: 32px; }
.menu-theme { display: none !important; }
@media (max-width: 900px) {
  .js .menu-theme { display: inline-flex !important; margin: 8px 8px 4px; }
  .js .tools .theme { display: none; }
  .brand span { display: inline; }
}
