/* ============================================================
   UK Tax Drag — shared theme layer
   - Dark mode (designed, not inverted)
   - Print stylesheet
   - Graceful fallback font stacks
   - Theme toggle button styling
   - Designed to load AFTER each page's inline <style> so
     rules here override inline declarations by source order.
   ============================================================ */

/* ---------- Fallback font stacks (until webfont loads) ---------- */
body, .hero-title, h1, h2, h3, h4, h5, h6,
.brand-header, .nav-brand, .footer-brand, .fb,
.fi .fb, .site-footer .fb {
  font-display: swap;
}

/* Elegant serif fallback chain when Playfair Display is loading */
h1, h2, h3, h4, h5, h6,
.hero-title, .page-hero h1, .page-eyebrow,
.nav-brand, .fb, .tdx-r-title, .tdx-head h3,
.section-title, .section-kicker {
  font-family: 'Playfair Display', 'Source Serif Pro', Georgia, 'Times New Roman', Garamond, Cambria, serif;
}

/* Humanist sans fallback chain when Lato is loading */
body, p, a, button, input, select, textarea, label, li, td, th {
  font-family: 'Lato', -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Inter', Roboto, 'Helvetica Neue', Arial, sans-serif;
}

/* ---------- Shared search modal ---------- */
.tdx-search-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  background: rgba(250,246,238,0.1);
  border: 1px solid rgba(201,169,97,0.5);
  color: #faf6ee;
  padding: 0.55rem 1.05rem;
  border-radius: 3px;
  font-family: 'Lato', sans-serif;
  font-size: 0.88rem;
  cursor: pointer;
  transition: all 0.2s;
  letter-spacing: 0.4px;
  font-weight: 400;
  line-height: 1.2;
  white-space: nowrap;
}
.tdx-search-btn:hover {
  background: rgba(201,169,97,0.22);
  border-color: #c9a961;
  color: #c9a961;
}
.tdx-search-btn svg {
  width: 16px;
  height: 16px;
  stroke: currentColor;
  fill: none;
  stroke-width: 2.2;
  flex-shrink: 0;
}
.tdx-search-btn kbd {
  background: rgba(250,246,238,0.14);
  border: 1px solid rgba(250,246,238,0.22);
  border-radius: 2px;
  padding: 2px 6px;
  font-size: 0.72rem;
  font-family: 'Lato', sans-serif;
  color: #e8e0c9;
  margin-left: 0.2rem;
}
.site-nav__links li:has(.tdx-search-btn) {
  display: inline-flex;
  align-items: center;
  margin: 0;
  list-style: none;
}
@media (max-width: 720px) {
  .tdx-search-btn kbd { display: none; }
  .tdx-search-btn span.tdx-lbl { display: none; }
  .tdx-search-btn { padding: 0.55rem 0.65rem; }
}

.tdx-modal {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(15,42,32,0.85);
  z-index: 9999;
  padding: 5vh 1rem 2rem;
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  overflow-y: auto;
}
.tdx-modal.open {
  display: block;
  animation: tdxfade 0.2s ease;
}
@keyframes tdxfade {
  from { opacity: 0; }
  to { opacity: 1; }
}
.tdx-box {
  max-width: 880px;
  margin: 0 auto;
  background: #faf6ee;
  border: 1px solid #c9a961;
  border-radius: 5px;
  box-shadow: 0 30px 80px rgba(0,0,0,0.5);
  overflow: hidden;
  font-family: 'Lato', sans-serif;
}
.tdx-head {
  background: linear-gradient(135deg, #0f2a20, #1a3a2e);
  padding: 1.4rem 1.8rem 0.9rem;
  border-bottom: 2px solid #c9a961;
  position: relative;
}
.tdx-head h3 {
  font-family: 'Playfair Display', serif;
  color: #faf6ee;
  font-size: 1.4rem;
  margin: 0 0 0.3rem;
  font-weight: 600;
}
.tdx-head p {
  color: #c9a961;
  font-size: 0.78rem;
  margin: 0;
  letter-spacing: 1.3px;
  text-transform: uppercase;
}
.tdx-close {
  position: absolute;
  top: 1.2rem;
  right: 1.4rem;
  background: rgba(201,169,97,0.2);
  border: 1px solid rgba(201,169,97,0.4);
  color: #faf6ee;
  font-size: 1.5rem;
  cursor: pointer;
  width: 38px;
  height: 38px;
  border-radius: 3px;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
  padding: 0;
}
.tdx-close:hover {
  background: #c9a961;
  color: #0f2a20;
}
.tdx-input-wrap {
  position: relative;
  background: #fff;
  border-bottom: 1px solid #e3dac4;
}
.tdx-input-wrap svg {
  position: absolute;
  left: 1.5rem;
  top: 50%;
  transform: translateY(-50%);
  width: 20px;
  height: 20px;
  stroke: #a8a08c;
  fill: none;
  stroke-width: 2.2;
  pointer-events: none;
}
.tdx-input {
  font-family: 'Lato', sans-serif;
  font-size: 1.25rem;
  padding: 1.5rem 1.8rem 1.5rem 3.4rem;
  border: none;
  background: #fff;
  width: 100%;
  color: #2c2416;
  font-weight: 400;
}
.tdx-input:focus {
  outline: none;
  box-shadow: inset 0 -2px 0 #c9a961;
}
.tdx-input::placeholder {
  color: #a8a08c;
  font-style: italic;
}
.tdx-stats {
  padding: 0.7rem 1.8rem;
  background: #f3ecdb;
  font-size: 0.82rem;
  color: #6b6353;
  font-style: italic;
  border-bottom: 1px solid #e3dac4;
}
.tdx-results {
  max-height: 62vh;
  overflow-y: auto;
  background: #faf6ee;
}
.tdx-results::-webkit-scrollbar {
  width: 10px;
}
.tdx-results::-webkit-scrollbar-track {
  background: #f3ecdb;
}
.tdx-results::-webkit-scrollbar-thumb {
  background: #c9a961;
  border-radius: 5px;
}
.tdx-r {
  display: block;
  padding: 1.1rem 1.8rem;
  border-bottom: 1px solid #e3dac4;
  text-decoration: none;
  color: #2c2416;
  transition: background 0.12s;
  border-left: 3px solid transparent;
}
.tdx-r:hover,
.tdx-r.sel {
  background: #f3ecdb;
  border-left-color: #c9a961;
}
.tdx-r-title {
  font-family: 'Playfair Display', serif;
  font-size: 1.18rem;
  color: #0f2a20;
  font-weight: 600;
  margin-bottom: 0.3rem;
  line-height: 1.3;
}
.tdx-r-page {
  font-size: 0.78rem;
  color: #a8862f;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  font-weight: 700;
  margin-bottom: 0.4rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}
.tdx-r-page .tdx-cat {
  background: #1a3a2e;
  color: #c9a961;
  font-size: 0.66rem;
  padding: 3px 9px;
  border-radius: 2px;
  letter-spacing: 1px;
}
.tdx-r-page .tdx-arrow {
  color: #c9a961;
  font-size: 0.85rem;
}
.tdx-r-snip {
  font-size: 0.92rem;
  color: #4a4235;
  line-height: 1.55;
}
.tdx-r-snip mark {
  background: rgba(201,169,97,0.45);
  color: #2c2416;
  padding: 1px 4px;
  border-radius: 2px;
  font-weight: 600;
}
.tdx-empty {
  padding: 2.5rem 1.8rem;
  text-align: center;
  color: #6b6353;
  font-style: italic;
}
.tdx-foot {
  padding: 0.85rem 1.8rem;
  background: #f3ecdb;
  border-top: 1px solid #e3dac4;
  font-size: 0.78rem;
  color: #6b6353;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.5rem;
}
.tdx-foot kbd {
  background: #faf6ee;
  border: 1px solid #c9a961;
  border-radius: 2px;
  padding: 1px 6px;
  font-size: 0.72rem;
  color: #2c2416;
  margin: 0 2px;
}
@media (max-width: 640px) {
  .tdx-box { margin: 0 0.2rem; }
  .tdx-head { padding: 1.2rem 1.4rem 0.8rem; }
  .tdx-input { font-size: 1.1rem; padding: 1.3rem 1.4rem 1.3rem 3rem; }
  .tdx-r { padding: 1rem 1.4rem; }
  .tdx-r-title { font-size: 1.05rem; }
}
html { scroll-padding-top: 90px; }
:target { animation: tdxhi 1.6s ease; }
@keyframes tdxhi {
  0% { background: rgba(201,169,97,0.35); }
  100% { background: transparent; }
}

/* ---------- Theme toggle button ---------- */
.tdx-theme-toggle {
  background: rgba(250,246,238,0.08);
  border: 1px solid rgba(201,169,97,0.45);
  color: #faf6ee;
  width: 34px;
  height: 34px;
  border-radius: 3px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  margin-left: 0.4rem;
  transition: all 0.2s ease;
  padding: 0;
  flex-shrink: 0;
}
.tdx-theme-toggle:hover {
  background: rgba(201,169,97,0.2);
  border-color: #c9a961;
  color: #c9a961;
}
.tdx-theme-toggle svg {
  width: 16px;
  height: 16px;
  stroke: currentColor;
  fill: none;
  stroke-width: 2;
}
.tdx-theme-toggle .tdx-sun { display: none; }
.tdx-theme-toggle .tdx-moon { display: block; }
html[data-theme="dark"] .tdx-theme-toggle .tdx-sun { display: block; }
html[data-theme="dark"] .tdx-theme-toggle .tdx-moon { display: none; }

/* ============================================================
   DARK MODE
   Designed tokens, not inverted:
     forest        #1a3a2e  ->  moss-deep       #16231d
     forest-deep   #0f2a20  ->  pitch           #0b1612
     cream         #faf6ee  ->  warm-charcoal   #1d2420
     ink           #2c2416  ->  parchment       #e8e0c9
     gold          #c9a961  ->  brass           #d4b978
   ============================================================ */

html[data-theme="dark"] {
  color-scheme: dark;
}

html[data-theme="dark"] body {
  background: #16231d;
  color: #e8e0c9;
}

/* Global background/text surfaces --- use high-specificity overrides */
html[data-theme="dark"] .hero,
html[data-theme="dark"] .page-hero,
html[data-theme="dark"] section[class*="hero"] {
  background: linear-gradient(135deg, #0b1612 0%, #16231d 60%, #1d2a23 100%) !important;
  color: #f2ead6 !important;
}

html[data-theme="dark"] .section,
html[data-theme="dark"] main,
html[data-theme="dark"] article,
html[data-theme="dark"] .calc-wrap,
html[data-theme="dark"] .calc-shell,
html[data-theme="dark"] .page-body {
  background: #16231d !important;
  color: #e8e0c9 !important;
}

/* Cards / panels */
html[data-theme="dark"] .card,
html[data-theme="dark"] .nav-card,
html[data-theme="dark"] .calc-card,
html[data-theme="dark"] .result-card,
html[data-theme="dark"] .input-block,
html[data-theme="dark"] .output-block,
html[data-theme="dark"] .tip-card,
html[data-theme="dark"] .calc-panel,
html[data-theme="dark"] .calc-inputs,
html[data-theme="dark"] .calc-results,
html[data-theme="dark"] .related-card,
html[data-theme="dark"] .source-citations,
html[data-theme="dark"] .kp-card,
html[data-theme="dark"] .tb-card,
html[data-theme="dark"] .scenario-card {
  background: #1d2a23 !important;
  border-color: rgba(212, 185, 120, 0.22) !important;
  color: #e8e0c9 !important;
  box-shadow: 0 1px 0 rgba(0,0,0,0.25), 0 10px 28px rgba(0,0,0,0.35);
}

html[data-theme="dark"] h1,
html[data-theme="dark"] h2,
html[data-theme="dark"] h3,
html[data-theme="dark"] h4,
html[data-theme="dark"] h5,
html[data-theme="dark"] h6,
html[data-theme="dark"] .section-title,
html[data-theme="dark"] .result-value,
html[data-theme="dark"] .result-num {
  color: #f2ead6 !important;
}

html[data-theme="dark"] p,
html[data-theme="dark"] li,
html[data-theme="dark"] label,
html[data-theme="dark"] .result-label,
html[data-theme="dark"] .section-kicker,
html[data-theme="dark"] .page-eyebrow,
html[data-theme="dark"] .muted {
  color: rgba(232, 224, 201, 0.82) !important;
}

/* Links */
html[data-theme="dark"] a {
  color: #d4b978;
}
html[data-theme="dark"] a:hover {
  color: #e7c989;
}

/* Inputs */
html[data-theme="dark"] input[type="text"],
html[data-theme="dark"] input[type="number"],
html[data-theme="dark"] input[type="email"],
html[data-theme="dark"] select,
html[data-theme="dark"] textarea,
html[data-theme="dark"] .sc-num {
  background: #0f1815 !important;
  color: #f2ead6 !important;
  border-color: rgba(212, 185, 120, 0.3) !important;
}
html[data-theme="dark"] input:focus,
html[data-theme="dark"] select:focus,
html[data-theme="dark"] textarea:focus {
  border-color: #d4b978 !important;
  outline: none;
  box-shadow: 0 0 0 2px rgba(212, 185, 120, 0.25) !important;
}

/* Range sliders */
html[data-theme="dark"] input[type="range"] {
  accent-color: #d4b978;
}

/* Buttons (primary) */
html[data-theme="dark"] button.primary,
html[data-theme="dark"] .btn-primary,
html[data-theme="dark"] .calc-btn,
html[data-theme="dark"] button[type="submit"] {
  background: #d4b978 !important;
  color: #0b1612 !important;
  border-color: #d4b978 !important;
}
html[data-theme="dark"] button.primary:hover,
html[data-theme="dark"] .btn-primary:hover {
  background: #e7c989 !important;
}

/* Nav */
html[data-theme="dark"] .site-nav {
  background: #0b1612 !important;
  border-bottom-color: rgba(212, 185, 120, 0.25) !important;
}

/* Footer */
html[data-theme="dark"] .site-footer {
  background: #0b1612 !important;
}

/* Search modal */
html[data-theme="dark"] .tdx-box { background: #1d2a23 !important; }
html[data-theme="dark"] .tdx-input-wrap { background: #0f1815 !important; }
html[data-theme="dark"] .tdx-input { background: #0f1815 !important; color: #f2ead6 !important; }
html[data-theme="dark"] .tdx-stats,
html[data-theme="dark"] .tdx-foot { background: #14201a !important; color: #b8b09a !important; }
html[data-theme="dark"] .tdx-results { background: #1d2a23 !important; }
html[data-theme="dark"] .tdx-r { color: #e8e0c9 !important; border-bottom-color: rgba(212,185,120,0.18) !important; }
html[data-theme="dark"] .tdx-r:hover,
html[data-theme="dark"] .tdx-r.sel { background: #243430 !important; border-left-color: #d4b978 !important; }
html[data-theme="dark"] .tdx-r-title { color: #f2ead6 !important; }
html[data-theme="dark"] .tdx-r-snip { color: rgba(232,224,201,0.78) !important; }

/* Tables */
html[data-theme="dark"] table {
  background: #1d2a23 !important;
  color: #e8e0c9 !important;
}
html[data-theme="dark"] thead,
html[data-theme="dark"] th {
  background: #0f1815 !important;
  color: #d4b978 !important;
  border-color: rgba(212, 185, 120, 0.25) !important;
}
html[data-theme="dark"] td {
  border-color: rgba(212, 185, 120, 0.15) !important;
}

/* Highlighted result boxes */
html[data-theme="dark"] .result-highlight,
html[data-theme="dark"] .result-primary,
html[data-theme="dark"] .kp-hero,
html[data-theme="dark"] .hero-stat {
  background: linear-gradient(135deg, #1d2a23, #243430) !important;
  border: 1px solid rgba(212, 185, 120, 0.35) !important;
  color: #f2ead6 !important;
}

/* Reduce motion respectfully */
@media (prefers-reduced-motion: reduce) {
  * {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
}

/* ---------- Progressive rendering for long pages ---------- */
@supports (content-visibility: auto) {
  @media screen {
    main > section,
    main > article,
    .band,
    .card-grid,
    .goal-grid,
    .path-grid,
    .finder-panel,
    .intro-card,
    .feature-strip,
    .tdx-trust-card,
    .tdx-next-steps,
    .tdx-home-authority,
    .kids-band,
    .worksheet-grid,
    .lesson-pack,
    .unit-card,
    .route,
    .tool,
    .journey-card {
      content-visibility: auto;
      contain-intrinsic-size: 760px;
    }

    header.hero,
    .hero,
    .site-nav,
    .site-footer,
    .site-footer__inner,
    .site-footer__bottom,
    .tdx-modal,
    .tdx-box,
    .summary-card,
    .inputs-panel,
    .results-panel,
    .calc-layout,
    .calc-shell,
    .calc-wrap,
    [data-calc],
    .kids-passport-summary,
    .kids-badges,
    .kids-progress-hero {
      content-visibility: visible;
      contain-intrinsic-size: auto;
    }
  }
}

/* ============================================================
   PRINT STYLESHEET
   When a user prints a calculator result, we want a clean,
   Coutts-letterhead-quality single/two-page PDF.
   ============================================================ */
@media print {
  /* Reset theme to light for ink economy */
  html, html[data-theme="dark"] { color-scheme: light; }
  html[data-theme="dark"] body { background: #fff !important; color: #000 !important; }
  html[data-theme="dark"] * {
    background: transparent !important;
    color: #000 !important;
    border-color: #999 !important;
    box-shadow: none !important;
  }

  body {
    background: #fff !important;
    color: #000 !important;
    font-size: 10pt;
    line-height: 1.4;
  }

  /* Hide all non-content chrome */
  .site-nav,
  .site-footer,
  .tdx-search-btn,
  .tdx-theme-toggle,
  .tdx-modal,
  .share-btn,
  .pdf-btn,
  .save-btn,
  .calc-btn,
  .related-calcs,
  nav,
  footer:not(.print-footer),
  .calculator-controls,
  .scenario-actions,
  button,
  .no-print {
    display: none !important;
  }

  /* Expand and de-style the core calc content */
  .calc-wrap,
  .calc-shell,
  main,
  article,
  .page-body,
  section {
    background: #fff !important;
    color: #000 !important;
    box-shadow: none !important;
    border: none !important;
    padding: 0 !important;
    margin: 0 !important;
    max-width: 100% !important;
  }

  /* Preserve result boxes with thin border */
  .result-card,
  .result-block,
  .output-block,
  .source-citations {
    border: 1px solid #ccc !important;
    padding: 10pt !important;
    margin-bottom: 8pt !important;
    page-break-inside: avoid;
  }

  /* Page breaks */
  h1, h2 { page-break-after: avoid; }
  table, figure { page-break-inside: avoid; }

  /* URLs after links */
  a[href^="http"]::after,
  a[href^="/"]::after {
    content: " [" attr(href) "]";
    font-size: 8pt;
    color: #555;
    font-style: italic;
  }
  a[href^="#"]::after { content: ""; }

  /* Branded print header injected by JS */
  .tdx-print-head {
    display: block !important;
    border-bottom: 2px solid #1a3a2e;
    padding-bottom: 8pt;
    margin-bottom: 16pt;
  }
  .tdx-print-head .brand {
    font-family: 'Playfair Display', Georgia, serif;
    font-size: 14pt;
    color: #1a3a2e !important;
  }
  .tdx-print-head .date {
    font-size: 9pt;
    color: #666 !important;
  }

  .tdx-print-foot {
    display: block !important;
    margin-top: 24pt;
    padding-top: 8pt;
    border-top: 1px solid #ccc;
    font-size: 8pt;
    color: #666 !important;
    text-align: center;
  }

  @page {
    margin: 18mm 16mm;
  }
}

/* Hide print-only elements on screen */
.tdx-print-head,
.tdx-print-foot {
  display: none;
}

/* ============================================================
   SHARED UTILITIES — Sources block, Save/PDF/Share button row
   ============================================================ */

.source-citations {
  max-width: 820px;
  margin: 48px auto 40px;
  background: #f6efdf;
  border-left: 3px solid #c9a961;
  padding: 28px 34px;
  border-radius: 3px;
  font-size: 0.92rem;
  color: #3a3220;
  line-height: 1.65;
}
.source-citations h3 {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 1.1rem;
  color: #0f2a20;
  margin: 0 0 14px;
  letter-spacing: 0.2px;
  font-weight: 600;
  border-bottom: 1px solid #d6c89b;
  padding-bottom: 10px;
}
.source-citations .src-review {
  display: inline-block;
  font-size: 0.78rem;
  color: #6b6353;
  font-style: italic;
  margin-bottom: 14px;
  text-transform: uppercase;
  letter-spacing: 1.4px;
}
.source-citations ol, .source-citations ul {
  margin: 0 0 0 1.2rem;
  padding: 0;
}
.source-citations li {
  margin-bottom: 8px;
}
.source-citations li a {
  color: #0f2a20;
  text-decoration: underline;
  text-decoration-color: rgba(201, 169, 97, 0.5);
  text-underline-offset: 2px;
}
.source-citations li a:hover {
  color: #c9a961;
}
.source-citations .src-disclaimer {
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px solid #d6c89b;
  font-size: 0.82rem;
  color: #6b6353;
  font-style: italic;
}

html[data-theme="dark"] .source-citations {
  background: #1d2a23 !important;
  border-left-color: #d4b978 !important;
  color: #e8e0c9 !important;
}
html[data-theme="dark"] .source-citations h3 {
  color: #f2ead6 !important;
  border-bottom-color: rgba(212, 185, 120, 0.25) !important;
}
html[data-theme="dark"] .source-citations li a {
  color: #d4b978 !important;
}

/* Calculator action row (Share, PDF, Save) */
.tdx-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  justify-content: center;
  margin: 1.6rem auto 0;
}
.tdx-actions button {
  font-family: inherit;
  font-size: 0.85rem;
  padding: 0.65rem 1.2rem;
  background: #fff;
  color: #0f2a20;
  border: 1px solid #c9a961;
  border-radius: 3px;
  cursor: pointer;
  transition: all 0.2s ease;
  letter-spacing: 0.3px;
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
}
.tdx-actions button:hover {
  background: #c9a961;
  color: #0f2a20;
}
.tdx-actions button svg {
  width: 15px;
  height: 15px;
  stroke: currentColor;
  fill: none;
  stroke-width: 2;
}

html[data-theme="dark"] .tdx-actions button {
  background: #1d2a23 !important;
  color: #f2ead6 !important;
  border-color: rgba(212, 185, 120, 0.45) !important;
}
html[data-theme="dark"] .tdx-actions button:hover {
  background: #d4b978 !important;
  color: #0b1612 !important;
}

/* Toast */
.tdx-toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%) translateY(30px);
  background: #0f2a20;
  color: #c9a961;
  padding: 0.8rem 1.4rem;
  border-radius: 3px;
  font-size: 0.85rem;
  letter-spacing: 0.4px;
  border: 1px solid #c9a961;
  box-shadow: 0 10px 40px rgba(0,0,0,0.3);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s, transform 0.25s;
  z-index: 10000;
}
.tdx-toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}
.tdx-toast--rich {
  width: min(92vw, 460px);
  padding: 1rem 1.05rem;
  border-radius: 16px;
  box-shadow: 0 18px 40px rgba(15, 42, 32, 0.28);
}
.tdx-toast__title {
  font-family: 'Playfair Display', 'Source Serif Pro', Georgia, serif;
  font-size: 1rem;
  color: #faf6ee;
  margin-bottom: 0.25rem;
}
.tdx-toast__message {
  color: #f5edd8;
  font-size: 0.9rem;
}
.tdx-toast__detail {
  color: rgba(245, 237, 216, 0.78);
  font-size: 0.84rem;
  line-height: 1.5;
  margin-top: 0.35rem;
}
.tdx-toast__message:empty,
.tdx-toast__detail:empty,
.tdx-toast__actions:empty {
  display: none;
}
.tdx-toast__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
  margin-top: 0.85rem;
}
.tdx-toast__action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 38px;
  padding: 0.55rem 0.9rem;
  border-radius: 999px;
  border: 1px solid rgba(201, 169, 97, 0.45);
  background: rgba(201, 169, 97, 0.14);
  color: #faf6ee;
  text-decoration: none;
  font: inherit;
  font-size: 0.82rem;
  font-weight: 700;
  cursor: pointer;
}
.tdx-toast__action:hover {
  background: #c9a961;
  color: #0f2a20;
}
.tdx-toast__action.is-secondary {
  background: transparent;
  color: rgba(250, 246, 238, 0.82);
}
.tdx-toast__action.is-secondary:hover {
  background: rgba(250, 246, 238, 0.16);
  color: #faf6ee;
}

.tdx-empty-state {
  padding: 1.2rem 1.1rem;
  font-style: normal;
}
.tdx-empty-state__copy strong {
  display: block;
  color: #0f2a20;
  font-family: 'Playfair Display', 'Source Serif Pro', Georgia, serif;
  font-size: 1.1rem;
  margin-bottom: 0.35rem;
}
.tdx-empty-state__copy p {
  margin: 0;
  color: #6b6353;
}
.tdx-empty-state__links {
  display: grid;
  gap: 0.65rem;
  margin-top: 1rem;
}
.tdx-empty-state__link {
  display: block;
  padding: 0.85rem 0.95rem;
  border-radius: 14px;
  border: 1px solid rgba(201, 169, 97, 0.35);
  background: linear-gradient(180deg, #fff, #f8f2e6);
  text-decoration: none;
}
.tdx-empty-state__link strong {
  display: block;
  color: #0f2a20;
  font-size: 0.92rem;
  margin-bottom: 0.2rem;
}
.tdx-empty-state__link span {
  display: block;
  color: #6b6353;
  font-size: 0.82rem;
  line-height: 1.45;
}
.tdx-empty-state__link:hover {
  border-color: #c9a961;
  transform: translateY(-1px);
}

html[data-theme="dark"] .tdx-toast__title {
  color: #f8f1de;
}
html[data-theme="dark"] .tdx-empty-state__copy strong,
html[data-theme="dark"] .tdx-empty-state__link strong {
  color: #f2ead6 !important;
}
html[data-theme="dark"] .tdx-empty-state__copy p,
html[data-theme="dark"] .tdx-empty-state__link span {
  color: rgba(232, 224, 201, 0.78) !important;
}
html[data-theme="dark"] .tdx-empty-state__link {
  background: linear-gradient(180deg, #1d2a23, #243430);
  border-color: rgba(212, 185, 120, 0.25);
}

/* Shared readability and performance helpers */
h1,
h2,
h3,
.hero-title,
.page-hero h1,
.section-title {
  text-wrap: balance;
}

p,
li,
.section-sub,
.hero-sub,
.page-hero-sub,
.nav-card__desc,
.blurb {
  text-wrap: pretty;
}

main > section,
.panel,
.card-grid,
.grid,
.scenario-grid,
.results-panel > * {
  content-visibility: auto;
  contain-intrinsic-size: 1px 680px;
}

.tdx-skip-link {
  position: fixed;
  left: 16px;
  top: 14px;
  z-index: 10001;
  background: #0f2a20;
  color: #faf6ee;
  border: 1px solid #c9a961;
  border-radius: 3px;
  padding: 0.7rem 1rem;
  font-size: 0.85rem;
  letter-spacing: 0.3px;
  transform: translateY(-140%);
  transition: transform 0.18s ease;
}

.tdx-skip-link:focus {
  transform: translateY(0);
  outline: none;
}

.tdx-nav-toggle {
  display: none;
  appearance: none;
  background: rgba(250, 246, 238, 0.08);
  border: 1px solid rgba(201, 169, 97, 0.45);
  border-radius: 3px;
  width: 42px;
  height: 42px;
  padding: 0;
  align-items: center;
  justify-content: center;
  gap: 4px;
  cursor: pointer;
  color: #faf6ee;
}

.tdx-nav-toggle span {
  display: block;
  width: 18px;
  height: 2px;
  background: currentColor;
  border-radius: 999px;
  transition: transform 0.2s ease, opacity 0.2s ease;
}

.tdx-nav-ready.is-open .tdx-nav-toggle span:nth-child(1) {
  transform: translateY(6px) rotate(45deg);
}

.tdx-nav-ready.is-open .tdx-nav-toggle span:nth-child(2) {
  opacity: 0;
}

.tdx-nav-ready.is-open .tdx-nav-toggle span:nth-child(3) {
  transform: translateY(-6px) rotate(-45deg);
}

.tdx-nav-ready .tdx-nav-tools-item {
  display: flex;
  gap: 0.7rem;
  align-items: center;
}

.tdx-nav-ready .tdx-nav-tools-item .tdx-search-btn {
  flex: 1 1 auto;
}

.tdx-nav-ready .tdx-nav-tools-item .tdx-theme-toggle {
  margin-left: 0;
}

.tdx-explainers {
  display: grid;
  gap: 0.9rem;
  margin-top: 1.2rem;
}

.tdx-explainer {
  background: #fff;
  border: 1px solid rgba(201, 169, 97, 0.35);
  border-radius: 6px;
  overflow: hidden;
}

.tdx-explainer summary {
  cursor: pointer;
  list-style: none;
  padding: 0.9rem 1rem;
  font-weight: 700;
  color: #0f2a20;
}

.tdx-explainer summary::-webkit-details-marker {
  display: none;
}

.tdx-explainer p,
.tdx-explainer ul {
  margin: 0;
  padding: 0 1rem 1rem;
  color: #4a4235;
}

.tdx-explainer ul {
  padding-left: 2rem;
}

.tdx-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  align-items: center;
  margin: 2rem 0 0;
}

.tdx-actions button,
.tdx-actions a {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.7rem 1rem;
  border-radius: 999px;
  border: 1px solid rgba(201, 169, 97, 0.45);
  background: #fff;
  color: #0f2a20;
  font: inherit;
  font-size: 0.88rem;
  cursor: pointer;
  text-decoration: none;
  transition: all 0.15s ease;
}

.tdx-actions button:hover,
.tdx-actions a:hover {
  background: #c9a961;
  border-color: #c9a961;
  color: #0f2a20;
}

.tdx-actions svg {
  width: 16px;
  height: 16px;
  stroke: currentColor;
  fill: none;
  stroke-width: 2;
}

/* Responsive navigation and footer polish for compact screens */
@media (max-width: 700px) {
  .site-nav.tdx-nav-ready {
    padding: 12px 16px !important;
    height: auto !important;
    flex-direction: column;
    align-items: stretch !important;
    gap: 10px !important;
  }

  .site-nav.tdx-nav-ready .site-nav__inner {
    padding: 0 !important;
    display: grid;
    grid-template-columns: 1fr auto;
    align-items: center !important;
    justify-content: space-between !important;
    gap: 10px !important;
  }

  .site-nav.tdx-nav-ready .nav-brand,
  .site-nav.tdx-nav-ready .site-nav__brand {
    font-size: 1rem !important;
  }

  .site-nav.tdx-nav-ready .tdx-nav-toggle {
    display: inline-flex;
  }

  .site-nav.tdx-nav-ready .tdx-nav-links {
    width: 100%;
    display: none !important;
    flex-direction: column !important;
    flex-wrap: nowrap !important;
    justify-content: flex-start !important;
    gap: 10px !important;
    padding: 6px 0 0;
    margin: 0;
    list-style: none;
  }

  .site-nav.tdx-nav-ready.is-open .tdx-nav-links {
    display: flex !important;
  }

  .site-nav.tdx-nav-ready .tdx-nav-links > *,
  .site-nav.tdx-nav-ready .tdx-nav-links li {
    width: 100%;
    list-style: none;
  }

  .site-nav.tdx-nav-ready .tdx-nav-links a {
    display: block;
    font-size: 0.8rem !important;
    padding: 0.78rem 0.9rem !important;
    border-bottom: none !important;
    border-radius: 14px;
    background: rgba(250, 246, 238, 0.08);
    text-align: center;
    white-space: normal;
  }

  .site-nav.tdx-nav-ready .tdx-nav-links a.active {
    background: rgba(201, 169, 97, 0.18);
  }

  .site-nav.tdx-nav-ready .tdx-nav-tools-item {
    display: flex;
    align-items: stretch;
    gap: 10px;
  }

  .site-nav.tdx-nav-ready .tdx-search-btn {
    flex: 1 1 auto;
    justify-content: center;
    padding: 0.75rem 0.8rem !important;
  }

  .site-nav.tdx-nav-ready .tdx-theme-toggle {
    width: 46px;
    height: 46px;
  }

  .site-nav.tdx-nav-ready .tdx-search-btn .tdx-lbl,
  .site-nav.tdx-nav-ready .tdx-search-btn kbd {
    display: none;
  }

  .footer-cols,
  .site-footer__inner {
    gap: 22px !important;
  }
}

@media print {
  .site-nav,
  .site-footer,
  .tdx-modal,
  .tdx-search-btn,
  .tdx-theme-toggle,
  .tdx-print-btn,
  .tdx-actions a,
  .tdx-actions button:not([onclick*="tdxDownloadPDF"]):not([onclick*="tdxSaveScenario"]),
  .compare-bar,
  .sync-box,
  .sync-state,
  #tdx-toast {
    display: none !important;
  }

  body {
    background: #fff !important;
    color: #111 !important;
  }

  .page-hero,
  .hero,
  .disc-band,
  .panel,
  .calc-card,
  .summary-card,
  .result-panel,
  .intro-card,
  .feature-strip,
  .goal-card,
  .path-card {
    background: #fff !important;
    color: #111 !important;
    box-shadow: none !important;
    border-color: #ccc !important;
  }

  .page-hero,
  .hero {
    padding: 0 0 18pt !important;
  }

  main,
  .wrap,
  .calc-layout,
  .results-panel,
  .inputs-panel {
    max-width: none !important;
    padding: 0 !important;
    margin: 0 !important;
  }

  .inputs-panel {
    display: none !important;
  }

  .tdx-actions {
    margin-top: 18pt !important;
    padding-top: 10pt !important;
    border-top: 1px solid #ccc !important;
  }
}

/* Premium-free site layer */
.tdx-nation-note,
.tdx-trust-card,
.tdx-next-steps,
.tdx-ad-slot {
  max-width: 960px;
  margin: 2rem auto;
  border-radius: 18px;
}

.tdx-nation-note {
  padding: 1.4rem 1.5rem 1.45rem;
  background: linear-gradient(135deg, #f8f1e4 0%, #fff 100%);
  border: 1px solid rgba(201, 169, 97, 0.42);
  box-shadow: 0 18px 40px rgba(26, 58, 46, 0.07);
}

.tdx-nation-note__eyebrow,
.tdx-trust-card__eyebrow,
.tdx-next-steps__eyebrow,
.tdx-ad-slot__eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  margin-bottom: 0.65rem;
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #a8862f;
}

.tdx-nation-note h2,
.tdx-trust-card h2,
.tdx-next-steps h2,
.tdx-ad-slot h2 {
  margin: 0 0 0.7rem;
  font-size: clamp(1.35rem, 2vw, 1.7rem);
  color: #0f2a20;
}

.tdx-nation-note p,
.tdx-trust-card p,
.tdx-next-steps p,
.tdx-ad-slot p {
  margin: 0;
  color: #4a4235;
  line-height: 1.7;
}

.tdx-link-pills,
.tdx-meta-pills,
.tdx-mini-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
}

.tdx-link-pills,
.tdx-meta-pills {
  margin-top: 1rem;
}

.tdx-link-pills a,
.tdx-meta-pills span,
.tdx-mini-links a {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  min-height: 40px;
  padding: 0.65rem 0.95rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.85);
  border: 1px solid rgba(201, 169, 97, 0.32);
  text-decoration: none;
  color: #0f2a20;
  font-size: 0.9rem;
  font-weight: 700;
  transition: transform 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
}

.tdx-link-pills a:hover,
.tdx-mini-links a:hover {
  transform: translateY(-1px);
  border-color: #c9a961;
  box-shadow: 0 10px 24px rgba(26, 58, 46, 0.09);
}

.tdx-breadcrumbs {
  max-width: 960px;
  margin: 0 auto 1rem;
  padding: 0.15rem 0;
}

.tdx-breadcrumbs ol {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.tdx-breadcrumbs li {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  color: #6b6353;
  font-size: 0.88rem;
}

.tdx-breadcrumbs li + li::before {
  content: '/';
  color: rgba(168, 134, 47, 0.7);
  font-weight: 700;
}

.tdx-breadcrumbs a {
  color: #0f2a20;
  text-decoration: none;
  font-weight: 700;
}

.tdx-breadcrumbs a:hover {
  color: #a8862f;
}

.tdx-home-authority {
  max-width: 960px;
  margin: 0 auto 1.8rem;
  padding: 1.6rem;
  border-radius: 18px;
  background: linear-gradient(135deg, #fff 0%, #f8f1e4 100%);
  border: 1px solid rgba(201, 169, 97, 0.32);
  box-shadow: 0 18px 40px rgba(26, 58, 46, 0.07);
}

/* Kids progress and return-to-learning layer */
.tdx-kids-progress,
.tdx-kids-hub-summary {
  max-width: 960px;
  margin: 1.2rem auto 2rem;
  padding: 1.35rem 1.4rem;
  border-radius: 20px;
  border: 1px solid rgba(201, 169, 97, 0.38);
  background: linear-gradient(135deg, #fff 0%, #f8f1e4 100%);
  box-shadow: 0 18px 40px rgba(26, 58, 46, 0.09);
}

.tdx-kids-progress__eyebrow {
  display: inline-block;
  margin-bottom: 0.45rem;
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #a8862f;
}

.tdx-kids-progress h2,
.tdx-kids-hub-summary h2 {
  margin: 0 0 0.4rem;
  font-size: clamp(1.3rem, 2vw, 1.7rem);
  color: #0f2a20;
}

.tdx-kids-progress p,
.tdx-kids-hub-summary p {
  margin: 0;
  color: #4a4235;
  line-height: 1.7;
}

.tdx-kids-progress__meta,
.tdx-kids-hub-summary__meta {
  margin-top: 1rem;
  display: grid;
  gap: 0.85rem;
}

.tdx-kids-progress__meter,
.tdx-kids-hub-progress__meter,
.tdx-kids-card-progress__meter {
  overflow: hidden;
  width: 100%;
  height: 12px;
  border-radius: 999px;
  background: rgba(15, 42, 32, 0.1);
}

.tdx-kids-progress__meter span,
.tdx-kids-hub-progress__meter span,
.tdx-kids-card-progress__meter span {
  display: block;
  height: 100%;
  width: 0;
  border-radius: inherit;
  background: linear-gradient(90deg, #1b3a2d 0%, #c9973a 100%);
  transition: width 0.25s ease;
}

.tdx-kids-progress__totals,
.tdx-kids-hub-summary__totals,
.tdx-kids-card-progress__row {
  display: flex;
  justify-content: space-between;
  gap: 0.75rem;
  margin-top: 0.65rem;
  color: #4a4235;
  font-size: 0.92rem;
}

.tdx-kids-progress__totals strong,
.tdx-kids-card-progress__row strong {
  color: #0f2a20;
}

.tdx-kids-progress__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 0.95rem;
}

.tdx-kids-next {
  margin-top: 0.75rem !important;
  font-weight: 700;
  color: #0f2a20 !important;
}

.tdx-kids-chip,
.tdx-kids-reset {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 0.72rem 1rem;
  border-radius: 999px;
  border: 1px solid rgba(201, 169, 97, 0.42);
  background: #fff;
  color: #0f2a20;
  font: inherit;
  font-size: 0.88rem;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
  transition: transform 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
}

.tdx-kids-chip:hover,
.tdx-kids-reset:hover {
  transform: translateY(-1px);
  border-color: #c9973a;
  box-shadow: 0 10px 24px rgba(26, 58, 46, 0.08);
}

.tdx-kids-hub-summary {
  display: grid;
  gap: 1rem;
}

.tdx-kids-profile {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 0.75rem;
  margin-top: 0.2rem;
}

.tdx-kids-profile--hub {
  margin-top: 0;
}

.tdx-kids-profile__item {
  padding: 0.85rem 0.95rem;
  border-radius: 16px;
  border: 1px solid rgba(201, 169, 97, 0.28);
  background: rgba(255, 255, 255, 0.88);
  box-shadow: 0 10px 24px rgba(26, 58, 46, 0.07);
}

.tdx-kids-profile__item span {
  display: block;
  margin-bottom: 0.35rem;
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #8a6b1f;
}

.tdx-kids-profile__item strong {
  color: #0f2a20;
  font-size: 1rem;
  line-height: 1.35;
}

.tdx-kids-resource-strip,
.tdx-kids-guide-grid,
.tdx-kids-pathway-grid,
.tdx-kids-home-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1rem;
}

.tdx-kids-resource-strip {
  margin: 0 0 2.5rem;
}

.tdx-kids-resource-link,
.tdx-kids-guide-band,
.tdx-kids-pathway-card,
.tdx-kids-home-card,
.tdx-kids-tools,
.tdx-kids-replay {
  border-radius: 20px;
  border: 1px solid rgba(201, 169, 97, 0.28);
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.96) 0%, rgba(248, 241, 228, 0.92) 100%);
  box-shadow: 0 18px 36px rgba(26, 58, 46, 0.08);
}

.tdx-kids-resource-link {
  display: block;
  padding: 1rem 1.1rem;
  color: #0f2a20;
  font-weight: 700;
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}

.tdx-kids-resource-link strong {
  display: block;
  margin-bottom: 0.3rem;
  font-size: 1rem;
}

.tdx-kids-resource-link span {
  display: block;
  color: #5b513f;
  font-size: 0.86rem;
  line-height: 1.55;
}

.tdx-kids-resource-link:hover,
.tdx-kids-pathway-card:hover {
  transform: translateY(-2px);
  border-color: rgba(201, 169, 97, 0.5);
  box-shadow: 0 24px 44px rgba(26, 58, 46, 0.11);
}

.tdx-kids-practice-toolbar .tdx-kids-resource-link,
.tdx-kids-progress__actions .tdx-kids-resource-link {
  display: inline-flex;
  padding: 0.72rem 1rem;
  border-radius: 999px;
  background: #fff;
  box-shadow: none;
}

.tdx-kids-pathways,
.tdx-kids-guide-section {
  margin-top: 2.5rem;
}

.tdx-kids-guide-band,
.tdx-kids-pathway-card,
.tdx-kids-home-card,
.tdx-kids-tools,
.tdx-kids-replay {
  padding: 1.15rem 1.2rem;
}

.tdx-kids-guide-band h3,
.tdx-kids-pathway-card h3,
.tdx-kids-home-card h3,
.tdx-kids-tools h2,
.tdx-kids-replay h2 {
  margin: 0 0 0.45rem;
  color: #0f2a20;
}

.tdx-kids-guide-band p,
.tdx-kids-pathway-card p,
.tdx-kids-home-card p,
.tdx-kids-tools p,
.tdx-kids-replay p {
  color: #4a4235;
  line-height: 1.65;
}

.tdx-kids-guide-band__meta {
  display: inline-flex;
  padding: 0.35rem 0.65rem;
  border-radius: 999px;
  background: rgba(201, 169, 97, 0.12);
  color: #8a6b1f;
  font-size: 0.78rem;
  font-weight: 700;
  margin-bottom: 0.8rem;
}

.tdx-kids-guide-note {
  margin-top: 0.8rem;
  padding: 0.8rem 0.9rem;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.82);
  border: 1px solid rgba(201, 169, 97, 0.18);
}

.tdx-kids-pathway-card__steps {
  list-style: none;
  display: grid;
  gap: 0.45rem;
  margin: 0.95rem 0 1rem;
  padding: 0;
}

.tdx-kids-pathway-card__steps li {
  display: flex;
  justify-content: space-between;
  gap: 0.75rem;
  font-size: 0.88rem;
  color: #4a4235;
  padding-bottom: 0.45rem;
  border-bottom: 1px solid rgba(221, 216, 206, 0.75);
}

.tdx-kids-pathway-card__steps li:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.tdx-kids-pathway-card__steps strong {
  color: #0f2a20;
}

.tdx-kids-pathway-card__cta {
  margin-top: auto;
  color: #8a6b1f;
  font-weight: 700;
}

.tdx-kids-tools,
.tdx-kids-replay {
  max-width: 960px;
  margin: 1.2rem auto 2rem;
}

.tdx-kids-tools__actions,
.tdx-kids-practice-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 0.95rem;
}

.tdx-kids-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0.72rem 1rem;
  border-radius: 999px;
  border: 1px solid rgba(201, 169, 97, 0.42);
  background: #fff;
  color: #0f2a20;
  font: inherit;
  font-size: 0.88rem;
  font-weight: 700;
  cursor: pointer;
  transition: transform 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
}

.tdx-kids-toggle:hover {
  transform: translateY(-1px);
  border-color: #c9973a;
  box-shadow: 0 10px 24px rgba(26, 58, 46, 0.08);
}

.tdx-kids-toggle.is-active {
  background: rgba(201, 169, 97, 0.12);
  border-color: rgba(201, 169, 97, 0.7);
}

.tdx-kids-toggle.is-disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.tdx-kids-practice-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 0.85rem;
  margin-top: 1rem;
}

.tdx-kids-practice-card {
  padding: 1rem;
  border-radius: 16px;
  border: 1px solid rgba(201, 169, 97, 0.18);
  background: rgba(255, 255, 255, 0.84);
}

.tdx-kids-practice-card.is-complete {
  border-color: rgba(26, 107, 53, 0.35);
  background: rgba(240, 250, 244, 0.96);
}

.tdx-kids-practice-card__topic {
  display: inline-flex;
  margin-bottom: 0.5rem;
  padding: 0.25rem 0.55rem;
  border-radius: 999px;
  background: rgba(201, 169, 97, 0.12);
  color: #8a6b1f;
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.tdx-kids-practice-card h3 {
  margin: 0 0 0.85rem;
  font-size: 1rem;
  line-height: 1.45;
}

.tdx-kids-scenario-card__prompt {
  margin: 0 0 0.85rem;
  color: #4a4235;
  line-height: 1.6;
  font-size: 0.92rem;
}

.tdx-kids-practice-card__choices {
  display: grid;
  gap: 0.55rem;
}

.tdx-kids-practice-card__read {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  margin: 0 0 0.8rem;
  padding: 0.55rem 0.85rem;
  border-radius: 999px;
  border: 1px solid rgba(201, 169, 97, 0.32);
  background: rgba(255, 255, 255, 0.9);
  color: #0f2a20;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}

.tdx-kids-practice-card__read:hover,
.tdx-kids-practice-card__read:focus-visible {
  border-color: rgba(27, 58, 45, 0.48);
  background: rgba(245, 233, 207, 0.56);
}

.tdx-kids-practice-card__choices button,
.tdx-kids-practice-card__inputrow button {
  min-height: 44px;
  padding: 0.7rem 0.9rem;
  border-radius: 12px;
  border: 1px solid rgba(201, 169, 97, 0.32);
  background: #fff;
  color: #0f2a20;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}

.tdx-kids-practice-card__inputrow {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 0.6rem;
}

.tdx-kids-practice-card__inputrow input {
  min-height: 44px;
  padding: 0.7rem 0.85rem;
  border-radius: 12px;
  border: 1px solid rgba(201, 169, 97, 0.32);
  font: inherit;
}

.tdx-kids-practice-card__result {
  margin-top: 0.8rem;
  min-height: 2.6rem;
  font-size: 0.86rem;
}

.tdx-kids-practice-card__result.is-correct {
  color: #1a6b35;
  font-weight: 700;
}

.tdx-kids-practice-card__result.is-wrong {
  color: #b03030;
  font-weight: 700;
}

.tdx-kids-practice-summary {
  margin-top: 0.9rem;
  color: #5b513f;
  font-size: 0.88rem;
  font-weight: 700;
}

.tdx-kids-achievements {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 0.75rem;
  margin-top: 0.85rem;
}

.tdx-kids-achievements--hub {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
  margin-top: 0;
}

.tdx-kids-achievement {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 0.45rem 0.8rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.88);
  border: 1px solid rgba(201, 169, 97, 0.34);
  color: #0f2a20;
  font-size: 0.82rem;
  font-weight: 700;
}

.tdx-kids-achievement.is-muted {
  color: #6b6353;
}

.tdx-kids-achievement-card {
  display: grid;
  gap: 0.35rem;
  padding: 0.95rem 1rem;
  border-radius: 16px;
  border: 1px solid rgba(201, 169, 97, 0.24);
  background: rgba(255, 255, 255, 0.86);
  box-shadow: 0 14px 26px rgba(26, 58, 46, 0.06);
}

.tdx-kids-achievement-card strong {
  color: #0f2a20;
  font-size: 0.98rem;
}

.tdx-kids-achievement-card span {
  color: #4a4235;
  font-size: 0.84rem;
  line-height: 1.55;
}

.tdx-kids-achievement-card.is-unlocked {
  border-color: rgba(201, 169, 97, 0.42);
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.96) 0%, rgba(248, 241, 228, 0.94) 100%);
}

.tdx-kids-achievement-card.is-locked {
  opacity: 0.84;
}

.tdx-kids-achievement-card__status {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #8a6b1f;
}

.tdx-kids-card-progress {
  width: 100%;
  margin: 0.2rem 0 0.5rem;
  padding: 0.8rem 0.9rem;
  border-radius: 14px;
  background: rgba(245, 233, 207, 0.7);
  border: 1px solid rgba(201, 169, 97, 0.24);
}

.tdx-kids-card-progress__row {
  margin-top: 0;
  margin-bottom: 0.45rem;
  font-size: 0.84rem;
}

.tdx-kids-card-progress__badges {
  display: inline-flex;
  margin-top: 0.65rem;
  padding: 0.35rem 0.65rem;
  border-radius: 999px;
  border: 1px solid rgba(201, 169, 97, 0.24);
  background: rgba(255, 255, 255, 0.76);
  color: #5b513f;
  font-size: 0.78rem;
  font-weight: 700;
}

.age-card.is-started {
  border-color: rgba(201, 169, 97, 0.42);
}

.age-card.is-complete {
  box-shadow: 0 20px 46px rgba(26, 58, 46, 0.14);
}

.age-card.is-complete::after {
  transform: scaleX(1);
}

.tdx-kids-inline-check {
  margin-top: 1rem;
  padding: 1rem;
  border-radius: 16px;
  background: rgba(245, 233, 207, 0.62);
  border: 1px solid rgba(201, 169, 97, 0.28);
}

.tdx-kids-inline-check p {
  margin: 0 0 0.75rem;
  color: #0f2a20;
  font-weight: 700;
}

.tdx-kids-choice-grid {
  display: grid;
  gap: 0.7rem;
}

.tdx-kids-support {
  max-width: 960px;
  margin: 0 auto 2rem;
  padding: 1.3rem 1.35rem;
  border-radius: 20px;
  border: 1px solid rgba(201, 169, 97, 0.28);
  background: rgba(255, 255, 255, 0.84);
  box-shadow: 0 14px 32px rgba(26, 58, 46, 0.06);
}

.tdx-kids-support h2 {
  margin: 0 0 0.85rem;
  font-size: clamp(1.2rem, 1.9vw, 1.55rem);
  color: #0f2a20;
}

.tdx-kids-support__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 0.9rem;
}

.tdx-kids-support-card {
  padding: 1rem;
  border-radius: 16px;
  background: rgba(245, 233, 207, 0.52);
  border: 1px solid rgba(201, 169, 97, 0.2);
}

.tdx-kids-support-card h3 {
  margin: 0 0 0.45rem;
  color: #0f2a20;
  font-size: 1rem;
}

.tdx-kids-support-card p {
  margin: 0;
  color: #4a4235;
  line-height: 1.7;
}

.tdx-kids-support--hub {
  margin-top: 1.4rem;
}

.tdx-kids-printables-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin: 1.2rem auto 2rem;
  max-width: 1080px;
}

.tdx-kids-printables-note {
  max-width: 780px;
  margin: 0 auto 1.6rem;
  color: #4a4235;
  line-height: 1.8;
}

.tdx-kids-print-band {
  max-width: 1080px;
  margin: 0 auto 2rem;
  padding: 1.4rem;
  border-radius: 22px;
  border: 1px solid rgba(201, 169, 97, 0.3);
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.96) 0%, rgba(248, 241, 228, 0.98) 100%);
  box-shadow: 0 18px 44px rgba(26, 58, 46, 0.08);
}

.tdx-kids-print-band__header {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 1rem;
  align-items: flex-start;
  margin-bottom: 1rem;
}

.tdx-kids-print-band__header h2 {
  margin: 0 0 0.35rem;
  color: #0f2a20;
  font-size: clamp(1.35rem, 2vw, 1.7rem);
}

.tdx-kids-print-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.tdx-kids-print-status {
  margin: 0;
  color: #4a4235;
  font-weight: 700;
}

.tdx-kids-skill-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  margin-bottom: 1rem;
}

.tdx-kids-skill {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 0.45rem 0.78rem;
  border-radius: 999px;
  background: rgba(245, 233, 207, 0.9);
  border: 1px solid rgba(201, 169, 97, 0.26);
  color: #0f2a20;
  font-size: 0.82rem;
  font-weight: 700;
}

.tdx-kids-print-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 1rem;
}

.tdx-kids-printable {
  padding: 1.35rem;
  border-radius: 20px;
  background: #fff;
  border: 1px solid rgba(201, 169, 97, 0.24);
  box-shadow: 0 14px 30px rgba(26, 58, 46, 0.06);
}

.tdx-kids-printable.is-highlighted {
  border-color: rgba(201, 151, 58, 0.62);
  box-shadow: 0 16px 36px rgba(26, 58, 46, 0.12);
}

.tdx-kids-printable--certificate {
  background: linear-gradient(160deg, #fffaf0 0%, #f8f1e4 100%);
}

.tdx-kids-printable__eyebrow {
  display: inline-block;
  margin-bottom: 0.45rem;
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #a8862f;
}

.tdx-kids-printable h3 {
  margin: 0 0 0.55rem;
  color: #0f2a20;
  font-size: 1.35rem;
}

.tdx-kids-printable__lead,
.tdx-kids-cert-copy,
.tdx-kids-cert-progress,
.tdx-kids-reflection p {
  margin: 0 0 0.95rem;
  color: #4a4235;
  line-height: 1.7;
}

.tdx-kids-task-list {
  margin: 0;
  padding-left: 1.2rem;
}

.tdx-kids-task {
  margin-bottom: 0.95rem;
}

.tdx-kids-task strong,
.tdx-kids-reflection h4 {
  display: block;
  margin-bottom: 0.3rem;
  color: #0f2a20;
}

.tdx-kids-task p {
  margin: 0 0 0.55rem;
  color: #4a4235;
}

.tdx-kids-lines {
  display: grid;
  gap: 0.5rem;
}

.tdx-kids-line {
  display: block;
  width: 100%;
  border-bottom: 1px solid rgba(15, 42, 32, 0.24);
  min-height: 1rem;
}

.tdx-kids-reflection {
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid rgba(201, 169, 97, 0.24);
}

.tdx-kids-field-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 0.8rem;
  margin-top: 1rem;
}

.tdx-kids-field {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  color: #0f2a20;
  font-size: 0.84rem;
  font-weight: 700;
}

.tdx-kids-field input {
  border: none;
  border-bottom: 2px solid rgba(15, 42, 32, 0.24);
  background: transparent;
  padding: 0.35rem 0;
  color: #0f2a20;
  font: inherit;
}

.tdx-kids-field input:focus {
  outline: none;
  border-bottom-color: #c9973a;
}

.tdx-kids-field--hero {
  margin: 1rem 0;
}

.tdx-kids-field--hero input {
  font-size: 1.4rem;
  font-family: "Playfair Display", serif;
}

.tdx-kids-cert-badge {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  margin-bottom: 0.7rem;
  padding: 0.45rem 0.8rem;
  border-radius: 999px;
  background: rgba(27, 58, 45, 0.08);
  border: 1px solid rgba(201, 169, 97, 0.28);
  color: #0f2a20;
  font-size: 0.82rem;
  font-weight: 700;
}

.tdx-kids-cert-award {
  margin: 0;
  color: #6b6353;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 0.76rem;
  font-weight: 700;
}

#tdxKidsPrintStage {
  display: none;
}

.game [role="button"] {
  cursor: pointer;
}

.q-opt:focus-visible,
.mini-btn:focus-visible,
.btn:focus-visible,
.coin-opt:focus-visible,
.opt-btn:focus-visible,
.scam-btn:focus-visible,
.snap-btn:focus-visible,
.coin-btn:focus-visible,
.note-pick-btn:focus-visible,
.cost-item:focus-visible,
.debt-item:focus-visible,
.deal-card:focus-visible,
.shop-item:focus-visible,
.wb-day:focus-visible,
.hl-card:focus-visible,
.odd-card:focus-visible,
.tdx-kids-reset:focus-visible,
.tdx-kids-chip:focus-visible,
.tdx-theme-toggle:focus-visible,
.tdx-search-btn:focus-visible {
  outline: 3px solid rgba(201, 151, 58, 0.95);
  outline-offset: 3px;
}

.q-opt,
.mini-btn,
.btn,
.coin-opt,
.opt-btn,
.scam-btn,
.snap-btn,
.coin-btn,
.note-pick-btn,
.cost-item,
.debt-item,
.deal-card,
.shop-item,
.wb-day,
.hl-card,
.odd-card,
.tdx-kids-reset,
.tdx-kids-chip {
  touch-action: manipulation;
}

html[data-theme="dark"] .tdx-kids-progress,
html[data-theme="dark"] .tdx-kids-hub-summary {
  background: linear-gradient(135deg, #1d2a23 0%, #243430 100%) !important;
  border-color: rgba(212, 185, 120, 0.3) !important;
}

html[data-theme="dark"] .tdx-kids-progress h2,
html[data-theme="dark"] .tdx-kids-hub-summary h2,
html[data-theme="dark"] .tdx-kids-inline-check p,
html[data-theme="dark"] .tdx-kids-print-band__header h2,
html[data-theme="dark"] .tdx-kids-printable h3,
html[data-theme="dark"] .tdx-kids-task strong,
html[data-theme="dark"] .tdx-kids-reflection h4,
html[data-theme="dark"] .tdx-kids-field,
html[data-theme="dark"] .tdx-kids-cert-badge,
html[data-theme="dark"] .tdx-kids-skill {
  color: #f2ead6 !important;
}

html[data-theme="dark"] .tdx-kids-progress p,
html[data-theme="dark"] .tdx-kids-hub-summary p,
html[data-theme="dark"] .tdx-kids-progress__totals,
html[data-theme="dark"] .tdx-kids-profile__item strong,
html[data-theme="dark"] .tdx-kids-card-progress__row,
html[data-theme="dark"] .tdx-kids-print-status,
html[data-theme="dark"] .tdx-kids-printable__lead,
html[data-theme="dark"] .tdx-kids-task p,
html[data-theme="dark"] .tdx-kids-cert-copy,
html[data-theme="dark"] .tdx-kids-cert-progress,
html[data-theme="dark"] .tdx-kids-printables-note,
html[data-theme="dark"] .tdx-kids-reflection p {
  color: rgba(232, 224, 201, 0.84) !important;
}

html[data-theme="dark"] .tdx-kids-next,
html[data-theme="dark"] .tdx-kids-support h2,
html[data-theme="dark"] .tdx-kids-support-card h3,
html[data-theme="dark"] .tdx-kids-resource-link strong,
html[data-theme="dark"] .tdx-kids-guide-band h3,
html[data-theme="dark"] .tdx-kids-pathway-card h3,
html[data-theme="dark"] .tdx-kids-home-card h3,
html[data-theme="dark"] .tdx-kids-tools h2,
html[data-theme="dark"] .tdx-kids-replay h2,
html[data-theme="dark"] .tdx-kids-achievement,
html[data-theme="dark"] .tdx-kids-achievement-card strong,
html[data-theme="dark"] .tdx-kids-achievement-card__status {
  color: #f2ead6 !important;
}

html[data-theme="dark"] .tdx-kids-chip,
html[data-theme="dark"] .tdx-kids-reset,
html[data-theme="dark"] .tdx-kids-resource-link,
html[data-theme="dark"] .tdx-kids-guide-band,
html[data-theme="dark"] .tdx-kids-pathway-card,
html[data-theme="dark"] .tdx-kids-home-card,
html[data-theme="dark"] .tdx-kids-tools,
html[data-theme="dark"] .tdx-kids-replay,
html[data-theme="dark"] .tdx-kids-toggle,
html[data-theme="dark"] .tdx-kids-profile__item,
html[data-theme="dark"] .tdx-kids-card-progress,
html[data-theme="dark"] .tdx-kids-inline-check,
html[data-theme="dark"] .tdx-kids-support,
html[data-theme="dark"] .tdx-kids-support-card,
html[data-theme="dark"] .tdx-kids-achievement,
html[data-theme="dark"] .tdx-kids-achievement-card,
html[data-theme="dark"] .tdx-kids-print-band,
html[data-theme="dark"] .tdx-kids-printable,
html[data-theme="dark"] .tdx-kids-skill,
html[data-theme="dark"] .tdx-kids-cert-badge {
  background: rgba(15, 24, 21, 0.82) !important;
  color: #f2ead6 !important;
  border-color: rgba(212, 185, 120, 0.28) !important;
}

html[data-theme="dark"] .tdx-kids-field input,
html[data-theme="dark"] .tdx-kids-line {
  border-color: rgba(212, 185, 120, 0.34) !important;
}

html[data-theme="dark"] .tdx-kids-profile__item span,
html[data-theme="dark"] .tdx-kids-resource-link span,
html[data-theme="dark"] .tdx-kids-guide-band p,
html[data-theme="dark"] .tdx-kids-pathway-card p,
html[data-theme="dark"] .tdx-kids-home-card p,
html[data-theme="dark"] .tdx-kids-tools p,
html[data-theme="dark"] .tdx-kids-replay p,
html[data-theme="dark"] .tdx-kids-scenario-card__prompt,
html[data-theme="dark"] .tdx-kids-guide-note,
html[data-theme="dark"] .tdx-kids-pathway-card__steps li,
html[data-theme="dark"] .tdx-kids-achievement-card span,
html[data-theme="dark"] .tdx-kids-card-progress__badges {
  color: rgba(232, 224, 201, 0.84) !important;
}

html[data-theme="dark"] .tdx-kids-pathway-card__steps strong,
html[data-theme="dark"] .tdx-kids-practice-card h3,
html[data-theme="dark"] .tdx-kids-practice-card__choices button,
html[data-theme="dark"] .tdx-kids-practice-card__inputrow button,
html[data-theme="dark"] .tdx-kids-practice-card__inputrow input {
  color: #f2ead6 !important;
}

html[data-theme="dark"] .tdx-kids-card-progress__badges {
  background: rgba(15, 24, 21, 0.72) !important;
  border-color: rgba(212, 185, 120, 0.24) !important;
}

html[data-theme="dark"] .tdx-kids-guide-note,
html[data-theme="dark"] .tdx-kids-practice-card {
  background: rgba(15, 24, 21, 0.72) !important;
  border-color: rgba(212, 185, 120, 0.22) !important;
}

html[data-theme="dark"] .tdx-kids-practice-card__read {
  background: rgba(15, 24, 21, 0.84) !important;
  border-color: rgba(212, 185, 120, 0.24) !important;
  color: #f2ead6 !important;
}

html[data-theme="dark"] .tdx-kids-chip:hover,
html[data-theme="dark"] .tdx-kids-reset:hover,
html[data-theme="dark"] .tdx-kids-toggle:hover {
  border-color: #d4b978 !important;
}

@media (max-width: 720px) {
  .tdx-kids-progress,
  .tdx-kids-hub-summary {
    padding: 1.15rem;
    border-radius: 18px;
  }

  .tdx-kids-progress__actions {
    flex-direction: column;
  }

  .tdx-kids-profile,
  .tdx-kids-achievements {
    grid-template-columns: 1fr;
  }

  .tdx-kids-resource-strip,
  .tdx-kids-guide-grid,
  .tdx-kids-pathway-grid,
  .tdx-kids-home-grid,
  .tdx-kids-practice-grid {
    grid-template-columns: 1fr;
  }

  .tdx-kids-tools__actions,
  .tdx-kids-practice-toolbar {
    flex-direction: column;
  }

  .tdx-kids-chip,
  .tdx-kids-reset,
  .tdx-kids-toggle {
    width: 100%;
  }

  .tdx-kids-print-band,
  .tdx-kids-printable {
    padding: 1.15rem;
    border-radius: 18px;
  }

  .tdx-kids-print-toolbar {
    width: 100%;
    flex-direction: column;
  }

  .tdx-kids-print-toolbar .tdx-kids-chip {
    width: 100%;
  }
}

body.tdx-kids-large-targets .coin-opt,
body.tdx-kids-large-targets .coin-btn,
body.tdx-kids-large-targets .mini-btn,
body.tdx-kids-large-targets .opt-btn,
body.tdx-kids-large-targets .deal-card,
body.tdx-kids-large-targets .shop-item,
body.tdx-kids-large-targets .hl-card,
body.tdx-kids-large-targets .odd-card,
body.tdx-kids-large-targets .note-pick-btn,
body.tdx-kids-large-targets .wb-day,
body.tdx-kids-large-targets .snap-btn,
body.tdx-kids-large-targets .tdx-kids-practice-card__choices button,
body.tdx-kids-large-targets .tdx-kids-practice-card__inputrow button,
body.tdx-kids-large-targets .tdx-kids-practice-card__inputrow input {
  min-height: 54px !important;
  font-size: 1rem !important;
}

body.tdx-kids-large-targets .deal-card,
body.tdx-kids-large-targets .shop-item,
body.tdx-kids-large-targets .hl-card,
body.tdx-kids-large-targets .odd-card,
body.tdx-kids-large-targets .wb-day {
  padding: 1rem !important;
}

body.tdx-kids-reduced-motion *,
body.tdx-kids-reduced-motion *::before,
body.tdx-kids-reduced-motion *::after {
  animation-duration: 0.01ms !important;
  animation-iteration-count: 1 !important;
  transition-duration: 0.01ms !important;
  scroll-behavior: auto !important;
}

body.tdx-kids-reduced-motion .confetti {
  display: none !important;
}

.tdx-home-authority__eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  margin-bottom: 0.65rem;
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: #a8862f;
}

.tdx-home-authority h2 {
  margin: 0 0 0.7rem;
  font-size: clamp(1.35rem, 2vw, 1.7rem);
  color: #0f2a20;
}

.tdx-home-authority p {
  margin: 0;
  color: #4a4235;
  line-height: 1.7;
}

.tdx-home-authority__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  margin-top: 1rem;
}

.tdx-home-authority__meta span {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  min-height: 40px;
  padding: 0.65rem 0.95rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.85);
  border: 1px solid rgba(201, 169, 97, 0.32);
  color: #0f2a20;
  font-size: 0.9rem;
  font-weight: 700;
}

.tdx-home-authority__meta strong {
  color: #6b6353;
  font-size: 0.78rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.tdx-home-authority__grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
  margin-top: 1.15rem;
}

.tdx-home-authority__grid article {
  padding: 1rem 1rem 1.05rem;
  border-radius: 14px;
  background: linear-gradient(180deg, #fff 0%, #faf6ee 100%);
  border: 1px solid rgba(227, 218, 196, 0.95);
}

.tdx-home-authority__grid h3 {
  margin: 0 0 0.45rem;
  font-size: 1rem;
  color: #0f2a20;
}

.tdx-trust-card {
  padding: 1.55rem;
  background: #fff;
  border: 1px solid rgba(227, 218, 196, 0.95);
  box-shadow: 0 18px 40px rgba(26, 58, 46, 0.06);
}

.tdx-trust-card__lead {
  margin-bottom: 1rem;
}

.tdx-trust-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
  margin-top: 1.15rem;
}

.tdx-trust-grid article {
  padding: 1rem 1rem 1.05rem;
  border-radius: 14px;
  background: linear-gradient(180deg, #fff 0%, #faf6ee 100%);
  border: 1px solid rgba(227, 218, 196, 0.95);
}

.tdx-trust-grid h3 {
  margin: 0 0 0.45rem;
  font-size: 1rem;
  color: #0f2a20;
}

.tdx-trust-grid ul {
  margin: 0;
  padding-left: 1.1rem;
  color: #4a4235;
}

.tdx-trust-grid li + li {
  margin-top: 0.4rem;
}

.tdx-mini-links {
  margin-top: 1rem;
}

.tdx-next-steps {
  padding: 1.65rem;
  background: linear-gradient(135deg, #0f2a20 0%, #1a3a2e 100%);
  border: 1px solid rgba(201, 169, 97, 0.28);
  box-shadow: 0 18px 40px rgba(15, 42, 32, 0.18);
}

.tdx-next-steps__eyebrow,
.tdx-next-steps h2,
.tdx-next-steps p {
  color: #faf6ee;
}

.tdx-next-steps__eyebrow {
  color: rgba(201, 169, 97, 0.92);
}

.tdx-next-steps p {
  max-width: 720px;
  color: rgba(250, 246, 238, 0.82);
}

.tdx-next-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
  margin-top: 1.2rem;
}

.tdx-next-card {
  display: block;
  padding: 1.05rem 1rem 1.1rem;
  border-radius: 16px;
  text-decoration: none;
  background: rgba(250, 246, 238, 0.08);
  border: 1px solid rgba(201, 169, 97, 0.22);
  transition: transform 0.15s ease, border-color 0.15s ease, background 0.15s ease;
}

.tdx-next-card:hover {
  transform: translateY(-2px);
  border-color: rgba(201, 169, 97, 0.55);
  background: rgba(250, 246, 238, 0.13);
}

.tdx-next-card strong {
  display: block;
  margin-bottom: 0.4rem;
  color: #faf6ee;
  font-size: 1rem;
}

.tdx-next-card span {
  color: rgba(250, 246, 238, 0.75);
  font-size: 0.92rem;
  line-height: 1.55;
}

.tdx-ad-slot {
  padding: 1.1rem 1.2rem;
  border: 1px dashed rgba(201, 169, 97, 0.7);
  background: repeating-linear-gradient(-45deg, #f8f1e4, #f8f1e4 12px, #faf6ee 12px, #faf6ee 24px);
}

.tdx-ad-slot__body {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}

.tdx-ad-slot__copy {
  max-width: 700px;
}

.tdx-ad-slot__tag {
  display: inline-flex;
  align-items: center;
  min-height: 38px;
  padding: 0.55rem 0.85rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.85);
  border: 1px solid rgba(201, 169, 97, 0.35);
  color: #0f2a20;
  font-size: 0.82rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.goal-grid,
.card-grid,
.journey-grid,
.helper-band,
.feature-strip,
.tdx-home-authority,
.tdx-trust-card,
.tdx-next-steps,
.tdx-ad-slot {
  content-visibility: auto;
  contain-intrinsic-size: 1px 520px;
}

@media (max-width: 820px) {
  .tdx-home-authority__grid,
  .tdx-trust-grid,
  .tdx-next-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .tdx-nation-note,
  .tdx-home-authority,
  .tdx-trust-card,
  .tdx-next-steps,
  .tdx-ad-slot {
    margin: 1.4rem auto;
    padding: 1.15rem;
    border-radius: 16px;
  }

  .tdx-link-pills,
  .tdx-meta-pills,
  .tdx-mini-links {
    gap: 0.55rem;
  }

  .tdx-link-pills a,
  .tdx-meta-pills span,
  .tdx-mini-links a {
    width: 100%;
    justify-content: center;
  }
}

html[data-theme="dark"] .tdx-nation-note,
html[data-theme="dark"] .tdx-home-authority,
html[data-theme="dark"] .tdx-trust-card,
html[data-theme="dark"] .tdx-ad-slot {
  background: #1d2a23 !important;
  border-color: rgba(212, 185, 120, 0.25) !important;
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.32) !important;
}

html[data-theme="dark"] .tdx-breadcrumbs li,
html[data-theme="dark"] .tdx-home-authority p,
html[data-theme="dark"] .tdx-nation-note h2,
html[data-theme="dark"] .tdx-home-authority h2,
html[data-theme="dark"] .tdx-trust-card h2,
html[data-theme="dark"] .tdx-ad-slot h2,
html[data-theme="dark"] .tdx-home-authority__grid h3,
html[data-theme="dark"] .tdx-trust-grid h3 {
  color: #f2ead6 !important;
}

html[data-theme="dark"] .tdx-breadcrumbs a,
html[data-theme="dark"] .tdx-nation-note p,
html[data-theme="dark"] .tdx-trust-card p,
html[data-theme="dark"] .tdx-ad-slot p,
html[data-theme="dark"] .tdx-trust-grid li {
  color: rgba(232, 224, 201, 0.82) !important;
}

html[data-theme="dark"] .tdx-home-authority__meta span,
html[data-theme="dark"] .tdx-link-pills a,
html[data-theme="dark"] .tdx-meta-pills span,
html[data-theme="dark"] .tdx-mini-links a,
html[data-theme="dark"] .tdx-ad-slot__tag,
html[data-theme="dark"] .tdx-home-authority__grid article,
html[data-theme="dark"] .tdx-trust-grid article {
  background: rgba(15, 24, 21, 0.92) !important;
  border-color: rgba(212, 185, 120, 0.26) !important;
  color: #f2ead6 !important;
}

html[data-theme="dark"] .tdx-ad-slot {
  background: repeating-linear-gradient(-45deg, #15201b, #15201b 12px, #18251f 12px, #18251f 24px) !important;
}

@media print {
  .tdx-next-steps,
  .tdx-ad-slot {
    display: none !important;
  }

  .tdx-trust-card,
  .tdx-home-authority,
  .tdx-nation-note {
    border: 1px solid #ccc !important;
    box-shadow: none !important;
    background: #fff !important;
    color: #111 !important;
  }

  body.tdx-kids-printing > *:not(#tdxKidsPrintStage) {
    display: none !important;
  }

  body.tdx-kids-printing #tdxKidsPrintStage {
    display: block !important;
    padding: 0 !important;
  }

  body.tdx-kids-printing #tdxKidsPrintStage .tdx-kids-printable {
    display: block !important;
    max-width: none !important;
    margin: 0 !important;
    padding: 0 !important;
    border: none !important;
    border-radius: 0 !important;
    background: #fff !important;
    box-shadow: none !important;
    color: #111 !important;
  }

  body.tdx-kids-printing #tdxKidsPrintStage .tdx-kids-printable * {
    color: #111 !important;
    box-shadow: none !important;
    background: transparent !important;
  }

  body.tdx-kids-printing #tdxKidsPrintStage .tdx-kids-field input,
  body.tdx-kids-printing #tdxKidsPrintStage .tdx-kids-line {
    border-color: #666 !important;
  }
}
