/* Shared styling for the legal & support pages (privacy, terms, refunds,
   contact, security, eula, changelog, 404) — the two-colour system at night
   (BRAND.md §2): ink page, paper words, no third colour, no shadows. Tuned
   for long-form reading. Moved off Midnight-and-gold on 24 Sep 2026. */
@font-face{font-family:"Archivo";src:url("/fonts/Archivo-400.woff2") format("woff2");font-weight:100 900;font-style:normal;font-display:swap}
@font-face{font-family:"ArchivoN";src:url("/fonts/ArchivoN-500.woff2") format("woff2");font-weight:100 900;font-style:normal;font-display:swap}

* { margin: 0; padding: 0; box-sizing: border-box; }

:root {
  --midnight: #131A24;   /* the page */
  --deep: #19212C;       /* a card, darker-than-paper at night reads lighter */
  --panel: #202935;
  --ink: #EFEEEA;        /* headings and emphasis */
  --body: #A8AEB6;       /* body copy */
  --faint: #828891;      /* captions */
  --accent: #EFEEEA;
  --accent-soft: rgba(239, 238, 234, 0.06);
  --accent-line: rgba(239, 238, 234, 0.30);
  --line: rgba(239, 238, 234, 0.14);
  --logo-mark: #EFEEEA;
  --ui: "Archivo", "Helvetica Neue", Arial, sans-serif;
  --disp: "ArchivoN", "Arial Narrow", sans-serif;
  color-scheme: dark;
}

/* Selected text swaps the two colours, so it reads on every surface. */
::selection { background: var(--ink); color: var(--midnight); }

body {
  background: var(--midnight);
  color: var(--ink);
  font-family: var(--ui);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  -webkit-font-smoothing: antialiased;
}

/* ★ THE HEADER NORM (Franz, 7 Oct) — the rooms' header to the pixel: 18px
   above and below one 34px line, the mark 78.7x32 at the rooms' gutter
   (clamp(18px,4vw,48px), content never wider than 1800), the site's four
   places centred as 30px pills at 13px/600, the way in on the right. */
header {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 16px;
  min-height: 70px;
  padding: 18px max(clamp(18px, 4vw, 48px), calc((100% - 1800px) / 2));
  border-bottom: 1px solid var(--line);
}
header .lockup { justify-self: start; }
.head-nav { display: flex; align-items: center; gap: 6px; }
.head-nav a, .head-pill {
  display: inline-flex; align-items: center; height: 30px; padding: 0 14px; border-radius: 15px;
  font: 600 13px/1 var(--ui); color: var(--body); text-decoration: none; white-space: nowrap;
  transition: color .2s ease, background-color .2s ease, border-color .2s ease;
}
.head-nav a:hover { color: var(--ink); background: var(--accent-soft); }
.head-right { justify-self: end; display: flex; align-items: center; gap: 8px; }
.head-pill { color: var(--ink); border: 1px solid var(--accent-line); }
.head-pill:hover { border-color: var(--ink); }
.head-pill.solid { background: var(--ink); color: var(--midnight); border-color: var(--ink); }
@media (max-width: 900px) { .head-nav { display: none; } header { grid-template-columns: 1fr auto; } }
@media (max-width: 520px) { .head-pill:not(.solid) { display: none; } }
.lockup { display: flex; align-items: center; text-decoration: none; color: var(--ink); }
.lockup svg { display: block; }
.ring { width: 14px; height: 14px; border: 4px solid var(--accent); border-radius: 50%; }
.wordmark { font-weight: 600; font-size: 17px; letter-spacing: -0.01em; color: var(--ink); }
.nav-link { color: var(--body); text-decoration: none; font-size: 14px; font-weight: 500; }
.nav-link:hover { color: var(--accent); }

main {
  flex: 1;
  width: 100%;
  max-width: 720px;
  margin: 0 auto;
  padding: 40px 24px 72px;
}

.eyebrow {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
}
h1 {
  font-family: var(--disp);
  font-weight: 500;
  font-size: clamp(30px, 5vw, 42px);
  line-height: 1.1;
  letter-spacing: -0.03em;
  margin-top: 10px;
  color: var(--ink);
}
.updated { color: var(--faint); font-size: 13px; margin-top: 10px; }

.lede {
  background: var(--deep);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 20px 22px;
  margin: 26px 0 8px;
}
.lede p { font-size: 15.5px; line-height: 1.7; color: var(--ink); }

h2 {
  font-family: var(--disp);
  font-size: 22px;
  font-weight: 500;
  letter-spacing: -0.015em;
  margin: 34px 0 10px;
  color: var(--ink);
}
h3 {
  font-size: 15px;
  font-weight: 600;
  margin: 22px 0 8px;
  color: var(--ink);
}
p, li { font-size: 15px; line-height: 1.75; color: var(--body); }
p + p { margin-top: 12px; }
p b, li b { color: var(--ink); font-weight: 600; }

ul, ol { margin: 12px 0 0 20px; display: flex; flex-direction: column; gap: 8px; }

a { color: var(--ink); text-decoration: underline; text-decoration-color: var(--accent-line); text-underline-offset: 3px; font-weight: 500; }
a:hover { text-decoration-color: var(--ink); }

.mono {
  font-family: "SF Mono", Menlo, monospace;
  font-size: 13.5px;
  background: var(--panel);
  border-radius: 5px;
  padding: 1px 6px;
  color: var(--ink);
  word-break: break-all;
}
/* Code on /developers: a drawn-edge well, never a shadow. */
pre {
  font-family: "SF Mono", Menlo, monospace; font-size: 13px; line-height: 1.55; color: var(--ink);
  background: var(--panel); border: 1px solid var(--line); border-radius: 8px;
  padding: 14px 16px; margin: 14px 0 0; overflow-x: auto; white-space: pre;
}
p.scope {
  background: var(--accent-soft);
  border: 1px solid var(--accent-line);
  border-radius: 8px;
  padding: 12px 14px;
  margin: 14px 0;
  display: block;
}

/* Tables — the tier table on terms.html and similar. Wide content scrolls
   inside its own container; the page never scrolls sideways. */
.table-wrap { overflow-x: auto; margin: 14px 0; border: 1px solid var(--line); border-radius: 12px; }
table { border-collapse: collapse; width: 100%; min-width: 520px; }
th, td {
  text-align: left;
  padding: 10px 14px;
  font-size: 14px;
  line-height: 1.5;
  color: var(--body);
  border-bottom: 1px solid var(--line);
}
th { color: var(--ink); font-weight: 600; background: var(--deep); white-space: nowrap; }
tr:last-child td { border-bottom: none; }
td b { color: var(--ink); font-weight: 600; }

/* Changelog entries */
.release { margin: 26px 0 0; padding: 18px 20px; background: var(--deep); border: 1px solid var(--line); border-radius: 12px; }
.release h2 { margin: 0 0 4px; }
.release .tag { font-size: 12px; color: var(--faint); }

/* 404 */
.center { text-align: center; padding: 80px 0 40px; }
.center h1 { font-size: clamp(40px, 8vw, 64px); }
.center p { margin-top: 14px; }

footer {
  text-align: center;
  padding: 26px;
  font-size: 13px;
  color: var(--body);
  border-top: 1px solid var(--line);
}
footer a { color: var(--ink); font-weight: 600; text-decoration: none; }
footer a:hover { color: var(--accent); }

/* ---- Guides (/guides): the same reading page, with a way in and a way on.
   Titles are the display face in sentence case, never tracked capitals. */
.guide .crumb { margin-bottom: 14px; font-size: 14px; }
.guide .crumb a { color: var(--body); text-decoration: none; }
.guide .crumb a:hover { color: var(--ink); }
.guide h3 { font-family: var(--disp); font-weight: 500; font-size: 18px; }
.guide ol { list-style: decimal; }
.guide-cta {
  margin-top: 44px; padding: 26px 26px 28px; border-radius: 18px;
  background: var(--deep); border: 1px solid var(--line);
}
.guide-cta h2 { margin: 0 0 8px; }
.guide-cta p { color: var(--body); }
.guide-btn {
  display: inline-block; margin-top: 16px; padding: 12px 22px; border-radius: 999px;
  background: var(--ink); color: var(--midnight) !important; font-weight: 600; font-size: 14.5px;
  text-decoration: none !important;
}
.guide-btn:hover { opacity: .9; }
.guide-more { margin-top: 40px; }
.guide-more ul { list-style: none; margin-left: 0; gap: 0; }
.guide-more li { border-top: 1px solid var(--line); }
.guide-more li:last-child { border-bottom: 1px solid var(--line); }
.guide-more a { display: block; padding: 14px 0; color: var(--ink); text-decoration: none; font-weight: 500; }
.guide-more a:hover { color: var(--body); }
.guide-list { display: grid; gap: 12px; margin-top: 30px; }
.guide-card {
  display: block; padding: 20px 22px; border-radius: 18px; text-decoration: none;
  background: var(--deep); border: 1px solid var(--line); transition: border-color .2s ease;
}
.guide-card:hover { border-color: var(--accent-line); }
.guide-card h2 { margin: 0 0 6px; font-size: 20px; }
.guide-card p { color: var(--body); font-size: 15px; }
.guide h1 { text-wrap: balance; }
.guide .mono { white-space: nowrap; }

/* ---- Free tools (/tools): the instrument sits in one quiet panel. ----- */
.guide .note { font-size: 13px; color: var(--faint); margin-top: 10px; }
.tool { margin: 26px 0 8px; padding: 22px; border-radius: 18px; background: var(--deep); border: 1px solid var(--line); }
.tool-stage { position: relative; aspect-ratio: 16 / 9; border-radius: 12px; overflow: hidden; background: #0C1118; border: 1px solid var(--line); }
.tool-stage video { width: 100%; height: 100%; object-fit: contain; transform: scaleX(-1); display: block; }
.tool-empty { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; color: var(--faint); font-size: 14px; }
.tool-row { display: flex; gap: 10px; margin-top: 16px; flex-wrap: wrap; }
.tool-btn { height: 40px; padding: 0 20px; border-radius: 20px; border: 1px solid var(--ink); background: var(--ink); color: var(--midnight);
  font: 600 14px var(--ui); cursor: pointer; transition: opacity .2s ease; }
.tool-btn:hover { opacity: .9; }
.tool-btn:disabled { opacity: .6; cursor: default; }
.tool-btn.ghost { background: transparent; color: var(--ink); border-color: var(--accent-line); }
.tool-pills { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.tool-pill { height: 32px; padding: 0 14px; border-radius: 16px; border: 1px solid var(--line); background: transparent; color: var(--body);
  font: 500 13px var(--ui); cursor: pointer; }
.tool-pill.on, .tool-pill:hover { color: var(--ink); border-color: var(--accent-line); }
.tool-read { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 14px 20px; margin: 18px 0 0; }
.tool-read dt { font-size: 13px; color: var(--faint); }
.tool-read dd { margin: 3px 0 0; font-family: var(--disp); font-size: 20px; color: var(--ink); overflow-wrap: anywhere; }
.tool-meter { height: 14px; border-radius: 7px; background: #0C1118; border: 1px solid var(--line); overflow: hidden; }
.tool-meter i { display: block; height: 100%; width: 0; background: var(--ink); border-radius: inherit; transition: width .06s linear; }
.tool audio { width: 100%; margin-top: 14px; }
.tool-big { font-family: var(--disp); font-size: clamp(40px, 7vw, 64px); line-height: 1; color: var(--ink); margin: 6px 0 4px; letter-spacing: -.02em; }
.tool-inputs { display: flex; align-items: flex-end; gap: 12px; flex-wrap: wrap; margin-bottom: 18px; }
.tool-inputs label { display: flex; flex-direction: column; gap: 6px; font-size: 13px; color: var(--faint); }
.tool-inputs input { width: 140px; height: 44px; padding: 0 14px; border-radius: 12px; border: 1px solid var(--line); background: #0C1118;
  color: var(--ink); font: 500 18px var(--ui); }
.tool-inputs input:focus { outline: none; border-color: var(--accent-line); }
.tool-x { font-size: 22px; color: var(--faint); padding-bottom: 8px; }
.tool-h { margin-top: 22px !important; }
.tool-empty[hidden] { display: none; }
.table-wrap { background: var(--midnight); }
