.tve-explorer {
    --tve-ink: #292622;
    --tve-muted: #6f685f;
    --tve-paper: #f4efe5;
    --tve-paper-light: #fffdf8;
    --tve-charcoal: #171817;
    --tve-charcoal-soft: #242523;
    --tve-brick: #9f4938;
    --tve-brick-dark: #733226;
    --tve-lead: #6f7c7d;
    --tve-gold: #bd9a57;
    --tve-line: rgba(41, 38, 34, 0.18);
    container: tve-explorer / inline-size;
    box-sizing: border-box;
    width: min(100%, 1400px);
    margin: 0 auto;
    overflow: hidden;
    border: 1px solid rgba(41, 38, 34, 0.28);
    background: var(--tve-charcoal);
    color: var(--tve-ink);
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    line-height: 1.5;
}

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

.tve-explorer [hidden] {
    display: none !important;
}

.tve-explorer button {
    font: inherit;
}

.tve-hero {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: clamp(24px, 4vw, 64px);
    align-items: end;
    padding: clamp(28px, 4vw, 58px);
    background:
        linear-gradient(115deg, rgba(255, 255, 255, 0.035), transparent 48%),
        repeating-linear-gradient(0deg, transparent 0 33px, rgba(255, 255, 255, 0.018) 34px),
        var(--tve-charcoal);
    color: #f6f0e6;
}

.tve-explorer .tve-eyebrow {
    margin: 0 0 8px !important;
    color: #d2af69;
    font-size: 0.7rem !important;
    font-weight: 800;
    letter-spacing: 0.16em;
    line-height: 1.35 !important;
    text-transform: uppercase;
}

.tve-explorer .tve-hero h2 {
    max-width: 850px;
    margin: 0 !important;
    color: #fffaf1;
    font-family: Georgia, "Times New Roman", serif;
    font-size: clamp(2.6rem, 5vw, 5.3rem) !important;
    font-weight: 400;
    letter-spacing: -0.045em;
    line-height: 0.95 !important;
}

.tve-explorer .tve-intro {
    max-width: 760px;
    margin: 16px 0 0 !important;
    color: rgba(246, 240, 230, 0.7);
    font-size: 1rem !important;
    line-height: 1.6 !important;
}

.tve-hero__facts {
    display: grid;
    grid-template-columns: repeat(3, minmax(105px, 1fr));
    min-width: min(100%, 390px);
    border-top: 1px solid rgba(255, 255, 255, 0.18);
    border-bottom: 1px solid rgba(255, 255, 255, 0.18);
}

.tve-hero__facts span {
    display: grid;
    gap: 3px;
    padding: 15px 13px;
    color: rgba(246, 240, 230, 0.58);
    font-size: 0.66rem;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.tve-hero__facts span + span {
    border-left: 1px solid rgba(255, 255, 255, 0.14);
}

.tve-hero__facts strong {
    color: #fffaf1;
    font-family: Georgia, "Times New Roman", serif;
    font-size: 1.75rem;
    font-weight: 400;
    letter-spacing: 0;
    line-height: 1;
}

.tve-view-nav {
    display: flex;
    gap: 0;
    overflow-x: auto;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    background: var(--tve-charcoal-soft);
}

.tve-view-nav button {
    min-height: 54px;
    padding: 12px clamp(18px, 3vw, 34px);
    border: 0;
    border-right: 1px solid rgba(255, 255, 255, 0.1);
    background: transparent;
    color: rgba(255, 255, 255, 0.64);
    font-size: 0.78rem;
    font-weight: 750;
    letter-spacing: 0.04em;
    white-space: nowrap;
    cursor: pointer;
}

.tve-view-nav button:hover,
.tve-view-nav button.is-active {
    background: var(--tve-paper);
    color: var(--tve-ink);
}

.tve-panel {
    padding: clamp(18px, 3vw, 38px);
    background: var(--tve-paper);
}

.tve-material-note {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(300px, 0.7fr);
    gap: 1px;
    margin-bottom: 14px;
    border: 1px solid var(--tve-line);
    background: var(--tve-line);
}

.tve-material-note > div,
.tve-material-note > button {
    min-height: 88px;
    padding: 17px 19px;
    border: 0;
    background: rgba(255, 255, 255, 0.64);
    color: var(--tve-ink);
    text-align: left;
}

.tve-material-note > button {
    cursor: pointer;
}

.tve-material-note > button:hover {
    background: #fff;
}

.tve-material-note__label,
.tve-material-note button > span {
    display: block;
    margin-bottom: 4px;
    color: var(--tve-brick-dark);
    font-size: 0.67rem;
    font-weight: 800;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

.tve-explorer .tve-material-note p,
.tve-material-note q {
    margin: 0 !important;
    color: var(--tve-muted);
    font-family: Georgia, "Times New Roman", serif;
    font-size: 0.91rem !important;
    line-height: 1.45 !important;
}

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

.tve-segment {
    display: inline-flex;
    border: 1px solid var(--tve-line);
    background: rgba(255, 255, 255, 0.5);
}

.tve-segment button {
    min-height: 39px;
    padding: 8px 13px;
    border: 0;
    background: transparent;
    color: var(--tve-muted);
    font-size: 0.72rem;
    font-weight: 750;
    cursor: pointer;
}

.tve-segment button + button {
    border-left: 1px solid var(--tve-line);
}

.tve-segment button:hover,
.tve-segment button.is-active {
    background: var(--tve-ink);
    color: #fff;
}

.tve-plan-layout {
    display: grid;
    grid-template-columns: minmax(0, 1.45fr) minmax(315px, 0.55fr);
    gap: 14px;
    align-items: stretch;
}

.tve-plan-card,
.tve-detail-card {
    min-width: 0;
    margin: 0;
    border: 1px solid var(--tve-line);
    background: var(--tve-paper-light);
}

.tve-modern-plan {
    min-height: 520px;
    padding: clamp(10px, 1.8vw, 24px);
    background:
        linear-gradient(rgba(255, 255, 255, 0.78), rgba(255, 255, 255, 0.78)),
        repeating-linear-gradient(90deg, #eadfce 0 1px, transparent 1px 24px),
        repeating-linear-gradient(0deg, #eadfce 0 1px, transparent 1px 12px),
        #efe6d8;
}

.tve-modern-plan svg {
    display: block;
    width: 100%;
    height: auto;
    color: rgba(102, 61, 45, 0.32);
}

.tve-vault-wall {
    fill: rgba(255, 253, 248, 0.74);
    stroke: #2f2b27;
    stroke-width: 6;
}

.tve-division {
    fill: none;
    stroke: #2f2b27;
    stroke-width: 4;
}

.tve-section-title {
    fill: #756d63;
    font-size: 14px;
    font-weight: 800;
    letter-spacing: 1.5px;
}

.tve-plan-section {
    transition: opacity 180ms ease;
}

.tve-coffin,
.tve-pile,
.tve-remains,
.tve-stone {
    cursor: pointer;
    outline: none;
}

.tve-coffin polygon {
    fill: #cbd1ce;
    stroke: #3b4546;
    stroke-width: 2.2;
    transition: fill 140ms ease, filter 140ms ease, stroke 140ms ease;
}

.tve-coffin text {
    fill: #273031;
    font-size: 17px;
    font-weight: 850;
    pointer-events: none;
}

.tve-coffin--child polygon {
    fill: #d8dcd9;
    stroke-width: 2;
}

.tve-coffin--child text {
    font-size: 12px;
}

.tve-pile path {
    fill: #858f8e;
    stroke: #313939;
    stroke-width: 2;
    transition: fill 140ms ease, filter 140ms ease;
}

.tve-pile .tve-child-line {
    fill: #a99273;
    stroke: #493f33;
}

.tve-pile text,
.tve-remains text {
    fill: #fff;
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 0.8px;
    pointer-events: none;
}

.tve-remains rect {
    fill: #6f5d4f;
    stroke: #3a2f28;
    stroke-width: 2;
    transition: fill 140ms ease, filter 140ms ease;
}

.tve-brick-wall {
    fill: none;
    stroke: var(--tve-brick);
    stroke-width: 8;
}

.tve-stone rect {
    fill: #b4aa98;
    stroke: #514a40;
    stroke-width: 2;
    transition: fill 140ms ease, filter 140ms ease;
}

.tve-stone text {
    fill: #332f29;
    font-size: 9px;
    font-weight: 850;
    letter-spacing: 0.6px;
    pointer-events: none;
}

.tve-compass path {
    fill: none;
    stroke: #756d63;
    stroke-width: 2;
}

.tve-compass text {
    fill: #756d63;
    font-family: Georgia, "Times New Roman", serif;
    font-size: 15px;
    font-weight: 700;
}

.tve-coffin:hover polygon,
.tve-coffin:focus-visible polygon,
.tve-coffin.is-selected polygon {
    fill: #d6ab69;
    stroke: #694824;
    filter: drop-shadow(0 5px 5px rgba(40, 29, 18, 0.25));
}

.tve-pile:hover path,
.tve-pile:focus-visible path,
.tve-pile.is-selected path,
.tve-remains:hover rect,
.tve-remains:focus-visible rect,
.tve-remains.is-selected rect,
.tve-stone:hover rect,
.tve-stone:focus-visible rect,
.tve-stone.is-selected rect {
    fill: #aa5b46;
    filter: drop-shadow(0 5px 5px rgba(40, 29, 18, 0.25));
}

.tve-explorer[data-plan-filter="a"] [data-tve-map-section="b"],
.tve-explorer[data-plan-filter="b"] [data-tve-map-section="a"] {
    opacity: 0.1;
    pointer-events: none;
}

.tve-original-plan {
    display: grid;
    min-height: 520px;
    place-content: center;
    padding: clamp(24px, 5vw, 70px);
    background: #f7f5ef;
    text-align: center;
}

.tve-original-plan img {
    display: block;
    width: min(100%, 780px);
    height: auto;
    margin: 0 auto;
    border: 1px solid #d8d2c7;
    background: white;
    image-rendering: auto;
}

.tve-explorer .tve-original-plan p {
    max-width: 620px;
    margin: 16px auto 0 !important;
    color: var(--tve-muted);
    font-size: 0.78rem !important;
}

.tve-plan-card figcaption {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 20px;
    padding: 11px 14px;
    border-top: 1px solid var(--tve-line);
    color: var(--tve-muted);
    font-size: 0.7rem;
}

.tve-plan-card figcaption span {
    display: inline-flex;
    gap: 7px;
    align-items: center;
}

.tve-key {
    width: 11px;
    height: 11px;
    border: 1px solid rgba(41, 38, 34, 0.35);
}

.tve-key--a { background: #cbd1ce; }
.tve-key--b { background: #858f8e; }

.tve-detail-card {
    position: relative;
    min-height: 100%;
    overflow: hidden;
    background:
        linear-gradient(160deg, rgba(189, 154, 87, 0.09), transparent 46%),
        var(--tve-paper-light);
}

.tve-detail-card::before {
    position: absolute;
    inset: 0 auto 0 0;
    width: 5px;
    background: var(--tve-brick);
    content: "";
}

.tve-detail-default,
.tve-detail {
    padding: clamp(24px, 3.2vw, 42px);
}

.tve-detail-kicker {
    margin: 0 0 8px !important;
    color: var(--tve-brick-dark);
    font-size: 0.68rem !important;
    font-weight: 850;
    letter-spacing: 0.13em;
    text-transform: uppercase;
}

.tve-explorer .tve-detail-card h3 {
    margin: 0 0 16px !important;
    color: var(--tve-ink);
    font-family: Georgia, "Times New Roman", serif;
    font-size: clamp(1.7rem, 2.7vw, 2.55rem) !important;
    font-weight: 400;
    letter-spacing: -0.025em;
    line-height: 1.06 !important;
}

.tve-explorer .tve-detail-card p {
    color: var(--tve-muted);
    font-size: 0.9rem !important;
    line-height: 1.6 !important;
}

.tve-detail-record {
    margin: 0 !important;
}

.tve-detail-prompt {
    display: flex;
    gap: 11px;
    align-items: center;
    margin-top: 28px;
    padding-top: 16px;
    border-top: 1px solid var(--tve-line);
    color: var(--tve-muted);
    font-size: 0.72rem;
    font-weight: 750;
    text-transform: uppercase;
}

.tve-detail-prompt span {
    color: var(--tve-brick-dark);
    font-family: Georgia, "Times New Roman", serif;
    font-size: 2rem;
    font-weight: 400;
}

.tve-connection {
    margin-top: 24px;
    padding: 15px 16px;
    border-left: 3px solid var(--tve-gold);
    background: rgba(189, 154, 87, 0.1);
}

.tve-connection > span {
    display: block;
    margin-bottom: 4px;
    color: #7c6332;
    font-size: 0.64rem;
    font-weight: 850;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

.tve-explorer .tve-connection p {
    margin: 0 !important;
    color: #544b3e;
    font-size: 0.8rem !important;
}

.tve-register {
    margin-top: 14px;
    border: 1px solid var(--tve-line);
    background: rgba(255, 255, 255, 0.48);
}

.tve-register summary {
    padding: 14px 17px;
    color: var(--tve-ink);
    font-size: 0.78rem;
    font-weight: 800;
    cursor: pointer;
}

.tve-register__grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1px;
    border-top: 1px solid var(--tve-line);
    background: var(--tve-line);
}

.tve-register__grid button {
    display: grid;
    gap: 3px;
    min-height: 118px;
    padding: 14px;
    border: 0;
    background: var(--tve-paper-light);
    color: var(--tve-ink);
    text-align: left;
    cursor: pointer;
}

.tve-register__grid button:hover {
    background: #f5ead6;
}

.tve-register__grid b {
    color: var(--tve-brick-dark);
    font-size: 0.68rem;
    text-transform: uppercase;
}

.tve-register__grid span {
    font-family: Georgia, "Times New Roman", serif;
    font-size: 1rem;
}

.tve-register__grid small {
    color: var(--tve-muted);
    font-size: 0.68rem;
    line-height: 1.4;
}

.tve-section-head {
    max-width: 860px;
    margin-bottom: 28px;
}

.tve-explorer .tve-section-head h3,
.tve-family > div > h3 {
    margin: 0 !important;
    color: var(--tve-ink);
    font-family: Georgia, "Times New Roman", serif;
    font-size: clamp(2rem, 4vw, 3.8rem) !important;
    font-weight: 400;
    letter-spacing: -0.035em;
    line-height: 1 !important;
}

.tve-explorer .tve-section-head > p:last-child {
    max-width: 750px;
    margin: 13px 0 0 !important;
    color: var(--tve-muted);
}

.tve-timeline {
    position: relative;
    display: grid;
    gap: 0;
    margin: 0 !important;
    padding: 0 !important;
    list-style: none !important;
}

.tve-timeline::before {
    position: absolute;
    top: 0;
    bottom: 0;
    left: 112px;
    width: 1px;
    background: rgba(41, 38, 34, 0.24);
    content: "";
}

.tve-timeline li {
    position: relative;
    display: grid;
    grid-template-columns: 94px minmax(0, 1fr);
    gap: 38px;
    padding: 0 0 26px !important;
}

.tve-timeline li::before {
    position: absolute;
    top: 8px;
    left: 107px;
    width: 11px;
    height: 11px;
    border: 2px solid var(--tve-paper);
    border-radius: 50%;
    background: var(--tve-brick);
    box-shadow: 0 0 0 1px var(--tve-brick);
    content: "";
}

.tve-timeline time {
    color: var(--tve-brick-dark);
    font-family: Georgia, "Times New Roman", serif;
    font-size: 1.25rem;
    text-align: right;
}

.tve-timeline h4,
.tve-evidence-grid h4 {
    margin: 0 0 5px !important;
    color: var(--tve-ink);
    font-family: Georgia, "Times New Roman", serif;
    font-size: 1.18rem !important;
    font-weight: 600;
}

.tve-explorer .tve-timeline p {
    max-width: 750px;
    margin: 0 !important;
    color: var(--tve-muted);
    font-size: 0.85rem !important;
}

.tve-evidence-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1px;
    border: 1px solid var(--tve-line);
    background: var(--tve-line);
}

.tve-evidence-grid article {
    min-height: 210px;
    padding: clamp(20px, 3vw, 34px);
    background: var(--tve-paper-light);
}

.tve-card-label {
    display: inline-block;
    margin-bottom: 18px;
    padding: 4px 7px;
    background: rgba(159, 73, 56, 0.11);
    color: var(--tve-brick-dark);
    font-size: 0.62rem;
    font-weight: 850;
    letter-spacing: 0.09em;
    text-transform: uppercase;
}

.tve-explorer .tve-evidence-grid p {
    margin: 0 !important;
    color: var(--tve-muted);
    font-size: 0.83rem !important;
    line-height: 1.6 !important;
}

.tve-family {
    display: grid;
    grid-template-columns: minmax(230px, 0.35fr) minmax(0, 0.65fr);
    gap: clamp(24px, 4vw, 54px);
    margin-top: clamp(28px, 4vw, 54px);
    padding-top: clamp(26px, 4vw, 48px);
    border-top: 1px solid var(--tve-line);
}

.tve-family-table {
    border: 1px solid var(--tve-line);
    background: var(--tve-paper-light);
}

.tve-family-row {
    display: grid;
    grid-template-columns: 65px minmax(150px, 0.42fr) minmax(0, 0.58fr);
    gap: 14px;
    align-items: start;
    width: 100%;
    padding: 12px 14px;
    border: 0;
    border-bottom: 1px solid var(--tve-line);
    background: transparent;
    color: var(--tve-ink);
    text-align: left;
    cursor: pointer;
}

.tve-family-row:last-child {
    border-bottom: 0;
}

.tve-family-row:not(.tve-family-row--head):hover {
    background: rgba(159, 73, 56, 0.08);
}

.tve-family-row--head {
    background: var(--tve-ink);
    color: #fff;
    font-size: 0.66rem;
    font-weight: 800;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    cursor: default;
}

.tve-family-row b {
    color: var(--tve-brick-dark);
}

.tve-family-row span {
    color: var(--tve-muted);
    font-size: 0.76rem;
    line-height: 1.45;
}

.tve-family-row span:nth-child(2) {
    color: var(--tve-ink);
    font-family: Georgia, "Times New Roman", serif;
    font-size: 0.88rem;
}

.tve-note {
    padding: 14px clamp(18px, 3vw, 38px);
    border-top: 1px solid rgba(255, 255, 255, 0.09);
    background: var(--tve-charcoal-soft);
}

.tve-explorer .tve-note p {
    max-width: 920px;
    margin: 0 !important;
    color: rgba(255, 255, 255, 0.55);
    font-size: 0.68rem !important;
    line-height: 1.5 !important;
}

.tve-view-nav button:focus-visible,
.tve-segment button:focus-visible,
.tve-material-note button:focus-visible,
.tve-register button:focus-visible,
.tve-family-row:focus-visible,
.tve-coffin:focus-visible,
.tve-pile:focus-visible,
.tve-remains:focus-visible,
.tve-stone:focus-visible {
    outline: 3px solid var(--tve-gold);
    outline-offset: 2px;
}

@container tve-explorer (max-width: 980px) {
    .tve-hero {
        grid-template-columns: 1fr;
    }

    .tve-plan-layout,
    .tve-family {
        grid-template-columns: 1fr;
    }

    .tve-modern-plan,
    .tve-original-plan {
        min-height: 0;
    }

    .tve-register__grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@container tve-explorer (max-width: 680px) {
    .tve-hero__facts,
    .tve-material-note,
    .tve-evidence-grid {
        grid-template-columns: 1fr;
    }

    .tve-hero__facts span + span {
        border-top: 1px solid rgba(255, 255, 255, 0.14);
        border-left: 0;
    }

    .tve-toolbar {
        display: grid;
    }

    .tve-segment {
        width: 100%;
    }

    .tve-segment button {
        flex: 1;
    }

    .tve-modern-plan {
        overflow-x: auto;
    }

    .tve-modern-plan svg {
        min-width: 720px;
    }

    .tve-register__grid {
        grid-template-columns: 1fr;
    }

    .tve-family-table {
        overflow-x: auto;
    }

    .tve-family-row {
        min-width: 620px;
    }
}

@container tve-explorer (max-width: 460px) {
    .tve-panel {
        padding: 14px;
    }

    .tve-view-nav button {
        min-height: 49px;
        padding-inline: 15px;
    }

    .tve-timeline::before {
        left: 73px;
    }

    .tve-timeline li {
        grid-template-columns: 58px minmax(0, 1fr);
        gap: 30px;
    }

    .tve-timeline li::before {
        left: 68px;
    }

    .tve-timeline time {
        font-size: 0.96rem;
    }
}

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