/* Demo page: a sample lot, a stepped sample report, a short video. Loads after site.css, which holds
   the tokens, header, buttons, slip and evidence chips. Mobile first; wider layouts from 960px. */

.demo-main { padding-bottom: 72px; }
.intro { padding-top: 40px; }
@media (min-width: 768px) { .intro { padding-top: 56px; } }
.intro .lead { margin-top: 16px; }

/* the first choice: alone, two big buttons */
.choice-wrap { padding-top: 32px; }
.choice-label { font-size: 16px; font-weight: 600; color: var(--muted); margin-bottom: 12px; }
.choice { display: grid; gap: 12px; }
@media (min-width: 640px) { .choice { grid-template-columns: 1fr 1fr; } }
.choice-btn {
  display: flex;
  align-items: center;
  gap: 16px;
  min-height: 72px;
  padding: 16px 20px;
  background: var(--card);
  border: 1.5px solid var(--field);
  border-radius: 6px;
  color: var(--ink);
  text-decoration: none;
}
.choice-btn:hover { border-color: var(--ink); text-decoration: none; }
.choice-btn[aria-current="true"] { border-color: var(--ink); box-shadow: inset 0 0 0 1px var(--ink); }
.choice-btn .ico { width: 28px; height: 28px; color: var(--brass); }
.choice-text { display: grid; gap: 4px; min-width: 0; }
.choice-text strong { font-size: 20px; font-weight: 700; font-stretch: 112%; line-height: 1.25; }
.choice-text .small { line-height: 1.35; }

/* the lot slip next to the answer in short */
.lot { padding-top: 40px; }
.lot-grid { display: grid; gap: 24px; }
@media (min-width: 960px) { .lot-grid { grid-template-columns: 5fr 6fr; column-gap: 48px; align-items: start; } }
.lot-grid > * { min-width: 0; }
.lot-slip { max-width: 520px; }
.lot-slip dl { gap: 12px; }
.slip-q { padding: 0 20px 12px; font-weight: 600; font-size: 16px; }
.slip-q span { display: block; font-size: 13.5px; color: var(--muted); }
.slip-note { padding: 0 20px 18px; }
.summary { background: var(--card); border: 1px solid var(--line); border-radius: 2px; padding: 24px; }
.summary h2 { font-size: 24px; margin-top: 8px; }
@media (min-width: 768px) { .summary h2 { font-size: 28px; } }
.summary-text { margin-top: 12px; font-size: 18px; }
.summary .small { margin-top: 16px; }

/* the stepped report: a rail of step numbers, one step at a time */
.steps-section { padding-top: 48px; }
#step:focus { outline: none; }
.rail { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.rail a {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--card);
  color: var(--ink);
  text-decoration: none;
}
.rail a:hover { border-color: var(--ink); text-decoration: none; }
.rail a[aria-current="step"] { background: var(--ink); border-color: var(--ink); color: var(--paper); }
.rail-num {
  display: inline-grid;
  place-items: center;
  min-width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--soft);
  color: var(--ink);
  font-size: 14px;
  font-weight: 700;
}
.rail a[aria-current="step"] .rail-num { background: var(--signal); }
.rail-title { display: none; font-size: 14.5px; font-weight: 600; line-height: 1.25; min-width: 0; }
@media (min-width: 960px) {
  .rail { flex-wrap: nowrap; }
  .rail a { flex: 1 1 0; min-width: 0; }
  .rail-title { display: inline; }
}
.steps-section .example-note { margin-top: 16px; }
.step-count { margin-top: 20px; font-size: 14.4px; font-weight: 600; letter-spacing: .06em; color: var(--muted); }
.step-title { margin-top: 6px; font-size: 26px; }
@media (min-width: 768px) { .step-title { font-size: 32px; } }
.step-body {
  margin-top: 20px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 2px;
  padding: 20px;
  display: grid;
  gap: 22px;
  min-width: 0;
}
@media (min-width: 768px) { .step-body { padding: 28px; } }
.step-body h3 { font-size: 18px; }
.step-intro { font-size: 17px; }
.step-body > * { min-width: 0; }

/* company rows: cards on a phone, one table from 960px (no inner scroll either way) */
.cards { display: grid; gap: 12px; }
.company { border: 1px solid var(--line); border-radius: 6px; padding: 16px; display: grid; gap: 10px; min-width: 0; }
.company-head { display: grid; grid-template-columns: auto 1fr auto; gap: 12px; align-items: start; }
.company-head p { margin-top: 2px; }
.rank {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--ink);
  color: var(--paper);
  font-size: 15px;
  font-weight: 700;
}
.kv { margin: 0; display: grid; gap: 8px; }
.kv dt { font-size: 13.5px; font-weight: 600; color: var(--muted); }
.kv dd { margin: 2px 0 0; }
.kv .ev { margin-inline-start: 4px; }
.table-wrap { min-width: 0; }
.company-table { display: none; }
@media (min-width: 960px) {
  .cards { display: none; }
  /* body has overflow-wrap: anywhere, which lets an auto table squeeze columns below one word */
  .company-table { display: table; width: 100%; border-collapse: collapse; font-size: 15px; overflow-wrap: break-word; }
  .company-table th {
    text-align: start;
    font-size: 13.5px;
    font-weight: 600;
    color: var(--muted);
    padding: 0 0 8px;
    padding-inline-end: 10px;
    border-bottom: 1px solid var(--line);
    vertical-align: bottom;
  }
  .company-table td { padding: 12px 0; padding-inline-end: 10px; border-top: 1px solid var(--soft); vertical-align: top; }
  .company-table td .muted { display: block; margin-top: 4px; }
}

/* plain lists: each line has a left rule; excluded rows get the red one */
.plain { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.plain li {
  display: grid;
  gap: 6px;
  padding-inline-start: 14px;
  border-inline-start: 3px solid var(--line);
  min-width: 0;
}
.plain .ev { justify-self: start; }
.excluded li { border-inline-start-color: var(--bad); }
.questions { margin: 0; padding-inline-start: 22px; display: grid; gap: 14px; }
.questions p + p { font-size: 15.5px; margin-top: 2px; }

/* previous and next */
.step-nav { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 20px; }
.step-nav .next { margin-inline-start: auto; }

/* what the labels mean: closed until asked */
.labels { margin-top: 20px; }
.labels summary { cursor: pointer; font-weight: 600; color: var(--brass); }
.labels dl { margin: 14px 0 0; display: grid; gap: 10px; }
.labels dl > div { display: grid; gap: 4px; }
.labels dd { margin: 0; font-size: 16px; }

/* video and the call to action, side by side from 768px */
.video-section { padding-top: 56px; }
.video-grid { display: grid; gap: 28px; margin-top: 20px; }
@media (min-width: 768px) { .video-grid { grid-template-columns: auto 1fr; column-gap: 48px; align-items: center; } }
.demo-video {
  display: block;
  width: 100%;
  max-width: 300px;
  height: auto;
  aspect-ratio: 9 / 16;
  background: var(--ink);
  border-radius: 6px;
}
.video-fig { margin: 0; width: 100%; max-width: 300px; }
.video-credit { margin-top: 10px; line-height: 1.5; }
.video-credit a { color: inherit; text-decoration: underline; text-underline-offset: 2px; }
.spec-label { font-weight: 600; }
.cta-box { display: grid; gap: 16px; align-content: center; min-width: 0; }
.cta-box h2 { font-size: 26px; }
@media (min-width: 768px) { .cta-box h2 { font-size: 30px; } }
.cta-box p { max-width: 52ch; font-size: 17px; }
.cta-row { display: flex; flex-wrap: wrap; gap: 16px; align-items: center; }
.switch { font-weight: 600; }
