:root {
  --bg: #f4f5f7;
  --surface: #ffffff;
  --surface-2: #f0f2f5;
  --border: #dfe3e8;
  --text: #1c1e21;
  --muted: #65676b;
  --accent: #0866ff;
  --good: #1a7f37;
  --good-bg: #e6f4ea;
  --warn: #9a6700;
  --warn-bg: #fff4d6;
  --crop: #c62828;
  --crop-bg: #fdecea;
  --radius: 12px;
  --shadow: 0 1px 2px rgba(0,0,0,.06), 0 4px 16px rgba(0,0,0,.05);
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #111315; --surface: #1b1d20; --surface-2: #24272b; --border: #33373c;
    --text: #e8eaed; --muted: #9aa0a6; --accent: #4c8dff;
    --good: #6fd08a; --good-bg: #16301f; --warn: #f0c35a; --warn-bg: #33290f; --crop: #ff8a80; --crop-bg: #3a1a18;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #111315; --surface: #1b1d20; --surface-2: #24272b; --border: #33373c;
  --text: #e8eaed; --muted: #9aa0a6; --accent: #4c8dff;
  --good: #6fd08a; --good-bg: #16301f; --warn: #f0c35a; --warn-bg: #33290f; --crop: #ff8a80; --crop-bg: #3a1a18;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  background: var(--bg);
  color: var(--text);
  font: 14px/1.45 system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
}
button, input, select, textarea { font: inherit; color: inherit; }
h1, h2, h3, p { margin: 0; }
.muted { color: var(--muted); }
[hidden] { display: none !important; }

/* ---------- top bar ---------- */
.topbar {
  position: sticky; top: 0; z-index: 20;
  display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap;
  padding: 12px 24px;
  background: var(--surface); border-bottom: 1px solid var(--border);
}
.brand { display: flex; align-items: center; gap: 12px; }
.brand-mark { width: 32px; height: 32px; border-radius: 8px; background: var(--accent); position: relative; }
.brand-mark::after { content: ""; position: absolute; inset: 6px 8px; border: 2.5px solid #fff; border-radius: 3px; }
.brand h1 { font-size: 16px; }
.brand p { font-size: 12px; color: var(--muted); }
.tabs { display: flex; gap: 4px; background: var(--surface-2); padding: 4px; border-radius: 10px; }
.tabs button {
  border: 0; background: none; padding: 7px 14px; border-radius: 7px; cursor: pointer; font-weight: 600; color: var(--muted);
}
.tabs button[aria-selected="true"] { background: var(--surface); color: var(--text); box-shadow: var(--shadow); }

/* ---------- layout ---------- */
.layout { display: grid; grid-template-columns: 340px 1fr; min-height: calc(100vh - 61px); }
.sidebar {
  border-right: 1px solid var(--border); background: var(--surface);
  padding: 16px; display: flex; flex-direction: column; gap: 16px;
  position: sticky; top: 61px; height: calc(100vh - 61px); overflow-y: auto;
}
.content { padding: 20px 24px 48px; min-width: 0; }
.panel h2 { font-size: 12px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); margin-bottom: 10px; }
.panel { display: flex; flex-direction: column; gap: 10px; }
.panel + .panel { border-top: 1px solid var(--border); padding-top: 16px; }

.dropzone {
  display: flex; flex-direction: column; gap: 4px; align-items: center; text-align: center;
  border: 2px dashed var(--border); border-radius: var(--radius); padding: 20px 14px; cursor: pointer;
  transition: border-color .15s, background .15s;
}
.dropzone span { color: var(--muted); font-size: 12.5px; }
.dropzone:hover, .dropzone.over { border-color: var(--accent); background: color-mix(in srgb, var(--accent) 6%, transparent); }

.asset-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.asset-list li { display: grid; grid-template-columns: 44px 1fr auto; gap: 10px; align-items: center; padding: 6px; border-radius: 8px; background: var(--surface-2); }
.asset-list .thumb { width: 44px; height: 44px; border-radius: 6px; overflow: hidden; background: #000; }
.asset-list .thumb img, .asset-list .thumb video { width: 100%; height: 100%; object-fit: contain; }
.asset-list b { display: block; font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.asset-list small { color: var(--muted); font-size: 12px; }
.asset-list div { min-width: 0; }
.icon-btn { border: 0; background: none; width: 28px; height: 28px; border-radius: 6px; cursor: pointer; color: var(--muted); display: grid; place-items: center; }
.icon-btn:hover { background: var(--border); color: var(--text); }
.icon-btn svg { width: 16px; height: 16px; }

.field { display: flex; flex-direction: column; gap: 4px; font-size: 12.5px; font-weight: 600; color: var(--muted); position: relative; }
.field input, .field textarea, .field select {
  font-weight: 400; font-size: 14px; color: var(--text);
  border: 1px solid var(--border); border-radius: 8px; padding: 8px 10px; background: var(--surface); width: 100%;
}
.field textarea { resize: vertical; }
.field input:focus, .field textarea:focus, .field select:focus { outline: 2px solid color-mix(in srgb, var(--accent) 40%, transparent); border-color: var(--accent); }
.field-row { display: flex; gap: 10px; align-items: flex-end; }
.grow { flex: 1; min-width: 0; }
.count { position: absolute; right: 0; top: 0; font-weight: 500; }
.count.over { color: var(--warn); }
.logo-pick { cursor: pointer; }
.avatar.lg { width: 44px; height: 44px; font-size: 18px; }
#logoPreview:empty::after { content: "+"; }
#logoPreview { background: var(--surface-2); color: var(--muted); border: 1px dashed var(--border); }
#logoPreview img { width: 100%; height: 100%; object-fit: cover; border-radius: 50%; }

.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip {
  border: 1px solid var(--border); background: var(--surface); padding: 5px 10px; border-radius: 999px; cursor: pointer; font-size: 12.5px; font-weight: 600; color: var(--muted);
}
.chip[aria-pressed="true"] { background: var(--accent); border-color: var(--accent); color: #fff; }
.toggle { display: flex; align-items: center; gap: 8px; font-size: 13px; cursor: pointer; }

/* ---------- summary ---------- */
.summary { display: flex; flex-direction: column; gap: 8px; margin-bottom: 16px; }
.tallies { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.sample-note { color: var(--muted); }
.missing { background: var(--warn-bg); color: var(--text); padding: 10px 12px; border-radius: 8px; font-size: 13px; }
.status { font-size: 12px; font-weight: 600; padding: 3px 9px; border-radius: 999px; white-space: nowrap; }
.status.good { background: var(--good-bg); color: var(--good); }
.status.warn { background: var(--warn-bg); color: var(--warn); }
.status.crop { background: var(--crop-bg); color: var(--crop); }

/* ---------- placement grid ---------- */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); gap: 16px; align-items: start; }
.pcard { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; display: flex; flex-direction: column; }
.pcard > header { display: flex; justify-content: space-between; align-items: flex-start; gap: 8px; padding: 12px 14px 6px; }
.pcard h3 { font-size: 15px; }
.plat { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; }
.plat.facebook { color: #0866ff; } .plat.instagram { color: #d6249f; } .plat.messenger { color: #a334fa; }
.plat.threads { color: var(--text); } .plat.whatsapp { color: #25a244; } .plat.audience { color: #8a5a00; }
.meta { margin: 0; padding: 0 14px 10px; display: grid; gap: 2px; font-size: 12.5px; }
.meta div { display: flex; gap: 6px; }
.meta dt { color: var(--muted); min-width: 92px; }
.meta dd { margin: 0; font-weight: 500; min-width: 0; overflow-wrap: anywhere; }
.stage { background: var(--surface-2); padding: 18px; display: flex; justify-content: center; }
.notes { margin: 0; padding: 10px 14px 0 30px; font-size: 12.5px; display: grid; gap: 3px; }
.notes .muted { list-style: circle; }
.picker { display: flex; align-items: center; gap: 8px; padding: 10px 14px 0; font-size: 12.5px; color: var(--muted); }
.picker select { flex: 1; min-width: 0; border: 1px solid var(--border); border-radius: 6px; padding: 5px 8px; background: var(--surface); }
.pcard > :last-child { margin-bottom: 14px; }
.pcard > .stage:last-child { margin-bottom: 0; }

/* ---------- mockups: shared ---------- */
.m, .screen {
  --m-bg: #fff; --m-text: #050505; --m-muted: #65676b; --m-line: #e4e6eb; --m-soft: #f0f2f5;
  width: 300px; background: var(--m-bg); color: var(--m-text); font-size: 13px; line-height: 1.35;
  border-radius: 14px; overflow: hidden; box-shadow: 0 2px 10px rgba(0,0,0,.12);
  font-family: -apple-system, system-ui, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  user-select: none;
}
.stage.dark .m { --m-bg: #18191a; --m-text: #e4e6eb; --m-muted: #b0b3b8; --m-line: #3a3b3c; --m-soft: #242526; }
.m b { font-weight: 600; }
.m small { color: var(--m-muted); font-size: 11.5px; }
.i { display: inline-grid; place-items: center; width: 20px; height: 20px; color: currentColor; flex: none; }
.i svg { width: 100%; height: 100%; fill: currentColor; }
.i svg[fill="none"] { fill: none; }
.spacer { flex: 1; }
.avatar {
  width: 32px; height: 32px; border-radius: 50%; flex: none; display: inline-grid; place-items: center;
  background: linear-gradient(135deg, #5b7cfa, #b247d8); color: #fff; font-weight: 700; font-size: 14px; object-fit: cover;
}
.avatar.sm { width: 26px; height: 26px; font-size: 12px; }
.avatar.ring { box-shadow: 0 0 0 2px var(--m-bg), 0 0 0 3.5px #d6249f; }
.avatar.ph { background: var(--m-line); }
.more { color: var(--m-muted); font-weight: 600; }

.media { position: relative; width: 100%; overflow: hidden; background: #000; }
.media img, .media video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: block; }
.media.contain img, .media.contain video { object-fit: contain; }

.post-head { display: flex; align-items: center; gap: 8px; padding: 10px 12px; }
.post-head .who { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.post-head .who b { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.post-head .who small { display: inline-flex; align-items: center; gap: 3px; }
.post-head .who small .i { width: 11px; height: 11px; }
.post-head > .i { color: var(--m-muted); }

.ph { background: var(--m-line); }
i.short { width: 55% !important; }

/* Facebook feed */
.fb .primary { padding: 0 12px 10px; white-space: pre-line; }
.linkbar { display: flex; align-items: center; gap: 10px; padding: 9px 12px; background: var(--m-soft); }
.linkbar > div { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.linkbar small { text-transform: none; }
.linkbar b, .linkbar span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.linkbar span { color: var(--m-muted); font-size: 12px; }
.m button, .screen button {
  border: 0; border-radius: 6px; padding: 7px 12px; font-weight: 600; font-size: 12.5px; white-space: nowrap;
  background: var(--m-line); color: var(--m-text); cursor: default;
}
.counts { display: flex; justify-content: space-between; padding: 8px 12px; color: var(--m-muted); font-size: 12px; }
.actions { display: flex; justify-content: space-around; border-top: 1px solid var(--m-line); padding: 6px 8px; color: var(--m-muted); font-weight: 600; font-size: 12.5px; }
.actions span { display: inline-flex; align-items: center; gap: 5px; }
.actions svg { width: 17px; height: 17px; }

.carousel { display: flex; gap: 8px; overflow-x: auto; scroll-snap-type: x mandatory; padding: 0 12px 4px; scrollbar-width: none; }
.carousel::-webkit-scrollbar { display: none; }
.carousel .card { flex: 0 0 78%; scroll-snap-align: start; border: 1px solid var(--m-line); border-radius: 8px; overflow: hidden; }
.carousel .card-foot { display: flex; align-items: center; gap: 8px; padding: 8px 10px; }
.carousel .card-foot div { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.carousel .card-foot b { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.carousel.th { padding: 0; }
.carousel.th .media { flex: 0 0 78%; border-radius: 8px; scroll-snap-align: start; }

/* Instagram feed */
.ig .post-head { padding: 8px 10px; }
.ig-cta { display: flex; justify-content: space-between; padding: 9px 12px; border-bottom: 1px solid var(--m-line); font-weight: 600; color: #0095f6; }
.stage.dark .ig-cta { color: #4cb5f9; }
.ig-icons { display: flex; gap: 14px; padding: 9px 12px 4px; }
.ig-icons .i { width: 22px; height: 22px; }
.caption { padding: 2px 12px 12px; }
.swipe { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; }
.swipe::-webkit-scrollbar { display: none; }
.swipe .media { flex: 0 0 100%; scroll-snap-align: start; }
.dots { display: flex; justify-content: center; gap: 4px; padding-top: 8px; }
.dots i { width: 6px; height: 6px; border-radius: 50%; background: var(--m-line); }
.dots i.on { background: #0095f6; }

/* Threads */
.th-row { display: flex; gap: 10px; padding: 12px; }
.th-body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 8px; }
.th-body > .media { border-radius: 8px; }
.who-line { display: flex; align-items: center; gap: 6px; }
.who-line .i { margin-left: auto; color: var(--m-muted); }
.th-link { display: flex; align-items: center; justify-content: space-between; gap: 8px; border: 1px solid var(--m-line); border-radius: 8px; padding: 6px 6px 6px 10px; }
.th .ig-icons { padding: 0; }
.th .ig-icons .i { width: 19px; height: 19px; }

/* Full-screen (Stories, Reels, interstitial) */
.screen { position: relative; width: 270px; aspect-ratio: 9 / 16; background: #000; color: #fff; }
.screen-media { position: absolute; inset: 0; overflow: hidden; }
.screen-media > img, .screen-media > video { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.screen-media .cover { object-fit: cover; }
.screen-media .contain { object-fit: contain; }
.screen-media.letter { background: #222; }
.screen-media .bg-blur { object-fit: cover; filter: blur(22px) brightness(.7); transform: scale(1.2); }
.shade-top { position: absolute; inset: 0 0 auto; height: 18%; background: linear-gradient(rgba(0,0,0,.45), transparent); }
.shade-bottom { position: absolute; inset: auto 0 0; height: 25%; background: linear-gradient(transparent, rgba(0,0,0,.55)); }
.shade-bottom.tall { height: 40%; }
.progress { position: absolute; top: 8px; left: 8px; right: 8px; height: 2.5px; background: rgba(255,255,255,.35); border-radius: 2px; overflow: hidden; }
.progress i { display: block; width: 35%; height: 100%; background: #fff; }
.story-head { position: absolute; top: 18px; left: 10px; right: 8px; display: flex; align-items: center; gap: 7px; font-size: 12.5px; }
.story-head small { color: rgba(255,255,255,.8); font-size: 11.5px; }
.story-head .i { width: 18px; height: 18px; }
.story-text { position: absolute; left: 14px; right: 14px; bottom: 70px; font-size: 12.5px; text-shadow: 0 1px 3px rgba(0,0,0,.6); }
.story-text .more { color: rgba(255,255,255,.8); }
.story-cta { position: absolute; left: 0; right: 0; bottom: 16px; display: flex; flex-direction: column; align-items: center; gap: 2px; }
.story-cta button { background: #fff; color: #050505; border-radius: 8px; padding: 9px 22px; min-width: 60%; }
.story-cta.ig .i { width: 18px; height: 18px; }
.story-cta .pill { background: #fff; color: #050505; border-radius: 999px; padding: 6px 16px; font-weight: 600; font-size: 12.5px; }

.reels-top { position: absolute; top: 14px; left: 12px; font-size: 16px; text-shadow: 0 1px 3px rgba(0,0,0,.5); }
.reels-rail { position: absolute; right: 8px; bottom: 96px; display: flex; flex-direction: column; align-items: center; gap: 3px; font-size: 11px; }
.reels-rail .i { width: 24px; height: 24px; margin-top: 8px; }
.reels-info { position: absolute; left: 10px; right: 48px; bottom: 12px; display: flex; flex-direction: column; gap: 6px; font-size: 12.5px; }
.reels-info small { color: rgba(255,255,255,.8); font-size: 11px; }
.reels-info p { text-shadow: 0 1px 3px rgba(0,0,0,.6); }
.reels-info .more { color: rgba(255,255,255,.8); }
.reels-cta { display: flex; justify-content: space-between; background: rgba(255,255,255,.2); backdrop-filter: blur(6px); border-radius: 6px; padding: 7px 10px; font-weight: 600; }
.reels-cta.ig { background: #0095f6; }

.safe { position: absolute; inset: 0; pointer-events: none; }
.safe i { position: absolute; background: repeating-linear-gradient(135deg, rgba(255,59,48,.28) 0 6px, rgba(255,59,48,.14) 6px 12px); }
.safe b { position: absolute; border: 1.5px dashed rgba(52,199,89,.95); }

.inter-top { position: absolute; top: 10px; left: 10px; right: 10px; display: flex; justify-content: space-between; align-items: center; }
.badge { background: rgba(0,0,0,.55); padding: 2px 7px; border-radius: 4px; font-size: 11px; font-weight: 600; }
.inter-top .i { background: rgba(0,0,0,.55); border-radius: 50%; padding: 4px; width: 26px; height: 26px; }
.inter-card { position: absolute; left: 10px; right: 10px; bottom: 12px; display: flex; align-items: center; gap: 8px; background: #fff; color: #050505; border-radius: 10px; padding: 8px; font-size: 12.5px; }
.inter-card div { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.inter-card small { color: #65676b; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.inter-card button { background: #0866ff; color: #fff; }

/* In-stream */
.player { position: relative; }
.player-ad { position: absolute; top: 8px; left: 8px; background: rgba(0,0,0,.6); color: #fff; font-size: 11px; padding: 2px 6px; border-radius: 4px; }
.player-bar { display: flex; align-items: center; gap: 8px; padding: 8px 12px; background: var(--m-soft); }
.player-bar div { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.player-bar small { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* Marketplace */
.mp-head { display: flex; justify-content: space-between; align-items: center; padding: 12px; font-size: 17px; }
.mp-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; padding: 0 6px 10px; }
.tile { display: flex; flex-direction: column; gap: 3px; font-size: 12px; min-width: 0; }
.tile .ph { aspect-ratio: 1; border-radius: 6px; }
.tile i { display: block; height: 8px; border-radius: 4px; background: var(--m-line); width: 80%; margin-top: 3px; }
.tile.ad .media { border-radius: 6px; }
.tile.ad b { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* Search */
.searchbar { display: flex; align-items: center; gap: 8px; margin: 10px 12px; padding: 8px 12px; border-radius: 999px; background: var(--m-soft); color: var(--m-muted); }
.searchbar .i { width: 16px; height: 16px; }
.sr-row { display: flex; gap: 10px; align-items: center; padding: 8px 12px; }
.sr-row div { flex: 1; }
.sr-row i { display: block; height: 8px; border-radius: 4px; background: var(--m-line); margin: 5px 0; }
.sr-ad { border-top: 6px solid var(--m-soft); border-bottom: 6px solid var(--m-soft); }

/* Right column (desktop) */
.desk { padding: 12px; background: var(--m-soft); }
.rc-title { display: block; font-weight: 600; font-size: 13px !important; margin-bottom: 8px; }
.rc-ad { display: flex; gap: 10px; align-items: center; margin-bottom: 10px; }
.rc-thumb { width: 130px; flex: none; }
.rc-thumb .media, .rc-thumb .ph { border-radius: 8px; }
.rc-thumb .ph { aspect-ratio: 1.91; }
.rc-ad > div:last-child { min-width: 0; display: flex; flex-direction: column; }
.rc-ad.ghost i { display: block; height: 8px; width: 100px; border-radius: 4px; background: var(--m-line); margin: 4px 0; }

/* IG Explore grid */
.ig-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 2px; }
.gtile { aspect-ratio: 3 / 4; }
.gtile.ad { position: relative; }
.gtile.ad .media { height: 100%; }
.gtile.ad small { position: absolute; left: 4px; bottom: 4px; color: #fff; font-size: 10px; font-weight: 600; text-shadow: 0 1px 2px rgba(0,0,0,.7); }

/* Audience Network native */
.app { background: #fff; }
.app-bar { padding: 12px; font-weight: 700; border-bottom: 1px solid var(--m-line); }
.app-lines { padding: 10px 12px; }
.app-lines i { display: block; height: 8px; border-radius: 4px; background: var(--m-line); margin: 6px 0; }
.native { margin: 0 10px; border: 1px solid var(--m-line); border-radius: 8px; overflow: hidden; }
.adchoice { font-size: 10px; color: var(--m-muted); }
.native .linkbar button { background: #0866ff; color: #fff; }

/* ---------- aspect ratio view ---------- */
.lede { color: var(--muted); margin-bottom: 16px; max-width: 70ch; }
.rrow { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 16px; margin-bottom: 16px; box-shadow: var(--shadow); }
.rrow h3 { font-size: 15px; margin-bottom: 12px; overflow-wrap: anywhere; }
.rrow h3 .muted { font-weight: 400; font-size: 13px; }
.rcells { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 16px; }
.rcell { margin: 0; display: flex; flex-direction: column; gap: 8px; align-items: flex-start; }
.rbox { position: relative; overflow: hidden; border-radius: 6px; background: #000; max-width: 100%; }
.rbox img, .rbox video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.rframe { position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); box-shadow: 0 0 0 999px rgba(0,0,0,.62); outline: 2px solid #fff; outline-offset: -1px; }
.rcell figcaption { font-size: 13px; }
.rcell figcaption small { display: block; color: var(--muted); font-size: 12px; margin-top: 2px; }
.rcell .ok { color: var(--good); font-weight: 600; }
.rcell .mid { color: var(--warn); font-weight: 600; }
.rcell .low { color: var(--crop); font-weight: 600; }

/* ---------- specs ---------- */
.table-wrap { overflow-x: auto; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); }
table { border-collapse: collapse; width: 100%; font-size: 13px; }
th, td { text-align: left; padding: 9px 12px; border-bottom: 1px solid var(--border); vertical-align: top; }
thead th { background: var(--surface-2); font-size: 12px; color: var(--muted); white-space: nowrap; }
tbody th { background: var(--surface-2); white-space: nowrap; }
.spec-notes { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 16px; margin-top: 16px; }
.spec-notes > div { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 14px 16px; }
.spec-notes h3 { font-size: 14px; margin-bottom: 6px; }
.spec-notes p { font-size: 13px; color: var(--text); }
.spec-notes a { color: var(--accent); }

/* ---------- responsive ---------- */
@media (max-width: 900px) {
  .layout { grid-template-columns: 1fr; }
  .sidebar { position: static; height: auto; border-right: 0; border-bottom: 1px solid var(--border); }
  .topbar { padding: 10px 16px; }
  .content { padding: 16px 16px 40px; }
  .grid { grid-template-columns: 1fr; }
}
@media (max-width: 400px) {
  .stage { padding: 12px 8px; }
  .m { width: 100%; max-width: 300px; }
  .meta dt { min-width: 80px; }
}
