/* Guide pages · loaded after assets/pop.css · same tokens, long-form reading layout */

.container { width: min(100% - 2 * var(--gutter), 1160px); margin-inline: auto; }
.ai-accent { color: var(--wordmark-accent); }
.no-print { }

/* hero */
.page-hero .eyebrow { font-family: var(--mono); font-size: .75rem; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); display: flex; align-items: center; gap: .8rem; }
.page-hero .eyebrow::before { content: ""; width: 2rem; height: 1px; background: var(--accent); }
.page-hero h1 { font-size: clamp(2.8rem, 7vw, 6.5rem); line-height: .92; text-wrap: balance; max-width: 18ch; margin-top: 1rem; }
.page-hero .lead { margin-top: 1.6rem; max-width: 60ch; font-size: clamp(1.15rem, 1.5vw, 1.35rem); line-height: 1.5; }
.guide-meta { margin-top: 1.4rem; font-family: var(--mono); font-size: .72rem; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); display: flex; flex-wrap: wrap; gap: .4rem .8rem; }
.guide-meta .sep { color: var(--border-strong); }
.page-hero .print-button { margin-top: 1.2rem; }
.dl-bar, .hero-actions { display: flex; flex-wrap: wrap; gap: .8rem; margin-top: 1.6rem; }
.btn-secondary { border-color: var(--border-strong); color: var(--fg); background: transparent; }
.btn-secondary:hover { border-color: var(--fg); background: var(--surface-2); color: var(--fg); }

/* layout */
.guide-main .section { padding: clamp(3rem, 6vw, 5rem) 0; border-bottom: 0; }
.guide-layout { display: grid; gap: 2.5rem; }
.guide-layout > * { min-width: 0; }
.guide-toc { align-self: start; border: 1px solid var(--border); background: var(--surface); padding: 1.2rem 1.3rem; }
.guide-toc h2 { font-family: var(--mono); font-weight: 400; font-size: .72rem; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); margin-bottom: .8rem; }
.guide-toc ol { margin: 0; padding: 0; list-style: none; counter-reset: toc; display: grid; gap: .1rem; }
.guide-toc li { counter-increment: toc; }
.guide-toc a { display: block; padding: .45rem 0 .45rem 2.4rem; text-indent: -2.4rem; text-decoration: none; color: var(--fg); border-bottom: 1px solid var(--border); font-size: .98rem; line-height: 1.4; }
.guide-toc a::before { content: counter(toc, decimal-leading-zero); display: inline-block; width: 2.4rem; text-indent: 0; font-family: var(--mono); font-size: .7rem; letter-spacing: .1em; color: var(--accent); }
.guide-toc a:hover { color: var(--fg); text-decoration: underline; text-decoration-color: var(--accent); text-decoration-thickness: 2px; text-underline-offset: .18em; }
.guide-toc li:last-child a { border-bottom: 0; }
@media (min-width: 960px) {
  .guide-layout { grid-template-columns: 260px 1fr; gap: clamp(2.5rem, 5vw, 4.5rem); align-items: start; }
  .guide-toc { position: sticky; top: calc(var(--header-h) + 1.5rem); }
}

/* body */
.guide-body { max-width: 72ch; }
.guide-body > section { padding: clamp(1.8rem, 3vw, 2.6rem) 0; border-bottom: 1px solid var(--border); scroll-margin-top: calc(var(--header-h) + 1rem); }
.guide-body > section:first-child { padding-top: 0; }
.guide-body > section:last-child { border-bottom: 0; }
.guide-body h2 { font-size: clamp(2rem, 3.6vw, 3rem); line-height: .95; margin-bottom: 1rem; text-wrap: balance; }
.guide-body h3 { font-size: clamp(1.35rem, 2vw, 1.7rem); line-height: 1.05; margin: 1.6rem 0 .5rem; }
.guide-body p { margin: 0 0 1rem; line-height: 1.65; }
.guide-body p:last-child { margin-bottom: 0; }
.guide-body a { color: var(--fg); text-decoration: underline; text-decoration-color: var(--accent); text-underline-offset: .18em; }
.guide-body a:hover { text-decoration-thickness: 2px; }
.guide-body ul, .guide-body ol { margin: 0 0 1rem; padding-left: 1.3rem; display: grid; gap: .45rem; }
.guide-body ul { list-style: none; padding-left: 1.1rem; }
.guide-body ul > li { position: relative; }
.guide-body ul > li::before { content: ""; position: absolute; left: -1.1rem; top: .7em; width: 6px; height: 6px; background: var(--accent); transform: rotate(45deg); }
.guide-body ol { list-style: decimal; }
.guide-body li { line-height: 1.55; }
.guide-body strong { color: var(--fg); }
.guide-body code { font-family: var(--mono); font-size: .9em; background: var(--surface); border: 1px solid var(--border); padding: .1em .4em; border-radius: 4px; }
.guide-body .intro { font-size: 1.2rem; color: var(--fg); }

/* callouts and checklists */
.callout, .checklist-box { position: relative; background: var(--ink); border: 1px solid var(--border); padding: 1.3rem 1.4rem 1.3rem 1.6rem; margin: 1.4rem 0; }
.callout::before, .checklist-box::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 4px; background: var(--accent); }
.callout .label, .checklist-box .label { display: block; font-family: var(--mono); font-size: .7rem; letter-spacing: .14em; text-transform: uppercase; color: var(--accent); margin-bottom: .6rem; }
.callout p:last-child { margin-bottom: 0; }
.checklist { list-style: none; margin: 0; padding: 0; display: grid; gap: .3rem; }
.guide-body .checklist > li::before { display: none; }
.checklist label { display: grid; grid-template-columns: 1.4rem 1fr; gap: .7rem; align-items: start; padding: .55rem 0; border-bottom: 1px solid var(--border); cursor: pointer; }
.checklist li:last-child label { border-bottom: 0; }
.checklist input { width: 1.1rem; height: 1.1rem; margin-top: .25rem; accent-color: var(--accent); }
.checklist input:checked + span { color: var(--muted); text-decoration: line-through; text-decoration-color: var(--accent); }
.checklist-tools { display: flex; flex-wrap: wrap; align-items: center; gap: 1rem; margin-top: 1rem; }
.checklist-status { font-family: var(--mono); font-size: .72rem; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
.reset-checklist { background: none; border: 0; padding: .3rem 0; color: var(--fg); font: 500 .95rem var(--body); text-decoration: underline; text-underline-offset: .18em; cursor: pointer; }
.reset-checklist:hover { text-decoration-color: var(--accent); text-decoration-thickness: 2px; }

.framework-grid { display: grid; gap: .8rem; margin: 1.4rem 0; }
.framework-item { border: 1px solid var(--border); background: var(--surface); padding: 1.1rem 1.2rem; }
.framework-item h3 { margin: 0 0 .4rem; font-size: 1.4rem; }
.framework-item p { margin: 0; color: var(--muted); font-size: 1rem; }
@media (min-width: 700px) { .framework-grid { grid-template-columns: repeat(3, 1fr); } }

/* prompt pack */
.prompt-pack { max-width: none; }
.prompt-tools { display: grid; gap: .8rem; padding: 1.2rem; border: 1px solid var(--border); background: var(--surface); margin-bottom: 2rem; }
.prompt-tools label { display: grid; gap: .35rem; font-family: var(--mono); font-size: .7rem; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }
.prompt-tools input, .prompt-tools select { width: 100%; background: var(--ink); color: var(--fg); border: 1px solid var(--border-strong); border-radius: 6px; padding: .7rem .9rem; font: 400 1rem var(--body); min-height: 2.8rem; }
.prompt-tools input:hover, .prompt-tools select:hover { border-color: var(--fg); }
.prompt-tools input:focus, .prompt-tools select:focus { outline: 2px solid var(--accent); outline-offset: 0; border-color: var(--accent); }
.result-count { font-family: var(--mono); font-size: .72rem; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); align-self: end; }
@media (min-width: 700px) { .prompt-tools { grid-template-columns: 1fr 220px auto; align-items: end; } }
.howto { max-width: 72ch; }
.not-use-list { max-width: 72ch; }
.section-block { padding: clamp(2rem, 3.5vw, 3rem) 0; border-bottom: 1px solid var(--border); scroll-margin-top: calc(var(--header-h) + 1rem); }
.guide-body .section-head { display: block; margin-bottom: 1.2rem; }
.guide-body .section-head h2 { margin-bottom: .4rem; }
.section-blurb { color: var(--muted); max-width: 70ch; }
.prompt { position: relative; border: 1px solid var(--border); background: var(--surface); padding: 1.3rem 1.4rem; margin: 1rem 0; display: grid; gap: .8rem; }
.prompt-head { display: flex; align-items: baseline; gap: .9rem; }
.prompt-head h3 { margin: 0; font-size: 1.5rem; }
.prompt-num { font-family: var(--mono); font-size: .72rem; letter-spacing: .14em; color: var(--accent); }
.prompt-body { margin: 0; white-space: pre-wrap; font: .95rem/1.55 var(--mono); color: var(--fg); background: var(--ink); border: 1px solid var(--border); padding: 1rem 1.1rem; }
.copy-prompt { justify-self: start; min-height: 2.6rem; padding: .5rem 1.1rem; font-size: .95rem; border: 1px solid var(--border-strong); border-radius: 999px; background: transparent; color: var(--fg); font-weight: 600; cursor: pointer; }
.copy-prompt:hover { border-color: var(--fg); background: var(--surface-2); color: var(--fg); }
.copy-status { margin: 0; font-size: .9rem; color: var(--go); min-height: 1.2em; }
.copy-status:empty { display: none; }
.prompt-does, .prompt-tip { margin: 0; font-size: 1rem; color: var(--muted); }
.prompt-does strong, .prompt-tip strong { color: var(--fg); }

/* closing band */
.cta-band { background: var(--ink); border: 1px solid var(--border); padding: clamp(1.6rem, 3.5vw, 2.6rem); display: grid; gap: 1.4rem; margin: 1rem 0 1.6rem; }
.cta-band h2 { margin-bottom: .6rem; }
.cta-band p { color: var(--muted); max-width: 56ch; }
.cta-band .hero-actions { margin-top: 0; align-self: center; }
@media (min-width: 900px) { .cta-band { grid-template-columns: 1fr auto; align-items: center; } }

@media print {
  .no-print, .rail, .guide-toc, .header, .footer { display: none !important; }
  body { background: #fff; color: #111; }
  .callout, .checklist-box, .prompt, .prompt-body, .cta-band, .framework-item { background: #fff; border-color: #999; color: #111; }
  .guide-body a { color: #111; }
  .prompt-body { white-space: pre-wrap; }
}

@media (max-width: 600px) {
  .guide-meta { flex-direction: column; gap: .35rem; }
  .guide-meta .sep { display: none; }
  .page-hero h1 { font-size: clamp(2.4rem, 11vw, 3.2rem); }
  .prompt-body { font-size: .88rem; }
}

/* tables, code, guide navigation, cheat sheet */
.table-wrap { overflow-x: auto; margin: 1rem 0 1.4rem; border: 1px solid var(--border); background: var(--surface); }
.guide-body table { width: 100%; border-collapse: collapse; font-size: .98rem; line-height: 1.45; }
.guide-body th { text-align: left; font-family: var(--mono); font-weight: 400; font-size: .68rem; letter-spacing: .14em; text-transform: uppercase; color: var(--accent); padding: .7rem .8rem; border-bottom: 1px solid var(--border-strong); white-space: nowrap; }
.guide-body td { padding: .65rem .8rem; border-bottom: 1px solid var(--border); vertical-align: top; min-width: 9rem; }
.guide-body tr:last-child td { border-bottom: 0; }
.guide-body td strong { color: var(--fg); }
.guide-body td code { white-space: nowrap; }
.guide-body pre.code { margin: .8rem 0 1.2rem; white-space: pre-wrap; font: .92rem/1.55 var(--mono); color: var(--fg); background: var(--ink); border: 1px solid var(--border); border-left: 4px solid var(--accent); padding: 1rem 1.1rem; }
.guide-body li pre.code { margin: .6rem 0 .4rem; }
.guide-body ol ul, .guide-body ul ul { margin: .4rem 0 0; }
.guide-nav { display: flex; flex-wrap: wrap; justify-content: space-between; gap: .6rem 1.5rem; font-family: var(--mono); font-size: .75rem; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); margin-bottom: 1.4rem; }
.guide-nav a { color: var(--fg); }
.disclaimer { color: var(--muted); font-size: .95rem; }
.cheat .guide-body { max-width: none; }
.cheat .guide-body h2 { font-size: clamp(1.7rem, 2.6vw, 2.2rem); }
@media (min-width: 1150px) {
  .cheat .guide-body { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 0 2.5rem; align-items: start; min-width: 0; }
  .cheat .guide-body > section { min-width: 0; }
  .cheat .guide-body > section { border-bottom: 1px solid var(--border); }
  .cheat .guide-body > section#next { grid-column: 1 / -1; }
  .cheat .guide-body > section.wide { grid-column: 1 / -1; }
}

/* copy button on generated code blocks */
.codeblock { position: relative; margin: .8rem 0 1.2rem; }
.codeblock pre.code { margin: 0; padding-right: 5.6rem; }
.codeblock .copy-code { position: absolute; top: .55rem; right: .55rem; min-height: 2rem; padding: .25rem .7rem; font: 600 .8rem var(--body); color: var(--fg); background: var(--surface); border: 1px solid var(--border-strong); border-radius: 999px; cursor: pointer; }
.codeblock .copy-code:hover { border-color: var(--fg); background: var(--surface-2); color: var(--fg); }
.codeblock .copy-status { position: absolute; right: .6rem; bottom: .5rem; font-family: var(--mono); font-size: .68rem; letter-spacing: .1em; text-transform: uppercase; color: var(--go); }
.codeblock .copy-status:empty { display: none; }
.guide-body li .codeblock { margin: .6rem 0 .4rem; }
