/* ══════════════════════════════════════════════════════════
   Trust Study — Publication Edition
   ────────────────────────────────────────────────────────
   Design principles (TypeUI Publication):
   · Editorial whitespace — sections breathe, nothing cramped
   · Sharp geometry — no rounded cards, hairline rules
   · Display-grade type hierarchy — headings command, body recedes
   · Color as punctuation — accent on labels and numbers only
   · Pull-quote callouts — centered, large, italic
   · White space > card backgrounds for separation
   ══════════════════════════════════════════════════════════ */

/* ── Body ─────────────────────────────────────────────────── */
body {
    background-color: var(--bg);
    transition: background-color 0.4s ease, color 0.3s ease;
    min-height: 100vh;
}

/* ── Back button ──────────────────────────────────────────── */
.ts-back {
    position: fixed;
    top: 5vh;
    left: 5vw;
    z-index: 100000;
    display: inline-flex;
    align-items: center;
    gap: 0.5em;
    text-decoration: none;
    font-family: 'DM Sans', sans-serif;
    font-size: 0.78rem;
    font-weight: 400;
    letter-spacing: 0.06em;
    text-transform: lowercase;
    color: var(--text-primary);
    border: 1px solid rgba(0,0,0,0.35);
    border-radius: 999px;
    height: 36px;
    box-sizing: border-box;
    padding: 0 1.1em 0 0.8em;
    background: transparent;
    transition: color 0.3s ease, border-color 0.3s ease;
    cursor: none;
}
[data-theme="dark"] .ts-back { border-color: rgba(255,255,255,0.3); }
@media (hover: hover) and (pointer: fine) {
    .ts-back:hover { color: var(--ts); border-color: var(--ts); }
    .ts-back:hover .material-symbols-outlined { transform: translateX(-3px); }
}
.ts-back .material-symbols-outlined {
    font-size: 18px;
    transition: transform 0.3s ease;
}

/* ── Section label ────────────────────────────────────────── */
.ts-label {
    font-family: 'DM Sans', sans-serif;
    font-size: 0.68rem;
    font-weight: 500;
    letter-spacing: 0.28em;
    text-transform: uppercase;
    color: var(--ts);
    margin: 0;
    transition: color 0.3s ease;
}

/* ══════════════════════════════════════════════════════════
   HERO — full-height, commanding title
   ══════════════════════════════════════════════════════════ */

/* ── Stage wrapper ── */
#ts-stage {
    position: relative;
    overflow: hidden;
    overflow: clip;
    z-index: 1;
}

/* ── Hero ── */
#ts-hero-ktk {
    position: relative;
    width: 100%;
    min-height: 100vh;
    min-height: 100svh;
    background-color: var(--bg);
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    padding: 0 5vw;
    box-sizing: border-box;
    transition: background-color 0.4s ease;
}
#ts-hero-ktk__split {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: clamp(4rem, 8vw, 10rem);
    width: 100%;
    box-sizing: border-box;
}
#ts-hero-ktk__content {
    text-align: left;
    max-width: 800px;
    flex: 1 1 60%;
    padding-top: 0;
    opacity: 0;
}
#ts-hero-ktk__title {
    font-family: 'Space Grotesk', sans-serif;
    font-size: clamp(2.8rem, 5.5vw, 5rem);
    font-weight: 300;
    line-height: 1.12;
    letter-spacing: -0.025em;
    color: var(--text-primary);
    margin: 0;
    transition: color 0.3s ease;
}
#ts-hero-ktk__ribbon {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 2rem;
    margin-top: 2rem;
}
.ts-hero-ktk__ribbon-item {
    display: flex;
    align-items: center;
    gap: 0.35em;
}
.ts-hero-ktk__ribbon-item:not(:last-child)::after {
    content: '\00B7';
    margin-left: 2rem;
    font-size: 1.4rem;
    color: var(--text-muted);
    opacity: 0.5;
    transition: color 0.3s ease;
}
.ts-hero-ktk__ribbon-label {
    font-family: 'DM Sans', sans-serif;
    font-size: 0.78rem;
    font-weight: 400;
    letter-spacing: 0.04em;
    color: var(--text-muted);
    transition: color 0.3s ease;
}
#ts-hero-ktk__phone {
    flex: 0 0 auto;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}
#ts-hero-ktk__img {
    width: auto;
    height: clamp(300px, 45vh, 500px);
}

/* ── Hero mobile (max-width: 768px) ── */
@media (max-width: 768px) {
    #ts-hero-ktk__split {
        flex-direction: column;
        gap: 3rem;
        padding: clamp(14vh, 18vh, 22vh) 0 6vh;
    }
    #ts-hero-ktk__content {
        text-align: center !important;
        max-width: 100%;
    }
    #ts-hero-ktk__ribbon {
        justify-content: center !important;
        flex-wrap: wrap !important;
        gap: 1.5rem !important;
        display: flex !important;
    }
    .ts-hero-ktk__ribbon-item:not(:last-child)::after {
        display: inline !important;
        margin-left: 1.5rem !important;
    }
    .ts-hero-ktk__ribbon-item {
        flex-direction: row !important;
        align-items: center !important;
    }
    #ts-hero-ktk__img {
        height: clamp(180px, 30vh, 280px);
    }
}

/* ── Hero tablet (601px-1024px) ── */
@media (min-width: 601px) and (max-width: 1024px) {
    #ts-hero-ktk {
        padding: 0 6vw;
    }
    #ts-hero-ktk__content {
        padding-top: 14vh;
    }
    #ts-hero-ktk__title {
        font-size: clamp(2.2rem, 10vw, 3rem);
    }
    #ts-hero-ktk__title br {
        display: none;
    }
    #ts-hero-ktk__ribbon {
        gap: 0.8rem 1.2rem;
    }
    .ts-hero-ktk__ribbon-item:not(:last-child)::after {
        margin-left: 1.2rem;
    }
}

/* ══════════════════════════════════════════════════════════
   STATS RIBBON
   ══════════════════════════════════════════════════════════ */
.ts-stats {
    position: relative;
    z-index: 1;
    width: 100%;
    padding: 0 5vw;
    box-sizing: border-box;
}

.ts-stats__ribbon {
    display: flex;
    flex-wrap: nowrap;
    gap: 0;
    border-top: 1px solid rgba(0,0,0,0.1);
    border-bottom: 1px solid rgba(0,0,0,0.1);
    transition: border-color 0.3s ease;
}

[data-theme="dark"] .ts-stats__ribbon { border-color: rgba(255,255,255,0.1); }

.ts-stats__item {
    flex: 1 1 auto;
    padding: 2.5rem 2rem;
    border-right: 1px solid rgba(0,0,0,0.1);
    transition: border-color 0.3s ease;
}

[data-theme="dark"] .ts-stats__item { border-right-color: rgba(255,255,255,0.1); }
.ts-stats__item:last-child { border-right: none; }

.ts-stats__value {
    display: block;
    font-family: 'Space Grotesk', sans-serif;
    font-size: clamp(1.8rem, 3vw, 2.6rem);
    font-weight: 300;
    letter-spacing: -0.03em;
    color: var(--ts);
    line-height: 1;
    transition: color 0.3s ease;
}

.ts-stats__unit {
    display: block;
    font-family: 'DM Sans', sans-serif;
    font-size: 0.65rem;
    font-weight: 500;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--ts);
    opacity: 0.6;
    margin-top: 0.5rem;
    transition: color 0.3s ease;
}

/* ══════════════════════════════════════════════════════════
   DIVIDER — hairline rule
   ══════════════════════════════════════════════════════════ */
.ts-divider {
    position: relative;
    z-index: 1;
    padding: 0 5vw;
}

.ts-divider hr {
    border: none;
    border-top: 1px solid rgba(0,0,0,0.1);
    margin: 0;
    transition: border-color 0.3s ease;
}

[data-theme="dark"] .ts-divider hr { border-color: rgba(255,255,255,0.1); }

/* ══════════════════════════════════════════════════════════
   SECTION — generous breathing room, narrow reading column
   ══════════════════════════════════════════════════════════ */
.ts-section {
    position: relative;
    z-index: 1;
    width: 100%;
    padding: 12vh 5vw;
    box-sizing: border-box;
    background-color: var(--bg);
    transition: background-color 0.4s ease;
}

.ts-section__heading {
    font-family: 'Space Grotesk', sans-serif;
    font-size: clamp(1.7rem, 3.2vw, 2.8rem);
    font-weight: 300;
    line-height: 1.18;
    letter-spacing: -0.02em;
    color: var(--text-primary);
    margin: 1rem 0 1.2rem;
    max-width: 700px;
    transition: color 0.3s ease;
}

.ts-section__body {
    font-family: 'DM Sans', sans-serif;
    font-size: clamp(0.88rem, 1.1vw, 1rem);
    font-weight: 400;
    line-height: 1.65;
    color: var(--text-secondary);
    max-width: 600px;
    transition: color 0.3s ease;
}

.ts-section__body p { margin: 0 0 1.2rem; }
.ts-section__body p:last-child { margin-bottom: 0; }

/* ══════════════════════════════════════════════════════════
   LAYER CARDS — full-width stacked, number on right
   ══════════════════════════════════════════════════════════ */
.ts-layers {
    position: relative;
    z-index: 1;
    padding: 0 5vw;
    display: flex;
    flex-direction: column;
    gap: 1.2rem;
    margin-bottom: clamp(56px, 8vh, 96px);
}

.ts-layer {
    display: flex;
    align-items: stretch;
    justify-content: space-between;
    padding: 2.4rem 2.8rem;
    border-radius: 12px;
    background: rgba(0,0,0,0.03);
    border: 1px solid rgba(0,0,0,0.08);
    border-top: 2px solid rgba(255, 61, 0, 0.2);
    transition: background 0.3s ease, border-color 0.3s ease;
}

[data-theme="dark"] .ts-layer {
    background: rgba(255,255,255,0.03);
    border-color: rgba(255,255,255,0.06);
    border-top-color: rgba(255, 61, 0, 0.2);
}

.ts-layer__content {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
    max-width: 640px;
}

.ts-layer__label {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 0.68rem;
    font-weight: 500;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--ts);
}

.ts-layer__title {
    font-family: 'Space Grotesk', sans-serif;
    font-size: clamp(1.4rem, 2.4vw, 2rem);
    font-weight: 300;
    color: var(--text-primary);
    margin: 0;
    letter-spacing: -0.02em;
    line-height: 1.1;
}

.ts-layer__desc {
    font-family: 'DM Sans', sans-serif;
    font-size: clamp(0.82rem, 1vw, 0.92rem);
    font-weight: 400;
    line-height: 1.65;
    color: var(--text-secondary);
    margin: 0;
}

.ts-layer__key {
    font-family: 'DM Sans', sans-serif;
    font-size: clamp(0.78rem, 0.9vw, 0.86rem);
    font-weight: 400;
    line-height: 1.5;
    color: var(--text-muted);
    margin: 0.4rem 0 0;
    font-style: italic;
}

.ts-layer__num {
    font-family: 'Space Grotesk', sans-serif;
    font-size: clamp(4rem, 8vw, 8rem);
    font-weight: 200;
    line-height: 1;
    color: var(--ts);
    opacity: 0.12;
    align-self: center;
    flex-shrink: 0;
    margin-left: 2rem;
    user-select: none;
}

[data-theme="dark"] .ts-layer__num {
    opacity: 0.08;
}

/* ══════════════════════════════════════════════════════════
   PERSONA CARDS — rule + number + big title + desc
   Mirrors ktk-persona pattern exactly
   ══════════════════════════════════════════════════════════ */
.ts-personas {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0 4vw;
    width: 100%;
    margin-top: 3.5rem;
}

.ts-persona {
    position: relative;
    padding: 2.4rem 0 0;
    display: flex;
    flex-direction: column;
    gap: 1.2rem;
}

.ts-persona__rule {
    display: block;
    width: 100%;
    height: 1px;
    background: var(--text-primary);
    opacity: 0.15;
    margin-bottom: 0.4rem;
}

.ts-persona__num {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 0.72rem;
    font-weight: 400;
    letter-spacing: 0.14em;
    color: var(--text-muted);
}

.ts-persona__name {
    font-family: 'Space Grotesk', sans-serif;
    font-size: clamp(1.8rem, 3vw, 2.8rem);
    font-weight: 300;
    color: var(--text-primary);
    margin: 0;
    letter-spacing: -0.03em;
    line-height: 1;
}

.ts-persona__desc {
    font-family: 'DM Sans', sans-serif;
    font-size: clamp(0.88rem, 1.1vw, 1rem);
    font-weight: 300;
    line-height: 1.6;
    color: var(--text-secondary);
    margin: 0;
    max-width: 320px;
}

/* ══════════════════════════════════════════════════════════
   AUDIT SUMMARY — text block before the interactive list
   ══════════════════════════════════════════════════════════ */
.ts-audit-intro {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4vw;
    align-items: end;
}

.ts-audit-intro__right {
    border-left: 3px solid rgba(255, 61, 0, 0.25);
    border-radius: 0 8px 8px 0;
    padding: 1.5rem 2rem;
    background: rgba(255, 61, 0, 0.04);
}
.ts-audit-intro__right .ts-label {
    margin-bottom: 0.6rem;
}

.ts-audit-intro__summary {
    font-family: 'DM Sans', sans-serif;
    font-size: clamp(0.82rem, 1vw, 0.92rem);
    font-weight: 400;
    line-height: 1.65;
    color: var(--text-secondary);
    margin: 0;
}

/* ══════════════════════════════════════════════════════════
   FRAMEWORK AUDIT — collapsible <details> accordion
   ══════════════════════════════════════════════════════════ */
.ts-audit {
    position: relative;
    z-index: 1;
    padding: 0 5vw;
}

.ts-audit__list {
    display: flex;
    flex-direction: column;
}

/* Each item is a <details> element */
.ts-audit__item {
    border-bottom: 1px solid rgba(0,0,0,0.08);
    transition: border-color 0.3s ease;
}

[data-theme="dark"] .ts-audit__item { border-bottom-color: rgba(255,255,255,0.08); }
.ts-audit__item:first-child { border-top: 1px solid rgba(0,0,0,0.08); }
[data-theme="dark"] .ts-audit__item:first-child { border-top-color: rgba(255,255,255,0.08); }

/* Summary = clickable header row */
.ts-audit__header {
    display: flex;
    align-items: baseline;
    gap: 1.2rem;
    padding: 1.8rem 0;
    cursor: pointer;
    list-style: none;          /* Remove default marker */
    user-select: none;
}

.ts-audit__header::-webkit-details-marker { display: none; }
.ts-audit__header::marker { display: none; content: ''; }

/* Toggle chevron */
.ts-audit__toggle {
    margin-left: auto;
    flex-shrink: 0;
    width: 20px;
    height: 20px;
    position: relative;
}

.ts-audit__toggle::before,
.ts-audit__toggle::after {
    content: '';
    position: absolute;
    background: var(--text-muted);
    border-radius: 1px;
    transition: transform 0.3s ease, opacity 0.3s ease;
}

/* Horizontal bar (always visible) */
.ts-audit__toggle::before {
    width: 12px; height: 1.5px;
    top: 50%; left: 50%;
    transform: translate(-50%, -50%);
}

/* Vertical bar (hidden when open) */
.ts-audit__toggle::after {
    width: 1.5px; height: 12px;
    top: 50%; left: 50%;
    transform: translate(-50%, -50%);
}

.ts-audit__item[open] .ts-audit__toggle::after {
    transform: translate(-50%, -50%) scaleY(0);
    opacity: 0;
}

.ts-audit__num {
    font-family: 'Space Grotesk', sans-serif;
    font-size: clamp(0.88rem, 1.2vw, 1rem);
    font-weight: 400;
    color: var(--ts);
    flex-shrink: 0;
    line-height: 1;
    transition: color 0.3s ease;
}

.ts-audit__name {
    font-family: 'Space Grotesk', sans-serif;
    font-size: clamp(1rem, 1.6vw, 1.2rem);
    font-weight: 400;
    line-height: 1.25;
    color: var(--text-primary);
    margin: 0;
    transition: color 0.3s ease;
}

/* Smooth open/close via grid-template-rows trick */
.ts-audit__body {
    display: grid;
    grid-template-rows: 0fr;
    transition: grid-template-rows 0.35s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.3s ease;
    opacity: 0;
}

.ts-audit__item[open] .ts-audit__body {
    grid-template-rows: 1fr;
    opacity: 1;
}

.ts-audit__body-inner {
    overflow: hidden;
}

/* Content revealed on expand */
.ts-audit__cols {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
    padding: 0 0 2rem;
}

.ts-audit__col {
    padding: 1.2rem 1.4rem;
    border-radius: 8px;
}

.ts-audit__col--covers {
    background: rgba(34,139,34,0.05);
    border: 1px solid rgba(34,139,34,0.12);
}
[data-theme="dark"] .ts-audit__col--covers {
    background: rgba(34,139,34,0.07);
    border-color: rgba(34,139,34,0.18);
}

.ts-audit__col--misses {
    background: rgba(200,60,60,0.05);
    border: 1px solid rgba(200,60,60,0.12);
}
[data-theme="dark"] .ts-audit__col--misses {
    background: rgba(200,60,60,0.07);
    border-color: rgba(200,60,60,0.18);
}

.ts-audit__col-label {
    font-family: 'DM Sans', sans-serif;
    font-size: 0.65rem;
    font-weight: 500;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    margin: 0 0 0.6rem;
    display: flex;
    align-items: center;
    gap: 0.4rem;
    transition: color 0.3s ease;
}

.ts-audit__col--covers .ts-audit__col-label { color: #228B22; }
.ts-audit__col--misses .ts-audit__col-label { color: #C83C3C; }
[data-theme="dark"] .ts-audit__col--covers .ts-audit__col-label { color: #6BCB6B; }
[data-theme="dark"] .ts-audit__col--misses .ts-audit__col-label { color: #E87070; }
.ts-audit__col-label i { font-size: 10px; }

.ts-audit__col-text {
    font-family: 'DM Sans', sans-serif;
    font-size: clamp(0.82rem, 1vw, 0.9rem);
    line-height: 1.6;
    color: var(--text-secondary);
    margin: 0;
    transition: color 0.3s ease;
}

.ts-audit__source {
    display: inline-flex;
    align-items: center;
    color: var(--ts);
    text-decoration: none;
    opacity: 0.5;
    margin-left: 0.6rem;
    transition: opacity 0.2s ease;
}
.ts-audit__source:hover { opacity: 1; }
.ts-audit__source i { font-size: 0.65rem; }

/* ══════════════════════════════════════════════════════════
   PHASE × LAYER HEATMAP — 3 rows × 4 cols, colour-coded
   ══════════════════════════════════════════════════════════ */
.ts-heatmap {
    padding: 0 5vw;
    margin-bottom: clamp(56px, 8vh, 96px);
    overflow-x: auto;
}

.ts-heatmap__table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 6px;
    table-layout: fixed;
}

.ts-heatmap__corner {
    width: 140px;
}

.ts-heatmap__phase-head {
    font-family: 'Space Grotesk', sans-serif;
    font-weight: 400;
    color: var(--text-primary);
    text-align: left;
    padding: 0 1rem 1.4rem;
    vertical-align: bottom;
}

.ts-heatmap__phase-num {
    display: block;
    font-size: 0.68rem;
    font-weight: 400;
    letter-spacing: 0.14em;
    color: var(--ts);
    margin-bottom: 0.35rem;
}

.ts-heatmap__phase-name {
    display: block;
    font-size: clamp(0.88rem, 1.1vw, 1.05rem);
    line-height: 1.25;
}

.ts-heatmap__layer-head {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 0.88rem;
    font-weight: 400;
    color: var(--text-primary);
    padding: 1.4rem 1rem;
    vertical-align: middle;
    display: table-cell;
}

.ts-heatmap__layer-head i {
    color: var(--ts);
    opacity: 0.6;
    font-size: 0.76rem;
    margin-right: 0.6rem;
}

.ts-heatmap__cell {
    padding: 1.6rem 1.2rem;
    border-radius: 10px;
    vertical-align: top;
}

.ts-heatmap__level {
    display: block;
    font-family: 'Space Grotesk', sans-serif;
    font-size: 0.84rem;
    font-weight: 500;
    color: var(--text-primary);
    margin-bottom: 0.35rem;
}

.ts-heatmap__note {
    display: block;
    font-family: 'DM Sans', sans-serif;
    font-size: 0.74rem;
    font-weight: 400;
    color: var(--text-muted);
    line-height: 1.5;
}

/* Intensity levels — light mode */
.ts-heatmap__cell--high {
    background: rgba(255, 61, 0, 0.14);
    border: 1px solid rgba(255, 61, 0, 0.2);
}
.ts-heatmap__cell--medium {
    background: rgba(255, 61, 0, 0.07);
    border: 1px solid rgba(255, 61, 0, 0.1);
}
.ts-heatmap__cell--low {
    background: rgba(255, 61, 0, 0.03);
    border: 1px solid rgba(255, 61, 0, 0.05);
}
.ts-heatmap__cell--rupture {
    background: rgba(200, 60, 60, 0.08);
    border: 1px solid rgba(200, 60, 60, 0.14);
}

/* Dark mode */
[data-theme="dark"] .ts-heatmap__cell--high {
    background: rgba(255, 61, 0, 0.12);
    border-color: rgba(255, 61, 0, 0.18);
}
[data-theme="dark"] .ts-heatmap__cell--medium {
    background: rgba(255, 61, 0, 0.06);
    border-color: rgba(255, 61, 0, 0.1);
}
[data-theme="dark"] .ts-heatmap__cell--low {
    background: rgba(255, 61, 0, 0.02);
    border-color: rgba(255, 61, 0, 0.04);
}
[data-theme="dark"] .ts-heatmap__cell--rupture {
    background: rgba(232, 112, 112, 0.08);
    border-color: rgba(232, 112, 112, 0.14);
}

/* ══════════════════════════════════════════════════════════
   DATA MATRIX
   ══════════════════════════════════════════════════════════ */
.ts-matrix {
    position: relative;
    z-index: 1;
    padding: 0 5vw;
    overflow-x: auto;
}

.ts-matrix__title {
    font-family: 'DM Sans', sans-serif;
    font-size: 0.78rem;
    font-weight: 500;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--text-muted);
    margin: 0 0 1.2rem;
}

.ts-matrix__table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    font-family: 'DM Sans', sans-serif;
    font-size: 0.85rem;
}

.ts-matrix__table thead th {
    font-family: 'DM Sans', sans-serif;
    font-weight: 500;
    color: var(--text-muted);
    text-align: center;
    padding: 0.75rem 1rem;
    border-bottom: 1px solid rgba(255, 61, 0, 0.15);
    white-space: nowrap;
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.ts-matrix__table thead th.ts-matrix__cat-col {
    text-align: left;
    width: 160px;
}

.ts-matrix__table thead th.ts-matrix__highlight-col {
    color: var(--ts);
}

.ts-matrix__table tbody td {
    padding: 0.7rem 1rem;
    text-align: center;
    border-bottom: 1px solid rgba(255, 61, 0, 0.08);
    color: var(--text-secondary);
    vertical-align: middle;
}

[data-theme="dark"] .ts-matrix__table tbody td {
    border-bottom-color: rgba(255, 61, 0, 0.08);
}

.ts-matrix__table tbody td.ts-matrix__cat-col {
    text-align: left;
    color: var(--text-primary);
    font-size: 0.82rem;
}

td.ts-matrix__highlight-col {
    background: rgba(255, 61, 0, 0.06);
    color: var(--ts);
    font-weight: 500;
}

[data-theme="dark"] td.ts-matrix__highlight-col {
    background: rgba(255, 61, 0, 0.06);
}

.ts-matrix__row--total td {
    font-family: 'Space Grotesk', sans-serif;
    font-weight: 500;
    font-size: 0.95rem;
    color: var(--ts);
    padding: 1rem 1rem;
    border-top: 1px solid rgba(255, 61, 0, 0.2);
    border-bottom: none;
    background: rgba(255, 61, 0, 0.06);
}

[data-theme="dark"] .ts-matrix__row--total td {
    background: rgba(255, 61, 0, 0.06);
}

.ts-matrix__row--total td.ts-matrix__highlight-col {
    background: rgba(255, 61, 0, 0.12);
}

[data-theme="dark"] .ts-matrix__row--total td.ts-matrix__highlight-col {
    background: rgba(255, 61, 0, 0.1);
}

/* ══════════════════════════════════════════════════════════
   PARTICIPANTS — two-column layout with tier cards
   ══════════════════════════════════════════════════════════ */
.ts-participants {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4vw;
    align-items: center;
}

.ts-participants__right {
    display: flex;
    gap: 1rem;
}

.ts-tier-card {
    flex: 1;
    padding: 1.4rem 1.2rem;
    border-radius: 12px;
    background: rgba(0, 0, 0, 0.04);
    border: 1px solid rgba(0, 0, 0, 0.08);
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.5rem;
}

[data-theme="dark"] .ts-tier-card {
    background: rgba(255, 255, 255, 0.04);
    border-color: rgba(255, 255, 255, 0.08);
}

.ts-tier-card__count {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 1.6rem;
    font-weight: 300;
    color: var(--ts);
    line-height: 1;
}

.ts-tier-card__name {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 0.88rem;
    font-weight: 500;
    line-height: 1.3;
    color: var(--text-primary);
    margin: 0;
}

.ts-tier-card__tag {
    font-family: 'DM Sans', sans-serif;
    font-size: 0.68rem;
    font-weight: 500;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--text-muted);
}

/* ══════════════════════════════════════════════════════════
   METHOD — gated section with CTA + modal
   ══════════════════════════════════════════════════════════ */
.ts-method {
    position: relative;
    padding: clamp(56px, 10vh, 96px) 5vw;
}

.ts-method__inner {
    max-width: 900px;
}

.ts-method__statement {
    font-family: 'Space Grotesk', sans-serif;
    font-size: clamp(1.6rem, 3.5vw, 2.8rem);
    font-weight: 300;
    line-height: 1.35;
    letter-spacing: -0.02em;
    color: var(--text-primary);
    margin: 1rem 0 1.5rem;
}

.ts-method__highlight {
    color: var(--ts);
    font-weight: 500;
}

.ts-method__note {
    font-family: 'DM Sans', sans-serif;
    font-size: 0.8rem;
    color: var(--text-muted);
    margin: 0 0 2rem;
}

.ts-method__cta {
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    margin-top: 2rem;
    padding: 0.9rem 1.8rem;
    font-family: 'Space Grotesk', sans-serif;
    font-size: 0.88rem;
    font-weight: 500;
    color: var(--ts);
    background: none;
    border: 1px solid rgba(255, 61, 0, 0.3);
    border-radius: 999px;
    cursor: pointer;
    transition: background 0.2s ease, border-color 0.2s ease;
}

.ts-method__cta:hover {
    background: rgba(255, 61, 0, 0.08);
    border-color: rgba(255, 61, 0, 0.5);
}

[data-theme="dark"] .ts-method__cta {
    border-color: rgba(255, 61, 0, 0.3);
}

[data-theme="dark"] .ts-method__cta:hover {
    background: rgba(255, 61, 0, 0.08);
    border-color: rgba(255, 61, 0, 0.5);
}

.ts-method__cta i { font-size: 0.75rem; }

/* Modal */
.ts-modal {
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    z-index: 100002;
    display: flex;
    align-items: center;
    justify-content: center;
}

.ts-modal__backdrop {
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
}

.ts-modal__panel {
    position: relative;
    background: var(--bg);
    border: 1px solid rgba(255, 61, 0, 0.15);
    border-radius: 16px;
    padding: 2.4rem 2.8rem;
    max-width: 480px;
    width: 90%;
    box-shadow: 0 24px 80px rgba(0, 0, 0, 0.3);
}

.ts-modal__close {
    position: absolute;
    top: 1.2rem; right: 1.2rem;
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 1rem;
    cursor: pointer;
    padding: 0.4rem;
    transition: color 0.2s ease;
}
.ts-modal__close:hover { color: var(--text-primary); }

.ts-modal__title {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 1.2rem;
    font-weight: 500;
    color: var(--text-primary);
    margin: 0 0 0.4rem;
}

.ts-modal__subtitle {
    font-family: 'DM Sans', sans-serif;
    font-size: 0.82rem;
    color: var(--text-muted);
    margin: 0 0 1.8rem;
}

.ts-modal__form {
    display: flex;
    flex-direction: column;
    gap: 1.2rem;
}

.ts-modal__label {
    font-family: 'DM Sans', sans-serif;
    font-size: 0.78rem;
    font-weight: 500;
    color: var(--text-secondary);
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}

.ts-modal__input,
.ts-modal__textarea {
    font-family: 'DM Sans', sans-serif;
    font-size: 0.88rem;
    padding: 0.7rem 0.9rem;
    border: 1px solid rgba(0, 0, 0, 0.12);
    border-radius: 8px;
    background: var(--bg);
    color: var(--text-primary);
    outline: none;
    transition: border-color 0.2s ease;
}

.ts-modal__input:focus,
.ts-modal__textarea:focus {
    border-color: var(--ts);
}

[data-theme="dark"] .ts-modal__input,
[data-theme="dark"] .ts-modal__textarea {
    border-color: rgba(255, 255, 255, 0.12);
}

.ts-modal__textarea { resize: vertical; }

.ts-modal__submit {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 0.88rem;
    font-weight: 500;
    padding: 0.8rem 1.6rem;
    background: var(--ts);
    color: #fff;
    border: none;
    border-radius: 999px;
    cursor: pointer;
    transition: opacity 0.2s ease;
    margin-top: 0.4rem;
}

.ts-modal__submit:hover { opacity: 0.85; }
.ts-modal__submit:disabled { opacity: 0.5; cursor: not-allowed; }

/* ══════════════════════════════════════════════════════════
   KEY FINDINGS — pie charts, entry grid, capital caps
   ══════════════════════════════════════════════════════════ */
.ts-findings {
    padding: 0 5vw;
    margin-bottom: clamp(56px, 8vh, 96px);
}

.ts-findings__section {
    margin-bottom: 2rem;
}
.ts-findings__section:last-child { margin-bottom: 0; }

.ts-findings__title {
    font-family: 'DM Sans', sans-serif;
    font-size: 0.78rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--text-muted);
    margin: 0 0 2rem;
}


/* ── Pie charts — donut rings ── */
.ts-pies {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 2rem;
}

.ts-pie {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
}

.ts-pie__ring {
    position: relative;
    width: 140px;
    height: 140px;
    border-radius: 50%;
    background: conic-gradient(
        var(--color) calc(var(--pct) * 1%),
        rgba(128, 128, 128, 0.1) calc(var(--pct) * 1%)
    );
    display: flex;
    align-items: center;
    justify-content: center;
}

.ts-pie__ring::after {
    content: '';
    position: absolute;
    width: 94px;
    height: 94px;
    border-radius: 50%;
    background: var(--bg);
    transition: background 0.3s ease;
}

.ts-pie__num {
    position: relative;
    z-index: 1;
    font-family: 'Space Grotesk', sans-serif;
    font-size: 1.3rem;
    font-weight: 500;
    color: var(--text-primary);
}

.ts-pie__label {
    font-family: 'DM Sans', sans-serif;
    font-size: 0.74rem;
    line-height: 1.4;
    color: var(--text-muted);
    text-align: center;
    margin: 0;
    max-width: 160px;
}

/* ── Trust entry points ── */
.ts-findings__section--entry {
    margin-top: 8rem;
}
.ts-findings__section--notable {
    margin-top: 8rem;
}
#ts-callouts {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
    width: 100%;
    margin-top: 2rem;
}

.ts-callout {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    padding: 1.5rem;
    background: rgba(0, 0, 0, 0.03);
    border-radius: 12px;
    border: 1px solid rgba(0, 0, 0, 0.06);
    transition: background 0.3s ease, border-color 0.3s ease;
}

[data-theme="dark"] .ts-callout {
    background: rgba(255, 255, 255, 0.03);
    border-color: rgba(255, 255, 255, 0.05);
}

.ts-callout__num {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 0.8rem;
    font-weight: 500;
    color: var(--ts);
    letter-spacing: 0.04em;
    flex-shrink: 0;
    padding-top: 0.15rem;
    transition: color 0.3s ease;
}

.ts-callout__body {
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
}

.ts-callout__title {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 1rem;
    font-weight: 500;
    color: var(--text-primary);
    margin: 0;
    transition: color 0.3s ease;
}

.ts-callout__text {
    font-family: 'DM Sans', sans-serif;
    font-size: clamp(0.88rem, 1.1vw, 0.95rem);
    font-weight: 400;
    line-height: 1.7;
    color: var(--text-secondary);
    margin: 0;
    transition: color 0.3s ease;
}

@media (max-width: 768px) {
    #ts-callouts { grid-template-columns: 1fr; }
    .ts-callout { padding: 1.4rem 1.2rem; gap: 1rem; }
}

.ts-findings__section--caps {
    margin-top: 8rem;
}
.ts-findings__section--obs {
    margin-top: 8rem;
}
.ts-entry-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    width: 100%;
}
.ts-entry {
    position: relative;
    padding: 2.4rem 5vw 0;
    display: flex;
    flex-direction: column;
    gap: 1.2rem;
}
.ts-entry:first-child { padding-left: 0; }
.ts-entry:last-child { padding-right: 0; }
.ts-entry__rule {
    display: block;
    width: 100%; height: 1px;
    background: rgba(0, 0, 0, 0.08);
    margin-bottom: 0.4rem;
}
[data-theme="dark"] .ts-entry__rule {
    background: rgba(255, 255, 255, 0.08);
}
.ts-entry__num {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 0.72rem;
    font-weight: 400;
    letter-spacing: 0.04em;
    color: var(--text-muted);
}
.ts-entry__name {
    font-family: 'Space Grotesk', sans-serif;
    font-size: clamp(1.4rem, 2vw, 1.75rem);
    font-weight: 300;
    color: var(--text-primary);
    margin: 0;
    letter-spacing: -0.02em;
    line-height: 1;
}
.ts-entry__desc {
    font-family: 'DM Sans', sans-serif;
    font-size: clamp(0.88rem, 1.1vw, 1rem);
    font-weight: 400;
    line-height: 1.55;
    color: var(--text-muted);
    margin: 0;
    max-width: 320px;
}
@media (max-width: 768px) {
    .ts-entry-grid { grid-template-columns: 1fr; gap: 3rem; }
    .ts-entry { padding: 0 !important; }
}

/* ── Capital findings ── */
#ts-cap__findings {
    display: flex;
    flex-direction: column;
}

.ts-cap__finding {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 2.5rem;
    align-items: center;
    padding: 2.5rem 0;
    border-bottom: 1px solid rgba(0, 0, 0, 0.08);
}

.ts-cap__finding:last-child {
    border-bottom: none;
}

[data-theme="dark"] .ts-cap__finding {
    border-bottom-color: rgba(255, 255, 255, 0.08);
}

.ts-cap__title {
    font-family: 'Space Grotesk', sans-serif;
    font-size: clamp(1.3rem, 2.2vw, 1.8rem);
    font-weight: 400;
    line-height: 1.2;
    color: var(--text-primary);
    margin: 0 0 0.6rem 0;
}

.ts-cap__body {
    font-family: 'DM Sans', sans-serif;
    font-size: clamp(0.85rem, 1.1vw, 0.95rem);
    font-weight: 400;
    line-height: 1.6;
    color: var(--text-muted);
    margin: 0;
    max-width: 440px;
}

.ts-cap__viz {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 0.8rem;
}

.ts-cap__pictograph {
    display: flex;
    gap: 4px;
}

.ts-cap__person {
    position: relative;
    width: 18px;
    height: 32px;
    flex-shrink: 0;
}

.ts-cap__person-bg,
.ts-cap__person-fill {
    position: absolute;
    inset: 0;
}

.ts-cap__person-bg svg,
.ts-cap__person-fill svg {
    width: 100%;
    height: 100%;
    display: block;
}

.ts-cap__person-bg {
    color: rgba(0, 0, 0, 0.12);
}

[data-theme="dark"] .ts-cap__person-bg {
    color: rgba(255, 255, 255, 0.12);
}

.ts-cap__person-fill {
    color: var(--ts);
    clip-path: inset(0 100% 0 0);
}

.ts-cap__stat {
    text-align: right;
    line-height: 1.2;
    margin: 0;
}

.ts-cap__num {
    font-family: 'Space Grotesk', sans-serif;
    font-size: clamp(2rem, 4vw, 3rem);
    font-weight: 400;
    letter-spacing: -0.03em;
    color: var(--ts);
}

.ts-cap__pct {
    font-family: 'Space Grotesk', sans-serif;
    font-size: clamp(1rem, 1.5vw, 1.3rem);
    font-weight: 300;
    color: var(--ts);
}

.ts-cap__stat-label {
    font-family: 'DM Sans', sans-serif;
    font-size: 0.68rem;
    font-weight: 400;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: var(--ts);
    opacity: 0.7;
}

@media (max-width: 600px) {
    .ts-cap__finding {
        grid-template-columns: 1fr;
        gap: 1.2rem;
    }
    .ts-cap__viz { align-items: flex-start; }
    .ts-cap__stat { text-align: left; }
}

@media (max-width: 768px) {
    .ts-pies { grid-template-columns: repeat(2, 1fr); }
}

/* Modal states */
.ts-modal__state--center {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    min-height: 200px;
}

.ts-modal__panel {
    transition: height 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    overflow: hidden;
}

/* Spinner */
.ts-modal__spinner {
    width: 36px;
    height: 36px;
    border: 3px solid rgba(255, 61, 0, 0.2);
    border-top-color: var(--ts);
    border-radius: 50%;
    animation: ts-spin 0.8s linear infinite;
}

@keyframes ts-spin {
    to { transform: rotate(360deg); }
}

/* Checkmark */
.ts-modal__check {
    width: 52px;
    height: 52px;
    border-radius: 50%;
    background: #228B22;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 1.2rem;
    animation: ts-pop 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes ts-pop {
    0% { transform: scale(0); opacity: 0; }
    100% { transform: scale(1); opacity: 1; }
}

.ts-modal__success-title {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 1.1rem;
    font-weight: 500;
    color: var(--text-primary);
    margin: 1.2rem 0 0.3rem;
}

.ts-modal__success-note {
    font-family: 'DM Sans', sans-serif;
    font-size: 0.82rem;
    color: var(--text-muted);
    margin: 0;
}

/* ══════════════════════════════════════════════════════════
   CREDITS
   ══════════════════════════════════════════════════════════ */

.ts-credits {
    position: relative;
    z-index: 1;
    width: 100%;
    margin-top: 16vh;
    padding: 14vh 5vw 12vh;
    box-sizing: border-box;
    background-color: var(--bg);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    transition: background-color 0.4s ease;
}
[data-theme="light"] .ts-credits {
    border-top-color: rgba(0, 0, 0, 0.1);
}

.ts-credits__grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 3rem 4rem;
    margin-top: 3rem;
    width: 100%;
}

.ts-credit__label {
    font-family: 'DM Sans', sans-serif;
    font-size: 0.62rem;
    font-weight: 500;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--ts);
    margin: 0 0 0.5rem;
    opacity: 0.7;
    transition: color 0.3s ease;
}

.ts-credit__value {
    font-family: 'DM Sans', sans-serif;
    font-size: clamp(0.84rem, 1vw, 0.92rem);
    line-height: 1.65;
    color: var(--text-secondary);
    margin: 0;
}
.ts-credit__value a {
    color: var(--ts);
    text-decoration: none;
    margin-left: 0.3em;
    transition: color 0.3s ease;
}

/* ── Footer spacing ───────────────────────────────────────── */
.ts-page footer { margin-top: 0; }

/* ── GSAP reveal initial state ────────────────────────────── */
.ts-reveal {
    opacity: 0;
    transform: translateY(28px);
}

/* ══════════════════════════════════════════════════════════
   TRUST STUDY ACCENT TOKENS
   ══════════════════════════════════════════════════════════ */
:root {
    --ts: #FF3D00;
    --ts-dim: rgba(255, 61, 0, 0.06);
    --ts-border: rgba(255, 61, 0, 0.15);
    --ts-card: rgba(255, 61, 0, 0.04);
}


/* ── Scroll progress bar (thinner for publication) ────────── */
.ts-progress {
    position: fixed;
    top: 0; left: 0;
    height: 1.5px;
    background: var(--ts);
    z-index: 100001;
    width: 0%;
    transform-origin: left;
}


/* ══════════════════════════════════════════════════════════
   RESPONSIVE
   ══════════════════════════════════════════════════════════ */
@media (max-width: 1024px) {
    .ts-audit__cols { gap: 1rem; }
    .ts-heatmap__table { font-size: 0.9em; }
}

@media (max-width: 768px) {
    .ts-audit-intro { grid-template-columns: 1fr; gap: 2rem; }
    .ts-audit-intro__right { padding: 1.5rem 1.6rem; }
    .ts-back { top: 5vh; left: 16px; }

    /* Cards and personas stack on mobile */
    .ts-layer { flex-direction: column; padding: 1.8rem 1.4rem; gap: 1.2rem; }
    .ts-layer__num { align-self: flex-end; margin-left: 0; font-size: 3rem; }
    .ts-personas { grid-template-columns: 1fr; }
    .ts-persona { padding: 2rem 0 0; }
    .ts-persona:first-child { padding-left: 0; }
    .ts-persona:last-child { padding-right: 0; }
    .ts-section { padding: 6vh 5vw; }
    .ts-section--tight { padding-bottom: 2vh; }
    .ts-method { padding: 6vh 5vw; }
    .ts-method__cta { margin-top: 1rem; }
    .ts-participants { grid-template-columns: 1fr; }
    .ts-participants__right { flex-direction: row; gap: 0.6rem; }
    .ts-tier-card { padding: 0.9rem 0.8rem; gap: 0.25rem; border-radius: 10px; }
    .ts-tier-card__count { font-size: 1.3rem; order: 1; }
    .ts-tier-card__tag { order: 2; margin: 0; }
    .ts-tier-card__name { order: 3; font-size: 0.78rem; }

    .ts-audit__cols {
        grid-template-columns: 1fr;
        gap: 0.8rem;
    }

    .ts-section--tight { padding-bottom: 4vh; }

    .ts-heatmap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
    .ts-heatmap__table { table-layout: auto; min-width: 580px; }
    .ts-heatmap__corner { width: 80px; }
    .ts-heatmap__cell { padding: 0.8rem 0.6rem; }

    .ts-callout { padding: 1.2rem 1rem; }
    .ts-findings__section--entry,
    .ts-findings__section--notable,
    .ts-findings__section--caps,
    .ts-findings__section--obs { margin-top: 3rem; }

    .ts-credits__grid { grid-template-columns: repeat(2, 1fr); gap: 2.5rem 3rem; }

    .ts-matrix__table { font-size: 0.78rem; }
    .ts-matrix__table thead th,
    .ts-matrix__table tbody td { padding: 0.6rem 0.5rem; }
    .ts-matrix__cat-col { width: 100px !important; }
}

@media (max-width: 480px) {
    .ts-matrix__table { font-size: 0.7rem; }
    .ts-credits__grid { grid-template-columns: 1fr; gap: 2rem; }
    .ts-hero__title { font-size: clamp(2rem, 8vw, 3rem); }
}
