/* The help center (tools/help/build.js copies this to web/landing/help/help.css).
   The site's look, Inter, Anton for the few big headings, OrangeMafia orange, but on a light
   page that is easy to read; dark when the device is. */
:root {
  --bg: #faf8f5; --card: #ffffff; --ink: #1b1815; --muted: #5d5750; --dim: #8a837b; --line: #e8e2da;
  --orange: #ee6a0a; --link: #b44d00; --tint: #fff2e7; --tint-line: #f6c9a4; --mark: #ffe0c4;
  --top: #06070a; --top-ink: #f4f1ec; --shadow: 0 1px 2px rgba(20,16,10,.05), 0 8px 24px rgba(20,16,10,.06);
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0f1013; --card: #17181c; --ink: #ece8e2; --muted: #b0a99f; --dim: #857e75; --line: #2a2b31;
    --link: #ffa55e; --tint: rgba(238,106,10,.12); --tint-line: rgba(238,106,10,.35); --mark: rgba(238,106,10,.35);
    --shadow: 0 1px 2px rgba(0,0,0,.3); color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #0f1013; --card: #17181c; --ink: #ece8e2; --muted: #b0a99f; --dim: #857e75; --line: #2a2b31;
  --link: #ffa55e; --tint: rgba(238,106,10,.12); --tint-line: rgba(238,106,10,.35); --mark: rgba(238,106,10,.35);
  --shadow: 0 1px 2px rgba(0,0,0,.3); color-scheme: dark;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 17px/1.65 Inter, system-ui, -apple-system, "Segoe UI", sans-serif; -webkit-font-smoothing: antialiased; overflow-x: hidden; }
a { color: var(--link); text-underline-offset: 2px; }
a:hover { text-decoration-thickness: 2px; }
.ic { flex: none; vertical-align: middle; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: -999px; top: 8px; z-index: 50; background: var(--card); color: var(--ink); padding: 8px 12px; border-radius: 8px; }
.skip:focus { left: 16px; }
:focus-visible { outline: 2px solid var(--orange); outline-offset: 2px; }

.wrap { width: 100%; max-width: 1180px; margin: 0 auto; padding: 0 16px; }
@media (min-width: 720px) { .wrap { padding: 0 28px; } }

/* ── the top band, the site's dark ── */
.top { background: var(--top); color: var(--top-ink); position: sticky; top: 0; z-index: 20; }
.top-in { max-width: 1180px; margin: 0 auto; padding: 10px 16px; display: flex; align-items: center; gap: 16px; }
@media (min-width: 720px) { .top-in { padding: 12px 28px; } }
.mark { display: flex; align-items: center; gap: 9px; color: var(--top-ink); text-decoration: none; font-weight: 700; font-size: 17px; letter-spacing: -.01em; white-space: nowrap; }
.mark i { width: 10px; height: 10px; border-radius: 50%; background: var(--orange); box-shadow: 0 0 12px 2px rgba(238,106,10,.6); }
.mark span { color: #ffb06b; }
.mark em { font-style: normal; font-weight: 500; color: #b5afa7; padding-left: 10px; margin-left: 2px; border-left: 1px solid rgba(255,255,255,.18); }
.search { position: relative; flex: 1; max-width: 520px; margin-left: auto; display: flex; align-items: center; }
.search > .ic { position: absolute; left: 12px; color: #948e86; pointer-events: none; }
.search input { width: 100%; font: inherit; font-size: 16px; color: var(--top-ink); background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.14); border-radius: 999px; padding: 8px 14px 8px 38px; outline: none; }
.search input::placeholder { color: #948e86; }
.search input:focus { border-color: var(--orange); background: rgba(255,255,255,.12); }
@media (max-width: 520px) { .mark em { display: none; } .mark { font-size: 15px; } .top-in { gap: 10px; } }

.results { position: absolute; top: calc(100% + 8px); left: 0; right: 0; background: var(--card); color: var(--ink); border: 1px solid var(--line); border-radius: 14px; box-shadow: 0 12px 40px rgba(0,0,0,.25); max-height: min(70vh, 560px); overflow-y: auto; padding: 6px; }
@media (max-width: 520px) { .results { position: fixed; top: 58px; left: 8px; right: 8px; } }
.results a { display: block; padding: 10px 12px; border-radius: 10px; color: var(--ink); text-decoration: none; }
.results a:hover, .results a.on { background: var(--tint); }
.results b { display: block; font-weight: 600; font-size: 15px; }
.results small { display: block; font-size: 12px; color: var(--dim); text-transform: uppercase; letter-spacing: .06em; margin: 1px 0 2px; }
.results span { display: block; font-size: 14px; line-height: 1.45; color: var(--muted); }
.results mark { background: var(--mark); color: inherit; border-radius: 2px; }
.results .none { padding: 12px; font-size: 14px; color: var(--muted); }
.results .none button { font: inherit; color: var(--link); background: none; border: 0; padding: 0; text-decoration: underline; cursor: pointer; }

/* ── page ── */
main { padding-top: 18px; padding-bottom: 56px; }
.crumbs ol { list-style: none; display: flex; flex-wrap: wrap; gap: 4px; margin: 0 0 18px; padding: 0; font-size: 14px; color: var(--dim); }
.crumbs li + li::before { content: "/"; margin-right: 4px; color: var(--line); }
.crumbs a { color: var(--muted); text-decoration: none; }
.crumbs a:hover { color: var(--link); text-decoration: underline; }
.cols { display: grid; grid-template-columns: minmax(0, 1fr); gap: 40px; }
@media (min-width: 1000px) { .cols { grid-template-columns: 240px minmax(0, 1fr); } }
.main-col { min-width: 0; max-width: 760px; }

.side { display: none; }
@media (min-width: 1000px) {
  .side { display: block; position: sticky; top: 84px; align-self: start; max-height: calc(100vh - 100px); overflow-y: auto; font-size: 14.5px; padding-right: 6px; }
}
.side-head { display: flex; align-items: center; gap: 8px; font-weight: 700; color: var(--ink); text-decoration: none; padding: 6px 8px; border-radius: 8px; }
.side ul { list-style: none; margin: 4px 0 0; padding: 0; }
.side li a { display: block; padding: 5px 8px 5px 34px; color: var(--muted); text-decoration: none; border-radius: 8px; line-height: 1.35; }
.side a:hover { background: var(--card); color: var(--ink); }
.side a.on, .side-head.on { background: var(--tint); color: var(--ink); box-shadow: inset 3px 0 0 var(--orange); }

.doc { overflow-wrap: anywhere; }
.doc h1 { font-size: clamp(28px, 4.4vw, 38px); line-height: 1.15; letter-spacing: -.02em; margin: 0 0 10px; font-weight: 700; }
.doc h1.big, .hero h1 { font-family: Anton, Impact, sans-serif; font-weight: 400; text-transform: uppercase; letter-spacing: .01em; line-height: 1; font-size: clamp(40px, 7vw, 64px); }
.eyebrow { display: flex; align-items: center; gap: 8px; margin: 0 0 6px; font-size: 13px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--orange); }
.lede { font-size: 19px; color: var(--muted); margin: 0 0 26px; line-height: 1.5; }
.doc h2 { font-size: 23px; letter-spacing: -.01em; margin: 38px 0 10px; line-height: 1.25; scroll-margin-top: 80px; }
.doc h3 { font-size: 18.5px; margin: 28px 0 6px; scroll-margin-top: 80px; }
.doc p { margin: 0 0 14px; }
.doc ul, .doc ol { margin: 0 0 16px; padding-left: 1.4em; }
.doc li { margin: 0 0 8px; padding-left: 2px; }
.doc ol { counter-reset: step; list-style: none; padding-left: 0; }
.doc ol > li { counter-increment: step; position: relative; padding-left: 40px; min-height: 28px; }
.doc ol > li::before { content: counter(step); position: absolute; left: 0; top: 0; width: 28px; height: 28px; border-radius: 50%; background: var(--tint); border: 1px solid var(--tint-line); color: var(--link); font-weight: 700; font-size: 14px; display: grid; place-items: center; line-height: 1; }
.doc ul > li::marker { color: var(--orange); }
.doc b { font-weight: 650; }
.doc code { font: 500 .88em/1 ui-monospace, "SF Mono", Menlo, monospace; background: var(--card); border: 1px solid var(--line); border-radius: 5px; padding: 2px 5px; }
.note { display: flex; gap: 12px; background: var(--tint); border: 1px solid var(--tint-line); border-radius: 14px; padding: 14px 16px; margin: 0 0 18px; }
.note > .ic { color: var(--orange); margin-top: 3px; }
.note p { margin: 0 0 8px; } .note p:last-child { margin: 0; }
.table { overflow-x: auto; margin: 0 0 18px; border: 1px solid var(--line); border-radius: 12px; background: var(--card); }
.table table { border-collapse: collapse; width: 100%; font-size: 15.5px; line-height: 1.45; }
.table th, .table td { text-align: left; vertical-align: top; padding: 10px 14px; border-bottom: 1px solid var(--line); overflow-wrap: normal; }
.table th { font-weight: 650; background: var(--bg); white-space: nowrap; }
.table tr:last-child td { border-bottom: 0; }
@media (max-width: 520px) { .table th, .table td { padding: 8px 10px; } .table table { font-size: 14.5px; } }

.related { margin-top: 40px; }
.related h2, .stuck h2 { font-size: 18px; margin: 0 0 12px; }
.cards { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
@media (min-width: 720px) { .cards { grid-template-columns: 1fr 1fr; } }
.cards a { display: block; height: 100%; background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 13px 16px; text-decoration: none; color: var(--ink); box-shadow: var(--shadow); }
.cards a:hover { border-color: var(--tint-line); }
.cards b { display: block; font-weight: 650; color: var(--link); margin-bottom: 2px; }
.cards span { display: block; font-size: 14.5px; color: var(--muted); line-height: 1.45; }

.pn { display: flex; gap: 12px; justify-content: space-between; margin-top: 36px; padding-top: 22px; border-top: 1px solid var(--line); }
.pn a { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); padding: 10px 14px; border-radius: 12px; border: 1px solid var(--line); background: var(--card); max-width: 48%; line-height: 1.3; }
.pn a:hover { border-color: var(--tint-line); }
.pn small { display: block; font-size: 12px; color: var(--dim); text-transform: uppercase; letter-spacing: .06em; }
.pn .next { margin-left: auto; text-align: right; }
.pn .ic { color: var(--orange); }

/* ── Ask AI and "This didn't answer it" ── */
.stuck { margin-top: 36px; display: grid; gap: 16px; }
.ask { background: var(--card); border: 1px solid var(--line); border-radius: 18px; padding: 18px; box-shadow: var(--shadow); }
.ask:has(.ask-body[hidden]) { background: none; border: 0; box-shadow: none; padding: 0; }
.ask-open .ic { color: var(--orange); }
.results .more { padding: 10px 12px 6px; border-top: 1px solid var(--line); margin-top: 4px; font-size: 14px; color: var(--muted); }
.results .more button, .results .none button { font: inherit; color: var(--link); background: none; border: 0; padding: 0; text-decoration: underline; cursor: pointer; }
.ask h2 { display: flex; align-items: center; gap: 8px; }
.ask h2 .ic { color: var(--orange); }
.fine { font-size: 14px; color: var(--muted); margin: 0 0 10px; }
.stuck form { display: grid; gap: 10px; }
.stuck label { font-weight: 600; font-size: 15px; }
.stuck textarea { width: 100%; font: inherit; font-size: 16px; color: var(--ink); background: var(--bg); border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; resize: vertical; min-height: 54px; }
.stuck textarea:focus { outline: none; border-color: var(--orange); }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; font: inherit; font-size: 15px; font-weight: 600; color: #fff; background: #111; border: 0; border-radius: 999px; padding: 10px 20px; cursor: pointer; justify-self: start; text-decoration: none; }
.btn:hover { background: var(--orange); }
.btn[disabled] { opacity: .55; cursor: default; }
.btn.ghost { background: transparent; color: var(--ink); border: 1px solid var(--line); }
.btn.ghost:hover { border-color: var(--orange); background: transparent; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .btn:not(.ghost) { background: #f4f1ec; color: #111; } :root:not([data-theme="light"]) .btn:not(.ghost):hover { background: var(--orange); color: #fff; } }
:root[data-theme="dark"] .btn:not(.ghost) { background: #f4f1ec; color: #111; }
.answer:empty { display: none; }
.answer { margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--line); }
.answer p { margin: 0 0 10px; }
.answer ul { margin: 6px 0 0; padding-left: 1.2em; }
.answer .err { color: var(--muted); }
.answer .from { font-size: 14px; color: var(--dim); margin: 10px 0 4px; }
.gap { display: grid; gap: 12px; }
.thanks { margin: 0; color: var(--muted); }

/* ── home ── */
.hero { padding: 26px 0 10px; }
.hero h1 { margin: 0 0 12px; }
.hero p { font-size: 19px; color: var(--muted); max-width: 640px; margin: 0 0 18px; }
.home .hero { text-align: center; padding: 40px 0 26px; }
.home .hero p { margin: 0 auto 22px; }
.hero-search { max-width: 640px; margin: 0 auto; text-align: left; }
.hero-search > .ic { left: 18px; color: var(--muted); }
.hero-search input { font-size: 18px; color: var(--ink); background: var(--card); border: 2px solid var(--line); padding: 16px 20px 16px 52px; box-shadow: 0 6px 24px rgba(0,0,0,.06); }
.hero-search input::placeholder { color: var(--dim); }
.hero-search input:focus { border-color: var(--orange); background: var(--card); }
@media (max-width: 520px) { .hero-search .results { position: absolute; top: calc(100% + 8px); left: 0; right: 0; } }
.home .stuck { max-width: 760px; }
.sections { display: grid; gap: 14px; margin-top: 26px; grid-template-columns: minmax(0, 1fr); }
@media (min-width: 720px) { .sections { grid-template-columns: 1fr 1fr; } }
@media (min-width: 1080px) { .sections { grid-template-columns: 1fr 1fr 1fr; } }
.sec-card { background: var(--card); border: 1px solid var(--line); border-radius: 18px; padding: 18px; box-shadow: var(--shadow); display: flex; flex-direction: column; }
.sec-head { display: flex; gap: 12px; text-decoration: none; color: var(--ink); align-items: flex-start; }
.sec-head > .ic { color: var(--orange); margin-top: 2px; }
.sec-head b { display: block; font-size: 19px; }
.sec-head small { display: block; font-size: 14.5px; color: var(--muted); line-height: 1.45; margin-top: 2px; }
.sec-card ul { list-style: none; margin: 14px 0 10px; padding: 0 0 0 34px; font-size: 15.5px; }
.sec-card li { margin: 0 0 6px; line-height: 1.35; }
.sec-card li a { text-decoration: none; }
.sec-card li a:hover { text-decoration: underline; }
.sec-card .more { margin-top: auto; padding-left: 34px; display: inline-flex; align-items: center; gap: 4px; font-weight: 600; font-size: 15px; text-decoration: none; }

.foot { border-top: 1px solid var(--line); padding: 22px 0 36px; color: var(--dim); font-size: 14px; }
.foot p { margin: 0 0 6px; }
.foot a { color: var(--muted); }
