.aq-shell {
  position: relative;
  overflow: hidden;
  background: var(--surface);
  border: 2px solid var(--ink);
  border-bottom-width: 5px;
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  padding: 24px;
}

.aq-ribbon {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 6px;
  display: grid;
  grid-template-columns: 2fr 1fr;
}

.aq-ribbon-a {
  background: var(--primary);
}

.aq-ribbon-b {
  background: var(--accent);
}

.aq-banner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 16px;
  margin-bottom: 16px;
  border-radius: var(--radius);
  background: var(--accent-soft);
  border: 2px solid var(--ink);
  font-size: 14px;
  color: var(--ink);
}

.aq-banner-text {
  margin: 0;
  line-height: 1.5;
  font-weight: 600;
}

.aq-last-run {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 8px 12px;
  margin-bottom: 12px;
  border-radius: var(--radius);
  background: var(--bg);
  border: 1px solid var(--border);
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--muted);
}

/* Quiz Header & Live Telemetry */
.aq-top {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-top: 4px;
  margin-bottom: 12px;
}

.aq-top-left,
.aq-top-right {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.aq-tag {
  display: inline-block;
  padding: 4px 12px;
  border-radius: 999px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  color: var(--primary);
  font-weight: 600;
  font-size: 12px;
}

.aq-mode-tag {
  display: inline-block;
  padding: 4px 12px;
  border-radius: 999px;
  background: var(--accent-soft);
  border: 1px solid var(--accent);
  color: var(--ink);
  font-family: var(--font-mono);
  font-weight: 600;
  font-size: 12px;
}

.aq-mono {
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 600;
  color: var(--muted);
}

.aq-lock-pill {
  display: inline-block;
  padding: 4px 8px;
  border-radius: 8px;
  background: var(--ink);
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 600;
  color: #ffffff;
}

.aq-progress-track {
  width: 100%;
  height: 8px;
  background: var(--bg);
  border-radius: 999px;
  overflow: hidden;
  margin-bottom: 12px;
  border: 1px solid var(--border);
}

.aq-progress-fill {
  height: 100%;
  width: 6%;
  background: var(--primary);
  border-radius: 999px;
  transition: width 0.25s ease;
}

/* Sleek Compact Live Strata Radar */
.aq-radar {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 12px 16px;
  margin-bottom: 20px;
}

.aq-radar-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 8px;
}

.aq-radar-label {
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 600;
  color: var(--muted);
}

.aq-radar-window {
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 600;
  color: var(--primary);
}

.aq-radar-track {
  position: relative;
  height: 10px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 999px;
  overflow: hidden;
}

.aq-radar-band {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0%;
  width: 100%;
  background: rgba(29, 78, 216, 0.22);
  border-left: 2px solid var(--primary);
  border-right: 2px solid var(--primary);
  border-radius: 999px;
  transition: left 0.28s ease, width 0.28s ease;
}

.aq-radar-pin {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 50%;
  width: 6px;
  margin-left: -3px;
  background: var(--accent);
  border-radius: 999px;
  transition: left 0.28s ease, opacity 0.25s ease;
  opacity: 0;
}

.aq-radar-ticks {
  display: flex;
  justify-content: space-between;
  margin-top: 4px;
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--muted);
}

.aq-signal {
  margin: 8px 0 0 0;
  font-size: 12px;
  line-height: 1.45;
  color: var(--muted);
}

/* Question Card */
.aq-q-card {
  margin-bottom: 20px;
}

.aq-q-kicker {
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 600;
  color: var(--primary);
  margin: 0 0 4px 0;
}

.aq-q-title {
  font-family: var(--font-heading);
  font-size: 28px;
  font-weight: 800;
  line-height: 1.2;
  color: var(--text);
  margin: 0 0 8px 0;
}

.aq-q-sub {
  font-size: 16px;
  color: var(--muted);
  margin: 0;
  line-height: 1.5;
}

/* Tactile Pressable Arcade Answer Buttons */
.aq-options {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
}

.aq-options.aq-options-grid2 {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.aq-opt {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  min-height: 56px;
  padding: 12px 16px;
  text-align: left;
  background: var(--surface);
  color: var(--text);
  border: 2px solid var(--border);
  border-bottom: 4px solid var(--border);
  border-radius: var(--radius);
  font-family: var(--font-body);
  font-size: 16px;
  font-weight: 600;
  line-height: 1.4;
  cursor: pointer;
  transition: border-color 0.12s ease, background-color 0.12s ease, transform 0.08s ease;
}

.aq-opt-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.aq-opt-desc {
  font-size: 12px;
  font-weight: 400;
  color: var(--muted);
}

.aq-opt:hover {
  border-color: var(--ink);
  background: var(--surface-2);
}

.aq-opt:active {
  transform: translateY(2px);
}

.aq-opt:focus-visible,
.aq-btn-primary:focus-visible,
.aq-btn-secondary:focus-visible,
.aq-chip:focus-visible,
.aq-story-tab:focus-visible,
.aq-link-btn:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
}

.aq-opt-key {
  flex: 0 0 28px;
  height: 28px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  background: var(--bg);
  border: 1px solid var(--border);
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 600;
  color: var(--ink);
}

.aq-opt:hover .aq-opt-key {
  background: var(--accent);
  border-color: var(--ink);
  color: var(--ink);
}

.aq-foot {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 20px;
  padding-top: 16px;
  border-top: 1px solid var(--border);
}

.aq-hint {
  font-size: 12px;
  color: var(--muted);
}

/* Dramatic One-Shot Reveal Stage */
.aq-reveal-box {
  text-align: center;
  padding: 32px 16px;
  background: var(--bg);
  border: 2px solid var(--ink);
  border-radius: var(--radius);
}

.aq-reveal-kicker {
  display: inline-block;
  padding: 4px 12px;
  border-radius: 999px;
  background: var(--accent);
  border: 2px solid var(--ink);
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 600;
  color: var(--ink);
  margin: 0 0 12px 0;
}

.aq-reveal-lead {
  font-family: var(--font-heading);
  font-size: 22px;
  color: var(--muted);
  margin: 0 0 8px 0;
}

.aq-reveal-age {
  font-family: var(--font-heading);
  font-size: 48px;
  font-weight: 800;
  line-height: 1.1;
  color: var(--text);
  margin: 0 0 8px 0;
}

.aq-reveal-sub {
  font-family: var(--font-mono);
  font-size: 14px;
  color: var(--primary);
  margin: 0 0 24px 0;
}

.aq-reveal-verdict {
  max-width: 520px;
  margin: 0 auto;
  padding-top: 24px;
  border-top: 1px solid var(--border);
}

.aq-reveal-q {
  font-size: 16px;
  font-weight: 600;
  color: var(--text);
  margin: 0 0 12px 0;
}

.aq-reveal-btns {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  margin-bottom: 16px;
}

.aq-real-stepper {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 8px 0 16px 0;
}

.aq-step-btn {
  width: 44px;
  height: 44px;
  border-radius: var(--radius);
  border: 2px solid var(--ink);
  background: var(--surface);
  color: var(--ink);
  font-size: 22px;
  font-weight: 700;
  cursor: pointer;
}

.aq-step-btn:hover {
  background: var(--accent-soft);
}

.aq-real-input {
  width: 96px;
  min-height: 44px;
  padding: 0 12px;
  text-align: center;
  border: 2px solid var(--ink);
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--text);
  font-family: var(--font-mono);
  font-size: 18px;
  font-weight: 600;
}

.aq-reveal-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
  margin-top: 8px;
}

/* Buttons */
.aq-btn-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 16px;
  background: var(--surface);
  color: var(--text);
  border: 2px solid var(--border);
  border-bottom: 4px solid var(--border);
  border-radius: var(--radius);
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: border-color 0.12s ease, background-color 0.12s ease, transform 0.08s ease;
}

.aq-btn-secondary:hover:not(:disabled) {
  border-color: var(--ink);
  background: var(--surface-2);
}

.aq-btn-secondary:active:not(:disabled) {
  transform: translateY(2px);
}

.aq-btn-secondary:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.aq-btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 24px;
  background: var(--primary);
  color: #ffffff;
  border: 2px solid var(--ink);
  border-bottom: 4px solid var(--ink);
  border-radius: var(--radius);
  font-family: var(--font-heading);
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
  transition: background-color 0.12s ease, transform 0.08s ease;
}

.aq-btn-primary:hover {
  background: var(--primary-hover);
}

.aq-btn-primary:active {
  transform: translateY(2px);
}

.aq-link-btn {
  background: none;
  border: none;
  padding: 4px 8px;
  font-family: var(--font-body);
  font-size: 12px;
  font-weight: 600;
  color: var(--muted);
  text-decoration: underline;
  cursor: pointer;
}

.aq-link-btn:hover {
  color: var(--primary);
}

/* Story Switcher Bar */
.aq-story-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 16px;
}

.aq-story-tab {
  min-height: 44px;
  padding: 0 12px;
  border-radius: var(--radius);
  border: 2px solid var(--border);
  background: var(--bg);
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: border-color 0.12s ease, color 0.12s ease, background-color 0.12s ease;
}

.aq-story-tab:hover {
  border-color: var(--ink);
  color: var(--ink);
}

.aq-story-tab[aria-pressed="true"] {
  background: var(--ink);
  border-color: var(--ink);
  color: #ffffff;
}

/* Friend Comparison Card */
.aq-friend-vs {
  background: var(--accent-soft);
  border: 2px solid var(--ink);
  border-radius: var(--radius);
  padding: 16px;
  margin-bottom: 20px;
}

.aq-friend-vs-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 8px;
}

.aq-friend-vs-title {
  font-family: var(--font-heading);
  font-size: 18px;
  font-weight: 800;
  color: var(--ink);
  margin: 0;
}

.aq-friend-vs-body {
  margin: 0;
  font-size: 14px;
  color: var(--ink);
  line-height: 1.6;
}

/* Result Swiss-Pop Poster Card */
.aq-stamp-card {
  position: relative;
  background: var(--bg);
  border: 2px solid var(--ink);
  border-radius: var(--radius);
  padding: 24px;
  margin-bottom: 24px;
}

.aq-stamp-header {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding-bottom: 16px;
  border-bottom: 2px solid var(--border);
  margin-bottom: 16px;
}

.aq-stamp-kicker {
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 600;
  color: var(--primary);
  margin: 0 0 4px 0;
}

.aq-stamp-age-row {
  display: flex;
  align-items: baseline;
  gap: 12px;
  flex-wrap: wrap;
}

.aq-stamp-age {
  font-family: var(--font-heading);
  font-size: 48px;
  font-weight: 800;
  line-height: 1.1;
  color: var(--text);
  margin: 0;
}

.aq-stamp-margin {
  font-family: var(--font-mono);
  font-size: 14px;
  font-weight: 600;
  color: var(--muted);
}

.aq-stamp-seal {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-width: 156px;
  padding: 12px 16px;
  border: 2px solid var(--ink);
  border-bottom-width: 4px;
  border-radius: var(--radius);
  background: var(--accent);
  text-align: center;
}

.aq-seal-era {
  font-family: var(--font-heading);
  font-size: 18px;
  font-weight: 800;
  line-height: 1.2;
  color: var(--ink);
}

.aq-seal-years {
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 600;
  color: var(--ink);
  margin-top: 4px;
}

.aq-gap-pill {
  display: inline-block;
  padding: 4px 12px;
  margin-bottom: 12px;
  border-radius: 999px;
  background: var(--surface-2);
  border: 1px solid var(--primary);
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 600;
  color: var(--primary);
}

.aq-summary {
  font-size: 16px;
  line-height: 1.6;
  color: var(--text);
  margin: 0 0 12px 0;
  max-width: 70ch;
}

.aq-era-share {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--primary);
  margin: 0 0 24px 0;
}

/* Geological Memory Strata Stack */
.aq-strata-box {
  background: var(--surface);
  border: 2px solid var(--ink);
  border-radius: var(--radius);
  padding: 16px;
  margin-bottom: 20px;
}

.aq-box-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 12px;
}

.aq-box-title {
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 600;
  color: var(--ink);
}

.aq-box-meta {
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 600;
  color: var(--primary);
}

.aq-strata-list {
  display: grid;
  gap: 8px;
}

.aq-stratum-row {
  display: grid;
  grid-template-columns: 168px minmax(0, 1fr) 48px;
  align-items: center;
  gap: 12px;
}

.aq-stratum-label {
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 600;
  color: var(--text);
}

.aq-stratum-label span {
  font-family: var(--font-body);
  font-weight: 400;
  color: var(--muted);
  margin-left: 4px;
}

.aq-stratum-track {
  height: 12px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 999px;
  overflow: hidden;
}

.aq-stratum-fill {
  height: 100%;
  background: var(--primary);
  border-radius: 999px;
}

.aq-stratum-row[data-peak="true"] .aq-stratum-fill {
  background: var(--accent);
}

.aq-stratum-row[data-peak="true"] .aq-stratum-track {
  border-color: var(--ink);
}

.aq-stratum-row[data-peak="true"] .aq-stratum-label,
.aq-stratum-row[data-peak="true"] .aq-stratum-pct {
  color: var(--primary);
}

.aq-stratum-pct {
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 600;
  color: var(--muted);
  text-align: right;
}

/* Deciding Clue Spotlight */
.aq-deciding {
  background: var(--surface-2);
  border: 2px solid var(--ink);
  border-left: 6px solid var(--primary);
  border-radius: var(--radius);
  padding: 16px;
  margin-bottom: 20px;
}

.aq-deciding-kicker {
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 600;
  color: var(--primary);
  margin: 0 0 4px 0;
}

.aq-deciding-text {
  font-family: var(--font-heading);
  font-size: 18px;
  font-weight: 800;
  color: var(--text);
  margin: 0 0 4px 0;
}

.aq-deciding-note {
  font-size: 14px;
  color: var(--muted);
  margin: 0;
}

/* Bayesian Curve Box */
.aq-curve-box {
  background: var(--surface);
  border: 2px solid var(--ink);
  border-radius: var(--radius);
  padding: 16px;
  margin-bottom: 20px;
}

.aq-curve-svg {
  width: 100%;
  overflow: hidden;
}

.aq-curve-svg svg {
  width: 100%;
  height: auto;
  display: block;
}

.aq-clues {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
}

.aq-clues-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
  margin: 0 0 8px 0;
}

.aq-clues-list {
  margin: 0;
  padding-left: 20px;
  font-size: 14px;
  color: var(--muted);
  line-height: 1.6;
}

.aq-clues-list li + li {
  margin-top: 8px;
}

/* Verdict & Community Tally */
.aq-check-box {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
  margin-bottom: 20px;
}

.aq-check-label {
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
  margin: 0 0 12px 0;
}

.aq-check-btns {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 12px;
}

.aq-chip {
  min-height: 44px;
  padding: 0 16px;
  border-radius: var(--radius);
  border: 2px solid var(--border);
  border-bottom-width: 4px;
  background: var(--surface);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
}

.aq-chip:hover {
  border-color: var(--ink);
  background: var(--surface-2);
}

.aq-chip[aria-pressed="true"] {
  border-color: var(--ink);
  background: var(--primary);
  color: #ffffff;
}

.aq-tally-box {
  margin-top: 12px;
  padding: 12px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--primary);
}

.aq-real-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-top: 12px;
}

.aq-real-msg {
  font-size: 14px;
  color: var(--muted);
  margin: 8px 0 0 0;
}

/* Share Panel */
.aq-share-panel {
  background: var(--bg);
  border: 2px solid var(--ink);
  border-radius: var(--radius);
  padding: 16px;
  margin-bottom: 16px;
}

.aq-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.aq-challenge-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid var(--border);
}

.aq-nick-input {
  flex: 1 1 200px;
  min-height: 44px;
  padding: 0 12px;
  border: 2px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 14px;
}

.aq-copy-msg {
  margin: 12px 0 0 0;
  font-size: 14px;
  font-weight: 600;
  color: var(--primary);
  word-break: break-word;
}

/* Collapsible Answer Log */
.aq-log {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 12px 16px;
}

.aq-log summary {
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
  cursor: pointer;
}

.aq-log-list {
  margin: 12px 0 0 0;
  padding-left: 20px;
  font-size: 14px;
  color: var(--muted);
  line-height: 1.6;
}

.aq-log-list li + li {
  margin-top: 4px;
}

@media (max-width: 640px) {
  .aq-shell {
    padding: 16px 12px;
  }
  .aq-top {
    margin-bottom: 8px;
  }
  .aq-mode-tag {
    display: none;
  }
  .aq-progress-track {
    margin-bottom: 8px;
  }
  .aq-radar {
    padding: 8px 12px;
    margin-bottom: 12px;
  }
  .aq-radar-head {
    margin-bottom: 4px;
  }
  .aq-radar-ticks,
  .aq-signal {
    display: none;
  }
  .aq-q-card {
    margin-bottom: 12px;
  }
  .aq-q-kicker {
    display: none;
  }
  .aq-q-title {
    font-size: 22px;
    margin-bottom: 4px;
  }
  .aq-q-sub {
    font-size: 14px;
    line-height: 1.4;
  }
  .aq-options {
    gap: 8px;
  }
  .aq-options.aq-options-grid2 {
    grid-template-columns: 1fr;
  }
  .aq-opt {
    min-height: 48px;
    padding: 10px 12px;
    font-size: 14px;
  }
  .aq-opt-desc {
    display: none;
  }
  .aq-foot {
    margin-top: 12px;
    padding-top: 12px;
  }
  .aq-stratum-row {
    grid-template-columns: 128px minmax(0, 1fr) 44px;
    gap: 8px;
  }
  .aq-actions,
  .aq-challenge-row,
  .aq-reveal-btns,
  .aq-reveal-actions {
    flex-direction: column;
    align-items: stretch;
  }
  .aq-actions .aq-btn-primary,
  .aq-actions .aq-btn-secondary,
  .aq-challenge-row .aq-btn-secondary,
  .aq-nick-input,
  .aq-reveal-btns .aq-chip,
  .aq-reveal-actions .aq-btn-primary,
  .aq-reveal-actions .aq-btn-secondary {
    width: 100%;
  }
  .aq-stamp-age,
  .aq-reveal-age {
    font-size: 36px;
  }
}