/* codex-reset.com — page layer for /timeline, /radar, legal and 404.
   Extends the CRT design system in styles.css: same tokens, no overrides of
   :root, so stylesheet order never matters. Every panel here is a terminal
   window (.win) wearing the same chrome as the home /status card. */

:root {
  --c-unlock: #ff9b54;
  --c-credits: #6ad1ff;
}

/* ---------- shell ---------- */

.page-shell {
  position: relative;
  z-index: 1;
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 20px;
}

.page-shell section {
  padding: 26px 0 0;
}

.page-shell .hero.page-hero {
  padding: 48px 0 8px;
}

.page-hero .tagline {
  max-width: 76ch;
}

.signal-xl {
  max-width: 720px;
  margin: 22px auto 0;
  font-size: 14.5px;
  padding: 14px 18px;
  min-width: 0;
  /* Live signal text can carry long unbroken latin runs (handles, URLs);
     translated summaries surfaced this as 390px overflow on /zh/radar. */
  overflow-wrap: anywhere;
}

/* ---------- terminal windows ---------- */

.win {
  background: var(--crt);
  border: 1px solid rgba(65, 255, 139, 0.18);
  border-radius: 12px;
  box-shadow:
    0 0 0 1px rgba(0, 0, 0, 0.6),
    0 18px 50px rgba(0, 0, 0, 0.45),
    0 0 34px rgba(65, 255, 139, 0.07);
  overflow: hidden;
}

section.win {
  padding: 0;
  margin-top: 26px;
}

.win-body {
  padding: 18px 20px 20px;
  min-width: 0;
}

.block-title {
  margin-top: 24px;
  font-size: 14px;
  color: var(--fg);
  letter-spacing: 0.03em;
}

.block-title:first-child {
  margin-top: 0;
}

/* ---------- status + reset impact ---------- */

.status-hero {
  text-align: left;
}

.status-hero h1,
.status-hero .tagline {
  margin-inline: 0;
  text-align: left;
}

.status-banner {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 14px;
  align-items: center;
  margin-top: 24px;
  padding: 15px 18px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background:
    linear-gradient(90deg, rgba(65, 255, 139, 0.08), transparent 45%),
    var(--crt);
}

.status-banner[data-state="operational"] {
  border-color: rgba(65, 255, 139, 0.34);
}

.status-banner[data-state="degraded"],
.status-banner[data-state="monitoring"] {
  border-color: rgba(255, 180, 84, 0.45);
  background:
    linear-gradient(90deg, rgba(255, 180, 84, 0.1), transparent 45%),
    var(--crt);
}

.status-banner[data-state="outage"],
.status-banner[data-state="stale"] {
  border-color: rgba(255, 95, 86, 0.5);
}

.status-banner b,
.status-banner small {
  display: block;
}

.status-banner > .translation-meta {
  grid-column: 2 / -1;
  margin-top: -4px;
}

.status-banner b {
  color: var(--fg);
  font-size: clamp(14px, 2.2vw, 18px);
  letter-spacing: 0.04em;
}

.status-banner small {
  margin-top: 3px;
  color: var(--faint);
  font-size: 11.5px;
}

.status-banner .status-incident-name {
  color: var(--dim);
}

.status-orb {
  width: 13px;
  height: 13px;
  border: 2px solid var(--faint);
  border-radius: 50%;
  box-shadow: 0 0 0 5px rgba(121, 140, 132, 0.08);
}

.status-banner[data-state="operational"] .status-orb {
  border-color: var(--p1);
  background: var(--p1);
  box-shadow: 0 0 16px rgba(65, 255, 139, 0.75);
}

.status-banner[data-state="degraded"] .status-orb,
.status-banner[data-state="monitoring"] .status-orb {
  border-color: var(--p3);
  background: var(--p3);
  box-shadow: 0 0 16px rgba(255, 180, 84, 0.65);
}

.status-banner[data-state="outage"] .status-orb,
.status-banner[data-state="stale"] .status-orb {
  border-color: var(--red);
  background: var(--red);
  box-shadow: 0 0 16px rgba(255, 95, 86, 0.65);
}

.status-stats {
  padding-top: 18px;
}

.status-primary-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  gap: 18px;
}

.status-primary-grid > .win {
  margin-top: 0;
}

.panel-intro {
  display: flex;
  gap: 8px;
  align-items: flex-start;
  margin: 0 0 14px;
  color: var(--dim);
  font-size: 12px;
  line-height: 1.55;
}

.panel-intro .ui-icon {
  flex: 0 0 auto;
  margin-top: 2px;
  color: var(--p1);
}

.surface-list {
  list-style: none;
  margin: 0;
  padding: 0;
  border-block: 1px solid var(--line);
}

.surface-row {
  display: grid;
  grid-template-columns: 20px minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  padding: 11px 2px;
  border-bottom: 1px solid var(--line);
}

.surface-row:last-child {
  border-bottom: 0;
}

.surface-icon {
  color: var(--faint);
}

.surface-name {
  color: var(--fg);
  font-size: 12.5px;
}

.surface-state {
  display: inline-flex;
  gap: 7px;
  align-items: center;
  color: var(--faint);
  font-size: 11px;
  text-transform: lowercase;
}

.state-dot {
  width: 6px;
  height: 6px;
  border: 1px solid currentColor;
  border-radius: 50%;
}

.surface-row[data-state="operational"] .surface-state {
  color: var(--p1);
}

.surface-row[data-state="operational"] .state-dot {
  background: var(--p1);
}

.surface-row[data-state="degraded_performance"] .surface-state,
.surface-row[data-state="under_maintenance"] .surface-state {
  color: var(--p3);
}

.surface-row[data-state="partial_outage"] .surface-state,
.surface-row[data-state="major_outage"] .surface-state {
  color: var(--red);
}

.comp-card {
  display: grid;
  gap: 13px;
}

.comp-head,
.source-actions,
.history-head {
  display: flex;
  gap: 10px;
  align-items: center;
  justify-content: space-between;
}

.evidence-badge {
  display: inline-flex;
  gap: 5px;
  align-items: center;
  width: fit-content;
  color: var(--p1);
  font-size: 9.5px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.comp-kind,
.entry-kind {
  color: var(--p3);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.comp-card h2,
.method-note h2 {
  margin: 0;
  color: var(--fg);
}

.comp-card h2 {
  font-size: clamp(17px, 2.5vw, 22px);
}

.comp-summary {
  margin: 0;
  color: var(--dim);
  font-size: 12.5px;
  line-height: 1.6;
}

.comp-sequence {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 22px minmax(0, 1fr);
  align-items: center;
  padding: 13px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: rgba(65, 255, 139, 0.025);
}

.comp-sequence > div {
  display: grid;
  grid-template-columns: 20px minmax(0, 1fr);
  gap: 4px 8px;
}

.comp-sequence b,
.comp-sequence time {
  display: block;
}

.comp-sequence b {
  color: var(--fg);
  font-size: 10px;
  text-transform: uppercase;
}

.comp-sequence time {
  margin-top: 2px;
  color: var(--faint);
  font-size: 9.5px;
}

.comp-sequence strong {
  grid-column: 2;
  color: var(--p3);
  font-size: 11px;
}

.sequence-icon {
  grid-row: 1 / span 2;
  color: var(--p1);
}

.sequence-line {
  height: 1px;
  background: var(--p1-dim);
}

.comp-audience {
  display: flex;
  gap: 7px;
  align-items: center;
  margin: 0;
  color: var(--dim);
  font-size: 11.5px;
}

.source-actions {
  justify-content: flex-start;
  flex-wrap: wrap;
  font-size: 11.5px;
}

.status-history-win {
  margin-top: 26px;
}

.history-head {
  align-items: flex-start;
}

.history-head .section-intro {
  max-width: 70ch;
  margin-bottom: 0;
  font-size: 12px;
}

.status-ledger {
  list-style: none;
  margin: 20px 0 0;
  padding: 0;
  border-top: 1px solid var(--line);
}

.status-entry {
  position: relative;
  display: grid;
  grid-template-columns: 28px minmax(125px, 0.7fr) minmax(0, 2fr) auto 24px;
  gap: 12px;
  align-items: center;
  padding: 15px 4px;
  border-bottom: 1px solid var(--line);
}

.status-entry > time {
  color: var(--faint);
  font-size: 10.5px;
  font-variant-numeric: tabular-nums;
}

.entry-rail {
  position: relative;
  z-index: 1;
  display: grid;
  width: 26px;
  height: 26px;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 50%;
  color: var(--p3);
  background: var(--crt);
}

.status-entry[data-kind="reset"] .entry-rail {
  color: var(--p1);
}

.entry-copy {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.entry-copy strong,
.entry-copy > span:last-child {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.entry-copy strong {
  color: var(--fg);
  font-size: 12px;
}

.entry-copy > span:last-child {
  color: var(--faint);
  font-size: 10.5px;
}

.status-entry > .event-link {
  width: 24px;
  height: 24px;
}

.method-note {
  display: grid;
  grid-template-columns: 26px minmax(0, 1fr);
  gap: 12px;
  margin: 26px 0 0;
  padding: 18px;
  border-left: 2px solid var(--p3);
  background: rgba(255, 180, 84, 0.045);
}

.method-note > span {
  color: var(--p3);
  font-size: 20px;
}

.method-note h2 {
  font-size: 14px;
}

.method-note p {
  margin: 6px 0 0;
  color: var(--dim);
  font-size: 11.5px;
  line-height: 1.6;
}

.status-dual-track {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin-top: 20px;
}

.status-track {
  min-width: 0;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: rgba(65, 255, 139, 0.018);
}

.status-track[data-track="resets"] {
  background: rgba(65, 255, 139, 0.04);
}

.status-track h3 {
  margin: 0 0 11px;
  color: var(--faint);
  font-size: 10.5px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.status-track ol {
  display: grid;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.status-timeline-item {
  display: grid;
  /* chip sized to content, title flexes with ellipsis — reversed order made
     long titles overflow across the chip (2026-07-26 mobile QA). */
  grid-template-columns: auto minmax(0, 1fr) 24px;
  gap: 4px 8px;
  align-items: center;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--crt);
}

.status-timeline-item time {
  grid-column: 1 / -1;
  color: var(--faint);
  font-size: 9.5px;
  font-variant-numeric: tabular-nums;
}

.status-timeline-item strong {
  min-width: 0;
  overflow: hidden;
  color: var(--fg);
  font-size: 11px;
  line-height: 1.35;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.status-timeline-item .status-source-link {
  width: 24px;
  height: 24px;
  overflow: hidden;
  color: var(--faint);
  font-size: 0;
}

.status-timeline-item .status-source-link::before {
  width: 14px;
  height: 14px;
}

.empty-state {
  padding: 18px;
  border: 1px dashed var(--line);
  border-radius: 10px;
}

.empty-state h2 {
  margin: 0;
  color: var(--fg);
  font-size: 15px;
}

.signal-card > .translation-meta,
.info-card > .translation-meta,
.comp-card > .translation-meta,
.detail-card > .translation-meta,
.status-track .translation-meta {
  margin-top: 10px;
}

.status-track .translation-original p {
  max-width: none;
}

.empty-state p {
  margin: 7px 0 0;
  color: var(--faint);
  font-size: 11.5px;
  line-height: 1.55;
}

/* ---------- stat strip ---------- */

.stat-strip {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(118px, 1fr));
  gap: 10px;
}

.stat {
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--panel);
  padding: 11px 13px;
  display: grid;
  gap: 2px;
}

.stat-label {
  color: var(--faint);
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.stat-value {
  color: var(--fg);
  font-size: clamp(1.25rem, 2.8vw, 1.6rem);
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.stat-hint {
  color: var(--faint);
  font-size: 11px;
}

/* ---------- filter controls (CLI flags) ---------- */

.controls {
  display: grid;
  gap: 10px;
}

.control-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.flag {
  color: var(--p3);
  font-size: 12px;
  font-weight: 700;
  min-width: 62px;
}

.date-field {
  display: flex;
  gap: 6px;
  align-items: center;
  color: var(--dim);
  font-size: 12.5px;
}

input[type="date"] {
  font-family: var(--mono);
  font-size: 12.5px;
  color: var(--fg);
  background: var(--crt);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 5px 9px;
  color-scheme: dark;
}

input[type="date"]:focus {
  outline: 2px solid var(--p1);
  outline-offset: 1px;
}

/* ---------- scatter chart ---------- */

.scatter-wrap {
  position: relative;
  margin-top: 12px;
}

#timeline-scatter svg {
  width: 100%;
  height: auto;
  display: block;
}

#timeline-scatter .pt {
  cursor: pointer;
}

.chart-tip {
  position: absolute;
  z-index: 5;
  pointer-events: none;
  max-width: 300px;
  background: rgba(6, 10, 9, 0.96);
  border: 1px solid var(--p1-dim);
  border-radius: 8px;
  padding: 8px 10px;
  font-size: 12px;
  line-height: 1.5;
  color: var(--fg);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}

.chart-tip .tip-kind {
  color: var(--p1);
  font-weight: 700;
  letter-spacing: 0.08em;
  font-size: 10.5px;
}

.chart-tip .tip-time {
  color: var(--faint);
  font-size: 11px;
}

.legend {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 16px;
  margin-top: 10px;
  font-size: 11.5px;
  color: var(--dim);
}

.legend-item[data-kind="reset"] {
  color: var(--p1);
}

.legend-item[data-kind="boost"] {
  color: var(--p3);
}

.legend-item[data-kind="unlock"] {
  color: var(--c-unlock);
}

.legend-item[data-kind="credits"] {
  color: var(--c-credits);
}

.legend-item[data-kind="preview"] {
  color: var(--faint);
}

.detail-card {
  margin-top: 12px;
  border: 1px solid rgba(65, 255, 139, 0.35);
  border-radius: 10px;
  background: rgba(65, 255, 139, 0.05);
  padding: 12px 14px;
  font-size: 13px;
}

.detail-card[hidden] {
  display: none;
}

.detail-head {
  display: flex;
  align-items: baseline;
  gap: 10px;
  flex-wrap: wrap;
}

.detail-time {
  color: var(--faint);
  font-size: 12px;
  font-variant-numeric: tabular-nums;
}

.detail-summary {
  margin-top: 6px;
  color: var(--fg);
  overflow-wrap: anywhere;
}

.detail-links {
  margin-top: 8px;
  display: flex;
  gap: 14px;
  font-size: 12.5px;
}

/* ---------- table extras ---------- */

.sort-button {
  appearance: none;
  background: none;
  border: 0;
  padding: 0;
  color: inherit;
  font: inherit;
  letter-spacing: inherit;
  text-transform: inherit;
  cursor: pointer;
}

.sort-button:hover,
.sort-button:focus-visible {
  color: var(--fg);
  text-decoration: underline;
  text-underline-offset: 3px;
}

th[aria-sort="descending"] .sort-button::after {
  content: " ▼";
  font-size: 9px;
}

th[aria-sort="ascending"] .sort-button::after {
  content: " ▲";
  font-size: 9px;
}

tbody tr {
  transition: background 0.15s ease;
}

tbody tr:hover {
  background: rgba(65, 255, 139, 0.04);
}

tbody tr[data-hot] {
  background: rgba(65, 255, 139, 0.09);
}

td .chip {
  margin-right: 6px;
  white-space: nowrap;
}

td:first-child {
  font-weight: 400;
  font-variant-numeric: tabular-nums;
  font-size: 12px;
}

.chip[data-kind="preview"] {
  color: var(--dim);
  border-style: dashed;
}

/* ---------- radar console ---------- */

.page-radar-grid {
  margin-top: 26px;
}

.stack {
  display: grid;
  gap: 14px;
  align-content: start;
  min-width: 0;
}

.stack .win {
  margin-top: 0;
}

.info-card .info-kicker {
  color: var(--faint);
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.info-card h3 {
  color: var(--fg);
  font-size: 15px;
  margin: 6px 0 4px;
  letter-spacing: 0.01em;
}

.info-card p {
  color: var(--dim);
  font-size: 13px;
}

.info-card .info-sub {
  margin-top: 6px;
  color: var(--faint);
  font-size: 11.5px;
}

.signal-card {
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--panel);
  padding: 16px 18px;
}

.signal-card h2 {
  font-size: 1.05rem;
  margin-top: 6px;
}

.signal-card p {
  color: var(--dim);
  font-size: 13.5px;
  margin-top: 6px;
  overflow-wrap: anywhere;
}

.signal-card a {
  display: inline-block;
  margin-top: 8px;
  font-size: 13px;
}

.signal-kicker {
  color: var(--faint);
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.signal-card-active {
  border-color: rgba(65, 255, 139, 0.5);
  background: rgba(65, 255, 139, 0.06);
  box-shadow: 0 0 30px rgba(65, 255, 139, 0.12);
  animation: pulse 2.4s ease-in-out infinite;
}

.signal-card-active h2 {
  color: var(--p1);
}

.signal-meta {
  font-size: 11.5px;
  color: var(--faint);
}

/* ---------- aggregate radar + Juice data ---------- */

.radar-aggregate-hero {
  text-align: left;
}

.radar-aggregate-hero h1,
.radar-aggregate-hero .tagline {
  margin-inline: 0;
  text-align: left;
}

.radar-summary {
  margin-top: 22px;
  color: var(--fg);
  font-size: clamp(13px, 2vw, 16px);
  font-weight: 700;
}

.signal-tracks {
  margin-top: 16px;
  border-block: 1px solid var(--line);
}

.signal-track {
  display: grid;
  grid-template-columns: 24px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  padding: 13px 4px;
  border-bottom: 1px solid var(--line);
}

.signal-track:last-child {
  border-bottom: 0;
}

.signal-track p,
.signal-track strong,
.signal-track small {
  display: block;
}

.signal-track p {
  color: var(--faint);
  font-size: 10.5px;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}

.signal-track strong {
  margin-top: 2px;
  color: var(--fg);
  font-size: 14px;
}

.signal-track small {
  margin-top: 3px;
  color: var(--faint);
  font-size: 11px;
}

.track-mark {
  color: var(--faint);
  font-size: 20px;
  text-align: center;
}

.signal-track[data-state="operational"] .track-mark,
.signal-track[data-state="normal"] .track-mark,
.signal-track[data-state="fresh"] .track-mark {
  color: var(--p1);
}

.signal-track[data-state="incident"] .track-mark,
.signal-track[data-state="changed"] .track-mark,
.signal-track[data-state="event"] .track-mark {
  color: var(--red);
}

.signal-track[data-state="candidate"] .track-mark,
.signal-track[data-state="confirming"] .track-mark,
.signal-track[data-state="partial"] .track-mark,
.signal-track[data-state="last_known"] .track-mark,
.signal-track[data-state="stale"] .track-mark,
.signal-track[data-state="unsupported"] .track-mark,
.signal-track[data-state="invalidated"] .track-mark {
  color: var(--p3);
}

.radar-changed {
  display: grid;
  grid-template-columns: minmax(160px, 0.35fr) minmax(0, 1fr);
  gap: 24px;
  padding-bottom: 24px;
  border-bottom: 1px solid var(--line);
}

.radar-changed h2 {
  font-size: 18px;
}

.radar-changed ul {
  display: grid;
  gap: 8px;
  padding-left: 18px;
  color: var(--dim);
  font-size: 13px;
}

.radar-explain-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0;
  border-bottom: 1px solid var(--line);
}

.radar-explain-grid article {
  padding: 4px 24px 24px;
  border-right: 1px solid var(--line);
}

.radar-explain-grid article:first-child {
  padding-left: 0;
}

.radar-explain-grid article:last-child {
  border-right: 0;
}

.radar-explain-grid h2 {
  margin-top: 6px;
  font-size: 16px;
}

.radar-explain-grid p:not(.signal-kicker) {
  margin-top: 8px;
  color: var(--dim);
  font-size: 12.5px;
  line-height: 1.6;
}

.radar-explain-grid a {
  display: inline-block;
  margin-top: 10px;
  font-size: 12px;
}

.signal-timeline {
  list-style: none;
  margin-top: 16px;
}

.signal-timeline li {
  display: grid;
  grid-template-columns: minmax(120px, 0.25fr) minmax(130px, 0.25fr) minmax(0, 1fr);
  gap: 14px;
  padding: 10px 0;
  border-top: 1px solid var(--line);
  color: var(--dim);
  font-size: 12px;
}

.signal-timeline time {
  color: var(--faint);
  font-variant-numeric: tabular-nums;
}

.signal-timeline b {
  color: var(--fg);
}

.signal-timeline li[data-track="model"] b {
  color: var(--c-credits);
}

.signal-timeline li[data-track="service"] b {
  color: var(--p3);
}

.radar-method {
  margin-top: 26px;
}

.juice-hero h1 {
  max-width: 24ch;
}

.juice-back {
  display: inline-block;
  margin-top: 18px;
}

.juice-selector {
  display: grid;
  grid-template-columns: minmax(0, 0.7fr) minmax(360px, 1.3fr);
  gap: 24px 34px;
  margin-top: 30px;
  padding: 24px;
  border: 1px solid var(--line);
  background: var(--crt);
}

.juice-selector h2 {
  margin-top: 6px;
  color: var(--fg);
  font-size: clamp(22px, 3vw, 32px);
}

.juice-selector > * {
  min-width: 0;
}

.juice-selector-controls {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.juice-selector-controls label {
  min-width: 0;
  color: var(--faint);
  font-size: 10px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.juice-selector-controls label span {
  display: block;
  margin-bottom: 7px;
}

.juice-selector-controls select {
  width: 100%;
  min-height: 44px;
  padding: 9px 30px 9px 10px;
  border: 1px solid var(--line);
  border-radius: 5px;
  background: var(--panel);
  color: var(--fg);
  font: inherit;
  font-size: 12px;
  letter-spacing: 0;
  text-transform: none;
}

.juice-selector-controls select:focus-visible {
  outline: 2px solid var(--p1);
  outline-offset: 2px;
}

.juice-selector-result {
  display: grid;
  grid-column: 1 / -1;
  grid-template-columns: minmax(110px, 0.25fr) minmax(220px, 0.55fr) minmax(0, 1.2fr);
  gap: 18px;
  align-items: center;
  padding: 18px;
  border-left: 3px solid var(--p1);
  background: var(--panel);
}

.juice-selector-result-label,
.juice-selector-pick small {
  color: var(--faint);
  font-size: 9.5px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.juice-selector-pick {
  display: flex;
  gap: 13px;
  align-items: center;
  color: var(--faint);
}

.juice-selector-pick span {
  display: grid;
  gap: 3px;
}

.juice-selector-pick strong {
  color: var(--p1);
  font-size: 20px;
}

.juice-selector-reason,
.juice-selector-fallback {
  color: var(--dim);
  font-size: 12px;
  line-height: 1.65;
}

.juice-selector-fallback {
  grid-column: 2 / -1;
  padding-top: 10px;
  border-top: 1px solid var(--line);
}

.juice-selector-fallback strong {
  color: var(--fg);
}

.juice-selector-matrix {
  grid-column: 1 / -1;
  min-width: 0;
}

.juice-selector-matrix h3 {
  margin-bottom: 5px;
  color: var(--fg);
  font-size: 14px;
}

.juice-selector-matrix > p {
  margin-bottom: 12px;
  color: var(--dim);
  font-size: 11.5px;
}

.juice-selector-matrix table {
  min-width: 540px;
}

.juice-selector-matrix .icon-link {
  display: inline-block;
  margin-top: 12px;
}

.juice-evidence,
.juice-advice,
.juice-fingerprint-intro {
  margin-top: 28px;
}

.juice-evidence-meta {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1px;
  margin: 18px 0;
  border: 1px solid var(--line);
  background: var(--line);
}

.juice-evidence-meta div {
  min-width: 0;
  padding: 12px 14px;
  background: var(--crt);
}

.juice-evidence-meta dt {
  color: var(--faint);
  font-size: 9.5px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.juice-evidence-meta dd {
  margin: 5px 0 0;
  overflow-wrap: anywhere;
  color: var(--fg);
  font-size: 11.5px;
}

.juice-evidence-table-wrap table {
  min-width: 720px;
}

.juice-evidence-table-wrap td {
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.juice-evidence-limits {
  margin-top: 14px;
  color: var(--dim);
  font-size: 11.5px;
  line-height: 1.65;
}

.juice-evidence-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 22px;
  margin-top: 12px;
}

.juice-advice {
  padding-top: 2px;
}

.juice-advice h2,
.juice-fingerprint-intro h2 {
  margin-top: 6px;
  color: var(--fg);
  font-size: clamp(20px, 3vw, 30px);
}

.juice-decision-boundary {
  display: grid;
  grid-template-columns: minmax(110px, 0.22fr) minmax(0, 1fr);
  gap: 14px;
  margin-top: 18px;
  padding: 12px 14px;
  border-left: 2px solid var(--p3);
  background: var(--panel);
}

.juice-decision-boundary strong {
  color: var(--p3);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.juice-decision-boundary span {
  color: var(--dim);
  font-size: 12px;
  line-height: 1.65;
}

.juice-advice-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0 26px;
  margin: 18px 0 0;
  padding: 0;
  list-style: none;
  border-block: 1px solid var(--line);
}

.juice-advice-list li {
  display: grid;
  grid-template-columns: minmax(74px, auto) minmax(0, 1fr);
  gap: 14px;
  align-items: start;
  padding: 14px 0;
  border-bottom: 1px solid var(--line);
}

.juice-advice-list li:nth-last-child(-n + 2) {
  border-bottom: 0;
}

.juice-advice-list strong {
  color: var(--fg);
  font-size: 12px;
  text-transform: uppercase;
}

.juice-advice-list span {
  color: var(--dim);
  font-size: 12px;
  line-height: 1.6;
}

.juice-advice-list [data-external-evidence="unavailable"] strong,
.juice-advice-list [data-external-evidence="unavailable"] span {
  color: var(--faint);
}

.juice-fingerprint-intro {
  padding-top: 26px;
  border-top: 1px solid var(--line);
}

.juice-runtime-unavailable {
  margin-top: 22px;
  border-style: dashed;
}

.juice-runtime-unavailable[hidden],
#juice-runtime-data[hidden] {
  display: none;
}

.juice-snapshot {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr)) auto;
  gap: 1px;
  margin-top: 24px;
  border: 1px solid var(--line);
  background: var(--line);
}

.juice-meta,
.juice-overall {
  min-width: 0;
  padding: 14px 16px;
  background: var(--crt);
}

.juice-meta span,
.juice-meta strong,
.juice-meta time {
  display: block;
}

.juice-meta span {
  color: var(--faint);
  font-size: 10px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.juice-meta strong,
.juice-meta time {
  margin-top: 5px;
  overflow-wrap: anywhere;
  color: var(--fg);
  font-size: 12px;
}

.juice-overall {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--fg);
  white-space: nowrap;
}

.juice-snapshot[data-state="fresh"] .juice-overall .track-mark,
.juice-snapshot[data-state="current"] .juice-overall .track-mark {
  color: var(--p1);
}

.juice-snapshot[data-state="last_known"] .juice-overall .track-mark,
.juice-snapshot[data-state="stale"] .juice-overall .track-mark,
.juice-snapshot[data-state="partial"] .juice-overall .track-mark,
.juice-snapshot[data-state="invalidated"] .juice-overall .track-mark {
  color: var(--p3);
}

.juice-readout {
  margin: 10px 0 24px;
  border: 1px solid var(--line);
  background: var(--crt);
}

.juice-axis-grid,
.juice-schedule-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.juice-axis,
.juice-schedule-grid p {
  min-width: 0;
  padding: 11px 14px;
  border-right: 1px solid var(--line);
}

.juice-axis:last-child,
.juice-schedule-grid p:last-child {
  border-right: 0;
}

.juice-axis span,
.juice-axis strong,
.juice-schedule-grid span,
.juice-schedule-grid strong,
.juice-schedule-grid time {
  display: block;
}

.juice-axis span,
.juice-schedule-grid span {
  color: var(--faint);
  font-size: 9.5px;
  letter-spacing: 0.11em;
  text-transform: uppercase;
}

.juice-axis strong,
.juice-schedule-grid strong,
.juice-schedule-grid time {
  margin-top: 4px;
  overflow-wrap: anywhere;
  color: var(--fg);
  font-size: 11.5px;
}

.juice-axis[data-state="current"] strong,
.juice-axis[data-state="complete"] strong,
.juice-axis[data-state="confirmed"] strong,
.juice-schedule-grid strong[data-state="running"] {
  color: var(--p1);
}

.juice-axis[data-state="last_known"] strong,
.juice-axis[data-state="stale"] strong,
.juice-axis[data-state="partial"] strong,
.juice-axis[data-state="candidate"] strong,
.juice-axis[data-state="confirming"] strong,
.juice-axis[data-state="invalidated"] strong,
.juice-schedule-grid strong[data-state="backoff"],
.juice-schedule-grid strong[data-state="silent"] {
  color: var(--p3);
}

.juice-coverage-banner {
  padding: 12px 14px;
  border-top: 1px solid var(--line);
  color: var(--dim);
  font-size: 11.5px;
  line-height: 1.6;
}

.juice-coverage-banner[hidden] {
  display: none;
}

.juice-coverage-banner strong {
  color: var(--fg);
}

.juice-coverage-banner ul {
  display: flex;
  flex-wrap: wrap;
  gap: 2px 18px;
  margin: 4px 0 0;
  padding-left: 17px;
}

.juice-rollout {
  padding: 12px 14px;
  border-top: 1px solid var(--line);
  color: var(--faint);
  font-size: 11px;
}

.juice-rollout p strong {
  color: var(--p3);
  text-transform: uppercase;
}

.juice-rollout[data-phase="ready"] p strong {
  color: var(--p1);
}

.juice-rollout[data-phase="blocked"] p strong,
.juice-rollout[data-phase="blocked"] ul {
  color: var(--red);
}

.juice-rollout > span {
  display: block;
  margin-top: 8px;
  color: var(--faint);
  font-size: 9.5px;
}

.juice-rollout ul {
  display: flex;
  flex-wrap: wrap;
  gap: 2px 18px;
  margin: 3px 0 0;
  padding-left: 17px;
  color: var(--dim);
  font-size: 11px;
}

.juice-schedule-grid {
  border-top: 1px solid var(--line);
}

.juice-alerts {
  display: grid;
  gap: 5px;
  margin: 0;
  padding: 10px 14px 12px 31px;
  border-top: 1px solid var(--line);
  color: var(--p3);
  font-size: 11px;
}

.juice-alerts[hidden] {
  display: none;
}

.juice-alerts li[data-severity="critical"] {
  color: var(--red);
  font-weight: 700;
}

.juice-state[data-freshness="last_known"],
.juice-state[data-freshness="stale"] {
  color: var(--p3);
}

.juice-table-wrap {
  max-width: 100%;
  overflow-x: auto;
}

.juice-table-wrap table {
  min-width: 620px;
}

.juice-table-wrap caption {
  padding: 0 0 12px;
  color: var(--faint);
  text-align: left;
  font-size: 11px;
}

.juice-table-wrap th[scope="row"] {
  color: var(--fg);
  font-size: 13px;
  text-align: left;
}

.juice-table-wrap data,
.juice-table-wrap td[data-field="delta"] {
  font-variant-numeric: tabular-nums;
}

.juice-table-wrap td[data-direction="up"],
.juice-table-wrap td[data-direction="down"] {
  color: var(--c-credits);
}

.juice-state {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--dim);
}

.juice-state::before {
  content: "◇";
  color: var(--faint);
}

.juice-state[data-state="confirmed"]::before {
  content: "●";
  color: var(--p1);
}

.juice-state[data-state="candidate"]::before,
.juice-state[data-state="confirming"]::before,
.juice-state[data-state="partial"]::before {
  content: "△";
  color: var(--p3);
}

.juice-history-grid,
.juice-method-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
  margin-top: 26px;
}

.juice-history-grid .panel,
.juice-method-grid .panel {
  padding: 18px 20px;
}

.juice-history-grid h2,
.juice-method-grid h2 {
  font-size: 15px;
}

.juice-history {
  list-style: none;
  margin-top: 12px;
}

.juice-history li {
  display: grid;
  gap: 3px;
  padding: 9px 0;
  border-top: 1px solid var(--line);
}

.juice-history time,
.juice-history small {
  color: var(--faint);
  font-size: 10.5px;
}

.juice-history strong {
  color: var(--fg);
  font-size: 12px;
  overflow-wrap: anywhere;
}

.juice-effort-filters {
  justify-content: flex-start;
  margin: 14px 0;
  overflow-x: auto;
}

.juice-trend-plot {
  min-height: 220px;
  color: var(--faint);
  font-size: 12px;
}

.juice-trend-plot svg {
  display: block;
  width: 100%;
  height: auto;
  max-height: 240px;
  border-block: 1px solid var(--line);
}

.juice-trend-plot path {
  fill: none;
  stroke: var(--c-credits);
  stroke-width: 2;
}

.juice-trend-plot circle {
  fill: var(--crt);
  stroke: var(--c-credits);
  stroke-width: 2;
}

.juice-raw {
  margin: 22px 0 0;
  text-align: center;
}

/* ---------- lore gallery + lightbox ---------- */

.lore-gallery {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(200px, 280px);
  gap: 14px;
  overflow-x: auto;
  padding-bottom: 6px;
  margin-top: 14px;
}

.lore-gallery figure {
  margin: 0;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--panel);
  padding: 10px;
}

.lore-btn {
  display: block;
  width: 100%;
  padding: 0;
  border: 0;
  background: none;
  cursor: zoom-in;
  border-radius: 6px;
}

.lore-gallery img {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 6px;
}

.lore-gallery figcaption {
  margin-top: 8px;
  color: var(--faint);
  font-size: 12px;
}

#dlg-lightbox {
  max-width: min(92vw, 640px);
}

.lightbox-inner img {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 8px;
  margin-top: 4px;
}

/* ---------- generic panel / prose / empty states ---------- */

.panel {
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--panel);
  padding: 20px 22px;
  min-width: 0;
}

.legal-page .panel {
  margin-top: 26px;
}

.prose p {
  margin: 0 0 12px;
  font-size: 13.5px;
  color: var(--dim);
}

.prose p:first-child {
  color: var(--fg);
}

.mini-empty {
  display: block;
  color: var(--faint);
  font-size: 13px;
  padding: 14px;
  border: 1px dashed var(--line);
  border-radius: 10px;
}

/* ---------- responsive ---------- */

@media (max-width: 860px) {
  .radar-explain-grid {
    grid-template-columns: 1fr;
  }

  .radar-explain-grid article,
  .radar-explain-grid article:first-child {
    padding: 18px 0;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .juice-snapshot {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .juice-selector {
    grid-template-columns: 1fr;
  }

  .juice-selector-controls {
    grid-column: 1;
  }

  .juice-evidence-meta {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .juice-overall {
    grid-column: 1 / -1;
  }

  .juice-axis-grid,
  .juice-schedule-grid {
    grid-template-columns: 1fr;
  }

  .juice-axis,
  .juice-schedule-grid p {
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .juice-axis:last-child,
  .juice-schedule-grid p:last-child {
    border-bottom: 0;
  }

  .flag {
    min-width: 54px;
  }

  .status-primary-grid {
    grid-template-columns: 1fr;
  }

  .status-entry {
    grid-template-columns: 28px minmax(110px, 0.7fr) minmax(0, 1.6fr) 24px;
  }

  .status-entry > .evidence-badge {
    display: none;
  }
}

@media (max-width: 620px) {
  .radar-changed,
  .juice-history-grid,
  .juice-method-grid {
    grid-template-columns: 1fr;
  }

  .signal-timeline li {
    grid-template-columns: 1fr;
    gap: 4px;
  }

  .juice-snapshot {
    grid-template-columns: 1fr;
  }

  .juice-selector {
    gap: 20px;
    padding: 16px;
  }

  .juice-selector-copy .section-intro {
    display: none;
  }

  .juice-selector-controls,
  .juice-selector-result {
    grid-template-columns: 1fr;
  }

  .juice-selector-result {
    gap: 12px;
  }

  .juice-selector-fallback {
    grid-column: 1;
  }

  .juice-evidence-meta,
  .juice-advice-list {
    grid-template-columns: 1fr;
  }

  .juice-decision-boundary {
    grid-template-columns: 1fr;
    gap: 5px;
  }

  .juice-advice-list li:nth-last-child(2) {
    border-bottom: 1px solid var(--line);
  }

  .juice-overall {
    grid-column: auto;
  }

  .juice-table-wrap {
    margin-inline: -12px;
    padding-inline: 12px;
  }

  .win-body {
    padding: 14px;
  }

  .page-shell .hero.page-hero {
    padding-top: 36px;
  }

  .stat-strip {
    grid-template-columns: repeat(auto-fit, minmax(96px, 1fr));
  }

  .status-stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .control-row {
    gap: 6px;
  }

  .date-field {
    flex: 1 1 auto;
  }

  .date-field input {
    flex: 1;
    min-width: 0;
  }

  .status-banner {
    grid-template-columns: auto minmax(0, 1fr);
    padding: 13px 14px;
  }

  .status-banner > .icon-link {
    grid-column: 2;
    font-size: 11px;
  }

  .history-head,
  .comp-head {
    align-items: flex-start;
    flex-direction: column;
  }

  .comp-sequence {
    grid-template-columns: 1fr;
    gap: 9px;
  }

  .sequence-line {
    width: 1px;
    height: 14px;
    margin-left: 10px;
  }

  .status-dual-track {
    grid-template-columns: 1fr;
  }

  .status-entry {
    grid-template-columns: 24px minmax(0, 1fr) 24px;
    gap: 7px 9px;
  }

  .status-entry > time {
    grid-column: 2;
  }

  .status-entry > .entry-copy {
    grid-column: 2;
  }
}

/* ---------- timeline milestone growth + rhythm ---------- */

.milestone-module-head {
  display: grid;
  grid-template-columns: minmax(190px, 0.7fr) minmax(280px, 1.3fr);
  align-items: end;
  gap: 20px;
}

.milestone-module-head .block-title,
.milestone-module-head .section-intro {
  margin: 0;
}

.milestone-scope {
  margin: 0 0 5px;
  color: var(--p1);
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.milestone-layer {
  margin-top: 22px;
}

.milestone-layer + .milestone-layer {
  margin-top: 14px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
}

.milestone-layer h3,
.milestone-mobile h3 {
  margin: 0 0 8px;
  color: var(--fg);
  font-size: 13px;
  letter-spacing: 0.04em;
}

.milestone-svg {
  display: block;
  width: 100%;
  height: auto;
  overflow: visible;
}

.milestone-svg text {
  font-family: var(--mono);
}

.milestone-link {
  stroke: var(--p1-dim);
  stroke-width: 2;
  fill: none;
}

.milestone-axis {
  stroke: var(--line);
  stroke-width: 1;
}

.milestone-axis-label {
  fill: var(--faint);
  font-size: 9.5px;
  letter-spacing: 0.04em;
}

.milestone-link-gap {
  stroke: var(--faint);
  stroke-dasharray: 7 7;
}

.milestone-link-projected {
  stroke: var(--dim);
  stroke-dasharray: 5 7;
}

.milestone-point circle {
  stroke-width: 2;
}

.milestone-point-reset circle {
  fill: var(--p1);
  stroke: var(--p1);
}

.milestone-point-credits circle {
  fill: var(--c-credits);
  stroke: var(--c-credits);
}

.milestone-point-celebration circle {
  fill: var(--p3);
  stroke: var(--p3);
}

.milestone-point-projected circle {
  fill: var(--crt);
  stroke: var(--dim);
  stroke-dasharray: 3 3;
}

.milestone-value {
  fill: var(--fg);
  font-size: 14px;
  font-weight: 700;
}

.milestone-date {
  fill: var(--dim);
  font-size: 10.5px;
}

.milestone-kind {
  fill: var(--faint);
  font-size: 9.5px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.milestone-gap-label,
.milestone-rhythm-gap {
  fill: var(--dim);
  font-size: 10.5px;
}

.milestone-rhythm-gap-projected {
  fill: var(--faint);
  font-style: italic;
}

.milestone-axis-break {
  fill: var(--faint);
  font-size: 15px;
  font-weight: 700;
}

.milestone-observed,
.milestone-watch-note {
  max-width: none;
  margin: 5px 0 0;
  color: var(--dim);
  font-size: 12px;
  line-height: 1.6;
}

.milestone-watch-note {
  color: var(--faint);
}

.milestone-watch-overdue {
  padding-left: 10px;
  border-left: 2px dashed var(--dim);
}

.milestone-table-wrap {
  margin-top: 20px;
}

.milestone-table-wrap table {
  min-width: 720px;
}

.milestone-table-wrap td:first-child {
  color: var(--fg);
  font-size: 13px;
  font-weight: 700;
}

.milestone-mobile {
  display: none;
}

@media (max-width: 620px) {
  .milestone-module-head {
    grid-template-columns: 1fr;
    align-items: start;
    gap: 8px;
  }

  .milestone-desktop {
    display: none;
  }

  .milestone-mobile {
    display: block;
    margin-top: 20px;
  }

  .milestone-mobile-track {
    display: grid;
    margin-top: 12px;
  }

  .milestone-mobile-node {
    position: relative;
    min-width: 0;
    padding: 3px 0 3px 34px;
  }

  .milestone-mobile-node > div {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    align-items: baseline;
    gap: 2px 10px;
  }

  .milestone-mobile-node strong {
    color: var(--fg);
    font-size: 16px;
  }

  .milestone-mobile-node time {
    min-width: 0;
    color: var(--dim);
    font-size: 11px;
    text-align: right;
  }

  .milestone-mobile-node div > span {
    grid-column: 1 / -1;
    color: var(--faint);
    font-size: 10px;
    letter-spacing: 0.08em;
    text-transform: uppercase;
  }

  .milestone-mobile-dot {
    position: absolute;
    top: 8px;
    left: 7px;
    width: 13px;
    height: 13px;
    border: 2px solid var(--p1);
    border-radius: 50%;
    background: var(--p1);
  }

  .milestone-mobile-node-credits .milestone-mobile-dot {
    border-color: var(--c-credits);
    background: var(--c-credits);
  }

  .milestone-mobile-node-celebration .milestone-mobile-dot {
    border-color: var(--p3);
    background: var(--p3);
  }

  .milestone-mobile-node-projected .milestone-mobile-dot {
    border-color: var(--dim);
    border-style: dashed;
    background: var(--crt);
  }

  .milestone-mobile-gap {
    margin: 2px 0 2px 13px;
    min-height: 34px;
    padding: 8px 0 8px 20px;
    border-left: 1px solid var(--p1-dim);
    color: var(--dim);
    font-size: 11px;
    line-height: 1.45;
  }

  .milestone-mobile-gap-public,
  .milestone-mobile-gap-projected {
    border-left-style: dashed;
    border-left-color: var(--faint);
  }

  .milestone-mobile-gap-projected {
    color: var(--faint);
    font-style: italic;
  }

  .milestone-table-wrap {
    margin-top: 18px;
  }
}

/* ---------- Tibo reset / prayer page ---------- */

.tibo-page {
  padding-bottom: 18px;
}

.tibo-hero {
  text-align: center;
}

.page-shell .hero.page-hero.tibo-hero {
  padding-top: 28px;
}

.tibo-overview-row {
  display: grid;
  grid-template-columns: max-content minmax(0, 1fr);
  gap: 24px;
  align-items: center;
  margin-bottom: 12px;
  border-radius: 4px;
  color: inherit;
  text-decoration: none;
}

.tibo-overview-row .eyebrow {
  white-space: nowrap;
}

.tibo-overview-row .eyebrow::after {
  display: none;
}

.tibo-radar-overview {
  max-width: 900px;
  margin: 0;
  color: var(--dim);
  font-size: clamp(11.5px, 1.35vw, 13.5px);
  font-weight: 600;
  line-height: 1.55;
  text-align: left;
  text-wrap: balance;
}

.tibo-radar-overview::before {
  content: ">";
  margin-right: 9px;
  color: var(--p1);
  font-weight: 800;
}

.tibo-overview-row:hover .tibo-radar-overview {
  color: var(--fg);
}

.tibo-overview-row:focus-visible {
  outline: 2px solid var(--p1);
  outline-offset: 6px;
}

.tibo-hero h1 {
  font-size: clamp(1.75rem, 3.4vw, 2.45rem);
}

.tibo-direct-answer {
  max-width: 1120px;
  margin: 7px auto 0;
  color: var(--fg);
  font-size: clamp(12.5px, 1.55vw, 14.5px);
  font-weight: 650;
  line-height: 1.45;
  text-wrap: balance;
}

@media (min-width: 1280px) {
  .tibo-direct-answer {
    max-width: none;
    white-space: nowrap;
  }
}

.tibo-hero-support {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 4px 14px;
  align-items: baseline;
  margin: 8px auto 0;
  color: var(--faint);
  font-size: 10.5px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.tibo-context {
  border: 0;
  background: transparent;
  overflow: visible;
}

.tibo-context summary {
  display: inline-flex;
  padding: 2px 0;
  cursor: pointer;
  color: var(--dim);
  font-size: inherit;
  font-weight: 700;
}

.tibo-context summary::marker {
  color: var(--p1);
}

.tibo-context .tagline {
  max-width: 76ch;
  margin: 8px auto 0;
  color: var(--dim);
  font-size: 12px;
  font-weight: 400;
  letter-spacing: normal;
  line-height: 1.5;
  text-transform: none;
}

.tibo-published {
  margin: 0;
}

.tibo-disclaimer {
  display: flex;
  gap: 9px;
  align-items: flex-start;
  max-width: 1120px;
  margin: 8px auto 0;
  padding: 6px 10px;
  border: 1px solid rgba(255, 180, 84, 0.28);
  border-radius: 10px;
  background: rgba(255, 180, 84, 0.055);
  color: var(--dim);
  font-size: 11.5px;
  line-height: 1.45;
  text-align: left;
}

.tibo-disclaimer .ui-icon {
  flex: 0 0 auto;
  margin-top: 2px;
  color: var(--p3);
}

section.tibo-pray-window {
  margin-top: 12px;
}

.tibo-pray-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 0.62fr);
  gap: 20px;
  align-items: start;
}

.tibo-vigil-left {
  display: grid;
  min-width: 0;
  gap: 16px;
}

.tibo-scene,
.tibo-pray-console {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: rgba(4, 8, 6, 0.72);
}

.tibo-scene {
  position: relative;
  overflow: hidden;
}

.tibo-scene::after {
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(0deg, transparent 0 3px, rgba(0, 0, 0, 0.08) 3px 4px);
  content: "";
  pointer-events: none;
}

.tibo-video-shell {
  position: relative;
  display: grid;
  padding: 12px 12px 36px;
  place-items: start center;
  background:
    radial-gradient(circle at 50% 0, rgba(106, 209, 255, 0.09), transparent 56%),
    #050907;
}

.tibo-video {
  display: block;
  width: 100%;
  max-width: 760px;
  aspect-ratio: 16 / 9;
  border: 1px solid rgba(106, 209, 255, 0.24);
  border-radius: 8px;
  background: #020403;
  color-scheme: dark;
  object-fit: cover;
}

.tibo-video-credit {
  position: absolute;
  right: 13px;
  bottom: 10px;
  left: 13px;
  overflow: hidden;
  font-size: 10.5px;
  text-align: center;
  line-height: 1.35;
}

.tibo-vigil-stage {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 18px;
  min-height: 74px;
  padding: 12px 126px 12px 14px;
  border-top: 1px solid var(--line);
  background: linear-gradient(90deg, rgba(65, 255, 139, 0.07), rgba(255, 180, 84, 0.04));
  align-items: center;
}

.tibo-crowd,
.tibo-candles {
  display: flex;
  gap: clamp(4px, 1vw, 10px);
  align-items: end;
}

.tibo-crowd-person {
  position: relative;
  display: block;
  width: 18px;
  height: 38px;
  opacity: 0.1;
  transition: opacity 240ms ease;
}

.tibo-crowd-person::before,
.tibo-crowd-person::after,
.tibo-crowd-person i::before,
.tibo-crowd-person i::after {
  position: absolute;
  width: 2px;
  height: 17px;
  border-radius: 999px;
  background: var(--p1);
  box-shadow: 0 0 5px rgba(65, 255, 139, 0.35);
  content: "";
}

.tibo-crowd-person i {
  position: absolute;
  top: 1px;
  left: 5px;
  width: 9px;
  height: 9px;
  border: 2px solid var(--p1);
  border-radius: 50%;
}

.tibo-crowd-person::before {
  top: 12px;
  left: 8px;
}

.tibo-crowd-person::after {
  top: 16px;
  left: 8px;
  height: 13px;
  transform: rotate(58deg);
  transform-origin: top;
}

.tibo-crowd-person i::before {
  top: 22px;
  left: 1px;
  transform: rotate(32deg);
  transform-origin: top;
}

.tibo-crowd-person i::after {
  top: 22px;
  right: 1px;
  transform: rotate(-32deg);
  transform-origin: top;
}

.tibo-crowd-person.is-active {
  opacity: 0.95;
}

.tibo-candle {
  position: relative;
  display: block;
  width: 7px;
  height: 22px;
  border: 1px solid rgba(255, 180, 84, 0.4);
  border-radius: 2px 2px 1px 1px;
  background: #2c3a33;
}

.tibo-candle i {
  position: absolute;
  top: -9px;
  left: 1px;
  width: 5px;
  height: 7px;
  border-radius: 50% 50% 45% 45%;
  background: #ffb454;
  box-shadow: 0 0 8px rgba(255, 180, 84, 0.8);
  opacity: 0;
  transform-origin: 50% 100%;
}

.tibo-candle.is-lit {
  background: #3a4a41;
}

.tibo-candle.is-lit i {
  opacity: 1;
  animation: tibo-flicker 1.6s ease-in-out infinite alternate;
}

.tibo-scene-status {
  position: absolute;
  right: 12px;
  bottom: 10px;
  z-index: 1;
  margin: 0;
  padding: 6px 9px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(5, 10, 8, 0.9);
  color: var(--dim);
  font-size: 10.5px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.tibo-scene[data-state="stirring"] .tibo-scene-status {
  border-color: rgba(255, 180, 84, 0.42);
  color: var(--p3);
}

.tibo-scene[data-state="blessed"] .tibo-scene-status {
  border-color: rgba(65, 255, 139, 0.42);
  color: var(--p1);
}

.tibo-pray-console {
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  padding: 18px;
  background:
    radial-gradient(circle at 50% 10%, rgba(65, 255, 139, 0.08), transparent 44%),
    rgba(4, 8, 6, 0.78);
}

.tibo-pray-console .eyebrow {
  margin-bottom: 9px;
}

.tibo-pray-number {
  display: block;
  color: var(--fg);
  font-size: clamp(38px, 5vw, 58px);
  line-height: .94;
  font-variant-numeric: tabular-nums;
}

.tibo-pray-total {
  margin: 7px 0 0;
  color: var(--dim);
  font-size: 12.5px;
  line-height: 1.45;
}

.tibo-pray-sync {
  margin: 9px 0 0;
  color: var(--p1);
  font-size: 10.5px;
  line-height: 1.5;
}

.tibo-pray-sync[data-state="syncing"] {
  color: var(--p3);
}

.tibo-pray-personal {
  margin: 5px 0 20px;
  color: var(--dim);
  font-size: 11.5px;
  line-height: 1.55;
}

.tibo-pray-button {
  min-height: 54px;
  border-color: rgba(65,255,139,.55);
  background: linear-gradient(180deg, rgba(65, 255, 139, 0.14), rgba(65, 255, 139, 0.04));
  color: var(--fg);
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0.025em;
  box-shadow: 0 0 24px rgba(65, 255, 139, 0.09);
}

.tibo-pray-button:hover,
.tibo-pray-button:focus-visible {
  border-color: var(--p1);
  box-shadow: 0 0 28px rgba(65, 255, 139, 0.2);
}

.tibo-pray-button.is-ringing {
  animation: tibo-ring 500ms ease;
}

.tibo-forecast {
  display: grid;
  grid-template-columns: 1fr auto auto;
  gap: 7px 10px;
  align-items: center;
  margin-top: 17px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
  color: var(--faint);
  font-size: 10.5px;
}

.tibo-forecast strong {
  color: var(--p3);
  font-size: 11px;
  white-space: nowrap;
}

.tibo-forecast[data-error="true"] strong {
  color: var(--faint);
}

.tibo-share {
  align-self: flex-start;
  margin-top: 14px;
  font-size: 11px;
}

.tibo-telegram-cta {
  display: grid;
  gap: 6px;
  margin-top: 16px;
  padding: 12px 13px;
  border: 1px solid rgba(106, 209, 255, 0.24);
  border-radius: 9px;
  background: rgba(106, 209, 255, 0.045);
  color: var(--dim);
  font-size: 10.5px;
  line-height: 1.5;
}

.tibo-telegram-cta[hidden] {
  display: none;
}

.tibo-profile {
  display: grid;
  grid-template-columns: minmax(220px, 270px) minmax(0, 1fr);
  gap: clamp(28px, 4vw, 52px);
  align-items: center;
}

.tibo-profile-portrait {
  position: relative;
  display: grid;
  place-items: center;
  justify-self: center;
  width: min(100%, 260px);
  margin: 0;
  padding: 4px;
  overflow: hidden;
  border: 1px solid rgba(65, 255, 139, 0.38);
  border-radius: 6px;
  background: rgba(6, 10, 9, 0.92);
  box-shadow: 0 16px 42px rgba(0, 0, 0, 0.28);
}

.tibo-profile-portrait > * {
  grid-area: 1 / 1;
}

.tibo-profile-portrait img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 2 / 3;
  object-fit: cover;
  border-radius: 2px;
  filter: saturate(0.84) contrast(1.04);
}

.tibo-profile-portrait.is-fallback {
  padding: 16px;
}

.tibo-avatar-fallback {
  display: grid;
  width: 100%;
  aspect-ratio: 2 / 3;
  place-items: center;
  padding: 10px 12px;
  color: var(--faint);
  font-size: 11px;
  line-height: 1.45;
  text-align: center;
  overflow-wrap: anywhere;
}

.tibo-profile-copy h2 {
  margin: 3px 0 7px;
  color: var(--fg);
  font-size: clamp(22px, 3.4vw, 34px);
}

.tibo-handle {
  display: inline-block;
  margin-bottom: 12px;
  color: var(--c-credits);
  font-size: 13px;
}

.tibo-profile-copy > p,
.tibo-profile-copy li {
  color: var(--dim);
  font-size: 12px;
  line-height: 1.65;
}

.tibo-profile-copy ul {
  display: grid;
  gap: 7px;
  margin: 16px 0 20px;
  padding-left: 20px;
}

.tibo-profile-copy li::marker {
  color: var(--p1);
}

.tibo-profile-copy .table-note {
  margin-top: 17px;
}

.tibo-signal {
  max-width: none;
  margin: 0 0 16px;
}

.tibo-feed-head {
  align-items: center;
}

.tibo-feed-head .feed-title {
  display: inline-flex;
  gap: 10px;
  align-items: center;
}

.tibo-feed-avatar {
  width: 34px;
  height: 34px;
  border: 1px solid rgba(65, 255, 139, 0.36);
  border-radius: 50%;
  object-fit: cover;
}

.tibo-feed-list {
  max-height: 760px;
  overflow: auto;
  overscroll-behavior: contain;
  scrollbar-color: var(--p1-dim) transparent;
}

.tibo-archive-wrap {
  margin-top: 17px;
  max-height: 640px;
}

.tibo-archive-table {
  min-width: 720px;
}

.tibo-archive-table th:first-child,
.tibo-archive-table td:first-child {
  width: 145px;
  white-space: nowrap;
}

.tibo-archive-table th:last-child,
.tibo-archive-table td:last-child {
  width: 165px;
  text-align: right;
}

.tibo-prayer-cell[data-counted="true"] {
  color: var(--p1);
  font-weight: 700;
}

.tibo-prayer-cell[data-counted="false"] {
  color: var(--faint);
}

.tibo-faq-list {
  margin-top: 14px;
}

@keyframes tibo-ring {
  25% { transform: rotate(-1.4deg) scale(1.015); }
  60% { transform: rotate(1.4deg) scale(1.025); }
}

@media (max-width: 860px) {
  .tibo-pray-layout {
    grid-template-columns: 1fr;
  }

  .tibo-wall {
    min-width: 0;
  }

  .tibo-pray-console {
    min-height: 0;
    justify-content: flex-start;
    padding: 16px;
  }

  .page-shell .hero.page-hero.tibo-hero {
    padding-top: 32px;
  }

  .tibo-overview-row {
    display: block;
    margin-bottom: 10px;
  }

  .tibo-overview-row .eyebrow {
    display: none;
  }

  .tibo-radar-overview {
    margin-inline: auto;
    text-align: center;
  }

  .tibo-published {
    margin-top: 6px;
  }
}

/* 320px fold: the pray button must land in the first viewport. The flavor
   tagline and publish stamp yield; the direct answer and disclaimer stay. */
@media (max-width: 560px) {
  .tibo-hero .tagline,
  .tibo-published {
    display: none;
  }

  .tibo-hero h1 {
    font-size: clamp(22px, 7vw, 30px);
  }
}

@media (max-width: 680px) {
  .page-shell .tibo-hero {
    padding-top: 24px;
  }

  #tibo-timeline {
    scroll-margin-top: 116px;
  }

  .tibo-direct-answer {
    margin-top: 10px;
    line-height: 1.5;
  }

  .tibo-hero .tagline {
    margin-top: 8px;
    line-height: 1.5;
  }

  .tibo-published {
    margin-top: 6px;
  }

  .tibo-disclaimer {
    margin-top: 10px;
    padding: 8px 10px;
    line-height: 1.45;
  }

  section.tibo-pray-window {
    margin-top: 14px;
  }

  .tibo-pray-window .win-body {
    padding: 12px;
  }

  .tibo-profile {
    grid-template-columns: 1fr;
    gap: 22px;
  }

  .tibo-profile-portrait {
    width: min(68vw, 220px);
  }

  .tibo-pray-console {
    min-height: 0;
    padding: 14px;
  }

  .tibo-pray-console .eyebrow {
    margin-bottom: 5px;
  }

  .tibo-pray-sync {
    margin-top: 5px;
  }

  .tibo-pray-personal {
    margin: 3px 0 12px;
  }

  .tibo-pray-button {
    width: calc(100% - 80px);
  }

  .tibo-forecast {
    grid-template-columns: 1fr 1fr;
  }

  .tibo-forecast > span:first-child {
    grid-column: 1 / -1;
  }

  .tibo-video-shell {
    padding-inline: 8px;
  }

  .tibo-vigil-stage {
    grid-template-columns: 1fr;
    gap: 12px;
    padding: 12px 14px 44px;
  }

  .tibo-crowd,
  .tibo-candles {
    justify-content: space-between;
  }

  .tibo-feed-head {
    align-items: flex-start;
  }

  .tibo-feed-list {
    max-height: none;
    overflow: visible;
  }
}

@media (max-width: 340px) {
  .page-shell .tibo-hero {
    padding-top: 16px;
  }

  .tibo-direct-answer {
    margin-top: 6px;
  }

  .tibo-hero .tagline {
    margin-top: 6px;
  }

  .tibo-published {
    margin-top: 4px;
  }

  .tibo-disclaimer {
    margin-top: 6px;
  }

  section.tibo-pray-window {
    margin-top: 8px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .tibo-pray-button.is-ringing {
    animation: none;
  }

  .tibo-crowd-person {
    transition: none;
  }
}

/* --- tibo v2 --- */
.block-subtitle {
  margin-top: 22px;
  font-size: 13px;
  color: var(--dim);
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.tibo-cycle-label {
  margin-top: 6px;
  font-size: 12.5px;
  color: var(--p3);
  letter-spacing: 0.04em;
}

.tibo-pray-button.is-locked {
  border-color: rgba(65,255,139,.65);
  background: rgba(65, 255, 139, 0.12);
  color: var(--p1);
  cursor: default;
}

@keyframes tibo-sparkle {
  0% { box-shadow: 0 0 0 0 rgba(65,255,139,.45); }
  100% { box-shadow: 0 0 0 14px rgba(65, 255, 139, 0); }
}

.tibo-pray-button.is-sparkling {
  animation: tibo-sparkle 0.6s ease-out;
}

.tibo-wall {
  min-width: 320px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: rgba(4, 8, 6, 0.72);
}

.tibo-wall-intro {
  color: var(--dim);
}

/* One grid for both rows so the bars share a baseline and a scale; the rows
   themselves are `display: contents` and only carry the styling hook. */
.tibo-cycle-compare {
  display: grid;
  grid-template-columns: minmax(0, max-content) minmax(48px, 1fr) max-content;
  align-items: center;
  gap: 9px 10px;
  margin: 14px 0 0;
  padding: 12px 0;
  border-block: 1px solid var(--line);
  font-size: 12px;
}

.tibo-cycle-compare figcaption,
.tibo-compare-delta {
  grid-column: 1 / -1;
}

.tibo-cycle-compare figcaption {
  color: var(--dim);
  font-size: 11px;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.tibo-compare-row {
  display: contents;
}

.tibo-compare-label {
  display: flex;
  flex-direction: column;
  line-height: 1.25;
  white-space: nowrap;
}

.tibo-compare-span {
  color: var(--faint);
  font-size: 10.5px;
}

.tibo-compare-row progress {
  width: 100%;
  height: 7px;
  border: 0;
  border-radius: 99px;
  overflow: hidden;
  appearance: none;
  background: rgba(214, 226, 218, 0.12);
}

.tibo-compare-row progress::-webkit-progress-bar {
  border-radius: 99px;
  background: rgba(214, 226, 218, 0.12);
}

.tibo-compare-row progress::-webkit-progress-value {
  border-radius: 99px;
  background: var(--p1);
  box-shadow: 0 0 10px rgba(65, 255, 139, 0.34);
}

.tibo-compare-row progress::-moz-progress-bar {
  border-radius: 99px;
  background: var(--p1);
  box-shadow: 0 0 10px rgba(65, 255, 139, 0.34);
}

/* The closed cycle is context, not the live number, so it recedes. */
.tibo-compare-row[data-cycle="previous"] progress {
  opacity: 0.5;
}

.tibo-compare-row strong {
  min-width: 4ch;
  font-variant-numeric: tabular-nums;
  text-align: right;
}

.tibo-compare-row[data-cycle="previous"] strong {
  color: var(--dim);
  font-weight: 500;
}

.tibo-compare-delta {
  margin: 0;
  color: var(--dim);
  font-size: 11px;
  text-align: right;
}

.tibo-wall-list {
  list-style: none;
  margin: 12px 0 0;
  padding: 0;
  max-height: 540px;
  overflow-y: auto;
  display: grid;
  gap: 6px;
}

.tibo-wall-entry {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 10px;
  align-items: baseline;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  padding: 7px 10px;
  font-size: 12.5px;
  animation: tibo-wall-in 0.35s ease-out;
}

@keyframes tibo-wall-in {
  from { opacity: 0; transform: translateY(-6px); }
  to { opacity: 1; transform: none; }
}

.tibo-wall-entry.is-self {
  border-color: rgba(65,255,139,.55);
  background: rgba(65, 255, 139, 0.07);
}

.tibo-wall-n {
  color: var(--p3);
  font-weight: 700;
  min-width: 3.5ch;
}

.tibo-wall-name {
  color: var(--fg);
}

.tibo-wall-place {
  color: var(--dim);
}

.tibo-wall-age {
  margin-left: auto;
  color: var(--dim);
  font-size: 11.5px;
}

.tibo-wall-empty {
  border: 1px dashed var(--line);
  border-radius: 8px;
  padding: 12px;
  color: var(--dim);
  font-size: 12.5px;
}

.tibo-wall-more {
  margin-top: 8px;
  font-size: 12px;
  color: var(--dim);
}

@keyframes tibo-flicker {
  from { opacity: 0.65; transform: scale(0.9); }
  to { opacity: 1; transform: scale(1.08); }
}

.tibo-clock-strip {
  display: block;
  width: 100%;
  height: auto;
  margin-top: 16px;
}

.tibo-clock-track {
  fill: rgba(29,42,36,.5);
}

.tibo-clock-cell[data-zone="sleep"] .tibo-clock-track {
  fill: rgba(15,22,19,.85);
}

.tibo-clock-bar {
  fill: rgba(106,209,255,.55);
}

.tibo-clock-cell[data-zone="prime"] .tibo-clock-bar {
  fill: var(--p3);
}

.tibo-clock-cell[data-zone="awake"] .tibo-clock-bar {
  fill: rgba(65,255,139,.6);
}

.tibo-clock-cell.is-now .tibo-clock-track {
  stroke: var(--p1);
  stroke-width: 2;
}

.tibo-clock-hourlabel {
  fill: var(--dim);
  font-size: 11px;
}

.tibo-clock-axis {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-top: 8px;
  font-size: 11.5px;
  color: var(--dim);
}

.tibo-clock-verdict {
  margin-top: 14px;
  font-size: 13.5px;
  color: var(--fg);
  border: 1px solid var(--line);
  border-left-width: 3px;
  border-radius: 8px;
  padding: 10px 13px;
  background: var(--panel);
}

.tibo-clock-verdict[data-zone="sleep"] {
  border-left-color: rgba(106, 209, 255, 0.7);
}

.tibo-clock-verdict[data-zone="prime"] {
  border-left-color: var(--p3);
}

.tibo-clock-verdict[data-zone="awake"] {
  border-left-color: rgba(65, 255, 139, 0.7);
}

.tibo-clock-legend {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 6px 16px;
  margin: 12px 0 0;
  padding: 0;
  font-size: 11.5px;
  color: var(--dim);
}

.tibo-clock-legend li::before {
  content: "■ ";
}

.tibo-clock-legend li[data-zone="sleep"]::before { color: rgba(106,209,255,.7); }
.tibo-clock-legend li[data-zone="awake"]::before { color: rgba(65,255,139,.7); }
.tibo-clock-legend li[data-zone="prime"]::before { color: var(--p3); }

.tibo-lore-list {
  list-style: none;
  margin: 14px 0 0;
  padding: 0;
  display: grid;
  gap: 10px;
}

.tibo-lore-card {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 14px;
  align-items: baseline;
  justify-content: space-between;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--panel);
  padding: 12px 15px;
  text-decoration: none;
}

.tibo-lore-card:hover,
.tibo-lore-card:focus-visible {
  border-color: rgba(65, 255, 139, 0.5);
}

.tibo-lore-label {
  color: var(--fg);
  font-size: 13.5px;
}

.tibo-lore-credit {
  color: var(--dim);
  font-size: 12px;
}

.tibo-vigil-history {
  list-style: none;
  margin: 10px 0 0;
  padding: 0;
  display: grid;
  gap: 6px;
  font-size: 12.5px;
  color: var(--dim);
}

.tibo-vigil-history li {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 7px 10px;
  background: var(--panel);
}

.tibo-vigil-history li span {
  color: var(--fg);
}

.home-rhythm-preview {
  margin-top: 18px;
  padding: 16px 18px 18px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background:
    linear-gradient(180deg, rgba(65, 255, 139, 0.05), transparent 46%),
    rgba(8, 12, 10, 0.72);
}

.home-rhythm-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px 18px;
  align-items: end;
}

.home-rhythm-head h3 {
  margin: 0;
  color: var(--fg);
  font-size: clamp(20px, 3.1vw, 28px);
  line-height: 1.1;
  text-wrap: balance;
}

.home-rhythm-link {
  align-self: start;
  white-space: nowrap;
}

.home-rhythm-preview .rhythm-chart-wrap {
  margin-top: 14px;
}

.home-rhythm-preview .rhythm-chart {
  min-width: 440px;
}

.home-rhythm-preview .table-note {
  margin-top: 8px;
}

.rhythm-chart-wrap {
  margin-top: 16px;
  overflow-x: auto;
}

.rhythm-chart {
  display: block;
  width: 100%;
  min-width: 560px;
  height: auto;
}

.rhythm-base {
  stroke: var(--line);
  stroke-width: 2;
}

.rhythm-bar rect {
  fill: rgba(65,255,139,.55);
}

.rhythm-bar.is-latest rect {
  fill: var(--p3);
}

.rhythm-value {
  fill: var(--fg);
  font-size: 13px;
  font-family: inherit;
}

.rhythm-date {
  fill: var(--dim);
  font-size: 11px;
}

.rhythm-trend {
  margin-top: 12px;
  font-size: 12.5px;
  color: var(--p3);
}

@media (max-width: 560px) {
  .tibo-wall-age {
    margin-left: 0;
    flex-basis: 100%;
  }

  .home-rhythm-head {
    grid-template-columns: 1fr;
  }

  .home-rhythm-link {
    white-space: normal;
  }

  .home-rhythm-preview {
    margin-top: 14px;
    padding: 14px 12px;
  }

  .home-rhythm-preview .rhythm-chart {
    min-width: 0;
    max-width: 100%;
  }
}

/* Tibo timeline strip: an evidence ledger on wide screens, a snap rail on small screens. */

#tibo-timeline {
  scroll-margin-top: 76px;
}

.tibo-tl-scroll {
  --tibo-tl-gap: 14px;
  overflow: hidden;
}

.tibo-tl-track {
  position: relative;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 18px var(--tibo-tl-gap);
  align-items: stretch;
  list-style: none;
  margin: 14px 0 0;
  padding: 0;
  width: 100%;
}

.tibo-tl-track::before {
  display: none;
}

.tibo-tl-item {
  position: relative;
  display: flex;
  flex-direction: column;
  min-width: 0;
  /* Reserve the dot-and-date axis band below the card. */
  padding-bottom: 44px;
}

/* Each grid row has its own continuous evidence line, so dates remain anchored
   to their cards instead of reading like a detached scrollbar. */
.tibo-tl-item::before {
  content: "";
  position: absolute;
  z-index: 0;
  right: -7px;
  bottom: 27px;
  left: -7px;
  border-top: 1px solid var(--line);
}

.tibo-tl-card {
  position: relative;
  z-index: 1;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 8px;
  align-items: flex-start;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: var(--panel);
}

.tibo-tl-item[data-kind="signal"] .tibo-tl-card {
  border-color: rgba(65, 255, 139, 0.42);
  background: rgba(65, 255, 139, 0.06);
}

.tibo-tl-text {
  margin: 0;
  font-size: 12.5px;
  color: var(--fg);
  display: -webkit-box;
  -webkit-line-clamp: 5;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.tibo-tl-prayers {
  margin: 0;
  font-size: 12px;
  color: var(--p3);
}

.tibo-tl-prayers:has([data-counted="false"]) {
  display: none;
}

.tibo-tl-prayers-label {
  color: var(--dim);
  font-size: 11px;
}

.tibo-tl-stats {
  margin: 0;
  font-size: 11.5px;
  color: var(--dim);
  letter-spacing: 0.03em;
  white-space: nowrap;
}

.tibo-tl-card .icon-link {
  margin-top: auto;
  font-size: 12px;
}

.tibo-tl-dot {
  position: absolute;
  z-index: 1;
  bottom: 22px;
  left: 50%;
  width: 11px;
  height: 11px;
  border: 2px solid var(--dim);
  border-radius: 50%;
  background: var(--bg);
  transform: translateX(-50%);
}

.tibo-tl-item[data-kind="signal"] .tibo-tl-dot {
  border-color: var(--p1);
  background: var(--p1);
}

.tibo-tl-date {
  position: absolute;
  z-index: 1;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  color: var(--dim);
  font-size: 11.5px;
  letter-spacing: 0.04em;
  white-space: nowrap;
}

@media (max-width: 1080px) {
  .tibo-tl-track {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 700px) {
  .tibo-tl-scroll {
    overflow-x: auto;
    overscroll-behavior-x: contain;
    scroll-padding-inline: 2px;
    scroll-snap-type: x mandatory;
    scrollbar-color: var(--line) transparent;
    scrollbar-width: thin;
  }

  .tibo-tl-scroll::-webkit-scrollbar {
    height: 7px;
  }

  .tibo-tl-scroll::-webkit-scrollbar-thumb {
    border-radius: 99px;
    background: var(--line);
  }

  .tibo-tl-track {
    display: flex;
    gap: var(--tibo-tl-gap);
    padding: 0 2px 7px;
    width: max-content;
  }

  .tibo-tl-item {
    width: min(78vw, 300px);
    scroll-snap-align: start;
  }
}

/* v3 ritual layer: beat row, personal candle, answered banner, amen chips */

/* Explicit display values would otherwise defeat the hidden attribute. */
.tibo-beats[hidden],
.tibo-my-candle[hidden],
.tibo-answered[hidden],
.tibo-relight[hidden] {
  display: none;
}

.tibo-beats {
  display: flex;
  gap: 10px;
  justify-content: center;
  margin-top: 10px;
}

.tibo-beat {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border: 1px solid var(--line);
  border-radius: 50%;
  font-size: 14px;
  filter: grayscale(1);
  opacity: 0.35;
  transition: opacity 200ms ease, filter 200ms ease, border-color 200ms ease;
}

.tibo-beat.is-done {
  border-color: rgba(255, 180, 84, 0.6);
  filter: none;
  opacity: 1;
  animation: tibo-sparkle 0.45s ease-out;
}

@keyframes tibo-beat-pulse {
  0% { transform: scale(1); }
  45% { transform: scale(0.96); }
  100% { transform: scale(1); }
}

.tibo-pray-button.is-beating {
  animation: tibo-beat-pulse 0.28s ease-out;
  border-color: rgba(255, 180, 84, 0.6);
}

.tibo-my-candle {
  display: flex;
  gap: 10px;
  align-items: center;
  margin-top: 14px;
  padding: 9px 12px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: rgba(4, 8, 6, 0.72);
  font-size: 12.5px;
  color: var(--dim);
}

.tibo-my-candle .tibo-candle {
  flex: none;
  margin-top: 8px;
}

.tibo-my-candle.is-due {
  border-color: rgba(255, 180, 84, 0.42);
}

.tibo-my-candle.is-due .tibo-my-candle-label {
  color: var(--p3);
}

.tibo-relight {
  margin-left: auto;
  white-space: nowrap;
}

.tibo-answered {
  margin-top: 14px;
  padding: 12px 14px;
  border: 1px solid rgba(65, 255, 139, 0.45);
  border-radius: 9px;
  background: rgba(65, 255, 139, 0.07);
  display: grid;
  gap: 6px;
  justify-items: start;
}

.tibo-answered-title {
  margin: 0;
  color: var(--p1);
  font-size: 13.5px;
}

.tibo-answered-streak {
  margin: 0;
  color: var(--dim);
  font-size: 12px;
  letter-spacing: 0.04em;
}

.tibo-answered-dismiss {
  border: 0;
  padding: 0;
  background: none;
  color: var(--dim);
  font: inherit;
  font-size: 11.5px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  cursor: pointer;
}

.tibo-answered-dismiss:hover,
.tibo-answered-dismiss:focus-visible {
  color: var(--p1);
}

.tibo-wall-days {
  color: var(--p3);
  font-size: 11.5px;
  white-space: nowrap;
}

.tibo-amen {
  margin-left: auto;
  display: inline-flex;
  gap: 4px;
  align-items: center;
  padding: 2px 8px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: none;
  color: var(--dim);
  font: inherit;
  font-size: 11.5px;
  cursor: pointer;
  transition: border-color 160ms ease, color 160ms ease;
}

.tibo-amen:hover,
.tibo-amen:focus-visible {
  border-color: rgba(255, 180, 84, 0.55);
  color: var(--p3);
}

.tibo-amen.is-amened {
  border-color: rgba(65, 255, 139, 0.55);
  background: rgba(65, 255, 139, 0.08);
  color: var(--p1);
  cursor: default;
  animation: tibo-sparkle 0.45s ease-out;
}

@media (prefers-reduced-motion: reduce) {
  .tibo-pray-button.is-sparkling,
  .tibo-candle.is-lit i {
    animation: none;
  }
  .tibo-wall-entry {
    animation: none;
  }
  .tibo-beat.is-done,
  .tibo-pray-button.is-beating,
  .tibo-amen.is-amened {
    animation: none;
  }
}

/* ---- /codex-usage ---------------------------------------------------- */

.usage-blocks {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  margin-block: 14px;
}

.usage-block h3 {
  margin: 0 0 6px;
  color: var(--p1);
  font-size: 14px;
}

.usage-blindspot {
  margin: 8px 0 0;
  color: var(--dim);
  font-size: 12.5px;
}

.usage-blindspot strong {
  color: var(--p3);
}

.usage-form {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  margin-block: 12px;
}

.usage-form label {
  flex: 1 1 100%;
  color: var(--dim);
  font-size: 12.5px;
}

.usage-form input {
  width: 6.5rem;
  padding: 6px 8px;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: rgba(0, 0, 0, 0.25);
  color: var(--fg);
  font: inherit;
}

.usage-stats {
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  margin-block: 12px;
}

.usage-stat {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 6px;
}

.usage-stat-label {
  color: var(--dim);
  font-size: 11.5px;
}

.usage-stat-value {
  color: var(--fg);
  font-size: 16px;
  font-variant-numeric: tabular-nums;
}

.usage-verdict {
  margin: 10px 0;
  color: var(--p1);
}

.usage-chart {
  margin-block: 10px;
}

.usage-chart svg {
  width: 100%;
  height: 200px;
}

.usage-grid {
  stroke: var(--line);
  stroke-width: 1;
}

.usage-axis {
  fill: var(--dim);
  font-size: 10px;
}

.usage-pace-line {
  stroke: var(--dim);
  stroke-width: 1.5;
  stroke-dasharray: 5 4;
}

.usage-burn-line {
  fill: none;
  stroke: var(--p1);
  stroke-width: 2;
  stroke-linejoin: round;
}

.usage-dot {
  fill: var(--p1);
}

.usage-now-line {
  stroke: var(--p3);
  stroke-width: 1;
  opacity: 0.5;
}

.usage-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 14px;
  align-items: center;
  margin: 4px 0;
  color: var(--dim);
  font-size: 12px;
}

.usage-key {
  display: inline-block;
  width: 18px;
  height: 0;
  margin-right: 4px;
  vertical-align: middle;
  border-top: 2px solid var(--dim);
}

.usage-key-pace {
  border-top-style: dashed;
}

.usage-key-yours {
  border-top-color: var(--p1);
}

.usage-crosslinks {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 18px;
  margin-block: 18px;
}

@media (max-width: 480px) {
  .usage-stats {
    grid-template-columns: repeat(2, 1fr);
  }
  .usage-chart svg {
    height: 170px;
  }
}

/* ---- /codex-usage console + poll -------------------------------------- */

.usage-paste-form label {
  display: block;
  margin-bottom: 6px;
  color: var(--dim);
  font-size: 12.5px;
}

.usage-paste-form textarea {
  width: 100%;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: rgba(0, 0, 0, 0.3);
  color: var(--fg);
  font: inherit;
  font-size: 12.5px;
  line-height: 1.5;
  resize: vertical;
}

.usage-paste-form textarea::placeholder {
  color: #4a5a53;
}

.usage-gauges {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  margin-block: 14px;
}

.usage-gauge {
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.usage-gauge-head {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 10px;
  align-items: baseline;
  justify-content: space-between;
}

.usage-gauge-head b {
  color: var(--p1);
  font-size: 13px;
}

.usage-gauge-pct {
  color: var(--fg);
  font-size: 20px;
  font-variant-numeric: tabular-nums;
}

.usage-gauge-track {
  display: block;
  overflow: hidden;
  height: 8px;
  margin-block: 8px 6px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
}

.usage-gauge-fill {
  display: block;
  width: 0;
  height: 100%;
  border-radius: 999px;
  background: var(--p1);
  transition: width 240ms ease;
}

.usage-gauge-sub {
  margin: 0;
  color: var(--p3);
  font-size: 12.5px;
  font-variant-numeric: tabular-nums;
}

.usage-manual {
  margin-block: 12px;
}

.usage-manual summary {
  color: var(--dim);
  cursor: pointer;
  font-size: 12.5px;
}

.usage-actions {
  margin-block: 12px;
}

.poll-options {
  margin: 0 0 12px;
  padding: 0;
  border: 0;
}

.poll-options legend {
  margin-bottom: 8px;
  padding: 0;
  color: var(--dim);
  font-size: 12.5px;
}

.poll-option {
  display: flex;
  gap: 10px;
  align-items: center;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  cursor: pointer;
}

.poll-option + .poll-option {
  margin-top: 8px;
}

.poll-option:hover,
.poll-option:focus-within {
  border-color: rgba(65, 255, 139, 0.45);
}

.poll-option input {
  accent-color: var(--p1);
  flex: none;
}

.poll-option-body {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.poll-option-body b {
  color: var(--fg);
  font-size: 14px;
}

.poll-option-body small {
  color: var(--dim);
  font-size: 11.5px;
}

.poll-results h3 {
  margin: 0 0 8px;
  color: var(--p1);
  font-size: 13px;
}

.poll-bar {
  display: grid;
  gap: 8px;
  align-items: center;
  grid-template-columns: minmax(96px, 1fr) 3fr auto;
  margin-bottom: 6px;
  font-size: 12.5px;
}

.poll-bar-label {
  color: var(--dim);
}

.poll-bar-track {
  overflow: hidden;
  height: 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
}

.poll-bar-fill {
  display: block;
  height: 100%;
  border-radius: 999px;
  background: var(--p1);
}

.poll-bar-value {
  color: var(--fg);
  font-variant-numeric: tabular-nums;
}

.poll-model,
.poll-accuracy {
  margin: 8px 0;
  color: var(--dim);
  font-size: 12.5px;
}

.poll-model strong,
.poll-accuracy strong {
  color: var(--p3);
}

@media (max-width: 480px) {
  .poll-bar {
    grid-template-columns: 1fr auto;
  }
  .poll-bar-track {
    grid-column: 1 / -1;
  }
}
