/* ads.css — paid presence (lane PAID): the ad strip under the visibility chart, its
   with-and-without view, the Answers row mark and the reader's page ads.
   Tokens only, by their console.css names (docs/brand-kit.md). The marks are the day
   strip's: an ad fills, a checked page with none is a quiet bar, couldn't check is
   hatched, a day nobody asked is a dotted outline. */

/* ── the strip ──────────────────────────────────────────────────────────── */
.ads-band { margin-top: var(--sp-4); font-size: var(--text-xs); color: var(--muted); }
.ads-lanes { display: grid; gap: var(--sp-2); }
.ads-lane { display: grid; gap: var(--sp-2); }
.ads-lane .ads-eng, .ads-lane .ads-track { margin-left: var(--ads-left, 0); width: var(--ads-width, 100%); }
.ads-eng { font-size: var(--text-xs); color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ads-track { position: relative; height: 14px; }
.ads-day { position: absolute; top: 0; width: 8px; height: 14px; margin-left: -4px; display: block; }
.ads-day.s-ad { background: var(--muted); }
.ads-day.s-no_ad { background: var(--track); border: 1px solid var(--line); }
.ads-day.s-couldnt_check { border: 1px solid var(--line-hover);
  background: repeating-linear-gradient(135deg, var(--line-hover) 0 2px, transparent 2px 4px); }
.ads-day.s-not_asked { border: 1px dotted var(--dot); }
.ads-day.door { cursor: pointer; }
.ads-day.door:hover { outline: 1px solid var(--line-hover); outline-offset: 1px; }
.ads-day:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.ads-day .v2-tip { width: max-content; max-width: 240px; }

/* ── the fold: with and without ───────────────────────────────────────────── */
.ads-fold { margin-top: var(--sp-4); }
.ads-fold > summary { display: flex; gap: var(--sp-4); align-items: baseline; cursor: pointer; list-style: none; }
.ads-fold > summary::-webkit-details-marker { display: none; }
.ads-fold.inner { margin-top: var(--sp-4); }
/* Open, the rows below say what the summary said: one statement, not two. */
.ads-fold[open] > summary > .v2-mono-note { display: none; }
.ads-db { margin-top: var(--sp-4); display: grid; gap: var(--sp-4); }
.ads-db-key { display: flex; gap: var(--sp-4); align-items: center; }
.ads-db-key .ads-dot { position: static; margin: 0 var(--sp-2) 0 0; transform: none; }
.ads-db-row, .ads-db-axis { display: grid; grid-template-columns: 120px 1fr minmax(0, 220px); align-items: center; gap: var(--sp-4); }
.ads-db-plot { position: relative; height: 16px; }
.ads-db-row .ads-db-plot::before { content: ""; position: absolute; left: 6%; right: 6%; top: 50%; height: 1px; background: var(--line); }
.ads-db-axis .ads-db-plot { height: 14px; }
.ads-db-tick { position: absolute; transform: translateX(-50%); font-family: var(--mono); font-size: var(--text-xs); color: var(--faint); }
.ads-db-words { font-size: var(--text-xs); color: var(--muted); font-variant-numeric: tabular-nums; }
.ads-dot { position: absolute; top: 50%; width: 10px; height: 10px; border-radius: 50%; transform: translate(-50%, -50%); display: inline-block; }
.ads-dot.with { background: var(--body); }
.ads-dot.without { background: var(--surface); border: 2px solid var(--body); }
.ads-ci { position: absolute; top: 50%; height: 2px; transform: translateY(-50%); background: var(--line-hover); }
.ads-link { position: absolute; top: 50%; height: 2px; transform: translateY(-50%); background: var(--muted); }
.ads-rows { width: 100%; border-collapse: collapse; table-layout: fixed; margin-top: var(--sp-2); }
.ads-rows th { text-align: left; font-weight: 500; color: var(--muted); padding: var(--sp-2) 0; border-bottom: 1px solid var(--line); }
.ads-rows td { padding: var(--sp-2) 0; border-bottom: 1px solid var(--line-light); color: var(--body); }
.ads-rows .val { font-family: var(--mono); font-variant-numeric: tabular-nums; }

/* ── the Answers row mark ───────────────────────────────────────────────── */
.ads-mark { position: relative; display: inline-flex; align-items: center; height: 18px; padding: 0 var(--sp-2);
  border: 1px solid var(--line-hover); border-radius: var(--r-sm); font-size: var(--text-xs); color: var(--muted); }
.ads-mark .v2-tip { width: max-content; max-width: 260px; }

/* ── the reader's page ads ──────────────────────────────────────────────── */
.ads-page { display: grid; grid-template-columns: auto 1fr; gap: var(--sp-6); margin-top: var(--sp-2); }
.ads-map { display: flex; gap: 3px; align-self: start; }
.ads-map-col { display: grid; gap: 3px; width: 54px; }
.ads-map-slot { min-height: 12px; display: flex; flex-wrap: wrap; gap: 2px; }
.ads-map-slot.top, .ads-map-slot.bottom { border: 1px dashed var(--line-hover); padding: 1px; }
.ads-map-slot.right { width: 16px; border: 1px dashed var(--line-hover); padding: 1px; align-content: flex-start; }
.ads-map-res { display: grid; gap: 3px; }
.ads-map-ans { height: 18px; background: var(--track); }
.ads-map-org { height: 5px; background: var(--line); }
.ads-map-n { width: 14px; height: 14px; display: inline-grid; place-items: center; font-family: var(--mono); font-size: var(--text-xs);
  line-height: 1; color: var(--surface); background: var(--body); }
.ads-crs { display: grid; gap: var(--sp-4); min-width: 0; }
.ads-cr { display: grid; grid-template-columns: 16px 1fr; gap: var(--sp-2); }
.ads-cr-n { width: 14px; height: 14px; display: inline-grid; place-items: center; font-family: var(--mono); font-size: var(--text-xs);
  color: var(--surface); background: var(--body); }
.ads-cr-body { display: grid; gap: 2px; min-width: 0; }
.ads-cr-h { color: var(--ink); font-size: var(--text-sm); font-weight: 500; }
.ads-cr-b { color: var(--body); font-size: var(--text-xs); }
.ads-cr-m { color: var(--faint); font-family: var(--mono); font-size: var(--text-xs); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
/* Narrow: the dumbbell stacks, name over plot over words, and the plot keeps the width. */
@media (max-width: 640px) {
  .ads-db-row, .ads-db-axis { grid-template-columns: 1fr; gap: var(--sp-2); }
  .ads-db-axis .ads-eng, .ads-db-axis .ads-db-words { display: none; }
  .ads-page { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) { .ads-band * { transition: none; } }

/* ── the Ads view (phase 3) ─────────────────────────────────────────────── */
.ads-view { gap: 14px; }
.ads-box { padding: var(--sp-7); }
.ads-box-t { font-size: var(--text-lg); font-weight: 600; color: var(--ink); }
.ads-box .v2-sec-head { margin-bottom: var(--sp-4); }
.ads-none { color: var(--muted); font-size: var(--text-sm); }

.ads-share { display: grid; gap: var(--sp-2); }
.ads-sh-row { display: grid; grid-template-columns: 34px minmax(120px, 220px) 1fr 76px 150px; align-items: center;
  gap: var(--sp-4); min-height: 34px; font-size: var(--text-sm); color: var(--body); }
.ads-sh-row.own { color: var(--muted); }
.ads-sh-rank { font-family: var(--mono); font-size: var(--text-xs); color: var(--faint); }
.ads-sh-name { display: flex; gap: var(--sp-2); align-items: baseline; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ads-kind { font-size: var(--text-xs); color: var(--faint); }
.ads-sh-bar { height: 8px; background: var(--track); display: block; }
.ads-sh-bar > i { display: block; height: 100%; background: var(--muted); }
.ads-sh-row.own .ads-sh-bar > i { background: var(--accent); }
.ads-sh-fig { font-family: var(--mono); font-size: var(--text-xs); color: var(--muted); font-variant-numeric: tabular-nums; text-align: right; }
.ads-tier { position: relative; display: inline-flex; gap: 2px; align-items: center; }
.ads-tier > i { width: 10px; height: 8px; background: var(--track); display: inline-block; }
.ads-tier > i.on { background: var(--muted); }
.ads-tier-w { margin-left: var(--sp-2); font-size: var(--text-xs); color: var(--faint); }
.ads-tier .v2-tip { width: max-content; max-width: 300px; }

.ads-tl { display: grid; gap: var(--sp-2); }
.ads-tl-lane { display: grid; grid-template-columns: minmax(120px, 220px) 1fr 120px; gap: var(--sp-4); align-items: center; min-height: 22px; }
.ads-tl-name { font-size: var(--text-sm); color: var(--body); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ads-tl-track { position: relative; height: 12px; border-bottom: 1px solid var(--line); }
.ads-tl-m { position: absolute; top: 1px; width: 6px; height: 10px; margin-left: -3px; background: var(--muted); }
.ads-tl-span { font-family: var(--mono); font-size: var(--text-xs); color: var(--faint); }
.ads-tl-axis { position: relative; height: 16px; }
.ads-tl-axis > span { position: absolute; transform: translateX(-50%); font-family: var(--mono); font-size: var(--text-xs); color: var(--faint); white-space: nowrap; }

.ads-grid { display: grid; grid-template-columns: 90px 1fr 1fr; gap: var(--sp-2); align-items: stretch; }
.ads-g-h { font-size: var(--text-xs); color: var(--muted); align-self: end; }
.ads-g-h.row { align-self: center; }
.ads-q { display: grid; gap: var(--sp-2); text-align: left; padding: var(--sp-4); border: 1px solid var(--line);
  border-radius: var(--r-sm); background: var(--surface); color: var(--body); font: inherit; cursor: pointer; min-height: 96px; }
.ads-q:hover { border-color: var(--line-hover); }
.ads-q.on { border-color: var(--ink); }
.ads-q:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.ads-q-n { font-family: var(--mono); font-size: var(--fig-sm); color: var(--ink); font-variant-numeric: tabular-nums; }
.ads-q-w { font-size: var(--text-sm); }
.ads-q-i { position: relative; font-size: var(--text-xs); color: var(--faint); }
.ads-q.q-bought .ads-q-i { color: var(--danger); }
.ads-qs { margin-top: var(--sp-6); }
.ads-qs-move { font-size: var(--text-sm); color: var(--ink); margin-bottom: var(--sp-2); }

.ads-dp { display: grid; grid-template-columns: minmax(120px, 220px) 1fr minmax(0, 320px); gap: var(--sp-4); align-items: center; min-height: 28px; }
.ads-dp-plot { position: relative; height: 16px; }
.ads-dp-plot::before { content: ""; position: absolute; left: 5%; right: 5%; top: 50%; height: 1px; background: var(--line); }
.ads-dp-zero { position: absolute; left: 50%; top: 0; bottom: 0; width: 1px; background: var(--line-hover); }
.ads-dp-w { position: relative; font-family: var(--mono); font-size: var(--text-xs); color: var(--muted); }
.ads-cr-h { color: var(--ink); }

@media (max-width: 640px) {
  .ads-sh-row { grid-template-columns: 26px 1fr auto; row-gap: var(--sp-2); padding: var(--sp-2) 0; }
  .ads-sh-rank { grid-area: 1 / 1; }
  .ads-sh-name { grid-area: 1 / 2; }
  .ads-sh-fig { grid-area: 1 / 3; white-space: nowrap; }
  .ads-sh-bar { grid-area: 2 / 2 / 3 / 4; }
  .ads-tier { grid-area: 3 / 2 / 4 / 4; }
  .ads-tl-lane, .ads-dp { grid-template-columns: 1fr; gap: var(--sp-2); }
  .ads-grid { grid-template-columns: 64px 1fr 1fr; }
  .ads-rows { table-layout: auto; }
}

/* Ad claims (§16): the ad's sentence and the approved fact, side by side, equal weight. */
.ads-cl { display: grid; grid-template-columns: 1fr 1fr; gap: var(--sp-3) var(--sp-7); padding: var(--sp-6) 0;
  border-bottom: 1px solid var(--line-light); }
.ads-cl:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.ads-cl-side { display: flex; flex-direction: column; gap: var(--sp-1); min-width: 0; }
.ads-cl-side q { color: var(--body); quotes: "“" "”" "‘" "’"; overflow-wrap: anywhere; }
.ads-cl-side.fact { padding-left: var(--sp-7); border-left: 1px solid var(--line); }
.ads-cl-w { grid-column: 1 / -1; font-size: var(--text-xs); color: var(--muted); font-variant-numeric: tabular-nums; }
.ads-cl-un { margin: var(--sp-2) 0 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: var(--sp-2); }
.ads-cl-un q { color: var(--body); overflow-wrap: anywhere; }
.ads-cl-def { margin-top: var(--sp-4); }
/* AD-2: the room a click has, then the click; the reason alone where the check is not open. */
.ads-cl-check { display: flex; align-items: center; justify-content: space-between; gap: var(--sp-3);
  flex-wrap: wrap; margin-bottom: var(--sp-3); }
/* The Agent's door on a row (AGT B4-8): its own column where drawn, its own line on a phone. */
.ads-sh-row.has-door { grid-template-columns: 34px minmax(120px, 220px) 1fr 76px 150px auto; }
.ads-dp.has-door { grid-template-columns: minmax(120px, 220px) 1fr minmax(0, 320px) auto; }
.ads-cl-act { grid-column: 1 / -1; display: flex; align-items: center; gap: var(--sp-4); justify-content: flex-end; }
@media (max-width: 640px) {
  .ads-cl { grid-template-columns: 1fr; }
  .ads-sh-row.has-door { grid-template-columns: 26px 1fr auto; }
  .ads-sh-row .agp-door { grid-area: 3 / 2 / 4 / 4; justify-self: start; }
  .ads-dp.has-door { grid-template-columns: 1fr; }
  .ads-cl-side.fact { padding-left: 0; border-left: 0; padding-top: var(--sp-4); border-top: 1px solid var(--line-light); }
}
