/*
 * theme.css — Pabbly Social design tokens.
 * Pabbly family look: white app shell, navy ink, Pabbly green as the action
 * colour, Public Sans throughout (like Pabbly's own dashboards).
 * Network brand colours live as --x-net-* tokens, read by app.css.
 */

:root {
  --canvas: #f5f7fa;
  --surface: #ffffff;
  --surface-2: #eef2f6;
  --border: #dde3ea;
  --border-strong: #b7c1cc;
  --ink: #15233b;
  --muted: #586579;
  --accent: #0a8256;
  --accent-hover: #087650;
  --accent-ink: #ffffff;
  --accent-text: #08734c;
  --accent-strong: #065c3d;
  --accent-soft: #dcf2e8;
  --accent-border: #9dd6bd;
  --success: #15803d;
  --success-ink: #ffffff;
  --success-soft: #dff1e5;
  --success-strong: #126c34;
  --warning: #b45309;
  --warning-ink: #ffffff;
  --warning-soft: #fbecd9;
  --warning-strong: #92420a;
  --danger: #c4282a;
  --danger-ink: #ffffff;
  --danger-soft: #fbe3e3;
  --danger-strong: #a61f21;
  --chart-1: #0a8256;
  --chart-2: #2563eb;
  --chart-3: #d9480f;
  --chart-4: #7c3aed;
  --chart-5: #0e7490;
  --chart-6: #be185d;

  --font-display: "Public Sans", ui-sans-serif, system-ui, sans-serif;
  --font-body: "Public Sans", ui-sans-serif, system-ui, sans-serif;
  --font-sans: "Public Sans", ui-sans-serif, system-ui, sans-serif;
  --font-mono: "JetBrains Mono Variable", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  --display-weight: 700;
  --display-tracking: -0.02em;
  --eyebrow-tracking: 0.08em;

  --radius-btn: 8px;
  --radius-card: 12px;
  --radius-input: 8px;
  --shadow-card: 0 1px 2px rgba(16, 24, 40, 0.05);
  --shadow-raised: 0 12px 32px rgba(16, 24, 40, 0.14);
  --btn-weight: 600;

  --x-net-ink: #ffffff;
  --x-net-facebook: #1877f2;
  --x-net-instagram: #d62976;
  --x-net-threads: #101010;
  --x-net-linkedin: #0a66c2;
  --x-net-x: #101010;
  --x-net-youtube: #e00000;
  --x-net-gbp: #1a73e8;
  --x-net-pinterest: #e60023;
  --x-net-tiktok: #101010;
  --x-net-reddit: #ff4500;
  --x-net-bluesky: #0a7aff;
  --x-net-mastodon: #5b4be1;
  --x-net-telegram: #1f96d3;
  --x-net-discord: #5865f2;
  --x-net-slack: #4a154b;
  --x-net-wordpress: #21759b;
  --x-hero: #0d1b2e;
}

html[data-theme="dark"] {
  --canvas: #0e1520;
  --surface: #151f2c;
  --surface-2: #1c2937;
  --border: #273546;
  --border-strong: #3c4d61;
  --ink: #e7edf4;
  --muted: #9babbd;
  --accent: #2ec486;
  --accent-hover: #47d29a;
  --accent-ink: #03200f;
  --accent-text: #4fd6a0;
  --accent-strong: #86e7bf;
  --accent-soft: #123628;
  --accent-border: #1f5a43;
  --success: #22a356;
  --success-ink: #03200f;
  --success-soft: #133222;
  --success-strong: #6bd391;
  --warning: #d97706;
  --warning-ink: #1f1200;
  --warning-soft: #3a2614;
  --warning-strong: #f0a95a;
  --danger: #e5484d;
  --danger-ink: #1f0304;
  --danger-soft: #3b1a1c;
  --danger-strong: #f08b8e;
  --chart-1: #2ec486;
  --chart-2: #60a5fa;
  --chart-3: #fb923c;
  --chart-4: #a78bfa;
  --chart-5: #22d3ee;
  --chart-6: #f472b6;

  --x-net-ink: #ffffff;
  --x-net-facebook: #1877f2;
  --x-net-instagram: #d62976;
  --x-net-threads: #2b2b2b;
  --x-net-linkedin: #0a66c2;
  --x-net-x: #2b2b2b;
  --x-net-youtube: #e00000;
  --x-net-gbp: #1a73e8;
  --x-net-pinterest: #e60023;
  --x-net-tiktok: #2b2b2b;
  --x-net-reddit: #ff4500;
  --x-net-bluesky: #0a7aff;
  --x-net-mastodon: #5b4be1;
  --x-net-telegram: #1f96d3;
  --x-net-discord: #5865f2;
  --x-net-slack: #4a154b;
  --x-net-wordpress: #21759b;
  --x-hero: #08101b;
}

/* app.css — Pabbly Social's own styles. Tokens only (see theme.css). */

body { font-family: var(--font-body); }
code, .font-mono { font-family: var(--font-mono); font-size: 0.92em; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }

/* ---------- Brand ---------- */
.brand { display: inline-flex; align-items: center; gap: 0.6rem; color: var(--ink); text-decoration: none; }
.brand:hover { text-decoration: none; }
.brand-mark { display: grid; place-items: center; width: 2rem; height: 2rem; border-radius: 9px; background: var(--accent); color: var(--accent-ink); }
.brand-mark .icon { width: 1.05rem; height: 1.05rem; transform: rotate(-12deg); }
.brand-word { font-weight: 700; font-size: 1.1rem; letter-spacing: -0.01em; }
.brand-pabbly { color: var(--accent-text); }

/* ---------- Network marks & avatars ---------- */
.net-mark { display: inline-grid; place-items: center; flex-shrink: 0; border-radius: 8px; color: var(--x-net-ink); font-weight: 800; letter-spacing: -0.02em; line-height: 1; }
.net-mark b { font-weight: 800; }
.net-sm { width: 1.15rem; height: 1.15rem; border-radius: 5px; font-size: 0.55rem; }
.net-md { width: 1.75rem; height: 1.75rem; font-size: 0.72rem; }
.net-lg { width: 2.5rem; height: 2.5rem; border-radius: 10px; font-size: 0.95rem; }
.net-facebook { background: var(--x-net-facebook); }
.net-instagram { background: var(--x-net-instagram); }
.net-threads { background: var(--x-net-threads); }
.net-linkedin { background: var(--x-net-linkedin); }
.net-x { background: var(--x-net-x); }
.net-youtube { background: var(--x-net-youtube); }
.net-pinterest { background: var(--x-net-pinterest); }
.net-tiktok { background: var(--x-net-tiktok); }
.net-reddit { background: var(--x-net-reddit); }
.net-bluesky { background: var(--x-net-bluesky); }
.net-mastodon { background: var(--x-net-mastodon); }
.net-telegram { background: var(--x-net-telegram); }
.net-discord { background: var(--x-net-discord); }
.net-slack { background: var(--x-net-slack); }
.net-wordpress { background: var(--x-net-wordpress); }

.ch-avatar { position: relative; display: inline-grid; place-items: center; flex-shrink: 0; border-radius: 999px; background: var(--surface-2); color: var(--muted); font-weight: 700; }
.ch-avatar > img { width: 100%; height: 100%; border-radius: 999px; object-fit: cover; }
.ch-md { width: 2.4rem; height: 2.4rem; font-size: 0.8rem; }
.ch-sm { width: 1.75rem; height: 1.75rem; font-size: 0.62rem; }
.ch-corner { position: absolute; right: -4px; bottom: -4px; border-radius: 6px; box-shadow: 0 0 0 2px var(--surface); display: inline-flex; }
.ch-sm .ch-corner .net-sm { width: 0.85rem; height: 0.85rem; font-size: 0.42rem; border-radius: 4px; }

/* ---------- App shell ---------- */
.app { display: flex; min-height: 100vh; }
.side { position: sticky; top: 0; display: none; height: 100vh; width: 15.5rem; flex-shrink: 0; flex-direction: column; gap: 0.75rem; border-right: 1px solid var(--border); background: var(--surface); padding: 1rem 0.75rem; }
@media (min-width: 768px) { .side { display: flex; } }
.side-top { padding: 0.25rem 0.5rem 0.5rem; }
.side-nav { display: flex; flex-direction: column; gap: 2px; }
.side-link { display: flex; align-items: center; gap: 0.75rem; border-radius: 8px; padding: 0.55rem 0.75rem; color: var(--muted); font-size: 0.92rem; font-weight: 500; text-decoration: none; transition: background-color 120ms, color 120ms; }
.side-link:hover { background: var(--surface-2); color: var(--ink); text-decoration: none; }
.side-link.is-active { background: var(--accent-soft); color: var(--accent-strong); font-weight: 600; }
.side-count { margin-left: auto; min-width: 1.4rem; border-radius: 999px; padding: 0 0.4rem; text-align: center; font-size: 0.72rem; font-weight: 700; line-height: 1.35rem; }
.side-count-warn { background: var(--warning-soft); color: var(--warning-strong); }
.side-count-bad { background: var(--danger-soft); color: var(--danger-strong); }
.side-foot { margin-top: auto; }
.plan-card { border: 1px solid var(--accent-border); border-radius: 10px; background: var(--accent-soft); padding: 0.85rem; }
.plan-title { display: flex; align-items: center; gap: 0.4rem; font-weight: 700; color: var(--accent-strong); font-size: 0.88rem; }
.plan-text { margin-top: 0.25rem; font-size: 0.78rem; color: var(--accent-strong); }

.ws-switch { display: block; width: 100%; }
.ws-button { display: flex; width: 100%; cursor: pointer; align-items: center; gap: 0.6rem; border: 1px solid var(--border); border-radius: 10px; background: var(--surface); padding: 0.5rem 0.6rem; list-style: none; }
.ws-button::-webkit-details-marker { display: none; }
.ws-button:hover { border-color: var(--border-strong); }
.ws-name { min-width: 0; flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 600; font-size: 0.9rem; }
.ws-dot { display: grid; place-items: center; width: 1.75rem; height: 1.75rem; flex-shrink: 0; border-radius: 7px; background: var(--x-hero); color: var(--x-net-ink); font-weight: 700; font-size: 0.8rem; }
.ws-dot-sm { width: 1.4rem; height: 1.4rem; font-size: 0.7rem; }
.ws-menu { width: 16rem; }
.ws-menu form { margin: 0; }

.main { display: flex; min-width: 0; flex: 1; flex-direction: column; }
.topbar { position: sticky; top: 0; z-index: 20; display: flex; height: 3.75rem; align-items: center; gap: 0.6rem; border-bottom: 1px solid var(--border); background: var(--surface); padding: 0 1rem; }
@media (min-width: 768px) { .topbar { padding: 0 1.75rem; } }
.content { width: 100%; max-width: 82rem; margin: 0 auto; padding: 1.5rem 1rem 4rem; display: flex; flex-direction: column; gap: 1.25rem; }
@media (min-width: 768px) { .content { padding: 2rem 1.75rem 4rem; } }

.mobile-nav > summary { list-style: none; }
.mobile-nav > summary::-webkit-details-marker { display: none; }
.mobile-panel { position: fixed; inset: 3.75rem 0 0 0; z-index: 30; overflow-y: auto; background: var(--surface); padding: 1rem; border-top: 1px solid var(--border); }

/* ---------- Page head, cards, stats ---------- */
.page-head { display: flex; flex-direction: column; gap: 1rem; }
@media (min-width: 640px) { .page-head { flex-direction: row; align-items: flex-end; justify-content: space-between; } }
.page-title { font-size: 1.55rem; font-weight: 700; letter-spacing: -0.02em; }
.page-sub { margin-top: 0.2rem; color: var(--muted); }
.page-actions { display: flex; flex-shrink: 0; gap: 0.5rem; }
.section-title { font-size: 1.15rem; font-weight: 700; }

.stats { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.85rem; }
@media (min-width: 1024px) { .stats { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.stat { display: grid; grid-template-columns: auto 1fr; grid-template-rows: auto auto; column-gap: 0.85rem; align-items: center; border: 1px solid var(--border); border-radius: 12px; background: var(--surface); padding: 1rem 1.1rem; color: var(--ink); text-decoration: none; transition: border-color 120ms; }
a.stat:hover { border-color: var(--border-strong); text-decoration: none; }
.stat-icon { grid-row: span 2; display: grid; place-items: center; width: 2.6rem; height: 2.6rem; border-radius: 10px; background: var(--surface-2); color: var(--muted); }
.stat-num { font-size: 1.6rem; font-weight: 700; line-height: 1.1; letter-spacing: -0.02em; }
.stat-label { font-size: 0.82rem; color: var(--muted); }
.stat-good .stat-icon { background: var(--success-soft); color: var(--success-strong); }
.stat-warn .stat-icon { background: var(--warning-soft); color: var(--warning-strong); }
.stat-bad .stat-icon { background: var(--danger-soft); color: var(--danger-strong); }

.dash-grid { display: grid; gap: 1.25rem; }
@media (min-width: 1024px) { .dash-grid { grid-template-columns: minmax(0, 1.7fr) minmax(0, 1fr); align-items: start; } }
.dash-side { display: flex; flex-direction: column; gap: 1.25rem; }

.checklist { display: flex; flex-direction: column; gap: 0.25rem; }
.checklist li { display: flex; align-items: center; gap: 0.85rem; border-radius: 10px; padding: 0.6rem 0.25rem; }
.checklist li.is-done { opacity: 0.6; }
.check-dot { display: grid; place-items: center; width: 1.5rem; height: 1.5rem; flex-shrink: 0; border: 2px solid var(--border-strong); border-radius: 999px; color: var(--accent-ink); }
.is-done .check-dot { border-color: var(--accent); background: var(--accent); }
.check-dot .icon { width: 0.85rem; height: 0.85rem; }

.attn, .chan-mini { display: flex; flex-direction: column; gap: 0.65rem; }
.attn li, .chan-mini li { display: flex; align-items: center; gap: 0.75rem; }
.attn-icon { display: grid; place-items: center; width: 1.75rem; height: 1.75rem; flex-shrink: 0; border-radius: 8px; }
.attn-warn { background: var(--warning-soft); color: var(--warning-strong); }

/* ---------- Post lines ---------- */
.post-list { display: flex; flex-direction: column; }
.post-line { display: flex; align-items: center; gap: 1rem; border-bottom: 1px solid var(--border); padding: 0.9rem 1.25rem; color: var(--ink); text-decoration: none; transition: background-color 120ms; }
.post-line:last-child { border-bottom: 0; }
.post-line:hover { background: var(--surface-2); text-decoration: none; }
.post-when { display: flex; width: 5.5rem; flex-shrink: 0; flex-direction: column; }
.post-day { font-size: 0.78rem; color: var(--muted); }
.post-time { font-weight: 700; font-size: 0.95rem; }
.post-text { overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; font-size: 0.93rem; }
.post-meta { display: flex; align-items: center; gap: 0.75rem; margin-top: 0.4rem; }
.post-chans { display: flex; align-items: center; gap: 0.4rem; }
.post-body { white-space: pre-wrap; overflow-wrap: anywhere; line-height: 1.6; }
.tab-count { margin-left: 0.25rem; border-radius: 999px; background: var(--surface-2); padding: 0 0.45rem; font-size: 0.72rem; color: var(--muted); }
.filters { display: flex; flex-direction: column; gap: 0.6rem; }
@media (min-width: 640px) { .filters { flex-direction: row; } }

.detail-grid { display: grid; gap: 1.25rem; }
@media (min-width: 1024px) { .detail-grid { grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); align-items: start; } }
.target-list li { display: flex; align-items: flex-start; gap: 0.85rem; border-bottom: 1px solid var(--border); padding: 0.9rem 1.25rem; }
.target-list li:last-child { border-bottom: 0; }
.target-error { display: flex; gap: 0.4rem; margin-top: 0.35rem; border-radius: 8px; background: var(--danger-soft); padding: 0.45rem 0.6rem; color: var(--danger-strong); font-size: 0.83rem; overflow-wrap: anywhere; }
.target-error .icon { flex-shrink: 0; margin-top: 2px; width: 0.95rem; height: 0.95rem; }

/* ---------- Composer ---------- */
.composer { display: grid; gap: 1.25rem; }
@media (min-width: 1100px) { .composer { grid-template-columns: minmax(0, 1fr) 22rem; align-items: start; } }
.compose-main { display: flex; min-width: 0; flex-direction: column; gap: 1.25rem; }
.compose-side { display: flex; flex-direction: column; gap: 1.25rem; }
@media (min-width: 1100px) { .compose-side { position: sticky; top: 5rem; } }
.chan-picker { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.chan-pick { position: relative; display: inline-flex; max-width: 15rem; cursor: pointer; align-items: center; gap: 0.55rem; border: 1.5px solid var(--border); border-radius: 999px; background: var(--surface); padding: 0.3rem 0.85rem 0.3rem 0.3rem; transition: border-color 120ms, background-color 120ms; }
.chan-pick:hover { border-color: var(--border-strong); }
.chan-pick input { position: absolute; opacity: 0; pointer-events: none; }
.chan-pick:has(input:checked) { border-color: var(--accent); background: var(--accent-soft); }
.chan-pick:has(input:focus-visible) { box-shadow: var(--ring); }
.chan-pick:not(:has(input:checked)) .ch-avatar { filter: grayscale(1); opacity: 0.55; }
.chan-pick.is-broken { border-style: dashed; }
.chan-pick-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 0.86rem; font-weight: 500; }
.compose-text { min-height: 11rem; font-size: 1rem; }
.counters { display: flex; flex-wrap: wrap; gap: 0.4rem; min-height: 1.6rem; }
.counter { display: inline-flex; align-items: center; gap: 0.35rem; border-radius: 999px; background: var(--surface-2); padding: 0.15rem 0.55rem 0.15rem 0.2rem; font-size: 0.75rem; color: var(--muted); font-variant-numeric: tabular-nums; }
.counter.is-over { background: var(--danger-soft); color: var(--danger-strong); font-weight: 700; }
.counter.is-warn { background: var(--warning-soft); color: var(--warning-strong); }

.tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(7rem, 1fr)); gap: 0.6rem; }
.tiles:empty { display: none; }
.tile { position: relative; aspect-ratio: 1; overflow: hidden; border-radius: 10px; background: var(--surface-2); border: 1px solid var(--border); }
.tile > img, .tile > video { width: 100%; height: 100%; object-fit: cover; }
.tile-x { position: absolute; top: 0.3rem; right: 0.3rem; display: grid; place-items: center; width: 1.6rem; height: 1.6rem; border-radius: 999px; background: rgba(0, 0, 0, 0.6); color: var(--x-net-ink); }
.tile-x .icon { width: 0.9rem; height: 0.9rem; }
.tile-tag { position: absolute; left: 0.3rem; bottom: 0.3rem; display: grid; place-items: center; width: 1.5rem; height: 1.5rem; border-radius: 6px; background: rgba(0, 0, 0, 0.6); color: var(--x-net-ink); }
.tile-tag .icon { width: 0.85rem; height: 0.85rem; }
.tile-error { display: flex; flex-direction: column; justify-content: center; gap: 0.3rem; aspect-ratio: auto; grid-column: 1 / -1; padding: 0.6rem 2.4rem 0.6rem 0.75rem; background: var(--danger-soft); color: var(--danger-strong); font-size: 0.83rem; }
.upload-btn { cursor: pointer; }
.lib-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(7.5rem, 1fr)); gap: 0.6rem; }
.lib-item { aspect-ratio: 1; overflow: hidden; border-radius: 10px; border: 2px solid transparent; background: var(--surface-2); }
.lib-item:hover { border-color: var(--accent); }
.lib-item img, .lib-item video { width: 100%; height: 100%; object-fit: cover; }

.custom-list { display: flex; flex-direction: column; gap: 0.5rem; }
.custom { border: 1px solid var(--border); border-radius: 10px; }
.custom-head { display: flex; cursor: pointer; align-items: center; gap: 0.6rem; padding: 0.55rem 0.75rem; list-style: none; font-size: 0.9rem; font-weight: 500; }
.custom-head::-webkit-details-marker { display: none; }
.custom[open] .custom-head .icon:last-child { transform: rotate(180deg); }
.custom-body { display: flex; flex-direction: column; gap: 0.5rem; padding: 0 0.75rem 0.75rem; }

.when-opts { display: flex; flex-direction: column; gap: 0.5rem; }
.when-opt { display: flex; cursor: pointer; align-items: flex-start; gap: 0.65rem; border: 1.5px solid var(--border); border-radius: 10px; padding: 0.7rem 0.8rem; }
.when-opt:has(input:checked) { border-color: var(--accent); background: var(--accent-soft); }
.when-opt input { margin-top: 0.2rem; accent-color: var(--accent); }
.when-opt span { display: flex; flex-direction: column; }
.when-opt b { font-size: 0.92rem; }
.when-opt small { font-size: 0.78rem; color: var(--muted); }
.when-date { padding-left: 0.2rem; }
.when-actions { display: flex; flex-direction: column; gap: 0.5rem; }

.previews { display: flex; flex-direction: column; gap: 0.85rem; }
.pv { border: 1px solid var(--border); border-radius: 12px; background: var(--surface); padding: 0.85rem; }
.pv-head { display: flex; align-items: center; gap: 0.55rem; margin-bottom: 0.55rem; }
.pv-name { font-weight: 700; font-size: 0.86rem; }
.pv-sub { font-size: 0.74rem; color: var(--muted); }
.pv-text { white-space: pre-wrap; overflow-wrap: anywhere; font-size: 0.88rem; line-height: 1.5; }
.pv-text mark { background: var(--danger-soft); color: var(--danger-strong); }
.pv-media { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 3px; margin-top: 0.6rem; overflow: hidden; border-radius: 10px; }
.pv-media.one { grid-template-columns: 1fr; }
.pv-media img, .pv-media video { width: 100%; aspect-ratio: 1; object-fit: cover; background: var(--surface-2); }
.pv-warn { margin-top: 0.5rem; border-radius: 8px; background: var(--warning-soft); padding: 0.35rem 0.55rem; color: var(--warning-strong); font-size: 0.78rem; }

/* ---------- Calendar ---------- */
.cal-card { overflow: hidden; }
.cal-title { border-bottom: 1px solid var(--border); padding: 0.9rem 1.25rem; font-weight: 700; font-size: 1.05rem; }
.cal-scroll { overflow-x: auto; }
.cal-grid { display: grid; min-width: 52rem; grid-template-columns: repeat(7, minmax(0, 1fr)); }
.cal-dow { border-bottom: 1px solid var(--border); background: var(--surface-2); padding: 0.5rem 0.75rem; font-size: 0.75rem; font-weight: 600; color: var(--muted); text-transform: uppercase; letter-spacing: 0.04em; }
.cal-cell { min-height: 8.5rem; border-right: 1px solid var(--border); border-bottom: 1px solid var(--border); padding: 0.4rem; transition: background-color 120ms; }
.cal-cell:nth-child(7n) { border-right: 0; }
.cal-cell.is-out { background: var(--canvas); }
.cal-cell.is-out .cal-num { color: var(--muted); opacity: 0.6; }
.cal-cell.is-past { background: var(--canvas); }
.cal-cell.is-drop { background: var(--accent-soft); box-shadow: inset 0 0 0 2px var(--accent); }
.cal-cell-head { display: flex; align-items: center; justify-content: space-between; padding: 0.1rem 0.25rem 0.35rem; }
.cal-num { font-size: 0.82rem; font-weight: 600; }
.is-today .cal-num { display: grid; place-items: center; width: 1.6rem; height: 1.6rem; border-radius: 999px; background: var(--accent); color: var(--accent-ink); }
.cal-add { display: grid; place-items: center; width: 1.4rem; height: 1.4rem; border-radius: 6px; color: var(--muted); opacity: 0; transition: opacity 120ms; }
.cal-cell:hover .cal-add { opacity: 1; }
.cal-add:hover { background: var(--surface-2); color: var(--ink); }
.cal-add .icon { width: 0.9rem; height: 0.9rem; }
@media (hover: none) { .cal-add { opacity: 1; } }
.cal-posts { display: flex; flex-direction: column; gap: 0.25rem; }
.cal-post { display: flex; align-items: center; gap: 0.3rem; overflow: hidden; border-radius: 6px; border-left: 3px solid var(--accent); background: var(--surface-2); padding: 0.22rem 0.35rem; color: var(--ink); font-size: 0.72rem; text-decoration: none; }
.cal-post:hover { text-decoration: none; background: var(--border); }
.cal-post[draggable="true"] { cursor: grab; }
.cal-post.cal-published { border-left-color: var(--success); }
.cal-post.cal-failed, .cal-post.cal-partial { border-left-color: var(--danger); }
.cal-post.cal-awaiting { border-left-color: var(--warning); }
.cal-time { flex-shrink: 0; font-weight: 700; }
.cal-nets { display: inline-flex; flex-shrink: 0; gap: 2px; }
.cal-text { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--muted); }
.cal-more { padding-left: 0.3rem; font-size: 0.72rem; color: var(--accent-text); }

/* ---------- Channels ---------- */
.chan-grid { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fill, minmax(16rem, 1fr)); }
.chan-card { display: flex; flex-direction: column; gap: 0.85rem; padding: 1.1rem; }
.chan-card > * + * { margin-top: 0; }
.chan-card.is-broken { border-color: var(--danger); }
.net-grid { margin-top: 1rem; display: grid; gap: 0.75rem; grid-template-columns: repeat(auto-fill, minmax(17rem, 1fr)); }
.net-card { display: flex; align-items: center; gap: 0.85rem; border: 1px solid var(--border); border-radius: 12px; background: var(--surface); padding: 0.85rem 1rem; }
.pick-list { display: flex; flex-direction: column; gap: 0.25rem; }
.pick-list li { border-bottom: 1px solid var(--border); padding: 0.35rem 0; }

/* ---------- Team & settings ---------- */
.team-grid, .settings-two { display: grid; gap: 1.25rem; }
@media (min-width: 1024px) { .team-grid { grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); align-items: start; } .settings-two { grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: start; } }
.member-list li { display: flex; align-items: center; gap: 0.85rem; border-bottom: 1px solid var(--border); padding: 0.85rem 1.25rem; }
.member-list li:last-child { border-bottom: 0; }
.roles { display: flex; flex-direction: column; gap: 0.75rem; }
.roles dt { font-weight: 600; font-size: 0.9rem; }
.roles dd { font-size: 0.85rem; color: var(--muted); }
.settings-body { display: flex; flex-direction: column; gap: 1.25rem; }
.settings-card { max-width: 42rem; }
.sched { display: flex; flex-direction: column; }
.sched-row { display: flex; flex-direction: column; gap: 0.4rem; border-bottom: 1px solid var(--border); padding: 0.7rem 0; }
@media (min-width: 640px) { .sched-row { flex-direction: row; align-items: center; } }
.sched-day { width: 8rem; flex-shrink: 0; font-weight: 600; font-size: 0.9rem; }
.sched-times { display: flex; flex-wrap: wrap; gap: 0.4rem; }
.sched-times .chip { cursor: default; gap: 0.2rem; padding-right: 0.25rem; }
.chip-x { display: grid; place-items: center; width: 1.4rem; height: 1.4rem; border-radius: 999px; color: var(--muted); }
.chip-x:hover { background: var(--surface-2); color: var(--danger-strong); }
.chip-x .icon { width: 0.8rem; height: 0.8rem; }
.sched-add { display: flex; flex-direction: column; gap: 0.6rem; margin-top: 1rem; }
@media (min-width: 640px) { .sched-add { flex-direction: row; } .sched-add .input { width: auto; } }
.mcp-steps { display: flex; flex-direction: column; gap: 1.1rem; }
.code-block { margin-top: 0.4rem; overflow-x: auto; border-radius: 10px; background: var(--x-hero); padding: 0.9rem 1rem; color: var(--x-net-ink); font-size: 0.8rem; line-height: 1.55; }
.border-t { border-top: 1px solid var(--border); }

/* ---------- Insights ---------- */
.ins-wrap { overflow-x: auto; }
.ins-chart { width: 100%; min-width: 30rem; height: auto; }
.ins-chart .bar { fill: var(--chart-1); }
.ins-chart .bar:hover { fill: var(--accent-hover); }
.ins-chart .grid { stroke: var(--border); stroke-width: 1; }
.ins-chart .ax { fill: var(--muted); font-size: 11px; }
.hbars { display: flex; flex-direction: column; gap: 0.75rem; }
.hbars li { display: grid; grid-template-columns: 8.5rem minmax(0, 1fr) auto; align-items: center; gap: 0.75rem; }
.hbar-label { display: flex; align-items: center; gap: 0.45rem; overflow: hidden; white-space: nowrap; font-size: 0.86rem; }
.hbar-track { display: flex; height: 0.65rem; overflow: hidden; border-radius: 999px; background: var(--surface-2); }
.hbar-fill { background: var(--chart-1); }
.hbar-fail { background: var(--danger); }
.hbar-num { font-size: 0.85rem; font-weight: 600; font-variant-numeric: tabular-nums; }
.rank { display: flex; flex-direction: column; gap: 0.6rem; counter-reset: r; }
.rank li { display: flex; align-items: center; gap: 0.6rem; font-size: 0.9rem; }

/* ---------- Auth ---------- */
.auth { display: grid; min-height: 100vh; }
@media (min-width: 1024px) { .auth { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); } }
.auth-left { display: flex; flex-direction: column; padding: 1.5rem; background: var(--surface); }
@media (min-width: 768px) { .auth-left { padding: 2rem 3rem; } }
.auth-top { display: flex; align-items: center; justify-content: space-between; }
.auth-form { width: 100%; max-width: 25rem; margin: auto; padding: 2.5rem 0; display: flex; flex-direction: column; gap: 1rem; }
.auth-fields { display: flex; flex-direction: column; gap: 1rem; }
.auth-fields .field + .field { margin-top: 0; }
.auth-title { font-size: 1.75rem; font-weight: 700; letter-spacing: -0.02em; }
.auth-sub { color: var(--muted); margin-top: -0.5rem; }
.auth-switch { text-align: center; font-size: 0.9rem; color: var(--muted); }
.auth-switch a { color: var(--accent-text); font-weight: 600; }
.auth-legal { font-size: 0.8rem; color: var(--muted); }
.or { display: flex; align-items: center; gap: 0.75rem; color: var(--muted); font-size: 0.8rem; }
.or::before, .or::after { content: ""; height: 1px; flex: 1; background: var(--border); }
.auth-right { display: none; background: var(--x-hero); color: var(--x-net-ink); padding: 3rem; }
@media (min-width: 1024px) { .auth-right { display: flex; align-items: center; } }
.auth-pitch { max-width: 30rem; margin: 0 auto; }
.auth-eyebrow { font-size: 0.78rem; font-weight: 700; letter-spacing: var(--eyebrow-tracking); text-transform: uppercase; opacity: 0.7; }
.auth-big { margin-top: 0.75rem; font-size: 2.6rem; font-weight: 800; line-height: 1.08; letter-spacing: -0.03em; }
.auth-points { margin-top: 1.75rem; display: flex; flex-direction: column; gap: 0.75rem; opacity: 0.9; }
.auth-points li { display: flex; gap: 0.6rem; }
.auth-points .icon { flex-shrink: 0; margin-top: 2px; }
.auth-stack { margin-top: 2rem; display: flex; flex-wrap: wrap; gap: 0.5rem; }

/* ---------- Landing ---------- */
.lp-wrap { width: 100%; max-width: 76rem; margin: 0 auto; padding: 0 1.25rem; }
.lp-bar { position: sticky; top: 0; z-index: 20; border-bottom: 1px solid var(--border); background: var(--surface); }
.lp-bar-in { display: flex; height: 4rem; align-items: center; justify-content: space-between; gap: 1rem; }
.lp-links { display: none; gap: 1.75rem; font-size: 0.92rem; font-weight: 500; }
.lp-links a { color: var(--muted); }
.lp-links a:hover { color: var(--ink); }
@media (min-width: 900px) { .lp-links { display: flex; } }
.lp-hero { background: var(--x-hero); color: var(--x-net-ink); padding: 4.5rem 0 5rem; }
.lp-hero-grid { display: grid; gap: 3rem; align-items: center; }
@media (min-width: 1024px) { .lp-hero-grid { grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); } }
.lp-kicker { display: inline-flex; align-items: center; gap: 0.5rem; border: 1px solid rgba(255, 255, 255, 0.2); border-radius: 999px; padding: 0.35rem 0.8rem; font-size: 0.82rem; font-weight: 600; }
.lp-h1 { margin-top: 1.25rem; font-size: clamp(2.5rem, 6vw, 4.4rem); font-weight: 800; line-height: 1.02; letter-spacing: -0.035em; text-wrap: balance; }
.lp-lead { margin: 1.25rem 0 2rem; max-width: 36rem; font-size: 1.12rem; line-height: 1.6; opacity: 0.85; }
.lp-cta { font-weight: 800; letter-spacing: 0.02em; }
.lp-cta-2 { background: transparent; color: var(--x-net-ink); border-color: rgba(255, 255, 255, 0.35); }
.lp-cta-2:hover { background: rgba(255, 255, 255, 0.08); border-color: rgba(255, 255, 255, 0.6); color: var(--x-net-ink); }
.lp-nets { margin-top: 2.25rem; display: flex; flex-wrap: wrap; gap: 0.45rem; }
.lp-demo { position: relative; display: flex; flex-direction: column; gap: 1rem; }
.demo-card { border-radius: 16px; background: var(--surface); color: var(--ink); padding: 1.25rem; box-shadow: 0 30px 60px rgba(0, 0, 0, 0.35); display: flex; flex-direction: column; gap: 0.9rem; }
.demo-head { display: flex; align-items: center; justify-content: space-between; gap: 0.75rem; }
.demo-title { font-weight: 700; }
.demo-chips { display: flex; gap: 0.4rem; }
.demo-chip { display: inline-flex; border-radius: 999px; border: 1.5px solid var(--accent); background: var(--accent-soft); padding: 0.25rem; }
.demo-text { border: 1px solid var(--border); border-radius: 10px; padding: 0.85rem; font-size: 0.92rem; line-height: 1.55; }
.demo-media { display: flex; gap: 0.5rem; }
.demo-media span { display: grid; place-items: center; width: 4rem; height: 4rem; border-radius: 10px; background: var(--surface-2); color: var(--muted); }
.demo-media .demo-add { border: 1.5px dashed var(--border-strong); background: transparent; }
.demo-counts { display: flex; flex-wrap: wrap; gap: 0.35rem; }
.demo-counts span { border-radius: 999px; background: var(--surface-2); padding: 0.15rem 0.55rem; font-size: 0.72rem; color: var(--muted); }
.demo-actions { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0.5rem; }
.demo-btn, .demo-btn-ghost { border-radius: 8px; padding: 0.55rem; text-align: center; font-size: 0.82rem; font-weight: 600; }
.demo-btn { background: var(--accent); color: var(--accent-ink); }
.demo-btn-ghost { border: 1px solid var(--border-strong); }
.demo-ai { align-self: flex-end; max-width: 22rem; border-radius: 14px; border: 1px solid rgba(255, 255, 255, 0.18); background: rgba(255, 255, 255, 0.06); padding: 0.9rem 1rem; font-size: 0.9rem; display: flex; flex-direction: column; gap: 0.45rem; }
.demo-ai-who, .demo-ai-done { display: flex; align-items: center; gap: 0.45rem; font-size: 0.78rem; font-weight: 700; opacity: 0.85; }
.demo-ai-done { opacity: 1; }
.lp-section { padding: 5.5rem 0; }
.lp-band { background: var(--surface-2); }
.lp-dark { background: var(--x-hero); color: var(--x-net-ink); }
.lp-h2 { font-size: clamp(2rem, 4vw, 3rem); font-weight: 800; line-height: 1.08; letter-spacing: -0.03em; text-wrap: balance; max-width: 48rem; }
.lp-p { margin-top: 1rem; max-width: 40rem; font-size: 1.08rem; line-height: 1.6; color: var(--muted); }
.lp-p-dark { color: var(--x-net-ink); opacity: 0.82; }
.lp-kicker-dark { margin-bottom: 1rem; }
.lp-net-grid { margin-top: 2.5rem; display: grid; gap: 0.75rem; grid-template-columns: repeat(auto-fill, minmax(15rem, 1fr)); }
.lp-net { display: flex; align-items: center; gap: 0.85rem; border: 1px solid var(--border); border-radius: 12px; background: var(--surface); padding: 0.85rem 1rem; }
.lp-split { display: grid; gap: 3rem; }
@media (min-width: 1024px) { .lp-split { grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); align-items: start; } }
.lp-feats { display: flex; flex-direction: column; gap: 1.25rem; }
.lp-feats li { display: flex; gap: 0.9rem; line-height: 1.55; }
.lp-feats li > .icon { flex-shrink: 0; width: 2.3rem; height: 2.3rem; padding: 0.55rem; border-radius: 10px; background: var(--accent-soft); color: var(--accent-strong); }
.lp-code { border-radius: 16px; border: 1px solid rgba(255, 255, 255, 0.15); background: rgba(255, 255, 255, 0.04); padding: 1.5rem; }
.lp-code-head { font-weight: 700; margin-bottom: 0.9rem; }
.lp-code ul { display: flex; flex-direction: column; gap: 0.7rem; }
.lp-code li { opacity: 0.88; }
.lp-code code { margin-right: 0.4rem; border-radius: 6px; background: rgba(255, 255, 255, 0.1); padding: 0.1rem 0.4rem; color: var(--x-net-ink); }
.lp-price { margin: 2.75rem auto 0; display: grid; max-width: 52rem; gap: 1.25rem; }
@media (min-width: 900px) { .lp-price { grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr); align-items: center; } }
.lp-price-main { border: 2px solid var(--accent); border-radius: 18px; background: var(--surface); padding: 2rem; }
.lp-price-tag { font-weight: 700; color: var(--accent-text); }
.lp-price-big { margin-top: 0.25rem; font-size: 3.2rem; font-weight: 800; letter-spacing: -0.04em; }
.lp-price-list { margin: 1.25rem 0 1.75rem; display: flex; flex-direction: column; gap: 0.6rem; }
.lp-price-list li { display: flex; gap: 0.55rem; }
.lp-price-list .icon { color: var(--accent-text); flex-shrink: 0; margin-top: 2px; }
.lp-price-side { display: flex; flex-direction: column; gap: 0.5rem; border-radius: 14px; background: var(--surface-2); padding: 1.5rem; }
.lp-close { background: var(--accent-soft); }
.lp-h1-close { color: var(--accent-strong); margin-top: 0; }
.lp-foot { border-top: 1px solid var(--border); padding: 1.75rem 0; font-size: 0.88rem; color: var(--muted); }
