/* Strata — editorial workspace. Design tokens first, then shell, primitives, views. */
:root {
  --bg: #f1efe9;
  --panel: #ffffff;
  --panel-2: #faf9f6;
  --panel-3: #f4f2ed;
  --canvas: #e8e5dd;
  --ink: #14161a;
  --ink-2: #484d56;
  --ink-3: #868b94;
  --ink-4: #b7bac0;
  --line: rgba(20, 22, 26, 0.085);
  --line-2: rgba(20, 22, 26, 0.15);
  --rail: #101215;
  --rail-ink: #8c929b;
  --accent: #0276d9;
  --accent-ink: #ffffff;
  --accent-soft: rgba(2, 118, 217, 0.095);
  --accent-line: rgba(2, 118, 217, 0.4);
  --ok: #2c8a66;
  --ok-soft: rgba(44, 138, 102, 0.12);
  --warn: #b87e12;
  --warn-soft: rgba(197, 138, 27, 0.15);
  --bad: #c4443a;
  --bad-soft: rgba(196, 68, 58, 0.12);
  --info: #7154c8;
  --info-soft: rgba(113, 84, 200, 0.12);
  --shadow-1: 0 1px 2px rgba(16, 18, 21, 0.06);
  --shadow-2: 0 10px 28px -10px rgba(16, 18, 21, 0.22), 0 2px 6px rgba(16, 18, 21, 0.06);
  --shadow-3: 0 30px 70px -16px rgba(16, 18, 21, 0.4), 0 6px 16px rgba(16, 18, 21, 0.08);
  --r-s: 6px;
  --r-m: 9px;
  --r-l: 14px;
  --ease: cubic-bezier(0.23, 1, 0.32, 1);
  --sans: "Instrument Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  --serif: "Instrument Serif", Georgia, serif;
  --mono: "JetBrains Mono", ui-monospace, "SF Mono", Menlo, monospace;
  color-scheme: light;
}
[data-theme="dark"] {
  --bg: #0b0c0e;
  --panel: #14161a;
  --panel-2: #181b1f;
  --panel-3: #1d2024;
  --canvas: #0f1114;
  --ink: #eeece7;
  --ink-2: #b5b9c0;
  --ink-3: #7c818a;
  --ink-4: #50545b;
  --line: rgba(255, 255, 255, 0.07);
  --line-2: rgba(255, 255, 255, 0.13);
  --rail: #07080a;
  --accent: #3d9cf2;
  --accent-soft: rgba(61, 156, 242, 0.14);
  --accent-line: rgba(61, 156, 242, 0.5);
  --ok: #46b98a;
  --ok-soft: rgba(70, 185, 138, 0.14);
  --warn: #e0a83d;
  --warn-soft: rgba(224, 168, 61, 0.15);
  --bad: #ee7167;
  --bad-soft: rgba(238, 113, 103, 0.14);
  --info: #a28bf0;
  --info-soft: rgba(162, 139, 240, 0.15);
  --shadow-1: 0 1px 2px rgba(0, 0, 0, 0.4);
  --shadow-2: 0 10px 28px -10px rgba(0, 0, 0, 0.6), 0 2px 6px rgba(0, 0, 0, 0.3);
  --shadow-3: 0 30px 70px -16px rgba(0, 0, 0, 0.8), 0 6px 16px rgba(0, 0, 0, 0.4);
  color-scheme: dark;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; }
body {
  font: 13px/1.45 var(--sans);
  letter-spacing: -0.005em;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  overflow: hidden;
}
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
input, select, textarea { font: inherit; color: inherit; }
a { color: inherit; text-decoration: none; }
.i { flex: none; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.num { font-variant-numeric: tabular-nums; }
.mono { font-family: var(--mono); font-size: 11.5px; letter-spacing: 0; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 4px; }
::selection { background: var(--accent-soft); }
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-thumb { background: var(--line-2); border-radius: 10px; border: 3px solid transparent; background-clip: padding-box; }
::-webkit-scrollbar-thumb:hover { background: var(--ink-4); background-clip: padding-box; border: 3px solid transparent; }

/* ---------- shell ---------- */
#app { display: grid; grid-template-columns: 60px 1fr; grid-template-rows: 52px 1fr; height: 100vh; min-width: 1100px; }
.rail { grid-row: 1 / 3; background: var(--rail); display: flex; flex-direction: column; align-items: center; padding: 12px 0; gap: 4px; z-index: 30; }
.rail-logo { width: 34px; height: 34px; margin-bottom: 14px; display: grid; place-items: center; }
.rail-btn { position: relative; width: 40px; height: 40px; border-radius: 11px; display: grid; place-items: center; color: var(--rail-ink); transition: background 0.16s, color 0.16s; }
.rail-btn:hover { background: rgba(255, 255, 255, 0.07); color: #fff; }
.rail-btn.on { background: rgba(255, 255, 255, 0.11); color: #fff; }
.rail-btn.on::before { content: ""; position: absolute; left: -10px; top: 11px; bottom: 11px; width: 3px; border-radius: 0 3px 3px 0; background: var(--accent); }
.rail-btn .badge { position: absolute; top: 5px; right: 4px; min-width: 15px; height: 15px; padding: 0 4px; border-radius: 8px; background: var(--accent); color: #fff; font-size: 9.5px; font-weight: 600; display: grid; place-items: center; box-shadow: 0 0 0 2px var(--rail); }
.rail-btn[data-tip]::after { content: attr(data-tip); position: absolute; left: 52px; top: 50%; transform: translate(-4px, -50%); background: #fff; color: #14161a; font-size: 12px; font-weight: 500; padding: 5px 9px; border-radius: 7px; white-space: nowrap; opacity: 0; pointer-events: none; transition: opacity 0.14s, transform 0.14s var(--ease); box-shadow: var(--shadow-2); z-index: 50; }
.rail-btn:hover::after { opacity: 1; transform: translate(0, -50%); transition-delay: 0.25s; }
.rail-sp { flex: 1; }

.topbar { grid-column: 2; display: flex; align-items: center; gap: 12px; padding: 0 16px; background: var(--panel); border-bottom: 1px solid var(--line); z-index: 20; }
.ws { display: flex; align-items: center; gap: 9px; padding: 5px 9px 5px 5px; border-radius: 10px; transition: background 0.15s; }
.ws:hover { background: var(--panel-3); }
.ws-mark { width: 26px; height: 26px; border-radius: 8px; background: linear-gradient(145deg, #1d4d3c, #2f7a5c); display: grid; place-items: center; color: #e9f3ec; font: 400 16px/1 var(--serif); }
.ws-name { font-weight: 600; font-size: 13px; }
.ws-sub { font-size: 11px; color: var(--ink-3); display: flex; align-items: center; gap: 5px; line-height: 1.1; }
.ws-sub::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--ok); }
.search-btn { flex: 0 1 460px; margin: 0 auto 0 12px; display: flex; align-items: center; gap: 9px; height: 34px; padding: 0 8px 0 12px; border: 1px solid var(--line-2); border-radius: 10px; background: var(--panel-2); color: var(--ink-3); transition: border-color 0.15s, background 0.15s; width: 100%; text-align: left; }
.search-btn:hover { border-color: var(--ink-4); background: var(--panel); }
.search-btn .st { flex: 1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.kbd { font: 500 10.5px/1 var(--mono); padding: 3px 5px; border-radius: 5px; border: 1px solid var(--line-2); border-bottom-width: 2px; color: var(--ink-3); background: var(--panel); letter-spacing: 0; }
.top-right { display: flex; align-items: center; gap: 10px; }
.presence { display: flex; align-items: center; }
.presence .avatar { margin-left: -7px; box-shadow: 0 0 0 2px var(--panel); }
.presence .avatar:first-child { margin-left: 0; }
.presence-more { margin-left: -7px; width: 26px; height: 26px; border-radius: 50%; background: var(--panel-3); color: var(--ink-2); font-size: 10.5px; font-weight: 600; display: grid; place-items: center; box-shadow: 0 0 0 2px var(--panel); }
.icon-btn { width: 32px; height: 32px; border-radius: 9px; display: grid; place-items: center; color: var(--ink-2); position: relative; transition: background 0.15s, color 0.15s; }
.icon-btn:hover { background: var(--panel-3); color: var(--ink); }
.icon-btn .pip { position: absolute; top: 7px; right: 7px; width: 7px; height: 7px; border-radius: 50%; background: var(--bad); box-shadow: 0 0 0 2px var(--panel); }
.vsep { width: 1px; height: 20px; background: var(--line-2); }

#main { grid-column: 2; position: relative; overflow: hidden; min-height: 0; }
.view { position: absolute; inset: 0; display: flex; flex-direction: column; min-height: 0; animation: viewIn 0.4s var(--ease) both; }
@keyframes viewIn { from { opacity: 0; transform: translateY(6px); } }
.view-pad { flex: 1; overflow: auto; padding: 26px 32px 48px; }
.view-head { display: flex; align-items: flex-end; gap: 16px; margin-bottom: 22px; }
.view-head h1 { font-size: 22px; font-weight: 600; letter-spacing: -0.02em; line-height: 1.15; }
.view-head p { color: var(--ink-3); margin-top: 3px; }
.view-head .grow { flex: 1; }

/* ---------- primitives ---------- */
.btn { display: inline-flex; align-items: center; gap: 7px; height: 32px; padding: 0 12px; border-radius: 9px; border: 1px solid var(--line-2); background: var(--panel); font-weight: 500; white-space: nowrap; transition: background 0.14s, border-color 0.14s, transform 0.12s var(--ease), box-shadow 0.14s; box-shadow: var(--shadow-1); }
.btn:hover { background: var(--panel-2); border-color: var(--ink-4); }
.btn:active { transform: scale(0.97); }
.btn.primary { background: var(--accent); border-color: transparent; color: var(--accent-ink); box-shadow: 0 1px 2px rgba(2, 118, 217, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.2); }
.btn.primary:hover { filter: brightness(1.07); }
.btn.dark { background: var(--ink); color: var(--panel); border-color: transparent; }
.btn.ghost { background: transparent; border-color: transparent; box-shadow: none; color: var(--ink-2); }
.btn.ghost:hover { background: var(--panel-3); color: var(--ink); }
.btn.sm { height: 26px; padding: 0 9px; font-size: 12px; border-radius: 7px; gap: 5px; }
.btn.lg { height: 38px; padding: 0 16px; border-radius: 10px; }
.btn[disabled] { opacity: 0.45; pointer-events: none; }
.split { display: inline-flex; }
.split .btn:first-child { border-radius: 9px 0 0 9px; }
.split .btn:last-child { border-radius: 0 9px 9px 0; padding: 0 8px; border-left: 1px solid rgba(255, 255, 255, 0.28); }

.seg { display: inline-flex; padding: 2px; border-radius: 9px; background: var(--panel-3); gap: 1px; }
.seg button { height: 26px; min-width: 28px; padding: 0 9px; border-radius: 7px; color: var(--ink-3); font-weight: 500; font-size: 12px; display: inline-flex; align-items: center; justify-content: center; gap: 6px; transition: background 0.15s, color 0.15s, box-shadow 0.15s; }
.seg button:hover { color: var(--ink); }
.seg button.on { background: var(--panel); color: var(--ink); box-shadow: 0 1px 2px rgba(16, 18, 21, 0.12), 0 0 0 1px var(--line); }
[data-theme="dark"] .seg button.on { background: var(--panel-3); background: #2a2e34; }

.pill { display: inline-flex; align-items: center; gap: 6px; height: 22px; padding: 0 9px 0 8px; border-radius: 11px; font-size: 11.5px; font-weight: 600; background: var(--panel-3); color: var(--ink-2); white-space: nowrap; }
.pill::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.pill[data-s="draft"] { background: var(--panel-3); color: var(--ink-3); }
.pill[data-s="review"] { background: var(--warn-soft); color: var(--warn); }
.pill[data-s="approved"] { background: var(--info-soft); color: var(--info); }
.pill[data-s="scheduled"] { background: var(--accent-soft); color: var(--accent); }
.pill[data-s="live"] { background: var(--ok-soft); color: var(--ok); }
.chip { display: inline-flex; align-items: center; gap: 5px; height: 22px; padding: 0 8px; border-radius: 6px; font-size: 11.5px; font-weight: 500; background: var(--panel-3); color: var(--ink-2); }
.chip.accent { background: var(--accent-soft); color: var(--accent); }
.chip.ok { background: var(--ok-soft); color: var(--ok); }
.chip.warn { background: var(--warn-soft); color: var(--warn); }
.chip.bad { background: var(--bad-soft); color: var(--bad); }
.chip.info { background: var(--info-soft); color: var(--info); }
.chip.line { background: transparent; box-shadow: inset 0 0 0 1px var(--line-2); }

.avatar { width: 26px; height: 26px; border-radius: 50%; display: inline-grid; place-items: center; color: #fff; font-size: 10px; font-weight: 600; letter-spacing: 0; flex: none; }
.avatar.sm { width: 20px; height: 20px; font-size: 8.5px; }
.avatar.lg { width: 34px; height: 34px; font-size: 12px; }

.card { background: var(--panel); border: 1px solid var(--line); border-radius: var(--r-l); box-shadow: var(--shadow-1); }
.card-h { display: flex; align-items: center; gap: 10px; padding: 14px 16px 0; }
.card-h h3 { font-size: 13px; font-weight: 600; letter-spacing: -0.01em; }
.card-h .sub { color: var(--ink-3); font-size: 12px; }
.card-h .grow { flex: 1; }
.card-b { padding: 14px 16px 16px; }

.switch { position: relative; width: 30px; height: 18px; border-radius: 9px; background: var(--ink-4); transition: background 0.18s; flex: none; cursor: pointer; }
.switch::after { content: ""; position: absolute; left: 2px; top: 2px; width: 14px; height: 14px; border-radius: 50%; background: #fff; box-shadow: 0 1px 2px rgba(0, 0, 0, 0.3); transition: transform 0.2s var(--ease); }
.switch.on { background: var(--accent); }
.switch.on::after { transform: translateX(12px); }

.input, .select { height: 32px; width: 100%; padding: 0 10px; border-radius: 8px; border: 1px solid var(--line-2); background: var(--panel); transition: border-color 0.14s, box-shadow 0.14s; }
.input:hover, .select:hover { border-color: var(--ink-4); }
.input:focus, .select:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.select { appearance: none; padding-right: 26px; background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23868b94' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'><path d='m6 9 6 6 6-6'/></svg>"); background-repeat: no-repeat; background-position: right 9px center; }
textarea.input { height: auto; padding: 8px 10px; resize: none; line-height: 1.45; }
input[type="range"] { -webkit-appearance: none; appearance: none; width: 100%; height: 18px; background: transparent; }
input[type="range"]::-webkit-slider-runnable-track { height: 4px; border-radius: 2px; background: linear-gradient(90deg, var(--accent) var(--p, 50%), var(--line-2) var(--p, 50%)); }
input[type="range"]::-webkit-slider-thumb { -webkit-appearance: none; width: 16px; height: 16px; border-radius: 50%; background: #fff; border: 1px solid var(--line-2); box-shadow: var(--shadow-2); margin-top: -6px; }
.check { width: 16px; height: 16px; border-radius: 5px; border: 1.5px solid var(--ink-4); display: inline-grid; place-items: center; color: transparent; transition: all 0.14s; flex: none; background: var(--panel); cursor: pointer; }
.check.on { background: var(--accent); border-color: var(--accent); color: #fff; }
.check .i { stroke-width: 2.6; }

.tabs { display: flex; gap: 2px; border-bottom: 1px solid var(--line); padding: 0 10px; }
.tab { position: relative; height: 40px; padding: 0 10px; color: var(--ink-3); font-weight: 500; display: inline-flex; align-items: center; gap: 6px; transition: color 0.15s; }
.tab:hover { color: var(--ink); }
.tab.on { color: var(--ink); }
.tab.on::after { content: ""; position: absolute; left: 8px; right: 8px; bottom: -1px; height: 2px; background: var(--accent); border-radius: 2px; }
.tab .n { font-size: 10.5px; background: var(--accent); color: #fff; border-radius: 8px; padding: 0 5px; line-height: 15px; font-weight: 600; }

.empty { color: var(--ink-3); text-align: center; padding: 28px 12px; }

/* toasts */
#toasts { position: fixed; bottom: 80px; left: 50%; transform: translateX(-50%); display: flex; flex-direction: column; gap: 8px; align-items: center; z-index: 300; pointer-events: none; }
.toast { display: flex; align-items: center; gap: 10px; background: #14161a; color: #f3f1ec; padding: 10px 14px 10px 12px; border-radius: 11px; box-shadow: var(--shadow-3); font-weight: 500; animation: toastIn 0.35s var(--ease) both; }
[data-theme="dark"] .toast { background: #f3f1ec; color: #14161a; }
.toast .i { color: #6fd3a8; }
[data-theme="dark"] .toast .i { color: #1c8d62; }
.toast.out { animation: toastOut 0.25s ease both; }
@keyframes toastIn { from { opacity: 0; transform: translateY(12px) scale(0.96); } }
@keyframes toastOut { to { opacity: 0; transform: translateY(6px) scale(0.98); } }

/* popover menus */
.menu { position: fixed; z-index: 120; min-width: 220px; background: var(--panel); border: 1px solid var(--line-2); border-radius: 12px; box-shadow: var(--shadow-3); padding: 6px; animation: pop 0.2s var(--ease) both; transform-origin: top left; }
@keyframes pop { from { opacity: 0; transform: scale(0.96) translateY(-4px); } }
.menu h6 { font-size: 10.5px; text-transform: uppercase; letter-spacing: 0.06em; color: var(--ink-3); padding: 8px 10px 4px; font-weight: 600; }
.menu-item { display: flex; align-items: center; gap: 10px; width: 100%; padding: 7px 10px; border-radius: 8px; text-align: left; }
.menu-item:hover { background: var(--panel-3); }
.menu-item .ico { width: 28px; height: 28px; border-radius: 8px; background: var(--panel-3); display: grid; place-items: center; color: var(--ink-2); flex: none; }
.menu-item small { display: block; color: var(--ink-3); font-size: 11.5px; line-height: 1.25; }
.menu-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 2px; min-width: 420px; }

/* command palette */
#palette { position: fixed; inset: 0; z-index: 200; display: none; align-items: flex-start; justify-content: center; padding-top: 11vh; background: rgba(10, 12, 14, 0.42); backdrop-filter: blur(5px); }
#palette.on { display: flex; animation: fade 0.18s ease both; }
@keyframes fade { from { opacity: 0; } }
.pal { width: 640px; max-width: calc(100vw - 32px); background: var(--panel); border-radius: 16px; box-shadow: var(--shadow-3); border: 1px solid var(--line-2); overflow: hidden; animation: palIn 0.28s var(--ease) both; }
@keyframes palIn { from { opacity: 0; transform: translateY(-10px) scale(0.98); } }
.pal-in { display: flex; align-items: center; gap: 12px; padding: 0 18px; height: 56px; border-bottom: 1px solid var(--line); color: var(--ink-3); }
.pal-in input { flex: 1; border: 0; background: transparent; outline: none; font-size: 16px; color: var(--ink); letter-spacing: -0.01em; }
.pal-list { max-height: 392px; overflow: auto; padding: 6px; }
.pal-g { font-size: 10.5px; text-transform: uppercase; letter-spacing: 0.07em; color: var(--ink-3); padding: 10px 12px 5px; font-weight: 600; }
.pal-i { display: flex; align-items: center; gap: 12px; height: 40px; padding: 0 12px; border-radius: 9px; cursor: pointer; }
.pal-i .ico { color: var(--ink-3); width: 18px; display: grid; place-items: center; }
.pal-i .t { flex: 1; font-weight: 500; }
.pal-i .t em { font-style: normal; color: var(--accent); }
.pal-i .m { color: var(--ink-3); font-size: 12px; }
.pal-i.on { background: var(--accent-soft); }
.pal-i.on .ico { color: var(--accent); }
.pal-foot { display: flex; gap: 16px; padding: 10px 16px; border-top: 1px solid var(--line); color: var(--ink-3); font-size: 11.5px; background: var(--panel-2); }
.pal-foot span { display: inline-flex; align-items: center; gap: 6px; }

/* ---------- OVERVIEW ---------- */
.kpis { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-bottom: 14px; }
.kpi { padding: 14px 16px 12px; position: relative; overflow: hidden; }
.kpi .lbl { color: var(--ink-3); font-weight: 500; display: flex; align-items: center; gap: 7px; }
.kpi .val { font-size: 30px; font-weight: 600; letter-spacing: -0.03em; line-height: 1.1; margin-top: 8px; font-variant-numeric: tabular-nums; }
.kpi .delta { margin-top: 4px; font-size: 12px; color: var(--ink-3); display: flex; gap: 6px; align-items: center; }
.kpi .delta b { font-weight: 600; }
.kpi .delta .up { color: var(--ok); }
.kpi .delta .dn { color: var(--bad); }
.kpi svg.spark { position: absolute; right: 12px; bottom: 12px; width: 92px; height: 34px; }
.grid-2 { display: grid; grid-template-columns: minmax(0, 1.9fr) minmax(0, 1fr); gap: 14px; margin-bottom: 14px; }
.grid-3 { display: grid; grid-template-columns: 1.15fr 0.8fr 1fr; gap: 14px; }
.legend { display: flex; gap: 14px; margin-left: auto; }
.legend span { display: inline-flex; align-items: center; gap: 6px; color: var(--ink-2); font-size: 12px; }
.legend i { width: 8px; height: 8px; border-radius: 3px; }
.chart { position: relative; padding: 6px 16px 10px; }
.chart svg { width: 100%; height: 262px; display: block; overflow: visible; }
.chart text { font-size: 10.5px; fill: var(--ink-3); font-family: var(--sans); }
.chart .tip { position: absolute; pointer-events: none; background: #14161a; color: #f3f1ec; border-radius: 10px; padding: 9px 11px; font-size: 12px; box-shadow: var(--shadow-3); min-width: 150px; opacity: 0; transition: opacity 0.12s; z-index: 5; }
.chart .tip b { display: block; margin-bottom: 5px; font-weight: 600; }
.chart .tip div { display: flex; justify-content: space-between; gap: 14px; align-items: center; }
.chart .tip i { width: 8px; height: 8px; border-radius: 2px; display: inline-block; margin-right: 7px; }
.attn { list-style: none; }
.attn li { display: flex; align-items: center; gap: 11px; padding: 10px 16px; border-top: 1px solid var(--line); }
.attn li:first-child { border-top: 0; }
.attn .ico { width: 30px; height: 30px; border-radius: 9px; display: grid; place-items: center; flex: none; }
.attn .ico.warn { background: var(--warn-soft); color: var(--warn); }
.attn .ico.bad { background: var(--bad-soft); color: var(--bad); }
.attn .ico.info { background: var(--info-soft); color: var(--info); }
.attn .ico.accent { background: var(--accent-soft); color: var(--accent); }
.attn .t { flex: 1; min-width: 0; font-weight: 500; }
.attn .t small { display: block; color: var(--ink-3); font-weight: 400; font-size: 12px; }
.feed { list-style: none; padding: 6px 16px 10px; }
.feed li { display: flex; gap: 11px; padding: 9px 0; position: relative; }
.feed li:not(:last-child)::before { content: ""; position: absolute; left: 12px; top: 36px; bottom: -6px; width: 1px; background: var(--line-2); }
.feed .t { flex: 1; line-height: 1.4; }
.feed .t b { font-weight: 600; }
.feed .t a { color: var(--accent); font-weight: 500; }
.feed time { color: var(--ink-3); font-size: 11.5px; white-space: nowrap; }
.bars { padding: 4px 16px 16px; display: grid; gap: 14px; }
.bar-row .top { display: flex; justify-content: space-between; margin-bottom: 6px; font-weight: 500; }
.bar-row .top span:last-child { color: var(--ink-3); font-variant-numeric: tabular-nums; }
.bar { height: 6px; border-radius: 3px; background: var(--panel-3); overflow: hidden; }
.bar i { display: block; height: 100%; border-radius: 3px; background: var(--accent); transition: width 0.8s var(--ease); }
.up-list { list-style: none; padding: 4px 16px 12px; }
.up-list li { display: flex; align-items: center; gap: 12px; padding: 9px 0; border-top: 1px solid var(--line); }
.up-list li:first-child { border-top: 0; }
.up-date { width: 38px; text-align: center; flex: none; }
.up-date b { display: block; font-size: 17px; font-weight: 600; line-height: 1.1; letter-spacing: -0.02em; }
.up-date small { font-size: 10px; text-transform: uppercase; letter-spacing: 0.06em; color: var(--ink-3); font-weight: 600; }
.up-list .t { flex: 1; min-width: 0; font-weight: 500; }
.up-list .t small { display: block; color: var(--ink-3); font-weight: 400; font-size: 12px; }

/* ---------- CONTENT EDITOR ---------- */
.ed { flex: 1; display: grid; grid-template-columns: 276px minmax(0, 1fr) 332px; min-height: 0; }
.side { background: var(--panel); border-right: 1px solid var(--line); display: flex; flex-direction: column; min-height: 0; }
.side-head { padding: 14px 14px 10px; display: flex; flex-direction: column; gap: 10px; }
.side-title { display: flex; align-items: center; justify-content: space-between; }
.side-title h2 { font-size: 15px; font-weight: 600; letter-spacing: -0.015em; }
.types { display: flex; gap: 4px; flex-wrap: wrap; }
.types button { height: 24px; padding: 0 9px; border-radius: 12px; font-size: 12px; font-weight: 500; color: var(--ink-2); display: inline-flex; gap: 6px; align-items: center; transition: background 0.14s, color 0.14s; }
.types button:hover { background: var(--panel-3); }
.types button.on { background: var(--ink); color: var(--panel); }
.types button small { opacity: 0.55; font-size: 10.5px; font-variant-numeric: tabular-nums; }
.side-search { position: relative; }
.side-search .i { position: absolute; left: 10px; top: 9px; color: var(--ink-3); }
.side-search input { padding-left: 32px; height: 32px; background: var(--panel-2); }
.tree { flex: 1; overflow: auto; padding: 2px 8px 14px; }
.tree-label { font-size: 10.5px; text-transform: uppercase; letter-spacing: 0.07em; color: var(--ink-3); padding: 10px 8px 5px; font-weight: 600; display: flex; justify-content: space-between; }
.node { position: relative; }
.node-row { display: flex; align-items: center; gap: 6px; height: 32px; padding: 0 8px 0 4px; border-radius: 8px; cursor: pointer; transition: background 0.12s; position: relative; }
.node-row:hover { background: var(--panel-3); }
.node.sel > .node-row { background: var(--accent-soft); }
.node.sel > .node-row .node-title { color: var(--accent); font-weight: 600; }
.node-caret { width: 18px; height: 18px; display: grid; place-items: center; color: var(--ink-3); flex: none; border-radius: 5px; transition: transform 0.2s var(--ease); }
.node-caret:hover { background: var(--line); }
.node-caret.open { transform: rotate(90deg); }
.node-caret.none { visibility: hidden; }
.dot { width: 7px; height: 7px; border-radius: 50%; flex: none; background: var(--ink-4); }
.dot[data-s="live"] { background: var(--ok); }
.dot[data-s="review"] { background: var(--warn); }
.dot[data-s="approved"] { background: var(--info); }
.dot[data-s="scheduled"] { background: var(--accent); }
.dot[data-s="draft"] { background: var(--ink-4); }
.node-title { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 500; }
.node-children { margin-left: 13px; padding-left: 7px; border-left: 1px solid var(--line-2); }
.side-foot { border-top: 1px solid var(--line); padding: 10px 14px; display: flex; align-items: center; gap: 10px; color: var(--ink-3); font-size: 12px; }
.side-foot .legend-dots { display: flex; gap: 10px; flex: 1; }
.side-foot .legend-dots span { display: inline-flex; gap: 5px; align-items: center; }

.canvas { display: flex; flex-direction: column; min-width: 0; min-height: 0; background: var(--canvas); }
.canvas-head { container-type: inline-size; background: var(--panel); border-bottom: 1px solid var(--line); padding: 11px 18px 11px; display: flex; flex-direction: column; gap: 8px; }
.crumbs { display: flex; align-items: center; gap: 6px; color: var(--ink-3); font-size: 12px; }
.crumbs b { color: var(--ink-2); font-weight: 500; }
.title-row { display: flex; align-items: center; gap: 10px; }
.title-input { flex: 0 1 auto; field-sizing: content; min-width: 160px; max-width: 70%; font-size: 20px; font-weight: 600; letter-spacing: -0.02em; border: 0; outline: none; background: transparent; border-radius: 6px; padding: 2px 6px; margin-left: -6px; transition: background 0.14s; }
.title-input:hover { background: var(--panel-3); }
.title-input:focus { background: var(--panel-3); }
.tools-row { display: flex; align-items: center; gap: 8px; }
.save { display: inline-flex; align-items: center; gap: 6px; color: var(--ink-3); font-size: 12px; min-width: 112px; }
.save .i { color: var(--ok); }
.save.saving .i { color: var(--ink-3); animation: spin 0.9s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.stage { flex: 1; overflow: auto; padding: 22px 24px 70px; position: relative; scroll-behavior: smooth; }
.frame { margin: 0 auto; transition: width 0.45s var(--ease); width: 100%; max-width: 1040px; position: relative; }
.frame[data-device="tablet"] { width: 768px; }
.frame[data-device="mobile"] { width: 390px; }
.frame-bar { height: 34px; display: flex; align-items: center; gap: 12px; padding: 0 14px; background: var(--panel); border: 1px solid var(--line); border-bottom: 0; border-radius: 12px 12px 0 0; }
.frame-bar .dots { display: flex; gap: 6px; }
.frame-bar .dots i { width: 9px; height: 9px; border-radius: 50%; background: var(--line-2); }
.frame-bar .url { flex: 1; text-align: center; font-size: 11.5px; color: var(--ink-3); background: var(--panel-3); border-radius: 6px; padding: 3px 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.frame-bar .url b { color: var(--ink-2); font-weight: 500; }
.cursor-layer { position: absolute; inset: 34px 0 0; pointer-events: none; z-index: 9; overflow: hidden; }
.pcur { position: absolute; left: 0; top: 0; transition: transform 1.6s cubic-bezier(0.45, 0, 0.2, 1); will-change: transform; }
.pcur svg { display: block; filter: drop-shadow(0 2px 3px rgba(0, 0, 0, 0.25)); }
.pcur span { position: absolute; left: 14px; top: 16px; color: #fff; font-size: 11px; font-weight: 600; padding: 2px 7px; border-radius: 4px 9px 9px 9px; white-space: nowrap; }

@container (max-width: 700px) {
  .tools-row .presence { display: none; }
  .save { min-width: 0; }
  .tools-row .btn { padding: 0 10px; }
}
/* ---- the client's website (rendered inside the editor) ---- */
.site { container-type: inline-size; container-name: site; background: #fbf8f3; color: #231d17; font-family: var(--sans); border: 1px solid var(--line); border-radius: 0 0 12px 12px; overflow: hidden; box-shadow: var(--shadow-2); letter-spacing: -0.005em; position: relative; }
.site h1, .site h2, .site h3, .site .serif { font-family: var(--serif); font-weight: 400; letter-spacing: -0.01em; }
.site-nav { display: flex; align-items: center; gap: 22px; padding: 16px 32px; font-size: 13px; background: #fbf8f3; border-bottom: 1px solid rgba(35, 29, 23, 0.08); }
.site-nav .logo { font: 400 21px/1 var(--serif); letter-spacing: -0.01em; color: #1d4d3c; margin-right: auto; }
.site-nav a { color: #5b5045; font-weight: 500; }
.site-nav .nav-cta { background: #1d4d3c; color: #f3efe4; border-radius: 20px; padding: 7px 14px; font-weight: 600; }
.blk { position: relative; }
.blk::after { content: ""; position: absolute; inset: 0; pointer-events: none; box-shadow: inset 0 0 0 0 var(--accent); transition: box-shadow 0.16s; z-index: 4; }
.blk:hover::after { box-shadow: inset 0 0 0 1.5px var(--accent-line); }
.blk.sel::after { box-shadow: inset 0 0 0 2px var(--accent); }
.blk .tag { position: absolute; left: 0; top: 0; z-index: 6; display: flex; align-items: center; gap: 6px; height: 24px; padding: 0 9px 0 7px; background: var(--accent); color: #fff; font: 600 11px/1 var(--sans); border-radius: 0 0 8px 0; opacity: 0; transform: translateY(-4px); transition: opacity 0.14s, transform 0.18s var(--ease); letter-spacing: 0; }
.blk .tools { position: absolute; right: 10px; top: 10px; z-index: 6; display: flex; gap: 2px; padding: 3px; background: #14161a; border-radius: 10px; box-shadow: var(--shadow-2); opacity: 0; transform: translateY(-4px); transition: opacity 0.14s, transform 0.18s var(--ease); }
.blk .tools button { width: 26px; height: 26px; border-radius: 7px; display: grid; place-items: center; color: #c9ccd1; }
.blk .tools button:hover { background: rgba(255, 255, 255, 0.12); color: #fff; }
.blk .tools .sep { width: 1px; background: rgba(255, 255, 255, 0.14); margin: 4px 2px; }
.blk .lock { position: absolute; right: 10px; top: 10px; z-index: 6; display: flex; gap: 6px; align-items: center; font: 600 11px/1 var(--sans); padding: 5px 9px 5px 6px; border-radius: 12px; background: #fff; color: #231d17; box-shadow: var(--shadow-2); }
.blk:hover .tag, .blk.sel .tag, .blk:hover .tools, .blk.sel .tools { opacity: 1; transform: none; }
.blk:hover .lock { display: none; }
.blk.hidden-m { opacity: 0.35; }
.preview .blk .tag, .preview .blk .tools, .preview .ins, .preview .blk .lock, .preview .blk .cmt { display: none; }
.preview .blk::after { display: none; }
.blk .cmt { position: absolute; z-index: 6; left: 12px; bottom: 12px; width: 26px; height: 26px; border-radius: 13px 13px 13px 3px; background: var(--warn); color: #fff; font: 600 11px/26px var(--sans); text-align: center; box-shadow: var(--shadow-2); cursor: pointer; }
.ins { position: relative; height: 0; z-index: 7; }
.ins::before { content: ""; position: absolute; left: 0; right: 0; top: -10px; height: 20px; }
.ins .ins-btn { position: absolute; left: 50%; top: -11px; margin-left: -11px; width: 22px; height: 22px; border-radius: 50%; background: var(--accent); color: #fff; display: grid; place-items: center; opacity: 0; transform: scale(0.6); transition: opacity 0.14s, transform 0.2s var(--ease); box-shadow: 0 2px 6px rgba(2, 118, 217, 0.5); }
.ins::after { content: ""; position: absolute; left: 0; right: 0; top: -1px; height: 2px; background: var(--accent); opacity: 0; transition: opacity 0.14s; pointer-events: none; }
.ins:hover .ins-btn { opacity: 1; transform: none; }
.ins:hover::after { opacity: 0.7; }
[contenteditable] { outline: none; cursor: text; border-radius: 4px; transition: box-shadow 0.12s, background 0.12s; }
[contenteditable]:hover { box-shadow: 0 0 0 4px rgba(2, 118, 217, 0.1); background: rgba(2, 118, 217, 0.04); }
[contenteditable]:focus { box-shadow: 0 0 0 4px rgba(2, 118, 217, 0.22); background: rgba(2, 118, 217, 0.05); }
.preview [contenteditable]:hover { box-shadow: none; background: none; }
/* site blocks */
.sb { padding-block: var(--pad, 52px); }
.sb[data-space="s"] { --pad: 0px; }
.sb[data-space="m"] { --pad: 52px; }
.sb[data-space="l"] { --pad: 88px; }
.sb[data-bg="paper"] { background: #f1ebde; }
.sb[data-bg="dark"] { background: #17332a; color: #f3efe4; }
.sb-in { margin-inline: auto; padding-inline: 32px; }
.sb[data-width="contained"] .sb-in { max-width: 820px; }
.sb[data-width="wide"] .sb-in { max-width: 960px; }
.sb[data-width="full"] .sb-in { max-width: none; }
.sb-hero { min-height: 360px; position: relative; display: flex; align-items: flex-end; color: #fff; background-size: cover; background-position: var(--fx, 50%) var(--fy, 60%); }
.sb-hero::before { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(10, 14, 12, calc(var(--ov, 0.4) * 0.35)), rgba(10, 14, 12, var(--ov, 0.4))); }
.sb-hero .sb-in { position: relative; width: 100%; padding-block: 56px 44px; }
.sb-hero[data-align="center"] .sb-in { text-align: center; }
.sb-hero[data-align="center"] .hero-btns { justify-content: center; }
.sb-hero[data-align="center"] .hero-sub { margin-inline: auto; }
.eyebrow { font: 600 11px/1 var(--sans); text-transform: uppercase; letter-spacing: 0.14em; opacity: 0.9; margin-bottom: 14px; display: inline-block; }
.sb-hero h1 { font-size: 64px; line-height: 0.98; margin-bottom: 14px; }
.hero-sub { max-width: 520px; font-size: 16px; line-height: 1.5; opacity: 0.94; margin-bottom: 24px; }
.hero-btns { display: flex; gap: 10px; flex-wrap: wrap; }
.sbtn { display: inline-flex; align-items: center; height: 40px; padding: 0 20px; border-radius: 22px; font-weight: 600; font-size: 14px; background: #f3efe4; color: #17332a; }
.sbtn.ghost { background: rgba(255, 255, 255, 0.12); color: #fff; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.5); backdrop-filter: blur(4px); }
.sbtn.green { background: #1d4d3c; color: #f3efe4; }
.txt-grid { display: grid; grid-template-columns: 1.5fr 1fr; gap: 48px; align-items: start; }
.sb h2 { font-size: 38px; line-height: 1.05; margin-bottom: 14px; }
.sb p.lead { font-size: 16px; line-height: 1.65; color: #4b4036; }
.facts { border-top: 1px solid rgba(35, 29, 23, 0.14); }
.facts div { display: flex; justify-content: space-between; gap: 18px; padding: 11px 0; border-bottom: 1px solid rgba(35, 29, 23, 0.14); font-size: 14px; }
.facts dt { color: #8a7d6e; }
.facts dd { font-weight: 600; text-align: right; }
.offers-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-top: 26px; }
.ocard { background: #fbf8f3; border-radius: 14px; padding: 22px 20px 20px; display: flex; flex-direction: column; gap: 8px; position: relative; box-shadow: 0 1px 0 rgba(35, 29, 23, 0.06), 0 8px 24px -14px rgba(35, 29, 23, 0.3); }
.ocard.hot { box-shadow: 0 0 0 1.5px #1d4d3c, 0 14px 30px -16px rgba(29, 77, 60, 0.5); }
.ocard h3 { font-size: 24px; line-height: 1.1; }
.ocard p { font-size: 13.5px; color: #5b5045; line-height: 1.5; flex: 1; }
.ocard .price { font: 400 34px/1 var(--serif); margin-top: 8px; color: #1d4d3c; }
.ocard .price small { font: 500 12px var(--sans); color: #8a7d6e; margin-left: 6px; }
.ocard .tg { position: absolute; top: -10px; left: 16px; background: #c58a1b; color: #fff; font: 600 10.5px/1 var(--sans); letter-spacing: 0.04em; text-transform: uppercase; padding: 5px 9px; border-radius: 10px; }
.pms { display: inline-flex; align-items: center; gap: 5px; font: 600 10.5px/1 var(--sans); color: #1d4d3c; background: rgba(29, 77, 60, 0.1); padding: 4px 7px; border-radius: 6px; margin-left: 10px; vertical-align: middle; letter-spacing: 0; font-family: var(--sans); }
.gal-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 10px; }
.gal-grid > div { aspect-ratio: 4 / 3; border-radius: 10px; background-size: cover; background-position: center; }
.gal-grid > div:first-child { grid-row: span 1; }
.gal-cap { font-size: 12.5px; color: #8a7d6e; margin-top: 10px; display: flex; justify-content: space-between; }
.faq-item { border-top: 1px solid rgba(35, 29, 23, 0.16); }
.faq-item:last-child { border-bottom: 1px solid rgba(35, 29, 23, 0.16); }
.faq-q { display: flex; align-items: center; gap: 16px; padding: 18px 0; font: 400 21px/1.2 var(--serif); cursor: pointer; width: 100%; text-align: left; }
.faq-q > span:first-child { flex: 1; }
.faq-q .pl { width: 26px; height: 26px; border-radius: 50%; border: 1px solid rgba(35, 29, 23, 0.25); display: grid; place-items: center; transition: transform 0.3s var(--ease), background 0.2s; flex: none; }
.faq-item.open .faq-q .pl { transform: rotate(45deg); background: #1d4d3c; color: #fff; border-color: #1d4d3c; }
.faq-a { display: grid; grid-template-rows: 0fr; transition: grid-template-rows 0.38s var(--ease); }
.faq-item.open .faq-a { grid-template-rows: 1fr; }
.faq-a > div { overflow: hidden; }
.faq-a p { padding: 0 44px 20px 0; font-size: 14.5px; line-height: 1.6; color: #4b4036; }
.cta-in { display: flex; align-items: center; gap: 36px; }
.cta-in h2 { margin-bottom: 6px; font-size: 40px; }
.cta-in p { color: rgba(243, 239, 228, 0.7); font-size: 14.5px; }
.cta-fields { display: flex; gap: 8px; margin-left: auto; align-items: stretch; }
.cta-f { background: rgba(255, 255, 255, 0.08); border: 1px solid rgba(255, 255, 255, 0.16); border-radius: 12px; padding: 8px 14px; min-width: 112px; }
.cta-f small { display: block; font-size: 10.5px; text-transform: uppercase; letter-spacing: 0.09em; opacity: 0.6; font-weight: 600; }
.cta-f span { font-weight: 600; font-size: 14px; }
.sb-quote { font: 400 32px/1.2 var(--serif); }
.sb-ph { border: 1.5px dashed rgba(35, 29, 23, 0.28); border-radius: 14px; padding: 36px 20px; text-align: center; color: #8a7d6e; display: grid; justify-items: center; gap: 8px; }
.sb-ph b { color: #4b4036; font-weight: 600; }
@container site (max-width: 660px) {
  .site-nav { padding: 14px 18px; gap: 14px; }
  .site-nav a:not(.nav-cta):not(.logo) { display: none; }
  .sb-in { padding-inline: 20px; }
  .sb[data-space="m"] { --pad: 36px; }
  .sb[data-space="l"] { --pad: 56px; }
  .sb-hero { min-height: 420px; }
  .sb-hero h1 { font-size: 44px; }
  .hero-sub { font-size: 14.5px; }
  .txt-grid { grid-template-columns: 1fr; gap: 24px; }
  .sb h2 { font-size: 30px; }
  .offers-grid { grid-template-columns: 1fr; }
  .gal-grid { grid-template-columns: 1fr 1fr; }
  .gal-grid > div:first-child { grid-column: span 2; }
  .cta-in { flex-direction: column; align-items: stretch; gap: 20px; }
  .cta-fields { flex-direction: column; margin-left: 0; }
  .faq-q { font-size: 18px; }
}
@container site (min-width: 661px) and (max-width: 860px) {
  .sb-hero h1 { font-size: 52px; }
  .offers-grid { gap: 10px; }
  .cta-in { flex-wrap: wrap; }
}

/* text-format toolbar */
#fmt { position: fixed; z-index: 150; display: none; gap: 2px; padding: 4px; background: #14161a; border-radius: 11px; box-shadow: var(--shadow-3); animation: pop 0.16s var(--ease) both; }
#fmt.on { display: flex; }
#fmt button { width: 28px; height: 28px; border-radius: 8px; display: grid; place-items: center; color: #d6d8dc; }
#fmt button:hover { background: rgba(255, 255, 255, 0.14); color: #fff; }

/* inspector */
.insp { background: var(--panel); border-left: 1px solid var(--line); display: flex; flex-direction: column; min-height: 0; }
.insp-body { flex: 1; overflow: auto; padding: 4px 0 40px; }
.grp { padding: 14px 16px; border-bottom: 1px solid var(--line); }
.grp:last-child { border-bottom: 0; }
.grp-t { display: flex; align-items: center; gap: 8px; margin-bottom: 12px; font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.07em; color: var(--ink-3); }
.grp-t .grow { flex: 1; }
.row { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 11px; min-height: 28px; }
.row:last-child { margin-bottom: 0; }
.row > label, .row > .lbl { color: var(--ink-2); font-weight: 500; flex: none; }
.row .ctl { flex: 1; display: flex; justify-content: flex-end; min-width: 0; }
.row .ctl .select, .row .ctl .input { max-width: 188px; }
.stack { display: grid; gap: 10px; }
.field-l { font-weight: 500; color: var(--ink-2); margin-bottom: 5px; display: flex; justify-content: space-between; }
.field-l small { color: var(--ink-3); font-weight: 400; font-variant-numeric: tabular-nums; }
.focal { position: relative; height: 112px; border-radius: 10px; background-size: cover; background-position: center; cursor: crosshair; overflow: hidden; box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.12); }
.focal::before { content: ""; position: absolute; inset: 0; background: linear-gradient(rgba(255, 255, 255, 0.35) 1px, transparent 1px) 33.3% 0 / 100% 33.4%, linear-gradient(90deg, rgba(255, 255, 255, 0.35) 1px, transparent 1px) 0 33.3% / 33.4% 100%; opacity: 0.6; }
.focal .pt { position: absolute; width: 22px; height: 22px; margin: -11px 0 0 -11px; border-radius: 50%; border: 2px solid #fff; box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.4), 0 2px 8px rgba(0, 0, 0, 0.4); background: rgba(2, 118, 217, 0.5); transition: left 0.05s, top 0.05s; }
.steps { display: flex; align-items: center; margin: 2px 0 14px; }
.step { flex: 1; position: relative; text-align: center; font-size: 11px; font-weight: 500; color: var(--ink-3); }
.step i { display: grid; place-items: center; width: 22px; height: 22px; margin: 0 auto 6px; border-radius: 50%; background: var(--panel-3); border: 1.5px solid var(--line-2); font-style: normal; font-size: 10px; font-weight: 700; color: var(--ink-3); position: relative; z-index: 1; transition: all 0.3s var(--ease); }
.step::before { content: ""; position: absolute; left: -50%; right: 50%; top: 10px; height: 2px; background: var(--line-2); }
.step:first-child::before { display: none; }
.step.done i { background: var(--accent); border-color: var(--accent); color: #fff; }
.step.done::before, .step.cur::before { background: var(--accent); }
.step.cur i { border-color: var(--accent); color: var(--accent); background: var(--panel); box-shadow: 0 0 0 4px var(--accent-soft); }
.step.cur, .step.done { color: var(--ink); }
.btn-col { display: grid; gap: 8px; }
.btn-col .btn { justify-content: center; }
.tl { list-style: none; position: relative; }
.tl li { display: flex; gap: 11px; padding: 0 0 16px; position: relative; }
.tl li:not(:last-child)::before { content: ""; position: absolute; left: 12px; top: 28px; bottom: 2px; width: 1px; background: var(--line-2); }
.tl .t { flex: 1; min-width: 0; }
.tl .t b { font-weight: 600; }
.tl .t small { display: block; color: var(--ink-3); font-size: 11.5px; margin-top: 1px; }
.diff { font: 500 11px var(--mono); display: inline-flex; gap: 6px; margin-left: 6px; letter-spacing: 0; }
.diff .a { color: var(--ok); }
.diff .d { color: var(--bad); }
.tl .rest { opacity: 0; transition: opacity 0.15s; font-size: 11.5px; color: var(--accent); font-weight: 600; margin-left: auto; }
.tl li:hover .rest { opacity: 1; }
.cm { padding: 12px; border-radius: 11px; background: var(--panel-2); border: 1px solid var(--line); margin-bottom: 10px; }
.cm.done { opacity: 0.55; }
.cm .h { display: flex; align-items: center; gap: 8px; margin-bottom: 6px; }
.cm .h b { font-weight: 600; }
.cm .h small { color: var(--ink-3); }
.cm p { color: var(--ink-2); line-height: 1.45; }
.cm .f { display: flex; gap: 8px; margin-top: 9px; }
.score { display: flex; align-items: center; gap: 16px; }
.ring { position: relative; width: 74px; height: 74px; flex: none; }
.ring svg { transform: rotate(-90deg); }
.ring b { position: absolute; inset: 0; display: grid; place-items: center; font-size: 22px; font-weight: 600; letter-spacing: -0.03em; font-variant-numeric: tabular-nums; }
.ring circle { transition: stroke-dashoffset 0.9s var(--ease), stroke 0.4s; }
.chk { display: flex; align-items: flex-start; gap: 10px; padding: 9px 0; border-top: 1px solid var(--line); }
.chk:first-child { border-top: 0; }
.chk .ic { width: 20px; height: 20px; border-radius: 50%; display: grid; place-items: center; flex: none; margin-top: 1px; }
.chk .ic.ok { background: var(--ok-soft); color: var(--ok); }
.chk .ic.warn { background: var(--warn-soft); color: var(--warn); }
.chk .ic.info { background: var(--info-soft); color: var(--info); }
.chk .ic .i { stroke-width: 2.4; }
.chk .tx { flex: 1; line-height: 1.35; }
.chk .tx small { display: block; color: var(--ink-3); margin-top: 1px; }
.serp { padding: 12px 14px; border-radius: 11px; background: var(--panel-2); border: 1px solid var(--line); }
.serp .u { font-size: 11.5px; color: var(--ink-3); display: flex; align-items: center; gap: 7px; margin-bottom: 3px; }
.serp .u i { width: 18px; height: 18px; border-radius: 50%; background: #1d4d3c; display: grid; place-items: center; color: #e9f3ec; font: 400 11px var(--serif); font-style: normal; }
.serp .tt { color: var(--accent); font-size: 16px; font-weight: 500; line-height: 1.25; letter-spacing: -0.01em; }
.serp .ds { color: var(--ink-2); font-size: 12.5px; margin-top: 3px; line-height: 1.4; }
.role-chips { display: flex; flex-wrap: wrap; gap: 6px; }

/* ---------- WORKFLOW BOARD ---------- */
.filters { display: flex; align-items: center; gap: 8px; margin-bottom: 16px; flex-wrap: wrap; }
.board { display: grid; grid-template-columns: repeat(4, minmax(250px, 1fr)); gap: 14px; align-items: start; }
.col { background: var(--panel-3); border-radius: 14px; padding: 10px; min-height: 420px; transition: background 0.15s, box-shadow 0.15s; }
.col.over { background: var(--accent-soft); box-shadow: inset 0 0 0 1.5px var(--accent-line); }
.col-h { display: flex; align-items: center; gap: 8px; padding: 4px 6px 10px; font-weight: 600; }
.col-h .n { color: var(--ink-3); font-weight: 500; font-variant-numeric: tabular-nums; }
.col-h .wip { margin-left: auto; font-size: 11px; color: var(--ink-3); font-weight: 500; }
.wcard { background: var(--panel); border: 1px solid var(--line); border-radius: 11px; padding: 12px 12px 10px; margin-bottom: 8px; cursor: grab; box-shadow: var(--shadow-1); transition: transform 0.18s var(--ease), box-shadow 0.18s, opacity 0.15s; }
.wcard:hover { transform: translateY(-2px); box-shadow: var(--shadow-2); }
.wcard.drag { opacity: 0.4; }
.wcard .top { display: flex; align-items: center; gap: 7px; margin-bottom: 7px; color: var(--ink-3); font-size: 11.5px; }
.wcard .top .grow { flex: 1; }
.wcard h4 { font-size: 13.5px; font-weight: 600; line-height: 1.3; letter-spacing: -0.01em; margin-bottom: 10px; }
.wcard .bot { display: flex; align-items: center; gap: 9px; color: var(--ink-3); font-size: 11.5px; }
.wcard .bot .grow { flex: 1; }
.wcard .bot span { display: inline-flex; align-items: center; gap: 4px; }
.sla-late { color: var(--bad) !important; font-weight: 600; }
.sla-soon { color: var(--warn) !important; font-weight: 600; }
.wcard .adv { opacity: 0; transition: opacity 0.14s; width: 22px; height: 22px; border-radius: 6px; display: grid; place-items: center; color: var(--ink-2); }
.wcard:hover .adv { opacity: 1; }
.wcard .adv:hover { background: var(--panel-3); }

/* ---------- MEDIA ---------- */
.media-wrap { flex: 1; display: grid; grid-template-columns: 216px minmax(0, 1fr); min-height: 0; }
.media-wrap.has-detail { grid-template-columns: 216px minmax(0, 1fr) 316px; }
.mfold { border-right: 1px solid var(--line); background: var(--panel); padding: 16px 10px; overflow: auto; }
.mfold button { display: flex; align-items: center; gap: 9px; width: 100%; height: 32px; padding: 0 9px; border-radius: 8px; color: var(--ink-2); font-weight: 500; }
.mfold button:hover { background: var(--panel-3); }
.mfold button.on { background: var(--accent-soft); color: var(--accent); }
.mfold button small { margin-left: auto; color: var(--ink-3); font-variant-numeric: tabular-nums; font-weight: 400; }
.mfold h6 { font-size: 10.5px; text-transform: uppercase; letter-spacing: 0.07em; color: var(--ink-3); padding: 14px 9px 6px; font-weight: 600; }
.mstor { margin: 18px 6px 0; padding: 12px; border-radius: 11px; background: var(--panel-3); }
.mstor .bar { margin: 8px 0 6px; }
.mstor small { color: var(--ink-3); }
.mmain { display: flex; flex-direction: column; min-width: 0; min-height: 0; }
.mgrid { flex: 1; overflow: auto; padding: 0 22px 40px; display: grid; grid-template-columns: repeat(auto-fill, minmax(168px, 1fr)); gap: 14px; align-content: start; }
.tile { position: relative; cursor: pointer; border-radius: 12px; }
.tile .img { aspect-ratio: 4 / 3; border-radius: 12px; background-size: cover; background-position: center; box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.1), var(--shadow-1); transition: transform 0.25s var(--ease), box-shadow 0.2s; position: relative; overflow: hidden; }
.tile:hover .img { transform: translateY(-2px); box-shadow: var(--shadow-2); }
.tile.sel .img { box-shadow: 0 0 0 2.5px var(--accent), var(--shadow-2); }
.tile .cap { padding: 7px 2px 0; display: flex; justify-content: space-between; gap: 8px; }
.tile .cap b { font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tile .cap small { color: var(--ink-3); flex: none; font-variant-numeric: tabular-nums; }
.tile .ck { position: absolute; top: 8px; left: 8px; opacity: 0; transition: opacity 0.14s; z-index: 2; }
.tile:hover .ck, .tile.pick .ck { opacity: 1; }
.tile .ck .check { background: rgba(255, 255, 255, 0.85); border-color: rgba(0, 0, 0, 0.3); }
.tile .ck .check.on { background: var(--accent); border-color: var(--accent); }
.tile .bd { position: absolute; right: 8px; top: 8px; display: flex; gap: 4px; z-index: 2; }
.tile .bd span { height: 20px; padding: 0 6px; border-radius: 6px; background: rgba(10, 12, 14, 0.62); color: #fff; font-size: 10.5px; font-weight: 600; display: inline-flex; align-items: center; gap: 4px; backdrop-filter: blur(4px); }
.tile .bd span.w { background: rgba(197, 138, 27, 0.92); }
.tile .play { position: absolute; inset: 0; display: grid; place-items: center; }
.tile .play i { width: 36px; height: 36px; border-radius: 50%; background: rgba(255, 255, 255, 0.85); display: grid; place-items: center; color: #14161a; padding-left: 2px; }
.bulk { position: absolute; left: 50%; bottom: 22px; transform: translateX(-50%); background: #14161a; color: #f3f1ec; padding: 8px 8px 8px 16px; border-radius: 14px; display: flex; align-items: center; gap: 10px; box-shadow: var(--shadow-3); z-index: 10; animation: toastIn 0.35s var(--ease) both; }
.bulk .btn { background: rgba(255, 255, 255, 0.1); border-color: transparent; color: #fff; box-shadow: none; }
.bulk .btn:hover { background: rgba(255, 255, 255, 0.18); }
.mdet { background: var(--panel); border-left: 1px solid var(--line); overflow: auto; padding: 16px; }
.mdet .pv { aspect-ratio: 4 / 3; border-radius: 12px; background-size: cover; background-position: center; margin-bottom: 14px; box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.1); }
.mdet h4 { font-size: 14px; font-weight: 600; margin-bottom: 2px; word-break: break-all; }
.mdet .meta { color: var(--ink-3); margin-bottom: 14px; }
.dl { display: grid; grid-template-columns: auto 1fr; gap: 6px 14px; margin-bottom: 14px; }
.dl dt { color: var(--ink-3); }
.dl dd { text-align: right; font-weight: 500; }

/* ---------- CALENDAR ---------- */
.cal-wrap { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 16px; }
.cal { overflow: hidden; }
.cal-h { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); border-bottom: 1px solid var(--line); }
.cal-h div { padding: 9px 10px; font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.07em; color: var(--ink-3); }
.cal-g { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); }
.cal-d { min-height: 104px; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); padding: 7px 7px 6px; display: flex; flex-direction: column; gap: 4px; transition: background 0.14s; }
.cal-d:nth-child(7n) { border-right: 0; }
.cal-d:hover { background: var(--panel-2); }
.cal-d.out { background: var(--panel-2); color: var(--ink-4); }
.cal-d .dn { font-size: 12px; font-weight: 500; width: 22px; height: 22px; display: grid; place-items: center; border-radius: 50%; font-variant-numeric: tabular-nums; }
.cal-d.today .dn { background: var(--accent); color: #fff; font-weight: 600; }
.ev { display: flex; align-items: center; gap: 5px; height: 20px; padding: 0 6px; border-radius: 5px; font-size: 11.5px; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; cursor: pointer; transition: transform 0.14s var(--ease), filter 0.14s; }
.ev:hover { transform: translateX(2px); filter: brightness(0.96); }
.ev .dot { width: 6px; height: 6px; }
.ev[data-s="draft"] { background: var(--panel-3); color: var(--ink-2); }
.ev[data-s="review"] { background: var(--warn-soft); color: var(--warn); }
.ev[data-s="approved"] { background: var(--info-soft); color: var(--info); }
.ev[data-s="scheduled"] { background: var(--accent-soft); color: var(--accent); }
.ev[data-s="live"] { background: var(--ok-soft); color: var(--ok); }
.heat { display: grid; grid-template-columns: repeat(14, 1fr); gap: 4px; padding: 4px 16px 16px; }
.heat i { aspect-ratio: 1; border-radius: 4px; background: var(--accent); }

/* ---------- STRUCTURE ---------- */
.struct { display: grid; grid-template-columns: 300px minmax(0, 1fr); gap: 16px; align-items: start; }
.tcard { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: 12px; cursor: pointer; border: 1px solid transparent; transition: background 0.14s, border-color 0.14s; }
.tcard:hover { background: var(--panel-3); }
.tcard.on { background: var(--panel); border-color: var(--accent-line); box-shadow: 0 0 0 3px var(--accent-soft); }
.tcard .ico { width: 34px; height: 34px; border-radius: 10px; background: var(--panel-3); display: grid; place-items: center; color: var(--ink-2); flex: none; }
.tcard.on .ico { background: var(--accent); color: #fff; }
.tcard b { display: block; font-weight: 600; }
.tcard small { color: var(--ink-3); }
.tbl { width: 100%; border-collapse: collapse; }
.tbl th { text-align: left; padding: 10px 16px; font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.06em; color: var(--ink-3); border-bottom: 1px solid var(--line); }
.tbl td { padding: 11px 16px; border-bottom: 1px solid var(--line); }
.tbl tr:last-child td { border-bottom: 0; }
.tbl tbody tr { transition: background 0.12s; }
.tbl tbody tr:hover { background: var(--panel-2); }
.tbl .gh { color: var(--ink-4); }
.tbl .flags { display: flex; gap: 5px; }

/* ---------- INTEGRATIONS ---------- */
.integ { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 14px; }
.icard { padding: 16px; display: flex; flex-direction: column; gap: 12px; transition: transform 0.2s var(--ease), box-shadow 0.2s; }
.icard:hover { transform: translateY(-2px); box-shadow: var(--shadow-2); }
.icard .h { display: flex; align-items: center; gap: 12px; }
.icard .ico { width: 38px; height: 38px; border-radius: 11px; background: var(--panel-3); display: grid; place-items: center; color: var(--ink-2); }
.icard .h b { flex: 1; font-weight: 600; font-size: 14px; }
.icard p { color: var(--ink-3); }
.icard .f { display: flex; align-items: center; gap: 8px; color: var(--ink-3); font-size: 12px; }
.icard .f .grow { flex: 1; }

/* ---------- ROLES ---------- */
.matrix { width: 100%; border-collapse: separate; border-spacing: 0; }
.matrix th, .matrix td { padding: 12px 16px; border-bottom: 1px solid var(--line); text-align: center; }
.matrix th { font-weight: 600; font-size: 12px; color: var(--ink-2); background: var(--panel-2); position: sticky; top: 0; }
.matrix th:first-child, .matrix td:first-child { text-align: left; font-weight: 500; }
.matrix tr:last-child td { border-bottom: 0; }
.matrix td .check { margin: 0 auto; }
.matrix tbody tr:hover td { background: var(--panel-2); }

/* ---------- demo cursor ---------- */
#demo-cursor { position: fixed; left: 0; top: 0; z-index: 9999; pointer-events: none; transition: transform 0.85s cubic-bezier(0.3, 0.7, 0.2, 1); display: none; }
#demo-cursor.on { display: block; }
#demo-cursor svg { filter: drop-shadow(0 3px 5px rgba(0, 0, 0, 0.35)); }
#demo-cursor::after { content: ""; position: absolute; left: -14px; top: -14px; width: 28px; height: 28px; border-radius: 50%; border: 2px solid var(--accent); opacity: 0; }
#demo-cursor.click::after { animation: ripple 0.5s ease-out; }
@keyframes ripple { from { opacity: 0.9; transform: scale(0.3); } to { opacity: 0; transform: scale(1.5); } }
#demo-caption { position: fixed; left: 50%; bottom: 22px; transform: translateX(-50%); z-index: 9998; background: rgba(20, 22, 26, 0.92); color: #fff; padding: 10px 18px; border-radius: 12px; font-size: 14px; font-weight: 500; display: none; backdrop-filter: blur(8px); box-shadow: var(--shadow-3); max-width: 70vw; text-align: center; }
#demo-caption.on { display: block; animation: toastIn 0.35s var(--ease) both; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
}
