/* Resources page for book readers. Builds on reader-kit.css (tokens, header, buttons, footer). */
.res-main { max-width: 980px; }
.res-intro { max-width: 760px; }
.eyebrow, .section-label { margin: 0 0 14px; font-size: .78rem; font-weight: 750; letter-spacing: .12em; text-transform: uppercase; color: var(--red); }
.res-meta { font-size: .85rem; color: var(--ink-soft); margin-top: 22px; }

.chapter-nav { position: sticky; top: 0; z-index: 5; display: flex; flex-wrap: wrap; gap: 8px; margin: 40px -12px 0; padding: 12px; background: #f0eee7f2; backdrop-filter: blur(6px); border-bottom: 1px solid var(--line); }
.chapter-nav a { min-height: 40px; min-width: 40px; display: inline-flex; align-items: center; justify-content: center; padding: 0 12px; border: 1px solid #9baba5; font-size: .86rem; font-weight: 650; text-decoration: none; background: #fbf9f3; }
.chapter-nav a:hover { background: var(--steel); border-color: var(--steel); color: #f6f4ed; }
html { scroll-padding-top: 140px; }

.res-section { padding: 64px 0 8px; border-top: 1px solid var(--line); margin-top: 56px; }
.chapter-nav + .res-section { border-top: 0; margin-top: 0; }
.res-section > h2 { max-width: 24ch; }
.res-section > p { color: var(--ink-soft); }
.res-section h3 { margin: 44px 0 0; font-size: .8rem; font-weight: 750; letter-spacing: .12em; text-transform: uppercase; color: var(--ink-soft); }

/* Your Jump box: same structure as in the book */
.jump { margin: 32px 0 0; padding: clamp(22px, 4vw, 34px); color: #f6f4ed; background: linear-gradient(120deg, #173441, #244956); border-left: 6px solid var(--sun); }
.jump p { margin: 12px 0 0; max-width: 62ch; color: #e3e9e6; }
.jump strong { color: #fff; }
.jump .jump-label { margin: 0 0 4px; font-size: .78rem; font-weight: 750; letter-spacing: .14em; text-transform: uppercase; color: var(--sun); }

/* Templates and prompts */
.template, .prompt { margin: 22px 0 0; padding: clamp(20px, 3.5vw, 30px); background: #fbf9f3; box-shadow: 0 10px 26px #25332c0d; break-inside: avoid; }
.template p { margin: 10px 0 0; }
.template .steps, .template ul { margin: 12px 0 0; }
.template-title, .prompt figcaption { margin: 0 !important; font-size: 1.15rem; font-weight: 750; letter-spacing: -.02em; line-height: 1.3; }
.chips { font-size: .92rem; color: var(--ink-soft); }
.fill { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 4px 8px; }
.blank { flex: 1 1 220px; min-width: 120px; min-height: 1.6em; border-bottom: 1px solid #9baba5; }
.blank.short { flex: 0 0 64px; min-width: 64px; }
.prompt { position: relative; }
.prompt pre { margin: 14px 0 0; padding: 18px 20px; white-space: pre-wrap; overflow-wrap: anywhere; font: .93rem/1.6 ui-monospace, 'SF Mono', Menlo, Consolas, monospace; background: #fffefa; border: 1px solid var(--line); }
.prompt-long pre { max-height: 420px; overflow: auto; }
.copy { margin-top: 12px; min-height: 44px; padding: 8px 18px; border: 1px solid var(--steel); background: transparent; color: var(--steel); font-size: .86rem; font-weight: 700; }
.copy:hover { background: var(--steel); color: #f6f4ed; }
.copy.done { background: var(--steel); color: #f6f4ed; }

.table-wrap { margin-top: 14px; overflow-x: auto; }
.template table { width: 100%; border-collapse: collapse; font-size: .92rem; }
.template th, .template td { padding: 10px 12px; text-align: left; vertical-align: top; border: 1px solid var(--line); }
.template th { background: var(--paper-deep); }
.template tbody tr:first-child td { color: var(--ink-soft); font-style: italic; }

.graphic { margin: 28px 0 0; }
.graphic img { display: block; width: 100%; height: auto; background: #fff; box-shadow: 0 10px 26px #25332c0d; }
.graphic figcaption { margin-top: 10px; font-size: .88rem; font-style: italic; color: var(--ink-soft); }
.in-book { margin-top: 26px; font-size: .84rem; color: var(--ink-soft); }

/* 30-Day Challenge tracker */
.progress { font-weight: 700; color: var(--steel) !important; }
.challenge { margin: 26px 0 0; padding: 0; list-style: none; counter-reset: day; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 32px; }
.challenge li { counter-increment: day; border-bottom: 1px solid var(--line); }
.challenge label { display: flex; align-items: center; gap: 12px; min-height: 48px; padding: 6px 0; cursor: pointer; }
.challenge label::before { content: counter(day); flex: 0 0 2ch; font-size: .82rem; font-weight: 750; color: var(--red); text-align: right; }
.challenge input { flex: 0 0 auto; width: 22px; height: 22px; margin: 0; accent-color: var(--steel); }
.challenge input:checked + span { color: var(--ink-soft); text-decoration: line-through; text-decoration-color: #9baba5; }
.res-tools { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 26px; }
.res-tools .quiet-button { background: transparent; color: var(--ink); border: 1px solid #9baba5; }
.res-tools .quiet-button:hover { background: var(--paper-deep); }

/* Operator Kit cards */
.kit-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 22px; margin-top: 28px; }
.kit-card { padding: 26px; background: #fbf9f3; box-shadow: 0 10px 26px #25332c0d; break-inside: avoid; }
.kit-card h3 { margin: 4px 0 0; font-size: 1.25rem; letter-spacing: -.02em; text-transform: none; color: var(--ink); }
.kit-card p, .kit-card ul { margin: 10px 0 0; font-size: .94rem; }
.kit-card .fill { flex-direction: column; align-items: stretch; }
.kit-card .blank { flex: 0 0 auto; }
.kit-card .fill:has(.short) { flex-direction: row; align-items: flex-end; }
.kit-card .fill:has(.short) .blank:not(.short) { flex: 1 1 100%; }
.kit-no { margin: 0 !important; font-size: .8rem !important; font-weight: 750; color: var(--red); }
.big-q { font-size: 1.3rem !important; font-weight: 750; line-height: 1.3; letter-spacing: -.02em; }

.res-contact { margin-top: 72px; }
.res-contact h2 { font-size: clamp(1.4rem, 2.6vw, 1.8rem); }
.res-contact a { color: #fff; }

@media (max-width: 650px) {
  .chapter-nav { position: static; gap: 6px; margin-inline: 0; padding: 12px 0; background: none; backdrop-filter: none; }
  .chapter-nav a { min-height: 44px; padding: 0 10px; font-size: .8rem; }
  html { scroll-padding-top: 16px; }
  .res-section { padding-top: 44px; margin-top: 40px; }
  .challenge, .kit-grid { grid-template-columns: minmax(0, 1fr); }
  .prompt pre { padding: 14px; font-size: .86rem; }
  .kit-card { padding: 22px 20px; }
}

@media print {
  @page { margin: 14mm; }
  body { background: #fff; font-size: 11pt; }
  header, footer, .chapter-nav, .copy, .res-tools, .res-contact, .res-meta { display: none !important; }
  main { padding: 0; max-width: none; }
  .res-section { border: 0; margin: 0; padding: 20pt 0 0; break-before: page; }
  .res-intro + .chapter-nav + .res-section { break-before: auto; }
  .jump { color: #000; background: none; border: 2px solid #000; border-left-width: 6px; }
  .jump p, .jump strong, .jump .jump-label { color: #000; }
  .template, .prompt, .kit-card, .graphic img { box-shadow: none; border: 1px solid #bbb; background: #fff; }
  .prompt-long pre { max-height: none; overflow: visible; }
  .blank { min-height: 2em; }
  /* Print a single part when a print button sets a mode on <html> */
  html[data-print-only] .res-intro, html[data-print-only] main > .res-section { display: none; }
  html[data-print-only="challenge"] #challenge, html[data-print-only="kit"] #kit { display: block; break-before: auto; padding-top: 0; }
  html[data-print-only="kit"] .kit-grid { display: block; }
  html[data-print-only="kit"] .kit-card { margin: 0 0 12pt; }
  .challenge { grid-template-columns: repeat(2, 1fr); }
  .challenge label { min-height: 26pt; }
}
.essay-link { margin: -6px 0 18px; font-size: .92rem; font-weight: 700; }
.essay-link a { text-underline-offset: 5px; }
