/* KarmaLens analyze-page surfaces — result rendering, loading orb, share
   spotlight, verdict card, ethical-dimensions accordion, feedback card.

   Inherits the dark-default + [data-theme="light"] override convention from
   web.css. All chrome (header, footer, theme toggle) is owned by base.html;
   this file only adds analyze-specific surfaces. */

.analyze-shell {
  width: min(1040px, calc(100% - 32px));
  margin: 0 auto;
  padding: 28px 0 42px;
  /* PR 62 — page-level base bumped to match the rest of the site (16px). */
  font-size: var(--text-base);
  line-height: var(--leading-normal);
}

.analyze-shell p {
  font-size: var(--text-base);
  line-height: var(--leading-normal);
}

.analyze-shell .topbar {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  margin-bottom: 18px;
}

.analyze-shell h1 {
  margin: 0 0 6px;
  font-size: var(--text-display-md);
  line-height: var(--leading-tight);
  letter-spacing: -0.035em;
  color: var(--strong);
  font-weight: 800;
}

.analyze-shell h2 {
  margin: 0 0 10px;
  font-size: var(--text-2xl);
  color: var(--strong);
  letter-spacing: -0.02em;
}

.analyze-shell h3 {
  margin: 0 0 12px;
  font-size: var(--text-lg);
  color: var(--strong);
  letter-spacing: 0.01em;
}

.analyze-shell h4 {
  margin: 0 0 8px;
  font-size: var(--text-base);
  color: var(--strong);
  letter-spacing: 0.01em;
}

.analyze-shell .subtitle {
  color: var(--muted-strong);
  margin: 0;
  max-width: 760px;
  font-size: var(--text-base);
}

.analyze-shell .shell-doc-link {
  margin: 10px 0 0;
  font-size: var(--text-sm);
  color: var(--muted);
  font-weight: 600;
}

.analyze-shell .shell-doc-link a {
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 3px;
  transition: color var(--transition-fast);
}

.analyze-shell .shell-doc-link a:hover {
  color: var(--accent-dark);
}

/* Public /sample/ page: reading switcher + run-your-own CTA. */
.analyze-shell .sample-switcher {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 14px 0 0;
}

.analyze-shell .sample-pill {
  display: inline-flex;
  align-items: center;
  padding: 7px 14px;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-pill);
  font-size: var(--text-sm);
  font-weight: 650;
  color: var(--muted-strong);
  text-decoration: none;
  background: var(--surface);
  transition: border-color var(--transition-fast), color var(--transition-fast), background var(--transition-fast);
}

.analyze-shell .sample-pill:hover {
  border-color: var(--accent);
  color: var(--accent-dark);
}

.analyze-shell .sample-pill.is-active {
  border-color: var(--accent);
  background: var(--accent-soft);
  color: var(--accent-dark);
}

.analyze-shell .sample-cta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px;
  margin: 16px 0 0;
}

.analyze-shell .usage-chip {
  display: none;
  align-items: center;
  font-size: var(--text-xs);
  font-weight: 750;
  color: var(--muted);
  border: 1px solid var(--border);
  border-radius: var(--radius-pill);
  padding: 5px 12px;
  white-space: nowrap;
  max-width: min(280px, 100%);
  overflow: hidden;
  text-overflow: ellipsis;
  background: var(--surface-soft);
  margin-top: 8px;
}

/* Stacked result cards */
#result-root {
  display: grid;
  gap: 14px;
}

.analyze-shell .card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  padding: 18px 20px;
  margin: 14px 0;
  transition: box-shadow var(--transition-slow), border-color var(--transition-base);
}

.analyze-shell .card.meta {
  background: var(--surface-soft);
}

.analyze-shell .meta-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  max-width: 420px;
}

/* Submission form */
.analyze-shell textarea {
  width: 100%;
  min-height: 132px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-strong);
  padding: 13px 14px;
  /* 16px keeps iOS Safari from auto-zooming the page on focus (the dilemma box
     is the primary input; 16px also reads better). */
  font-size: 16px;
  resize: vertical;
  background: var(--surface-soft);
  color: var(--text);
  font-family: inherit;
  line-height: var(--leading-normal);
  transition: border-color var(--transition-base), box-shadow var(--transition-base);
}

.analyze-shell textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-ghost);
}

/* Primary button shape — matches the site's pill buttons. */
.analyze-shell button {
  margin-top: 12px;
  background: linear-gradient(180deg, var(--accent) 0%, var(--accent-dark) 100%);
  color: #fff;
  border: 1px solid transparent;
  border-radius: var(--radius-pill);
  padding: 10px 20px;
  cursor: pointer;
  font-weight: 700;
  font-size: var(--text-sm);
  letter-spacing: 0.005em;
  box-shadow: var(--shadow-accent-soft);
  transition:
    background var(--transition-base),
    box-shadow var(--transition-base),
    transform var(--transition-base),
    opacity var(--transition-base);
  font-family: inherit;
}

.analyze-shell button:hover:not(:disabled) {
  box-shadow: var(--shadow-accent);
  transform: translateY(-1px);
}

.analyze-shell button:active:not(:disabled) {
  transform: translateY(0);
  box-shadow: var(--shadow-accent-soft);
}

.analyze-shell button:focus-visible {
  outline: 3px solid var(--accent-ghost);
  outline-offset: 2px;
}

.analyze-shell button:disabled {
  background: var(--surface-sunken);
  color: var(--muted);
  border-color: var(--border);
  cursor: not-allowed;
  opacity: 0.78;
  box-shadow: none;
  transform: none;
}

/* Secondary buttons (Try again side-by-side, "Copy request ID", share secondary, etc.) */
.analyze-shell button.secondary {
  background: var(--surface);
  color: var(--strong);
  border: 1px solid var(--border-strong);
  box-shadow: var(--shadow-xs);
}

.analyze-shell button.secondary:hover:not(:disabled) {
  border-color: var(--accent);
  background: var(--surface-soft);
  box-shadow: var(--shadow-sm);
}

/* Verdict / hero */
.analyze-shell .lead {
  font-size: var(--text-3xl);
  line-height: var(--leading-snug);
  margin: 6px 0 16px;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--strong);
}

.analyze-shell .summary-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.analyze-shell .metric {
  background: var(--surface-soft);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-md);
  padding: 10px 12px;
}

.analyze-shell .metric-label {
  display: block;
  color: var(--muted);
  font-size: var(--text-xs);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  font-weight: 700;
}

.analyze-shell .metric-value {
  display: block;
  font-size: var(--text-base);
  font-weight: 700;
  color: var(--strong);
  margin-top: 4px;
}

.analyze-shell .verdict { border-left: 5px solid var(--verdict-neutral); }
.analyze-shell .verdict.positive { border-left-color: var(--verdict-positive); }
.analyze-shell .verdict.negative { border-left-color: var(--verdict-negative); }
.analyze-shell .verdict.mixed { border-left-color: var(--verdict-mixed); }

/* ── Committed-instrument header ───────────────────────────────────────────
   The decisive ruling at first paint: a score needle on a −100…+100 gauge, the
   classification, and the one-line verdict — ABOVE the detailed cards, so a
   yes/no-feeling ruling lands before any prose. --instr-tone tracks the verdict
   direction so the gauge fill, number, and heading all read one colour. */
.analyze-shell .instrument {
  --instr-tone: var(--verdict-neutral);
  border-left: 5px solid var(--instr-tone);
  background:
    radial-gradient(360px 200px at 6% 0%, color-mix(in srgb, var(--instr-tone) 12%, transparent), transparent 70%),
    linear-gradient(165deg, var(--surface) 0%, var(--surface-soft) 100%);
}
.analyze-shell .instrument.positive { --instr-tone: var(--verdict-positive); }
.analyze-shell .instrument.negative { --instr-tone: var(--verdict-negative); }
.analyze-shell .instrument.mixed { --instr-tone: var(--verdict-mixed); }

.analyze-shell .instrument-eyebrow {
  display: inline-block;
  font-size: var(--text-xs);
  letter-spacing: var(--tracking-eyebrow);
  text-transform: uppercase;
  font-weight: 750;
  color: var(--muted);
  margin-bottom: 8px;
}

.analyze-shell .instrument-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.analyze-shell .instrument-classification {
  font-size: var(--text-3xl);
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.05;
  color: var(--instr-tone);
}

.analyze-shell .instrument-score {
  font-size: var(--text-3xl);
  font-weight: 800;
  letter-spacing: -0.01em;
  color: var(--instr-tone);
  font-variant-numeric: tabular-nums;
}

.analyze-shell .instrument-gauge { margin: 14px 0 4px; }

.analyze-shell .instrument-track {
  position: relative;
  height: 10px;
  border-radius: 999px;
  background: linear-gradient(
    90deg,
    color-mix(in srgb, var(--verdict-negative) 30%, var(--surface-soft)) 0%,
    var(--surface-sunken) 50%,
    color-mix(in srgb, var(--verdict-positive) 30%, var(--surface-soft)) 100%
  );
  border: 1px solid var(--border-soft);
  overflow: hidden;
}

.analyze-shell .instrument-fill {
  position: absolute;
  top: 0;
  bottom: 0;
  background: var(--instr-tone);
  opacity: 0.55;
}

.analyze-shell .instrument-zero {
  position: absolute;
  top: -2px;
  bottom: -2px;
  left: 50%;
  width: 2px;
  transform: translateX(-50%);
  background: var(--muted);
  opacity: 0.6;
}

.analyze-shell .instrument-needle {
  position: absolute;
  top: 50%;
  width: 16px;
  height: 16px;
  border-radius: 999px;
  background: var(--instr-tone);
  border: 2px solid var(--surface);
  box-shadow: var(--shadow-sm);
  transform: translate(-50%, -50%);
  z-index: 1;
}

.analyze-shell .instrument-scale {
  display: flex;
  justify-content: space-between;
  margin-top: 6px;
  font-size: var(--text-xs);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--muted);
  font-weight: 700;
}

.analyze-shell .instrument-verdict {
  margin: 14px 0 0;
  font-size: var(--text-xl);
  line-height: var(--leading-snug);
  font-weight: 700;
  letter-spacing: -0.01em;
  color: var(--strong);
}

.analyze-shell .instrument-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

.analyze-shell .instrument-chip {
  display: inline-flex;
  align-items: center;
  padding: 5px 11px;
  border-radius: var(--radius-pill);
  background: var(--surface-soft);
  border: 1px solid var(--border-soft);
  font-size: var(--text-xs);
  font-weight: 700;
  color: var(--muted-strong);
}

/* Hard-truth pushback callout — names the single most adverse ethical lens so
   the reading is felt to judge the action honestly, not flatter. Candid amber
   (not error-red): "pay attention", not "something broke". */
.analyze-shell .hard-truth-callout {
  margin-top: 16px;
  padding: 12px 14px;
  border-left: 4px solid var(--warning);
  background: var(--warning-bg);
  border-radius: var(--radius-md);
}

.analyze-shell .hard-truth-eyebrow {
  display: inline-block;
  font-size: var(--text-xs);
  text-transform: uppercase;
  letter-spacing: var(--tracking-eyebrow);
  font-weight: 750;
  color: var(--warning);
  margin-bottom: 6px;
}

.analyze-shell .hard-truth-line {
  margin: 0;
  font-size: var(--text-base);
  font-weight: 650;
  color: var(--strong);
  line-height: var(--leading-normal);
}

.analyze-shell .hard-truth-note {
  margin: 6px 0 0;
  font-size: var(--text-sm);
  color: var(--muted-strong);
  line-height: var(--leading-normal);
}

/* Share spotlight — the page's premium focal point. */
.analyze-shell .share {
  border-left: 5px solid var(--accent);
  background: linear-gradient(155deg, var(--accent-ghost) 0%, var(--surface) 100%);
}

.analyze-shell .share.spotlight {
  border-left-width: 0;
  border: 1px solid color-mix(in srgb, var(--accent) 32%, var(--border));
  background:
    radial-gradient(420px 280px at 8% 0%, var(--accent-soft), transparent 70%),
    linear-gradient(160deg, var(--surface) 0%, var(--surface-soft) 100%);
  box-shadow: var(--shadow-accent-soft), var(--shadow-md);
  position: relative;
  overflow: hidden;
}

.analyze-shell .share.spotlight::after {
  content: "";
  position: absolute;
  inset: -1px;
  border-radius: inherit;
  pointer-events: none;
  background: linear-gradient(135deg, color-mix(in srgb, var(--accent) 18%, transparent), transparent 60%);
  mix-blend-mode: screen;
  opacity: 0.6;
}

.analyze-shell .share.spotlight > * {
  position: relative;
  z-index: 1;
}

.analyze-shell .share.spotlight h3 {
  margin-bottom: 6px;
}

.analyze-shell .share-title {
  margin: 0;
  color: var(--strong);
  font-size: var(--text-xl);
  letter-spacing: -0.015em;
}

.analyze-shell .share-tag {
  display: inline-block;
  font-size: var(--text-xs);
  letter-spacing: var(--tracking-eyebrow);
  text-transform: uppercase;
  background: var(--accent-soft);
  color: var(--accent-dark);
  padding: 4px 9px;
  border-radius: var(--radius-pill);
  margin-bottom: 8px;
  font-weight: 750;
}

.analyze-shell .share-quote {
  margin: 12px 0;
  padding: 14px 16px;
  background: color-mix(in srgb, var(--surface) 88%, transparent);
  border-left: 4px solid var(--accent);
  border-radius: var(--radius-md);
  font-size: var(--text-xl);
  font-weight: 650;
  color: var(--strong);
  line-height: var(--leading-snug);
  letter-spacing: -0.005em;
}

.analyze-shell .share-question {
  margin-top: 8px;
  color: var(--muted-strong);
  font-weight: 600;
}

.analyze-shell .share-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  margin-top: 14px;
}

.analyze-shell .share-actions button {
  margin-top: 0;
  padding: 8px 14px;
  font-size: var(--text-sm);
}

.analyze-shell .copy-state {
  color: var(--muted);
  font-size: var(--text-xs);
  font-weight: 700;
  min-height: 18px;
}

/* Personal share page (WhatsApp-grade share): honesty caption before the
   first Share… tap; live public link + remove control after creation. */
.analyze-shell .share-page-panel {
  margin-top: 10px;
}

.analyze-shell .share-page-caption {
  margin: 0;
  color: var(--muted);
  font-size: var(--text-xs);
  line-height: 1.4;
}

.analyze-shell .share-page-live {
  margin: 0 0 4px;
  color: var(--gold);
  font-size: var(--text-xs);
  font-weight: 750;
  letter-spacing: var(--tracking-eyebrow);
  text-transform: uppercase;
}

.analyze-shell .share-page-url {
  margin: 0 0 8px;
  font-size: var(--text-sm);
  word-break: break-all;
}

.analyze-shell .share-page-url a {
  color: var(--accent-dark);
}

.analyze-shell .share-page-remove {
  margin-top: 0;
  padding: 6px 12px;
  font-size: var(--text-xs);
}

/* Desktop fallback mint button (no navigator.share → no Share… tap exists). */
.analyze-shell .share-page-create {
  margin: 0 0 6px;
  padding: 6px 12px;
  font-size: var(--text-xs);
}

/* Error state */
.analyze-shell .error {
  border-left: 5px solid var(--danger);
  background: var(--danger-bg);
  border-color: var(--danger-border);
}

.analyze-shell .error p {
  color: var(--strong);
}

.analyze-shell .error-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin-top: 12px;
}

.analyze-shell .error-actions button { margin-top: 0; }

.analyze-shell .error-actions a.button {
  display: inline-flex;
  align-items: center;
  padding: 9px 16px;
  border-radius: var(--radius-pill);
  background: var(--surface);
  color: var(--strong);
  border: 1px solid var(--border-strong);
  text-decoration: none;
  font-weight: 700;
  font-size: var(--text-sm);
}

.analyze-shell .error-actions a.button:hover {
  border-color: var(--accent);
  background: var(--surface-soft);
}

/* Feedback card */
.analyze-shell .feedback { background: var(--surface-soft); }
.analyze-shell .feedback .hint { color: var(--muted); margin: -4px 0 12px; }

.analyze-shell .feedback-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  margin: 8px 0 12px;
}

.analyze-shell .feedback-label {
  color: var(--strong);
  font-weight: 750;
  margin-right: 2px;
}

.analyze-shell .feedback-choice,
.analyze-shell .feedback-tag {
  margin-top: 0;
  background: var(--surface);
  color: var(--strong);
  border: 1px solid var(--border);
  padding: 7px 12px;
  box-shadow: none;
  font-size: var(--text-sm);
  border-radius: var(--radius-pill);
}

.analyze-shell .feedback-choice:hover:not(:disabled),
.analyze-shell .feedback-tag:hover:not(:disabled) {
  background: var(--surface-soft);
  border-color: var(--accent);
  transform: none;
  box-shadow: none;
}

.analyze-shell .feedback-choice.is-selected,
.analyze-shell .feedback-tag.is-selected {
  background: linear-gradient(180deg, var(--accent) 0%, var(--accent-dark) 100%);
  color: #fff;
  border-color: transparent;
  box-shadow: var(--shadow-accent-soft);
}

.analyze-shell .feedback textarea {
  min-height: 76px;
  margin-top: 6px;
}

.analyze-shell .feedback-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  margin-top: 10px;
}

.analyze-shell .feedback-actions button { margin-top: 0; }

.analyze-shell .feedback-state {
  min-height: 20px;
  color: var(--muted);
  font-weight: 700;
}

.analyze-shell .feedback-state.error-text { color: var(--danger); }

/* Verse / gold-tinted guidance card */
.analyze-shell .verse {
  background: linear-gradient(180deg, var(--gold-soft) 0%, var(--surface) 100%);
  border-left: 5px solid var(--gold);
}

.analyze-shell .verse .capture-note {
  display: inline-block;
  font-size: var(--text-xs);
  text-transform: uppercase;
  letter-spacing: var(--tracking-eyebrow);
  color: var(--gold);
  background: color-mix(in srgb, var(--gold) 18%, transparent);
  padding: 4px 8px;
  border-radius: var(--radius-pill);
  margin-bottom: 8px;
  font-weight: 750;
}

.analyze-shell .verse-ref {
  color: var(--gold);
  font-size: var(--text-sm);
  margin: 0 0 6px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  font-weight: 750;
}

.analyze-shell .verse-sanskrit {
  font-size: var(--text-2xl);
  color: var(--strong);
  margin: 4px 0 2px;
  line-height: 1.45;
  overflow-wrap: anywhere;
  letter-spacing: -0.005em;
}

.analyze-shell .verse-iast {
  font-style: italic;
  color: var(--gold);
  font-size: var(--text-sm);
  margin: 0 0 10px;
}

.analyze-shell .verse-translations {
  background: color-mix(in srgb, var(--surface) 80%, transparent);
  border-radius: var(--radius-sm);
  padding: 10px 14px;
  margin: 6px 0 10px;
  border: 1px solid color-mix(in srgb, var(--gold) 26%, var(--border));
}

.analyze-shell .verse-translations p { margin: 4px 0; font-size: var(--text-sm); color: var(--text); }
.analyze-shell .verse-why { margin-top: 10px; color: var(--text); }
.analyze-shell .verse-confidence { color: var(--gold); font-size: var(--text-sm); margin-top: 6px; }
.analyze-shell .verse-source { color: var(--muted); font-size: var(--text-sm); margin-top: 8px; }

.analyze-shell .verse-block {
  padding: 12px 14px;
  background: color-mix(in srgb, var(--surface) 80%, transparent);
  border: 1px solid color-mix(in srgb, var(--gold) 26%, var(--border));
  border-radius: var(--radius-md);
  margin: 8px 0 10px;
}

/* If-you-continue card */
.analyze-shell .consequence-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-top: 10px;
}

.analyze-shell .consequence-card {
  background: var(--surface-soft);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-md);
  padding: 12px 14px;
}

.analyze-shell .consequence-label {
  display: block;
  font-size: var(--text-xs);
  text-transform: uppercase;
  letter-spacing: var(--tracking-eyebrow);
  color: var(--muted);
  font-weight: 700;
  margin-bottom: 4px;
}

.analyze-shell .consequence-text {
  margin: 0 0 10px;
  font-weight: 650;
  color: var(--strong);
}

.analyze-shell .consequence-explain {
  margin: 0;
  color: var(--muted-strong);
}

.analyze-shell .why-applies {
  margin-top: 12px;
  padding: 12px 14px;
  background: var(--surface-soft);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-md);
}

/* Inner dynamics two-column block */
.analyze-shell .two-col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.analyze-shell .subtle-panel {
  background: var(--surface-soft);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-md);
  padding: 11px 13px;
}

.analyze-shell .reading-block {
  margin-top: 10px;
  padding: 13px;
  background: var(--surface-soft);
  border-radius: var(--radius-md);
  border: 1px solid var(--border-soft);
}

/* Counterfactual cards */
.analyze-shell .cf {
  border-radius: var(--radius-md);
  padding: 12px 14px;
  border: 1px solid var(--border);
}

.analyze-shell .cf-risk {
  background: var(--danger-bg);
  border-color: var(--danger-border);
}

.analyze-shell .cf-path {
  background: var(--success-bg);
  border-color: var(--success-border);
}

.analyze-shell .higher-path {
  font-size: var(--text-lg);
  font-weight: 600;
  color: var(--strong);
}

/* Ethical dimensions row */
.analyze-shell .row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.analyze-shell .dim {
  background: var(--surface-soft);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-sm);
  padding: 9px 11px;
}

.analyze-shell .missing-facts .hint { color: var(--muted); margin-top: -4px; }
.analyze-shell .missing-facts ul { margin: 10px 0 0 18px; }
.analyze-shell .missing-facts li { margin: 6px 0; color: var(--text); }

.analyze-shell blockquote {
  margin: 8px 0;
  padding: 11px 14px;
  background: var(--surface-soft);
  border-left: 4px solid var(--accent);
  border-radius: var(--radius-sm);
  font-size: var(--text-lg);
  font-weight: 600;
  color: var(--strong);
}

/* Hero grid — verdict + share spotlight side-by-side */
.analyze-shell .hero-grid {
  display: grid;
  grid-template-columns: 1.3fr 1fr;
  gap: 14px;
  align-items: stretch;
}

/* Loading state — calm 1100ms cubic-bezier orb */
#loading { display: none; }

.analyze-shell .loading-card {
  margin-top: 14px;
  background:
    radial-gradient(420px 240px at 8% 0%, var(--accent-soft), transparent 70%),
    linear-gradient(160deg, var(--surface) 0%, var(--surface-soft) 100%);
  border: 1px solid color-mix(in srgb, var(--accent) 28%, var(--border));
  border-radius: var(--radius-lg);
  padding: 16px 18px;
  box-shadow: var(--shadow-accent-soft);
  color: var(--text);
}

.analyze-shell .loading-inner {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 14px;
  align-items: center;
}

.analyze-shell .loading-orb {
  width: 36px;
  height: 36px;
  border-radius: 999px;
  border: 2px solid color-mix(in srgb, var(--accent) 32%, transparent);
  border-top-color: var(--accent);
  animation: karmalens-spin 1100ms cubic-bezier(0.4, 0, 0.2, 1) infinite;
}

.analyze-shell .loading-title {
  margin: 0;
  font-weight: 800;
  color: var(--strong);
}

.analyze-shell .loading-hint {
  margin: 6px 0 0;
  font-size: var(--text-sm);
  color: var(--muted-strong);
  line-height: var(--leading-normal);
  max-width: 520px;
}

.analyze-shell .loading-hint-secondary {
  font-size: var(--text-xs);
  margin-top: 4px;
  color: var(--muted);
}

.analyze-shell .loading-steps {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 8px;
}

.analyze-shell .loading-step {
  font-size: var(--text-xs);
  color: var(--muted);
  border: 1px solid var(--border-soft);
  background: var(--surface);
  border-radius: var(--radius-pill);
  padding: 4px 9px;
  animation: karmalens-pulse 1.8s ease-in-out infinite;
}

.analyze-shell .loading-step:nth-child(2) { animation-delay: 180ms; }
.analyze-shell .loading-step:nth-child(3) { animation-delay: 360ms; }

/* Visible progress affordance for the long (60-90s+) non-streamed wait:
   a thin bar whose fill analyze.js advances asymptotically — always moving,
   capped below 100% until the reading actually lands. */
.analyze-shell .loading-progress {
  margin-top: 10px;
  height: 5px;
  max-width: 520px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--accent) 14%, var(--surface));
  overflow: hidden;
}

.analyze-shell .loading-progress-fill {
  height: 100%;
  width: 0%;
  border-radius: 999px;
  background: linear-gradient(90deg, color-mix(in srgb, var(--accent) 70%, transparent), var(--accent));
  transition: width 600ms linear;
}

@keyframes karmalens-spin {
  to { transform: rotate(360deg); }
}

@keyframes karmalens-pulse {
  0%, 100% { opacity: 0.68; }
  50% { opacity: 1; }
}

@media (prefers-reduced-motion: reduce) {
  .analyze-shell .loading-orb,
  .analyze-shell .loading-step,
  .analyze-shell .loading-progress-fill,
  .analyze-shell button { animation: none; transition: none; }
}

.analyze-shell .empty-hint { color: var(--muted-strong); }

.analyze-shell .safety-note {
  font-size: var(--text-sm);
  color: var(--muted-strong);
  background: var(--warning-bg);
  border: 1px solid var(--warning-border);
  border-radius: var(--radius-md);
  padding: 11px 13px;
  margin: 8px 0 12px;
  line-height: var(--leading-normal);
}

/* Presentation section accordion */
.analyze-shell .presentation-section {
  margin-top: 10px;
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-md);
  background: var(--surface-soft);
  overflow: hidden;
}

.analyze-shell .presentation-section summary {
  cursor: pointer;
  padding: 11px 13px;
  font-weight: 700;
  color: var(--strong);
  list-style-position: inside;
  transition: background var(--transition-fast);
}

.analyze-shell .presentation-section summary:hover {
  background: color-mix(in srgb, var(--accent) 6%, var(--surface-soft));
}

.analyze-shell .presentation-section[open] summary {
  border-bottom: 1px solid var(--border-soft);
  background: color-mix(in srgb, var(--accent) 5%, var(--surface-soft));
}

.analyze-shell .presentation-section p {
  margin: 0;
  padding: 11px 13px 13px;
  white-space: pre-wrap;
  color: var(--text);
}

.analyze-shell .presentation-primary {
  white-space: pre-wrap;
  color: var(--text);
}

.analyze-shell .safety-card {
  border-left: 5px solid var(--warning);
  background: var(--warning-bg);
}

/* Per-page disclaimer reaffirmation — sits below the analyze stack as a quiet
   reminder, distinct from the site footer in base.html. */
.global-foot {
  width: min(1040px, calc(100% - 32px));
  margin: 28px auto 0;
  padding: 16px 20px 22px;
  border-top: 1px solid var(--border);
  background: transparent;
  color: var(--muted);
  font-size: var(--text-sm);
  line-height: var(--leading-normal);
  border-radius: var(--radius-md);
}

.global-foot strong { color: var(--strong); }

@media (max-width: 860px) {
  .analyze-shell .summary-grid,
  .analyze-shell .two-col,
  .analyze-shell .row,
  .analyze-shell .meta-grid,
  .analyze-shell .hero-grid,
  .analyze-shell .consequence-grid { grid-template-columns: 1fr; }
  .analyze-shell .lead { font-size: 24px; }
  .analyze-shell .share-quote { font-size: var(--text-lg); }
}

@media (max-width: 520px) {
  .analyze-shell { padding: 18px 0 30px; }
  .analyze-shell .topbar { align-items: stretch; flex-direction: column; gap: 10px; margin-bottom: 12px; }
  .analyze-shell h1 { font-size: clamp(28px, 7vw, 36px); }
  .analyze-shell h2 { font-size: var(--text-xl); }
  .analyze-shell h3 { font-size: var(--text-base); margin-bottom: 8px; }
  .analyze-shell .subtitle { font-size: var(--text-sm); margin-bottom: 0; }
  .analyze-shell .card { border-radius: var(--radius-md); padding: 14px 14px; margin: 10px 0; }
  #result-root { gap: 10px; }
  .analyze-shell .hero-grid { gap: 10px; }
  .analyze-shell .verdict { border-left-width: 4px; }
  .analyze-shell .instrument { border-left-width: 4px; }
  .analyze-shell .instrument-classification { font-size: 26px; }
  .analyze-shell .instrument-score { font-size: 26px; }
  .analyze-shell .instrument-verdict { font-size: var(--text-lg); line-height: 1.3; margin-top: 12px; }
  .analyze-shell .instrument-needle { width: 14px; height: 14px; }
  .analyze-shell .hard-truth-callout { margin-top: 12px; padding: 10px 12px; }
  .analyze-shell .hard-truth-line { font-size: var(--text-sm); }
  .analyze-shell .hard-truth-note { font-size: var(--text-xs); }
  .analyze-shell .lead { font-size: 21px; line-height: 1.26; margin: 4px 0 12px; }
  .analyze-shell .summary-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; }
  .analyze-shell .metric { padding: 7px 8px; border-radius: 9px; }
  .analyze-shell .metric-label { font-size: 10px; line-height: 1.2; }
  .analyze-shell .metric-value { font-size: var(--text-sm); }
  .analyze-shell .presentation-section { margin-top: 8px; border-radius: 9px; }
  .analyze-shell .presentation-section summary { padding: 8px 10px; font-size: var(--text-sm); }
  .analyze-shell .presentation-section p { padding: 8px 10px 10px; font-size: var(--text-sm); }
  .analyze-shell .share.spotlight { padding: 13px 14px; }
  .analyze-shell .share-tag { font-size: 10px; padding: 3px 7px; margin-bottom: 5px; }
  .analyze-shell .share-title { font-size: var(--text-lg); }
  .analyze-shell .share-quote { margin: 8px 0; padding: 10px 12px; font-size: var(--text-base); line-height: 1.35; border-left-width: 3px; }
  .analyze-shell .share-question { margin: 7px 0 0; font-size: var(--text-sm); line-height: 1.35; }
  .analyze-shell .share-actions { gap: 6px; margin-top: 10px; }
  .analyze-shell .share-actions button { flex: 1 1 132px; padding: 8px 9px; font-size: var(--text-xs); }
  .analyze-shell .copy-state { font-size: var(--text-xs); min-height: 16px; }
  .analyze-shell .loading-card { padding: 12px; }
  .analyze-shell .loading-inner { grid-template-columns: 1fr; gap: 9px; }
  .analyze-shell .loading-orb { width: 30px; height: 30px; }
  .analyze-shell .loading-steps { display: grid; grid-template-columns: 1fr; }
  .analyze-shell .consequence-grid { gap: 8px; }
  .analyze-shell .consequence-card,
  .analyze-shell .why-applies,
  .analyze-shell .subtle-panel,
  .analyze-shell .reading-block { padding: 10px 11px; border-radius: 10px; }
  .analyze-shell .consequence-label { font-size: 10px; }
  .analyze-shell .consequence-text,
  .analyze-shell .consequence-explain,
  .analyze-shell .why-applies p { font-size: var(--text-sm); }
  .analyze-shell .verse { border-left-width: 4px; }
  .analyze-shell .verse-block { padding: 10px 11px; margin: 6px 0 8px; }
  .analyze-shell .verse-sanskrit { font-size: var(--text-xl); line-height: 1.5; }
  .analyze-shell .verse-iast,
  .analyze-shell .verse-source,
  .analyze-shell .verse-confidence { font-size: var(--text-xs); }
  .analyze-shell .verse-translations { padding: 7px 10px; }
  .analyze-shell .verse-translations p { font-size: var(--text-sm); }
  .analyze-shell .dim { padding: 7px 9px; font-size: var(--text-sm); }
  [data-card='ethical-dimensions'] .presentation-primary { font-size: var(--text-sm); }
  /* Download PDF (meta card) — full-width, ≥44px tap target on phones. */
  .analyze-shell .pdf-download-link { width: 100%; min-height: 44px; }
  .global-foot { margin-top: 18px; padding: 13px 14px 22px; font-size: var(--text-xs); }
}

/* ============================================================================
 * Streaming cards (analyze_stream.js)
 * Per-card SSE consumer renders a vertical stack of cards with shimmer-blur
 * placeholders that resolve as each parallel LLM call returns. Failed cards
 * become a retry button (never silently filled with deterministic content).
 * ============================================================================ */

.stream-status-banner {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 9px 14px;
  margin: 0 0 14px;
  border-radius: 999px;
  background: var(--accent-soft);
  border: 1px solid var(--accent-ghost);
  color: var(--strong);
  font-size: var(--text-sm);
  font-weight: 500;
}
.stream-status-banner.stream-status-warn {
  background: var(--warning-bg);
  border-color: var(--warning-border);
  color: var(--warning);
}
.stream-status-banner.stream-status-error {
  background: var(--danger-bg);
  border-color: var(--danger-border);
  color: var(--danger);
}
.stream-status-dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--accent);
  animation: karmalens-pulse 1.4s ease-in-out infinite;
  flex: 0 0 auto;
}
.stream-status-warn .stream-status-dot { background: var(--warning); }
.stream-status-error .stream-status-dot { background: var(--danger); animation: none; }

.stream-engine-ribbon {
  padding: 18px 20px;
  margin: 0 0 16px;
}
.stream-engine-title {
  margin: 0 0 6px;
  font-size: var(--text-xs);
  font-weight: 700;
  letter-spacing: 1.4px;
  text-transform: uppercase;
  color: var(--muted);
}
.stream-engine-verdict {
  margin: 0 0 12px;
  font-size: var(--text-lg);
  font-weight: 600;
  line-height: 1.4;
  color: var(--strong);
}
.stream-engine-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 0 12px;
}
.stream-engine-chip {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 999px;
  background: var(--surface-soft);
  border: 1px solid var(--border-soft);
  font-size: var(--text-xs);
  color: var(--muted-strong);
}
.stream-engine-verse {
  margin: 12px 0 0;
  padding: 12px 14px;
  border-left: 3px solid var(--warning);
  background: var(--warning-bg);
  border-radius: 0 8px 8px 0;
}
.stream-engine-verse-quote {
  margin: 0 0 6px;
  font-size: var(--text-base);
  font-style: italic;
  color: var(--strong);
}
.stream-engine-verse-ref {
  margin: 0;
  font-size: var(--text-xs);
  color: var(--muted);
}
.stream-engine-missing {
  margin: 12px 0 0;
  padding-top: 12px;
  border-top: 1px dashed var(--border-soft);
}
.stream-engine-missing-title {
  margin: 0 0 6px;
  font-size: var(--text-xs);
  color: var(--muted);
  font-weight: 600;
}
.stream-engine-missing-list {
  margin: 0;
  padding-left: 18px;
  font-size: var(--text-sm);
  color: var(--text);
}

.stream-card-slots {
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin: 0 0 16px;
}

.stream-card {
  padding: 18px 20px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  transition: border-color 180ms var(--ease-snap), background 180ms var(--ease-snap);
}
.stream-card[data-state="loading"] {
  border-color: var(--accent-ghost);
  background: linear-gradient(140deg, var(--surface) 0%, var(--surface-soft) 100%);
}
.stream-card[data-state="error"] {
  border-color: var(--danger-border);
  background: var(--danger-bg);
}
.stream-card[data-state="loaded"] {
  animation: karmalens-card-reveal 320ms var(--ease-snap);
}

.stream-card-title {
  margin: 0 0 10px;
  font-size: var(--text-xs);
  font-weight: 700;
  letter-spacing: 1.4px;
  text-transform: uppercase;
  color: var(--muted);
}
.stream-card[data-state="error"] .stream-card-title { color: var(--danger); }

.stream-card-body {
  font-size: var(--text-base);
  line-height: 1.55;
  color: var(--text);
}
.stream-card-body[data-state="loading"] {
  min-height: 72px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.stream-card-shimmer {
  height: 12px;
  border-radius: 6px;
  background: linear-gradient(
    90deg,
    var(--surface-soft) 0%,
    var(--accent-ghost) 50%,
    var(--surface-soft) 100%
  );
  background-size: 200% 100%;
  animation: karmalens-shimmer-sweep 1.4s linear infinite;
  filter: blur(1.5px);
}
.stream-card-shimmer-short {
  width: 60%;
}

.stream-pair {
  margin: 0 0 8px;
  color: var(--text);
}
.stream-pair strong {
  color: var(--strong);
  font-weight: 600;
}
.stream-card-primary {
  margin: 0 0 10px;
  font-size: var(--text-base);
  line-height: 1.55;
  color: var(--strong);
  font-weight: 500;
}
.stream-card-headline {
  margin: 0 0 12px;
  font-size: var(--text-lg);
  line-height: 1.4;
  font-weight: 600;
  color: var(--strong);
}
.stream-card-quote {
  margin: 0 0 10px;
  padding: 10px 14px;
  border-left: 3px solid var(--accent);
  background: var(--accent-ghost);
  font-style: italic;
  color: var(--strong);
  border-radius: 0 8px 8px 0;
}
.stream-card-question {
  margin: 8px 0 0;
  font-size: var(--text-base);
  color: var(--muted-strong);
  font-style: italic;
}

.stream-card-error-msg {
  margin: 0 0 10px;
  font-size: var(--text-sm);
  color: var(--danger);
}
.stream-card-retry {
  display: inline-block;
  padding: 7px 16px;
  font-size: var(--text-sm);
}
.stream-card-retry:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}
.stream-card-error-code {
  margin: 8px 0 0;
  font-size: var(--text-xs);
  color: var(--muted);
  font-family: ui-monospace, Menlo, Consolas, monospace;
}

.stream-dimensions {
  padding: 18px 20px;
}
.stream-dim-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 10px;
}
.stream-dim-cell {
  padding: 10px 12px;
  background: var(--surface-soft);
  border: 1px solid var(--border-soft);
  border-radius: 10px;
}
.stream-dim-label {
  margin: 0 0 4px;
  font-size: var(--text-xs);
  font-weight: 600;
  letter-spacing: 0.4px;
  text-transform: uppercase;
  color: var(--muted);
}
.stream-dim-score {
  margin: 0 0 4px;
  font-size: var(--text-lg);
  font-weight: 700;
  color: var(--strong);
}
.stream-dim-note {
  margin: 0;
  font-size: var(--text-xs);
  color: var(--muted-strong);
  line-height: 1.45;
}

@keyframes karmalens-shimmer-sweep {
  0%   { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}
@keyframes karmalens-card-reveal {
  from { opacity: 0.4; transform: translateY(4px); }
  to   { opacity: 1;   transform: translateY(0); }
}

@media (prefers-reduced-motion: reduce) {
  .stream-card-shimmer,
  .stream-status-dot { animation: none; }
  .stream-card[data-state="loaded"] { animation: none; }
}

@media (max-width: 640px) {
  .stream-engine-ribbon,
  .stream-card,
  .stream-dimensions { padding: 14px 16px; }
  .stream-card-title { font-size: 10px; }
  .stream-engine-verdict { font-size: var(--text-base); }
}

/* ============================================================================
 * Gallery submit button — appears in both renderers:
 *   - Legacy (analyze.js): inside .share-actions next to copy buttons
 *   - Streaming (analyze_stream.js): inside the share card body
 * State data lives on data-gallery-status (legacy) and on the button text itself.
 * ============================================================================ */

.share-gallery-action {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.share-gallery-btn,
.share-gallery-link {
  appearance: none;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--strong);
  padding: 8px 14px;
  font-size: var(--text-sm);
  font-weight: 500;
  border-radius: 999px;
  cursor: pointer;
  text-decoration: none;
  transition: background 180ms var(--ease-snap), border-color 180ms var(--ease-snap);
}
.share-gallery-btn:hover,
.share-gallery-link:hover {
  background: var(--accent-ghost);
  border-color: var(--accent);
}
.share-gallery-btn:disabled {
  opacity: 0.55;
  cursor: not-allowed;
  background: var(--surface-soft);
}
.share-gallery-action[data-gallery-status="approved_published"] .share-gallery-link {
  background: var(--accent-soft);
  border-color: var(--accent);
  color: var(--strong);
  font-weight: 600;
}
.share-gallery-tip {
  font-size: var(--text-xs);
  color: var(--muted);
  font-style: italic;
}

/* cycle 010: author edits their crisp public dilemma while the card is pending. */
.share-gallery-crisp {
  flex-basis: 100%;
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-top: 10px;
  padding: 12px 14px;
  border: 1px dashed var(--border);
  border-radius: 14px;
  background: var(--surface-soft);
}
.share-gallery-crisp-label {
  margin: 0;
  font-size: var(--text-xs);
  font-weight: 650;
  color: var(--muted);
}
.share-gallery-crisp-text {
  margin: 0;
  font-size: var(--text-sm);
  color: var(--strong);
}
.share-gallery-crisp-text.is-empty {
  color: var(--muted);
  font-style: italic;
}
.share-gallery-crisp-input {
  width: 100%;
  resize: vertical;
  font: inherit;
  font-size: var(--text-sm);
  color: var(--strong);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 8px 10px;
}
.share-gallery-crisp-input:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-ghost);
}
.share-gallery-crisp-count {
  align-self: flex-end;
  font-size: var(--text-xs);
  color: var(--muted);
}
.share-gallery-crisp-actions {
  display: flex;
  gap: 8px;
}
.share-gallery-crisp-edit,
.share-gallery-crisp-cancel {
  appearance: none;
  align-self: flex-start;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--strong);
  padding: 6px 12px;
  font-size: var(--text-xs);
  font-weight: 600;
  border-radius: 999px;
  cursor: pointer;
  transition: background 180ms var(--ease-snap), border-color 180ms var(--ease-snap);
}
.share-gallery-crisp-edit:hover,
.share-gallery-crisp-cancel:hover {
  background: var(--accent-ghost);
  border-color: var(--accent);
}
.share-gallery-crisp-ai {
  appearance: none;
  align-self: flex-start;
  border: 1px solid var(--accent);
  background: var(--accent-ghost);
  color: var(--accent);
  padding: 6px 12px;
  font-size: var(--text-xs);
  font-weight: 700;
  border-radius: 999px;
  cursor: pointer;
  transition: background 180ms var(--ease-snap), border-color 180ms var(--ease-snap);
}
.share-gallery-crisp-ai:hover:not(:disabled) {
  background: color-mix(in srgb, var(--accent) 16%, var(--accent-ghost));
}
.share-gallery-crisp-ai:disabled {
  opacity: 0.6;
  cursor: progress;
}

.stream-gallery-action {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px dashed var(--border-soft);
}
.stream-gallery-btn,
.stream-gallery-link {
  padding: 7px 16px;
  font-size: var(--text-sm);
}
.stream-gallery-tip {
  font-size: var(--text-xs);
  color: var(--muted);
  font-style: italic;
}

/* ============================================================================
 * Cycle 68: per-card skeleton + retry states for the streaming UI.
 * The streaming module (analyze_stream.js) paints the legacy renderer output,
 * then immediately overwrites every conversational-card text container with
 * .stream-loading skeleton blocks. On card events the skeleton is swapped for
 * real text; on card_error a retry button replaces it.
 * ============================================================================ */

[data-stream-state="loading"].stream-loading,
.stream-loading {
  position: relative;
}
.stream-skeleton {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 4px 0;
}
.stream-skeleton > span {
  display: block;
  height: 12px;
  border-radius: 6px;
  background: linear-gradient(
    90deg,
    var(--surface-soft) 0%,
    var(--accent-ghost) 50%,
    var(--surface-soft) 100%
  );
  background-size: 200% 100%;
  animation: karmalens-shimmer-sweep 1.4s linear infinite;
  filter: blur(1.5px);
}
.stream-skeleton-short {
  width: 60% !important;
}

.stream-errored {
  /* Card slot that failed its per-card LLM call; retry button lives inside. */
  background: var(--danger-bg);
  border-left: 3px solid var(--danger-border);
  padding: 12px 14px;
  border-radius: 8px;
  margin: 4px 0;
}
.stream-errored-secondary {
  /* Sibling slots inside the same card stay skeletonized but muted, so the
   * eye is drawn to the retry button rather than all the empty boxes. */
  opacity: 0.55;
}

.stream-card-retry-wrap {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}
.stream-card-retry-note {
  margin: 0;
  font-size: var(--text-sm);
  color: var(--danger);
  font-style: italic;
}
.stream-card-retry-btn {
  padding: 7px 16px;
  font-size: var(--text-sm);
  white-space: nowrap;
}
.stream-card-retry-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

/* Unobtrusive inline "refine" link shown under a card that fell back to its
   deterministic copy (the card already shows real text; this just offers an upgrade). */
.stream-card-retry-inline {
  margin-top: 6px;
}
.stream-card-retry-link {
  appearance: none;
  border: 0;
  background: transparent;
  padding: 0;
  color: var(--muted);
  font-size: var(--text-xs);
  font-weight: 600;
  cursor: pointer;
  transition: color var(--transition-fast);
}
.stream-card-retry-link:hover { color: var(--accent); }
.stream-card-retry-link:disabled { opacity: 0.6; cursor: not-allowed; }

.stream-permfail {
  background: var(--surface-soft);
  border-left: 3px solid var(--muted-strong);
  padding: 12px 14px;
  border-radius: 8px;
  opacity: 0.85;
}
.stream-card-permfail-msg {
  margin: 0;
  font-size: var(--text-sm);
  color: var(--muted-strong);
  font-style: italic;
}

@media (prefers-reduced-motion: reduce) {
  .stream-skeleton > span { animation: none; }
}

/* ── Missing-context clarify-and-explore card ─────────────────────────────── */
.analyze-shell .missing-context .mc-question {
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid var(--border);
}
.analyze-shell .missing-context .mc-question:first-of-type {
  border-top: 0;
  padding-top: 4px;
}
.analyze-shell .missing-context .mc-q-text {
  margin: 0 0 8px;
  font-weight: 600;
  color: var(--strong);
}
.analyze-shell .missing-context .mc-q-hint {
  margin: -4px 0 8px;
  font-size: var(--text-sm);
  color: var(--muted);
}
.analyze-shell .missing-context .mc-options {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 8px;
}
.analyze-shell .missing-context .mc-chip {
  margin: 0;
  background: var(--surface);
  color: var(--strong);
  border: 1px solid var(--border);
  padding: 6px 12px;
  font-size: var(--text-sm);
  border-radius: var(--radius-pill);
  cursor: pointer;
  box-shadow: none;
}
.analyze-shell .missing-context .mc-chip:hover {
  background: var(--surface-soft);
  border-color: var(--accent);
}
.analyze-shell .missing-context .mc-chip.is-selected {
  background: linear-gradient(180deg, var(--accent) 0%, var(--accent-dark) 100%);
  color: #fff;
  border-color: transparent;
  box-shadow: var(--shadow-accent-soft);
}
.analyze-shell .missing-context .mc-text {
  width: 100%;
  padding: 8px 10px;
  font-size: var(--text-sm);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm, 8px);
  background: var(--surface);
  color: var(--strong);
}
.analyze-shell .missing-context .mc-actions {
  margin-top: 16px;
}
.analyze-shell .missing-context .mc-note {
  margin-top: 8px;
}

/* ── Meta-card actions (Download PDF) ─────────────────────────────────────── */
.analyze-shell .meta-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin-top: 12px;
}

/* ============================================================================
 * Report chat pane (report_chat.js) — "Chat with your reading".
 * Docked LEFT of the report as a sticky grid column ≥1100px
 * (.analyze-shell[data-chat-open] becomes a [minmax(320px,360px) 1fr] grid);
 * fixed bottom sheet with a backdrop below that. Closed state is a floating
 * pill bottom-left. All colors ride the theme custom properties so the dark
 * default and [data-theme="light"] both work untouched.
 * ============================================================================ */

.report-chat-pane {
  display: flex;
  flex-direction: column;
  min-height: 0;
  overflow: hidden;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  padding: 14px 14px 12px;
}
.report-chat-pane[hidden] { display: none !important; }

.analyze-shell .report-chat-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--border-soft);
}
.analyze-shell .report-chat-title {
  margin: 0;
  font-size: var(--text-base);
  color: var(--strong);
}
.analyze-shell .report-chat-counter {
  margin: 3px 0 0;
  font-size: var(--text-xs);
  font-weight: 700;
  color: var(--muted);
  min-height: 14px;
}
.analyze-shell .report-chat-close {
  margin: 0;
  padding: 5px 10px;
  background: transparent;
  border: 1px solid var(--border);
  border-radius: var(--radius-pill);
  color: var(--muted);
  font-size: var(--text-sm);
  font-weight: 700;
  line-height: 1;
  box-shadow: none;
}
.analyze-shell .report-chat-close:hover:not(:disabled) {
  background: var(--surface-soft);
  border-color: var(--accent);
  color: var(--strong);
  transform: none;
  box-shadow: none;
}

.analyze-shell .report-chat-messages {
  flex: 1 1 auto;
  min-height: 120px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 12px 2px;
}
.analyze-shell .report-chat-note {
  margin: 4px 0;
  color: var(--muted);
  font-size: var(--text-sm);
}
.analyze-shell .report-chat-msg {
  max-width: 88%;
  padding: 8px 12px;
  border-radius: var(--radius-md);
  font-size: var(--text-sm);
  line-height: var(--leading-normal);
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
.analyze-shell .report-chat-msg--user {
  align-self: flex-end;
  background: linear-gradient(180deg, var(--accent) 0%, var(--accent-dark) 100%);
  color: #fff;
  border-bottom-right-radius: var(--radius-xs);
}
.analyze-shell .report-chat-msg--assistant {
  align-self: flex-start;
  background: var(--surface-soft);
  border: 1px solid var(--border-soft);
  color: var(--text);
  border-bottom-left-radius: var(--radius-xs);
  /* Assistant replies render through the minimal markdown renderer (block
     paragraphs/lists carry the structure) — pre-wrap would double the gaps. */
  white-space: normal;
}

/* Minimal markdown inside assistant bubbles: paragraphs, bold, lists. */
.analyze-shell .report-chat-md-p,
.analyze-shell .report-chat-md-h {
  margin: 0 0 8px;
}
.analyze-shell .report-chat-msg--assistant > :last-child {
  margin-bottom: 0;
}
.analyze-shell .report-chat-md-list {
  margin: 0 0 8px;
  padding-left: 20px;
}
.analyze-shell .report-chat-md-list li {
  margin: 0 0 4px;
}
.analyze-shell .report-chat-md-list li:last-child {
  margin-bottom: 0;
}
.analyze-shell .report-chat-msg.is-streaming::after {
  content: "▍";
  color: var(--accent);
  animation: karmalens-pulse 1s ease-in-out infinite;
}
.analyze-shell .report-chat-msg--error {
  align-self: flex-start;
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  background: var(--danger-bg);
  border: 1px solid var(--danger-border);
  color: var(--danger);
}
.analyze-shell .report-chat-retry {
  margin: 0;
  padding: 4px 12px;
  font-size: var(--text-xs);
  background: var(--surface);
  color: var(--strong);
  border: 1px solid var(--border-strong);
  box-shadow: none;
}
.analyze-shell .report-chat-retry:hover:not(:disabled) {
  border-color: var(--accent);
  background: var(--surface-soft);
  transform: none;
  box-shadow: none;
}

.analyze-shell .report-chat-capnote {
  margin: 0 0 10px;
  padding: 10px 12px;
  border: 1px solid var(--accent-ghost);
  background: var(--accent-soft);
  border-radius: var(--radius-md);
  color: var(--strong);
  font-size: var(--text-sm);
  line-height: var(--leading-normal);
}
.analyze-shell .report-chat-capnote a {
  color: var(--accent-dark);
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.analyze-shell .report-chat-form {
  display: flex;
  align-items: flex-end;
  gap: 8px;
}
.analyze-shell .report-chat-input {
  flex: 1 1 auto;
  min-height: 42px;
  max-height: 96px;
  padding: 10px 12px;
  /* Explicit 16px (not a token) — anything smaller makes iOS Safari auto-zoom
     the page when the chat input focuses. Matches the dilemma textarea. */
  font-size: 16px;
  resize: none;
  overflow-y: auto;
}
.analyze-shell .report-chat-send {
  margin: 0;
  padding: 10px 16px;
  flex: 0 0 auto;
}

.analyze-shell .report-chat-foot {
  margin: 10px 0 0;
  font-size: var(--text-xs);
  color: var(--muted);
}
.analyze-shell .report-chat-foot a {
  color: var(--accent);
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 3px;
  transition: color var(--transition-fast);
}
.analyze-shell .report-chat-foot a:hover { color: var(--accent-dark); }

/* Floating pill (closed state) — body-level, viewport-fixed. */
.report-chat-pill {
  position: fixed;
  left: 18px;
  /* Clears the iPhone home-bar (safe-area inset is 0 elsewhere). */
  bottom: calc(18px + env(safe-area-inset-bottom, 0px));
  z-index: 40;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 44px; /* comfortable touch target */
  padding: 11px 18px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--border-strong);
  background: var(--surface);
  color: var(--strong);
  font-family: inherit;
  font-size: var(--text-sm);
  font-weight: 700;
  cursor: pointer;
  box-shadow: var(--shadow-lg);
  transition:
    border-color var(--transition-base),
    background var(--transition-base),
    transform var(--transition-base);
}
.report-chat-pill:hover {
  border-color: var(--accent);
  background: var(--surface-soft);
  transform: translateY(-1px);
}
.report-chat-pill[hidden] { display: none !important; }

/* Mobile-sheet backdrop — body-level; desktop grid mode never shows it. */
.report-chat-backdrop {
  position: fixed;
  inset: 0;
  z-index: 55;
  background: rgba(5, 9, 20, 0.55);
  backdrop-filter: blur(2px);
}
.report-chat-backdrop[hidden] { display: none !important; }

/* Desktop ≥1100px — shell becomes a 2-col grid; pane docks left, sticky under
   the site header. Every non-pane child moves to column 2. */
@media (min-width: 1100px) {
  .report-chat-backdrop { display: none !important; }
  .analyze-shell[data-chat-open="true"] {
    display: grid;
    grid-template-columns: minmax(320px, 360px) 1fr;
    column-gap: 22px;
    align-items: start;
  }
  .analyze-shell[data-chat-open="true"] > * {
    grid-column: 2;
    min-width: 0;
  }
  .analyze-shell[data-chat-open="true"] > .report-chat-pane {
    grid-column: 1;
    grid-row: 1 / span 3; /* topbar + form card + result-root */
    position: sticky;
    top: 78px; /* clears the sticky .site-header */
    max-height: calc(100vh - 98px);
  }
}

/* Below 1100px — the pane opens as a fixed bottom sheet (slide-up + backdrop). */
@media (max-width: 1099.98px) {
  .report-chat-pane {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 60;
    max-height: 72vh;
    border-radius: var(--radius-lg) var(--radius-lg) 0 0;
    border-bottom: 0;
    box-shadow: var(--shadow-xl);
    padding-bottom: calc(12px + env(safe-area-inset-bottom, 0px));
    animation: report-chat-sheet-up 240ms var(--ease-snap);
  }
  /* Scroll-lock while the sheet is open — report_chat.js toggles the class on
     every open/close path (ESC, backdrop, ✕, detach). Media-gating it here
     releases the lock automatically when a resize docks the pane at ≥1100px. */
  body.report-chat-open {
    overflow: hidden;
  }
  /* Closed state — keep the feedback/share buttons clear of the floating pill. */
  body.report-chat-pill-visible .analyze-shell {
    padding-bottom: calc(72px + env(safe-area-inset-bottom, 0px));
  }
  /* ≥44px touch targets for the sheet controls. */
  .analyze-shell .report-chat-input { min-height: 44px; }
  .analyze-shell .report-chat-send { min-height: 44px; }
  .analyze-shell .report-chat-close { min-height: 44px; min-width: 44px; }
}

/* Small phones — the pill label shortens to "💬 Chat" (tail span hides). */
@media (max-width: 420px) {
  .report-chat-pill .report-chat-pill-tail { display: none; }
}

@keyframes report-chat-sheet-up {
  from { transform: translateY(24px); opacity: 0.6; }
  to   { transform: translateY(0);    opacity: 1; }
}

@media (prefers-reduced-motion: reduce) {
  .report-chat-pane { animation: none; }
  .analyze-shell .report-chat-msg.is-streaming::after { animation: none; }
  .report-chat-pill { transition: none; }
}

/* ── Anonymous first reading (/try/) — gate + locked stack ──────────────────
   The teaser reuses the verdict + share spotlight styles above. Only the
   gate card and the locked-titles stack are new surfaces. Tokens only. */
.analyze-shell .anon-gate {
  border-color: var(--accent);
  box-shadow: var(--shadow-accent-soft);
}

.analyze-shell .anon-gate h3 {
  margin-top: 0;
  color: var(--strong);
  font-size: var(--text-xl);
}

.analyze-shell .anon-gate-body {
  color: var(--muted-strong);
  line-height: var(--leading-normal);
}

.analyze-shell .anon-gate-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-3);
  margin-top: var(--space-4);
}

.analyze-shell .anon-gate-login {
  margin: var(--space-3) 0 0;
  font-size: var(--text-sm);
  color: var(--muted);
}

.analyze-shell .anon-locked {
  background: var(--surface-soft);
}

.analyze-shell .anon-locked h3 {
  margin-top: 0;
  color: var(--muted-strong);
}

.analyze-shell .anon-locked-list {
  list-style: none;
  margin: var(--space-3) 0 0;
  padding: 0;
  display: grid;
  gap: var(--space-2);
}

.analyze-shell .anon-locked-item {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: 10px 12px;
  border: 1px dashed var(--border);
  border-radius: 12px;
  color: var(--muted);
  font-weight: 600;
}

.analyze-shell .anon-locked-icon {
  font-size: var(--text-sm);
  opacity: 0.75;
}

.analyze-shell .anon-cap .anon-gate-actions .text-link {
  font-size: var(--text-sm);
}

/* ── Deep Reading (₹79 one-tap unlock) — offer card + premium deep cards ──
   Rendered by deep_reading.js directly after the guidance/verse card. */

.analyze-shell .deep-offer {
  background: linear-gradient(180deg, var(--accent-ghost) 0%, var(--surface) 100%);
  border: 1px solid color-mix(in srgb, var(--accent) 32%, var(--border));
  border-left: 5px solid var(--accent);
}

.analyze-shell .deep-offer .capture-note,
.analyze-shell .deep-card .deep-note {
  display: inline-block;
  font-size: var(--text-xs);
  text-transform: uppercase;
  letter-spacing: var(--tracking-eyebrow);
  color: var(--accent);
  background: color-mix(in srgb, var(--accent) 14%, transparent);
  padding: 4px 8px;
  border-radius: var(--radius-pill);
  margin-bottom: 8px;
  font-weight: 750;
}

.analyze-shell .deep-offer-hook {
  margin: 2px 0 10px;
  color: var(--strong);
  font-size: var(--text-base);
  line-height: var(--leading-normal);
  font-weight: 550;
}

/* ── FREE Deep Reading offer — warm/gold gift treatment (distinct from the
   muted paid upsell), a "Free" ribbon, and a struck-through ₹79 value anchor.
   The paid card is untouched: this only applies with .deep-offer--free. ── */
.analyze-shell .deep-offer.deep-offer--free {
  position: relative;
  overflow: hidden;
  background: linear-gradient(180deg, var(--gold-soft) 0%, var(--surface) 100%);
  border: 1px solid color-mix(in srgb, var(--gold) 42%, var(--border));
  border-left: 5px solid var(--gold);
}

.analyze-shell .deep-offer--free .capture-note {
  color: color-mix(in srgb, var(--gold) 78%, var(--strong));
  background: color-mix(in srgb, var(--gold) 18%, transparent);
}

.analyze-shell .deep-offer--free .deep-offer-list li::before {
  color: var(--gold);
}

/* Corner "Free" ribbon */
.analyze-shell .deep-offer--free::after {
  content: "Free";
  position: absolute;
  top: 12px;
  right: -30px;
  transform: rotate(45deg);
  background: var(--gold);
  color: #1a1205;
  font-size: var(--text-xs);
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 4px 34px;
  box-shadow: var(--shadow-sm);
}

.analyze-shell .deep-offer--free .deep-offer-anchor {
  margin: 10px 0 0;
  text-align: center;
  color: var(--strong);
  font-size: var(--text-sm);
  font-weight: 600;
}

.analyze-shell .deep-offer--free .deep-offer-anchor-was {
  text-decoration: line-through;
  color: var(--muted);
  font-weight: 500;
}

.analyze-shell .deep-offer--free .deep-offer-button {
  background: var(--gold);
  border-color: var(--gold);
  color: #1a1205;
}

/* Free peak-intent teaser button (verdict-card claim) rides the gold treatment. */
.analyze-shell .deep-teaser-buy--free {
  background: var(--gold);
  border-color: var(--gold);
  color: #1a1205;
}

/* ── Repurchase wall — the ₹79 second-touch card after a FREE unlock ── */
.analyze-shell .deep-repurchase {
  background: linear-gradient(180deg, var(--accent-ghost) 0%, var(--surface) 100%);
  border: 1px solid color-mix(in srgb, var(--accent) 32%, var(--border));
  border-left: 5px solid var(--accent);
}

.analyze-shell .deep-repurchase-text {
  margin: 4px 0 0;
  color: var(--strong);
  font-size: var(--text-base);
  line-height: var(--leading-normal);
  font-weight: 550;
}

.analyze-shell .deep-repurchase-cta {
  display: inline-block;
  width: auto;
  margin-top: 14px;
  text-decoration: none;
  text-align: center;
}

.analyze-shell .deep-offer-list {
  list-style: none;
  margin: 6px 0 4px;
  padding: 0;
  display: grid;
  gap: 8px;
}

.analyze-shell .deep-offer-list li {
  position: relative;
  padding: 0 0 0 22px;
  color: var(--text);
  font-size: var(--text-base);
  line-height: var(--leading-normal);
}

.analyze-shell .deep-offer-list li::before {
  content: "◆";
  position: absolute;
  left: 2px;
  color: var(--accent);
  font-size: var(--text-xs);
  top: 5px;
}

.analyze-shell .deep-offer-button {
  width: 100%;
  margin-top: 14px;
}

.analyze-shell .deep-offer-subline {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: var(--text-sm);
  text-align: center;
}

.analyze-shell .deep-offer-status {
  margin: 8px 0 0;
  color: var(--muted-strong);
  font-size: var(--text-sm);
  text-align: center;
  min-height: 18px;
}

.analyze-shell .deep-state-card .deep-state-text {
  margin: 4px 0 0;
  color: var(--strong);
  font-weight: 600;
}

/* Premium deep cards (replace the offer once generated) */
.analyze-shell .deep-reading-stack {
  display: grid;
  gap: 18px;
}

.analyze-shell .deep-card {
  background: linear-gradient(180deg, var(--accent-ghost) 0%, var(--surface) 100%);
  border: 1px solid color-mix(in srgb, var(--accent) 28%, var(--border));
  border-left: 5px solid var(--accent);
}

.analyze-shell .deep-why-para { color: var(--text); }

/* Loop-closers — "The stories you're telling yourself" (leads the Deep Reading) */
.analyze-shell .deep-self-story {
  border-top: 1px solid var(--border-soft);
  padding-top: 12px;
  margin-top: 12px;
}

.analyze-shell .deep-self-story:first-of-type {
  border-top: 0;
  padding-top: 0;
  margin-top: 4px;
}

.analyze-shell .deep-self-story-story {
  margin: 0 0 4px;
  color: var(--strong);
  font-weight: 650;
}

.analyze-shell .deep-self-story-close {
  margin: 0;
  padding-left: 12px;
  border-left: 3px solid var(--accent);
  color: var(--text);
  font-size: var(--text-sm);
}

.analyze-shell .deep-verse {
  border-top: 1px solid var(--border-soft);
  padding-top: 12px;
  margin-top: 12px;
}

.analyze-shell .deep-verse:first-of-type {
  border-top: 0;
  padding-top: 0;
  margin-top: 4px;
}

.analyze-shell .deep-pair { margin: 4px 0; }

.analyze-shell .deep-pair-label {
  display: block;
  font-size: var(--text-xs);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--muted-strong);
  font-weight: 750;
}

.analyze-shell .deep-pair-text {
  margin: 2px 0 0;
  color: var(--text);
  font-size: var(--text-sm);
}

.analyze-shell .deep-plan-day {
  border-top: 1px solid var(--border-soft);
  padding: 10px 0 2px;
}

.analyze-shell .deep-plan-day:first-of-type { border-top: 0; }

.analyze-shell .deep-plan-label {
  display: inline-block;
  font-size: var(--text-xs);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--accent);
  font-weight: 750;
  margin-bottom: 2px;
}

.analyze-shell .deep-plan-day h4 { margin: 0 0 4px; }
.analyze-shell .deep-plan-day p { margin: 0 0 8px; }

.analyze-shell .deep-say-context { color: var(--muted-strong); font-size: var(--text-sm); }

.analyze-shell .deep-say-script {
  border-top: 1px solid var(--border-soft);
  padding-top: 10px;
  margin-top: 10px;
}

.analyze-shell .deep-say-situation {
  margin: 0 0 4px;
  color: var(--muted-strong);
  font-size: var(--text-sm);
  font-weight: 700;
}

.analyze-shell .deep-say-words {
  margin: 0;
  padding: 8px 12px;
  border-left: 3px solid var(--accent);
  background: color-mix(in srgb, var(--surface) 80%, transparent);
  border-radius: var(--radius-sm);
  color: var(--strong);
}

/* Chat-cap inline upsell (second touch, same SKU) */
.analyze-shell .deep-cap-upsell { display: block; margin-top: 6px; }

.analyze-shell .deep-cap-upsell-button {
  display: block;
  width: 100%;
  margin-top: 8px;
  padding: 8px 14px;
  font-size: var(--text-sm);
}

/* Verdict-adjacent teaser — one quiet tappable line pointing at the offer card */
.analyze-shell button.deep-teaser-line {
  display: block;
  width: 100%;
  margin-top: 14px;
  padding: 0;
  background: none;
  border: none;
  border-radius: 0;
  box-shadow: none;
  text-align: left;
  color: var(--muted);
  font-weight: 600;
  font-size: var(--text-sm);
  line-height: var(--leading-normal);
}

.analyze-shell button.deep-teaser-line:hover:not(:disabled),
.analyze-shell button.deep-teaser-line:active:not(:disabled) {
  color: var(--accent-dark);
  box-shadow: none;
  transform: none;
}

/* Peak-intent teaser bar — rides on the verdict card and carries a DIRECT buy
   button so the ₹79 unlock is one tap from the moment the verdict is read, no
   scroll to the offer card required. */
.analyze-shell .deep-teaser-bar {
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px solid var(--border-soft);
  display: flex;
  flex-direction: column;
  align-items: stretch;
}

/* The bar owns the top spacing; drop the standalone line's own top margin. */
.analyze-shell .deep-teaser-bar button.deep-teaser-line {
  margin-top: 0;
}

.analyze-shell .deep-teaser-buy {
  width: 100%;
  margin-top: 10px;
  padding: 12px 20px;
}

.analyze-shell .deep-teaser-status {
  margin: 8px 0 0;
  color: var(--muted-strong);
  font-size: var(--text-sm);
  text-align: center;
  min-height: 18px;
}

/* ── "Your last reading" pointer (returning-user card under the dilemma box) ── */
.analyze-shell .last-reading-card {
  display: block;
  text-decoration: none;
  border-left: 3px solid var(--accent);
  padding: 14px 18px;
}

.analyze-shell .last-reading-card:hover,
.analyze-shell .last-reading-card:focus-within {
  border-color: var(--accent);
  box-shadow: var(--shadow-lg);
}

.analyze-shell .last-reading-main {
  display: block;
  text-decoration: none;
  color: inherit;
}

.analyze-shell .last-reading-deep-chip {
  display: inline-block;
  margin-top: 10px;
  text-decoration: none;
  color: var(--muted);
  font-weight: 600;
  font-size: var(--text-sm);
}

.analyze-shell a.last-reading-deep-chip:hover,
.analyze-shell a.last-reading-deep-chip:focus-visible {
  color: var(--accent-dark);
}

.last-reading-label {
  display: block;
  font-size: var(--text-xs);
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 4px;
}

.last-reading-quote {
  display: block;
  color: var(--strong);
  font-weight: 600;
  line-height: 1.45;
}

.last-reading-meta {
  display: block;
  margin-top: 6px;
  color: var(--muted);
  font-size: var(--text-sm);
}

/* Per-platform card-image download links in the live share panel (§7). */
.share-image-caption {
  margin: 14px 0 6px;
  color: var(--muted, #aebbd3);
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  font-weight: 650;
}
.share-image-row {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}
.share-image-download {
  display: inline-flex;
  align-items: center;
  padding: 8px 14px;
  border-radius: 10px;
  border: 1px solid var(--border, #24344f);
  color: var(--text, #e8eefc);
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 600;
}
.share-image-download:hover { border-color: var(--accent, #8097ff); }
