/* TapAndPipe Design System — Genome A62 (Apricot-Split Trust Marketplace)
   Header: H12 Single-Row | Hero: HR18 Apricot-Split + Seam Search | Footer: F13 Warm Sand Colophon
   Font Triad: FT12 (Bespoke Serif + Erode + Fira Code)
   Prefix: tp- | Mobile-first from 320px (0 overflow) | Widescreen up to 1800px */

@layer reset, framework, tokens, bespoke;

@layer tokens {
  :root {
    --font-display: "Bespoke Serif", Georgia, "Times New Roman", serif;
    --font-body: "Erode", Georgia, "Times New Roman", serif;
    --font-mono: "Fira Code", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;

    --tp-bg: #ffffff;
    --tp-hero-apricot: #fff3e8;
    --tp-hero-border: #ead8c5;
    --tp-surface: #faf5ee;
    --tp-surface-sand: #faf5ee;
    --tp-surface-alt: #f2eae0;
    --tp-surface-sage: #ecfdf5;
    --tp-surface-forest: #faf5ee;
    --tp-surface-ink: #faf5ee;

    --tp-ink: #1c2430;
    --tp-ink-muted: #374151;
    --tp-ink-on-dark: #1c2430;
    --tp-border: #374151;
    --tp-border-soft: #dfd5c7;

    --tp-accent: #007a5e;
    --tp-accent-hover: #00624b;
    --tp-accent-signal: #c2591a;
    --tp-danger: #991b1b;
    --tp-danger-bg: #fef2f2;
    --tp-ok: #007a5e;
    --tp-ok-bg: #ecfdf5;
    --tp-warn: #c2591a;
    --tp-warn-bg: #fff3e8;

    --tp-font-display: var(--font-display);
    --tp-font-sans: var(--font-body);
    --tp-font-mono: var(--font-mono);

    /* Senior-Friendly Legibility Scale (Base 18px-19px, Minimum 15px in main) */
    --tp-text-xs: 0.9375rem;
    --tp-text-sm: 0.96875rem;
    --tp-text-base: clamp(1.125rem, 1.09rem + 0.12vw, 1.1875rem);
    --tp-text-lg: clamp(1.2rem, 1.15rem + 0.2vw, 1.35rem);
    --tp-text-xl: clamp(1.375rem, 1.25rem + 0.45vw, 1.65rem);
    --tp-text-2xl: clamp(1.65rem, 1.45rem + 0.8vw, 2.2rem);
    --tp-text-h1: clamp(2.1rem, 1.65rem + 1.5vw, 3.05rem);
    --tp-text-manifesto: clamp(2.15rem, 1.7rem + 1.55vw, 3.15rem);

    --tp-lh-body: 1.65;
    --tp-lh-heading: 1.16;
    --tp-measure: none;

    --tp-space-1: 0.25rem;
    --tp-space-2: 0.5rem;
    --tp-space-3: 0.75rem;
    --tp-space-4: 1rem;
    --tp-space-5: 1.5rem;
    --tp-space-6: 2rem;
    --tp-space-7: 3rem;
    --tp-space-8: 4rem;

    --tp-radius-xs: 4px;
    --tp-radius-sm: 8px;
    --tp-radius-md: 12px;
    --tp-scroll: 0;
  }
}

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

  html {
    font-size: 16px;
    scroll-behavior: smooth;
    background: var(--tp-bg);
    color: var(--tp-ink);
    overflow-x: clip;
  }

  body {
    margin: 0;
    font-family: var(--tp-font-sans);
    font-size: var(--tp-text-base);
    line-height: var(--tp-lh-body);
    color: var(--tp-ink);
    background: var(--tp-bg);
    overflow-x: clip;
    -webkit-font-smoothing: antialiased;
  }

  img, svg, video, picture {
    max-width: 100%;
    display: block;
  }

  img.tp-media-img,
  svg.tp-media-svg,
  svg.tp-chart-svg {
    width: 100%;
    height: auto;
  }

  svg.tp-ico {
    display: inline-block;
    vertical-align: -0.16em;
    flex-shrink: 0;
  }

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

  a:focus-visible,
  button:focus-visible,
  input:focus-visible,
  textarea:focus-visible,
  summary:focus-visible,
  [tabindex]:focus-visible {
    outline: 2px solid var(--tp-ink);
    outline-offset: 3px;
  }

  .tp-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;
  }

  .tp-skip-link {
    position: absolute;
    left: -9999px;
    top: 8px;
    z-index: 1000;
    background: var(--tp-ink);
    color: var(--tp-bg);
    padding: 10px 16px;
    font-size: var(--tp-text-sm);
    font-weight: 600;
  }
  .tp-skip-link:focus {
    left: 12px;
  }

  .tp-shell {
    width: min(95vw, 1760px);
    margin-inline: auto;
    padding-inline: clamp(14px, 1.8vw, 30px);
  }

  /* =====================================================================
     H12 Clean Single-Row White Header (Zero 1280px Clipping)
     ===================================================================== */
  .tp-header {
    position: sticky;
    top: 0;
    z-index: 90;
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(8px);
    border-bottom: 1px solid var(--tp-border-soft);
  }

  .tp-read-progress {
    position: absolute;
    left: 0;
    right: 0;
    bottom: -1px;
    height: 2px;
    background: var(--tp-accent-signal);
    transform-origin: left center;
    transform: scaleX(var(--tp-scroll));
    pointer-events: none;
  }

  .tp-header-row {
    position: relative;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 8px 10px;
    min-height: 64px;
    padding-block: 8px;
  }

  .tp-brand-cell {
    display: inline-flex;
    align-items: center;
    min-width: 0;
    min-height: 44px;
    text-decoration: none;
    flex-shrink: 0;
  }

  .tp-brand-logo {
    width: auto;
    height: 24px;
    flex-shrink: 0;
  }

  .tp-inline-nav {
    display: none;
    width: 100%;
    order: 4;
    border-top: 1px solid var(--tp-border-soft);
    padding-top: 8px;
  }
  .tp-inline-nav.is-open {
    display: block;
  }

  .tp-nav-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    grid-template-columns: 1fr;
    gap: 4px;
  }

  .tp-nav-link {
    display: inline-flex;
    align-items: center;
    min-height: 44px;
    padding: 8px 6px;
    font-size: 0.96875rem;
    font-weight: 600;
    text-decoration: none;
    color: var(--tp-ink);
    white-space: nowrap;
    border-bottom: 2px solid transparent;
    transition: color 140ms ease, border-color 140ms ease;
  }
  .tp-nav-link:hover {
    color: var(--tp-accent);
  }
  .tp-nav-link[aria-current="page"] {
    color: var(--tp-accent);
    font-weight: 700;
    border-bottom-color: var(--tp-accent);
  }

  .tp-header-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
    margin-left: auto;
  }

  .tp-search--compact {
    position: relative;
    display: none;
  }

  .tp-shutoff-cta {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    padding: 8px 12px;
    border: 1px solid var(--tp-accent);
    border-radius: var(--tp-radius-sm);
    background: var(--tp-accent);
    color: #ffffff;
    font-size: 0.9375rem;
    font-weight: 700;
    text-decoration: none;
    white-space: nowrap;
    flex-shrink: 0;
    transition: background-color 140ms ease, border-color 140ms ease;
  }
  .tp-shutoff-cta:hover {
    background: var(--tp-accent-hover);
    border-color: var(--tp-accent-hover);
    color: #ffffff;
  }

  .tp-nav-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 44px;
    min-height: 44px;
    padding: 8px 10px;
    border: 1px solid var(--tp-border);
    border-radius: var(--tp-radius-sm);
    background: var(--tp-bg);
    color: var(--tp-ink);
    font-size: 0.9375rem;
    font-weight: 600;
    cursor: pointer;
    gap: 5px;
    flex-shrink: 0;
  }
  .tp-nav-toggle:hover {
    background: var(--tp-surface);
  }

  @media (min-width: 720px) {
    .tp-search--compact {
      display: block;
      width: 190px;
    }
    .tp-brand-logo {
      height: 30px;
    }
  }

  @media (min-width: 1080px) {
    .tp-header-row {
      flex-wrap: nowrap;
      gap: 14px;
    }
    .tp-nav-toggle {
      display: none;
    }
    .tp-inline-nav {
      display: block;
      width: auto;
      order: 0;
      border-top: 0;
      padding-top: 0;
      flex: 1 1 auto;
      min-width: 0;
    }
    .tp-nav-list {
      display: flex;
      flex-wrap: nowrap;
      align-items: center;
      justify-content: center;
      gap: clamp(8px, 1.1vw, 22px);
    }
    .tp-header-actions {
      margin-left: 0;
      gap: 10px;
    }
    .tp-search--compact {
      width: clamp(146px, 13vw, 220px);
    }
  }

  @media (min-width: 1440px) {
    .tp-search--compact {
      width: 240px;
    }
  }

  /* =====================================================================
     Shared Search Boxes & Autocomplete Panel
     ===================================================================== */
  .tp-search-box {
    position: relative;
    display: flex;
    align-items: center;
    width: 100%;
    border: 1px solid var(--tp-border-soft);
    border-radius: var(--tp-radius-sm);
    background: var(--tp-surface);
    min-height: 44px;
    padding-inline: 10px 4px;
    gap: 6px;
  }
  .tp-search-box:focus-within {
    background: var(--tp-bg);
    border-color: var(--tp-accent);
    box-shadow: 0 0 0 2px rgba(0, 122, 94, 0.2);
  }
  .tp-search-ico {
    color: var(--tp-ink-muted);
    flex-shrink: 0;
  }
  .tp-search-input {
    border: 0;
    background: transparent;
    color: var(--tp-ink);
    font-family: var(--tp-font-sans);
    font-size: 0.95rem;
    width: 100%;
    min-width: 0;
    min-height: 40px;
    outline: none;
  }
  .tp-search-input::-webkit-search-cancel-button,
  .tp-search-input::-webkit-search-decoration,
  .tp-seam-search-input::-webkit-search-cancel-button,
  .tp-seam-search-input::-webkit-search-decoration {
    -webkit-appearance: none;
    appearance: none;
    display: none;
  }
  .tp-search-input::placeholder,
  .tp-seam-search-input::placeholder {
    color: var(--tp-ink-muted);
  }
  .tp-search-clear {
    display: none;
    align-items: center;
    justify-content: center;
    min-width: 34px;
    min-height: 34px;
    border: 0;
    background: transparent;
    color: var(--tp-ink-muted);
    cursor: pointer;
    border-radius: var(--tp-radius-xs);
  }
  .tp-search-clear.is-visible {
    display: inline-flex;
  }
  .tp-search-clear:hover {
    background: var(--tp-surface-alt);
    color: var(--tp-ink);
  }

  .tp-search-panel {
    display: none;
    position: absolute;
    left: 0;
    right: 0;
    top: calc(100% + 6px);
    z-index: 220;
    background: var(--tp-bg);
    border: 1.5px solid var(--tp-border);
    border-radius: var(--tp-radius-sm);
    box-shadow: 0 16px 38px rgba(28, 36, 48, 0.16);
    max-height: min(78vh, 640px);
    overflow-y: auto;
    padding: 12px;
    min-width: min(460px, 92vw);
  }
  .tp-search--compact .tp-search-panel {
    left: auto;
    right: 0;
    width: min(480px, 92vw);
  }
  .tp-search-panel.is-open {
    display: block;
  }
  .tp-search-group-lbl {
    font-size: 0.9375rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--tp-ink-muted);
    padding: 4px 6px 6px;
  }
  .tp-search-list {
    list-style: none;
    margin: 0 0 8px;
    padding: 0;
  }
  .tp-search-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    min-height: 46px;
    padding: 8px 10px;
    border-radius: var(--tp-radius-xs);
    text-decoration: none;
    color: var(--tp-ink);
    border-bottom: 1px solid var(--tp-border-soft);
  }
  .tp-search-item:hover,
  .tp-search-item.is-active {
    background: var(--tp-surface-sage);
    color: var(--tp-accent);
  }
  .tp-search-item-title {
    font-size: 1rem;
    font-weight: 600;
    line-height: 1.35;
  }
  .tp-search-item-type {
    font-family: var(--tp-font-mono);
    font-size: 0.9375rem;
    color: var(--tp-ink-muted);
    background: var(--tp-surface);
    border: 1px solid var(--tp-border-soft);
    padding: 2px 8px;
    border-radius: var(--tp-radius-xs);
    white-space: nowrap;
    flex-shrink: 0;
  }
  .tp-search-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    padding: 4px 4px 8px;
  }
  .tp-search-chip {
    display: inline-flex;
    align-items: center;
    min-height: 40px;
    padding: 6px 12px;
    border: 1px solid var(--tp-border-soft);
    border-radius: var(--tp-radius-sm);
    background: var(--tp-surface);
    color: var(--tp-ink);
    font-family: var(--tp-font-sans);
    font-size: 0.95rem;
    cursor: pointer;
    text-align: left;
  }
  .tp-search-chip:hover {
    background: var(--tp-accent);
    border-color: var(--tp-accent);
    color: #ffffff;
  }
  .tp-search-paa {
    display: block;
    padding: 8px 10px;
    border-radius: var(--tp-radius-xs);
    font-size: 0.95rem;
    color: var(--tp-ink);
    text-decoration: none;
    background: var(--tp-surface);
    margin-bottom: 4px;
  }
  .tp-search-paa:hover {
    background: var(--tp-hero-apricot);
  }

  /* =====================================================================
     Typography & Sentence-Case Eyebrows
     ===================================================================== */
  h1, h2, h3, h4 {
    margin: 0 0 var(--tp-space-3);
    font-weight: 700;
    line-height: var(--tp-lh-heading);
    letter-spacing: -0.015em;
    color: var(--tp-ink);
  }

  h1 {
    font-family: var(--tp-font-display);
    font-size: var(--tp-text-h1);
    font-weight: 700;
    max-width: none;
  }
  h2 {
    font-family: var(--tp-font-display);
    font-size: var(--tp-text-2xl);
    padding-top: var(--tp-space-3);
    max-width: none;
  }
  h3 {
    font-family: var(--tp-font-display);
    font-size: var(--tp-text-xl);
  }

  p {
    margin: 0 0 var(--tp-space-4);
    font-size: var(--tp-text-base);
    line-height: var(--tp-lh-body);
    max-width: none;
  }

  .tp-eyebrow {
    display: inline-block;
    font-family: var(--tp-font-sans);
    font-size: 1rem;
    font-weight: 600;
    color: var(--tp-accent);
    margin-bottom: var(--tp-space-3);
    letter-spacing: 0.01em;
  }

  .tp-section-lead {
    font-size: var(--tp-text-base);
    line-height: var(--tp-lh-body);
    color: var(--tp-ink-muted);
    max-width: none;
    margin-bottom: var(--tp-space-4);
  }

  /* =====================================================================
     A62 Apricot-Split Signature Hero + Seam-Straddling Search Bar
     ===================================================================== */
  .tp-hero-a62 {
    background: var(--tp-hero-apricot);
    border-bottom: 1px solid var(--tp-hero-border);
    padding-block: clamp(28px, 4vw, 52px) clamp(56px, 6.5vw, 84px);
  }

  .tp-hero-a62-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: clamp(24px, 3.2vw, 48px);
    align-items: center;
  }

  @media (min-width: 1024px) {
    .tp-hero-a62-grid {
      grid-template-columns: minmax(0, 1.06fr) minmax(0, 0.94fr);
    }
  }

  .tp-hero-a62-title {
    font-family: var(--tp-font-display);
    font-size: var(--tp-text-manifesto);
    line-height: 1.1;
    font-weight: 700;
    letter-spacing: -0.02em;
    margin-bottom: var(--tp-space-4);
    color: var(--tp-ink);
  }
  .tp-hero-a62-title .tp-serif-accent {
    color: var(--tp-accent);
    font-style: italic;
  }

  .tp-lead-answer--hero {
    background: rgba(255, 255, 255, 0.78);
    border: 1px solid var(--tp-hero-border);
    border-radius: var(--tp-radius-md);
    padding: 16px 20px;
    margin-block: 0 20px;
  }

  .tp-hero-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 12px 16px;
    margin-bottom: var(--tp-space-5);
  }

  .tp-btn--surface {
    background: #ffffff;
    border-color: var(--tp-border);
    color: var(--tp-ink);
  }

  .tp-key-facts--hero {
    margin-bottom: 0;
    border-color: var(--tp-hero-border);
  }
  @media (min-width: 1180px) {
    .tp-key-facts--hero {
      grid-template-columns: repeat(4, minmax(0, 1fr));
    }
    .tp-key-facts--hero .tp-kf-item {
      padding: 12px 12px;
    }
    .tp-key-facts--hero .tp-kf-item dd {
      font-size: 1.0625rem;
    }
  }

  /* Staggered Right Collage + 2 Highlight Cards */
  .tp-hero-stagger {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 14px;
    align-items: start;
  }

  .tp-stagger-primary .tp-media-figure,
  .tp-stagger-secondary .tp-media-figure {
    margin: 0;
    border-radius: var(--tp-radius-md);
    border: 3px solid #ffffff;
    box-shadow: 0 16px 36px rgba(28, 36, 48, 0.12);
  }

  .tp-float-card {
    background: #ffffff;
    border: 1px solid var(--tp-hero-border);
    border-radius: var(--tp-radius-md);
    padding: 16px 18px;
    box-shadow: 0 14px 32px rgba(28, 36, 48, 0.09);
    display: flex;
    flex-direction: column;
    gap: 6px;
  }

  .tp-float-card-head {
    display: flex;
    align-items: center;
    gap: 10px;
  }
  .tp-float-ico {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    border-radius: 8px;
    color: #ffffff;
    flex-shrink: 0;
  }
  .tp-float-ico--emerald {
    background: var(--tp-accent);
  }
  .tp-float-ico--copper {
    background: var(--tp-accent-signal);
  }
  .tp-float-kicker {
    font-size: 0.9375rem;
    font-weight: 700;
    color: var(--tp-ink-muted);
  }
  .tp-float-val {
    font-family: var(--tp-font-display);
    font-size: 1.2rem;
    line-height: 1.25;
    color: var(--tp-ink);
  }
  .tp-float-sub {
    font-size: 0.95rem;
    line-height: 1.45;
    color: var(--tp-ink-muted);
  }
  .tp-float-link {
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--tp-accent);
    text-decoration: none;
    margin-top: 2px;
  }
  .tp-float-link:hover {
    text-decoration: underline;
  }

  @media (min-width: 640px) {
    .tp-hero-stagger {
      grid-template-columns: repeat(12, minmax(0, 1fr));
      gap: 14px;
    }
    .tp-stagger-primary {
      grid-column: 1 / 9;
      grid-row: 1;
    }
    .tp-float-card--pros {
      grid-column: 7 / 13;
      grid-row: 1;
      align-self: end;
      z-index: 3;
      margin-bottom: -18px;
    }
    .tp-float-card--savings {
      grid-column: 1 / 8;
      grid-row: 2;
      z-index: 3;
      margin-top: 6px;
    }
    .tp-stagger-secondary {
      grid-column: 7 / 13;
      grid-row: 2;
      margin-top: -12px;
      z-index: 2;
    }
  }

  /* Seam-Straddling Search Bar */
  .tp-seam-search-wrap {
    position: relative;
    z-index: 30;
    margin-top: -36px;
    margin-bottom: 12px;
  }
  .tp-seam-search {
    position: relative;
    max-width: 980px;
    margin-inline: auto;
  }
  .tp-seam-search-box {
    display: flex;
    align-items: center;
    gap: 8px;
    background: #ffffff;
    border: 1.5px solid #d9c5b2;
    border-radius: 14px;
    padding: 8px 8px 8px 16px;
    box-shadow: 0 18px 42px rgba(28, 36, 48, 0.11);
  }
  .tp-seam-search-box:focus-within {
    border-color: var(--tp-accent);
    box-shadow: 0 18px 42px rgba(0, 122, 94, 0.14);
  }
  .tp-seam-search-input {
    border: 0;
    background: transparent;
    color: var(--tp-ink);
    font-family: var(--tp-font-sans);
    font-size: 1.0625rem;
    width: 100%;
    min-width: 0;
    min-height: 46px;
    outline: none;
  }
  .tp-seam-search-btn {
    min-height: 46px;
    padding: 10px 20px;
    border: 1px solid var(--tp-accent);
    border-radius: 10px;
    background: var(--tp-accent);
    color: #ffffff;
    font-family: var(--tp-font-sans);
    font-size: 1rem;
    font-weight: 700;
    white-space: nowrap;
    cursor: pointer;
    flex-shrink: 0;
    transition: background-color 140ms ease;
  }
  .tp-seam-search-btn:hover {
    background: var(--tp-accent-hover);
    border-color: var(--tp-accent-hover);
  }

  /* =====================================================================
     Media Figures & Charts
     ===================================================================== */
  .tp-media-figure,
  .tp-chart-card,
  .tp-diagram-card {
    margin: 0 0 var(--tp-space-5);
    border: 1px solid var(--tp-border-soft);
    background: var(--tp-bg);
    border-radius: var(--tp-radius-sm);
    overflow: hidden;
  }

  .tp-media-cap,
  .tp-chart-cap {
    padding: 12px 16px;
    font-size: 0.95rem;
    line-height: 1.5;
    color: var(--tp-ink-muted);
    background: var(--tp-surface);
    border-top: 1px solid var(--tp-border-soft);
  }

  .tp-chart-fallback {
    border-top: 1px solid var(--tp-border-soft);
    background: var(--tp-bg);
    padding: 8px 14px;
  }
  .tp-chart-fallback summary {
    cursor: pointer;
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--tp-accent);
    min-height: 46px;
    display: flex;
    align-items: center;
  }

  /* =====================================================================
     A62 Regional Comparison Explorer (Replaces 51-Tile Map)
     ===================================================================== */
  .tp-reg-explorer {
    border: 1px solid var(--tp-border-soft);
    border-radius: var(--tp-radius-md);
    background: var(--tp-surface);
    padding: clamp(16px, 2.2vw, 24px);
  }

  .tp-reg-note {
    margin-bottom: 16px;
    color: var(--tp-ink-muted);
    font-size: 1rem;
  }

  .tp-reg-toolbar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 12px 16px;
    margin-bottom: 14px;
  }

  .tp-reg-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
  }

  .tp-reg-tab {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-height: 46px;
    padding: 10px 16px;
    border: 1px solid var(--tp-border-soft);
    border-radius: var(--tp-radius-sm);
    background: #ffffff;
    color: var(--tp-ink);
    font-family: var(--tp-font-sans);
    font-size: 0.96875rem;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 140ms ease, color 140ms ease, border-color 140ms ease;
  }
  .tp-reg-tab:hover {
    border-color: var(--tp-accent);
    color: var(--tp-accent);
  }
  .tp-reg-tab.is-active {
    background: var(--tp-accent);
    border-color: var(--tp-accent);
    color: #ffffff;
  }
  .tp-reg-count {
    font-family: var(--tp-font-mono);
    font-size: 0.9375rem;
    opacity: 0.85;
  }

  .tp-reg-search-wrap {
    flex: 1 1 280px;
    max-width: 420px;
  }
  .tp-reg-search {
    min-height: 46px;
  }

  .tp-reg-legend {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px 18px;
    margin-bottom: 16px;
    padding: 10px 14px;
    background: #ffffff;
    border: 1px solid var(--tp-border-soft);
    border-radius: var(--tp-radius-sm);
    font-size: 0.9375rem;
    color: var(--tp-ink-muted);
  }
  .tp-leg-swatch {
    display: inline-block;
    width: 12px;
    height: 12px;
    border-radius: 3px;
    margin-right: 6px;
    vertical-align: -1px;
  }
  .tp-leg-swatch--ipc {
    background: #ecfdf5;
    border: 1.5px solid var(--tp-accent);
  }
  .tp-leg-swatch--upc {
    background: #fff3e8;
    border: 1.5px solid var(--tp-accent-signal);
  }
  .tp-leg-swatch--custom {
    background: #f1f5f9;
    border: 1.5px solid var(--tp-ink-muted);
  }
  .tp-reg-legend-note {
    margin-left: auto;
    font-weight: 600;
    color: var(--tp-ink);
  }

  .tp-reg-panels {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 18px;
    align-items: start;
  }
  @media (min-width: 1120px) {
    .tp-reg-panels {
      grid-template-columns: repeat(auto-fit, minmax(min(540px, 100%), 1fr));
    }
  }

  .tp-reg-panel {
    background: #ffffff;
    border: 1px solid var(--tp-border-soft);
    border-radius: var(--tp-radius-sm);
    overflow: hidden;
  }
  .tp-reg-panel.is-active-region {
    border-color: var(--tp-accent-signal);
  }
  .tp-reg-panel-head {
    background: var(--tp-surface-alt);
    padding: 12px 18px;
    border-bottom: 1px solid var(--tp-border-soft);
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: baseline;
    gap: 8px 16px;
  }
  .tp-reg-panel-title {
    margin: 0;
    font-family: var(--tp-font-display);
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--tp-ink);
  }
  .tp-reg-span {
    font-family: var(--tp-font-mono);
    font-size: 0.9375rem;
    color: var(--tp-ink-muted);
  }

  .tp-pay-list {
    display: flex;
    flex-direction: column;
  }

  .tp-pay-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 8px 14px;
    padding: 12px 18px;
    border-bottom: 1px solid #f0e8dc;
    align-items: center;
  }
  .tp-pay-row:last-child {
    border-bottom: 0;
  }
  .tp-pay-row:hover {
    background: var(--tp-surface);
  }
  .tp-pay-row.is-active-state {
    background: var(--tp-hero-apricot);
  }

  .tp-pay-state-col {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
    min-width: 0;
  }
  .tp-pay-state-link {
    font-weight: 700;
    font-size: 1.02rem;
    color: var(--tp-ink);
    text-decoration: none;
  }
  .tp-pay-state-link:hover {
    color: var(--tp-accent);
    text-decoration: underline;
  }

  .tp-code-pill {
    display: inline-flex;
    align-items: center;
    padding: 3px 9px;
    border-radius: 4px;
    font-size: 0.9375rem;
    font-weight: 600;
    white-space: nowrap;
  }
  .tp-code-pill--ipc {
    background: var(--tp-ok-bg);
    color: var(--tp-ok);
    border: 1px solid #a7f3d0;
  }
  .tp-code-pill--upc {
    background: var(--tp-warn-bg);
    color: var(--tp-warn);
    border: 1px solid #fed7aa;
  }
  .tp-code-pill--custom {
    background: #f1f5f9;
    color: var(--tp-ink-muted);
    border: 1px solid #cbd5e1;
  }

  .tp-pay-bar-col {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
  }
  .tp-pay-track {
    flex: 1 1 auto;
    height: 10px;
    background: #efe7dc;
    border-radius: 999px;
    overflow: hidden;
  }
  .tp-pay-fill {
    display: block;
    height: 100%;
    background: var(--tp-accent);
    border-radius: 999px;
  }
  .tp-pay-fill.is-active {
    background: var(--tp-accent-signal);
  }
  .tp-pay-wage {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--tp-ink);
    white-space: nowrap;
  }
  .tp-pay-meta-col {
    font-size: 0.9375rem;
    color: var(--tp-ink-muted);
    white-space: nowrap;
  }

  @media (min-width: 600px) {
    .tp-pay-row {
      grid-template-columns: minmax(210px, 1.3fr) minmax(160px, 1.15fr) auto;
    }
  }

  .is-reg-hidden {
    display: none !important;
  }

  /* =====================================================================
     Directory Index Explorer & Sections
     ===================================================================== */
  .tp-section {
    padding-block: clamp(28px, 4vw, 52px);
    border-bottom: 1px solid var(--tp-border-soft);
  }

  .tp-chapter-bar {
    height: 4px;
    width: 64px;
    background: var(--tp-accent-signal);
    margin-bottom: var(--tp-space-3);
  }

  .tp-section-head {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: flex-end;
    gap: 12px 24px;
    margin-bottom: var(--tp-space-5);
  }

  .tp-index-wrap {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 24px;
  }

  .tp-swiss-list {
    list-style: none;
    margin: 0;
    padding: 0;
    border-top: 1px solid var(--tp-border);
  }

  .tp-idx-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 8px 16px;
    align-items: center;
    padding: 16px 14px;
    min-height: 52px;
    border-bottom: 1px solid var(--tp-border-soft);
    text-decoration: none;
    color: var(--tp-ink);
    transition: background-color 140ms ease, color 140ms ease;
    cursor: pointer;
  }
  .tp-idx-row:hover,
  .tp-idx-row:focus-visible {
    background: var(--tp-surface);
  }
  .tp-idx-row.is-selected {
    background: var(--tp-accent);
    color: #ffffff;
  }
  .tp-idx-row.is-selected .tp-idx-meta {
    color: #e2f5ee;
  }

  .tp-idx-title {
    font-weight: 600;
    font-size: 1.125rem;
  }
  .tp-idx-meta {
    display: none;
    font-size: 0.95rem;
    color: var(--tp-ink-muted);
  }
  .tp-idx-arrow {
    display: inline-flex;
    align-items: center;
    font-size: 1.1rem;
    font-weight: 700;
    transition: transform 140ms ease;
  }
  .tp-idx-row:hover .tp-idx-arrow {
    transform: translateX(3px);
  }

  .tp-idx-inspector {
    border: 1px solid var(--tp-border-soft);
    background: var(--tp-surface);
    padding: 22px;
    border-radius: var(--tp-radius-sm);
  }
  .tp-idx-inspector .tp-media-figure {
    margin-bottom: 14px;
  }

  @media (min-width: 900px) {
    .tp-idx-row {
      grid-template-columns: minmax(260px, 2.2fr) minmax(140px, 1fr) minmax(140px, 1fr) 28px;
    }
    .tp-idx-meta {
      display: block;
    }
  }
  @media (min-width: 1200px) {
    .tp-index-wrap {
      grid-template-columns: minmax(0, 1fr) 440px;
      align-items: start;
    }
    .tp-idx-inspector {
      position: sticky;
      top: 96px;
    }
  }

  /* =====================================================================
     Warm Sand Methodology Band & Leader Deck
     ===================================================================== */
  .tp-forest-band {
    background: var(--tp-surface);
    color: var(--tp-ink);
    padding-block: clamp(32px, 4.5vw, 56px);
    border-bottom: 1px solid var(--tp-border-soft);
  }
  .tp-forest-band .tp-eyebrow {
    color: var(--tp-accent);
  }
  .tp-forest-band .tp-section-lead {
    color: var(--tp-ink-muted);
  }

  .tp-method-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 24px;
    margin-top: var(--tp-space-5);
  }
  .tp-method-step {
    background: var(--tp-bg);
    border: 1px solid var(--tp-border-soft);
    border-radius: var(--tp-radius-sm);
    padding: 22px;
  }
  .tp-method-num {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--tp-accent);
    color: #ffffff;
    border: 1px solid var(--tp-accent);
    font-size: 1rem;
    font-weight: 700;
    margin-bottom: 12px;
  }
  .tp-method-step--lead .tp-method-num {
    background: var(--tp-accent-signal);
    color: #ffffff;
    border-color: var(--tp-accent-signal);
  }

  @media (min-width: 768px) {
    .tp-method-grid {
      grid-template-columns: repeat(2, minmax(0, 1fr));
    }
  }
  @media (min-width: 1440px) {
    .tp-method-grid {
      grid-template-columns: repeat(4, minmax(0, 1fr));
    }
  }

  .tp-leader-deck {
    display: grid;
    grid-template-columns: 1fr;
    gap: 18px;
  }
  .tp-tier-card {
    border: 1px solid var(--tp-border-soft);
    border-radius: var(--tp-radius-sm);
    padding: 24px;
    background: var(--tp-bg);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 16px;
  }
  .tp-tier-card--featured {
    background: var(--tp-surface-sage);
    border-color: var(--tp-accent);
    border-width: 1.5px;
  }
  .tp-tier-card--dark {
    background: var(--tp-surface);
    color: var(--tp-ink);
    border-color: var(--tp-border-soft);
  }
  @media (min-width: 960px) {
    .tp-leader-deck {
      grid-template-columns: 1.3fr 1fr 1fr;
    }
  }

  /* Split Gateway Band */
  .tp-split-band {
    display: grid;
    grid-template-columns: 1fr;
    border: 1px solid var(--tp-border-soft);
    border-radius: var(--tp-radius-sm);
    overflow: hidden;
    margin-bottom: var(--tp-space-5);
  }
  .tp-split-panel {
    padding: clamp(22px, 3.5vw, 44px);
    border-bottom: 1px solid var(--tp-border-soft);
    background: var(--tp-bg);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 18px;
  }
  .tp-split-panel--dark {
    background: var(--tp-surface);
    color: var(--tp-ink);
  }
  .tp-split-panel--dark .tp-eyebrow {
    color: var(--tp-accent-signal);
  }
  @media (min-width: 960px) {
    .tp-split-band {
      grid-template-columns: repeat(2, minmax(0, 1fr));
    }
    .tp-split-panel {
      border-bottom: 0;
      border-right: 1px solid var(--tp-border-soft);
    }
    .tp-split-panel:last-child {
      border-right: 0;
    }
  }

  /* =====================================================================
     Inner Page Open SSR Layout (<article> strictly BEFORE <aside> in DOM)
     ===================================================================== */
  .tp-main-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 28px;
    padding-block: clamp(20px, 3vw, 40px);
    align-items: start;
  }
  .tp-main-grid > * {
    min-width: 0;
  }
  .tp-article {
    min-width: 0;
  }
  .tp-rail {
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 18px;
  }

  @media (min-width: 1120px) {
    .tp-main-grid--with-rail {
      grid-template-columns: minmax(0, 1fr) 340px;
    }
    .tp-main-grid--left-rail {
      grid-template-columns: 320px minmax(0, 1fr);
    }
    .tp-main-grid--left-rail > .tp-rail {
      order: -1;
    }
  }
  @media (min-width: 1680px) {
    .tp-main-grid--with-rail {
      grid-template-columns: minmax(0, 1fr) 390px;
      gap: 44px;
    }
  }

  /* Breadcrumbs */
  .tp-breadcrumb {
    margin-bottom: 12px;
  }
  .tp-crumbs {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 4px 10px;
    font-size: 0.95rem;
    color: var(--tp-ink-muted);
  }
  .tp-crumbs li + li::before {
    content: "/";
    margin-right: 10px;
    color: var(--tp-border-soft);
  }
  .tp-crumbs a {
    display: inline-flex;
    align-items: center;
    min-height: 46px;
    text-decoration: none;
  }
  .tp-crumbs a:hover {
    text-decoration: underline;
    color: var(--tp-ink);
  }

  /* Answer-First Lead Answer & Key Facts <dl> */
  .tp-lead-answer {
    background: var(--tp-surface);
    border: 1px solid var(--tp-border-soft);
    border-radius: var(--tp-radius-sm);
    padding: 20px 24px;
    margin-block: 14px 20px;
    max-width: none;
  }
  .tp-lead-answer p {
    margin: 0;
    max-width: none;
    font-size: var(--tp-text-base);
    line-height: var(--tp-lh-body);
  }

  .tp-key-facts {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(175px, 100%), 1fr));
    border: 1px solid var(--tp-border-soft);
    border-radius: var(--tp-radius-sm);
    margin: 0 0 24px;
    background: var(--tp-bg);
    overflow: hidden;
  }
  .tp-kf-item {
    padding: 14px 18px;
    border-bottom: 1px solid var(--tp-border-soft);
    border-right: 1px solid var(--tp-border-soft);
  }
  .tp-kf-item--lead {
    background: var(--tp-surface-sage);
  }
  .tp-kf-item dt {
    font-size: 0.9375rem;
    font-weight: 600;
    color: var(--tp-ink-muted);
    margin-bottom: 4px;
  }
  .tp-kf-item dd {
    margin: 0;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
    font-size: 1.1875rem;
    color: var(--tp-ink);
  }

  /* Conditional Cons & Profile Fit (Zero one-sided border stripes) */
  .tp-limitations-box {
    border: 1px solid var(--tp-border-soft);
    background: var(--tp-hero-apricot);
    border-radius: var(--tp-radius-sm);
    padding: 22px 24px;
    margin-bottom: 24px;
  }
  .tp-limitations-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 18px;
    margin-top: 14px;
  }
  @media (min-width: 900px) {
    .tp-limitations-grid {
      grid-template-columns: 1fr 1.15fr;
    }
  }
  .tp-profile-list {
    display: grid;
    gap: 10px;
  }
  .tp-profile-row {
    background: var(--tp-bg);
    border: 1px solid var(--tp-border-soft);
    border-radius: var(--tp-radius-xs);
    padding: 12px 16px;
  }
  .tp-profile-row strong {
    display: block;
    font-size: 1.02rem;
    margin-bottom: 4px;
  }
  .tp-profile-row span {
    font-size: 0.98rem;
    color: var(--tp-ink-muted);
  }

  /* Slot-0 Partner Line & Safety Banners */
  .tp-slot0 {
    border: 1px solid var(--tp-accent);
    border-radius: var(--tp-radius-sm);
    background: var(--tp-surface-sage);
    padding: 18px 20px;
    margin-bottom: 18px;
  }
  .tp-slot0--placeholder {
    background: var(--tp-surface);
    border-style: dashed;
    border-color: var(--tp-border-soft);
  }
  .tp-slot0__label {
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--tp-accent);
    margin: 0 0 6px;
  }
  .tp-slot0__phone {
    display: inline-block;
    font-family: var(--tp-font-mono);
    font-size: 1.3rem;
    font-weight: 700;
    margin: 0 0 6px;
    text-decoration: none;
  }
  .tp-slot0__hours,
  .tp-slot0__note {
    font-size: 0.95rem;
    margin: 4px 0 0;
    color: var(--tp-ink-muted);
  }

  .tp-safety-box {
    border: 1.5px solid var(--tp-danger);
    border-radius: var(--tp-radius-sm);
    background: var(--tp-danger-bg);
    color: #7f1d1d;
    padding: 18px 20px;
    margin-bottom: 20px;
    font-size: 1rem;
  }
  .tp-safety-box strong {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 1.05rem;
    margin-bottom: 6px;
  }

  .tp-shutoff-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 14px;
    margin-bottom: 20px;
  }
  .tp-shutoff-step {
    border: 1px solid var(--tp-border-soft);
    border-radius: var(--tp-radius-sm);
    background: var(--tp-bg);
    padding: 18px;
  }
  .tp-shutoff-step .tp-step-tag {
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--tp-accent);
    display: block;
    margin-bottom: 6px;
  }
  @media (min-width: 768px) {
    .tp-shutoff-grid {
      grid-template-columns: repeat(3, minmax(0, 1fr));
    }
  }

  /* Tables (overflow-safe at 320px with CSS scroll-shadows & caption) */
  .tp-table-wrap {
    width: 100%;
    max-width: 100%;
    overflow-x: auto;
    border: 1px solid var(--tp-border-soft);
    border-radius: var(--tp-radius-sm);
    margin-bottom: 24px;
    background-color: var(--tp-bg);
    background-image:
      linear-gradient(to right, var(--tp-bg), var(--tp-bg)),
      linear-gradient(to right, var(--tp-bg), var(--tp-bg)),
      linear-gradient(to right, rgba(28, 36, 48, 0.12), rgba(28, 36, 48, 0)),
      linear-gradient(to left, rgba(28, 36, 48, 0.12), rgba(28, 36, 48, 0));
    background-position: left center, right center, left center, right center;
    background-repeat: no-repeat;
    background-size: 20px 100%, 20px 100%, 14px 100%, 14px 100%;
    background-attachment: local, local, scroll, scroll;
  }
  table.tp-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 1rem;
  }
  table.tp-table caption {
    caption-side: top;
    text-align: left;
    padding: 12px 16px;
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--tp-ink-muted);
    background: var(--tp-surface);
    border-bottom: 1px solid var(--tp-border-soft);
  }
  table.tp-table th,
  table.tp-table td {
    text-align: left;
    padding: 12px 16px;
    border-bottom: 1px solid var(--tp-border-soft);
    vertical-align: top;
  }
  table.tp-table th {
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--tp-ink);
    background: var(--tp-surface);
    border-bottom: 1px solid var(--tp-border);
    white-space: nowrap;
  }
  table.tp-table th button.tp-sort-btn {
    background: transparent;
    border: 0;
    padding: 6px 2px;
    min-height: 46px;
    font: inherit;
    color: inherit;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 5px;
  }
  table.tp-table th button.tp-sort-btn:hover {
    text-decoration: underline;
  }
  table.tp-table tbody tr:hover {
    background: var(--tp-surface);
  }
  @media (max-width: 540px) {
    table.tp-table th,
    table.tp-table td {
      padding: 10px 12px;
      font-size: 0.9375rem;
    }
  }
  .tp-num {
    font-family: var(--tp-font-mono);
    font-variant-numeric: tabular-nums;
  }
  .tp-pagination {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    margin: 16px 0 28px;
  }
  .tp-insight-box {
    border: 1px solid var(--tp-border-soft);
    border-radius: var(--tp-radius-sm);
    background: var(--tp-surface-sage);
    padding: 20px 24px;
    margin-bottom: 24px;
  }
  .tp-insight-box p:last-child {
    margin-bottom: 0;
  }

  /* Cards & Grids */
  .tp-grid-auto {
    display: grid;
    grid-template-columns: 1fr;
    gap: 16px;
    margin-bottom: 24px;
  }
  @media (min-width: 640px) {
    .tp-grid-auto {
      grid-template-columns: repeat(2, minmax(0, 1fr));
    }
  }
  @media (min-width: 1100px) {
    .tp-grid-auto {
      grid-template-columns: repeat(auto-fit, minmax(min(260px, 100%), 1fr));
    }
  }
  @media (min-width: 1600px) {
    .tp-grid-auto--wide {
      grid-template-columns: repeat(auto-fit, minmax(min(260px, 100%), 1fr));
    }
  }

  .tp-card {
    border: 1px solid var(--tp-border-soft);
    border-radius: var(--tp-radius-sm);
    background: var(--tp-bg);
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 10px;
  }
  .tp-card--muted {
    background: var(--tp-surface);
  }
  .tp-card-title {
    font-weight: 700;
    font-size: 1.15rem;
    margin: 0;
  }
  .tp-muted {
    color: var(--tp-ink-muted);
    font-size: 1rem;
  }

  /* Badges */
  .tp-badge {
    display: inline-flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 5px;
    max-width: 100%;
    border: 1px solid var(--tp-border-soft);
    border-radius: var(--tp-radius-xs);
    background: var(--tp-surface);
    padding: 5px 10px;
    font-size: 0.9375rem;
    font-weight: 600;
    line-height: 1.35;
    white-space: normal;
    overflow-wrap: anywhere;
  }
  .tp-badge--ok {
    background: var(--tp-ok-bg);
    border-color: var(--tp-ok);
    color: var(--tp-ok);
  }
  .tp-badge--warn {
    background: var(--tp-warn-bg);
    border-color: var(--tp-warn);
    color: var(--tp-warn);
  }
  .tp-badge--danger {
    background: var(--tp-danger-bg);
    border-color: var(--tp-danger);
    color: var(--tp-danger);
  }

  /* Interactive Controls, 8 States, Custom Listbox */
  .tp-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    max-width: 100%;
    min-height: 48px;
    padding: 12px 20px;
    border: 1px solid var(--tp-border);
    border-radius: var(--tp-radius-sm);
    background: var(--tp-bg);
    color: var(--tp-ink);
    font-family: var(--tp-font-sans);
    font-size: 1rem;
    font-weight: 600;
    text-decoration: none;
    text-align: center;
    white-space: normal;
    line-height: 1.3;
    cursor: pointer;
    transition: background-color 140ms ease, color 140ms ease, transform 90ms ease;
  }
  .tp-btn:hover {
    background: var(--tp-ink);
    color: var(--tp-bg);
  }
  .tp-btn:active {
    transform: translateY(1px);
  }
  .tp-btn--primary {
    background: var(--tp-accent);
    border-color: var(--tp-accent);
    color: #ffffff;
  }
  .tp-btn--primary:hover {
    background: var(--tp-accent-hover);
    border-color: var(--tp-accent-hover);
    color: #ffffff;
  }
  .tp-btn[aria-pressed="true"],
  .tp-btn.is-selected {
    background: var(--tp-ink);
    color: var(--tp-bg);
  }
  .tp-btn:disabled,
  .tp-btn[aria-disabled="true"] {
    opacity: 0.38;
    cursor: not-allowed;
    pointer-events: none;
  }
  .tp-btn[aria-busy="true"] {
    opacity: 0.72;
    cursor: wait;
  }

  .tp-pill-group {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 14px;
  }

  .tp-field {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-bottom: 14px;
  }
  .tp-field label,
  .tp-field-label {
    font-size: 1rem;
    font-weight: 600;
    color: var(--tp-ink);
  }
  .tp-input {
    width: 100%;
    min-height: 44px;
    padding: 10px 12px;
    border: 1px solid var(--tp-border-soft);
    border-radius: var(--tp-radius-sm);
    background: var(--tp-bg);
    color: var(--tp-ink);
    font-family: var(--tp-font-sans);
    font-size: 1rem;
  }
  .tp-input:hover {
    border-color: var(--tp-border);
  }
  .tp-input[data-state="error"],
  .tp-input:invalid {
    border-color: var(--tp-danger);
    background: var(--tp-danger-bg);
  }
  .tp-input:disabled {
    opacity: 0.45;
    cursor: not-allowed;
  }

  /* Custom Accessible ARIA Listbox */
  .tp-listbox-wrap {
    position: relative;
    max-width: 100%;
    min-width: 0;
  }
  .tp-listbox-trigger {
    width: 100%;
    max-width: 100%;
    min-width: 0;
    min-height: 44px;
    padding: 10px 12px;
    border: 1px solid var(--tp-border);
    border-radius: var(--tp-radius-sm);
    background: var(--tp-bg);
    color: var(--tp-ink);
    font-family: var(--tp-font-sans);
    font-size: 1rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    cursor: pointer;
    text-align: left;
  }
  .tp-listbox-trigger [data-listbox-label] {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
  .tp-listbox-trigger:hover {
    background: var(--tp-surface);
  }
  .tp-listbox-trigger[aria-expanded="true"] {
    background: var(--tp-ink);
    color: var(--tp-bg);
  }
  .tp-listbox-menu {
    display: none;
    position: absolute;
    left: 0;
    right: 0;
    top: calc(100% + 2px);
    z-index: 60;
    max-height: 280px;
    overflow-y: auto;
    border: 1px solid var(--tp-border);
    border-radius: var(--tp-radius-sm);
    background: var(--tp-bg);
    list-style: none;
    margin: 0;
    padding: 0;
  }
  .tp-listbox-menu.is-open {
    display: block;
  }
  .tp-listbox-opt {
    padding: 10px 12px;
    min-height: 44px;
    display: flex;
    align-items: center;
    cursor: pointer;
    border-bottom: 1px solid var(--tp-border-soft);
    font-size: 0.95rem;
  }
  .tp-listbox-opt:hover,
  .tp-listbox-opt.is-active {
    background: var(--tp-surface);
  }
  .tp-listbox-opt[aria-selected="true"] {
    background: var(--tp-accent);
    color: #ffffff;
    font-weight: 600;
  }

  /* Interactive Tool Workbench & Embed Box */
  .tp-tool-shell {
    border: 1.5px solid var(--tp-border-soft);
    border-radius: var(--tp-radius-sm);
    background: var(--tp-surface);
    padding: clamp(16px, 3vw, 28px);
    margin-bottom: 28px;
    max-width: 100%;
    overflow: hidden;
  }
  .tp-tool-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 24px;
    align-items: start;
  }
  .tp-tool-grid > * {
    min-width: 0;
    max-width: 100%;
  }
  @media (min-width: 900px) {
    .tp-tool-grid {
      grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr);
    }
  }
  .tp-tool-output {
    border: 1px solid var(--tp-border-soft);
    border-radius: var(--tp-radius-sm);
    background: var(--tp-bg);
    padding: clamp(14px, 2.5vw, 18px);
    min-width: 0;
    max-width: 100%;
    overflow-wrap: anywhere;
  }

  .tp-embed-box {
    border: 1px solid var(--tp-border-soft);
    border-radius: var(--tp-radius-sm);
    background: var(--tp-surface);
    padding: 18px 20px;
    margin-bottom: 24px;
  }
  .tp-embed-code {
    width: 100%;
    font-family: var(--tp-font-mono);
    font-size: 0.9375rem;
    padding: 12px 14px;
    border: 1px solid var(--tp-border-soft);
    background: var(--tp-bg);
    color: var(--tp-ink);
    margin: 10px 0;
    resize: none;
  }

  /* Citations, Related & Sources */
  sup.cite a {
    font-family: var(--tp-font-mono);
    font-size: 0.9375rem;
    text-decoration: none;
    color: var(--tp-ink-muted);
    margin-left: 2px;
  }
  sup.cite a:hover {
    color: var(--tp-ink);
    text-decoration: underline;
  }

  .tp-sources {
    margin-top: 32px;
    padding-top: 20px;
    border-top: 1px solid var(--tp-border);
  }
  .tp-sources ol {
    padding-left: 20px;
    margin: 12px 0 0;
  }
  .tp-sources li {
    margin-bottom: 8px;
    font-size: 0.95rem;
    color: var(--tp-ink-muted);
  }

  .tp-related {
    margin-top: 28px;
    padding-top: 20px;
    border-top: 1px solid var(--tp-border-soft);
  }
  .tp-related-list {
    list-style: none;
    padding: 0;
    margin: 12px 0 0;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(240px, 100%), 1fr));
    gap: 10px;
  }
  .tp-related-list a {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    min-height: 48px;
    padding: 12px 16px;
    border: 1px solid var(--tp-border-soft);
    border-radius: var(--tp-radius-sm);
    background: var(--tp-surface);
    text-decoration: none;
    font-size: 1rem;
    font-weight: 600;
  }
  .tp-related-list a:hover {
    border-color: var(--tp-accent);
    background: var(--tp-accent);
    color: #ffffff;
  }

  /* Open SSR Visible FAQ */
  .tp-faq-list {
    border-top: 1px solid var(--tp-border);
    margin-bottom: 24px;
  }
  .tp-faq-item {
    border-bottom: 1px solid var(--tp-border-soft);
    padding: 20px 0;
  }
  .tp-faq-item h3 {
    font-size: 1.2rem;
    font-weight: 700;
    margin: 0 0 8px;
    color: var(--tp-ink);
  }
  .tp-faq-item p {
    margin: 0;
    color: var(--tp-ink-muted);
    max-width: none;
  }

  /* =====================================================================
     F13 Trust-Methodology & Editorial Disclosure Warm Sand Colophon Footer
     ===================================================================== */
  .tp-footer {
    border-top: 4px solid var(--tp-accent);
    background: var(--tp-surface-sand);
    padding-top: clamp(32px, 4.5vw, 56px);
    padding-bottom: 28px;
  }
  .tp-footer-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 28px;
    margin-bottom: 28px;
  }
  @media (min-width: 680px) {
    .tp-footer-grid {
      grid-template-columns: repeat(2, minmax(0, 1fr));
    }
  }
  @media (min-width: 1120px) {
    .tp-footer-grid {
      grid-template-columns: 1.45fr 1fr 1fr 1fr;
    }
  }
  .tp-footer-brand {
    display: inline-block;
    margin-bottom: 14px;
  }
  .tp-footer-note {
    font-size: 0.96875rem;
    line-height: 1.6;
    color: var(--tp-ink-muted);
    margin-bottom: 12px;
  }
  .tp-footer-inline-links {
    list-style: none;
    margin: 14px 0 0;
    padding: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 6px 14px;
  }
  .tp-footer-inline-links a {
    display: inline-flex;
    align-items: center;
    min-height: 44px;
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--tp-accent);
    text-decoration: none;
  }
  .tp-footer-inline-links a:hover {
    text-decoration: underline;
  }
  .tp-footer-col h3 {
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--tp-ink);
    margin-bottom: 12px;
  }
  .tp-footer-col ul {
    list-style: none;
    margin: 0;
    padding: 0;
  }
  .tp-footer-col li a {
    display: inline-flex;
    align-items: center;
    min-height: 44px;
    text-decoration: none;
    font-size: 0.96875rem;
    color: var(--tp-ink-muted);
  }
  .tp-footer-col li a:hover {
    text-decoration: underline;
    color: var(--tp-ink);
  }

  .tp-footer-bottom {
    border-top: 1px solid var(--tp-border-soft);
    padding-top: 18px;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    font-size: 0.95rem;
    color: var(--tp-ink-muted);
  }

  /* Embed Standalone Mode */
  .tp-embed-body {
    background: var(--tp-bg);
    padding: 14px;
  }
  .tp-embed-head {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding-bottom: 10px;
    margin-bottom: 14px;
    border-bottom: 1px solid var(--tp-border);
  }
  .tp-embed-foot {
    margin-top: 14px;
    padding-top: 10px;
    border-top: 1px solid var(--tp-border-soft);
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    gap: 8px;
    font-size: 0.95rem;
    color: var(--tp-ink-muted);
  }

  @media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
      transition-duration: 0.01ms !important;
      animation-duration: 0.01ms !important;
    }
    html {
      scroll-behavior: auto;
    }
  }

  @media print {
    .tp-header, .tp-footer, .tp-slot0, .tp-related, .tp-embed-box, .no-print {
      display: none !important;
    }
  }
}

/* tp-mi-css-s */
.tp-metro-index{width:100%;max-width:min(1720px,calc(100% - clamp(24px,4vw,72px)));margin:clamp(28px,4vw,48px) auto clamp(24px,3vw,40px);padding:clamp(18px,2.4vw,30px);background:#faf5ee;border:1px solid #e5d7c5;border-radius:12px;color:#1c2430;font-family:"Erode", Georgia, serif;box-sizing:border-box}
.tp-metro-index *, .tp-metro-index *::before, .tp-metro-index *::after{box-sizing:border-box}
.tp-metro-index__hd{display:flex;flex-wrap:wrap;justify-content:space-between;align-items:baseline;gap:8px 18px;margin:0 0 14px;padding-bottom:10px;border-bottom:1px solid #e5d7c5}
.tp-metro-index__t{margin:0;font-family:"Bespoke Serif", Georgia, serif;font-size:clamp(1.12rem,1.45vw,1.42rem);line-height:1.25;font-weight:700;color:#1c2430}
.tp-metro-index__sub{margin:0;font-size:.9rem;line-height:1.45;color:#4b5563;max-width:74ch}
.tp-metro-index__a{color:#1c2430;text-decoration:none;transition:border-color .15s ease,background-color .15s ease,color .15s ease}
.tp-metro-index__a:hover,.tp-metro-index__a:focus-visible{color:#0f766e;border-color:#0f766e;background:#ecfdf5;outline:none}
.tp-metro-index__st{font-size:.76rem;font-weight:700;letter-spacing:.05em;text-transform:uppercase;color:#0f766e;flex-shrink:0}
.tp-metro-index__ico{width:14px;height:14px;flex-shrink:0;opacity:.7}
.tp-metro-index__list{list-style:none;margin:0;padding:0;display:grid;grid-template-columns:repeat(auto-fill,minmax(min(100%,300px),1fr));gap:6px 22px}
.tp-metro-index__a{display:flex;align-items:center;justify-content:space-between;gap:8px;padding:9px 8px;border-bottom:1px solid #e5d7c5;border-radius:4px;font-size:.93rem;font-weight:500;line-height:1.35}
/* tp-mi-css-e */
