/* Mercestack's standard design for the Rust apps.
 * Tokens are copied 1:1 from packages/ui/src/styles/tokens.css; the component
 * classes reproduce packages/ui and the product-host shells in plain CSS. */

@font-face {
  font-family: "Geist Variable";
  src: url("/assets/geist.woff2") format("woff2");
  font-weight: 100 900;
  font-display: swap;
}

:root {
  --background: #f7f5f4;
  --foreground: #141212;
  --card: #ffffff;
  --card-foreground: #141212;
  --primary: #d92d55;
  --primary-foreground: #ffffff;
  --secondary: #ebe7e6;
  --muted: #efecea;
  --muted-foreground: #6f6a68;
  --accent: #ebe7e6;
  --border: #e4dfdd;
  --input: #e4dfdd;
  --ring: #d92d55;
  --sidebar: #efebea;
  --sidebar-foreground: #141212;
  --sidebar-accent: #e4dfdd;
  --sidebar-border: #dcd6d4;
  --destructive: oklch(0.55 0.19 27);
  --success: oklch(0.55 0.12 155);
  --warning: oklch(0.68 0.13 75);
  --clay-subtle: #fbe3e9;
  --clay-foreground: #9d1b3b;
  --radius: 0.875rem;
  --font: "Geist Variable", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  --ease: cubic-bezier(0.33, 1, 0.68, 1);
}

*, *::before, *::after { box-sizing: border-box; border-color: var(--border); }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; min-height: 100dvh; background: var(--background); color: var(--foreground);
  font-family: var(--font); font-size: 14px; line-height: 1.5; -webkit-font-smoothing: antialiased;
}
h1, h2, h3, h4 { margin: 0; font-weight: 600; }
p { margin: 0; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
code, pre, .mono { font-family: var(--mono); }
::selection { background: color-mix(in oklab, var(--primary) 22%, transparent); }
:focus-visible { outline: 3px solid color-mix(in oklab, var(--ring) 45%, transparent); outline-offset: 2px; }

/* ── Layout helpers ───────────────────────────────────────────────────── */
.container { width: calc(100% - 24px); max-width: 1100px; margin: 0 auto; }
@media (min-width: 640px) { .container { width: calc(100% - 72px); } }
.stack { display: flex; flex-direction: column; gap: 16px; }
.row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.spread { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.grid-2 { display: grid; gap: 16px; }
.grid-3 { display: grid; gap: 16px; }
.grid-4 { display: grid; gap: 12px; }
@media (min-width: 720px) { .grid-2 { grid-template-columns: 1fr 1fr; } .grid-3 { grid-template-columns: repeat(2, 1fr); } .grid-4 { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1024px) { .grid-3 { grid-template-columns: repeat(3, 1fr); } .grid-4 { grid-template-columns: repeat(4, 1fr); } }
.muted { color: var(--muted-foreground); }
.small { font-size: 12px; }
.xs { font-size: 11px; }
.strong { font-weight: 600; }
.break { word-break: break-all; }
.right { text-align: right; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

/* ── Buttons (packages/ui Button) ─────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 36px; padding: 0 16px;
  border-radius: 999px; border: 1px solid transparent; font-size: 14px; font-weight: 500; white-space: nowrap;
  cursor: pointer; transition: transform 140ms var(--ease), background 140ms var(--ease); text-decoration: none;
}
.btn:hover { transform: translateY(-1px); }
.btn:disabled { opacity: 0.5; pointer-events: none; }
.btn-primary { background: var(--primary); color: var(--primary-foreground); }
.btn-primary:hover { background: color-mix(in oklab, var(--primary) 90%, black); }
.btn-outline { background: var(--card); border-color: var(--input); }
.btn-outline:hover { background: var(--accent); }
.btn-secondary { background: var(--secondary); }
.btn-ghost { background: transparent; }
.btn-ghost:hover { background: var(--accent); }
.btn-danger { background: transparent; color: var(--destructive); border-color: var(--input); }
.btn-danger:hover { background: color-mix(in oklab, var(--destructive) 8%, transparent); }
.btn-dark { background: var(--foreground); color: var(--background); }
.btn-white { background: #fff; color: #141212; }
.btn-sm { height: 32px; padding: 0 12px; font-size: 13px; }
.btn-lg { height: 44px; padding: 0 22px; }
.btn-block { width: 100%; }
.link { color: var(--primary); font-weight: 500; }
.link:hover { text-decoration: underline; text-underline-offset: 4px; }
.link-underline { font-weight: 600; text-decoration: underline; text-decoration-color: var(--primary); text-decoration-thickness: 2px; text-underline-offset: 4px; }

/* ── Cards, panels, badges ────────────────────────────────────────────── */
.card { background: var(--card); border-radius: 24px; padding: 20px; }
.card-sm { background: var(--card); border-radius: 16px; padding: 20px; }
.card-inner { background: var(--background); border-radius: 16px; padding: 16px; }
.card h2, .section-title { font-size: 14px; font-weight: 600; letter-spacing: -0.015em; }
.badge {
  display: inline-flex; align-items: center; gap: 4px; border-radius: 999px; border: 1px solid var(--border);
  padding: 1px 10px; font-size: 12px; font-weight: 500; white-space: nowrap;
}
.badge-primary { background: var(--primary); color: #fff; border-color: transparent; }
.badge-success { background: var(--success); color: #fff; border-color: transparent; }
.badge-warning { background: var(--warning); color: #141212; border-color: transparent; }
.badge-danger { background: var(--destructive); color: #fff; border-color: transparent; }
.badge-secondary { background: var(--secondary); border-color: transparent; }
.dot { width: 6px; height: 6px; border-radius: 999px; background: var(--primary); display: inline-block; }

/* ── Forms (packages/ui Field / Input) ────────────────────────────────── */
.field { display: flex; flex-direction: column; gap: 8px; }
.field label, .label { font-size: 13px; font-weight: 600; }
.hint { font-size: 12px; line-height: 20px; color: var(--muted-foreground); }
.input, .select, .textarea {
  width: 100%; height: 40px; border: 1px solid var(--input); background: var(--card); border-radius: 12px;
  padding: 4px 14px; font-size: 14px; outline: none; transition: border-color 140ms, box-shadow 140ms;
}
.textarea { height: auto; min-height: 120px; padding: 10px 14px; resize: vertical; }
.input:focus, .select:focus, .textarea:focus { border-color: var(--ring); box-shadow: 0 0 0 3px color-mix(in oklab, var(--ring) 20%, transparent); }
.input-lg { height: 48px; border-radius: 12px; background: var(--background); }
.choice { display: flex; gap: 10px; align-items: flex-start; background: color-mix(in oklab, var(--muted) 50%, transparent); border-radius: 12px; padding: 12px; cursor: pointer; }
.choice input { margin-top: 3px; accent-color: var(--primary); }
.check { display: inline-flex; gap: 8px; align-items: center; font-size: 13px; }
.check input { accent-color: var(--primary); }
.inline-form { display: inline; }

/* ── Notices ──────────────────────────────────────────────────────────── */
.notice { border-radius: 12px; padding: 12px 14px; font-size: 13px; margin-bottom: 16px; border: 1px solid; }
.notice-ok { background: color-mix(in oklab, var(--success) 10%, transparent); border-color: color-mix(in oklab, var(--success) 30%, transparent); color: color-mix(in oklab, var(--success) 85%, black); }
.notice-error { background: color-mix(in oklab, var(--destructive) 10%, transparent); border-color: color-mix(in oklab, var(--destructive) 30%, transparent); color: var(--destructive); }
.notice-warn { background: color-mix(in oklab, var(--warning) 12%, transparent); border-color: color-mix(in oklab, var(--warning) 35%, transparent); }
.secret { font-family: var(--mono); font-size: 13px; background: var(--foreground); color: var(--background); padding: 12px 14px; border-radius: 12px; word-break: break-all; }

/* ── Tables (packages/ui Table) ───────────────────────────────────────── */
.table-wrap { background: var(--card); border-radius: 16px; overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 14px; }
th { text-align: left; height: 40px; padding: 0 16px; font-size: 11px; font-weight: 600; letter-spacing: 0.02em; color: var(--muted-foreground); white-space: nowrap; border-bottom: 1px solid var(--border); }
td { padding: 12px 16px; vertical-align: middle; border-bottom: 1px solid color-mix(in oklab, var(--border) 70%, transparent); }
tbody tr:last-child td { border-bottom: 0; }
tbody tr:hover td { background: color-mix(in oklab, var(--muted) 60%, transparent); }
td.num, th.num { text-align: right; font-variant-numeric: tabular-nums; }
.row-link { display: block; }

/* ── Page header (packages/ui PageHeader) ─────────────────────────────── */
.page-header { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 16px; padding-bottom: 28px; }
.eyebrow { display: flex; align-items: center; gap: 8px; font-size: 10px; font-weight: 600; letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted-foreground); }
.page-header h1 { margin-top: 8px; font-size: 30px; letter-spacing: -0.045em; line-height: 1.1; }
@media (min-width: 640px) { .page-header h1 { font-size: 36px; } }
.page-header p { margin-top: 8px; font-size: 13px; line-height: 20px; color: var(--muted-foreground); max-width: 48rem; }

/* ── Workspace shell (product host: rail + top bar + rounded content) ─── */
.shell { display: flex; min-height: 100dvh; background: var(--sidebar); }
.rail { position: sticky; top: 0; height: 100dvh; width: 272px; flex-shrink: 0; display: none; flex-direction: column; }
@media (min-width: 900px) { .rail { display: flex; } }
.rail-brand { height: 72px; display: flex; align-items: center; gap: 10px; padding: 0 16px; }
.mark { width: 40px; height: 40px; border-radius: 999px; background: var(--foreground); display: grid; place-items: center; flex-shrink: 0; }
.mark img { width: 24px; filter: invert(1); }
.mark-lg { width: 48px; height: 48px; }
.mark-lg img { width: 28px; }
.wordmark { font-size: 15px; font-weight: 600; letter-spacing: -0.02em; }
.ws-switch { margin: 0 16px 16px; background: var(--card); border-radius: 24px; padding: 10px 12px; display: flex; align-items: center; gap: 10px; min-height: 64px; }
.ws-switch:hover { background: var(--sidebar-accent); }
.ws-label { font-size: 10px; font-weight: 600; letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted-foreground); }
.ws-name { font-size: 14px; font-weight: 600; }
.nav { flex: 1; overflow-y: auto; padding: 0 16px 16px; display: flex; flex-direction: column; gap: 20px; }
.nav-group-label { padding: 4px 12px 8px; font-size: 13px; font-weight: 500; color: color-mix(in oklab, var(--sidebar-foreground) 55%, transparent); }
.nav-item { display: flex; align-items: center; gap: 12px; min-height: 48px; border-radius: 999px; padding: 6px 12px 6px 6px; font-weight: 500; color: color-mix(in oklab, var(--sidebar-foreground) 80%, transparent); }
.nav-item:hover { background: color-mix(in oklab, var(--sidebar-accent) 70%, transparent); }
.nav-item .icon { width: 36px; height: 36px; border-radius: 999px; background: var(--card); display: grid; place-items: center; font-size: 15px; }
.nav-item.active { color: var(--sidebar-foreground); font-weight: 600; }
.nav-item.active .icon { background: var(--primary); color: #fff; }
.nav-count { margin-left: auto; font-size: 12px; color: var(--muted-foreground); font-variant-numeric: tabular-nums; }
.user-pill { margin: 16px; background: var(--card); border-radius: 999px; padding: 8px; display: flex; align-items: center; gap: 10px; min-height: 56px; }
.initials { width: 36px; height: 36px; border-radius: 999px; background: var(--foreground); color: var(--background); display: grid; place-items: center; font-size: 10px; font-weight: 700; flex-shrink: 0; }
.user-pill .who { flex: 1; min-width: 0; font-size: 13px; font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.icon-btn { width: 36px; height: 36px; border-radius: 999px; border: 0; background: transparent; cursor: pointer; display: grid; place-items: center; }
.icon-btn:hover { background: var(--accent); }
.main-col { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.topbar { position: sticky; top: 0; z-index: 30; height: 56px; display: flex; align-items: center; gap: 16px; padding: 0 16px; background: color-mix(in oklab, var(--sidebar) 90%, transparent); backdrop-filter: blur(24px); }
@media (min-width: 640px) { .topbar { padding: 0 24px; } }
.topbar-brand { display: flex; align-items: center; gap: 10px; }
.topbar-brand .mark { width: 34px; height: 34px; }
.topbar-brand .mark img { width: 20px; }
.trail { display: none; align-items: center; gap: 8px; font-size: 12px; }
.trail .crumb { color: var(--muted-foreground); max-width: 11rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.trail .here { background: var(--muted); border-radius: 12px; padding: 6px 10px; font-weight: 600; }
/* backdrop-filter would make the bar the drawer's containing block. */
@media (max-width: 899px) { .topbar { backdrop-filter: none; background: var(--sidebar); } }
.drawer { margin-left: auto; }
.drawer > summary { list-style: none; background: var(--card); width: 40px; height: 40px; }
.drawer > summary::-webkit-details-marker { display: none; }
.drawer .when-open, .drawer[open] .when-closed { display: none; }
.drawer[open] .when-open { display: inline-flex; }
.drawer-panel { position: fixed; inset: 56px 0 0 0; z-index: 40; background: var(--sidebar); overflow-y: auto; display: flex; flex-direction: column; padding-top: 8px; }
.drawer-panel .nav { flex: none; overflow: visible; }
@media (min-width: 900px) {
  .topbar-brand, .drawer { display: none; }
  .trail { display: flex; }
}
.rail-foot { padding: 0 16px; }
.rail-out { display: flex; align-items: center; gap: 12px; min-height: 52px; border-radius: 999px; padding: 6px 14px 6px 6px; background: var(--card); font-weight: 500; font-size: 14px; }
.rail-out:hover { background: var(--sidebar-accent); }
.rail-out .icon { width: 36px; height: 36px; border-radius: 999px; background: var(--sidebar); display: grid; place-items: center; }
.rail-out .grow { flex: 1; }
.rail-out .out { color: var(--muted-foreground); }
.rail-out .out .hi { width: 16px; height: 16px; }
.content { flex: 1; background: var(--background); min-width: 0; }
@media (min-width: 900px) { .content { border-top-left-radius: 32px; } }
.content-inner { max-width: 1600px; margin: 0 auto; padding: 20px 16px 96px; }
@media (min-width: 640px) { .content-inner { padding: 28px 24px 28px; } }
@media (min-width: 1024px) { .content-inner { padding: 28px 32px; } }
.side-layout { display: grid; gap: 16px; }
@media (min-width: 1280px) { .side-layout { grid-template-columns: 1fr 22rem; } }

/* Tiles, steps, progress, bars, timeline */
.tile { background: var(--card); border-radius: 16px; padding: 20px; }
.tile .label-sm { font-size: 12px; color: var(--muted-foreground); }
.tile .value { margin-top: 6px; font-size: 24px; font-weight: 600; letter-spacing: -0.03em; font-variant-numeric: tabular-nums; }
.progress { margin-top: 10px; height: 6px; border-radius: 999px; background: var(--muted); overflow: hidden; }
.progress span { display: block; height: 100%; background: var(--primary); border-radius: 999px; }
.step { display: flex; gap: 12px; align-items: flex-start; background: var(--background); border-radius: 16px; padding: 16px; }
.step-card { display: flex; gap: 16px; align-items: flex-start; background: var(--card); border: 1px solid var(--border); border-radius: 16px; padding: 20px; }
.step-num { width: 24px; height: 24px; border-radius: 999px; background: var(--muted); display: grid; place-items: center; font-size: 12px; font-weight: 600; flex-shrink: 0; }
.step-num-lg { width: 32px; height: 32px; }
.step-num.done { background: var(--success); color: #fff; }
.step-num-lg.done { background: var(--primary); }
.bars { display: flex; align-items: flex-end; gap: 2px; height: 160px; margin-top: 16px; }
.bars span { flex: 1; background: var(--primary); border-radius: 4px 4px 0 0; min-height: 2px; opacity: 0.9; }
.bars span.zero { background: var(--muted); }
.timeline { border-left: 1px solid var(--border); margin-left: 4px; padding-left: 18px; display: flex; flex-direction: column; gap: 14px; }
.timeline li { position: relative; list-style: none; }
.timeline li::before { content: ""; position: absolute; left: -23px; top: 5px; width: 10px; height: 10px; border-radius: 999px; background: var(--primary); }
.timeline { margin: 0; }
.dl { display: grid; grid-template-columns: 7rem 1fr; gap: 8px 12px; font-size: 13px; }
.dl dt { color: var(--muted-foreground); }
.dl dd { margin: 0; word-break: break-word; }
.pills { display: flex; flex-wrap: wrap; gap: 6px; }
.pill { border-radius: 999px; padding: 6px 12px; font-size: 12px; background: var(--card); }
.pill.active { background: var(--foreground); color: var(--background); }
.gate { max-width: 28rem; margin: 10vh auto; text-align: center; background: var(--card); border-radius: 24px; padding: 32px; }
.empty { text-align: center; padding: 40px 20px; color: var(--muted-foreground); }
.empty h3 { color: var(--foreground); font-size: 15px; margin-bottom: 6px; }
pre.code { background: #09090b; color: #e4e4e7; border-radius: 16px; padding: 16px; overflow-x: auto; font-size: 12.5px; line-height: 1.7; margin: 0; }
.code .k { color: #ff7b72; } .code .s { color: #a5d6ff; } .code .c { color: #8b949e; }

/* ── Product landing (standalone header/footer) ───────────────────────── */
.site-header { position: sticky; top: 0; z-index: 40; background: color-mix(in oklab, var(--background) 85%, transparent); backdrop-filter: blur(24px); }
.site-header .container { height: 64px; display: flex; align-items: center; gap: 24px; }
.brand { display: flex; align-items: center; gap: 10px; font-size: 16px; font-weight: 600; letter-spacing: -0.02em; }
.brand .mark { width: 32px; height: 32px; }
.brand .mark img { width: 20px; }
.site-nav { display: none; gap: 4px; }
@media (min-width: 768px) { .site-nav { display: flex; } }
.site-nav a { border-radius: 999px; padding: 8px 12px; color: var(--muted-foreground); font-size: 14px; }
.site-nav a:hover { color: var(--foreground); }
.site-actions { margin-left: auto; display: flex; gap: 8px; align-items: center; }
.site-footer { border-top: 1px solid var(--border); margin-top: 64px; }
.site-footer .container { padding: 32px 0; display: flex; flex-wrap: wrap; gap: 8px 24px; font-size: 14px; color: var(--muted-foreground); }
.site-footer .push { margin-left: auto; display: flex; gap: 24px; }
.section { padding: 64px 0; }
.section-sm { padding: 40px 0; }
.kicker { font-size: 11px; font-weight: 600; letter-spacing: 0.14em; text-transform: uppercase; color: var(--muted-foreground); }
.h2 { margin-top: 8px; font-size: 30px; letter-spacing: -0.035em; line-height: 1.1; }
@media (min-width: 640px) { .h2 { font-size: 36px; } }
.lede { margin-top: 12px; font-size: 16px; line-height: 28px; color: var(--muted-foreground); max-width: 40rem; }
.ink { background: var(--foreground); color: var(--background); }
.ink .kicker { color: var(--primary); }
.ink .muted, .ink .lede { color: color-mix(in oklab, var(--background) 65%, transparent); }
.hero { margin: 12px; border-radius: 32px; position: relative; overflow: hidden; }
@media (min-width: 640px) { .hero { margin: 12px 20px; } }
.hero::before { content: ""; position: absolute; width: 640px; height: 640px; right: -160px; top: -240px; background: radial-gradient(circle, color-mix(in oklab, var(--primary) 45%, transparent), transparent 65%); pointer-events: none; }
.hero-grid { position: relative; display: grid; gap: 40px; padding: 72px 0 80px; align-items: center; }
@media (min-width: 1024px) { .hero-grid { grid-template-columns: 1.1fr 0.9fr; } }
.chip { display: inline-flex; align-items: center; gap: 8px; border-radius: 999px; padding: 4px 12px; font-size: 11px; font-weight: 600; letter-spacing: 0.1em; text-transform: uppercase; }
.chip-primary { background: var(--primary); color: #fff; }
.chip-outline { border: 1px solid color-mix(in oklab, currentColor 25%, transparent); }
.display { margin-top: 20px; font-size: clamp(2.6rem, 7vw, 5.2rem); line-height: 0.98; letter-spacing: -0.06em; font-weight: 600; }
.display em { font-style: normal; color: var(--primary); }
.display-sm { margin-top: 20px; font-size: clamp(2.2rem, 5vw, 3.4rem); line-height: 1.02; letter-spacing: -0.045em; font-weight: 600; }
.ticks { margin-top: 24px; font-family: var(--mono); font-size: 12px; color: color-mix(in oklab, currentColor 60%, transparent); }
.window { background: #09090b; border-radius: 24px; box-shadow: 0 40px 90px -40px rgb(0 0 0 / 0.7); overflow: hidden; border: 1px solid rgb(255 255 255 / 0.08); }
.window-bar { display: flex; align-items: center; gap: 6px; padding: 12px 16px; border-bottom: 1px solid rgb(255 255 255 / 0.08); font-family: var(--mono); font-size: 11px; color: #a1a1aa; }
.window-bar i { width: 8px; height: 8px; border-radius: 999px; background: #3f3f46; display: inline-block; }
.window pre { margin: 0; padding: 18px; color: #e4e4e7; font-size: 12.5px; line-height: 1.7; overflow-x: auto; }
.window .event { display: flex; justify-content: space-between; padding: 10px 18px; border-top: 1px solid rgb(255 255 255 / 0.06); font-family: var(--mono); font-size: 12px; color: #d4d4d8; }
.window .event b { color: #4ade80; font-weight: 500; }
.mock { background: var(--card); border: 1px solid var(--border); border-radius: 24px; padding: 16px; }
.mock-row { background: var(--muted); border-radius: 12px; padding: 12px; margin-top: 10px; }
.feature { background: var(--card); border-radius: 24px; padding: 24px; }
.band .feature { background: var(--background); }
.feature-icon { width: 44px; height: 44px; border-radius: 16px; background: var(--primary); color: #fff; display: grid; place-items: center; font-size: 18px; }
.feature h3 { margin-top: 16px; font-size: 15px; }
.feature p { margin-top: 8px; font-size: 14px; line-height: 24px; color: var(--muted-foreground); }
.bar-accent { width: 32px; height: 4px; border-radius: 999px; background: var(--primary); }
.band { background: var(--card); border-radius: 32px; padding: 64px 24px; }
@media (min-width: 640px) { .band { padding: 96px 48px; } }
.lifecycle { display: grid; gap: 12px; margin-top: 32px; }
@media (min-width: 900px) { .lifecycle { grid-template-columns: repeat(5, 1fr); } }
.lifecycle div { border: 1px solid rgb(255 255 255 / 0.12); border-radius: 20px; padding: 18px; }
.lifecycle b { display: block; font-size: 15px; }
.big-num { width: 56px; height: 56px; border-radius: 16px; background: var(--foreground); color: var(--background); display: grid; place-items: center; font-weight: 600; font-family: var(--mono); }
.plan { background: var(--card); border-radius: 16px; padding: 20px; display: flex; flex-direction: column; gap: 12px; }
.plan .price { font-size: 24px; font-weight: 600; letter-spacing: -0.03em; }
.plan ul { margin: 0; padding-left: 18px; color: var(--muted-foreground); font-size: 14px; line-height: 26px; }
.faq details { border-bottom: 1px solid var(--border); padding: 16px 0; }
.faq summary { cursor: pointer; list-style: none; display: flex; justify-content: space-between; font-size: 14px; font-weight: 600; }
.faq summary::after { content: "+"; transition: transform 160ms var(--ease); }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq p { margin-top: 10px; font-size: 14px; line-height: 24px; color: var(--muted-foreground); max-width: 75ch; }
.closing { background: var(--primary); color: #fff; border-radius: 32px; padding: 48px 32px; }
@media (min-width: 640px) { .closing { padding: 64px 48px; } }
.closing h2 { font-size: clamp(1.9rem, 4vw, 2.6rem); letter-spacing: -0.04em; line-height: 1.05; max-width: 36rem; }
.btn-on-primary { border-color: rgb(255 255 255 / 0.4); color: #fff; background: transparent; }

/* ── Sign-in (apps/auth AuthShell) ────────────────────────────────────── */
.auth { min-height: 100dvh; background: var(--sidebar); padding: 8px; display: grid; gap: 16px; }
@media (min-width: 640px) { .auth { padding: 16px; } }
@media (min-width: 1024px) { .auth { grid-template-columns: 1fr 1fr; } }
.auth-art { display: none; background: var(--card); border-radius: 32px; padding: 40px; flex-direction: column; justify-content: space-between; position: relative; overflow: hidden; }
@media (min-width: 1024px) { .auth-art { display: flex; } }
.auth-art .orbit { position: relative; height: 260px; display: grid; place-items: center; }
.auth-art .orbit::before, .auth-art .orbit::after { content: ""; position: absolute; border: 1px dashed var(--border); border-radius: 999px; }
.auth-art .orbit::before { width: 240px; height: 240px; }
.auth-art .orbit::after { width: 160px; height: 160px; }
.auth-art .tile-c { width: 112px; height: 112px; border-radius: 32px; background: var(--primary); display: grid; place-items: center; animation: float 6s ease-in-out infinite; z-index: 1; }
.auth-art .tile-c img { width: 56px; filter: invert(1) brightness(10); }
@keyframes float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-8px); } }
@media (prefers-reduced-motion: reduce) { .auth-art .tile-c { animation: none; } }
.auth-art h2 { font-size: clamp(2rem, 3vw, 2.9rem); line-height: 1.04; letter-spacing: -0.05em; }
.auth-panel { background: var(--card); border-radius: 24px; padding: 16px 20px; display: flex; flex-direction: column; }
@media (min-width: 640px) { .auth-panel { border-radius: 32px; padding: 32px 40px; } }
.auth-form { width: 100%; max-width: 400px; margin: auto; padding: 40px 0; }
.auth-form h1 { margin-top: 8px; font-size: clamp(1.9rem, 6vw, 2.6rem); line-height: 1.04; letter-spacing: -0.045em; }
.auth-form .btn-primary { min-height: 48px; border-radius: 12px; width: 100%; font-weight: 600; }
.back { background: var(--muted); height: 40px; border-radius: 12px; padding: 0 16px; font-size: 12px; font-weight: 600; display: inline-flex; align-items: center; }
.logo-img { width: 88px; height: auto; }

/* ── Mail client ──────────────────────────────────────────────────────── */
.conv-list { background: var(--card); border-radius: 16px; overflow: hidden; }
.conv { display: grid; grid-template-columns: 14rem 1fr auto; gap: 12px; align-items: baseline; padding: 12px 16px; border-bottom: 1px solid color-mix(in oklab, var(--border) 70%, transparent); }
.conv:last-child { border-bottom: 0; }
.conv:hover { background: color-mix(in oklab, var(--muted) 60%, transparent); }
.conv.unread .who, .conv.unread .subj { font-weight: 600; }
.conv .who { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.conv .snippet { color: var(--muted-foreground); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.conv .when { font-size: 12px; color: var(--muted-foreground); white-space: nowrap; }
@media (max-width: 720px) { .conv { grid-template-columns: 1fr auto; } .conv .body { grid-column: 1 / -1; } }
.message { background: var(--card); border-radius: 16px; padding: 20px; }
.message.outbound { background: color-mix(in oklab, var(--primary) 5%, var(--card)); }
.message-body { margin-top: 12px; white-space: pre-wrap; font-size: 14px; line-height: 22px; }
.mail-frame { margin-top: 12px; width: 100%; min-height: 320px; border: 1px solid var(--border); border-radius: 12px; background: #fff; }
.toolbar { display: flex; flex-wrap: wrap; gap: 6px; }

/* Hugeicons (packages/ui-leptos/src/icons.rs): 18px, the Next rail's 1.6 stroke. */
.hi { width: 18px; height: 18px; flex-shrink: 0; display: block; }
:where(span:has(> .hi)) { display: inline-flex; }
.btn-sm .hi { width: 16px; height: 16px; }
.nav-item .icon .hi { color: var(--muted-foreground); }
.nav-item:hover .icon .hi, .nav-item.active .icon .hi { color: inherit; }
.feature-icon .hi { width: 20px; height: 20px; stroke-width: 1.7; }
.with-icon { display: inline-flex; align-items: center; gap: 4px; }
.with-icon .hi { width: 16px; height: 16px; }
.conv .star { color: #e5a00d; margin-right: 4px; vertical-align: -3px; }
.conv .star .hi { width: 14px; height: 14px; }
.conv .star path { fill: currentColor; }
.step-num .hi { width: 14px; height: 14px; stroke-width: 2.2; }
.search-field { position: relative; display: inline-flex; align-items: center; }
.search-field > span { position: absolute; left: 12px; color: var(--muted-foreground); pointer-events: none; }
.search-field .input { padding-left: 36px; }

/* Mail client head: folder title + mailbox picker, search + compose. */
.mail-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 20px; }
.mail-title h1 { font-size: 28px; letter-spacing: -0.04em; line-height: 1.1; }
.mailbox-pick { margin-top: 10px; display: inline-flex; align-items: center; gap: 8px; background: var(--card); border-radius: 999px; padding: 4px 6px 4px 12px; }
.mailbox-pick > span { color: var(--muted-foreground); }
.mailbox-pick select { border: 0; background: transparent; font: inherit; font-size: 13px; font-weight: 500; color: var(--foreground); padding: 6px 4px; max-width: 70vw; cursor: pointer; }
.mailbox-pick select:focus { outline: none; }
.mail-tools { display: flex; gap: 8px; align-items: center; flex: 1; justify-content: flex-end; min-width: min(100%, 22rem); }
.mail-tools .search-field { flex: 1; max-width: 22rem; }
.mail-tools .search-field .input { width: 100%; }
@media (max-width: 640px) { .mail-tools { flex-wrap: nowrap; } .mail-tools .search-field { max-width: none; } }
.conv-list { box-shadow: none; }

/* Mailbox: setup steps, domain and mailbox cards. */
.setup-steps { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 12px; }
.setup-step { display: flex; align-items: center; gap: 16px; background: var(--card); border-radius: 20px; padding: 18px 20px; }
.setup-step .grow { flex: 1; min-width: 0; }
.setup-step p { margin-top: 2px; }
.setup-num { width: 36px; height: 36px; border-radius: 999px; background: var(--muted); color: var(--muted-foreground); display: grid; place-items: center; font-size: 13px; font-weight: 600; flex-shrink: 0; }
.setup-step.done .setup-num { background: var(--primary); color: var(--primary-foreground); }
.setup-num .hi { width: 16px; height: 16px; stroke-width: 2.2; }
@media (max-width: 560px) { .setup-step { flex-wrap: wrap; } .setup-step .btn { margin-left: 52px; } }
.mini-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.mini-list li { display: flex; align-items: center; justify-content: space-between; gap: 8px; min-width: 0; }
.label-sm { font-size: 12px; }
.tile-icon { width: 40px; height: 40px; border-radius: 14px; background: var(--muted); display: grid; place-items: center; flex-shrink: 0; color: var(--foreground); }
.add-row { display: flex; gap: 8px; }
.add-row .input { flex: 1; max-width: 26rem; }
.checks { display: flex; flex-wrap: wrap; gap: 8px 18px; }
.card-foot { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 16px; border-top: 1px solid var(--border); padding-top: 14px; margin-top: 2px; }
.card-foot .checks { flex: 1; }
.card-foot-stack { border-top: 1px solid var(--border); padding-top: 14px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ── Mail client (inbox.*): Gmail's layout, as the Next inbox draws it ── */
.text-danger { color: var(--destructive); }
.avatar { width: 36px; height: 36px; border-radius: 999px; display: grid; place-items: center; font-size: 12px; font-weight: 600; flex-shrink: 0; }
.avatar-sm { width: 30px; height: 30px; font-size: 11px; }
.avatar-lg { width: 40px; height: 40px; font-size: 13px; }
.avatar-xl { width: 56px; height: 56px; font-size: 18px; }
.avatar-me { background: var(--primary); color: var(--primary-foreground); }
.chip { display: inline-flex; align-items: center; border-radius: 999px; background: var(--muted); color: var(--muted-foreground); padding: 2px 10px; font-size: 12px; }

/* Rail: mailbox switcher, Compose, folder rows, storage. */
.rail-top { padding: 0 16px; }
.rail-top:empty { display: none; }
.mb-switch { position: relative; margin-bottom: 12px; }
.mb-switch > summary { list-style: none; display: flex; align-items: center; gap: 10px; padding: 8px 10px 8px 8px; border-radius: 18px; background: var(--card); cursor: pointer; }
.mb-switch > summary::-webkit-details-marker { display: none; }
.mb-switch > summary:hover { background: color-mix(in oklab, var(--card) 70%, var(--sidebar-accent)); }
.mb-who { min-width: 0; flex: 1; display: flex; flex-direction: column; line-height: 1.25; }
.mb-who b { font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mb-who span { font-size: 12px; color: var(--muted-foreground); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mb-chev { color: var(--muted-foreground); transition: transform 150ms var(--ease); }
.mb-switch[open] .mb-chev { transform: rotate(180deg); }
.mb-menu { position: absolute; left: 0; right: 0; top: calc(100% + 6px); z-index: 50; background: var(--card); border-radius: 18px; padding: 6px; box-shadow: 0 16px 40px -12px rgb(20 18 18 / 0.28); border: 1px solid var(--border); }
.mb-item { display: flex; align-items: center; gap: 10px; padding: 8px; border-radius: 12px; }
.mb-item:hover, .mb-item.current { background: var(--muted); }
.mb-tick { color: var(--primary); }
.mb-manage { border-top: 1px solid var(--border); border-radius: 0 0 12px 12px; margin-top: 4px; padding-top: 10px; font-size: 13px; font-weight: 500; }
.mb-icon { width: 30px; height: 30px; display: grid !important; place-items: center; color: var(--muted-foreground); }
.compose-btn { display: inline-flex; align-items: center; gap: 12px; height: 56px; padding: 0 24px; border-radius: 18px; background: var(--clay-subtle); color: var(--clay-foreground); font-size: 14px; font-weight: 600; margin-bottom: 12px; transition: background 140ms var(--ease), color 140ms var(--ease); }
.compose-btn:hover { background: var(--primary); color: var(--primary-foreground); }
.compose-btn .hi { width: 20px; height: 20px; stroke-width: 1.8; }
.nav-compact { gap: 4px; }
.nav-compact .nav-group-label { padding-bottom: 4px; }
.nav-compact .nav-item { min-height: 36px; gap: 14px; padding: 0 14px 0 12px; font-size: 14px; }
.nav-compact .nav-item .icon { width: auto; height: auto; background: none; border-radius: 0; }
.nav-compact .nav-item.active { background: var(--clay-subtle); color: var(--clay-foreground); }
.nav-compact .nav-item.active .icon .hi { color: var(--clay-foreground); }
.nav-compact .nav-item.active .icon { background: none; }
.nav-compact .nav-count { font-weight: 600; color: var(--foreground); }
.nav-compact .nav-item.active .nav-count { color: var(--clay-foreground); }
.storage { margin-top: 18px; padding: 0 12px; font-size: 12px; color: var(--muted-foreground); }
.storage-line { display: flex; justify-content: space-between; gap: 8px; }
.storage .progress { margin-top: 8px; height: 4px; }
.storage-full { color: var(--destructive); font-weight: 500; margin-bottom: 6px; }

/* The working surface: one white panel, edge to edge in the content area. */
.mail-surface { position: relative; background: var(--card); border-radius: 20px; min-height: calc(100dvh - 56px - 56px); display: flex; flex-direction: column; overflow: hidden; }
.mail-surface ~ .notice, .content-inner > .notice { margin-bottom: 12px; }
.ms-head { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 16px; padding: 18px 20px 12px; }
.ms-title { flex: 1; min-width: 0; }
.ms-title h1 { font-size: 20px; letter-spacing: -0.02em; }
.ms-title p { margin-top: 2px; font-size: 12px; color: var(--muted-foreground); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ms-title .unread { color: var(--primary); font-weight: 500; }
.ms-search { display: flex; align-items: center; gap: 10px; height: 40px; width: 20rem; max-width: 100%; border-radius: 999px; background: var(--muted); padding: 0 16px; transition: background 140ms var(--ease), box-shadow 140ms var(--ease); }
.ms-search:focus-within { background: var(--card); box-shadow: 0 0 0 1px var(--border); }
.ms-search > span { color: var(--muted-foreground); }
.ms-search > span .hi { width: 16px; height: 16px; }
.ms-search input { flex: 1; min-width: 0; border: 0; background: transparent; outline: none; font: inherit; font-size: 14px; color: var(--foreground); }
.ms-toolbar { display: flex; align-items: center; gap: 4px; height: 44px; padding: 0 12px; border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.ms-cb { width: 36px; height: 36px; display: grid; place-items: center; flex-shrink: 0; }
.ms-cb input { width: 16px; height: 16px; accent-color: var(--primary); cursor: pointer; }
.ms-idle { display: inline-flex; align-items: center; gap: 4px; }
.ms-bulk { display: none; align-items: center; gap: 2px; }
.mail-surface:has(.row-check:checked) .ms-idle { display: none; }
.mail-surface:has(.row-check:checked) .ms-bulk { display: inline-flex; }
.ms-range { margin-left: auto; font-size: 12px; color: var(--muted-foreground); font-variant-numeric: tabular-nums; white-space: nowrap; }
.ms-note { padding: 8px 16px; font-size: 12px; color: var(--muted-foreground); border-bottom: 1px solid var(--border); }
.icon-btn { color: var(--foreground); }
.icon-btn:hover { background: var(--muted); }
.ms-list { list-style: none; margin: 0; padding: 0; }
.ms-row { position: relative; display: flex; align-items: center; border-bottom: 1px solid color-mix(in oklab, var(--border) 60%, transparent); background: color-mix(in oklab, var(--muted) 35%, var(--card)); transition: background 120ms var(--ease); }
.ms-row.unread { background: var(--card); }
.ms-row:hover { background: color-mix(in oklab, var(--muted) 70%, var(--card)); z-index: 1; box-shadow: inset 1px 0 0 var(--border), 0 1px 3px rgb(20 18 18 / 0.08); }
.ms-row:has(.row-check:checked) { background: var(--clay-subtle); }
.ms-row.unread::before { content: ""; position: absolute; left: 0; top: 8px; bottom: 8px; width: 3px; border-radius: 0 3px 3px 0; background: var(--primary); }
.ms-lead { display: flex; align-items: center; padding-left: 8px; flex-shrink: 0; }
.ms-star { width: 32px; height: 32px; border: 0; background: transparent; border-radius: 999px; display: grid; place-items: center; cursor: pointer; color: var(--muted-foreground); }
.ms-star:hover { background: var(--muted); color: var(--foreground); }
.ms-star.on { color: #e5a00d; }
.ms-star.on path { fill: currentColor; }
.ms-link { flex: 1; min-width: 0; display: grid; grid-template-columns: 40px minmax(0, 1fr) auto; grid-template-areas: "av who date" "av subj subj" "av prev prev"; column-gap: 12px; align-items: center; padding: 12px 16px 12px 4px; }
.ms-av { grid-area: av; align-self: start; }
.ms-who { grid-area: who; min-width: 0; font-size: 14px; color: color-mix(in oklab, var(--foreground) 78%, transparent); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ms-subj { grid-area: subj; min-width: 0; font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: color-mix(in oklab, var(--foreground) 78%, transparent); }
.ms-prev { display: none; color: var(--muted-foreground); }
.ms-prev-m { grid-area: prev; min-width: 0; font-size: 13px; color: var(--muted-foreground); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ms-date { grid-area: date; font-size: 12px; color: var(--muted-foreground); white-space: nowrap; font-variant-numeric: tabular-nums; }
.ms-row.unread .ms-who, .ms-row.unread .ms-s { font-weight: 600; color: var(--foreground); }
.ms-row.unread .ms-date { color: var(--primary); font-weight: 600; }
.ms-hover { display: none; position: absolute; right: 8px; top: 0; bottom: 0; align-items: center; gap: 2px; }
@media (min-width: 768px) {
  .ms-link { grid-template-columns: 32px 13rem minmax(0, 1fr) auto; grid-template-areas: "av who subj date"; padding: 8px 16px 8px 4px; min-height: 48px; }
  .ms-av { width: 32px; height: 32px; font-size: 11px; align-self: center; }
  .ms-prev { display: inline; }
  .ms-prev-m { display: none; }
  .ms-row:hover .ms-hover, .ms-row:focus-within .ms-hover { display: flex; }
  .ms-row:hover .ms-date, .ms-row:focus-within .ms-date { visibility: hidden; }
}
.ms-empty { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; gap: 8px; padding: 48px 20px; }
.ms-empty h2 { font-size: 16px; }
.ms-empty .btn { margin-top: 8px; }
.ms-empty-icon { width: 56px; height: 56px; border-radius: 18px; background: var(--muted); display: grid !important; place-items: center; color: var(--muted-foreground); margin-bottom: 4px; }
.ms-empty-icon .hi { width: 24px; height: 24px; }
.fab-compose { display: none; }
@media (max-width: 899px) {
  .fab-compose { position: fixed; right: 16px; bottom: 20px; z-index: 30; display: inline-flex; align-items: center; gap: 10px; height: 52px; padding: 0 20px; border-radius: 18px; background: var(--clay-subtle); color: var(--clay-foreground); font-weight: 600; font-size: 14px; box-shadow: 0 10px 30px -10px rgb(20 18 18 / 0.35); }
  .rail-top .compose-btn { display: none; }
}

/* Reading view */
.ms-readbar { display: flex; align-items: center; gap: 2px; height: 56px; padding: 0 10px; border-bottom: 1px solid var(--border); flex-shrink: 0; overflow-x: auto; }
.ms-readbar .sep { width: 1px; height: 20px; background: var(--border); margin: 0 6px; flex-shrink: 0; }
.ms-readbar .icon-btn { width: 40px; height: 40px; flex-shrink: 0; }
.ms-readbar .btn { margin-left: 6px; }
.ms-read { display: grid; gap: 32px; width: 100%; max-width: 72rem; margin: 0 auto; padding: 24px 16px 40px; }
@media (min-width: 640px) { .ms-read { padding: 24px 32px 48px; } }
@media (min-width: 1200px) { .ms-read { grid-template-columns: minmax(0, 1fr) 17rem; } }
.ms-read-main { min-width: 0; }
.ms-subject-row { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; }
.ms-subject-row h1 { font-size: 22px; line-height: 1.3; letter-spacing: -0.02em; word-break: break-word; min-width: 0; }
@media (min-width: 640px) { .ms-subject-row h1 { font-size: 24px; } }
.ms-msgs { margin-top: 20px; display: flex; flex-direction: column; gap: 12px; }
.ms-msg { display: flex; gap: 12px; align-items: flex-start; border: 1px solid color-mix(in oklab, var(--border) 80%, transparent); border-radius: 18px; padding: 16px; }
@media (min-width: 640px) { .ms-msg { padding: 20px; } }
.ms-msg.out { border-color: color-mix(in oklab, var(--primary) 18%, transparent); background: color-mix(in oklab, var(--primary) 2.5%, var(--card)); }
.ms-msg-main { flex: 1; min-width: 0; }
.ms-msg-top { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 2px 12px; }
.ms-msg-top p { font-size: 14px; min-width: 0; }
.ms-body { margin-top: 14px; font-size: 15px; line-height: 1.75; white-space: pre-wrap; word-break: break-word; }
.ms-reply { margin-top: 16px; }
.ms-reply > summary { list-style: none; display: inline-flex; height: 40px; padding: 0 20px; }
.ms-reply > summary::-webkit-details-marker { display: none; }
.ms-reply[open] > summary { display: none; }
@media (min-width: 640px) { .ms-reply { padding-left: 52px; } }
.ms-composer { border: 1px solid var(--border); border-radius: 18px; overflow: hidden; box-shadow: 0 2px 10px -4px rgb(20 18 18 / 0.18); background: var(--card); }
.ms-to { display: flex; align-items: center; gap: 8px; padding: 10px 16px; font-size: 14px; color: var(--muted-foreground); border-bottom: 1px solid color-mix(in oklab, var(--border) 70%, transparent); }
.ms-composer textarea { display: block; width: 100%; min-height: 160px; resize: vertical; border: 0; outline: none; background: transparent; padding: 12px 16px; font: inherit; font-size: 15px; line-height: 1.7; color: var(--foreground); }
.ms-composer-foot { display: flex; align-items: center; gap: 12px; padding: 0 12px 12px; }
.ms-composer-foot .btn { padding: 0 24px; }
.ms-aside { display: none; }
@media (min-width: 1200px) { .ms-aside { display: block; } }
.ms-contact { position: sticky; top: 72px; background: color-mix(in oklab, var(--muted) 50%, transparent); border-radius: 18px; padding: 20px; }
.ms-contact-name { margin-top: 12px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ms-contact dl { margin: 16px 0 0; display: flex; flex-direction: column; gap: 12px; font-size: 14px; }
.ms-contact dt { font-size: 11px; font-weight: 500; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted-foreground); }
.ms-contact dd { margin: 2px 0 0; overflow: hidden; text-overflow: ellipsis; }

/* Gmail's compose window: bottom-right on a desktop, a full sheet on a phone. */
.compose-win { position: fixed; z-index: 60; inset: 0; background: var(--card); display: flex; }
.compose-win form { flex: 1; display: flex; flex-direction: column; min-height: 0; }
@media (min-width: 768px) {
  .compose-win { inset: auto 24px 0 auto; width: min(36rem, calc(100vw - 48px)); height: min(36rem, calc(100dvh - 80px)); border-radius: 16px 16px 0 0; box-shadow: 0 20px 60px -12px rgb(20 18 18 / 0.45); overflow: hidden; border: 1px solid var(--border); }
}
.compose-win header { display: flex; align-items: center; justify-content: space-between; height: 44px; padding: 0 8px 0 16px; background: var(--foreground); color: var(--background); font-size: 14px; flex-shrink: 0; }
.cw-x { width: 32px; height: 32px; border-radius: 999px; display: grid !important; place-items: center; color: inherit; }
.cw-x:hover { background: color-mix(in oklab, var(--background) 15%, transparent); }
.cw-line { display: flex; align-items: center; min-height: 44px; padding: 0 16px; border-bottom: 1px solid var(--border); font-size: 14px; flex-shrink: 0; }
.cw-k { width: 48px; color: var(--muted-foreground); flex-shrink: 0; }
.cw-from { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cw-line input { flex: 1; min-width: 0; border: 0; outline: none; background: transparent; font: inherit; color: var(--foreground); padding: 8px 0; }
.cw-subject { height: 44px; padding: 0 16px; border: 0; border-bottom: 1px solid var(--border); outline: none; background: transparent; font: inherit; font-size: 14px; color: var(--foreground); flex-shrink: 0; }
.cw-body { flex: 1; min-height: 12rem; resize: none; border: 0; outline: none; background: transparent; padding: 16px; font: inherit; font-size: 15px; line-height: 1.6; color: var(--foreground); }
.compose-win footer { display: flex; align-items: center; gap: 8px; padding: 12px 16px; border-top: 1px solid color-mix(in oklab, var(--border) 60%, transparent); flex-shrink: 0; }
.cw-send { padding: 0 28px; height: 40px; }
.cw-discard { margin-left: auto; color: var(--muted-foreground); }
.content-inner:has(> .mail-surface) { padding: 12px 12px 16px; max-width: none; }
@media (min-width: 900px) { .content-inner:has(> .mail-surface) { padding: 12px 12px 12px 0; } .content:has(.mail-surface) { background: var(--sidebar); } }
.mail-surface { min-height: calc(100dvh - 56px - 28px); }
/* Gmail's toast: what just happened, at the bottom, gone after a moment. */
.content-inner:has(> .mail-surface) > .notice { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); z-index: 70; max-width: calc(100vw - 32px); margin: 0; border: 0; border-radius: 12px; padding: 12px 18px; background: var(--foreground); color: var(--background); box-shadow: 0 12px 32px -10px rgb(20 18 18 / 0.5); animation: toast-out 0.3s ease 5s forwards; }
.content-inner:has(> .mail-surface) > .notice-error { background: var(--destructive); color: #fff; animation: none; }
@keyframes toast-out { to { opacity: 0; transform: translate(-50%, 12px); visibility: hidden; } }
.chip { text-transform: none; letter-spacing: 0; font-weight: 500; }
.shell:has(.drawer[open]) .fab-compose { display: none; }
@media (max-width: 767px) {
  /* Gmail on a phone: no checkbox column; filing happens in the open thread. */
  .ms-lead, .ms-toolbar .ms-cb { display: none; }
  .ms-link { padding-left: 16px; }
  .ms-head { padding: 16px 16px 12px; }
  .ms-search { width: 100%; }
  .ms-msg { gap: 10px; padding: 14px; }
  .ms-msg .avatar-lg { width: 32px; height: 32px; font-size: 11px; }
  .ms-read { padding: 20px 14px 96px; }
  .mail-surface { border-radius: 18px; }
}
/* DNS records on a phone: one card per record, labelled, copyable in full. */
@media (max-width: 639px) {
  .records table, .records tbody, .records tr, .records td { display: block; }
  .records thead { display: none; }
  .records tr { padding: 12px 14px; border-bottom: 1px solid var(--border); }
  .records tr:last-child { border-bottom: 0; }
  .records td { padding: 3px 0; border: 0; max-width: none !important; }
  .records td::before { content: attr(data-label); display: block; font-family: var(--font); font-size: 10px; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted-foreground); margin-top: 6px; }
  .records td.break { word-break: normal; overflow-wrap: anywhere; }
  .records tbody tr:hover td { background: none; }
}

/* Accounts: the identity card on sign-in, the account page. */
.btn-block { width: 100%; }
.link-btn { border: 0; background: none; padding: 0; color: var(--primary); cursor: pointer; font: inherit; font-weight: 500; }
.link-btn:hover { text-decoration: underline; }
.btn-continue { gap: 10px; height: 44px; font-weight: 600; }
.btn-continue .initials { width: 24px; height: 24px; font-size: 9px; background: rgb(255 255 255 / .22); color: inherit; }
.or { display: flex; align-items: center; gap: 12px; color: var(--muted-foreground); font-size: 12px; }
.or::before, .or::after { content: ""; flex: 1; height: 1px; background: var(--border); }
.user-pill a.who:hover { text-decoration: underline; }
.acct { min-height: 100dvh; background: var(--sidebar); }
.acct-bar { height: 64px; display: flex; align-items: center; gap: 12px; padding: 0 16px; max-width: 56rem; margin: 0 auto; }
.acct-bar .grow { flex: 1; }
.acct-main { max-width: 56rem; margin: 0 auto; padding: 8px 16px 64px; display: flex; flex-direction: column; gap: 16px; }
.acct-head { display: flex; align-items: center; gap: 16px; padding: 8px 0 8px; }
.acct-head .initials { width: 56px; height: 56px; font-size: 16px; }
.acct-head h1 { font-size: 26px; letter-spacing: -0.03em; }
.acct-head .grow { flex: 1; min-width: 0; }
.acct-photo { width: 56px; height: 56px; border-radius: 999px; object-fit: cover; flex-shrink: 0; }
img.initials.avatar { object-fit: cover; padding: 0; background: var(--muted); }
.acct-ints { display: flex; flex-direction: column; }
.hd-int .card { border: 1px solid var(--hd-line); }
.acct-int { display: flex; align-items: center; gap: 14px; padding: 14px 0; border-bottom: 1px solid var(--border); }
.acct-int:last-child { border-bottom: 0; padding-bottom: 0; }
.acct-int .grow { flex: 1; min-width: 0; } .acct-int .grow p { margin-top: 2px; }
.acct-int-ic { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; background: var(--muted); flex: none; }
.acct-int-ic svg { width: 20px; height: 20px; }
.acct-int-state { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; color: var(--muted-foreground); white-space: nowrap; }
.acct-int-state i { width: 7px; height: 7px; border-radius: 99px; background: var(--border); }
.acct-int-state.ok { color: #16a34a; } .acct-int-state.ok i { background: #16a34a; }
@media (max-width: 560px) { .acct-int { flex-wrap: wrap; } .acct-int .grow { flex-basis: calc(100% - 54px); } .acct-int-state { margin-left: 54px; } .acct-int > a { margin-left: auto; } }
.acct-choices { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 8px; }
.acct-danger details summary { list-style: none; display: inline-flex; cursor: pointer; }
.acct-danger details summary::-webkit-details-marker { display: none; }
.acct-danger details[open] summary { opacity: .6; }
.apps-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.apps-list li { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--border); font-size: 14px; }
.apps-list li:last-child { border-bottom: 0; }
.team-row { display: flex; align-items: center; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--border); flex-wrap: wrap; }
.team-row:last-child { border-bottom: 0; }
.team-row .grow { flex: 1; min-width: 12rem; }
.team-row .initials { width: 36px; height: 36px; }
.usage-row { padding: 14px 0; border-bottom: 1px solid var(--border); }
.usage-row:last-child { border-bottom: 0; }

/* In-page navigation (assets/nav.js): Next-style progress bar along the top. */
.nav-progress { position: fixed; top: 0; left: 0; right: 0; height: 3px; z-index: 1000; background: var(--primary); transform-origin: 0 50%; transform: scaleX(0); pointer-events: none; box-shadow: 0 0 10px color-mix(in oklab, var(--primary) 60%, transparent); }
html[aria-busy="true"] { cursor: progress; }

/* Webmail sign-in (Inbox): one card, centred, like Roundcube. */
.webmail-login { min-height: 100dvh; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 20px; padding: 24px 16px; background: var(--sidebar); }
.webmail-card { width: 100%; max-width: 26rem; background: var(--card); border-radius: 28px; padding: 32px 28px; display: flex; flex-direction: column; gap: 16px; box-shadow: 0 24px 60px -30px rgb(20 18 18 / 0.35); }
.webmail-brand { display: flex; flex-direction: column; align-items: center; gap: 10px; font-weight: 600; font-size: 15px; letter-spacing: -0.02em; margin-bottom: 4px; }
.webmail-card h1 { font-size: 22px; letter-spacing: -0.03em; text-align: center; }
.webmail-card > p.small { text-align: center; margin-top: -8px; }
.webmail-help { text-align: center; line-height: 18px; }
.webmail-foot { text-align: center; }

/* Mailboxes screen: one row per address, the login shown once on top. */
.cred-card { background: var(--card); border: 1px solid color-mix(in oklab, var(--success) 35%, var(--border)); border-radius: 22px; padding: 20px; margin-bottom: 16px; display: flex; flex-direction: column; gap: 16px; }
.cred-head { display: flex; gap: 12px; align-items: flex-start; }
.cred-tick { width: 40px; height: 40px; border-radius: 14px; background: color-mix(in oklab, var(--success) 14%, transparent); color: var(--success); display: grid !important; place-items: center; flex-shrink: 0; }
.cred-head h2 { font-size: 16px; }
.cred-grid { margin: 0; display: grid; gap: 10px; }
@media (min-width: 900px) { .cred-grid { grid-template-columns: 1fr 1.2fr 1.4fr; } }
.cred-grid > div { background: var(--muted); border-radius: 14px; padding: 12px 14px; min-width: 0; }
.cred-grid dt { font-size: 11px; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted-foreground); }
.cred-grid dd { margin: 4px 0 0; min-width: 0; }
.cred-copy { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.cred-copy code { font-family: var(--font-mono, ui-monospace, SFMono-Regular, Menlo, monospace); font-size: 14px; overflow-wrap: anywhere; }
.cred-secret { font-weight: 600; letter-spacing: 0.02em; }
.mbx-list { padding: 0; overflow: visible; }
.mbx-list-head { padding: 18px 20px 12px; border-bottom: 1px solid var(--border); }
.mbx-rows { list-style: none; margin: 0; padding: 0; }
.mbx-row { border-bottom: 1px solid var(--border); }
.mbx-row:last-child { border-bottom: 0; }
.mbx-main { display: grid; grid-template-columns: 40px minmax(0, 1fr); gap: 4px 14px; align-items: center; padding: 16px 20px; }
.mbx-main .avatar { width: 40px; height: 40px; grid-row: span 2; align-self: start; }
.mbx-name { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.mbx-meta { grid-column: 2; display: flex; flex-wrap: wrap; align-items: center; gap: 6px 14px; }
.mbx-actions { grid-column: 2; display: flex; align-items: center; gap: 6px; margin-top: 6px; }
@media (min-width: 900px) {
  .mbx-main { grid-template-columns: 40px minmax(0, 1fr) auto auto; }
  .mbx-main .avatar { grid-row: auto; align-self: center; }
  .mbx-meta { grid-column: auto; flex-direction: column; align-items: flex-end; gap: 2px; }
  .mbx-actions { grid-column: auto; margin-top: 0; }
}
.dot-label { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 500; color: var(--muted-foreground); }
.dot-label::before { content: ""; width: 7px; height: 7px; border-radius: 999px; background: var(--muted-foreground); opacity: 0.5; }
.dot-label.ok { color: var(--success); }
.dot-label.ok::before { background: var(--success); opacity: 1; }
.row-menu { position: relative; }
.row-menu > summary { list-style: none; }
.row-menu > summary::-webkit-details-marker { display: none; }
.row-menu-panel { position: absolute; right: 0; top: calc(100% + 6px); z-index: 20; min-width: 15rem; background: var(--card); border: 1px solid var(--border); border-radius: 16px; padding: 6px; box-shadow: 0 16px 40px -12px rgb(20 18 18 / 0.28); }
.row-menu-panel form { display: block; }
.row-menu-panel button { width: 100%; display: flex; align-items: center; gap: 10px; border: 0; background: transparent; padding: 10px 12px; border-radius: 10px; font: inherit; font-size: 14px; color: var(--foreground); cursor: pointer; text-align: left; }
.row-menu-panel button:hover { background: var(--muted); }
.row-menu-panel button.danger { color: var(--destructive); }
.mbx-access { border-top: 1px dashed var(--border); margin: 0 20px; }
.mbx-access > summary { list-style: none; display: flex; align-items: center; gap: 8px; padding: 10px 0; font-size: 13px; font-weight: 500; color: var(--muted-foreground); cursor: pointer; }
.mbx-access > summary::-webkit-details-marker { display: none; }
.mbx-access > summary:hover { color: var(--foreground); }
.mbx-chev { margin-left: auto; transition: transform 150ms var(--ease); }
.mbx-access[open] .mbx-chev { transform: rotate(180deg); }
.mbx-access-body { display: flex; flex-direction: column; gap: 10px; padding: 0 0 16px; }
.addr-input { display: flex; align-items: center; gap: 6px; }
.addr-input .input { flex: 1; min-width: 0; }
.addr-input .select { flex: 1; min-width: 0; }
.addr-input > span { color: var(--muted-foreground); }
.new-mbx { padding: 24px; gap: 20px; }
.next-steps { margin: 0; padding: 0; list-style: none; counter-reset: step; display: flex; flex-direction: column; gap: 14px; }
.next-steps li { counter-increment: step; display: grid; grid-template-columns: 28px 1fr; column-gap: 12px; }
.next-steps li::before { content: counter(step); grid-row: span 2; width: 28px; height: 28px; border-radius: 999px; background: var(--muted); display: grid; place-items: center; font-size: 12px; font-weight: 600; }
.next-steps b { font-size: 14px; }
a.mbx-who { min-width: 0; border-radius: 10px; }
a.mbx-who:hover .mbx-name b { color: var(--primary); }
.mbx-address { display: inline-flex; align-items: center; gap: 4px; }
.mbx-go { opacity: 0; transition: opacity 120ms var(--ease); color: var(--primary); }
.mbx-go .hi { width: 14px; height: 14px; }
a.mbx-who:hover .mbx-go, a.mbx-who:focus-visible .mbx-go { opacity: 1; }
.form-grid { display: grid; gap: 16px; }
@media (min-width: 900px) { .form-grid { grid-template-columns: 1fr 1.4fr; } }
.pw-field { display: flex; align-items: center; gap: 8px; }
.pw-field .input { flex: 1; min-width: 0; font-family: var(--font-mono, ui-monospace, SFMono-Regular, Menlo, monospace); }
@media (max-width: 560px) { .pw-field { flex-wrap: wrap; } .pw-field .input { flex-basis: 100%; } }
.row-menu-panel a { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 10px; font-size: 14px; color: var(--foreground); }
.row-menu-panel a:hover { background: var(--muted); }
.mbx-hero { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; margin: 14px 0 20px; }
.mbx-hero .grow { flex: 1; min-width: 12rem; }
.mbx-hero h1 { font-size: 28px; letter-spacing: -0.04em; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.mbx-section { margin-bottom: 16px; scroll-margin-top: 72px; }
.mbx-section:target { box-shadow: 0 0 0 2px color-mix(in oklab, var(--primary) 40%, transparent); }
.danger-zone h2 { color: var(--destructive); }
/* Email API: what a domain sends — one of three. */
.purpose-pick { display: grid; gap: 10px; }
@media (min-width: 900px) { .purpose-pick { grid-template-columns: repeat(3, 1fr); } }
.purpose-opt { display: flex; gap: 10px; align-items: flex-start; border: 1px solid var(--border); border-radius: 14px; padding: 12px 14px; cursor: pointer; }
.purpose-opt:has(input:checked) { border-color: var(--primary); background: color-mix(in oklab, var(--primary) 5%, var(--card)); }
.purpose-opt input { margin-top: 3px; accent-color: var(--primary); }
.purpose-opt > span { display: flex; flex-direction: column; gap: 2px; }
.purpose-opt b { font-size: 14px; }
.event-grid { display: grid; gap: 10px; }
@media (min-width: 700px) { .event-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1200px) { .event-grid { grid-template-columns: repeat(3, 1fr); } }

/* ── Work: boards, lists, tasks, sprints, inbox ───────────────────────── */
.wk-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px 16px; flex-wrap: wrap; margin-bottom: 14px; }
.wk-head h1 { font-size: 22px; letter-spacing: -0.03em; display: flex; align-items: center; gap: 10px; }
.wk-key { font-family: var(--mono); font-size: 12px; font-weight: 600; color: var(--muted-foreground); }
.wk-swatch { width: 12px; height: 12px; border-radius: 4px; display: inline-block; flex: none; }
.wk-tabs { display: flex; gap: 4px; background: var(--muted); border-radius: 999px; padding: 3px; }
.wk-tabs a { display: inline-flex; align-items: center; gap: 6px; padding: 6px 14px; border-radius: 999px; font-size: 13px; font-weight: 500; color: var(--muted-foreground); }
.wk-tabs a .hi { width: 16px; height: 16px; }
.wk-tabs a.active { background: var(--card); color: var(--foreground); box-shadow: 0 1px 2px rgb(20 18 18 / 0.08); }
.wk-filters { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin-bottom: 14px; }
.wk-filters .select, .wk-filters .input { height: 34px; width: auto; min-width: 140px; font-size: 13px; border-radius: 10px; padding: 2px 10px; }
.wk-filters .input { min-width: 180px; }

.wk-board { display: flex; gap: 12px; overflow-x: auto; align-items: flex-start; padding-bottom: 12px; scroll-snap-type: x proximity; }
.wk-col { flex: 1 0 260px; max-width: 360px; background: var(--muted); border-radius: 16px; padding: 8px; display: flex; flex-direction: column; max-height: calc(100dvh - 230px); scroll-snap-align: start; }
.wk-col-head { display: flex; align-items: center; gap: 8px; padding: 6px 8px 10px; font-size: 13px; font-weight: 600; }
.wk-col-head .count { color: var(--muted-foreground); font-weight: 500; }
.wk-col-head .grow { flex: 1; }
.wk-col-head a { color: var(--muted-foreground); display: inline-flex; border-radius: 8px; padding: 2px; }
.wk-col-head a:hover { background: var(--card); color: var(--foreground); }
.wk-col-head .hi { width: 16px; height: 16px; }
.wk-col-body { flex: 1; overflow-y: auto; display: flex; flex-direction: column; gap: 8px; min-height: 64px; border-radius: 12px; padding: 2px; transition: background 120ms; }
.wk-col-body.over { background: color-mix(in oklab, var(--primary) 8%, transparent); outline: 2px dashed color-mix(in oklab, var(--primary) 40%, transparent); outline-offset: -2px; }
.wk-card { display: block; background: var(--card); border-radius: 12px; padding: 10px 12px; border: 1px solid transparent; box-shadow: 0 1px 2px rgb(20 18 18 / 0.06); cursor: grab; transition: border-color 120ms, box-shadow 120ms; }
.wk-card:hover { border-color: var(--border); box-shadow: 0 4px 14px -6px rgb(20 18 18 / 0.18); }
.wk-card.dragging { opacity: 0.45; }
.wk-card-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.wk-card-title { margin: 6px 0 8px; font-size: 14px; font-weight: 500; line-height: 20px; overflow-wrap: anywhere; }
.wk-meta { display: flex; align-items: center; gap: 6px 10px; flex-wrap: wrap; font-size: 12px; color: var(--muted-foreground); }
.wk-meta .hi { width: 14px; height: 14px; }
.wk-meta span { display: inline-flex; align-items: center; gap: 4px; }
.wk-meta .late { color: var(--destructive); font-weight: 500; }
.wk-meta .grow { flex: 1; }

.wk-prio { display: inline-flex; align-items: flex-end; gap: 2px; height: 12px; }
.wk-prio i { width: 3px; border-radius: 1px; background: var(--border); }
.wk-prio i:nth-child(1) { height: 5px; } .wk-prio i:nth-child(2) { height: 8px; } .wk-prio i:nth-child(3) { height: 12px; }
.wk-prio.p2 i, .wk-prio.p3 i:nth-child(-n+2), .wk-prio.p4 i:nth-child(1) { background: var(--foreground); }
.wk-prio.p1 { width: 14px; height: 14px; border-radius: 4px; background: var(--destructive); color: #fff; font-size: 11px; font-weight: 700; align-items: center; justify-content: center; }
.wk-av { width: 22px; height: 22px; border-radius: 999px; display: inline-flex; align-items: center; justify-content: center; font-size: 10px; font-weight: 600; color: #fff; flex: none; }
.wk-av-lg { width: 28px; height: 28px; font-size: 11px; }
.wk-av-none { background: transparent !important; border: 1.5px dashed var(--border); }
.wk-av-img { object-fit: cover; background: var(--muted); }
.wk-label { display: inline-flex; align-items: center; gap: 5px; border: 1px solid var(--border); border-radius: 999px; padding: 0 8px; font-size: 11px; line-height: 18px; color: var(--foreground); }
.wk-label i { width: 7px; height: 7px; border-radius: 999px; }
.wk-dot { width: 12px; height: 12px; border-radius: 999px; border: 2px solid currentColor; flex: none; display: inline-block; }
.wk-dot.started { background: linear-gradient(90deg, currentColor 50%, transparent 50%); }
.wk-dot.done { background: currentColor; }
.wk-dot.cancelled { opacity: 0.5; background: currentColor; }
.wk-dot.backlog { border-style: dashed; }

.wk-list { background: var(--card); border-radius: 16px; overflow: hidden; }
.wk-group { display: flex; align-items: center; gap: 8px; padding: 10px 16px; background: color-mix(in oklab, var(--muted) 60%, transparent); font-size: 13px; font-weight: 600; }
.wk-group .count { color: var(--muted-foreground); font-weight: 500; }
.wk-row { display: grid; grid-template-columns: 16px 76px minmax(0, 1fr) auto; align-items: center; gap: 12px; padding: 10px 16px; border-top: 1px solid var(--border); font-size: 14px; }
.wk-row:first-child { border-top: 0; }
.wk-row:hover { background: color-mix(in oklab, var(--muted) 45%, transparent); }
.wk-row .title { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 500; }
.wk-row .wk-meta { justify-content: flex-end; flex-wrap: nowrap; }
.wk-row .project { color: var(--muted-foreground); font-size: 12px; }
.wk-empty-row { padding: 18px 16px; color: var(--muted-foreground); font-size: 13px; }

.wk-tiles { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 12px; }
.wk-tiles .tile { padding: 16px; }
.wk-tiles .tile .value { font-size: 22px; }
.wk-tiles .tile.warn .value { color: var(--destructive); }
.wk-home { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 16px; align-items: start; margin-top: 16px; }
.wk-progress { height: 6px; border-radius: 999px; background: var(--muted); overflow: hidden; }
.wk-progress > i { display: block; height: 100%; background: var(--success); border-radius: 999px; }

.wk-projects { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 12px; }
.wk-project { display: flex; flex-direction: column; gap: 10px; background: var(--card); border-radius: 16px; padding: 18px; border: 1px solid transparent; }
.wk-project:hover { border-color: var(--border); }
.wk-project h3 { font-size: 15px; letter-spacing: -0.02em; display: flex; align-items: center; gap: 8px; }
.wk-project p { color: var(--muted-foreground); font-size: 13px; line-height: 20px; min-height: 20px; }

.wk-task { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 16px; align-items: start; }
.wk-task-main { background: var(--card); border-radius: 20px; padding: 22px; display: flex; flex-direction: column; gap: 18px; min-width: 0; }
.wk-title-input { border: 0; outline: none; width: 100%; font-size: 22px; font-weight: 600; letter-spacing: -0.03em; background: transparent; padding: 0; }
.wk-desc { border: 1px solid transparent; border-radius: 12px; background: transparent; width: 100%; min-height: 140px; resize: vertical; padding: 8px 10px; margin-left: -10px; font-size: 14px; line-height: 22px; outline: none; }
.wk-desc:hover { border-color: var(--border); }
.wk-desc:focus { border-color: var(--ring); background: var(--card); }
.wk-section-title { font-size: 13px; font-weight: 600; display: flex; align-items: center; gap: 8px; }
.wk-props { background: var(--card); border-radius: 20px; padding: 10px; display: flex; flex-direction: column; position: sticky; top: 12px; }
.wk-prop { display: grid; grid-template-columns: 96px minmax(0, 1fr); align-items: center; gap: 8px; padding: 4px 8px; min-height: 40px; }
.wk-prop > span { font-size: 12px; color: var(--muted-foreground); }
.wk-prop form { margin: 0; min-width: 0; }
.wk-pick { width: 100%; border: 1px solid transparent; background: transparent; border-radius: 10px; height: 32px; padding: 0 8px; font-size: 13px; cursor: pointer; outline: none; }
.wk-pick:hover { background: var(--muted); }
.wk-pick:focus { border-color: var(--ring); background: var(--card); }
.wk-props hr { border: 0; border-top: 1px solid var(--border); margin: 6px 8px; }
.wk-labels-pick summary { list-style: none; cursor: pointer; padding: 6px 8px; border-radius: 10px; display: flex; gap: 4px; flex-wrap: wrap; font-size: 13px; }
.wk-labels-pick summary::-webkit-details-marker { display: none; }
.wk-labels-pick summary:hover { background: var(--muted); }
.wk-labels-pick .panel { display: flex; flex-direction: column; gap: 6px; padding: 8px; }
.wk-sub { display: flex; flex-direction: column; border: 1px solid var(--border); border-radius: 12px; overflow: hidden; }
.wk-sub .wk-row { grid-template-columns: 16px 70px minmax(0, 1fr) auto; padding: 8px 12px; }
.wk-sub form { display: flex; gap: 8px; padding: 8px; border-top: 1px solid var(--border); }
.wk-sub form .input { height: 34px; }
.wk-sub:has(.wk-row) form { border-top: 1px solid var(--border); }
.wk-sub > form:first-child { border-top: 0; }
.wk-feed { display: flex; flex-direction: column; gap: 12px; }
.wk-event { display: flex; gap: 10px; align-items: center; font-size: 12px; color: var(--muted-foreground); padding-left: 4px; }
.wk-event b { color: var(--foreground); font-weight: 500; }
.wk-comment { display: flex; gap: 10px; }
.wk-comment .body { flex: 1; min-width: 0; background: var(--background); border-radius: 14px; padding: 10px 14px; }
.wk-comment .body p { white-space: pre-wrap; overflow-wrap: anywhere; line-height: 21px; margin-top: 4px; }
.wk-comment .who { display: flex; gap: 8px; align-items: center; font-size: 12px; color: var(--muted-foreground); }
.wk-comment .who b { color: var(--foreground); font-weight: 600; font-size: 13px; }
.wk-composer { display: flex; flex-direction: column; gap: 8px; }
.wk-composer .textarea { min-height: 84px; }

.wk-inbox { background: var(--card); border-radius: 16px; overflow: hidden; }
.wk-note { display: grid; grid-template-columns: 10px 28px minmax(0, 1fr) auto; gap: 12px; align-items: center; padding: 12px 16px; border-top: 1px solid var(--border); }
.wk-note:first-child { border-top: 0; }
.wk-note:hover { background: color-mix(in oklab, var(--muted) 45%, transparent); }
.wk-note .unread-dot { width: 8px; height: 8px; border-radius: 999px; background: var(--primary); }
.wk-note .t { font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.wk-note .b { font-size: 13px; color: var(--muted-foreground); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; margin-top: 2px; }
.wk-note.unread .t { font-weight: 600; }
.wk-note .side { display: flex; align-items: center; gap: 8px; font-size: 12px; color: var(--muted-foreground); white-space: nowrap; }
.wk-note .side form { margin: 0; }

.wk-sprint { background: var(--card); border-radius: 16px; overflow: hidden; }
.wk-sprint-head { display: flex; align-items: center; gap: 10px 14px; flex-wrap: wrap; padding: 14px 16px; }
.wk-sprint-head h3 { font-size: 15px; letter-spacing: -0.02em; }
.wk-sprint-head .grow { flex: 1; }
.wk-sprint .wk-row { grid-template-columns: 16px 76px minmax(0, 1fr) auto auto; }
.wk-move { height: 30px; border: 1px solid var(--border); background: var(--card); border-radius: 8px; font-size: 12px; padding: 0 6px; max-width: 150px; }
.wk-swatches { display: flex; gap: 8px; flex-wrap: wrap; }
.wk-swatches label { cursor: pointer; }
.wk-swatches input { position: absolute; opacity: 0; pointer-events: none; }
.wk-swatches span { display: block; width: 28px; height: 28px; border-radius: 9px; border: 3px solid var(--card); box-shadow: 0 0 0 1px var(--border); }
.wk-swatches input:checked + span { box-shadow: 0 0 0 2px var(--foreground); }
.wk-workflow .wk-row { grid-template-columns: 16px minmax(0, 1fr) 140px 60px auto; }
.wk-workflow .input, .wk-workflow .select { height: 34px; font-size: 13px; }
.wk-workflow input[type=color] { width: 44px; height: 32px; padding: 2px; border-radius: 8px; border: 1px solid var(--border); background: var(--card); }
.rail-top .wk-new { width: 100%; justify-content: center; }
.rail-top .wk-search { margin-top: 8px; }
.rail-top .wk-search .input { height: 36px; font-size: 13px; background: var(--card); }
.nav-item .wk-swatch { width: 10px; height: 10px; margin: 0 7px; }

@media (max-width: 1100px) {
  .wk-tiles { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .wk-home { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 900px) {
  .wk-task { grid-template-columns: minmax(0, 1fr); }
  .wk-props { position: static; order: -1; }
}
@media (max-width: 640px) {
  .wk-tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .wk-col { flex-basis: 84vw; }
  .wk-row { grid-template-columns: 16px minmax(0, 1fr) auto; }
  .wk-row .wk-key { display: none; }
  .wk-row .hide-sm { display: none; }
  .wk-sprint .wk-row { grid-template-columns: 16px minmax(0, 1fr) auto; }
  .wk-sprint .wk-row .wk-move { grid-column: 2 / -1; max-width: none; }
  .wk-workflow .wk-row { grid-template-columns: 16px minmax(0, 1fr); }
  .wk-task-main { padding: 16px; }
  .wk-note { grid-template-columns: 10px minmax(0, 1fr) auto; }
  .wk-note .wk-av { display: none; }
  .wk-tabs { width: 100%; overflow-x: auto; }
  .wk-filters .select, .wk-filters .input { flex: 1 1 140px; min-width: 0; }
}

/* ── Work, phase 2: views, calendar, timeline, reports, bulk, palette ──── */
.wk-views { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; margin: -4px 0 12px; }
.wk-views a { display: inline-flex; align-items: center; gap: 6px; border-radius: 999px; padding: 4px 12px; font-size: 12px; font-weight: 500; background: var(--card); border: 1px solid var(--border); }
.wk-views a.active { background: var(--foreground); color: var(--background); border-color: var(--foreground); }
.wk-views .shared { font-size: 10px; opacity: 0.7; }
.wk-views form { margin: 0; }
.wk-save summary { list-style: none; cursor: pointer; font-size: 12px; font-weight: 500; color: var(--muted-foreground); padding: 4px 8px; border-radius: 999px; }
.wk-save summary::-webkit-details-marker { display: none; }
.wk-save summary:hover { color: var(--foreground); background: var(--muted); }

.wk-cal { background: var(--card); border-radius: 16px; overflow: hidden; }
.wk-cal-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); }
.wk-cal-dow { padding: 8px 10px; font-size: 11px; font-weight: 600; color: var(--muted-foreground); text-transform: uppercase; letter-spacing: 0.06em; border-bottom: 1px solid var(--border); }
.wk-cal-day { min-height: 116px; padding: 6px; border-right: 1px solid var(--border); border-bottom: 1px solid var(--border); display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.wk-cal-day:nth-child(7n) { border-right: 0; }
.wk-cal-day.out { background: color-mix(in oklab, var(--muted) 45%, transparent); }
.wk-cal-day .n { font-size: 12px; font-weight: 600; color: var(--muted-foreground); padding: 2px 4px; display: flex; justify-content: space-between; }
.wk-cal-day.today .n b { background: var(--primary); color: #fff; border-radius: 999px; min-width: 22px; height: 22px; display: inline-flex; align-items: center; justify-content: center; }
.wk-cal-day .n a { opacity: 0; color: var(--muted-foreground); }
.wk-cal-day:hover .n a { opacity: 1; }
.wk-chip { display: flex; align-items: center; gap: 6px; font-size: 12px; line-height: 16px; padding: 3px 6px; border-radius: 7px; background: var(--background); overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.wk-chip:hover { background: var(--muted); }
.wk-chip .wk-dot { width: 9px; height: 9px; border-width: 1.5px; }
.wk-chip.done { color: var(--muted-foreground); text-decoration: line-through; }
.wk-chip.late { color: var(--destructive); }
.wk-cal-nav { display: flex; align-items: center; gap: 8px; }
.wk-cal-nav h2 { font-size: 16px; min-width: 150px; text-align: center; }

.wk-tl { background: var(--card); border-radius: 16px; overflow-x: auto; }
.wk-tl-inner { min-width: 900px; }
.wk-tl-row { display: grid; grid-template-columns: 220px minmax(0, 1fr); border-top: 1px solid var(--border); min-height: 38px; }
.wk-tl-row:first-child { border-top: 0; }
.wk-tl-label { padding: 8px 14px; font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; display: flex; align-items: center; gap: 8px; border-right: 1px solid var(--border); }
.wk-tl-label .wk-key { flex: none; }
.wk-tl-track { position: relative; background-image: repeating-linear-gradient(90deg, transparent 0, transparent calc(100% / var(--weeks) - 1px), var(--border) calc(100% / var(--weeks) - 1px), var(--border) calc(100% / var(--weeks))); }
.wk-tl-head .wk-tl-track { display: grid; grid-template-columns: repeat(var(--weeks), minmax(0, 1fr)); background: none; }
.wk-tl-head .wk-tl-track span { font-size: 11px; color: var(--muted-foreground); padding: 10px 6px; border-left: 1px solid var(--border); white-space: nowrap; overflow: hidden; }
.wk-tl-head .wk-tl-label { font-size: 11px; font-weight: 600; color: var(--muted-foreground); text-transform: uppercase; letter-spacing: 0.06em; }
.wk-tl-bar { position: absolute; top: 8px; bottom: 8px; border-radius: 7px; min-width: 10px; display: flex; align-items: center; padding: 0 8px; font-size: 11px; font-weight: 600; color: #fff; overflow: hidden; white-space: nowrap; }
.wk-tl-bar.sprint { background: color-mix(in oklab, var(--primary) 85%, black); }
.wk-tl-bar.sprint.done { background: var(--muted-foreground); }
.wk-tl-bar.task { background: color-mix(in oklab, var(--foreground) 12%, transparent); color: var(--foreground); font-weight: 500; }
.wk-tl-bar.task.done { opacity: 0.5; }
.wk-tl-bar.task.late { background: color-mix(in oklab, var(--destructive) 18%, transparent); color: var(--destructive); }
.wk-tl-today { position: absolute; top: 0; bottom: 0; width: 2px; background: var(--primary); z-index: 1; }
.wk-tl-group { background: color-mix(in oklab, var(--muted) 60%, transparent); font-size: 12px; font-weight: 600; padding: 8px 14px; border-top: 1px solid var(--border); }

.wk-report { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 16px; align-items: start; }
.wk-chart { width: 100%; height: auto; display: block; }
.wk-chart .grid { stroke: var(--border); stroke-width: 1; }
.wk-chart .ideal { stroke: var(--muted-foreground); stroke-dasharray: 5 5; stroke-width: 1.5; fill: none; }
.wk-chart .actual { stroke: var(--primary); stroke-width: 2.5; fill: none; stroke-linejoin: round; }
.wk-chart .area { fill: color-mix(in oklab, var(--primary) 10%, transparent); }
.wk-chart text { font-size: 11px; fill: var(--muted-foreground); font-family: var(--font); }
.wk-legend { display: flex; gap: 16px; font-size: 12px; color: var(--muted-foreground); }
.wk-legend i { display: inline-block; width: 18px; height: 0; border-top: 2.5px solid var(--primary); vertical-align: middle; margin-right: 6px; }
.wk-legend i.ideal { border-top: 1.5px dashed var(--muted-foreground); }

.wk-bulk { position: sticky; bottom: 16px; z-index: 20; display: none; align-items: center; gap: 8px; flex-wrap: wrap; margin-top: 12px; background: var(--foreground); color: var(--background); border-radius: 16px; padding: 10px 14px; box-shadow: 0 16px 40px -12px rgb(20 18 18 / 0.5); }
form:has(.row-check:checked) .wk-bulk { display: flex; }
.wk-bulk .select { height: 32px; width: auto; font-size: 13px; background: var(--card); color: var(--foreground); border-radius: 10px; padding: 0 8px; }
.wk-bulk .count { font-weight: 600; font-size: 13px; margin-right: 4px; }
.wk-list.selectable .wk-row { grid-template-columns: 18px 16px 76px minmax(0, 1fr) auto; }
.wk-list.selectable .wk-row .title { color: inherit; }
.wk-list.selectable .row-check { width: 16px; height: 16px; accent-color: var(--primary); margin: 0; }
.wk-list.selectable .wk-group input { width: 16px; height: 16px; accent-color: var(--primary); margin: 0; }

.wk-palette { position: fixed; inset: 0; z-index: 100; background: rgb(20 18 18 / 0.35); display: flex; justify-content: center; align-items: flex-start; padding: 12vh 16px 16px; }
.wk-palette[hidden] { display: none; }
.wk-palette-box { width: min(640px, 100%); background: var(--card); border-radius: 18px; box-shadow: 0 30px 80px -20px rgb(20 18 18 / 0.5); overflow: hidden; }
.wk-palette-box input { width: 100%; border: 0; outline: none; font-size: 16px; padding: 16px 18px; border-bottom: 1px solid var(--border); background: transparent; }
.wk-palette-list { max-height: 50vh; overflow-y: auto; padding: 6px; }
.wk-palette-list a { display: flex; align-items: center; gap: 10px; padding: 9px 12px; border-radius: 10px; font-size: 14px; }
.wk-palette-list a .hint { margin-left: auto; font-size: 12px; color: var(--muted-foreground); }
.wk-palette-list a.on { background: var(--muted); }
.wk-palette-list .sec { font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.06em; color: var(--muted-foreground); padding: 10px 12px 4px; }
.wk-palette-foot { display: flex; gap: 14px; padding: 8px 14px; border-top: 1px solid var(--border); font-size: 11px; color: var(--muted-foreground); }
kbd { font-family: var(--font); font-size: 11px; border: 1px solid var(--border); border-bottom-width: 2px; border-radius: 5px; padding: 0 5px; background: var(--card); color: var(--muted-foreground); }
.wk-search-hint { display: flex; justify-content: space-between; align-items: center; width: 100%; height: 36px; border: 1px solid var(--border); border-radius: 12px; background: var(--card); padding: 0 10px 0 14px; font-size: 13px; color: var(--muted-foreground); cursor: pointer; margin-top: 8px; }

.wk-mention { color: var(--primary); font-weight: 600; }
.wk-ac { position: absolute; z-index: 60; background: var(--card); border: 1px solid var(--border); border-radius: 12px; box-shadow: 0 12px 30px -10px rgb(20 18 18 / 0.3); padding: 4px; min-width: 220px; }
.wk-ac button { display: flex; width: 100%; gap: 8px; align-items: center; border: 0; background: none; padding: 7px 10px; border-radius: 8px; font-size: 13px; text-align: left; cursor: pointer; }
.wk-ac button.on, .wk-ac button:hover { background: var(--muted); }
.wk-ac button span { color: var(--muted-foreground); font-size: 12px; }

.wk-rule { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; gap: 10px; align-items: center; padding: 10px 14px; border-top: 1px solid var(--border); font-size: 14px; }
.wk-rule:first-child { border-top: 0; }
.wk-rule.off { color: var(--muted-foreground); }
.wk-rule-form { display: grid; grid-template-columns: auto minmax(0, 1fr) minmax(0, 1fr) auto minmax(0, 1fr) minmax(0, 1fr) auto; gap: 8px; align-items: center; }
.wk-rule-form .select { height: 36px; font-size: 13px; }

@media (max-width: 900px) {
  .wk-report { grid-template-columns: minmax(0, 1fr); }
  .wk-rule-form { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 640px) {
  .wk-cal-day { min-height: 72px; padding: 3px; }
  .wk-chip { font-size: 10px; padding: 2px 4px; }
  .wk-chip .wk-key, .wk-chip .wk-dot { display: none; }
  .wk-cal-dow { padding: 6px 4px; font-size: 10px; }
  .wk-list.selectable .wk-row { grid-template-columns: 18px 16px minmax(0, 1fr) auto; }
  .wk-palette { padding-top: 8vh; }
}
.wk-head > .row { min-width: 0; max-width: 100%; }
.wk-tabs { max-width: 100%; overflow-x: auto; scrollbar-width: none; }
.wk-tabs a { flex: none; }
.wk-search-hint { min-width: 0; overflow: hidden; white-space: nowrap; }
@media (max-width: 900px) { .wk-search-hint kbd { display: none; } }
@media (max-width: 640px) {
  .wk-head > .row { width: 100%; }
  .wk-row .wk-meta { min-width: 0; overflow: hidden; }
  .wk-row .wk-label, .wk-row .wk-meta > span:not(.late) { display: none; }
}
@media (max-width: 640px) {
  .wk-cal-nav { flex-wrap: wrap; }
  .wk-cal-nav h2 { min-width: 0 !important; font-size: 14px; }
}
.wk-palette-list a[hidden], .wk-palette-list .sec[hidden] { display: none; }

/* ── Work shell: sidebar, header bar, sections ─────────────────────────── */
.wk-app { display: grid; grid-template-columns: 272px minmax(0, 1fr); min-height: 100dvh; background: var(--card); }
/* Work in dark mode: the tokens change on the whole page, so menus, the
   palette and toasts added to <body> follow too. */
:root:has(.wk-app[data-theme="dark"]), :root:has(.su-app[data-theme="dark"]), :root:has(.sp-app[data-theme="dark"]), :root:has(.ad-app[data-theme="dark"]), :root:has(.on-app[data-theme="dark"]), :root:has(.ib-app[data-theme="dark"]), :root:has(.fm-app[data-theme="dark"]), :root:has(.dk-app[data-theme="dark"]), :root:has(.se-app[data-theme="dark"]) {
  --background: #121112; --foreground: #f3efee; --card: #1b1a1b; --card-foreground: #f3efee;
  --secondary: #2a282a; --muted: #262426; --muted-foreground: #a39e9c; --accent: #2a282a;
  --border: #2f2c2e; --input: #3a3638; --sidebar: #171617; --sidebar-foreground: #f3efee; --sidebar-accent: #2a282a; --sidebar-border: #2f2c2e;
  --clay-subtle: #3a1a24; --clay-foreground: #ffb3c4; color-scheme: dark;
}
:root:has(.wk-app[data-theme="dark"]) body, :root:has(.su-app[data-theme="dark"]) body, :root:has(.sp-app[data-theme="dark"]) body, :root:has(.ad-app[data-theme="dark"]) body, :root:has(.on-app[data-theme="dark"]) body, :root:has(.ib-app[data-theme="dark"]) body, :root:has(.fm-app[data-theme="dark"]) body, :root:has(.dk-app[data-theme="dark"]) body, :root:has(.se-app[data-theme="dark"]) body { background: var(--background); color: var(--foreground); }
.wk-app[data-theme="dark"] .wk-flag.repeat { color: #a5b4fc; }
[data-theme="dark"] .mark img { filter: none; }
.wk-side { position: sticky; top: 0; height: 100dvh; display: flex; flex-direction: column; gap: 4px; padding: 18px 14px 14px; border-right: 1px solid var(--border); background: var(--card); overflow-y: auto; }
.wk-side-brand { display: flex; align-items: center; gap: 10px; padding: 2px 6px 12px; }
.wk-side-brand .mark { width: 34px; height: 34px; border-radius: 10px; }
.wk-side-brand b { font-size: 18px; letter-spacing: -0.03em; }
.wk-side-brand .team { font-size: 12px; color: var(--muted-foreground); display: block; font-weight: 400; letter-spacing: 0; }
.wk-side-search { display: flex; align-items: center; gap: 8px; width: 100%; height: 40px; border: 1px solid var(--border); border-radius: 12px; background: var(--card); padding: 0 8px 0 12px; font-size: 14px; color: var(--muted-foreground); cursor: pointer; box-shadow: 0 1px 2px rgb(20 18 18 / 0.04); }
.wk-side-search:hover { border-color: color-mix(in oklab, var(--foreground) 22%, var(--border)); }
.wk-side-search .hi { width: 18px; height: 18px; }
.wk-side-search span { flex: 1; text-align: left; }
.wk-side-search kbd + kbd { margin-left: 2px; }
.wk-side .wk-new { margin: 10px 0 6px; justify-content: center; }
.wk-side-label { display: flex; align-items: center; justify-content: space-between; padding: 14px 10px 6px; font-size: 12px; color: var(--muted-foreground); }
.wk-side-label a { display: inline-flex; color: var(--muted-foreground); border-radius: 6px; }
.wk-side-label a:hover { color: var(--foreground); background: var(--muted); }
.wk-side-label .hi { width: 16px; height: 16px; }
.wk-link { position: relative; display: flex; align-items: center; gap: 12px; height: 40px; padding: 0 10px; border-radius: 10px; font-size: 14px; color: color-mix(in oklab, var(--foreground) 78%, transparent); }
.wk-link .hi { width: 20px; height: 20px; flex: none; }
.wk-link:hover { background: color-mix(in oklab, var(--muted) 70%, transparent); color: var(--foreground); }
.wk-link.on { background: var(--clay-subtle); color: var(--clay-foreground); font-weight: 600; }
.wk-link.on::before { content: ""; position: absolute; left: -14px; top: 8px; bottom: 8px; width: 3px; border-radius: 0 3px 3px 0; background: var(--primary); }
.wk-link .badge-n { margin-left: auto; min-width: 20px; height: 20px; border-radius: 999px; background: var(--primary); color: #fff; font-size: 11px; font-weight: 600; display: inline-flex; align-items: center; justify-content: center; padding: 0 6px; }
.wk-side hr { border: 0; border-top: 1px solid var(--border); margin: 10px 4px 0; }
.wk-proj > summary { list-style: none; display: flex; align-items: center; gap: 10px; height: 38px; padding: 0 10px; border-radius: 10px; font-size: 14px; cursor: pointer; color: color-mix(in oklab, var(--foreground) 82%, transparent); }
.wk-proj > summary::-webkit-details-marker { display: none; }
.wk-proj > summary:hover { background: color-mix(in oklab, var(--muted) 70%, transparent); }
.wk-proj > summary .name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.wk-proj > summary .n { font-size: 12px; color: var(--muted-foreground); }
.wk-proj > summary .chev { display: inline-flex; color: var(--muted-foreground); transition: transform 0.15s; }
.wk-proj > summary .chev .hi { width: 14px; height: 14px; }
.wk-proj[open] > summary .chev { transform: rotate(180deg); }
.wk-proj.on > summary { font-weight: 600; color: var(--foreground); }
.wk-proj-sub { display: flex; flex-direction: column; margin: 2px 0 6px 21px; padding-left: 10px; border-left: 1px solid var(--border); }
.wk-proj-sub a { display: flex; align-items: center; gap: 9px; height: 32px; padding: 0 8px; border-radius: 8px; font-size: 13px; color: var(--muted-foreground); }
.wk-proj-sub a .hi { width: 16px; height: 16px; }
.wk-proj-sub a:hover { background: color-mix(in oklab, var(--muted) 70%, transparent); color: var(--foreground); }
.wk-proj-sub a.on { color: var(--foreground); font-weight: 600; background: var(--muted); }
.wk-proj-sub .live { margin-left: auto; width: 7px; height: 7px; border-radius: 999px; background: var(--success); }
.wk-see-all { display: flex; align-items: center; justify-content: center; gap: 6px; height: 32px; margin-top: 4px; border-radius: 10px; background: color-mix(in oklab, var(--muted) 60%, transparent); font-size: 13px; color: var(--muted-foreground); }
.wk-see-all:hover { color: var(--foreground); }
.wk-side .grow { flex: 1; min-height: 12px; }
.wk-teamcard { position: relative; }
.wk-teamcard > summary { list-style: none; display: flex; align-items: center; gap: 12px; padding: 10px 12px; border: 1px solid var(--border); border-radius: 14px; cursor: pointer; box-shadow: 0 1px 2px rgb(20 18 18 / 0.04); }
.wk-teamcard > summary::-webkit-details-marker { display: none; }
.wk-teamcard .logo { width: 38px; height: 38px; border-radius: 10px; background: var(--primary); color: #fff; font-weight: 700; display: inline-flex; align-items: center; justify-content: center; font-size: 14px; flex: none; }
.wk-teamcard .who { flex: 1; min-width: 0; line-height: 18px; }
.wk-teamcard .who b { display: block; font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.wk-teamcard .who span { font-size: 12px; color: var(--muted-foreground); }
.wk-teamcard .menu { position: absolute; bottom: calc(100% + 8px); left: 0; right: 0; background: var(--card); border: 1px solid var(--border); border-radius: 14px; box-shadow: 0 18px 40px -16px rgb(20 18 18 / 0.35); padding: 6px; z-index: 30; }
.wk-teamcard .menu a, .wk-teamcard .menu button { display: flex; align-items: center; gap: 10px; width: 100%; padding: 9px 10px; border-radius: 9px; font-size: 13px; border: 0; background: none; cursor: pointer; text-align: left; }
.wk-teamcard .menu a:hover, .wk-teamcard .menu button:hover { background: var(--muted); }
.wk-teamcard .menu .hi { width: 16px; height: 16px; }
.wk-teamcard .menu .me { padding: 8px 10px 10px; border-bottom: 1px solid var(--border); margin-bottom: 4px; font-size: 12px; color: var(--muted-foreground); }
.wk-teamcard .menu .me b { display: block; color: var(--foreground); font-size: 13px; }

.wk-main { min-width: 0; display: flex; flex-direction: column; }
.wk-top { position: sticky; top: 0; z-index: 25; display: flex; align-items: center; gap: 14px; min-height: 72px; padding: 12px 32px; background: color-mix(in oklab, var(--card) 92%, transparent); backdrop-filter: blur(10px); border-bottom: 1px solid var(--border); }
.wk-top h1 { font-size: 22px; letter-spacing: -0.035em; flex: 1; min-width: 0; display: flex; align-items: center; gap: 10px; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.wk-top h1 .wk-key { font-size: 12px; }
.wk-top-actions { display: flex; align-items: center; gap: 8px; }
.wk-top-actions .sep { width: 1px; height: 24px; background: var(--border); margin: 0 4px; }
.wk-sq { width: 38px; height: 38px; display: inline-flex; align-items: center; justify-content: center; border: 1px solid var(--border); border-radius: 11px; background: var(--card); color: var(--foreground); cursor: pointer; position: relative; list-style: none; }
.wk-sq::-webkit-details-marker { display: none; }
.wk-sq:hover { background: var(--muted); }
.wk-sq .hi { width: 18px; height: 18px; }
.wk-sq .dot { position: absolute; top: 7px; right: 8px; width: 8px; height: 8px; border-radius: 999px; background: var(--primary); border: 2px solid var(--card); }
.wk-btn { display: inline-flex; align-items: center; gap: 8px; height: 38px; padding: 0 14px; border: 1px solid var(--border); border-radius: 11px; background: var(--card); font-size: 14px; font-weight: 500; cursor: pointer; white-space: nowrap; list-style: none; color: var(--foreground); }
.wk-btn::-webkit-details-marker { display: none; }
.wk-btn:hover { background: color-mix(in oklab, var(--muted) 70%, transparent); }
.wk-btn .hi { width: 18px; height: 18px; color: var(--muted-foreground); }
.wk-btn .count { min-width: 18px; height: 18px; border-radius: 999px; background: var(--primary); color: #fff; font-size: 11px; display: inline-flex; align-items: center; justify-content: center; padding: 0 5px; }
.wk-btn-primary { background: var(--primary); border-color: var(--primary); color: #fff; font-weight: 600; }
.wk-btn-primary:hover { background: color-mix(in oklab, var(--primary) 88%, black); }
.wk-btn-primary .hi { color: #fff; }
.wk-faces { display: flex; align-items: center; }
.wk-faces .wk-av { width: 34px; height: 34px; font-size: 12px; border: 2px solid var(--card); margin-left: -8px; }
.wk-faces .wk-av:first-child { margin-left: 0; }
.wk-faces .more { width: 34px; height: 34px; margin-left: -8px; border-radius: 999px; border: 2px dashed var(--border); background: var(--card); display: inline-flex; align-items: center; justify-content: center; color: var(--muted-foreground); }
.wk-faces .more .hi { width: 16px; height: 16px; }
.wk-pop { position: relative; }
.wk-pop > .panel { position: absolute; right: 0; top: calc(100% + 6px); z-index: 40; min-width: 220px; background: var(--card); border: 1px solid var(--border); border-radius: 14px; box-shadow: 0 18px 40px -16px rgb(20 18 18 / 0.35); padding: 6px; }
.wk-pop.left > .panel { left: 0; right: auto; }
.wk-pop > .panel > a, .wk-pop > .panel > form > button, .wk-pop > .panel > button { display: flex; align-items: center; gap: 10px; width: 100%; padding: 8px 10px; border-radius: 9px; font-size: 13px; border: 0; background: none; cursor: pointer; text-align: left; color: var(--foreground); }
.wk-pop > .panel > a:hover, .wk-pop > .panel > form > button:hover, .wk-pop > .panel > button:hover { background: var(--muted); }
.wk-pop > .panel a.on { font-weight: 600; background: var(--muted); }
.wk-pop > .panel .hi { width: 16px; height: 16px; color: var(--muted-foreground); }
.wk-pop > .panel .sec { font-size: 11px; font-weight: 600; letter-spacing: 0.05em; text-transform: uppercase; color: var(--muted-foreground); padding: 8px 10px 4px; }
.wk-pop > .panel hr { border: 0; border-top: 1px solid var(--border); margin: 4px 0; }
.wk-pop > .panel .danger { color: var(--destructive); }
.wk-body { padding: 24px 32px 96px; max-width: 1480px; width: 100%; }
.wk-body > .notice { margin-bottom: 16px; }
.wk-bar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 20px; }
.wk-bar .grow { flex: 1; }
.wk-bar .filters { display: grid; gap: 8px; padding: 8px; min-width: 260px; }
.wk-bar .filters .select, .wk-bar .filters .input { height: 36px; font-size: 13px; }
.wk-sub-title { color: var(--muted-foreground); font-size: 13px; margin: -6px 0 18px; }

.wk-secs { display: flex; flex-direction: column; gap: 20px; }
.wk-sec { background: var(--background); border-radius: 22px; padding: 16px 18px 18px; }
.wk-sec-head { display: flex; align-items: center; gap: 10px; padding: 2px 6px 14px; font-size: 15px; font-weight: 600; }
.wk-sec-head .dot { width: 9px; height: 9px; border-radius: 999px; flex: none; }
.wk-sec-head .n { min-width: 24px; height: 22px; border: 1px solid var(--border); border-radius: 7px; font-size: 12px; display: inline-flex; align-items: center; justify-content: center; background: var(--card); font-weight: 500; }
.wk-sec-head .grow { flex: 1; }
.wk-sec-head .wk-pop summary { list-style: none; cursor: pointer; display: inline-flex; padding: 4px; border-radius: 8px; color: var(--muted-foreground); }
.wk-sec-head .wk-pop summary::-webkit-details-marker { display: none; }
.wk-sec-head .wk-pop summary:hover { background: var(--card); color: var(--foreground); }
.wk-sec-head .hi { width: 18px; height: 18px; }
.wk-sec-empty { background: var(--card); border-radius: 14px; padding: 14px 18px; font-size: 13px; color: var(--muted-foreground); }
.wk-items { display: flex; flex-direction: column; gap: 10px; container: items / inline-size; }
.wk-item { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 14px; background: var(--card); border-radius: 14px; padding: 12px 16px; box-shadow: 0 1px 2px rgb(20 18 18 / 0.04); transition: box-shadow 120ms; }
.wk-item:hover { box-shadow: 0 6px 18px -10px rgb(20 18 18 / 0.25); }
.wk-item .lead { display: flex; align-items: center; gap: 8px; }
.wk-item .row-check { width: 15px; height: 15px; margin: 0; accent-color: var(--primary); opacity: 0; transition: opacity 0.12s; }
.wk-item:hover .row-check, .wk-item .row-check:checked, form:has(.row-check:checked) .wk-item .row-check { opacity: 1; }
.wk-tick { width: 22px; height: 22px; border-radius: 999px; border: 1.5px solid color-mix(in oklab, var(--foreground) 25%, var(--border)); background: var(--card); display: inline-flex; align-items: center; justify-content: center; cursor: pointer; padding: 0; color: transparent; flex: none; }
.wk-tick:hover { border-color: var(--success); color: var(--success); }
.wk-tick .hi { width: 13px; height: 13px; stroke-width: 2.4; }
.wk-tick.done { background: var(--success); border-color: var(--success); color: #fff; }
.wk-item .main { min-width: 0; display: flex; align-items: baseline; gap: 10px; }
.wk-item .main a { font-size: 15px; font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.wk-item .main a:hover { color: var(--primary); }
.wk-item .main .wk-key { flex: none; }
.wk-item .main .proj { font-size: 12px; color: var(--muted-foreground); white-space: nowrap; }
.wk-item.is-done .main a { text-decoration: line-through; color: var(--muted-foreground); }
.wk-item .side { display: flex; align-items: center; gap: 14px; }
.wk-item .when { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; color: var(--muted-foreground); white-space: nowrap; min-width: 104px; }
.wk-item .when .hi { width: 16px; height: 16px; }
.wk-item .when.late { color: var(--destructive); }
.wk-item .tags { display: flex; gap: 6px; min-width: 0; }
.wk-tag { display: inline-flex; align-items: center; height: 24px; padding: 0 9px; border-radius: 7px; font-size: 12px; font-weight: 500; white-space: nowrap; }
.wk-flag { display: inline-flex; align-items: center; gap: 4px; height: 22px; padding: 0 8px; border-radius: 7px; font-size: 11px; font-weight: 600; white-space: nowrap; }
.wk-flag.blocked { background: color-mix(in oklab, var(--destructive) 12%, transparent); color: var(--destructive); }
.wk-flag.repeat { background: color-mix(in oklab, #6366f1 12%, transparent); color: #4f46e5; }
.wk-flag .hi { width: 13px; height: 13px; }
.wk-item .faces { display: flex; }
.wk-item .faces .wk-av { width: 30px; height: 30px; font-size: 11px; border: 2px solid var(--card); margin-left: -8px; }
.wk-item .faces .wk-av:first-child { margin-left: 0; }
.wk-item .wk-pop summary { list-style: none; cursor: pointer; display: inline-flex; padding: 4px; border-radius: 8px; color: var(--muted-foreground); }
.wk-item .wk-pop summary::-webkit-details-marker { display: none; }
.wk-item .wk-pop summary:hover { background: var(--muted); color: var(--foreground); }
.wk-item .wk-pop summary .hi { width: 20px; height: 20px; }
.wk-card .wk-tag { height: 20px; font-size: 11px; padding: 0 7px; }
.wk-sec.col { flex: 1 0 280px; max-width: 360px; display: flex; flex-direction: column; max-height: calc(100dvh - 200px); padding: 12px; }
.wk-sec.col .wk-col-body { flex: 1; overflow-y: auto; }
.wk-sec.col .wk-sec-head { padding: 4px 6px 12px; font-size: 14px; }
.wk-board.v2 { gap: 16px; }

.wk-burger { display: none; }
#wk-nav { display: none; }
.wk-scrim { display: none; }
@media (max-width: 1000px) {
  .wk-app { grid-template-columns: minmax(0, 1fr); }
  .wk-side { position: fixed; z-index: 60; left: 0; top: 0; bottom: 0; width: 288px; transform: translateX(-102%); transition: transform 0.2s var(--ease); }
  #wk-nav:checked ~ .wk-side { transform: none; }
  #wk-nav:checked ~ .wk-scrim { display: block; position: fixed; inset: 0; z-index: 55; background: rgb(20 18 18 / 0.3); }
  .wk-burger { display: inline-flex; }
  .wk-top { padding: 10px 16px; min-height: 60px; gap: 10px; }
  .wk-top h1 { font-size: 18px; }
  .wk-body { padding: 16px 16px 96px; }
  .wk-top-actions .hide-md { display: none; }
}
@media (max-width: 760px) {
  .wk-item { grid-template-columns: auto minmax(0, 1fr) auto; gap: 10px; padding: 12px; }
  .wk-item .side .tags, .wk-item .side .faces .wk-av + .wk-av { display: none; }
  .wk-item .when { min-width: 0; font-size: 12px; }
  .wk-item .main { flex-direction: column; gap: 2px; align-items: flex-start; }
  .wk-item .main a { font-size: 14px; max-width: 100%; }
  .wk-sec { padding: 12px; border-radius: 18px; }
  .wk-top-actions .hide-sm { display: none; }
  .wk-bar .wk-btn .label { display: none; }
  .wk-sec.col { flex-basis: 84vw; }
}

body:has(.row-check:checked) .wk-bulk { display: flex; }
.wk-pop .wk-filters { flex-direction: column; align-items: stretch; margin: 0; }
.wk-pop .wk-filters .select, .wk-pop .wk-filters .input { width: 100%; min-width: 0; }
.wk-side > * { flex-shrink: 0; }
.wk-item .side { display: grid; grid-template-columns: auto 18px 112px 210px 64px 30px; align-items: center; gap: 12px; }
.wk-item .side .flags { display: flex; gap: 6px; justify-content: flex-end; }
.wk-item .side .tags { justify-content: flex-start; overflow: hidden; }
.wk-item .side .faces { justify-content: flex-end; }
@media (max-width: 1200px) { .wk-item .side { grid-template-columns: auto 18px 100px 64px 30px; } .wk-item .side .tags { display: none; } }
@media (max-width: 760px) { .wk-item .side { grid-template-columns: auto auto 30px; gap: 8px; } .wk-item .side .prio, .wk-item .side .faces { display: none; } }
/* A narrow list (the dashboard's column, a tablet): the title keeps its room,
   labels go first, then the due date. */
@container items (max-width: 900px) {
  .wk-item .side { grid-template-columns: auto 18px 112px 64px 30px; }
  .wk-item .side .tags { display: none; }
}
@container items (min-width: 1px) and (max-width: 620px) {
  .wk-item .side { grid-template-columns: auto 18px 64px 30px; }
  .wk-item .side .when { display: none; }
}
.wk-app .tile, .wk-app .card, .wk-app .card-sm, .wk-app .wk-task-main, .wk-app .wk-props, .wk-app .wk-project, .wk-app .wk-list, .wk-app .wk-sprint, .wk-app .wk-cal, .wk-app .wk-tl, .wk-app .wk-inbox, .wk-app .plan { border: 1px solid var(--border); }
.wk-app .wk-props { top: 88px; }
.wk-sub form { border-top: 0; padding: 0; }
.wk-sub > form { display: flex; gap: 8px; padding: 8px; border-top: 1px solid var(--border); }
.wk-sub > form:first-child { border-top: 0; }
.wk-app .wk-col { background: var(--background); }
@media (max-width: 760px) {
  .wk-item { grid-template-columns: auto minmax(0, 1fr); row-gap: 6px; }
  .wk-item .side { grid-column: 2 / -1; display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
  .wk-item .side .wk-pop { margin-left: auto; }
  .wk-item .side .prio, .wk-item .side .when { display: inline-flex; }
}

/* ── Huddle: chat + office ─────────────────────────────────────────────── */
.hd-app { --hd-panel: var(--card); --hd-soft: #f2efee; --hd-line: var(--border); --hd-hover: color-mix(in oklab, var(--muted) 75%, transparent);
  display: grid; grid-template-columns: 68px 284px minmax(0, 1fr); height: 100dvh; background: var(--background); color: var(--foreground); overflow: hidden; }
.hd-app.with-panel { grid-template-columns: 68px 284px minmax(0, 1fr) 360px; }
.hd-app[data-theme="dark"] { --background: #121112; --foreground: #f3efee; --card: #1b1a1b; --muted: #262426; --muted-foreground: #a39e9c; --border: #2f2c2e;
  --input: #3a3638; --secondary: #2a282a; --accent: #2a282a; --hd-soft: #232123; --clay-subtle: #3a1a24; --clay-foreground: #ffb3c4; color-scheme: dark; }
.hd-rail { display: flex; flex-direction: column; align-items: center; gap: 10px; padding: 14px 0; background: var(--background); }
.hd-rail .logo { width: 44px; height: 44px; border-radius: 14px; background: var(--foreground); color: var(--background); display: flex; align-items: center; justify-content: center; font-weight: 800; font-size: 18px; position: relative; }
.hd-rail .logo::before { content: ""; position: absolute; left: -12px; top: 10px; bottom: 10px; width: 4px; border-radius: 0 4px 4px 0; background: var(--foreground); }
.hd-rail a.tool { width: 44px; height: 44px; border-radius: 14px; display: flex; align-items: center; justify-content: center; background: var(--card); color: var(--muted-foreground); box-shadow: 0 1px 2px rgb(20 18 18 / 0.08); position: relative; }
.hd-rail a.tool:hover, .hd-rail a.tool.on { color: var(--primary); }
.hd-rail a.tool .hi { width: 21px; height: 21px; }
.hd-rail a.tool .n { position: absolute; top: -4px; right: -4px; min-width: 18px; height: 18px; border-radius: 999px; background: var(--primary); color: #fff; font-size: 10px; font-weight: 700; display: flex; align-items: center; justify-content: center; padding: 0 4px; border: 2px solid var(--background); }
.hd-rail .grow { flex: 1; }
.hd-rail .me { position: relative; }
.hd-rail .me > summary { list-style: none; cursor: pointer; }
.hd-rail .me > summary::-webkit-details-marker { display: none; }
.hd-face { position: relative; display: inline-flex; flex: none; }
.hd-face .wk-av { border: 0; }
.hd-face i { position: absolute; right: -1px; bottom: -1px; width: 10px; height: 10px; border-radius: 999px; border: 2px solid var(--card); background: #c8c3c1; }
.hd-face i.online { background: #16a34a; } .hd-face i.away { background: #f59e0b; } .hd-face i.dnd { background: var(--destructive); }
.hd-face.big .wk-av { width: 40px; height: 40px; font-size: 14px; }
.hd-face.big i { width: 12px; height: 12px; }

.hd-side { background: var(--card); border-radius: 18px 0 0 18px; margin: 10px 0 10px 0; border: 1px solid var(--hd-line); border-right: 0; display: flex; flex-direction: column; min-height: 0; }
.hd-side-head { display: flex; align-items: center; gap: 8px; padding: 16px 16px 10px; }
.hd-team { position: relative; flex: 1; min-width: 0; }
.hd-team > summary { list-style: none; cursor: pointer; display: inline-flex; align-items: center; gap: 6px; padding: 6px 10px; margin-left: -10px; border-radius: 10px; font-size: 17px; font-weight: 650; letter-spacing: -0.02em; max-width: 100%; }
.hd-team > summary::-webkit-details-marker { display: none; }
.hd-team > summary:hover, .hd-team[open] > summary { background: var(--hd-hover); }
.hd-team > summary span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hd-menu { position: absolute; z-index: 50; left: -10px; top: calc(100% + 6px); width: 300px; background: var(--card); border: 1px solid var(--hd-line); border-radius: 16px; box-shadow: 0 20px 50px -18px rgb(20 18 18 / 0.4); padding: 8px; }
.hd-menu a, .hd-menu button, .hd-menu label { display: flex; align-items: center; gap: 12px; width: 100%; padding: 9px 10px; border-radius: 10px; font-size: 14px; border: 0; background: none; color: var(--foreground); cursor: pointer; text-align: left; }
.hd-menu a:hover, .hd-menu button:hover, .hd-menu label:hover { background: var(--hd-hover); }
.hd-menu .hi { width: 18px; height: 18px; color: var(--muted-foreground); }
.hd-menu .end { margin-left: auto; color: var(--muted-foreground); font-size: 13px; display: inline-flex; align-items: center; gap: 4px; }
.hd-menu hr { border: 0; border-top: 1px solid var(--hd-line); margin: 6px 8px; }
.hd-switch { width: 34px; height: 20px; border-radius: 999px; background: var(--muted); position: relative; flex: none; margin-left: auto; transition: background 0.15s; }
.hd-switch::after { content: ""; position: absolute; top: 2px; left: 2px; width: 16px; height: 16px; border-radius: 999px; background: #fff; box-shadow: 0 1px 2px rgb(0 0 0 / 0.2); transition: transform 0.15s; }
.hd-switch.on { background: var(--primary); } .hd-switch.on::after { transform: translateX(14px); }
.hd-icon { width: 34px; height: 34px; border-radius: 10px; display: inline-flex; align-items: center; justify-content: center; color: var(--muted-foreground); border: 0; background: none; cursor: pointer; flex: none; }
.hd-icon:hover { background: var(--hd-hover); color: var(--foreground); }
.hd-icon .hi { width: 19px; height: 19px; }
.hd-icon.on { color: var(--primary); }
.hd-scroll { flex: 1; overflow-y: auto; padding: 0 10px 16px; min-height: 0; }
.hd-item { display: flex; align-items: center; gap: 10px; min-height: 36px; padding: 0 10px; border-radius: 10px; font-size: 14.5px; color: color-mix(in oklab, var(--foreground) 85%, transparent); position: relative; }
.hd-item:hover { background: var(--hd-hover); }
.hd-item.on { background: var(--hd-soft); color: var(--foreground); font-weight: 600; }
.hd-item .ic { width: 22px; display: inline-flex; justify-content: center; color: var(--muted-foreground); flex: none; font-size: 15px; }
.hd-item .ic .hi { width: 18px; height: 18px; }
.hd-item .name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hd-item.unread .name { font-weight: 650; color: var(--foreground); }
.hd-item .n { min-width: 22px; height: 20px; border-radius: 6px; border: 1px solid var(--hd-line); font-size: 11px; display: inline-flex; align-items: center; justify-content: center; padding: 0 5px; color: var(--muted-foreground); background: var(--card); }
.hd-item .n.hot { background: var(--primary); border-color: var(--primary); color: #fff; font-weight: 700; }
.hd-item .new { font-size: 10px; font-weight: 700; letter-spacing: 0.04em; color: var(--clay-foreground); background: var(--clay-subtle); border-radius: 5px; padding: 1px 6px; }
.hd-item.sub { padding-left: 24px; } .hd-item.sub2 { padding-left: 40px; }
.hd-item.sub .ic, .hd-item.sub2 .ic { color: color-mix(in oklab, var(--muted-foreground) 70%, transparent); }
.hd-item.muted .name { opacity: 0.55; }
.hd-section { margin-top: 18px; }
.hd-section > summary { list-style: none; display: flex; align-items: center; gap: 6px; padding: 0 10px 6px; font-size: 14px; color: var(--muted-foreground); cursor: pointer; }
.hd-section > summary::-webkit-details-marker { display: none; }
.hd-section > summary .grow { flex: 1; }
.hd-section > summary a { display: inline-flex; color: var(--muted-foreground); padding: 2px; border-radius: 6px; }
.hd-section > summary a:hover { background: var(--hd-hover); color: var(--foreground); }
.hd-section > summary .chev { display: inline-flex; transition: transform 0.15s; }
.hd-section > summary .hi { width: 15px; height: 15px; }
.hd-section:not([open]) > summary .chev { transform: rotate(-90deg); }

.hd-main { background: var(--card); margin: 10px 0; border: 1px solid var(--hd-line); display: flex; flex-direction: column; min-width: 0; min-height: 0; position: relative; }
.hd-app:not(.with-panel) .hd-main { border-radius: 0 18px 18px 0; margin-right: 10px; }
.hd-top { display: flex; align-items: center; gap: 8px; min-height: 62px; padding: 10px 16px 10px 20px; border-bottom: 1px solid var(--hd-line); }
.hd-crumbs { display: flex; align-items: center; gap: 8px; flex: 1; min-width: 0; font-size: 16px; }
.hd-crumbs .hash { width: 30px; height: 30px; border-radius: 9px; background: var(--hd-soft); display: inline-flex; align-items: center; justify-content: center; color: var(--muted-foreground); flex: none; font-size: 15px; }
.hd-crumbs a { color: var(--muted-foreground); white-space: nowrap; } .hd-crumbs a:hover { color: var(--foreground); }
.hd-crumbs .sep { color: var(--muted-foreground); }
.hd-crumbs b { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hd-crumbs .topic { color: var(--muted-foreground); font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; margin-left: 4px; min-width: 0; flex: 1 1 0; }
.hd-crumbs b { flex: 0 1 auto; min-width: 0; }
@media (max-width: 1080px) { .hd-compose .bar .hint { display: none; } .hd-crumbs .topic { display: none; } }
.hd-top .wk-pop > .panel { min-width: 240px; }
.hd-top .wk-pop > summary { list-style: none; }
.hd-top .wk-pop > summary::-webkit-details-marker { display: none; }
.hd-feed { flex: 1; overflow-y: auto; padding: 8px 0 12px; min-height: 0; scroll-behavior: auto; }
.hd-day { display: flex; align-items: center; gap: 12px; margin: 18px 24px 6px; font-size: 12px; color: var(--muted-foreground); font-weight: 600; }
.hd-day::before, .hd-day::after { content: ""; flex: 1; height: 1px; background: var(--hd-line); }
.hd-newline { display: flex; align-items: center; gap: 10px; margin: 6px 24px; font-size: 11px; font-weight: 700; color: var(--primary); text-transform: uppercase; letter-spacing: 0.06em; }
.hd-newline::after { content: ""; flex: 1; height: 1px; background: color-mix(in oklab, var(--primary) 45%, transparent); }
.hd-msg { position: relative; display: grid; grid-template-columns: 44px minmax(0, 1fr); gap: 14px; padding: 8px 24px; }
.hd-msg.cont { padding-top: 2px; }
.hd-msg:hover { background: color-mix(in oklab, var(--muted) 40%, transparent); }
.hd-msg.mention { background: color-mix(in oklab, #f59e0b 9%, transparent); box-shadow: inset 3px 0 0 #f59e0b; }
.hd-msg.flash { animation: hd-flash 2s ease; }
@keyframes hd-flash { 0%, 40% { background: color-mix(in oklab, var(--primary) 14%, transparent); } }
.hd-msg .side { display: flex; justify-content: center; padding-top: 2px; }
.hd-msg .side time { font-size: 11px; color: var(--muted-foreground); opacity: 0; padding-top: 4px; }
.hd-msg.cont:hover .side time { opacity: 1; }
.hd-msg .who { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; }
.hd-msg .who b { font-size: 15px; font-weight: 650; }
.hd-msg .who .title { font-size: 12px; color: var(--muted-foreground); }
.hd-msg .who time { font-size: 12px; color: var(--muted-foreground); }
.hd-msg .who .pin { font-size: 11px; color: var(--clay-foreground); background: var(--clay-subtle); border-radius: 5px; padding: 0 6px; }
.hd-body { font-size: 15px; line-height: 1.6; overflow-wrap: anywhere; margin-top: 2px; }
.hd-body p { margin: 0 0 4px; }
.hd-body a { color: var(--primary); text-decoration: underline; text-underline-offset: 2px; }
.hd-body .m { color: #2563eb; font-weight: 500; background: color-mix(in oklab, #2563eb 8%, transparent); border-radius: 5px; padding: 0 3px; }
.hd-body .m.me { color: #b45309; background: color-mix(in oklab, #f59e0b 18%, transparent); }
.hd-body code { font-family: var(--mono); font-size: 13px; background: var(--hd-soft); border: 1px solid var(--hd-line); border-radius: 6px; padding: 1px 5px; }
.hd-body pre { font-family: var(--mono); font-size: 13px; background: var(--hd-soft); border: 1px solid var(--hd-line); border-radius: 12px; padding: 12px 14px; overflow-x: auto; margin: 6px 0; white-space: pre-wrap; }
.hd-body blockquote { margin: 4px 0; padding-left: 12px; border-left: 3px solid var(--hd-line); color: var(--muted-foreground); }
.hd-msg.system .hd-body { color: var(--muted-foreground); font-size: 14px; font-style: italic; }
.hd-msg.deleted .hd-body { color: var(--muted-foreground); font-style: italic; font-size: 14px; }
.hd-edited { font-size: 11px; color: var(--muted-foreground); margin-left: 4px; }
.hd-card { display: flex; align-items: center; gap: 14px; margin-top: 8px; padding: 12px 14px; border: 1px solid var(--hd-line); border-radius: 14px; max-width: 560px; background: var(--card); box-shadow: 0 1px 2px rgb(20 18 18 / 0.04); }
.hd-card .ic { width: 36px; height: 36px; border-radius: 10px; background: var(--hd-soft); display: inline-flex; align-items: center; justify-content: center; color: var(--primary); flex: none; }
.hd-card .ic .hi { width: 18px; height: 18px; }
.hd-card .t { flex: 1; min-width: 0; }
.hd-card .t b { display: block; font-size: 14px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hd-card .t span { font-size: 12px; color: var(--muted-foreground); }
.hd-card .btn { flex: none; }
.hd-card img { max-width: 100%; border-radius: 10px; display: block; }
.hd-reacts { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; align-items: center; }
.hd-reacts form { margin: 0; }
.hd-react { display: inline-flex; align-items: center; gap: 5px; height: 28px; padding: 0 9px; border-radius: 9px; border: 1px solid var(--hd-line); background: var(--hd-soft); font-size: 13px; cursor: pointer; color: var(--foreground); }
.hd-react.mine { border-color: color-mix(in oklab, #2563eb 50%, transparent); background: color-mix(in oklab, #2563eb 9%, transparent); }
.hd-react .hi { width: 16px; height: 16px; color: var(--muted-foreground); }
.hd-thread-link { display: inline-flex; align-items: center; gap: 8px; margin-top: 6px; padding: 4px 8px 4px 4px; border-radius: 10px; font-size: 13px; color: #2563eb; font-weight: 600; }
.hd-thread-link:hover { background: var(--card); border: 1px solid var(--hd-line); padding: 3px 7px 3px 3px; }
.hd-thread-link .faces { display: inline-flex; }
.hd-thread-link .faces .wk-av { width: 22px; height: 22px; font-size: 9px; margin-left: -5px; border: 2px solid var(--card); }
.hd-thread-link .faces .wk-av:first-child { margin-left: 0; }
.hd-thread-link span.when { color: var(--muted-foreground); font-weight: 400; }
.hd-tools { position: absolute; right: 20px; top: -14px; display: none; align-items: center; gap: 2px; background: var(--card); border: 1px solid var(--hd-line); border-radius: 12px; padding: 3px; box-shadow: 0 6px 20px -10px rgb(20 18 18 / 0.35); z-index: 5; }
.hd-msg:hover .hd-tools, .hd-tools:focus-within, .hd-tools:has(details[open]) { display: flex; }
.hd-tools form { margin: 0; display: inline-flex; }
.hd-tools .q { width: 30px; height: 30px; display: inline-flex; align-items: center; justify-content: center; border-radius: 8px; border: 0; background: none; cursor: pointer; font-size: 16px; }
.hd-tools .q:hover { background: var(--hd-hover); }
.hd-tools .hd-icon { width: 30px; height: 30px; }
.hd-tools .hd-icon .hi { width: 17px; height: 17px; }
.hd-tools .wk-pop > summary { list-style: none; }
.hd-tools .wk-pop > summary::-webkit-details-marker { display: none; }
.hd-edit textarea { width: 100%; min-height: 70px; border: 1px solid var(--ring); border-radius: 12px; padding: 8px 12px; font: inherit; font-size: 15px; background: var(--card); color: var(--foreground); }
.hd-files { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.hd-file { display: inline-flex; align-items: center; gap: 10px; padding: 8px 12px 8px 8px; border: 1px solid var(--hd-line); border-radius: 12px; background: var(--card); max-width: 320px; }
.hd-file .ic { width: 34px; height: 34px; border-radius: 9px; background: var(--hd-soft); display: inline-flex; align-items: center; justify-content: center; font-size: 10px; font-weight: 800; color: var(--muted-foreground); flex: none; text-transform: uppercase; }
.hd-file b { font-size: 13px; font-weight: 600; display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 220px; }
.hd-file span { font-size: 11px; color: var(--muted-foreground); }
.hd-file-img { display: block; margin-top: 8px; max-width: 360px; border-radius: 12px; border: 1px solid var(--hd-line); overflow: hidden; }
.hd-file-img img { display: block; max-width: 100%; max-height: 280px; object-fit: cover; }

.hd-compose { margin: 0 20px 18px; border: 1px solid var(--hd-line); border-radius: 18px; background: var(--card); box-shadow: 0 8px 30px -18px rgb(20 18 18 / 0.35); position: relative; }
.hd-compose:focus-within { border-color: color-mix(in oklab, var(--foreground) 25%, var(--hd-line)); }
.hd-compose textarea { display: block; width: 100%; min-height: 54px; max-height: 40vh; resize: none; border: 0; outline: none; background: transparent; color: var(--foreground); font: inherit; font-size: 15px; line-height: 1.55; padding: 14px 18px 6px; }
.hd-compose .bar { display: flex; align-items: center; gap: 2px; padding: 6px 10px 10px; }
.hd-compose .bar .grow { flex: 1; }
.hd-compose .bar .hint { font-size: 11px; color: var(--muted-foreground); margin-right: 10px; }
.hd-compose .chips { display: flex; flex-wrap: wrap; gap: 6px; padding: 0 14px; }
.hd-compose .chips:empty { display: none; }
.hd-compose .chip-file { display: inline-flex; align-items: center; gap: 6px; height: 28px; padding: 0 6px 0 10px; border-radius: 8px; background: var(--hd-soft); font-size: 12px; }
.hd-compose .chip-file button { border: 0; background: none; cursor: pointer; color: var(--muted-foreground); font-size: 14px; }
.hd-compose .disabled { padding: 16px 18px; color: var(--muted-foreground); font-size: 14px; }
.hd-send { height: 36px; padding: 0 18px; border-radius: 11px; border: 0; background: var(--foreground); color: var(--background); font-weight: 600; font-size: 14px; cursor: pointer; }
.hd-send:hover { opacity: 0.9; }
.hd-discard { height: 36px; padding: 0 14px; border-radius: 11px; border: 0; background: var(--hd-soft); color: var(--foreground); font-weight: 500; font-size: 14px; cursor: pointer; margin-right: 6px; }
.hd-emoji { position: absolute; bottom: calc(100% + 8px); left: 10px; z-index: 30; background: var(--card); border: 1px solid var(--hd-line); border-radius: 14px; box-shadow: 0 20px 50px -18px rgb(20 18 18 / 0.4); padding: 8px; display: grid; grid-template-columns: repeat(10, 32px); gap: 2px; }
.hd-emoji button { width: 32px; height: 32px; border: 0; background: none; font-size: 18px; border-radius: 8px; cursor: pointer; }
.hd-emoji button:hover { background: var(--hd-hover); }
.hd-join { display: flex; align-items: center; justify-content: center; gap: 14px; margin: 0 20px 18px; padding: 18px; border-radius: 18px; background: var(--hd-soft); font-size: 14px; }

.hd-panel { background: var(--card); margin: 10px 10px 10px 0; border: 1px solid var(--hd-line); border-left: 0; border-radius: 0 18px 18px 0; display: flex; flex-direction: column; min-height: 0; }
.hd-tabs { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; margin: 14px 16px 6px; padding: 4px; background: var(--hd-soft); border-radius: 12px; }
.hd-tabs a { text-align: center; padding: 7px 4px; border-radius: 9px; font-size: 14px; color: var(--muted-foreground); }
.hd-tabs a.on { background: var(--card); color: var(--foreground); font-weight: 600; box-shadow: 0 1px 3px rgb(20 18 18 / 0.1); }
.hd-panel .hd-scroll { padding: 6px 20px 20px; }
.hd-panel h3 { font-size: 18px; letter-spacing: -0.02em; margin: 18px 0 10px; display: flex; align-items: center; gap: 8px; }
.hd-panel h3 .count { color: var(--muted-foreground); font-weight: 400; }
.hd-panel h3 .grow { flex: 1; }
.hd-info { display: flex; align-items: center; gap: 10px; padding: 12px 0; border-bottom: 1px solid var(--hd-line); font-size: 14.5px; }
.hd-info .hi { width: 18px; height: 18px; color: var(--muted-foreground); }
.hd-info .k { flex: 1; color: color-mix(in oklab, var(--foreground) 80%, transparent); }
.hd-info .v { display: inline-flex; align-items: center; gap: 8px; }
.hd-status { font-size: 12px; font-weight: 600; border-radius: 7px; padding: 2px 9px; background: color-mix(in oklab, #16a34a 14%, transparent); color: #15803d; }
.hd-status.quiet { background: var(--hd-soft); color: var(--muted-foreground); }
.hd-heat { display: grid; grid-template-columns: repeat(28, 1fr); gap: 4px; margin-top: 4px; }
.hd-heat i { aspect-ratio: 1; border-radius: 3px; background: color-mix(in oklab, #16a34a 10%, var(--hd-soft)); }
.hd-heat i.l1 { background: color-mix(in oklab, #16a34a 35%, var(--hd-soft)); } .hd-heat i.l2 { background: color-mix(in oklab, #16a34a 60%, var(--hd-soft)); } .hd-heat i.l3 { background: #16a34a; }
.hd-linked { display: flex; align-items: center; gap: 10px; padding: 8px 0; font-size: 14.5px; }
.hd-linked .hash { color: var(--muted-foreground); width: 20px; text-align: center; }
.hd-linked .grow { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hd-person { display: flex; align-items: center; gap: 12px; padding: 8px 0; }
.hd-person .t { flex: 1; min-width: 0; line-height: 1.3; }
.hd-person .t b { display: block; font-size: 14.5px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hd-person .t span { font-size: 12.5px; color: var(--muted-foreground); }
.hd-person.offline { opacity: 0.6; }
.hd-tagx { font-size: 12px; font-weight: 600; border-radius: 7px; padding: 3px 9px; white-space: nowrap; }
.hd-sub { font-size: 13px; color: var(--muted-foreground); margin: 16px 0 4px; }
.hd-thread-head { display: flex; align-items: center; gap: 8px; padding: 16px 16px 10px 20px; border-bottom: 1px solid var(--hd-line); }
.hd-thread-head b { flex: 1; font-size: 16px; }
.hd-panel .hd-msg { padding: 8px 14px; grid-template-columns: 36px minmax(0, 1fr); gap: 10px; }
.hd-panel .hd-compose { margin: 0 12px 12px; }

.hd-page { flex: 1; overflow-y: auto; padding: 24px 28px 60px; min-height: 0; }
.hd-page h1 { font-size: 22px; letter-spacing: -0.03em; }
.hd-list { display: flex; flex-direction: column; gap: 8px; margin-top: 16px; }
.hd-row { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 12px; align-items: center; padding: 12px 14px; border: 1px solid var(--hd-line); border-radius: 14px; background: var(--card); }
.hd-row:hover { border-color: color-mix(in oklab, var(--foreground) 18%, var(--hd-line)); }
.hd-row .where { font-size: 12px; color: var(--muted-foreground); }
.hd-row .what { font-size: 14.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hd-row.unread .what { font-weight: 600; }
.hd-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 12px; margin-top: 16px; }

/* Search panel */
.hd-find { position: fixed; inset: 0; z-index: 120; background: rgb(20 18 18 / 0.18); backdrop-filter: blur(3px); display: flex; justify-content: center; align-items: flex-start; padding: 11vh 16px 16px; }
.hd-find[hidden] { display: none; }
.hd-find-box { width: min(820px, 100%); background: color-mix(in oklab, var(--card) 96%, transparent); border: 1px solid var(--hd-line); border-radius: 22px; box-shadow: 0 40px 100px -30px rgb(20 18 18 / 0.5); overflow: hidden; display: flex; flex-direction: column; max-height: 78vh; }
.hd-find-in { display: flex; align-items: center; gap: 12px; padding: 22px 26px 8px; }
.hd-find-in input { flex: 1; border: 0; outline: none; background: transparent; color: var(--foreground); font: inherit; font-size: 22px; letter-spacing: -0.01em; }
.hd-find-tabs { display: flex; gap: 26px; padding: 8px 26px 0; border-bottom: 1px solid var(--hd-line); overflow-x: auto; }
.hd-find-tabs button { border: 0; background: none; padding: 10px 0 12px; font: inherit; font-size: 15px; color: var(--muted-foreground); cursor: pointer; border-bottom: 2px solid transparent; white-space: nowrap; }
.hd-find-tabs button.on { color: var(--foreground); border-bottom-color: var(--foreground); }
.hd-find-list { overflow-y: auto; padding: 16px 18px 12px; }
.hd-find-list .head { display: flex; justify-content: space-between; padding: 4px 8px 6px; font-size: 15px; font-weight: 600; }
.hd-find-list .head span { font-weight: 400; color: var(--muted-foreground); font-size: 14px; }
.hd-find-list .day { padding: 12px 8px 6px; font-size: 13px; color: var(--muted-foreground); }
.hd-find-list a { display: flex; align-items: center; gap: 12px; padding: 9px 10px; border-radius: 12px; font-size: 15px; color: var(--foreground); }
.hd-find-list a .muted { color: var(--muted-foreground); }
.hd-find-list a .grow { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hd-find-list a .ic { width: 30px; height: 30px; border-radius: 9px; background: var(--hd-soft); display: inline-flex; align-items: center; justify-content: center; color: var(--muted-foreground); flex: none; }
.hd-find-list a .ic .hi { width: 17px; height: 17px; }
.hd-find-list a .enter { visibility: hidden; width: 28px; height: 28px; border-radius: 8px; background: var(--card); border: 1px solid var(--hd-line); display: inline-flex; align-items: center; justify-content: center; font-size: 13px; }
.hd-find-list a.on { background: var(--hd-soft); }
.hd-find-list a.on .enter { visibility: visible; }
.hd-find-list .empty-note { padding: 30px 10px; text-align: center; color: var(--muted-foreground); }
.hd-find-foot { display: flex; align-items: center; gap: 18px; padding: 12px 18px; border-top: 1px solid var(--hd-line); font-size: 14px; color: var(--muted-foreground); background: color-mix(in oklab, var(--hd-soft) 60%, transparent); }
.hd-find-foot kbd { min-width: 26px; height: 26px; display: inline-flex; align-items: center; justify-content: center; margin-right: 4px; font-size: 12px; }
.hd-find-foot .grow { flex: 1; }
.hd-ac-list { position: absolute; bottom: calc(100% + 8px); left: 12px; z-index: 30; min-width: 260px; background: var(--card); border: 1px solid var(--hd-line); border-radius: 14px; box-shadow: 0 20px 50px -18px rgb(20 18 18 / 0.4); padding: 6px; }
.hd-ac-list .lab { font-size: 12px; color: var(--muted-foreground); padding: 4px 8px 6px; }
.hd-ac-list button { display: flex; align-items: center; gap: 10px; width: 100%; border: 0; background: none; padding: 7px 8px; border-radius: 9px; font-size: 14px; color: var(--foreground); cursor: pointer; text-align: left; }
.hd-ac-list button.on, .hd-ac-list button:hover { background: var(--hd-soft); }

/* Office map */
.hd-office { position: relative; flex: 1; min-height: 0; overflow: hidden; background: #e9e4e1; border-radius: 0 0 18px 0; }
.hd-app[data-theme="dark"] .hd-office { background: #0f0e0f; }
.hd-office canvas { position: absolute; inset: 0; width: 100%; height: 100%; cursor: crosshair; touch-action: none; }
.hd-office .hud { position: absolute; left: 16px; top: 16px; right: 16px; display: flex; gap: 10px; align-items: flex-start; pointer-events: none; }
.hd-office .hud > * { pointer-events: auto; }
.hd-office .where { display: flex; align-items: center; gap: 12px; background: color-mix(in oklab, var(--card) 92%, transparent); backdrop-filter: blur(8px); border: 1px solid var(--hd-line); border-radius: 16px; padding: 10px 12px 10px 16px; box-shadow: 0 10px 30px -18px rgb(20 18 18 / 0.5); font-size: 14px; }
.hd-office .where b { font-size: 15px; }
.hd-office .where .faces { display: inline-flex; }
.hd-office .where .faces .wk-av { width: 26px; height: 26px; font-size: 10px; margin-left: -6px; border: 2px solid var(--card); }
.hd-office .hud .grow { flex: 1; }
.hd-office .rooms { width: 260px; max-height: calc(100% - 32px); overflow-y: auto; background: color-mix(in oklab, var(--card) 94%, transparent); backdrop-filter: blur(8px); border: 1px solid var(--hd-line); border-radius: 16px; padding: 10px; box-shadow: 0 10px 30px -18px rgb(20 18 18 / 0.5); }
.hd-office .rooms .lab { font-size: 12px; color: var(--muted-foreground); padding: 4px 6px; display: flex; justify-content: space-between; }
.hd-office .rooms button.room { display: flex; align-items: center; gap: 10px; width: 100%; border: 0; background: none; padding: 8px 6px; border-radius: 10px; cursor: pointer; text-align: left; color: var(--foreground); }
.hd-office .rooms button.room:hover, .hd-office .rooms button.room.here { background: var(--hd-soft); }
.hd-office .rooms .sw { width: 28px; height: 28px; border-radius: 8px; display: inline-flex; align-items: center; justify-content: center; font-size: 14px; flex: none; }
.hd-office .rooms .t { flex: 1; min-width: 0; }
.hd-office .rooms .t b { display: block; font-size: 13.5px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hd-office .rooms .t span { font-size: 11.5px; color: var(--muted-foreground); }
.hd-office .rooms .faces { display: inline-flex; }
.hd-office .rooms .faces .wk-av { width: 22px; height: 22px; font-size: 9px; margin-left: -5px; border: 2px solid var(--card); }
.hd-office .pad { position: absolute; left: 16px; bottom: 16px; display: flex; gap: 8px; align-items: center; }
.hd-office .pad .key { background: color-mix(in oklab, var(--card) 92%, transparent); border: 1px solid var(--hd-line); border-radius: 12px; padding: 8px 12px; font-size: 12px; color: var(--muted-foreground); }
.hd-office .zoom { position: absolute; right: 16px; bottom: 16px; display: flex; flex-direction: column; gap: 6px; }
.hd-office .zoom button { width: 38px; height: 38px; border-radius: 11px; border: 1px solid var(--hd-line); background: var(--card); color: var(--foreground); font-size: 18px; cursor: pointer; }
.hd-office .mini { position: absolute; right: 64px; bottom: 16px; width: 180px; height: 120px; border-radius: 12px; border: 1px solid var(--hd-line); background: color-mix(in oklab, var(--card) 90%, transparent); overflow: hidden; }
.hd-toast { position: absolute; left: 50%; top: 84px; transform: translateX(-50%); background: var(--foreground); color: var(--background); padding: 10px 16px; border-radius: 12px; font-size: 14px; display: flex; gap: 12px; align-items: center; box-shadow: 0 16px 40px -12px rgb(20 18 18 / 0.5); z-index: 20; }
.hd-toast[hidden] { display: none; }
.hd-toast button { border: 0; background: var(--primary); color: #fff; border-radius: 8px; padding: 5px 10px; font-weight: 600; cursor: pointer; }

/* Calls */
.hd-call { position: absolute; inset: 0; z-index: 40; background: #121112; color: #fff; display: flex; flex-direction: column; }
.hd-call[hidden] { display: none; }
.hd-call .grid { flex: 1; display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 12px; padding: 16px; align-content: center; overflow-y: auto; }
.hd-call .tile { position: relative; aspect-ratio: 16 / 10; border-radius: 18px; background: #232123; overflow: hidden; display: flex; align-items: center; justify-content: center; }
.hd-call .tile video { width: 100%; height: 100%; object-fit: cover; }
.hd-call .tile .nm { position: absolute; left: 12px; bottom: 10px; background: rgb(0 0 0 / 0.55); border-radius: 8px; padding: 3px 9px; font-size: 13px; }
.hd-call .tile.speaking { box-shadow: 0 0 0 3px #16a34a; }
.hd-call .tile .big { width: 84px; height: 84px; border-radius: 999px; background: var(--primary); display: flex; align-items: center; justify-content: center; font-size: 28px; font-weight: 700; }
.hd-call .ctl { display: flex; justify-content: center; gap: 12px; padding: 16px; }
.hd-call .ctl button { height: 46px; min-width: 46px; padding: 0 16px; border-radius: 14px; border: 0; background: #2f2c2e; color: #fff; font-weight: 600; cursor: pointer; font-size: 14px; }
.hd-call .ctl button.off { background: #7f1d1d; }
.hd-call .ctl button.leave { background: var(--destructive); }
.hd-call .top { display: flex; align-items: center; gap: 10px; padding: 14px 18px; font-size: 15px; }
.hd-call .top .grow { flex: 1; }

@media (max-width: 1280px) { .hd-app.with-panel { grid-template-columns: 68px 260px minmax(0, 1fr) 320px; } }
@media (max-width: 1080px) {
  .hd-app.with-panel { grid-template-columns: 68px 260px minmax(0, 1fr); }
  .hd-app.with-panel .hd-panel { position: fixed; right: 0; top: 0; bottom: 0; width: min(380px, 92vw); z-index: 60; margin: 0; border-radius: 0; border-left: 1px solid var(--hd-line); box-shadow: -20px 0 60px -20px rgb(20 18 18 / 0.4); }
  .hd-app.with-panel .hd-main { border-radius: 0 18px 18px 0; margin-right: 10px; }
}
@media (max-width: 760px) {
  .hd-app, .hd-app.with-panel { grid-template-columns: minmax(0, 1fr); }
  .hd-rail { display: none; }
  .hd-side { position: fixed; z-index: 70; left: 0; top: 0; bottom: 0; width: 300px; margin: 0; border-radius: 0; transform: translateX(-102%); transition: transform 0.2s var(--ease); }
  #hd-nav:checked ~ .hd-side { transform: none; }
  #hd-nav:checked ~ .hd-scrim { display: block; position: fixed; inset: 0; z-index: 65; background: rgb(20 18 18 / 0.3); }
  .hd-main, .hd-app:not(.with-panel) .hd-main, .hd-app.with-panel .hd-main { margin: 0; border-radius: 0; border: 0; height: 100dvh; }
  .hd-app .hd-burger { display: inline-flex; }
  #hd-nav:checked ~ .hd-side { box-shadow: 0 0 60px -10px rgb(20 18 18 / 0.4); }
  .hd-compose .bar .hint { display: none; }
  .hd-compose textarea { font-size: 16px; }
  .hd-msg { padding: 8px 14px; grid-template-columns: 36px minmax(0, 1fr); gap: 10px; }
  .hd-compose { margin: 0 10px 10px; }
  .hd-office .rooms { display: none; }
  .hd-office .mini, .hd-office .pad { display: none; }
  .hd-find { padding-top: 4vh; }
  .hd-find-in input { font-size: 18px; }
  .hd-top { padding: 10px 12px; }
  .hd-crumbs .topic { display: none; }
}
.hd-burger { display: none; }
#hd-nav { display: none; }
.hd-scrim { display: none; }
.hd-office canvas.mini { inset: auto; right: 64px; bottom: 16px; width: 180px; height: 120px; cursor: default; }
.hd-panel .hd-compose .hint, .hd-panel .hd-compose [data-wrap] { display: none; }
.hd-person .hd-tagx { max-width: 130px; overflow: hidden; text-overflow: ellipsis; }
@media (max-width: 1080px) {
  .hd-app.with-panel:has(.hd-panel.auto) { grid-template-columns: 68px 260px minmax(0, 1fr); }
  .hd-panel.auto { display: none; }
}
@media (max-width: 760px) { .hd-app.with-panel:has(.hd-panel.auto) { grid-template-columns: minmax(0, 1fr); } }

/* Huddle: the start of a conversation */
.hd-intro { padding: 36px 28px 18px; display: flex; flex-direction: column; gap: 10px; max-width: 760px; }
.hd-intro h2 { font-size: 26px; letter-spacing: -0.035em; line-height: 1.15; }
.hd-intro p { font-size: 15px; line-height: 1.55; color: color-mix(in oklab, var(--foreground) 82%, transparent); }
.hd-intro p.muted { color: var(--muted-foreground); }
.hd-intro-mark { width: 64px; height: 64px; border-radius: 18px; background: var(--hd-soft); display: inline-flex; align-items: center; justify-content: center; font-size: 30px; font-weight: 700; color: var(--muted-foreground); margin-bottom: 6px; }
.hd-intro-face { width: 72px; height: 72px; border-radius: 18px; display: inline-flex; align-items: center; justify-content: center; color: #fff; font-size: 26px; font-weight: 700; flex: none; }
.hd-intro-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.hd-intro-actions .wk-pop > .panel { left: 0; right: auto; }
.hd-intro-btn { display: inline-flex; align-items: center; gap: 8px; height: 38px; padding: 0 14px; border: 1px solid var(--hd-line); border-radius: 11px; background: var(--card); color: var(--foreground); font-size: 14px; font-weight: 500; cursor: pointer; list-style: none; }
.hd-intro-btn::-webkit-details-marker { display: none; }
.hd-intro-btn:hover { background: var(--hd-hover); }
.hd-intro-btn .hi { width: 17px; height: 17px; color: var(--muted-foreground); }

/* Huddle: the office world (full-bleed, Gather-style controls) */
.hd-office-top { gap: 14px; }
.hd-world { position: relative; flex: 1; min-height: 0; overflow: hidden; overflow: clip; container: world / inline-size; background: #8fbf6a; }
.hd-app:not(.with-panel) .hd-world { border-radius: 0 0 18px 0; }
.hd-world canvas[data-map] { position: absolute; inset: 0; width: 100%; height: 100%; display: block; touch-action: none; cursor: pointer; image-rendering: pixelated; }
.hd-world canvas[data-map].dragging { cursor: grabbing; }
.w-chip, .w-btn, .w-tools, .w-zoom, .w-pop, .w-toast { position: absolute; z-index: 5; background: rgb(28 27 29 / 0.88); color: #fff; backdrop-filter: blur(10px);
  border: 1px solid rgb(255 255 255 / 0.08); box-shadow: 0 12px 30px -14px rgb(0 0 0 / 0.55); }
.w-chip { display: flex; align-items: center; gap: 10px; border-radius: 14px; padding: 9px 14px; font-size: 14px; font-weight: 600; max-width: calc(100% - 200px); }
.w-chip .dot { width: 9px; height: 9px; border-radius: 999px; background: #22c55e; box-shadow: 0 0 0 3px rgb(34 197 94 / 0.25); flex: none; }
.w-chip .sub { font-weight: 400; color: rgb(255 255 255 / 0.65); font-size: 13px; }
.w-chip button, .w-pop button.pill, .w-chip a { height: 30px; padding: 0 12px; border-radius: 9px; border: 0; background: rgb(255 255 255 / 0.12); color: #fff; font-weight: 600; font-size: 13px; cursor: pointer; display: inline-flex; align-items: center; gap: 6px; }
.w-chip button.go, .w-pop button.go { background: var(--primary); }
.w-chip button:hover, .w-pop button.pill:hover { background: rgb(255 255 255 / 0.2); }
.w-chip button.go:hover, .w-pop button.go:hover { background: color-mix(in oklab, var(--primary) 85%, white); }
.w-tl { left: 16px; top: 16px; }
.w-tr { right: 16px; top: 16px; }
.w-btn { display: inline-flex; align-items: center; gap: 8px; height: 42px; padding: 0 16px; border-radius: 14px; font-size: 14px; font-weight: 600; cursor: pointer; }
.w-btn .hi { width: 17px; height: 17px; }
.w-btn:hover { background: rgb(40 39 42 / 0.95); }
.w-tools button { height: 40px; min-width: 40px; padding: 0 10px; border: 0; border-radius: 11px; background: none; color: #fff; display: inline-flex; align-items: center; justify-content: center; gap: 8px; cursor: pointer; font-size: 14px; font-weight: 600; }
.w-tools button .hi { width: 20px; height: 20px; }
.w-tools button:hover, .w-tools button.on { background: rgb(255 255 255 / 0.12); }
.w-br { position: absolute; right: 16px; bottom: 16px; z-index: 5; display: flex; flex-direction: column; align-items: flex-end; gap: 10px; }
.w-br .w-btn, .w-br .w-zoom { position: static; }
.w-zoom { display: flex; gap: 2px; padding: 5px; border-radius: 14px; }
.w-zoom button { height: 34px; min-width: 38px; padding: 0 10px; border: 0; border-radius: 10px; background: none; color: #fff; font-size: 15px; font-weight: 700; cursor: pointer; }
.w-zoom button:hover { background: rgb(255 255 255 / 0.12); }
.w-pop { left: 16px; bottom: 76px; width: 340px; max-height: calc(100% - 110px); overflow-y: auto; border-radius: 18px; padding: 14px; }
.w-pop[hidden] { display: none; }
.w-x { float: right; width: 30px; height: 30px; margin: -4px -4px 0 8px; border: 0; border-radius: 10px; background: rgb(255 255 255 / 0.1); color: #fff; font-size: 18px; line-height: 1; cursor: pointer; }
.w-x:hover { background: rgb(255 255 255 / 0.2); }
.w-pop h4 small { margin-left: auto; padding-left: 10px; }
.w-pop h4 { font-size: 15px; margin: 0 0 10px; display: flex; justify-content: space-between; align-items: center; }
.w-pop h4 small { font-weight: 400; color: rgb(255 255 255 / 0.6); font-size: 12px; }
.w-pop .lab { font-size: 12px; color: rgb(255 255 255 / 0.6); margin: 12px 0 6px; }
.w-pop .room { display: flex; align-items: center; gap: 10px; width: 100%; border: 0; background: none; color: #fff; padding: 8px; border-radius: 11px; cursor: pointer; text-align: left; }
.w-pop .room:hover, .w-pop .room.here { background: rgb(255 255 255 / 0.1); }
.w-pop .room .sw { width: 30px; height: 30px; border-radius: 9px; display: inline-flex; align-items: center; justify-content: center; font-size: 15px; flex: none; background: rgb(255 255 255 / 0.1); }
.w-pop .room .t { flex: 1; min-width: 0; }
.w-pop .room .t b { display: block; font-size: 13.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.w-pop .room .t span { font-size: 12px; color: rgb(255 255 255 / 0.6); }
.w-pop .faces { display: inline-flex; }
.w-pop .faces .wk-av { width: 22px; height: 22px; font-size: 9px; margin-left: -5px; border: 2px solid #1c1b1d; }
.w-pop .opts { display: flex; flex-wrap: wrap; gap: 6px; }
.w-pop .opts button { width: 30px; height: 30px; border-radius: 9px; border: 2px solid transparent; cursor: pointer; padding: 0; }
.w-pop .opts button.on { border-color: #fff; box-shadow: 0 0 0 2px rgb(255 255 255 / 0.25); }
.w-pop .opts button.word { width: auto; padding: 0 10px; background: rgb(255 255 255 / 0.1); color: #fff; font-size: 12px; font-weight: 600; }
.w-pop .preview { display: flex; justify-content: center; align-items: flex-end; height: 120px; border-radius: 14px; background: #8fbf6a; margin-bottom: 4px; image-rendering: pixelated; }
.w-pop .themes { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.w-pop .theme { border: 2px solid transparent; border-radius: 14px; padding: 0; overflow: hidden; cursor: pointer; background: rgb(255 255 255 / 0.06); color: #fff; text-align: left; }
.w-pop .theme.on { border-color: #fff; }
.w-pop .theme i { display: block; height: 64px; }
.w-pop .theme span { display: block; padding: 8px 10px; font-size: 13px; font-weight: 600; }
.w-pop .row-end { display: flex; justify-content: flex-end; gap: 8px; margin-top: 14px; }
.w-toast { left: 50%; top: 16px; transform: translateX(-50%); border-radius: 14px; padding: 10px 12px 10px 16px; display: flex; gap: 12px; align-items: center; font-size: 14px; z-index: 6; }
.w-toast[hidden] { display: none; }
.w-toast button { height: 30px; padding: 0 12px; border: 0; border-radius: 9px; background: var(--primary); color: #fff; font-weight: 600; cursor: pointer; }
.office-chat { display: flex; flex-direction: column; }
.office-chat .hd-scroll { flex: 1; }
.office-chat .hd-msg { padding: 8px 14px; grid-template-columns: 36px minmax(0, 1fr); gap: 10px; }
.office-chat .hd-compose { margin: 0 12px 12px; }
.office-chat .hd-compose .hint, .office-chat .hd-compose [data-wrap] { display: none; }
@media (max-width: 1080px) { .hd-app.with-panel:has(.office-chat) .office-chat { display: none; } .hd-app.with-panel:has(.office-chat) { grid-template-columns: 68px 260px minmax(0, 1fr); } }
@media (max-width: 760px) {
  .hd-app.with-panel:has(.office-chat) { grid-template-columns: minmax(0, 1fr); }
}

/* Office: one view — labelled tools, a chat bar, buttons top right */
.w-row { position: absolute; z-index: 5; display: flex; gap: 8px; }
.w-row .w-btn { position: static; }
.w-tools button .t { font-size: 13px; }
.w-say { position: absolute; z-index: 5; left: 50%; bottom: 16px; transform: translateX(-50%); width: min(560px, calc(100% - 820px)); min-width: 340px;
  display: flex; align-items: center; gap: 8px; padding: 6px 6px 6px 14px; border-radius: 16px; background: rgb(28 27 29 / 0.9); backdrop-filter: blur(10px);
  border: 1px solid rgb(255 255 255 / 0.1); box-shadow: 0 12px 30px -14px rgb(0 0 0 / 0.55); }
.w-say:focus-within { border-color: rgb(255 255 255 / 0.35); }
.w-say-ic { display: inline-flex; color: rgb(255 255 255 / 0.6); }
.w-say-ic .hi { width: 18px; height: 18px; }
.w-say textarea { flex: 1; min-width: 0; resize: none; border: 0; outline: none; background: transparent; color: #fff; font: inherit; font-size: 14px; line-height: 20px; height: 34px; padding: 7px 0; }
.w-say textarea::placeholder { color: rgb(255 255 255 / 0.5); }
.w-say button[type=submit] { width: 38px; height: 34px; border: 0; border-radius: 11px; background: var(--primary); color: #fff; display: inline-flex; align-items: center; justify-content: center; cursor: pointer; flex: none; }
.w-say button[type=submit] .hi { width: 17px; height: 17px; }
.w-say .wk-ac { bottom: calc(100% + 8px); top: auto !important; left: 10px !important; }
@media (max-width: 1400px) { .w-say { bottom: 78px; width: min(560px, calc(100% - 32px)); } }
.w-bottom { position: absolute; z-index: 5; left: 16px; right: 16px; bottom: 16px; display: flex; align-items: flex-end; gap: 12px; pointer-events: none; }
.w-bottom > * { pointer-events: auto; }
.w-bottom .w-tools { position: static; display: flex; align-items: center; gap: 4px; padding: 6px; border-radius: 16px; flex: none; }
.w-bottom .w-say { position: static; left: auto; right: auto; bottom: auto; transform: none; flex: 1; min-width: 0; width: auto; max-width: 620px; margin: 0 auto; }
.w-bottom .w-br { position: static; flex: none; }
@container world (max-width: 1060px) {
  .w-bottom { flex-wrap: wrap; }
  .w-bottom .w-say { order: -1; flex-basis: 100%; max-width: none; }
  .w-bottom .w-br { margin-left: auto; flex-direction: row; align-items: center; }
  .w-pop { bottom: 136px; }
}
.w-tl.w-row { align-items: center; max-width: calc(100% - 380px); }
.w-tl.w-row .w-chip { position: static; max-width: none; min-width: 0; }
.w-chip > span:not(.dot) { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.w-chip button, .w-chip a { flex: none; }
.w-menu { display: none; }
.w-btn.w-icon { width: 42px; padding: 0; justify-content: center; }

/* Office on a phone: menu top left, icon buttons top right, the chat bar
   above a labelled tab bar, zoom on the right edge, panels as bottom sheets. */
@media (max-width: 760px) {
  .hd-app:not(.with-panel) .hd-world { border-radius: 0; }
  .w-menu { display: inline-flex; }
}
@container world (max-width: 760px) {
  .w-tl.w-row { left: 10px; top: calc(10px + env(safe-area-inset-top)); max-width: calc(100% - 120px); gap: 6px; }
  .w-tr { right: 10px; top: calc(10px + env(safe-area-inset-top)); gap: 6px; }
  .w-tr .w-btn { width: 42px; padding: 0; justify-content: center; }
  .w-tr .w-btn .t { display: none; }
  .w-chip { padding: 0 10px; height: 42px; gap: 8px; font-size: 13px; border-radius: 14px; }
  .w-chip .sub { display: none; }
  .w-chip button, .w-chip a { height: 28px; padding: 0 10px; font-size: 12.5px; }
  .w-toast { top: calc(60px + env(safe-area-inset-top)); max-width: calc(100% - 20px); font-size: 13px; }
  .w-bottom { left: 8px; right: 8px; bottom: calc(8px + env(safe-area-inset-bottom)); gap: 8px; flex-wrap: wrap; }
  .w-bottom .w-say { order: 0; flex-basis: 100%; max-width: none; margin: 0; }
  .w-say textarea { font-size: 16px; }
  .w-bottom .w-tools { order: 1; flex: 1 1 100%; display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 2px; padding: 5px; border-radius: 18px; }
  .w-tools button { flex-direction: column; height: 54px; gap: 3px; padding: 0 2px; border-radius: 13px; }
  .w-tools button .t { font-size: 11px; font-weight: 600; color: rgb(255 255 255 / 0.85); white-space: nowrap; }
  .w-bottom .w-br { position: absolute; right: 0; bottom: calc(100% + 10px); flex-direction: column; align-items: flex-end; gap: 8px; margin: 0; }
  .w-bottom .w-br .w-btn { width: 44px; height: 44px; padding: 0; justify-content: center; border-radius: 14px; }
  .w-bottom .w-br .w-btn .t { display: none; }
  .w-zoom { flex-direction: column; padding: 4px; }
  .w-zoom button { height: 38px; min-width: 36px; padding: 0 6px; font-size: 14px; }
  .w-pop { position: absolute; left: 0; right: 0; bottom: 0; width: auto; max-height: 78%; border-radius: 22px 22px 0 0; z-index: 9;
    padding: 10px 16px calc(16px + env(safe-area-inset-bottom)); box-shadow: 0 -20px 60px -20px rgb(0 0 0 / 0.6); }
  .w-pop::before { content: ""; display: block; width: 40px; height: 4px; border-radius: 4px; background: rgb(255 255 255 / 0.25); margin: 0 auto 12px; }
  .w-pop .opts button { width: 38px; height: 38px; }
  .w-pop .opts button.word { height: 34px; font-size: 13px; }
  .w-pop .room { padding: 10px 8px; }
  .w-pop .row-end .pill { height: 40px; padding: 0 18px; font-size: 14px; }
  .w-pop .input, .w-pop .select { font-size: 16px; }
}
@container world (max-width: 380px) { .w-tools button .t { font-size: 10px; } }


/* ── Mail Suite: the screenshots' layout in Mercestack's design ────────── */
.su-app { display: grid; grid-template-columns: 264px minmax(0, 1fr); min-height: 100dvh; background: var(--card); color: var(--foreground); }
#su-nav, .su-scrim, .su-mobile { display: none; }
.su-side { position: sticky; top: 0; height: 100dvh; display: flex; flex-direction: column; gap: 6px; padding: 14px 12px 10px; background: var(--background); border-right: 1px solid var(--border); overflow-y: auto; }
.su-logo { width: 28px; height: 28px; border-radius: 8px; background: linear-gradient(140deg, var(--primary), color-mix(in oklab, var(--primary) 60%, #6d28d9)); color: #fff; font-weight: 700; font-size: 12px; display: inline-flex; align-items: center; justify-content: center; flex: none; }
.su-logo.sm { width: 22px; height: 22px; border-radius: 6px; font-size: 10px; }
.su-team { position: relative; }
.su-team > summary { list-style: none; display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 12px; cursor: pointer; }
.su-team > summary::-webkit-details-marker { display: none; }
.su-team > summary:hover, .su-team[open] > summary { background: var(--muted); }
.su-team .name { flex: 1; min-width: 0; font-weight: 600; font-size: 15px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.su-team .chev { display: inline-flex; color: var(--muted-foreground); } .su-team .chev .hi { width: 16px; height: 16px; }
.su-menu { position: absolute; top: calc(100% + 6px); left: 0; right: 0; z-index: 40; background: var(--card); border: 1px solid var(--border); border-radius: 14px; padding: 6px; box-shadow: 0 18px 40px -16px rgb(20 18 18 / 0.35); }
.su-menu .me { padding: 8px 10px 10px; font-size: 12px; color: var(--muted-foreground); border-bottom: 1px solid var(--border); margin-bottom: 4px; overflow-wrap: anywhere; }
.su-menu .me b { display: block; color: var(--foreground); font-size: 13px; }
.su-menu .lab { font-size: 11px; color: var(--muted-foreground); padding: 6px 10px 2px; text-transform: uppercase; letter-spacing: .06em; }
.su-menu a, .su-menu button { display: flex; align-items: center; gap: 10px; width: 100%; padding: 8px 10px; border: 0; background: none; border-radius: 9px; font-size: 13px; color: var(--foreground); cursor: pointer; text-align: left; font: inherit; font-size: 13px; }
.su-menu a:hover, .su-menu button:hover, .su-menu a.on { background: var(--muted); }
.su-menu .hi { width: 16px; height: 16px; }
.su-menu hr, .su-nav hr { border: 0; border-top: 1px solid var(--border); margin: 8px 12px; }
.su-nav { display: flex; flex-direction: column; gap: 2px; margin-top: 6px; }
.su-nav a { display: flex; align-items: center; gap: 12px; height: 40px; padding: 0 12px; border-radius: 11px; font-size: 15px; color: color-mix(in oklab, var(--foreground) 82%, transparent); }
.su-nav a .ic { display: inline-flex; color: var(--muted-foreground); } .su-nav a .ic .hi { width: 19px; height: 19px; }
.su-nav a:hover { background: color-mix(in oklab, var(--muted) 70%, transparent); color: var(--foreground); }
.su-nav a.on { background: var(--muted); color: var(--foreground); font-weight: 600; } .su-nav a.on .ic { color: var(--primary); }
.su-foot { margin-top: auto; padding-top: 10px; display: flex; flex-direction: column; gap: 6px; }
.su-foot form { margin: 0; }
.su-ghost { width: 34px; height: 34px; border-radius: 10px; border: 0; background: none; color: var(--muted-foreground); display: inline-flex; align-items: center; justify-content: center; cursor: pointer; }
.su-ghost:hover { background: var(--muted); color: var(--foreground); } .su-ghost .hi { width: 18px; height: 18px; }
.su-docs { display: flex; align-items: center; gap: 8px; padding: 8px 10px; border-top: 1px solid var(--border); font-family: var(--mono); font-size: 13px; color: var(--muted-foreground); }
.su-docs:hover { color: var(--foreground); } .su-docs .hi { width: 15px; height: 15px; }
.su-main { min-width: 0; padding: 40px 48px 64px; }
.su-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 26px; flex-wrap: wrap; }
.su-head h1 { font-size: 32px; font-weight: 650; letter-spacing: -0.035em; line-height: 1.15; min-width: 0; overflow-wrap: anywhere; }
.su-actions { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.su-actions form { margin: 0; }
.su-lede { color: var(--muted-foreground); margin: -12px 0 18px; max-width: 64ch; line-height: 22px; }
.su-back { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; color: var(--muted-foreground); margin-bottom: 14px; }
.su-back:hover { color: var(--foreground); } .su-back .hi { width: 15px; height: 15px; }
.su-btn { display: inline-flex; align-items: center; gap: 8px; height: 38px; padding: 0 14px; border-radius: 999px; border: 1px solid var(--border); background: var(--card); color: var(--foreground); font: inherit; font-size: 14px; font-weight: 550; cursor: pointer; white-space: nowrap; list-style: none; }
.su-btn::-webkit-details-marker { display: none; }
.su-btn:hover { background: var(--muted); } .su-btn .hi { width: 17px; height: 17px; }
.su-btn.sm { height: 32px; padding: 0 12px; font-size: 13px; }
.su-btn.danger { color: var(--destructive); } .su-btn.danger:hover { background: color-mix(in oklab, var(--destructive) 10%, transparent); }
.su-iconbtn { width: 40px; height: 40px; border-radius: 12px; border: 1px solid var(--border); background: var(--card); color: var(--foreground); display: inline-flex; align-items: center; justify-content: center; cursor: pointer; list-style: none; flex: none; }
.su-iconbtn::-webkit-details-marker { display: none; }
.su-iconbtn:hover { background: var(--muted); } .su-iconbtn .hi { width: 18px; height: 18px; }
.su-code, .su-pop { position: relative; }
.su-code-panel, .su-pop-panel { position: absolute; right: 0; top: calc(100% + 8px); z-index: 30; width: min(460px, calc(100vw - 32px)); background: var(--card); border: 1px solid var(--border); border-radius: 16px; padding: 16px; box-shadow: 0 24px 50px -20px rgb(20 18 18 / 0.4); display: grid; gap: 10px; }
.su-pop-panel { width: min(340px, calc(100vw - 32px)); }
.su-code-panel pre { margin: 0; padding: 14px; border-radius: 12px; background: #141212; color: #f3efee; font-family: var(--mono); font-size: 12px; line-height: 19px; white-space: pre-wrap; word-break: break-all; }
.su-tabs { display: flex; gap: 4px; margin-bottom: 18px; flex-wrap: wrap; }
.su-tabs a { height: 38px; padding: 0 16px; border-radius: 11px; display: inline-flex; align-items: center; font-size: 15px; font-weight: 500; color: var(--muted-foreground); }
.su-tabs a:hover { color: var(--foreground); }
.su-tabs a.on { background: var(--muted); color: var(--foreground); font-weight: 600; }
.su-filters { display: flex; gap: 10px; align-items: center; margin-bottom: 18px; flex-wrap: wrap; }
.su-filters.tight { margin: 0; flex-wrap: nowrap; }
.su-filters.tight .su-sel { flex: 0 0 180px; min-width: 0; }
.su-search { flex: 1 1 220px; min-width: 180px; position: relative; display: flex; }
.su-search > span { position: absolute; left: 13px; top: 50%; transform: translateY(-50%); display: inline-flex; color: var(--muted-foreground); pointer-events: none; } .su-search .hi { width: 17px; height: 17px; }
.su-search input { width: 100%; height: 40px; border-radius: 12px; border: 1px solid var(--border); background: var(--background); color: var(--foreground); padding: 0 14px 0 38px; font: inherit; font-size: 14px; outline: none; }
.su-search input:focus, .su-sel select:focus { border-color: color-mix(in oklab, var(--primary) 50%, var(--border)); box-shadow: 0 0 0 3px color-mix(in oklab, var(--primary) 14%, transparent); }
.su-sel { position: relative; display: inline-flex; flex: 0 1 190px; min-width: 140px; }
.su-sel::after { content: ""; position: absolute; right: 15px; top: 50%; width: 7px; height: 7px; border-right: 1.6px solid var(--muted-foreground); border-bottom: 1.6px solid var(--muted-foreground); transform: translateY(-70%) rotate(45deg); pointer-events: none; }
.su-sel select { width: 100%; height: 40px; border-radius: 12px; border: 1px solid var(--border); background: var(--background); color: var(--foreground); padding: 0 36px 0 14px; font: inherit; font-size: 14px; appearance: none; -webkit-appearance: none; cursor: pointer; outline: none; text-overflow: ellipsis; }
.su-panel { border: 1px solid var(--border); border-radius: 18px; background: var(--card); overflow-x: auto; }
.su-pad { padding: 20px 22px; }
.su-panel + .su-panel, .stack > .su-panel + .su-panel { margin-top: 16px; }
.su-empty { padding: 76px 24px; text-align: center; background: radial-gradient(60% 70% at 50% 40%, color-mix(in oklab, var(--muted) 80%, transparent), transparent 70%); }
.su-empty-ic { width: 96px; height: 96px; border-radius: 26px; display: inline-flex; align-items: center; justify-content: center; color: var(--foreground);
  background: linear-gradient(150deg, var(--card) 10%, color-mix(in oklab, var(--muted) 80%, var(--border)) 90%); border: 1px solid var(--border);
  box-shadow: inset 0 2px 0 rgb(255 255 255 / .6), 0 18px 34px -18px rgb(20 18 18 / .45); }
.su-empty-ic .hi { width: 44px; height: 44px; stroke-width: 1.6; filter: drop-shadow(0 4px 6px rgb(20 18 18 / .2)); }
.su-empty h2 { margin-top: 22px; font-size: 22px; font-weight: 650; letter-spacing: -0.02em; }
.su-empty p { margin: 10px auto 0; max-width: 360px; color: var(--muted-foreground); line-height: 23px; }
.su-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.su-table th { text-align: left; font-size: 12px; font-weight: 550; color: var(--muted-foreground); padding: 12px 18px; border-bottom: 1px solid var(--border); white-space: nowrap; background: color-mix(in oklab, var(--background) 60%, transparent); }
.su-table td { padding: 13px 18px; border-bottom: 1px solid var(--border); vertical-align: middle; }
.su-table tr:last-child td { border-bottom: 0; }
.su-table tbody tr:hover { background: color-mix(in oklab, var(--background) 70%, transparent); }
.su-table .num { text-align: right; white-space: nowrap; }
.su-table .clip { max-width: 360px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.su-table tr.dim td { opacity: .55; }
.su-table form { margin: 0; display: inline-flex; }
.su-rowlink { display: inline-flex; align-items: center; gap: 10px; color: var(--foreground); }
.su-rowlink:hover { color: var(--primary); }
.su-rowic { display: inline-flex; color: var(--muted-foreground); } .su-rowic .hi { width: 17px; height: 17px; }
.su-method { display: inline-block; min-width: 48px; font-family: var(--mono); font-size: 11px; font-weight: 700; color: var(--primary); }
.su-status { display: inline-flex; align-items: center; gap: 7px; height: 26px; padding: 0 10px; border-radius: 999px; font-size: 12.5px; font-weight: 550; background: var(--muted); color: var(--muted-foreground); white-space: nowrap; }
.su-status i { width: 7px; height: 7px; border-radius: 999px; background: currentColor; }
.su-status.ok { background: color-mix(in oklab, var(--success) 13%, transparent); color: var(--success); }
.su-status.wait { background: color-mix(in oklab, var(--warning) 16%, transparent); color: color-mix(in oklab, var(--warning) 80%, var(--foreground)); }
.su-status.bad { background: color-mix(in oklab, var(--destructive) 12%, transparent); color: var(--destructive); }
.su-facts { display: flex; flex-wrap: wrap; gap: 14px 40px; margin: -6px 0 22px; }
.su-facts > div { display: grid; gap: 6px; min-width: 0; }
.su-facts span:first-child { font-size: 11.5px; color: var(--muted-foreground); text-transform: uppercase; letter-spacing: .06em; }
.su-facts b { font-size: 14px; font-weight: 550; overflow-wrap: anywhere; }
.su-split { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 16px; align-items: start; }
.su-grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-top: 16px; }
.su-grid2 > .su-panel { margin-top: 0; }
.su-h2 { font-size: 16px; font-weight: 650; letter-spacing: -0.01em; margin-bottom: 10px; }
.su-label { font-size: 12px; font-weight: 550; color: var(--muted-foreground); text-transform: uppercase; letter-spacing: .06em; }
.su-big { display: block; font-size: 40px; font-weight: 500; letter-spacing: -0.04em; margin-top: 6px; line-height: 1.1; }
.su-big.bad { color: var(--destructive); }
.su-stats { display: flex; gap: 48px; flex-wrap: wrap; }
.su-chart { width: 100%; height: 300px; margin-top: 20px; display: block; overflow: visible; }
.su-chart .grid, .su-spark .grid { stroke: var(--border); stroke-dasharray: 4 5; stroke-width: 1; vector-effect: non-scaling-stroke; }
.su-chart .axis, .su-spark .axis { fill: var(--muted-foreground); font-size: 12px; font-family: var(--font); }
.su-chart .axis.mid { text-anchor: middle; }
.su-chart .hit { fill: transparent; } .su-chart .hit:hover { fill: color-mix(in oklab, var(--muted) 60%, transparent); }
.su-legend { display: flex; gap: 18px; flex-wrap: wrap; margin-top: 10px; font-size: 12.5px; color: var(--muted-foreground); }
.su-legend span { display: inline-flex; align-items: center; gap: 7px; } .su-legend i { width: 10px; height: 10px; border-radius: 3px; }
.su-rate .su-big { font-size: 36px; }
.su-help { display: inline-flex; color: var(--muted-foreground); cursor: help; } .su-help .hi { width: 18px; height: 18px; }
.su-spark { width: 100%; height: 110px; margin: 14px 0 8px; display: block; overflow: visible; }
.su-spark .line { fill: none; stroke: var(--primary); stroke-width: 2; vector-effect: non-scaling-stroke; }
.su-spark .limit { stroke: var(--destructive); stroke-dasharray: 5 5; stroke-width: 1; opacity: .6; vector-effect: non-scaling-stroke; }
.su-spark .axis { text-anchor: end; font-size: 11px; }
.su-checks { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 16px; }
.su-checks > span { display: inline-flex; align-items: center; gap: 6px; height: 30px; padding: 0 12px; border-radius: 999px; border: 1px solid var(--border); font-size: 13px; color: var(--muted-foreground); }
.su-checks > span.ok { color: var(--success); border-color: color-mix(in oklab, var(--success) 35%, var(--border)); }
.su-checks .hi { width: 15px; height: 15px; }
.su-row-form { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; margin-top: 16px; }
.su-row-form > div:first-child { flex: 1 1 260px; }
.su-row-form .su-sel { flex: 0 1 220px; }
.su-row-form form { margin: 0; }
.su-form { max-width: 760px; gap: 20px; }
.su-reveal { border: 2px solid var(--primary); margin-bottom: 16px; }
.su-settings { display: grid; gap: 0; }
.su-settings > .su-panel { margin-top: 0; margin-bottom: 16px; }
.su-usage { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 40px; padding: 36px 0; border-bottom: 1px solid var(--border); }
.su-usage:first-child { padding-top: 12px; }
.su-usage h2 { font-size: 24px; font-weight: 650; letter-spacing: -0.03em; }
.su-usage p.muted { margin: 10px 0 18px; max-width: 46ch; line-height: 23px; }
.su-plan { font-size: 18px; font-weight: 600; margin-bottom: 10px; }
.su-limit { display: flex; align-items: center; gap: 14px; padding: 16px 0; border-bottom: 1px solid var(--border); font-size: 15px; }
.su-limit:last-child { border-bottom: 0; }
.su-limit b { font-weight: 550; white-space: nowrap; }
.su-limit .grow, .su-integration .grow { flex: 1; min-width: 0; }
.su-ring { width: 24px; height: 24px; flex: none; transform: rotate(-90deg); }
.su-ring circle { fill: none; stroke-width: 2.6; }
.su-ring .track { stroke: var(--border); }
.su-ring .fill { stroke: var(--success); stroke-linecap: round; }
.su-ring.wait .fill { stroke: var(--warning); } .su-ring.bad .fill { stroke: var(--destructive); }
.su-integration { display: flex; align-items: center; gap: 14px; padding: 14px 0; border-top: 1px solid var(--border); flex-wrap: wrap; }
.su-int-ic { width: 40px; height: 40px; border-radius: 12px; background: var(--muted); display: inline-flex; align-items: center; justify-content: center; } .su-int-ic .hi { width: 20px; height: 20px; }
.su-integration .grow { flex: 1 1 220px; }
.su-main .notice { margin-bottom: 16px; }
.su-main .notice:not(.notice-error):not(.notice-ok):not(.notice-warn) { border-color: var(--border); background: var(--background); }
.su-main .mail-frame { background: #fff; }
/* Mail Suite phase 2–3: templates, audience, broadcasts, automations, unsubscribe */
.su-seg { display: inline-flex; padding: 3px; gap: 2px; border: 1px solid var(--border); border-radius: 12px; background: var(--background); }
.su-seg a { width: 34px; height: 32px; border-radius: 9px; display: inline-flex; align-items: center; justify-content: center; color: var(--muted-foreground); }
.su-seg a.on { background: var(--card); color: var(--foreground); box-shadow: 0 1px 2px rgb(20 18 18 / .1); } .su-seg .hi { width: 17px; height: 17px; }
.su-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 16px; }
.su-card { display: flex; flex-direction: column; border: 1px solid var(--border); border-radius: 18px; background: var(--card); overflow: hidden; color: var(--foreground); transition: box-shadow .15s, transform .15s; }
.su-card:hover { box-shadow: 0 14px 30px -18px rgb(20 18 18 / .35); transform: translateY(-1px); }
.su-thumb { height: 170px; overflow: hidden; background: #fff; border-bottom: 1px solid var(--border); position: relative; pointer-events: none; }
.su-thumb iframe { width: 200%; height: 340px; border: 0; transform: scale(.5); transform-origin: 0 0; }
.su-card-body { padding: 12px 14px 14px; display: grid; gap: 4px; min-width: 0; }
.clip1 { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.su-editor { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: 16px; align-items: start; }
.su-editor > .su-panel + .su-panel { margin-top: 0; }
.su-preview { position: sticky; top: 16px; }
.su-preview .mail-frame { min-height: 520px; }
.su-code-input { font-family: var(--mono); font-size: 12.5px; line-height: 19px; resize: vertical; min-height: 120px; }
.su-statrow { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 0; border: 1px solid var(--border); border-radius: 18px; margin-bottom: 18px; overflow: hidden; }
.su-statrow > div { padding: 16px 20px; display: grid; gap: 6px; border-right: 1px solid var(--border); }
.su-statrow > div:last-child { border-right: 0; }
.su-statrow b { font-size: 26px; font-weight: 550; letter-spacing: -0.03em; }
.su-drop { display: flex; align-items: center; justify-content: center; gap: 10px; padding: 26px; border: 1.5px dashed var(--border); border-radius: 16px; color: var(--muted-foreground); cursor: pointer; }
.su-drop:hover { border-color: var(--primary); color: var(--foreground); } .su-drop input { display: none; } .su-drop .hi { width: 20px; height: 20px; }
.su-toggle { width: 38px; height: 22px; border-radius: 999px; border: 0; background: var(--muted); position: relative; cursor: pointer; flex: none; padding: 0; }
.su-toggle i { position: absolute; top: 3px; left: 3px; width: 16px; height: 16px; border-radius: 999px; background: #fff; box-shadow: 0 1px 2px rgb(0 0 0 / .2); transition: transform .15s; }
.su-toggle[aria-pressed="true"] { background: var(--primary); } .su-toggle[aria-pressed="true"] i { transform: translateX(16px); }
.su-mini { list-style: none; display: grid; gap: 10px; padding: 0; margin: 0; }
.su-mini li { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 2px 10px; align-items: center; font-size: 13.5px; }
.su-mini li a { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--foreground); } .su-mini li .xs { grid-column: 1; }
.su-mini li .su-status { grid-row: 1 / span 2; grid-column: 2; }
.su-inline-form { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin-bottom: 16px; }
.su-inline-form .input { flex: 1 1 180px; width: auto; }
.su-rules { display: grid; gap: 8px; }
.su-rule { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr) minmax(0, 1.2fr); gap: 8px; }
.su-rule .su-sel { flex: none; min-width: 0; width: 100%; }
.su-flow-form { display: grid; gap: 16px; }
.su-flow { display: grid; gap: 0; max-width: 760px; }
.su-node { display: flex; align-items: flex-start; gap: 14px; padding: 16px 18px; border: 1px solid var(--border); border-radius: 16px; background: var(--card); position: relative; }
.su-node + .su-node { margin-top: 26px; }
.su-node + .su-node::before { content: ""; position: absolute; left: 36px; top: -27px; height: 26px; border-left: 2px dashed var(--border); }
.su-node.trigger { border-color: color-mix(in oklab, var(--primary) 40%, var(--border)); }
.su-node.add { align-items: center; border-style: dashed; background: transparent; gap: 10px; flex-wrap: wrap; }
.su-node-ic { width: 38px; height: 38px; border-radius: 12px; background: var(--muted); display: inline-flex; align-items: center; justify-content: center; flex: none; }
.su-node.trigger .su-node-ic { background: color-mix(in oklab, var(--primary) 14%, transparent); color: var(--primary); }
.su-node-ic .hi { width: 19px; height: 19px; }
.su-node .su-sel { flex: 0 1 240px; }
.su-node .grow { flex: 1; min-width: 0; }
.su-node > .su-ghost { flex: none; }
.su-node.trigger .when-event, .su-node.trigger .when-topic, .su-node.trigger .when-contact { display: none; }
.su-node.trigger:has(option[value="event"]:checked) .when-event { display: block; }
.su-node.trigger:has(option[value="event"]:checked) input.when-event { display: inline-flex; }
.su-node.trigger:has(option[value="topic.subscribed"]:checked) .when-topic { display: block; }
.su-node.trigger:has(option[value="topic.subscribed"]:checked) span.when-topic { display: inline-flex; }
.su-node.trigger:has(option[value="contact.created"]:checked) .when-contact { display: block; }
.su-note { padding: 12px 16px; border-radius: 14px; background: color-mix(in oklab, var(--primary) 7%, var(--card)); border: 1px solid color-mix(in oklab, var(--primary) 22%, var(--border)); font-size: 14px; margin-bottom: 16px; }
.su-unsub { min-height: 100dvh; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 32px 16px; background: var(--background); }
.su-unsub-card { width: min(460px, 100%); background: var(--card); border: 1px solid var(--border); border-radius: 22px; padding: 30px 28px; box-shadow: 0 30px 60px -40px rgb(20 18 18 / .4); }
.su-unsub-card h1 { font-size: 24px; letter-spacing: -0.03em; margin: 6px 0 8px; }
.su-unsub-card .btn { width: 100%; justify-content: center; }
.su-unsub-topics { display: grid; gap: 8px; }
.su-unsub-preview { padding: 0; overflow: hidden; }
.su-unsub-preview .su-unsub { min-height: 0; padding: 28px 16px; }
@media (max-width: 1100px) { .su-editor { grid-template-columns: minmax(0, 1fr); } .su-preview { position: static; } }
@media (max-width: 900px) { .su-rule { grid-template-columns: minmax(0, 1fr); padding-bottom: 8px; border-bottom: 1px solid var(--border); } .su-statrow > div { border-right: 0; border-bottom: 1px solid var(--border); } }
@media (max-width: 1100px) { .su-split, .su-grid2, .su-usage { grid-template-columns: minmax(0, 1fr); } .su-usage { gap: 20px; } }
@media (max-width: 900px) {
  .su-app { grid-template-columns: minmax(0, 1fr); }
  .su-side { position: fixed; z-index: 70; left: 0; top: 0; bottom: 0; width: 284px; transform: translateX(-102%); transition: transform .2s var(--ease); }
  #su-nav:checked ~ .su-side { transform: none; box-shadow: 0 0 60px -10px rgb(20 18 18 / .4); }
  #su-nav:checked ~ .su-scrim { display: block; position: fixed; inset: 0; z-index: 65; background: rgb(20 18 18 / .3); }
  .su-mobile { display: flex; align-items: center; gap: 10px; margin: -6px 0 18px; font-size: 15px; }
  .su-main { padding: 18px 16px 48px; }
  .su-head h1 { font-size: 26px; }
  .su-sel { flex: 1 1 140px; min-width: 0; }
  .su-search { flex-basis: 100%; }
  .su-table .hide-sm { display: none; }
  .su-table th, .su-table td { padding: 12px 14px; }
  .su-table .clip { max-width: 160px; }
  .su-stats { gap: 28px; } .su-big { font-size: 32px; }
  .su-filters.tight { flex-wrap: wrap; } .su-filters.tight .su-sel { flex: 1 1 140px; }
  .su-chart { height: 220px; }
}

/* ── Webmail (apps/inbox): rail · mailbox · list · conversation ───────── */
.ib-app { display: grid; grid-template-columns: 76px 288px 384px minmax(0, 1fr); height: 100dvh; background: var(--card); color: var(--foreground); overflow: hidden; }
#ib-nav, .ib-scrim, .ib-burger { display: none; }
.ib-rail { display: flex; flex-direction: column; align-items: center; gap: 10px; padding: 22px 0 18px; border-right: 1px solid var(--border); }
.ib-logo { margin-bottom: 26px; } .ib-logo .mark { width: 38px; height: 38px; border-radius: 12px; } .ib-logo .mark img { width: 22px; }
.ib-rail-btn { width: 48px; height: 48px; border-radius: 14px; display: inline-flex; align-items: center; justify-content: center; color: var(--muted-foreground); }
.ib-rail-btn:hover { background: var(--muted); color: var(--foreground); }
.ib-rail-btn.on { background: color-mix(in oklab, var(--primary) 12%, transparent); color: var(--primary); }
.ib-rail-btn .hi { width: 22px; height: 22px; }
.ib-rail .grow { flex: 1; }
.ib-av { width: 40px; height: 40px; border-radius: 999px; display: inline-flex; align-items: center; justify-content: center; font-size: 13px; font-weight: 650; flex: none; }
.ib-av.sm { width: 28px; height: 28px; font-size: 11px; } .ib-av.lg { width: 46px; height: 46px; font-size: 15px; }
.ib-me, .ib-pop, .ib-switch { position: relative; }
.ib-me > summary, .ib-pop > summary, .ib-switch > summary { list-style: none; cursor: pointer; }
.ib-me > summary::-webkit-details-marker, .ib-pop > summary::-webkit-details-marker, .ib-switch > summary::-webkit-details-marker, .ib-more > summary::-webkit-details-marker, .ib-msg > summary::-webkit-details-marker { display: none; }
.ib-menu { position: absolute; z-index: 40; top: calc(100% + 6px); left: 0; min-width: 230px; background: var(--card); border: 1px solid var(--border); border-radius: 14px; padding: 6px; box-shadow: 0 20px 44px -18px rgb(20 18 18 / .35); }
.ib-menu.up { top: auto; bottom: 0; left: calc(100% + 10px); }
.ib-pop.right .ib-menu { left: auto; right: 0; }
.ib-menu .me { padding: 8px 10px 10px; border-bottom: 1px solid var(--border); margin-bottom: 4px; font-size: 12px; color: var(--muted-foreground); overflow-wrap: anywhere; }
.ib-menu .me b { display: block; color: var(--foreground); font-size: 13px; }
.ib-menu a, .ib-menu button { display: flex; align-items: center; gap: 10px; width: 100%; padding: 8px 10px; border: 0; background: none; border-radius: 9px; font: inherit; font-size: 13.5px; color: var(--foreground); cursor: pointer; text-align: left; }
.ib-menu a:hover, .ib-menu button:hover { background: var(--muted); }
.ib-menu form { margin: 0; } .ib-menu .hi { width: 16px; height: 16px; }
.ib-menu .grow { flex: 1; }
.ib-side { display: flex; flex-direction: column; padding: 26px 22px 18px; border-right: 1px solid var(--border); overflow-y: auto; min-height: 0; }
.ib-side-head { display: flex; align-items: center; gap: 14px; padding-bottom: 20px; border-bottom: 1px solid var(--border); margin-bottom: 22px; }
.ib-back { width: 38px; height: 38px; border-radius: 11px; background: var(--muted); display: inline-flex; align-items: center; justify-content: center; color: var(--muted-foreground); flex: none; }
.ib-back:hover { color: var(--foreground); } .ib-back .hi { width: 17px; height: 17px; }
.ib-switch { min-width: 0; flex: 1; }
.ib-switch h1 { font-size: 26px; font-weight: 600; letter-spacing: -0.03em; line-height: 1.1; }
.ib-switch .addr { display: block; font-size: 12px; color: var(--muted-foreground); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; margin-top: 3px; }
.ib-switch .ib-menu { width: 260px; }
.ib-new { display: flex; align-items: center; gap: 14px; height: 50px; padding: 0 20px; border-radius: 14px; background: var(--primary); color: #fff; font-size: 16px; font-weight: 550; box-shadow: 0 10px 22px -12px color-mix(in oklab, var(--primary) 70%, transparent); }
.ib-new:hover { background: color-mix(in oklab, var(--primary) 90%, black); } .ib-new .hi { width: 21px; height: 21px; }
.ib-folders, .ib-labels { display: flex; flex-direction: column; gap: 2px; margin-top: 22px; }
.ib-labels { margin-top: 8px; }
.ib-folder { display: flex; align-items: center; gap: 16px; height: 44px; padding: 0 12px; border-radius: 12px; font-size: 15.5px; color: var(--foreground); cursor: pointer; list-style: none; }
.ib-folder:hover { background: var(--muted); }
.ib-folder .ic { display: inline-flex; color: color-mix(in oklab, var(--muted-foreground) 80%, transparent); } .ib-folder .ic .hi { width: 21px; height: 21px; }
.ib-folder.on { color: var(--primary); font-weight: 550; } .ib-folder.on .ic { color: var(--primary); }
.ib-folder .grow { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ib-more[open] > summary .chev { transform: rotate(180deg); }
.ib-more .chev { transition: transform .15s; }
.ib-count { min-width: 26px; height: 24px; padding: 0 7px; border-radius: 8px; background: var(--muted); color: var(--muted-foreground); font-size: 12px; font-weight: 650; display: inline-flex; align-items: center; justify-content: center; }
.ib-count.hot { background: var(--primary); color: #fff; }
.ib-empty-trash { padding: 4px 12px 0 50px; }
.ib-labels-head { display: flex; align-items: center; gap: 6px; margin-top: 26px; padding: 0 4px 0 12px; color: var(--muted-foreground); font-size: 15px; }
.ib-labels-head > span { flex: 1; }
.ib-plus { width: 34px; height: 34px; border-radius: 10px; background: color-mix(in oklab, var(--primary) 10%, transparent); color: var(--primary); display: inline-flex; align-items: center; justify-content: center; }
.ib-plus .hi, .ib-kebab .hi { width: 17px; height: 17px; }
.ib-kebab { width: 30px; height: 34px; display: inline-flex; align-items: center; justify-content: center; color: var(--muted-foreground); border-radius: 9px; }
.ib-kebab:hover { background: var(--muted); }
.ib-labels-head .ib-menu { left: auto; right: 0; width: 250px; }
.ib-tag { width: 26px; height: 16px; border-radius: 5px; flex: none; clip-path: polygon(0 0, 78% 0, 100% 50%, 78% 100%, 0 100%); }
.ib-tag.sm { width: 20px; height: 12px; }
.ib-swatches { display: flex; flex-wrap: wrap; gap: 6px; }
.ib-swatches button { width: 26px; height: 26px; border-radius: 8px; border: 2px solid transparent; cursor: pointer; }
.ib-swatches button.on { border-color: var(--foreground); }
.ib-storage { margin-top: auto; padding: 18px 12px 0; display: grid; gap: 6px; }
.ib-list { background: color-mix(in oklab, var(--background) 70%, var(--card)); margin: 14px 0; border-radius: 22px; display: flex; flex-direction: column; min-height: 0; overflow: hidden; }
.ib-list-head { display: flex; align-items: center; gap: 10px; padding: 18px 18px 14px; border-bottom: 1px solid var(--border); }
.ib-search { flex: 1; display: flex; align-items: center; height: 50px; border-radius: 14px; background: color-mix(in oklab, var(--muted) 85%, var(--card)); padding: 0 8px 0 18px; }
.ib-search input { flex: 1; min-width: 0; border: 0; background: transparent; font: inherit; font-size: 15.5px; color: var(--foreground); outline: none; }
.ib-search button { width: 36px; height: 36px; border: 0; background: none; color: var(--muted-foreground); display: inline-flex; align-items: center; justify-content: center; cursor: pointer; border-radius: 10px; }
.ib-search .hi { width: 19px; height: 19px; }
.ib-list-title { display: flex; align-items: baseline; justify-content: space-between; padding: 12px 22px 4px; font-size: 14px; }
.ib-bulk { display: none; align-items: center; gap: 2px; padding: 4px 16px; }
.ib-list:has(.row-check:checked) .ib-bulk { display: flex; }
.ib-items { list-style: none; margin: 0; padding: 8px 14px 18px; overflow-y: auto; flex: 1; display: grid; align-content: start; gap: 4px; }
.ib-items-empty { padding: 40px 12px; text-align: center; color: var(--muted-foreground); font-size: 14px; }
.ib-item { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 14px; align-items: start; padding: 16px 14px; border-radius: 16px; position: relative; }
.ib-item:hover { background: color-mix(in oklab, var(--card) 70%, transparent); }
.ib-item.on { background: var(--card); box-shadow: 0 10px 30px -18px rgb(20 18 18 / .35); }
.ib-pick { position: relative; cursor: pointer; }
.ib-pick input { position: absolute; inset: 0; margin: 0; opacity: 0; cursor: pointer; z-index: 1; }
.ib-pick:has(input:checked) .ib-av { background: var(--primary) !important; color: transparent !important; }
.ib-pick:has(input:checked)::after { content: ""; position: absolute; left: 14px; top: 11px; width: 8px; height: 14px; border: solid #fff; border-width: 0 2.5px 2.5px 0; transform: rotate(45deg); }
.ib-item:hover .ib-pick .ib-av { box-shadow: 0 0 0 2px var(--card), 0 0 0 4px color-mix(in oklab, var(--primary) 40%, transparent); }
.ib-item-link { display: grid; gap: 3px; min-width: 0; color: var(--foreground); }
.ib-item-top { display: flex; justify-content: space-between; gap: 10px; align-items: baseline; }
.ib-item-top b { font-size: 16px; font-weight: 550; }
.ib-item-top time { font-size: 12.5px; color: var(--muted-foreground); flex: none; }
.ib-item-subj { font-size: 13.5px; color: var(--foreground); }
.ib-item-prev { font-size: 13.5px; color: var(--muted-foreground); }
.ib-item.unread .ib-item-top b, .ib-item.unread .ib-item-subj { font-weight: 700; }
.ib-item-tags { display: flex; gap: 4px; flex-wrap: wrap; margin-top: 4px; }
.ib-chip-sm { font-size: 11px; padding: 1px 8px; border-radius: 6px; color: #2b2a33; }
.ib-item-side { display: flex; flex-direction: column; align-items: flex-end; padding-top: 26px; }
.ib-badge { min-width: 26px; height: 26px; padding: 0 7px; border-radius: 8px; background: var(--primary); color: #fff; font-size: 12.5px; font-weight: 700; display: inline-flex; align-items: center; justify-content: center; }
.ib-star { width: 28px; height: 28px; border: 0; background: none; color: color-mix(in oklab, var(--muted-foreground) 45%, transparent); cursor: pointer; display: inline-flex; align-items: center; justify-content: center; border-radius: 8px; padding: 0; }
.ib-star .hi { width: 17px; height: 17px; } .ib-star:hover { color: var(--muted-foreground); }
.ib-star.on { color: var(--primary); } .ib-star.on .hi { fill: currentColor; }
.ib-read { min-width: 0; overflow-y: auto; padding: 22px 40px 40px; }
.ib-read > .notice { margin: 0 0 14px; }
.ib-none { height: 100%; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; color: var(--muted-foreground); gap: 8px; }
.ib-none-ic { width: 76px; height: 76px; border-radius: 22px; background: var(--muted); display: inline-flex; align-items: center; justify-content: center; color: var(--foreground); margin-bottom: 8px; }
.ib-none-ic .hi { width: 34px; height: 34px; } .ib-none h2 { color: var(--foreground); font-size: 18px; }
.ib-conv { max-width: 980px; }
.ib-conv-bar { display: flex; align-items: center; gap: 12px; padding: 10px 0 20px; border-bottom: 1px solid var(--border); }
.ib-close { display: none; }
.ib-chips { display: flex; gap: 8px; flex-wrap: wrap; flex: 1; min-width: 0; align-items: center; }
.ib-chip { --tag: #f2dc9b; display: inline-flex; align-items: center; gap: 10px; height: 38px; padding: 0 22px 0 18px; background: var(--tag); color: #2b2a33; font-size: 14.5px; margin: 0;
  clip-path: polygon(0 0, calc(100% - 12px) 0, 100% 50%, calc(100% - 12px) 100%, 0 100%); border-radius: 6px 0 0 6px; }
.ib-chip span { white-space: nowrap; }
.ib-chip button { border: 0; background: none; color: inherit; cursor: pointer; display: inline-flex; padding: 0; opacity: .7; } .ib-chip button:hover { opacity: 1; } .ib-chip .hi { width: 14px; height: 14px; }
.ib-chip-add { display: inline-flex; align-items: center; gap: 6px; height: 34px; padding: 0 12px; border-radius: 10px; border: 1px dashed var(--border); color: var(--muted-foreground); font-size: 13.5px; }
.ib-chip-add:hover { color: var(--foreground); border-color: var(--muted-foreground); } .ib-chip-add .hi { width: 16px; height: 16px; }
.ib-actions { display: flex; align-items: center; gap: 2px; }
.ib-actions form { margin: 0; }
.ib-icon { width: 38px; height: 38px; border: 0; background: none; border-radius: 10px; color: color-mix(in oklab, var(--muted-foreground) 75%, transparent); display: inline-flex; align-items: center; justify-content: center; cursor: pointer; padding: 0; flex: none; }
.ib-icon:hover { background: var(--muted); color: var(--foreground); } .ib-icon .hi { width: 19px; height: 19px; }
.ib-icon.on { color: var(--primary); } .ib-icon.on .hi { fill: currentColor; }
.ib-date { margin: 22px 0 6px; font-size: 13.5px; color: var(--muted-foreground); }
.ib-subject { font-size: 34px; font-weight: 600; letter-spacing: -0.035em; line-height: 1.15; margin-bottom: 26px; overflow-wrap: anywhere; }
.ib-thread { display: grid; }
.ib-row { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 16px; padding: 14px 0; border-bottom: 1px solid var(--border); cursor: pointer; list-style: none; }
.ib-row.last { cursor: default; border-bottom: 0; }
.ib-row-who { display: inline-flex; align-items: center; gap: 14px; font-size: 16px; } .ib-row-who b { font-weight: 550; }
.ib-row-snip { color: var(--muted-foreground); font-size: 14px; }
.ib-row time { font-size: 13px; color: var(--muted-foreground); white-space: nowrap; }
.ib-reply-ic { width: 40px; height: 40px; display: inline-flex; align-items: center; justify-content: center; color: var(--muted-foreground); }
.ib-msg[open] > .ib-row { border-bottom: 0; }
.ib-msg[open] .ib-msg-body { padding: 0 0 16px 56px; border-bottom: 1px solid var(--border); }
.ib-msg.open .ib-msg-body { padding: 18px 0 8px; }
.ib-body { font-size: 15.5px; line-height: 1.65; overflow-wrap: anywhere; }
.ib-body p { margin: 0 0 14px; } .ib-body a { color: var(--primary); text-decoration: underline; }
.ib-frame { width: 100%; border: 0; min-height: 80px; display: block; background: transparent; }
.ib-app[data-theme="dark"] .ib-frame { background: #fff; border-radius: 12px; }
.ib-reply { margin-top: 24px; }
.ib-editor { border: 1px solid var(--border); border-radius: 16px; background: var(--card); overflow: hidden; }
.ib-editor:focus-within { border-color: color-mix(in oklab, var(--primary) 45%, var(--border)); box-shadow: 0 0 0 3px color-mix(in oklab, var(--primary) 12%, transparent); }
.ib-area { min-height: 110px; max-height: 360px; overflow-y: auto; padding: 18px 22px; font-size: 15px; line-height: 1.6; outline: none; }
.ib-area:empty::before { content: attr(data-placeholder); color: var(--muted-foreground); pointer-events: none; }
.ib-area.empty-warn { background: color-mix(in oklab, var(--destructive) 6%, transparent); }
.ib-area a { color: var(--primary); } .ib-area img { max-width: 100%; }
.ib-tools { display: flex; align-items: center; gap: 2px; padding: 8px 14px; border-top: 1px solid var(--border); flex-wrap: wrap; }
.ib-tool { width: 34px; height: 32px; border: 0; background: none; border-radius: 8px; color: var(--muted-foreground); display: inline-flex; align-items: center; justify-content: center; cursor: pointer; position: relative; }
.ib-tool:hover, .ib-tool.on { background: var(--muted); color: var(--primary); } .ib-tool .hi { width: 18px; height: 18px; }
.ib-color input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.ib-tool-sep { width: 1px; height: 22px; background: var(--border); margin: 0 10px; }
.ib-reply-foot { display: flex; align-items: center; gap: 4px; margin-top: 18px; }
.ib-reply-foot .grow, .ib-compose footer .grow { flex: 1; }
.ib-send { height: 50px; padding: 0 26px; border-radius: 14px; font-size: 15.5px; gap: 12px; }
.ib-send .hi { width: 19px; height: 19px; }
.ib-compose { position: fixed; right: 28px; bottom: 0; width: min(640px, calc(100vw - 24px)); z-index: 60; background: var(--card); border: 1px solid var(--border); border-bottom: 0; border-radius: 18px 18px 0 0; box-shadow: 0 30px 70px -20px rgb(20 18 18 / .45); }
.ib-compose header { display: flex; justify-content: space-between; align-items: center; padding: 12px 14px 12px 22px; border-bottom: 1px solid var(--border); font-size: 15px; }
.ib-line { display: flex; align-items: center; gap: 14px; padding: 0 22px; min-height: 46px; border-bottom: 1px solid var(--border); font-size: 14px; }
.ib-line > span { width: 56px; color: var(--muted-foreground); flex: none; } .ib-line b { font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ib-line input { flex: 1; border: 0; outline: none; font: inherit; font-size: 14.5px; background: transparent; color: var(--foreground); min-width: 0; }
.ib-compose-body { padding: 14px 16px 0; }
.ib-compose-body .ib-area { min-height: 220px; }
.ib-compose footer { display: flex; align-items: center; gap: 6px; padding: 14px 16px; }
.ib-compose .ib-send { height: 44px; }
.ib-contacts { grid-column: span 2; margin-right: 14px; }
.ib-app.ib-wide .ib-read { display: none; }
.ib-people { overflow-y: auto; padding: 8px 14px 18px; display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 10px; align-content: start; }
.ib-person { display: flex; align-items: center; gap: 14px; padding: 14px; border-radius: 16px; background: var(--card); }
.ib-person .grow { flex: 1; min-width: 0; display: grid; gap: 2px; } .ib-person b { font-size: 15px; } .ib-person .xs { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ib-blank { min-height: 100dvh; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; text-align: center; padding: 24px; }
@media print {
  .ib-app { display: block; height: auto; overflow: visible; }
  .ib-rail, .ib-side, .ib-list, .ib-conv-bar, .ib-reply, .ib-compose, .notice, .ib-scrim { display: none !important; }
  .ib-read { padding: 0; overflow: visible; }
  .ib-msg .ib-msg-body { display: block !important; padding-left: 0 !important; }
}
@media (max-width: 1360px) { .ib-app { grid-template-columns: 68px 250px 340px minmax(0, 1fr); } .ib-read { padding: 20px 28px 36px; } .ib-side { padding: 22px 16px 16px; } }
@media (max-width: 1100px) {
  .ib-app { grid-template-columns: 68px 240px minmax(0, 1fr); }
  .ib-app .ib-read { display: none; }
  .ib-app.has-conv .ib-list { display: none; }
  .ib-app.has-conv .ib-read { display: block; }
  .ib-close { display: inline-flex; }
  .ib-contacts { grid-column: auto; }
}
@media (max-width: 760px) {
  .ib-app { grid-template-columns: minmax(0, 1fr); grid-template-rows: minmax(0, 1fr) auto; }
  .ib-rail { grid-row: 2; flex-direction: row; justify-content: space-around; padding: 6px 10px calc(6px + env(safe-area-inset-bottom)); border-right: 0; border-top: 1px solid var(--border); gap: 4px; }
  .ib-rail .ib-logo, .ib-rail .grow { display: none; }
  .ib-rail-btn { width: 44px; height: 44px; }
  .ib-menu.up { left: auto; right: 0; bottom: calc(100% + 8px); }
  .ib-side { position: fixed; z-index: 70; top: 0; bottom: 0; left: 0; width: 300px; background: var(--card); transform: translateX(-102%); transition: transform .2s var(--ease); }
  #ib-nav:checked ~ .ib-side { transform: none; box-shadow: 0 0 60px -10px rgb(20 18 18 / .4); }
  #ib-nav:checked ~ .ib-scrim { display: block; position: fixed; inset: 0; z-index: 65; background: rgb(20 18 18 / .3); }
  .ib-burger { display: inline-flex; width: 40px; height: 40px; align-items: center; justify-content: center; color: var(--muted-foreground); flex: none; }
  .ib-burger .hi { width: 22px; height: 22px; }
  .ib-list { margin: 0; border-radius: 0; grid-row: 1; }
  .ib-list-head { padding: 12px; } .ib-search { height: 44px; }
  .ib-items { padding: 6px 8px 14px; } .ib-item { padding: 12px 10px; gap: 12px; }
  .ib-app.has-conv .ib-read { grid-row: 1; padding: 14px 16px 28px; }
  .ib-subject { font-size: 26px; } .ib-row { gap: 10px; } .ib-row-snip { display: none; }
  .ib-conv-bar { flex-wrap: wrap; } .ib-chips { order: 3; flex-basis: 100%; flex-wrap: nowrap; overflow-x: auto; padding-bottom: 2px; }
  .ib-chip { height: 32px; padding: 0 18px 0 12px; font-size: 13px; flex: none; } .ib-actions { margin-left: auto; }
  .ib-row-who { font-size: 15px; } .ib-msg[open] .ib-msg-body { padding-left: 0; }
  .ib-tools { padding: 6px 8px; } .ib-tool-sep { margin: 0 4px; }
  .ib-compose { right: 0; width: 100vw; top: 0; border-radius: 0; display: flex; flex-direction: column; }
  .ib-compose form { display: flex; flex-direction: column; height: 100%; } .ib-compose-body { flex: 1; } .ib-compose-body .ib-area { min-height: 40vh; }
  .ib-people { grid-template-columns: minmax(0, 1fr); }
}
/* Webmail files */
.ib-clip { display: inline-flex; vertical-align: -2px; margin-right: 4px; color: var(--muted-foreground); } .ib-clip .hi { width: 13px; height: 13px; }
.ib-files { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.ib-files:empty { display: none; }
.ib-file { display: inline-flex; align-items: center; gap: 8px; max-width: 280px; height: 34px; padding: 0 6px 0 10px; border-radius: 10px; background: var(--muted); font-size: 13px; }
.ib-file .ic { display: inline-flex; font-size: 13px; color: var(--muted-foreground); } .ib-file .ic .hi { width: 15px; height: 15px; }
.ib-file .clip1 { min-width: 0; max-width: 150px; }
.ib-file button { border: 0; background: none; cursor: pointer; color: var(--muted-foreground); display: inline-flex; padding: 4px; border-radius: 6px; font-size: 14px; line-height: 1; }
.ib-file button:hover { background: var(--card); color: var(--foreground); } .ib-file button .hi { width: 13px; height: 13px; }
.ib-file.uploading { opacity: .7; } .ib-file.uploading .ic { animation: ib-pulse 1s ease-in-out infinite; }
.ib-file.failed { background: color-mix(in oklab, var(--destructive) 10%, transparent); color: var(--destructive); } .ib-file.failed .xs { color: var(--destructive); }
@keyframes ib-pulse { 50% { opacity: .3; } }
.ib-editor.drop { border-color: var(--primary); box-shadow: 0 0 0 3px color-mix(in oklab, var(--primary) 18%, transparent); }
.ib-attached { margin-top: 18px; display: grid; gap: 8px; }
.ib-attached-list { display: flex; flex-wrap: wrap; gap: 10px; }
.ib-att { display: flex; align-items: center; gap: 12px; width: 260px; padding: 10px 12px; border: 1px solid var(--border); border-radius: 14px; color: var(--foreground); background: var(--card); }
.ib-att:hover { border-color: color-mix(in oklab, var(--primary) 40%, var(--border)); }
.ib-att img { width: 44px; height: 44px; object-fit: cover; border-radius: 9px; flex: none; background: var(--muted); }
.ib-att-ext { width: 44px; height: 44px; border-radius: 9px; flex: none; background: color-mix(in oklab, var(--primary) 12%, transparent); color: var(--primary); font-size: 11px; font-weight: 700; display: inline-flex; align-items: center; justify-content: center; }
.ib-att-name { flex: 1; min-width: 0; display: grid; gap: 2px; } .ib-att-name b { font-size: 13.5px; font-weight: 550; }
.ib-att-dl { display: inline-flex; color: var(--muted-foreground); } .ib-att-dl .hi { width: 18px; height: 18px; }
@media (max-width: 760px) { .ib-att { width: 100%; } }

/* ── Support (apps/support): rail · views · list · conversation · details ── */
.sp-app { display: grid; grid-template-columns: 72px 252px minmax(0, 1fr); height: 100dvh; background: var(--card); color: var(--foreground); overflow: hidden; }
.sp-app.no-side { grid-template-columns: 72px minmax(0, 1fr); }
#sp-nav, #sp-panel, .sp-scrim, .sp-panel-scrim, .sp-app .sp-burger, .sp-app .sp-back, .sp-app .sp-details-btn, .sp-app .sp-panel-close { display: none; }
.sp-av { width: 32px; height: 32px; border-radius: 999px; display: inline-flex; align-items: center; justify-content: center; color: #fff; font-size: 12px; font-weight: 650; flex: none; letter-spacing: 0; }
.sp-av.xs { width: 22px; height: 22px; font-size: 9px; } .sp-av.sm { width: 30px; height: 30px; font-size: 11px; } .sp-av.md { width: 38px; height: 38px; font-size: 13px; }
.sp-av.lg { width: 48px; height: 48px; font-size: 16px; } .sp-av.xl { width: 64px; height: 64px; font-size: 21px; }
.sp-av.ai { background: linear-gradient(135deg, #1f1b2e, #6d28d9); color: #fff; } .sp-av.ai svg { width: 56%; height: 56%; }
.sp-icon { width: 36px; height: 36px; border: 0; background: none; border-radius: 10px; color: var(--muted-foreground); display: inline-flex; align-items: center; justify-content: center; cursor: pointer; padding: 0; flex: none; }
.sp-icon:hover { background: var(--muted); color: var(--foreground); } .sp-icon.on { color: var(--primary); } .sp-icon svg, .sp-icon .hi { width: 18px; height: 18px; }
.sp-icon > span { display: inline-flex; }
.sp-toast { position: fixed; left: 50%; top: 14px; transform: translateX(-50%); z-index: 60; min-width: 260px; max-width: calc(100vw - 32px); }
.sp-toast .notice { margin: 0; box-shadow: 0 18px 40px -20px rgb(20 18 18 / .4); background: var(--card); }

/* Rail */
.sp-rail { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 16px 0 14px; background: var(--sidebar); border-right: 1px solid var(--sidebar-border); }
.sp-logo { margin-bottom: 14px; } .sp-logo .mark { width: 38px; height: 38px; border-radius: 12px; } .sp-logo .mark img { width: 22px; }
.sp-rail-btn { position: relative; width: 46px; height: 46px; border-radius: 14px; display: inline-flex; align-items: center; justify-content: center; color: var(--muted-foreground); }
.sp-rail-btn:hover { background: var(--sidebar-accent); color: var(--foreground); }
.sp-rail-btn.on { background: var(--card); color: var(--primary); box-shadow: 0 6px 16px -10px rgb(20 18 18 / .35); }
.sp-rail-btn > span { display: inline-flex; } .sp-rail-btn svg, .sp-rail-btn .hi { width: 22px; height: 22px; }
.sp-rail-btn em { position: absolute; left: calc(100% + 10px); top: 50%; transform: translateY(-50%); background: var(--foreground); color: var(--background); font-style: normal; font-size: 12px; font-weight: 550;
  padding: 4px 9px; border-radius: 8px; white-space: nowrap; opacity: 0; pointer-events: none; transition: opacity .12s; z-index: 50; }
.sp-rail-btn:hover em { opacity: 1; }
.sp-rail-btn .n { position: absolute; top: 4px; right: 3px; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 999px; background: var(--primary); color: #fff; font: 700 10px/18px var(--font); font-style: normal; text-align: center; }
.sp-rail .grow { flex: 1; }
.sp-me { position: relative; } .sp-me > summary { list-style: none; cursor: pointer; } .sp-me > summary::-webkit-details-marker { display: none; }
.sp-pop { position: relative; } .sp-pop > summary { list-style: none; cursor: pointer; } .sp-pop > summary::-webkit-details-marker { display: none; }
.sp-menu { position: absolute; z-index: 45; top: calc(100% + 6px); left: 0; min-width: 230px; max-height: 70vh; overflow-y: auto; background: var(--card); border: 1px solid var(--border); border-radius: 14px; padding: 6px;
  box-shadow: 0 20px 44px -18px rgb(20 18 18 / .4); }
.sp-pop.right .sp-menu { left: auto; right: 0; } .sp-pop.up .sp-menu { top: auto; bottom: calc(100% + 6px); }
.sp-menu.up { top: auto; bottom: 0; left: calc(100% + 10px); }
.sp-menu .who { padding: 8px 10px 10px; border-bottom: 1px solid var(--border); margin-bottom: 4px; font-size: 12px; color: var(--muted-foreground); display: flex; flex-direction: column; overflow-wrap: anywhere; }
.sp-menu .who b { color: var(--foreground); font-size: 13px; }
.sp-menu a, .sp-menu button { display: flex; align-items: center; gap: 10px; width: 100%; padding: 8px 10px; border: 0; background: none; border-radius: 9px; font: inherit; font-size: 13.5px; color: var(--foreground); cursor: pointer; text-align: left; }
.sp-menu a:hover, .sp-menu button:hover { background: var(--muted); }
.sp-menu form { margin: 0; } .sp-menu hr { border: 0; border-top: 1px solid var(--border); margin: 4px 0; }
.sp-menu span[inner_html], .sp-menu a > span:first-child, .sp-menu button > span:first-child { display: inline-flex; } .sp-menu svg { width: 16px; height: 16px; }
.sp-menu .grow { flex: 1; }
.sp-form-menu { width: 280px; padding: 14px; display: grid; gap: 10px; }
.sp-hint { padding: 6px 10px; font-size: 12px; color: var(--muted-foreground); margin: 0; }

/* Views column */
.sp-side { display: flex; flex-direction: column; min-height: 0; background: color-mix(in oklab, var(--sidebar) 45%, var(--card)); border-right: 1px solid var(--border); }
.sp-side-head { display: flex; align-items: center; justify-content: space-between; padding: 18px 14px 10px 20px; }
.sp-side-head h2 { font-size: 20px; letter-spacing: -0.03em; }
.sp-side-scroll { overflow-y: auto; padding: 4px 10px 20px; flex: 1; min-height: 0; }
.sp-group { display: grid; gap: 1px; }
.sp-item { display: flex; align-items: center; gap: 10px; height: 34px; padding: 0 10px; border-radius: 10px; font-size: 13.5px; color: var(--foreground); }
.sp-item:hover { background: var(--muted); }
.sp-item.on { background: var(--card); font-weight: 600; box-shadow: 0 4px 12px -8px rgb(20 18 18 / .3); }
.sp-item .ic { width: 20px; display: inline-flex; justify-content: center; color: var(--muted-foreground); flex: none; } .sp-item .ic svg { width: 17px; height: 17px; }
.sp-item.on .ic { color: var(--primary); }
.sp-item .ic.aidot::before { content: ""; width: 6px; height: 6px; border-radius: 999px; background: color-mix(in oklab, #6d28d9 70%, var(--muted-foreground)); }
.sp-item .ic.emoji { font-size: 14px; }
.sp-item .name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sp-item .n { font-size: 12px; color: var(--muted-foreground); font-variant-numeric: tabular-nums; }
.sp-section { margin-top: 14px; }
.sp-section > summary { list-style: none; display: flex; align-items: center; gap: 6px; padding: 6px 10px; font-size: 12px; font-weight: 650; color: var(--muted-foreground); cursor: pointer; border-radius: 8px; }
.sp-section > summary::-webkit-details-marker { display: none; }
.sp-section > summary:hover { color: var(--foreground); }
.sp-section > summary a { display: inline-flex; color: var(--muted-foreground); } .sp-section > summary a:hover { color: var(--primary); } .sp-section > summary svg { width: 15px; height: 15px; }
.sp-section > summary .chev { display: inline-flex; transition: transform .15s; } .sp-section:not([open]) > summary .chev { transform: rotate(-90deg); }
.sp-section > summary .grow { flex: 1; } .sec-ic { display: inline-flex; color: #6d28d9; } .sec-ic svg { width: 15px; height: 15px; }
.sp-pill { font-size: 10px; font-weight: 650; padding: 1px 7px; border-radius: 999px; background: color-mix(in oklab, #6d28d9 12%, transparent); color: #6d28d9; }
.sp-tagdot { width: 9px; height: 9px; border-radius: 3px; display: inline-block; flex: none; }

/* Main */
.sp-main { min-width: 0; min-height: 0; display: flex; flex-direction: column; position: relative; }
.sp-inbox { display: grid; grid-template-columns: 340px minmax(0, 1fr) 340px; height: 100%; min-height: 0; }
.sp-inbox:not(.has-conv) { grid-template-columns: 340px minmax(0, 1fr); }

/* The list */
.sp-list { display: flex; flex-direction: column; min-height: 0; border-right: 1px solid var(--border); background: var(--card); }
.sp-list-head { display: flex; align-items: center; gap: 8px; padding: 16px 14px 8px 18px; }
.sp-list-head h2 { font-size: 17px; letter-spacing: -0.02em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sp-count { font-size: 12px; color: var(--muted-foreground); background: var(--muted); border-radius: 999px; padding: 0 8px; font-weight: 600; }
.sp-list-head .grow { flex: 1; }
.sp-sort { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; color: var(--muted-foreground); padding: 6px 8px; border-radius: 9px; white-space: nowrap; }
.sp-sort:hover { background: var(--muted); color: var(--foreground); } .sp-sort > span { display: inline-flex; } .sp-sort svg { width: 15px; height: 15px; }
.sp-search { display: flex; align-items: center; gap: 8px; margin: 4px 14px 8px; height: 38px; padding: 0 12px; border-radius: 12px; background: var(--muted); }
.sp-search > span { display: inline-flex; color: var(--muted-foreground); } .sp-search svg { width: 16px; height: 16px; }
.sp-search input { flex: 1; min-width: 0; border: 0; background: none; outline: none; font-size: 13.5px; }
.sp-search.wide { margin: 0 0 16px; height: 44px; max-width: 520px; background: var(--card); border: 1px solid var(--border); }
.sp-tabs { display: flex; gap: 2px; padding: 0 14px 8px; border-bottom: 1px solid var(--border); overflow-x: auto; scrollbar-width: none; }
.sp-tabs a { font-size: 12.5px; padding: 5px 10px; border-radius: 8px; color: var(--muted-foreground); white-space: nowrap; font-weight: 550; }
.sp-tabs a:hover { color: var(--foreground); background: var(--muted); } .sp-tabs a.on { background: var(--foreground); color: var(--background); }
.sp-items { flex: 1; overflow-y: auto; padding: 6px 8px 20px; display: grid; align-content: start; gap: 2px; }
.sp-li { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 12px; padding: 12px 10px; border-radius: 14px; color: var(--foreground); position: relative; }
.sp-li:hover { background: color-mix(in oklab, var(--muted) 70%, transparent); }
.sp-li.on { background: color-mix(in oklab, var(--primary) 7%, var(--card)); box-shadow: inset 3px 0 0 var(--primary); }
.sp-li .body { display: grid; gap: 2px; min-width: 0; }
.sp-li .top { display: flex; align-items: baseline; gap: 6px; }
.sp-li .top b { font-size: 14px; font-weight: 550; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; flex: 1; min-width: 0; }
.sp-li .top time { font-size: 11.5px; color: var(--muted-foreground); flex: none; }
.sp-li .top .flag { display: inline-flex; color: var(--primary); } .sp-li .top .flag svg { width: 13px; height: 13px; }
.sp-li .subj { font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sp-li .prev { font-size: 13px; color: var(--muted-foreground); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.sp-li.unread .top b, .sp-li.unread .subj { font-weight: 700; } .sp-li.unread .prev { color: var(--foreground); }
.sp-li .meta { display: flex; align-items: center; gap: 4px; margin-top: 4px; min-height: 0; flex-wrap: wrap; } .sp-li .meta:empty { display: none; }
.sp-li .meta .grow { flex: 1; }
.sp-unread { width: 8px; height: 8px; border-radius: 999px; background: var(--primary); display: inline-block; }
.sp-chip { display: inline-flex; align-items: center; gap: 5px; height: 20px; padding: 0 8px; border-radius: 6px; background: var(--muted); color: var(--muted-foreground); font-size: 11px; font-weight: 550; white-space: nowrap; }
.sp-chip > span { display: inline-flex; } .sp-chip svg { width: 12px; height: 12px; }
.sp-chip.ai { background: color-mix(in oklab, #6d28d9 10%, transparent); color: #6d28d9; }
.sp-chip.warn { background: color-mix(in oklab, var(--warning) 18%, transparent); color: color-mix(in oklab, var(--warning) 60%, black); }
.sp-chip.ok { background: color-mix(in oklab, var(--success) 14%, transparent); color: var(--success); }
.sp-items-empty { padding: 50px 20px; text-align: center; color: var(--muted-foreground); display: grid; justify-items: center; gap: 4px; }
.sp-items-empty > span { display: inline-flex; color: var(--success); } .sp-items-empty svg { width: 36px; height: 36px; } .sp-items-empty b { color: var(--foreground); }

/* The conversation */
.sp-conv { display: flex; flex-direction: column; min-width: 0; min-height: 0; background: var(--background); }
.sp-conv-head { display: flex; align-items: center; gap: 4px; padding: 10px 14px 10px 20px; background: var(--card); border-bottom: 1px solid var(--border); min-height: 62px; }
.sp-conv-head form { margin: 0; }
.sp-conv-head .t { min-width: 0; flex: 1; display: flex; flex-direction: column; margin-right: 6px; }
.sp-conv-head .t h2 { font-size: 16px; letter-spacing: -0.02em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sp-conv-head .t span { font-size: 12.5px; color: var(--muted-foreground); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sp-conv-head .grow { display: none; } .sp-conv-head .btn { margin-left: 4px; }
.sp-assign { display: inline-flex; align-items: center; gap: 6px; height: 34px; padding: 0 10px; border-radius: 10px; border: 1px solid var(--border); font-size: 13px; color: var(--foreground); margin-right: 2px; }
.sp-assign:hover { background: var(--muted); } .sp-assign > span:first-child { display: inline-flex; } .sp-assign svg { width: 16px; height: 16px; }
.sp-thread { flex: 1; overflow-y: auto; padding: 22px 28px 18px; display: flex; flex-direction: column; gap: 14px; min-height: 0; }
.sp-thread-start { display: grid; justify-items: center; text-align: center; gap: 4px; padding: 6px 0 14px; color: var(--muted-foreground); font-size: 12.5px; }
.sp-thread-start b { color: var(--foreground); font-size: 15px; margin-top: 4px; }
.sp-msg { display: flex; align-items: flex-end; gap: 10px; max-width: min(640px, 82%); }
.sp-msg > div { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.sp-msg .bubble { padding: 11px 15px; border-radius: 18px 18px 18px 6px; background: var(--card); white-space: pre-wrap; overflow-wrap: anywhere; font-size: 14px; line-height: 1.5; box-shadow: 0 1px 0 rgb(20 18 18 / .04); }
.sp-msg .by { font-size: 11.5px; color: var(--muted-foreground); padding: 0 4px; }
.sp-msg.out { align-self: flex-end; } .sp-msg.out > div { align-items: flex-end; }
.sp-msg.out .bubble { background: color-mix(in oklab, var(--primary) 11%, var(--card)); border-radius: 18px 18px 6px 18px; }
.sp-msg.ai .bubble { background: color-mix(in oklab, #6d28d9 8%, var(--card)); }
.sp-msg .src { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; white-space: normal; }
.sp-msg .src a { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; padding: 4px 10px; border-radius: 8px; background: var(--card); border: 1px solid var(--border); color: var(--foreground); }
.sp-msg .src a:hover { border-color: #6d28d9; } .sp-msg .src span { display: inline-flex; color: #6d28d9; } .sp-msg .src svg { width: 13px; height: 13px; }
.sp-msg.typing .bubble { display: inline-flex; gap: 4px; padding: 14px 16px; }
.sp-msg.typing i { width: 7px; height: 7px; border-radius: 999px; background: var(--muted-foreground); animation: sp-blink 1.2s infinite; }
.sp-msg.typing i:nth-child(2) { animation-delay: .2s; } .sp-msg.typing i:nth-child(3) { animation-delay: .4s; }
@keyframes sp-blink { 0%, 80%, 100% { opacity: .25; } 40% { opacity: 1; } }
.sp-note { align-self: stretch; background: color-mix(in oklab, #f5c451 22%, var(--card)); border: 1px solid color-mix(in oklab, #f5c451 45%, transparent); border-radius: 14px; padding: 10px 14px; max-width: 760px; margin: 0 auto; width: 100%; }
.sp-note .head { display: flex; align-items: center; gap: 6px; font-size: 12px; color: color-mix(in oklab, #a16207 85%, var(--foreground)); }
.sp-note .head > span { display: inline-flex; } .sp-note .head svg { width: 14px; height: 14px; } .sp-note .head time { margin-left: auto; color: var(--muted-foreground); }
.sp-note p { white-space: pre-wrap; margin-top: 4px; font-size: 14px; }
.sp-sys { align-self: center; display: flex; gap: 8px; font-size: 12px; color: var(--muted-foreground); text-align: center; }
.sp-sys time { opacity: .7; }
.sp-ai-bar { display: flex; align-items: center; gap: 8px; margin: 0 20px; padding: 8px 12px; border-radius: 12px 12px 0 0; background: color-mix(in oklab, #6d28d9 9%, var(--card)); color: #6d28d9; font-size: 12.5px; }
.sp-ai-bar > span:first-child { display: inline-flex; } .sp-ai-bar svg { width: 15px; height: 15px; }
.sp-composer { margin: 0 20px 18px; background: var(--card); border: 1px solid var(--border); border-radius: 18px; box-shadow: 0 10px 30px -22px rgb(20 18 18 / .5); transition: background .15s, border-color .15s; }
.sp-ai-bar + .sp-composer { border-top-left-radius: 0; border-top-right-radius: 0; }
.sp-composer:focus-within { border-color: color-mix(in oklab, var(--primary) 45%, var(--border)); }
.sp-composer.note { background: color-mix(in oklab, #f5c451 16%, var(--card)); border-color: color-mix(in oklab, #f5c451 50%, var(--border)); }
.sp-composer .modes { display: flex; align-items: center; gap: 4px; padding: 8px 10px 0; }
.sp-composer .modes label { cursor: pointer; } .sp-composer .modes input { position: absolute; opacity: 0; pointer-events: none; }
.sp-composer .modes span { display: inline-block; padding: 4px 12px; border-radius: 8px; font-size: 13px; font-weight: 600; color: var(--muted-foreground); }
.sp-composer .modes input:checked + span { background: var(--muted); color: var(--foreground); }
.sp-composer.note .modes input:checked + span { background: color-mix(in oklab, #f5c451 40%, transparent); color: color-mix(in oklab, #a16207 80%, var(--foreground)); }
.sp-composer .modes input:focus-visible + span { outline: 2px solid var(--ring); }
.sp-composer .modes .grow { flex: 1; } .sp-composer .modes .hint { font-size: 12px; color: var(--muted-foreground); }
.sp-composer textarea { display: block; width: 100%; border: 0; background: none; outline: none; resize: none; padding: 10px 16px 6px; font: inherit; font-size: 14px; line-height: 1.5; min-height: 70px; max-height: 320px; color: var(--foreground); }
.sp-composer .tools { display: flex; align-items: center; gap: 4px; padding: 6px 10px 10px; flex-wrap: wrap; }
.sp-composer .tools .grow { flex: 1; }
.sp-tool { display: inline-flex; align-items: center; gap: 6px; height: 32px; padding: 0 10px; border: 0; background: none; border-radius: 9px; font: inherit; font-size: 12.5px; color: var(--muted-foreground); cursor: pointer; }
.sp-tool:hover { background: var(--muted); color: var(--foreground); } .sp-tool > span:first-child { display: inline-flex; } .sp-tool svg { width: 16px; height: 16px; }
.sp-tool.copilot { color: #6d28d9; } .sp-tool.copilot:hover { background: color-mix(in oklab, #6d28d9 9%, transparent); color: #6d28d9; }
.sp-tool.busy { opacity: .6; pointer-events: none; }
.sp-none { height: 100%; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; gap: 8px; color: var(--muted-foreground); padding: 40px 20px; }
.sp-none h2 { color: var(--foreground); font-size: 18px; } .sp-none p { max-width: 360px; } .sp-none.small { height: auto; padding: 30px; }
.sp-none-ic { width: 72px; height: 72px; border-radius: 22px; background: var(--card); display: inline-flex; align-items: center; justify-content: center; color: var(--primary); margin-bottom: 6px; box-shadow: 0 10px 30px -20px rgb(20 18 18 / .5); }
.sp-none-ic svg { width: 32px; height: 32px; }

/* Details / Copilot */
.sp-panel { display: flex; flex-direction: column; min-height: 0; border-left: 1px solid var(--border); background: var(--card); }
.sp-panel-tabs { display: flex; align-items: center; gap: 4px; padding: 12px 12px 10px; border-bottom: 1px solid var(--border); min-height: 62px; }
.sp-panel-tabs button { display: inline-flex; align-items: center; gap: 6px; height: 32px; padding: 0 12px; border: 0; background: none; border-radius: 9px; font: inherit; font-size: 13px; font-weight: 600; color: var(--muted-foreground); cursor: pointer; }
.sp-panel-tabs button:hover { color: var(--foreground); } .sp-panel-tabs button.on { background: var(--muted); color: var(--foreground); }
.sp-panel-tabs button > span { display: inline-flex; color: #6d28d9; } .sp-panel-tabs svg { width: 15px; height: 15px; } .sp-panel-tabs .grow { flex: 1; }
.sp-panel-body { flex: 1; overflow-y: auto; padding: 12px; display: flex; flex-direction: column; gap: 10px; min-height: 0; }
.sp-panel-body[hidden] { display: none; }
.sp-panel-body > div[data-live-region] { display: flex; flex-direction: column; gap: 10px; }
.sp-card { background: var(--card); border: 1px solid var(--border); border-radius: 16px; padding: 14px; }
.sp-page .sp-card { border: 0; border-radius: 20px; padding: 18px; }
.sp-card h3 { font-size: 13.5px; font-weight: 650; margin-bottom: 10px; display: flex; align-items: center; gap: 6px; }
.sp-person b { font-size: 15px; display: block; } .sp-person.big h2 { font-size: 22px; letter-spacing: -0.03em; }
.block { display: block; }
.sp-face-wrap { position: relative; display: inline-flex; } .sp-face-wrap i.on { position: absolute; right: 0; bottom: 0; width: 11px; height: 11px; border-radius: 999px; background: #16a34a; border: 2px solid var(--card); }
.sp-kvs { display: grid; gap: 6px; margin: 12px 0 10px; }
.sp-kv { display: flex; justify-content: space-between; gap: 12px; font-size: 13px; }
.sp-kv > span:first-child { color: var(--muted-foreground); flex: none; } .sp-kv > span:last-child { text-align: right; min-width: 0; overflow-wrap: anywhere; }
.sp-field { display: grid; gap: 4px; margin-bottom: 10px; } .sp-field label { font-size: 12px; font-weight: 600; color: var(--muted-foreground); }
.sp-field .select { height: 36px; border-radius: 10px; font-size: 13px; }
.sp-tags { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.sp-tag { display: inline-flex; align-items: center; gap: 6px; height: 26px; padding: 0 4px 0 9px; border-radius: 8px; background: var(--muted); font-size: 12.5px; margin: 0; }
.sp-tag button { width: 20px; height: 20px; border: 0; background: none; border-radius: 6px; display: inline-flex; align-items: center; justify-content: center; color: var(--muted-foreground); cursor: pointer; padding: 0; }
.sp-tag button:hover { background: var(--card); color: var(--foreground); } .sp-tag svg { width: 12px; height: 12px; }
.sp-tag-add { margin: 0; } .sp-tag-add input { height: 26px; width: 96px; border: 1px dashed var(--border); border-radius: 8px; background: none; padding: 0 8px; font-size: 12.5px; outline: none; }
.sp-tag-add input:focus { border-color: var(--primary); border-style: solid; width: 140px; }
.sp-status { font-size: 11px; font-weight: 650; text-transform: capitalize; padding: 1px 8px; border-radius: 6px; background: var(--muted); color: var(--muted-foreground); flex: none; }
.sp-status.open { background: color-mix(in oklab, var(--success) 14%, transparent); color: var(--success); }
.sp-status.snoozed { background: color-mix(in oklab, var(--warning) 18%, transparent); color: color-mix(in oklab, var(--warning) 60%, black); }
.sp-stars { color: #f59e0b; letter-spacing: 1px; } .sp-stars i { color: var(--border); font-style: normal; }
.sp-other { display: flex; align-items: center; gap: 8px; padding: 7px 6px; border-radius: 9px; font-size: 13px; }
.sp-other:hover { background: var(--muted); } .sp-other .t { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; } .sp-other time { font-size: 11.5px; color: var(--muted-foreground); }
.sp-copilot-intro { text-align: center; display: grid; justify-items: center; gap: 4px; padding: 10px 6px 4px; }
.sp-copilot-intro b { font-size: 15px; margin-top: 4px; } .sp-copilot-intro p { font-size: 12.5px; color: var(--muted-foreground); }
.sp-quick { display: flex; gap: 6px; flex-wrap: wrap; justify-content: center; } .sp-quick form { margin: 0; }
.sp-chip-btn { display: inline-flex; align-items: center; gap: 6px; height: 30px; padding: 0 12px; border: 1px solid color-mix(in oklab, #6d28d9 25%, var(--border)); background: var(--card); color: #6d28d9; border-radius: 999px; font: inherit; font-size: 12.5px; font-weight: 600; cursor: pointer; }
.sp-chip-btn:hover { background: color-mix(in oklab, #6d28d9 8%, var(--card)); } .sp-chip-btn > span { display: inline-flex; } .sp-chip-btn svg { width: 14px; height: 14px; }
.sp-copilot-log { display: flex; flex-direction: column; gap: 8px; flex: 1; overflow-y: auto; min-height: 0; padding: 6px 0; }
.sp-q { align-self: flex-end; max-width: 85%; background: var(--muted); padding: 8px 12px; border-radius: 14px 14px 4px 14px; font-size: 13px; }
.sp-a { background: color-mix(in oklab, #6d28d9 6%, var(--card)); border: 1px solid color-mix(in oklab, #6d28d9 16%, var(--border)); border-radius: 14px; padding: 10px 12px; display: grid; gap: 8px; }
.sp-a p { white-space: pre-wrap; font-size: 13.5px; } .sp-a .src { display: flex; flex-wrap: wrap; gap: 4px; }
.sp-a .src a { display: inline-flex; align-items: center; gap: 5px; font-size: 11.5px; padding: 3px 8px; border-radius: 7px; background: var(--card); border: 1px solid var(--border); }
.sp-a .src span { display: inline-flex; color: #6d28d9; } .sp-a .src svg { width: 12px; height: 12px; } .sp-a .sp-chip-btn { justify-self: start; }
.sp-ask { display: flex; align-items: center; gap: 6px; border: 1px solid var(--border); border-radius: 14px; padding: 4px 4px 4px 12px; background: var(--card); margin: 0; flex: none; }
.sp-ask:focus-within { border-color: #6d28d9; } .sp-ask input { flex: 1; min-width: 0; border: 0; background: none; outline: none; font-size: 13.5px; height: 34px; }
.sp-ask .sp-icon { color: #6d28d9; }

/* Pages */
.sp-bar { display: flex; align-items: center; gap: 10px; padding: 16px 28px; border-bottom: 1px solid var(--border); background: var(--card); min-height: 66px; flex-wrap: wrap; }
.sp-bar h1 { font-size: 20px; letter-spacing: -0.03em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; } .sp-bar .grow { flex: 1; } .sp-bar form { margin: 0; }
.sp-bar details > summary.btn { list-style: none; } .sp-bar details > summary::-webkit-details-marker { display: none; }
.sp-page { flex: 1; overflow-y: auto; padding: 24px 28px 48px; background: var(--background); display: flex; flex-direction: column; gap: 16px; min-height: 0; }
.sp-page > * { max-width: 1240px; width: 100%; flex-shrink: 0; }
.sp-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; }
.sp-stat { background: var(--card); border-radius: 18px; padding: 14px 16px; display: grid; gap: 2px; }
.sp-stat span { font-size: 12px; color: var(--muted-foreground); font-weight: 550; } .sp-stat b { font-size: 26px; letter-spacing: -0.03em; font-variant-numeric: tabular-nums; } .sp-stat em { font-style: normal; font-size: 12px; color: var(--muted-foreground); }
.sp-two { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: 16px; align-items: start; }
.sp-table td, .sp-table th { white-space: nowrap; }
.sp-person-row { display: flex; align-items: center; gap: 10px; }
.sp-subtabs { display: flex; gap: 4px; overflow-x: auto; scrollbar-width: none; border-bottom: 1px solid var(--border); padding-bottom: 0; }
.sp-subtabs a { padding: 8px 12px; font-size: 13.5px; font-weight: 550; color: var(--muted-foreground); border-bottom: 2px solid transparent; white-space: nowrap; margin-bottom: -1px; }
.sp-subtabs a:hover { color: var(--foreground); } .sp-subtabs a.on { color: var(--foreground); border-bottom-color: var(--primary); }
.sp-seg { display: inline-flex; background: var(--muted); border-radius: 11px; padding: 3px; gap: 2px; flex-wrap: wrap; }
.sp-seg a, .sp-seg label { padding: 5px 12px; border-radius: 8px; font-size: 13px; font-weight: 550; color: var(--muted-foreground); cursor: pointer; white-space: nowrap; }
.sp-seg a.on, .sp-seg label.on { background: var(--card); color: var(--foreground); box-shadow: 0 2px 6px -3px rgb(20 18 18 / .3); }
.sp-seg input { position: absolute; opacity: 0; pointer-events: none; }
.sp-switch-row { display: flex; gap: 12px; align-items: flex-start; padding: 12px; border-radius: 12px; background: color-mix(in oklab, var(--muted) 55%, transparent); cursor: pointer; }
.sp-switch-row input { margin-top: 3px; accent-color: var(--primary); width: 16px; height: 16px; }
.sp-line { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin: 0; } .sp-line .grow { flex: 1; }
.input.sm { height: 34px; border-radius: 10px; width: auto; flex: 1; min-width: 120px; } .input.sm.emoji { flex: none; width: 56px; min-width: 0; text-align: center; }
.sp-reply { display: flex; align-items: flex-start; gap: 12px; justify-content: space-between; padding: 10px 0; border-bottom: 1px solid var(--border); }
.sp-reply p { white-space: pre-wrap; margin-top: 2px; } .sp-reply form { margin: 0; }
.sp-code { background: #141212; color: #f3efee; border-radius: 14px; padding: 14px 16px; font-size: 12.5px; line-height: 1.6; white-space: pre-wrap; overflow-wrap: anywhere; margin: 0; }
.sp-callout { display: flex; gap: 14px; align-items: center; background: color-mix(in oklab, #6d28d9 7%, var(--card)); border-radius: 18px; padding: 14px 18px; }
.sp-hero { display: flex; gap: 20px; align-items: center; background: var(--card); border-radius: 24px; padding: 24px; }
.sp-hero h2 { font-size: 22px; letter-spacing: -0.03em; margin: 8px 0 6px; } .sp-hero p { max-width: 640px; }
.sp-steps { margin: 0; padding-left: 20px; display: grid; gap: 10px; } .sp-steps li { font-size: 13.5px; } .sp-steps b { display: block; } .sp-steps span { color: var(--muted-foreground); }
.sp-meter { height: 10px; border-radius: 999px; background: var(--muted); overflow: hidden; margin: 4px 0 8px; } .sp-meter span { display: block; height: 100%; background: linear-gradient(90deg, #6d28d9, var(--primary)); border-radius: 999px; }
.sp-chart { width: 100%; height: 180px; display: block; margin: 8px 0 4px; }
.sp-legend { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; color: var(--muted-foreground); } .sp-legend i { width: 10px; height: 10px; border-radius: 3px; display: inline-block; margin-left: 8px; }
.sp-stats.six { grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); }
.sp-collection { display: grid; gap: 4px; } .sp-collection h3 { margin: 0; }
.sp-article-row { display: flex; align-items: center; gap: 14px; padding: 10px 8px; border-radius: 12px; }
.sp-article-row:hover { background: var(--muted); } .sp-article-row .t { flex: 1; min-width: 0; }
.sp-editor { display: grid; grid-template-columns: minmax(0, 1fr) 280px; gap: 16px; align-items: start; }
.sp-editor .main { background: var(--card); border-radius: 20px; padding: 20px; display: grid; gap: 12px; }
.sp-title-in { border: 0; outline: none; background: none; font: inherit; font-size: 26px; font-weight: 650; letter-spacing: -0.03em; padding: 0; width: 100%; color: var(--foreground); }
.sp-body-in { min-height: 380px; font-size: 14.5px; line-height: 1.65; }
.sp-preview { position: relative; display: flex; flex-direction: column; align-items: flex-end; gap: 14px; padding: 24px; border-radius: 24px; background: linear-gradient(160deg, var(--muted), var(--background)); }
.sp-preview-win { width: 100%; max-width: 360px; border-radius: 22px; overflow: hidden; background: var(--background); box-shadow: 0 30px 60px -30px rgb(20 18 18 / .5); }
.sp-preview-win .top { background: linear-gradient(160deg, var(--brand), color-mix(in oklab, var(--brand) 55%, #141212)); color: #fff; padding: 18px 20px 54px; display: grid; gap: 4px; }
.sp-preview-win .top b { font-size: 22px; line-height: 1.15; letter-spacing: -0.02em; margin-top: 22px; } .sp-preview-win .top span { opacity: .85; font-size: 13px; }
.sp-preview-win .faces { display: flex; } .sp-preview-win .faces .sp-av + .sp-av { margin-left: -8px; } .sp-preview-win .faces .sp-av { border: 2px solid color-mix(in oklab, var(--brand) 80%, black); }
.sp-preview-win .card { margin: 0 12px 10px; padding: 12px 14px; border-radius: 14px; display: grid; grid-template-columns: 1fr auto; position: relative; box-shadow: 0 8px 20px -16px rgb(20 18 18 / .4); }
.sp-preview-win .card:first-of-type { margin-top: -40px; } .sp-preview-win .card span { font-size: 12.5px; color: var(--muted-foreground); grid-column: 1; }
.sp-preview-win .card i { grid-row: 1 / 3; grid-column: 2; align-self: center; color: var(--brand); display: inline-flex; } .sp-preview-win .card i svg { width: 18px; height: 18px; }
.sp-preview-win .card.search { grid-template-columns: 1fr auto; margin-bottom: 16px; } .sp-preview-win .card.search i { grid-row: 1; color: var(--muted-foreground); }
.sp-preview-launch { display: inline-flex; align-items: center; gap: 10px; height: 52px; padding: 0 20px 0 16px; border-radius: 999px; background: var(--brand); color: #fff; box-shadow: 0 12px 30px -12px rgb(20 18 18 / .5); font-size: 14.5px; }
.sp-preview-launch > span { display: inline-flex; } .sp-preview-launch svg { width: 22px; height: 22px; }
.hide-sm { }
.sp-tones { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: 8px; }
.sp-tone { display: flex; align-items: center; gap: 8px; padding: 6px 6px 6px 12px; border: 1px solid var(--border); border-radius: 12px; cursor: pointer; font-size: 13.5px; }
.sp-tone.on { border-color: var(--primary); background: color-mix(in oklab, var(--primary) 6%, var(--card)); }
.sp-tone input { accent-color: var(--primary); } .sp-tone span { flex: 1; } .sp-tone .sp-icon { width: 30px; height: 30px; }
.sp-range { flex: 1; accent-color: var(--primary); }

/* The public help center */
.sp-help { min-height: 100dvh; display: flex; flex-direction: column; background: var(--background); }
.sp-help-head { background: linear-gradient(160deg, var(--brand), color-mix(in oklab, var(--brand) 55%, #141212)); color: #fff; padding: 22px 0 54px; }
.sp-help-brand { font-weight: 650; font-size: 16px; }
.sp-help-search { margin-top: 28px; } .sp-help-search input { width: 100%; max-width: 640px; height: 52px; border: 0; border-radius: 14px; padding: 0 18px; font-size: 16px; outline: none; color: #141212; box-shadow: 0 20px 40px -20px rgb(0 0 0 / .4); }
.sp-help-main { flex: 1; padding: 32px 0 60px; display: grid; gap: 22px; align-content: start; }
.sp-help-h1 { font-size: 28px; letter-spacing: -0.03em; }
.sp-help-col h2 { font-size: 15px; margin-bottom: 8px; color: var(--muted-foreground); }
.sp-help-col { background: var(--card); border-radius: 20px; padding: 16px; display: grid; gap: 2px; }
.sp-help-item { display: grid; padding: 10px 12px; border-radius: 12px; } .sp-help-item:hover { background: var(--muted); } .sp-help-item span { font-size: 13px; color: var(--muted-foreground); }
.sp-help-article { background: var(--card); border-radius: 24px; padding: 28px 32px; max-width: 760px; display: grid; gap: 14px; }
.sp-help-article h1 { font-size: 30px; letter-spacing: -0.03em; line-height: 1.15; } .sp-help-article p { font-size: 15.5px; line-height: 1.7; white-space: pre-wrap; } .sp-help-article .lede { color: var(--muted-foreground); }

/* The landing's mock of the app */
.sp-mock { background: var(--card); color: var(--foreground); }
.sp-mock-grid { display: grid; grid-template-columns: 220px 1fr; min-height: 300px; }
.sp-mock-list { border-right: 1px solid var(--border); padding: 6px; display: grid; align-content: start; gap: 2px; }
.sp-mock-list .sp-li { padding: 10px 8px; gap: 10px; } .sp-mock-list .prev { -webkit-line-clamp: 1; }
.sp-mock-thread { background: var(--background); padding: 16px; display: flex; flex-direction: column; gap: 10px; }
.sp-mock-thread .sp-msg { max-width: 92%; } .sp-mock-thread .bubble { font-size: 13px; }
.sp-mock-copilot { display: flex; gap: 8px; align-items: flex-start; font-size: 12.5px; padding: 10px 12px; border-radius: 12px; background: color-mix(in oklab, #6d28d9 8%, var(--card)); color: var(--foreground); }
.sp-mock-copilot > span:first-child { display: inline-flex; color: #6d28d9; } .sp-mock-copilot svg { width: 15px; height: 15px; }

/* Dark */
.sp-app[data-theme="dark"] .sp-note { background: color-mix(in oklab, #f5c451 10%, var(--card)); }
.sp-app[data-theme="dark"] .sp-chip.ai, .sp-app[data-theme="dark"] .sp-pill, .sp-app[data-theme="dark"] .sp-tool.copilot, .sp-app[data-theme="dark"] .sp-chip-btn,
.sp-app[data-theme="dark"] .sp-ai-bar, .sp-app[data-theme="dark"] .sp-panel-tabs button > span, .sp-app[data-theme="dark"] .sec-ic { color: #c4b5fd; }
.sp-app[data-theme="dark"] .sp-tagdot { box-shadow: 0 0 0 1px rgb(255 255 255 / .1); }
.sp-app[data-theme="dark"] .sp-chip.warn, .sp-app[data-theme="dark"] .sp-status.snoozed { color: #fbbf24; }
.sp-app[data-theme="dark"] .sp-note .head { color: #fcd34d; }

@media (max-width: 1560px) {
  .sp-app { grid-template-columns: 72px 224px minmax(0, 1fr); } .sp-app.no-side { grid-template-columns: 72px minmax(0, 1fr); }
  .sp-inbox { grid-template-columns: 300px minmax(0, 1fr) 300px; } .sp-inbox:not(.has-conv) { grid-template-columns: 320px minmax(0, 1fr); }
  .sp-assign .lbl { display: none; }
}
/* Narrower: the details panel slides in */
@media (max-width: 1280px) {
  .sp-inbox.has-conv { grid-template-columns: 300px minmax(0, 1fr); }
  .sp-app .sp-details-btn, .sp-app .sp-panel-close { display: inline-flex; }
  .sp-panel { position: fixed; top: 0; right: 0; bottom: 0; width: min(360px, 92vw); z-index: 40; transform: translateX(100%); transition: transform .2s var(--ease); }
  #sp-panel:checked ~ .sp-panel { transform: none; box-shadow: -20px 0 50px -30px rgb(20 18 18 / .5); }
  #sp-panel:checked ~ .sp-panel-scrim { display: block; position: fixed; inset: 0; z-index: 39; background: rgb(20 18 18 / .25); }
}
/* The views column becomes a drawer */
@media (max-width: 1100px) {
  .sp-app { grid-template-columns: 72px minmax(0, 1fr); }
  .sp-app .sp-burger { display: inline-flex; }
  .sp-side { position: fixed; top: 0; bottom: 0; left: 72px; width: 272px; z-index: 35; transform: translateX(calc(-100% - 72px)); transition: transform .2s var(--ease); background: var(--card); }
  #sp-nav:checked ~ .sp-side { transform: none; box-shadow: 20px 0 50px -30px rgb(20 18 18 / .5); }
  #sp-nav:checked ~ .sp-scrim { display: block; position: fixed; inset: 0; z-index: 34; background: rgb(20 18 18 / .25); }
  .sp-inbox, .sp-inbox.has-conv, .sp-inbox:not(.has-conv) { grid-template-columns: 300px minmax(0, 1fr); }
  .sp-two, .sp-editor { grid-template-columns: minmax(0, 1fr); }
}
/* Phones: one pane at a time, the rail along the bottom */
@media (max-width: 760px) {
  .sp-app, .sp-app.no-side { grid-template-columns: minmax(0, 1fr); padding-bottom: calc(62px + env(safe-area-inset-bottom)); }
  .sp-rail { position: fixed; left: 0; right: 0; bottom: 0; z-index: 30; flex-direction: row; justify-content: space-around; padding: 6px 4px calc(6px + env(safe-area-inset-bottom)); border-right: 0; border-top: 1px solid var(--sidebar-border); gap: 0; }
  .sp-logo, .sp-rail .grow, .sp-rail-btn em { display: none; }
  .sp-rail-btn { width: 52px; height: 48px; }
  .sp-me .sp-menu.up { left: auto; right: 0; bottom: calc(100% + 10px); }
  .sp-side { left: 0; width: min(300px, 86vw); transform: translateX(-100%); padding-bottom: 70px; }
  .sp-inbox, .sp-inbox.has-conv, .sp-inbox:not(.has-conv) { grid-template-columns: minmax(0, 1fr); }
  .sp-list { border-right: 0; }
  /* Menus in the top bars open as a sheet across the screen. */
  .sp-conv-head .sp-pop .sp-menu, .sp-list-head .sp-pop .sp-menu, .sp-bar .sp-pop .sp-menu { position: fixed; top: 58px; left: 8px; right: 8px; width: auto; min-width: 0; max-height: 65vh; }
  .sp-body-in { min-height: 240px; }
  .sp-editor .main { padding: 16px; } .sp-title-in { font-size: 22px; }
  .sp-thread-start span { overflow-wrap: anywhere; }
  .sp-inbox.has-conv .sp-list, .sp-inbox:not(.has-conv) .sp-conv { display: none; }
  .sp-app .sp-back { display: inline-flex; margin-left: -8px; }
  .sp-conv-head { padding: 8px 8px 8px 12px; gap: 2px; }
  .sp-assign .lbl, .sp-tool .lbl, .sp-composer .modes .hint, .sp-conv-head .btn .lbl { display: none; }
  .sp-conv-head .btn { width: 36px; padding: 0; margin-left: 2px; } .sp-conv-head .sp-icon { width: 32px; }
  .sp-thread { padding: 16px 12px; } .sp-msg { max-width: 92%; }
  .sp-composer { margin: 0 8px 8px; } .sp-ai-bar { margin: 0 8px; }
  .sp-bar { padding: 12px 14px; min-height: 58px; } .sp-bar h1 { font-size: 18px; }
  .sp-page { padding: 14px 12px 36px; }
  .sp-hero { flex-direction: column; align-items: flex-start; padding: 18px; }
  .sp-stat b { font-size: 22px; }
  .hide-sm { display: none !important; }
  .sp-panel { width: 100vw; padding-bottom: 62px; }
  .sp-mock-grid { grid-template-columns: 1fr; } .sp-mock-list { display: none; }
  .sp-help-article { padding: 20px; }
  .sp-toast { top: 8px; }
}

/* ── Admin console (apps/admin): ink sidebar · top bar · pages ───────────── */
.ad-app { --ink: #121011; --ink-2: #1c191a; --ink-line: rgb(255 255 255 / .07); --ink-text: rgb(255 255 255 / .62);
  display: grid; grid-template-columns: 260px minmax(0, 1fr); min-height: 100dvh; background: var(--background); color: var(--foreground); }
#ad-nav, .ad-scrim, .ad-burger { display: none; }
.ad-side { position: sticky; top: 0; height: 100dvh; display: flex; flex-direction: column; gap: 6px; padding: 16px 12px 12px; background: var(--ink); color: #fff; overflow: hidden; }
.ad-brand { display: flex; align-items: center; gap: 10px; padding: 4px 8px 12px; }
.ad-brand .mark { width: 34px; height: 34px; border-radius: 10px; background: var(--primary); } .ad-brand .mark img { width: 20px; filter: brightness(0) invert(1); }
.ad-brand b { display: block; font-size: 14.5px; letter-spacing: -0.01em; } .ad-brand em { font-style: normal; font-size: 11.5px; color: var(--ink-text); }
.ad-find-btn { display: flex; align-items: center; gap: 8px; height: 36px; margin: 0 2px 8px; padding: 0 10px; border-radius: 10px; border: 1px solid var(--ink-line); background: rgb(255 255 255 / .04); color: var(--ink-text); font: inherit; font-size: 13px; cursor: pointer; text-align: left; }
.ad-find-btn:hover { background: rgb(255 255 255 / .08); color: #fff; }
.ad-find-btn > span { display: inline-flex; } .ad-find-btn svg { width: 15px; height: 15px; }
.ad-find-btn kbd { margin-left: auto; font: 600 10.5px var(--font); padding: 1px 6px; border-radius: 6px; background: rgb(255 255 255 / .08); }
.ad-nav { flex: 1; overflow-y: auto; display: flex; flex-direction: column; gap: 14px; padding: 4px 2px; scrollbar-width: none; }
.ad-nav .grp { display: grid; gap: 1px; }
.ad-nav p { font-size: 10.5px; font-weight: 650; letter-spacing: .11em; text-transform: uppercase; color: rgb(255 255 255 / .34); padding: 0 10px 6px; margin: 0; }
.ad-nav a { display: flex; align-items: center; gap: 10px; height: 36px; padding: 0 10px; border-radius: 10px; font-size: 13.5px; color: var(--ink-text); transition: background .12s, color .12s; }
.ad-nav a:hover { background: rgb(255 255 255 / .06); color: #fff; }
.ad-nav a.on { background: rgb(255 255 255 / .1); color: #fff; font-weight: 550; }
.ad-nav a > span { display: inline-flex; } .ad-nav svg { width: 17px; height: 17px; }
.ad-me { position: relative; border-top: 1px solid var(--ink-line); padding-top: 10px; }
.ad-me > summary { list-style: none; display: flex; align-items: center; gap: 10px; padding: 6px 8px; border-radius: 10px; cursor: pointer; }
.ad-me > summary::-webkit-details-marker { display: none; }
.ad-me > summary:hover { background: rgb(255 255 255 / .06); }
.ad-me .who { flex: 1; min-width: 0; display: flex; flex-direction: column; } .ad-me .who b { font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ad-me .who em { font-style: normal; font-size: 11.5px; color: var(--ink-text); text-transform: capitalize; }
.ad-me .chev { display: inline-flex; color: var(--ink-text); } .ad-me .chev svg { width: 15px; height: 15px; }
.ad-me .ad-menu { bottom: calc(100% + 6px); top: auto; left: 0; right: 0; }
.ad-menu { position: absolute; z-index: 60; top: calc(100% + 6px); left: 0; min-width: 220px; background: var(--card); color: var(--foreground); border: 1px solid var(--border); border-radius: 14px; padding: 6px; box-shadow: 0 24px 50px -20px rgb(0 0 0 / .45); }
.ad-pop { position: relative; } .ad-pop > summary { list-style: none; cursor: pointer; } .ad-pop > summary::-webkit-details-marker { display: none; }
.ad-pop.right .ad-menu { left: auto; right: 0; }
.ad-menu .head { padding: 8px 10px 10px; border-bottom: 1px solid var(--border); margin-bottom: 4px; display: grid; font-size: 12px; color: var(--muted-foreground); overflow-wrap: anywhere; }
.ad-menu .head b { color: var(--foreground); font-size: 13px; }
.ad-menu a, .ad-menu button { display: flex; align-items: center; gap: 10px; width: 100%; padding: 8px 10px; border: 0; background: none; border-radius: 9px; font: inherit; font-size: 13.5px; color: var(--foreground); cursor: pointer; text-align: left; white-space: nowrap; }
.ad-menu a:hover, .ad-menu button:hover { background: var(--muted); } .ad-menu button.bad { color: var(--destructive); }
.ad-menu form { margin: 0; } .ad-menu span { display: inline-flex; } .ad-menu svg { width: 16px; height: 16px; }

.ad-main { min-width: 0; display: flex; flex-direction: column; }
.ad-top { position: sticky; top: 0; z-index: 20; display: flex; align-items: center; gap: 10px; height: 58px; padding: 0 28px; background: color-mix(in oklab, var(--background) 82%, transparent); backdrop-filter: blur(12px); border-bottom: 1px solid var(--border); }
.ad-top .grow { flex: 1; }
.ad-crumbs { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--muted-foreground); min-width: 0; white-space: nowrap; overflow: hidden; }
.ad-crumbs a:hover { color: var(--foreground); } .ad-crumbs b { color: var(--foreground); font-weight: 600; overflow: hidden; text-overflow: ellipsis; } .ad-crumbs .sep { opacity: .5; }
.ad-env { font-size: 11px; font-weight: 650; padding: 3px 9px; border-radius: 999px; background: color-mix(in oklab, var(--warning) 20%, transparent); color: color-mix(in oklab, var(--warning) 55%, black); }
.ad-env.production { background: color-mix(in oklab, var(--destructive) 12%, transparent); color: var(--destructive); }
.ad-icon { width: 34px; height: 34px; border: 0; background: none; border-radius: 10px; display: inline-flex; align-items: center; justify-content: center; color: var(--muted-foreground); cursor: pointer; padding: 0; }
.ad-icon:hover { background: var(--muted); color: var(--foreground); } .ad-icon svg { width: 18px; height: 18px; }
.ad-page { padding: 26px 28px 60px; display: flex; flex-direction: column; gap: 18px; max-width: 1360px; width: 100%; }
.ad-head { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.ad-head h1 { font-size: 26px; letter-spacing: -0.035em; } .ad-head .grow { flex: 1; }
.ad-actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; } .ad-actions form { margin: 0; }
.btn .i, .btn > .i { display: inline-flex; width: 15px; } .btn .i svg { width: 15px; height: 15px; }
.ad-danger { background: var(--destructive); color: #fff; } .ad-danger:hover { background: color-mix(in oklab, var(--destructive) 88%, black); }
.ad-lede { color: var(--muted-foreground); max-width: 820px; margin-top: -8px; }
.ad-toast { position: fixed; top: 14px; right: 18px; z-index: 80; max-width: min(420px, calc(100vw - 36px)); }
.ad-toast .notice { margin: 0; background: var(--card); box-shadow: 0 18px 40px -20px rgb(0 0 0 / .35); }

/* Pieces */
.ad-face { width: 32px; height: 32px; border-radius: 999px; display: inline-flex; align-items: center; justify-content: center; color: #fff; font-size: 11.5px; font-weight: 650; flex: none; }
.ad-face.sm { width: 30px; height: 30px; font-size: 11px; } .ad-face.lg { width: 48px; height: 48px; font-size: 16px; } .ad-face.xl { width: 64px; height: 64px; font-size: 21px; border-radius: 20px; }
.ad-face.ghost { background: var(--muted); color: var(--muted-foreground); } .ad-face.ghost svg { width: 15px; height: 15px; }
.ad-pill { display: inline-flex; align-items: center; gap: 6px; height: 22px; padding: 0 9px; border-radius: 999px; font-size: 11.5px; font-weight: 600; text-transform: capitalize; white-space: nowrap; background: var(--muted); color: var(--muted-foreground); }
.ad-pill i { width: 6px; height: 6px; border-radius: 999px; background: currentColor; }
.ad-pill.ok { background: color-mix(in oklab, var(--success) 13%, transparent); color: var(--success); }
.ad-pill.bad { background: color-mix(in oklab, var(--destructive) 12%, transparent); color: var(--destructive); }
.ad-pill.warn { background: color-mix(in oklab, var(--warning) 18%, transparent); color: color-mix(in oklab, var(--warning) 55%, black); }
.ad-prod { display: inline-flex; align-items: center; height: 22px; padding: 0 9px; border-radius: 7px; font-size: 11.5px; font-weight: 650; white-space: nowrap; background: var(--muted); }
.ad-prod.mailsuite { background: #e0f2fe; color: #0369a1; } .ad-prod.work { background: #ede9fe; color: #6d28d9; } .ad-prod.huddle { background: #dcfce7; color: #15803d; } .ad-prod.support { background: #fce7f3; color: #be185d; }
.ad-tag { display: inline-flex; align-items: center; height: 21px; padding: 0 7px; border-radius: 6px; background: var(--muted); font-size: 11.5px; color: var(--muted-foreground); white-space: nowrap; }
.ad-tags { display: flex; gap: 4px; flex-wrap: wrap; }
.ad-role { display: inline-flex; height: 21px; align-items: center; padding: 0 8px; border-radius: 6px; background: color-mix(in oklab, var(--primary) 11%, transparent); color: var(--primary); font-size: 11.5px; font-weight: 650; text-transform: capitalize; margin-left: 8px; }
.ad-role.sm { height: 18px; font-size: 10.5px; margin-left: 6px; }
.ad-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 12px; }
.ad-stat { position: relative; overflow: hidden; background: var(--card); border: 1px solid var(--border); border-radius: 18px; padding: 16px 18px; display: grid; gap: 4px; min-height: 108px; }
.ad-stat .lbl { font-size: 12.5px; color: var(--muted-foreground); font-weight: 550; }
.ad-stat b { font-size: 27px; letter-spacing: -0.035em; font-variant-numeric: tabular-nums; line-height: 1.15; }
.ad-stat .foot { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; font-size: 12px; color: var(--muted-foreground); position: relative; z-index: 1; }
.ad-stat .spark { position: absolute; right: 12px; bottom: 12px; width: 110px; height: 34px; color: color-mix(in oklab, var(--primary) 70%, transparent); opacity: .9; } .ad-stat .spark svg { width: 100%; height: 100%; }
.ad-delta { font-weight: 650; font-size: 11.5px; padding: 1px 6px; border-radius: 6px; background: var(--muted); }
.ad-delta.up { color: var(--success); background: color-mix(in oklab, var(--success) 12%, transparent); } .ad-delta.down { color: var(--destructive); background: color-mix(in oklab, var(--destructive) 10%, transparent); }
.ad-card { background: var(--card); border: 1px solid var(--border); border-radius: 18px; padding: 18px; min-width: 0; }
.ad-card > header { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; flex-wrap: wrap; }
.ad-card > header h2 { font-size: 14.5px; letter-spacing: -0.01em; } .ad-card > header .grow { flex: 1; }
.ad-grid { display: grid; gap: 16px; align-items: start; }
.ad-grid.two { grid-template-columns: repeat(2, minmax(0, 1fr)); } .ad-grid.three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.ad-grid.wide-left { grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); }
.ad-stack { display: flex; flex-direction: column; gap: 12px; }
.ad-chart-wrap .legend { display: flex; gap: 14px; align-items: center; font-size: 12px; color: var(--muted-foreground); margin-bottom: 6px; }
.ad-chart-wrap .legend i { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 6px; vertical-align: -1px; }
.ad-chart-wrap .legend i.a { background: var(--primary); } .ad-chart-wrap .legend i.b { background: #6366f1; } .ad-chart-wrap .legend em { margin-left: auto; font-style: normal; }
.ad-chart { width: 100%; height: 200px; display: block; }
.ad-chart .g { stroke: var(--border); stroke-dasharray: 3 5; }
.ad-chart .fa { fill: color-mix(in oklab, var(--primary) 12%, transparent); } .ad-chart .la { fill: none; stroke: var(--primary); stroke-width: 2.2; vector-effect: non-scaling-stroke; }
.ad-chart .lb { fill: none; stroke: #6366f1; stroke-width: 2; stroke-dasharray: 5 4; vector-effect: non-scaling-stroke; }
.ad-chart-wrap .axis { display: flex; justify-content: space-between; font-size: 11.5px; color: var(--muted-foreground); margin-top: 4px; }
.ad-bars { display: grid; gap: 10px; }
.ad-bars .row { display: grid; grid-template-columns: minmax(90px, 200px) 1fr auto; gap: 12px; align-items: center; font-size: 13px; }
.ad-bars .l { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; } .ad-bars .v { color: var(--muted-foreground); font-variant-numeric: tabular-nums; white-space: nowrap; }
.ad-bars .track { height: 10px; border-radius: 999px; background: var(--muted); overflow: hidden; } .ad-bars .track i { display: block; height: 100%; border-radius: 999px; background: linear-gradient(90deg, var(--primary), #f472b6); }
.ad-empty { display: grid; justify-items: center; gap: 6px; text-align: center; padding: 44px 20px; color: var(--muted-foreground); }
.ad-empty > span { display: inline-flex; width: 52px; height: 52px; border-radius: 16px; background: var(--muted); align-items: center; justify-content: center; color: var(--foreground); }
.ad-empty svg { width: 24px; height: 24px; } .ad-empty b { color: var(--foreground); }
.ad-products { display: grid; gap: 8px; }
.ad-product { display: grid; grid-template-columns: auto 1fr auto; grid-template-areas: "b n r" "b s r"; gap: 2px 12px; align-items: center; padding: 12px; border-radius: 14px; border: 1px solid var(--border); }
.ad-product:hover { background: var(--muted); } .ad-product .ad-prod { grid-area: b; }
.ad-product .n { grid-area: n; font-size: 18px; font-weight: 650; letter-spacing: -0.02em; } .ad-product .n em { font-style: normal; font-size: 12px; color: var(--muted-foreground); font-weight: 500; }
.ad-product .sub { grid-area: s; font-size: 12px; color: var(--muted-foreground); } .ad-product .rev { grid-area: r; font-weight: 650; font-variant-numeric: tabular-nums; }
.ad-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }
.ad-list li > a, .ad-li-static { display: flex; align-items: center; gap: 10px; padding: 8px; border-radius: 12px; min-width: 0; }
.ad-list li > a:hover { background: var(--muted); }
.ad-list .t { flex: 1; min-width: 0; display: flex; flex-direction: column; } .ad-list .t b { font-size: 13.5px; font-weight: 550; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ad-list .t em { font-style: normal; font-size: 12px; color: var(--muted-foreground); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ad-list time { font-size: 12px; color: var(--muted-foreground); white-space: nowrap; } .ad-list .amt { font-weight: 650; font-variant-numeric: tabular-nums; }
.ad-list .none { padding: 14px 8px; color: var(--muted-foreground); font-size: 13px; }
.ad-feed { list-style: none; margin: 0; padding: 0; display: grid; }
.ad-feed li { display: grid; grid-template-columns: 10px 1fr auto; gap: 10px; align-items: start; padding: 8px 0; border-bottom: 1px solid color-mix(in oklab, var(--border) 60%, transparent); }
.ad-feed li:last-child { border: 0; } .ad-feed .dot { width: 8px; height: 8px; border-radius: 999px; background: var(--primary); margin-top: 6px; }
.ad-feed .t { display: flex; flex-direction: column; min-width: 0; } .ad-feed .t b { font-size: 13px; font-weight: 600; text-transform: capitalize; }
.ad-feed .t em { font-style: normal; font-size: 12px; color: var(--muted-foreground); overflow-wrap: anywhere; } .ad-feed time { font-size: 12px; color: var(--muted-foreground); white-space: nowrap; }
.ad-foot-note { font-size: 12px; color: var(--muted-foreground); }

/* Tables and toolbars */
.ad-toolbar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; } .ad-toolbar .grow { flex: 1; }
.ad-search { display: flex; align-items: center; gap: 8px; height: 40px; padding: 0 12px; border-radius: 12px; background: var(--card); border: 1px solid var(--border); min-width: min(360px, 100%); }
.ad-search.grow { flex: 1; } .ad-search:focus-within { border-color: var(--ring); box-shadow: 0 0 0 3px color-mix(in oklab, var(--ring) 15%, transparent); }
.ad-search > span { display: inline-flex; color: var(--muted-foreground); } .ad-search svg { width: 16px; height: 16px; }
.ad-search input { flex: 1; min-width: 0; border: 0; background: none; outline: none; font-size: 13.5px; }
.ad-search .select { width: auto; height: 30px; border-radius: 8px; font-size: 12.5px; }
.ad-seg { display: inline-flex; padding: 3px; gap: 2px; border-radius: 11px; background: var(--muted); }
.ad-seg a { padding: 5px 11px; border-radius: 8px; font-size: 12.5px; font-weight: 550; color: var(--muted-foreground); white-space: nowrap; }
.ad-seg a.on { background: var(--card); color: var(--foreground); box-shadow: 0 2px 6px -3px rgb(0 0 0 / .3); }
.ad-tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--border); overflow-x: auto; scrollbar-width: none; }
.ad-tabs a { display: inline-flex; align-items: center; gap: 7px; padding: 9px 12px; font-size: 13.5px; font-weight: 550; color: var(--muted-foreground); border-bottom: 2px solid transparent; margin-bottom: -1px; white-space: nowrap; }
.ad-tabs a span { font-size: 11px; padding: 0 6px; border-radius: 999px; background: var(--muted); }
.ad-tabs a:hover { color: var(--foreground); } .ad-tabs a.on { color: var(--foreground); border-bottom-color: var(--primary); }
.ad-table { background: var(--card); border: 1px solid var(--border); border-radius: 18px; overflow-x: auto; }
.ad-table.flat { border: 0; border-radius: 0; margin: 0 -4px; }
.ad-table table { font-size: 13.5px; } .ad-table th { position: sticky; top: 0; background: var(--card); text-transform: uppercase; font-size: 10.5px; letter-spacing: .07em; }
.ad-table td { padding: 10px 16px; } .ad-table tr[data-href] { cursor: pointer; }
.ad-table tr.dim td { opacity: .55; } .ad-table tr.invite td { background: color-mix(in oklab, var(--muted) 40%, transparent); }
.ad-table td.right { text-align: right; } .ad-table .nowrap { white-space: nowrap; } .ad-table .ua { white-space: nowrap; }
.ad-table .pad { padding: 14px 16px; }
.ad-who { display: flex; align-items: center; gap: 10px; min-width: 0; }
.ad-who > span:last-child { display: flex; flex-direction: column; min-width: 0; } .ad-who b { font-weight: 600; white-space: nowrap; }
.ad-who em, .ad-two em { font-style: normal; font-size: 12px; color: var(--muted-foreground); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 260px; }
.ad-two { display: flex; flex-direction: column; } .ad-two b { font-weight: 550; font-size: 13px; }
.ad-detail { max-width: 420px; overflow-wrap: anywhere; } .ad-action { font-family: var(--mono); font-size: 12px; padding: 2px 7px; border-radius: 6px; background: var(--muted); white-space: nowrap; }
.ad-action.bad { color: var(--destructive); background: color-mix(in oklab, var(--destructive) 9%, transparent); } .ad-action.muted { opacity: .7; }
.ad-pager { display: flex; align-items: center; justify-content: center; gap: 14px; }
.ad-row-actions .ad-menu { right: 0; left: auto; }

/* Records */
.ad-hero { display: flex; align-items: center; gap: 18px; background: var(--card); border: 1px solid var(--border); border-radius: 20px; padding: 18px 20px; }
.ad-hero .t { min-width: 0; display: grid; gap: 4px; } .ad-hero h2 { font-size: 21px; letter-spacing: -0.03em; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.ad-hero p { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; overflow-wrap: anywhere; }
.ad-person { display: flex; align-items: center; gap: 12px; } .ad-person > div { display: grid; }
.ad-dl { display: grid; grid-template-columns: auto 1fr; gap: 8px 16px; margin: 14px 0; font-size: 13.5px; }
.ad-dl dt { color: var(--muted-foreground); } .ad-dl dd { margin: 0; } .ad-dl b.warn { color: var(--destructive); }
.ad-inline-forms { display: grid; gap: 8px; margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--border); } .ad-inline-forms .row { flex-wrap: nowrap; } .ad-inline-forms .input { height: 34px; }
.ad-limits { display: grid; gap: 14px; }
.ad-limit .top { display: flex; justify-content: space-between; gap: 10px; font-size: 13px; } .ad-limit .input { margin-top: 6px; }
.ad-meter { height: 8px; border-radius: 999px; background: var(--muted); overflow: hidden; margin-top: 6px; } .ad-meter i { display: block; height: 100%; background: var(--success); border-radius: 999px; }
.ad-meter.hot i { background: var(--destructive); }
.ad-bill { list-style: none; margin: 0; padding: 0; display: grid; } .ad-bill li { display: flex; justify-content: space-between; gap: 12px; padding: 8px 0; border-bottom: 1px dashed var(--border); font-size: 13.5px; }
.ad-bill li.total { border: 0; font-size: 15px; } .ad-bill b { font-variant-numeric: tabular-nums; }
.ad-add-row { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 14px; } .ad-add-row .input { flex: 1; min-width: 200px; height: 36px; } .ad-add-row .select { width: auto; height: 36px; }
.select.sm, .input.sm { height: 32px; border-radius: 9px; font-size: 13px; padding: 2px 10px; width: auto; }
.ad-label { display: grid; gap: 6px; font-size: 12.5px; font-weight: 600; color: var(--foreground); }
.ad-check { display: flex; align-items: center; gap: 8px; font-size: 13.5px; } .ad-check input { accent-color: var(--primary); width: 16px; height: 16px; }
.ad-sub { font-size: 12px; text-transform: uppercase; letter-spacing: .08em; color: var(--muted-foreground); margin: 18px 0 10px; }
.ad-fields { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 12px; } .ad-fields.three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.ad-money { display: flex; align-items: center; border: 1px solid var(--input); border-radius: 12px; background: var(--card); padding-left: 12px; }
.ad-money em { font-style: normal; color: var(--muted-foreground); font-size: 12.5px; } .ad-money .input { border: 0; box-shadow: none !important; }
.ad-cur { display: flex; align-items: center; gap: 6px; font-size: 12px; color: var(--muted-foreground); } .ad-cur .input { width: 64px; text-transform: uppercase; }
.ad-pricing { display: grid; grid-template-columns: repeat(auto-fit, minmax(420px, 1fr)); gap: 16px; }
.ad-form { display: grid; gap: 12px; } .ad-narrow { max-width: 720px; }
.ad-callout { display: flex; gap: 10px; align-items: center; padding: 12px 14px; border-radius: 14px; font-size: 13.5px; }
.ad-callout > span:first-child { display: inline-flex; } .ad-callout svg { width: 18px; height: 18px; }
.ad-callout.warn { background: color-mix(in oklab, var(--warning) 14%, var(--card)); border: 1px solid color-mix(in oklab, var(--warning) 35%, transparent); }
.ad-banner { display: flex; align-items: center; gap: 12px; padding: 14px 16px; border-radius: 16px; border: 1px solid; }
.ad-banner > span:first-child { display: inline-flex; } .ad-banner svg { width: 20px; height: 20px; } .ad-banner .muted { margin-left: auto; }
.ad-banner.ok { background: color-mix(in oklab, var(--success) 9%, var(--card)); border-color: color-mix(in oklab, var(--success) 28%, transparent); color: var(--success); }
.ad-banner.bad { background: color-mix(in oklab, var(--destructive) 8%, var(--card)); border-color: color-mix(in oklab, var(--destructive) 28%, transparent); color: var(--destructive); }
.ad-banner b { color: var(--foreground); }
.ad-checklist { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.ad-checklist li { display: flex; gap: 10px; align-items: flex-start; color: var(--warning); } .ad-checklist li.ok { color: var(--success); }
.ad-checklist li > span:first-child { display: inline-flex; margin-top: 1px; } .ad-checklist svg { width: 17px; height: 17px; }
.ad-checklist li > span:last-child { display: flex; flex-direction: column; } .ad-checklist b { color: var(--foreground); font-size: 13.5px; font-weight: 550; } .ad-checklist em { font-style: normal; font-size: 12px; color: var(--muted-foreground); font-family: var(--mono); }
.ad-routes { display: grid; gap: 4px; }
.ad-route { display: grid; grid-template-columns: minmax(200px, 1.2fr) minmax(180px, 1fr) minmax(200px, 1fr) auto; gap: 10px; align-items: center; padding: 12px; border-radius: 14px; margin: 0; }
.ad-route:hover { background: color-mix(in oklab, var(--muted) 55%, transparent); }
.ad-route .t { display: flex; flex-direction: column; } .ad-route .t b { font-size: 13.5px; } .ad-route .t em { font-style: normal; font-size: 12px; color: var(--muted-foreground); }
.ad-route .select, .ad-route .input { height: 36px; font-size: 13px; }
.ad-providers { display: grid; gap: 8px; }
.ad-provider { display: flex; align-items: center; gap: 12px; padding: 12px; border: 1px solid var(--border); border-radius: 14px; }
.ad-provider:hover { background: var(--muted); }
.ad-prov-ic { width: 38px; height: 38px; border-radius: 11px; background: color-mix(in oklab, var(--primary) 10%, transparent); color: var(--primary); display: inline-flex; align-items: center; justify-content: center; flex: none; } .ad-prov-ic svg { width: 18px; height: 18px; }
.ad-provider .t { flex: 1; min-width: 0; display: flex; flex-direction: column; } .ad-provider .t em { font-style: normal; font-size: 12px; color: var(--muted-foreground); overflow-wrap: anywhere; }
.ad-provider .side { display: flex; flex-direction: column; align-items: flex-end; gap: 4px; }
.ad-checks { white-space: nowrap; } .ad-check-dot { display: inline-block; font-size: 10px; font-weight: 700; padding: 2px 5px; margin-right: 3px; border-radius: 5px; background: color-mix(in oklab, var(--destructive) 10%, transparent); color: var(--destructive); }
.ad-check-dot.ok { background: color-mix(in oklab, var(--success) 12%, transparent); color: var(--success); }
.ad-roles { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 10px; }
.ad-role-card { padding: 12px 14px; border-radius: 14px; background: var(--card); border: 1px solid var(--border); } .ad-role-card p { font-size: 12.5px; color: var(--muted-foreground); margin-top: 4px; }
.ad-dialog { border: 0; border-radius: 20px; padding: 0; width: min(460px, calc(100vw - 32px)); background: var(--card); color: var(--foreground); box-shadow: 0 40px 90px -30px rgb(0 0 0 / .5); }
.ad-dialog::backdrop { background: rgb(15 12 13 / .45); backdrop-filter: blur(3px); }
.ad-dialog form { padding: 22px; display: grid; gap: 12px; } .ad-dialog h3 { font-size: 17px; letter-spacing: -0.02em; } .ad-dialog .actions { display: flex; justify-content: flex-end; gap: 8px; }
.bad { color: var(--destructive); } .block { display: block; }

/* ⌘K */
.ad-palette { position: fixed; inset: 0; z-index: 90; background: rgb(15 12 13 / .4); backdrop-filter: blur(3px); display: flex; justify-content: center; align-items: flex-start; padding: 12vh 16px 16px; }
.ad-palette[hidden] { display: none; }
.ad-palette .box { width: min(600px, 100%); background: var(--card); border-radius: 18px; box-shadow: 0 40px 90px -30px rgb(0 0 0 / .55); overflow: hidden; border: 1px solid var(--border); }
.ad-palette .in { display: flex; align-items: center; gap: 10px; padding: 0 16px; height: 56px; border-bottom: 1px solid var(--border); }
.ad-palette .in > span { display: inline-flex; color: var(--muted-foreground); } .ad-palette .in svg { width: 18px; height: 18px; }
.ad-palette .in input { flex: 1; border: 0; background: none; outline: none; font-size: 16px; } .ad-palette kbd { font: 600 10.5px var(--font); padding: 2px 6px; border-radius: 6px; background: var(--muted); color: var(--muted-foreground); }
.ad-palette .list { max-height: 50vh; overflow-y: auto; padding: 6px; }
.ad-palette .list p { font-size: 10.5px; font-weight: 650; letter-spacing: .1em; text-transform: uppercase; color: var(--muted-foreground); padding: 10px 10px 4px; margin: 0; }
.ad-palette .list a { display: flex; align-items: center; gap: 10px; padding: 9px 10px; border-radius: 10px; font-size: 14px; }
.ad-palette .list a em { font-style: normal; color: var(--muted-foreground); font-size: 12.5px; } .ad-palette .list a .ad-pill { margin-left: auto; }
.ad-palette .list a.on, .ad-palette .list a:hover { background: var(--muted); } .ad-palette .none { padding: 20px; text-align: center; color: var(--muted-foreground); }

/* Sign-in */
.ad-auth { min-height: 100dvh; display: grid; grid-template-columns: minmax(0, 1fr) minmax(380px, 560px); background: var(--background); }
.ad-auth-art { position: relative; overflow: hidden; background: #121011; color: #fff; display: flex; align-items: flex-end; padding: 48px; }
.ad-auth-art .glow { position: absolute; inset: -20%; background: radial-gradient(circle at 25% 30%, color-mix(in oklab, var(--primary) 55%, transparent), transparent 45%), radial-gradient(circle at 80% 75%, rgb(99 102 241 / .4), transparent 40%); filter: blur(30px); }
.ad-auth-art .copy { position: relative; max-width: 460px; } .ad-auth-art .mark { width: 46px; height: 46px; border-radius: 14px; background: var(--primary); margin-bottom: 18px; } .ad-auth-art .mark img { width: 26px; filter: brightness(0) invert(1); }
.ad-auth-art h2 { font-size: 36px; letter-spacing: -0.04em; line-height: 1.05; } .ad-auth-art p { color: rgb(255 255 255 / .7); margin-top: 10px; font-size: 15px; }
.ad-auth-panel { display: flex; flex-direction: column; justify-content: center; padding: 40px; }
.ad-auth-card { display: grid; gap: 14px; width: 100%; max-width: 420px; margin: 0 auto; } .ad-auth-card.wide { max-width: 480px; }
.ad-auth-card h1 { font-size: 26px; letter-spacing: -0.035em; line-height: 1.15; } .ad-auth-card .notice { margin: 0; }
.ad-auth-foot { text-align: center; margin-top: 14px; } .ad-auth-foot .link, .ad-more summary { background: none; border: 0; cursor: pointer; color: var(--muted-foreground); font-size: 13px; }
.ad-kicker { font-size: 11px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--primary); } .ad-kicker.ok { color: var(--success); }
.ad-otp { font-size: 22px; letter-spacing: .25em; text-align: center; font-variant-numeric: tabular-nums; }
.ad-qr-row { display: flex; gap: 18px; align-items: center; padding: 14px; border-radius: 16px; background: var(--card); border: 1px solid var(--border); }
.ad-qr { width: 156px; height: 156px; flex: none; background: #fff; border-radius: 12px; padding: 6px; } .ad-qr svg { width: 100%; height: 100%; display: block; }
.ad-secret { display: block; font-family: var(--mono); font-size: 14px; letter-spacing: .06em; word-break: break-all; padding: 8px 10px; margin: 6px 0 8px; border-radius: 10px; background: var(--muted); }
.ad-codes { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; } .ad-codes code { font-family: var(--mono); font-size: 15px; text-align: center; padding: 10px; border-radius: 10px; background: var(--muted); letter-spacing: .05em; }

/* Dark */
.ad-app[data-theme="dark"] .ad-prod.mailsuite { background: #0c2a3d; color: #7dd3fc; } .ad-app[data-theme="dark"] .ad-prod.work { background: #2a1f4a; color: #c4b5fd; }
.ad-app[data-theme="dark"] .ad-prod.huddle { background: #0f2e1d; color: #86efac; } .ad-app[data-theme="dark"] .ad-prod.support { background: #3a1028; color: #f9a8d4; }
.ad-app[data-theme="dark"] .ad-pill.warn, .ad-app[data-theme="dark"] .ad-env { color: #fbbf24; }
.ad-app[data-theme="dark"] { --ink: #0b0a0a; }

/* Narrower */
@media (max-width: 1180px) { .ad-grid.three { grid-template-columns: repeat(2, minmax(0, 1fr)); } .ad-route { grid-template-columns: 1fr 1fr; } .ad-route .t { grid-column: 1 / -1; } }
@media (max-width: 980px) {
  .ad-app { grid-template-columns: minmax(0, 1fr); }
  .ad-side { position: fixed; left: 0; top: 0; bottom: 0; width: 280px; z-index: 70; transform: translateX(-100%); transition: transform .2s var(--ease); }
  #ad-nav:checked ~ .ad-side { transform: none; box-shadow: 30px 0 60px -30px rgb(0 0 0 / .5); }
  #ad-nav:checked ~ .ad-scrim { display: block; position: fixed; inset: 0; z-index: 65; background: rgb(15 12 13 / .4); }
  .ad-burger { display: inline-flex; width: 36px; height: 36px; align-items: center; justify-content: center; border-radius: 10px; cursor: pointer; color: var(--muted-foreground); }
  .ad-burger svg { width: 20px; height: 20px; }
  .ad-grid.two, .ad-grid.three, .ad-grid.wide-left { grid-template-columns: minmax(0, 1fr); }
  .ad-auth { grid-template-columns: 1fr; } .ad-auth-art { display: none; }
  .ad-pricing { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 640px) {
  .ad-top { padding: 0 12px; height: 54px; } .ad-env { display: none; }
  .ad-page { padding: 16px 12px 40px; gap: 14px; } .ad-head h1 { font-size: 22px; }
  .ad-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; } .ad-stat { padding: 12px 14px; min-height: 96px; } .ad-stat b { font-size: 21px; } .ad-stat .spark { display: none; }
  .ad-search { min-width: 0; width: 100%; } .ad-toolbar > .ad-seg { overflow-x: auto; max-width: 100%; }
  .ad-hero { flex-direction: column; align-items: flex-start; padding: 16px; }
  .ad-route { grid-template-columns: minmax(0, 1fr); } .ad-fields.three { grid-template-columns: minmax(0, 1fr); }
  .ad-bars .row { grid-template-columns: 90px 1fr auto; }
  .ad-qr-row { flex-direction: column; align-items: flex-start; } .ad-auth-panel { padding: 24px 16px; }
  .ad-table td, .ad-table th { padding-left: 12px; padding-right: 12px; }
  .ad-who em { max-width: 160px; }
  .hide-sm { display: none !important; }
}
@media print { .ad-auth-art, .ad-auth-card .btn, .ad-auth-card .row { display: none !important; } }
.ad-rename { display: flex; gap: 8px; margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--border); } .ad-rename .input { flex: 1; height: 34px; }

/* Continue with Google */
.btn-google { gap: 10px; height: 44px; font-weight: 600; }
.g-mark { display: inline-flex; width: 18px; height: 18px; flex: none; } .g-mark svg { width: 18px; height: 18px; }
.google-linked { display: flex; align-items: center; gap: 8px; }

/* ── One (apps/one): the hub ─────────────────────────────────────────────── */
/* ── One: sidebar shell ──────────────────────────────────────────────── */
.on-app { display: grid; grid-template-columns: 264px minmax(0, 1fr); min-height: 100dvh; background: var(--background); color: var(--foreground); }
.on-nav-toggle { position: absolute; opacity: 0; pointer-events: none; }
.on-scrim { display: none; }
.on-side { position: sticky; top: 0; height: 100dvh; display: flex; flex-direction: column; gap: 6px; padding: 18px 14px 14px; border-right: 1px solid var(--border); background: var(--card); overflow-y: auto; }
.on-brand { display: flex; align-items: center; gap: 10px; font-size: 17px; padding: 2px 6px 10px; }
.on-brand .mark { width: 34px; height: 34px; border-radius: 11px; }
.on-search { display: flex; align-items: center; gap: 8px; height: 38px; padding: 0 12px; border: 1px solid var(--border); border-radius: 12px; background: var(--background); margin-bottom: 8px; }
.on-search:focus-within { border-color: var(--ring); } .on-search > span { display: inline-flex; color: var(--muted-foreground); } .on-search svg { width: 16px; height: 16px; }
.on-search input { flex: 1; min-width: 0; border: 0; background: none; outline: none; font-size: 13.5px; color: var(--foreground); }
.on-nav, .on-prods { display: flex; flex-direction: column; gap: 2px; }
.on-nav a, .on-prods a { display: flex; align-items: center; gap: 10px; height: 38px; padding: 0 10px; border-radius: 11px; font-size: 14px; font-weight: 500; color: var(--muted-foreground); }
.on-nav a:hover, .on-prods a:hover { background: var(--muted); color: var(--foreground); }
.on-nav a.on { background: color-mix(in oklab, var(--primary) 10%, var(--card)); color: var(--primary); }
.on-nav .i, .on-prods .pi { display: inline-flex; } .on-nav svg { width: 18px; height: 18px; }
.on-side-label { font-size: 11.5px; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; color: var(--muted-foreground); padding: 14px 10px 4px; }
.on-prods a { color: var(--foreground); }
.on-prods .pi { width: 26px; height: 26px; border-radius: 8px; place-items: center; display: grid; color: var(--accent); background: color-mix(in oklab, var(--accent) 12%, var(--card)); }
.on-prods .pi svg { width: 15px; height: 15px; }
.on-prods .grow { flex: 1; min-width: 0; }
.on-prods .dot { width: 7px; height: 7px; border-radius: 99px; background: #16a34a; }
.on-prods .count { min-width: 20px; height: 20px; padding: 0 6px; border-radius: 99px; background: var(--accent); color: #fff; font-size: 11px; font-weight: 700; display: grid; place-items: center; }
.on-prods a.off { color: var(--muted-foreground); } .on-prods a.off .pi { filter: grayscale(1); opacity: .7; }
.on-prods .add { font-size: 12px; font-weight: 600; color: var(--primary); }
.on-side > .grow { flex: 1; }
.on-me { position: relative; } .on-me > summary { list-style: none; cursor: pointer; display: flex; align-items: center; gap: 10px; padding: 8px; border: 1px solid var(--border); border-radius: 14px; }
.on-me > summary::-webkit-details-marker { display: none; } .on-me > summary:hover { background: var(--muted); }
.on-me .who { flex: 1; min-width: 0; display: grid; } .on-me .who b { font-size: 13.5px; } .on-me .who em { font-style: normal; font-size: 12px; color: var(--muted-foreground); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.on-me > summary .i { display: inline-flex; color: var(--muted-foreground); } .on-me > summary .i svg { width: 16px; height: 16px; }
.on-av { width: 34px; height: 34px; border-radius: 999px; background: var(--primary); color: #fff; display: inline-flex; align-items: center; justify-content: center; font-size: 12px; font-weight: 700; flex: none; }
.on-menu { position: absolute; left: 0; right: 0; bottom: calc(100% + 8px); background: var(--card); border: 1px solid var(--border); border-radius: 14px; padding: 6px; box-shadow: 0 20px 44px -18px rgb(20 18 18 / .35); z-index: 30; }
.on-menu a, .on-menu button { display: flex; align-items: center; gap: 10px; width: 100%; padding: 8px 10px; border: 0; background: none; border-radius: 9px; font-size: 13.5px; color: var(--foreground); cursor: pointer; text-align: left; }
.on-menu a:hover, .on-menu button:hover { background: var(--muted); } .on-menu form { margin: 0; } .on-menu span { display: inline-flex; } .on-menu svg { width: 17px; height: 17px; }
.on-main { min-width: 0; display: flex; flex-direction: column; }
.on-bar { display: none; }
.on-page { width: 100%; max-width: 1180px; margin: 0 auto; padding: 36px 32px 64px; display: flex; flex-direction: column; gap: 20px; }
.on-date { font-size: 13px; color: var(--muted-foreground); margin-bottom: 4px; }
.on-stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.on-stats.one { grid-template-columns: minmax(0, 320px); }
.on-stats > * { display: grid; grid-template-columns: auto 1fr; grid-template-rows: auto auto; column-gap: 12px; align-items: center; padding: 16px 18px; border-radius: 18px; background: var(--card); border: 1px solid var(--border); color: var(--foreground); }
.on-stats .i { grid-row: span 2; width: 38px; height: 38px; border-radius: 12px; display: grid; place-items: center; background: var(--muted); color: var(--primary); }
.on-stats .i svg { width: 19px; height: 19px; }
.on-stats b { font-size: 22px; letter-spacing: -0.03em; font-variant-numeric: tabular-nums; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.on-stats em { font-style: normal; font-size: 12.5px; color: var(--muted-foreground); }
.on-stats a:hover { border-color: color-mix(in oklab, var(--primary) 35%, var(--border)); }
.on-dash { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); gap: 16px; align-items: start; }
.on-needs ul, .on-start ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.on-needs a { display: flex; align-items: center; gap: 12px; padding: 10px; border-radius: 12px; color: var(--foreground); }
.on-needs a:hover { background: var(--muted); }
.on-needs .pi, .on-start .pi { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; color: var(--accent); background: color-mix(in oklab, var(--accent) 12%, var(--card)); flex: none; }
.on-needs .pi svg, .on-start .pi svg { width: 17px; height: 17px; }
.on-needs .grow, .on-start .grow { flex: 1; min-width: 0; display: grid; } .on-needs b, .on-start b { font-size: 14px; }
.on-needs em, .on-start em { font-style: normal; font-size: 12.5px; color: var(--muted-foreground); }
.on-needs .go { display: inline-flex; color: var(--muted-foreground); } .on-needs .go svg { width: 16px; height: 16px; }
.on-start li { display: flex; align-items: center; gap: 12px; padding: 8px 0; }
.on-clear { display: grid; justify-items: center; text-align: center; gap: 4px; padding: 26px 10px; }
.on-clear > span { color: #16a34a; display: inline-flex; } .on-clear svg { width: 30px; height: 30px; }
.on-clear em { font-style: normal; font-size: 13px; color: var(--muted-foreground); }
@media (max-width: 1100px) { .on-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); } .on-dash { grid-template-columns: 1fr; } }
@media (max-width: 860px) {
  .on-app { grid-template-columns: 1fr; }
  .on-side { position: fixed; inset: 0 auto 0 0; width: min(300px, 86vw); z-index: 70; transform: translateX(-100%); transition: transform .25s ease; }
  .on-nav-toggle:checked ~ .on-side { transform: none; }
  .on-scrim { display: none; }
  .on-nav-toggle:checked ~ .on-scrim { display: block; position: fixed; inset: 0; z-index: 65; background: rgb(20 18 18 / .3); }
  .on-bar { display: flex; align-items: center; gap: 12px; height: 56px; padding: 0 16px; border-bottom: 1px solid var(--border); background: var(--card); position: sticky; top: 0; z-index: 20; }
  .on-burger { display: grid; place-items: center; width: 38px; height: 38px; border-radius: 11px; border: 1px solid var(--border); cursor: pointer; } .on-burger svg { width: 18px; height: 18px; }
  .on-page { padding: 22px 16px 48px; }
  .on-grid { grid-template-columns: 1fr; }
}
@media (max-width: 520px) { .on-stats { grid-template-columns: 1fr 1fr; gap: 8px; } .on-stats > * { padding: 12px; column-gap: 8px; } .on-stats .i { width: 30px; height: 30px; } .on-stats b { font-size: 18px; } }
.on-hello h1 { font-size: clamp(28px, 4vw, 40px); letter-spacing: -0.045em; } .on-hello p { margin-top: 6px; }
.on-banner { display: flex; align-items: center; gap: 14px; padding: 16px 18px; border-radius: 18px; background: color-mix(in oklab, var(--primary) 9%, var(--card)); border: 1px solid color-mix(in oklab, var(--primary) 25%, transparent); }
.on-banner > span:first-child { display: inline-flex; color: var(--primary); } .on-banner svg { width: 22px; height: 22px; }
.on-banner > span:nth-child(2) { flex: 1; display: grid; } .on-banner em { font-style: normal; font-size: 13px; color: var(--muted-foreground); } .on-banner .go { color: var(--primary); font-weight: 600; font-size: 14px; white-space: nowrap; }
.on-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.on-card.off::before { background: var(--border); }
.on-card.off .ic { filter: grayscale(1); opacity: .75; }
.on-state { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; color: var(--muted-foreground); white-space: nowrap; }
.on-state i { width: 7px; height: 7px; border-radius: 99px; background: var(--border); }
.on-state.ok { color: #16a34a; } .on-state.ok i { background: #16a34a; }
.on-teams { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.on-teams li { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 12px; background: var(--background); }
.on-teams .grow { flex: 1; min-width: 0; display: grid; } .on-teams b { font-size: 13.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.on-teams em { font-style: normal; font-size: 12px; color: var(--muted-foreground); }
.on-tav { width: 28px; height: 28px; border-radius: 9px; display: grid; place-items: center; font-size: 10.5px; font-weight: 700; color: #fff; background: var(--accent); flex: none; }
.on-teams .btn .i, .on-bills .btn .i { display: inline-flex; width: 14px; } .on-teams .btn svg { width: 14px; height: 14px; }
.on-connect { display: grid; gap: 12px; justify-items: start; padding: 4px 0 2px; }
.on-bills { list-style: none; margin: 0; padding: 0; display: grid; }
.on-bills li { display: flex; align-items: center; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--border); }
.on-bills li:last-child { border-bottom: 0; }
.on-bills .ic { width: 36px; height: 36px; border-radius: 11px; display: grid; place-items: center; color: var(--accent); background: color-mix(in oklab, var(--accent) 12%, var(--card)); flex: none; }
.on-bills .ic svg { width: 18px; height: 18px; }
.on-bills .grow { flex: 1; min-width: 0; display: grid; } .on-bills em { font-style: normal; font-size: 12.5px; color: var(--muted-foreground); }
.on-bills .amt { font-variant-numeric: tabular-nums; white-space: nowrap; }
@media (max-width: 560px) { .on-bills li { flex-wrap: wrap; } .on-bills .amt { margin-left: 48px; } .on-bills .btn { margin-left: auto; } }
.on-card { background: var(--card); border: 1px solid var(--border); border-radius: 22px; padding: 20px; display: flex; flex-direction: column; gap: 16px; position: relative; overflow: hidden; }
.on-card::before { content: ""; position: absolute; inset: 0 0 auto 0; height: 4px; background: var(--accent); }
.on-card header { display: flex; align-items: center; gap: 12px; }
.on-card .ic, .on-results .ic, .on-team-row .ic { width: 42px; height: 42px; border-radius: 13px; display: inline-flex; align-items: center; justify-content: center; background: color-mix(in oklab, var(--accent) 12%, transparent); color: var(--accent); flex: none; }
.on-card .ic svg, .on-team-row .ic svg { width: 21px; height: 21px; }
.on-card .t { flex: 1; min-width: 0; display: grid; } .on-card .t b { font-size: 17px; letter-spacing: -0.02em; } .on-card .t em { font-style: normal; font-size: 13px; color: var(--muted-foreground); }
.on-open { background: var(--accent); } .on-open:hover { background: color-mix(in oklab, var(--accent) 88%, black); } .btn .i { display: inline-flex; width: 15px; } .btn .i svg { width: 15px; height: 15px; }
.on-nums { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.on-nums a { display: grid; gap: 2px; padding: 12px; border-radius: 14px; background: var(--background); height: 100%; }
.on-nums a:hover { background: color-mix(in oklab, var(--accent) 8%, var(--background)); }
.on-nums b { font-size: 24px; letter-spacing: -0.03em; font-variant-numeric: tabular-nums; } .on-nums span { font-size: 12px; color: var(--muted-foreground); line-height: 1.3; }
.on-nums a.hot b { color: var(--accent); }
.on-two { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.on-panel { background: var(--card); border: 1px solid var(--border); border-radius: 22px; padding: 20px; display: grid; gap: 10px; align-content: start; }
.on-panel > header { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.on-big { font-size: 32px; font-weight: 650; letter-spacing: -0.04em; } .on-big span { font-size: 14px; color: var(--muted-foreground); font-weight: 500; letter-spacing: 0; }
.on-panel .btn { justify-self: start; }
.on-results > header { justify-content: flex-start; } .on-results .ic { width: 32px; height: 32px; border-radius: 10px; } .on-results .ic svg { width: 17px; height: 17px; }
.on-results ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }
.on-results a { display: grid; grid-template-columns: 96px 1fr; grid-template-areas: "k t" "k d"; gap: 0 12px; padding: 10px; border-radius: 12px; }
.on-results a:hover { background: var(--muted); } .on-results .kind { grid-area: k; font-size: 11px; font-weight: 650; text-transform: uppercase; letter-spacing: .06em; color: var(--accent); padding-top: 3px; }
.on-results b { grid-area: t; font-weight: 550; } .on-results em { grid-area: d; font-style: normal; font-size: 12.5px; color: var(--muted-foreground); }
.on-bring { gap: 8px; } .on-team-row { display: flex; align-items: center; gap: 12px; padding: 12px; border: 1px solid var(--border); border-radius: 16px; cursor: pointer; }
.on-team-row input { width: 18px; height: 18px; accent-color: var(--primary); } .on-team-row .t { display: grid; } .on-team-row em { font-style: normal; font-size: 12.5px; color: var(--muted-foreground); }
.on-team-row em.warn { color: color-mix(in oklab, var(--warning) 60%, black); } .on-team-row.blocked { opacity: .7; cursor: default; }
/* The landing's tiles */
.on-hero-tiles { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.on-hero-tiles .tile { background: var(--card); color: var(--foreground); border-radius: 22px; padding: 20px; display: grid; gap: 4px; box-shadow: 0 20px 50px -30px rgb(0 0 0 / .5); border-top: 4px solid var(--accent); }
.on-hero-tiles .ic { width: 42px; height: 42px; border-radius: 13px; display: inline-flex; align-items: center; justify-content: center; background: color-mix(in oklab, var(--accent) 12%, transparent); color: var(--accent); margin-bottom: 10px; }
.on-hero-tiles .ic svg { width: 21px; height: 21px; } .on-hero-tiles b { font-size: 17px; } .on-hero-tiles em { font-style: normal; font-size: 13px; color: var(--muted-foreground); }
.on-feature .feature-icon { color: var(--accent); background: color-mix(in oklab, var(--accent) 12%, transparent); }
@media (max-width: 860px) {
  .on-top { padding: 0 12px; gap: 10px; } .on-team, .on-links { display: none; }
  .on-page { padding: 20px 12px 48px; }
  .on-grid, .on-two { grid-template-columns: minmax(0, 1fr); }
  .on-banner { flex-wrap: wrap; } .on-results a { grid-template-columns: 1fr; grid-template-areas: "k" "t" "d"; }
}
@media (max-width: 420px) { .on-nums { grid-template-columns: minmax(0, 1fr); } .on-hero-tiles { grid-template-columns: minmax(0, 1fr); } }
.ad-prod.one { background: color-mix(in oklab, var(--primary) 14%, transparent); color: var(--primary); }

/* One: product cards stack on narrow screens (after .on-grid). */
@media (max-width: 860px) { .on-grid { grid-template-columns: 1fr; } }

/* ── One: soft surfaces — no borders, rounder, quieter ─────────────────── */
.on-app { background: var(--background); }
.on-side { border-right: 0; background: var(--sidebar); padding: 20px 14px 14px; }
.on-search { border: 0; background: var(--card); border-radius: 14px; height: 40px; }
.on-nav a, .on-prods a { border-radius: 12px; }
.on-nav a.on { background: var(--card); color: var(--foreground); font-weight: 600; }
.on-nav a.on .i { color: var(--primary); }
.on-nav a:hover, .on-prods a:hover { background: color-mix(in oklab, var(--card) 70%, transparent); }
.on-side-label { text-transform: none; letter-spacing: 0; font-size: 12.5px; font-weight: 500; }
.on-me > summary { border: 0; border-radius: 16px; background: var(--card); }
.on-menu { border: 0; border-radius: 18px; box-shadow: 0 24px 60px -24px rgb(20 18 18 / .35), 0 0 0 1px rgb(20 18 18 / .04); }
.on-page { gap: 24px; padding-top: 44px; }
.on-hello h1 { letter-spacing: -0.04em; }
.on-stats { gap: 0; background: var(--card); border-radius: 28px; padding: 8px; }
.on-stats > * { display: grid; grid-template-columns: 1fr; gap: 2px; border: 0; background: none; border-radius: 22px; padding: 18px 22px; }
.on-stats a:hover { background: var(--background); }
.on-stats b { font-size: 28px; font-weight: 600; letter-spacing: -0.04em; }
.on-stats em { font-size: 13px; }
.on-stats.one { background: none; padding: 0; } .on-stats.one > * { background: var(--card); border-radius: 28px; }
.on-panel, .on-card { border: 0; border-radius: 28px; padding: 24px; box-shadow: none; }
.on-card::before { display: none; }
.on-card .ic { border-radius: 16px; background: color-mix(in oklab, var(--accent) 11%, var(--card)); color: var(--accent); }
.on-nums a, .on-teams li { border-radius: 18px; }
.on-nums a { padding: 14px 16px; }
.on-needs a { border-radius: 16px; padding: 12px; }
.on-needs .pi, .on-start .pi, .on-prods .pi { border-radius: 50%; }
.on-app .btn-outline { border-color: transparent; background: var(--muted); }
.on-app .btn-outline:hover { background: color-mix(in oklab, var(--muted) 70%, var(--foreground) 6%); }
.on-tav { border-radius: 50%; }
.on-bills li { border-bottom: 0; padding: 12px; border-radius: 18px; } .on-bills li:hover { background: var(--background); }
.on-results { border: 0; }
@media (max-width: 860px) { .on-side { background: var(--sidebar); } .on-bar { border-bottom: 0; background: var(--background); } .on-burger { border: 0; background: var(--card); } }
@media (max-width: 1100px) { .on-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 560px) { .on-nums { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; } .on-nums a { padding: 12px; } .on-nums b { font-size: 20px; } .on-nums span { font-size: 11.5px; } .on-panel, .on-card { padding: 18px; border-radius: 24px; } }

/* ── Shared: a soft filled button (no border) ───────────────────────────── */
.btn-soft { background: var(--muted); color: var(--foreground); border: 0; }
.btn-soft:hover { background: color-mix(in oklab, var(--muted) 70%, var(--foreground) 8%); }
.btn .i, .btn-soft .i { display: inline-flex; } .btn .i svg { width: 16px; height: 16px; }

/* ── Forms app (form.mercestack.com): soft, no borders ──────────────────── */
.fm-app { display: grid; grid-template-columns: 264px minmax(0, 1fr); min-height: 100dvh; background: var(--background); color: var(--foreground); }
.fm-nav-toggle { position: absolute; opacity: 0; pointer-events: none; } .fm-scrim { display: none; }
.fm-side { position: sticky; top: 0; height: 100dvh; display: flex; flex-direction: column; gap: 6px; padding: 20px 14px 14px; background: var(--sidebar); overflow-y: auto; }
.fm-brand { display: flex; align-items: center; gap: 10px; font-size: 17px; padding: 2px 6px 12px; } .fm-brand .mark { width: 34px; height: 34px; border-radius: 11px; }
.fm-new { position: relative; margin-bottom: 8px; } .fm-new > summary { list-style: none; cursor: pointer; justify-content: center; gap: 8px; } .fm-new > summary::-webkit-details-marker { display: none; }
.fm-new-menu { position: absolute; left: 0; right: 0; top: calc(100% + 6px); z-index: 30; background: var(--card); border-radius: 18px; padding: 6px; box-shadow: 0 24px 60px -24px rgb(20 18 18 / .35), 0 0 0 1px rgb(20 18 18 / .04); }
.fm-new-menu form { margin: 0; } .fm-new-menu button { display: grid; width: 100%; text-align: left; padding: 9px 12px; border: 0; background: none; border-radius: 12px; cursor: pointer; color: var(--foreground); }
.fm-new-menu button:hover { background: var(--muted); } .fm-new-menu b { font-size: 13.5px; } .fm-new-menu em { font-style: normal; font-size: 12px; color: var(--muted-foreground); }
.fm-nav, .fm-forms { display: flex; flex-direction: column; gap: 2px; }
.fm-nav a, .fm-forms a { display: flex; align-items: center; gap: 10px; min-height: 38px; padding: 0 10px; border-radius: 12px; font-size: 14px; font-weight: 500; color: var(--muted-foreground); }
.fm-nav a:hover, .fm-forms a:hover { background: color-mix(in oklab, var(--card) 70%, transparent); color: var(--foreground); }
.fm-nav a.on, .fm-forms a.on { background: var(--card); color: var(--foreground); font-weight: 600; }
.fm-nav .i { display: inline-flex; } .fm-nav svg { width: 18px; height: 18px; } .fm-nav a.on .i { color: var(--primary); }
.fm-forms .grow { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fm-forms .dot { width: 7px; height: 7px; border-radius: 99px; background: var(--border); flex: none; } .fm-forms .dot.open { background: #16a34a; } .fm-forms .dot.closed { background: #a39e9c; }
.fm-forms .count { min-width: 20px; height: 20px; padding: 0 6px; border-radius: 99px; background: var(--primary); color: #fff; font-size: 11px; font-weight: 700; display: grid; place-items: center; }
.fm-side-label { font-size: 12.5px; font-weight: 500; color: var(--muted-foreground); padding: 14px 10px 4px; }
.fm-side > .grow { flex: 1; }
.fm-me { position: relative; } .fm-me > summary { list-style: none; cursor: pointer; display: flex; align-items: center; gap: 10px; padding: 8px; border-radius: 16px; background: var(--card); } .fm-me > summary::-webkit-details-marker { display: none; }
.fm-me .who { flex: 1; min-width: 0; display: grid; } .fm-me .who b { font-size: 13.5px; } .fm-me .who em { font-style: normal; font-size: 12px; color: var(--muted-foreground); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fm-av { width: 34px; height: 34px; border-radius: 999px; background: var(--primary); color: #fff; display: inline-flex; align-items: center; justify-content: center; font-size: 12px; font-weight: 700; flex: none; }
.fm-menu { position: absolute; left: 0; right: 0; bottom: calc(100% + 8px); background: var(--card); border-radius: 18px; padding: 6px; z-index: 30; box-shadow: 0 24px 60px -24px rgb(20 18 18 / .35), 0 0 0 1px rgb(20 18 18 / .04); }
.fm-menu a, .fm-menu button { display: flex; align-items: center; gap: 10px; width: 100%; padding: 8px 10px; border: 0; background: none; border-radius: 10px; font-size: 13.5px; color: var(--foreground); cursor: pointer; text-align: left; }
.fm-menu a:hover, .fm-menu button:hover { background: var(--muted); } .fm-menu form { margin: 0; } .fm-menu span { display: inline-flex; } .fm-menu svg { width: 17px; height: 17px; }
.fm-main { min-width: 0; display: flex; flex-direction: column; } .fm-bar { display: none; }
.fm-page { width: 100%; max-width: 1040px; margin: 0 auto; padding: 40px 32px 72px; display: flex; flex-direction: column; gap: 18px; }
.fm-hello h1 { font-size: clamp(28px, 4vw, 38px); letter-spacing: -0.04em; } .fm-hello p { margin-top: 6px; }
.fm-card { background: var(--card); border-radius: 28px; padding: 24px; }
.fm-card h2 { font-size: 16px; letter-spacing: -0.01em; }
.fm-stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); background: var(--card); border-radius: 28px; padding: 8px; }
.fm-stats > div { display: grid; gap: 2px; padding: 16px 20px; } .fm-stats b { font-size: 26px; font-weight: 600; letter-spacing: -0.04em; } .fm-stats em { font-style: normal; font-size: 13px; color: var(--muted-foreground); }
.fm-list { display: grid; gap: 8px; }
.fm-row { display: flex; align-items: center; gap: 14px; padding: 18px 22px; border-radius: 22px; background: var(--card); color: var(--foreground); }
.fm-row:hover { background: color-mix(in oklab, var(--card) 85%, var(--primary) 4%); }
.fm-row .grow { flex: 1; min-width: 0; display: grid; } .fm-row b { font-size: 15px; } .fm-row em { font-style: normal; font-size: 13px; color: var(--muted-foreground); }
.fm-status { font-size: 12px; font-weight: 600; padding: 4px 10px; border-radius: 99px; background: var(--muted); color: var(--muted-foreground); }
.fm-status.open { background: color-mix(in oklab, #16a34a 14%, var(--card)); color: #15803d; }
.fm-new-badge { font-size: 12px; font-weight: 600; color: var(--primary); }
.fm-empty { background: var(--card); border-radius: 28px; padding: 32px; } .fm-empty p { margin: 6px 0 18px; }
.fm-templates { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 10px; } .fm-templates form { margin: 0; }
.fm-templates button { width: 100%; height: 100%; display: grid; gap: 4px; justify-items: start; text-align: left; padding: 18px; border: 0; border-radius: 20px; background: var(--background); cursor: pointer; color: var(--foreground); }
.fm-templates button:hover { background: color-mix(in oklab, var(--background) 80%, var(--primary) 6%); }
.fm-templates .i { width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; background: color-mix(in oklab, var(--primary) 12%, var(--card)); color: var(--primary); margin-bottom: 6px; }
.fm-templates .i svg { width: 18px; height: 18px; } .fm-templates em { font-style: normal; font-size: 12.5px; color: var(--muted-foreground); }
/* One form: header and tabs */
.fm-formhead { display: grid; gap: 14px; }
.fm-formhead .row1 { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; } .fm-formhead h1 { flex: 1; min-width: 200px; font-size: clamp(24px, 3.4vw, 32px); letter-spacing: -0.04em; }
.fm-status-switch { display: inline-flex; gap: 2px; padding: 3px; background: var(--card); border-radius: 99px; margin: 0; }
.fm-status-switch button { border: 0; background: none; padding: 6px 12px; border-radius: 99px; font-size: 13px; font-weight: 500; color: var(--muted-foreground); cursor: pointer; }
.fm-status-switch button.on { background: var(--foreground); color: var(--background); } .fm-status-switch button.on.open { background: #16a34a; color: #fff; }
.fm-tabs, .fm-seg { display: flex; gap: 4px; flex-wrap: wrap; }
.fm-tabs a, .fm-seg a { padding: 8px 14px; border-radius: 99px; font-size: 14px; font-weight: 500; color: var(--muted-foreground); }
.fm-tabs a:hover, .fm-seg a:hover { color: var(--foreground); } .fm-tabs a.on, .fm-seg a.on { background: var(--card); color: var(--foreground); font-weight: 600; }
/* Builder */
.fm-builder { display: grid; gap: 12px; max-width: 760px; width: 100%; }
.fm-titlecard { display: grid; gap: 6px; border-top: 6px solid var(--primary); }
.fm-title { border: 0; background: none; font-size: 26px; font-weight: 650; letter-spacing: -0.03em; color: var(--foreground); outline: none; width: 100%; }
.fm-desc { border: 0; background: none; resize: vertical; font: inherit; font-size: 14.5px; color: var(--muted-foreground); outline: none; width: 100%; }
.fm-qcard { display: grid; gap: 10px; padding: 18px 20px; }
.fm-qcard:focus-within { box-shadow: 0 0 0 2px color-mix(in oklab, var(--primary) 40%, transparent); }
.fm-qcard.is-page { background: none; border: 2px dashed var(--border); padding: 10px 16px; }
.fm-qtop { display: flex; align-items: center; gap: 8px; } .fm-qtop .select { width: auto; height: 34px; font-size: 13px; } .fm-qtop .grow { flex: 1; }
.fm-qnum { font-size: 12px; font-weight: 700; color: var(--primary); min-width: 28px; }
.fm-qlabel { font-size: 16px; font-weight: 600; } .fm-qdesc { font-size: 13.5px; }
.fm-qcard .input { background: var(--background); border-color: transparent; }
.fm-opts { display: grid; gap: 6px; padding-left: 4px; } .fm-opt { display: flex; align-items: center; gap: 8px; }
.fm-mark { width: 16px; height: 16px; border: 2px solid var(--border); border-radius: 50%; flex: none; } .fm-mark.checkboxes { border-radius: 5px; } .fm-mark.dropdown { border: 0; width: 6px; height: 6px; background: var(--muted-foreground); }
.fm-scaleset { display: grid; grid-template-columns: repeat(2, minmax(0, 120px)) repeat(2, minmax(0, 1fr)); gap: 8px; }
.fm-qfoot { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; padding-top: 6px; border-top: 1px solid color-mix(in oklab, var(--border) 50%, transparent); }
.fm-inline { display: inline-flex; align-items: center; gap: 6px; flex-wrap: wrap; } .fm-inline .select, .fm-inline .input { width: auto; height: 32px; font-size: 13px; padding: 2px 10px; }
.fm-add { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; padding: 14px 18px; background: var(--card); border-radius: 22px; }
.fm-add .chip { border: 0; background: var(--background); padding: 6px 12px; border-radius: 99px; font-size: 13px; cursor: pointer; color: var(--foreground); } .fm-add .chip:hover { background: var(--muted); }
.fm-saving.ok { color: #16a34a; } .fm-saving.err { color: var(--destructive, #dc2626); }
.icon-btn.danger:hover { color: var(--destructive, #dc2626); }
/* Settings, share, responses */
.fm-settings { display: grid; gap: 12px; max-width: 760px; } .fm-two { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.fm-color { width: 56px; height: 36px; border: 0; background: none; padding: 0; cursor: pointer; }
.fm-danger { display: flex; align-items: center; gap: 10px; max-width: 760px; flex-wrap: wrap; } .fm-danger .grow { flex: 1; min-width: 200px; } .fm-danger form { margin: 0; }
.fm-share { display: grid; gap: 12px; max-width: 760px; }
.fm-copy { display: flex; gap: 8px; align-items: flex-start; } .fm-copy .input { flex: 1; background: var(--background); border-color: transparent; }
.fm-qr { display: flex; align-items: center; gap: 20px; } .fm-qr > span { background: #fff; padding: 12px; border-radius: 18px; display: inline-flex; } .fm-qr svg { width: 160px; height: 160px; }
.fm-resp-bar { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; } .fm-resp-bar .grow { flex: 1; } .fm-resp-bar form { margin: 0; }
.fm-days header, .fm-q header { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; margin-bottom: 12px; }
.fm-days .bars { display: grid; grid-template-columns: repeat(14, 1fr); gap: 6px; align-items: end; height: 90px; }
.fm-days .bars span { height: var(--h); background: color-mix(in oklab, var(--primary) 75%, var(--card)); border-radius: 8px 8px 4px 4px; min-height: 3px; }
.fm-avg b { font-size: 30px; letter-spacing: -0.04em; }
.fm-bars { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.fm-bars li { display: grid; grid-template-columns: minmax(80px, 200px) 1fr 40px; gap: 12px; align-items: center; font-size: 13.5px; }
.fm-bars .l { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } .fm-bars b { text-align: right; font-variant-numeric: tabular-nums; }
.fm-bars .track { height: 10px; border-radius: 99px; background: var(--background); overflow: hidden; } .fm-bars .track i { display: block; height: 100%; background: var(--primary); border-radius: 99px; }
.fm-latest { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; } .fm-latest li { padding: 10px 14px; border-radius: 14px; background: var(--background); font-size: 13.5px; }
.fm-search { max-width: 360px; } .fm-search .input { background: var(--card); border-color: transparent; }
.fm-table-wrap { padding: 8px; overflow-x: auto; } .fm-none { padding: 18px; }
.fm-table { width: 100%; border-collapse: collapse; font-size: 13.5px; } .fm-table th { text-align: left; font-weight: 500; font-size: 12.5px; color: var(--muted-foreground); padding: 10px 12px; white-space: nowrap; }
.fm-table td { padding: 12px; border-top: 1px solid color-mix(in oklab, var(--border) 50%, transparent); max-width: 260px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fm-table tr[data-href] { cursor: pointer; } .fm-table tbody tr:hover { background: var(--background); } .fm-table tr.unread td { font-weight: 600; } .fm-table .nowrap { white-space: nowrap; }
.fm-table .newdot { display: inline-block; width: 8px; height: 8px; border-radius: 99px; background: var(--primary); } .fm-table .star svg { width: 15px; height: 15px; color: #f59e0b; fill: #f59e0b; }
.fm-detail header { display: flex; align-items: center; gap: 8px; margin-bottom: 12px; } .fm-detail header form { margin: 0; } .fm-detail .grow { flex: 1; }
.fm-detail dl { display: grid; gap: 4px; margin: 0; } .fm-detail dt { font-size: 12.5px; color: var(--muted-foreground); margin-top: 10px; } .fm-detail dd { margin: 0; font-size: 14.5px; white-space: pre-wrap; }
.fm-acts { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 6px; }
@media (max-width: 860px) {
  .fm-app { grid-template-columns: 1fr; }
  .fm-side { position: fixed; inset: 0 auto 0 0; width: min(300px, 86vw); z-index: 70; transform: translateX(-100%); transition: transform .25s ease; }
  .fm-nav-toggle:checked ~ .fm-side { transform: none; }
  .fm-nav-toggle:checked ~ .fm-scrim { display: block; position: fixed; inset: 0; z-index: 65; background: rgb(20 18 18 / .3); }
  .fm-bar { display: flex; align-items: center; gap: 12px; height: 56px; padding: 0 16px; background: var(--background); position: sticky; top: 0; z-index: 20; }
  .fm-burger { display: grid; place-items: center; width: 38px; height: 38px; border-radius: 11px; background: var(--card); cursor: pointer; } .fm-burger svg { width: 18px; height: 18px; }
  .fm-page { padding: 18px 16px 56px; } .fm-stats { grid-template-columns: 1fr 1fr; } .fm-two, .fm-scaleset { grid-template-columns: 1fr; }
  .fm-bars li { grid-template-columns: minmax(70px, 120px) 1fr 32px; } .fm-qr { flex-direction: column; align-items: flex-start; }
}

/* ── The public form (/f/{slug}) ────────────────────────────────────────── */
.fp { min-height: 100dvh; background: color-mix(in oklab, var(--fm-accent, #d92d55) 7%, var(--background)); padding: 40px 16px 32px; }
.fp-embed { min-height: 0; background: transparent; padding: 8px; }
.fp-wrap { max-width: 680px; margin: 0 auto; display: grid; gap: 12px; }
.fp-card, .fp-q, .fp-section { background: var(--card); border-radius: 26px; padding: 26px 28px; }
.fp-head { border-top: 8px solid var(--fm-accent, #d92d55); } .fp-head h1 { font-size: clamp(26px, 5vw, 34px); letter-spacing: -0.04em; } .fp-intro { margin-top: 8px; color: var(--muted-foreground); white-space: pre-wrap; }
.fp-form { display: grid; gap: 12px; } .fp-qs { display: grid; gap: 12px; }
.fp-q { display: grid; gap: 10px; } .fp-label { font-size: 16.5px; font-weight: 600; } .fp-label .req { color: var(--fm-accent, #d92d55); } .fp-desc { font-size: 13.5px; color: var(--muted-foreground); margin-top: -4px; }
.fp-q .input, .fp-q .select { background: var(--background); border-color: transparent; }
.fp-q.fp-err { box-shadow: 0 0 0 2px var(--destructive, #dc2626); } .fp-q.fp-err .fp-label::after { content: " — needs an answer"; font-weight: 500; font-size: 13px; color: var(--destructive, #dc2626); }
.fp-section h2 { font-size: 19px; letter-spacing: -0.02em; } .fp-section p { margin-top: 6px; color: var(--muted-foreground); white-space: pre-wrap; }
.fp-choices { display: grid; gap: 8px; } .fp-row { grid-template-columns: repeat(2, minmax(0, 160px)); }
.fp-choice { display: flex; align-items: center; gap: 10px; padding: 12px 14px; border-radius: 16px; background: var(--background); cursor: pointer; }
.fp-choice:has(input:checked) { background: color-mix(in oklab, var(--fm-accent, #d92d55) 12%, var(--card)); } .fp-choice input { accent-color: var(--fm-accent, #d92d55); width: 18px; height: 18px; }
.fp-other .input { flex: 1; height: 34px; }
.fp-stars { display: inline-flex; flex-direction: row-reverse; justify-content: flex-end; gap: 4px; } .fp-stars input { position: absolute; opacity: 0; width: 0; }
.fp-stars label { cursor: pointer; color: var(--border); display: inline-flex; } .fp-stars label svg { width: 34px; height: 34px; }
.fp-stars input:checked ~ label, .fp-stars label:hover, .fp-stars label:hover ~ label { color: #f59e0b; } .fp-stars input:checked ~ label svg, .fp-stars label:hover svg, .fp-stars label:hover ~ label svg { fill: #f59e0b; }
.fp-scale-row { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 6px; } .fp-scale-row input { position: absolute; opacity: 0; width: 0; }
.fp-scale-row span { display: grid; place-items: center; height: 44px; border-radius: 14px; background: var(--background); font-weight: 600; cursor: pointer; }
.fp-scale-row label:has(input:checked) span { background: var(--fm-accent, #d92d55); color: #fff; }
.fp-scale-ends { display: flex; justify-content: space-between; font-size: 12.5px; color: var(--muted-foreground); margin-top: 6px; }
.fp-actions { display: flex; gap: 8px; justify-content: flex-end; }
.fp-btn { background: var(--fm-accent, #d92d55); color: #fff; border: 0; padding: 0 22px; height: 44px; border-radius: 99px; font-weight: 600; } .fp-btn:hover { filter: brightness(.95); }
.fp-progress { height: 6px; border-radius: 99px; background: var(--card); overflow: hidden; } .fp-progress i { display: block; height: 100%; width: 0; background: var(--fm-accent, #d92d55); transition: width .25s ease; }
.fp-off { display: none !important; } .fp-page-break { display: none; }
.fp-trap { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.fp-done { display: grid; justify-items: center; text-align: center; gap: 10px; padding: 40px 28px; }
.fp-tick { color: #16a34a; display: inline-flex; } .fp-tick svg { width: 40px; height: 40px; } .fp-thanks { color: var(--muted-foreground); white-space: pre-wrap; }
.fp-made { text-align: center; font-size: 12.5px; color: var(--muted-foreground); margin-top: 18px; } .fp-made a { color: inherit; text-decoration: underline; }
@media (max-width: 560px) { .fp { padding: 16px 10px; } .fp-card, .fp-q, .fp-section { padding: 20px; border-radius: 22px; } .fp-scale-row span { height: 38px; font-size: 13px; } .fp-scale-row { gap: 3px; } }

/* ── Forms landing: the hero's mock form ────────────────────────────────── */
.fl-mock { position: relative; } .fl-card { background: #fff; color: #141212; border-radius: 26px; padding: 26px; display: grid; gap: 10px; box-shadow: 0 30px 70px -30px rgb(0 0 0 / .5); }
.fl-card b { font-size: 19px; letter-spacing: -0.02em; } .fl-card p { font-size: 13.5px; font-weight: 600; margin-top: 6px; }
.fl-scale { display: grid; grid-template-columns: repeat(11, 1fr); gap: 4px; } .fl-scale span { display: grid; place-items: center; height: 30px; border-radius: 9px; background: #f4f1f0; font-size: 12px; font-weight: 600; } .fl-scale .on { background: #d92d55; color: #fff; }
.fl-line { height: 34px; border-radius: 12px; background: #f4f1f0; } .fl-line.short { width: 60%; height: 12px; }
.fl-send { justify-self: end; background: #d92d55; color: #fff; padding: 8px 18px; border-radius: 99px; font-size: 13px; font-weight: 600; }
.fl-toast { position: absolute; left: -18px; bottom: -22px; display: flex; align-items: center; gap: 8px; background: #141212; color: #fff; padding: 10px 14px; border-radius: 16px; font-size: 13px; box-shadow: 0 18px 40px -18px rgb(0 0 0 / .6); }
.fl-toast span { display: inline-flex; color: #a78bfa; } .fl-toast svg { width: 16px; height: 16px; }
/* Forms: hidden means hidden (logic, steps, Back/Next), and cards fit the screen. */
.fp [hidden], .fm-app [hidden] { display: none !important; }
.fm-builder > *, .fm-qcard > *, .fm-qfoot > * { min-width: 0; }
.fm-qcard .input, .fm-qcard .select, .fm-inline .select { max-width: 100%; }
.fm-logic .select { max-width: min(320px, 100%); text-overflow: ellipsis; }

/* ── Desk (desk.mercestack.com): home ───────────────────────────────────── */
.dk-page { max-width: 1180px; }
.dk-soon span { display: flex; align-items: center; gap: 10px; min-height: 36px; padding: 0 10px; font-size: 14px; color: var(--muted-foreground); opacity: .75; }
.dk-soon em { margin-left: auto; font-style: normal; font-size: 11px; font-weight: 600; padding: 2px 8px; border-radius: 99px; background: color-mix(in oklab, var(--card) 70%, transparent); }
.dk-soon .i { display: inline-flex; } .dk-soon svg { width: 18px; height: 18px; }
.dk-head { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; } .dk-head h1 { flex: 1; font-size: clamp(28px, 4vw, 38px); letter-spacing: -0.04em; }
.dk-search { position: relative; width: min(420px, 100%); margin: 0; } .dk-search .i { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); display: inline-flex; color: var(--muted-foreground); }
.dk-search svg { width: 17px; height: 17px; } .dk-search .input { padding-left: 40px; height: 44px; border-radius: 99px; background: var(--card); border-color: transparent; }
.dk-start { background: var(--card); border-radius: 28px; padding: 22px 24px 24px; } .dk-start h2 { font-size: 15px; margin-bottom: 14px; }
.dk-templates { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 14px; } .dk-templates form { margin: 0; }
.dk-templates button { width: 100%; display: grid; gap: 10px; justify-items: start; padding: 0; border: 0; background: none; cursor: pointer; color: var(--foreground); font-size: 13.5px; text-align: left; }
.dk-templates button:hover .dk-mini { box-shadow: 0 0 0 2px var(--primary); }
.dk-mini { position: relative; width: 100%; aspect-ratio: 8.5 / 10; border-radius: 14px; background: var(--background); padding: 16% 14%; display: flex; flex-direction: column; gap: 7%; transition: box-shadow .15s var(--ease); overflow: hidden; }
.dk-mini i { display: block; height: 5px; border-radius: 4px; background: color-mix(in oklab, var(--foreground) 14%, transparent); }
.dk-mini i.h { height: 8px; background: color-mix(in oklab, var(--foreground) 38%, transparent); } .dk-mini i.t { background: color-mix(in oklab, var(--foreground) 24%, transparent); }
.dk-mini i.c { position: relative; margin-left: 12%; } .dk-mini i.c::before { content: ""; position: absolute; left: -16%; top: -1px; width: 7px; height: 7px; border-radius: 2px; border: 1.5px solid color-mix(in oklab, var(--foreground) 35%, transparent); }
.dk-mini .plus { position: absolute; inset: 0; display: grid; place-items: center; color: var(--primary); } .dk-mini .plus svg { width: 34px; height: 34px; }
.dk-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 16px; }
.dk-card { background: var(--card); border-radius: 24px; padding: 8px; display: grid; gap: 4px; transition: transform .15s var(--ease), box-shadow .15s var(--ease); }
.dk-card:hover { transform: translateY(-2px); box-shadow: 0 18px 40px -24px rgb(20 18 18 / .35); }
.dk-thumb { display: block; border-radius: 18px; background: var(--background); padding: 16px 16px 0; height: 168px; overflow: hidden; }
.dk-sheet { display: grid; gap: 6px; align-content: start; height: 100%; background: var(--card); border-radius: 8px 8px 0 0; padding: 14px 14px 0; box-shadow: 0 4px 18px -10px rgb(20 18 18 / .25); overflow: hidden; }
.dk-sheet b { font-size: 11px; line-height: 1.3; } .dk-sheet span { font-size: 8.5px; line-height: 1.45; color: var(--muted-foreground); overflow: hidden; display: -webkit-box; -webkit-line-clamp: 9; -webkit-box-orient: vertical; word-break: break-word; }
.dk-card-foot { display: flex; align-items: center; gap: 2px; padding: 6px 4px 4px 10px; } .dk-card-foot .grow { flex: 1; min-width: 0; display: grid; }
.dk-card-foot b { font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } .dk-card-foot em { font-style: normal; font-size: 12px; color: var(--muted-foreground); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dk-card-foot form { margin: 0; }
.dk-star svg { width: 16px; height: 16px; } .dk-star.on { color: #f59e0b; } .dk-star.on svg { fill: #f59e0b; }
.dk-card-menu { position: relative; } .dk-card-menu > summary { list-style: none; cursor: pointer; } .dk-card-menu > summary::-webkit-details-marker { display: none; }
.dk-card-menu .fm-menu { left: auto; right: 0; bottom: auto; top: calc(100% + 6px); width: 210px; }
.dk-row-icon { display: inline-flex; color: var(--primary); } .dk-row-icon svg { width: 20px; height: 20px; }
.btn.danger, .fm-menu .danger { color: var(--destructive, #dc2626); }

/* ── Desk: the editor ───────────────────────────────────────────────────── */
.dk-ed { --paper: #fff; --page-w: 816px; min-height: 100dvh; display: flex; flex-direction: column; background: var(--background); color: var(--foreground); }
.dk-ed[data-theme="dark"] { --paper: #1d1c1d; }
.dk-top { position: sticky; top: 0; z-index: 40; display: flex; align-items: center; gap: 8px; padding: 10px 16px 6px; background: var(--background); }
.dk-home .mark { width: 38px; height: 38px; border-radius: 12px; display: inline-flex; }
.dk-titlebox { flex: 1; min-width: 0; display: grid; }
.dk-title { border: 0; background: none; font-size: 18px; font-weight: 600; letter-spacing: -0.01em; padding: 2px 8px; margin-left: -2px; border-radius: 8px; color: var(--foreground); outline: none; width: min(100%, 560px); text-overflow: ellipsis; }
.dk-title:hover:not([readonly]) { box-shadow: inset 0 0 0 1px var(--border); } .dk-title:focus { box-shadow: inset 0 0 0 2px color-mix(in oklab, var(--primary) 50%, transparent); }
.dk-meta { display: flex; align-items: center; gap: 6px; padding-left: 8px; font-size: 12px; color: var(--muted-foreground); white-space: nowrap; overflow: hidden; } .dk-meta .sep { opacity: .5; }
.dk-dot { width: 7px; height: 7px; border-radius: 99px; background: var(--muted-foreground); flex: none; }
.dk-dot[data-state="ok"] { background: #16a34a; } .dk-dot[data-state="busy"] { background: #f59e0b; } .dk-dot[data-state="off"] { background: var(--destructive, #dc2626); }
.dk-ro { font-weight: 600; color: var(--foreground); }
.dk-people { display: flex; padding-right: 6px; }
.dk-person { width: 30px; height: 30px; border-radius: 99px; display: inline-grid; place-items: center; font-size: 11px; font-weight: 700; color: #fff; background: var(--c, var(--primary)); box-shadow: 0 0 0 2px var(--background); flex: none; }
.dk-people .dk-person + .dk-person { margin-left: -6px; } .dk-person.more { background: var(--muted); color: var(--foreground); }
.dk-topbtn { position: relative; width: 38px; height: 38px; display: inline-grid; place-items: center; border: 0; border-radius: 12px; background: none; color: var(--muted-foreground); cursor: pointer; list-style: none; }
.dk-topbtn::-webkit-details-marker { display: none; } .dk-topbtn:hover, .dk-topbtn.on { background: var(--card); color: var(--foreground); } .dk-topbtn svg { width: 19px; height: 19px; }
.dk-topbtn b { position: absolute; top: 3px; right: 2px; min-width: 16px; height: 16px; padding: 0 4px; border-radius: 99px; background: var(--primary); color: #fff; font-size: 10px; display: grid; place-items: center; } .dk-topbtn b:empty { display: none; }
.dk-share-btn { margin-left: 4px; gap: 6px; } .dk-share-btn .i { display: inline-flex; } .dk-share-btn svg { width: 16px; height: 16px; }
.dk-more { position: relative; } .dk-more .fm-menu { left: auto; right: 0; bottom: auto; top: calc(100% + 6px); width: 240px; }
.dk-toolbar { position: sticky; top: 64px; z-index: 35; display: flex; align-items: center; gap: 2px; flex-wrap: wrap; margin: 0 16px; padding: 5px 8px; background: var(--card); border-radius: 99px; box-shadow: 0 6px 24px -18px rgb(20 18 18 / .4); }
.dk-tool { width: 32px; height: 32px; display: inline-grid; place-items: center; border: 0; border-radius: 9px; background: none; color: var(--foreground); cursor: pointer; flex: none; }
.dk-tool:hover { background: var(--muted); } .dk-tool.on { background: color-mix(in oklab, var(--primary) 14%, var(--card)); color: var(--primary); } .dk-tool svg { width: 17px; height: 17px; }
.dk-colour { position: relative; } .dk-colour input { position: absolute; inset: auto 6px 3px; width: 20px; height: 4px; padding: 0; border: 0; opacity: 1; cursor: pointer; block-size: 4px; }
.dk-colour input::-webkit-color-swatch-wrapper { padding: 0; } .dk-colour input::-webkit-color-swatch { border: 0; border-radius: 2px; }
.dk-sep { width: 1px; height: 20px; background: var(--border); margin: 0 5px; flex: none; }
.dk-select { height: 32px; border: 0; border-radius: 9px; background: none; padding: 0 6px; font-size: 13px; color: var(--foreground); cursor: pointer; max-width: 130px; } .dk-select:hover { background: var(--muted); } .dk-font { max-width: 100px; }
.dk-chip { height: 28px; padding: 0 10px; border: 0; border-radius: 99px; background: var(--muted); font-size: 12px; cursor: pointer; color: var(--foreground); } .dk-chip:hover { background: var(--secondary); }
.dk-table-tools { display: contents; } .dk-table-tools[hidden] { display: none; }
.dk-body { flex: 1; display: grid; grid-template-columns: 220px minmax(0, 1fr) auto; gap: 0; align-items: start; }
.dk-ed.no-outline .dk-body { grid-template-columns: 0 minmax(0, 1fr) auto; } .dk-ed.no-outline .dk-outline { visibility: hidden; }
.dk-outline { position: sticky; top: 120px; padding: 28px 8px 24px 20px; max-height: calc(100dvh - 130px); overflow: auto; display: grid; gap: 8px; }
.dk-outline > b { font-size: 12.5px; font-weight: 600; color: var(--muted-foreground); padding-left: 8px; }
.dk-outline nav { display: grid; gap: 1px; } .dk-outline nav p { padding-left: 8px; }
.dk-outline button { border: 0; background: none; text-align: left; padding: 5px 8px; border-radius: 8px; font-size: 13px; color: var(--foreground); cursor: pointer; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dk-outline button:hover { background: var(--card); } .dk-outline .l2 { padding-left: 20px; color: var(--muted-foreground); } .dk-outline .l3 { padding-left: 32px; color: var(--muted-foreground); font-size: 12.5px; }
.dk-canvas { min-width: 0; padding: 24px 16px 96px; display: flex; justify-content: center; }
.dk-paper { width: 100%; max-width: var(--page-w); min-height: 1056px; background: var(--paper); border-radius: 6px; padding: 88px 96px; box-shadow: 0 1px 3px rgb(20 18 18 / .06), 0 18px 50px -30px rgb(20 18 18 / .3); }
.dk-loading { color: var(--muted-foreground); font-size: 14px; }
.dk-panel { position: sticky; top: 120px; width: 340px; max-height: calc(100dvh - 132px); overflow: auto; margin: 24px 16px 0 0; background: var(--card); border-radius: 24px; padding: 16px; display: grid; gap: 12px; align-content: start; }
.dk-panel[hidden] { display: none; } .dk-panel > header { display: flex; align-items: center; justify-content: space-between; } .dk-panel > header b { font-size: 15px; }
.dk-panel section { display: grid; gap: 10px; } .dk-panel section[hidden] { display: none; }
.dk-compose { display: grid; gap: 8px; padding: 12px; border-radius: 16px; background: var(--background); } .dk-compose[hidden] { display: none; }
.dk-compose blockquote, .dk-thread blockquote { margin: 0; padding: 2px 0 2px 10px; border-left: 3px solid #f5c542; font-size: 12.5px; color: var(--muted-foreground); overflow: hidden; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; }
.dk-compose .textarea { background: var(--card); border-color: transparent; }
.dk-showres { display: flex; align-items: center; gap: 6px; font-size: 12.5px; color: var(--muted-foreground); }
.dk-thread { display: grid; gap: 8px; padding: 12px; border-radius: 16px; background: var(--background); cursor: pointer; transition: box-shadow .15s; }
.dk-thread.on { box-shadow: 0 0 0 2px var(--primary); } .dk-thread.resolved { opacity: .7; }
.dk-comment header { display: flex; align-items: center; gap: 8px; } .dk-comment header b { font-size: 13px; } .dk-comment header em { font-style: normal; font-size: 11.5px; color: var(--muted-foreground); flex: 1; }
.dk-comment .dk-person { width: 24px; height: 24px; font-size: 9.5px; box-shadow: none; } .dk-comment p { font-size: 13.5px; margin: 4px 0 0 32px; white-space: pre-wrap; word-break: break-word; }
.dk-comment .icon-btn { width: 24px; height: 24px; font-size: 16px; }
.dk-reply { margin: 0; } .dk-reply .input { height: 34px; font-size: 13px; background: var(--card); border-color: transparent; }
.dk-thread footer { display: flex; justify-content: flex-end; }
.dk-name-version { display: flex; gap: 6px; margin: 0; } .dk-name-version .input { flex: 1; min-width: 0; height: 36px; font-size: 13px; background: var(--background); border-color: transparent; }
.dk-version { display: grid; gap: 1px; width: 100%; text-align: left; border: 0; background: var(--background); padding: 10px 12px; border-radius: 14px; cursor: pointer; color: var(--foreground); }
.dk-version:hover { background: var(--muted); } .dk-version.on { box-shadow: 0 0 0 2px var(--primary); } .dk-version b { font-size: 13.5px; } .dk-version em { font-style: normal; font-size: 12px; color: var(--muted-foreground); }
.dk-version-bar { position: fixed; left: 50%; bottom: 20px; transform: translateX(-50%); z-index: 60; display: flex; align-items: center; gap: 10px; padding: 8px 8px 8px 18px; border-radius: 99px; background: var(--foreground); color: var(--background); font-size: 13.5px; width: min(620px, calc(100vw - 32px)); }
.dk-version-bar[hidden] { display: none; } .dk-version-bar .grow { flex: 1; }
.dk-ed.previewing .dk-paper { box-shadow: 0 0 0 3px color-mix(in oklab, var(--primary) 50%, transparent); }
.dk-dialog { border: 0; border-radius: 28px; padding: 24px; width: min(520px, calc(100vw - 32px)); background: var(--card); color: var(--foreground); box-shadow: 0 40px 100px -40px rgb(20 18 18 / .5); }
.dk-dialog::backdrop { background: rgb(20 18 18 / .35); } .dk-dialog form { display: grid; gap: 14px; margin: 0; }
.dk-dialog header { display: flex; align-items: center; justify-content: space-between; gap: 10px; } .dk-dialog h2 { font-size: 18px; letter-spacing: -0.02em; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dk-dialog.dk-small { width: min(420px, calc(100vw - 32px)); } .dk-dialog .fm-copy[hidden] { display: none; }
.dk-share-row { display: flex; align-items: center; gap: 12px; padding: 14px; border-radius: 18px; background: var(--background); }
.dk-share-row .i { width: 36px; height: 36px; border-radius: 99px; display: grid; place-items: center; background: color-mix(in oklab, var(--primary) 12%, var(--card)); color: var(--primary); flex: none; } .dk-share-row svg { width: 18px; height: 18px; }
.dk-share-row .grow { flex: 1; display: grid; } .dk-share-row b { font-size: 14px; } .dk-share-row em { font-style: normal; font-size: 12.5px; color: var(--muted-foreground); }
.dk-switch { position: relative; width: 42px; height: 24px; flex: none; } .dk-switch input { position: absolute; opacity: 0; inset: 0; cursor: pointer; z-index: 1; margin: 0; }
.dk-switch span { position: absolute; inset: 0; border-radius: 99px; background: var(--border); transition: background .15s; }
.dk-switch span::after { content: ""; position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; border-radius: 99px; background: #fff; transition: transform .15s var(--ease); box-shadow: 0 1px 3px rgb(0 0 0 / .2); }
.dk-switch input:checked + span { background: var(--primary); } .dk-switch input:checked + span::after { transform: translateX(18px); }
.dk-toast { position: fixed; left: 50%; bottom: 84px; transform: translateX(-50%); z-index: 80; padding: 10px 18px; border-radius: 99px; background: var(--foreground); color: var(--background); font-size: 13.5px; box-shadow: 0 18px 40px -20px rgb(0 0 0 / .5); }
.dk-toast[hidden] { display: none; }
.dk-ed [hidden] { display: none !important; }

/* The page itself: what's written, as it prints. */
.dk-doc { font-size: 15.5px; line-height: 1.7; color: var(--foreground); word-wrap: break-word; }
.dk-doc .ProseMirror, .dk-doc.ProseMirror { outline: none; min-height: 820px; }
.dk-public .dk-doc { min-height: 0; }
.dk-doc h1 { font-size: 30px; line-height: 1.25; letter-spacing: -0.03em; margin: 28px 0 10px; font-weight: 700; }
.dk-doc h2 { font-size: 22px; line-height: 1.3; letter-spacing: -0.02em; margin: 24px 0 8px; }
.dk-doc h3 { font-size: 17.5px; margin: 20px 0 6px; }
.dk-doc > .ProseMirror > :first-child, .dk-doc.ProseMirror > :first-child { margin-top: 0; }
.dk-doc p { margin: 0 0 10px; } .dk-doc ul, .dk-doc ol { padding-left: 26px; margin: 0 0 10px; } .dk-doc li > p { margin: 0 0 4px; }
.dk-doc a { color: var(--primary); text-decoration: underline; text-underline-offset: 2px; }
.dk-doc blockquote { margin: 12px 0; padding: 4px 0 4px 18px; border-left: 3px solid var(--border); color: var(--muted-foreground); }
.dk-doc pre { margin: 12px 0; padding: 14px 16px; border-radius: 12px; background: var(--background); font-size: 13.5px; line-height: 1.55; overflow-x: auto; }
.dk-doc code { font-size: .9em; padding: 1px 5px; border-radius: 5px; background: var(--muted); } .dk-doc pre code { padding: 0; background: none; }
.dk-doc hr { border: 0; border-top: 1px solid var(--border); margin: 24px 0; }
.dk-doc img { max-width: 100%; height: auto; border-radius: 6px; } .dk-doc img.ProseMirror-selectednode { box-shadow: 0 0 0 3px color-mix(in oklab, var(--primary) 50%, transparent); }
.dk-doc mark { background: #fdeb8a; color: inherit; padding: 0 1px; border-radius: 2px; } .dk-ed[data-theme="dark"] .dk-doc mark { background: #6b5a12; }
.dk-doc table { border-collapse: collapse; width: 100%; margin: 12px 0; table-layout: fixed; overflow: hidden; }
.dk-doc td, .dk-doc th { border: 1px solid var(--border); padding: 7px 10px; vertical-align: top; position: relative; min-width: 40px; } .dk-doc th { background: var(--background); font-weight: 600; text-align: left; }
.dk-doc td > p, .dk-doc th > p { margin: 0; }
.dk-doc .selectedCell::after { content: ""; position: absolute; inset: 0; background: color-mix(in oklab, var(--primary) 12%, transparent); pointer-events: none; }
.dk-doc .column-resize-handle { position: absolute; right: -2px; top: 0; bottom: 0; width: 4px; background: var(--primary); pointer-events: none; }
.dk-doc.resize-cursor, .dk-doc .resize-cursor { cursor: col-resize; }
.dk-doc ul[data-type="taskList"] { list-style: none; padding-left: 2px; } .dk-doc ul[data-type="taskList"] li { display: flex; gap: 8px; align-items: flex-start; }
.dk-doc ul[data-type="taskList"] li > label { flex: none; margin-top: 4px; } .dk-doc ul[data-type="taskList"] li > div { flex: 1; min-width: 0; }
.dk-doc ul[data-type="taskList"] input { width: 16px; height: 16px; accent-color: var(--primary); cursor: pointer; }
.dk-doc li[data-checked="true"] > div { color: var(--muted-foreground); text-decoration: line-through; }
.dk-doc p.is-editor-empty:first-child::before { content: attr(data-placeholder); float: left; height: 0; color: var(--muted-foreground); pointer-events: none; }
.dk-doc .dk-c { background: color-mix(in oklab, #f5c542 34%, transparent); border-bottom: 2px solid #f5c542; cursor: pointer; } .dk-doc .dk-c.on { background: color-mix(in oklab, #f5c542 60%, transparent); }
.dk-doc .collaboration-cursor__caret { position: relative; margin: 0 -1px; border-left: 2px solid; border-right: 0; word-break: normal; pointer-events: none; }
.dk-doc .collaboration-cursor__label { position: absolute; top: -1.45em; left: -2px; font-size: 11px; font-weight: 600; line-height: 1; padding: 3px 6px; border-radius: 6px 6px 6px 0; color: #fff; white-space: nowrap; user-select: none; font-style: normal; }
.dk-doc .ProseMirror-gapcursor:after { border-top-color: var(--foreground); }

/* The public page */
.dk-public { min-height: 100dvh; background: var(--background); padding: 0 16px 48px; display: grid; justify-items: center; align-content: start; }
.dk-public .dk-paper { --paper: var(--card); max-width: 816px; min-height: 0; background: var(--card); }
.dk-public-top { width: 100%; max-width: 816px; display: flex; align-items: center; gap: 10px; padding: 18px 4px; }
.dk-public-top .mark { width: 30px; height: 30px; border-radius: 9px; } .dk-public-top b { font-size: 15px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } .dk-public-top .grow { flex: 1; }
.dk-public-top em { font-style: normal; font-size: 12.5px; color: var(--muted-foreground); white-space: nowrap; }
.dk-public-foot { margin-top: 18px; font-size: 12.5px; color: var(--muted-foreground); } .dk-public-foot a { color: var(--primary); }

@media (max-width: 1100px) {
  .dk-body { grid-template-columns: 0 minmax(0, 1fr) auto; } .dk-outline { visibility: hidden; }
  .dk-ed:not(.no-outline) .dk-outline { visibility: visible; position: fixed; left: 12px; top: 120px; z-index: 45; width: 240px; background: var(--card); border-radius: 20px; box-shadow: 0 24px 60px -24px rgb(20 18 18 / .35); padding: 16px 10px; }
  .dk-panel { position: fixed; right: 12px; top: 120px; bottom: 12px; z-index: 45; margin: 0; max-height: none; width: min(360px, calc(100vw - 24px)); box-shadow: 0 24px 60px -24px rgb(20 18 18 / .35); }
}
@media (max-width: 760px) {
  .dk-top { padding: 8px 10px 4px; gap: 4px; } .dk-share-btn .lbl, .dk-people { display: none; } .dk-share-btn { padding: 0 12px; }
  .dk-meta [data-words], .dk-meta .sep { display: none; }
  .dk-toolbar { top: 58px; margin: 0 8px; border-radius: 18px; flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; } .dk-toolbar::-webkit-scrollbar { display: none; }
  .dk-canvas { padding: 12px 8px 80px; } .dk-paper { padding: 32px 22px; min-height: 70dvh; border-radius: 14px; } .dk-doc .ProseMirror { min-height: 60dvh; }
  .dk-doc h1 { font-size: 25px; } .dk-doc h2 { font-size: 20px; }
  .dk-panel { top: 110px; } .dk-ed:not(.no-outline) .dk-outline { top: 110px; }
}
@media print {
  @page { size: A4; margin: 22mm 20mm; }
  .dk-top, .dk-toolbar, .dk-outline, .dk-panel, .dk-version-bar, .dk-toast, .dk-public-top, .dk-public-foot, .collaboration-cursor__caret { display: none !important; }
  .dk-ed, .dk-body, .dk-canvas, .dk-public, body { display: block !important; background: #fff !important; padding: 0 !important; margin: 0 !important; color: #000; }
  .dk-paper { box-shadow: none !important; padding: 0 !important; max-width: none !important; min-height: 0 !important; background: #fff !important; }
  .dk-doc { color: #000; font-size: 11.5pt; } .dk-doc .ProseMirror { min-height: 0; } .dk-doc .dk-c { background: none; border: 0; }
  .dk-doc h1, .dk-doc h2, .dk-doc h3 { break-after: avoid; } .dk-doc table, .dk-doc img, .dk-doc pre { break-inside: avoid; }
}

/* Desk landing: the hero's page with two people writing */
.dl-mock { position: relative; display: grid; justify-items: center; }
.dl-page { width: min(380px, 100%); background: #fff; color: #141212; border-radius: 16px; padding: 30px 30px 40px; display: grid; gap: 10px; box-shadow: 0 40px 80px -40px rgb(0 0 0 / .6); position: relative; }
.dl-page b { font-size: 20px; letter-spacing: -0.02em; } .dl-page h4 { font-size: 14px; margin-top: 8px; }
.dl-page i { display: block; height: 8px; border-radius: 4px; background: #ebe7e6; } .dl-page i.mark { background: #fbe7a1; }
.dl-cursor { justify-self: start; position: relative; margin: -4px 0; font-size: 10px; font-weight: 600; color: #fff; background: var(--c); padding: 2px 6px; border-radius: 5px 5px 5px 0; }
.dl-cursor::after { content: ""; position: absolute; left: 0; top: 100%; width: 2px; height: 16px; background: var(--c); }
.dl-comment { position: absolute; right: -6px; bottom: 34px; display: flex; align-items: center; gap: 8px; padding: 10px 14px; border-radius: 16px; background: #fff; color: #141212; font-size: 13px; box-shadow: 0 24px 50px -20px rgb(0 0 0 / .5); }

/* ── Desk home: every kind ─────────────────────────────────────────────── */
.fm-new-menu .with-icon { display: flex; align-items: center; gap: 10px; } .fm-new-menu .with-icon > span:last-child { display: grid; }
.fm-new-menu .with-icon .i { width: 30px; height: 30px; border-radius: 10px; display: grid; place-items: center; background: var(--muted); color: var(--primary); flex: none; } .fm-new-menu .with-icon svg { width: 16px; height: 16px; }
.dk-mini.k-sheet { padding: 10% 8%; } .dk-mini .grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 3px; width: 100%; }
.dk-mini .grid i { height: 10px; border-radius: 2px; background: color-mix(in oklab, var(--foreground) 10%, transparent); } .dk-mini .grid i.hd { background: color-mix(in oklab, #16a34a 40%, transparent); }
.dk-mini.k-slides { justify-content: center; } .dk-mini .deck { display: grid; place-content: center; gap: 6px; width: 100%; aspect-ratio: 16 / 9; border-radius: 6px; background: #141212; padding: 10px; }
.dk-mini .deck b { width: 60px; height: 7px; border-radius: 4px; background: #fff; margin: 0 auto; } .dk-mini .deck em { width: 40px; height: 4px; border-radius: 3px; background: #ff6b8b; margin: 0 auto; }
.dk-mini .emo { font-size: 22px; line-height: 1; margin-bottom: 4px; }
.dk-kind { display: inline-flex; color: var(--primary); flex: none; margin-right: 4px; } .dk-kind svg { width: 16px; height: 16px; }
.dk-card.k-sheet .dk-kind { color: #16a34a; } .dk-card.k-slides .dk-kind { color: #ea580c; } .dk-card.k-note .dk-kind { color: #7c3aed; }
.dk-th-sheet .cells { display: grid; grid-template-columns: repeat(3, 1fr); border-top: 1px solid var(--border); border-left: 1px solid var(--border); }
.dk-th-sheet .cells i { font-style: normal; font-size: 8px; padding: 2px 4px; border-right: 1px solid var(--border); border-bottom: 1px solid var(--border); overflow: hidden; white-space: nowrap; text-overflow: ellipsis; min-height: 14px; }
.dk-th-slides { display: grid; place-content: center; gap: 6px; text-align: center; height: calc(100% - 16px); margin-top: 0; aspect-ratio: auto; border-radius: 8px; background: #141212; color: #fff; padding: 12px; }
.dk-th-slides b { font-size: 13px; } .dk-th-slides em { font-style: normal; font-size: 9px; opacity: .7; }
.dk-th-note .emo { font-size: 20px; line-height: 1; }
.dk-print { display: none; }

/* ── Sheets ─────────────────────────────────────────────────────────────── */
.dk-kind-sheet { height: 100dvh; overflow: hidden; }
.sh-bar { display: flex; align-items: center; gap: 8px; margin: 8px 16px 0; padding: 4px 6px; background: var(--card); border-radius: 14px; }
.sh-name { width: 96px; height: 30px; border: 0; border-radius: 9px; background: var(--background); padding: 0 10px; font: 600 13px var(--mono); color: var(--foreground); outline: none; }
.sh-fx { font: italic 600 13px var(--font); color: var(--muted-foreground); padding: 0 4px; }
.sh-formula { flex: 1; min-width: 0; height: 30px; border: 0; background: none; font: 13.5px var(--mono); color: var(--foreground); outline: none; }
.sh-body { display: flex !important; min-height: 0; flex: 1; gap: 0; align-items: stretch !important; }
.sh-main { flex: 1; min-width: 0; display: flex; flex-direction: column; margin: 8px 0 0 16px; min-height: 0; }
.sh-grid { position: relative; flex: 1; min-height: 0; overflow: auto; background: var(--card); border-radius: 14px 14px 0 0; outline: none; overscroll-behavior: contain; }
.sh-grid .dk-loading { padding: 18px; }
.sh-table { border-collapse: separate; border-spacing: 0; table-layout: fixed; font-size: 13px; user-select: none; }
.sh-table th { position: sticky; top: 0; z-index: 3; height: 26px; background: var(--background); font-weight: 500; font-size: 11.5px; color: var(--muted-foreground); border-right: 1px solid var(--border); border-bottom: 1px solid var(--border); text-align: center; }
.sh-table tbody th { position: sticky; left: 0; z-index: 2; top: auto; }
.sh-table th.corner { left: 0; z-index: 4; } .sh-table th.hl { background: color-mix(in oklab, var(--primary) 14%, var(--background)); color: var(--foreground); }
.sh-table td { height: 26px; padding: 0 7px; border-right: 1px solid color-mix(in oklab, var(--border) 70%, transparent); border-bottom: 1px solid color-mix(in oklab, var(--border) 70%, transparent); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; cursor: cell; position: relative; }
.sh-table td.num { text-align: right; font-variant-numeric: tabular-nums; } .sh-table td.bool { text-align: center; } .sh-table td.err { color: var(--destructive, #dc2626); font-weight: 600; }
.sh-table td.wrap { white-space: normal; word-break: break-word; height: auto; }
.sh-table td.sel { background-image: linear-gradient(color-mix(in oklab, var(--primary) 12%, transparent), color-mix(in oklab, var(--primary) 12%, transparent)); }
.sh-table td.active { box-shadow: inset 0 0 0 2px var(--primary); background-image: none; }
.sh-table td.remote { box-shadow: inset 0 0 0 2px var(--rc); overflow: visible; } .sh-table td.remote::after { content: attr(data-who); position: absolute; right: -1px; top: -15px; z-index: 5; font-size: 10px; font-weight: 600; color: #fff; background: var(--rc); padding: 1px 5px; border-radius: 4px 4px 0 4px; white-space: nowrap; pointer-events: none; }
.sh-table tr.frozen td, .sh-table tr.frozen th { position: sticky; top: 26px; z-index: 2; background-color: var(--card); box-shadow: 0 2px 0 var(--border); } .sh-table tr.frozen th { z-index: 3; background: var(--background); }
.sh-resize { position: absolute; right: -3px; top: 0; bottom: 0; width: 6px; cursor: col-resize; z-index: 2; } .sh-resize:hover { background: var(--primary); }
.sh-table thead th { position: sticky; }
.sh-edit { position: absolute; z-index: 6; border: 0; outline: none; padding: 0 7px; font: 13px var(--font); background: var(--card); color: var(--foreground); box-shadow: 0 0 0 2px var(--primary), 0 8px 24px -10px rgb(0 0 0 / .4); }
.sh-more { margin: 10px; }
.sh-tabs { display: flex; gap: 4px; align-items: center; padding: 6px 8px; background: var(--card); border-top: 1px solid var(--border); border-radius: 0 0 14px 14px; overflow-x: auto; margin-bottom: 12px; }
.sh-tab { position: relative; border: 0; background: none; padding: 6px 14px; border-radius: 9px; font-size: 13px; color: var(--muted-foreground); cursor: pointer; white-space: nowrap; }
.sh-tab:hover { background: var(--muted); } .sh-tab.on { background: color-mix(in oklab, #16a34a 14%, var(--card)); color: #15803d; font-weight: 600; } .sh-tab.add { font-size: 16px; padding: 2px 10px; }
.sh-tab .who { margin-left: 6px; font-size: 10px; background: var(--primary); color: #fff; border-radius: 99px; padding: 0 5px; }
.sh-menu { position: absolute; z-index: 70; display: grid; min-width: 210px; padding: 6px; background: var(--card); border-radius: 14px; box-shadow: 0 24px 60px -24px rgb(20 18 18 / .4), 0 0 0 1px rgb(20 18 18 / .05); }
.sh-menu[hidden] { display: none; } .sh-menu button { border: 0; background: none; text-align: left; padding: 8px 10px; border-radius: 9px; font-size: 13.5px; cursor: pointer; color: var(--foreground); } .sh-menu button:hover { background: var(--muted); }
.sh-suggest { position: absolute; z-index: 75; display: grid; padding: 4px; background: var(--card); border-radius: 12px; box-shadow: 0 18px 40px -20px rgb(0 0 0 / .45), 0 0 0 1px rgb(20 18 18 / .05); min-width: 160px; }
.sh-suggest[hidden] { display: none; } .sh-suggest button { border: 0; background: none; text-align: left; padding: 6px 10px; border-radius: 8px; font: 12.5px var(--mono); cursor: pointer; color: var(--foreground); } .sh-suggest button.on { background: var(--muted); }
.sh-chart { display: grid; gap: 8px; padding: 12px; border-radius: 16px; background: var(--background); }
.sh-chart header { display: flex; align-items: center; gap: 8px; } .sh-chart header b { flex: 1; font: 600 12.5px var(--mono); } .sh-chart .select { width: auto; height: 30px; font-size: 12.5px; }
.sh-svg { width: 100%; height: auto; color: var(--foreground); }
.dk-kind-sheet .dk-panel { margin-top: 8px; }

/* ── Slides ─────────────────────────────────────────────────────────────── */
.dk-kind-slides { height: 100dvh; overflow: hidden; }
.dk-present-btn { gap: 6px; } .dk-present-btn .i { display: inline-flex; } .dk-present-btn svg { width: 15px; height: 15px; }
.dk-drop { position: relative; } .dk-drop > summary { list-style: none; cursor: pointer; } .dk-drop > summary::-webkit-details-marker { display: none; }
.dk-drop .fm-menu { left: 0; right: auto; bottom: auto; top: calc(100% + 6px); width: 200px; }
.sl-body { display: grid !important; grid-template-columns: 200px minmax(0, 1fr) auto !important; min-height: 0; flex: 1; align-items: stretch !important; }
.sl-strip { overflow-y: auto; min-height: 0; padding: 14px 10px 24px 16px; display: grid; align-content: start; gap: 10px; outline: none; }
.sl-thumb { position: relative; display: grid; grid-template-columns: 18px 1fr; gap: 6px; align-items: start; cursor: pointer; }
.sl-thumb .n { font-size: 11px; color: var(--muted-foreground); text-align: right; padding-top: 2px; }
.sl-mini { position: relative; aspect-ratio: 16 / 9; border-radius: 10px; overflow: hidden; box-shadow: 0 0 0 1px var(--border); background: #fff; }
.sl-thumb.on .sl-mini { box-shadow: 0 0 0 3px var(--primary); } .sl-thumb.drop .sl-mini { box-shadow: 0 -4px 0 var(--primary); }
.sl-mini .sl-canvas { position: absolute; left: 0; top: 0; width: 1280px; height: 720px; transform: scale(calc(150 / 1280)); transform-origin: 0 0; pointer-events: none; }
.sl-thumb .who { position: absolute; right: 6px; bottom: 6px; display: flex; gap: 2px; } .sl-thumb .who i { width: 10px; height: 10px; border-radius: 99px; background: var(--c); box-shadow: 0 0 0 2px #fff; }
.sl-add { border: 2px dashed var(--border); background: none; border-radius: 10px; padding: 10px; margin-left: 24px; font-size: 13px; color: var(--muted-foreground); cursor: pointer; } .sl-add:hover { color: var(--foreground); border-color: var(--muted-foreground); }
.sl-main { min-width: 0; min-height: 0; display: flex; flex-direction: column; padding: 14px 16px 14px 4px; gap: 10px; }
.sl-stage-wrap { position: relative; flex: 1; min-height: 0; display: grid; place-items: center; background: var(--muted); border-radius: 20px; overflow: hidden; }
.sl-frame { position: relative; box-shadow: 0 18px 50px -24px rgb(20 18 18 / .45); border-radius: 6px; overflow: hidden; }
.sl-canvas { position: relative; width: 1280px; height: 720px; overflow: hidden; }
.sl-stage { position: absolute; left: 0; top: 0; transform-origin: 0 0; outline: none; }
.sl-guides { position: absolute; inset: 0; pointer-events: none; } .sl-guides i { position: absolute; background: #ec4899; } .sl-guides i.v { top: 0; bottom: 0; width: 1px; } .sl-guides i.h { left: 0; right: 0; height: 1px; }
.sl-el { position: absolute; }
.sl-stage .sl-el { cursor: move; } .sl-stage .sl-el.on { outline: 3px solid var(--primary); outline-offset: 2px; }
.sl-stage .sl-el.remote { outline: 3px dashed var(--rc); outline-offset: 4px; } .sl-stage .sl-el.remote::after { content: attr(data-who); position: absolute; left: -3px; top: -30px; font: 600 16px var(--font); color: #fff; background: var(--rc); padding: 2px 8px; border-radius: 6px; white-space: nowrap; }
.sl-txt { width: 100%; height: 100%; overflow: hidden; white-space: pre-wrap; word-break: break-word; line-height: 1.22; display: flex; flex-direction: column; justify-content: center; }
.sl-txt.empty { opacity: .35; } .sl-stage .sl-txt.empty { outline: 2px dashed currentColor; outline-offset: -2px; border-radius: 6px; }
.sl-txt.list { justify-content: flex-start; gap: .35em; } .sl-txt.list > div { position: relative; padding-left: 1.1em; } .sl-txt.list > div::before { content: "•"; position: absolute; left: .1em; }
.sl-center { align-items: center; justify-content: center; text-align: center; }
.sl-shape.shape-ellipse { border-radius: 50%; } .sl-shape.shape-pill { border-radius: 999px; } .sl-shape.shape-rect { border-radius: 14px; } .sl-shape { display: flex; }
.sl-image img { width: 100%; height: 100%; object-fit: cover; border-radius: 10px; display: block; }
.sl-edit { width: 100%; height: 100%; border: 0; outline: none; background: color-mix(in oklab, #fff 6%, transparent); resize: none; padding: 0; line-height: 1.22; overflow: hidden; display: block; }
.sl-el.editing { outline: 3px solid var(--primary); outline-offset: 2px; cursor: text; }
.sl-h { position: absolute; width: 16px; height: 16px; background: #fff; border: 3px solid var(--primary); border-radius: 5px; z-index: 3; }
.sl-h.nw { left: -10px; top: -10px; cursor: nwse-resize; } .sl-h.n { left: calc(50% - 8px); top: -10px; cursor: ns-resize; } .sl-h.ne { right: -10px; top: -10px; cursor: nesw-resize; } .sl-h.e { right: -10px; top: calc(50% - 8px); cursor: ew-resize; }
.sl-h.se { right: -10px; bottom: -10px; cursor: nwse-resize; } .sl-h.s { left: calc(50% - 8px); bottom: -10px; cursor: ns-resize; } .sl-h.sw { left: -10px; bottom: -10px; cursor: nesw-resize; } .sl-h.w { left: -10px; top: calc(50% - 8px); cursor: ew-resize; }
.sl-notes { border: 0; border-radius: 16px; background: var(--card); padding: 12px 16px; font: 14px/1.5 var(--font); color: var(--foreground); resize: vertical; min-height: 72px; max-height: 30vh; outline: none; }
.sl-present { position: fixed; inset: 0; z-index: 200; background: #000; outline: none; cursor: pointer; }
.sl-present[hidden] { display: none; } .sl-show { position: absolute; left: 50%; top: 50%; transform-origin: center; }
.sl-count { position: absolute; right: 18px; bottom: 14px; color: rgb(255 255 255 / .6); font-size: 13px; }
.sl-close { position: absolute; right: 14px; top: 14px; width: 40px; height: 40px; border: 0; border-radius: 99px; background: rgb(255 255 255 / .12); color: #fff; display: grid; place-items: center; cursor: pointer; opacity: 0; transition: opacity .2s; } .sl-present:hover .sl-close { opacity: 1; } .sl-close svg { width: 18px; height: 18px; }

/* ── Notes ──────────────────────────────────────────────────────────────── */
.dk-kind-note { display: grid !important; grid-template-columns: 260px minmax(0, 1fr); height: 100dvh; overflow: hidden; }
.nt-side { display: flex; flex-direction: column; gap: 4px; padding: 18px 10px 12px; background: var(--sidebar); overflow-y: auto; min-height: 0; }
.nt-side .fm-brand { padding: 2px 8px 10px; } .nt-side-label { font-size: 12px; font-weight: 500; color: var(--muted-foreground); padding: 6px 10px 4px; }
.nt-tree { display: grid; gap: 1px; } .nt-node > .kids { display: none; } .nt-node.open > .kids { display: block; }
.nt-node .row { position: relative; display: flex; align-items: center; gap: 2px; padding-left: calc(var(--d, 0) * 14px); border-radius: 9px; }
.nt-node .row:hover { background: color-mix(in oklab, var(--card) 60%, transparent); } .nt-node .row.on { background: var(--card); } .nt-node .row.on .t { font-weight: 600; color: var(--foreground); }
.nt-node .tw { width: 20px; height: 26px; flex: none; display: grid; place-items: center; cursor: pointer; color: var(--muted-foreground); } .nt-node.has-kids > .row .tw::before { content: "›"; font-size: 15px; transition: transform .15s; } .nt-node.open > .row .tw::before { transform: rotate(90deg); }
.nt-node .row a { flex: 1; min-width: 0; display: flex; align-items: center; gap: 7px; padding: 5px 4px; font-size: 13.5px; color: var(--muted-foreground); }
.nt-node .row .t { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } .nt-node .row .ic { font-size: 14px; width: 18px; text-align: center; flex: none; }
.nt-node .row form { margin: 0; } .nt-node .row .add { opacity: 0; width: 24px; height: 24px; border: 0; border-radius: 7px; background: none; cursor: pointer; color: var(--muted-foreground); font-size: 16px; } .nt-node .row:hover .add { opacity: 1; } .nt-node .row .add:hover { background: var(--sidebar-accent); color: var(--foreground); }
.nt-newpage { margin: 6px 0 0; } .nt-newpage button, .nt-back { display: flex; align-items: center; gap: 8px; width: 100%; border: 0; background: none; padding: 7px 10px; border-radius: 9px; font-size: 13.5px; color: var(--muted-foreground); cursor: pointer; }
.nt-newpage button:hover, .nt-back:hover { background: color-mix(in oklab, var(--card) 60%, transparent); color: var(--foreground); } .nt-newpage svg, .nt-back svg { width: 16px; height: 16px; } .nt-newpage span, .nt-back span { display: inline-flex; }
.nt-side > .grow { flex: 1; }
.nt-main { display: flex; flex-direction: column; min-width: 0; min-height: 0; }
.nt-top { position: static; gap: 10px; padding: 10px 16px; } .nt-top .grow { flex: 1; } .nt-burger { display: none !important; }
.nt-crumbs { display: flex; align-items: center; gap: 4px; min-width: 0; font-size: 13.5px; overflow: hidden; white-space: nowrap; } .nt-crumbs a { color: var(--muted-foreground); overflow: hidden; text-overflow: ellipsis; max-width: 180px; } .nt-crumbs a:hover { color: var(--foreground); }
.nt-crumbs .sl { color: var(--muted-foreground); opacity: .5; } .nt-crumbs b { font-weight: 500; overflow: hidden; text-overflow: ellipsis; }
.nt-top .dk-meta { padding-left: 4px; }
.nt-scroll { flex: 1; min-height: 0; overflow-y: auto; }
.nt-cover { position: relative; height: 200px; } .nt-cover[hidden] { display: none; }
.nt-cover-acts { position: absolute; right: 18px; bottom: 12px; display: flex; gap: 6px; opacity: 0; transition: opacity .2s; } .nt-cover:hover .nt-cover-acts { opacity: 1; }
.nt-cover-acts button { border: 0; border-radius: 8px; background: rgb(255 255 255 / .85); color: #141212; font-size: 12.5px; padding: 5px 10px; cursor: pointer; }
.nt-page { width: 100%; max-width: 760px; margin: 0 auto; padding: 56px 48px 120px; }
.nt-wide .nt-page { max-width: none; padding-left: 96px; padding-right: 96px; }
.has-cover .nt-page { padding-top: 0; }
.nt-head { position: relative; display: grid; gap: 6px; margin-bottom: 18px; }
.nt-icon { font-size: 64px; line-height: 1; width: max-content; border: 0; background: none; padding: 6px; margin-left: -6px; border-radius: 12px; cursor: pointer; } .nt-icon:hover { background: var(--muted); } .nt-icon.none { display: none; }
.has-cover .nt-icon { margin-top: -42px; }
.nt-head-acts { display: flex; gap: 4px; opacity: 0; transition: opacity .15s; } .nt-head:hover .nt-head-acts { opacity: 1; }
.nt-head-acts button { display: inline-flex; align-items: center; gap: 6px; border: 0; background: none; padding: 4px 8px; border-radius: 8px; font-size: 13px; color: var(--muted-foreground); cursor: pointer; } .nt-head-acts button:hover { background: var(--muted); color: var(--foreground); }
.nt-head-acts svg { width: 15px; height: 15px; } .nt-head-acts span { display: inline-flex; }
.has-icon .nt-add-icon, .has-cover .nt-add-cover { display: none !important; }
.nt-title { border: 0; background: none; resize: none; overflow: hidden; font: 700 40px/1.2 var(--font); letter-spacing: -0.03em; color: var(--foreground); outline: none; padding: 0; width: 100%; }
.nt-title::placeholder { color: color-mix(in oklab, var(--foreground) 25%, transparent); }
.nt-emoji { position: absolute; top: 76px; left: 0; z-index: 40; display: grid; grid-template-columns: repeat(8, 36px); gap: 2px; padding: 8px; background: var(--card); border-radius: 16px; box-shadow: 0 24px 60px -24px rgb(20 18 18 / .4), 0 0 0 1px rgb(20 18 18 / .05); }
.nt-emoji[hidden] { display: none; } .nt-emoji button { width: 36px; height: 36px; border: 0; background: none; border-radius: 9px; font-size: 20px; cursor: pointer; } .nt-emoji button:hover { background: var(--muted); }
.nt-emoji button.wide { grid-column: 1 / -1; width: auto; height: 30px; font-size: 13px; color: var(--muted-foreground); }
.nt-doc { font-size: 16px; line-height: 1.65; } .nt-doc .ProseMirror { min-height: 50vh; }
.nt-doc h1 { font-size: 30px; margin-top: 32px; } .nt-doc h2 { font-size: 23px; margin-top: 26px; } .nt-doc h3 { font-size: 18.5px; }
.nt-callout { display: flex; gap: 10px; margin: 10px 0; padding: 14px 16px; border-radius: 14px; background: var(--muted); }
.nt-callout::before { content: attr(data-emoji); font-size: 20px; line-height: 1.4; } .nt-callout > p { margin: 0; flex: 1; } .nt-callout > p + p { margin-top: 6px; }
.nt-toggle { position: relative; padding-left: 26px; margin: 4px 0; }
.nt-tog-btn { position: absolute; left: 0; top: 2px; width: 22px; height: 22px; border: 0; background: none; border-radius: 6px; cursor: pointer; color: var(--muted-foreground); font-size: 13px; } .nt-tog-btn::before { content: "▸"; display: inline-block; transition: transform .15s; }
.nt-tog-btn:hover { background: var(--muted); } .nt-toggle[data-open="true"] > .nt-tog-btn::before { transform: rotate(90deg); }
.nt-toggle[data-open="false"] > .nt-tog-body > :not(:first-child) { display: none; } .nt-tog-body > :first-child { margin-bottom: 4px; }
.nt-pagelink { display: flex; align-items: center; gap: 8px; margin: 4px 0; padding: 6px 8px; border-radius: 10px; text-decoration: none !important; color: var(--foreground) !important; cursor: pointer; }
.nt-pagelink:hover { background: var(--muted); } .nt-pagelink b { font-weight: 500; border-bottom: 1px solid color-mix(in oklab, var(--foreground) 25%, transparent); } .nt-pagelink em { font-style: normal; font-size: 12px; color: var(--muted-foreground); }
.nt-pagelink.ProseMirror-selectednode { box-shadow: 0 0 0 2px color-mix(in oklab, var(--primary) 45%, transparent); }
.nt-children { margin-top: 36px; padding-top: 16px; border-top: 1px solid var(--border); display: grid; gap: 2px; } .nt-children h3 { font-size: 12.5px; font-weight: 500; color: var(--muted-foreground); margin-bottom: 6px; }
.nt-children a { display: flex; gap: 8px; padding: 6px 8px; border-radius: 9px; font-size: 14.5px; } .nt-children a:hover { background: var(--muted); }
.nt-slash { position: absolute; z-index: 80; width: 280px; max-height: 320px; overflow-y: auto; padding: 6px; background: var(--card); border-radius: 16px; box-shadow: 0 24px 60px -24px rgb(20 18 18 / .45), 0 0 0 1px rgb(20 18 18 / .05); }
.nt-slash[hidden] { display: none; } .nt-slash p { padding: 4px 8px; }
.nt-slash button { display: flex; align-items: center; gap: 10px; width: 100%; border: 0; background: none; text-align: left; padding: 6px 8px; border-radius: 10px; cursor: pointer; color: var(--foreground); }
.nt-slash button.on, .nt-slash button:hover { background: var(--muted); } .nt-slash .i { width: 34px; height: 34px; border-radius: 9px; display: grid; place-items: center; background: var(--background); font-size: 14px; font-weight: 600; flex: none; }
.nt-slash b { display: block; font-size: 13.5px; font-weight: 500; } .nt-slash em { font-style: normal; font-size: 12px; color: var(--muted-foreground); }
.nt-bubble { position: absolute; z-index: 80; display: flex; gap: 1px; padding: 4px; background: var(--foreground); border-radius: 12px; box-shadow: 0 18px 40px -16px rgb(0 0 0 / .5); }
.nt-bubble[hidden] { display: none; } .nt-bubble button { width: 30px; height: 30px; border: 0; background: none; border-radius: 8px; color: var(--background); cursor: pointer; display: grid; place-items: center; font-size: 12px; font-weight: 700; }
.nt-bubble button:hover, .nt-bubble button.on { background: color-mix(in oklab, var(--background) 22%, transparent); } .nt-bubble svg { width: 15px; height: 15px; }
.dk-kind-note .dk-panel { position: fixed; right: 12px; top: 64px; bottom: 12px; z-index: 45; margin: 0; max-height: none; box-shadow: 0 24px 60px -24px rgb(20 18 18 / .35); }

/* Public pages for each kind */
.pub-sheet .dk-paper { max-width: 1100px; padding: 32px; } .pub-sheet .dk-public-top { max-width: 1100px; }
.pub-sheet table { font-size: 13px; } .pub-sheet td { padding: 4px 8px; white-space: nowrap; } .pub-sheet .dk-doc { overflow-x: auto; }
.pub-slides .dk-paper { background: none; box-shadow: none; padding: 0; } .pub-slides section { aspect-ratio: 16 / 9; display: grid; align-content: center; gap: 10px; padding: 6% 8%; margin: 0 0 18px; border-radius: 14px; background: var(--card); box-shadow: 0 18px 50px -30px rgb(20 18 18 / .4); }
.pub-slides section h2 { font-size: clamp(20px, 4vw, 38px); margin: 0; } .pub-slides section p { margin: 0; font-size: clamp(13px, 2vw, 19px); color: var(--muted-foreground); }
.pub-note .dk-paper { background: none; box-shadow: none; } .pub-note [data-callout] { display: flex; gap: 10px; padding: 14px 16px; border-radius: 14px; background: var(--muted); margin: 10px 0; } .pub-note [data-callout]::before { content: attr(data-emoji); }
.pub-note [data-toggle] { padding-left: 18px; border-left: 2px solid var(--border); margin: 6px 0; }

@media (max-width: 860px) {
  .dk-kind-note { grid-template-columns: 1fr; }
  .dk-kind-note .nt-side { position: fixed; inset: 0 auto 0 0; width: min(300px, 86vw); z-index: 70; transform: translateX(-100%); transition: transform .25s ease; }
  .dk-kind-note .fm-nav-toggle:checked ~ .nt-side { transform: none; }
  .dk-kind-note .fm-nav-toggle:checked ~ .fm-scrim { display: block; position: fixed; inset: 0; z-index: 65; background: rgb(20 18 18 / .3); }
  .nt-burger { display: grid !important; place-items: center; width: 36px; height: 36px; border-radius: 11px; background: var(--card); cursor: pointer; flex: none; } .nt-burger svg { width: 18px; height: 18px; }
  .nt-top .dk-meta, .nt-crumbs a, .nt-crumbs .sl { display: none; }
  .nt-page { padding: 28px 20px 96px; } .nt-wide .nt-page { padding: 28px 20px 96px; } .nt-title { font-size: 30px; } .nt-icon { font-size: 48px; }
  .sl-body { grid-template-columns: 1fr !important; grid-template-rows: auto 1fr; } .sl-strip { grid-auto-flow: column; grid-auto-columns: 130px; overflow-x: auto; padding: 8px 12px; }
  .sl-add { margin: 0; } .sl-thumb .n { display: none; } .sl-thumb { grid-template-columns: 1fr; } .sl-mini .sl-canvas { transform: scale(calc(130 / 1280)); }
  .sl-main { padding: 0 8px 8px; } .dk-present-btn .lbl { display: none; }
  .sh-main { margin: 8px 8px 0; } .sh-bar { margin: 8px 8px 0; } .sh-name { width: 70px; }
}
@media print {
  .dk-kind-sheet .dk-top, .dk-kind-sheet .dk-toolbar, .dk-kind-sheet .sh-bar, .dk-kind-sheet .dk-body, .dk-kind-slides .dk-top, .dk-kind-slides .dk-toolbar, .dk-kind-slides .dk-body { display: none !important; }
  .dk-kind-sheet, .dk-kind-slides { height: auto !important; overflow: visible !important; display: block !important; }
  .dk-print { display: block !important; } .dk-print table { border-collapse: collapse; font-size: 9pt; } .dk-print td { border: 1px solid #ccc; padding: 2px 6px; } .dk-print h1 { font-size: 14pt; margin-bottom: 8px; }
  .dk-kind-slides .dk-print { margin: 0; } .sl-print-page { width: 640px; height: 360px; margin: 0 auto 24px; position: relative; overflow: hidden; break-inside: avoid; border: 1px solid #ddd; }
  .sl-print-page .sl-canvas { position: absolute; left: 0; top: 0; transform: scale(.5); transform-origin: 0 0; }
  .dk-kind-note { display: block !important; height: auto !important; overflow: visible !important; } .nt-side, .nt-top, .nt-head-acts, .nt-cover-acts, .nt-children { display: none !important; } .nt-scroll { overflow: visible; }
}

/* ── Sheets: merged cells, colour rules, comment markers ─────────────────── */
.sh-table td.covered { display: none; } .sh-table td.merged { vertical-align: middle; }
.sh-table td.cmt { overflow: visible; } .sh-table td.cmt::before { content: ""; position: absolute; right: 0; top: 0; border-style: solid; border-width: 0 8px 8px 0; border-color: transparent #f59e0b transparent transparent; z-index: 1; }
.sh-rule { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 14px; background: var(--background); }
.sh-rule .sw { width: 40px; height: 28px; border-radius: 8px; display: grid; place-items: center; font-size: 12px; box-shadow: inset 0 0 0 1px var(--border); flex: none; }
.sh-rule .grow { flex: 1; min-width: 0; display: grid; } .sh-rule b { font: 600 12.5px var(--mono); } .sh-rule em { font-style: normal; font-size: 12.5px; color: var(--muted-foreground); }
.sh-rule-form { display: grid; gap: 8px; padding: 12px; border-radius: 16px; background: var(--background); margin: 4px 0 0; }
.sh-rule-form label { display: grid; gap: 4px; font-size: 12px; color: var(--muted-foreground); } .sh-rule-form .input, .sh-rule-form .select { height: 34px; font-size: 13px; background: var(--card); border-color: transparent; }
.sh-rule-form .two { display: flex; gap: 8px; align-items: end; flex-wrap: wrap; } .sh-rule-form .two[hidden], .sh-rule-form [hidden] { display: none; } .sh-rule-form .two > * { flex: 1; min-width: 0; }
.sh-rule-form input[type=color] { width: 100%; height: 30px; border: 0; padding: 0; background: none; cursor: pointer; } .sh-rule-form .chk { display: flex; align-items: center; gap: 6px; color: var(--foreground); font-size: 13px; padding-bottom: 6px; }

/* ── Slides: comment pins, animations, transitions ──────────────────────── */
.sl-pin { position: absolute; right: -14px; top: -14px; z-index: 4; width: 28px; height: 28px; border: 3px solid #fff; border-radius: 50% 50% 50% 4px; background: #f59e0b; cursor: pointer; box-shadow: 0 4px 12px rgb(0 0 0 / .25); }
.sl-pin.slide { right: 14px; top: 14px; width: 34px; height: 34px; }
.sl-cmts { position: absolute; left: 30px; top: 6px; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 99px; background: #f59e0b; color: #fff; font-size: 10.5px; font-weight: 700; display: grid; place-items: center; }
.sl-fx { position: absolute; left: 30px; bottom: 6px; font-size: 11px; color: #fff; text-shadow: 0 1px 2px rgb(0 0 0 / .5); }
.sl-show .an-wait { visibility: hidden; }
.an-fade { animation: an-fade .6s var(--ease) both; } .an-rise { animation: an-rise .6s var(--ease) both; } .an-zoom { animation: an-zoom .55s var(--ease) both; }
.an-wipe { animation: an-wipe .7s var(--ease) both; } .an-pop { animation: an-pop .5s cubic-bezier(.34, 1.56, .64, 1) both; }
@keyframes an-fade { from { opacity: 0; } }
@keyframes an-rise { from { opacity: 0; transform: translateY(60px); } }
@keyframes an-zoom { from { opacity: 0; transform: scale(.6); } }
@keyframes an-wipe { from { clip-path: inset(0 100% 0 0); } to { clip-path: inset(0 0 0 0); } }
@keyframes an-pop { from { opacity: 0; transform: scale(.3); } }
.sl-show.tr-fade { animation: tr-fade .6s ease both; } .sl-show.tr-slide { animation: tr-slide .6s var(--ease) both; } .sl-show.tr-zoom { animation: tr-zoom .6s var(--ease) both; } .sl-show.tr-flip { animation: tr-flip .7s var(--ease) both; }
@keyframes tr-fade { from { opacity: 0; } }
@keyframes tr-slide { from { transform: translate(calc(-50% + 40vw), -50%) scale(var(--k)); opacity: .2; } }
@keyframes tr-zoom { from { transform: translate(-50%, -50%) scale(calc(var(--k) * .7)); opacity: 0; } }
@keyframes tr-flip { from { transform: translate(-50%, -50%) scale(var(--k)) perspective(2000px) rotateY(-80deg); opacity: 0; } }
.sl-frame.tr-fade { animation: tr-fade .6s ease both; } .sl-frame.tr-zoom, .sl-frame.tr-slide, .sl-frame.tr-flip { animation: an-zoom .5s var(--ease) both; }

/* ── Notes: databases, page picker, backlinks ───────────────────────────── */
.nt-db { margin: 14px 0; padding: 14px 0 6px; border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); font-size: 14px; }
.nt-db.ProseMirror-selectednode { box-shadow: 0 0 0 2px color-mix(in oklab, var(--primary) 40%, transparent); border-radius: 8px; }
.nt-db-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 10px; }
.nt-db-name { flex: 1; min-width: 160px; border: 0; background: none; font: 700 19px var(--font); color: var(--foreground); outline: none; padding: 2px 0; }
.nt-db-views { display: inline-flex; gap: 2px; padding: 3px; border-radius: 10px; background: var(--muted); }
.nt-db-views button { border: 0; background: none; padding: 4px 10px; border-radius: 8px; font-size: 12.5px; cursor: pointer; color: var(--muted-foreground); } .nt-db-views button.on { background: var(--card); color: var(--foreground); font-weight: 600; }
.nt-db-group { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; color: var(--muted-foreground); } .nt-db-group select { border: 0; background: var(--muted); border-radius: 8px; padding: 4px 8px; font-size: 12.5px; color: var(--foreground); }
.nt-db-search { width: 150px; border: 0; background: var(--muted); border-radius: 9px; padding: 5px 10px; font-size: 12.5px; color: var(--foreground); outline: none; }
.nt-db-scroll { overflow-x: auto; }
.nt-db-table { border-collapse: collapse; width: 100%; min-width: 560px; font-size: 13.5px; margin: 0 !important; table-layout: auto !important; }
.nt-db-table th, .nt-db-table td { border: 0 !important; border-bottom: 1px solid color-mix(in oklab, var(--border) 70%, transparent) !important; padding: 0 !important; text-align: left; vertical-align: middle; background: none !important; }
.nt-db-table th { font-weight: 500; font-size: 12.5px; color: var(--muted-foreground); white-space: nowrap; }
.nt-db-table th > button, .nt-db-prop > summary { display: block; width: 100%; border: 0; background: none; padding: 7px 8px; text-align: left; font: inherit; color: inherit; cursor: pointer; list-style: none; }
.nt-db-prop > summary::-webkit-details-marker { display: none; } .nt-db-table th > button:hover, .nt-db-prop > summary:hover { background: var(--muted); }
.nt-db-prop { position: relative; } .nt-db-menu { position: absolute; z-index: 30; left: 0; top: 100%; width: 200px; display: grid; gap: 4px; padding: 8px; background: var(--card); border-radius: 12px; box-shadow: 0 18px 40px -18px rgb(0 0 0 / .4), 0 0 0 1px rgb(20 18 18 / .05); }
.nt-db-menu input, .nt-db-menu select { border: 0; background: var(--muted); border-radius: 8px; padding: 6px 8px; font-size: 13px; color: var(--foreground); }
.nt-db-menu button { border: 0; background: none; text-align: left; padding: 6px 8px; border-radius: 8px; font-size: 13px; cursor: pointer; color: var(--foreground); } .nt-db-menu button:hover { background: var(--muted); } .nt-db-menu .danger { color: var(--destructive, #dc2626); }
.nt-db-table td input:not([type=checkbox]) { width: 100%; min-width: 90px; border: 0; background: none; padding: 7px 8px; font: inherit; color: var(--foreground); outline: none; }
.nt-db-table td input:focus { background: var(--muted); border-radius: 6px; }
.nt-db-table td.title { position: relative; min-width: 200px; } .nt-db-table td.title input { font-weight: 500; padding-right: 90px; }
.nt-db-table td.title .open, .nt-db-table td.title .del { position: absolute; top: 50%; transform: translateY(-50%); border: 0; border-radius: 6px; background: var(--card); box-shadow: 0 0 0 1px var(--border); font-size: 11.5px; padding: 2px 7px; cursor: pointer; opacity: 0; color: var(--foreground); }
.nt-db-table td.title .open { right: 30px; } .nt-db-table td.title .del { right: 4px; } .nt-db-table tr:hover .open, .nt-db-table tr:hover .del { opacity: 1; }
.nt-db-table td.t-check { text-align: center !important; } .nt-db-table td.t-check input { width: 16px; height: 16px; accent-color: var(--primary); }
.nt-db-table th.add button { width: 32px; font-size: 16px; }
.nt-db-tagwrap { position: relative; display: block; } .nt-db-tagwrap .nt-db-tag { position: absolute; left: 6px; top: 50%; transform: translateY(-50%); pointer-events: none; }
.nt-db-tagwrap .nt-db-tag + input { color: transparent; } .nt-db-tagwrap .nt-db-tag + input:focus { color: var(--foreground); } .nt-db-tagwrap input:focus ~ .nt-db-tag, .nt-db-tagwrap:focus-within .nt-db-tag { display: none; }
.nt-db-tag { display: inline-block; padding: 1px 8px; border-radius: 6px; font-size: 12.5px; color: #141212; white-space: nowrap; }
.nt-db-new { border: 0; background: none; padding: 7px 8px; font-size: 13px; color: var(--muted-foreground); cursor: pointer; border-radius: 8px; } .nt-db-new:hover { background: var(--muted); color: var(--foreground); }
.nt-db-count { font-size: 11.5px; color: var(--muted-foreground); margin: 4px 8px 0 !important; }
.nt-db-board { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(220px, 1fr); gap: 12px; overflow-x: auto; padding-bottom: 6px; }
.nt-db-col { display: grid; align-content: start; gap: 8px; padding: 8px; border-radius: 14px; background: var(--muted); min-height: 120px; } .nt-db-col.drop { box-shadow: inset 0 0 0 2px var(--primary); }
.nt-db-col header { display: flex; align-items: center; gap: 8px; padding: 2px 4px; } .nt-db-col header em { font-style: normal; font-size: 12px; color: var(--muted-foreground); }
.nt-db-card { position: relative; display: grid; gap: 3px; padding: 10px 12px; border-radius: 12px; background: var(--card); box-shadow: 0 1px 3px rgb(20 18 18 / .08); cursor: grab; }
.nt-db-card b { font-weight: 500; } .nt-db-card span { font-size: 12px; color: var(--muted-foreground); }
.nt-db-card .open { position: absolute; right: 8px; top: 8px; border: 0; border-radius: 6px; background: var(--muted); font-size: 11px; padding: 2px 7px; cursor: pointer; opacity: 0; color: var(--foreground); } .nt-db-card:hover .open { opacity: 1; }
.nt-picker { width: 300px; } .nt-picker .input { height: 34px; margin-bottom: 4px; background: var(--background); border-color: transparent; }
.nt-picker button { gap: 8px; font-size: 13.5px; } .nt-picker button span { width: 20px; text-align: center; }
.nt-backlinks { margin-top: 24px; }
.pub-note .nt-db-static table, .nt-db-static table { font-size: 13px; }
.dk-viewer-note { margin: 0 4px 8px; padding: 10px 12px; border-radius: 14px; background: var(--card); font-size: 12.5px; color: var(--muted-foreground); }
.nt-db-filterbtn { border: 0; background: var(--muted); border-radius: 9px; padding: 5px 10px; font-size: 12.5px; cursor: pointer; color: var(--foreground); } .nt-db-filterbtn.on { background: color-mix(in oklab, var(--primary) 14%, var(--card)); color: var(--primary); font-weight: 600; }
.nt-db-filters { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin: -2px 0 10px; }
.nt-db-filter { display: inline-flex; align-items: center; gap: 4px; padding: 3px 4px 3px 8px; border-radius: 10px; background: var(--muted); font-size: 12.5px; }
.nt-db-filter select, .nt-db-filter input { border: 0; background: var(--card); border-radius: 7px; padding: 3px 6px; font-size: 12.5px; color: var(--foreground); max-width: 140px; }
.nt-db-filter button { border: 0; background: none; cursor: pointer; font-size: 15px; color: var(--muted-foreground); padding: 0 4px; }
.nt-db-target { display: grid; gap: 2px; font-size: 11.5px; color: var(--muted-foreground); padding: 2px 0; }
.nt-db-rel { position: relative; display: flex; flex-wrap: wrap; align-items: center; gap: 4px; padding: 4px 6px; min-height: 32px; }
.nt-db-chip { display: inline-flex; align-items: center; border-radius: 6px; background: color-mix(in oklab, var(--primary) 10%, var(--card)); font-size: 12.5px; }
.nt-db-chip button { border: 0; background: none; padding: 2px 6px; cursor: pointer; color: var(--foreground); } .nt-db-chip button:first-child { text-decoration: underline; text-decoration-color: color-mix(in oklab, var(--foreground) 30%, transparent); } .nt-db-chip .x { padding: 2px 5px 2px 0; color: var(--muted-foreground); }
.nt-db-reladd { width: 24px; height: 24px; border: 0; border-radius: 6px; background: none; cursor: pointer; color: var(--muted-foreground); opacity: 0; } .nt-db-table tr:hover .nt-db-reladd, .nt-db-reladd:focus { opacity: 1; } .nt-db-reladd:hover { background: var(--muted); }
.nt-db-picker { position: absolute; left: 0; top: 100%; z-index: 35; width: 240px; max-height: 260px; overflow-y: auto; display: grid; gap: 2px; padding: 6px; background: var(--card); border-radius: 12px; box-shadow: 0 18px 40px -18px rgb(0 0 0 / .4), 0 0 0 1px rgb(20 18 18 / .05); }
.nt-db-picker input { border: 0 !important; background: var(--muted) !important; border-radius: 8px; padding: 6px 8px !important; margin-bottom: 4px; }
.nt-db-picker button { border: 0; background: none; text-align: left; padding: 6px 8px; border-radius: 8px; font-size: 13px; cursor: pointer; color: var(--foreground); } .nt-db-picker button:hover { background: var(--muted); } .nt-db-picker p { font-size: 12.5px; color: var(--muted-foreground); padding: 6px; margin: 0; }
.nt-db { position: relative; }

/* ── SORA Search (search-engine.mercestack.com) ─────────────────────────── */
.se-app { min-height: 100dvh; display: flex; flex-direction: column; background: var(--background); color: var(--foreground); }
.se-top { display: flex; align-items: center; gap: 18px; padding: 14px 28px; }
.se-top:not(.home) { border-bottom: 1px solid color-mix(in oklab, var(--border) 70%, transparent); background: var(--background); position: sticky; top: 0; z-index: 30; }
.se-top .grow { flex: 1; }
.se-links { display: flex; align-items: center; gap: 16px; font-size: 13.5px; } .se-links > a:not(.btn) { color: var(--muted-foreground); } .se-links > a:not(.btn):hover { color: var(--foreground); }
.se-pref { display: inline-flex; } .se-pref svg { width: 18px; height: 18px; }
.se-me { position: relative; } .se-me > summary { list-style: none; cursor: pointer; } .se-me > summary::-webkit-details-marker { display: none; }
.se-av { width: 32px; height: 32px; border-radius: 99px; background: var(--primary); color: #fff; display: grid; place-items: center; font-size: 12px; font-weight: 700; }
.se-me .fm-menu { left: auto; right: 0; bottom: auto; top: calc(100% + 8px); width: 240px; } .se-me-name { display: grid; padding: 6px 10px 8px; } .se-me-name em { font-style: normal; font-size: 12px; color: var(--muted-foreground); }
.se-logo { display: inline-flex; align-items: center; gap: 8px; font-weight: 800; letter-spacing: 0.14em; font-size: 54px; color: var(--foreground); }
.se-logo .dot { width: .42em; height: .42em; border-radius: 99px; background: var(--primary); box-shadow: .24em 0 0 -.06em color-mix(in oklab, var(--primary) 45%, transparent); margin-right: .2em; }
.se-logo.small { font-size: 21px; letter-spacing: .12em; flex: none; }
.se-box { position: relative; flex: 1; max-width: 690px; display: flex; align-items: center; gap: 8px; height: 46px; padding: 0 6px 0 16px; background: var(--card); border-radius: 99px; box-shadow: 0 0 0 1px var(--border); }
.se-box:focus-within { box-shadow: 0 0 0 1px color-mix(in oklab, var(--primary) 60%, var(--border)), 0 6px 22px -14px rgb(20 18 18 / .35); }
.se-box .i { display: inline-flex; color: var(--muted-foreground); } .se-box .i svg { width: 18px; height: 18px; }
.se-box input[name=q] { flex: 1; min-width: 0; border: 0; background: none; outline: none; font-size: 15.5px; color: var(--foreground); height: 100%; }
.se-box input[name=q]::-webkit-search-cancel-button { display: none; }
.se-slash { font: 600 11px var(--mono); color: var(--muted-foreground); border: 1px solid var(--border); border-radius: 6px; padding: 1px 6px; } .se-box:focus-within .se-slash { display: none; }
.se-go { width: 36px; height: 36px; border: 0; border-radius: 99px; background: var(--primary); color: #fff; display: grid; place-items: center; cursor: pointer; flex: none; } .se-go svg { width: 17px; height: 17px; }
.se-box.big { height: 56px; max-width: 640px; width: 100%; } .se-box.big input[name=q] { font-size: 17px; }
.se-suggest { position: absolute; left: 0; right: 0; top: calc(100% + 6px); z-index: 40; display: grid; padding: 6px; background: var(--card); border-radius: 16px; box-shadow: 0 24px 50px -22px rgb(20 18 18 / .35), 0 0 0 1px var(--border); }
.se-suggest[hidden] { display: none; } .se-suggest button { border: 0; background: none; text-align: left; padding: 8px 12px; border-radius: 10px; font-size: 14.5px; cursor: pointer; color: var(--foreground); } .se-suggest button.on, .se-suggest button:hover { background: var(--muted); } .se-suggest button.history { color: #7c3aed; }
/* Home */
.se-home { flex: 1; display: grid; justify-items: center; align-content: center; gap: 16px; padding: 0 16px 12vh; text-align: center; }
.se-tag { color: var(--muted-foreground); font-size: 15px; margin-bottom: 8px; }
.se-home-cats { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; margin-top: 4px; }
.se-home-cats a { padding: 6px 14px; border-radius: 99px; font-size: 13.5px; color: var(--muted-foreground); box-shadow: inset 0 0 0 1px var(--border); } .se-home-cats a:hover { color: var(--foreground); background: var(--card); }
.se-recent { width: min(640px, 100%); margin-top: 18px; text-align: left; } .se-recent h2 { font-size: 12.5px; font-weight: 500; color: var(--muted-foreground); margin-bottom: 6px; padding-left: 6px; }
.se-recent div { display: flex; flex-wrap: wrap; gap: 6px; } .se-recent a { display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; border-radius: 99px; background: var(--card); font-size: 13.5px; } .se-recent svg { width: 14px; height: 14px; color: var(--muted-foreground); } .se-recent span { display: inline-flex; }
.se-tips { margin-top: 20px; font-size: 12.5px; color: var(--muted-foreground); } .se-tips code, .se-page code { font-size: 12px; padding: 1px 5px; border-radius: 5px; background: var(--muted); } .se-tips kbd { font: 600 11px var(--mono); border: 1px solid var(--border); border-radius: 5px; padding: 0 5px; }
/* Results */
.se-bar { display: flex; align-items: center; gap: 12px; padding: 0 28px 0 calc(28px + 110px); border-bottom: 1px solid color-mix(in oklab, var(--border) 70%, transparent); flex-wrap: wrap; }
.se-tabs { display: flex; gap: 2px; overflow-x: auto; scrollbar-width: none; } .se-tabs::-webkit-scrollbar { display: none; }
.se-tabs a { padding: 12px 12px 11px; font-size: 13.5px; color: var(--muted-foreground); border-bottom: 2px solid transparent; white-space: nowrap; } .se-tabs a:hover { color: var(--foreground); } .se-tabs a.on { color: var(--foreground); font-weight: 600; border-bottom-color: var(--primary); }
.se-filters { margin: 0 0 0 auto; } .se-filters select { border: 0; background: none; font-size: 13px; color: var(--muted-foreground); padding: 6px 4px; cursor: pointer; } .se-filters select:hover { color: var(--foreground); }
.se-main { display: grid; grid-template-columns: minmax(0, 690px) 300px; gap: 56px; padding: 18px 28px 64px calc(28px + 110px); flex: 1; }
.se-col { display: grid; gap: 22px; align-content: start; min-width: 0; }
.se-sources { display: flex; flex-wrap: wrap; gap: 6px; }
.se-sources a { display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; border-radius: 99px; font-size: 12.5px; color: var(--muted-foreground); box-shadow: inset 0 0 0 1px var(--border); } .se-sources a:hover { color: var(--foreground); }
.se-sources a.on { background: var(--foreground); color: var(--background); box-shadow: none; } .se-sources em { font-style: normal; font-size: 11.5px; opacity: .75; }
.se-sources .d, .se-side .d { width: 7px; height: 7px; border-radius: 99px; background: var(--muted-foreground); flex: none; }
.st-success .d { background: #16a34a; } .st-empty .d { background: #a3a3a3; } .st-timeout .d, .st-rate_limited .d, .st-circuit_open .d { background: #f59e0b; } .st-error .d { background: #dc2626; } .st-not_configured .d, .st-skipped .d { background: transparent; box-shadow: inset 0 0 0 1.5px var(--muted-foreground); }
.se-only { font-size: 13px; color: var(--muted-foreground); margin-top: -10px; } .se-only a { color: var(--primary); }
.se-results { display: grid; gap: 26px; }
.se-r { display: grid; gap: 4px; padding: 2px 0; border-radius: 12px; } .se-r.kb { box-shadow: -14px 0 0 -10px var(--primary); }
.se-r-site { display: flex; align-items: center; gap: 10px; min-width: 0; }
.se-fav { width: 26px; height: 26px; border-radius: 99px; display: grid; place-items: center; font-size: 12px; font-weight: 700; color: hsl(var(--h) 55% 32%); background: hsl(var(--h) 70% 92%); flex: none; }
.se-app[data-theme="dark"] .se-fav { color: hsl(var(--h) 70% 82%); background: hsl(var(--h) 35% 22%); }
.se-r-site .u { display: grid; min-width: 0; line-height: 1.25; } .se-r-site b { font-size: 13.5px; font-weight: 500; } .se-r-site em { font-style: normal; font-size: 12px; color: var(--muted-foreground); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.se-r h3 { font-size: 19px; font-weight: 500; line-height: 1.3; letter-spacing: -0.005em; }
.se-r h3 a { color: #1a4fd6; } .se-r h3 a:visited { color: #7c3aed; } .se-r h3 a:hover { text-decoration: underline; text-underline-offset: 2px; }
.se-app[data-theme="dark"] .se-r h3 a { color: #8ab4ff; } .se-app[data-theme="dark"] .se-r h3 a:visited { color: #c4a7ff; }
.se-snip { font-size: 14px; line-height: 1.55; color: color-mix(in oklab, var(--foreground) 82%, transparent); overflow-wrap: anywhere; } .se-snip .when { color: var(--muted-foreground); }
.se-meta { display: flex; flex-wrap: wrap; gap: 4px 12px; font-size: 12px; color: var(--muted-foreground); } .se-meta .se-src { color: color-mix(in oklab, var(--primary) 80%, var(--foreground)); } .se-meta a { color: var(--muted-foreground); text-decoration: underline; }
.se-r-body { display: flex; gap: 16px; align-items: flex-start; } .se-r-text { flex: 1; min-width: 0; display: grid; gap: 4px; }
.se-thumb { width: 120px; height: 72px; border-radius: 10px; object-fit: cover; flex: none; background: var(--muted); }
.se-r.k-answer { padding: 16px 18px; background: var(--card); border-radius: 18px; } .se-answer-tag { font-size: 11.5px; font-weight: 600; color: var(--primary); text-transform: uppercase; letter-spacing: .06em; }
.se-images { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 12px; }
.se-img { display: grid; gap: 6px; } .se-img img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 12px; background: var(--muted); }
.se-img span { display: grid; } .se-img b { font-size: 12.5px; font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } .se-img em { font-style: normal; font-size: 11.5px; color: var(--muted-foreground); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.se-empty { padding: 24px 0; } .se-empty h2 { font-size: 18px; margin-bottom: 6px; } .se-empty p { color: var(--muted-foreground); max-width: 560px; }
.se-related h3 { font-size: 15px; margin-bottom: 10px; } .se-related div { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 8px; }
.se-related a { display: flex; align-items: center; gap: 8px; padding: 9px 14px; border-radius: 99px; background: var(--card); font-size: 13.5px; } .se-related svg { width: 14px; height: 14px; color: var(--muted-foreground); } .se-related span { display: inline-flex; }
.se-pager { display: flex; align-items: center; gap: 14px; font-size: 13px; color: var(--muted-foreground); }
.se-side { align-self: start; position: sticky; top: 92px; display: grid; gap: 10px; padding: 18px; border-radius: 20px; background: var(--card); }
.se-side h3 { font-size: 13.5px; } .se-side ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 7px; }
.se-side li { display: grid; grid-template-columns: 7px auto 1fr; align-items: center; gap: 8px; font-size: 12.5px; } .se-side li b { font-weight: 500; } .se-side li em { font-style: normal; color: var(--muted-foreground); text-align: right; font-size: 11.5px; }
.se-side a { color: var(--primary); } .se-save { margin: 4px 0 0; } .se-save .i { display: inline-flex; } .se-save svg { width: 14px; height: 14px; }
/* Pages */
.se-page { width: 100%; max-width: 900px; margin: 0 auto; padding: 32px 24px 64px; display: grid; gap: 18px; align-content: start; flex: 1; } .se-page.narrow { max-width: 620px; }
.se-page h1 { font-size: 30px; letter-spacing: -0.03em; } .se-page .lede { color: var(--muted-foreground); font-size: 15px; max-width: 700px; }
.se-card { background: var(--card); border-radius: 22px; padding: 20px 22px; display: grid; gap: 12px; } .se-card h2 { font-size: 16px; }
.se-table { width: 100%; border-collapse: collapse; font-size: 13.5px; } .se-table th { text-align: left; font-weight: 500; font-size: 12.5px; color: var(--muted-foreground); padding: 8px 10px; }
.se-table td { padding: 10px; border-top: 1px solid color-mix(in oklab, var(--border) 60%, transparent); vertical-align: top; } .se-table.params td:first-child { width: 110px; } .se-table form { margin: 0; }
.se-state { font-size: 12.5px; } .se-state.st-healthy { color: #15803d; } .se-state.st-resting { color: #b45309; } .se-state.st-not_configured { color: var(--muted-foreground); }
.se-prose { display: grid; gap: 8px; max-width: 720px; } .se-prose h2 { font-size: 16px; margin-top: 10px; } .se-prose p { color: color-mix(in oklab, var(--foreground) 85%, transparent); line-height: 1.6; }
.se-code { margin: 0; padding: 14px 16px; border-radius: 14px; background: var(--background); font: 12.5px/1.55 var(--mono); overflow-x: auto; white-space: pre; }
.se-inline { display: flex; gap: 8px; margin: 4px 0 0; } .se-inline .input { flex: 1; min-width: 0; }
.se-newkey { display: grid; gap: 8px; padding: 16px 18px; border-radius: 18px; background: color-mix(in oklab, #16a34a 10%, var(--card)); } .se-newkey p { font-size: 13px; color: var(--muted-foreground); } .se-newkey .input { font-family: var(--mono); }
.se-actions { display: flex; flex-wrap: wrap; gap: 8px; } .se-actions form { margin: 0; }
.se-hist { list-style: none; margin: 0; padding: 0; display: grid; } .se-hist li { display: flex; align-items: center; gap: 8px; padding: 2px 0; } .se-hist form { margin: 0; }
.se-hist a { flex: 1; min-width: 0; display: flex; align-items: center; gap: 10px; padding: 7px 8px; border-radius: 10px; font-size: 14px; } .se-hist a:hover { background: var(--background); }
.se-hist a span { display: inline-flex; color: var(--muted-foreground); } .se-hist svg { width: 15px; height: 15px; } .se-hist em { font-style: normal; font-size: 12px; color: var(--muted-foreground); margin-left: auto; }
.se-day { font-size: 12.5px; font-weight: 500; color: var(--muted-foreground); margin: 10px 0 2px 8px; }
.se-prefs { gap: 4px; } .se-pref-row { display: flex; align-items: center; gap: 14px; padding: 12px 0; border-bottom: 1px solid color-mix(in oklab, var(--border) 60%, transparent); cursor: pointer; }
.se-pref-row > span:first-child { flex: 1; display: grid; } .se-pref-row b { font-size: 14px; font-weight: 500; } .se-pref-row em { font-style: normal; font-size: 12.5px; color: var(--muted-foreground); } .se-prefs .btn { justify-self: start; margin-top: 12px; }
.se-foot { display: flex; flex-wrap: wrap; gap: 6px 18px; padding: 18px 28px; font-size: 12.5px; color: var(--muted-foreground); border-top: 1px solid color-mix(in oklab, var(--border) 70%, transparent); } .se-foot a:hover { color: var(--foreground); } .se-foot span { flex-basis: 100%; }
@media (max-width: 1100px) { .se-main { grid-template-columns: minmax(0, 1fr); padding-left: 28px; } .se-bar { padding-left: 28px; } .se-side { position: static; order: 2; } }
@media (max-width: 700px) {
  .se-top { flex-wrap: wrap; padding: 10px 16px; gap: 10px; } .se-top:not(.home) .se-box { order: 3; flex-basis: 100%; max-width: none; } .se-links { gap: 12px; } .se-links > a:not(.btn):not(.se-pref) { display: none; }
  .se-logo { font-size: 42px; } .se-bar, .se-main { padding-left: 16px; padding-right: 16px; } .se-main { gap: 24px; } .se-r h3 { font-size: 17px; } .se-thumb { width: 88px; height: 56px; }
  .se-images { grid-template-columns: repeat(2, minmax(0, 1fr)); } .se-filters { margin-left: 0; } .se-page { padding: 20px 16px 48px; } .se-table { font-size: 12.5px; } .se-foot { padding: 16px; }
}

/* ── Mercestack Search: the logo, and motion ─────────────────────────────── */
@property --se-a { syntax: "<angle>"; initial-value: 0deg; inherits: false; }
.se-logo-sm { display: inline-flex; align-items: center; flex: none; height: 38px; }
.se-logo-sm img { height: 38px; width: auto; display: block; transform-origin: 50% 30%; }
.se-logo-sm:hover img { animation: se-wiggle .9s var(--ease); }
.se-app[data-theme="dark"] .se-logo-sm img, .se-app[data-theme="dark"] .se-mark img { filter: invert(1); }
/* Home: a drifting dot grid behind everything. */
.se-home { position: relative; isolation: isolate; overflow: hidden; }
.se-grid { position: absolute; inset: -40px; z-index: -1; pointer-events: none;
  background-image: radial-gradient(color-mix(in oklab, var(--foreground) 13%, transparent) 1px, transparent 1.4px); background-size: 26px 26px;
  -webkit-mask-image: radial-gradient(ellipse 60% 55% at 50% 42%, #000 20%, transparent 75%); mask-image: radial-gradient(ellipse 60% 55% at 50% 42%, #000 20%, transparent 75%);
  animation: se-drift 40s linear infinite; }
/* The logo, as two pieces of one image. */
.se-brand { margin: 0 0 4px; }
.se-mark { position: relative; display: block; width: min(300px, 70vw); aspect-ratio: 821 / 438; }
.se-mark img { position: absolute; inset: 0; width: 100%; height: 100%; }
.se-mark .wave { clip-path: inset(0 0 56% 0); transform-origin: 50% 28%; animation: se-wave-in .9s var(--ease) both, se-wave 6s ease-in-out 1s infinite; }
.se-mark .word { clip-path: inset(45% 8.6% 0 0); animation: se-rise .8s var(--ease) .25s both; }
.se-mark .stop { clip-path: inset(60% 1% 20% 91.4%); transform-origin: 95% 72%; animation: se-dot-in .7s cubic-bezier(.34, 1.56, .64, 1) .75s both, se-bounce 3.2s cubic-bezier(.45, 0, .2, 1) 1.6s infinite; }
/* A sweep of light across the logo every few seconds. */
.se-mark .shine { position: absolute; inset: 0; pointer-events: none; -webkit-mask: url(/assets/logo.png) center / 100% 100% no-repeat; mask: url(/assets/logo.png) center / 100% 100% no-repeat;
  background: linear-gradient(105deg, transparent 38%, color-mix(in oklab, var(--primary) 85%, #fff) 48%, #f59e0b 52%, transparent 62%) -160% 0 / 250% 100% no-repeat; animation: se-shine 5.5s ease-in-out 1.4s infinite; }
.se-tag span { display: inline-block; animation: se-rise .6s var(--ease) both; } .se-tag span:nth-child(1) { animation-delay: .45s; } .se-tag span:nth-child(2) { animation-delay: .55s; } .se-tag span:nth-child(3) { animation-delay: .65s; }
.se-home > .se-box { animation: se-rise .7s var(--ease) .7s both; }
.se-home-cats a { animation: se-rise .5s var(--ease) both; } .se-home-cats a:nth-child(1) { animation-delay: .85s; } .se-home-cats a:nth-child(2) { animation-delay: .9s; } .se-home-cats a:nth-child(3) { animation-delay: .95s; } .se-home-cats a:nth-child(4) { animation-delay: 1s; } .se-home-cats a:nth-child(5) { animation-delay: 1.05s; } .se-home-cats a:nth-child(6) { animation-delay: 1.1s; } .se-home-cats a:nth-child(7) { animation-delay: 1.15s; }
.se-recent, .se-tips { animation: se-fade .8s ease 1.2s both; }
/* The big box: a slowly turning ring of colour, brighter while you type. */
.se-box.big { isolation: isolate; box-shadow: 0 10px 34px -22px rgb(20 18 18 / .45); }
.se-box.big::before { content: ""; position: absolute; inset: -1.5px; border-radius: inherit; z-index: -1; padding: 1.5px;
  background: conic-gradient(from var(--se-a), var(--border) 0deg, var(--primary) 70deg, #f59e0b 110deg, var(--border) 160deg, var(--border) 360deg);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor; mask: linear-gradient(#000 0 0) content-box exclude, linear-gradient(#000 0 0);
  animation: se-turn 6s linear infinite; opacity: .55; transition: opacity .3s; }
.se-box.big:focus-within::before { opacity: 1; animation-duration: 2.4s; }
.se-box.big::after { content: ""; position: absolute; inset: 0; border-radius: inherit; z-index: -2; background: var(--card); }
.se-box.big, .se-box.big:focus-within { box-shadow: 0 10px 34px -22px rgb(20 18 18 / .45); }
.se-go { transition: transform .2s var(--ease); } .se-go:hover { transform: translateX(2px) scale(1.06); }
/* The sources, scrolling past under the box. */
.se-marquee { width: min(560px, 92vw); overflow: hidden; margin-top: 6px; -webkit-mask-image: linear-gradient(90deg, transparent, #000 14%, #000 86%, transparent); mask-image: linear-gradient(90deg, transparent, #000 14%, #000 86%, transparent); animation: se-fade .8s ease 1s both; }
.se-marquee .track { display: flex; width: max-content; animation: se-scroll 38s linear infinite; } .se-marquee:hover .track { animation-play-state: paused; }
.se-marquee .set { display: flex; gap: 22px; padding-right: 22px; }
.se-marquee .src { display: inline-flex; align-items: center; gap: 7px; font-size: 12.5px; color: var(--muted-foreground); white-space: nowrap; }
.se-marquee .src i { width: 6px; height: 6px; border-radius: 99px; background: #16a34a; box-shadow: 0 0 0 0 rgb(22 163 74 / .5); animation: se-ping 2.4s ease-out infinite; }
.se-marquee .src:nth-child(3n+1) i { animation-delay: .8s; } .se-marquee .src:nth-child(3n+2) i { animation-delay: 1.6s; }
.se-suggest:not([hidden]) { animation: se-drop .18s var(--ease); }
/* Results: arriving one after another; sources lighting up. */
.se-results > .se-r, .se-images > .se-img { animation: se-rise .5s var(--ease) both; }
.se-results > .se-r:nth-child(1) { animation-delay: .04s; } .se-results > .se-r:nth-child(2) { animation-delay: .08s; } .se-results > .se-r:nth-child(3) { animation-delay: .12s; } .se-results > .se-r:nth-child(4) { animation-delay: .16s; }
.se-results > .se-r:nth-child(5) { animation-delay: .2s; } .se-results > .se-r:nth-child(6) { animation-delay: .24s; } .se-results > .se-r:nth-child(7) { animation-delay: .28s; } .se-results > .se-r:nth-child(n+8) { animation-delay: .32s; }
.se-images > .se-img:nth-child(n+4) { animation-delay: .1s; } .se-images > .se-img:nth-child(n+8) { animation-delay: .2s; }
.se-sources a { animation: se-fade .35s ease both; } .se-sources a:nth-child(2) { animation-delay: .05s; } .se-sources a:nth-child(3) { animation-delay: .1s; } .se-sources a:nth-child(4) { animation-delay: .15s; } .se-sources a:nth-child(5) { animation-delay: .2s; } .se-sources a:nth-child(n+6) { animation-delay: .25s; }
.se-sources .st-success .d, .se-side .st-success .d { animation: se-ping 1.6s ease-out .3s 2; }
.se-r h3 a { background-image: linear-gradient(currentColor, currentColor); background-size: 0 1px; background-repeat: no-repeat; background-position: 0 100%; transition: background-size .3s var(--ease); }
.se-r h3 a:hover { text-decoration: none; background-size: 100% 1px; }
.se-fav { transition: transform .25s var(--ease); } .se-r:hover .se-fav { transform: rotate(-8deg) scale(1.08); }
.se-img img { transition: transform .4s var(--ease); } .se-img:hover img { transform: scale(1.03); }
.se-side { animation: se-fade .6s ease .2s both; }
@keyframes se-rise { from { opacity: 0; transform: translateY(12px); } }
@keyframes se-fade { from { opacity: 0; } }
@keyframes se-drop { from { opacity: 0; transform: translateY(-4px); } }
@keyframes se-turn { to { --se-a: 360deg; } }
@keyframes se-scroll { to { transform: translateX(-50%); } }
@keyframes se-drift { to { background-position: 26px 52px; } }
@keyframes se-ping { 0% { box-shadow: 0 0 0 0 rgb(22 163 74 / .55); } 80%, 100% { box-shadow: 0 0 0 7px rgb(22 163 74 / 0); } }
@keyframes se-wave-in { from { opacity: 0; transform: translateX(-30px) skewX(-8deg); } }
@keyframes se-wave { 0%, 100% { transform: translateY(0) skewY(0deg) scaleX(1); } 25% { transform: translateY(-7px) skewY(-3.5deg) scaleX(1.02); } 50% { transform: translateY(0) skewY(0deg) scaleX(1); } 75% { transform: translateY(5px) skewY(3deg) scaleX(.985); } }
@keyframes se-dot-in { from { opacity: 0; transform: translateY(-60px) scale(.4); } }
@keyframes se-bounce { 0%, 60%, 100% { transform: translateY(0) scale(1); } 70% { transform: translateY(-14px) scale(1.05, .95); } 80% { transform: translateY(0) scale(1.12, .86); } 88% { transform: translateY(-4px) scale(.98, 1.02); } }
@keyframes se-shine { 0%, 55% { background-position: 160% 0; } 100% { background-position: -160% 0; } }
@keyframes se-wiggle { 0%, 100% { transform: none; } 30% { transform: rotate(-4deg); } 60% { transform: rotate(3deg); } }
@media (prefers-reduced-motion: reduce) {
  .se-app *, .se-app *::before, .se-app *::after { animation: none !important; transition: none !important; }
}

/* ── Mercestack Search: colour and blur in the background ───────────────── */
.se-app { position: relative; isolation: isolate; }
.se-aura { position: fixed; inset: 0; z-index: -1; pointer-events: none; overflow: hidden; }
.se-aura i { position: absolute; width: 46vmax; height: 46vmax; border-radius: 50%; filter: blur(110px); opacity: .16; mix-blend-mode: multiply; animation: se-float 26s ease-in-out infinite alternate; }
.se-aura i:nth-child(1) { left: -12vmax; top: -16vmax; background: #ff8fab; }
.se-aura i:nth-child(2) { right: -14vmax; top: -10vmax; background: #a5b4fc; animation-duration: 32s; animation-delay: -8s; }
.se-aura i:nth-child(3) { left: 18vmax; bottom: -26vmax; background: #fcd34d; opacity: .13; animation-duration: 38s; animation-delay: -16s; }
.se-aura i:nth-child(4) { right: 6vmax; bottom: -22vmax; background: #5eead4; opacity: .11; animation-duration: 30s; animation-delay: -4s; }
.se-app[data-home="0"] .se-aura i { opacity: .07; }
.se-app[data-theme="dark"] .se-aura i { mix-blend-mode: screen; opacity: .1; }
.se-app[data-theme="dark"][data-home="0"] .se-aura i { opacity: .05; }
.se-app[data-theme="dark"] .se-aura i:nth-child(1) { background: #d92d55; } .se-app[data-theme="dark"] .se-aura i:nth-child(2) { background: #6366f1; } .se-app[data-theme="dark"] .se-aura i:nth-child(3) { background: #f59e0b; } .se-app[data-theme="dark"] .se-aura i:nth-child(4) { background: #14b8a6; }
@keyframes se-float { 0% { transform: translate(0, 0) scale(1); } 33% { transform: translate(6vmax, 4vmax) scale(1.12); } 66% { transform: translate(-4vmax, 7vmax) scale(.92); } 100% { transform: translate(3vmax, -3vmax) scale(1.05); } }
/* Frosted: the top bar, the box, the side panel and cards over the colour. */
.se-app { background: transparent; }
:root:has(.se-app) body { background: var(--background); }
.se-top:not(.home) { background: color-mix(in oklab, var(--background) 62%, transparent); -webkit-backdrop-filter: blur(18px) saturate(1.4); backdrop-filter: blur(18px) saturate(1.4); }
.se-box, .se-box.big::after { background: color-mix(in oklab, var(--card) 78%, transparent); -webkit-backdrop-filter: blur(16px) saturate(1.3); backdrop-filter: blur(16px) saturate(1.3); }
.se-side, .se-card, .se-related a, .se-recent a, .se-r.k-answer, .se-home-cats a { background: color-mix(in oklab, var(--card) 70%, transparent); -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px); }
.se-bar, .se-foot { background: color-mix(in oklab, var(--background) 45%, transparent); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); }
.se-grid { opacity: .7; }
/* The word at the top right. */
.se-word { font-weight: 800; font-size: 15px; letter-spacing: -0.02em; background: linear-gradient(90deg, var(--primary), #f59e0b, #8b5cf6, var(--primary)) 0 0 / 300% 100%; -webkit-background-clip: text; background-clip: text; color: transparent !important; animation: se-hue 8s linear infinite; }
@keyframes se-hue { to { background-position: 300% 0; } }
@media (max-width: 700px) { .se-aura i { filter: blur(60px); } }
.se-home-link { display: inline-flex; align-items: center; gap: 10px; flex: none; }
.se-top.home .se-home-link .se-word { font-size: 18px; }
/* The logo stays still; the name is plain. */
.se-mark img { animation: none !important; clip-path: none !important; }
.se-logo-sm:hover img { animation: none; }
.se-word { background: none !important; -webkit-background-clip: border-box; background-clip: border-box; color: var(--foreground) !important; animation: none !important; }

/* ── Mercestack Search on phones and tablets ───────────────────────────── */
.se-page { grid-template-columns: minmax(0, 1fr); min-width: 0; }
.se-page > *, .se-card > * { min-width: 0; }
.se-card .se-table, .se-page > .se-table { display: table; }
.se-code { max-width: 100%; }
@media (hover: none), (max-width: 700px) { .se-slash { display: none; } }
@media (max-width: 700px) {
  /* Top bar: logo and name, then the box on its own row. */
  .se-top { padding: 10px 14px 12px; gap: 10px; }
  .se-logo-sm, .se-logo-sm img { height: 30px; }
  .se-home-link { gap: 8px; } .se-home-link .se-word { font-size: 16px; }
  .se-top:not(.home) .se-home-link .se-word { display: none; }
  .se-links { gap: 8px; } .se-links .btn { padding: 0 12px; height: 34px; }
  .se-box { height: 46px; padding-left: 14px; } .se-box input[name=q] { font-size: 16px; }
  /* Home */
  .se-home { gap: 12px; padding: 0 16px 10vh; align-content: start; padding-top: 7vh; }
  .se-mark { width: min(210px, 58vw); }
  .se-tag { font-size: 14px; } .se-tag span { display: inline; }
  .se-box.big { height: 52px; }
  .se-marquee { width: 100%; }
  .se-home-cats { gap: 6px; } .se-home-cats a { padding: 7px 13px; }
  .se-tips { display: none; }
  .se-recent { margin-top: 10px; }
  /* Results: tabs and the source strip scroll sideways; one row each. */
  .se-bar { padding: 0 6px 0 14px; gap: 0; flex-wrap: nowrap; }
  .se-tabs { flex: 1; min-width: 0; } .se-tabs a { padding: 12px 10px 11px; }
  .se-filters { flex: none; margin-left: auto; } .se-filters select { max-width: 104px; }
  .se-main { padding: 14px 14px 48px; gap: 20px; }
  .se-sources { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; margin: 0 -14px; padding: 2px 14px; -webkit-mask-image: linear-gradient(90deg, #000 88%, transparent); mask-image: linear-gradient(90deg, #000 88%, transparent); }
  .se-sources::-webkit-scrollbar { display: none; } .se-sources a { flex: none; }
  .se-results { gap: 22px; }
  .se-r-site b { font-size: 13px; } .se-r h3 { font-size: 17.5px; } .se-snip { font-size: 14px; }
  .se-meta { gap: 2px 10px; }
  .se-r.k-answer { padding: 14px; }
  .se-thumb { width: 84px; height: 56px; }
  .se-related div { grid-template-columns: 1fr; }
  .se-side { padding: 16px; }
  .se-pager { justify-content: space-between; }
  /* Pages: tables become stacked rows. */
  .se-page { padding: 18px 14px 44px; gap: 14px; } .se-page h1 { font-size: 26px; } .se-page .lede { font-size: 14.5px; }
  .se-card { padding: 16px; border-radius: 18px; }
  .se-table, .se-table tbody, .se-table tr, .se-table td { display: block; width: 100%; }
  .se-table thead { display: none; }
  .se-table tr { padding: 10px 0; border-top: 1px solid color-mix(in oklab, var(--border) 60%, transparent); }
  .se-table td { border: 0; padding: 2px 0; }
  .se-table td:first-child { font-size: 14.5px; }
  .se-table.params td:first-child { width: 100%; }
  .se-inline { flex-direction: column; } .se-inline .btn { width: 100%; }
  .se-actions .btn { flex: 1; }
  .se-hist em { display: none; }
  .se-foot { padding: 14px; gap: 6px 14px; }
}
@media (min-width: 701px) and (max-width: 1100px) {
  .se-top { padding: 12px 20px; } .se-bar, .se-main { padding-left: 20px; padding-right: 20px; }
  .se-main { grid-template-columns: minmax(0, 1fr); max-width: 760px; }
}
@media (max-width: 700px) {
  .se-table td[data-label] { display: flex; gap: 8px; font-size: 13px; }
  .se-table td[data-label]::before { content: attr(data-label); flex: 0 0 92px; color: var(--muted-foreground); }
}
