/* ============================================================
   tabs.css — the WORK list. Every tab is a full-width panel
   rendered in that project's own UI language. Gallery chrome
   stays monochrome; the tabs are where the colour lives.
   ============================================================ */

.work { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 24px; }
.work__row { margin: 0; }

.tab {
  position: relative;
  display: grid;
  min-height: 460px;
  border-radius: var(--radius-cards);
  overflow: hidden;
  isolation: isolate;
  color: inherit;
  transform: translateZ(0);
  transition: transform 0.9s var(--ease-focus), box-shadow 0.9s var(--ease-focus);
  will-change: transform;
}
.tab:hover { transform: translateY(-6px); }
.tab:active { transform: translateY(-2px) scale(0.995); transition-duration: 0.25s; }
.tab__open {
  position: absolute; right: 28px; bottom: 24px; z-index: 3;
  font-size: 13px; letter-spacing: 0.18em; text-transform: uppercase;
  transition: transform 0.7s var(--ease-focus), opacity 0.7s var(--ease-focus);
}
.tab:hover .tab__open { transform: translateX(6px); }

/* ============ 07 MINEBRO — Minecraft night ============ */
.tab--minebro {
  --grass: #5d9c3a; --dirt: #79553a; --yellow: #ffff55; --aqua: #55ffff; --grey: #aaaaaa;
  --dirt-tile: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='8' height='8' shape-rendering='crispEdges'%3E%3Crect width='8' height='8' fill='%2379553a'/%3E%3Cg fill='%238a6644'%3E%3Crect x='1' y='0' width='1' height='1'/%3E%3Crect x='4' y='1' width='1' height='1'/%3E%3Crect x='6' y='2' width='1' height='1'/%3E%3Crect x='2' y='3' width='1' height='1'/%3E%3Crect x='0' y='5' width='1' height='1'/%3E%3Crect x='5' y='5' width='1' height='1'/%3E%3Crect x='3' y='6' width='1' height='1'/%3E%3Crect x='7' y='7' width='1' height='1'/%3E%3Crect x='6' y='6' width='1' height='1'/%3E%3C/g%3E%3Cg fill='%235e4027'%3E%3Crect x='3' y='0' width='1' height='1'/%3E%3Crect x='0' y='2' width='1' height='1'/%3E%3Crect x='5' y='3' width='1' height='1'/%3E%3Crect x='7' y='4' width='1' height='1'/%3E%3Crect x='2' y='5' width='1' height='1'/%3E%3Crect x='1' y='7' width='1' height='1'/%3E%3Crect x='4' y='7' width='1' height='1'/%3E%3Crect x='6' y='4' width='1' height='1'/%3E%3C/g%3E%3C/svg%3E");
  --grass-tile: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='8' height='8' shape-rendering='crispEdges'%3E%3Crect width='8' height='8' fill='%235d9c3a'/%3E%3Cg fill='%236fb04a'%3E%3Crect x='0' y='0' width='1' height='1'/%3E%3Crect x='3' y='1' width='1' height='1'/%3E%3Crect x='6' y='1' width='1' height='1'/%3E%3Crect x='1' y='3' width='1' height='1'/%3E%3Crect x='5' y='4' width='1' height='1'/%3E%3Crect x='2' y='6' width='1' height='1'/%3E%3Crect x='7' y='6' width='1' height='1'/%3E%3Crect x='4' y='7' width='1' height='1'/%3E%3C/g%3E%3Cg fill='%234a8a2c'%3E%3Crect x='2' y='0' width='1' height='1'/%3E%3Crect x='5' y='2' width='1' height='1'/%3E%3Crect x='0' y='4' width='1' height='1'/%3E%3Crect x='3' y='5' width='1' height='1'/%3E%3Crect x='6' y='5' width='1' height='1'/%3E%3Crect x='1' y='6' width='1' height='1'/%3E%3Crect x='7' y='3' width='1' height='1'/%3E%3C/g%3E%3C/svg%3E");
  background: linear-gradient(180deg, #0b1020 0%, #1d2b4a 100%); color: #fff;
  font-family: 'Pixelify Sans', 'Segoe UI', sans-serif;
  grid-template-columns: 1.15fr minmax(0, 1fr);
  border: 2px solid #000;
  box-shadow: inset 2px 2px 0 rgba(255,255,255,0.25), inset -2px -2px 0 rgba(0,0,0,0.6);
  -webkit-font-smoothing: none;
}
.tab--minebro .mb-sky {
  position: absolute; inset: 0; pointer-events: none;
  background-image:
    radial-gradient(1.5px 1.5px at 8% 22%, #fff 50%, transparent 51%), radial-gradient(1.5px 1.5px at 24% 10%, #fff 50%, transparent 51%),
    radial-gradient(2px 2px at 41% 30%, #cfe3ff 50%, transparent 51%), radial-gradient(1.5px 1.5px at 57% 12%, #fff 50%, transparent 51%),
    radial-gradient(2px 2px at 72% 26%, #fff 50%, transparent 51%), radial-gradient(1.5px 1.5px at 88% 8%, #cfe3ff 50%, transparent 51%),
    radial-gradient(1.5px 1.5px at 33% 48%, #fff 50%, transparent 51%), radial-gradient(1.5px 1.5px at 66% 44%, #fff 50%, transparent 51%),
    radial-gradient(1.5px 1.5px at 93% 40%, #fff 50%, transparent 51%);
  opacity: 0.9;
}
.tab--minebro .mb-sky::after { content: ""; position: absolute; top: 26px; right: 12%; width: 34px; height: 34px; background: #e9e9e9; box-shadow: inset -7px -4px 0 0 #b8b8b8; }
.tab--minebro .mb-ground {
  position: absolute; left: 0; right: 0; bottom: 0; height: 56px; pointer-events: none;
  background: var(--dirt-tile); background-size: 40px 40px; image-rendering: pixelated;
}
.tab--minebro .mb-ground::before { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 12px; background: var(--grass-tile); background-size: 40px 40px; }
.tab--minebro .mb-left { position: relative; z-index: 1; padding: 34px 32px 90px; }
.tab--minebro .mb-kicker { margin: 0 0 16px; display: flex; justify-content: space-between; font-size: 15px; color: var(--grey); text-shadow: 2px 2px 0 #000; }
.tab--minebro .mb-logo {
  position: relative; display: inline-block; margin: 0;
  font-size: clamp(56px, 7.2vw, 112px); line-height: 0.9; font-weight: 700; letter-spacing: 0.02em; text-transform: uppercase;
  color: #e3e3e3; text-shadow: 4px 4px 0 #7a7a7a, 8px 8px 0 #3d3d3d, 10px 10px 0 #000;
}
.tab--minebro .mb-splash {
  position: absolute; left: 100%; bottom: 26%;
  font-size: clamp(12px, 1.2vw, 17px); font-weight: 600; text-transform: none; letter-spacing: 0;
  color: var(--yellow); text-shadow: 2px 2px 0 #3f3f00; white-space: nowrap;
  transform: translate(-50%, 50%) rotate(-20deg); animation: mb-splash 0.25s ease-in-out infinite alternate;
}
@keyframes mb-splash { from { transform: translate(-50%, 50%) rotate(-20deg) scale(1); } to { transform: translate(-50%, 50%) rotate(-20deg) scale(1.1); } }
.tab--minebro .mb-left p:not(.mb-kicker) { margin: 22px 0 0; max-width: 480px; font-size: 18px; line-height: 1.45; color: #e6e6e6; text-shadow: 2px 2px 0 #000; }
.tab--minebro .mb-left p b { color: var(--aqua); font-weight: 500; font-family: 'VT323', monospace; font-size: 22px; }
.tab--minebro .mb-tags { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 22px; }
.tab--minebro .mb-tags span {
  padding: 6px 12px; background: #8b8b8b; border: 2px solid #000;
  box-shadow: inset 2px 2px 0 #b5b5b5, inset -2px -2px 0 #545454;
  font-size: 15px; font-weight: 500; text-shadow: 2px 2px 0 #3f3f3f; color: #fff;
}
.tab:hover .mb-tags span:first-child { background: #7f8fd1; box-shadow: inset 2px 2px 0 #a3b0e6, inset -2px -2px 0 #4a5a9c; color: #ffffa0; }
.tab--minebro .mb-right { position: relative; z-index: 1; display: flex; flex-direction: column; justify-content: flex-end; gap: 14px; padding: 34px 32px 76px; }
.tab--minebro .mb-chat {
  background: rgba(0,0,0,0.55); padding: 12px 14px; border-left: 4px solid rgba(0,0,0,0.6);
  font-family: 'VT323', ui-monospace, monospace; font-size: 22px; line-height: 1.25; text-shadow: 2px 2px 0 #3f3f3f;
}
.tab--minebro .mb-chat b { font-weight: 400; color: var(--aqua); }
.tab--minebro .mb-chat i { font-style: normal; color: var(--yellow); }
.tab--minebro .mb-typing { max-height: 0; overflow: hidden; opacity: 0; transition: max-height 0.6s var(--ease-focus), opacity 0.6s var(--ease-focus); }
.tab:hover .mb-typing { max-height: 40px; opacity: 1; }
.tab--minebro .mb-typing span { animation: mb-blink 1s steps(2) infinite; }
@keyframes mb-blink { 50% { opacity: 0; } }
.tab--minebro .mb-hud { display: flex; flex-direction: column; gap: 6px; align-items: flex-start; }
.tab--minebro .mb-hearts { display: flex; gap: 1px; }
.tab--minebro .mb-hearts i {
  width: 18px; height: 16px; image-rendering: pixelated;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 9 8' shape-rendering='crispEdges'%3E%3Cpath fill='%23000' d='M1 0h2v1h1v1h1V1h1V0h2v1h1v3H8v1H7v1H6v1H5v1H4V7H3V6H2V5H1V4H0V1h1z'/%3E%3Cpath fill='%23ff2a2a' d='M1 1h2v1h1v1h1V2h1V1h2v3H7v1H6v1H5v1H4V6H3V5H2V4H1z'/%3E%3Cpath fill='%23ff8a8a' d='M1 1h1v1H1zM6 1h1v1H6z'/%3E%3C/svg%3E") no-repeat center / contain;
}
.tab--minebro .mb-hotbar { display: flex; background: rgba(0,0,0,0.5); border: 2px solid #000; padding: 2px; }
.tab--minebro .mb-hotbar i { width: 40px; height: 40px; display: grid; place-items: center; box-shadow: inset 2px 2px 0 rgba(0,0,0,0.6), inset -2px -2px 0 rgba(255,255,255,0.25); }
.tab--minebro .mb-hotbar i.sel { outline: 3px solid #fff; outline-offset: -1px; }
.tab--minebro .mb-hotbar s { display: block; width: 24px; height: 24px; text-decoration: none; border: 2px solid #000; image-rendering: pixelated; }
.tab--minebro .mb-hotbar .log { background: repeating-linear-gradient(90deg, #6b4a2b 0 4px, #8a6644 4px 8px); }
.tab--minebro .mb-hotbar .pick { background: linear-gradient(135deg, transparent 0 40%, #6b4a2b 40% 60%, transparent 60%), linear-gradient(45deg, #d8d8d8, #8f8f8f); }
.tab--minebro .mb-hotbar .bread { background: linear-gradient(180deg, #d9a05b, #a86d2e); border-radius: 6px 6px 3px 3px; }
.tab--minebro .mb-hotbar .cobble { background: var(--dirt-tile); background-size: 24px; filter: grayscale(1) brightness(1.15); }
.tab--minebro .tab__open {
  right: 32px; bottom: 22px;
  background: #3c8527; border: 2px solid #000; padding: 10px 18px;
  box-shadow: inset 2px 2px 0 #63b34a, inset -2px -2px 0 #1e4d12;
  font-family: 'Pixelify Sans', sans-serif; font-size: 18px; font-weight: 500; text-transform: none; letter-spacing: 0; text-shadow: 2px 2px 0 #1e4d12;
}
.tab--minebro:hover .tab__open { background: #4aa032; }

/* ============ 06 STOCK TRACKER — Night Desk, Factory style ============ */
.tab--nightdesk {
  --canvas: #101010; --carbon: #1d1a18; --ash: #3d3a39; --warm: #8a8380; --stone: #b8b3b0; --bone: #eeeeee; --orange: #ee6018; --green: #a0ca92;
  background: var(--canvas); color: var(--bone);
  font-family: 'Geist', ui-sans-serif, system-ui, sans-serif; letter-spacing: -0.01em;
  grid-template-rows: auto auto 1fr;
  border: 1px solid var(--carbon);
}
.tab--nightdesk .nd-mast { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; padding: 14px 24px; min-height: 56px; }
.tab--nightdesk .nd-brand { font-family: 'Geist Mono', monospace; font-size: 12px; letter-spacing: 0.14em; text-transform: uppercase; display: inline-flex; align-items: center; gap: 8px; }
.tab--nightdesk .nd-brand i { width: 6px; height: 6px; border-radius: 50%; background: var(--orange); }
.tab--nightdesk .nd-tag { font-family: 'Geist Mono', monospace; font-size: 12px; letter-spacing: -0.02em; text-transform: uppercase; color: var(--warm); }
.tab--nightdesk .nd-right { margin-left: auto; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.tab--nightdesk .nd-pill { display: inline-flex; align-items: center; gap: 8px; height: 32px; padding: 0 14px; font-family: 'Geist Mono', monospace; font-size: 12px; letter-spacing: -0.02em; text-transform: uppercase; color: var(--warm); border: 1px solid var(--ash); border-radius: 3px; }
.tab--nightdesk .nd-pill i { width: 6px; height: 6px; border-radius: 50%; background: #4d4947; }
.tab--nightdesk .nd-pill.open { color: var(--bone); } .tab--nightdesk .nd-pill.open i { background: var(--orange); }
.tab--nightdesk .nd-score { display: inline-flex; align-items: center; gap: 10px; height: 32px; padding: 0 14px; border: 1px solid var(--ash); border-radius: 3px; font-size: 14px; font-variant-numeric: tabular-nums; }
.tab--nightdesk .nd-score i { display: inline-block; width: 12px; height: 1px; margin-right: 6px; vertical-align: middle; }
.tab--nightdesk .nd-score em { font-style: normal; font-family: 'Geist Mono', monospace; font-size: 12px; color: var(--warm); text-transform: uppercase; }
.tab--nightdesk .nd-tabs { display: flex; gap: 8px; border-bottom: 1px solid var(--ash); margin: 0 24px; }
.tab--nightdesk .nd-tabs span { padding: 10px 12px 9px; font-size: 14px; text-transform: uppercase; letter-spacing: -0.01em; color: var(--warm); border-bottom: 1px solid transparent; margin-bottom: -1px; }
.tab--nightdesk .nd-tabs span.on { color: var(--bone); border-bottom-color: var(--bone); }
.tab--nightdesk .nd-body { display: grid; grid-template-columns: minmax(0, 1fr) 1.15fr; gap: 24px; padding: 20px 24px 64px; }
.tab--nightdesk .nd-kicker { margin: 0 0 12px; display: flex; justify-content: space-between; font-family: 'Geist Mono', monospace; font-size: 12px; text-transform: uppercase; letter-spacing: -0.02em; color: var(--warm); }
.tab--nightdesk h3 { margin: 0; font-size: clamp(36px, 3.6vw, 56px); font-weight: 400; letter-spacing: -1.6px; line-height: 1; }
.tab--nightdesk .nd-left > p:not(.nd-kicker) { margin: 14px 0 0; max-width: 440px; font-size: 14px; line-height: 1.5; color: var(--stone); }
.tab--nightdesk .nd-chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; }
.tab--nightdesk .nd-chips span { height: 28px; padding: 0 10px; display: inline-flex; align-items: center; font-family: 'Geist Mono', monospace; font-size: 12px; letter-spacing: -0.02em; text-transform: uppercase; color: var(--stone); border: 1px solid var(--ash); border-radius: 3px; }
.tab--nightdesk .nd-rows { margin-top: 18px; border: 1px solid var(--carbon); border-radius: 10px; overflow: hidden; }
.tab--nightdesk .nd-row { display: grid; grid-template-columns: 52px minmax(0, 1fr) 64px auto; align-items: center; gap: 10px; padding: 8px 12px; border-bottom: 1px solid var(--carbon); font-size: 14px; }
.tab--nightdesk .nd-num { display: flex; flex-direction: column; align-items: flex-end; gap: 2px; min-width: 64px; }
.tab--nightdesk .nd-row:last-child { border-bottom: 0; }
.tab--nightdesk .nd-row s { text-decoration: none; color: var(--warm); font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tab--nightdesk .nd-row svg { width: 64px; height: 26px; }
.tab--nightdesk .nd-row em { font-style: normal; font-variant-numeric: tabular-nums; text-align: right; }
.tab--nightdesk .nd-row u { text-decoration: none; font-size: 12px; text-align: right; }
.tab--nightdesk .up { color: var(--green); } .tab--nightdesk .dn { color: var(--orange); }
.tab--nightdesk .nd-right-col { display: flex; flex-direction: column; gap: 16px; }
.tab--nightdesk .nd-chart { border: 1px solid var(--carbon); border-radius: 10px; padding: 16px 16px 10px; }
.tab--nightdesk .nd-chart-head { display: flex; justify-content: space-between; align-items: baseline; font-size: 15px; margin-bottom: 8px; }
.tab--nightdesk .nd-legend { font-family: 'Geist Mono', monospace; font-size: 12px; text-transform: uppercase; color: var(--stone); }
.tab--nightdesk .nd-legend i { display: inline-block; width: 16px; height: 1px; vertical-align: middle; margin: 0 6px 0 10px; }
.tab--nightdesk .nd-chart svg { display: block; width: 100%; height: 200px; }
.tab--nightdesk .nd-chart .ax { fill: var(--warm); font-family: 'Geist Mono', monospace; font-size: 11px; }
.tab--nightdesk .nd-axis { display: flex; justify-content: space-between; margin-top: 6px; font-family: 'Geist Mono', monospace; font-size: 11px; color: var(--warm); text-transform: uppercase; }
.tab--nightdesk .nd-board { display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); align-items: center; gap: 16px; border: 1px solid var(--carbon); border-radius: 10px; padding: 18px 20px; }
.tab--nightdesk .nd-board > div { display: flex; flex-direction: column; gap: 6px; }
.tab--nightdesk .nd-board > div:last-child { align-items: flex-end; text-align: right; }
.tab--nightdesk .nd-lbl { font-family: 'Geist Mono', monospace; font-size: 12px; text-transform: uppercase; color: var(--stone); display: inline-flex; align-items: center; gap: 8px; }
.tab--nightdesk .nd-lbl i { width: 12px; height: 1px; }
.tab--nightdesk .nd-board b { font-weight: 400; font-size: 34px; letter-spacing: -1.1px; line-height: 1; font-variant-numeric: tabular-nums; }
.tab--nightdesk .nd-board u { text-decoration: none; font-size: 12px; }
.tab--nightdesk .nd-vs { align-items: center; }
.tab--nightdesk .nd-vs span { font-family: 'Geist Mono', monospace; font-size: 12px; letter-spacing: .1em; color: var(--warm); border: 1px solid var(--ash); border-radius: 3px; padding: 4px 10px; }
.tab--nightdesk .tab__open { right: 24px; bottom: 20px; color: var(--canvas); background: #fafafa; border-radius: 3px; padding: 7px 14px; font-family: 'Geist', sans-serif; font-size: 14px; text-transform: none; letter-spacing: -0.01em; }
.tab--nightdesk:hover .tab__open { background: #fff; }
.tab--nightdesk:hover .nd-brand i { animation: nd-pulse 1.6s ease-in-out infinite; }
@keyframes nd-pulse { 50% { opacity: .35; } }

/* ============ 05 NOTEPAD — warm paper ============ */
.tab--notepad {
  --ivory: #fffdf8; --ink: #0a0a0a; --rule: #e5e5e5; --smoke: #8c8c8c; --ash: #d1d1d1; --slate: #474747; --halo: #f9f9f9; --desk: #f4f1ea;
  --sepia: #512906; --violet: #242d64; --forest: #0c3b1a; --oxblood: #5e0831; --wash: rgba(255, 201, 52, 0.55);
  --serif: 'Source Serif 4', Georgia, serif; --sans: 'Karla', 'Segoe UI', sans-serif; --hand: 'Caveat', cursive;
  background: var(--desk); color: var(--ink); font-family: var(--sans);
  grid-template-columns: 220px minmax(0, 1fr) 260px;
  border: 1px solid var(--ash);
}
.tab--notepad::before { content: ""; position: absolute; inset: 0; pointer-events: none; opacity: 0.5; z-index: 0;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='240' height='240'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 0.25 0 0 0 0 0.18 0 0 0 0 0.08 0 0 0 0.10 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E"); }
.tab--notepad .np-side { position: relative; z-index: 1; background: var(--halo); border-right: 1px solid var(--rule); padding: 12px 0 0; font-size: 12.5px; color: var(--slate); overflow: hidden; }
.tab--notepad .np-head { display: flex; align-items: baseline; justify-content: space-between; padding: 0 14px 6px; }
.tab--notepad .np-mark { font-family: var(--serif); font-style: italic; font-size: 22px; display: inline-flex; align-items: center; gap: 6px; color: var(--ink); }
.tab--notepad .np-mark svg { width: 18px; height: 18px; transform: rotate(-8deg); }
.tab--notepad .np-mark i { font-style: italic; background: linear-gradient(100deg, transparent 1%, var(--wash) 3%, var(--wash) 97%, transparent 99%); padding: 0 4px; }
.tab--notepad .np-new { font-size: 12px; padding: 5px 10px; border-radius: 10px; background: var(--sepia); color: var(--ivory); }
.tab--notepad .np-search { margin: 4px 14px 6px; padding: 4px 0 4px 18px; border-bottom: 1px solid var(--ash); font-family: var(--serif); font-style: italic; color: var(--smoke); font-size: 13px; }
.tab--notepad .np-label { font-family: var(--serif); font-style: italic; color: var(--smoke); padding: 10px 14px 2px; font-size: 12.5px; }
.tab--notepad .np-tree { padding: 2px 14px; display: flex; gap: 6px; } .tab--notepad .np-tree em { margin-left: auto; font-style: italic; font-family: var(--serif); color: var(--smoke); }
.tab--notepad .np-tree.on { color: var(--ink); font-weight: 500; }
.tab--notepad .np-tags { display: flex; flex-wrap: wrap; gap: 0 10px; padding: 0 14px; font-family: var(--hand); font-size: 16px; color: var(--forest); }
.tab--notepad .np-row { padding: 7px 14px 7px 16px; border-bottom: 1px solid var(--rule); position: relative; }
.tab--notepad .np-row b { display: block; font-family: var(--serif); font-weight: 400; font-size: 14.5px; color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tab--notepad .np-row span { display: block; font-size: 11.5px; color: var(--smoke); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tab--notepad .np-row.on { background: var(--ivory); } .tab--notepad .np-row.on::before { content: ""; position: absolute; left: 0; top: 6px; bottom: 6px; width: 3px; background: var(--sepia); }
.tab--notepad .np-desk { position: relative; z-index: 1; display: flex; flex-direction: column; min-width: 0; }
.tab--notepad .np-top { display: flex; align-items: center; gap: 6px; height: 42px; padding: 0 14px; border-bottom: 1px solid var(--rule); font-family: var(--serif); font-style: italic; font-size: 13px; color: var(--smoke); }
.tab--notepad .np-crumb { flex: 1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; } .tab--notepad .np-crumb b { font-style: normal; font-weight: 400; color: var(--slate); }
.tab--notepad .np-btn { font-family: var(--sans); font-style: normal; font-size: 12.5px; padding: 5px 10px; border: 1px solid var(--ash); border-radius: 10px; color: var(--ink); }
.tab--notepad .np-btn.ox { background: var(--oxblood); border-color: var(--oxblood); color: var(--ivory); }
.tab--notepad .np-sheet { position: relative; margin: 18px 28px 0; flex: 1; background: var(--ivory); border: 1px solid var(--ash); padding: 26px 32px 0 56px; isolation: isolate; overflow: hidden; }
.tab--notepad .np-sheet::before { content: ""; position: absolute; inset: 6px -6px -6px 6px; border-right: 1px solid var(--ash); border-bottom: 1px solid var(--ash); z-index: -1; }
.tab--notepad .np-sheet::after { content: ""; position: absolute; top: 0; bottom: 0; left: 40px; border-left: 1px solid rgba(94, 8, 49, 0.16); }
.tab--notepad .np-kicker { margin: 0 0 10px; display: flex; justify-content: space-between; font-family: var(--serif); font-style: italic; font-size: 12.5px; color: var(--smoke); }
.tab--notepad h3 { margin: 0; font-family: var(--serif); font-weight: 400; font-size: clamp(40px, 4.4vw, 60px); line-height: 1; letter-spacing: -0.01em; }
.tab--notepad .np-meta { margin: 8px 0 14px; font-family: var(--serif); font-style: italic; font-size: 13px; color: var(--smoke); }
.tab--notepad .np-meta::first-letter { color: var(--sepia); }
.tab--notepad .np-body { margin: 0; font-family: var(--serif); font-size: 16px; line-height: 28px; color: var(--ink); max-width: 520px;
  background: repeating-linear-gradient(to bottom, transparent 0 27px, var(--rule) 27px 28px); }
.tab--notepad .np-link { color: var(--violet); border-bottom: 1px solid rgba(36, 45, 100, 0.35); } .tab--notepad .np-tag { color: var(--forest); font-family: var(--hand); font-size: 19px; }
.tab--notepad .np-ink { margin: 6px 0 0; font-family: var(--hand); font-size: 26px; color: var(--sepia); line-height: 28px; position: relative; display: inline-block; }
.tab--notepad .np-ink::after { content: "✎ recognising…"; position: absolute; left: 100%; top: 4px; margin-left: 14px; font-size: 16px; color: var(--sepia); background: var(--wash); padding: 0 8px; white-space: nowrap; transform: rotate(-1.5deg); opacity: 0; transition: opacity 0.6s var(--ease-focus); }
.tab:hover .np-ink::after { opacity: 1; }
.tab--notepad .np-rules { flex: 1; min-height: 60px; background: repeating-linear-gradient(to bottom, transparent 0 27px, var(--rule) 27px 28px); margin-top: 6px; }
.tab--notepad .np-panel { position: relative; z-index: 1; background: var(--halo); border-left: 1px solid var(--rule); padding: 14px; display: flex; flex-direction: column; gap: 14px; overflow: hidden; }
.tab--notepad .np-card { position: relative; background: var(--violet); color: var(--ivory); padding: 14px; }
.tab--notepad .np-card b { display: block; font-family: var(--serif); font-weight: 400; font-size: 20px; margin-bottom: 4px; }
.tab--notepad .np-card p { margin: 0 0 8px; font-size: 12.5px; line-height: 1.45; color: rgba(255, 253, 248, 0.75); } .tab--notepad .np-card em { font-style: italic; color: var(--ivory); }
.tab--notepad .np-card svg { display: block; width: 100%; height: 34px; }
.tab--notepad .np-hand { position: absolute; top: 8px; right: 12px; font-family: var(--hand); font-size: 17px; color: #ffc934; transform: rotate(6deg); }
.tab--notepad .np-transcript { font-family: var(--serif); font-size: 13px; line-height: 1.45; color: var(--slate); }
.tab--notepad .np-transcript b { display: block; font-weight: 400; font-size: 17px; color: var(--ink); margin-bottom: 6px; }
.tab--notepad .np-transcript p { margin: 0 0 6px; } .tab--notepad .np-transcript i { font-style: italic; color: var(--smoke); font-size: 11.5px; margin-right: 5px; }
.tab--notepad .np-cursor { color: var(--sepia); animation: np-blink 1s steps(2) infinite; }
@keyframes np-blink { 50% { opacity: 0; } }
.tab--notepad .tab__open { right: 24px; bottom: 18px; font-family: var(--sans); text-transform: none; letter-spacing: 0.01em; font-size: 14px; padding: 7px 14px; border-radius: 10px; background: var(--sepia); color: var(--ivory); }
.tab--notepad:hover .tab__open { background: #3d1e04; }

/* ============ 01 ASTRAL CODER — dark console ============ */
.tab--astral {
  --bg: #141416; --bg-2: #19191c; --bg-3: #202024; --bg-4: #2a2a2f; --sidebar: #111113; --panel: #17171a; --card: #1c1c20;
  --fg: #ececec; --fg-2: #b4b4bb; --fg-3: #7e7e88; --fg-4: #55555e; --border: #26262b; --border-2: #303036;
  --accent: #f97316; --ok: #4ade80; --warn: #fbbf24; --bad: #f87171; --info: #60a5fa; --info-bg: #172338; --purple: #a78bfa; --claude: #da7756; --codex: #10a37f; --shell: #5391fe;
  --sans: 'Inter', 'Segoe UI', system-ui, sans-serif; --mono: 'Cascadia Mono', 'Cascadia Code', Consolas, ui-monospace, monospace;
  background: var(--bg); color: var(--fg); font-family: var(--sans); font-size: 12.5px; line-height: 1.5; letter-spacing: 0;
  grid-template-columns: 200px minmax(0, 1fr) 232px;
  border: 1px solid var(--border-2);
}
.tab--astral .ac-sp { position: relative; display: inline-block; width: 1em; height: 1em; color: var(--claude); text-decoration: none; vertical-align: -1px; margin-right: 2px; }
.tab--astral .ac-sp.cx { color: var(--codex); }
.tab--astral .ac-sp i { position: absolute; inset: 0; font-style: normal; text-align: center; line-height: 1; opacity: 0; animation: ac-sp 0.96s steps(1) infinite; }
.tab--astral .ac-sp i:nth-child(2) { animation-delay: 0.24s; } .tab--astral .ac-sp i:nth-child(3) { animation-delay: 0.48s; } .tab--astral .ac-sp i:nth-child(4) { animation-delay: 0.72s; }
@keyframes ac-sp { 0%, 24.9% { opacity: 1; } 25%, 100% { opacity: 0; } }
.tab--astral .ac-stats { display: inline-flex; gap: 5px; font-family: var(--mono); font-size: 11px; white-space: nowrap; font-weight: 400; }
.tab--astral .ac-stats b { color: var(--ok); font-weight: 400; } .tab--astral .ac-stats s { color: var(--bad); text-decoration: none; }
.tab--astral .ac-side { background: var(--sidebar); border-right: 1px solid var(--border); padding: 0 8px 8px; display: flex; flex-direction: column; overflow: hidden; font-size: 12px; }
.tab--astral .ac-logo { height: 44px; display: flex; align-items: center; gap: 7px; padding: 0 4px; font-weight: 600; font-size: 13px; }
.tab--astral .ac-logo img { width: 19px; height: 19px; } .tab--astral .ac-logo b { flex: 1; font-weight: 600; }
.tab--astral .ac-logo svg { width: 15px; height: 15px; fill: none; stroke: var(--fg-2); stroke-width: 1.75; stroke-linecap: round; stroke-linejoin: round; margin-left: 6px; }
.tab--astral .ac-repo { height: 30px; display: flex; align-items: center; gap: 8px; padding: 0 6px; margin-top: 6px; font-weight: 600; font-size: 12.5px; }
.tab--astral .ac-repo em { font-style: normal; font-weight: 400; color: var(--fg-3); font-size: 11px; font-family: var(--mono); }
.tab--astral .ac-av { width: 18px; height: 18px; border-radius: 5px; background: var(--bg-4); color: var(--fg-2); font-size: 10.5px; font-weight: 700; display: grid; place-items: center; }
.tab--astral .ac-ws { display: grid; grid-template-columns: 3px minmax(0, 1fr) auto; gap: 9px; align-items: center; padding: 5px 8px 5px 4px; border-radius: 6px; margin: 1px 0; }
.tab--astral .ac-ws.on { background: rgba(255,255,255,0.1); }
.tab--astral .ac-ws > i { width: 3px; height: 30px; border-radius: 2px; background: var(--border-2); }
.tab--astral .ac-ws > i.working { background: var(--accent); } .tab--astral .ac-ws > i.dirty { background: var(--warn); } .tab--astral .ac-ws > i.pr { background: var(--info); } .tab--astral .ac-ws > i.clean { background: var(--ok); } .tab--astral .ac-ws > i.merged { background: var(--purple); }
.tab--astral .ac-ws > span:first-of-type { display: grid; gap: 1px; min-width: 0; }
.tab--astral .ac-ws b { font-size: 12.5px; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tab--astral .ac-ws b em { font-style: normal; margin-left: 6px; font-size: 10px; color: var(--fg-3); border: 1px solid var(--border-2); border-radius: 3px; padding: 0 4px; }
.tab--astral .ac-ws small { font-size: 11px; color: var(--fg-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tab--astral .ac-ws small .ac-sp { font-size: 12px; }
.tab--astral .ac-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--info); }
.tab--astral .ac-new { margin-top: auto; height: 34px; display: flex; align-items: center; gap: 8px; padding: 0 10px; border-radius: 6px; background: var(--fg); color: var(--bg); font-weight: 600; font-size: 12.5px; }
.tab--astral .ac-new kbd { margin-left: auto; font: 10.5px var(--sans); background: rgba(0,0,0,0.12); border-radius: 4px; padding: 0 5px; opacity: 0.8; }
.tab--astral .ac-main { display: flex; flex-direction: column; min-width: 0; }
.tab--astral .ac-top { height: 44px; display: flex; align-items: center; gap: 8px; padding: 0 12px; border-bottom: 1px solid var(--border); white-space: nowrap; overflow: hidden; }
.tab--astral .ac-top > b { font-size: 14px; font-weight: 700; }
.tab--astral .ac-chip { height: 24px; display: inline-flex; align-items: center; gap: 5px; padding: 0 8px; border-radius: 999px; background: var(--bg-3); color: var(--fg-2); font-size: 11.5px; font-family: var(--mono); }
.tab--astral .ac-chip em { font-style: normal; color: var(--fg-3); font-size: 10.5px; } .tab--astral .ac-chip.pr { font-family: var(--sans); font-weight: 600; background: var(--info-bg); color: var(--info); }
.tab--astral .ac-pills { margin-left: auto; display: inline-flex; gap: 6px; }
.tab--astral .ac-pills span { height: 28px; display: inline-flex; align-items: center; padding: 0 10px; border-radius: 999px; border: 1px solid var(--border-2); background: var(--card); color: var(--fg-2); font-size: 12px; font-weight: 500; }
.tab--astral .ac-pills .primary { background: var(--fg); color: var(--bg); border-color: var(--fg); }
.tab--astral .ac-tabs { height: 36px; display: flex; align-items: center; gap: 4px; padding: 0 8px; border-bottom: 1px solid var(--border); font-size: 12px; color: var(--fg-2); white-space: nowrap; overflow: hidden; }
.tab--astral .ac-tabs > span { height: 28px; display: inline-flex; align-items: center; gap: 6px; padding: 0 9px; border-radius: 6px; }
.tab--astral .ac-tabs > span.on { background: rgba(255,255,255,0.1); color: var(--fg); font-weight: 500; }
.tab--astral .ac-tabs .sh { text-decoration: none; font-family: var(--mono); font-size: 11px; color: var(--shell); }
.tab--astral .ac-tabs .add { color: var(--fg-3); } .tab--astral .ac-tabs .views { margin-left: auto; color: var(--fg-3); }
.tab--astral .ac-chat { flex: 1; padding: 18px 24px 8px; min-height: 0; overflow: hidden; }
.tab--astral .ac-kicker { margin: 0 0 8px; display: flex; justify-content: space-between; font-size: 11.5px; color: var(--fg-3); letter-spacing: 0.02em; }
.tab--astral h3 { margin: 0; font-size: clamp(34px, 3.4vw, 50px); font-weight: 700; letter-spacing: -0.035em; line-height: 1; }
.tab--astral .ac-lead { margin: 10px 0 12px; max-width: 560px; font-size: 13.5px; line-height: 1.55; color: var(--fg-2); }
.tab--astral .ac-user { margin: 0 0 8px 22%; background: var(--bg-3); border-radius: 12px 12px 4px 12px; padding: 8px 12px; font-size: 12.5px; }
.tab--astral .ac-asst { display: grid; grid-template-columns: 22px minmax(0, 1fr); gap: 12px; font-size: 12.5px; }
.tab--astral .ac-who { width: 18px; height: 18px; color: var(--claude); margin-top: 4px; } .tab--astral .ac-who svg { width: 18px; height: 18px; }
.tab--astral .ac-think { display: inline-flex; align-items: center; gap: 6px; font-style: italic; font-size: 12px; color: var(--fg-3); margin: 3px 0 4px; }
.tab--astral .ac-think::before { content: "›"; font-style: normal; color: var(--fg-4); }
.tab--astral .ac-tool { display: flex; align-items: center; gap: 8px; padding: 2px 0; font-size: 12px; color: var(--fg-2); }
.tab--astral .ac-tool em { font-style: normal; color: var(--fg-3); min-width: 34px; } .tab--astral .ac-tool code { font-family: var(--mono); font-size: 11.5px; color: var(--fg); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; } .tab--astral .ac-tool i { font-style: normal; color: var(--fg-4); margin-left: auto; }
.tab--astral .ac-asst p { margin: 6px 0 4px; line-height: 1.55; }
.tab--astral .ac-turn { display: flex; align-items: center; gap: 12px; font-size: 11.5px; color: var(--fg-3); } .tab--astral .ac-turn .ok { color: var(--ok); }
.tab--astral .ac-pill { display: inline-flex; align-items: center; gap: 5px; height: 22px; padding: 0 8px; border-radius: 999px; border: 1px solid var(--border-2); color: var(--fg-2); font-size: 11px; }
.tab--astral .ac-pill b, .tab--astral .ac-pill s { font-family: var(--mono); font-weight: 400; text-decoration: none; } .tab--astral .ac-pill b { color: var(--ok); } .tab--astral .ac-pill s { color: var(--bad); }
.tab--astral .ac-composer { margin: 4px 24px 18px; border: 1px solid var(--border-2); border-radius: 14px; background: var(--card); padding: 8px 10px 6px 14px; }
.tab--astral .ac-ta { display: block; color: var(--fg-3); font-size: 13px; padding: 4px 0 8px; }
.tab--astral .ac-row { display: flex; align-items: center; gap: 4px; font-size: 11.5px; color: var(--fg-2); }
.tab--astral .ac-row span { height: 24px; display: inline-flex; align-items: center; padding: 0 8px; border-radius: 999px; }
.tab--astral .ac-row em { margin-left: auto; font-style: normal; font-size: 11px; color: var(--fg-4); margin-right: 6px; }
.tab--astral .ac-row b { width: 30px; height: 30px; border-radius: 50%; background: var(--bg-3); color: var(--fg-3); display: grid; place-items: center; font-weight: 600; }
.tab--astral .ac-panel { background: var(--panel); border-left: 1px solid var(--border); overflow: hidden; font-size: 12px; }
.tab--astral .ac-ptabs { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); border-bottom: 1px solid var(--border); padding: 8px 8px 0; gap: 2px; }
.tab--astral .ac-ptabs span { height: 32px; display: flex; align-items: center; justify-content: center; gap: 6px; color: var(--fg-3); font-weight: 500; border-bottom: 2px solid transparent; }
.tab--astral .ac-ptabs span.on { color: var(--fg); border-bottom-color: var(--fg); }
.tab--astral .ac-ptabs em { font-style: normal; font-size: 10.5px; color: var(--fg-3); background: var(--bg-3); border-radius: 999px; padding: 0 6px; }
.tab--astral .ac-sec { padding: 12px 14px; border-bottom: 1px solid var(--border); }
.tab--astral .ac-sec > b { display: block; font-weight: 600; font-size: 12.5px; margin-bottom: 8px; }
.tab--astral .ac-kv { display: grid; grid-template-columns: 56px minmax(0, 1fr); gap: 8px; padding: 2px 0; }
.tab--astral .ac-kv span { color: var(--fg-3); } .tab--astral .ac-kv code { font-family: var(--mono); font-size: 11.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tab--astral .ac-file { display: flex; align-items: center; gap: 6px; padding: 4px 0 0; white-space: nowrap; min-width: 0; }
.tab--astral .ac-file i { font-style: normal; font-family: var(--mono); font-size: 10px; width: 14px; text-align: center; } .tab--astral .ac-file i.M { color: var(--warn); } .tab--astral .ac-file i.A { color: var(--ok); }
.tab--astral .ac-file small { color: var(--fg-4); font-size: 11px; overflow: hidden; text-overflow: ellipsis; flex: 1; min-width: 0; }
.tab--astral .ac-prt { margin: 0 0 6px; font-weight: 600; font-size: 13px; }
.tab--astral .ac-prm { display: flex; align-items: center; gap: 8px; font-family: var(--mono); font-size: 11px; color: var(--fg-3); margin-bottom: 8px; white-space: nowrap; overflow: hidden; }
.tab--astral .ac-prm em { font-style: normal; font-family: var(--sans); font-size: 10.5px; font-weight: 600; padding: 1px 7px; border-radius: 999px; background: #12301e; color: var(--ok); }
.tab--astral .ac-check { display: flex; align-items: center; gap: 8px; padding: 2px 0; }
.tab--astral .ac-check i { font-style: normal; width: 14px; text-align: center; } .tab--astral .ac-check i.ok { color: var(--ok); } .tab--astral .ac-check i.pend { color: var(--warn); }
.tab--astral .ac-check small { margin-left: auto; color: var(--fg-3); font-size: 11px; }
.tab--astral .tab__open { right: 24px; bottom: 18px; font-family: var(--sans); text-transform: none; letter-spacing: 0; font-size: 13px; font-weight: 500; padding: 7px 14px; border-radius: 999px; background: var(--fg); color: var(--bg); }
.tab--astral:hover .tab__open { filter: brightness(1.15); }

/* ============ 08 MAX PHOTOS — dark editorial gallery ============ */
.tab--maxphotos {
  --ink: #0a0a0b; --ink-card: #101012;
  --ivory: #ece7df; --ivory-dim: #a8a29a; --ivory-faint: #6b6660;
  --hairline: rgba(236, 231, 223, 0.12); --gold: #c9a86a;
  --serif: 'Cormorant Garamond', Georgia, serif; --script: 'Pinyon Script', cursive;
  background: var(--ink); color: var(--ivory); font-family: var(--serif);
  grid-template-columns: 1.05fr minmax(0, 1fr);
  min-height: 424px;
  border: 1px solid rgba(236, 231, 223, 0.1);
}
/* film grain, the same quiet layer the real site puts over everything */
.tab--maxphotos::before {
  content: ""; position: absolute; inset: 0; pointer-events: none; z-index: 4; opacity: 0.045;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='240' height='240'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='3'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}
.tab--maxphotos .mp-side {
  position: relative; z-index: 2;
  display: flex; flex-direction: column; align-items: flex-start;
  padding: 34px 44px 92px;
}
.tab--maxphotos .mp-kicker {
  display: flex; justify-content: space-between; gap: 16px; width: 100%; margin: 0;
  font-size: 11px; letter-spacing: 0.22em; text-transform: uppercase; color: var(--ivory-faint);
}
.tab--maxphotos .mp-brand { margin-top: auto; }
.tab--maxphotos h3 {
  margin: 0; font-weight: 300; font-size: clamp(32px, 3.3vw, 48px);
  letter-spacing: 0.28em; text-indent: 0.28em; line-height: 1.05; white-space: nowrap;
}
.tab--maxphotos .mp-script {
  margin: 2px 0 0 6px; font-family: var(--script); font-size: clamp(19px, 1.9vw, 27px);
  color: var(--gold); opacity: 0.9; transform: rotate(-2deg);
}
.tab--maxphotos .mp-intro {
  margin: 20px 0 0; max-width: 350px;
  font-size: 16px; font-weight: 300; line-height: 1.6; color: var(--ivory-dim);
}
.tab--maxphotos .mp-meta {
  margin: 22px 0 auto; padding-top: 15px; width: 100%; max-width: 380px;
  border-top: 1px solid var(--hairline);
  display: flex; flex-direction: column; gap: 5px;
  font-size: 10.5px; letter-spacing: 0.2em; text-transform: uppercase; color: var(--ivory-faint);
}
.tab--maxphotos .mp-meta span:first-child { color: var(--ivory-dim); }
/* one photograph, bled off the right edge and melted into the ink on its left */
.tab--maxphotos .mp-shot { position: relative; overflow: hidden; background: var(--ink-card); }
.tab--maxphotos .mp-shot img {
  width: 100%; height: 100%; object-fit: cover; display: block; transform: scale(1.02);
  transition: transform 1.6s cubic-bezier(0.2, 0.7, 0.2, 1);
}
.tab:hover .mp-shot img { transform: scale(1.065); }
.tab--maxphotos .mp-shot::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(90deg, var(--ink) 0%, rgba(10, 10, 11, 0) 26%);
}
.tab--maxphotos .tab__open {
  left: 44px; right: auto; bottom: 38px;
  font-family: var(--serif); font-size: 11.5px; letter-spacing: 0.24em;
  color: var(--ivory-dim); border-bottom: 1px solid var(--hairline); padding-bottom: 7px;
}
.tab--maxphotos:hover .tab__open { color: var(--gold); border-bottom-color: var(--gold); }

/* ============ 02 STARMAP — the real render, minimal chrome ============ */
.tab--starmap {
  --panel-border: rgba(140, 170, 255, 0.16);
  --text: #dfe6f5; --dim: #8a94ad; --accent: #7fb2ff;
  --mono: ui-monospace, 'Cascadia Mono', 'JetBrains Mono', Consolas, monospace;
  --sans: 'Segoe UI', system-ui, -apple-system, Roboto, sans-serif;
  background: #000; color: var(--text); font-family: var(--sans);
  grid-template-columns: minmax(0, 1fr);
  min-height: 470px;
  border: 1px solid var(--panel-border);
}
/* a real frame from the app: the Milky Way seen edge-on, its own labels intact */
.tab--starmap .sm-sky {
  position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 50% 50%;
  z-index: 0; transform: scale(1.02); transition: transform 2s cubic-bezier(0.2, 0.7, 0.2, 1);
}
.tab:hover .sm-sky { transform: scale(1.07); }
/* keep the left readable without flattening the picture */
.tab--starmap .sm-veil {
  position: absolute; inset: 0; z-index: 1; pointer-events: none;
  background:
    linear-gradient(90deg, #000 0%, rgba(0,0,0,.94) 24%, rgba(0,0,0,.66) 46%, rgba(0,0,0,.12) 78%, transparent 100%),
    linear-gradient(180deg, rgba(0,0,0,.55), transparent 26%, transparent 72%, rgba(0,0,0,.7));
}
.tab--starmap .sm-brand {
  position: absolute; top: 22px; left: 30px; z-index: 2;
  font-weight: 600; letter-spacing: 0.3em; color: #fff; font-size: 12.5px;
}
.tab--starmap .sm-brand em { font-style: normal; letter-spacing: 0.05em; color: var(--dim); font-weight: 400; font-size: 10.5px; margin-left: 8px; }
.tab--starmap .sm-body {
  position: relative; z-index: 2; display: flex; flex-direction: column; justify-content: center;
  padding: 0 30px; max-width: 620px;
}
.tab--starmap .sm-kicker {
  margin: 0 0 16px; display: flex; gap: 18px;
  font-size: 10.5px; letter-spacing: 0.2em; text-transform: uppercase; color: var(--dim);
}
.tab--starmap .sm-kicker span + span { color: #5a6278; }
.tab--starmap h3 {
  margin: 0; font-size: clamp(42px, 5.4vw, 74px); font-weight: 600; line-height: 1;
  letter-spacing: 0.06em; color: #fff; text-shadow: 0 0 60px rgba(127,178,255,.35), 0 2px 30px rgba(0,0,0,.8);
}
.tab--starmap .sm-lead {
  margin: 18px 0 0; max-width: 430px; font-size: 14px; line-height: 1.65; color: #c9d1e3;
  text-shadow: 0 1px 12px rgba(0,0,0,.9);
}
.tab--starmap .sm-facts { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 20px; }
.tab--starmap .sm-facts span {
  background: rgba(10, 14, 24, 0.55); border: 1px solid var(--panel-border); color: var(--text);
  border-radius: 12px; padding: 4px 11px; font-size: 11.5px; backdrop-filter: blur(6px);
}
/* the app's signature bottom line, and nothing else */
.tab--starmap .sm-hud {
  position: absolute; left: 30px; right: 30px; bottom: 20px; z-index: 2;
  display: flex; align-items: flex-end; justify-content: space-between; gap: 16px;
  font-family: var(--mono); font-size: 11px;
}
.tab--starmap .sm-g { display: flex; align-items: center; gap: 8px; min-width: 0; }
.tab--starmap .sm-g i {
  font-style: normal; background: rgba(127,178,255,.16); border: 1px solid var(--panel-border);
  color: var(--text); padding: 3px 8px; border-radius: 4px; font-size: 10.5px;
}
.tab--starmap .sm-g b { color: #fff; font-weight: 400; white-space: nowrap; }
.tab--starmap .sm-g u { color: var(--dim); text-decoration: none; white-space: nowrap; }
.tab--starmap .sm-scale { display: flex; flex-direction: column; align-items: flex-end; gap: 3px; }
.tab--starmap .sm-scale s {
  display: block; width: 88px; height: 2px; background: #fff; text-decoration: none;
  border-left: 1px solid #fff; border-right: 1px solid #fff; box-shadow: 0 0 3px #000;
}
.tab--starmap .sm-scale u { color: var(--dim); text-decoration: none; }
.tab--starmap .tab__open {
  right: 30px; bottom: 52px; font-family: var(--sans); text-transform: none; letter-spacing: 0.01em;
  font-size: 12.5px; padding: 8px 15px; border-radius: 6px;
  background: rgba(127,178,255,.28); border: 1px solid rgba(127,178,255,.5); color: #fff;
  backdrop-filter: blur(6px);
}
.tab--starmap:hover .tab__open { background: rgba(127,178,255,.45); }

/* ============ 03 MALT — warm cream, one tan accent ============ */
.tab--malt {
  --cream: #FFF8F0; --cream-deep: #F3EBE0; --surface: #FFFFFF;
  --primary: #C9975E; --primary-hover: #B8864E; --primary-soft: rgba(201, 151, 94, 0.10);
  --secondary: #7D6B52; --text: #2B2825; --text-2: #6E6862; --text-3: #A9A29B;
  --rule: rgba(125, 107, 82, 0.12); --rule-strong: rgba(125, 107, 82, 0.22);
  --shadow-sm: 0 1px 4px rgba(40,36,30,0.06), 0 1px 2px rgba(40,36,30,0.04);
  --shadow-md: 0 4px 12px rgba(40,36,30,0.07), 0 1px 3px rgba(40,36,30,0.05);
  --shadow-lg: 0 12px 40px rgba(40,36,30,0.10), 0 2px 8px rgba(40,36,30,0.04);
  --sans: 'DM Sans', -apple-system, BlinkMacSystemFont, sans-serif;
  --display: 'Fraunces', Georgia, serif;
  background: var(--cream); color: var(--text); font-family: var(--sans); font-size: 14px;
  grid-template-columns: minmax(0, 1.04fr) minmax(0, 1fr);
  min-height: 450px;
  border: 1px solid var(--rule-strong);
}
/* the app's faint 40px grid */
.tab--malt::before {
  content: ""; position: absolute; inset: 0; z-index: 0; pointer-events: none;
  background-image:
    linear-gradient(rgba(160,142,120,0.055) 1px, transparent 1px),
    linear-gradient(90deg, rgba(160,142,120,0.055) 1px, transparent 1px);
  background-size: 40px 40px;
}
/* a soft warm glow behind the panel side */
.tab--malt::after {
  content: ""; position: absolute; inset: 0; z-index: 0; pointer-events: none;
  background: radial-gradient(ellipse 52% 70% at 78% 50%, rgba(201, 151, 94, 0.13), transparent 70%);
}
.tab--malt .ml-left {
  position: relative; z-index: 1; display: flex; flex-direction: column; justify-content: center;
  padding: 36px 34px 86px 40px; min-width: 0;
}
.tab--malt .ml-kicker {
  margin: 0 0 20px; display: flex; justify-content: space-between; gap: 14px;
  font-size: 10.5px; letter-spacing: 0.18em; text-transform: uppercase; color: var(--text-3); font-weight: 500;
}
.tab--malt .ml-brand { display: flex; align-items: center; gap: 15px; }
.tab--malt .ml-brand svg { width: 52px; height: 52px; flex: none; border-radius: 14px; box-shadow: 0 8px 22px rgba(201,151,94,.26); }
.tab--malt h3 {
  margin: 0; font-family: var(--display); font-size: clamp(42px, 5vw, 68px); font-weight: 600;
  line-height: .95; letter-spacing: -.03em; color: var(--text);
}
.tab--malt .ml-lead { margin: 20px 0 0; max-width: 430px; font-size: 14.5px; line-height: 1.62; color: var(--text-2); }
.tab--malt .ml-modes { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 22px; }
.tab--malt .ml-modes span {
  background: var(--surface); border: 1px solid var(--rule); color: var(--text-2);
  border-radius: 9999px; padding: 5px 13px; font-size: 12.5px; box-shadow: var(--shadow-sm);
}
/* the Compare panel: one question, three answers */
.tab--malt .ml-right { position: relative; z-index: 1; display: flex; align-items: center; padding: 36px 40px 36px 12px; min-width: 0; }
.tab--malt .ml-panel {
  width: 100%; background: var(--surface); border: 1px solid var(--rule);
  border-radius: 16px; box-shadow: var(--shadow-lg); padding: 16px; display: grid; gap: 10px;
}
.tab--malt .ml-ask {
  background: var(--cream-deep); border-radius: 12px; padding: 10px 14px;
  font-size: 13.5px; color: var(--text); font-weight: 500;
}
.tab--malt .ml-ans { border: 1px solid var(--rule); border-radius: 12px; padding: 11px 13px; background: var(--surface); }
.tab--malt .ml-who {
  display: inline-flex; align-items: center; gap: 7px;
  font-size: 11.5px; font-weight: 600; color: var(--text); letter-spacing: -.01em;
}
.tab--malt .ml-who i { width: 8px; height: 8px; border-radius: 50%; background: var(--c); display: block; flex: none; }
.tab--malt .ml-ans p { margin: 5px 0 0; font-size: 12.5px; line-height: 1.5; color: var(--text-2); }
.tab:hover .ml-panel { transform: translateY(-3px); }
.tab--malt .ml-panel { transition: transform 0.7s var(--ease-focus); }
.tab--malt .tab__open {
  left: 40px; right: auto; bottom: 30px; font-family: var(--sans); text-transform: none; letter-spacing: 0.01em;
  font-size: 13px; font-weight: 500; padding: 9px 17px; border-radius: 9999px;
  background: var(--primary); color: #fff; box-shadow: 0 6px 18px rgba(201,151,94,.34);
}
.tab--malt:hover .tab__open { background: var(--primary-hover); }

/* ============ 04 FALLEN — Dovetail: blueprint grid under a black moon ============ */
.tab--fallen {
  --f-indigo: #6798ff;
  --f-black: #000000;
  --f-carbon: #0a0a0a;
  --f-graphite: #141414;
  --f-iron: #1e1e1e;
  --f-edge: #313131;
  --f-smoke: #454545;
  --f-mist: #7c7c7c;
  --f-ash: #a7a7a7;
  --f-bone: #ffffff;
  /* the product needs one alarm colour; everything else is bone + one indigo */
  --f-alarm: #ff4d4f;
  --f-mono: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  background: var(--f-carbon); color: var(--f-bone);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, 'Segoe UI', sans-serif;
  letter-spacing: -0.25px;
  grid-template-columns: minmax(0, 1.38fr) minmax(0, 1fr) 216px;
  grid-template-rows: 64px minmax(0, 1fr);
  border: 1px solid var(--f-iron);
  min-height: 486px;
}
/* ---- title bar ---- */
.tab--fallen .fl-top {
  grid-column: 1 / -1;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 0 24px; border-bottom: 1px solid var(--f-iron); background: var(--f-carbon);
}
.tab--fallen .fl-brand { display: flex; align-items: center; gap: 10px; font-weight: 600; font-size: 16px; }
.tab--fallen .fl-brand i { width: 10px; height: 10px; border-radius: 2px; background: var(--f-indigo); }
.tab--fallen .fl-brand em {
  font-style: normal; font-family: var(--f-mono); font-size: 12px;
  letter-spacing: 0.85px; text-transform: uppercase; color: var(--f-ash); font-weight: 400;
}
.tab--fallen .fl-stats { display: flex; align-items: center; gap: 24px; }
.tab--fallen .fl-stats s {
  display: flex; flex-direction: column; align-items: flex-end; gap: 2px; text-decoration: none;
  font-family: var(--f-mono); font-size: 12px; letter-spacing: 0.85px;
  text-transform: uppercase; color: var(--f-mist);
}
.tab--fallen .fl-stats u {
  text-decoration: none; text-transform: none; letter-spacing: 0;
  font-family: var(--f-mono); font-size: 12px; color: var(--f-bone);
}
/* status reads as a tag, not a nav pill: 4px, mono, uppercase */
.tab--fallen .fl-pill {
  display: inline-flex; align-items: center; gap: 8px; padding: 5px 10px;
  border-radius: 4px; background: var(--f-graphite);
  border: 1px solid var(--f-indigo); color: var(--f-indigo);
  font-family: var(--f-mono); font-size: 12px; font-weight: 400;
  letter-spacing: 0.85px; text-transform: uppercase;
  animation: fl-pillcol 6s infinite;
}
.tab--fallen .fl-pill i { width: 6px; height: 6px; border-radius: 50%; background: currentColor; animation: fl-pulse 1.1s infinite; }
.tab--fallen .fl-pill u { position: relative; display: block; text-decoration: none; width: 104px; height: 14px; }
.tab--fallen .fl-pill s {
  position: absolute; left: 0; top: 0; text-decoration: none; white-space: nowrap;
  line-height: 14px; opacity: 0;
}
.tab--fallen .fl-pill .s1 { animation: fl-s1 6s infinite; }
.tab--fallen .fl-pill .s2 { animation: fl-s2 6s infinite; }
.tab--fallen .fl-pill .s3 { animation: fl-s3 6s infinite; }
.tab--fallen .fl-pill .s4 { animation: fl-s4 6s infinite; }
/* indigo while it is only watching, bone once it is suspicious, alarm once it is sure */
@keyframes fl-pillcol {
  0%, 31%   { border-color: #6798ff; color: #6798ff; }
  34%, 64%  { border-color: #ffffff; color: #ffffff; }
  68%, 88%  { border-color: #ff4d4f; color: #ff4d4f; }
  94%, 100% { border-color: #6798ff; color: #6798ff; }
}
@keyframes fl-s1 { 0%, 31% { opacity: 1; } 33%, 91% { opacity: 0; } 94%, 100% { opacity: 1; } }
@keyframes fl-s2 { 0%, 32% { opacity: 0; } 34%, 47% { opacity: 1; } 49%, 100% { opacity: 0; } }
@keyframes fl-s3 { 0%, 48% { opacity: 0; } 51%, 64% { opacity: 1; } 66%, 100% { opacity: 0; } }
@keyframes fl-s4 { 0%, 65% { opacity: 0; } 68%, 88% { opacity: 1; } 91%, 100% { opacity: 0; } }
@keyframes fl-pulse { 0%, 100% { opacity: 1; } 50% { opacity: .3; } }

/* ---- the camera: graph paper, a white figure, one indigo spark ---- */
.tab--fallen .fl-stage {
  position: relative; overflow: hidden;
  background: var(--f-graphite);
  border-right: 1px solid var(--f-iron);
  display: flex; flex-direction: column;
  padding: 24px;
}
/* the blueprint grid, 1px at 48px, behind everything in the panel */
.tab--fallen .fl-stage::before {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background-image:
    linear-gradient(to right, var(--f-iron) 1px, transparent 1px),
    linear-gradient(to bottom, var(--f-iron) 1px, transparent 1px);
  background-size: 48px 48px;
}
.tab--fallen .fl-ch-head { position: relative; display: flex; align-items: baseline; gap: 12px; flex: 0 0 auto; }
.tab--fallen .fl-ch-head b {
  font-family: var(--f-mono); font-size: 12px; font-weight: 400;
  letter-spacing: 0.85px; text-transform: uppercase; color: var(--f-ash);
}
.tab--fallen .fl-ch-head > span {
  font-family: var(--f-mono); font-size: 12px; letter-spacing: 0.85px;
  text-transform: uppercase; color: var(--f-mist);
}
.tab--fallen .fl-ch-head u { position: relative; margin-left: auto; text-decoration: none; width: 76px; height: 30px; flex: 0 0 auto; }
.tab--fallen .fl-ch-head s {
  position: absolute; right: 0; top: 0; text-decoration: none; opacity: 0;
  font-size: 24px; font-weight: 500; line-height: 30px; letter-spacing: -0.6px;
}
.tab--fallen .fl-ch-head .n1 { color: var(--f-indigo); animation: fl-ph1 6s infinite; }
.tab--fallen .fl-ch-head .n2 { color: var(--f-bone); animation: fl-ph2 6s infinite; }
.tab--fallen .fl-ch-head .n3 { color: var(--f-alarm); animation: fl-ph3 6s infinite; }

.tab--fallen .fl-cam { position: relative; flex: 1 1 auto; min-height: 150px; margin-top: 16px; overflow: hidden; }
.tab--fallen .fl-scene { animation: fl-shake 6s infinite; }
.tab--fallen .fl-actors { animation: fl-cast 6s infinite; }
@keyframes fl-cast { 0%, 87% { opacity: 1; } 88.5%, 93% { opacity: 0; } 96%, 100% { opacity: 1; } }
/* the figure is bone; only its joints carry the accent */
.tab--fallen .fl-fig { color: var(--f-bone); animation: fl-figcol 6s infinite; }
.tab--fallen .fl-scene .j { fill: var(--f-indigo); stroke: none; }
@keyframes fl-figcol {
  0%, 45.5% { color: #ffffff; }
  46.5%, 88.5% { color: #ff4d4f; }
  89.5%, 100% { color: #ffffff; }
}
.tab--fallen .fl-banner {
  position: absolute; top: 12px; left: 12px; z-index: 3; opacity: 0;
  padding: 5px 10px; border-radius: 4px;
  font-family: var(--f-mono); font-size: 12px; letter-spacing: 0.85px; text-transform: uppercase;
  white-space: nowrap;
}
.tab--fallen .fl-banner.b1 { background: var(--f-bone); color: var(--f-carbon); animation: fl-bn1 6s infinite; }
.tab--fallen .fl-banner.b2 { background: var(--f-alarm); color: var(--f-bone); animation: fl-bn2 6s infinite; }
@keyframes fl-bn1 { 0%, 34% { opacity: 0; } 36%, 64% { opacity: 1; } 66%, 100% { opacity: 0; } }
@keyframes fl-bn2 { 0%, 66% { opacity: 0; } 68%, 87.5% { opacity: 1; } 89%, 100% { opacity: 0; } }
.tab--fallen .fl-stamp {
  position: absolute; left: 0; bottom: 0; z-index: 3;
  background: var(--f-iron); color: var(--f-ash);
  padding: 4px 10px; border-radius: 4px;
  font-family: var(--f-mono); font-size: 12px; letter-spacing: 0.85px; white-space: nowrap;
}
/* depth by luminance, never by shadow: the alert is a 1px edge, not a glow */
.tab--fallen .fl-cam::after {
  content: ""; position: absolute; inset: 0; pointer-events: none; z-index: 4; opacity: 0;
  box-shadow: inset 0 0 0 1px var(--f-alarm);
  animation: fl-wash 6s infinite;
}
@keyframes fl-wash { 0%, 34% { opacity: 0; } 37%, 87.5% { opacity: 1; } 89%, 100% { opacity: 0; } }

/* the detection box and its label, keyed to the same three states */
.tab--fallen .fl-box {
  transform-box: view-box; transform-origin: 176px 28px;
  fill: rgba(103, 152, 255, .06); stroke: var(--f-indigo); stroke-width: 1.5;
  animation: fl-boxgeo 6s infinite, fl-boxcol 6s infinite;
}
@keyframes fl-boxcol {
  0%, 30.5%   { stroke: #6798ff; fill: rgba(103, 152, 255, .06); }
  31.5%, 45.5% { stroke: #ffffff; fill: rgba(255, 255, 255, .05); }
  46.5%, 88.5%  { stroke: #ff4d4f; fill: rgba(255, 77, 79, .07); }
  89.5%, 100% { stroke: #6798ff; fill: rgba(103, 152, 255, .06); }
}
.tab--fallen .fl-labbg { animation: fl-labbg 6s infinite; }
@keyframes fl-labbg {
  0%, 30.5%   { fill: #6798ff; }
  31.5%, 45.5% { fill: #ffffff; }
  46.5%, 88.5%  { fill: #ff4d4f; }
  89.5%, 100% { fill: #6798ff; }
}
.tab--fallen .fl-t { font-family: var(--f-mono); font-size: 11px; fill: #0a0a0a; letter-spacing: 0; opacity: 0; }
.tab--fallen .fl-t.t1 { animation: fl-ph1 6s infinite; }
.tab--fallen .fl-t.t2 { animation: fl-ph2 6s infinite; }
.tab--fallen .fl-t.t3 { animation: fl-ph3 6s infinite; }
@keyframes fl-ph1 { 0%, 30.6% { opacity: 1; } 31.4%, 88.8% { opacity: 0; } 89.6%, 100% { opacity: 1; } }
@keyframes fl-ph2 { 0%, 30.6% { opacity: 0; } 31.4%, 45.6% { opacity: 1; } 46.4%, 100% { opacity: 0; } }
@keyframes fl-ph3 { 0%, 45.6% { opacity: 0; } 46.4%, 87.5% { opacity: 1; } 88.8%, 100% { opacity: 0; } }
.tab--fallen .fl-ring { stroke: var(--f-bone); }

/* the pipeline, as tags */
.tab--fallen .fl-ev {
  position: relative; display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
  margin-top: 16px; padding-top: 16px; border-top: 1px solid var(--f-iron);
  font-family: var(--f-mono); font-size: 12px; letter-spacing: 0.85px; text-transform: uppercase; flex: 0 0 auto;
}
.tab--fallen .fl-ev span {
  padding: 4px 10px; border-radius: 4px; border: 1px solid var(--f-iron);
  background: var(--f-carbon); white-space: nowrap; color: var(--f-mist);
}
.tab--fallen .fl-ev i { font-style: normal; color: var(--f-smoke); }
.tab--fallen .fl-ev .p1 { animation: fl-lit1 6s infinite; }
.tab--fallen .fl-ev .p2 { animation: fl-lit2 6s infinite; }
.tab--fallen .fl-ev .p3 { animation: fl-lit3 6s infinite; }
.tab--fallen .fl-ev .p4 { animation: fl-lit4 6s infinite; }
@keyframes fl-lit1 { 0%, 30% { color: #6798ff; border-color: rgba(103,152,255,.4); } 33%, 93% { color: #7c7c7c; border-color: #1e1e1e; } 96%, 100% { color: #6798ff; border-color: rgba(103,152,255,.4); } }
@keyframes fl-lit2 { 0%, 32% { color: #7c7c7c; } 34%, 47% { color: #ffffff; border-color: #454545; } 50%, 100% { color: #7c7c7c; border-color: #1e1e1e; } }
@keyframes fl-lit3 { 0%, 48% { color: #7c7c7c; } 51%, 64% { color: #6798ff; border-color: rgba(103,152,255,.4); } 67%, 100% { color: #7c7c7c; border-color: #1e1e1e; } }
@keyframes fl-lit4 { 0%, 65% { color: #7c7c7c; } 68%, 88% { color: #ff4d4f; border-color: rgba(255,77,79,.4); } 91%, 100% { color: #7c7c7c; border-color: #1e1e1e; } }

/* ---- the copy ---- */
.tab--fallen .fl-side { padding: 24px 24px 64px; display: flex; flex-direction: column; min-width: 0; }
.tab--fallen .fl-kicker {
  display: flex; justify-content: space-between; gap: 16px; margin: 0;
  font-family: var(--f-mono); font-size: 12px; letter-spacing: 0.85px;
  text-transform: uppercase; color: var(--f-ash);
}
.tab--fallen h3 {
  margin: 24px 0 0; font-size: clamp(32px, 3.2vw, 40px); font-weight: 500;
  letter-spacing: -0.84px; line-height: 1.2; color: var(--f-bone);
}
.tab--fallen .fl-lead { margin: 16px 0 0; font-size: 16px; line-height: 1.5; color: var(--f-ash); }
.tab--fallen .fl-chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 24px; }
.tab--fallen .fl-chips span {
  background: var(--f-graphite); border: 1px solid var(--f-iron); color: var(--f-ash);
  border-radius: 4px; padding: 4px 10px; white-space: nowrap;
  font-family: var(--f-mono); font-size: 12px; letter-spacing: 0.85px; text-transform: uppercase;
}
.tab--fallen .fl-meter {
  margin-top: auto; padding-top: 24px; border-top: 1px solid var(--f-iron);
  display: grid; gap: 12px;
}
.tab--fallen .fl-meter div { display: grid; grid-template-columns: 80px minmax(0, 1fr) 44px; gap: 16px; align-items: center; }
.tab--fallen .fl-meter b {
  font-family: var(--f-mono); font-size: 12px; font-weight: 400;
  letter-spacing: 0.85px; text-transform: uppercase; color: var(--f-mist);
}
.tab--fallen .fl-meter s { height: 2px; background: var(--f-iron); overflow: hidden; text-decoration: none; }
.tab--fallen .fl-meter i { display: block; height: 100%; background: var(--f-indigo); }
.tab--fallen .fl-meter i.cy { background: var(--f-smoke); }
.tab--fallen .fl-meter u {
  text-decoration: none; font-family: var(--f-mono); font-size: 12px; color: var(--f-bone); text-align: right;
}
.tab--fallen .fl-fine {
  margin: 16px 0 0; font-family: var(--f-mono); font-size: 12px;
  line-height: 1.4; letter-spacing: 0.85px; text-transform: uppercase; color: var(--f-mist);
}

/* ---- and the payoff ---- */
.tab--fallen .fl-phone {
  position: relative; align-self: center; justify-self: center;
  width: 196px; padding: 8px; border-radius: 20px;
  background: var(--f-iron); border: 1px solid var(--f-edge);
}
.tab--fallen .fl-notch {
  position: absolute; top: 14px; left: 50%; transform: translateX(-50%); z-index: 2;
  width: 48px; height: 4px; border-radius: 2px; background: var(--f-black);
}
.tab--fallen .fl-screen { background: var(--f-graphite); border-radius: 14px; overflow: hidden; display: flex; flex-direction: column; }
.tab--fallen .fl-ph-top {
  display: flex; align-items: center; gap: 8px; padding: 18px 12px 10px;
  border-bottom: 1px solid var(--f-iron); font-size: 12px; font-weight: 500; color: var(--f-bone);
}
.tab--fallen .fl-ph-top i { width: 12px; height: 12px; border-radius: 3px; background: var(--f-indigo); flex: 0 0 auto; }
.tab--fallen .fl-ph-top em {
  margin-left: auto; font-style: normal; font-family: var(--f-mono); font-size: 12px;
  letter-spacing: 0.85px; text-transform: uppercase; color: var(--f-mist); font-weight: 400;
}
.tab--fallen .fl-ph-card { padding: 10px 12px 12px; }
.tab--fallen .fl-ph-clip {
  position: relative; display: block; border-radius: 4px; overflow: hidden;
  border: 1px solid var(--f-edge); margin-bottom: 10px; background: var(--f-black);
}
.tab--fallen .fl-ph-clip img { display: block; width: 100%; height: 74px; object-fit: cover; object-position: 50% 78%; }
.tab--fallen .fl-ph-clip s {
  position: absolute; inset: 0; display: grid; place-items: center;
  text-decoration: none; background: rgba(0, 0, 0, .25); color: var(--f-bone); font-size: 14px;
}
.tab--fallen .fl-ph-card b { display: block; font-size: 12px; font-weight: 500; color: var(--f-bone); line-height: 1.4; }
.tab--fallen .fl-ph-card p { margin: 8px 0 0; font-size: 12px; line-height: 1.4; color: var(--f-ash); }
.tab--fallen .fl-ph-card em { font-style: normal; color: var(--f-indigo); }
.tab--fallen .fl-ph-foot {
  display: flex; justify-content: space-between; gap: 8px; padding: 8px 12px 10px;
  border-top: 1px solid var(--f-iron);
  font-family: var(--f-mono); font-size: 12px; letter-spacing: 0.85px;
  text-transform: uppercase; color: var(--f-mist);
}
.tab--fallen .tab__open { color: var(--f-ash); }
.tab--fallen:hover .tab__open { color: var(--f-indigo); }

/* ---- the motion rig, unchanged by the restyle ---- */
/* every joint gets its own origin in viewBox units, which is what makes the
   limbs swing from the right place instead of the middle of the drawing */
.tab--fallen .fl-fig,
.tab--fallen .fl-upper, .tab--fallen .fl-head,
.tab--fallen .fl-armL, .tab--fallen .fl-armR,
.tab--fallen .fl-legL, .tab--fallen .fl-legR,
.tab--fallen .fl-shinL, .tab--fallen .fl-shinR { transform-box: view-box; }

.tab--fallen .fl-fig   { transform-origin: 210px 188px; animation: fl-topple 6s infinite; }
.tab--fallen .fl-upper { transform-origin: 210px 124px; animation: fl-buckle 6s infinite; }
.tab--fallen .fl-head  { transform-origin: 210px 70px; animation: fl-nod 6s infinite; }
.tab--fallen .fl-armL  { transform-origin: 196px 70px; animation: fl-arml 6s infinite; }
.tab--fallen .fl-armR  { transform-origin: 224px 70px; animation: fl-armr 6s infinite; }
.tab--fallen .fl-legL  { transform-origin: 202px 124px; animation: fl-legl 6s infinite; }
.tab--fallen .fl-legR  { transform-origin: 218px 124px; animation: fl-legr 6s infinite; }
.tab--fallen .fl-shinL { transform-origin: 198px 158px; animation: fl-shin 6s infinite; }
.tab--fallen .fl-shinR { transform-origin: 222px 158px; animation: fl-shinr 6s infinite; }
.tab--fallen .fl-shadow { transform-box: view-box; transform-origin: 210px 193px; animation: fl-shadow 6s infinite; }

/* THE FALL.
   Gravity is one accelerating sweep, not a march through evenly spaced poses —
   31%→46% is a single cubic-bezier ease-in, so most of the rotation happens in
   the last third and it arrives hard. The translate on top of the rotation is
   what stops it reading as a felled tree: a rigid pivot about the ankles keeps
   the feet pinned, whereas a real collapse sinks and the feet slide out. */
@keyframes fl-topple {
  0%    { transform: rotate(0deg); animation-timing-function: ease-in-out; }
  12%   { transform: rotate(-.9deg); animation-timing-function: ease-in-out; }
  24%   { transform: rotate(.7deg); animation-timing-function: ease-in-out; }
  /* the stumble: weight goes past the toes and there is no getting it back */
  29%   { transform: rotate(-2.4deg); animation-timing-function: ease-out; }
  31%   { transform: rotate(5deg) translate(0, 0); animation-timing-function: cubic-bezier(.45, 0, .75, .25); }
  46%   { transform: rotate(87deg) translate(11px, 10px); animation-timing-function: cubic-bezier(.2, .8, .4, 1); }
  /* impact, then a small damped settle rather than a dead stop */
  48%   { transform: rotate(78.5deg) translate(10px, 8px); animation-timing-function: ease-in-out; }
  50.5% { transform: rotate(84.5deg) translate(11px, 10px); animation-timing-function: ease-in-out; }
  52.5% { transform: rotate(82deg) translate(11px, 9px); animation-timing-function: ease-out; }
  54%, 88.5% { transform: rotate(83deg) translate(11px, 10px); }
  89.5%, 100% { transform: rotate(0deg); }
}

/* the torso breathes while it waits, then whips past the hips on the way down
   and folds back on impact — overlapping action, so nothing moves in lockstep */
@keyframes fl-buckle {
  0%    { transform: translate(0, 0) rotate(0deg); animation-timing-function: ease-in-out; }
  9%    { transform: translate(0, -.9px) rotate(0deg); animation-timing-function: ease-in-out; }
  18%   { transform: translate(0, 0) rotate(0deg); animation-timing-function: ease-in-out; }
  27%   { transform: translate(0, -.9px) rotate(0deg); animation-timing-function: ease-in-out; }
  31%   { transform: translate(0, 0) rotate(0deg); animation-timing-function: cubic-bezier(.5, 0, .8, .3); }
  40%   { transform: translate(0, 0) rotate(-13deg); }
  46%   { transform: translate(0, 0) rotate(19deg); animation-timing-function: ease-out; }
  50%   { transform: translate(0, 0) rotate(5deg); }
  54%, 88.5% { transform: translate(0, 0) rotate(10deg); }
  89.5%, 100% { transform: translate(0, 0) rotate(0deg); }
}

/* the head is heavy and late: it hangs back as the body goes, then snaps */
@keyframes fl-nod {
  0%, 31% { transform: rotate(0deg); animation-timing-function: ease-in; }
  39%   { transform: rotate(-21deg); animation-timing-function: cubic-bezier(.4, 0, .6, 1); }
  46%   { transform: rotate(27deg); animation-timing-function: ease-out; }
  49%   { transform: rotate(6deg); }
  53%, 88.5% { transform: rotate(15deg); }
  89.5%, 100% { transform: rotate(0deg); }
}

/* arms come up late to break the fall, overshoot on contact, then splay */
@keyframes fl-arml {
  0%, 30% { transform: rotate(0deg); animation-timing-function: cubic-bezier(.4, 0, .5, 1); }
  38%   { transform: rotate(-32deg); }
  46%   { transform: rotate(-70deg); animation-timing-function: ease-out; }
  49%   { transform: rotate(-44deg); }
  53%, 88.5% { transform: rotate(-54deg); }
  89.5%, 100% { transform: rotate(0deg); }
}

@keyframes fl-armr {
  0%, 30% { transform: rotate(0deg); animation-timing-function: cubic-bezier(.4, 0, .5, 1); }
  38%   { transform: rotate(22deg); }
  46%   { transform: rotate(52deg); animation-timing-function: ease-out; }
  49%   { transform: rotate(30deg); }
  53%, 88.5% { transform: rotate(40deg); }
  89.5%, 100% { transform: rotate(0deg); }
}

/* the knees give way first — that is the difference between a collapse and a
   topple — so the legs lead the motion instead of trailing it */
@keyframes fl-legl {
  0%, 29% { transform: rotate(0deg); animation-timing-function: cubic-bezier(.5, 0, .7, .4); }
  40%   { transform: rotate(-9deg); }
  46%   { transform: rotate(-17deg); animation-timing-function: ease-out; }
  50%   { transform: rotate(-9deg); }
  54%, 88.5% { transform: rotate(-13deg); }
  89.5%, 100% { transform: rotate(0deg); }
}

@keyframes fl-legr {
  0%, 29% { transform: rotate(0deg); animation-timing-function: cubic-bezier(.5, 0, .7, .4); }
  40%   { transform: rotate(9deg); }
  46%   { transform: rotate(17deg); animation-timing-function: ease-out; }
  50%   { transform: rotate(8deg); }
  54%, 88.5% { transform: rotate(12deg); }
  89.5%, 100% { transform: rotate(0deg); }
}

@keyframes fl-shin {
  0%, 30% { transform: rotate(0deg); animation-timing-function: cubic-bezier(.5, 0, .7, .4); }
  40%   { transform: rotate(22deg); }
  46%   { transform: rotate(40deg); animation-timing-function: ease-out; }
  50%   { transform: rotate(26deg); }
  54%, 88.5% { transform: rotate(32deg); }
  89.5%, 100% { transform: rotate(0deg); }
}

/* the far leg lags a beat behind the near one, so they never fold as a pair */
@keyframes fl-shinr {
  0%, 32% { transform: rotate(0deg); animation-timing-function: cubic-bezier(.5, 0, .7, .4); }
  41%   { transform: rotate(-16deg); }
  47%   { transform: rotate(-30deg); animation-timing-function: ease-out; }
  51%   { transform: rotate(-18deg); }
  55%, 88.5% { transform: rotate(-24deg); }
  89.5%, 100% { transform: rotate(0deg); }
}

/* the shadow stretches out and softens as the body goes horizontal */
@keyframes fl-shadow {
  0%, 31% { transform: none; opacity: .9; animation-timing-function: cubic-bezier(.45, 0, .75, .25); }
  46%   { transform: translateX(36px) scaleX(3.2); opacity: 1; }
  54%, 88.5% { transform: translateX(34px) scaleX(3); opacity: 1; }
  89.5%, 100% { transform: none; opacity: .9; }
}

/* the floor takes the hit: one ring, gone in a third of a second */
@keyframes fl-ring {
  0%, 45.6% { transform: scale(.3, .6); opacity: 0; }
  46.3% { transform: scale(.8, .9); opacity: .8; animation-timing-function: cubic-bezier(.15, .7, .3, 1); }
  51.5% { transform: scale(2.6, 1.5); opacity: 0; }
  100%  { transform: scale(.3, .6); opacity: 0; }
}

/* and the camera feels it, barely — two frames of shake sell the impact */
@keyframes fl-shake {
  0%, 45.8% { transform: translate(0, 0); }
  46.4% { transform: translate(-1.6px, 1.2px); }
  47%   { transform: translate(1.3px, -.9px); }
  47.6% { transform: translate(-.7px, .4px); }
  48.2%, 100% { transform: translate(0, 0); }
}

/* geometry follows the body's real bounding box, so it morphs on the same
   ease-in; colour steps separately at the thresholds scoreColour() uses */
@keyframes fl-boxgeo {
  0%, 31%   { transform: none; animation-timing-function: cubic-bezier(.45, 0, .75, .25); }
  46%       { transform: translate(10px, 128px) scale(2.676, .4588); animation-timing-function: ease-out; }
  48%       { transform: translate(9px, 125px) scale(2.62, .48); }
  51%, 86%  { transform: translate(10px, 128px) scale(2.676, .4588); }
  89.5%, 100% { transform: none; }
}

@keyframes fl-lab {
  0%, 31%   { transform: none; animation-timing-function: cubic-bezier(.45, 0, .75, .25); }
  46%       { transform: translate(10px, 128px); animation-timing-function: ease-out; }
  48%       { transform: translate(9px, 125px); }
  51%, 86%  { transform: translate(10px, 128px); }
  89.5%, 100% { transform: none; }
}

.tab--fallen .fl-scene { position: absolute; inset: 0; width: 100%; height: 100%; }

.tab--fallen .fl-lab { transform-box: view-box; transform-origin: 176px 5px; animation: fl-lab 6s infinite; }

.tab--fallen .fl-ring {
  transform-box: view-box; transform-origin: 270px 202px;
  fill: none; stroke: #bcd9e8; stroke-width: 1.4; opacity: 0;
  animation: fl-ring 6s infinite;
}

@media (prefers-reduced-motion: reduce) {
  .tab--fallen .fl-stage *, .tab--fallen .fl-cam::after { animation-play-state: paused !important; animation-delay: -2.9s !important; }
}

/* ============ responsive ============ */
@media (max-width: 960px) {
  .tab { min-height: 0; }
  .tab--minebro, .tab--nightdesk .nd-body, .tab--notepad, .tab--astral, .tab--maxphotos { grid-template-columns: minmax(0, 1fr); }
  .tab--astral .ac-side, .tab--astral .ac-panel { display: none; }
  /* .ac-pills is the top-bar button group (Open in / Run / PR) and .ac-chip.pr
     is the #43 badge. Do NOT swap these for .ac-pill — that is a different
     element down in the diff panel, and hiding it leaves the top bar clipping. */
  .tab--astral .ac-pills, .tab--astral .ac-chip.pr { display: none; }
  .tab--astral .ac-top { padding-right: 12px; }
  .tab--notepad .np-side, .tab--notepad .np-panel { display: none; }
  .tab--notepad .np-sheet { margin: 14px; }
  .tab--nightdesk .nd-tag, .tab--nightdesk .nd-pill { display: none; }
  .tab--minebro .mb-left { padding-bottom: 20px; }
  .tab--minebro .mb-right { padding-top: 0; }
  .tab--minebro .mb-splash { display: none; }
  .tab--maxphotos { min-height: 0; }
  .tab--maxphotos .mp-side { padding: 30px 24px 22px; }
  .tab--maxphotos h3 { letter-spacing: 0.2em; text-indent: 0.2em; }
  /* stacked, the auto margins that centred the group on desktop collapse, so
     set the rhythm explicitly instead of letting everything bunch up */
  .tab--maxphotos .mp-brand { margin-top: 0; }
  .tab--maxphotos .mp-intro { margin-top: 16px; }
  .tab--maxphotos .mp-meta { margin: 18px 0 0; }
  .tab--maxphotos .mp-shot { height: 240px; }
  /* the idle zoom overflows the frame and there is no hover on touch anyway */
  .tab--maxphotos .mp-shot img { transform: none; }
  /* the fade was built to melt into type on its LEFT; stacked it needs to come
     from the top instead, or it just looks like a dark band down one edge */
  .tab--maxphotos .mp-shot::after {
    background: linear-gradient(180deg, rgba(10, 10, 11, 0.55), transparent 42%);
  }
  .tab--starmap { min-height: 420px; }
  .tab--starmap .sm-body { padding: 0 20px; }
  .tab--starmap .sm-brand { display: none; }
  .tab--starmap .sm-hud { display: none; }
  .tab--starmap .sm-veil { background: linear-gradient(180deg, rgba(0,0,0,.8), rgba(0,0,0,.55) 55%, rgba(0,0,0,.85)); }
  .tab--malt { grid-template-columns: minmax(0, 1fr); min-height: 0; }
  .tab--malt .ml-left { padding: 28px 22px 4px; }
  .tab--malt .ml-right { padding: 16px 22px 8px; }
  .tab--malt::after { display: none; }
  /* Night Desk: the mast and tab strip are built for a wide card, so let them
     wrap and drop the running score rather than clipping them off the edge. */
  .tab--nightdesk .nd-mast { flex-wrap: wrap; row-gap: 6px; padding: 12px 16px; }
  .tab--nightdesk .nd-score { display: none; }
  .tab--nightdesk .nd-right { min-width: 0; }
  .tab--nightdesk .nd-tabs { flex-wrap: wrap; row-gap: 4px; padding: 8px 16px; font-size: 11px; }
  .tab--nightdesk .nd-left, .tab--nightdesk .nd-right-col { padding: 20px 16px; }
  /* Minebro: shrink the hotbar so nine slots fit the card */
  .tab--minebro .mb-hotbar { transform: scale(.82); transform-origin: left center; }
  .tab--minebro .mb-chat { font-size: 11px; }
  /* Fallen: feed on top, then copy beside a shrunken phone. The title bar keeps
     only the alert pill — the five stat readouts are the first thing to overflow. */
  .tab--fallen {
    grid-template-columns: minmax(0, 1fr) 172px;
    grid-template-rows: 48px auto minmax(0, 1fr);
    min-height: 0;
  }
  .tab--fallen .fl-stats s { display: none; }
  .tab--fallen .fl-brand em { display: none; }
  /* a fixed band height gets fought by the wrapping header and pill row, which
     squeezes the plot to nothing — let the panel size itself and floor the plot */
  /* a fixed band height gets fought by the wrapping header and pill row; let the
     panel size itself and floor the camera, or the flex child collapses to zero */
  .tab--fallen .fl-stage {
    grid-column: 1 / -1; height: auto;
    border-right: 0; border-bottom: 1px solid var(--f-line);
  }
  .tab--fallen .fl-cam { min-height: 228px; }
  .tab--fallen .fl-side { padding: 22px 22px 18px; }
  .tab--fallen .fl-phone { width: 172px; padding: 7px; margin: 20px 22px 18px 0; align-self: start; }
  .tab--fallen .fl-ph-clip img { height: 62px; }

  /* Once static, the CTA becomes a grid item: without these it blockifies to the
     full card width and stretches vertically. Applies to every card. */
  .tab__open {
    position: static; display: inline-block;
    justify-self: start; align-self: start;
    margin: 0 28px 24px;
  }
}

/* ---- phone tuning: stop the cards reading as cramped ---- */
@media (max-width: 620px) {
  /* Every kicker is two spans pushed to opposite ends. At this width both
     halves wrap mid-phrase ("TO-SCALE 3D / UNIVERSE"), which is what makes the
     cards look unnatural. Drop the trailing year and tighten the tracking. */
  .tab--minebro .mb-kicker span + span,
  .tab--nightdesk .nd-kicker span + span,
  .tab--notepad .np-kicker span + span,
  .tab--astral .ac-kicker span + span,
  .tab--maxphotos .mp-kicker span + span,
  .tab--starmap .sm-kicker span + span,
  .tab--fallen .fl-kicker span + span,
  .tab--malt .ml-kicker span + span { display: none; }
  .tab--maxphotos .mp-kicker,
  .tab--starmap .sm-kicker,
  .tab--astral .ac-kicker,
  .tab--malt .ml-kicker { letter-spacing: 0.14em; }

  /* give every card the same comfortable gutter and let the copy breathe */
  .tab--starmap .sm-body { padding: 26px 22px; }
  .tab--starmap .sm-lead { margin-top: 14px; line-height: 1.6; }
  .tab--starmap .sm-facts { margin-top: 16px; }
  .tab--astral .ac-body { padding: 24px 22px 0; }
  .tab--astral .ac-lead { margin-top: 14px; }
  /* the branch name is long enough to crowd the workspace title on a phone */
  .tab--astral .ac-chip { display: none; }
  .tab--malt .ml-left { padding: 26px 22px 6px; }
  .tab--malt .ml-lead { margin-top: 16px; }
  .tab--notepad .np-sheet { padding: 22px 22px 0; }
  .tab--minebro .mb-left { padding: 26px 22px 20px; }
  /* no room for the handset beside the copy on a phone; the feed still tells it */
  .tab--fallen { grid-template-columns: minmax(0, 1fr); }
  .tab--fallen .fl-phone { display: none; }
  .tab--fallen .fl-side { padding: 26px 22px 16px; }
  .tab--fallen .fl-lead { margin-top: 14px; }
  .tab--fallen .fl-stage { padding: 18px 20px 16px; }
  .tab--fallen .fl-cam { min-height: 190px; }
  .tab--fallen .fl-ch-head span { display: none; }
  /* nothing on a phone should sit under 11px; the chart labels all do on desktop */
  .tab--fallen .fl-ev { gap: 6px; }
  .tab--fallen .fl-ev span { padding: 4px 8px; }
  .tab--fallen .fl-meter div { grid-template-columns: 72px minmax(0, 1fr) 40px; gap: 12px; }

  /* headlines were sized for a wide card and crowd the edges on a phone */
  .tab--starmap h3 { font-size: clamp(38px, 12vw, 52px); }
  .tab--malt h3 { font-size: clamp(38px, 12vw, 52px); }
  .tab--astral h3 { font-size: clamp(34px, 11vw, 46px); }
  .tab--fallen h3 { font-size: clamp(32px, 10vw, 40px); }
}

@media (max-width: 560px) {
  .tab__open { margin: 0 20px 20px; }
  /* drop the whole right column, not just its contents, or the empty padded
     track leaves a hole between the copy and the button */
  .tab--nightdesk .nd-right-col { display: none; }
  .tab--minebro .mb-hud { display: none; }
  .tab--astral .ac-composer, .tab--astral .ac-tabs { display: none; }
  .tab--notepad .np-top { display: none; }
}
