/* What a Buyout Buys. Uses the shared variables from /shared/site.css. */

.bo { padding-bottom: 2rem; }

/* ---------- The question ---------- */
.bo-hero {
  min-height: calc(100svh - 70px);
  display: flex; flex-direction: column; justify-content: center;
  padding: 1.5rem 0 3rem;
}
.bo-hero .kicker { text-align: center; }
.bo-question {
  font-size: clamp(1.9rem, 1.2rem + 3.4vw, 3.6rem); font-weight: 800; letter-spacing: -0.035em;
  line-height: 1.22; text-align: center; margin: 0.2rem 0 1.2rem;
}
.bo-pick {
  display: inline-block; position: relative; vertical-align: baseline; max-width: 100%;
  color: var(--accent); border-bottom: 0.08em solid var(--accent);
  padding-right: 0.75em; cursor: pointer;
  background-image: linear-gradient(45deg, transparent 50%, var(--accent) 50%), linear-gradient(135deg, var(--accent) 50%, transparent 50%);
  background-position: calc(100% - 0.3em) 58%, calc(100% - 0.05em) 58%;
  background-size: 0.25em 0.25em; background-repeat: no-repeat;
}
.bo-pick:hover { color: #e0441f; }
.bo-pick:focus-within { outline: 3px solid var(--accent); outline-offset: 4px; border-radius: 4px; }
.bo-pick__label { white-space: nowrap; }
/* The real dropdown: invisible, covering the words, normal-size text so its menu is normal size. */
.bo-pick select {
  position: absolute; inset: 0; width: 100%; height: 100%;
  opacity: 0; cursor: pointer; font-size: 16px; margin: 0;
}

.bo-context { font-size: var(--step-1); text-align: center; max-width: 34ch; margin: 0 auto 0.5rem; }
.bo-note { color: var(--ink-soft); font-size: var(--step--1); text-align: center; max-width: 46ch; margin: 0 auto 0.3rem; }
.bo-hero > .bo-cite { text-align: center; }
.bo-cite { font-size: var(--step--1); color: var(--ink-faint); margin-bottom: 0.6rem; }
.bo-cite a { color: var(--ink-soft); }

.bo-legend { display: flex; gap: 1rem; align-items: flex-start; margin: 1.2rem 0 0; padding: 1.1rem 1.2rem; }
.bo-legend img { flex: 0 0 auto; width: 56px; height: 56px; }
.bo-legend__each { margin: 0 0 0.3rem; }
.bo-legend__each strong { font-family: var(--font-display); font-size: var(--step-1); letter-spacing: -0.02em; display: block; line-height: 1.15; }
.bo-legend__about { font-size: var(--step--1); color: var(--ink-soft); margin-bottom: 0.3rem; }
.bo-legend .bo-cite { margin: 0; }

.bo-cue { font-family: var(--font-display); font-weight: 700; font-size: var(--step-1); text-align: center; margin: 1.8rem 0 0; }
.bo-cue span { display: inline-block; animation: bo-bob 1.6s ease-in-out infinite; }
@keyframes bo-bob { 50% { transform: translateY(6px); } }

/* ---------- Sticky question bar ---------- */
.bo-bar {
  position: fixed; top: 0; left: 0; right: 0; z-index: 50;
  display: flex; align-items: center; justify-content: center; gap: 0.6rem;
  padding: 0.3rem 1rem; font-size: var(--step--1); font-weight: 700;
  background: rgba(251, 247, 240, 0.94); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
  border-bottom: 1px solid var(--line);
}
.bo-bar[hidden] { display: none; }
.bo-bar__what { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.bo-bar__change {
  font: inherit; color: var(--accent); background: none; border: 0;
  min-height: 44px; padding: 0 0.3rem; cursor: pointer; flex-shrink: 0;
}

/* ---------- The long field ---------- */
.bo-run { position: relative; margin: 0 0 3rem; }
.bo-field { position: relative; width: 100%; }
.bo-field canvas { position: absolute; left: 0; }
.bo-field canvas.is-in { animation: bo-fade 400ms ease both; }
@keyframes bo-fade { from { opacity: 0; } to { opacity: 1; } }

/* Few enough pictures to be real images, with cards between them */
.bo-field.is-dom { display: flex; flex-direction: column; gap: var(--gap); }
.bo-run-row { display: flex; flex-wrap: wrap; justify-content: center; gap: var(--gap); }
.bo-run-row:empty { display: none; }
.bo-run-row img { width: var(--cell); height: var(--cell); }

.bo-marker { position: relative; height: 0; border-top: 2px dashed var(--ink); margin: 1.1rem 0; pointer-events: none; z-index: 2; }
.bo-marker.is-overlay { position: absolute; left: 0; right: 0; margin: 0; }
.bo-marker span {
  position: absolute; left: 50%; top: 0; transform: translate(-50%, -50%);
  max-width: calc(100% - 1rem); width: max-content; text-align: center;
  padding: 0.45rem 0.85rem; border-radius: 999px;
  font-weight: 700; font-size: var(--step--1); line-height: 1.25;
  background: var(--paper); color: var(--ink); box-shadow: var(--shadow);
}
.bo-marker.is-remark { border-top: 0; }
.bo-marker.is-remark span {
  background: var(--ink); color: var(--paper);
  font-family: var(--font-display); font-size: var(--step--1);
}

.bo-project { margin: 0.6rem 0; padding: 1rem 1.2rem; border-left: 5px solid #2f9bd6; }
.bo-project .stat-label { color: #1f7bb0; }
.bo-project__title { font-family: var(--font-display); font-weight: 800; font-size: var(--step-1); letter-spacing: -0.02em; line-height: 1.15; margin: 0.25rem 0 0.4rem; }
.bo-project__who { margin: 0; font-size: var(--step--1); color: var(--ink-soft); }
.bo-project__who a { color: var(--accent); font-weight: 700; }

.bo-counter {
  position: sticky; bottom: 1rem; z-index: 5;
  width: max-content; max-width: 100%; margin: 1rem auto 0;
  padding: 0.55rem 1.1rem; border-radius: 999px; text-align: center;
  background: var(--accent); color: var(--accent-ink);
  font-family: var(--font-display); font-weight: 800; font-size: var(--step-1); line-height: 1.15;
  font-variant-numeric: tabular-nums; box-shadow: var(--shadow);
  opacity: 0; transition: opacity 200ms ease;
}
.bo-counter.is-on { opacity: 1; }
.bo-counter__money { display: block; font-family: var(--font-body); font-weight: 600; font-size: var(--step--1); opacity: 0.9; }

/* ---------- The answer ---------- */
.bo-finale { text-align: center; padding: 3rem 0 4rem; }
.bo-finale__number {
  font-family: var(--font-display); font-weight: 800; letter-spacing: -0.05em; line-height: 1;
  font-size: clamp(3.4rem, 15vw, 7.5rem); margin: 0.3rem 0 0.4rem; font-variant-numeric: tabular-nums;
}
.bo-finale__what { font-size: var(--step-1); max-width: 30ch; margin: 0 auto 2rem; }
.bo-share__sentence {
  font-family: var(--font-display); font-weight: 800; font-size: var(--step-1); letter-spacing: -0.02em; line-height: 1.2;
  background: #cdefd6; text-align: left; margin: 0 0 1.4rem; padding: 1.4rem;
}
.bo-split { font-weight: 700; margin: 1.8rem auto 0; max-width: 34ch; }
.bo-split .bo-cite { font-weight: 400; }
.bo-try { margin: 1.2rem 0 0; color: var(--ink-soft); font-size: var(--step--1); }
.bo-chip {
  font: inherit; font-weight: 700; color: var(--ink); cursor: pointer;
  background: var(--card); border: 2px solid var(--line); border-radius: 999px;
  min-height: 44px; padding: 0.4rem 0.9rem; margin: 0.25rem;
}
.bo-chip:hover { border-color: var(--ink); }

/* ---------- Sources ---------- */
.bo-sources { font-size: var(--step--1); color: var(--ink-soft); }
.bo-h2 { font-size: var(--step-2); font-weight: 800; letter-spacing: -0.03em; color: var(--ink); }
.bo-method { padding-left: 1.1rem; }
.bo-method li { margin-bottom: 0.5rem; }
.bo-source-list { padding-left: 1.6rem; }
.bo-source-list li { margin-bottom: 0.45rem; scroll-margin-top: 70px; }
.bo-source-list li:target { background: #fff3c4; border-radius: 4px; }
