/* Methodology page: technical documentation layout.
   Scoped under .mt so nothing here leaks into other pages. */

.mt { --mt-line: rgba(255, 255, 255, 0.09); --mt-line-strong: rgba(255, 255, 255, 0.16); --mt-text: #d4d4d8; --mt-muted: #a1a1aa; --mt-dim: #71717a; --mt-accent: #fb923c; color: var(--mt-text); }
.mt a { color: #fdba74; text-decoration: underline; text-decoration-color: rgba(253, 186, 116, 0.35); text-underline-offset: 3px; }
.mt a:hover { color: #fff; text-decoration-color: currentColor; }
.mt code { padding: 0.08rem 0.35rem; border: 1px solid var(--mt-line); border-radius: 0.3rem; background: rgba(255, 255, 255, 0.04); font-family: ui-monospace, Menlo, Consolas, monospace; font-size: 0.82em; color: #e4e4e7; }
.mt strong { color: #f4f4f5; font-weight: 600; }

.mt-wrap { position: relative; margin: 0 auto; max-width: 64rem; padding: 0 1rem; }
@media (min-width: 640px) { .mt-wrap { padding: 0 1.5rem; } }

.mt-crumbs { display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem; margin: 0 0 1.25rem; font-family: ui-monospace, Menlo, Consolas, monospace; font-size: 0.75rem; color: var(--mt-dim); }
.mt-crumbs a { color: var(--mt-muted); text-decoration: none; }
.mt-crumbs a:hover { color: var(--mt-accent); }
.mt-crumbs [aria-current] { color: var(--mt-accent); }

/* Hero */
.mt-hero { max-width: 56rem; padding: 1rem 0 0; }
.mt-eyebrow { display: inline-block; margin: 0 0 1.25rem; padding: 0.4rem 0.8rem; border: 1px solid rgba(251, 146, 60, 0.35); border-radius: 999px; background: rgba(251, 146, 60, 0.06); font-family: ui-monospace, Menlo, Consolas, monospace; font-size: 0.72rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--mt-accent); }
.mt-eyebrow span { color: var(--mt-dim); padding: 0 0.35rem; }
.mt-hero h1 { margin: 0 0 1.1rem; font-size: 2.25rem; line-height: 1.1; font-weight: 800; letter-spacing: -0.025em; color: #fff; }
@media (min-width: 640px) { .mt-hero h1 { font-size: 3.5rem; } }
.mt-lede { margin: 0; font-size: 1.05rem; line-height: 1.65; color: #d1d5db; }
@media (min-width: 640px) { .mt-lede { font-size: 1.25rem; } }

.mt-meta { max-width: 56rem; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.75rem 1.5rem; margin: 1.5rem 0 0; padding: 0.9rem 0; border-top: 1px solid var(--mt-line); border-bottom: 1px solid var(--mt-line); }
@media (min-width: 640px) { .mt-meta { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.mt-meta dt { font-family: ui-monospace, Menlo, Consolas, monospace; font-size: 0.66rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--mt-dim); }
.mt-meta dd { margin: 0.15rem 0 0; font-size: 0.85rem; color: #e4e4e7; }

.mt-notice { margin: 2rem 0 0; padding: 1rem 1.25rem; border: 1px solid rgba(251, 146, 60, 0.3); border-radius: 0.75rem; background: rgba(251, 146, 60, 0.05); }
.mt-notice p { margin: 0 0 0.55rem; font-size: 0.92rem; line-height: 1.6; color: var(--mt-text); }
.mt-notice p:last-child { margin-bottom: 0; }

/* Document column */
.mt-doc { min-width: 0; }
.mt-sec { padding: 3.5rem 0 0; scroll-margin-top: 5rem; }
.mt-label { margin: 0 0 0.45rem; font-family: ui-monospace, Menlo, Consolas, monospace; font-size: 0.7rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--mt-accent); }
.mt-sec h2 { margin: 0 0 1rem; max-width: 52rem; font-size: 1.6rem; line-height: 1.2; font-weight: 800; letter-spacing: -0.02em; color: #fff; }
@media (min-width: 640px) { .mt-sec h2 { font-size: 2.25rem; } }
.mt-sec h3 { margin: 1.75rem 0 0.5rem; font-size: 1rem; line-height: 1.4; font-weight: 600; color: #fff; }
.mt-sec p { margin: 0 0 1rem; max-width: 52rem; font-size: 0.98rem; line-height: 1.7; }
.mt-sec ul:not([class]), .mt-sec ol.mt-plain { max-width: 52rem; margin: 0 0 1.1rem; padding-left: 1.25rem; font-size: 0.95rem; line-height: 1.7; }
.mt-sec li { margin-bottom: 0.35rem; }
.mt-sec li::marker { color: var(--mt-dim); }
.mt-sec section.mt-sub { margin-top: 1.5rem; padding: 1.25rem 1.25rem 0.5rem; border: 1px solid var(--mt-line); border-radius: 0.75rem; background: rgba(255, 255, 255, 0.02); }
.mt-sec section.mt-sub > h3 { margin-top: 0.15rem; }

/* Technical note */
.mt-note { margin: 0 0 1.25rem; padding: 0.8rem 1rem; border: 1px solid var(--mt-line); border-left: 2px solid var(--mt-line-strong); border-radius: 0.35rem; background: rgba(255, 255, 255, 0.025); font-size: 0.9rem; line-height: 1.6; }
.mt-note > :last-child { margin-bottom: 0; }
.mt-note .mt-note-title { display: block; margin-bottom: 0.25rem; font-family: ui-monospace, Menlo, Consolas, monospace; font-size: 0.66rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--mt-muted); }
.mt-note.is-warn { border-left-color: #f59e0b; }
.mt-note.is-warn .mt-note-title { color: #fbbf24; }

/* Numbered flow: boxed card grid */
.mt-flow { counter-reset: step; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.6rem; margin: 0 0 1.5rem; padding: 0.8rem; list-style: none; border: 1px solid var(--mt-line); border-radius: 0.75rem; background: rgba(255, 255, 255, 0.02); }
@media (min-width: 640px) { .mt-flow { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.mt-flow li { counter-increment: step; margin: 0; padding: 0.8rem 0.85rem; border: 1px solid var(--mt-line); border-radius: 0.5rem; background: rgba(255, 255, 255, 0.025); }
.mt-flow li::before { content: counter(step, decimal-leading-zero); display: block; margin-bottom: 0.35rem; font-family: ui-monospace, Menlo, Consolas, monospace; font-size: 0.68rem; color: var(--mt-accent); }
.mt-flow h3 { margin: 0 0 0.25rem; font-size: 0.95rem; }
.mt-flow p { margin: 0; font-size: 0.78rem; line-height: 1.5; color: var(--mt-muted); }

/* Horizontal path chain */
.mt-chain { display: flex; flex-direction: column; gap: 0; margin: 0 0 1.25rem; padding: 0; list-style: none; border: 1px solid var(--mt-line); border-radius: 0.35rem; font-family: ui-monospace, Menlo, Consolas, monospace; font-size: 0.74rem; }
.mt-chain li { position: relative; margin: 0; padding: 0.6rem 0.8rem; border-top: 1px solid var(--mt-line); color: #e4e4e7; }
.mt-chain li:first-child { border-top: 0; }
.mt-chain li small { display: block; margin-top: 0.1rem; font-size: 0.68rem; color: var(--mt-dim); }
@media (min-width: 640px) {
    .mt-chain { flex-direction: row; }
    .mt-chain li { flex: 1 1 0; border-top: 0; border-left: 1px solid var(--mt-line); }
    .mt-chain li:first-child { border-left: 0; }
    .mt-chain li:not(:last-child)::after { content: '\2192'; position: absolute; right: -0.45rem; top: 0.55rem; z-index: 1; width: 0.9rem; background: #09090b; text-align: center; color: var(--mt-accent); }
}

/* Spec list (key / value) */
.mt-spec { margin: 0 0 1.25rem; border: 1px solid var(--mt-line); border-radius: 0.35rem; }
.mt-spec > div { display: grid; grid-template-columns: 1fr; gap: 0.15rem; padding: 0.65rem 0.9rem; border-top: 1px solid var(--mt-line); }
.mt-spec > div:first-child { border-top: 0; }
@media (min-width: 640px) { .mt-spec > div { grid-template-columns: 9.5rem minmax(0, 1fr); gap: 1rem; } }
.mt-spec dt { font-family: ui-monospace, Menlo, Consolas, monospace; font-size: 0.7rem; letter-spacing: 0.06em; text-transform: uppercase; color: var(--mt-dim); padding-top: 0.15rem; }
.mt-spec dd { margin: 0; font-size: 0.9rem; line-height: 1.6; }

/* Compact stats */
.mt-stats { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); margin: 0 0 0.5rem; border: 1px solid var(--mt-line); border-radius: 0.35rem; overflow: hidden; }
@media (min-width: 640px) { .mt-stats { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.mt-stats > div { padding: 0.8rem 0.9rem; border-right: 1px solid var(--mt-line); border-bottom: 1px solid var(--mt-line); margin: -1px -1px 0 0; }
.mt-stats dt { order: 2; font-size: 0.74rem; line-height: 1.4; color: var(--mt-muted); }
.mt-stats dd { margin: 0 0 0.15rem; font-family: ui-monospace, Menlo, Consolas, monospace; font-size: 1.25rem; font-weight: 600; color: #fff; }
.mt-stats > div { display: flex; flex-direction: column; }
.mt-stats-src { margin: 0 0 1.25rem; font-size: 0.78rem; color: var(--mt-dim); }

/* Reference tables (stack into labelled rows on narrow screens) */
.mt-table { width: 100%; margin: 0 0 1.5rem; border-collapse: collapse; font-size: 0.86rem; line-height: 1.55; }
.mt-table caption { padding-bottom: 0.5rem; text-align: left; font-family: ui-monospace, Menlo, Consolas, monospace; font-size: 0.68rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--mt-dim); }
.mt-table th, .mt-table td { padding: 0.65rem 0.75rem; border-top: 1px solid var(--mt-line); text-align: left; vertical-align: top; }
.mt-table thead th { border-top: 1px solid var(--mt-line-strong); border-bottom: 1px solid var(--mt-line-strong); font-family: ui-monospace, Menlo, Consolas, monospace; font-size: 0.66rem; font-weight: 500; letter-spacing: 0.1em; text-transform: uppercase; color: var(--mt-dim); white-space: nowrap; }
.mt-table tbody th { font-weight: 600; color: #fff; white-space: nowrap; }
.mt-table tbody tr:last-child > * { border-bottom: 1px solid var(--mt-line); }
.mt-table .mt-group th { padding-top: 1.1rem; border-top: 0; font-family: ui-monospace, Menlo, Consolas, monospace; font-size: 0.68rem; font-weight: 500; letter-spacing: 0.1em; text-transform: uppercase; color: var(--mt-accent); white-space: normal; }
@media (max-width: 639px) {
    .mt-table thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
    .mt-table, .mt-table tbody, .mt-table tr, .mt-table th, .mt-table td { display: block; width: 100%; }
    .mt-table tbody tr { padding: 0.6rem 0; border-top: 1px solid var(--mt-line); }
    .mt-table tbody tr:last-child > * { border-bottom: 0; }
    .mt-table th, .mt-table td { padding: 0.2rem 0; border: 0; }
    .mt-table td[data-label]::before { content: attr(data-label); display: block; margin-top: 0.3rem; font-family: ui-monospace, Menlo, Consolas, monospace; font-size: 0.62rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--mt-dim); }
    .mt-table .mt-group { padding: 0; border: 0; }
    .mt-table .mt-group th { padding-top: 1rem; }
}

/* Condition -> behavior -> interpretation */
.mt-cbi { margin: 0 0 1.5rem; padding: 0; list-style: none; border-top: 1px solid var(--mt-line-strong); }
.mt-cbi > li { margin: 0; padding: 0.85rem 0; border-bottom: 1px solid var(--mt-line); }
.mt-cbi h3 { margin: 0 0 0.5rem; font-size: 0.92rem; }
.mt-cbi dl { display: grid; grid-template-columns: 1fr; gap: 0.5rem; margin: 0; }
@media (min-width: 640px) { .mt-cbi dl { grid-template-columns: 1fr 1fr; gap: 1.25rem; } }
.mt-cbi dt { font-family: ui-monospace, Menlo, Consolas, monospace; font-size: 0.64rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--mt-dim); }
.mt-cbi dd { margin: 0.1rem 0 0; font-size: 0.86rem; line-height: 1.55; }

/* Two-column comparison */
.mt-compare { display: grid; grid-template-columns: 1fr; margin: 0 0 1.25rem; border: 1px solid var(--mt-line); border-radius: 0.35rem; }
@media (min-width: 640px) { .mt-compare { grid-template-columns: 1fr 1fr; } .mt-compare > div + div { border-left: 1px solid var(--mt-line); border-top: 0; } }
.mt-compare > div { padding: 1rem 1.1rem; }
.mt-compare > div + div { border-top: 1px solid var(--mt-line); }
@media (min-width: 640px) { .mt-compare > div + div { border-top: 0; } }
.mt-compare h3 { margin: 0 0 0.25rem; font-size: 0.95rem; }
.mt-compare .mt-def { margin: 0 0 0.7rem; font-size: 0.86rem; line-height: 1.55; color: var(--mt-muted); }
.mt-compare ul { margin: 0; padding-left: 1.1rem; font-size: 0.86rem; line-height: 1.6; }

/* Evidence ladder */
.mt-ladder { counter-reset: tier; margin: 0 0 1.5rem; padding: 0; list-style: none; border: 1px solid var(--mt-line); border-radius: 0.35rem; }
.mt-ladder > li { counter-increment: tier; display: grid; grid-template-columns: 2.4rem minmax(0, 1fr); margin: 0; padding: 0.8rem 0.9rem; border-top: 1px solid var(--mt-line); }
.mt-ladder > li:first-child { border-top: 0; }
.mt-ladder > li::before { content: 'T' counter(tier); font-family: ui-monospace, Menlo, Consolas, monospace; font-size: 0.72rem; color: var(--mt-accent); padding-top: 0.12rem; }
.mt-ladder b { display: block; font-size: 0.9rem; font-weight: 600; color: #fff; }
.mt-ladder span { display: block; margin-top: 0.15rem; font-size: 0.85rem; line-height: 1.55; color: var(--mt-muted); }

/* Implemented / not measured */
.mt-status { display: grid; grid-template-columns: 1fr; gap: 1.25rem; margin: 0 0 1.25rem; }
@media (min-width: 640px) { .mt-status { grid-template-columns: 1fr 1fr; } }
.mt-status h3 { display: flex; align-items: center; gap: 0.5rem; margin: 0 0 0.5rem; font-family: ui-monospace, Menlo, Consolas, monospace; font-size: 0.7rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--mt-muted); }
.mt-status h3::before { content: ''; width: 0.5rem; height: 0.5rem; border-radius: 50%; background: #34d399; }
.mt-status .is-gap h3::before { background: transparent; border: 1px solid var(--mt-dim); }
.mt-status ul { margin: 0; padding-left: 1.1rem; font-size: 0.86rem; line-height: 1.6; }

/* Reading list */
.mt-reading { margin: 0 0 1.25rem; padding: 0; list-style: none; border-top: 1px solid var(--mt-line-strong); }
.mt-reading li { display: grid; grid-template-columns: 1fr; gap: 0.2rem; margin: 0; padding: 0.85rem 0; border-bottom: 1px solid var(--mt-line); }
.mt-reading .mt-topic { font-family: ui-monospace, Menlo, Consolas, monospace; font-size: 0.64rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--mt-dim); }
.mt-reading a { font-size: 0.95rem; font-weight: 600; color: #fff; text-decoration: none; }
.mt-reading a:hover { color: var(--mt-accent); }
.mt-reading p { margin: 0; font-size: 0.85rem; line-height: 1.55; color: var(--mt-muted); }

/* Corrections */
.mt-corrections { margin: 2.5rem 0 0; padding: 1.1rem 1.2rem; border: 1px solid var(--mt-line-strong); border-radius: 0.35rem; }
.mt-corrections h2 { font-size: 1.15rem; }
.mt-corrections ul { columns: 1; }
@media (min-width: 640px) { .mt-corrections ul { columns: 2; column-gap: 2rem; } }
.mt-corrections li { break-inside: avoid; }
.mt-actions { display: flex; flex-wrap: wrap; gap: 0.6rem; margin-top: 0.5rem; }
.mt-actions a { display: inline-flex; align-items: center; padding: 0.5rem 0.9rem; border: 1px solid var(--mt-line-strong); border-radius: 0.4rem; font-size: 0.85rem; color: #fff; text-decoration: none; }
.mt-actions a:hover { border-color: var(--mt-accent); color: var(--mt-accent); }
.mt-actions a.is-primary { border-color: var(--mt-accent); background: var(--mt-accent); color: #18181b; font-weight: 600; }
.mt-actions a.is-primary:hover { color: #18181b; filter: brightness(1.08); }

.mt-end { margin: 2rem 0 0; font-size: 0.78rem; color: var(--mt-dim); }

.mt-corrections p, .mt-corrections ul { font-size: 0.9rem; line-height: 1.65; }
.mt-corrections p { margin: 0 0 0.85rem; }
.mt-corrections ul { margin: 0 0 1rem; padding-left: 1.2rem; }
.mt-corrections h2 { margin: 0 0 0.6rem; color: #fff; font-weight: 700; }

/* Boxed index */
.mt-index { margin: 2rem 0 0; padding: 1.1rem 1.25rem; border: 1px solid var(--mt-line-strong); border-radius: 0.75rem; background: rgba(255, 255, 255, 0.02); }
.mt-index-title { margin: 0 0 0.7rem; font-family: ui-monospace, Menlo, Consolas, monospace; font-size: 0.7rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--mt-accent); }
.mt-index ol { display: grid; grid-template-columns: 1fr; gap: 0.15rem 1.5rem; margin: 0; padding: 0; list-style: none; }
@media (min-width: 640px) { .mt-index ol { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.mt-index a { display: flex; gap: 0.45rem; padding: 0.3rem 0; font-size: 0.86rem; line-height: 1.4; color: var(--mt-muted); text-decoration: none; }
.mt-index a:hover { color: #fff; }
.mt-index a b { flex: none; font-family: ui-monospace, Menlo, Consolas, monospace; font-size: 0.72rem; font-weight: 500; color: var(--mt-dim); }
.mt-index a:hover b { color: var(--mt-accent); }

/* Panels: tables, lists and cards get the same boxed treatment */
.mt-table-wrap, .mt-spec, .mt-cbi, .mt-reading { border-radius: 0.75rem; }
.mt-cbi, .mt-reading { padding: 0 1.1rem; border: 1px solid var(--mt-line); background: rgba(255, 255, 255, 0.02); }
.mt-cbi > li:last-child, .mt-reading li:last-child { border-bottom: 0; }
.mt-compare, .mt-ladder, .mt-stats { border-radius: 0.75rem; }
.mt-note { border-radius: 0.6rem; }
.mt-status > div { padding: 1rem 1.1rem; border: 1px solid var(--mt-line); border-radius: 0.75rem; background: rgba(255, 255, 255, 0.02); }
.mt-corrections { padding: 1.5rem; border-radius: 0.75rem; }
.mt-corrections h2 { font-size: 1.5rem; }
.mt-sec ul:not([class]), .mt-compare ul, .mt-status ul, .mt-corrections ul { list-style: disc; }
.mt-sec ol.mt-plain { list-style: decimal; }
.mt-hero { max-width: none; }
.mt-hero h1 { max-width: 52rem; }
.mt-lede { max-width: none; }
.mt-meta { max-width: none; }


/* ===== Visual polish ===== */
.mt { --mt-green: #34d399; --mt-red: #f87171; --mt-blue: #60a5fa; --mt-card: linear-gradient(180deg, rgba(255,255,255,0.045), rgba(255,255,255,0.015)); }

/* Hero */
.mt-wrap { isolation: isolate; }
.mt-hero { position: relative; padding: 1.5rem 0 0.5rem; }
.mt-hero::before { content: ''; position: absolute; z-index: -1; inset: -3rem -6rem auto -6rem; height: 26rem; background: radial-gradient(ellipse 60% 70% at 25% 0%, rgba(251,146,60,0.16), transparent 70%), radial-gradient(ellipse 40% 50% at 85% 10%, rgba(99,102,241,0.12), transparent 70%); pointer-events: none; }
.mt-hero::after { content: ''; position: absolute; z-index: -1; inset: -3rem -6rem auto -6rem; height: 26rem; background-image: linear-gradient(rgba(255,255,255,0.045) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,0.045) 1px, transparent 1px); background-size: 40px 40px; -webkit-mask-image: radial-gradient(ellipse 70% 80% at 30% 0%, #000 20%, transparent 75%); mask-image: radial-gradient(ellipse 70% 80% at 30% 0%, #000 20%, transparent 75%); pointer-events: none; }
.mt-hero h1 { background: linear-gradient(180deg, #fff 30%, #fdba74 140%); -webkit-background-clip: text; background-clip: text; color: transparent; }
.mt-meta { border: 1px solid var(--mt-line); border-radius: 0.75rem; background: var(--mt-card); padding: 1rem 1.25rem; }
.mt-meta dd { font-weight: 500; }
.mt-notice { position: relative; overflow: hidden; }
.mt-notice::before { content: ''; position: absolute; inset: 0 auto 0 0; width: 3px; background: linear-gradient(180deg, var(--mt-accent), rgba(251,146,60,0.2)); }

/* Index */
.mt-index { background: var(--mt-card); box-shadow: 0 1px 0 rgba(255,255,255,0.05) inset; }
.mt-index a { padding: 0.4rem 0.5rem; margin: 0 -0.5rem; border-radius: 0.4rem; transition: background 0.15s, color 0.15s; }
.mt-index a:hover { background: rgba(251,146,60,0.08); }

/* Section heads */
.mt-sec { padding-top: 4rem; }
.mt-sec > .mt-label { display: flex; align-items: center; gap: 0.9rem; }
.mt-sec > .mt-label::after { content: ''; flex: 1; height: 1px; background: linear-gradient(90deg, rgba(251,146,60,0.45), transparent); }
.mt-sec h2 { margin-bottom: 1.1rem; }
.mt-sub > .mt-label { display: inline-block; padding: 0.2rem 0.55rem; border: 1px solid rgba(251,146,60,0.3); border-radius: 0.3rem; background: rgba(251,146,60,0.06); }
.mt-sec section.mt-sub { background: var(--mt-card); border-top: 2px solid rgba(251,146,60,0.55); box-shadow: 0 20px 40px -30px rgba(0,0,0,0.8); }

/* Tables */
.mt-table { border-collapse: separate; border-spacing: 0; border: 1px solid var(--mt-line-strong); border-radius: 0.75rem; overflow: hidden; background: var(--mt-card); margin-top: 0.4rem; }
.mt-table caption { padding: 0 0 0.6rem 0.15rem; }
.mt-table th, .mt-table td { border-top: 1px solid var(--mt-line); }
.mt-table thead th { border-top: 0; border-bottom: 1px solid var(--mt-line-strong); background: rgba(255,255,255,0.05); padding-top: 0.75rem; padding-bottom: 0.75rem; }
.mt-table tbody tr:first-child > * { border-top: 0; }
.mt-table tbody tr:last-child > * { border-bottom: 0; }
.mt-table tbody tr:not(.mt-group):hover > * { background: rgba(251,146,60,0.045); }
.mt-table tbody th { color: #fff; }
.mt-table td { color: #d4d4d8; }
.mt-table .mt-group th { padding: 0.55rem 0.9rem; border-top: 1px solid var(--mt-line-strong); border-bottom: 1px solid var(--mt-line); background: linear-gradient(90deg, rgba(251,146,60,0.14), rgba(251,146,60,0.02)); color: #fdba74; }
.mt-table .mt-group:first-child th { border-top: 0; }
.mt-table th:first-child, .mt-table td:first-child { padding-left: 0.9rem; }
.mt-table th:last-child, .mt-table td:last-child { padding-right: 0.9rem; }
.mt-sub-label { display: block; margin-top: 0.2rem; font-family: ui-monospace, Menlo, Consolas, monospace; font-size: 0.62rem; font-weight: 400; letter-spacing: 0.08em; text-transform: uppercase; color: var(--mt-dim); }

/* Zebra rows: alternating tint across all tabular/lined content */
.mt-table tbody tr:not(.mt-group):nth-of-type(even) > * { background: rgba(255,255,255,0.028); }
.mt-table tbody tr:not(.mt-group):nth-of-type(even):hover > * { background: rgba(251,146,60,0.06); }
.mt-spec > div:nth-of-type(even) { background: rgba(255,255,255,0.022); }
.mt-spec > div:nth-of-type(even):hover { background: rgba(251,146,60,0.04); }
.mt-ladder > li:nth-of-type(even) { background: rgba(255,255,255,0.022); }
.mt-ladder > li:nth-of-type(even):hover { background: rgba(251,146,60,0.04); }
.mt-cbi > li:nth-of-type(even) { background: rgba(255,255,255,0.016); }
.mt-reading li:nth-of-type(even) { background: rgba(255,255,255,0.016); }
.mt-reading li:nth-of-type(even):hover { background: rgba(251,146,60,0.05); }
.mt-chips li:nth-of-type(even) { background: rgba(255,255,255,0.035); }
.mt-bars li:nth-of-type(even), .mt-stack li:nth-of-type(even) { background: rgba(255,255,255,0.018); }

/* Detail polish */
.mt ::selection { background: rgba(251,146,60,0.28); color: #fff; }
.mt-sec { position: relative; }
.mt-table { box-shadow: 0 24px 48px -32px rgba(0,0,0,0.9), 0 1px 0 rgba(255,255,255,0.04) inset; }
.mt-table tbody tr:not(.mt-group) > * { transition: background 0.15s; }
.mt-table tbody th { position: relative; }
.mt-table tbody tr:not(.mt-group) th::before { content: ''; position: absolute; left: 0; top: 0.65rem; bottom: 0.65rem; width: 2px; border-radius: 2px; background: var(--mt-accent); opacity: 0; transition: opacity 0.15s; }
.mt-table tbody tr:not(.mt-group):hover th::before { opacity: 0.7; }
.mt-spec > div, .mt-ladder > li, .mt-cbi > li, .mt-reading li { transition: background 0.15s; }
.mt-bars li, .mt-stack li { padding: 0.38rem 0.55rem; margin: 0 -0.55rem; border-radius: 0.4rem; transition: background 0.15s; }
.mt-bars li:hover, .mt-stack li:hover { background: rgba(251,146,60,0.05); }
.mt-bar i { box-shadow: 0 0 12px rgba(251,146,60,0.35); }
.mt-bar i.t-A { box-shadow: 0 0 12px rgba(52,211,153,0.3); }
.mt-bar i.t-B { box-shadow: 0 0 12px rgba(251,191,36,0.3); }
.mt-bar i.t-C { box-shadow: 0 0 12px rgba(248,113,113,0.3); }
.mt-dl { overflow: hidden; }
.mt-dl::after { content: ''; position: absolute; inset: auto 0 0 0; height: 2px; background: linear-gradient(90deg, var(--mt-accent), transparent); opacity: 0; transition: opacity 0.2s; }
.mt-dl:hover::after { opacity: 1; }
.mt-chips li { transition: border-color 0.15s, transform 0.15s; }
.mt-chips li:hover { border-color: rgba(251,146,60,0.5); transform: translateY(-1px); }
.mt-note.is-warn { background: linear-gradient(90deg, rgba(245,158,11,0.07), rgba(255,255,255,0.02)); }
.mt-chain li { transition: background 0.15s; }
.mt-chain li:hover { background: rgba(251,146,60,0.05); }
.mt-meta > div { padding: 0.15rem 0; }
.mt-actions a { transition: border-color 0.15s, color 0.15s, transform 0.15s, box-shadow 0.15s; }
.mt-actions a:hover { transform: translateY(-1px); box-shadow: 0 8px 20px -10px rgba(251,146,60,0.45); }
.mt-index li { border-radius: 0.4rem; }
.mt-index a:focus-visible, .mt-actions a:focus-visible, .mt-dl:focus-visible { outline: 2px solid var(--mt-accent); outline-offset: 2px; }
html { scroll-behavior: smooth; }

/* Status chips */
.mt-chip { display: inline-flex; align-items: center; gap: 0.4rem; padding: 0.18rem 0.6rem; border: 1px solid; border-radius: 999px; font-family: ui-monospace, Menlo, Consolas, monospace; font-size: 0.7rem; font-weight: 600; letter-spacing: 0.02em; white-space: nowrap; }
.mt-chip::before { content: ''; width: 0.4rem; height: 0.4rem; border-radius: 50%; background: currentColor; }
.mt-chip.is-found { color: var(--mt-green); border-color: rgba(52,211,153,0.35); background: rgba(52,211,153,0.08); }
.mt-chip.is-miss { color: var(--mt-red); border-color: rgba(248,113,113,0.35); background: rgba(248,113,113,0.08); }
.mt-chip.is-info { color: var(--mt-blue); border-color: rgba(96,165,250,0.35); background: rgba(96,165,250,0.08); }

/* Flow cards */
.mt-flow { background: var(--mt-card); }
.mt-flow li { position: relative; transition: border-color 0.2s, transform 0.2s; }
.mt-flow li:hover { border-color: rgba(251,146,60,0.5); transform: translateY(-2px); }
.mt-flow li::before { display: inline-flex; align-items: center; justify-content: center; width: 1.6rem; height: 1.6rem; margin-bottom: 0.55rem; border: 1px solid rgba(251,146,60,0.4); border-radius: 0.4rem; background: rgba(251,146,60,0.08); }

/* Chain */
.mt-chain { background: var(--mt-card); border-radius: 0.6rem; overflow: hidden; }
.mt-chain li { color: #fff; }

/* Spec */
.mt-spec { background: var(--mt-card); overflow: hidden; }
.mt-spec dt { color: #fdba74; }
.mt-spec > div:hover { background: rgba(255,255,255,0.025); }

/* Stats */
.mt-stats { background: var(--mt-card); }
.mt-stats dd { font-size: 1.6rem; background: linear-gradient(180deg, #fff, #fdba74); -webkit-background-clip: text; background-clip: text; color: transparent; }

/* Compare */
.mt-compare { background: var(--mt-card); overflow: hidden; }
.mt-compare > div { position: relative; }
.mt-compare > div::before { content: ''; position: absolute; inset: 0 0 auto 0; height: 2px; background: var(--mt-red); opacity: 0.7; }
.mt-compare > div:nth-child(2)::before { background: var(--mt-blue); }
.mt-compare h3 { font-size: 1.05rem; }
.mt-compare h3 + .mt-def { padding-bottom: 0.7rem; border-bottom: 1px dashed var(--mt-line); }
.mt-compare ul { padding-top: 0.2rem; }

/* Ladder */
.mt-ladder { background: var(--mt-card); overflow: hidden; }
.mt-ladder > li { position: relative; transition: background 0.15s; }
.mt-ladder > li:hover { background: rgba(255,255,255,0.025); }
.mt-ladder > li::after { content: ''; position: absolute; inset: 0 auto 0 0; width: 3px; background: var(--mt-accent); opacity: calc(1 - (var(--i, 0) * 0.18)); }
.mt-ladder > li:nth-child(2)::after { opacity: 0.8; }
.mt-ladder > li:nth-child(3)::after { opacity: 0.6; }
.mt-ladder > li:nth-child(4)::after { opacity: 0.4; }
.mt-ladder > li:nth-child(5)::after { opacity: 0.22; }
.mt-ladder > li::before { display: inline-flex; width: 1.7rem; height: 1.4rem; align-items: center; justify-content: center; border-radius: 0.3rem; background: rgba(251,146,60,0.1); padding-top: 0; }
.mt-ladder > li { grid-template-columns: 2.6rem minmax(0, 1fr); }

/* CBI list */
.mt-cbi { background: var(--mt-card); }
.mt-cbi h3 { display: flex; align-items: center; gap: 0.55rem; }
.mt-cbi h3::before { content: ''; flex: none; width: 0.5rem; height: 0.5rem; border-radius: 2px; background: var(--mt-accent); transform: rotate(45deg); }
.mt-cbi dl > div { padding: 0.6rem 0.8rem; border: 1px solid var(--mt-line); border-radius: 0.5rem; background: rgba(0,0,0,0.2); }

/* Status panels */
.mt-status > div { background: var(--mt-card); }
.mt-status h3 { color: #e4e4e7; }

/* Reading list */
.mt-reading li { transition: background 0.15s; margin: 0 -1.1rem; padding: 0.9rem 1.1rem; }
.mt-reading li:hover { background: rgba(251,146,60,0.05); }

/* Notes */
.mt-note { background: var(--mt-card); }

/* Corrections */
.mt-corrections { position: relative; overflow: hidden; background: radial-gradient(ellipse 60% 100% at 0% 0%, rgba(251,146,60,0.12), transparent 70%), var(--mt-card); border-color: rgba(251,146,60,0.3); }
.mt-corrections li::marker { color: var(--mt-accent); }

@media (max-width: 639px) {
    .mt-table { border: 0; background: none; border-radius: 0; overflow: visible; }
    .mt-table tbody tr:not(.mt-group) { margin-bottom: 0.7rem; padding: 0.7rem 0.9rem; border: 1px solid var(--mt-line); border-radius: 0.6rem; background: var(--mt-card); }
    .mt-table tbody tr:first-child > *, .mt-table tbody tr > * { border-top: 0; }
    .mt-table .mt-group { margin: 1.2rem 0 0.5rem; border: 0; }
    .mt-table .mt-group th { padding: 0.45rem 0.7rem; border-radius: 0.4rem; border: 1px solid rgba(251,146,60,0.25); }
    .mt-table tbody tr:hover > * { background: none; }
    .mt-table th:first-child, .mt-table td:first-child, .mt-table th:last-child, .mt-table td:last-child { padding-left: 0; padding-right: 0; }
    .mt-hero::before, .mt-hero::after { inset-inline: -1rem; }
    .mt-reading li { margin: 0 -1.1rem; }
}
.mt-hero::before, .mt-hero::after { inset: -4rem auto auto 50%; width: 100vw; height: 30rem; transform: translateX(-50%); }
.mt-hero::before { -webkit-mask-image: linear-gradient(180deg, #000 30%, transparent 100%); mask-image: linear-gradient(180deg, #000 30%, transparent 100%); }
.mt-hero::after { -webkit-mask-image: radial-gradient(ellipse 45% 70% at 35% 15%, #000 10%, transparent 75%); mask-image: radial-gradient(ellipse 45% 70% at 35% 15%, #000 10%, transparent 75%); }
.mt-hero::before { -webkit-mask-image: linear-gradient(180deg, transparent 0, #000 14%, transparent 100%); mask-image: linear-gradient(180deg, transparent 0, #000 14%, transparent 100%); }

/* ===== Dataset sections ===== */
.mt { --mt-ta: #34d399; --mt-tb: #fbbf24; --mt-tc: #f87171; }
.mt-bars, .mt-stack, .mt-chips { list-style: none; margin: 0 0 1.2rem; padding: 0; }
.mt-bars li, .mt-stack li { display: grid; grid-template-columns: minmax(6rem, 11rem) minmax(0, 1fr) minmax(5.5rem, auto); align-items: center; gap: 0.9rem; padding: 0.38rem 0; margin: 0; font-size: 0.85rem; }
@media (max-width: 639px) { .mt-bars li, .mt-stack li { grid-template-columns: 1fr auto; } .mt-bars .mt-bar, .mt-stack .mt-bar { grid-column: 1 / -1; order: 3; } }
.mt-bar-label { color: #e4e4e7; }
.mt-bar-label small { display: block; font-family: ui-monospace, Menlo, Consolas, monospace; font-size: 0.65rem; color: var(--mt-dim); }
.mt-bar { display: block; height: 0.7rem; border-radius: 999px; background: rgba(255,255,255,0.06); overflow: hidden; }
.mt-bar i { display: block; height: 100%; border-radius: 999px; background: linear-gradient(90deg, rgba(251,146,60,0.55), var(--mt-accent)); }
.mt-bar i.t-A { background: var(--mt-ta); }
.mt-bar i.t-B { background: var(--mt-tb); }
.mt-bar i.t-C { background: var(--mt-tc); }
.mt-bar-stack { display: flex; }
.mt-bar-stack i { border-radius: 0; }
.mt-bar-val { text-align: right; font-family: ui-monospace, Menlo, Consolas, monospace; font-size: 0.78rem; color: #fff; white-space: nowrap; }
.mt-bar-val small { color: var(--mt-dim); margin-left: 0.25rem; }
.mt-chart-title { margin: 1.4rem 0 0.2rem !important; font-family: ui-monospace, Menlo, Consolas, monospace; font-size: 0.7rem !important; letter-spacing: 0.1em; text-transform: uppercase; color: var(--mt-accent); }
.mt-legend { display: flex; flex-wrap: wrap; gap: 1rem; margin: 0.2rem 0 1.1rem !important; font-size: 0.75rem !important; }
.mt-legend span::before { content: ''; display: inline-block; width: 0.6rem; height: 0.6rem; margin-right: 0.4rem; border-radius: 2px; background: currentColor; }
.mt-legend .t-A { color: var(--mt-ta); }
.mt-legend .t-B { color: var(--mt-tb); }
.mt-legend .t-C { color: var(--mt-tc); }

.mt-downloads { display: grid; grid-template-columns: 1fr; gap: 0.7rem; margin: 1.3rem 0 1.6rem; }
@media (min-width: 720px) { .mt-downloads { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.mt-dl { position: relative; display: flex; flex-direction: column; gap: 0.35rem; padding: 1.05rem 1.1rem; border: 1px solid rgba(251,146,60,0.45); border-radius: 0.75rem; background: linear-gradient(160deg, rgba(251,146,60,0.14), rgba(251,146,60,0.04) 55%, rgba(255,255,255,0.02)); text-decoration: none; box-shadow: 0 14px 32px -22px rgba(251,146,60,0.55), 0 1px 0 rgba(255,255,255,0.06) inset; transition: border-color 0.2s, transform 0.2s, box-shadow 0.2s; }
.mt-dl:hover { border-color: rgba(251,146,60,0.85); transform: translateY(-2px); box-shadow: 0 18px 38px -18px rgba(251,146,60,0.6), 0 1px 0 rgba(255,255,255,0.08) inset; }
.mt-dl, .mt-dl strong, .mt-dl small { text-decoration: none; }
.mt-dl::before { content: ''; position: absolute; inset: 0 auto 0 0; width: 3px; border-radius: 3px 0 0 3px; background: linear-gradient(180deg, var(--mt-accent), rgba(251,146,60,0.15)); }
.mt-dl-ext { align-self: flex-start; padding: 0.18rem 0.6rem; border: 1px solid rgba(251,146,60,0.55); border-radius: 0.35rem; background: rgba(251,146,60,0.2); font-family: ui-monospace, Menlo, Consolas, monospace; font-size: 0.68rem; font-weight: 700; letter-spacing: 0.08em; color: #ffcf9e; }
.mt-dl strong { font-size: 0.88rem; color: #fff; word-break: break-all; }
.mt-dl strong::after { content: ' \2193'; color: var(--mt-accent); font-weight: 400; }
.mt-dl small { font-size: 0.78rem; line-height: 1.45; color: #c4c4cc; }

.mt-chips { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.mt-chips li { display: inline-flex; align-items: center; gap: 0.5rem; margin: 0; padding: 0.3rem 0.7rem; border: 1px solid var(--mt-line-strong); border-radius: 999px; background: var(--mt-card); font-size: 0.8rem; }
.mt-chips code { background: none; border: 0; padding: 0; }
.mt-chips b { font-family: ui-monospace, Menlo, Consolas, monospace; font-size: 0.72rem; color: var(--mt-accent); }
@media (min-width: 720px) { #dataset .mt-stats { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
