/* ═══════════════════════════════════════════════════════════════════
   LANGE BRANDS · Operations Sheet
   Engineering-drawing / spec-sheet design system
   Palette: PMS 185, PMS 187, Warm Gray 8, Black 7, White
   ═══════════════════════════════════════════════════════════════════ */

* { margin: 0; padding: 0; box-sizing: border-box; }

:root {
    /* Brand palette */
    --red-185: #E4002B;
    --red-187: #A6192E;
    --gray-8:  #8E8884;
    --black-7: #3D3935;

    /* Surfaces */
    --paper: #F7F5EF;
    --card: #FFFFFF;
    --card-shade: #F2EFE8;

    /* Text */
    --ink: #2A2724;
    --ink-2: #55514C;
    --muted: #8E8884;
    --quiet: #B2AEA8;
    --whisper: #D4D0CA;

    /* Rules */
    --hairline: rgba(42, 39, 36, 0.09);
    --rule: rgba(42, 39, 36, 0.18);
    --rule-strong: rgba(42, 39, 36, 0.32);
    --rule-solid: #C7C2BA;

    /* Signals */
    --up: #3F5D45;
    --down: #A6192E;
    --accent: #E4002B;
    --accent-deep: #A6192E;
    --accent-wash: rgba(228, 0, 43, 0.045);
}

html, body {
    height: 100%;
    background: var(--paper);
    color: var(--ink);
    font-family: 'IBM Plex Sans', system-ui, -apple-system, sans-serif;
    overflow: hidden;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
    font-feature-settings: "cv08" 1, "cv11" 1;
}

body {
    display: grid;
    grid-template-rows: auto auto 1fr auto;
    min-height: 100vh;
    position: relative;
}

/* ─── TITLE BLOCK HEADER ─── real engineering-drawing title block */
.title-block {
    display: grid;
    grid-template-columns: minmax(240px, 1.4fr) minmax(200px, 2fr) minmax(80px, 0.7fr) minmax(140px, 1fr) minmax(190px, 1.2fr);
    background: var(--card);
    border-bottom: 2px solid var(--ink);
    position: relative;
    z-index: 2;
}

.title-block .tb-cell {
    padding: clamp(0.7rem, 1.1vw, 1.05rem) clamp(0.9rem, 1.5vw, 1.6rem);
    border-right: 1px solid var(--rule);
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 0.28rem;
    min-width: 0;
    position: relative;
}
.title-block .tb-cell:last-child { border-right: none; }

.title-block .tb-key {
    font-family: 'IBM Plex Mono', monospace;
    font-size: clamp(0.52rem, 0.6vw, 0.7rem);
    text-transform: uppercase;
    letter-spacing: 0.22em;
    color: var(--muted);
    font-weight: 500;
    line-height: 1;
    white-space: nowrap;
}

.title-block .tb-value {
    font-family: 'Big Shoulders Display', 'Space Grotesk', sans-serif;
    font-weight: 700;
    font-size: clamp(1rem, 1.35vw, 1.5rem);
    letter-spacing: 0.06em;
    color: var(--ink);
    line-height: 1;
    text-transform: uppercase;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.title-block .tb-value.mono {
    font-family: 'IBM Plex Mono', monospace;
    font-weight: 500;
    font-size: clamp(0.85rem, 1vw, 1.1rem);
    letter-spacing: 0.02em;
    text-transform: none;
}

/* Wordmark cell */
.title-block .tb-cell.tb-mark {
    background: var(--ink);
    color: var(--card);
    padding-right: clamp(1rem, 1.8vw, 1.8rem);
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: clamp(0.7rem, 1.2vw, 1.2rem);
    border-right: none;
}
.title-block .tb-cell.tb-mark::after {
    content: '';
    position: absolute;
    top: 0;
    right: -14px;
    bottom: 0;
    width: 14px;
    background: var(--ink);
    clip-path: polygon(0 0, 100% 50%, 0 100%);
    z-index: 1;
}

.tb-mark .wordmark {
    display: flex;
    flex-direction: column;
    line-height: 0.92;
    font-family: 'Big Shoulders Display', sans-serif;
    font-weight: 900;
    letter-spacing: 0.03em;
    text-transform: uppercase;
    color: var(--card);
    font-size: clamp(1.15rem, 1.6vw, 1.85rem);
}
.tb-mark .wordmark .r2 {
    color: var(--red-185);
}
.tb-mark .mark-badge {
    font-family: 'IBM Plex Mono', monospace;
    font-size: clamp(0.55rem, 0.65vw, 0.72rem);
    text-transform: uppercase;
    letter-spacing: 0.2em;
    padding: 0.3rem 0.5rem;
    border: 1px solid rgba(255, 255, 255, 0.35);
    color: rgba(255, 255, 255, 0.85);
    font-weight: 500;
    line-height: 1;
    white-space: nowrap;
}

/* LIVE indicator dot inside title-block */
.live-dot {
    display: inline-block;
    width: 8px;
    height: 8px;
    background: var(--red-185);
    border-radius: 50%;
    margin-right: 0.4rem;
    vertical-align: middle;
    position: relative;
    top: -1px;
    box-shadow: 0 0 0 0 rgba(228, 0, 43, 0.5);
    animation: pulseRed 2.2s ease-in-out infinite;
}
@keyframes pulseRed {
    0%, 100% { opacity: 1; box-shadow: 0 0 0 0 rgba(228, 0, 43, 0.5); }
    50% { opacity: 0.7; box-shadow: 0 0 0 6px rgba(228, 0, 43, 0); }
}

/* Return tab — sits as the FIRST cell of the title-block on drill-downs.
   Prominent, inverted, red arrow, unmistakable click target. */
.title-block.with-return {
    grid-template-columns: auto minmax(220px, 1.3fr) minmax(200px, 2fr) minmax(80px, 0.7fr) minmax(140px, 1fr) minmax(190px, 1.2fr);
}

.tb-return {
    background: var(--ink);
    color: var(--card);
    text-decoration: none;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: clamp(0.55rem, 0.9vw, 0.9rem) clamp(0.9rem, 1.4vw, 1.4rem);
    border-right: 1px solid var(--rule);
    gap: 0.15rem;
    font-family: 'IBM Plex Mono', monospace;
    font-size: clamp(0.5rem, 0.58vw, 0.66rem);
    text-transform: uppercase;
    letter-spacing: 0.22em;
    font-weight: 600;
    transition: background 220ms ease;
    position: relative;
    min-width: clamp(72px, 6vw, 92px);
    line-height: 1;
}
.tb-return .tb-return-arrow {
    font-family: 'Big Shoulders Display', sans-serif;
    font-size: 2em;
    font-weight: 900;
    color: var(--red-185);
    line-height: 0.9;
    transition: color 220ms ease, transform 220ms ease;
}
.tb-return .tb-return-label {
    color: rgba(255, 255, 255, 0.72);
    font-weight: 500;
    transition: color 220ms ease;
}
.tb-return:hover {
    background: var(--red-185);
}
.tb-return:hover .tb-return-arrow {
    color: var(--card);
    transform: translateX(-4px);
}
.tb-return:hover .tb-return-label {
    color: var(--card);
}

/* ─── BRAND / PRODUCT LINE SELECTOR ─── nameplate cards */
.line-selector {
    display: flex;
    align-items: stretch;
    gap: 0;
    background: var(--card);
    border-bottom: 1px solid var(--rule);
    overflow-x: auto;
    scrollbar-width: none;
    position: relative;
}
.line-selector::-webkit-scrollbar { display: none; }

.ls-label {
    font-family: 'IBM Plex Mono', monospace;
    font-size: clamp(0.52rem, 0.6vw, 0.7rem);
    text-transform: uppercase;
    letter-spacing: 0.22em;
    color: var(--muted);
    font-weight: 500;
    display: flex;
    align-items: center;
    padding: 0 clamp(0.9rem, 1.5vw, 1.6rem);
    border-right: 1px solid var(--rule);
    background: var(--card-shade);
    flex-shrink: 0;
    white-space: nowrap;
}

.ls-pill {
    --pill-color: var(--ink);
    background: transparent;
    border: none;
    border-right: 1px solid var(--rule);
    padding: clamp(0.55rem, 0.9vw, 0.85rem) clamp(0.9rem, 1.3vw, 1.4rem);
    font-family: 'IBM Plex Sans', sans-serif;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    transition: all 200ms ease;
    flex-shrink: 0;
    position: relative;
    min-height: clamp(50px, 4.4vw, 62px);
    min-width: clamp(130px, 12vw, 175px);
}
.ls-pill:last-child { border-right: none; }

.ls-pill::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--pill-color);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 260ms cubic-bezier(0.2, 0.7, 0.2, 1);
}

.ls-pill:hover { background: var(--card-shade); }
.ls-pill:hover::after { transform: scaleX(0.55); }

.ls-pill.active {
    background: var(--card-shade);
}
.ls-pill.active::after { transform: scaleX(1); }

.ls-pill .pill-logo {
    height: clamp(22px, 2vw, 30px);
    max-width: clamp(110px, 10vw, 145px);
    width: auto;
    object-fit: contain;
    display: block;
    filter: grayscale(0.35) opacity(0.7);
    transition: filter 200ms ease;
}
.ls-pill:hover .pill-logo,
.ls-pill.active .pill-logo {
    filter: grayscale(0) opacity(1);
}

.ls-pill.portfolio {
    flex-direction: column;
    gap: 0.15rem;
    line-height: 1.05;
    min-width: clamp(120px, 11vw, 158px);
}
.ls-pill.portfolio .pill-name {
    font-family: 'Big Shoulders Display', sans-serif;
    font-size: clamp(0.85rem, 1vw, 1.1rem);
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--ink);
}
.ls-pill.portfolio .pill-kicker {
    font-family: 'IBM Plex Mono', monospace;
    font-size: clamp(0.5rem, 0.58vw, 0.66rem);
    text-transform: uppercase;
    letter-spacing: 0.2em;
    color: var(--muted);
    font-weight: 500;
}

/* ─── MAIN LAYOUT ─── */
main {
    padding: clamp(0.85rem, 1.4vw, 1.5rem) clamp(1.25rem, 2.5vw, 3rem);
    display: grid;
    gap: clamp(0.75rem, 1.15vw, 1.25rem);
    overflow: hidden;
    min-height: 0;
    grid-template-rows: auto 1fr;
}

.hero-row {
    display: grid;
    grid-template-columns: 1.4fr 1fr 1fr;
    gap: clamp(0.75rem, 1.15vw, 1.25rem);
    min-height: 0;
}

.breakdown-row {
    display: grid;
    grid-template-columns: 1.15fr 1fr 1fr 1fr;
    gap: clamp(0.75rem, 1.15vw, 1.25rem);
    min-height: 0;
}

/* ─── TILE (KPI cards) ─── */
.tile {
    background: var(--card);
    border: 1px solid var(--rule);
    padding: clamp(1rem, 1.5vw, 1.7rem) clamp(1.1rem, 1.7vw, 2rem);
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: clamp(0.5rem, 0.8vw, 0.85rem);
    min-height: 0;
    overflow: hidden;
}

/* Rivet dots — 4 corners, subtle steel-fastener look */
.tile::before,
.tile::after,
.tile > .rivets::before,
.tile > .rivets::after {
    content: '';
    position: absolute;
    width: 4px;
    height: 4px;
    background: var(--rule-solid);
    border-radius: 50%;
    box-shadow: 0 0 0 1px rgba(42, 39, 36, 0.05);
}
.tile::before { top: 8px; left: 8px; }
.tile::after  { top: 8px; right: 8px; }
.tile > .rivets::before { bottom: 8px; left: 8px; }
.tile > .rivets::after  { bottom: 8px; right: 8px; }

.tile-head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 0.7rem;
    padding-left: 0.25rem;
}

.tile-label {
    font-family: 'IBM Plex Mono', monospace;
    font-size: clamp(0.55rem, 0.65vw, 0.74rem);
    text-transform: uppercase;
    letter-spacing: 0.22em;
    color: var(--ink);
    font-weight: 600;
    white-space: nowrap;
}

.tile-meta {
    font-family: 'IBM Plex Mono', monospace;
    font-size: clamp(0.5rem, 0.58vw, 0.66rem);
    color: var(--muted);
    letter-spacing: 0.16em;
    text-transform: uppercase;
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.tile-body {
    display: flex;
    flex-direction: column;
    gap: clamp(0.35rem, 0.55vw, 0.55rem);
    padding-left: 0.25rem;
}

.tile-value {
    font-family: 'Big Shoulders Display', sans-serif;
    font-weight: 800;
    font-size: clamp(1.75rem, 3vw, 3.5rem);
    line-height: 0.9;
    letter-spacing: 0.005em;
    font-feature-settings: "tnum" 1, "lnum" 1;
    color: var(--ink);
    display: inline-flex;
    align-items: baseline;
    overflow: hidden;
    text-transform: uppercase;
}
.tile-value .prefix,
.tile-value .suffix {
    font-size: 0.45em;
    font-weight: 700;
    color: var(--muted);
    letter-spacing: 0;
    transform: translateY(-0.55em);
}
.tile-value .prefix { margin-right: 0.08em; }
.tile-value .suffix { margin-left: 0.05em; }

.tile-rule {
    width: 36px;
    height: 3px;
    background: var(--red-185);
    margin-top: 0.15rem;
}

.tile-delta {
    display: inline-flex;
    align-items: baseline;
    gap: 0.5rem;
    font-family: 'IBM Plex Mono', monospace;
    font-size: clamp(0.66rem, 0.78vw, 0.85rem);
    font-weight: 600;
    font-variant-numeric: tabular-nums;
    padding-left: 0.25rem;
}
.tile-delta.up { color: var(--up); }
.tile-delta.down { color: var(--down); }
.tile-delta .delta-context {
    color: var(--quiet);
    font-weight: 400;
    font-family: 'IBM Plex Sans', sans-serif;
    font-size: 0.92em;
    white-space: nowrap;
    letter-spacing: 0;
}

/* ─── CHART TILE ─── */
.chart-tile {
    background: var(--card);
    border: 1px solid var(--rule);
    padding: clamp(0.95rem, 1.4vw, 1.6rem) clamp(1.05rem, 1.6vw, 1.85rem);
    position: relative;
    display: flex;
    flex-direction: column;
    gap: clamp(0.55rem, 0.85vw, 0.9rem);
    min-height: 0;
    overflow: hidden;
}
.chart-tile::before,
.chart-tile::after,
.chart-tile > .rivets::before,
.chart-tile > .rivets::after {
    content: '';
    position: absolute;
    width: 4px;
    height: 4px;
    background: var(--rule-solid);
    border-radius: 50%;
    box-shadow: 0 0 0 1px rgba(42, 39, 36, 0.05);
}
.chart-tile::before { top: 8px; left: 8px; }
.chart-tile::after  { top: 8px; right: 8px; }
.chart-tile > .rivets::before { bottom: 8px; left: 8px; }
.chart-tile > .rivets::after  { bottom: 8px; right: 8px; }

.chart-head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 0.6rem;
    padding-left: 0.25rem;
    padding-bottom: clamp(0.35rem, 0.55vw, 0.55rem);
    border-bottom: 1px solid var(--hairline);
    flex-shrink: 0;
}

.chart-title {
    font-family: 'IBM Plex Mono', monospace;
    font-size: clamp(0.55rem, 0.65vw, 0.74rem);
    text-transform: uppercase;
    letter-spacing: 0.22em;
    color: var(--ink);
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    min-width: 0;
    flex: 1;
}

.chart-meta {
    font-family: 'IBM Plex Mono', monospace;
    font-size: clamp(0.5rem, 0.58vw, 0.66rem);
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: var(--muted);
    white-space: nowrap;
    flex-shrink: 0;
    font-weight: 500;
}

/* ─── HORIZONTAL BARS ─── */
.bars {
    display: flex;
    flex-direction: column;
    gap: clamp(0.35rem, 0.55vw, 0.55rem);
    flex: 1;
    justify-content: space-around;
    min-height: 0;
    overflow: hidden;
    padding-left: 0.25rem;
}

.bar-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 0.55rem;
    align-items: center;
    font-family: 'IBM Plex Sans', sans-serif;
    font-size: clamp(0.66rem, 0.76vw, 0.82rem);
}

.bar-row .bar-label {
    display: flex;
    align-items: center;
    gap: 0.45rem;
    min-width: 0;
    font-weight: 500;
    color: var(--ink);
}
.bar-row .bar-label-swatch {
    width: 8px;
    height: 8px;
    background: var(--red-185);
    display: inline-block;
    flex-shrink: 0;
}
.bar-row .bar-label-text {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.bar-track {
    grid-column: 1 / -1;
    height: 4px;
    background: var(--hairline);
    position: relative;
    margin-top: 0.15rem;
}
.bar-fill {
    position: absolute;
    top: 0;
    left: 0;
    bottom: 0;
    background: var(--ink);
    animation: barGrow 700ms cubic-bezier(0.2, 0.7, 0.2, 1) forwards;
    transform-origin: left;
    transform: scaleX(0);
}
@keyframes barGrow { to { transform: scaleX(1); } }

.bar-value {
    font-family: 'IBM Plex Mono', monospace;
    font-size: clamp(0.66rem, 0.76vw, 0.82rem);
    color: var(--ink);
    font-variant-numeric: tabular-nums;
    font-weight: 600;
    white-space: nowrap;
}

/* ─── GAUGE-DIAL DONUT ─── */
.donut-wrap {
    display: grid;
    grid-template-columns: 1fr;
    grid-template-rows: minmax(0, 1fr) auto;
    gap: 0.55rem;
    flex: 1;
    min-height: 0;
    overflow: hidden;
    padding-left: 0.25rem;
}

.donut-svg-wrap {
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 0;
    overflow: hidden;
}
.donut-svg-wrap svg {
    width: auto;
    height: 100%;
    max-height: 100%;
    max-width: 100%;
    aspect-ratio: 1;
}

.donut-center {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
    display: flex;
    flex-direction: column;
    gap: 0.05rem;
    pointer-events: none;
    max-width: 62%;
}
.donut-center-value {
    font-family: 'Big Shoulders Display', sans-serif;
    font-weight: 800;
    font-size: clamp(1.15rem, 1.55vw, 1.9rem);
    line-height: 1;
    letter-spacing: 0.01em;
    color: var(--ink);
    text-transform: uppercase;
}
.donut-center-label {
    font-family: 'IBM Plex Mono', monospace;
    font-size: clamp(0.5rem, 0.58vw, 0.66rem);
    text-transform: uppercase;
    letter-spacing: 0.18em;
    color: var(--muted);
    font-weight: 600;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.donut-legend {
    display: flex;
    flex-direction: column;
    gap: 0.22rem;
    font-family: 'IBM Plex Sans', sans-serif;
    font-size: clamp(0.62rem, 0.72vw, 0.78rem);
    overflow: hidden;
}
.donut-legend-row {
    display: grid;
    grid-template-columns: 9px minmax(0, 1fr) auto;
    gap: 0.45rem;
    align-items: center;
}
.donut-legend-swatch {
    width: 9px;
    height: 9px;
    background: var(--seg-color, var(--red-185));
}
.donut-legend-label {
    color: var(--ink);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.donut-legend-value {
    font-family: 'IBM Plex Mono', monospace;
    font-variant-numeric: tabular-nums;
    color: var(--ink-2);
    font-weight: 600;
}

/* ─── SPEC-LIST (dashed leader lines) ─── */
.spec-list {
    display: flex;
    flex-direction: column;
    gap: 0;
    flex: 1;
    min-height: 0;
    overflow: hidden;
    padding-left: 0.25rem;
}
.spec-row {
    display: grid;
    grid-template-columns: 20px minmax(0, 1fr) auto;
    gap: 0.45rem;
    align-items: baseline;
    padding: clamp(0.32rem, 0.5vw, 0.5rem) 0;
    font-family: 'IBM Plex Sans', sans-serif;
    font-size: clamp(0.66rem, 0.76vw, 0.82rem);
    position: relative;
}
.spec-row + .spec-row {
    border-top: 1px dashed var(--hairline);
}
.spec-row .spec-idx {
    font-family: 'IBM Plex Mono', monospace;
    color: var(--muted);
    font-size: 0.8em;
    font-weight: 600;
    letter-spacing: 0.05em;
}
.spec-row .spec-name {
    color: var(--ink);
    font-weight: 500;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    min-width: 0;
    position: relative;
}
/* the dashed leader line — appears after the name text using a repeating dash */
.spec-row .spec-name::after {
    content: '';
    display: inline-block;
    width: 40px;
    height: 1px;
    margin-left: 6px;
    background-image: linear-gradient(90deg, var(--rule-strong) 50%, transparent 50%);
    background-size: 4px 1px;
    background-repeat: repeat-x;
    vertical-align: 0.28em;
    opacity: 0.7;
}
.spec-row .spec-val {
    font-family: 'IBM Plex Mono', monospace;
    color: var(--ink);
    font-variant-numeric: tabular-nums;
    font-weight: 700;
    white-space: nowrap;
    font-size: 0.98em;
}

/* ─── FUNNEL (numbered production stages — sequence IS meaningful here) ─── */
.funnel {
    display: flex;
    flex-direction: column;
    gap: clamp(0.4rem, 0.6vw, 0.6rem);
    flex: 1;
    justify-content: space-around;
    min-height: 0;
    overflow: hidden;
    padding-left: 0.25rem;
}
.funnel-step {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    gap: 0.55rem;
    align-items: center;
    font-family: 'IBM Plex Sans', sans-serif;
    font-size: clamp(0.62rem, 0.74vw, 0.8rem);
}
.funnel-step .step-code {
    font-family: 'IBM Plex Mono', monospace;
    font-size: 0.85em;
    color: var(--red-185);
    font-weight: 700;
    letter-spacing: 0.05em;
    padding: 0.15rem 0.4rem;
    border: 1px solid var(--red-185);
    background: rgba(228, 0, 43, 0.04);
    line-height: 1;
    flex-shrink: 0;
}
.funnel-step .step-label {
    color: var(--ink);
    font-weight: 500;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    min-width: 0;
}
.funnel-step .step-value {
    font-family: 'IBM Plex Mono', monospace;
    color: var(--ink);
    font-variant-numeric: tabular-nums;
    font-weight: 700;
    white-space: nowrap;
}
.funnel-step .step-track {
    grid-column: 1 / -1;
    height: 8px;
    background: var(--hairline);
    position: relative;
    margin-top: 0.1rem;
}
.funnel-step .step-fill {
    position: absolute;
    top: 0;
    left: 0;
    bottom: 0;
    background: linear-gradient(90deg, var(--red-185), var(--red-187));
    animation: barGrow 700ms cubic-bezier(0.2, 0.7, 0.2, 1) forwards;
    transform-origin: left;
    transform: scaleX(0);
}

/* ─── FOOTER ─── compact spec-plate */
.footer-plate {
    display: flex;
    align-items: stretch;
    background: var(--card);
    border-top: 1px solid var(--rule);
    font-family: 'IBM Plex Mono', monospace;
    font-size: clamp(0.55rem, 0.65vw, 0.72rem);
    color: var(--muted);
    text-transform: uppercase;
    letter-spacing: 0.2em;
    font-weight: 500;
    flex-shrink: 0;
}

.footer-plate .fp-cell {
    padding: clamp(0.5rem, 0.85vw, 0.85rem) clamp(1rem, 1.6vw, 1.8rem);
    border-right: 1px solid var(--rule);
    display: flex;
    align-items: center;
    gap: 0.6rem;
    white-space: nowrap;
}
.footer-plate .fp-cell:last-child { border-right: none; margin-left: auto; }
.footer-plate .fp-key { color: var(--quiet); }
.footer-plate .fp-value { color: var(--ink-2); font-weight: 600; }

/* ─── MOBILE ─── */
@media (max-width: 1100px) {
    html, body {
        overflow: visible;
        overflow-y: auto;
        height: auto;
    }

    /* Compact title-block: LANGE mark on top, everything else = single-row cells */
    .title-block {
        grid-template-columns: 1fr;
    }
    .title-block .tb-cell {
        border-right: none;
        border-bottom: 1px solid var(--rule);
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
        gap: 0.75rem;
        padding: 0.45rem 1rem;
    }
    .title-block .tb-cell:last-child { border-bottom: none; }
    .title-block .tb-cell .tb-key {
        font-size: 0.58rem;
        flex-shrink: 0;
    }
    .title-block .tb-cell .tb-value {
        font-size: 0.9rem;
        text-align: right;
    }
    .title-block .tb-cell .tb-value.mono { font-size: 0.82rem; }
    .title-block .tb-cell.tb-mark {
        padding: 0.7rem 1rem;
        flex-direction: row;
        justify-content: space-between;
    }
    .title-block .tb-cell.tb-mark::after { display: none; }
    .tb-mark .wordmark { font-size: 1.4rem; }
    .tb-mark .mark-badge { font-size: 0.58rem; }

    .title-block.with-return { grid-template-columns: 1fr; }
    .tb-return {
        flex-direction: row;
        gap: 0.75rem;
        padding: 0.55rem 1rem;
        border-right: none;
        border-bottom: 1px solid var(--rule);
        justify-content: flex-start;
        min-width: 0;
    }
    .tb-return .tb-return-arrow { font-size: 1.4em; }

    .line-selector { padding: 0; }
    .ls-label { padding: 0.75rem 1rem; }
    .ls-pill { min-width: 100px; min-height: 44px; padding: 0.45rem 0.75rem; }
    .ls-pill .pill-logo { height: 20px; max-width: 90px; }

    main {
        padding: 1rem;
        overflow: visible;
        grid-template-rows: auto auto;
    }

    .hero-row,
    .breakdown-row {
        grid-template-columns: 1fr !important;
    }

    .tile { padding: 0.85rem 1rem; }
    .chart-tile { padding: 0.85rem 1rem; }

    .footer-plate {
        flex-wrap: wrap;
    }
    .footer-plate .fp-cell {
        flex: 1 1 100%;
        border-right: none;
        border-bottom: 1px solid var(--rule);
        padding: 0.5rem 1rem;
        font-size: 0.58rem;
        justify-content: space-between;
    }
    .footer-plate .fp-cell:last-child { margin-left: 0; border-bottom: none; }
}
