/* Simple mode: the LongStories Labs family (Taste Library tokens). F1 mode: the Motion Room flat race look. */
:root {
  --bg: #f5f0f2; --card: #ffffff; --ink: #09090b; --ink2: #27272a; --dim: #71717a; --faint: #a1a1aa; --line: #e4e4e7; --hair: #efe9ec; --field: #faf9fa;
  --accent: #cb3452; --accent-soft: #fcf0f2; --accent-line: #f1c4ce; --up: #15803d; --down: #cb3452; --warn: #b45309;
  --radius: 14px; --radius-sm: 8px;
  --sans: Geist, ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "Geist Mono", "SF Mono", ui-monospace, Menlo, monospace;
  --serif: ui-serif, "Iowan Old Style", "Apple Garamond", Georgia, serif;
  --head: var(--serif); --head-weight: 500; --head-case: none; --head-track: -0.01em;
  --ease: cubic-bezier(0.23, 1, 0.32, 1);
  --tower: #ffffff; --tower-ink: var(--ink); --tower-dim: var(--dim); --tower-line: var(--hair);
  color-scheme: light;
}
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) {
  --bg: #111013; --card: #1b1a1e; --ink: #f4f4f5; --ink2: #d4d4d8; --dim: #a1a1aa; --faint: #71717a; --line: #2e2c32; --hair: #26242a; --field: #222026;
  --accent: #e0566f; --accent-soft: #2a1a1f; --accent-line: #5a2a35; --up: #4ade80; --down: #f87171; --warn: #fbbf24;
  --tower: #1b1a1e; color-scheme: dark;
} }
:root[data-theme="dark"] {
  --bg: #111013; --card: #1b1a1e; --ink: #f4f4f5; --ink2: #d4d4d8; --dim: #a1a1aa; --faint: #71717a; --line: #2e2c32; --hair: #26242a; --field: #222026;
  --accent: #e0566f; --accent-soft: #2a1a1f; --accent-line: #5a2a35; --up: #4ade80; --down: #f87171; --warn: #fbbf24;
  --tower: #1b1a1e; color-scheme: dark;
}
/* F1: navy + cream cards, red block tags, condensed caps, flat fills, square corners */
:root.f1 {
  --bg: #f2f1ec; --card: #ffffff; --ink: #18171c; --ink2: #2b2a33; --dim: #7d8790; --faint: #a6aeb5; --line: #e2e0d8; --hair: #ebe9e2; --field: #f7f6f2;
  --accent: #d81e2c; --accent-soft: #fbe9ea; --accent-line: #f3b9be; --up: #13a34a; --down: #d81e2c; --warn: #d81e2c;
  --radius: 0px; --radius-sm: 0px;
  --head: Oswald, "Arial Narrow", sans-serif; --head-weight: 600; --head-case: uppercase; --head-track: 0.04em;
  --tower: #16152a; --tower-ink: #f2f1ec; --tower-dim: #8f8ea8; --tower-line: #2c2b48;
}
@media (prefers-color-scheme: dark) { :root.f1:not([data-theme="light"]) { --bg: #0f0e1d; --card: #1b1a31; --ink: #f2f1ec; --ink2: #dcdbe6; --dim: #8f8ea8; --line: #2c2b48; --hair: #252440; --field: #22213d; --tower: #1b1a31; --tower-line: #2f2e4d; --up: #1fc35a; --down: #ff5a64; } }
:root.f1[data-theme="dark"] { --bg: #0f0e1d; --card: #1b1a31; --ink: #f2f1ec; --ink2: #dcdbe6; --dim: #8f8ea8; --line: #2c2b48; --hair: #252440; --field: #22213d; --tower: #1b1a31; --tower-line: #2f2e4d; --up: #1fc35a; --down: #ff5a64; }

* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; background: var(--bg); color: var(--ink); font: 14px/1.5 var(--sans); -webkit-font-smoothing: antialiased; }
a { color: inherit; text-decoration: none; }
button, select, input { font: inherit; color: inherit; }
button { cursor: pointer; }
::selection { background: color-mix(in srgb, var(--accent) 18%, transparent); }
.mono, .num { font-family: var(--mono); font-variant-numeric: tabular-nums; }
.dim { color: var(--dim); } .faint { color: var(--faint); }
.up { color: var(--up); } .down { color: var(--down); }
.press { transition: transform 160ms var(--ease), background-color 160ms, border-color 160ms, opacity 160ms; }
.press:active { transform: scale(0.97); }
h1, h2, h3 { font-family: var(--head); font-weight: var(--head-weight); text-transform: var(--head-case); letter-spacing: var(--head-track); margin: 0; }

/* top bar */
.bar { position: sticky; top: 0; z-index: 10; background: color-mix(in srgb, var(--bg) 88%, transparent); backdrop-filter: blur(12px); border-bottom: 1px solid var(--line); }
.bar-in { max-width: 1600px; margin: 0 auto; padding: 10px 24px; display: flex; align-items: center; gap: 18px; }
.bar-in.sub { padding-top: 0; gap: 14px; }
.brand { display: flex; align-items: center; gap: 9px; flex: none; }
.mark { width: 24px; height: 24px; border-radius: 7px; background: var(--accent); position: relative; }
.mark::after { content: ""; position: absolute; left: 6px; right: 6px; bottom: 6px; height: 7px; border-radius: 2px; background: #fff; box-shadow: 0 -5px 0 -2px rgba(255,255,255,.55); }
.f1 .mark { border-radius: 0; background: conic-gradient(var(--ink) 25%, transparent 0 50%, var(--ink) 0 75%, transparent 0) 0 0 / 8px 8px; border: 2px solid var(--ink); }
.f1 .mark::after { display: none; }
.brand-name { font: 500 17px/1 var(--head); letter-spacing: var(--head-track); text-transform: var(--head-case); }
.f1 .brand-name { font-weight: 700; font-size: 19px; }
.brand-name em { font-style: normal; color: var(--accent); }
.tabs { display: flex; gap: 2px; overflow-x: auto; scrollbar-width: none; }
.tabs a { padding: 7px 12px; border-radius: 999px; color: var(--dim); font-weight: 500; white-space: nowrap; transition: background-color 160ms, color 160ms; }
.tabs a:hover { color: var(--ink); }
.tabs a[aria-current="page"] { background: var(--card); color: var(--ink); box-shadow: 0 0 0 1px var(--line); }
.f1 .tabs a { border-radius: 0; font: 600 13px/1 Oswald, sans-serif; text-transform: uppercase; letter-spacing: .06em; padding: 9px 12px; }
.f1 .tabs a[aria-current="page"] { background: #16152a; color: #fff; box-shadow: none; }
.bar-tools { margin-left: auto; display: flex; align-items: center; gap: 8px; flex: none; }
.updated { font: 500 12px var(--mono); color: var(--dim); display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; }
.updated i { width: 7px; height: 7px; border-radius: 50%; background: var(--up); display: inline-block; }
.updated.stale i { background: var(--warn); } .updated.busy i { animation: pulse 900ms ease-in-out infinite; background: var(--accent); }
@keyframes pulse { 50% { opacity: .25; } }
.btn { border: 1px solid var(--line); background: var(--card); padding: 6px 11px; border-radius: 999px; font-size: 13px; font-weight: 500; white-space: nowrap; transition: transform 160ms var(--ease), border-color 160ms, background-color 160ms; }
.btn:hover { border-color: var(--faint); }
.btn:active { transform: scale(0.97); }
.btn.icon { width: 32px; height: 32px; padding: 0; display: grid; place-items: center; }
.btn.mode[aria-pressed="true"] { background: #d81e2c; border-color: #d81e2c; color: #fff; }
.f1 .btn { border-radius: 0; font: 600 12px/1.2 Oswald, sans-serif; text-transform: uppercase; letter-spacing: .06em; }
.seg { display: inline-flex; background: var(--card); border: 1px solid var(--line); border-radius: 999px; padding: 3px; gap: 2px; flex: none; }
.seg button { border: 0; background: transparent; padding: 5px 12px; border-radius: 999px; color: var(--dim); font-size: 13px; font-weight: 500; transition: background-color 160ms, color 160ms; }
.seg button[aria-pressed="true"] { background: var(--ink); color: var(--bg); }
.f1 .seg, .f1 .seg button { border-radius: 0; }
.f1 .seg button { font: 600 12px/1.2 Oswald, sans-serif; text-transform: uppercase; letter-spacing: .06em; }
.f1 .seg button[aria-pressed="true"] { background: #16152a; color: #fff; }
.chips { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; }
.chip { border: 1px solid var(--line); background: transparent; border-radius: 999px; padding: 4px 11px 4px 9px; font-size: 13px; color: var(--ink2); display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; transition: background-color 160ms, border-color 160ms; }
.chip i { width: 8px; height: 8px; border-radius: 50%; background: var(--u, var(--faint)); }
.chip[aria-pressed="true"] { background: var(--card); border-color: var(--ink); color: var(--ink); }
.f1 .chip { border-radius: 0; font: 600 12px/1.2 Oswald, sans-serif; text-transform: uppercase; letter-spacing: .05em; }
.f1 .chip i { border-radius: 0; width: 4px; height: 12px; }

/* page */
.page { max-width: 1600px; margin: 0 auto; padding: 20px 24px 28px; min-height: calc(100vh - 140px); }
.empty { padding: 60px 20px; text-align: center; color: var(--dim); }
.ph { display: flex; align-items: flex-end; gap: 14px; margin-bottom: 16px; flex-wrap: wrap; }
.ph h1 { font-size: 30px; line-height: 1.1; }
.f1 .ph h1 { font-size: 30px; }
.ph p { margin: 4px 0 0; color: var(--dim); }
.ph .right { margin-left: auto; display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px 18px; min-width: 0; }
.card > h2 { font-size: 17px; margin-bottom: 12px; display: flex; align-items: baseline; gap: 10px; }
.f1 .card > h2 { font-size: 15px; }
.card > h2 small { font: 400 12px var(--sans); color: var(--dim); text-transform: none; letter-spacing: 0; margin-left: auto; }
.grid { display: grid; gap: 14px; }
.g2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.g3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.g-main { grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); }
.stack { display: flex; flex-direction: column; gap: 14px; min-width: 0; }

/* KPIs */
.kpis { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 14px; margin-bottom: 14px; }
.kpi { padding: 14px 16px 12px; }
.kpi .lbl { font-size: 12.5px; color: var(--dim); display: flex; gap: 6px; align-items: center; }
.f1 .kpi .lbl { font: 600 12px Oswald, sans-serif; text-transform: uppercase; letter-spacing: .06em; }
.kpi .val { font: 600 30px/1.1 var(--mono); margin: 6px 0 2px; letter-spacing: -0.02em; }
.kpi .chg { font: 500 12px var(--mono); }
td.num, .td { white-space: nowrap; }
.kpi svg { display: block; width: 100%; height: 34px; margin-top: 8px; }
.note { font-size: 11.5px; color: var(--faint); }

/* tags */
.tag { display: inline-flex; align-items: center; gap: 4px; font-size: 11.5px; font-weight: 500; padding: 2px 8px; border-radius: 999px; background: var(--field); color: var(--ink2); border: 1px solid var(--line); white-space: nowrap; }
.tag.accent { background: var(--accent-soft); color: var(--accent); border-color: var(--accent-line); }
.tag.ok { color: var(--up); }
.f1 .tag { border-radius: 0; border: 0; background: #16152a; color: #fff; font: 600 11px/1.3 Oswald, sans-serif; text-transform: uppercase; letter-spacing: .06em; padding: 3px 6px 2px; }
.f1 .tag.accent { background: #d81e2c; color: #fff; }
.f1 .tag.ok { background: #1fc35a; color: #16152a; }
.f1 .tag.y { background: #f2c230; color: #16152a; }
.plat { font: 600 10px/1 var(--mono); padding: 3px 5px; border-radius: 5px; background: var(--field); border: 1px solid var(--line); color: var(--dim); }
.f1 .plat { border-radius: 0; }
.ev { font-size: 11px; padding: 1px 7px; border-radius: 999px; border: 1px dashed var(--faint); color: var(--dim); white-space: nowrap; }
.ev.solid { border-style: solid; color: var(--up); border-color: color-mix(in srgb, var(--up) 50%, transparent); }
.f1 .ev { border-radius: 0; }

/* ranking table (simple) */
.tbl-wrap { overflow-x: auto; }
table { border-collapse: collapse; width: 100%; }
th { text-align: left; font-size: 12px; font-weight: 500; color: var(--dim); padding: 8px 10px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.f1 th { font: 600 11px Oswald, sans-serif; text-transform: uppercase; letter-spacing: .06em; }
th.r, td.r { text-align: right; }
th button { border: 0; background: none; padding: 0; color: inherit; font: inherit; }
th button[data-on] { color: var(--ink); }
td { padding: 8px 10px; border-bottom: 1px solid var(--hair); vertical-align: middle; }
tr:last-child td { border-bottom: 0; }
tbody tr { transition: background-color 120ms; }
tbody tr.link:hover { background: var(--field); cursor: pointer; }
.who { display: flex; align-items: center; gap: 10px; min-width: 0; }
.who b { font-weight: 600; display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.who small { color: var(--dim); font-size: 12px; display: flex; gap: 6px; align-items: center; white-space: nowrap; }
.ava { width: 32px; height: 32px; border-radius: 50%; object-fit: cover; background: var(--field); flex: none; box-shadow: 0 0 0 2px var(--card), 0 0 0 3.5px var(--u, var(--line)); }
.thumb { width: 40px; height: 52px; object-fit: cover; border-radius: 6px; background: var(--field); display: block; flex: none; }
.f1 .thumb, .f1 .ava { border-radius: 0; }
.f1 .ava { border-radius: 50%; }
.rank { font: 600 13px var(--mono); color: var(--dim); width: 28px; }
.bar-cell { display: flex; align-items: center; gap: 8px; justify-content: flex-end; }
.hbar { height: 6px; border-radius: 3px; background: var(--u, var(--accent)); min-width: 2px; }

/* account grid */
.acc-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 14px; }
.acc { display: flex; flex-direction: column; gap: 12px; border-top: 3px solid var(--u, var(--line)); transition: transform 200ms var(--ease), border-color 200ms; }
@media (hover: hover) { .acc:hover { transform: translateY(-2px); } }
.acc .stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.acc .stats div b { display: block; font: 600 17px var(--mono); }
.acc .stats div span { font-size: 11.5px; color: var(--dim); }
.acc svg { width: 100%; height: 40px; display: block; }

/* posts grid */
.posts { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; }
.post { display: block; border-radius: var(--radius-sm); overflow: hidden; background: var(--field); border: 1px solid var(--line); transition: transform 200ms var(--ease); }
@media (hover: hover) { .post:hover { transform: translateY(-2px); } }
.post .img { aspect-ratio: 4 / 5; background: var(--hair) center / cover no-repeat; position: relative; }
.post .img .tag { position: absolute; left: 7px; top: 7px; }
.post .img .noimg { position: absolute; inset: 0; display: grid; place-items: center; color: var(--faint); font-size: 12px; }
.post .m { padding: 8px 10px 10px; }
.post .m b { font: 600 15px var(--mono); }
.post .m small { display: block; color: var(--dim); font-size: 11.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.post .m .cap { color: var(--ink2); font-size: 12px; line-height: 1.35; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; margin-top: 3px; }

/* charts */
.chart svg { width: 100%; display: block; }
.chart .axis { font: 10px var(--mono); fill: var(--faint); }
.chart .gl { stroke: var(--hair); }
.legend { display: flex; gap: 12px; flex-wrap: wrap; font-size: 12px; color: var(--dim); margin-top: 8px; align-items: center; }
.legend i { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 5px; vertical-align: -1px; background: var(--u); }
.hours { display: grid; grid-template-columns: repeat(24, 1fr); gap: 3px; align-items: end; height: 110px; }
.hours div { background: var(--accent); opacity: .85; border-radius: 3px 3px 0 0; min-height: 2px; position: relative; }
.hours div.none { background: var(--hair); opacity: 1; }
.hours div.best { background: var(--up); opacity: 1; }
.hlab { display: grid; grid-template-columns: repeat(24, 1fr); gap: 3px; font: 9.5px var(--mono); color: var(--faint); text-align: center; margin-top: 4px; }
.days { display: grid; grid-template-columns: repeat(7, 1fr); gap: 8px; }
.days div { text-align: center; }
.days b { display: block; font: 600 15px var(--mono); }
.days span { font-size: 11.5px; color: var(--dim); }
.days .best b { color: var(--up); }

/* filters */
.filters { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin-bottom: 12px; }
.filters select, .filters input { max-width: 240px; background: var(--card); border: 1px solid var(--line); border-radius: 999px; padding: 6px 12px; font-size: 13px; }
.filters input { min-width: 220px; }
.f1 .filters select, .f1 .filters input { border-radius: 0; }

/* schedule */
.sched { overflow-x: auto; }
.cal { display: grid; min-width: 760px; }
.cal > div { border-bottom: 1px solid var(--hair); padding: 6px 5px; min-height: 40px; }
.cal .dh { font-size: 12px; color: var(--dim); border-bottom: 1px solid var(--line); min-height: 0; }
.cal .dh b { display: block; color: var(--ink); font-weight: 600; }
.cal .dh.today b { color: var(--accent); }
.f1 .cal .dh { font: 600 11px Oswald, sans-serif; text-transform: uppercase; letter-spacing: .05em; border-bottom: 2px solid var(--ink); }
.lane { display: flex; align-items: center; gap: 8px; min-width: 0; font-weight: 500; }
.lane i { width: 3px; align-self: stretch; border-radius: 2px; background: var(--u); flex: none; }
.lane .plat { flex: none; }
.lane span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ev-chip { display: block; font-size: 11.5px; line-height: 1.25; padding: 4px 7px; margin-bottom: 3px; border-radius: 6px; background: var(--field); border: 1px solid var(--line); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ev-chip b { font: 600 11px var(--mono); margin-right: 4px; }
.ev-chip.dbl { background: var(--accent-soft); border-color: var(--accent-line); color: var(--accent); }
.nopost { display: grid; place-items: center; height: 100%; min-height: 28px; font-size: 11.5px; color: var(--faint); border-radius: 6px; border: 1px dashed var(--line); }
.f1 .ev-chip { border-radius: 0; background: #16152a; color: #f2f1ec; border: 0; border-left: 3px solid var(--u); }
.f1 .ev-chip b { color: #f2c230; }
.f1 .ev-chip.dbl { background: #d81e2c; color: #fff; }
.f1 .ev-chip.dbl b { color: #fff; }
.f1 .nopost { border-radius: 0; border: 1.5px dashed color-mix(in srgb, #d81e2c 60%, transparent); color: #d81e2c; font: 600 10.5px/1 Oswald, sans-serif; text-transform: uppercase; letter-spacing: .06em; }
.alerts { display: flex; flex-direction: column; gap: 8px; }
.alert { display: flex; gap: 10px; align-items: baseline; font-size: 13.5px; }
.alert .tag { flex: none; }

/* strategy */
.ideas { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 12px; }
.idea { border-top: 3px solid var(--u, var(--accent)); display: flex; flex-direction: column; gap: 8px; }
.idea .t { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.idea h3 { font-size: 16px; line-height: 1.25; }
.f1 .idea h3 { font-size: 15px; }
.idea p { margin: 0; color: var(--dim); font-size: 13px; }
.idea .when { font: 500 12px var(--mono); color: var(--accent); margin-top: auto; }
.facts { display: flex; flex-direction: column; }
.fact { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--hair); align-items: baseline; }
.fact:last-child { border-bottom: 0; }
.fact b { font-weight: 600; }
.fact p { margin: 2px 0 0; color: var(--dim); font-size: 12.5px; }
.lift { font: 600 14px var(--mono); }

/* F1 standings tower (overview) */
.tower { background: var(--tower); color: var(--tower-ink); border: 0; padding: 0; overflow: hidden; position: relative; }
.tower > h2 { padding: 14px 16px 0; color: var(--tower-ink); }
.tower > h2 small { color: var(--tower-dim); }
.podium { display: grid; grid-template-columns: 1fr 1.15fr 1fr; align-items: end; gap: 8px; padding: 6px 16px 0; }
.step { text-align: center; min-width: 0; }
.step .ava { width: 40px; height: 40px; margin: 0 auto; display: block; box-shadow: 0 0 0 3px var(--u); }
.step.p1 .ava { width: 50px; height: 50px; }
.step .nm { font: 600 13px/1.1 Oswald, sans-serif; text-transform: uppercase; letter-spacing: .03em; margin: 7px 0 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.step .vv { font: 600 12px var(--mono); color: var(--tower-dim); margin-bottom: 6px; }
.step .blk { display: grid; place-items: center; font: 700 22px/1 Oswald, sans-serif; color: #16152a; }
.step.p1 .blk { height: 52px; background: #f2c230; } .step.p2 .blk { height: 36px; background: #c5ced3; } .step.p3 .blk { height: 26px; background: #d39a6a; }
.step.p1.win .blk { animation: glow 1.8s var(--ease) 1; }
@keyframes glow { 30% { box-shadow: 0 0 0 10px rgba(242,194,48,.35); } 100% { box-shadow: 0 0 0 22px rgba(242,194,48,0); } }
.trows { margin-top: 10px; border-top: 1px solid var(--tower-line); }
.trow { display: grid; grid-template-columns: 34px 5px 30px minmax(0,1fr) 88px 64px 64px 40px; gap: 10px; align-items: center; padding: 6px 16px; border-bottom: 1px solid var(--tower-line); animation: slide 420ms var(--ease) both; }
.trow:last-child { border-bottom: 0; }
@keyframes slide { from { opacity: 0; transform: translateX(-12px); } to { opacity: 1; transform: none; } }
.trow .pos { font: 700 17px/1 Oswald, sans-serif; text-align: center; }
.trow .pos.p1 { color: #f2c230; }
.trow .tb { width: 5px; height: 26px; background: var(--u); }
.trow .ava { width: 28px; height: 28px; box-shadow: 0 0 0 2px var(--u); }
.trow .tn b { display: block; font: 600 14px/1.1 Oswald, sans-serif; text-transform: uppercase; letter-spacing: .03em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.trow .tn small { color: var(--tower-dim); font-size: 11px; white-space: nowrap; }
.trow .tv { text-align: right; } .trow .tv b { display: block; font: 600 15px var(--mono); } .trow .tv small { font: 500 11px var(--mono); color: var(--tower-dim); }
.trow .td { font: 600 12px var(--mono); text-align: right; }
.trow .tm { font: 500 11px var(--mono); color: var(--tower-dim); text-align: right; line-height: 1.3; }
.trow .tt { position: relative; } .trow .tt img, .trow .tt div { width: 34px; height: 34px; object-fit: cover; background: #22213d; display: block; }
.fl { position: absolute; top: -6px; right: -6px; background: #9b4dff; color: #fff; font: 700 8px/1 var(--mono); padding: 3px 4px; }
.sweep { position: absolute; inset: 0; pointer-events: none; background: repeating-conic-gradient(rgba(255,255,255,.06) 0 25%, transparent 0 50%) 0 0 / 18px 18px; transform: translateX(-100%); animation: sweep 1.2s var(--ease) .15s 1 both; }
@keyframes sweep { to { transform: translateX(100%); } }

.rise { animation: rise 320ms var(--ease) both; }
@keyframes rise { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

.show-sm { display: none !important; }
.foot { max-width: 1600px; margin: 0 auto; padding: 0 24px 24px; color: var(--faint); font-size: 11.5px; display: flex; gap: 16px; flex-wrap: wrap; }
.err-banner { background: var(--accent-soft); color: var(--accent); border: 1px solid var(--accent-line); border-radius: var(--radius-sm); padding: 8px 12px; margin-bottom: 12px; font-size: 13px; }

@media (max-width: 1180px) {
  .kpis { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .g-main, .g2, .g3 { grid-template-columns: minmax(0, 1fr); }
  .bar-in { flex-wrap: wrap; }
  .bar-tools { margin-left: 0; }
}
@media (max-width: 640px) {
  .bar-in { padding: 8px 16px; gap: 10px; }
  .page { padding: 14px 16px 22px; }
  .foot { padding: 0 16px 20px; }
  .tabs { order: 3; width: 100%; }
  .bar-tools { margin-left: auto; }
  .updated { display: none; }
  .bar-in.sub { flex-wrap: wrap; }
  .chips { width: 100%; }
  .kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .kpi .val { font-size: 24px; }
  .ph h1 { font-size: 24px; }
  .trow { grid-template-columns: 28px 4px 26px minmax(0,1fr) 74px 54px; gap: 8px; padding: 6px 10px; }
  .trow .tm, .trow .tt { display: none; }
  .posts { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .filters input { min-width: 0; flex: 1; }
  .hide-sm { display: none; }
  .show-sm { display: flex !important; }
  .days { gap: 4px; } .days b { font-size: 13px; }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }

/* ---------- v3: thumbnails, previews, tags ---------- */
.ph-thumb { display: grid; place-items: center; font: 600 13px/1 var(--sans); color: #fff; background: linear-gradient(135deg, var(--u, #888), color-mix(in srgb, var(--u, #888) 55%, #000)); letter-spacing: .04em; }
.post .img.ph-img { background: linear-gradient(160deg, var(--u, #888), color-mix(in srgb, var(--u, #888) 45%, #0b0b10)); display: flex; align-items: flex-end; }
.ph-cap { color: #fff; font: 500 13px/1.3 var(--head); padding: 12px; text-shadow: 0 1px 2px rgba(0,0,0,.3); display: -webkit-box; -webkit-line-clamp: 5; -webkit-box-orient: vertical; overflow: hidden; }
.post .img video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; animation: fadein 200ms var(--ease) both; }
@keyframes fadein { from { opacity: 0; } to { opacity: 1; } }
.play { position: absolute; right: 8px; bottom: 8px; width: 24px; height: 24px; border-radius: 50%; background: rgba(0,0,0,.45); color: #fff; font-size: 9px; display: grid; place-items: center; padding-left: 2px; z-index: 1; transition: opacity 160ms; }
.post .img:has(video) .play { opacity: 0; }
.kind-pos { position: absolute; right: 7px; top: 7px; z-index: 1; }
.kind { font-size: 10.5px; padding: 1px 6px; border-radius: 999px; background: color-mix(in srgb, var(--card) 85%, transparent); color: var(--ink2); border: 1px solid var(--line); white-space: nowrap; }
.tyre { display: inline-grid; place-items: center; width: 20px; height: 20px; border-radius: 50%; font: 900 10px/1 "Titillium Web", sans-serif; color: #fff; background: #111; box-shadow: inset 0 0 0 3px var(--tc, #888); flex: none; }
.tyre.soft { --tc: #e10600; } .tyre.medium { --tc: #f5c400; } .tyre.hard { --tc: #f2f2f2; } .tyre.none { --tc: #444; color: #777; }
.ptags { display: flex; gap: 4px; flex-wrap: wrap; margin-top: 5px; }
.ptag { font-size: 10.5px; padding: 1px 7px; border-radius: 999px; background: var(--accent-soft); color: var(--accent); border: 1px solid var(--accent-line); white-space: nowrap; max-width: 220px; overflow: hidden; text-overflow: ellipsis; }
button.ptag { cursor: pointer; margin: 0 3px 3px 0; }
.ptag.add { background: transparent; color: var(--dim); border-style: dashed; border-color: var(--line); }
.tagcell { min-width: 140px; max-width: 240px; }
.tag-input { width: 220px; border: 1px solid var(--accent); border-radius: 8px; padding: 5px 8px; background: var(--card); font-size: 12.5px; }
.thumb.big { width: 120px; height: 160px; border-radius: 10px; }
.hint { background: var(--card); border: 1px dashed var(--line); border-radius: var(--radius-sm); padding: 9px 14px; margin-bottom: 14px; font-size: 13px; }
.hint summary { cursor: pointer; color: var(--ink2); }
.hint ol { margin: 10px 0 4px; padding-left: 20px; line-height: 1.7; }
pre.md { white-space: pre-wrap; font: 12px/1.55 var(--mono); background: var(--field); border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 12px; margin: 0; max-height: 420px; overflow: auto; }
.fade { animation: fadein 220ms var(--ease) both; }

/* gap banner */
.banner { display: flex; align-items: center; gap: 14px; background: var(--accent-soft); border: 1px solid var(--accent-line); color: var(--ink); border-radius: var(--radius-sm); padding: 9px 14px; margin-bottom: 14px; font-size: 13px; }
.banner .b-lbl { font-weight: 600; color: var(--accent); white-space: nowrap; }
.banner .b-list { display: flex; flex-direction: column; gap: 2px; flex: 1; min-width: 0; }
.banner .b-go { color: var(--accent); white-space: nowrap; font-weight: 500; }
.banner .b-x { border: 0; background: none; font-size: 18px; color: var(--dim); padding: 0 4px; }
.banner.rc { background: #16152a; color: #f2f1ec; border: 0; border-left: 6px solid #f5c400; border-radius: 0; font: 600 13px/1.35 "Titillium Web", sans-serif; letter-spacing: .03em; }
.banner.rc .b-lbl { background: #f5c400; color: #16152a; padding: 4px 8px; font: 900 italic 13px/1 "Titillium Web", sans-serif; text-transform: uppercase; letter-spacing: .06em; }
.banner.rc .b-go { color: #f5c400; text-transform: uppercase; }

/* ---------- F1 broadcast look ---------- */
.f1 body { font-family: "Titillium Web", var(--sans); }
.f1 h1, .f1 h2, .f1 h3, .f1 .brand-name, .f1 .tabs a, .f1 .btn, .f1 .seg button, .f1 .chip, .f1 .tag, .f1 th, .f1 .kpi .lbl { font-family: "Titillium Web", Oswald, sans-serif; font-style: italic; font-weight: 900; }
.f1 .ph h1 { font-size: 36px; letter-spacing: .01em; }
.f1 .tabs a, .f1 .btn, .f1 .seg button, .f1 .chip { font-weight: 700; }
.f1 .card > h2 { font-weight: 900; }
.f1 .card > h2::before { content: ""; width: 14px; height: 14px; background: #e10600; transform: skewX(-18deg); flex: none; align-self: center; }
.f1 .bar { border-bottom: 0; box-shadow: inset 0 -4px 0 0 transparent; }
.f1 .bar::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 4px; background: conic-gradient(#111 25%, #fff 0 50%, #111 0 75%, #fff 0) 0 0 / 8px 8px; }
.f1 .kpi { border: 0; border-top: 4px solid #e10600; background: var(--card); box-shadow: 0 1px 0 var(--line); }
.f1 .kpi .val { font-family: "Titillium Web", var(--mono); font-weight: 900; font-style: italic; font-size: 34px; }
.f1 .num, .f1 .post .m b { font-family: "Titillium Web", var(--mono); font-weight: 700; }
:root.f1 { --tower: #15151e; --tower-line: #262633; }
.carbon { background-color: #15151e; background-image: linear-gradient(45deg, rgba(255,255,255,.035) 25%, transparent 25%, transparent 75%, rgba(255,255,255,.035) 75%), linear-gradient(45deg, rgba(255,255,255,.035) 25%, transparent 25%, transparent 75%, rgba(255,255,255,.035) 75%); background-size: 6px 6px; background-position: 0 0, 3px 3px; }
.f1[data-theme="dark"] body, :root.f1[data-theme="dark"] body { background-image: radial-gradient(rgba(255,255,255,.025) 1px, transparent 1px); background-size: 3px 3px; }
.tower-head { display: flex; align-items: center; gap: 10px; padding: 14px 16px 0; flex-wrap: wrap; }
.tower-head h2 { color: #fff; font: 900 italic 20px/1 "Titillium Web", sans-serif; text-transform: uppercase; }
.tower-head .lap { font: 700 italic 12px/1 "Titillium Web", sans-serif; color: var(--tower-dim); letter-spacing: .08em; }
.trap { margin-left: auto; background: #e10600; color: #fff; padding: 6px 10px; display: grid; grid-template-columns: auto auto; column-gap: 8px; align-items: baseline; transform: skewX(-10deg); }
.trap > * { transform: skewX(10deg); }
.trap span { font: 900 italic 10px/1 "Titillium Web", sans-serif; text-transform: uppercase; letter-spacing: .1em; }
.trap b { font: 900 italic 22px/1 "Titillium Web", sans-serif; }
.trap small { grid-column: 1 / -1; font-size: 10px; opacity: .85; white-space: nowrap; max-width: 220px; overflow: hidden; text-overflow: ellipsis; }
.trow { grid-template-columns: 30px 5px 30px minmax(0,1fr) 46px 22px 80px 56px 60px 36px; font-family: "Titillium Web", sans-serif; }
.trow .pos { font: 900 italic 18px/1 "Titillium Web", sans-serif; background: #fff; color: #15151e; height: 26px; display: grid; place-items: center; }
.trow .pos.p1 { background: #f5c400; color: #15151e; }
.trow .tn b { font: 700 italic 15px/1.1 "Titillium Web", sans-serif; }
.trow .tv b { font: 700 16px "Titillium Web", var(--mono); }
.secs { display: flex; gap: 3px; } .secs i { height: 6px; flex: 1; border-radius: 1px; background: #444; }
.secs i.purple, .tlegend i.purple { background: #a04cff; } .secs i.green, .tlegend i.green { background: #00d35f; } .secs i.yellow, .tlegend i.yellow { background: #f5c400; }
.drs { background: #00d35f; color: #15151e; font: 900 italic 11px/1 "Titillium Web", sans-serif; padding: 3px 6px; letter-spacing: .06em; }
.tlegend { display: flex; flex-wrap: wrap; gap: 14px; padding: 10px 16px 12px; border-top: 1px solid var(--tower-line); color: var(--tower-dim); font: 600 11px/1.4 "Titillium Web", sans-serif; align-items: center; }
.tlegend i { display: inline-block; width: 14px; height: 5px; margin-right: 5px; vertical-align: 2px; }
.tlegend .tyre { width: 16px; height: 16px; font-size: 8px; margin: 0 3px 0 6px; vertical-align: -4px; }
.f1 .post { border-radius: 0; border: 0; border-bottom: 3px solid #e10600; }
.f1 .post .m b { font-style: italic; font-size: 17px; }
.f1 .ev-chip { font-family: "Titillium Web", sans-serif; font-weight: 600; }
.f1 .idea { border-top-width: 0; border-left: 5px solid var(--u); }
.f1 .ptag { border-radius: 0; background: #16152a; color: #fff; border-color: #16152a; font-family: "Titillium Web", sans-serif; font-weight: 600; }
.f1 .kind { border-radius: 0; }

/* start lights transition (F1) */
#lights { position: fixed; inset: 0; z-index: 50; display: grid; place-items: center; align-content: center; gap: 18px; background: rgba(12, 12, 18, .82); cursor: pointer; animation: fadein 80ms linear both; }
#lights .gantry { display: flex; gap: 10px; padding: 12px 16px; background: #0a0a0f; border-top: 6px solid #222; }
#lights span { display: flex; flex-direction: column; gap: 8px; padding: 8px; background: #1a1a22; border-radius: 8px; }
#lights i { width: 30px; height: 30px; border-radius: 50%; background: #2a0d0d; }
#lights span i:last-child { animation: red 1ms linear both; animation-delay: inherit; }
@keyframes red { to { background: #ff1a1a; box-shadow: 0 0 18px 4px rgba(255, 26, 26, .6); } }
#lights .lo { font: 900 italic 22px/1 "Titillium Web", sans-serif; color: #fff; letter-spacing: .1em; text-transform: uppercase; opacity: 0; animation: fadein 80ms linear 340ms both; }
#lights.out { animation: lout 200ms ease-out both; }
#lights.out i { background: #2a0d0d !important; box-shadow: none !important; }
@keyframes lout { to { opacity: 0; } }

@media (max-width: 640px) {
  .trow { grid-template-columns: 26px 4px 24px minmax(0,1fr) 40px 70px 50px; gap: 7px; padding: 6px 10px; }
  .trow .tyre, .trow .tm, .trow .tt { display: none; }
  .trap { margin-left: 0; }
  .banner { flex-wrap: wrap; gap: 8px 12px; }
  .banner .b-list { order: 3; flex-basis: 100%; }
  .banner .b-go { margin-left: auto; }
  .thumb.big { width: 84px; height: 112px; }
  #lights i { width: 20px; height: 20px; }
}
