/* App UI. Same tokens as the marketing site: one lime accent, dark by default, light via system preference. */
@font-face { font-family: "Geist"; src: url("/fonts/Geist-Variable.woff2") format("woff2"); font-weight: 100 900; font-display: swap; }
@font-face { font-family: "Geist Mono"; src: url("/fonts/GeistMono-Variable.woff2") format("woff2"); font-weight: 100 900; font-display: swap; }

:root {
  color-scheme: dark;
  --bg: #0a0c0d; --bg-2: #0f1213; --surface: #131719; --surface-2: #181d1f;
  --line: rgb(255 255 255 / 0.09); --line-strong: rgb(255 255 255 / 0.2);
  --text: #e8ede8; --muted: #9aa69e;
  --accent: #b9f23c; --accent-ink: #0a0c0d; --accent-text: #b9f23c; --accent-soft: rgb(185 242 60 / 0.1);
  --danger: #ff8a7f; --danger-line: rgb(255 138 127 / 0.5);
  --r-card: 16px; --r-input: 10px; --r-pill: 999px;
  --font: "Geist", ui-sans-serif, system-ui, sans-serif; --mono: "Geist Mono", ui-monospace, monospace;
}
@media (prefers-color-scheme: light) {
  :root {
    color-scheme: light;
    --bg: #f1f3ef; --bg-2: #e9ece6; --surface: #fafbf8; --surface-2: #f4f6f1;
    --line: rgb(10 14 12 / 0.1); --line-strong: rgb(10 14 12 / 0.24);
    --text: #0f1311; --muted: #4a574f; --accent-text: #2f4f06; --accent-soft: rgb(120 170 10 / 0.14);
    --danger: #b3261e; --danger-line: rgb(179 38 30 / 0.5);
  }
}

/* ------------------------------- base ------------------------------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--text); font: 0.94rem/1.5 var(--font); -webkit-font-smoothing: antialiased; }
a { color: inherit; }
h1, h2, h3 { margin: 0; letter-spacing: -0.02em; line-height: 1.2; font-weight: 600; }
h1 { font-size: 1.7rem; letter-spacing: -0.03em; }
h2 { font-size: 1.05rem; }
h3 { font-size: 0.96rem; }
p { margin: 0; }
ul, ol { margin: 0; padding: 0; list-style: none; }
code { font: 0.86em var(--mono); }
:focus-visible { outline: 2px solid var(--accent-text); outline-offset: 2px; border-radius: 6px; }
[hidden] { display: none !important; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.skip { position: absolute; left: 12px; top: -48px; z-index: 60; padding: 8px 14px; border-radius: var(--r-pill); background: var(--accent); color: var(--accent-ink); }
.skip:focus { top: 10px; }

/* Icons are files: the mask takes the shape, currentColor the colour. */
.i { display: inline-block; flex: none; width: 20px; height: 20px; background: currentColor; -webkit-mask: var(--icon) center / contain no-repeat; mask: var(--icon) center / contain no-repeat; }
.i--home { --icon: url("/brand/icons/inicio.svg"); }
.i--calendar { --icon: url("/brand/icons/calendario.svg"); }
.i--accounts { --icon: url("/brand/icons/cuentas.svg"); }
.i--metrics { --icon: url("/brand/icons/metricas.svg"); }
.i--api { --icon: url("/brand/icons/api.svg"); }
.i--settings { --icon: url("/brand/icons/ajustes.svg"); }
.i--mcp { --icon: url("/icons/plugs-connected.svg"); }
.i--shield { --icon: url("/icons/shield-check.svg"); }
.i--legal { --icon: url("/icons/file-text.svg"); }
.i--menu { --icon: url("/icons/list.svg"); }
.i--close { --icon: url("/icons/x.svg"); }
.i--plus { --icon: url("/icons/plus.svg"); width: 16px; height: 16px; }
.i--left { --icon: url("/icons/caret-left.svg"); width: 16px; height: 16px; }
.i--right { --icon: url("/icons/caret-right.svg"); width: 16px; height: 16px; }
.i--copy { --icon: url("/icons/copy.svg"); width: 15px; height: 15px; }
.i--upload { --icon: url("/icons/arrow-up.svg"); width: 20px; height: 20px; }
.i--down { --icon: url("/icons/caret-down.svg"); width: 12px; height: 12px; }
.i--signout { --icon: url("/icons/sign-out.svg"); width: 18px; height: 18px; }
.i--search { --icon: url("/icons/magnifying-glass.svg"); width: 16px; height: 16px; }
.i--inbox { --icon: url("/icons/chats-circle.svg"); }
.i--send { --icon: url("/icons/paper-plane-tilt.svg"); width: 16px; height: 16px; }
.i--whatsapp { --icon: url("/icons/whatsapp-logo.svg"); }
.i--automation { --icon: url("/icons/lightning.svg"); }
.i--help { --icon: url("/icons/question.svg"); }

/* Network marks stay in their official colours. A fixed white plate keeps them visible in both themes. */
.net { display: inline-grid; place-items: center; flex: none; width: 22px; height: 22px; border-radius: 6px; background: #fff; box-shadow: inset 0 0 0 1px rgb(10 14 12 / 0.1); }
.net img { display: block; width: 14px; height: 14px; }
.net--lg { width: 44px; height: 44px; border-radius: var(--r-input); }
.net--lg img { width: 26px; height: 26px; }
.inline-net { display: inline-flex; align-items: center; gap: 8px; }
/* The same marks as app icons: Instagram, Facebook, YouTube and Telegram already are one; the rest sit on their tile. */
.appicon { display: inline-grid; place-items: center; flex: none; width: 40px; height: 40px; }
.appicon img { display: block; width: 100%; height: 100%; }
.appicon--tiktok, .appicon--x { border-radius: 10px; background: #000; box-shadow: inset 0 0 0 1px rgb(255 255 255 / 0.14); }
.appicon--tiktok img, .appicon--x img { width: 56%; height: 56%; }
.appicon--x img { filter: invert(1); }
.appicon--bluesky { border-radius: 10px; background: #1185fe; }
.appicon--bluesky img { width: 62%; height: 62%; filter: brightness(0) invert(1); }
.appicon--linkedin img { border-radius: 10px; }
.appicon--xs { width: 20px; height: 20px; }
.appicon--xs:is(.appicon--tiktok, .appicon--x, .appicon--bluesky, .appicon--linkedin), .appicon--xs.appicon--linkedin img { border-radius: 5px; }
.appicon--badge { width: 16px; height: 16px; }
.appicon--badge:is(.appicon--tiktok, .appicon--x, .appicon--bluesky), .appicon--badge.appicon--linkedin img { border-radius: 4px; }
.appicon--md { width: 34px; height: 34px; }
.appicon--md:is(.appicon--tiktok, .appicon--x, .appicon--bluesky), .appicon--md.appicon--linkedin img { border-radius: 9px; }
.appicon--chip { width: 18px; height: 18px; }
.appicon--chip:is(.appicon--tiktok, .appicon--x, .appicon--bluesky), .appicon--chip.appicon--linkedin img { border-radius: 4px; }

/* ------------------------------- shell ------------------------------- */
/* The gradient paints the sidebar column for the whole page height, past the sticky sidebar itself. */
.shell { display: grid; grid-template-columns: 240px minmax(0, 1fr); min-height: 100vh; background: linear-gradient(to right, var(--bg-2) 239px, var(--line) 239px, var(--line) 240px, transparent 240px); }
.side { position: sticky; top: 0; height: 100vh; overflow-y: auto; display: flex; flex-direction: column; gap: 16px; padding: 16px 12px; }
.side__top { display: flex; align-items: center; justify-content: space-between; padding: 0 4px; }
.side__logo img { display: block; height: 40px; width: auto; margin-left: -6px; }
.side .side__close { display: none; }
.side__new { width: 100%; }
.side__foot { margin-top: auto; display: grid; gap: 10px; }
.nav { display: grid; gap: 2px; }
.nav a, .nav summary { display: flex; align-items: center; gap: 10px; height: 38px; padding: 0 12px; border-radius: var(--r-pill); color: var(--muted); text-decoration: none; font-weight: 500; }
.nav a:hover, .nav summary:hover { color: var(--text); background: var(--surface); }
.nav summary { cursor: pointer; list-style: none; }
.nav summary::-webkit-details-marker { display: none; }
.nav summary .i--down { margin-left: auto; transition: transform .15s; }
.nav details[open] .i--down { transform: rotate(180deg); }
.nav__sub { display: grid; gap: 2px; padding: 2px 0 2px 30px; }
.nav__sub a { height: 30px; font-size: 0.84rem; font-weight: 400; }
.nav a[aria-current="page"] { color: var(--text); background: var(--accent-soft); }
.nav a[aria-current="page"] .i { color: var(--accent-text); }
.nav__btn { display: flex; align-items: center; gap: 10px; width: 100%; height: 38px; padding: 0 12px; border: 0; border-radius: var(--r-pill); background: none; color: var(--muted); font: 500 0.94rem var(--font); text-align: left; cursor: pointer; }
.nav__btn:hover { color: var(--text); background: var(--surface); }
.nav__count { margin-left: auto; font: 500 0.74rem var(--mono); color: var(--accent-text); }
.nav__label { margin: 14px 12px 4px; font-size: 0.78rem; color: var(--muted); }
.who { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 10px 4px 0 12px; border-top: 1px solid var(--line); }
.who__mail { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 0.82rem; color: var(--muted); }
.iconbtn { display: inline-grid; place-items: center; flex: none; width: 36px; height: 36px; border: 0; border-radius: 50%; background: transparent; color: var(--muted); cursor: pointer; text-decoration: none; }
.iconbtn:hover { color: var(--text); background: var(--surface-2); }
.iconbtn--sm { width: 28px; height: 28px; }
.iconbtn--sm .i { width: 14px; height: 14px; }
.topbar { display: none; }
.scrim { position: fixed; inset: 0; z-index: 30; background: rgb(0 0 0 / 0.5); }
.stage { min-width: 0; display: flex; flex-direction: column; min-height: 100vh; }
.page { --gutter: 40px; flex: 1; width: 100%; max-width: 1280px; margin: 0 auto; padding: 32px var(--gutter) 56px; }
.page:focus { outline: none; }
.legal { display: flex; flex-wrap: wrap; gap: 6px 18px; padding: 18px 40px; border-top: 1px solid var(--line); font-size: 0.8rem; color: var(--muted); }
.legal a { color: var(--muted); }

/* ----------------------------- page parts ----------------------------- */
.head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; margin-bottom: 24px; }
.lead { margin-top: 4px; color: var(--muted); max-width: 68ch; }
.block { margin-top: 36px; }
.block > h2 { margin-bottom: 12px; }
.block__head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.link { color: var(--accent-text); text-underline-offset: 3px; font-size: 0.88rem; }
.help { font-size: 0.84rem; color: var(--muted); }
.err { font-size: 0.85rem; color: var(--danger); }
.mono { font-family: var(--mono); }
.nowrap { white-space: nowrap; }
.row { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.mt { margin-top: 16px; }
.split { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 32px; align-items: start; }
.split__main { display: grid; gap: 16px; min-width: 0; }
.split__side { min-width: 0; }
.panel { display: grid; gap: 14px; padding: 20px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-card); }
.panel + .panel { margin-top: 0; }
.scroll { position: relative; overflow-x: auto; } /* relative, or absolute children like .sr escape the clip and widen the page */
.plain { display: grid; gap: 8px; max-width: 76ch; list-style: disc; padding-left: 18px; }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; height: 40px; padding: 0 18px; border-radius: var(--r-pill); border: 1px solid var(--line-strong); background: transparent; color: var(--text); font: 550 0.9rem var(--font); cursor: pointer; text-decoration: none; white-space: nowrap; transition: border-color .15s, opacity .15s; }
.btn:hover { border-color: var(--text); }
.btn--primary { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.btn--primary:hover { border-color: var(--accent); opacity: 0.88; }
.btn--sm { height: 32px; padding: 0 12px; font-size: 0.82rem; }
.btn--danger { color: var(--danger); border-color: var(--danger-line); }
.btn--danger:hover { border-color: var(--danger); }
.btn--quiet { border-color: transparent; color: var(--muted); padding: 0 10px; }
.btn--quiet:hover { border-color: transparent; color: var(--text); background: var(--surface-2); }
.btn[disabled], .btn[aria-disabled="true"] { opacity: 0.45; cursor: not-allowed; }

.alert, .notice { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; padding: 10px 14px; margin-bottom: 14px; border-radius: var(--r-input); border: 1px solid var(--line-strong); background: var(--surface); }
.alert--ok { border-color: var(--accent-text); background: var(--accent-soft); }
.alert--err { border-color: var(--danger-line); color: var(--danger); }
.alert ul { margin: 0; padding-left: 18px; list-style: disc; }
.notice { background: var(--accent-soft); border-color: var(--accent-soft); font-size: 0.9rem; }

.status { display: inline-flex; align-items: center; gap: 6px; flex: none; font-size: 0.78rem; font-weight: 550; padding: 2px 9px; border-radius: var(--r-pill); border: 1px solid var(--line-strong); color: var(--muted); white-space: nowrap; }
.status::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.status--scheduled { color: var(--accent-text); background: var(--accent-soft); border-color: transparent; }
.status--sending { color: var(--text); }
.status--ok { color: var(--accent-text); border-color: var(--accent-text); }
.status--bad { color: var(--danger); border-color: var(--danger-line); }
.health { font-size: 0.8rem; color: var(--muted); }
.health--ok { color: var(--accent-text); }
.health--expiring { color: var(--text); }
.health--reconnect { color: var(--danger); }

.avatar { width: 44px; height: 44px; border-radius: 50%; background: var(--surface-2); object-fit: cover; flex: none; }
.avatar--sm { width: 32px; height: 32px; }
.avatar--letter { position: relative; display: inline-grid; place-items: center; font-size: 0.82rem; font-weight: 600; color: var(--muted); }
/* An account's picture covers its initials; the network badge, after it, stays on top. See partials/account-avatar. */
.avatar__img { position: absolute; inset: 0; display: block; width: 100%; height: 100%; border-radius: 50%; object-fit: cover; }

.empty { display: grid; justify-items: start; gap: 6px; padding: 20px; border: 1px dashed var(--line-strong); border-radius: var(--r-card); }
.empty p { color: var(--muted); max-width: 52ch; }
.empty .btn { margin-top: 8px; }

/* ------------------------------ overview ------------------------------ */
.week { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 6px; }
.week__day { display: grid; gap: 1px; padding: 8px 10px; border-radius: var(--r-input); border: 1px solid var(--line); text-decoration: none; color: var(--muted); font-size: 0.78rem; }
.week__day strong { font: 600 1.15rem var(--font); letter-spacing: -0.02em; color: var(--text); }
.week__day small { font-size: 0.74rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.week__day:hover { border-color: var(--line-strong); }
.week__day.has-posts { background: var(--accent-soft); border-color: transparent; }
.week__day.has-posts small { color: var(--accent-text); }
.week__day.is-today { border-color: var(--accent-text); }

.timeline { display: grid; }
.timeline__row { display: grid; grid-template-columns: 124px 22px minmax(0, 1fr) auto; gap: 12px; align-items: center; padding: 10px 0; border-bottom: 1px solid var(--line); }
.timeline__time { font-size: 0.82rem; color: var(--muted); white-space: nowrap; }
.timeline__time strong { font: 500 0.88rem var(--mono); color: var(--text); margin-right: 4px; }
.timeline__body { display: grid; min-width: 0; text-decoration: none; }
.timeline__body strong { font-weight: 550; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.timeline__body:hover strong { text-decoration: underline; text-underline-offset: 3px; }

.results { display: grid; }
.results a { display: flex; align-items: center; gap: 10px; padding: 9px 0; border-bottom: 1px solid var(--line); text-decoration: none; }
.results__body { display: grid; min-width: 0; flex: 1; }
.results__body strong { font-weight: 550; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.results a:hover strong { text-decoration: underline; text-underline-offset: 3px; }

.todo { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 10px; }
.todo a { display: grid; gap: 2px; height: 100%; padding: 12px 14px; border: 1px solid var(--line); border-radius: var(--r-input); text-decoration: none; }
.todo a:hover { border-color: var(--line-strong); }
.todo strong { font-weight: 550; }

/* ------------------------------- accounts ------------------------------- */
.acc-head { align-items: center; margin-bottom: 32px; }
.acc-connect { position: relative; flex: none; }
.acc-connect > summary { list-style: none; }
.acc-connect > summary::-webkit-details-marker { display: none; }
.acc-connect__button { height: 46px; padding: 0 22px; font-size: 0.98rem; }
.acc-connect__panel { position: absolute; top: calc(100% + 10px); right: 0; z-index: 25; width: min(372px, calc(100vw - 32px)); padding: 14px 10px 12px; background: var(--surface); border: 1px solid var(--line-strong); border-radius: var(--r-card); box-shadow: 0 24px 60px rgb(0 0 0 / 0.45); }

.netpick__label { padding: 0 8px 8px; font-size: 0.82rem; color: var(--muted); }
.netpick__list { display: grid; gap: 2px; }
.netpick__item { display: flex; align-items: center; gap: 12px; padding: 8px; border-radius: 12px; text-decoration: none; }
.netpick__item:hover, .netpick__item:focus-visible { background: var(--surface-2); }
.netpick__text { display: grid; flex: 1; min-width: 0; }
.netpick__text strong { font-weight: 600; }
.netpick__text span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 0.82rem; color: var(--muted); }
.netpick__count { flex: none; font-size: 0.8rem; color: var(--muted); }
.netpick__soon { margin-top: 8px; padding-top: 12px; border-top: 1px solid var(--line); }
.netpick__note { margin: 0 8px 10px; padding: 10px 12px; border-radius: var(--r-input); background: var(--surface-2); font-size: 0.84rem; color: var(--muted); }
.netpick__note a { color: var(--text); }
.netpick__chips { display: flex; flex-wrap: wrap; gap: 6px; padding: 0 8px; }
.netpick__chips li { display: inline-flex; align-items: center; gap: 7px; height: 30px; padding: 0 10px 0 6px; border: 1px solid var(--line); border-radius: var(--r-pill); font-size: 0.84rem; color: var(--muted); }
.netpick__chips .appicon { opacity: 0.55; filter: grayscale(0.4); }

.acc-empty { display: grid; gap: 6px; max-width: 460px; padding: 20px 14px 14px; border: 1px solid var(--line); border-radius: var(--r-card); background: var(--surface); }
.acc-empty > h2, .acc-empty > .help { padding: 0 8px; }
.acc-empty .netpick { margin-top: 10px; }

.acc-bar { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 14px; }
.acc-bar h2 { font-size: 1.2rem; }
.acc-bar__count { margin-left: 6px; font-size: 0.9rem; font-weight: 400; letter-spacing: 0; color: var(--muted); }
.acc-search { position: relative; display: flex; align-items: center; width: min(280px, 100%); }
.acc-search .i { position: absolute; left: 12px; color: var(--muted); pointer-events: none; }
.acc-search input { width: 100%; height: 38px; padding: 0 12px 0 36px; background: var(--surface); color: var(--text); border: 1px solid var(--line); border-radius: var(--r-pill); font: inherit; font-size: 0.9rem; }
.acc-search input::placeholder { color: var(--muted); }
.acc-search input:focus { outline: none; border-color: var(--accent-text); box-shadow: 0 0 0 3px var(--accent-soft); }

.acc-list { border: 1px solid var(--line); border-radius: var(--r-card); background: color-mix(in srgb, var(--surface) 60%, transparent); }
.acc { display: flex; align-items: center; gap: 16px; padding: 16px 18px; }
.acc:not([hidden]) ~ .acc:not([hidden]) { border-top: 1px solid var(--line); }
.acc__avatar { position: relative; display: grid; place-items: center; flex: none; width: 44px; height: 44px; border-radius: 50%; background: color-mix(in srgb, var(--text) 8%, transparent); color: var(--muted); font-size: 0.82rem; font-weight: 600; }
.acc__avatar .appicon { position: absolute; right: -3px; bottom: -3px; width: 20px; height: 20px; border-radius: 6px; box-shadow: 0 0 0 2px var(--bg); }
.acc__avatar :is(.appicon--facebook, .appicon--telegram) { border-radius: 50%; }
.acc__body { flex: 1; min-width: 0; }
.acc__name { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.acc__name strong { font-size: 1.05rem; font-weight: 600; overflow-wrap: anywhere; }
.acc__state { display: inline-flex; align-items: center; gap: 6px; font-size: 0.84rem; color: var(--muted); }
.acc__state::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.acc__state--ok { color: var(--accent-text); }
.acc__state--bad { color: var(--danger); }
.acc__meta { margin-top: 2px; font-size: 0.86rem; color: var(--muted); }
.acc__actions { display: flex; align-items: center; gap: 6px; flex: none; }
.acc__actions > .btn { height: 38px; padding: 0 16px; font-size: 0.88rem; }
.acc-menu { position: relative; }
.acc-menu > summary { list-style: none; height: 38px; gap: 6px; }
.acc-menu > summary::-webkit-details-marker { display: none; }
.acc-menu[open] > summary { color: var(--text); background: var(--surface-2); }
.acc-menu__list { position: absolute; top: calc(100% + 6px); right: 0; z-index: 20; display: grid; gap: 2px; width: 220px; padding: 6px; background: var(--surface); border: 1px solid var(--line-strong); border-radius: var(--r-input); box-shadow: 0 18px 40px rgb(0 0 0 / 0.4); }
.acc-menu__list a, .acc-menu__list button { display: block; width: 100%; padding: 8px 10px; border: 0; border-radius: 8px; background: none; color: var(--text); font: inherit; font-size: 0.88rem; text-align: left; text-decoration: none; cursor: pointer; }
.acc-menu__list a:hover, .acc-menu__list button:hover { background: var(--surface-2); }
.acc-menu__list form { margin-top: 2px; padding-top: 2px; border-top: 1px solid var(--line); }
.acc-menu__list button { color: var(--danger); }
.acc-none { padding: 16px 4px; }

/* ------------------------------ account picker ------------------------------ */
.picker { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 10px; }
.picker__item { display: flex; align-items: center; gap: 12px; padding: 14px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-card); text-decoration: none; }
.picker__item:hover { border-color: var(--accent-text); }
.picker__item > span:not(.net):not(.health) { display: grid; min-width: 0; }
.picker__item strong { font-weight: 550; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ----------------------------- tables, misc ----------------------------- */
.table { width: 100%; border-collapse: collapse; font-size: 0.9rem; }
.table th { text-align: left; font-size: 0.8rem; font-weight: 500; color: var(--muted); padding: 0 14px 8px 0; white-space: nowrap; }
.table td { padding: 10px 14px 10px 0; border-top: 1px solid var(--line); vertical-align: middle; }
.table .num { text-align: right; font-variant-numeric: tabular-nums; }
.table .right { text-align: right; }
.scopes { display: flex; gap: 4px; flex-wrap: wrap; }
.scopes code { font-size: 0.74rem; padding: 1px 7px; border-radius: var(--r-pill); border: 1px solid var(--line); color: var(--muted); white-space: nowrap; }
.pager { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 16px; }

.seg { display: inline-flex; gap: 2px; padding: 3px; border: 1px solid var(--line); border-radius: var(--r-pill); background: var(--surface); max-width: 100%; overflow-x: auto; }
.seg a, .seg button, .seg label span { display: inline-flex; align-items: center; height: 30px; padding: 0 12px; border: 0; border-radius: var(--r-pill); background: transparent; color: var(--muted); font: 500 0.84rem var(--font); text-decoration: none; cursor: pointer; white-space: nowrap; }
.seg a:hover, .seg button:hover, .seg label span:hover { color: var(--text); }
.seg a[aria-current="true"], .seg button[aria-selected="true"], .seg input:checked + span { background: var(--accent-soft); color: var(--text); }
.seg--radio { position: relative; display: flex; width: 100%; }
.seg--radio label { flex: 1; }
.seg--radio label span { width: 100%; justify-content: center; }
.seg--radio input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.seg--radio input:focus-visible + span { outline: 2px solid var(--accent-text); outline-offset: 1px; }
.seg--solid { display: inline-flex; flex: none; width: auto; }
.seg--solid label span { height: 34px; padding: 0 18px; }
.seg--solid input:checked + span { background: var(--text); color: var(--bg); }
.pill { display: inline-flex; align-items: center; height: 30px; padding: 0 12px; border: 1px solid var(--line); border-radius: var(--r-pill); color: var(--muted); font-size: 0.84rem; text-decoration: none; white-space: nowrap; }
.pill:hover { color: var(--text); border-color: var(--line-strong); }
.pill[aria-current="true"] { color: var(--text); background: var(--accent-soft); border-color: transparent; }
.filters { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 14px; }

/* ------------------------------- calendar ------------------------------- */
.toolbar { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 14px; }
.toolbar__nav { display: flex; align-items: center; gap: 4px; }
.toolbar__title { font-size: 1.02rem; margin: 0 10px 0 6px; white-space: nowrap; }
.seg--right { margin-left: auto; }
.calgrid { display: grid; grid-template-columns: minmax(0, 1fr) 280px; gap: 24px; align-items: start; }
.calgrid__main { min-width: 0; }

.month { border: 1px solid var(--line); border-radius: var(--r-card); overflow: hidden; background: var(--surface); }
.month__names { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); border-bottom: 1px solid var(--line); }
.month__names span { padding: 6px 10px; font-size: 0.78rem; color: var(--muted); }
.month__grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); }
.day { position: relative; min-height: 118px; padding: 6px; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); min-width: 0; }
.day:nth-child(7n) { border-right: 0; }
.day--out { background: var(--bg-2); }
.day--out .day__num { color: var(--muted); opacity: 0.6; }
.day--past .day__num { color: var(--muted); }
.day.is-target { background: var(--accent-soft); box-shadow: inset 0 0 0 1px var(--accent-text); }
.day__head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 4px; }
.day__num { display: inline-grid; place-items: center; min-width: 24px; height: 24px; padding: 0 4px; border-radius: var(--r-pill); font-size: 0.82rem; font-weight: 550; text-decoration: none; }
.day__num:hover { background: var(--surface-2); }
.day--today .day__num { background: var(--accent); color: var(--accent-ink); }
.day__add { display: inline-grid; place-items: center; width: 24px; height: 24px; border-radius: 50%; color: var(--muted); opacity: 0; }
.day:hover .day__add, .wday:hover .day__add, .day__add:focus-visible { opacity: 1; }
.day__add:hover { color: var(--text); background: var(--surface-2); }
.day__posts { display: grid; gap: 3px; }
.day__more { font-size: 0.76rem; color: var(--muted); padding-left: 4px; }
.day__dots { display: none; gap: 3px; justify-content: center; }
.dot { width: 6px; height: 6px; border-radius: 50%; background: var(--muted); }
.dot--scheduled, .dot--ok { background: var(--accent-text); }
.dot--bad { background: var(--danger); }

.chip { display: flex; align-items: center; gap: 5px; min-width: 0; height: 26px; padding: 0 6px 0 3px; border-radius: 7px; border: 1px solid transparent; text-decoration: none; font-size: 0.78rem; background: var(--surface-2); }
.chip .net { width: 18px; height: 18px; border-radius: 5px; }
.chip .net img { width: 12px; height: 12px; }
.chip__time { flex: none; font: 500 0.74rem var(--mono); }
.chip__text { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--muted); }
.chip:hover { border-color: var(--line-strong); }
.chip--scheduled { background: var(--accent-soft); }
.chip--scheduled[draggable="true"] { cursor: grab; }
.chip--bad { background: transparent; border-color: var(--danger-line); }
.chip--bad .chip__time, .chip--bad .chip__text { color: var(--danger); }
.chip--muted { background: transparent; opacity: 0.6; }
.chip--muted .chip__text { text-decoration: line-through; }
.chip.is-dragging { opacity: 0.4; }

.agenda { display: none; }
.agenda__day { display: grid; gap: 4px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.agenda__day h3 { font-size: 0.86rem; color: var(--muted); font-weight: 500; }
.agenda .chip { height: 34px; font-size: 0.86rem; }

.weekview { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 0; border: 1px solid var(--line); border-radius: var(--r-card); overflow: hidden; background: var(--surface); min-height: 420px; }
.wday { min-width: 0; padding: 8px 6px; border-right: 1px solid var(--line); }
.wday:last-child { border-right: 0; }
.wday--past { background: var(--bg-2); }
.wday.is-target { background: var(--accent-soft); box-shadow: inset 0 0 0 1px var(--accent-text); }
.wday__head { display: flex; align-items: center; gap: 6px; padding: 0 2px 8px; font-size: 0.8rem; color: var(--muted); }
.wday__head strong { color: var(--text); font-size: 0.96rem; }
.wday__head .day__add { margin-left: auto; }
.wday--today .wday__head strong { display: inline-grid; place-items: center; min-width: 24px; height: 24px; border-radius: var(--r-pill); background: var(--accent); color: var(--accent-ink); }
.wday__posts { display: grid; gap: 4px; }
.weekview .chip { flex-wrap: wrap; height: auto; min-height: 26px; padding: 4px 6px 4px 3px; }
.weekview .chip__text { flex-basis: 100%; white-space: normal; overflow-wrap: anywhere; line-height: 1.3; padding-left: 3px; }

/* The one loud element: lime marks where "now" sits among the posts. */
.nowline { position: relative; height: 2px; margin: 10px 0; background: var(--accent); }
.nowline span { position: absolute; left: 0; top: -9px; padding: 0 6px; border-radius: var(--r-pill); background: var(--accent); color: var(--accent-ink); font: 600 0.68rem/18px var(--mono); white-space: nowrap; }

.queue { display: grid; gap: 10px; justify-items: start; }
.queue h2 { display: flex; align-items: baseline; gap: 6px; }
.queue__list { display: grid; width: 100%; }
.queue__list li { display: flex; align-items: center; gap: 2px; border-bottom: 1px solid var(--line); }
.queue__item { display: flex; align-items: center; gap: 10px; flex: 1; min-width: 0; padding: 8px 0; text-decoration: none; }
.queue__body { display: grid; min-width: 0; }
.queue__body strong { font-size: 0.86rem; font-weight: 550; }
.queue__body .help { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.queue__item:hover strong { text-decoration: underline; text-underline-offset: 3px; }

/* ------------------------------- forms ------------------------------- */
.field { display: grid; gap: 6px; margin: 0 0 16px; padding: 0; border: 0; min-width: 0; }
.field > label, .legend { padding: 0; font-weight: 550; font-size: 0.88rem; }
.input, .select, .textarea { width: 100%; min-height: 40px; padding: 8px 12px; background: var(--bg); color: var(--text); border: 1px solid var(--line-strong); border-radius: var(--r-input); font: inherit; }
.input:focus, .select:focus, .textarea:focus { outline: none; border-color: var(--accent-text); box-shadow: 0 0 0 3px var(--accent-soft); }
.input.is-invalid, .input[aria-invalid="true"] { border-color: var(--danger-line); }
.select option:disabled { color: var(--muted); }
.check { display: flex; gap: 10px; align-items: flex-start; padding: 6px 0; }
.check input { width: 18px; height: 18px; margin: 2px 0 0; accent-color: var(--accent); flex: none; }
.check.is-disabled { opacity: 0.5; cursor: not-allowed; }
.check small { display: block; font-size: 0.82rem; color: var(--muted); }
.nested { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 16px; margin: 0; padding: 6px 16px; border: 1px solid var(--line); border-radius: 14px; }

/* The composer takes the whole stage: a 9:16 frame beside the form, and a bar pinned to the bottom of the screen. */
/* It also fits the window, so the page itself never scrolls: --t is 0px in a window 720px tall and 1px from 1059px up, and the sizes below grow with it. */
.stage:has(.page--composer) { --t: clamp(0px, (100vh - 720px) / 339, 1px); --gap: calc(10px + 20 * var(--t)); --label-gap: calc(6px + 4 * var(--t)); --frame: min(569px, 100vh - 150px); height: 100vh; }
.stage:has(.page--composer > :is(.notice, .alert)) { --frame: min(569px, 100vh - 208px); }
.stage:has(#schedule-fields:not([hidden])) { --frame: min(569px, 100vh - 200px); }
.page.page--composer { display: flex; flex-direction: column; min-height: 0; max-width: none; padding-top: calc(16px + 24 * var(--t)); padding-bottom: 0; }
.page--composer > :not(.composer) { width: 100%; max-width: 1024px; margin-inline: auto; }
.page--composer .head { margin-bottom: var(--gap); }
.page--composer h1 { font-size: calc(24px + 6 * var(--t)); }
/* Neutral surfaces here, without the blue tint of the other pages. */
@media (prefers-color-scheme: dark) {
  .page--composer { --surface: #111311; --surface-2: #1f221e; }
}
.nested .help, .nested .err { grid-column: 1 / -1; }
.composer { flex: 1; min-height: 0; display: flex; flex-direction: column; }
.composer__body { flex: 1; min-height: 0; display: grid; grid-template-columns: calc(var(--frame) * 9 / 16) minmax(0, 1fr); grid-template-rows: minmax(0, 1fr) auto; gap: 0 calc(32px + 16 * var(--t)); width: 100%; max-width: 1024px; margin: 0 auto; padding-bottom: calc(4px + 6 * var(--t)); }
.composer__fields { min-width: 0; min-height: 0; margin: -3px; padding: 3px; overflow-y: auto; scrollbar-width: thin; } /* scrolls only with a section open in a short window; the 3px keep focus rings unclipped */
.composer__fields .field { gap: var(--label-gap); margin-bottom: var(--gap); }
.composer__fields .legend { margin-bottom: var(--label-gap); } /* a rendered legend sits outside the fieldset's grid gap */
.composer__fields .textarea { background: var(--surface); }

.media { grid-row: 1 / -1; align-self: start; display: grid; gap: 10px; min-width: 0; }
.media__preview { display: block; width: 100%; height: calc(var(--frame) - 58px); background: #000; border-radius: 20px; object-fit: contain; }
.media:not(.is-filled) .media__preview { display: none; }
.drop { position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; height: var(--frame); min-width: 0; padding: 20px; background: var(--surface); border: 1px dashed var(--line); border-radius: 20px; color: var(--muted); font-size: 0.88rem; text-align: center; }
.drop input { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; cursor: pointer; }
.drop:hover, .drop.is-over { border-color: var(--accent-text); }
.drop:focus-within { border-color: var(--accent-text); box-shadow: 0 0 0 3px var(--accent-soft); }
.drop__icon { display: grid; place-items: center; width: 54px; height: 54px; margin-bottom: 14px; border-radius: 50%; background: var(--surface-2); color: var(--accent-text); }
.drop__text { color: var(--text); font-size: 1rem; font-weight: 550; overflow-wrap: anywhere; }
.drop__browse u { color: var(--accent-text); text-underline-offset: 3px; }
.drop__replace { display: none; color: var(--accent-text); text-decoration: underline; text-underline-offset: 3px; }
.drop__limits { margin-top: 12px; font: 0.74rem/1.6 var(--mono); white-space: pre-line; }
.media.is-filled .drop { flex-direction: row; justify-content: space-between; gap: 12px; height: 48px; padding: 8px 14px; border-radius: 14px; }
.media.is-filled .drop__icon, .media.is-filled .drop__browse, .media.is-filled .drop__limits { display: none; }
.media.is-filled .drop__text { min-width: 0; overflow: hidden; font-size: 0.86rem; text-overflow: ellipsis; white-space: nowrap; }
.media.is-filled .drop__replace { display: block; flex: none; }

.choices { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 12px; }
.choice { display: flex; gap: 12px; align-items: flex-start; padding: calc(10px + 6 * var(--t)) 18px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-card); cursor: pointer; }
.choice:hover { border-color: var(--line-strong); }
.choice:has(input:checked) { background: color-mix(in srgb, var(--accent-soft) 50%, transparent); border-color: var(--accent-text); }
.choice input { appearance: none; flex: none; width: 18px; height: 18px; margin: 2px 0 0; border: 1.5px solid var(--line-strong); border-radius: 50%; cursor: pointer; }
.choice input:checked { border: 5px solid var(--accent-text); background: var(--bg); }
.choice strong { display: block; font-weight: 550; font-size: 0.92rem; }
.choice small { display: block; margin-top: 2px; font-size: 0.77rem; line-height: 1.4; color: var(--muted); }

.captionbox { position: relative; }
.captionbox .textarea { display: block; height: calc(60px + 88 * var(--t)); min-height: 60px; padding: calc(8px + 6 * var(--t)) 18px 26px; border-color: var(--line); border-radius: var(--r-card); resize: vertical; }
.captionbox .textarea::placeholder { color: var(--muted); opacity: 0.8; }
.captionbox__count { position: absolute; right: 16px; bottom: 10px; font: 0.74rem var(--mono); color: var(--muted); pointer-events: none; }

.options { display: flex; gap: 4px; padding: 5px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-card); }
.options__item { position: relative; flex: 1; min-width: 0; }
.options__item input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.options__item span { display: flex; align-items: center; justify-content: center; height: calc(32px + 10 * var(--t)); padding: 0 8px; border: 1px solid transparent; border-radius: var(--r-input); font-weight: 500; font-size: 0.9rem; cursor: pointer; }
.options__item span:hover { background: var(--surface-2); }
.options__item input:checked + span { background: var(--accent-soft); border-color: var(--accent-text); }
.options__item input:focus-visible + span { outline: 2px solid var(--accent-text); outline-offset: 1px; }
.options__item.is-disabled { opacity: 0.5; }
.options__item.is-disabled span { cursor: not-allowed; }

.toggles { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.toggle { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: calc(40px + 8 * var(--t)); padding: 6px 16px; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; font-weight: 550; font-size: 0.9rem; cursor: pointer; }
.toggle small { display: block; font-size: 0.8rem; font-weight: 400; color: var(--muted); }
.field > .toggle--wide { min-height: calc(48px + 24 * var(--t)); padding: calc(8px + 6 * var(--t)) 18px; } /* .field > label clears the padding */
.toggle.is-disabled { opacity: 0.5; cursor: not-allowed; }
.switch { appearance: none; position: relative; flex: none; width: 36px; height: 20px; margin: 0; border-radius: var(--r-pill); background: var(--line); cursor: inherit; transition: background .15s; }
.switch::before { content: ""; position: absolute; top: 3px; left: 3px; width: 14px; height: 14px; border-radius: 50%; background: var(--muted); transition: transform .15s; }
.switch:checked { background: var(--accent); }
.switch:checked::before { background: var(--accent-ink); transform: translateX(16px); }

.consent { grid-column: 2; display: grid; gap: 2px; } /* outside the scrolling column: the confirmation is always on screen */
.consent .check { padding: 0 0 4px; }
.consent .help { font-size: 0.8rem; }
.declare { font-size: 0.8rem; color: var(--muted); }
.declare a { color: var(--text); }

.switcher { position: relative; flex: none; }
.switcher summary { display: flex; align-items: center; gap: 10px; min-height: 48px; padding: 6px 14px 6px 7px; border: 1px solid var(--line); border-radius: var(--r-pill); cursor: pointer; list-style: none; }
.switcher summary::-webkit-details-marker { display: none; }
.switcher summary:hover, .switcher[open] summary { border-color: var(--line-strong); }
.switcher .avatar--letter { color: var(--accent-text); }
.switcher .i--down { color: var(--muted); }
.switcher__who { display: grid; min-width: 0; line-height: 1.3; }
.switcher__who strong { font-size: 0.86rem; font-weight: 550; }
.switcher__who small { font-size: 0.74rem; color: var(--muted); }
.switcher__menu { position: absolute; top: calc(100% + 6px); right: 0; z-index: 15; display: grid; gap: 2px; width: min(280px, calc(100vw - 32px)); padding: 6px; background: var(--surface); border: 1px solid var(--line-strong); border-radius: var(--r-card); }
.switcher__menu a { display: flex; align-items: center; gap: 10px; min-height: 40px; padding: 6px 10px; border-radius: var(--r-input); font-size: 0.88rem; text-decoration: none; }
.switcher__menu a:hover { background: var(--surface-2); }
.switcher__menu a[aria-current="true"] { background: var(--accent-soft); }
.switcher__menu a > span:last-child { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.bar { position: sticky; bottom: 0; z-index: 10; margin: auto calc(var(--gutter) * -1) 0; padding: calc(8px + 8 * var(--t)) var(--gutter); background: var(--bg); border-top: 1px solid var(--line); }
.bar__inner { max-width: 1024px; margin: 0 auto; }
.bar__row { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 12px; }
.bar__hint { flex: 1 1 0; min-width: 0; font-size: 0.82rem; color: var(--muted); text-align: right; }
.bar__actions { display: flex; gap: 12px; }
.bar .btn { height: 44px; }
.bar .btn--primary[disabled] { opacity: 1; background: var(--surface-2); border-color: var(--surface-2); color: color-mix(in srgb, var(--muted) 65%, transparent); }
.bar__note, .bar__inner > .err { margin-bottom: 8px; }
.bar:has(#schedule-fields[hidden]) .bar__note { display: none; }
.schedule { display: flex; gap: 12px; min-width: 0; }
.schedule .input, .schedule .select { width: 176px; height: 44px; padding-block: 0; }
.schedule .input { width: 190px; }

.steps { display: flex; flex-wrap: wrap; gap: 6px 18px; font-size: 0.84rem; color: var(--muted); }
.steps li { display: inline-flex; align-items: center; gap: 6px; }
.steps li::before { content: ""; width: 8px; height: 8px; border-radius: 50%; border: 1px solid var(--line-strong); }
.steps .is-done::before { background: var(--muted); border-color: var(--muted); }
.steps .is-current { color: var(--text); font-weight: 550; }
.steps .is-current::before { background: var(--accent); border-color: var(--accent); }
.caption { display: grid; gap: 2px; padding-top: 12px; border-top: 1px solid var(--line); }
.caption p { white-space: pre-wrap; overflow-wrap: anywhere; }
.inline-form { display: flex; align-items: flex-end; gap: 10px; flex-wrap: wrap; }
.inline-form .field { margin: 0; flex: 1 1 240px; }
.kv { display: grid; }
.kv > div { display: grid; grid-template-columns: 112px minmax(0, 1fr); gap: 10px; padding: 8px 0; border-bottom: 1px solid var(--line); }
.kv dt { color: var(--muted); font-size: 0.84rem; }
.kv dd { margin: 0; overflow-wrap: anywhere; }
.kv dd .help { display: block; }

/* ------------------------------ settings ------------------------------ */
.tabs { display: flex; gap: 18px; margin: -8px 0 8px; border-bottom: 1px solid var(--line); }
.tabs a { padding: 8px 0; color: var(--muted); text-decoration: none; border-bottom: 2px solid transparent; margin-bottom: -1px; font-weight: 500; }
.tabs a:hover { color: var(--text); }
.tabs a[aria-current="page"] { color: var(--text); border-color: var(--accent); }
.settings { max-width: 880px; }
.setting { display: grid; grid-template-columns: 280px minmax(0, 1fr); gap: 32px; padding: 24px 0; border-bottom: 1px solid var(--line); }
.setting:last-child { border-bottom: 0; }
.setting__intro { display: grid; gap: 6px; align-content: start; }
.setting--danger h2 { color: var(--danger); }
.codes { display: grid; grid-template-columns: repeat(2, 1fr); gap: 6px; font: 0.9rem var(--mono); }
.codes li { padding: 6px 10px; background: var(--bg); border: 1px solid var(--line); border-radius: var(--r-input); }
.qr { width: 200px; height: 200px; background: #fff; padding: 8px; border-radius: var(--r-input); }
.qr svg { width: 100%; height: 100%; }
.field-pair { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 2fr); gap: 12px; }
.billing-card { display: grid; gap: 12px; align-content: start; }
@media (max-width: 560px) { .field-pair { grid-template-columns: minmax(0, 1fr); gap: 0; } }

/* ----------------------------- developer pages ----------------------------- */
.reveal { display: grid; grid-template-columns: minmax(0, 1fr); gap: 10px; padding: 18px; margin-bottom: 8px; background: var(--accent-soft); border: 1px solid var(--accent-text); border-radius: var(--r-card); }
.keyform { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) auto; gap: 12px; align-items: end; margin: 16px 0 8px; max-width: 760px; }
.keyform .field { margin: 0; }
.code { position: relative; min-width: 0; }
.code pre, .response pre { margin: 0; padding: 12px 14px; overflow-x: auto; background: var(--bg); border: 1px solid var(--line); border-radius: var(--r-input); font: 0.8rem/1.6 var(--mono); }
.code pre { padding-right: 88px; }
.code__copy { position: absolute; top: 6px; right: 6px; background: var(--surface); }
.docs { display: grid; grid-template-columns: 200px minmax(0, 1fr); gap: 36px; margin-top: 40px; padding-top: 28px; border-top: 1px solid var(--line); }
.docs__nav { position: sticky; top: 20px; align-self: start; display: grid; gap: 2px; font-size: 0.86rem; }
.docs__nav a { padding: 4px 0; color: var(--muted); text-decoration: none; }
.docs__nav a:hover { color: var(--text); }
.docs__body { display: grid; grid-template-columns: minmax(0, 1fr); gap: 40px; min-width: 0; max-width: 820px; }
.doc { display: grid; grid-template-columns: minmax(0, 1fr); gap: 10px; min-width: 0; scroll-margin-top: 20px; }
.doc p { overflow-wrap: anywhere; }
.route { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.route code { min-width: 0; overflow-wrap: anywhere; }
.method { font: 600 0.72rem var(--mono); padding: 2px 8px; border-radius: var(--r-pill); border: 1px solid var(--line-strong); }
.method--post { color: var(--accent-ink); background: var(--accent); border-color: var(--accent); }
.method--delete { color: var(--danger); border-color: var(--danger-line); }
.method--patch, .method--put { color: var(--accent-text); border-color: var(--accent-text); }
.params { display: grid; }
.params > div { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: 12px; padding: 7px 0; border-top: 1px solid var(--line); font-size: 0.88rem; }
.params dt { min-width: 0; overflow-wrap: anywhere; }
.params dd { margin: 0; color: var(--muted); }
.response summary { cursor: pointer; font-size: 0.84rem; color: var(--muted); }
.response pre { margin-top: 8px; }
.tabset { display: grid; grid-template-columns: minmax(0, 1fr); gap: 12px; margin-top: 12px; }
.tabset .seg { justify-self: start; }
.tabset [role="tabpanel"] { display: grid; gap: 8px; min-width: 0; }

/* ------------------------------ dialog, auth ------------------------------ */
.confirm { width: min(420px, calc(100vw - 32px)); padding: 20px; border: 1px solid var(--line-strong); border-radius: var(--r-card); background: var(--surface); color: var(--text); }
.confirm::backdrop { background: rgb(0 0 0 / 0.55); }
.confirm__actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 16px; }

/* "Feedback and support", opened from the sidebar (partials/feedback-dialog). It scrolls inside itself on short screens. */
.fb { width: min(520px, calc(100vw - 32px)); max-height: calc(100dvh - 32px); padding: 0; border: 1px solid var(--line-strong); border-radius: var(--r-card); background: var(--surface); color: var(--text); overflow-y: auto; overscroll-behavior: contain; }
.fb::backdrop { background: rgb(0 0 0 / 0.55); }
.fb__head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 12px 0 20px; }
.fb__head h2 { font-size: 1.15rem; }
.fb__form { padding: 6px 20px 20px; }
.fb__intro { margin-bottom: 16px; }
.fb__types { display: grid; gap: 6px; }
.fb__types .legend { margin-bottom: 2px; }
.fb__types > .fb__type { display: flex; align-items: center; gap: 10px; min-height: 42px; padding: 0 12px; border: 1px solid var(--line); border-radius: var(--r-input); font-size: 0.92rem; font-weight: 500; cursor: pointer; } /* beats .field > label */
.fb__type:hover { border-color: var(--line-strong); }
.fb__type:has(input:checked) { border-color: var(--accent-text); background: var(--accent-soft); }
.fb__type:has(input:focus-visible) { outline: 2px solid var(--accent-text); outline-offset: 1px; }
.fb__type input { width: 18px; height: 18px; margin: 0; flex: none; accent-color: var(--accent); }
.fb__type input:focus-visible { outline: none; }
.fb .textarea { min-height: 128px; resize: vertical; }
.fb .textarea[aria-invalid="true"] { border-color: var(--danger-line); }
.fb__meta { display: flex; justify-content: space-between; gap: 12px; }
.fb__meta #fb-message-help { min-width: 0; overflow-wrap: anywhere; }
.fb__count { flex: none; font-variant-numeric: tabular-nums; }
.fb__general { margin: -4px 0 12px; }
.fb__actions { display: flex; justify-content: flex-end; gap: 8px; }
.fb__done { display: grid; justify-items: center; gap: 6px; padding: 8px 24px 28px; text-align: center; }
.fb__done:focus { outline: none; }
.fb__done .btn { margin-top: 12px; min-width: 120px; }
.fb__check { display: grid; place-items: center; width: 48px; height: 48px; margin-bottom: 6px; border-radius: 50%; background: var(--accent-soft); color: var(--accent-text); }
.fb__check::before { content: ""; width: 26px; height: 26px; background: currentColor; -webkit-mask: url("/icons/check-circle.svg") center / contain no-repeat; mask: url("/icons/check-circle.svg") center / contain no-repeat; }
@media (max-width: 520px) {
  .fb__actions .btn { flex: 1; }
}

.auth { display: flex; flex-direction: column; min-height: 100vh; }
.auth__main { flex: 1; display: grid; align-content: center; justify-items: center; gap: 24px; padding: 32px 16px; }
.auth__logo img { display: block; height: 44px; width: auto; }
.auth__box { width: min(420px, 100%); padding: 24px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-card); }
.auth__form { margin-top: 20px; }
.auth .legal { justify-content: center; padding: 18px 16px; }
.auth__alt { margin-top: 16px; }
.auth__seats { margin-top: 8px; }
.auth__form .check { margin: 4px 0 16px; font-size: 0.9rem; }

/* The cookie banner of the sign-up and sign-in pages (partials/consent), with Accept and Reject that look the same. It sits
   at the top of the page, in the flow, so it never covers the form below it. */
.consent { display: flex; justify-content: center; padding: 16px 16px 0; }
.consent__in { width: min(640px, 100%); display: flex; flex-wrap: wrap; align-items: center; gap: 12px 20px; padding: 14px 16px; background: var(--surface); border: 1px solid var(--line-strong); border-radius: var(--r-card); }
.consent p { flex: 1 1 300px; color: var(--muted); font-size: 0.86rem; }
.consent__h { display: block; margin-bottom: 2px; color: var(--text); font-weight: 600; }
.consent__btns { display: flex; gap: 8px; }
.consent__btns .btn { min-width: 96px; }
@media (max-width: 520px) { .consent__btns { width: 100%; } .consent__btns .btn { flex: 1; } }

/* The Founding 1000 on the overview: the steps left to earn a seat, or the seat earned. */
.founder { margin-bottom: 18px; }
section.founder { padding: 16px 18px; border: 1px solid var(--accent-text); border-radius: var(--r-card); background: var(--accent-soft); }
.founder__head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.founder__steps { margin: 14px 0 0; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
.founder__steps li { background: var(--surface); }

/* Connecting a network with no consent screen of its own: Bluesky's app password, Telegram's bot. */
.connect-head { display: flex; align-items: flex-start; gap: 14px; }
.connect-head .lead { margin-top: 4px; }
.connect-steps { display: grid; gap: 10px; margin: 20px 0 4px; padding-left: 20px; list-style: decimal; color: var(--muted); font-size: 0.9rem; }
.connect-steps a:not(.btn) { color: var(--accent-text); }
.connect-steps--live { padding: 0; list-style: none; counter-reset: step; }
.connect-steps--live li { position: relative; display: grid; justify-items: start; gap: 4px; padding: 12px 14px 14px 46px; border: 1px solid var(--line); border-radius: var(--r-input); counter-increment: step; }
.connect-steps--live li::before { content: counter(step); position: absolute; left: 14px; top: 12px; display: grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; border: 1px solid var(--line-strong); color: var(--text); font-size: 0.78rem; font-weight: 600; }
.connect-steps--live li.is-done::before { content: ""; background: var(--accent); border-color: var(--accent); }
.connect-steps--live li strong { color: var(--text); font-weight: 550; }
.connect-steps--live .btn { margin-top: 6px; }

/* ------------------------------ responsive ------------------------------ */
@media (max-width: 1240px) {
  .calgrid { grid-template-columns: minmax(0, 1fr); }
  .split { grid-template-columns: minmax(0, 1fr) 300px; gap: 24px; }
  .stage:has(.page--composer), .stage:has(#schedule-fields:not([hidden])) { --t: 1px; --frame: 569px; height: auto; }
  .composer__body { flex: none; grid-template-columns: minmax(0, 1fr); grid-template-rows: none; gap: 24px 0; }
  .composer__fields { margin: 0; padding: 0; overflow: visible; }
  .media { grid-row: auto; align-self: stretch; }
  .consent { grid-column: auto; }
  .media__preview { height: auto; aspect-ratio: 9 / 16; max-height: 60vh; }
  .drop { height: auto; min-height: 240px; }
}
/* A small laptop window: the subtitle gives way so the form still fits. */
@media (min-width: 1241px) and (max-height: 700px) {
  .page--composer .lead { display: none; }
  .page.page--composer { padding-top: 8px; }
  .page--composer .head { margin-bottom: 8px; }
}
@media (max-width: 1040px) {
  .split { grid-template-columns: minmax(0, 1fr); }
  .docs { grid-template-columns: minmax(0, 1fr); }
  .docs__nav { display: none; }
  .setting { grid-template-columns: minmax(0, 1fr); gap: 14px; }
  .weekview { grid-template-columns: minmax(0, 1fr); min-height: 0; }
  .wday { border-right: 0; border-bottom: 1px solid var(--line); }
  .wday:last-child { border-bottom: 0; }
}
@media (max-width: 900px) {
  .shell { display: block; background: none; }
  .topbar { position: sticky; top: 0; z-index: 20; display: flex; align-items: center; gap: 6px; height: 56px; padding: 0 12px 0 6px; background: var(--bg); border-bottom: 1px solid var(--line); }
  .topbar__logo { margin-right: auto; }
  .topbar__logo img { display: block; height: 34px; width: auto; }
  .side { position: fixed; inset: 0 auto 0 0; z-index: 40; width: min(280px, 86vw); background: var(--bg-2); border-right: 1px solid var(--line); visibility: hidden; transform: translateX(-100%); transition: transform .2s ease, visibility .2s; }
  .side.is-open { visibility: visible; transform: none; }
  .side .side__close { display: inline-grid; }
  .nav-open { overflow: hidden; }
  .page { --gutter: 16px; padding-top: 20px; padding-bottom: 40px; }
  .stage { min-height: calc(100vh - 56px); }
}
@media (max-width: 720px) {
  .acc { flex-wrap: wrap; }
  .acc__actions { width: 100%; padding-left: 60px; }
  .acc-connect__panel { position: fixed; top: auto; bottom: 12px; left: 16px; right: 16px; width: auto; }
  h1 { font-size: 1.45rem; }
  .head { flex-wrap: wrap; }
  .week { gap: 3px; }
  .week__day { padding: 6px 4px; text-align: center; }
  .week__day small { display: none; }
  .timeline__row { grid-template-columns: 22px minmax(0, 1fr); }
  .timeline__time { grid-column: 1 / -1; }
  .timeline__row .status { grid-column: 2; justify-self: start; white-space: normal; }
  .keyform { grid-template-columns: minmax(0, 1fr); }
  .params > div { grid-template-columns: minmax(0, 1fr); gap: 2px; }
  .seg--right { margin-left: 0; }
  .toolbar__title { margin-right: auto; }
  .toolbar__nav { width: 100%; }
  .day { min-height: 56px; padding: 3px; }
  .day__head { justify-content: center; margin: 0; }
  .day__add, .day__posts { display: none; }
  .day__dots { display: flex; margin-top: 2px; }
  .month__names span { padding: 4px; text-align: center; }
  .agenda { display: block; margin-top: 10px; }
  .kv > div { grid-template-columns: 100px minmax(0, 1fr); }
  .btn--sm { height: 36px; }
  .switcher__menu { right: auto; left: 0; }
  .page--composer h1 { font-size: 1.45rem; }
  .toggles, .nested { grid-template-columns: minmax(0, 1fr); }
  .schedule { order: 1; flex-basis: 100%; flex-wrap: wrap; }
  .schedule .input, .schedule .select { flex: 1 1 100%; width: auto; }
  .bar { padding-block: 12px; }
  .bar__actions { order: 2; flex-basis: 100%; }
  .bar__actions .btn { flex: 1; }
  .bar__actions .btn--primary { flex: 2; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}

/* language picker (sign-in and public pages) */
.langs { display: flex; flex-wrap: wrap; justify-content: center; gap: 4px 14px; margin: 18px auto 0; font-size: 0.8rem; }
.langs form { display: contents; }
.langs__item { padding: 2px 0; border: 0; background: none; color: var(--muted); font: inherit; cursor: pointer; }
.langs__item:hover { color: var(--text); text-decoration: underline; text-underline-offset: 3px; }
.langs__item[aria-current] { color: var(--text); font-weight: 550; cursor: default; }

/* Agency mode: the account switcher at the top of the sidebar, the "managing" banner and Settings > Team. */
.switcher { margin: 0 0 12px; border: 1px solid var(--line); border-radius: var(--r-input); background: var(--surface); }
.switcher[data-managing] { border-color: var(--accent-text); background: var(--accent-soft); }
.switcher summary { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 8px 10px; cursor: pointer; list-style: none; }
.switcher summary::-webkit-details-marker { display: none; }
.switcher__who { display: grid; min-width: 0; }
.switcher__who strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 0.9rem; }
.switcher__label { font-size: 0.72rem; color: var(--muted); text-transform: uppercase; letter-spacing: 0.04em; }
.switcher[open] .i--down { transform: rotate(180deg); }
.switcher__list { display: grid; gap: 2px; padding: 4px; border-top: 1px solid var(--line); max-height: 280px; overflow-y: auto; }
.switcher__list button { display: grid; text-align: left; gap: 1px; padding: 7px 8px; border: 0; border-radius: 8px; background: transparent; color: var(--text); cursor: pointer; font: inherit; min-width: 0; }
.switcher__list button span { font-size: 0.78rem; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.switcher__list button strong { font-size: 0.88rem; font-weight: 550; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.switcher__list button:hover { background: var(--surface-2); }
.switcher__list button[aria-current="true"] { background: var(--accent-soft); }
.switcher__team { display: block; padding: 8px 12px 10px; font-size: 0.82rem; color: var(--muted); border-top: 1px solid var(--line); }
.switcher__team:hover { color: var(--text); }
.managing { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; padding: 8px 14px; margin-bottom: 14px; border-radius: var(--r-input); border: 1px solid var(--accent-text); background: var(--accent-soft); }
.team-body { display: grid; gap: 16px; min-width: 0; }
.team-invite { max-width: 560px; }
.team-list { display: grid; gap: 10px; margin: 0 0 10px; padding: 0; list-style: none; }
.team-row { display: grid; grid-template-columns: minmax(150px, 0.9fr) minmax(250px, 1.4fr) auto; gap: 12px 20px; align-items: start; padding: 14px; border: 1px solid var(--line); border-radius: var(--r-card); }
.team-row__who { display: grid; gap: 2px; min-width: 0; }
.team-row__who strong, .team-row__who .help { overflow-wrap: anywhere; }
.team-row__status { justify-self: start; margin-top: 4px; font-size: 0.76rem; padding: 2px 8px; border-radius: var(--r-pill); background: var(--surface-2); color: var(--muted); }
.team-row__status.is-active { background: var(--accent-soft); color: var(--text); }
.team-row__perms { display: grid; gap: 0; }
.team-row__perms .check { padding: 3px 0; font-size: 0.88rem; }
.team-row__perms .check small { display: none; }
.team-row__perms .btn { grid-column: 1 / -1; justify-self: start; }
.team-row__perms .btn { margin-top: 4px; }
.team-row__granted { margin: 0; padding-left: 18px; list-style: disc; color: var(--muted); font-size: 0.88rem; }
.team-row__actions { display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
@media (max-width: 860px) { .team-row { grid-template-columns: 1fr; } .team-row__perms { grid-template-columns: 1fr; } .team-row__actions { justify-content: flex-start; } }
.readonly { border: 0; margin: 0; padding: 0; min-width: 0; }
.readonly:disabled .btn, .readonly:disabled form { opacity: 0.55; }
