/* Guide pages. They sit on top of /compare/compare.css, so the nav, footer,
   bands, type and the phone are the landing page's own. This file adds the
   short answer, the numbered steps, the minutes ruler and the source list. */

/* ---------- The short answer under the title ---------- */

.answer {
  margin-top: 28px;
  max-width: 36ch;
  font-family: var(--serif);
  font-variation-settings: "opsz" 24;
  font-size: clamp(21px, 1.9vw, 25px);
  line-height: 1.42;
  letter-spacing: -0.004em;
  color: var(--ink);
  text-wrap: pretty;
}

.hero h1.h-guide { max-width: 13ch; }

/* Small linked numbers that point at the source list. */
.ref {
  position: relative;
  top: -0.42em;
  margin-left: 0.12em;
  font: 600 0.58em/1 var(--sans);
  font-variant-numeric: tabular-nums;
  text-decoration: none;
  color: var(--grey);
}

.ref:hover { color: var(--ink); text-decoration: underline; }

/* ---------- Numbered steps ---------- */

.steps { counter-reset: step; border-top: 1px solid var(--ink); }

.steps > li {
  counter-increment: step;
  display: grid;
  grid-template-columns: 64px minmax(0, 5fr) minmax(0, 7fr);
  gap: 10px clamp(24px, 4vw, 64px);
  padding: 28px 0 30px;
  border-bottom: 1px solid var(--rule);
}

.steps > li::before {
  content: counter(step);
  font-family: var(--serif);
  font-variation-settings: "opsz" 60;
  font-size: 44px;
  line-height: 0.9;
  font-variant-numeric: lining-nums tabular-nums;
  color: var(--ink);
}

.steps h3 {
  font-size: clamp(22px, 2.2vw, 27px);
  line-height: 1.2;
  letter-spacing: -0.006em;
  font-variation-settings: "opsz" 28;
}

.steps .read { max-width: 54ch; }

/* Unnumbered choices: the same rows without the step numbers, for lists with no order. */
.steps.choices > li { grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); }
.steps.choices > li::before { content: none; display: none; }
.steps .read + .read { margin-top: 10px; }

/* A path through iPhone settings, set like the words on the buttons. */
.path {
  font: 500 0.92em/1.4 var(--sans);
  color: var(--ink);
}

/* ---------- The honest paragraph about Lectern ---------- */

.about {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  gap: 28px clamp(40px, 7vw, 112px);
  align-items: start;
}

.about .h-section { max-width: 12ch; }
.about .lead { max-width: 56ch; }
.about .lead + .small-note { margin-top: 18px; }

/* ---------- Minutes ruler ---------- */

.hero:has(.ruler) { grid-template-columns: minmax(0, 6fr) minmax(320px, 5fr); }

.ruler {
  width: min(100%, 440px);
  padding: 28px 28px 24px;
  display: grid;
  gap: 22px;
  background: var(--white);
  border-radius: 20px;
  box-shadow:
    0 0 0 1px rgba(26, 26, 26, 0.07),
    0 1px 2px rgba(26, 26, 26, 0.06),
    0 24px 48px -28px rgba(26, 26, 26, 0.28);
}

.ruler-out { display: grid; gap: 6px; min-height: 9.4em; }

.ruler-words {
  display: flex;
  align-items: baseline;
  gap: 12px;
  font-family: var(--serif);
  font-variation-settings: "opsz" 72;
  font-size: clamp(56px, 6vw, 76px);
  line-height: 1;
  letter-spacing: -0.024em;
  font-variant-numeric: lining-nums tabular-nums;
  color: var(--ink);
}

.ruler-words small {
  font-family: var(--serif);
  font-variation-settings: "opsz" 20;
  font-size: 20px;
  letter-spacing: 0;
  color: var(--ink-2);
}

.ruler-minutes { font: 600 15px/1.3 var(--sans); color: var(--ink); }
.ruler-range { font-family: var(--serif); font-size: 17px; line-height: 1.45; color: var(--ink-2); font-variation-settings: "opsz" 16; }
.ruler-note { font-family: var(--serif); font-size: 17px; line-height: 1.45; color: var(--ink); font-variation-settings: "opsz" 16; min-height: 1.45em; }

/* The track: minute ticks, the advised stretch shaded, a native range input on top. */
.ruler-track {
  --min: 1;
  --max: 12;
  --pos: 5;
  --x: calc((var(--pos) - var(--min)) / (var(--max) - var(--min)) * 100%);
  position: relative;
  height: 76px;
}

.ruler-ticks {
  position: absolute;
  left: 0;
  right: 0;
  top: 18px;
  height: 22px;
  display: flex;
  justify-content: space-between;
  pointer-events: none;
}

.ruler-ticks i {
  position: relative;
  width: 1px;
  height: 100%;
  background: var(--ink);
  opacity: 0.55;
}

.ruler-ticks i::after {
  content: attr(data-n);
  position: absolute;
  top: 30px;
  left: 50%;
  transform: translateX(-50%);
  font: 500 12px/1 var(--sans);
  font-style: normal;
  font-variant-numeric: tabular-nums;
  color: var(--grey);
}


.ruler-band {
  position: absolute;
  top: 12px;
  height: 34px;
  border-radius: 6px;
  background: var(--cotton);
  box-shadow: inset 0 0 0 1px #e2dbcd;
  pointer-events: none;
}

.ruler-band.is-light {
  background: repeating-linear-gradient(-45deg, #f6f2ea 0 4px, #ece5d8 4px 5px);
}

.ruler-marker {
  position: absolute;
  left: var(--x);
  top: 4px;
  width: 2px;
  height: 50px;
  margin-left: -1px;
  background: var(--ink);
  border-radius: 1px;
  pointer-events: none;
  transition: left 180ms cubic-bezier(0.22, 0.61, 0.36, 1);
}

.ruler-marker::before {
  content: "";
  position: absolute;
  top: -6px;
  left: 50%;
  width: 14px;
  height: 14px;
  transform: translateX(-50%);
  border-radius: 50%;
  background: var(--ink);
  box-shadow: 0 0 0 4px var(--white), 0 2px 6px 3px rgba(26, 26, 26, 0.16);
}

.ruler input[type="range"] {
  position: absolute;
  inset: 0 -8px;
  width: calc(100% + 16px);
  height: 100%;
  margin: 0;
  opacity: 0;
  cursor: ew-resize;
  touch-action: pan-y;
}

.ruler-track:has(input:focus-visible) .ruler-marker::before {
  box-shadow: 0 0 0 4px var(--white), 0 0 0 6px var(--ink);
}

.ruler-key { display: flex; flex-wrap: wrap; gap: 8px 18px; font: 500 13px/1.3 var(--sans); color: var(--grey); }
.ruler-key span { display: inline-flex; align-items: center; gap: 8px; }
.ruler-key span::before { content: ""; width: 18px; height: 10px; border-radius: 3px; background: var(--cotton); box-shadow: inset 0 0 0 1px #e2dbcd; }
.ruler-key span.is-light::before { background: repeating-linear-gradient(-45deg, #f6f2ea 0 4px, #ece5d8 4px 5px); }

/* ---------- Sources ---------- */

.sources { counter-reset: src; display: grid; gap: 0; border-top: 1px solid var(--ink); max-width: 72ch; }

.sources li {
  counter-increment: src;
  display: grid;
  grid-template-columns: 32px minmax(0, 1fr);
  gap: 14px;
  padding: 16px 0;
  border-bottom: 1px solid var(--rule);
  scroll-margin-top: calc(var(--nav) + 24px);
}

.sources li::before { content: counter(src); font: 600 13px/1.9 var(--sans); color: var(--grey); font-variant-numeric: tabular-nums; }
.sources li:target { background: linear-gradient(90deg, var(--white), var(--white)); }
.sources li:target::before { color: var(--ink); }
.sources .read { font-size: 17px; }
.sources a { font-weight: 500; }

/* ---------- Narrow screens ---------- */

@media (max-width: 960px) {
  .hero:has(.ruler) { grid-template-columns: minmax(0, 1fr); }
  .about { grid-template-columns: minmax(0, 1fr); }
  .ruler { width: 100%; max-width: 520px; }
}

@media (max-width: 720px) {
  .steps > li { grid-template-columns: 44px minmax(0, 1fr); gap: 8px 16px; padding: 22px 0 24px; }
  .steps > li::before { grid-row: span 2; font-size: 34px; }
  .steps.choices > li { grid-template-columns: minmax(0, 1fr); }
  .ruler { padding: 22px 20px 20px; }
  .answer { max-width: none; }
}

@media (prefers-reduced-motion: reduce) {
  .ruler-marker { transition: none; }
}

/* ---------- One phone in the hero ---------- */

.solo { --pw: clamp(200px, 22vw, 276px); display: grid; gap: 16px; width: var(--pw); }
.solo figcaption { min-height: 4.6em; }
.solo figcaption .label { display: block; margin-bottom: 4px; color: var(--ink); }
.solo figcaption .read { font-size: 16px; line-height: 1.45; }

@media (max-width: 960px) {
  .solo { justify-self: center; }
}

@media (max-width: 720px) {
  .solo { --pw: min(64vw, 260px); }
}

.ruler-key span.hint::before { display: none; }
.ruler-key span.is-mark::before { width: 2px; height: 14px; border-radius: 1px; background: var(--ink); box-shadow: none; }
