/* Nomo Studio. One light theme: white and pale lilac surfaces, near-black text, pistachio lime as the action
   colour (always with near-black text on it), the series violet as a secondary accent, hot pink only for errors.
   Echo of the series look: generous radii, 2 px near-black outlines and a small hard offset shadow on what you press. */

@font-face { font-family: Nunito; font-weight: 400; font-display: swap; src: url(/fonts/nunito-latin-400-normal.woff2) format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: Nunito; font-weight: 400; font-display: swap; src: url(/fonts/nunito-cyrillic-400-normal.woff2) format('woff2'); unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: Nunito; font-weight: 600; font-display: swap; src: url(/fonts/nunito-latin-600-normal.woff2) format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: Nunito; font-weight: 600; font-display: swap; src: url(/fonts/nunito-cyrillic-600-normal.woff2) format('woff2'); unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: Nunito; font-weight: 700; font-display: swap; src: url(/fonts/nunito-latin-700-normal.woff2) format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: Nunito; font-weight: 700; font-display: swap; src: url(/fonts/nunito-cyrillic-700-normal.woff2) format('woff2'); unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: Nunito; font-weight: 800; font-display: swap; src: url(/fonts/nunito-latin-800-normal.woff2) format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: Nunito; font-weight: 800; font-display: swap; src: url(/fonts/nunito-cyrillic-800-normal.woff2) format('woff2'); unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }

:root {
  color-scheme: light;
  --bg: #f7f5ff;
  --surface: #ffffff;
  --lilac: #ede8ff;
  --lilac-2: #e2dbff;
  --ink: #141414;
  --muted: #5a556b;        /* 7.0:1 on white, 6.5:1 on --bg */
  --line: #ddd6f3;
  --lime: #c1d55d;         /* the brand: always with --ink text (11:1) */
  --lime-soft: #eef4cf;
  --lime-deep: #6b7a1c;    /* lime-family text on white: 4.9:1 */
  --violet: #7658e8;       /* secondary accent; as text on white 4.7:1 */
  --violet-deep: #5a3fd0;
  --pink: #ff5fa8;         /* errors, destructive: borders and fills */
  --pink-deep: #b8155f;    /* error text on white: 6.4:1 */
  --pink-soft: #ffe6f1;
  --radius: 14px;
  --shadow: 3px 3px 0 var(--ink);
  font-family: Nunito, system-ui, sans-serif;
}

* { box-sizing: border-box; }
html, body { height: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 400 15px/1.5 Nunito, system-ui, sans-serif; -webkit-font-smoothing: antialiased; }
[hidden] { display: none !important; }
a { color: var(--violet-deep); text-underline-offset: 2px; }
h1, h2, h3 { margin: 0; font-weight: 800; line-height: 1.2; }
h1 { font-size: 26px; }
h2 { font-size: 19px; }
h3 { font-size: 15px; }
p { margin: 0; }
.boot { padding: 40px; color: var(--muted); }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

:focus-visible { outline: 3px solid var(--violet); outline-offset: 2px; }
input:focus-visible, textarea:focus-visible { outline: none; border-color: var(--ink); box-shadow: 0 0 0 3px var(--lime); }

/* ---------- controls ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font: 700 15px/1 Nunito, sans-serif; color: var(--ink); text-decoration: none; white-space: nowrap;
  min-height: 40px; padding: 0 16px; border: 2px solid var(--ink); border-radius: 12px; background: var(--surface);
  cursor: pointer; transition: transform 0.06s ease, box-shadow 0.06s ease, background 0.15s;
}
.btn:hover { background: var(--lilac); }
.btn:active { transform: translate(1px, 1px); }
.btn.primary { background: var(--lime); box-shadow: var(--shadow); }
.btn.primary:hover { background: #cfe06f; }
.btn.primary:active { box-shadow: 2px 2px 0 var(--ink); }
.btn.danger { border-color: var(--pink-deep); color: var(--pink-deep); }
.btn.danger:hover { background: var(--pink-soft); }
.btn.quiet { border-color: transparent; background: transparent; }
.btn.quiet:hover { background: var(--lilac); }
.btn.big { min-height: 48px; padding: 0 22px; font-size: 16px; }
.btn.small { min-height: 32px; padding: 0 12px; font-size: 14px; border-radius: 10px; }
.btn:disabled { opacity: 0.45; cursor: default; transform: none; box-shadow: none; }

label { display: block; font-weight: 700; margin: 0 0 6px; }
input[type=text], input[type=email], input:not([type]), textarea {
  width: 100%; font: 400 15px/1.5 Nunito, sans-serif; color: var(--ink);
  padding: 10px 12px; border: 2px solid #c9c2e3; border-radius: 12px; background: var(--surface);
}
textarea { resize: vertical; }
.field { margin-bottom: 16px; }
.hint { font-size: 13px; color: var(--muted); margin-top: 6px; }

.chip { display: inline-flex; align-items: center; gap: 6px; height: 24px; padding: 0 10px; border-radius: 999px; font-size: 13px; font-weight: 700; white-space: nowrap; background: var(--lilac); color: var(--ink); }
.chip.draft { background: #efedf4; }
.chip.proposal { background: var(--lilac-2); }
.chip.generating { background: #e6ddff; }
.chip.review { background: var(--lime-soft); }
.chip.accepted { background: var(--lime); }
.chip.soon { background: var(--lilac); color: var(--violet-deep); }
.dot { width: 8px; height: 8px; border-radius: 50%; background: currentColor; }

.card { background: var(--surface); border: 2px solid var(--ink); border-radius: 16px; }
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); }

.error-text { color: var(--pink-deep); font-weight: 600; }

/* ---------- Nomo ---------- */
.nomo { display: block; user-select: none; pointer-events: none; }
.nomo-s { height: 56px; width: auto; }
.nomo-m { height: 140px; width: auto; }
.nomo-l { height: 260px; width: auto; }

/* ---------- top bar ---------- */
.top { position: sticky; top: 0; z-index: 5; display: flex; align-items: center; gap: 16px; height: 56px; padding: 0 20px; background: var(--surface); border-bottom: 1px solid var(--line); }
.logo { display: flex; align-items: center; gap: 10px; font-weight: 800; font-size: 17px; color: var(--ink); text-decoration: none; }
.logo .mark { display: grid; place-items: center; width: 30px; height: 30px; border: 2px solid var(--ink); border-radius: 9px; background: var(--lime); font-size: 16px; }
.top .crumbs { display: flex; align-items: center; gap: 8px; color: var(--muted); min-width: 0; }
.top .crumbs a { color: var(--muted); text-decoration: none; font-weight: 700; }
.top .crumbs a:hover { color: var(--ink); }
.top .spacer { flex: 1; }
.top .me { color: var(--muted); font-size: 14px; }

/* ---------- sign-in ---------- */
.signin { min-height: 100vh; display: grid; place-items: center; padding: 24px; }
.signin .card { display: grid; grid-template-columns: 220px 360px; gap: 28px; align-items: center; padding: 32px 36px; box-shadow: 6px 6px 0 var(--ink); }
.signin .hello { display: grid; justify-items: center; gap: 12px; padding: 18px 0 6px; background: var(--lilac); border-radius: 14px; }
.signin h1 { margin-bottom: 6px; }
.signin form { display: grid; gap: 14px; }
.signin .lead { color: var(--muted); margin-bottom: 8px; }
.signin .row { display: flex; gap: 10px; align-items: center; }
.signin .code { font: 800 26px/1 Nunito, sans-serif; letter-spacing: 0.18em; text-align: center; text-transform: uppercase; }
.status-line { min-height: 22px; font-size: 14px; color: var(--muted); }
.status-line.error { color: var(--pink-deep); font-weight: 600; }

/* ---------- episodes ---------- */
.page { max-width: 1120px; margin: 0 auto; padding: 28px 24px 48px; }
.page-head { display: flex; align-items: center; gap: 16px; margin-bottom: 20px; }
.page-head .spacer { flex: 1; }
.list { display: grid; gap: 10px; }
.ep-row {
  display: grid; grid-template-columns: minmax(0, 1fr) 190px 150px 110px; gap: 16px; align-items: center;
  padding: 14px 18px; background: var(--surface); border: 2px solid transparent; border-radius: 14px; outline-offset: 2px;
  color: inherit; text-decoration: none; box-shadow: 0 1px 0 var(--line);
}
.ep-row:hover { border-color: var(--ink); }
.ep-row .title { font-weight: 800; font-size: 16px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ep-row .sub { font-size: 13px; color: var(--muted); }
.ep-row .cost { text-align: right; font-weight: 700; font-variant-numeric: tabular-nums; }
.list-head { display: grid; grid-template-columns: minmax(0, 1fr) 190px 150px 110px; gap: 16px; padding: 0 20px 4px; font-size: 13px; color: var(--muted); font-weight: 700; }
.list-head .r { text-align: right; }
.empty { display: grid; grid-template-columns: auto 1fr; gap: 28px; align-items: center; padding: 28px 36px; }
.empty h2 { margin-bottom: 6px; }
.empty p { color: var(--muted); margin-bottom: 18px; max-width: 440px; }

.new-ep { padding: 24px 26px; margin-bottom: 24px; box-shadow: 5px 5px 0 var(--ink); }
.new-ep h2 { margin-bottom: 16px; }
.new-ep textarea { min-height: 280px; font-size: 16px; }
.new-ep .actions { display: flex; gap: 12px; align-items: center; }

/* ---------- workspace ---------- */
.ws { display: grid; grid-template-rows: auto minmax(0, 1fr); height: calc(100vh - 56px); }
.ws-head { display: flex; align-items: center; gap: 14px; padding: 12px 20px; background: var(--surface); border-bottom: 1px solid var(--line); min-width: 0; }
.ws-head h1 { font-size: 20px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.ws-head .spacer { flex: 1; }
.cost-pill { display: inline-flex; align-items: baseline; gap: 6px; padding: 6px 12px; border: 1px solid var(--line); border-radius: 999px; background: var(--bg); font-size: 14px; cursor: pointer; white-space: nowrap; color: var(--ink); font-family: inherit; }
.cost-pill b { font-variant-numeric: tabular-nums; }
.cost-pill:hover { border-color: var(--ink); }

.ws-body { display: grid; grid-template-columns: minmax(440px, 46fr) minmax(0, 54fr); min-height: 0; }
.chat { display: grid; grid-template-rows: minmax(0, 1fr) auto; min-height: 0; border-right: 1px solid var(--line); background: var(--bg); }
.feed { overflow-y: auto; padding: 18px 20px 12px; display: flex; flex-direction: column; gap: 12px; scroll-behavior: auto; }
.msg { max-width: 92%; }
.msg.editor { align-self: flex-end; background: var(--lilac); border-radius: 16px 16px 4px 16px; padding: 10px 14px; white-space: pre-wrap; overflow-wrap: anywhere; }
.msg.editor.script { max-width: 100%; align-self: stretch; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; }
.msg.editor .who { font-size: 12px; font-weight: 700; color: var(--muted); margin-bottom: 2px; }
.msg.bot { align-self: flex-start; display: grid; grid-template-columns: 28px minmax(0, 1fr); gap: 10px; }
.avatar { width: 28px; height: 28px; border-radius: 50%; border: 2px solid var(--violet); display: grid; place-items: center; font-weight: 800; font-size: 13px; color: var(--violet-deep); background: var(--surface); }
.bot-body { display: grid; gap: 8px; min-width: 0; }
.bot-text { white-space: pre-wrap; overflow-wrap: anywhere; }
.bot-text.prose { white-space: normal; }
.bot-text.prose p { margin: 0 0 8px; }
.bot-text.prose p:last-child, .bot-text.prose ul:last-child, .bot-text.prose ol:last-child { margin-bottom: 0; }
.bot-text.prose ul, .bot-text.prose ol { margin: 0 0 8px; padding-left: 22px; }
.bot-text.prose li { margin: 2px 0; }
.bot-text.prose .prose-head { font-weight: 800; }
.bot-text.streaming::after { content: '▍'; color: var(--violet); animation: blink 1s steps(2) infinite; }
@keyframes blink { 50% { opacity: 0; } }
details.thinking { font-size: 13px; color: var(--muted); }
details.thinking summary { cursor: pointer; font-weight: 700; list-style: none; display: inline-flex; gap: 6px; align-items: center; }
details.thinking summary::-webkit-details-marker { display: none; }
details.thinking summary::before { content: '▸'; }
details.thinking[open] summary::before { content: '▾'; }
details.thinking .body { white-space: pre-wrap; margin-top: 6px; padding: 8px 10px; background: var(--surface); border-left: 3px solid var(--lilac-2); border-radius: 6px; }
details.context { font-size: 13px; color: var(--muted); margin-top: 8px; }
details.context summary { cursor: pointer; font-weight: 700; }
details.context pre { white-space: pre-wrap; font: 12px/1.45 ui-monospace, Menlo, monospace; margin: 6px 0 0; max-height: 240px; overflow: auto; }

.act { display: grid; grid-template-columns: 20px minmax(0, 1fr); gap: 4px 8px; align-items: start; padding: 8px 10px; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; font-size: 14px; }
.act .state { width: 16px; height: 16px; margin-top: 2px; border-radius: 50%; border: 2px solid var(--line); }
.act.running .state { border-color: var(--lime-deep); border-top-color: transparent; animation: spin 0.9s linear infinite; }
.act.ok .state { background: var(--lime); border-color: var(--ink); }
.act.fail .state { background: var(--pink); border-color: var(--pink-deep); }
@keyframes spin { to { transform: rotate(360deg); } }
.act .label { font-weight: 700; overflow-wrap: anywhere; }
.act .note { grid-column: 2; font-size: 13px; color: var(--muted); overflow-wrap: anywhere; }
.act.fail .note { color: var(--pink-deep); }
.bar { grid-column: 2; height: 6px; border-radius: 99px; background: var(--lilac); overflow: hidden; }
.bar > i { display: block; height: 100%; width: 0; background: var(--lime); border-right: 2px solid var(--ink); transition: width 0.25s; }
.act .thumbs { grid-column: 2; display: flex; gap: 8px; flex-wrap: wrap; margin-top: 4px; }
.thumb { height: 92px; width: auto; max-width: 100%; border-radius: 8px; border: 1px solid var(--line); background: #8f8f8f; cursor: zoom-in; }

.notice { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 14px; align-items: center; padding: 12px 14px; border-radius: 14px; background: var(--surface); border: 2px solid var(--ink); }
.notice.error, .notice.refusal { border-color: var(--pink-deep); background: var(--pink-soft); }
.notice .nomo { height: 72px; }
.notice.plain { grid-template-columns: minmax(0, 1fr); }

.plan { padding: 16px 18px; display: grid; gap: 12px; box-shadow: 4px 4px 0 var(--ink); }
.plan .head { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 12px; align-items: start; }
.plan .head .nomo { height: 96px; }
.plan .kicker { font-size: 12px; font-weight: 800; text-transform: uppercase; letter-spacing: 0.06em; color: var(--violet-deep); }
.plan dl { display: grid; grid-template-columns: 110px minmax(0, 1fr); gap: 6px 12px; margin: 0; }
.plan dt { font-weight: 700; color: var(--muted); }
.plan dd { margin: 0; overflow-wrap: anywhere; }
.plan ul { margin: 0; padding-left: 18px; }
.plan .new { display: inline-block; margin-left: 6px; padding: 0 7px; border-radius: 99px; background: var(--lime-soft); font-size: 12px; font-weight: 800; color: var(--lime-deep); }
.plan .questions { background: var(--lilac); border-radius: 12px; padding: 10px 12px; }
.plan .actions { display: flex; gap: 10px; flex-wrap: wrap; }
.plan .answer { font-weight: 700; }
.plan .answer.ok { color: var(--lime-deep); }
.plan textarea { min-height: 84px; }

.composer { padding: 12px 20px 14px; background: var(--surface); border-top: 1px solid var(--line); display: grid; gap: 8px; }
.composer .row { display: flex; gap: 10px; align-items: flex-end; }
.composer textarea { min-height: 48px; max-height: 200px; resize: none; }
.composer .meta { display: flex; justify-content: space-between; gap: 10px; font-size: 12px; color: var(--muted); }
.working { display: flex; align-items: center; gap: 12px; min-height: 56px; }
.working .what { font-weight: 700; flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.resume { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 12px; background: var(--lime-soft); }
.resume p { flex: 1; font-weight: 600; }

.side { display: grid; grid-template-rows: auto minmax(0, 1fr); min-height: 0; background: var(--surface); }
.tabs { display: flex; gap: 4px; padding: 10px 20px 0; border-bottom: 1px solid var(--line); }
.tab { font: 700 14px/1 Nunito, sans-serif; color: var(--muted); padding: 10px 14px 11px; border: 0; border-bottom: 3px solid transparent; background: none; cursor: pointer; }
.tab:hover { color: var(--ink); }
.tab[aria-selected=true] { color: var(--ink); border-bottom-color: var(--lime); }
.tab .count { margin-left: 4px; padding: 1px 6px; border-radius: 99px; background: var(--lilac); font-size: 12px; }
.pane { overflow-y: auto; padding: 20px; }

.result { display: grid; gap: 18px; align-content: start; }
.video-wrap { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 22px; align-items: start; }
.video-wrap video { height: min(62vh, 620px); aspect-ratio: 9 / 16; background: #000; border-radius: 14px; border: 2px solid var(--ink); }
.video-side { display: grid; gap: 14px; align-content: start; }
.video-side .note { padding: 10px 12px; background: var(--lilac); border-radius: 12px; }
.frames img { width: 100%; height: auto; border-radius: 12px; border: 1px solid var(--line); }
.placeholder { display: grid; justify-items: center; gap: 14px; text-align: center; padding: 40px 20px; color: var(--muted); }
.placeholder h2 { color: var(--ink); }
.section-title { display: flex; align-items: baseline; gap: 10px; margin-bottom: 10px; }
.section-title .muted { font-size: 13px; }
.cannot { padding: 12px 14px; border-radius: 12px; background: var(--pink-soft); border: 2px solid var(--pink-deep); }

.assets { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 14px; }
.asset { display: grid; gap: 6px; }
.asset img { width: 100%; height: 170px; object-fit: contain; background: #8f8f8f; border-radius: 10px; cursor: zoom-in; }
.asset .cap { font-size: 13px; font-weight: 700; overflow-wrap: anywhere; }

.cost { display: grid; gap: 14px; }
.cost-total { display: flex; align-items: baseline; gap: 10px; }
.cost-total b { font-size: 28px; font-weight: 800; font-variant-numeric: tabular-nums; }
.cost-card { padding: 14px 16px; border: 1px solid var(--line); border-radius: 14px; display: grid; gap: 4px; }
.cost-card h3 { display: flex; justify-content: space-between; gap: 12px; }
.cost-card .usd { font-variant-numeric: tabular-nums; }
.unpriced { color: var(--pink-deep); font-weight: 700; }
table.kinds { width: 100%; border-collapse: collapse; font-size: 13px; }
table.kinds th, table.kinds td { text-align: left; padding: 6px 8px; border-bottom: 1px solid var(--line); }
table.kinds td.n, table.kinds th.n { text-align: right; font-variant-numeric: tabular-nums; }

/* ---------- lightbox ---------- */
dialog.lightbox { padding: 0; border: 2px solid var(--ink); border-radius: 16px; max-width: min(92vw, 1400px); max-height: 92vh; background: #6f6f6f; }
dialog.lightbox::backdrop { background: rgba(20, 20, 20, 0.6); }
dialog.lightbox img { display: block; max-width: min(92vw, 1400px); max-height: calc(92vh - 4px); }
dialog.lightbox form { position: absolute; top: 8px; right: 8px; }

/* ---------- publication ---------- */
/* main navigation */
.mainnav { display: flex; gap: 4px; margin-left: 12px; }
.mainnav a { padding: 6px 12px; border-radius: 10px; color: var(--muted); font-weight: 700; text-decoration: none; }
.mainnav a:hover { background: var(--lilac); color: var(--ink); }
.mainnav a[aria-current=page] { background: var(--lime); color: var(--ink); }
.page.wide { max-width: 1320px; }
select { font: inherit; min-height: 40px; padding: 0 10px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); color: var(--ink); }
select:focus-visible { outline: none; border-color: var(--ink); box-shadow: 0 0 0 3px var(--lime); }
input[type=range] { width: 100%; accent-color: var(--violet); }
.label-row { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; }
.label-row label { margin: 0 0 6px; }
.counter { font-size: 12px; color: var(--muted); font-variant-numeric: tabular-nums; }
.counter.over { color: var(--pink-deep); font-weight: 700; }
.field.check label { display: flex; align-items: center; gap: 10px; font-weight: 600; margin: 0; cursor: pointer; }
.field.check input { width: 18px; height: 18px; accent-color: var(--lime-deep); }
.warn { color: #7a5200; }
.chip.connected { background: var(--lime-soft); }
.chip.off { background: #efedf4; color: var(--muted); text-decoration: none; }
.chip.post-queued, .chip.post-uploading, .chip.post-processing { background: var(--lilac-2); }
.chip.post-published { background: var(--lime); }
.chip.post-failed { background: var(--pink-soft); color: var(--pink-deep); }
.lead-text { max-width: 720px; margin: -8px 0 18px; }

/* publication */
.pub { display: grid; grid-template-columns: 300px minmax(0, 1fr); gap: 28px; align-items: start; }
.pub-side { position: sticky; top: 76px; display: grid; gap: 12px; }
.pub-side video { width: 100%; aspect-ratio: 9 / 16; background: #000; border-radius: 14px; border: 2px solid var(--ink); }
.cover { display: grid; gap: 8px; padding: 12px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); }
.pub-main { display: grid; gap: 16px; min-width: 0; }
.suggest { display: grid; gap: 10px; padding: 16px 18px; }
.suggest-row { display: flex; gap: 10px; align-items: center; }
.pub-cards { display: grid; gap: 14px; }
.pub-card { background: var(--surface); border: 2px solid var(--ink); border-radius: var(--radius); padding: 14px 18px 4px; box-shadow: var(--shadow); }
.pub-card.off { border-color: var(--line); box-shadow: none; }
.pub-card.off .pub-fields { opacity: 0.55; }
.pub-card header { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; }
.pub-card header .spacer { flex: 1; }
.pub-title { display: flex; align-items: center; gap: 10px; margin: 0; font-size: 18px; font-weight: 800; cursor: pointer; }
.pub-title input { width: 20px; height: 20px; accent-color: var(--lime-deep); }
.pub-fields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 18px; }
.pub-fields .field:has(textarea), .pub-fields .field:has(input[type=text]) { grid-column: 1 / -1; }
.pub-history { display: grid; gap: 6px; margin-bottom: 12px; }
.post-line { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; padding: 8px 10px; border-radius: 10px; background: var(--bg); }
.post-line p { flex-basis: 100%; margin: 0; }
.again { display: inline-flex; gap: 8px; align-items: center; margin: 0 0 12px; font-weight: 600; }
.pub-bar { position: sticky; bottom: 0; display: grid; gap: 8px; padding: 14px 0 18px; background: linear-gradient(transparent, var(--bg) 30%); }
.pub-bar .row { display: flex; gap: 14px; align-items: center; }
.problems { margin: 0; padding-left: 20px; color: var(--pink-deep); font-weight: 600; font-size: 14px; }
.problems:empty { display: none; }

/* social accounts */
.social-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 14px; }
.social-card { display: grid; gap: 10px; align-content: start; padding: 16px 18px; background: var(--surface); border: 2px solid var(--ink); border-radius: var(--radius); box-shadow: var(--shadow); }
.social-card .head { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; }
.social-card p { margin: 0; }
.social-card .row { display: flex; gap: 10px; align-items: center; }
.flash:empty { display: none; }
.flash { margin-bottom: 16px; }

/* analytics */
.tiles { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin-bottom: 18px; }
.tile { display: grid; gap: 2px; padding: 14px 16px; background: var(--surface); border: 2px solid var(--ink); border-radius: var(--radius); box-shadow: var(--shadow); }
.tile b { font-size: 28px; font-weight: 800; font-variant-numeric: tabular-nums; }
.net-cards { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin-bottom: 24px; }
.net-card { display: grid; gap: 10px; align-content: start; padding: 14px 16px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); }
.net-card.off { opacity: 0.6; }
.net-card header { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; }
.net-followers { display: flex; align-items: center; gap: 8px; }
.net-followers b { font-size: 22px; font-variant-numeric: tabular-nums; }
.net-followers .spark { margin-left: auto; }
.net-nums { display: grid; grid-template-columns: auto auto; gap: 2px 12px; margin: 0; font-size: 14px; }
.net-nums dt { color: var(--muted); }
.net-nums dd { margin: 0; text-align: right; font-weight: 700; font-variant-numeric: tabular-nums; }
.spark-line { fill: none; stroke: var(--violet); stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; }
.spark-empty { stroke: var(--line); stroke-width: 2; stroke-dasharray: 3 4; }
.filters { display: flex; flex-wrap: wrap; gap: 6px; }
.chip.filter { border: 1px solid var(--line); background: var(--surface); cursor: pointer; font: inherit; font-size: 13px; }
.chip.filter[aria-pressed=true] { background: var(--lime); border-color: var(--ink); }
.table-wrap { overflow-x: auto; margin-bottom: 14px; }
table.posts { width: 100%; border-collapse: collapse; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; font-size: 14px; }
table.posts th, table.posts td { padding: 8px 10px; border-bottom: 1px solid var(--line); text-align: left; white-space: nowrap; }
table.posts th { font-size: 12px; color: var(--muted); font-weight: 700; }
table.posts .n { text-align: right; font-variant-numeric: tabular-nums; }
button.sort { border: 0; background: none; padding: 0; font: inherit; color: inherit; cursor: pointer; }
button.sort[aria-pressed=true] { color: var(--ink); text-decoration: underline; text-decoration-color: var(--lime-deep); text-decoration-thickness: 2px; }
@media (max-width: 1100px) { .tiles, .net-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); } .pub { grid-template-columns: 1fr; } .pub-side { position: static; max-width: 320px; } }

@media (max-width: 1100px) {
  .ws-body { grid-template-columns: minmax(380px, 1fr) minmax(0, 1fr); }
  .video-wrap { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
.pane-holder { display: grid; min-height: 0; }
.plan-summary { padding: 14px 16px; display: grid; gap: 6px; }

/* a narrow window: the top bar keeps one line */
.logo { white-space: nowrap; }
.top .crumbs { min-width: 0; overflow: hidden; white-space: nowrap; }
.top .crumbs > * { overflow: hidden; text-overflow: ellipsis; }
@media (max-width: 980px) { .top .crumbs, .top .me { display: none; } .mainnav { margin-left: 4px; } }
