/* Parent help pages (/help/). Tokens come from landing.css. */
.help { max-width: 760px; margin: 0 auto; padding-inline: 24px; }
/* The column, not the sections, carries the gutter — except for the card
   sections (.picture, .check, .download), whose padding is their own. */
.help section:not(.picture):not(.check):not(.download):not(.sheet):not(.ws-pitch), .help header { padding-inline: 0; }

.help-hero { padding-block: 28px 8px; }
.help-hero h1 { font-size: clamp(1.9rem, 4.5vw, 2.7rem); line-height: 1.12; letter-spacing: -0.02em; margin: 0 0 12px; }
.guide-title { font-size: 1.15rem; color: var(--muted); margin: 0; }

.prose { padding-block: 16px; }
.prose p { font-size: 1.08rem; margin: 0 0 16px; max-width: 64ch; }
.prose h2, .patterns h2, .faq h2, .check h2 { font-size: 1.6rem; letter-spacing: -0.02em; margin: 24px 0 14px; }
.picture { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px 24px; }
.picture h2 { margin-top: 0; }
.picture p { margin-bottom: 0; }

/* patterns */
.patterns { padding-block: 24px; }
.pattern-list { list-style: none; counter-reset: pat; margin: 0; padding: 0; display: grid; gap: 14px; }
.pattern { counter-increment: pat; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px 22px 10px; scroll-margin-top: 16px; }
.pattern:target { border-color: var(--warm); box-shadow: 0 0 0 3px color-mix(in srgb, var(--warm) 22%, transparent); }
.pattern h3 { margin: 0 0 6px; font-size: 1.2rem; display: flex; gap: 10px; align-items: baseline; }
.pattern h3::before { content: counter(pat); font-size: .85rem; font-weight: 800; color: var(--warm-ink); background: var(--warm); border-radius: 999px; min-width: 1.6em; height: 1.6em; display: inline-grid; place-items: center; }
.pattern h3 a { color: inherit; text-decoration: none; }
.pattern h3 a:hover { text-decoration: underline; }
.pattern-story { margin: 0 0 10px; font-size: 1.05rem; }
.pattern p { margin: 0 0 10px; color: var(--ink); }
.pattern p strong { font-weight: 700; }
.pattern-example { display: flex; flex-wrap: wrap; gap: 8px 16px; align-items: baseline; font-variant-numeric: tabular-nums; margin-bottom: 12px !important; }
.ex-problem { font-size: 1.35rem; font-weight: 800; letter-spacing: .02em; }
.ex-wrong { color: var(--muted); }
.ex-wrong b { color: #c0392b; font-weight: 800; }
.ex-right { color: var(--muted); }
@media (prefers-color-scheme: dark) { .ex-wrong b { color: #ff7b6b; } }

/* the check, coming-soon styling */
.check { margin-block: 28px; display: grid; grid-template-columns: 1fr auto; gap: 28px; align-items: start; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px 28px; }
.check h2 { margin-top: 0; }
.check p { margin: 0 0 14px; max-width: 48ch; }
.check-soon { border-style: dashed; }
.check-soon .check-copy > p:first-of-type { color: var(--muted); }
.soon-note { margin-bottom: 16px !important; }
.phone { width: 150px; aspect-ratio: 393 / 852; border-radius: 26px; background: var(--bg); border: 3px solid var(--line); display: grid; place-items: center; opacity: .75; position: relative; overflow: hidden; }
.phone::after { content: ""; position: absolute; inset: 0; background: repeating-linear-gradient(135deg, transparent 0 14px, color-mix(in srgb, var(--line) 55%, transparent) 14px 16px); }
.phone-screen { display: grid; gap: 6px; justify-items: center; }
.phone-problem { font-size: 1.3rem; font-weight: 800; font-variant-numeric: tabular-nums; }
.phone-hint { font-size: .72rem; text-transform: uppercase; letter-spacing: .12em; color: var(--muted); }

/* the short page */
.brief { padding-block: 8px 4px; }
.brief ul { margin: 0; padding-left: 1.1em; }
.brief li { font-size: 1.1rem; margin: 0 0 10px; max-width: 60ch; }
.pattern-rows { list-style: none; margin: 0; padding: 0; counter-reset: pat; }
.pattern-rows li { counter-increment: pat; display: grid; grid-template-columns: 1.6em 1fr; gap: 2px 12px; padding: 12px 0; border-top: 1px solid var(--line); scroll-margin-top: 16px; }
.pattern-rows li:last-child { border-bottom: 1px solid var(--line); }
.pattern-rows li::before { content: counter(pat); grid-row: 1 / span 3; font-size: .85rem; font-weight: 800; color: var(--warm-ink); background: var(--warm); border-radius: 999px; width: 1.6em; height: 1.6em; display: inline-grid; place-items: center; margin-top: 2px; }
.pattern-rows li:target { background: color-mix(in srgb, var(--warm) 10%, transparent); }
.row-name { font-weight: 700; font-size: 1.1rem; }
.row-ex { display: flex; flex-wrap: wrap; gap: 6px 14px; align-items: baseline; font-variant-numeric: tabular-nums; }
.row-ex .ex-problem { font-size: 1.15rem; }
.row-story { color: var(--muted); }
.more { margin: 14px 0 0; }
.more a { color: var(--accent); text-decoration: none; font-weight: 600; }
.more a:hover { text-decoration: underline; }

/* the live check */
.check-live { border-style: solid; }
.check-how { color: var(--muted); }
.phone-live { width: 360px; max-width: 100%; opacity: 1; border-color: var(--line); background: #0d0a07; }
.phone-live::after { display: none; }
.phone-live iframe { width: 100%; height: 100%; border: 0; display: block; }
@media (max-width: 860px) { .check-live { grid-template-columns: 1fr; } .phone-live { display: none; } }

/* the result page */
.result-pattern { margin: 12px 0 18px; }
.result-pattern h3::before { display: none; }
.code-form { display: flex; gap: 8px; }
.code-form input { flex: 1; font: inherit; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); color: var(--ink); }
.code-line { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.code-line code { background: var(--surface); border: 1px solid var(--line); border-radius: 8px; padding: 6px 10px; font-size: .95rem; word-break: break-all; }

/* school methods */
.methods { margin: 0 0 16px; display: grid; grid-template-columns: max-content 1fr; gap: 8px 18px; }
.methods dt { font-weight: 700; }
.methods dd { margin: 0; color: var(--muted); }

/* faq */
.faq { padding-block: 16px 24px; }
.faq details { border-top: 1px solid var(--line); padding: 12px 0; }
.faq details:last-of-type { border-bottom: 1px solid var(--line); }
.faq summary { cursor: pointer; font-weight: 700; font-size: 1.05rem; list-style: none; display: flex; justify-content: space-between; gap: 12px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; color: var(--muted); font-weight: 400; }
.faq details[open] summary::after { content: "–"; }
.faq details p { margin: 10px 0 0; color: var(--ink); max-width: 64ch; }

.guide-download { margin-block: 32px 48px; }

/* index */
.pkg-list { display: grid; gap: 12px; padding-block: 20px; }
.pkg { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px 20px; }
.pkg-soon { opacity: .72; border-style: dashed; }
/* A published guide's card is the link: the whole panel lifts on hover. */
a.pkg-link { display: block; color: inherit; text-decoration: none; transition: border-color .12s ease, background .12s ease; }
a.pkg-link:hover, a.pkg-link:focus-visible { border-color: var(--accent); background: color-mix(in srgb, var(--accent) 7%, var(--surface)); }
a.pkg-link:hover h2 { color: var(--accent); }
.pkg-query { margin: 0 0 4px; color: var(--muted); font-style: italic; }
.pkg h2 { margin: 0 0 4px; font-size: 1.25rem; }
.pkg h2 a { color: inherit; text-decoration: none; }
.pkg h2 a:hover { text-decoration: underline; }
.pkg-short { margin: 0 0 8px; }
.pkg-meta { margin: 0; display: flex; gap: 12px; align-items: center; font-size: .9rem; color: var(--muted); }
.tag { font-size: .78rem; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; padding: 3px 9px; border-radius: 999px; background: var(--line); color: var(--muted); }
.tag-prep { background: color-mix(in srgb, var(--accent) 16%, transparent); color: var(--accent); }
.help-note { padding-block: 8px 40px; color: var(--muted); }
/* Links in running text (notes, guide prose): the aside style from the home page. */
.help p a:not([class]) { color: var(--accent); font-weight: 600; text-decoration: none; }
.help p a:not([class]):hover { text-decoration: underline; }

@media (max-width: 640px) {
  .check { grid-template-columns: 1fr; }
  .phone { display: none; }
  .methods { grid-template-columns: 1fr; gap: 2px 0; }
  .methods dd { margin-bottom: 10px; }
}

/* ---- /skills/: the tree ---- */
.grade-list { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 14px; padding-block: 8px 24px; }
.grade-card { display: block; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px 20px; color: inherit; text-decoration: none; }
.grade-card:hover { border-color: var(--accent); }
.grade-card h2 { margin: 0 0 4px; font-size: 1.2rem; }
.grade-card p { margin: 0; color: var(--muted); }
.grade-tabs { display: flex; flex-wrap: wrap; gap: 8px; padding-block: 4px 20px; }
.tab { padding: 6px 12px; border: 1px solid var(--line); border-radius: 999px; font-size: .9rem; color: var(--ink); text-decoration: none; }
.tab:hover { border-color: var(--accent); }
.tab-on { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
.skill-tree { padding-block: 4px 24px; }
.skills { list-style: none; margin: 0; padding: 0; }
.skills .skills { margin: 8px 0 0 14px; padding-left: 16px; border-left: 2px solid var(--line); }
.skill { padding: 10px 0; }
.skill-head { display: flex; flex-wrap: wrap; gap: 6px 12px; align-items: baseline; }
.skill-name { font-weight: 700; font-size: 1.05rem; }
.skill-name a { color: var(--accent); text-decoration: none; }
.skill-name a:hover { text-decoration: underline; }
.skill-std { font-size: .82rem; color: var(--muted); }
.skill-std { font-variant-numeric: tabular-nums; }
.skill-mistakes { margin: 4px 0 0; font-size: .95rem; color: var(--muted); }
.skill-mistakes span { font-weight: 600; color: var(--warm); }
.eyebrow a { color: inherit; text-decoration: none; }
.eyebrow a:hover { color: var(--accent); }

/* The guide's closing card: the padding makes the heading wrap at 2rem; a notch smaller keeps it to one line. */
.guide-download h2 { font-size: 1.75rem; }

/* the result code's key */
.code-key { margin: 8px 0 0; color: var(--muted); font-size: .95rem; }
.code-key summary { cursor: pointer; font-weight: 600; color: var(--ink); }
.code-key code { font-size: .85rem; word-break: break-all; }
.code-key p { margin: 8px 0 0; }

/* ---- /worksheets/: the sheet and its key ---- */
.ws-actions { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; padding-block: 8px 20px; }
button.btn { border: 0; font: inherit; cursor: pointer; }
.btn-ghost { background: transparent; color: var(--accent); border: 2px solid var(--accent); }
.more-link { color: var(--accent); font-weight: 600; text-decoration: none; }
.more-link:hover { text-decoration: underline; }
.sheet { background: #fff; color: #111; border: 1px solid var(--line); border-radius: var(--radius); padding: 24px 28px; }
.sheet-head { display: flex; justify-content: space-between; gap: 20px; align-items: flex-start; border-bottom: 2px solid #111; padding-bottom: 12px; margin-bottom: 20px; }
.sheet-title { margin: 0 0 4px; font-size: 1.3rem; }
.sheet-instr { margin: 0; font-size: .95rem; color: #444; }
.sheet-fill { display: grid; gap: 10px; font-size: .9rem; white-space: nowrap; min-width: 190px; }
.sheet-fill span { display: flex; gap: 6px; align-items: baseline; }
.sheet-fill i { flex: 1; border-bottom: 1px solid #111; height: 1em; }
.probs { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(var(--cols, 4), 1fr); gap: 26px 16px; }
.col-mult .col-ans { height: 3.2em; }
.prob-eq, .prob-cmp { font-size: 1.35rem; font-weight: 700; font-variant-numeric: tabular-nums; white-space: nowrap; line-height: 1.6; }
.blank { display: inline-block; width: 2.4em; border-bottom: 2px solid #111; height: 1em; vertical-align: baseline; }
.blank-sm { width: 1.4em; }
.blank-lg { margin-left: 8px; }
.rem { font-weight: 400; font-size: .85em; margin-left: 6px; }
.prob-cmp { display: inline-flex; gap: 10px; align-items: center; }
.cmp-circle { display: inline-block; width: 1.3em; height: 1.3em; border: 2px solid #111; border-radius: 50%; }
.prob-sentence { font-size: 1rem; font-weight: 600; line-height: 1.8; white-space: nowrap; }
.blank-lg { width: 2.8em; }
.prob { display: flex; gap: 8px; align-items: flex-start; }
.prob-n { font-size: .75rem; color: #666; min-width: 1.4em; padding-top: 4px; }
.col-op { display: grid; justify-items: end; font-size: 1.5rem; font-weight: 700; font-variant-numeric: tabular-nums; line-height: 1.25; min-width: 3.2em; }
.col-bot { border-bottom: 2px solid #111; }
.col-sign { float: left; margin-right: .5em; font-weight: 400; }
.col-ans { height: 1.6em; width: 100%; }
.sheet-foot { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-top: 24px; padding-top: 10px; border-top: 1px solid #bbb; font-size: .78rem; color: #666; }
.ws-pitch { margin-block: 28px 8px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px 24px; }
.ws-pitch h2 { margin: 0 0 8px; font-size: 1.4rem; }
.ws-pitch p { margin: 0; max-width: 64ch; }
@media (max-width: 640px) { .probs { grid-template-columns: repeat(2, 1fr); } .prob-sentence, .prob-line .prob-eq { font-size: 1rem; } .probs[style="--cols: 2"] { grid-template-columns: 1fr; } .sheet { padding: 18px 16px; } .sheet-head { flex-direction: column; } .sheet-fill { min-width: 0; width: 100%; } }

.key-table { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; }
.key-table th { text-align: left; font-size: .8rem; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); padding: 6px 8px; border-bottom: 2px solid var(--line); }
.key-table td { padding: 8px; border-bottom: 1px solid var(--line); vertical-align: top; }
.key-n { color: var(--muted); width: 2em; }
.key-prob { white-space: nowrap; font-weight: 600; }
.key-ans { font-weight: 800; white-space: nowrap; }
.kw { display: block; }
.kw b { color: #c0392b; margin-right: 4px; }
.kw a { color: var(--accent); text-decoration: none; font-weight: 600; }
.kw a:hover { text-decoration: underline; }
.kw-none { color: var(--muted); font-style: italic; }
@media (prefers-color-scheme: dark) { .kw b { color: #ff7b6b; } }
.pat-count { font-size: .85rem; font-weight: 600; color: var(--muted); margin-left: 8px; }
.ws-key .pattern h3::before { display: none; }
.ws-key .pattern { margin-bottom: 12px; }

@media print {
  html, body { background: #fff; color: #111; }
  .site-nav, .site-footer, .ws-screen, .download { display: none !important; }
  .help { max-width: none; padding: 0; }
  .help-hero { padding-top: 0; }
  .sheet { border: 0; border-radius: 0; padding: 0; }
  .probs { gap: 34px 20px; }
  .col-op { font-size: 17pt; }
  .col-ans { height: 2.2em; }
  .col-mult .col-ans { height: 2.4em; }
  .prob-eq, .prob-cmp { font-size: 16pt; }
  .prob-sentence { font-size: 11.5pt; }
  .probs { gap: 30px 20px; }
  .probs-line, .probs-compare { gap: 48px 20px; }
  .probs-sentence { gap: 40px 20px; }
  .key-table { font-size: 10pt; }
  .key-table td { padding: 4px 8px; }
  .key-table tr { break-inside: avoid; }
  .pattern { break-inside: avoid; }
  .kw a { color: inherit; text-decoration: none; }
  .pattern { border: 0; padding: 0; }
  a[href]::after { content: none; }
  @page { margin: 16mm; }
}

/* ---- /tile/: this week's tile ---- */
.tile-clip { padding-block: 8px 16px; }
.tile-clip .clip { max-width: 420px; }
.tile-facts ul { margin: 0 0 20px; padding-left: 1.1em; }
.tile-facts li { margin: 0 0 6px; }
.tile-queue p { color: var(--muted); }
.tile-queue a { color: var(--accent); font-weight: 600; text-decoration: none; }
.tile-queue a:hover { text-decoration: underline; }
.tile-card { max-width: 420px; }
.tile-band { padding-block: 8px 12px; }
.tile-band h2 { font-size: 1.3rem; margin: 12px 0 0; }
.tile-band .pkg-list { padding-block: 10px 8px; }
.tag-play { background: color-mix(in srgb, var(--accent) 16%, transparent); color: var(--accent); }
.tile-play .check-copy > p:first-of-type { color: var(--ink); }
.tile-done { font-weight: 600; color: var(--accent); }
