:root {
  --bg: #FAF8F3;
  --surface: #FFFFFF;
  --ink: #1B2A2F;
  --muted: #56656B;
  --line: #E3DED3;
  --accent: #0E6B68;
  --accent-ink: #FFFFFF;
  --accent-soft: #E2F1EF;
  --alt: #F2EFE7;
  --danger: #A32020;
  --ok: #1F6B45;
  --serif: Georgia, "Times New Roman", serif;
  --sans: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --radius: 10px;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0F1719;
    --surface: #162124;
    --ink: #E8EEEE;
    --muted: #9BAAAE;
    --line: #26363A;
    --accent: #4FC1BA;
    --accent-ink: #06201F;
    --accent-soft: #12302F;
    --alt: #131E20;
    --danger: #FF8A8A;
    --ok: #6FD3A0;
  }
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--accent); text-underline-offset: 3px; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; border-radius: 4px; }

.wrap { max-width: 980px; margin: 0 auto; padding: 0 20px; }

/* Header */
.site-header { border-bottom: 1px solid var(--line); background: var(--bg); position: sticky; top: 0; z-index: 10; }
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding-top: 14px; padding-bottom: 14px; }
.brand { font-family: var(--serif); font-size: 24px; font-weight: 700; color: var(--ink); text-decoration: none; letter-spacing: -.01em; }
.brand { display: inline-flex; align-items: center; }
.brand span { color: var(--accent); }
.brand-mark { width: 38px; height: 34px; flex: none; margin-right: 10px; }
.site-header nav { display: flex; align-items: center; gap: 18px; font-size: 15px; }
.site-header nav a { color: var(--ink); text-decoration: none; }
.site-header nav a:hover { color: var(--accent); }
.site-header nav .nav-cta { background: var(--accent); color: var(--accent-ink); padding: 8px 14px; border-radius: 8px; font-weight: 600; }
.site-header nav .nav-cta:hover { color: var(--accent-ink); filter: brightness(1.08); }
@media (max-width: 560px) { .site-header nav a:not(.nav-cta) { display: none; } }

/* Type */
.eyebrow { font-size: 12px; letter-spacing: .14em; text-transform: uppercase; font-weight: 600; color: var(--accent); margin: 0 0 10px; }
h1, h2, h3, h4 { font-family: var(--serif); line-height: 1.2; color: var(--ink); margin: 0; }
h1 { font-size: clamp(32px, 5.4vw, 48px); letter-spacing: -.015em; margin-bottom: 14px; }
h2 { font-size: clamp(24px, 3.4vw, 32px); margin-bottom: 10px; }
h3 { font-size: 20px; }
h4 { font-size: 18px; margin-bottom: 6px; }
.lede { font-size: 18px; color: var(--muted); max-width: 60ch; margin: 0 0 8px; }
.fine { font-size: 13px; color: var(--muted); margin: 12px 0 0; }

/* Hero */
.hero { padding: 48px 0 56px; }
.hero-grid { display: grid; gap: 36px; grid-template-columns: 1fr; align-items: start; }
@media (min-width: 860px) { .hero-grid { grid-template-columns: 1.05fr .95fr; gap: 48px; } }
.points { margin: 20px 0 0; padding-left: 20px; color: var(--ink); }
.points li { margin-bottom: 8px; }

/* Cards & forms */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; }
.form h2 { font-size: 22px; margin-bottom: 14px; }
label { display: block; font-size: 14px; font-weight: 600; margin: 14px 0 6px; }
input, textarea {
  width: 100%; font: inherit; color: var(--ink); background: var(--bg);
  border: 1px solid var(--line); border-radius: 8px; padding: 10px 12px;
}
textarea { resize: vertical; min-height: 120px; }
input:focus, textarea:focus { border-color: var(--accent); }
.row { display: grid; gap: 0 14px; grid-template-columns: 1fr; }
@media (min-width: 520px) { .row { grid-template-columns: 1fr 1fr; } }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

.btn {
  display: inline-block; font: inherit; font-weight: 600; cursor: pointer; text-decoration: none; text-align: center;
  background: var(--accent); color: var(--accent-ink); border: 2px solid var(--accent);
  padding: 11px 20px; border-radius: 8px; margin-top: 18px;
}
.btn:hover { filter: brightness(1.08); color: var(--accent-ink); }
.btn[disabled] { opacity: .6; cursor: not-allowed; }
.btn.ghost { background: transparent; color: var(--accent); }
.btn.ghost:hover { background: var(--accent-soft); color: var(--accent); filter: none; }
.btn.small { padding: 8px 14px; margin-top: 0; font-size: 14px; }
.status { min-height: 1.4em; margin: 12px 0 0; font-size: 15px; }
.status.ok { color: var(--ok); }
.status.err { color: var(--danger); }

/* Sections */
.section { padding: 56px 0; }
.section.alt { background: var(--alt); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.group { margin: 28px 0 12px; font-size: 18px; }
.cards { display: grid; gap: 16px; grid-template-columns: 1fr; }
@media (min-width: 720px) { .cards { grid-template-columns: repeat(3, 1fr); } }
.link-card { text-decoration: none; color: var(--ink); display: flex; flex-direction: column; gap: 4px; transition: border-color .15s; }
.link-card:hover { border-color: var(--accent); }
.link-card p { margin: 0 0 10px; color: var(--muted); font-size: 15px; }
.link-card span { margin-top: auto; color: var(--accent); font-weight: 600; font-size: 15px; }
.guides { margin: 0; padding-left: 20px; }
.guides li { margin-bottom: 6px; }

.more { display: grid; gap: 24px; align-items: center; grid-template-columns: 1fr; }
@media (min-width: 820px) { .more { grid-template-columns: 1.4fr 1fr; } }
.more-actions { display: flex; flex-wrap: wrap; gap: 12px; }
.more-actions .btn { margin-top: 0; }

/* Chooser */
.chooser { margin-top: 22px; }
.step { font-size: 12px; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); font-weight: 600; margin: 0 0 8px; }
.q { font-size: 22px; margin-bottom: 6px; }
.chooser [tabindex="-1"]:focus { outline: none; }
.hint { color: var(--muted); margin: 0 0 4px; font-size: 15px; }
.opts { display: grid; gap: 10px; margin-top: 16px; }
.opt {
  font: inherit; text-align: left; cursor: pointer; color: var(--ink);
  background: var(--bg); border: 1px solid var(--line); border-radius: 8px; padding: 12px 14px;
}
.opt:hover { border-color: var(--accent); background: var(--accent-soft); }
.nav-row { display: flex; gap: 14px; margin-top: 18px; }
.linkbtn { font: inherit; font-size: 14px; background: none; border: 0; color: var(--accent); cursor: pointer; padding: 4px 0; text-decoration: underline; text-underline-offset: 3px; }

.result-badge { display: inline-block; font-size: 12px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; background: var(--accent-soft); color: var(--accent); padding: 4px 10px; border-radius: 999px; margin-bottom: 10px; }
.result h3 { font-size: 26px; margin-bottom: 8px; }
.result h4 { font-family: var(--sans); font-size: 13px; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); margin: 20px 0 6px; }
.result p { margin: 0 0 6px; }
.result ul { margin: 0; padding-left: 20px; }
.result li { margin-bottom: 4px; }
.path { font-size: 14px; color: var(--muted); margin-bottom: 12px; }
.tool-links { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 4px; }
.tool-links a { border: 1px solid var(--line); background: var(--bg); border-radius: 8px; padding: 7px 12px; font-size: 14px; text-decoration: none; }
.tool-links a:hover { border-color: var(--accent); }
.result-cta { margin-top: 22px; padding-top: 18px; border-top: 1px solid var(--line); display: flex; flex-wrap: wrap; align-items: center; gap: 14px; }
.result-cta p { margin: 0; color: var(--muted); font-size: 15px; }
.chooser-note { margin-top: 12px; }

/* Footer */
.site-footer { border-top: 1px solid var(--line); padding: 24px 0; font-size: 14px; color: var(--muted); }
.footer-inner { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 24px; }
.footer-inner p { margin: 0; }

/* 404 */
.notfound { padding: 96px 0; text-align: center; }

/* Answers (/questions) */
.prose { max-width: 760px; padding-top: 40px; padding-bottom: 56px; }
.prose h1 { margin-bottom: 8px; }
.prose h2 { font-size: 24px; margin: 32px 0 10px; }
.prose p, .prose li { font-size: 17px; }
.prose ul, .prose ol { padding-left: 22px; margin: 0 0 16px; }
.prose li { margin-bottom: 6px; }
.prose code { font-family: ui-monospace, Menlo, Consolas, monospace; font-size: .9em; background: var(--alt); padding: 1px 5px; border-radius: 4px; }
.prose pre { background: var(--alt); border: 1px solid var(--line); border-radius: 8px; padding: 14px 16px; overflow-x: auto; margin: 0 0 18px; }
.prose pre code { background: none; padding: 0; font-size: 14px; line-height: 1.5; }
.meta-line { font-size: 14px; color: var(--muted); margin: 0 0 22px; }
.short { background: var(--accent-soft); border-left: 4px solid var(--accent); border-radius: 6px; padding: 14px 18px; margin: 0 0 8px; }
.short p { margin: 0; }
.short .label { font-size: 12px; letter-spacing: .1em; text-transform: uppercase; font-weight: 700; color: var(--accent); margin-bottom: 4px; }
.cta { margin: 36px 0 18px; }
.cta h2 { margin-top: 0; font-size: 22px; }
.cta p { margin: 0 0 4px; }
.note { font-size: 13px !important; color: var(--muted); margin: 8px 0 0; }
.q-list { display: grid; gap: 14px; margin-top: 24px; }
.q-list .when { color: var(--muted); font-weight: 400; margin-left: 8px; font-size: 13px; }

/* Header: short labels on phones, so the Answers link fits next to the button */
.site-header nav a { white-space: nowrap; }
.site-header nav .lbl-short { display: none; }
@media (max-width: 560px) {
  .site-header nav { gap: 12px; }
  .site-header nav a.q-link { display: inline; }
  .site-header nav .lbl-long { display: none; }
  .site-header nav .lbl-short { display: inline; }
}
@media (max-width: 340px) {
  .brand { font-size: 20px; }
  .brand-mark { width: 31px; height: 28px; margin-right: 7px; }
  .site-header nav { gap: 10px; }
}

/* Answers: search and tags */
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.qsearch { display: flex; gap: 8px; margin: 18px 0 6px; max-width: 560px; }
.qsearch input { flex: 1; min-width: 0; }
.qsearch .btn { margin-top: 0; }
.tags-label { font-size: 12px; letter-spacing: .1em; text-transform: uppercase; font-weight: 700; color: var(--muted); margin: 18px 0 8px; }
.tags { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 20px; }
.tag { display: inline-block; font-size: 13px; line-height: 1.4; padding: 3px 11px; border: 1px solid var(--line); border-radius: 999px; background: var(--surface); color: var(--ink); text-decoration: none; }
.tag:hover { border-color: var(--accent); color: var(--accent); }
.tag span { color: var(--muted); margin-left: 4px; }
.prose .meta-line { margin-bottom: 10px; }
.q-list .link-card[hidden] { display: none; }
#answers .qsearch { margin: 14px 0 22px; }

.more-tags { margin: 0 0 20px; }
.more-tags summary { cursor: pointer; color: var(--accent); font-size: 14px; margin: 0 0 10px; }
