/* Poople Answers – styles */
:root {
  --bg: #fffaf3;
  --surface: #ffffff;
  --ink: #2b1a0e;
  --muted: #7a6656;
  --line: #eadfd2;
  --brand: #6b3f1d;
  --brand-2: #8a5528;
  --gold: #ffd166;
  --green: #2f9e44;
  --green-bg: #e6f6ea;
  --amber: #d98e04;
  --amber-bg: #fff3d6;
  --red: #c92a2a;
  --red-bg: #fdecec;
  --purple: #7048e8;
  --purple-bg: #efeafd;
  --radius: 12px;
  --shadow: 0 1px 2px rgba(43, 26, 14, .06), 0 4px 16px rgba(43, 26, 14, .06);
  --font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #17110c; --surface: #211812; --ink: #f4ebe2; --muted: #b8a595; --line: #3a2c21;
    --brand: #c98a4b; --brand-2: #e0a467; --green-bg: #173322; --amber-bg: #3a2c0c; --red-bg: #3b1616; --purple-bg: #241b3d;
  }
}
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body { margin: 0; font: 17px/1.6 var(--font); color: var(--ink); background: var(--bg); }
a { color: var(--brand); text-underline-offset: 2px; }
a:hover { color: var(--brand-2); }
img { max-width: 100%; height: auto; }
h1, h2, h3 { line-height: 1.25; margin: 1.6em 0 .5em; }
h1 { font-size: clamp(1.7rem, 4vw, 2.4rem); margin-top: .3em; letter-spacing: -.01em; }
h2 { font-size: 1.45rem; }
h3 { font-size: 1.15rem; }
p, ul, ol { margin: 0 0 1em; }
code { background: var(--line); padding: .1em .35em; border-radius: 4px; font-size: .9em; }
.wrap { max-width: 920px; margin: 0 auto; padding: 0 20px; }
.sr-only, .hp { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: -999px; top: 0; background: var(--brand); color: #fff; padding: 8px 14px; z-index: 10; }
.skip:focus { left: 8px; }
.muted { color: var(--muted); }
.small { font-size: .88rem; }
.center { text-align: center; }
:focus-visible { outline: 3px solid var(--gold); outline-offset: 2px; }

/* Header */
.site-header { background: var(--brand); color: #fff; position: sticky; top: 0; z-index: 5; }
@media (prefers-color-scheme: dark) { .site-header { background: #3a2415; } }
.site-header__inner { display: flex; align-items: center; justify-content: space-between; min-height: 62px; }
.logo { display: flex; align-items: center; gap: 10px; color: #fff; text-decoration: none; font-weight: 700; font-size: 1.15rem; }
.logo:hover { color: #fff; }
.logo b { color: var(--gold); }
.logo__tiles { display: flex; gap: 2px; }
.logo__tiles span { width: 20px; height: 24px; display: grid; place-items: center; background: var(--gold); color: #6b3f1d; border-radius: 4px; font-size: .8rem; font-weight: 900; }
.site-nav ul { display: flex; gap: 4px; list-style: none; margin: 0; padding: 0; }
.site-nav a { color: #fff; text-decoration: none; padding: 8px 12px; border-radius: 8px; font-size: .95rem; font-weight: 500; display: block; }
.site-nav a:hover, .site-nav a[aria-current="page"] { background: rgba(255, 255, 255, .15); color: #fff; }
.nav-toggle { display: none; background: none; border: 0; color: #fff; font-size: 1.6rem; cursor: pointer; padding: 4px 8px; }
@media (max-width: 760px) {
  .nav-toggle { display: block; }
  .site-nav { display: none; position: absolute; left: 0; right: 0; top: 62px; background: inherit; background: var(--brand); padding: 8px 20px 16px; }
  .site-nav.is-open { display: block; }
  .site-nav ul { flex-direction: column; }
}

/* Breadcrumbs */
.crumbs ol { list-style: none; display: flex; flex-wrap: wrap; gap: 6px; padding: 0; margin: 16px 0 0; font-size: .88rem; color: var(--muted); }
.crumbs li + li::before { content: "›"; margin-right: 6px; }
.crumbs a { color: var(--muted); }

/* Page head */
.page-head { margin: 24px 0 20px; }
.eyebrow { text-transform: uppercase; letter-spacing: .08em; font-size: .8rem; font-weight: 700; color: var(--brand); margin: 0; }
.lead { font-size: 1.12rem; color: var(--ink); }

/* Cards */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 20px 22px; margin: 22px 0; }
.card > h2:first-child { margin-top: 0; }

/* Tiles */
.tiles { display: inline-flex; gap: 4px; vertical-align: middle; }
.tile { width: 2.1em; height: 2.1em; display: grid; place-items: center; font-weight: 800; background: var(--surface); border: 2px solid var(--line); border-radius: 7px; text-transform: uppercase; font-size: 1rem; }
.tile--hl { background: var(--gold); border-color: #e6b84a; color: #3d2408; }
.tiles--sm .tile { width: 1.7em; height: 1.7em; font-size: .85rem; border-radius: 5px; }
.tiles--lg .tile { width: 2.6em; height: 2.6em; font-size: 1.35rem; }
.tiles--goal .tile { background: var(--brand); border-color: var(--brand); color: var(--gold); }

/* Facts */
.facts dl { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: 12px; margin: 0 0 18px; }
.facts dt { font-size: .78rem; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
.facts dd { margin: 0; font-weight: 700; font-size: 1.1rem; }
.facts__start { display: flex; align-items: center; justify-content: center; gap: 14px; flex-wrap: wrap; padding-top: 6px; }
.facts__arrow { font-size: 1.8rem; color: var(--muted); }

.badge { display: inline-block; padding: 2px 9px; border-radius: 999px; font-size: .78rem; font-weight: 700; white-space: nowrap; }
.badge--easy { background: var(--green-bg); color: var(--green); }
.badge--medium { background: var(--amber-bg); color: var(--amber); }
.badge--hard { background: var(--red-bg); color: var(--red); }
.badge--expert { background: var(--purple-bg); color: var(--purple); }

/* Hints & reveal */
details > summary { cursor: pointer; list-style: none; }
details > summary::-webkit-details-marker { display: none; }
.hint, .reveal, .faq-item { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); margin: 10px 0; }
.hint > summary, .faq-item > summary { padding: 14px 18px; font-weight: 600; display: flex; align-items: center; gap: 12px; }
.hint > summary::after, .faq-item > summary::after { content: "+"; margin-left: auto; font-size: 1.4rem; line-height: 1; color: var(--brand); }
.hint[open] > summary::after, .faq-item[open] > summary::after { content: "−"; }
.hint__n { width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; background: var(--brand); color: #fff; font-size: .85rem; flex: none; }
.hint__body, .faq-item > p { padding: 0 18px 14px; margin: 0; }
.faq-item summary h3 { margin: 0; font-size: 1.02rem; }
.reveal > summary { padding: 16px; text-align: center; font-weight: 700; background: var(--brand); color: #fff; border-radius: var(--radius); }
.reveal[open] > summary { border-radius: var(--radius) var(--radius) 0 0; }
.reveal--soft > summary { background: transparent; color: var(--brand); border: 0; }
.reveal__body { padding: 18px 20px 8px; }
.reveal--soft .chips { padding: 0 16px 16px; }
.answer__inline { font-weight: 800; font-size: 1.15rem; letter-spacing: .03em; }

/* Ladder */
.ladder { list-style: none; padding: 0; margin: 14px 0 20px; display: grid; gap: 6px; }
.ladder__row { display: flex; align-items: center; gap: 14px; }
.ladder__n { width: 58px; font-size: .8rem; color: var(--muted); text-align: right; font-weight: 600; }
.ladder__row.start .tile { border-color: var(--brand); }
.ladder__row.goal .tile { background: var(--brand); border-color: var(--brand); color: var(--gold); }
.explain li { margin-bottom: .3em; }
.alt-paths { padding-left: 1.2em; font-family: ui-monospace, Consolas, monospace; font-size: .95rem; }
.alt-paths li { margin-bottom: 4px; }

/* Chips */
.chips { list-style: none; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.chip { border: 1px solid var(--line); border-radius: 999px; padding: 4px 12px; background: var(--surface); font-size: .9rem; }
.chip a { font-weight: 700; text-decoration: none; }
.chip span { color: var(--muted); font-size: .8rem; }
.chip--best { border-color: var(--green); background: var(--green-bg); }
.chip--best a { color: var(--green); }

/* Answer lists */
.answer-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 6px; }
.answer-list a { display: grid; grid-template-columns: 60px 1fr auto auto; align-items: center; gap: 12px; padding: 10px 14px; background: var(--surface); border: 1px solid var(--line); border-radius: 10px; text-decoration: none; color: var(--ink); }
.answer-list a:hover { border-color: var(--brand); }
.answer-list__n { color: var(--muted); font-weight: 600; }
.answer-list__w { font-weight: 800; letter-spacing: .08em; }
.answer-list__d { color: var(--muted); font-size: .9rem; }
@media (max-width: 520px) { .answer-list a { grid-template-columns: 50px 1fr auto; } .answer-list__d { display: none; } }
.month h2 small { font-weight: 400; color: var(--muted); font-size: .9rem; }

/* Pager */
.pager { display: grid; grid-template-columns: 1fr auto 1fr; gap: 10px; margin: 30px 0; align-items: center; }
.pager a { text-decoration: none; font-weight: 600; }
.pager small { color: var(--muted); font-weight: 400; }
.pager__next { text-align: right; }
.pager__all { padding: 8px 14px; border: 1px solid var(--line); border-radius: 999px; background: var(--surface); }

/* Buttons & forms */
.btn { display: inline-block; background: var(--brand); color: #fff; border: 0; border-radius: 10px; padding: 10px 18px; font: inherit; font-weight: 700; cursor: pointer; text-decoration: none; margin: 4px 4px 4px 0; }
.btn:hover { background: var(--brand-2); color: #fff; }
.btn--lg { padding: 13px 24px; font-size: 1.05rem; }
.btn--ghost { background: transparent; color: var(--brand); border: 2px solid var(--brand); }
.btn--ghost:hover { background: var(--brand); color: #fff; }
input, select, textarea { font: inherit; color: var(--ink); background: var(--surface); border: 2px solid var(--line); border-radius: 10px; padding: 10px 12px; width: 100%; }
input:focus, select:focus, textarea:focus { border-color: var(--brand); outline: none; }
[aria-invalid="true"] { border-color: var(--red); }
label { display: block; font-weight: 600; margin-bottom: 6px; font-size: .95rem; }
.field { margin-bottom: 16px; }
.field-row { display: grid; grid-template-columns: 2fr 1fr; gap: 14px; }
.field__error { color: var(--red); font-size: .88rem; margin: 6px 0 0; }
.field--check { display: grid; grid-template-columns: auto 1fr; gap: 10px; align-items: start; }
.field--check input { width: 20px; height: 20px; margin-top: 3px; }
.field--check label { font-weight: 400; }
.field--check .field__error { grid-column: 1 / -1; }
.solver-mini { display: flex; gap: 8px; max-width: 380px; }
.solver-mini input { text-transform: uppercase; letter-spacing: .2em; font-weight: 800; }
.solver__form { display: grid; grid-template-columns: 2fr 1fr auto; gap: 12px; align-items: end; }
.solver__form .field { margin: 0; }
.solver__form input { text-transform: uppercase; letter-spacing: .25em; font-weight: 800; font-size: 1.3rem; }
.solver__form .btn { margin: 0; height: 52px; }
@media (max-width: 620px) { .solver__form, .field-row { grid-template-columns: 1fr; } }
.result { margin-top: 18px; }
.result__summary { font-size: 1.1rem; background: var(--green-bg); border-radius: 10px; padding: 10px 14px; }
#checker-input { text-transform: uppercase; font-family: ui-monospace, Consolas, monospace; margin-bottom: 10px; }

.alert { border-radius: 10px; padding: 12px 16px; background: var(--amber-bg); margin: 14px 0; }
.alert p:last-child, .alert ul:last-child { margin-bottom: 0; }
.alert--error { background: var(--red-bg); color: var(--red); }
.alert--ok { background: var(--green-bg); color: var(--green); }

/* Stats */
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: 12px; text-align: center; }
.stats strong { display: block; font-size: 1.8rem; color: var(--brand); }
.stats span { color: var(--muted); font-size: .88rem; }
.filter { margin: 20px 0; max-width: 420px; }

/* Layout bits */
.two-col { display: grid; grid-template-columns: 3fr 2fr; gap: 28px; align-items: start; }
.two-col > .card { margin-top: 0; }
.two-col aside h2 { margin-top: 0; }
@media (max-width: 760px) { .two-col { grid-template-columns: 1fr; } }
.toc ul { list-style: none; display: flex; flex-wrap: wrap; gap: 8px 18px; padding: 0; margin: 0; }
.legal h2 { font-size: 1.25rem; }

/* Footer */
.site-footer { margin-top: 60px; background: #2b1a0e; color: #e8dccf; padding: 36px 0 20px; font-size: .92rem; }
.site-footer a { color: #ffd9a0; }
.site-footer ul { list-style: none; padding: 0; margin: 0; }
.site-footer li { margin-bottom: 6px; }
.site-footer__grid { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 28px; }
.site-footer__brand { font-weight: 800; font-size: 1.2rem; color: #fff; margin-bottom: 8px; }
.site-footer__brand b { color: var(--gold); }
.site-footer__h { font-weight: 700; color: #fff; margin-bottom: 10px; }
.site-footer__bottom { border-top: 1px solid rgba(255, 255, 255, .12); margin-top: 24px; padding-top: 16px; color: #b8a595; }
@media (max-width: 760px) { .site-footer__grid { grid-template-columns: 1fr; } }
