/* =========================================================================
   SAIGE 5-Minute Pitch Module — styles
   ========================================================================= */

:root {
  --green: #5c7a52;
  --green-dark: #46603e;
  --green-deep: #35492f;
  --green-light: #eef3ec;
  --green-mid: #d8e4d3;
  --ink: #23281f;
  --ink-soft: #55604e;
  --ink-muted: #7d8677;
  --paper: #fbfcfa;
  --card: #ffffff;
  --line: #e3e8df;
  --amber: #a3690f;
  --amber-bg: #fbf3e2;
  --red: #a13c2e;
  --red-bg: #faece9;
  --gray-bar: #b9b9b4;
  --radius: 14px;
  --radius-sm: 9px;
  --shadow: 0 1px 2px rgba(35, 40, 31, 0.05), 0 6px 24px rgba(35, 40, 31, 0.06);
  --serif: "Bona Nova", "Iowan Old Style", Georgia, serif;
  --sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
    Helvetica, Arial, sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.6;
}

/* ---------- Header ---------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(251, 252, 250, 0.94);
  backdrop-filter: blur(6px);
  border-bottom: 1px solid var(--line);
}

.header-inner {
  max-width: 720px;
  margin: 0 auto;
  padding: 12px 20px 10px;
}

.header-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
}

.header-title {
  font-family: var(--serif);
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--green-deep);
  white-space: nowrap;
}

.header-meta {
  display: flex;
  align-items: center;
  gap: 14px;
  font-size: 0.8rem;
  color: var(--ink-muted);
}

.points-chip {
  font-variant-numeric: tabular-nums;
  color: var(--green-dark);
  background: var(--green-light);
  border-radius: 999px;
  padding: 2px 10px;
  white-space: nowrap;
}

/* Overload meter — quiet, reads as a design element */
.overload {
  display: none;
  align-items: center;
  gap: 6px;
}

.overload.visible {
  display: flex;
}

.overload-label {
  font-size: 0.68rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-muted);
}

.overload-track {
  width: 64px;
  height: 5px;
  border-radius: 999px;
  background: var(--line);
  overflow: hidden;
}

.overload-fill {
  height: 100%;
  width: 0;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--green), var(--amber), var(--red));
  background-size: 128px 100%;
  transition: width 0.8s ease;
}

/* Progress bar */
.progress-wrap {
  margin-top: 10px;
}

.progress-track {
  height: 5px;
  background: var(--line);
  border-radius: 999px;
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  background: var(--green);
  border-radius: 999px;
  transition: width 0.45s ease;
}

.progress-caption {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  margin-top: 5px;
  font-size: 0.75rem;
  color: var(--ink-muted);
}

.progress-caption .step-name {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* ---------- Layout ---------- */

main {
  max-width: 720px;
  margin: 0 auto;
  padding: 36px 20px 90px;
}

.screen {
  animation: rise 0.4s ease both;
}

@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

h1 {
  font-family: var(--serif);
  font-weight: 700;
  font-size: clamp(1.9rem, 5.5vw, 2.7rem);
  line-height: 1.15;
  color: var(--green-deep);
  margin: 0 0 10px;
}

h2 {
  font-family: var(--serif);
  font-weight: 700;
  font-size: clamp(1.5rem, 4.5vw, 2rem);
  line-height: 1.2;
  color: var(--green-deep);
  margin: 0 0 14px;
}

h3 {
  font-family: var(--sans);
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--ink);
  margin: 0 0 8px;
}

.subtitle {
  font-size: 1.05rem;
  color: var(--ink-soft);
  margin: 0 0 26px;
}

.framing {
  font-size: 1.02rem;
  color: var(--ink);
  margin: 0 0 26px;
  max-width: 60ch;
}

.section-kicker {
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--green);
  margin: 0 0 8px;
}

/* ---------- Cards ---------- */

.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 22px 24px;
  box-shadow: var(--shadow);
  margin: 0 0 18px;
}

.card.tinted {
  background: var(--green-light);
  border-color: var(--green-mid);
  box-shadow: none;
}

.rule-card {
  background: var(--green-light);
  border: 1px solid var(--green-mid);
  border-left: 4px solid var(--green);
  border-radius: var(--radius-sm);
  padding: 16px 20px;
  margin: 22px 0 0;
  font-size: 0.97rem;
}

.rule-card .rule-title {
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--green-dark);
  margin: 0 0 6px;
}

.note-card {
  background: var(--amber-bg);
  border: 1px solid #ecdcb8;
  border-radius: var(--radius-sm);
  padding: 16px 20px;
  margin: 22px 0 0;
  font-size: 0.95rem;
  color: #5c4a1e;
}

.principle-card {
  background: var(--green-deep);
  color: #f2f6ef;
  border-radius: var(--radius);
  padding: 24px 26px;
  margin: 26px 0 0;
  font-family: var(--serif);
  font-size: 1.18rem;
  line-height: 1.5;
}

/* ---------- Buttons ---------- */

button {
  font-family: var(--sans);
  font-size: 1rem;
  cursor: pointer;
}

.btn {
  display: inline-block;
  border: none;
  border-radius: 999px;
  padding: 13px 28px;
  font-weight: 600;
  transition: transform 0.12s ease, box-shadow 0.12s ease, background 0.12s ease;
}

.btn:focus-visible,
button:focus-visible,
[tabindex]:focus-visible,
a:focus-visible,
input:focus-visible,
textarea:focus-visible {
  outline: 3px solid rgba(92, 122, 82, 0.5);
  outline-offset: 2px;
}

.btn-primary {
  background: var(--green);
  color: #fff;
}

.btn-primary:hover {
  background: var(--green-dark);
  transform: translateY(-1px);
}

.btn-primary:disabled {
  background: var(--line);
  color: var(--ink-muted);
  cursor: not-allowed;
  transform: none;
}

.btn-secondary {
  background: transparent;
  color: var(--green-dark);
  border: 1.5px solid var(--green-mid);
}

.btn-secondary:hover {
  border-color: var(--green);
  background: var(--green-light);
}

.btn-quiet {
  background: none;
  border: none;
  color: var(--ink-muted);
  font-size: 0.9rem;
  padding: 8px 10px;
  border-radius: var(--radius-sm);
}

.btn-quiet:hover {
  color: var(--ink);
  background: var(--green-light);
}

.nav-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 34px;
}

.btn-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 18px;
}

/* ---------- Quiz options ---------- */

.options {
  display: grid;
  gap: 10px;
  margin: 16px 0 0;
}

.option {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  width: 100%;
  text-align: left;
  background: var(--card);
  border: 1.5px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 14px 16px;
  font-size: 0.98rem;
  line-height: 1.5;
  color: var(--ink);
  transition: border-color 0.12s ease, background 0.12s ease;
}

.option:hover:not(:disabled) {
  border-color: var(--green);
  background: var(--green-light);
}

.option:disabled {
  cursor: default;
}

.option .opt-letter {
  flex: none;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  border: 1.5px solid var(--line);
  display: grid;
  place-items: center;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--ink-muted);
  margin-top: 1px;
}

.option.picked-correct {
  border-color: var(--green);
  background: var(--green-light);
}

.option.picked-correct .opt-letter {
  background: var(--green);
  border-color: var(--green);
  color: #fff;
}

.option.picked-wrong {
  border-color: #d6a79e;
  background: var(--red-bg);
}

.option.picked-wrong .opt-letter {
  background: var(--red);
  border-color: var(--red);
  color: #fff;
}

.option.reveal-correct {
  border-color: var(--green);
}

.option.dimmed {
  opacity: 0.55;
}

.reveal {
  margin-top: 14px;
  padding: 16px 18px;
  border-radius: var(--radius-sm);
  background: var(--green-light);
  border: 1px solid var(--green-mid);
  font-size: 0.95rem;
  animation: rise 0.35s ease both;
}

.reveal .verdict {
  font-weight: 600;
  color: var(--green-dark);
  display: block;
  margin-bottom: 6px;
  font-size: 0.85rem;
}

.reveal .verdict.wrong {
  color: var(--amber);
}

.points-flash {
  display: inline-block;
  margin-left: 8px;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--green);
  font-variant-numeric: tabular-nums;
}

/* ---------- Project chip (section 1) ---------- */

.project-chip {
  background: var(--card);
  border: 1px dashed var(--green);
  border-radius: var(--radius-sm);
  padding: 14px 18px;
  margin: 0 0 18px;
  font-size: 0.97rem;
}

.project-chip .chip-label {
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--green-dark);
  display: block;
  margin-bottom: 4px;
}

/* ---------- Drag to order ---------- */

.order-list {
  list-style: none;
  margin: 16px 0 0;
  padding: 0;
  display: grid;
  gap: 10px;
}

.order-item {
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--card);
  border: 1.5px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 12px 14px;
  font-weight: 500;
  cursor: grab;
  touch-action: none;
  user-select: none;
  -webkit-user-select: none;
  transition: border-color 0.12s ease, box-shadow 0.12s ease;
}

.order-item.dragging {
  opacity: 0.6;
  border-color: var(--green);
  box-shadow: var(--shadow);
}

.order-item .order-num {
  flex: none;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--green-light);
  color: var(--green-dark);
  display: grid;
  place-items: center;
  font-size: 0.8rem;
  font-weight: 600;
}

.order-item .order-label {
  flex: 1;
}

.order-item .order-arrows {
  display: flex;
  gap: 4px;
}

.order-arrows button {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: var(--paper);
  color: var(--ink-soft);
  font-size: 0.85rem;
  display: grid;
  place-items: center;
}

.order-arrows button:hover:not(:disabled) {
  border-color: var(--green);
  color: var(--green-dark);
  background: var(--green-light);
}

.order-arrows button:disabled {
  opacity: 0.35;
  cursor: default;
}

.order-item.locked {
  cursor: default;
}

.order-item.correct-pos {
  border-color: var(--green);
  background: var(--green-light);
}

/* ---------- Time budget sliders ---------- */

.budget {
  margin-top: 16px;
}

.budget-row {
  margin-bottom: 18px;
}

.budget-row-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 10px;
  margin-bottom: 4px;
}

.budget-row-head .b-label {
  font-weight: 500;
  font-size: 0.95rem;
}

.budget-row-head .b-time {
  font-variant-numeric: tabular-nums;
  font-weight: 600;
  color: var(--green-dark);
  font-size: 0.95rem;
}

input[type="range"] {
  width: 100%;
  accent-color: var(--green);
  height: 28px;
  margin: 0;
}

.budget-total {
  display: flex;
  justify-content: space-between;
  border-top: 1px solid var(--line);
  padding-top: 12px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

.budget-compare {
  margin-top: 18px;
  display: grid;
  gap: 12px;
}

.compare-row {
  font-size: 0.9rem;
}

.compare-row .cmp-head {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 4px;
}

.cmp-bars {
  display: grid;
  gap: 3px;
}

.cmp-bar {
  height: 10px;
  border-radius: 4px 4px 0 0;
  min-width: 4px;
}

.cmp-bar.yours {
  background: var(--green-mid);
  border-radius: 4px;
}

.cmp-bar.recommended {
  background: var(--green);
  border-radius: 4px;
}

.cmp-legend {
  display: flex;
  gap: 16px;
  font-size: 0.78rem;
  color: var(--ink-muted);
  margin-bottom: 4px;
}

.cmp-legend .dot {
  display: inline-block;
  width: 10px;
  height: 10px;
  border-radius: 3px;
  margin-right: 5px;
  vertical-align: -1px;
}

.rationale {
  color: var(--ink-soft);
  font-size: 0.88rem;
  margin-top: 4px;
}

/* ---------- Pitch rating (section 3) ---------- */

.transcript {
  font-family: var(--serif);
  font-size: 1.08rem;
  line-height: 1.65;
  color: var(--ink);
  background: var(--card);
  border-left: 4px solid var(--green-mid);
  padding: 4px 0 4px 20px;
  margin: 14px 0 18px;
}

.track-tag {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--green-dark);
  background: var(--green-light);
  border-radius: 999px;
  padding: 3px 12px;
}

.stars {
  display: flex;
  gap: 6px;
  align-items: center;
}

.star {
  width: 42px;
  height: 42px;
  border: none;
  background: none;
  padding: 0;
  display: grid;
  place-items: center;
}

.star svg {
  width: 30px;
  height: 30px;
  fill: none;
  stroke: var(--ink-muted);
  stroke-width: 1.6;
  transition: fill 0.1s ease, stroke 0.1s ease, transform 0.1s ease;
}

.star:hover svg {
  transform: scale(1.12);
}

.star.filled svg {
  fill: var(--green);
  stroke: var(--green);
}

.star.reference-marker svg {
  fill: none;
  stroke: var(--green-dark);
  stroke-dasharray: 3 2;
}

.rating-label {
  font-size: 0.85rem;
  color: var(--ink-muted);
  margin: 14px 0 6px;
  font-weight: 600;
}

/* ---------- Mock slides (section 4) ---------- */

.slide-pair {
  display: grid;
  gap: 16px;
  grid-template-columns: 1fr 1fr;
  margin-top: 16px;
}

@media (max-width: 640px) {
  .slide-pair {
    grid-template-columns: 1fr;
  }
}

.slide-choice {
  border: none;
  background: none;
  padding: 0;
  text-align: left;
  display: block;
  width: 100%;
}

.slide-frame {
  aspect-ratio: 16 / 9;
  background: #fff;
  border: 1.5px solid var(--line);
  border-radius: 10px;
  overflow: hidden;
  box-shadow: var(--shadow);
  position: relative;
  padding: 4.5%;
  display: flex;
  flex-direction: column;
  transition: border-color 0.12s ease, transform 0.12s ease,
    box-shadow 0.12s ease;
  container-type: inline-size;
}

.slide-choice:hover:not(:disabled) .slide-frame {
  border-color: var(--green);
  transform: translateY(-2px);
}

.slide-choice:disabled {
  cursor: default;
}

.slide-choice.chosen-correct .slide-frame {
  border-color: var(--green);
  box-shadow: 0 0 0 3px var(--green-mid);
}

.slide-choice.chosen-wrong .slide-frame {
  border-color: #d6a79e;
  box-shadow: 0 0 0 3px #f0d8d3;
}

.slide-choice.faded .slide-frame {
  opacity: 0.55;
}

.slide-tag {
  display: block;
  margin-top: 8px;
  font-size: 0.8rem;
  color: var(--ink-muted);
  text-align: center;
}

/* slide content styles — sized relative to the frame */
.sl-title {
  font-family: var(--sans);
  font-weight: 700;
  font-size: 4.2cqw;
  line-height: 1.25;
  color: var(--ink);
  margin: 0 0 2.5%;
}

.sl-bullets {
  margin: 0;
  padding-left: 5%;
  font-size: 2.15cqw;
  line-height: 1.3;
  color: var(--ink-soft);
}

.sl-bullets li {
  margin-bottom: 0.5%;
}

.sl-oneline {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6%;
  text-align: center;
}

.sl-oneline .big-line {
  font-family: var(--serif);
  font-size: 6.4cqw;
  font-weight: 700;
  color: var(--green-deep);
  line-height: 1.3;
  max-width: 85%;
}

.sl-icon {
  width: 12cqw;
  height: 12cqw;
  stroke: var(--green);
  fill: none;
  stroke-width: 1.4;
}

.sl-table {
  border-collapse: collapse;
  width: 100%;
  font-size: 2.4cqw;
  color: var(--ink-soft);
}

.sl-table th,
.sl-table td {
  border: 1px solid var(--line);
  padding: 1% 1.6%;
  text-align: right;
  font-variant-numeric: tabular-nums;
}

.sl-table th {
  background: var(--green-light);
  color: var(--ink);
  font-weight: 600;
}

.sl-table td:first-child,
.sl-table th:first-child {
  text-align: left;
}

/* mock bar chart */
.sl-chart {
  flex: 1;
  display: flex;
  flex-direction: column;
}

.sl-chart .chart-headline {
  font-family: var(--sans);
  font-weight: 700;
  font-size: 4.6cqw;
  color: var(--ink);
  margin: 0 0 4%;
}

.chart-plot {
  flex: 1;
  display: flex;
  align-items: flex-end;
  gap: 6%;
  padding: 0 4%;
  border-bottom: 1.5px solid var(--line);
}

.chart-col {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  height: 100%;
  gap: 3%;
}

.chart-col .bar-value {
  font-size: 2.6cqw;
  font-weight: 600;
  color: var(--ink-soft);
  font-variant-numeric: tabular-nums;
}

.chart-col .bar {
  width: 55%;
  border-radius: 4px 4px 0 0;
}

.chart-col .bar.pass {
  background: var(--green-dark);
}

.chart-col .bar.fail {
  background: var(--gray-bar);
}

.chart-labels {
  display: flex;
  gap: 6%;
  padding: 1.5% 4% 0;
}

.chart-labels .col-label {
  flex: 1;
  text-align: center;
  font-size: 2.4cqw;
  color: var(--ink-muted);
  line-height: 1.3;
}

.chart-labels .col-label .state {
  display: block;
  font-weight: 600;
}

.chart-labels .col-label .state.pass {
  color: var(--green-dark);
}

.chart-axis-note {
  font-size: 2.2cqw;
  color: var(--ink-muted);
  padding: 1% 4% 0;
}

/* equation slide */
.sl-equation {
  font-size: 2.7cqw;
  line-height: 1.7;
  color: var(--ink-soft);
  font-family: "Iowan Old Style", Georgia, serif;
}

.sl-equation .eq-main {
  font-size: 3.2cqw;
  color: var(--ink);
  margin-bottom: 3%;
}

.sl-plain {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  gap: 4%;
}

.sl-plain .plain-line {
  font-family: var(--serif);
  font-size: 5.6cqw;
  font-weight: 700;
  color: var(--green-deep);
  max-width: 88%;
  line-height: 1.35;
}

.sl-plain .plain-footnote {
  font-size: 2.8cqw;
  color: var(--ink-muted);
}

.round-title {
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--green-dark);
  margin: 30px 0 4px;
}

/* ---------- Pitch builder (section 5) ---------- */

.prompt-tag {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--green-dark);
  background: var(--green-light);
  border-radius: 999px;
  padding: 3px 12px;
  margin-bottom: 10px;
}

.prompt-question {
  font-family: var(--serif);
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--ink);
  line-height: 1.4;
  margin: 0 0 8px;
}

.helper-text {
  font-size: 0.9rem;
  color: var(--ink-soft);
  margin: 0 0 16px;
}

textarea {
  width: 100%;
  min-height: 140px;
  border: 1.5px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 14px 16px;
  font-family: var(--sans);
  font-size: 1rem;
  line-height: 1.55;
  color: var(--ink);
  background: var(--card);
  resize: vertical;
}

textarea:focus {
  border-color: var(--green);
}

.counter-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: baseline;
  margin-top: 6px;
  min-height: 22px;
}

.char-counter {
  font-size: 0.82rem;
  color: var(--ink-muted);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
  margin-left: auto;
}

.char-counter.over {
  color: var(--amber);
  font-weight: 600;
}

.char-counter.near-cap {
  color: var(--red);
  font-weight: 600;
}

.counter-note {
  font-size: 0.82rem;
}

.counter-note.amber {
  color: var(--amber);
}

.counter-note.red {
  color: var(--red);
}

.soft-note {
  margin-top: 10px;
  font-size: 0.85rem;
  color: var(--ink-soft);
  background: var(--green-light);
  border-radius: var(--radius-sm);
  padding: 10px 14px;
}

.builder-progress {
  display: flex;
  gap: 6px;
  margin-bottom: 22px;
}

.builder-dot {
  flex: 1;
  height: 4px;
  border-radius: 999px;
  background: var(--line);
}

.builder-dot.done {
  background: var(--green);
}

.builder-dot.current {
  background: var(--green-mid);
}

/* ---------- Outline summary ---------- */

.outline {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
  margin-top: 20px;
}

.outline-head {
  background: var(--green-deep);
  color: #f2f6ef;
  padding: 24px 26px;
}

.outline-head .oh-name {
  font-size: 0.85rem;
  opacity: 0.85;
  margin-bottom: 10px;
}

.outline-head .oh-takeaway-label {
  font-size: 0.7rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  opacity: 0.7;
  margin-bottom: 6px;
}

.outline-head .oh-takeaway {
  font-family: var(--serif);
  font-size: 1.25rem;
  line-height: 1.45;
}

.outline-section {
  padding: 18px 26px;
  border-top: 1px solid var(--line);
}

.outline-section .os-head {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: baseline;
  margin-bottom: 6px;
}

.outline-section .os-title {
  font-weight: 600;
  font-size: 0.95rem;
}

.outline-section .os-time {
  font-size: 0.8rem;
  color: var(--green-dark);
  background: var(--green-light);
  border-radius: 999px;
  padding: 2px 10px;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.outline-section .os-body {
  font-size: 0.95rem;
  color: var(--ink-soft);
  white-space: pre-wrap;
}

.outline-footer {
  border-top: 1px solid var(--line);
  background: var(--green-light);
  padding: 16px 26px;
  font-size: 0.85rem;
}

.outline-footer ul {
  margin: 6px 0 0;
  padding-left: 20px;
}

.outline-footer li {
  margin-bottom: 3px;
}

.id-fields {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin: 16px 0 4px;
}

@media (max-width: 520px) {
  .id-fields {
    grid-template-columns: 1fr;
  }
}

.id-fields label {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--ink-soft);
  display: block;
  margin-bottom: 4px;
}

.id-fields input {
  width: 100%;
  border: 1.5px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 10px 14px;
  font-family: var(--sans);
  font-size: 0.98rem;
  background: var(--card);
  color: var(--ink);
}

.id-fields input:focus {
  border-color: var(--green);
}

.share-instruction {
  font-size: 0.9rem;
  color: var(--ink-soft);
  margin-top: 14px;
  max-width: 58ch;
}

/* ---------- Checklist (section 6) ---------- */

.checklist {
  display: grid;
  gap: 10px;
  margin-top: 16px;
}

.check-item {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  background: var(--card);
  border: 1.5px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 14px 16px;
  cursor: pointer;
  transition: border-color 0.12s ease, background 0.12s ease;
  font-size: 0.97rem;
}

.check-item:hover {
  border-color: var(--green);
}

.check-item:focus-within {
  outline: 3px solid rgba(92, 122, 82, 0.5);
  outline-offset: 2px;
}

.check-item.checked {
  border-color: var(--green);
  background: var(--green-light);
}

.check-item input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.check-box {
  flex: none;
  width: 24px;
  height: 24px;
  border-radius: 7px;
  border: 1.5px solid var(--ink-muted);
  display: grid;
  place-items: center;
  margin-top: 1px;
  transition: background 0.12s ease, border-color 0.12s ease;
}

.check-item.checked .check-box {
  background: var(--green);
  border-color: var(--green);
}

.check-box svg {
  width: 14px;
  height: 14px;
  stroke: #fff;
  stroke-width: 3;
  fill: none;
  opacity: 0;
}

.check-item.checked .check-box svg {
  opacity: 1;
}

details.tip {
  margin-top: 20px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--card);
}

details.tip summary {
  cursor: pointer;
  padding: 14px 18px;
  font-weight: 600;
  font-size: 0.92rem;
  color: var(--green-dark);
  list-style: none;
}

details.tip summary::-webkit-details-marker {
  display: none;
}

details.tip summary::before {
  content: "+";
  display: inline-block;
  width: 18px;
  color: var(--green);
  font-weight: 700;
}

details.tip[open] summary::before {
  content: "\2013";
}

details.tip .tip-body {
  padding: 0 18px 16px;
  font-size: 0.93rem;
  color: var(--ink-soft);
}

/* ---------- Completion ---------- */

.completion-card {
  background: var(--green-deep);
  color: #f2f6ef;
  border-radius: var(--radius);
  padding: 30px 30px;
  text-align: center;
  margin-bottom: 26px;
}

.completion-card .cc-state {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  border: 1px solid rgba(242, 246, 239, 0.4);
  border-radius: 999px;
  padding: 5px 16px;
  margin-bottom: 14px;
}

.completion-card .cc-title {
  font-family: var(--serif);
  font-size: 1.8rem;
  font-weight: 700;
  margin: 0 0 8px;
}

.completion-card .cc-meta {
  font-size: 0.9rem;
  opacity: 0.85;
}

.completion-card .cc-score {
  font-size: 1rem;
  margin-top: 12px;
  font-variant-numeric: tabular-nums;
}

.final-links {
  margin: 0;
  padding-left: 20px;
  font-size: 0.93rem;
}

.final-links li {
  margin-bottom: 6px;
}

a {
  color: var(--green-dark);
  text-decoration-color: var(--green-mid);
  text-underline-offset: 3px;
}

a:hover {
  color: var(--green);
}

.provenance {
  font-size: 0.85rem;
  color: var(--ink-muted);
  max-width: 58ch;
  margin: 22px 0 30px;
}

.practical-line {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.9rem;
  color: var(--ink-soft);
  margin: 0 0 6px;
}

.practical-line svg {
  width: 18px;
  height: 18px;
  stroke: var(--green);
  fill: none;
  stroke-width: 1.8;
  flex: none;
}

.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;
}

/* fallback for browsers without container queries / cqw units */
@supports not (font-size: 1cqw) {
  .sl-title {
    font-size: 0.95rem;
  }
  .sl-bullets {
    font-size: 0.62rem;
  }
  .sl-oneline .big-line {
    font-size: 1.2rem;
  }
  .sl-table {
    font-size: 0.5rem;
  }
  .sl-chart .chart-headline {
    font-size: 0.85rem;
  }
  .chart-col .bar-value,
  .chart-labels .col-label,
  .chart-axis-note {
    font-size: 0.55rem;
  }
  .sl-equation {
    font-size: 0.55rem;
  }
  .sl-equation .eq-main {
    font-size: 0.65rem;
  }
  .sl-plain .plain-line {
    font-size: 1.1rem;
  }
  .sl-plain .plain-footnote {
    font-size: 0.6rem;
  }
  .sl-icon {
    width: 34px;
    height: 34px;
  }
}

@media (max-width: 460px) {
  body {
    font-size: 16px;
  }
  main {
    padding: 26px 16px 70px;
  }
  .card {
    padding: 18px 18px;
  }
  .header-row {
    flex-wrap: wrap;
    row-gap: 2px;
  }
  .header-meta {
    gap: 8px;
    margin-left: auto;
  }
  .points-chip {
    font-size: 0.72rem;
  }
  .overload-track {
    width: 44px;
  }
}
