/* Masters thesis section in Masters page */
.theses-section {
    --thesis-accent: var(--color-domain-data, var(--color-primary));
    --thesis-tint: color-mix(in oklab, var(--thesis-accent) 7%, var(--color-surface));
    --thesis-tint-strong: color-mix(in oklab, var(--thesis-accent) 14%, var(--color-surface));
    --thesis-line: color-mix(in oklab, var(--thesis-accent) 30%, var(--color-border));
    --thesis-body: color-mix(in oklab, var(--color-text) 78%, var(--color-text-muted));
    --thesis-pad: clamp(var(--space-4), 3vw, var(--space-6));

    margin-block: var(--space-12);
}

.theses-section [hidden],
.thesis-expose [hidden] {
    display: none !important;
}

.theses-section__intro {
    max-width: 65ch;
    margin: 0 0 var(--space-8);
    color: var(--thesis-body);
    font-size: var(--text-base);
    line-height: 1.7;
}

/* ── Thesis container & identity ──────────────────────────── */

.thesis-feature {
    min-width: 0;
    counter-reset: expose-step;
}

.thesis-feature+.thesis-feature {
    margin-top: var(--space-16);
    padding-top: var(--space-12);
    border-top: 1px solid var(--color-border);
}

.thesis-feature__header {
    margin-bottom: var(--space-6);
    padding: var(--space-6) var(--thesis-pad);
    border: 1px solid var(--thesis-line);
    border-radius: var(--radius-xl);
    background: var(--thesis-tint);
}

.thesis-feature__eyebrow {
    display: inline-flex;
    align-items: center;
    gap: var(--space-2);
    margin: 0 0 var(--space-3);
    padding: var(--space-1) var(--space-3);
    border-radius: var(--radius-full);
    background: var(--color-surface);
    color: var(--color-text);
    font-size: var(--text-xs);
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.thesis-feature__eyebrow::before {
    content: "";
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--thesis-accent);
}

.thesis-feature__title {
    max-width: 40ch;
    margin: 0 0 var(--space-4);
    color: var(--color-text);
    font-size: var(--text-xl);
    font-weight: 700;
    line-height: 1.25;
    overflow-wrap: anywhere;
    text-wrap: balance;
}

.thesis-feature__synopsis {
    max-width: 62ch;
    margin: 0;
    color: var(--thesis-body);
    font-size: var(--text-base);
    line-height: 1.7;
}

/* ── Facts strip + contribution (Block A) ─────────────────── */

.thesis-expose {
    min-width: 0;
    color: var(--color-text);
}

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

.thesis-expose__facts {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1px;
    /* 1px gaps show the divider colour */
    margin: 0 0 var(--space-4);
    overflow: hidden;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    background: var(--color-border);
}

.thesis-expose__facts>div {
    min-width: 0;
    padding: var(--space-4) var(--space-5);
    background: var(--color-surface);
}

.thesis-expose__facts dt {
    margin-bottom: var(--space-2);
    color: var(--thesis-body);
    font-size: var(--text-xs);
    line-height: 1.5;
}

.thesis-expose__facts dd {
    margin: 0;
    color: var(--thesis-accent);
    font-size: var(--text-xl);
    font-weight: 700;
    line-height: 1.1;
    font-variant-numeric: tabular-nums;
}

.thesis-expose__facts dd span {
    display: block;
    margin-top: var(--space-2);
    color: var(--thesis-body);
    font-size: var(--text-xs);
    font-weight: 400;
    line-height: 1.5;
}

.thesis-expose__contribution {
    max-width: none;
    margin: 0 0 var(--space-6);
    padding: var(--space-4) var(--space-5);
    border: 1px solid var(--thesis-line);
    border-radius: var(--radius-lg);
    background: var(--thesis-tint);
    color: var(--thesis-body);
    font-size: var(--text-sm);
    line-height: 1.7;
}

.thesis-expose__contribution strong {
    display: block;
    margin-bottom: var(--space-1);
    color: var(--color-text);
    font-size: var(--text-xs);
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

/* ── Paper + presentation ─────────────────────────────────── */

.thesis-feature__evidence {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: var(--space-5);
    align-items: start;
    margin-bottom: var(--space-6);
}

.theses-section .evidence-card,
.theses-section .evidence-card__body {
    min-width: 0;
}

.theses-section .evidence-card {
    box-shadow: var(--shadow-sm);
}

.theses-section .evidence-card__body {
    padding: var(--space-5);
}

.theses-section .evidence-card__canva {
    position: relative;
    flex-shrink: 0;
    width: 100%;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    background: var(--color-surface-2);
    border-bottom: 1px solid var(--color-border);
}

.theses-section .evidence-card__canva[data-orientation="portrait"] {
    aspect-ratio: 210 / 297;
}

.theses-section .evidence-card__video {
    position: relative;
    flex-shrink: 0;
    width: 100%;
    aspect-ratio: 16 / 9;
    overflow: hidden;
}

.theses-section .evidence-card__canva iframe,
.theses-section .evidence-card__video iframe {
    position: absolute;
    inset: 0;
    display: block;
    width: 100%;
    height: 100%;
    max-width: none;
    border: 0;
}

.thesis-feature__media-note {
    margin: 0;
    color: var(--thesis-body);
    font-size: var(--text-sm);
    line-height: 1.65;
}

/* ── Research summary: one panel, three readable rows ───────── */

.thesis-feature__research {
    /* Explicit values, so nothing depends on undefined variables. */
    --research-accent: var(--thesis-accent, var(--color-primary));
    --research-copy: color-mix(in oklch, var(--color-text) 80%, var(--color-bg));

    display: block;
    margin: 0 0 var(--space-6);
    overflow: hidden;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    background: var(--color-surface);
}

.thesis-feature__research>div {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: var(--space-3);
    min-width: 0;
    padding: var(--space-5);
    /* Cancels the old per-card box. */
    border: 0;
    border-radius: 0;
    background: transparent;
}

.thesis-feature__research>div+div {
    border-top: 1px solid var(--color-border);
}

.thesis-feature__research dt {
    display: flex;
    align-items: center;
    align-self: start;
    gap: var(--space-2);
    margin: 0;
    color: var(--color-text);
    font-size: var(--text-xs);
    font-weight: 700;
    letter-spacing: 0.06em;
    line-height: 1.5;
    text-transform: uppercase;
}

.thesis-feature__research dt::before {
    content: "";
    flex-shrink: 0;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--research-accent);
}

.thesis-feature__research dd {
    display: grid;
    gap: var(--space-3);
    max-width: 68ch;
    min-width: 0;
    margin: 0;
}

.thesis-feature__research dd p,
.thesis-feature__research dd li {
    max-width: none;
}

/* One strong sentence per row, then supporting detail. */
.thesis-feature__lead {
    margin: 0;
    color: var(--color-text);
    font-size: var(--text-base);
    font-weight: 600;
    line-height: 1.55;
}

.thesis-feature__sub {
    margin: 0;
    color: var(--research-copy);
    font-size: var(--text-sm);
    line-height: 1.7;
}

/* Attribute chips and the ranking share one pill style. */
.thesis-feature__chips,
.thesis-feature__ranking {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-2);
    margin: 0;
    padding: 0;
    list-style: none;
}

.thesis-feature__chips li,
.thesis-feature__ranking li {
    display: inline-flex;
    align-items: center;
    gap: var(--space-2);
    padding: var(--space-1) var(--space-3);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-full);
    background: var(--color-surface-2);
    color: var(--color-text);
    font-size: var(--text-xs);
    font-weight: 500;
    line-height: 1.5;
}

.thesis-feature__ranking {
    counter-reset: rank;
}

.thesis-feature__ranking li::before {
    counter-increment: rank;
    content: counter(rank);
    color: var(--color-text-muted);
    font-weight: 700;
    font-variant-numeric: tabular-nums;
}

/* Numbered method steps */
.thesis-feature__steps {
    display: grid;
    gap: var(--space-3);
    margin: 0;
    padding: 0;
    list-style: none;
    counter-reset: step;
}

.thesis-feature__steps li {
    position: relative;
    padding-inline-start: var(--space-8);
    color: var(--research-copy);
    font-size: var(--text-sm);
    line-height: 1.7;
    counter-increment: step;
}

.thesis-feature__steps li::before {
    content: counter(step);
    position: absolute;
    inset-inline-start: 0;
    top: 0.2em;
    display: grid;
    place-items: center;
    width: 1.5rem;
    height: 1.5rem;
    border: 1px solid var(--color-border);
    border-radius: 50%;
    color: var(--color-text);
    font-size: var(--text-xs);
    font-weight: 700;
    line-height: 1;
    font-variant-numeric: tabular-nums;
}

.thesis-feature__note {
    margin: 0;
    padding-top: var(--space-3);
    border-top: 1px solid var(--color-border);
    color: var(--color-text-muted);
    font-size: var(--text-xs);
    line-height: 1.65;
}

.thesis-feature__note strong {
    color: var(--color-text);
    font-weight: 600;
}

/* Label column on the left once there is room. */
@media (min-width: 760px) {
    .thesis-feature__research>div {
        grid-template-columns: 10.5rem minmax(0, 1fr);
        gap: var(--space-6);
        padding: var(--space-6);
    }

    /* Aligns the label with the first line of the lead sentence. */
    .thesis-feature__research dt {
        padding-top: 0.3em;
    }
}

/* ── Resource links ───────────────────────────────────────── */

.theses-section .evidence-card__actions {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-2);
    margin-top: var(--space-4);
}

.theses-section .evidence-card__action {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    padding: var(--space-2) var(--space-4);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    background: transparent;
    color: var(--thesis-body);
    font-size: var(--text-xs);
    font-weight: 600;
    line-height: 1.4;
    text-decoration: none;
    transition: color var(--transition), background var(--transition),
        border-color var(--transition);
}

.theses-section .evidence-card__action--primary {
    border-color: var(--thesis-line);
    background: var(--thesis-tint);
    color: var(--color-text);
}

/* ── Numbered sections ────────────────────────────────────── */

.thesis-expose__section {
    min-width: 0;
    counter-increment: expose-step;
    margin-top: var(--space-12);
    padding-top: var(--space-8);
    border-top: 1px solid var(--color-border);
}

.thesis-expose__section-head {
    margin-bottom: var(--space-6);
}

.thesis-expose__eyebrow {
    margin: 0 0 var(--space-2);
    color: var(--color-text);
    font-size: var(--text-xs);
    font-weight: 700;
    line-height: 1.5;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.thesis-expose__section-head .thesis-expose__eyebrow::before {
    content: counter(expose-step, decimal-leading-zero) "  ";
    color: var(--thesis-accent);
    font-variant-numeric: tabular-nums;
}

.thesis-expose__section-head h4 {
    max-width: 30ch;
    margin: 0 0 var(--space-3);
    color: var(--color-text);
    font-size: var(--text-lg);
    font-weight: 700;
    line-height: 1.3;
    text-wrap: balance;
}

.thesis-expose__section-head>p:last-child {
    max-width: 65ch;
    margin: 0;
    color: var(--thesis-body);
    font-size: var(--text-base);
    line-height: 1.7;
}

/* ── Context explorer ─────────────────────────────────────── */

.thesis-expose__explorer {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    overflow: hidden;
    border: 1px solid var(--thesis-line);
    border-radius: var(--radius-xl);
    background: var(--color-surface);
    box-shadow: var(--shadow-sm);
}

.thesis-expose__context-form {
    min-width: 0;
    margin: 0;
    padding: var(--thesis-pad);
}

.thesis-expose__context-form fieldset {
    min-width: 0;
    margin: 0;
    padding: 0;
    border: 0;
}

.thesis-expose__context-form legend {
    max-width: 100%;
    margin-bottom: var(--space-2);
    padding: 0;
    color: var(--color-text);
    font-size: var(--text-base);
    font-weight: 700;
    line-height: 1.4;
}

.thesis-expose__helper {
    max-width: 60ch;
    margin: 0;
    color: var(--thesis-body);
    font-size: var(--text-xs);
    line-height: 1.65;
}

.thesis-expose__fields {
    display: grid;
    gap: var(--space-4);
    margin-top: var(--space-5);
}

.thesis-expose__field {
    min-width: 0;
}

.thesis-expose__field label {
    display: block;
    margin-bottom: var(--space-2);
    color: var(--color-text);
    font-size: var(--text-xs);
    font-weight: 600;
    line-height: 1.5;
}

.thesis-expose__field select {
    display: block;
    width: 100%;
    min-width: 0;
    min-height: 44px;
    padding: var(--space-3);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    background: var(--color-surface-2);
    color: var(--color-text);
    font: inherit;
    font-size: max(1rem, var(--text-base));
    /* avoid iOS zoom on focus */
    line-height: 1.5;
    transition: border-color var(--transition), background var(--transition);
}

.thesis-expose__reset {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    margin-top: var(--space-5);
    padding: var(--space-2) var(--space-4);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    background: transparent;
    color: var(--thesis-body);
    font: inherit;
    font-size: var(--text-xs);
    font-weight: 600;
    cursor: pointer;
}

/* The "result" side carries the tint, so it reads as the output */
.thesis-expose__context-preview {
    min-width: 0;
    padding: var(--thesis-pad);
    border-top: 1px solid var(--thesis-line);
    background: var(--thesis-tint);
}

.thesis-expose__preview-intro {
    margin: 0 0 var(--space-4);
    color: var(--color-text);
    font-size: var(--text-sm);
    line-height: 1.65;
}

.thesis-expose__context-summary {
    display: grid;
    gap: 0;
    margin: 0;
}

.thesis-expose__context-summary>div {
    min-width: 0;
    padding: var(--space-3) 0;
    border-bottom: 1px dashed var(--thesis-line);
}

.thesis-expose__context-summary>div:first-child {
    padding-top: 0;
}

.thesis-expose__context-summary dt {
    margin-bottom: var(--space-1);
    color: var(--thesis-body);
    font-size: var(--text-xs);
    line-height: 1.5;
}

.thesis-expose__context-summary dd {
    margin: 0;
    color: var(--color-text);
    font-size: var(--text-sm);
    font-weight: 600;
    line-height: 1.5;
    overflow-wrap: anywhere;
}

.thesis-expose__preview-question {
    margin: var(--space-5) 0 var(--space-3);
    padding: var(--space-3) var(--space-4);
    border: 1px solid var(--thesis-line);
    border-radius: var(--radius-md);
    background: var(--color-surface);
    color: var(--color-text);
    font-size: var(--text-sm);
    font-weight: 700;
    line-height: 1.6;
}

/* ── Findings callout and implications ────────────────────── */

.thesis-expose__finding {
    padding: var(--space-6) var(--thesis-pad);
    border: 1px solid var(--thesis-line);
    border-radius: var(--radius-xl);
    background: var(--thesis-tint);
}

.thesis-expose__finding-label {
    display: inline-block;
    margin: 0 0 var(--space-3);
    padding: var(--space-1) var(--space-3);
    border-radius: var(--radius-full);
    background: var(--color-surface);
    color: var(--color-text);
    font-size: var(--text-xs);
    font-weight: 700;
    letter-spacing: 0.06em;
    line-height: 1.5;
    text-transform: uppercase;
}

.thesis-expose__finding>p:last-child {
    max-width: 62ch;
    margin: 0;
    color: var(--color-text);
    font-size: var(--text-base);
    line-height: 1.7;
}

.thesis-expose__implications {
    display: grid;
    gap: var(--space-4);
    margin: var(--space-6) 0 0;
    counter-reset: implication;
}

.thesis-expose__implications>div {
    min-width: 0;
    counter-increment: implication;
    padding: var(--space-5);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    background: var(--color-surface);
}

.thesis-expose__implications>div::before {
    content: counter(implication);
    content: counter(implication) / "";
    /* decorative: skip for screen readers */
    display: block;
    margin-bottom: var(--space-3);
    color: var(--thesis-accent);
    font-size: var(--text-xl);
    font-weight: 700;
    line-height: 1;
}

.thesis-expose__implications dt {
    margin-bottom: var(--space-2);
    color: var(--color-text);
    font-size: var(--text-sm);
    font-weight: 700;
    line-height: 1.5;
}

.thesis-expose__implications dd {
    margin: 0;
    color: var(--thesis-body);
    font-size: var(--text-sm);
    line-height: 1.7;
}

/* ── Disclosures: tidy accordions ─────────────────────────── */

.thesis-expose__disclosures {
    display: grid;
    gap: var(--space-3);
}

.thesis-expose__detail {
    min-width: 0;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    background: var(--color-surface);
}

.thesis-expose__detail[open] {
    border-color: var(--thesis-line);
    box-shadow: var(--shadow-sm);
}

.thesis-expose__detail>summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--space-4);
    min-height: 44px;
    padding: var(--space-4) var(--space-5);
    border-radius: var(--radius-lg);
    color: var(--color-text);
    font-size: var(--text-sm);
    font-weight: 600;
    line-height: 1.5;
    cursor: pointer;
    list-style: none;
}

.thesis-expose__detail>summary::-webkit-details-marker {
    display: none;
}

.thesis-expose__detail>summary::after {
    content: "";
    flex-shrink: 0;
    width: 0.5rem;
    height: 0.5rem;
    border-right: 2px solid var(--thesis-accent);
    border-bottom: 2px solid var(--thesis-accent);
    transform: rotate(45deg);
    transition: transform var(--transition);
}

.thesis-expose__detail[open]>summary {
    border-bottom: 1px solid var(--thesis-line);
    border-bottom-left-radius: 0;
    border-bottom-right-radius: 0;
    background: var(--thesis-tint);
}

.thesis-expose__detail[open]>summary::after {
    transform: rotate(-135deg);
}

.thesis-expose__detail-body {
    min-width: 0;
    padding: var(--space-5);
}

.thesis-expose__detail-body>p {
    max-width: 70ch;
    margin: 0 0 var(--space-4);
    color: var(--thesis-body);
    font-size: var(--text-sm);
    line-height: 1.7;
}

.thesis-expose__detail-body> :last-child {
    margin-bottom: 0;
}

.thesis-expose__list {
    display: grid;
    gap: var(--space-3);
    margin: 0 0 var(--space-4);
    padding-inline-start: var(--space-5);
}

.thesis-expose__list li {
    max-width: 70ch;
    color: var(--thesis-body);
    font-size: var(--text-sm);
    line-height: 1.7;
}

.thesis-expose__list li::marker {
    color: var(--thesis-accent);
}

.thesis-expose__list strong {
    color: var(--color-text);
    font-weight: 600;
}

/* ── Original table / figure slots ────────────────────────── */

.thesis-expose__table-slot {
    min-width: 0;
    margin: var(--space-5) 0 0;
}

.thesis-expose__table-slot figcaption {
    margin-bottom: var(--space-2);
    color: var(--color-text);
    font-size: var(--text-xs);
    font-weight: 600;
    line-height: 1.6;
}

.thesis-expose__table-placeholder {
    display: grid;
    place-items: center;
    min-height: 10rem;
    padding: var(--space-4);
    border: 1px dashed var(--thesis-line);
    border-radius: var(--radius-md);
    background: var(--thesis-tint);
    color: var(--thesis-body);
    font-size: var(--text-xs);
    line-height: 1.6;
    text-align: center;
}

.thesis-expose__table-scroll {
    max-width: 100%;
    overflow-x: auto;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
}

.thesis-expose__table-scroll table {
    width: 100%;
    border-collapse: collapse;
    font-size: var(--text-xs);
    font-variant-numeric: tabular-nums;
}

.thesis-expose__table-scroll th,
.thesis-expose__table-scroll td {
    padding: var(--space-3);
    border-bottom: 1px solid var(--color-border);
    text-align: start;
    vertical-align: top;
}

.thesis-expose__table-scroll thead th {
    background: var(--thesis-tint-strong);
    color: var(--color-text);
    font-weight: 700;
}

.thesis-expose__table-scroll td {
    color: var(--thesis-body);
}

.thesis-expose__table-scroll tbody tr:nth-child(even) {
    background: var(--thesis-tint);
}

/* ── Figure images: labels, framing, responsive behaviour ───── */

.thesis-expose__table-slot figcaption {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: var(--space-1) var(--space-2);
}

.thesis-expose__figure-label {
    color: var(--color-text);
    font-weight: 700;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.thesis-expose__figure-title {
    color: var(--color-text);
    font-weight: 600;
}

/* White backing keeps transparent-background PNGs readable in dark mode. */
.thesis-expose__figure-media {
    max-width: 100%;
    overflow-x: auto;
    padding: var(--space-3);
    border: 1px solid var(--thesis-line, var(--color-border));
    border-radius: var(--radius-md);
    background: #fff;
    -webkit-overflow-scrolling: touch;
}

/* Natural size, never upscaled, shrinks to fit narrow containers. */
.thesis-expose__figure-media img {
    display: block;
    width: auto;
    max-width: 100%;
    height: auto;
    margin-inline: auto;
}

.thesis-expose__figure-hint {
    display: none;
    margin: var(--space-2) 0 0;
    color: var(--color-text-muted);
    font-size: var(--text-xs);
    line-height: 1.5;
}

@media (max-width: 52rem) {
    .thesis-expose__table-slot--scroll .thesis-expose__figure-hint {
        display: block;
    }
}

.thesis-expose__figure-note {
    max-width: 70ch;
    margin: var(--space-3) 0 0;
    color: var(--color-text-muted);
    font-size: var(--text-xs);
    line-height: 1.65;
}

.thesis-expose__figure-link {
    display: inline-flex;
    align-items: center;
    min-height: 44px;
    margin-top: var(--space-1);
    color: var(--color-text-muted);
    font-size: var(--text-xs);
    font-weight: 600;
    text-underline-offset: 0.2em;
}

.thesis-expose__figure-stack {
    display: grid;
    gap: var(--space-5);
    margin-top: var(--space-5);
}

.thesis-expose__figure-stack>.thesis-expose__table-slot {
    margin-top: 0;
}

.thesis-expose__figure-error {
    margin: 0;
    padding: var(--space-4);
    color: #444;
    font-size: var(--text-xs);
    line-height: 1.6;
    text-align: center;
}

.thesis-expose__figure-media:focus-visible,
.thesis-expose__figure-link:focus-visible {
    outline: 2px solid var(--color-text);
    outline-offset: 3px;
}

@media (hover: hover) {
    .thesis-expose__figure-link:hover {
        color: var(--color-text);
    }
}

/* Optional: soften glare of the white frame in dark mode.
        [data-theme="dark"] .thesis-expose__figure-media img { filter: brightness(0.92); }
        */

/* ── Notes ────────────────────────────────────────────────── */

.thesis-expose__boundary,
.thesis-expose__detail-body>.thesis-expose__boundary {
    max-width: 70ch;
    margin-top: var(--space-4);
    color: var(--thesis-body);
    font-size: var(--text-xs);
    line-height: 1.65;
}

.thesis-expose__sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip-path: inset(50%);
    white-space: nowrap;
    border: 0;
}

/* ── Ranking and group comparison ─────────────────────────── */

.thesis-expose__ranking-block {
    margin-bottom: var(--space-6);
}

.thesis-expose__ranking,
.thesis-expose__group-list {
    display: grid;
    gap: var(--space-2);
    margin: 0 0 var(--space-3);
    padding-inline-start: var(--space-6);
    color: var(--color-text);
    font-size: var(--text-sm);
    line-height: 1.6;
}

.thesis-expose__ranking li::marker,
.thesis-expose__group-list li::marker {
    color: var(--thesis-accent);
    font-weight: 700;
}

.thesis-expose__picker {
    min-width: 0;
    margin: 0 0 var(--space-4);
    padding: 0;
    border: 0;
}

.thesis-expose__picker legend {
    margin-bottom: var(--space-2);
    color: var(--color-text);
    font-size: var(--text-sm);
    font-weight: 700;
}

.thesis-expose__segmented {
    position: relative;
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-2);
}

.thesis-expose__segmented input {
    position: absolute;
    width: 1px;
    height: 1px;
    opacity: 0;
}

.thesis-expose__segmented label {
    display: inline-flex;
    align-items: center;
    min-height: 44px;
    padding: var(--space-2) var(--space-4);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-full);
    background: var(--color-surface);
    color: var(--thesis-body);
    font-size: var(--text-xs);
    font-weight: 600;
    cursor: pointer;
    transition: background var(--transition), border-color var(--transition),
        color var(--transition);
}

.thesis-expose__segmented input:checked+label {
    border-color: var(--thesis-accent);
    background: var(--thesis-tint-strong);
    color: var(--color-text);
}

.thesis-expose__group-panel {
    padding: var(--space-5);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    background: var(--color-surface);
}

.thesis-expose__group-panel+.thesis-expose__group-panel {
    margin-top: var(--space-3);
}

.thesis-expose__group-panel h5 {
    margin: 0 0 var(--space-4);
    color: var(--color-text);
    font-size: var(--text-sm);
    font-weight: 700;
}

.thesis-expose__group-panel h5 span {
    color: var(--thesis-body);
    font-weight: 400;
}

.thesis-expose__group-columns {
    display: grid;
    gap: var(--space-5);
}

.thesis-expose__group-title {
    margin: 0 0 var(--space-2);
    color: var(--color-text);
    font-size: var(--text-sm);
    font-weight: 700;
}

.thesis-expose__group-title span {
    display: block;
    color: var(--thesis-body);
    font-size: var(--text-xs);
    font-weight: 400;
}

.thesis-expose__ref {
    color: var(--thesis-body);
    font-size: var(--text-xs);
}

/* ── Source-document toolbar ───────────────────── */
.thesis-toolbar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: var(--space-2);
    margin: 0 0 var(--space-5);
}

.thesis-toolbar .evidence-card__action {
    gap: var(--space-2);
}

/* Slides panel: let the embed fill the disclosure body. */
.thesis-defence .evidence-card__canva {
    margin-top: var(--space-3);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
}

@media (max-width: 480px) {

    /* Primary action gets its own row on small screens. */
    .thesis-toolbar .evidence-card__action--primary {
        flex: 1 1 100%;
    }
}

/* ── Focus, hover, active ─────────────────────────────────── */

.theses-section .evidence-card__action:focus-visible,
.thesis-expose__field select:focus-visible,
.thesis-expose__reset:focus-visible,
.thesis-expose__detail>summary:focus-visible,
.thesis-expose__table-scroll:focus-visible,
.thesis-expose__segmented input:focus-visible+label {
    outline: 2px solid var(--color-text);
    outline-offset: 3px;
}

@media (hover: hover) {

    .theses-section .evidence-card__action:hover,
    .thesis-expose__reset:hover,
    .thesis-expose__segmented label:hover {
        border-color: var(--thesis-accent);
        background: var(--thesis-tint);
        color: var(--color-text);
    }

    .thesis-expose__field select:hover {
        border-color: var(--thesis-accent);
    }

    .thesis-expose__detail:not([open])>summary:hover {
        background: var(--thesis-tint);
    }
}

.theses-section .evidence-card__action:active,
.thesis-expose__reset:active {
    background: var(--thesis-tint-strong);
}

/* ── Responsive ───────────────────────────────────────────── */

@media (min-width: 640px) {
    .thesis-expose__group-columns {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (min-width: 700px) {
    .thesis-expose__facts {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }
}

@media (min-width: 800px) {
    .thesis-feature__evidence {
        grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.15fr);
    }

    .thesis-feature__evidence> :only-child {
        grid-column: 1 / -1;
        justify-self: center;
        width: 100%;
        max-width: 40rem;
    }
}

@media (min-width: 900px) {
    .thesis-expose__implications {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media (min-width: 1000px) {

    .thesis-expose__explorer {
        grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    }

    .thesis-expose__context-preview {
        border-top: 0;
        border-inline-start: 1px solid var(--thesis-line);
    }
}

@media (prefers-reduced-motion: reduce) {

    .theses-section .evidence-card__action,
    .thesis-expose__field select,
    .thesis-expose__segmented label,
    .thesis-expose__detail>summary::after {
        transition: none;
    }
}

@media print {
    .thesis-expose__context-form {
        display: none;
    }

    .thesis-expose__explorer {
        display: block;
    }

    .thesis-expose__context-preview {
        border: 0;
    }
}
