/* Answer pages: one page per question people search for (T-1222).
   Same section system as trace.html and status.html: each section is one
   screen tall with its content centred, bands alternate white and paper,
   and each band is a two-line heading plus one white panel. Shared so the
   next question pages look the same. */

:root { --header-h: 74px; }

.ap-screen {
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-height: 100vh;
  min-height: 100svh;
  padding-top: calc(var(--header-h) + 24px);
  padding-bottom: 56px;
}

.ap-band { background: var(--paper); border-block: 1px solid var(--line); }

.panel {
  position: relative;
  margin-top: clamp(32px, 5.5vh, 50px);
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 40px 44px;
}

/* Small mono label above a column. */
.ap-lbl {
  font-family: var(--mono);
  font-size: 0.7rem;
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--blue);
}

/* One line under a panel's content: a source or a closing note. */
.ap-cap {
  margin-top: 30px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
  font-size: 0.9rem;
  color: var(--muted);
}

.ap-cap a { color: var(--ink); text-decoration: underline; text-decoration-color: var(--line-2); text-underline-offset: 3px; }
.ap-cap a:hover { color: var(--blue); text-decoration-color: currentColor; }

/* ---- Hero: the question and its answer ----------------------------- */
.ap-hero { padding-top: calc(var(--header-h) + 40px); padding-bottom: 64px; }

.ap-h1 {
  font-size: clamp(2.6rem, 6.2vw, 5.1rem);
  font-weight: 600;
  line-height: 0.98;
  letter-spacing: -0.045em;
}

.ap-h1 .muted2 { color: var(--faint); }

.ap-hero .lead { margin-top: 28px; max-width: 36em; color: var(--ink); }
.ap-hero .hero__cta { margin-top: 36px; }

/* An answer split into short lines, with room between them. */
.ap-hero .ap-answer { margin-top: 28px; max-width: 46rem; }
.ap-hero .ap-answer .lead { max-width: none; }
.ap-hero .ap-answer .lead { margin-top: 0; line-height: 1.6; }
.ap-hero .ap-answer .lead + .lead { margin-top: 14px; }
.ap-hero .ap-answer b { font-weight: 600; color: var(--ink); }

.ap-checked {
  margin-top: 22px;
  font-family: var(--mono);
  font-size: 0.74rem;
  color: var(--faint);
}

.ap-hero .ap-h1,
.ap-hero .lead,
.ap-hero .ap-answer,
.ap-hero .hero__cta,
.ap-hero .ap-checked { animation: ap-rise 0.9s var(--ease) both; }
.ap-hero .lead,
.ap-hero .ap-answer { animation-delay: 0.08s; }
.ap-hero .ap-answer .lead { animation: none; }
.ap-hero .hero__cta { animation-delay: 0.16s; }
.ap-hero .ap-checked { animation-delay: 0.22s; }

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

/* ---- Four columns split by hairlines -------------------------------- */
.ap-cols {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin: 0;
  padding: 0;
  list-style: none;
}

.ap-cols li { min-width: 0; padding: 0 28px; border-left: 1px solid var(--line); }
.ap-cols li:first-child { padding-left: 0; border-left: 0; }
.ap-cols li:last-child { padding-right: 0; }
.ap-cols--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.ap-cols h3 { margin-top: 14px; font-size: 1.15rem; line-height: 1.2; letter-spacing: -0.02em; }
.ap-cols h3 + p { margin-top: 10px; font-size: 0.94rem; line-height: 1.55; }

/* ---- Yes / no table -------------------------------------------------- */
.ap-panel-table { padding-top: 26px; padding-bottom: 22px; }
.ap-panel-bars { padding-top: 20px; padding-bottom: 24px; }

.ap-table { width: 100%; border-collapse: collapse; }

.ap-table th,
.ap-table td { padding: 12px 0; border-top: 1px solid var(--line); text-align: left; vertical-align: top; }

.ap-table thead th {
  padding-top: 0;
  padding-bottom: 14px;
  border-top: 0;
  font-family: var(--mono);
  font-size: 0.7rem;
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--blue);
}

.ap-table tbody th { width: 44%; padding-right: 32px; font-size: 1rem; font-weight: 500; line-height: 1.45; color: var(--ink); }
.ap-table td { width: 28%; padding-right: 20px; }
.ap-table td:last-child { padding-right: 0; }

.ap-table b { display: block; font-size: 1rem; font-weight: 600; line-height: 1.45; }
.ap-table b.y { color: var(--ink); }
.ap-table b.p { color: var(--ink); }
.ap-table b.n { color: var(--faint); }
.ap-table small { display: block; margin-top: 2px; font-size: 0.86rem; line-height: 1.45; color: var(--muted); }

/* Two-column table (label + plain text) and the scraper table. */
.ap-table--two tbody th { width: 30%; }
.ap-table--family tbody th { width: 24%; }
.ap-table--two td,
.ap-table--family td { width: auto; font-size: 0.95rem; line-height: 1.5; color: var(--muted); }
.ap-table--family td:last-child { width: 22%; white-space: nowrap; color: var(--ink); }
.ap-panel-table .ap-cap { margin-top: 12px; }
.section-head.ap-head-wide { max-width: 960px; }

/* Three-column table (route, free, after that) with our row marked. */
.ap-table--three tbody th { width: 28%; }
.ap-table--three td { width: 30%; font-size: 0.95rem; line-height: 1.5; color: var(--muted); }
.ap-table--three td:last-child { width: 42%; }
.ap-table tr.us th, .ap-table tr.us td:first-of-type { color: var(--blue); }

@media (min-width: 721px) {
  .ap-table--pricing tbody th { width: 26%; }
  .ap-table--pricing td { width: 33%; }
  .ap-table--pricing td:last-child { width: 41%; }
}

/* ---- Price bars ------------------------------------------------------ */
/* The spend switch sits beside the section intro, over the panel's right edge. */
.ap-head-row { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; }
.ap-head-row .ap-seg { flex: none; }

.ap-seg {
  display: inline-flex;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: var(--pill);
  background: var(--paper);
}

.ap-seg button {
  padding: 7px 16px;
  border: 0;
  border-radius: var(--pill);
  background: none;
  font-size: 0.88rem;
  font-weight: 500;
  color: var(--muted);
  transition: background 0.2s, color 0.2s, box-shadow 0.2s;
}

.ap-seg button[aria-pressed="true"] { background: var(--white); color: var(--ink); box-shadow: 0 1px 3px rgba(11, 16, 32, 0.12); }
.ap-seg button:focus-visible { outline: 2px solid var(--blue); outline-offset: 2px; }

.ap-bars { margin: 0; padding: 0; list-style: none; }

.ap-bars li {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr) 64px;
  align-items: center;
  gap: 28px;
  padding: 9px 0;
  border-top: 1px solid var(--line);
}

.ap-bars li:first-child { border-top: 0; }

.ap-who b { display: block; font-size: 1rem; font-weight: 600; color: var(--ink); }
.ap-who span { display: block; margin-top: 2px; font-size: 0.86rem; line-height: 1.45; color: var(--muted); }

.ap-bars i {
  display: block;
  width: var(--w);
  height: 10px;
  border-radius: 3px;
  background: rgba(11, 16, 32, 0.2);
  transform-origin: left center;
  transition: transform 0.7s var(--ease);
}

.ap-bars li.us i { background: var(--blue); }

.ap-bars em {
  font-style: normal;
  font-size: 1.15rem;
  font-weight: 600;
  letter-spacing: -0.02em;
  text-align: right;
  color: var(--ink);
  font-variant-numeric: tabular-nums;
}

.ap-bars li.us em { color: var(--blue); }

/* With JS, bars grow when the list comes into view or is switched to. */
.ap-js .ap-bars i { transform: scaleX(0); }
.ap-js .ap-bars.in i { transform: none; }
.ap-js .ap-bars.in li:nth-child(2) i { transition-delay: 0.05s; }
.ap-js .ap-bars.in li:nth-child(3) i { transition-delay: 0.1s; }
.ap-js .ap-bars.in li:nth-child(4) i { transition-delay: 0.15s; }
.ap-js .ap-bars.in li:nth-child(5) i { transition-delay: 0.2s; }

.ap-foot { margin-top: 8px; padding-top: 14px; border-top: 1px solid var(--line); }
.ap-foot p { font-size: 0.88rem; line-height: 1.55; color: var(--muted); }
.ap-foot p + p { margin-top: 4px; }
.ap-foot b { font-weight: 600; color: var(--ink); }

/* ---- Two columns ----------------------------------------------------- */
.ap-two { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.ap-two > div { min-width: 0; padding: 0 40px; border-left: 1px solid var(--line); }
.ap-two > div:first-child { padding-left: 0; border-left: 0; }
.ap-two > div:last-child { padding-right: 0; }
.ap-two h3 { margin-top: 14px; font-size: 1.35rem; letter-spacing: -0.02em; }
.ap-two ul { margin: 18px 0 0; padding: 0; list-style: none; }

.ap-two li {
  position: relative;
  padding-left: 20px;
  font-size: 0.97rem;
  line-height: 1.5;
  color: var(--ink);
}

.ap-two li + li { margin-top: 10px; }
.ap-two li::before { content: ""; position: absolute; left: 0; top: 0.7em; width: 8px; height: 2px; border-radius: 1px; background: var(--blue); transform: translateY(-50%); }

/* ---- Questions ------------------------------------------------------- */
.page-faq__items { margin-top: 32px; max-width: 900px; }
.page-faq details { border-bottom: 1px solid var(--line); padding: 16px 0; }
.page-faq summary { cursor: pointer; color: var(--ink); font-weight: 600; font-size: 1.08rem; }
.page-faq summary:focus-visible { outline: 2px solid var(--blue); outline-offset: 6px; }
.page-faq details p { margin-top: 14px; max-width: 68ch; line-height: 1.65; }

.ap-next .hero__cta { margin-top: 34px; }

/* ---- Guides list (guides.html) ------------------------------------- */
.ap-guides { padding-top: 14px; padding-bottom: 14px; }
.ap-guides ol { margin: 0; padding: 0; list-style: none; }
.ap-guides li + li { border-top: 1px solid var(--line); }

.ap-guides a {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  column-gap: 32px;
  padding: 20px 0;
}

/* Label, title and summary stay in the first column; only the date sits right. */
.ap-guides a > :not(time) { grid-column: 1; }

.ap-guides h2 { margin-top: 10px; font-size: 1.5rem; line-height: 1.2; letter-spacing: -0.02em; transition: color 0.2s; }
.ap-guides a:hover h2 { color: var(--blue); }
.ap-guides a:focus-visible { outline: 2px solid var(--blue); outline-offset: 4px; border-radius: 6px; }
.ap-guides h2 + p { margin-top: 6px; font-size: 0.97rem; }

.ap-guides time {
  grid-column: 2;
  grid-row: 1;
  align-self: center;
  font-family: var(--mono);
  font-size: 0.72rem;
  color: var(--faint);
}

/* ---- Narrow screens -------------------------------------------------- */
@media (max-width: 1100px) {
  .ap-bars li { grid-template-columns: minmax(0, 2.6fr) minmax(0, 1fr) 64px; }
}

@media (max-width: 980px) {
  .ap-cols { grid-template-columns: repeat(2, minmax(0, 1fr)); row-gap: 30px; }
  .ap-cols li:nth-child(odd) { padding-left: 0; border-left: 0; }
  .ap-cols li:nth-child(even) { padding-right: 0; }
  .ap-cols li:nth-child(n+3) { padding-top: 30px; border-top: 1px solid var(--line); }
}

@media (max-width: 860px) {
  .ap-bars li { grid-template-columns: minmax(0, 1fr) 64px; grid-template-areas: "who price" "bar bar"; row-gap: 10px; column-gap: 16px; }
  .ap-who { grid-area: who; }
  .ap-bars em { grid-area: price; align-self: start; }
  .ap-bars i { grid-area: bar; }
}

@media (max-width: 720px) {
  .ap-screen { padding-top: calc(var(--header-h) + 16px); padding-bottom: 40px; }
  .section-head .h2, .page-faq .h2 { font-size: clamp(1.9rem, 8.6vw, 2.3rem); }
  .section-head p { margin-top: 14px; font-size: 0.98rem; line-height: 1.5; }
  .panel { margin-top: 28px; padding: 24px 20px; border-radius: 20px; }
  .ap-h1 { font-size: clamp(2.3rem, 11vw, 3rem); }
  .ap-hero .lead { margin-top: 22px; font-size: 1.04rem; }
  .ap-hero .ap-answer { margin-top: 22px; }
  .ap-hero--comments .hero__cta, .ap-hero--pricing .hero__cta { margin-top: 28px; }
  .ap-hero .ap-answer .lead { margin-top: 0; }
  .ap-hero .ap-answer .lead + .lead { margin-top: 10px; }

  .ap-cols { grid-template-columns: 1fr; row-gap: 0; }
  .ap-cols li, .ap-cols li:nth-child(n) { padding: 18px 0 0; border-left: 0; }
  .ap-cols li + li { margin-top: 18px; border-top: 1px solid var(--line); }
  .ap-cols li:first-child { padding-top: 0; }
  .ap-cols h3 { margin-top: 8px; }
  .ap-cols h3 + p { margin-top: 6px; }

  /* The table becomes one block per row: the need, then both answers. */
  .ap-panel-table { padding-top: 20px; padding-bottom: 20px; }
  .ap-table thead { display: none; }
  .ap-table, .ap-table tbody { display: block; }
  .ap-table tr { display: grid; grid-template-columns: 1fr 1fr; column-gap: 16px; padding: 14px 0; border-top: 1px solid var(--line); }
  .ap-table tr:first-child { padding-top: 0; border-top: 0; }
  .ap-table th, .ap-table td { width: auto; padding: 0; border-top: 0; }
  .ap-table tbody th { grid-column: 1 / -1; width: auto; padding: 0 0 8px; font-size: 0.97rem; }
  .ap-table td::before { content: attr(data-label); display: block; margin-bottom: 2px; font-family: var(--mono); font-size: 0.64rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--blue); }
  .ap-table b { font-size: 0.95rem; }
  .ap-table small { font-size: 0.82rem; }
  .ap-table--two tr { grid-template-columns: 1fr; }
  .ap-table--two td::before { display: none; }
  .ap-table--two tbody th { padding-bottom: 4px; }
  .ap-table--family tr { grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); }
  .ap-table--family td:last-child { width: auto; white-space: nowrap; }
  .ap-table--two td, .ap-table--family td { font-size: 0.9rem; }
  .ap-table--three td, .ap-table--three td:last-child { width: auto; font-size: 0.9rem; }

  .ap-two { grid-template-columns: 1fr; }
  .ap-two > div, .ap-two > div:first-child, .ap-two > div:last-child { padding: 0; border-left: 0; }
  .ap-two > div + div { margin-top: 24px; padding-top: 24px; border-top: 1px solid var(--line); }
  .ap-two h3 { margin-top: 8px; font-size: 1.2rem; }
  .ap-two ul { margin-top: 12px; }

  .ap-cap { margin-top: 22px; }

  .ap-head-row { display: block; }
  .ap-head-row .ap-seg { margin-top: 18px; }

  .ap-guides { padding-top: 4px; padding-bottom: 4px; }
  .ap-guides a { grid-template-columns: 1fr; padding: 16px 0; }
  .ap-guides h2 { font-size: 1.25rem; }
  .ap-guides time { grid-column: 1; grid-row: auto; margin-top: 10px; }
}

/* Short laptop screens (1366x768 and similar): tighter vertical rhythm so
   each section still fits one screen. */
@media (max-height: 820px) and (min-width: 721px) {
  .ap-screen { padding-top: calc(var(--header-h) + 12px); padding-bottom: 32px; }
  .ap-screen .h2 { font-size: clamp(2rem, 3.6vw, 2.9rem); }
  .ap-screen .section-head p { margin-top: 12px; }
  .ap-screen .panel { margin-top: 26px; }
  .ap-table th, .ap-table td { padding-top: 10px; padding-bottom: 10px; }
  .ap-bars li { padding: 7px 0; }
  .ap-cap { margin-top: 22px; padding-top: 14px; }
}

@media (prefers-reduced-motion: reduce) {
  .ap-hero .ap-h1, .ap-hero .lead, .ap-hero .ap-answer, .ap-hero .hero__cta, .ap-hero .ap-checked { animation: none; }
  .ap-js .ap-bars i { transform: none; transition: none; }
}
