/* ==========================================================================
   Package A: Design System + Shell
   Dark-first lab-bench design system. Light theme via prefers-color-scheme.
   ========================================================================== */

:root {
  /* Dark (default look) */
  --bg: #0a0d14;
  --surface: #111623;
  --surface-elevated: #161d2e;
  --line: rgba(255, 255, 255, 0.08);
  --line-strong: rgba(255, 255, 255, 0.16);
  --text: #e6e9f2;
  --muted: #98a1b3;

  --accent-start: #22d3ee;
  --accent-end: #6366f1;
  --accent-solid: #22d3ee;
  --logo-pixel: #a3e635;
  --btn-primary-bg: linear-gradient(135deg, #0e7490, #4338ca);
  --btn-primary-hover: linear-gradient(135deg, #0891b2, #4f46e5);
  --btn-primary-ink: #ffffff;

  /* Status tokens (WCAG AA on dark surfaces) */
  --status-live-text: #34d399;
  --status-live-bg: rgba(52, 211, 153, 0.12);
  --status-dev-text: #fbbf24;
  --status-dev-bg: rgba(251, 191, 36, 0.12);
  --status-soon-text: #cbd5e1;
  --status-soon-bg: rgba(148, 163, 184, 0.14);

  /* Semantic transaction tokens */
  --debit: #f87171;
  --debit-bg: rgba(248, 113, 113, 0.14);
  --credit: #34d399;
  --credit-bg: rgba(52, 211, 153, 0.14);

  --tok-amount: #22d3ee;
  --tok-account: #a5b4fc;
  --tok-merchant: #34d399;
  --tok-date: #fbbf24;

  --font-sans: ui-sans-serif, system-ui, "Segoe UI Variable Display", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-mono: ui-monospace, "Cascadia Code", "SF Mono", Menlo, Consolas, monospace;

  --max-w: 1140px;
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

@media (prefers-color-scheme: light) {
  :root {
    --bg: #f7f8fb;
    --surface: #ffffff;
    --surface-elevated: #f1f4f9;
    --line: rgba(13, 18, 32, 0.10);
    --line-strong: rgba(13, 18, 32, 0.20);
    --text: #0d1220;
    --muted: #556070;

    --accent-start: #0891b2;
    --accent-end: #4f46e5;
    --accent-solid: #0e7490;
    --logo-pixel: #65a30d;
    --btn-primary-bg: linear-gradient(135deg, #0e7490, #4338ca);
    --btn-primary-hover: linear-gradient(135deg, #0c5e75, #3730a3);
    --btn-primary-ink: #ffffff;

    --status-live-text: #046c4e;
    --status-live-bg: rgba(4, 108, 78, 0.10);
    --status-dev-text: #92400e;
    --status-dev-bg: rgba(180, 83, 9, 0.10);
    --status-soon-text: #475569;
    --status-soon-bg: rgba(71, 85, 105, 0.10);

    --debit: #b91c1c;
    --debit-bg: rgba(185, 28, 28, 0.10);
    --credit: #046c4e;
    --credit-bg: rgba(4, 108, 78, 0.10);

    --tok-amount: #0e7490;
    --tok-account: #4338ca;
    --tok-merchant: #046c4e;
    --tok-date: #b45309;
  }
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  font-family: var(--font-sans);
  font-size: 1rem;
  line-height: 1.6;
  color: var(--text);
  background-color: var(--bg);
  -webkit-font-smoothing: antialiased;
}

main {
  flex: 1;
}

a {
  color: inherit;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

:focus-visible {
  outline: 2px solid var(--accent-start);
  outline-offset: 3px;
  border-radius: 4px;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: absolute;
  left: 16px;
  top: -64px;
  z-index: 100;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  padding: 0 16px;
  background: var(--btn-primary-bg);
  color: var(--btn-primary-ink);
  font-weight: 600;
  border-radius: var(--radius-sm);
  text-decoration: none;
  transition: top 180ms var(--ease);
}

.skip-link:focus {
  top: 12px;
}

.grad-start {
  stop-color: var(--accent-start);
}

.grad-end {
  stop-color: var(--accent-end);
}

.container {
  width: 100%;
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 24px;
}

.section {
  padding: 80px 0;
  border-bottom: 1px solid var(--line);
}

/* Reveal-on-scroll (only hides below-fold elements once JS adds .will-reveal) */
html.js .will-reveal {
  opacity: 0;
  transform: translateY(14px);
  transition: opacity 360ms var(--ease), transform 360ms var(--ease);
}

html.js .will-reveal.is-revealed {
  opacity: 1;
  transform: translateY(0);
}

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px 20px;
  min-height: 64px;
  flex-wrap: wrap;
}

.brand-link {
  display: inline-flex;
  align-items: center;
  gap: 0.4em;
  min-height: 44px;
  text-decoration: none;
  font-weight: 650;
  font-size: 1.0625rem;
  letter-spacing: -0.01em;
  color: var(--text);
  flex-shrink: 0;
}

.brand-mark {
  display: block;
  flex-shrink: 0;
}

.logo-pixel {
  fill: var(--logo-pixel);
  transition: transform 200ms var(--ease);
}

.brand-link:hover .logo-pixel {
  transform: translateY(-1px);
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 22px;
  flex-wrap: wrap;
}

.site-nav a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  font-size: 0.9375rem;
  font-weight: 500;
  color: var(--muted);
  text-decoration: none;
  white-space: nowrap;
  transition: color 180ms var(--ease);
}

.site-nav a:hover {
  color: var(--text);
}

/* Typography & Micro-labels */
.hero-eyebrow,
.mono-label,
.mono-index,
.sample-badge,
.status-pill,
.principle-num,
.hero-caption {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  letter-spacing: 0.06em;
}

.hero-eyebrow,
.mono-label,
.mono-index,
.sample-badge,
.status-pill,
.principle-num {
  text-transform: uppercase;
}

.hero-eyebrow,
.mono-label {
  margin: 0 0 12px;
  color: var(--accent-solid);
  font-weight: 600;
}

.mono-index {
  color: var(--muted);
  font-weight: 600;
}

.status-pill {
  padding: 4px 10px;
  border-radius: 999px;
  font-weight: 600;
  border: 1px solid var(--line);
}

.status-live {
  color: var(--status-live-text);
  background: var(--status-live-bg);
}

.status-dev {
  color: var(--status-dev-text);
  background: var(--status-dev-bg);
}

.status-soon {
  color: var(--status-soon-text);
  background: var(--status-soon-bg);
}

.sample-badge {
  padding: 3px 8px;
  border-radius: 4px;
  background: var(--surface-elevated);
  border: 1px solid var(--line-strong);
  color: var(--muted);
  font-weight: 600;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 44px;
  padding: 0 18px;
  border-radius: var(--radius-sm);
  font-family: var(--font-sans);
  font-size: 0.9375rem;
  font-weight: 600;
  line-height: 1.2;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  border: 1px solid transparent;
  transition: background 180ms var(--ease), border-color 180ms var(--ease), color 180ms var(--ease);
}

.btn-primary {
  background: var(--btn-primary-bg);
  color: var(--btn-primary-ink);
}

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

.btn-ghost {
  background: var(--surface);
  border-color: var(--line-strong);
  color: var(--text);
}

.btn-ghost:hover {
  background: var(--surface-elevated);
  border-color: var(--muted);
}

.btn-disabled {
  background: var(--surface-elevated);
  border-color: var(--line);
  color: var(--muted);
  cursor: not-allowed;
}

.btn-sm {
  min-height: 44px;
  padding: 0 14px;
  font-size: 0.875rem;
}

/* ==========================================================================
   Package B: Opening Section & fig. 01 Visual
   ========================================================================== */
.hero {
  padding: 72px 0;
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
  gap: 48px;
  align-items: center;
}

.hero-title {
  margin: 0 0 20px;
  font-size: clamp(2.15rem, 4.6vw, 3.5rem);
  font-weight: 700;
  line-height: 1.08;
  letter-spacing: -0.03em;
}

.accent-gradient-text {
  background: linear-gradient(135deg, var(--accent-start), var(--accent-end));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero-subtitle {
  margin: 0 0 28px;
  max-width: 560px;
  font-size: clamp(1rem, 1.8vw, 1.15rem);
  color: var(--muted);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.hero-figure {
  margin: 0;
}

.hero-stage {
  position: relative;
  width: 100%;
  aspect-ratio: 460 / 360;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  overflow: hidden;
  touch-action: pan-y;
}

.hero-svg,
.hero-canvas {
  display: block;
  width: 100%;
  height: 100%;
}

.hero-canvas {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

html.js .hero-stage.is-canvas-active .hero-static-particles {
  display: none;
}

.hero-cloud,
.hero-blocked-line {
  color: var(--muted);
  opacity: 0.65;
}

.hero-svg-label {
  font-family: var(--font-mono);
  font-size: 13px;
  fill: currentColor;
}

.hero-stop-dot {
  fill: var(--accent-solid);
}

.hero-phone {
  color: var(--text);
}

.hero-glyph {
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 700;
}

.hero-caption {
  margin: 10px 0 0;
  color: var(--muted);
}

/* Section Header & Product Layout */
.section-header {
  max-width: 640px;
  margin-bottom: 48px;
}

.section-title {
  margin: 0 0 10px;
  font-size: clamp(1.625rem, 3vw, 2.25rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.16;
}

.section-intro {
  margin: 0;
  color: var(--muted);
}

.product-row {
  display: grid;
  grid-template-columns: minmax(0, 0.92fr) minmax(0, 1.08fr);
  gap: 48px;
  align-items: center;
  padding: 48px 0;
  border-top: 1px solid var(--line);
}

.product-row:last-child {
  padding-bottom: 0;
}

.product-row--reverse .product-copy {
  order: 2;
}

.product-row--reverse .product-demo {
  order: 1;
}

.product-meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 12px;
}

.product-name {
  margin: 0 0 10px;
  font-size: clamp(1.5rem, 2.5vw, 1.875rem);
  font-weight: 700;
  letter-spacing: -0.03em;
}

.product-pitch {
  margin: 0 0 16px;
  font-size: 1.0625rem;
  font-weight: 500;
}

.product-points {
  margin: 0 0 24px;
  padding-left: 18px;
  color: var(--muted);
}

.product-points li + li {
  margin-top: 8px;
}

.product-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

/* Shared Demo Bench */
.demo-bench {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 20px;
}

.demo-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding-bottom: 12px;
  margin-bottom: 14px;
  border-bottom: 1px dashed var(--line-strong);
}

.demo-title {
  font-family: var(--font-mono);
  font-size: 0.8125rem;
  font-weight: 600;
}

.demo-controls {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
}

.demo-note,
.demo-footnote {
  margin: 12px 0 0;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--muted);
}

.demo-controls .demo-note {
  margin: 0;
}

/* Principles & Live Privacy Check */
.principles-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
}

.principle-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  padding: 24px;
}

.principle-num {
  display: inline-block;
  color: var(--accent-solid);
  font-weight: 700;
  margin-bottom: 8px;
}

.principle-card h3 {
  margin: 0 0 8px;
  font-size: 1.125rem;
  font-weight: 650;
  letter-spacing: -0.02em;
}

.principle-card p {
  margin: 0;
  color: var(--muted);
  font-size: 0.95rem;
}

.privacy-check {
  margin-top: 24px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  padding: 20px 24px;
  font-family: var(--font-mono);
}

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

.privacy-check-head .mono-label {
  margin: 0;
}

.privacy-status {
  font-size: 0.75rem;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 999px;
}

.privacy-status.is-clean {
  color: var(--status-live-text);
  background: var(--status-live-bg);
}

.privacy-status.is-warn {
  color: var(--status-dev-text);
  background: var(--status-dev-bg);
}

.privacy-metrics {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.privacy-metrics li {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  background: var(--surface-elevated);
  border: 1px solid var(--line);
  font-size: 0.8125rem;
}

.privacy-metrics strong {
  color: var(--status-live-text);
}

.privacy-metrics strong.is-nonzero {
  color: var(--status-dev-text);
}

.privacy-note {
  margin: 12px 0 0;
  font-size: 0.75rem;
  color: var(--muted);
}

/* Contact */
.contact-box {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 36px;
}

.contact-copy {
  margin: 0 0 22px;
  color: var(--muted);
}

.contact-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px 16px;
}

.contact-email {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  font-family: var(--font-mono);
  font-size: clamp(1.05rem, 2.5vw, 1.375rem);
  font-weight: 700;
  color: var(--accent-solid);
  word-break: break-all;
}

.copy-status {
  font-family: var(--font-mono);
  font-size: 0.8125rem;
  color: var(--status-live-text);
}

/* Footer */
.site-footer {
  padding: 28px 0;
  background: var(--surface);
}

.footer-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px 24px;
  font-size: 0.875rem;
  color: var(--muted);
}

.footer-brand {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--text);
  font-weight: 600;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 16px;
}

.footer-links a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  font-family: var(--font-mono);
  font-size: 0.8125rem;
  color: var(--text);
  white-space: nowrap;
}

.footer-privacy {
  margin: 0;
}

/* 404 Page */
.not-found-main {
  flex: 1;
  display: flex;
  align-items: center;
  padding: 64px 0;
}

.not-found-card {
  max-width: 560px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 36px;
}

.not-found-card h1 {
  margin: 0 0 12px;
  font-size: clamp(1.75rem, 4vw, 2.25rem);
  letter-spacing: -0.03em;
}

.not-found-card p {
  margin: 0 0 24px;
  color: var(--muted);
}

/* ==========================================================================
   Package C: MoneyMap Demo
   ========================================================================== */
.mm-samples {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 12px;
}

.chip-btn {
  appearance: none;
  min-height: 44px;
  padding: 0 12px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--line-strong);
  background: var(--surface-elevated);
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 600;
  cursor: pointer;
  transition: border-color 160ms var(--ease), color 160ms var(--ease), background 160ms var(--ease);
}

.chip-btn.is-active {
  border-color: var(--accent-solid);
  color: var(--text);
  background: color-mix(in srgb, var(--accent-start) 12%, var(--surface));
}

.mm-bubble {
  background: var(--surface-elevated);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  padding: 14px;
}

.mm-bubble-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 6px;
}

.mm-sender {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 700;
}

.mm-edit-toggle {
  appearance: none;
  min-height: 36px;
  padding: 0 10px;
  border-radius: 6px;
  border: 1px solid var(--line-strong);
  background: var(--surface);
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 0.75rem;
  cursor: pointer;
}

.mm-edit-toggle[aria-pressed="true"] {
  border-color: var(--accent-solid);
  color: var(--text);
}

.mm-sms-view {
  margin: 0;
  font-family: var(--font-mono);
  font-size: 0.8125rem;
  line-height: 1.65;
  overflow-wrap: anywhere;
}

.mm-sms-input {
  width: 100%;
  margin-top: 6px;
  padding: 10px;
  border-radius: 6px;
  border: 1px solid var(--line-strong);
  background: var(--surface);
  color: var(--text);
  font-family: var(--font-mono);
  font-size: 0.8125rem;
  line-height: 1.5;
  resize: vertical;
}

.tok {
  background: transparent;
  color: inherit;
  border-bottom: 2px solid transparent;
  padding-bottom: 1px;
  transition: border-color 180ms var(--ease), background-color 180ms var(--ease);
}

.tok-amount.is-visible {
  border-color: var(--tok-amount);
  background: color-mix(in srgb, var(--tok-amount) 14%, transparent);
}

.tok-account.is-visible {
  border-color: var(--tok-account);
  background: color-mix(in srgb, var(--tok-account) 14%, transparent);
}

.tok-merchant.is-visible {
  border-color: var(--tok-merchant);
  background: color-mix(in srgb, var(--tok-merchant) 14%, transparent);
}

.tok-date.is-visible {
  border-color: var(--tok-date);
  background: color-mix(in srgb, var(--tok-date) 14%, transparent);
}

.mm-controls-mid {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 12px 0;
}

.mm-result-card {
  background: var(--surface-elevated);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  padding: 14px;
  transition: border-color 200ms var(--ease);
}

.mm-result-card.is-parsed {
  border-color: var(--accent-solid);
}

.mm-result-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}

.mm-tx-type {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  padding: 3px 8px;
  border-radius: 4px;
  background: var(--surface);
  color: var(--muted);
}

.mm-tx-type.is-debit {
  background: var(--debit-bg);
  color: var(--debit);
}

.mm-tx-type.is-credit {
  background: var(--credit-bg);
  color: var(--credit);
}

.mm-tx-amount {
  font-family: var(--font-mono);
  font-size: 1.125rem;
  font-weight: 700;
}

.mm-tx-amount.is-debit {
  color: var(--debit);
}

.mm-tx-amount.is-credit {
  color: var(--credit);
}

.mm-result-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px 14px;
}

.mm-field-label {
  display: flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  text-transform: uppercase;
  color: var(--muted);
}

.mm-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
}

.mm-dot-merchant { background: var(--tok-merchant); }
.mm-dot-account { background: var(--tok-account); }
.mm-dot-date { background: var(--tok-date); }

.mm-field-value {
  display: block;
  font-size: 0.875rem;
  font-weight: 600;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.mono-val {
  font-family: var(--font-mono);
  font-size: 0.8125rem;
}

/* ==========================================================================
   Package D: DailyTide Demo (with Sunny / Sunset / Starlit real themes)
   ========================================================================== */
.dt-card {
  --dt-card-bg: #fffbeb;
  --dt-card-surface: #ffffff;
  --dt-card-text: #1e293b;
  --dt-card-muted: #475569;
  --dt-card-border: rgba(180, 83, 9, 0.18);
  --dt-accent: #c2410c;
  --dt-wave-fill: url(#dt-grad-sunny);

  background: var(--dt-card-bg);
  color: var(--dt-card-text);
  border-color: var(--dt-card-border);
  transition: background 280ms var(--ease), color 280ms var(--ease), border-color 280ms var(--ease);
}

.dt-card.theme-sunset {
  --dt-card-bg: linear-gradient(160deg, #fff7ed 0%, #ffedd5 55%, #e0f2fe 100%);
  --dt-card-surface: rgba(255, 255, 255, 0.86);
  --dt-card-text: #1e293b;
  --dt-card-muted: #475569;
  --dt-card-border: rgba(251, 146, 60, 0.32);
  --dt-accent: #be123c;
  --dt-wave-fill: url(#dt-grad-sunset);
}

.dt-card.theme-starlit {
  --dt-card-bg: linear-gradient(170deg, #040b16 0%, #0b172a 55%, #0f213d 100%);
  --dt-card-surface: rgba(15, 23, 42, 0.82);
  --dt-card-text: #eef2f6;
  --dt-card-muted: #94a3b8;
  --dt-card-border: rgba(148, 163, 184, 0.22);
  --dt-accent: #22d3ee;
  --dt-wave-fill: url(#dt-grad-starlit);
}

.dt-demo-bar {
  border-bottom-color: var(--dt-card-border);
}

.dt-card .sample-badge {
  background: var(--dt-card-surface);
  color: var(--dt-card-muted);
  border-color: var(--dt-card-border);
}

.dt-theme-bar {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 6px;
  padding: 4px;
  border-radius: var(--radius-sm);
  background: var(--dt-card-surface);
  border: 1px solid var(--dt-card-border);
  margin-bottom: 12px;
}

.dt-theme-option {
  position: relative;
  display: flex;
}

.dt-theme-option input {
  position: absolute;
  opacity: 0;
  width: 1px;
  height: 1px;
}

.dt-theme-option span {
  width: 100%;
  min-height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 6px;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--dt-card-muted);
  cursor: pointer;
}

.dt-theme-option input:checked + span {
  background: var(--dt-accent);
  color: #ffffff;
}

.dt-card.theme-starlit .dt-theme-option input:checked + span {
  color: #040b16;
}

.dt-theme-option input:focus-visible + span {
  outline: 2px solid var(--dt-accent);
  outline-offset: 2px;
}

.dt-tide-vessel {
  position: relative;
  height: 68px;
  border-radius: var(--radius-md);
  background: var(--dt-card-surface);
  border: 1px solid var(--dt-card-border);
  overflow: hidden;
  display: flex;
  align-items: center;
  padding: 0 14px;
  margin-bottom: 12px;
}

.dt-wave-svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.dt-wave-group {
  transform: translateY(34px);
  transition: transform 360ms var(--ease);
}

.dt-wave-path {
  fill: var(--dt-wave-fill);
  opacity: 0.45;
  animation: dt-wave-drift 4.5s linear infinite;
}

@keyframes dt-wave-drift {
  from { transform: translateX(0); }
  to { transform: translateX(-180px); }
}

.dt-tide-readout {
  position: relative;
  z-index: 1;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-weight: 700;
  font-size: 0.875rem;
}

.dt-tide-pct {
  font-family: var(--font-mono);
  color: var(--dt-accent);
}

.dt-habit-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 8px;
}

.dt-habit-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 4px 12px;
  min-height: 48px;
  border-radius: var(--radius-md);
  background: var(--dt-card-surface);
  border: 1px solid var(--dt-card-border);
}

.dt-habit-check {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  flex: 1;
  cursor: pointer;
}

.dt-habit-check input {
  position: absolute;
  opacity: 0;
  width: 1px;
  height: 1px;
}

.dt-checkbox-box {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  border-radius: 5px;
  border: 1.5px solid var(--dt-card-muted);
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.dt-habit-check input:checked + .dt-checkbox-box {
  background: var(--dt-accent);
  border-color: var(--dt-accent);
}

.dt-habit-check input:checked + .dt-checkbox-box::after {
  content: "";
  width: 5px;
  height: 9px;
  border: solid #ffffff;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg) translate(-1px, -1px);
}

.dt-card.theme-starlit .dt-habit-check input:checked + .dt-checkbox-box::after {
  border-color: #040b16;
}

.dt-habit-check input:focus-visible + .dt-checkbox-box {
  outline: 2px solid var(--dt-accent);
  outline-offset: 2px;
}

.dt-habit-name {
  font-size: 0.9rem;
  font-weight: 500;
}

.dt-habit-right {
  display: flex;
  align-items: center;
  gap: 10px;
}

.dt-dots {
  display: flex;
  align-items: center;
  gap: 4px;
}

.dt-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  border: 1px solid var(--dt-card-muted);
  opacity: 0.45;
}

.dt-dot.is-filled {
  background: var(--dt-accent);
  border-color: var(--dt-accent);
  opacity: 1;
}

.dt-streak {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 700;
  min-width: 28px;
  text-align: right;
  color: var(--dt-card-muted);
}

.dt-habit-item.is-done .dt-streak {
  color: var(--dt-accent);
}

.dt-card .demo-controls {
  border-top-color: var(--dt-card-border);
}

.dt-card .demo-note {
  color: var(--dt-card-muted);
}

.dt-card .btn-ghost {
  background: var(--dt-card-surface);
  color: var(--dt-card-text);
  border-color: var(--dt-card-border);
}

/* ==========================================================================
   Package E: CinePulse Demo
   ========================================================================== */
.cp-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(168px, 1fr));
  gap: 12px;
  overflow-x: auto;
  padding-bottom: 2px;
}

.cp-tile {
  position: relative;
  aspect-ratio: 220 / 300;
  border-radius: var(--radius-md);
  overflow: hidden;
  border: 1px solid var(--line);
  background: #0f172a;
}

.cp-tile-trigger {
  appearance: none;
  display: block;
  width: 100%;
  height: 100%;
  padding: 0;
  margin: 0;
  border: 0;
  background: transparent;
  color: inherit;
  text-align: left;
  cursor: pointer;
}

.cp-poster {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.cp-tile-footer {
  position: absolute;
  inset: auto 0 0 0;
  padding: 28px 10px 10px;
  background: linear-gradient(to top, rgba(9, 13, 22, 0.94) 20%, rgba(9, 13, 22, 0));
  color: #f8fafc;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.cp-year {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  color: #94a3b8;
  text-transform: uppercase;
}

.cp-title {
  font-size: 0.85rem;
  font-weight: 700;
  line-height: 1.2;
}

.cp-overlay {
  position: absolute;
  inset: 0;
  background: rgba(10, 13, 20, 0.94);
  color: #f8fafc;
  padding: 10px 9px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  overflow-y: auto;
  pointer-events: none;
  transform: translateY(100%);
  opacity: 0;
  transition: transform 220ms var(--ease), opacity 220ms var(--ease);
}

.cp-tile:hover .cp-overlay,
.cp-tile .cp-tile-trigger:focus-visible + .cp-overlay,
.cp-tile.is-open .cp-overlay {
  transform: translateY(0);
  opacity: 1;
  pointer-events: auto;
}

.cp-overlay-meta {
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  color: #94a3b8;
  border-bottom: 1px solid rgba(148, 163, 184, 0.25);
  padding-bottom: 5px;
}

.cp-ratings {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 4px;
}

.cp-ratings li {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  font-size: 0.7rem;
  padding: 4px 6px;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.06);
}

.cp-ratings li span {
  color: #cbd5e1;
}

.cp-ratings li strong {
  font-family: var(--font-mono);
  color: #22d3ee;
  font-weight: 700;
}

/* ==========================================================================
   Responsive Breakpoints (tested 320px, 375px, 768px, 970px, 1440px)
   ========================================================================== */
@media (max-width: 1100px) {
  .product-row {
    grid-template-columns: 1fr;
    gap: 32px;
  }

  .product-row--reverse .product-copy,
  .product-row--reverse .product-demo {
    order: initial;
  }
}

@media (max-width: 960px) {
  .hero-grid {
    grid-template-columns: 1fr;
    gap: 32px;
  }

  .privacy-metrics {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .container {
    padding: 0 16px;
  }

  .section {
    padding: 56px 0;
  }

  .hero {
    padding: 48px 0;
  }

  .header-inner {
    padding-block: 6px;
    gap: 4px 12px;
  }

  .site-nav {
    gap: 14px;
  }

  .site-nav a {
    font-size: 0.875rem;
  }

  .principles-grid {
    grid-template-columns: 1fr;
  }

  .cp-grid {
    grid-template-columns: 1fr;
    max-width: 280px;
    margin: 0 auto;
  }

  .dt-habit-item {
    flex-direction: column;
    align-items: flex-start;
    padding: 8px 12px;
  }

  .dt-habit-right {
    width: 100%;
    justify-content: space-between;
    padding-left: 28px;
  }

  .contact-box {
    padding: 24px 20px;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  html.js .will-reveal {
    opacity: 1;
    transform: none;
  }

  *,
  *::before,
  *::after {
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
  }
}
