/* Override the inline preview palette only when dark mode is active. */
html[data-theme="dark"] {
  color-scheme: dark !important;
  --motif-bg: #171c1e !important;
  --motif-panel: #232a2d !important;
  --motif-well: #2b3438 !important;
  --motif-ink: #edf1f2 !important;
  --motif-muted: #b6c0c4 !important;
  --motif-sage: #465257 !important;
  --motif-signal: #ff823d !important;
  --motif-on-signal: #202728 !important;
  --motif-signal-text: #ff9d66 !important;
  --motif-secondary: #ff823d !important;
}
html[data-theme="light"] { color-scheme: light !important; }
html[data-theme] .spark-launch { color-scheme: inherit; }
html[data-theme="dark"] .duo-art { background: var(--motif-panel); }
html[data-theme="dark"] .journal-card {
  background: var(--motif-panel);
  border-color: var(--motif-sage);
  color: var(--motif-ink);
}
html[data-theme="dark"] .journal-card:hover { border-color: var(--motif-secondary); }
html[data-theme="dark"] .journal-card :is(h3,.journal-category,.journal-card-footer,.journal-card-footer span:last-child) { color: var(--motif-ink); }
.theme-control { border: 0; padding: 0; margin: 0; min-width: 0; }
.theme-control legend { padding: 0; margin-bottom: 8px; font: 400 12px/1.5 var(--mono); color: var(--motif-muted); }
.theme-options { display: inline-flex; padding: 4px; gap: 4px; border: 1px solid var(--motif-sage); border-radius: 8px; }
.theme-options label { position: relative; cursor: pointer; }
.theme-options input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.company-footer .theme-options span { display: block; padding: 12px; border-radius: 4px; font: 500 13px/20px var(--mono); }
.company-footer .theme-options input:checked + span { background: var(--motif-ink); color: var(--motif-panel); }
.theme-options input:focus-visible + span { outline: 2px solid var(--motif-signal-text); outline-offset: 2px; }
.theme-options label:hover span { text-decoration: underline; text-underline-offset: 4px; }
@media print { .theme-control { display: none; } }
/* Secondary CTAs give navigation actions a clear, consistent target. */
html .spark-launch .text-link,
.spark-launch .journal-card-footer span:last-child {
  display:inline-flex;
  align-items:center;
  justify-content:center;
  min-height:52px;
  max-width:100%;
  padding:14px 20px;
  border:1px solid currentColor;
  border-radius:6px;
  background:transparent;
  font:500 14px/1.5 var(--mono);
  letter-spacing:0;
  text-transform:none;
  text-decoration:none;
  text-align:center;
  white-space:normal;
  overflow-wrap:anywhere;
  transition:background-color .18s ease,border-color .18s ease;
}
html .spark-launch .text-link { color:var(--motif-ink); }
html .spark-launch .text-link:hover,
.spark-launch .journal-card:is(:hover,:focus-visible) .journal-card-footer span:last-child {
  background:color-mix(in srgb,currentColor 12%,transparent);
}
html .spark-launch .text-link:focus-visible {
  outline:2px solid var(--motif-signal-text);
  outline-offset:4px;
}
.spark-launch .journal-card-footer { align-items:center; }
@media(prefers-reduced-motion:reduce) {
  html .spark-launch .text-link,
  .spark-launch .journal-card-footer span:last-child { transition:none; }
}
