/* Ghost web (sign-up wizard + management portal). Visual language: restrained, monochrome, light type, hairline borders, black
   primary buttons (in the spirit of scale.com; our own fonts and marks). Figtree is served locally; no external requests, no inline styles (strict CSP). */
@font-face { font-family: 'Figtree'; font-weight: 400; font-style: normal; font-display: swap; src: url('/ghost/assets/fonts/Figtree-400.woff2') format('woff2'); }
@font-face { font-family: 'Figtree'; font-weight: 600; font-style: normal; font-display: swap; src: url('/ghost/assets/fonts/Figtree-600.woff2') format('woff2'); }

:root, :root[data-theme='dark'] {
  color-scheme: dark;
  --bg: #000000; --surface: #0a0a0a; --surface-2: #141414; --line: #262626; --line-strong: #6a6a6a;
  --fg: #ffffff; --muted: #a3a3a3; --accent: #ededed; --on-accent: #000000; --accent-hover: #d4d4d4; --accent-soft: #1c1c1c; --brand: #7cf3e1;
  --err: #ffb4a8; --err-soft: #2a1310; --warn: #ffd479; --warn-soft: #2a2108; --ok: #7ee2b8; --ok-soft: #0c2a1f; --info: #a9c8ff; --info-soft: #101c33;
  --risk-read: #9fe8c8; --risk-local: #a9c8ff; --risk-external: #ffd479; --risk-spend: #ffb870; --risk-destructive: #ffb4a8; --risk-credentials: #d9b8ff;
  --shadow: none; --pop: 0 12px 40px rgba(0,0,0,.6);
}
:root[data-theme='light'] {
  color-scheme: light;
  --bg: #ffffff; --surface: #ffffff; --surface-2: #f5f5f4; --line: #e5e5e3; --line-strong: #92928e;
  --fg: #000000; --muted: #595955; --accent: #0a0a0a; --on-accent: #ffffff; --accent-hover: #3a3a38; --accent-soft: #f0f0ee; --brand: #0b6b5a;
  --err: #a02617; --err-soft: #fdeceA; --warn: #6e4a00; --warn-soft: #fff4d6; --ok: #0b6b3a; --ok-soft: #e3f4ea; --info: #1d4ba0; --info-soft: #e5eefc;
  --risk-read: #0b6a4a; --risk-local: #1d4ba0; --risk-external: #7a5200; --risk-spend: #8a3d00; --risk-destructive: #a02617; --risk-credentials: #5d2e9e;
  --shadow: none; --pop: 0 12px 40px rgba(0,0,0,.14);
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--fg);
  font-family: 'Figtree', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif; font-size: 16px; line-height: 1.55;
  -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
}
h1, h2, h3, h4 { font-weight: 600; line-height: 1.2; margin: 0 0 12px; letter-spacing: -.01em; }
h1 { font-size: clamp(30px, 4.6vw, 44px); font-weight: 400; letter-spacing: -.03em; line-height: 1.08; }
h2 { font-size: clamp(18px, 2.4vw, 22px); }
h3 { font-size: 17px; }
p { margin: 0 0 14px; }
a { color: var(--fg); text-decoration-color: var(--line-strong); text-underline-offset: 3px; }
a:hover { text-decoration-color: currentColor; }
code, .mono { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: .92em; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 4px; }
:focus:not(:focus-visible) { outline: none; }
[tabindex='-1']:focus { outline: none; }
.sr-only { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
.skip { position: absolute; left: -999px; top: 8px; background: var(--accent); color: var(--on-accent); padding: 8px 14px; border-radius: 8px; z-index: 100; }
.skip:focus { left: 8px; }
.muted { color: var(--muted); }
.small { font-size: 14px; }
.eyebrow, .stat-label, .step-count { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 12px; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.right { margin-left: auto; }
.hidden { display: none !important; }
.nowrap { white-space: nowrap; }
.break { overflow-wrap: anywhere; }
.stack > * + * { margin-top: 16px; }
.row { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
.row.between { justify-content: space-between; }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 10px 18px; min-height: 44px; border-radius: 8px;
  font: inherit; font-weight: 600; font-size: 15px; line-height: 1.2; text-decoration: none; cursor: pointer;
  border: 1px solid var(--line-strong); background: transparent; color: var(--fg); transition: background-color .12s, border-color .12s;
}
.btn:hover { background: var(--surface-2); border-color: var(--fg); color: var(--fg); }
.btn.primary { background: var(--accent); color: var(--on-accent); border-color: var(--accent); }
.btn.primary:hover { background: var(--accent-hover); border-color: var(--accent-hover); color: var(--on-accent); }
.btn.quiet { border-color: var(--line-strong); color: var(--fg); }
.btn.quiet:hover { background: var(--surface-2); border-color: var(--fg); color: var(--fg); }
.btn.danger { border-color: var(--err); color: var(--err); }
.btn.danger:hover { background: var(--err-soft); border-color: var(--err); color: var(--err); }
.btn.danger.solid { background: var(--err); color: var(--bg); }
.btn.sm { min-height: 36px; padding: 5px 14px; font-size: 14px; }
.btn[disabled], .btn[aria-disabled='true'] { opacity: .5; cursor: not-allowed; }
.linkbtn { background: none; border: 0; padding: 0; font: inherit; color: var(--fg); text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
.iconbtn { background: transparent; border: 1px solid var(--line-strong); color: var(--fg); border-radius: 8px; min-height: 36px; min-width: 40px; padding: 5px 14px; cursor: pointer; font: inherit; font-weight: 600; font-size: 14px; }
.iconbtn:hover { background: var(--surface-2); }

/* Forms */
label, .label { display: block; font-weight: 600; font-size: 15px; margin-bottom: 6px; }
.field { margin-bottom: 18px; }
.hint { color: var(--muted); font-size: 14px; margin: 6px 0 0; }
.field-error { color: var(--err); font-size: 14px; margin: 6px 0 0; font-weight: 600; }
input[type='text'], input[type='email'], input[type='password'], input[type='number'], input[type='search'], input[type='tel'], input[type='url'], input[type='date'], textarea, select {
  width: 100%; padding: 11px 14px; min-height: 44px; font: inherit; color: var(--fg); background: var(--surface);
  border: 1px solid var(--line-strong); border-radius: 8px;
}
input:hover, textarea:hover, select:hover { border-color: var(--fg); }
textarea { min-height: 140px; resize: vertical; }
input[aria-invalid='true'], textarea[aria-invalid='true'] { border-color: var(--err); border-width: 2px; }
input[disabled], textarea[disabled], select[disabled] { opacity: .7; cursor: not-allowed; }
input::placeholder, textarea::placeholder { color: var(--muted); opacity: 1; }
select { appearance: none; padding-right: 38px; background-image: linear-gradient(45deg, transparent 50%, currentColor 50%), linear-gradient(135deg, currentColor 50%, transparent 50%); background-position: calc(100% - 20px) 50%, calc(100% - 15px) 50%; background-size: 5px 5px; background-repeat: no-repeat; }
td select { padding-top: 8px; padding-bottom: 8px; min-height: 40px; }
.check { display: flex; align-items: flex-start; gap: 10px; font-weight: 400; margin: 0 0 10px; cursor: pointer; }
.check input { width: 20px; height: 20px; margin: 1px 0 0; flex: none; accent-color: var(--accent); }
.check input[type='checkbox'] { appearance: none; display: inline-grid; place-content: center; border: 1px solid var(--line-strong); border-radius: 5px; background: var(--surface); cursor: pointer; }
.check input[type='checkbox']:hover { border-color: var(--fg); }
.check input[type='checkbox']:checked { background: var(--accent); border-color: var(--accent); }
.check input[type='checkbox']:checked::after { content: ''; width: 10px; height: 5px; border: 2px solid var(--on-accent); border-top: 0; border-right: 0; transform: rotate(-45deg) translate(1px, -1px); }
.check input[type='checkbox']:disabled { opacity: .55; cursor: not-allowed; }
:root[data-theme='dark'] input[type='date']::-webkit-calendar-picker-indicator, :root:not([data-theme]) input[type='date']::-webkit-calendar-picker-indicator { filter: invert(1); }
.main .field > select, .main .field > input[type='date'] { max-width: 360px; }
fieldset { border: 0; margin: 0 0 18px; padding: 0; min-width: 0; }
legend { font-weight: 600; padding: 0; margin-bottom: 8px; }
.inline-field { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.inline-field input { width: 130px; }
.input-prefix { display: flex; align-items: center; gap: 8px; }
.input-prefix span { color: var(--muted); }

/* Cards, banners, badges */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 24px; }
.card > :last-child { margin-bottom: 0; }
.card h2, .card h3 { margin-bottom: 8px; }
/* Card grids use FIXED columns (3 on desktop, 2 on tablet, 1 on phone) so every card is the same width wherever it appears; a card left alone on the
   last row simply stays one column wide (no stretching). */
.cards { display: grid; gap: 16px; grid-template-columns: repeat(3, minmax(0, 1fr)); }
@media (max-width: 1100px) { .cards { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 620px) { .cards { grid-template-columns: minmax(0, 1fr); } }
/* Integrations cards are compact: tighter padding and type, no empty lines, four across on a wide screen */
.cards.compact { gap: 12px; }
.cards.compact > .card { padding: 14px 16px; }
.cards.compact .card-head > h2 { font-size: 17px; }
.cards.compact .card-head > .badge { font-size: 11.5px; padding: 1px 8px; }
.cards.compact > .card > p { margin-bottom: 8px; }
.cards.compact > .card .muted { font-size: 14px; line-height: 1.45; }
.cards.compact .integ-detail { font-size: 13px; }
.cards.compact .integ-detail:empty { display: none; }
.cards.compact .hint { font-size: 13px; margin-top: 4px; }
.cards.compact .btn.sm { min-height: 34px; padding: 5px 12px; font-size: 13.5px; }
@media (min-width: 1560px) { .cards.compact { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
/* Card header: the name on the left, the status badge always top-right on the same line (it never drops below a long name) */
.card-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; flex-wrap: nowrap; }
.card-head > h2, .card-head > h3 { margin: 0; min-width: 0; overflow-wrap: break-word; font-size: 19px; }
.card-head > .badge { flex: none; margin-top: 1px; font-size: 12px; padding: 2px 9px; }
.cards > .card:not(.stack) { display: flex; flex-direction: column; }
.cards > .card:not(.stack) > p.small:last-child { margin-top: auto; padding-top: 12px; margin-bottom: 0; }
/* Overview: every card is the same size and has the same anatomy (label, value, one muted line, link at the bottom edge) */
.overview-cards { grid-auto-rows: 1fr; }
.overview-cards > .card { min-height: 188px; }
.overview-cards .stat-sub { margin: 0 0 12px; min-height: 1.4em; }
.overview-cards .stat-value { min-height: 34px; display: flex; align-items: center; }
.overview-cards .stat-value.text { font-size: 22px; line-height: 1.2; }
.overview-cards .reach { display: grid; gap: 8px; margin: 0 0 12px; }
.overview-cards .reach-row { display: grid; grid-template-columns: 84px minmax(0, 1fr); gap: 12px; font-size: 14px; line-height: 1.4; }
.overview-cards .reach-k { color: var(--muted); }
.overview-cards .reach-v { overflow-wrap: break-word; }                      /* an address wraps after the @, never in the middle of a word */

.stat-label { margin: 0 0 8px; }
.stat-value.text { font-size: 22px; letter-spacing: -.01em; }
.stat-value { text-wrap: balance; font-size: 30px; font-weight: 400; letter-spacing: -.02em; line-height: 1.15; margin: 0 0 4px; overflow-wrap: anywhere; }
.banner { border-radius: 12px; padding: 16px 20px; border: 1px solid var(--line); margin-bottom: 16px; background: var(--surface-2); }
.banner > :last-child { margin-bottom: 0; }
.banner.err { border-color: var(--err); background: var(--err-soft); }
.banner strong:first-child { display: block; margin-bottom: 8px; }
.banner.warn strong:first-child::before, .banner.info strong:first-child::before, .banner.ok strong:first-child::before, .banner.err strong:first-child::before {
  content: ''; display: inline-block; width: 8px; height: 8px; border-radius: 50%; margin-right: 10px; vertical-align: 1px; background: var(--line-strong); }
.banner.warn strong:first-child::before { background: var(--warn); }
.banner.info strong:first-child::before { background: var(--info); }
.banner.ok strong:first-child::before { background: var(--ok); }
.banner.err strong:first-child::before { background: var(--err); }
.badge { display: inline-flex; align-items: center; gap: 6px; padding: 2px 10px; border-radius: 999px; font-size: 13px; font-weight: 600; border: 1px solid color-mix(in srgb, currentColor 40%, transparent); white-space: nowrap; line-height: 1.5; }
.badge::before { content: ''; width: 8px; height: 8px; border-radius: 50%; background: currentColor; }
.badge.ok { color: var(--ok); } .badge.warn { color: var(--warn); } .badge.err { color: var(--err); } .badge.info { color: var(--info); } .badge.plain { color: var(--muted); }
.badge.risk-read { color: var(--risk-read); } .badge.risk-local_write { color: var(--risk-local); } .badge.risk-external_write { color: var(--risk-external); }
.badge.risk-spend { color: var(--risk-spend); } .badge.risk-destructive { color: var(--risk-destructive); } .badge.risk-credentials { color: var(--risk-credentials); }
.badge.risk-read, .badge.risk-local_write { color: var(--muted); }
.badge.risk-read::before, .badge.risk-local_write::before { display: none; }
.badge.risk-spend::before, .badge.risk-external_write::before { border-radius: 2px; transform: rotate(45deg); }
.badge.risk-destructive::before { border-radius: 0; clip-path: polygon(50% 0, 100% 100%, 0 100%); }
.pill { display: inline-block; margin-left: 8px; padding: 1px 10px; border-radius: 999px; background: var(--surface-2); border: 1px solid var(--line); font-size: 13px; color: var(--muted); }

/* Tables */
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: 12px; }
table { border-collapse: collapse; width: 100%; font-size: 15px; }
th, td { text-align: left; padding: 14px 18px; border-bottom: 1px solid var(--line); vertical-align: middle; }
th { font-weight: 400; font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); font-size: 12px; background: transparent; border-bottom: 1px solid var(--line-strong); white-space: nowrap; }
tr:last-child td { border-bottom: 0; }
td.num, th.num { text-align: right; font-variant-numeric: tabular-nums; }

/* Toasts */
.toasts { position: fixed; left: 12px; right: 12px; bottom: 12px; z-index: 60; display: grid; gap: 8px; justify-items: center; pointer-events: none; }
.toast { pointer-events: auto; max-width: 560px; width: 100%; padding: 12px 16px; border-radius: 12px; border: 1px solid var(--line-strong); background: var(--surface-2); color: var(--fg); box-shadow: var(--pop); display: flex; gap: 12px; align-items: flex-start; }
.toast.err { border-color: var(--err); background: var(--err-soft); }
.toast.ok { border-color: var(--ok); background: var(--ok-soft); }
.toast button { margin-left: auto; background: none; border: 0; color: inherit; font: inherit; cursor: pointer; text-decoration: underline; }

/* Dialog */
dialog { border: 1px solid var(--line); box-shadow: var(--pop); border-radius: 12px; background: var(--surface); color: var(--fg); padding: 24px; max-width: min(520px, calc(100vw - 24px)); width: 100%; }
dialog::backdrop { background: rgba(0,0,0,.55); }
dialog h2 { font-size: 22px; }
dialog .actions { display: flex; gap: 12px; justify-content: flex-end; flex-wrap: wrap; margin-top: 20px; }
/* the embedded login window (Integrations > Sign in / Open browser): Ghost's own browser inside the page */
dialog.login-window { width: min(1180px, 96vw); max-width: none; height: min(900px, 94vh); max-height: none; padding: 16px 20px; flex-direction: column; gap: 10px; }
dialog.login-window[open] { display: flex; }
dialog.login-window .login-head h2 { margin: 0 0 4px; }
dialog.login-window .login-head p { margin: 0; }
dialog.login-window .login-frame { flex: 1 1 auto; width: 100%; min-height: 320px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); }
dialog.login-window .actions { margin-top: 0; }
@media (max-width: 640px) { dialog.login-window { width: 100vw; height: 100vh; border-radius: 0; padding: 10px; } }

/* Public pages (start, welcome) */
.public-top { display: flex; justify-content: space-between; align-items: center; padding: 18px 0; gap: 12px; }
.logo { display: inline-block; flex: none; width: 96px; height: 26px; font-size: 0; line-height: 0; color: transparent; overflow: hidden; text-decoration: none; white-space: nowrap; background: var(--logo-img) left center / contain no-repeat; }  /* official brochure lockup; the text stays in the DOM for screen readers */
/* brochure lockup: white on the dark theme, ink on the light theme (assets/img/ghost-logo-*.svg are extracted from the official brochure) */
:root, :root[data-theme='dark'] { --logo-img: url('/ghost/assets/img/ghost-logo-dark.svg'); }
:root[data-theme='light'] { --logo-img: url('/ghost/assets/img/ghost-logo-light.svg'); }
.logo:hover { color: transparent; opacity: .85; }
.wrap { max-width: 720px; margin: 0 auto; padding: 0 18px 60px; }
.wrap.wide { max-width: 1100px; }
.stepper { list-style: none; display: flex; gap: 6px; padding: 0; margin: 4px 0 26px; }
.stepper li { flex: 1; height: 4px; border-radius: 2px; background: var(--line); position: relative; }
.stepper li.done, .stepper li.current { background: var(--accent); }
.step-count { margin: 0 0 8px; }
.wizard-nav { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 26px; }
.wizard-nav .btn.primary { flex: 1 1 180px; }
.price-box { border: 1px solid var(--line-strong); border-radius: 12px; padding: 18px 22px; background: var(--surface-2); }
.price-box .big { font-size: 32px; font-weight: 400; letter-spacing: -.02em; margin: 0; }
.stepper-num { display: flex; align-items: center; gap: 10px; }
.stepper-num input { width: 90px; height: 48px; min-height: 48px; text-align: center; font-size: 20px; padding-top: 0; padding-bottom: 0; }
.stepper-num .iconbtn { font-size: 22px; width: 48px; height: 48px; min-height: 48px; padding: 0; display: inline-grid; place-items: center; }
.chips { display: flex; flex-wrap: wrap; gap: 10px; }
.chip { position: relative; }
.chip input { position: absolute; opacity: 0; inset: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; }
.chip span { display: inline-block; padding: 9px 16px; border: 1px solid var(--line-strong); border-radius: 999px; font-weight: 400; font-size: 15px; }
.chip input:checked + span { background: var(--accent); border-color: var(--accent); color: var(--on-accent); font-weight: 600; }
.chip input:focus-visible + span { outline: 3px solid var(--accent); outline-offset: 2px; }
.guide { counter-reset: g; list-style: none; padding: 0; margin: 0 0 18px; display: grid; gap: 18px; }
.guide li { counter-increment: g; display: grid; gap: 10px; }
.guide li > p::before { content: counter(g) '.'; font-weight: 600; color: var(--muted); margin-right: 8px; }
.guide img { max-width: 100%; height: auto; border-radius: 12px; border: 1px solid var(--line); background: #111; }
.summary { display: grid; grid-template-columns: max-content 1fr auto; gap: 8px 16px; margin: 0 0 18px; align-items: baseline; }
.summary dt { color: var(--muted); }
.summary dd { margin: 0; overflow-wrap: anywhere; }
.phases { list-style: none; padding: 0; margin: 0 0 22px; display: grid; gap: 10px; }
.phases li { display: flex; gap: 12px; align-items: center; color: var(--muted); }
.phases li .dot { width: 22px; height: 22px; border-radius: 50%; border: 2px solid var(--line-strong); flex: none; display: grid; place-items: center; font-size: 13px; }
.phases li.done { color: var(--fg); }
.phases li.done .dot { background: var(--ok); border-color: var(--ok); color: var(--bg); }
.phases li.current { color: var(--fg); font-weight: 600; }
.phases li.current .dot { border-color: var(--accent); }
.phases li.failed { color: var(--err); }
.qr-box { background: #fff; padding: 8px; border-radius: 12px; display: inline-block; line-height: 0; }
.qr-box svg { max-width: 100%; height: auto; width: 240px; }
.spinner { width: 18px; height: 18px; border-radius: 50%; border: 3px solid var(--line-strong); border-top-color: var(--accent); display: inline-block; animation: spin 1s linear infinite; vertical-align: -3px; }
@keyframes spin { to { transform: rotate(360deg); } }

/* Portal shell */
.shell { display: grid; grid-template-columns: 248px 1fr; min-height: 100vh; }
.sidebar { border-right: 1px solid var(--line); padding: 22px 14px 18px; background: var(--bg); position: sticky; top: 0; height: 100vh; overflow-y: auto; display: flex; flex-direction: column; gap: 22px; }
.sidebar .logo { padding: 2px 12px; }
.sidebar nav ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 2px; }
.sidebar nav a { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 9px 12px; border-radius: 8px; color: var(--muted); text-decoration: none; font-weight: 400; font-size: 15px; min-height: 40px; }
.sidebar nav a:hover { background: var(--surface-2); color: var(--fg); }
.sidebar nav a[aria-current='page'] { background: var(--accent-soft); color: var(--fg); font-weight: 600; }
.count { background: var(--accent); color: var(--on-accent); border-radius: 999px; padding: 0 8px; font-size: 12px; font-weight: 600; min-width: 22px; text-align: center; line-height: 20px; }
.who { margin-top: auto; border-top: 1px solid var(--line); padding: 16px 12px 0; font-size: 14px; }
.who .name { font-weight: 600; overflow-wrap: anywhere; }
.who .who-hint { font-size: 13px; margin-top: 2px; }
.main { padding: 44px clamp(24px, 3.5vw, 64px) 120px; min-width: 0; max-width: 1680px; }      /* use the screen: tables and forms were squeezed into 1120px and wrapped emails and numbers */
@media (min-width: 621px) { td.break { white-space: nowrap; } }
.main > header.page-head, .page-head { margin-bottom: 32px; padding-bottom: 28px; border-bottom: 1px solid var(--line); }
.page-head h1 { margin-bottom: 10px; }
.stack > h2, section:not(.card) > h2 { margin-top: 40px; }
.card h2, .card h3, .group h2, .group h3, dialog h2 { margin-top: 0; }
.stack > section:not(.card):first-child > h2 { margin-top: 0; }
form > * + * { margin-top: 16px; }
form > .row:last-child { margin-top: 24px; }
.page-head p { color: var(--muted); max-width: 640px; font-size: 17px; margin: 0; }
.topbar { display: none; }
.view-only { font-size: 14px; }

@media (max-width: 860px) {
  .shell { display: block; }
  .topbar { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 8px 16px; border-bottom: 1px solid var(--line); background: var(--bg); position: sticky; top: 0; z-index: 30; }
  .sidebar { position: static; height: auto; border-right: 0; border-bottom: 1px solid var(--line); display: none; }
  .sidebar.open { display: flex; }
  .sidebar > .logo { display: none; }
  .main { padding: 28px 18px 100px; }
  .page-head { margin-bottom: 24px; padding-bottom: 20px; }
  .summary { grid-template-columns: 1fr; }
  .summary dt { margin-top: 8px; }
}
@media (min-width: 861px) { .menu-toggle { display: none !important; } }

/* Safety screen */
.modes { display: grid; gap: 12px; margin: 0 0 18px; padding: 0; border: 0; }
.mode { position: relative; }
.mode input { position: absolute; opacity: 0; inset: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; z-index: 1; }
.mode .box { position: relative; display: block; height: 100%; border: 1px solid var(--line); border-radius: 12px; padding: 18px 44px 18px 18px; background: var(--surface); }
.mode .box::after { content: ''; position: absolute; top: 18px; right: 18px; width: 16px; height: 16px; border-radius: 50%; border: 1px solid var(--line-strong); }
.mode:hover .box { border-color: var(--line-strong); }
.modes { grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (max-width: 620px) { .modes { grid-template-columns: 1fr; } }
.mode .box strong { display: flex; flex-direction: column-reverse; align-items: flex-start; gap: 8px; font-size: 17px; margin-bottom: 8px; }
.mode .box span.d { color: var(--muted); font-size: 14px; display: block; }
.mode input:checked + .box { border-color: var(--fg); box-shadow: 0 0 0 1px var(--fg); background: var(--surface); }
.mode input:checked + .box::after { background: var(--fg); border-color: var(--fg); box-shadow: inset 0 0 0 3px var(--surface); }
.mode input:focus-visible + .box { outline: 2px solid var(--accent); outline-offset: 3px; }
.mode input:disabled { cursor: not-allowed; }
.mode.custom .box { border-style: dashed; }
.recent-changes { margin: 10px 0 0; font-size: 14px; }
.recent-changes > summary { cursor: pointer; color: var(--muted); }
.recent-changes ul { margin: 8px 0 0; padding-left: 18px; }
.tag { display: inline-block; font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 11px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; padding: 1px 8px; border-radius: 4px; background: var(--accent); color: var(--on-accent); margin: 0; }
.toolbar { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; margin: 0 0 14px; }
.toolbar input[type='search'] { flex: 1 1 240px; width: auto; }
.group { border: 1px solid var(--line); border-radius: 12px; margin-bottom: 14px; background: var(--surface); overflow: hidden; }
.group > summary { list-style: none; cursor: pointer; padding: 16px 22px; display: flex; gap: 12px; align-items: center; font-weight: 600; font-size: 17px; min-height: 56px; }
.group > summary::-webkit-details-marker { display: none; }
.group > summary::after { content: '+'; margin-left: auto; color: var(--muted); font-size: 22px; font-weight: 400; }
.group[open] > summary::after { content: '\2212'; }
.group .gcount { color: var(--muted); font-weight: 400; font-size: 14px; }
.tool { border-top: 1px solid var(--line); padding: 14px 22px; display: grid; gap: 10px; grid-template-columns: 1fr auto; align-items: center; }
.tool .info { min-width: 0; }
.tool .name { font-weight: 600; margin: 0 0 2px; display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.tool .desc { color: var(--muted); font-size: 14px; margin: 0; }
.tool .meta { font-size: 14px; color: var(--muted); margin: 4px 0 0; }
.tool .meta:empty { display: none; }
.tool .meta .warn-text { color: var(--warn); font-weight: 600; }
.tool .row-err { color: var(--err); font-weight: 600; font-size: 14px; margin: 4px 0 0; }
.seg { display: inline-flex; border: 1px solid var(--line-strong); border-radius: 8px; overflow: hidden; margin: 0; padding: 0; background: var(--surface-2); }
.seg legend { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0,0,0,0); }
.seg label { position: relative; margin: 0; font-weight: 600; display: block; }
.seg input { position: absolute; opacity: 0; inset: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; }
.seg span { display: block; padding: 8px 16px; min-width: 64px; text-align: center; min-height: 40px; line-height: 24px; color: var(--muted); font-size: 14px; }
.seg label + label span { border-left: 1px solid var(--line-strong); }
.seg input:checked + span { background: var(--accent); color: var(--on-accent); }
.seg input[value='off']:checked + span { background: var(--surface-2); color: var(--fg); font-weight: 600; }
.seg input[value='ask']:checked + span { background: var(--warn-soft); color: var(--warn); font-weight: 600; }
.seg input[value='auto']:checked + span { background: var(--accent); color: var(--on-accent); font-weight: 600; }
.seg input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: -3px; }
.seg input:disabled { cursor: not-allowed; }
.seg.is-disabled { opacity: .65; }
@media (max-width: 620px) { .tool { grid-template-columns: 1fr; } .seg { width: 100%; } .seg label { flex: 1; } }
.sim-result { list-style: none; padding: 0; margin: 14px 0 0; display: grid; gap: 8px; }
.sim-result li { border: 1px solid var(--line); border-radius: 12px; padding: 12px 16px; display: flex; flex-wrap: wrap; gap: 8px 12px; align-items: center; }
.example-btns { display: flex; flex-wrap: wrap; gap: 8px; margin: 8px 0 12px; }

/* Activity / approvals / usage */
.feed { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.feed li { border: 1px solid var(--line); border-radius: 12px; padding: 14px 18px; background: var(--surface); }
.feed .when { color: var(--muted); font-size: 14px; }
.approval { border: 1px solid var(--line-strong); border-radius: 12px; padding: 22px; background: var(--surface); margin-bottom: 14px; }
.approval pre, .detail { background: var(--surface-2); border: 1px solid var(--line); border-radius: 8px; padding: 10px 12px; overflow-x: auto; white-space: pre-wrap; overflow-wrap: anywhere; font-family: ui-monospace, Menlo, Consolas, monospace; font-size: 14.5px; margin: 8px 0 12px; }
.bars { display: flex; align-items: flex-end; gap: 12px; height: 150px; padding: 8px 0 0; border-bottom: 1px solid var(--line-strong); }
.bars .bar { flex: 1 1 0; min-width: 4px; background: var(--muted); border-radius: 2px 2px 0 0; min-height: 2px; height: calc(var(--v, 0) * 1%); }
.bars .bar:hover { background: var(--fg); }
.bar-axis { display: flex; justify-content: space-between; color: var(--muted); font-size: 14px; margin-top: 4px; }
.meter { height: 8px; border-radius: 4px; background: var(--surface-2); border: 1px solid var(--line-strong); overflow: hidden; }
.meter > span { display: block; height: 100%; background: var(--fg); width: calc(var(--v, 0) * 1%); }
.meter.hot > span { background: var(--warn); }
.empty { text-align: center; padding: 48px 20px; color: var(--muted); border: 1px dashed var(--line-strong); border-radius: 12px; }
.empty strong { display: block; color: var(--fg); font-size: 17px; margin-bottom: 4px; }
.loading { padding: 28px 4px; color: var(--muted); }
.copybox { display: flex; gap: 8px; align-items: stretch; flex-wrap: wrap; }
.copybox input { flex: 1 1 260px; width: auto; font-family: ui-monospace, Menlo, Consolas, monospace; font-size: 14.5px; }
.login-card { max-width: 460px; margin: 10vh 0 0; }
.login-card form .btn + * { margin-top: 14px; }
.hero { padding-top: 12vh; }
.hero h1 { max-width: 20ch; font-size: clamp(34px, 5.5vw, 56px); text-wrap: balance; }
.hero p { font-size: 18px; max-width: 520px; }
.site-foot { margin-top: 22vh; padding: 22px 0 8px; border-top: 1px solid var(--line); color: var(--muted); font-size: 14px; display: flex; gap: 18px; flex-wrap: wrap; }
.site-foot a { color: var(--muted); }
.login-card h1 { margin-bottom: 14px; }
@media (prefers-reduced-motion: reduce) { .spinner { animation-duration: 3s; } * { scroll-behavior: auto !important; transition: none !important; } }
@media (forced-colors: active) { .btn, .seg span, .mode .box { border: 2px solid ButtonText; } }

/* Tables that become stacked cards on phones */
td select { min-width: 120px; min-height: 36px; padding-top: 5px; padding-bottom: 5px; }
@media (max-width: 620px) {
  table.rt thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0,0,0,0); }
  table.rt, table.rt tbody, table.rt tr, table.rt td { display: block; width: 100%; }
  table.rt tr { border-bottom: 1px solid var(--line); padding: 10px 14px; }
  table.rt tr:last-child { border-bottom: 0; }
  table.rt td { border: 0; padding: 4px 0; overflow-wrap: anywhere; }
  table.rt td:empty, table.rt td:has(> .row:empty) { display: none; }
  table.rt th { display: none; }
  table.rt td[data-label]::before { content: attr(data-label); display: block; color: var(--muted); font-size: 13px; }
}

/* Side-by-side fields (invite form, wizard) */
.form-grid + .field-error, .form-grid ~ .btn { margin-top: 18px; }
.team-grid { display: grid; gap: 0 16px; grid-template-columns: repeat(3, minmax(0, 1fr)); align-items: start; }
@media (max-width: 760px) { .team-grid { grid-template-columns: 1fr; } }
.form-grid { display: grid; gap: 0 18px; grid-template-columns: repeat(4, minmax(0, 1fr)); align-items: start; }

/* Integrations cards: actions pinned to the bottom so rows line up */
.integ { display: flex; flex-direction: column; }
.integ > .small { color: var(--muted); }
.integ > .stack-gap, .integ.stack > * + * { margin-top: 12px; }

/* Search field above a list (Integrations, People): full width of the content, same look as the Safety search */
.search-row { margin: 0 0 4px; }
.search-row input[type='search'] { max-width: 520px; }

/* Recurring tasks: one card per job; the long text stays tucked away until asked for */
.job .job-facts { margin: 0; }
.job-text { margin: 8px 0 0; padding: 12px 14px; background: var(--surface-2); border: 1px solid var(--line); border-radius: 8px; white-space: pre-wrap; overflow-wrap: anywhere; font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 13px; line-height: 1.5; max-height: 220px; overflow: auto; }
.job-what > summary { cursor: pointer; font-size: 14px; color: var(--muted); }
.job .banner { margin: 0; }

/* Whose is it: team / only you / a teammate's (hinted, never named). Same tokens as every other badge, no new colours. */
.badge.scope { align-self: flex-start; font-weight: 400; font-size: 12px; font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; letter-spacing: .04em; text-transform: uppercase; padding: 1px 9px; }
.badge.scope::before { display: none; }
.badge.scope.team { color: var(--info); }
.badge.scope.you { color: var(--fg); }
.badge.scope.others { color: var(--muted); border-style: dashed; }
.integ-sec { margin-top: 24px; }
.res-row .badge.scope { align-self: center; }
.integ-sec > div > h2.eyebrow { margin-bottom: 4px; }
.integ-cats { gap: 32px; }
.integ-cat-h { margin: 0; }
.res-list { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line); }
.res-row { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; padding: 14px 2px; border-bottom: 1px solid var(--line); }
.res-main { display: flex; flex-direction: column; flex: 1 1 220px; min-width: 0; overflow-wrap: anywhere; }

/* Phones: long group headers wrap, segmented controls and form grids stack */
@media (max-width: 900px) { .form-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 560px) { .form-grid { grid-template-columns: 1fr; } }
@media (forced-colors: active) { .sidebar nav a[aria-current='page'] { border: 2px solid Highlight; } .mode input:checked + .box { border-width: 3px; } }

#integ-cards { align-items: stretch; }
.toolbar input[type='search'] { min-height: 44px; }
.toolbar .btn.sm { min-height: 44px; }
@media (max-width: 620px) {
  .group > summary { display: grid; grid-template-columns: 1fr auto; gap: 2px 12px; align-items: center; }
  .group > summary::after { grid-row: 1; grid-column: 2; }
  .group .gcount { grid-column: 1; flex-basis: auto; }
}

/* number inputs: no native spinner (the − / + buttons do that job and the spinner made the seat box look cluttered) */
input[type='number'] { -moz-appearance: textfield; appearance: textfield; }
input[type='number']::-webkit-outer-spin-button, input[type='number']::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.wizard-nav + .hint, .wizard-nav + p { margin-top: 16px; }
.topbar .logo { width: 88px; height: 24px; }

/* integrations: what one sign-in covers, and the delete dialog's list */
.covers { display: flex; flex-wrap: nowrap; overflow: hidden; align-items: center; gap: 6px; margin: 0; }
.covers .chip { flex: none; white-space: nowrap; }
.chip[hidden] { display: none; }
.btn[hidden] { display: none; }
.chip-more { color: var(--muted); }
.covers-label { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 12px; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); margin-right: 2px; }
.chip { border: 1px solid var(--line); border-radius: 999px; padding: 2px 10px; font-size: 13px; color: var(--fg); background: transparent; }
ul.bullets { margin: 0; padding-left: 20px; display: grid; gap: 4px; }

/* People: one fixed column per action, so Remove (and the others) line up in every row */
.slots { display: grid; grid-template-columns: 5.5rem; gap: 10px; align-items: center; justify-content: start; }
.slots.c-num { grid-template-columns: 8.5rem 5.5rem; }
.slots.c-card { grid-template-columns: 8rem 5.5rem; }
.slots.c-card.c-num { grid-template-columns: 8rem 8.5rem 5.5rem; }
.status-link { margin-top: 8px; }
.status-link .linkbtn { white-space: nowrap; font-size: 13px; color: var(--muted); }
.status-link .linkbtn:hover { color: var(--fg); }
@media (max-width: 620px) { .status-link .linkbtn { padding: 10px 4px; } }
#members-table th, #members-table td { padding-left: 14px; padding-right: 14px; }     /* seven columns: fits a normal laptop screen without sideways scroll */
/* a wide table scrolls inside its own box instead of widening the whole page */
.shell > div { min-width: 0; }
.slots .slot { display: block; min-height: 1px; }
.slots .slot .btn { width: 100%; }
@media (max-width: 620px) {
  .slots, .slots.c-num, .slots.c-card, .slots.c-card.c-num { display: flex; flex-wrap: wrap; }
  .slots .slot { display: contents; }
  .slots .slot:empty { display: none; }
  .slots .slot .btn { width: auto; }
  table.rt td:has(> .slots):not(:has(.btn)) { display: none; }
}

/* integrations: ONE card size. Every part has a fixed slot and a line limit (title 1 line, description 2, chips 1, status 2, buttons 1 row), so nothing a
   card holds can make it taller than its neighbours; the actions sit at the bottom edge. A form or message a person opens inside a card may grow it. */
.cards.compact > .card.integ { min-height: 330px; box-sizing: border-box; }
.cards.compact .integ.stack > * + * { margin-top: 8px; }
.integ .card-head > h2 { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.integ .integ-blurb, .integ .integ-detail { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden; }
.integ .integ-blurb { min-height: 2.9em; }
.integ .integ-meta { display: flex; align-items: center; gap: 8px; min-width: 0; flex-wrap: nowrap; }
.integ .integ-meta .integ-checked { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.integ .integ-meta .badge { flex: none; }
.integ .integ-status { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.integ .integ-status > p { margin: 0; }                   /* the status line and who-last-changed-sharing share ONE bounded area (at most 2 + 2 clamped lines) */
.cards.compact .integ .integ-event, .integ .integ-event { margin: 0; font-size: 13px; line-height: 1.35; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden; min-width: 0; }          /* the full sentence is also the title */
.cards.compact .integ .integ-event.with-detail, .integ .integ-event.with-detail { -webkit-line-clamp: 1; }          /* a card that already has a status line shows the sharing change on ONE line (full sentence in the title) */
.integ .integ-event:empty { display: none; }
.integ .integ-status:not(:has(> :not(:empty))) { display: none; }          /* nothing to say: no empty row, no extra gap */
.cards.compact .integ.stack > .integ-foot, .integ .integ-foot { margin-top: auto; padding-top: 8px; display: flex; flex-direction: column; gap: 6px; }
.integ .integ-foot > * { margin: 0; }
.integ .integ-foot .hint { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 1; overflow: hidden; }          /* one line; the full sentence is the title */
.cards.compact .integ .actions { flex-wrap: nowrap; gap: 8px; padding-top: 0; }
.cards.compact .integ .actions .btn { flex: 0 1 auto; white-space: nowrap; min-width: 0; }
@media (max-width: 360px) { .cards.compact .integ .actions { flex-wrap: wrap; } }
@media (max-width: 700px) { .cards.compact > .card.integ { min-height: 338px; } }          /* phone buttons are taller (tap size), so the standard card is too */

/* integrations: the scope tag of a connected card is a button that opens "who can use it" */
button.badge.sharebtn { cursor: pointer; background: transparent; }
button.badge.sharebtn::after { content: '\25BE'; margin-left: 4px; font-size: 10px; opacity: .7; }
button.badge.sharebtn:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
dialog label.choice { display: flex; gap: 10px; align-items: flex-start; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; cursor: pointer; }
dialog label.choice .hint { display: block; margin-top: 2px; }
dialog label.choice:has(input:disabled) { cursor: default; }
label.check { display: flex; gap: 8px; align-items: center; font-size: 14px; }

/* settings: copies of Ghost's replies (one checkbox per source -> destination pair) */
table.matrix { border-collapse: collapse; width: 100%; max-width: 640px; }
table.matrix th, table.matrix td { padding: 10px 12px; border-bottom: 1px solid var(--line); text-align: center; font-weight: 400; }
table.matrix th[scope=row], table.matrix thead th:first-child { text-align: left; }
table.matrix thead th { font-size: 13px; color: var(--muted); }
table.matrix td.na { color: var(--muted); }
table.matrix input[type=checkbox] { width: 20px; height: 20px; }
@media (max-width: 620px) { table.matrix { table-layout: fixed; } table.matrix th, table.matrix td { padding: 8px 4px; font-size: 13px; letter-spacing: .02em; overflow-wrap: anywhere; } table.matrix th:first-child { width: 31%; } }
hr.or-rule { border: 0; border-top: 1px solid var(--line); margin: 24px 0 16px; }

/* ---- bottom-left identity block (30 Oct 2026, owner: no buttons, just light carets): the NAME opens the account menu, the "Owner · josh" line opens the Ghost list ---- */
.who-btn, .who-role-wrap { box-sizing: border-box; min-height: 36px; }
.who-btn { display: flex; align-items: center; gap: 8px; width: 100%; margin: 0; padding: 0; background: none; border: 0; border-radius: 6px; color: var(--fg); font: inherit; font-weight: 600; text-align: left; cursor: pointer; }
.who-name { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.caret { flex: none; width: 6px; height: 6px; border-right: 1.5px solid currentColor; border-bottom: 1.5px solid currentColor; transform: rotate(45deg) translate(-2px, -2px); opacity: .4; }
.who-btn:hover .caret, .who-role-wrap:hover .caret, .who-btn[aria-expanded='true'] .caret { opacity: .85; }
.who-btn:focus-visible, .who-role-wrap:focus-within { outline: 2px solid var(--accent); outline-offset: 2px; }
.who-role-wrap { position: relative; display: flex; align-items: center; gap: 8px; border-radius: 6px; cursor: pointer; }
.who-role-wrap .who-role { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.who-role-wrap select { position: absolute; inset: 0; width: 100%; height: 100% !important; min-height: 0 !important; margin: 0; padding: 0; opacity: 0; cursor: pointer; font-size: 16px; }
.acct { position: relative; }
.acct-pop { position: fixed; min-width: 0; box-sizing: border-box; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--pop); padding: 6px; z-index: 40; }
.acct-who { padding: 8px 10px 10px; border-bottom: 1px solid var(--line); margin-bottom: 6px; }
.acct-name { font-weight: 600; overflow-wrap: anywhere; }
.acct-mail { font-size: 12.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.acct-item { display: block; width: 100%; text-align: left; background: none; border: 0; border-radius: 8px; padding: 9px 10px; min-height: 40px; color: var(--fg); font: inherit; cursor: pointer; }
.acct-item:hover, .acct-item:focus-visible { background: var(--surface-2); }
@media (max-width: 860px) { .who-btn, .who-role-wrap { min-height: 44px; } }

/* ---- ONE control scale (30 Oct 2026, owner: "make everything consistent, Scale.com standards") ----
   Two sizes only. Default controls (buttons, text inputs, selects) are 44px; small controls (.btn.sm, header controls, selects inside tables) are 36px.
   Nothing else sets its own height or font size: not the integration cards, not the toolbars, not the forms. */
:root { --ctl: 44px; --ctl-sm: 36px; }
.btn { min-height: var(--ctl); font-size: 15px; }
.btn.sm, .cards.compact .btn.sm { min-height: var(--ctl-sm); padding: 5px 14px; font-size: 14px; }
input:not([type='checkbox']):not([type='radio']):not([type='range']):not([type='file']):not([type='hidden']), select { height: var(--ctl); min-height: var(--ctl); padding-top: 0; padding-bottom: 0; }
td select, td input:not([type='checkbox']):not([type='radio']) { height: var(--ctl-sm); min-height: var(--ctl-sm); font-size: 14px; }
.toolbar .btn.sm { min-height: var(--ctl); font-size: 15px; }          /* a toolbar is a row of default-size controls (search box + buttons): all 44px together */
@media (max-width: 700px) { .cards.compact .btn.sm { min-height: var(--ctl); font-size: 14px; } }

.acct { width: 100%; }
.sidebar { overflow-x: hidden; }

/* ---- segmented switch (Approvals: Mine / Everyone's). Same height as a small button (36px), one hairline border, black when selected ---- */
.seg { display: inline-flex; align-self: flex-start; justify-self: start; width: max-content; max-width: 100%; border: 1px solid var(--line-strong); border-radius: 8px; overflow: hidden; }
.seg button { height: var(--ctl); padding: 0 16px; display: inline-flex; align-items: center; gap: 8px; background: transparent; border: 0; color: var(--muted); font: inherit; font-size: 14px; font-weight: 600; cursor: pointer; }
.seg button + button { border-left: 1px solid var(--line-strong); }
@media (hover: hover) { .seg button:hover { background: var(--surface-2); color: var(--fg); } }
.seg button[aria-pressed='true']:hover { background: var(--fg); color: var(--bg); }
.seg button[aria-pressed='true'] { background: var(--fg); color: var(--bg); }
.seg button:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }
.seg button .seg-n { display: inline; padding: 0; min-width: 0; min-height: 0; line-height: inherit; font-size: inherit; font-weight: 400; color: inherit; opacity: .75; background: none; border: 0; }


/* a long command in an approval card wraps inside the card (it used to push the whole page sideways on a phone) */
article.approval pre { white-space: pre-wrap; overflow-wrap: anywhere; word-break: break-word; max-width: 100%; }
article.approval { min-width: 0; }

/* "Verified N minutes ago against what is actually running" (Apps, Recurring tasks) and the list of things that do not match */
.verified-line { margin: 0; }
.verified-line.stale { color: var(--warn); font-weight: 600; }
.recon-list { margin: 8px 0 0; padding-left: 20px; min-width: 0; }
.recon-item { overflow-wrap: anywhere; word-break: break-word; }
.verified-line { overflow-wrap: anywhere; }
.recon-list li + li { margin-top: 6px; }

/* ==== Workspace tab (file browser + previewer) and the public share page, Nov 2026 ====================================================================
   One section, tokens only (no new colours). The list is a plain hairline table; a file is marked by its extension in a small square box, a folder by one
   outline glyph; nothing else is decorative. The preview takes the whole right side of the screen (a full-height pane, hairline left border). */
.main.bleed { padding: 0; max-width: none; }                    /* a screen module that exports `bleed = true` draws edge to edge */
.ws { --ws-pane-w: clamp(320px, var(--ws-pane, 50%), calc(100% - 300px)); position: relative; display: grid; grid-template-columns: minmax(0, 1fr); height: 100vh; min-height: 0; }
.ws.has-preview { grid-template-columns: minmax(0, 1fr) var(--ws-pane-w); }
.ws-list { position: relative; min-width: 0; min-height: 0; overflow: auto; padding: 44px clamp(24px, 3.5vw, 64px) 96px; container: wslist / inline-size; }
.ws.has-preview .ws-list { padding-left: clamp(24px, 2.6vw, 48px); padding-right: clamp(20px, 2vw, 32px); }
.ws-list .page-head { margin-bottom: 24px; padding-bottom: 24px; }
.ws-pane { position: relative; display: none; min-width: 0; min-height: 0; background: var(--surface); border-left: 1px solid var(--line); }
.ws.has-preview .ws-pane { display: block; }
.ws-split { position: absolute; top: 0; bottom: 0; left: -5px; width: 9px; z-index: 3; cursor: col-resize; touch-action: none; }
.ws-split::before { content: ''; position: absolute; top: 0; bottom: 0; left: 4px; width: 1px; background: transparent; }
.ws-split:hover::before, .ws-split:focus-visible::before, .ws.resizing .ws-split::before { background: var(--fg); }
.ws-split:focus-visible { outline: none; }
.ws.resizing, .ws.resizing * { cursor: col-resize; user-select: none; }
.ws.resizing iframe { pointer-events: none; }

/* breadcrumb, toolbar, status */
.ws-crumbs ol { list-style: none; display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; margin: 0 0 20px; padding: 0; font-size: 15px; min-width: 0; }
.ws-crumbs li { display: inline-flex; align-items: center; gap: 10px; min-width: 0; overflow-wrap: anywhere; }
.ws-crumbs li + li::before { content: '/'; color: var(--line-strong); }
.ws-crumbs a, .ws-crumbs .linkbtn { color: var(--muted); text-decoration: none; font-size: inherit; }
.ws-crumbs a:hover, .ws-crumbs .linkbtn:hover { color: var(--fg); text-decoration: underline; }
.ws-crumbs [aria-current='page'] { color: var(--fg); font-weight: 600; }
.ws-tools { margin-bottom: 18px; flex-wrap: wrap; }
.ws-tools .btn { flex: none; white-space: nowrap; }
.ws-tools input[type='search'] { flex: 1 1 180px; min-width: 0; max-width: 420px; }
.ws-tools .btn.primary { margin-left: auto; }
.ws-statusrow { display: flex; align-items: center; justify-content: space-between; gap: 6px 16px; flex-wrap: wrap; margin: 0 0 6px; min-height: 28px; }
.ws-statusrow .check { margin: 0; white-space: nowrap; }
.ws-statusrow .ws-allbtn { white-space: nowrap; font-size: 13px; color: var(--muted); text-decoration: none; }
.ws-statusrow .ws-allbtn:hover, .ws-statusrow .ws-allbtn:focus-visible { color: var(--fg); text-decoration: underline; }
.ws-status { margin: 0; min-width: 0; overflow-wrap: anywhere; }
.ws-trunc { margin: 0 0 10px; }
.ws-progress { display: grid; gap: 6px; margin: 0 0 14px; }
.ws-progress p { margin: 0; overflow-wrap: anywhere; }
.ws-progress .meter { height: 4px; border: 0; }

/* the list */
.ws-table { table-layout: fixed; font-size: 15px; }
.ws-table th { padding: 10px 12px; }
.ws-table td { padding: 8px 12px; }
.ws-table .ws-c-size { width: 112px; text-align: right; }
.ws-table .ws-c-mtime { width: 196px; }         /* "Yesterday 09:10 GMT+10": the time zone must fit */
.ws-table .ws-c-act { width: 52px; padding-left: 0; padding-right: 6px; text-align: right; }
.ws-table td.ws-c-size, .ws-table td.ws-c-mtime { color: var(--muted); font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-variant-numeric: tabular-nums; }
.ws-sort { display: inline-flex; align-items: center; gap: 6px; padding: 0; background: none; border: 0; color: inherit; font: inherit; letter-spacing: inherit; text-transform: inherit; cursor: pointer; }
.ws-sort:hover, th[aria-sort] .ws-sort { color: var(--fg); }
.ws-sort-dir { min-width: 8px; }
.ws-c-size .ws-sort { flex-direction: row-reverse; }
.ws-row { cursor: pointer; }
.ws-row td { transition: none; }
@media (hover: hover) { .ws-row:hover td { background: var(--surface-2); } }
.ws-row[aria-selected='true'] td { background: var(--accent-soft); }
.ws-row:focus { outline: none; }
.ws-row:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }
.ws-row.is-inert { cursor: default; }
.ws-row.is-inert .n, .ws-row.is-hidden .n { color: var(--muted); }
.ws-name { display: flex; align-items: center; gap: 14px; min-width: 0; }
.ws-label { display: flex; flex-direction: column; min-width: 0; }
.ws-label .n, .wv-list .n { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ws-where { color: var(--muted); font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ws-mmeta { display: none; color: var(--muted); font-size: 13px; }
.ws-ico { flex: none; width: 30px; height: 30px; display: inline-grid; place-items: center; color: var(--muted); }
.ftag { flex: none; width: 30px; height: 30px; display: inline-grid; place-items: center; box-sizing: border-box; border: 1px solid var(--line-strong); border-radius: 4px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 9.5px; font-weight: 400; letter-spacing: 0; text-transform: uppercase; line-height: 1; color: var(--muted); overflow: hidden; }
.ftag.lg { width: 72px; height: 72px; border-radius: 8px; font-size: 14px; letter-spacing: .06em; }
.ws-more { width: 34px; height: 34px; display: inline-grid; place-items: center; padding: 0; border: 0; border-radius: 6px; background: transparent; color: var(--muted); cursor: pointer; vertical-align: middle; }
.ws-more:hover, .ws-more[aria-expanded='true'] { background: var(--surface-2); color: var(--fg); }
.ws-more:focus-visible { outline-offset: 0; }
@media (hover: hover) and (min-width: 861px) { .ws-row:not(:hover):not([aria-selected='true']):not(:focus-within) .ws-more:not([aria-expanded='true']) { opacity: 0; } }
.ws-menu { width: 208px; }
.ws-menu hr { border: 0; border-top: 1px solid var(--line); margin: 6px 0; }
.ws-menu .acct-item.danger { color: var(--err); }
.ws-table-host .empty { margin-top: 8px; }
.ws-drop { position: absolute; top: 0; bottom: 0; left: 0; right: 0; z-index: 5; display: none; place-items: center; padding: 16px; pointer-events: none; }
.ws.has-preview .ws-drop { right: var(--ws-pane-w); }
.ws-drop-text { margin: 0; width: 100%; height: 100%; display: grid; place-items: center; border: 1px dashed var(--fg); border-radius: 12px; background: color-mix(in srgb, var(--bg) 90%, transparent); font-size: 17px; }
.ws.dragging .ws-drop { display: grid; }
.toast .toast-undo { font-weight: 600; }

@container wslist (max-width: 600px) {
  .ws-table .ws-c-size, .ws-table .ws-c-mtime { display: none; }
  .ws-mmeta { display: block; }
}
@container wslist (max-width: 470px) {
  .ws-tools { flex-wrap: wrap; }
  .ws-tools input[type='search'] { flex-basis: 100%; max-width: none; }
  .ws-tools .btn.primary { margin-left: 0; }
}

/* share dialog */
dialog.ws-share { max-width: min(600px, calc(100vw - 24px)); }
dialog.ws-share > * + * { margin-top: 16px; }
dialog.ws-share .banner { margin-bottom: 0; }
dialog.ws-share .banner p { margin: 0; }
.ws-exp { margin: 0; }
.ws-exp-row { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.ws-exp-row label.choice { align-items: center; margin: 0; font-weight: 400; }
.ws-exp-row label.choice:has(input:checked) { border-color: var(--fg); }
.ws-exp-row input[type='radio'] { accent-color: var(--accent); }
.ws-share-new { padding-top: 4px; }
.ws-share-new .eyebrow { margin: 0; }
.ws-share-existing h3 { margin: 8px 0 4px; }
.ws-links .res-main { gap: 2px; }
.ws-link.is-off strong { color: var(--muted); font-weight: 400; }
@media (max-width: 520px) { .ws-exp-row { grid-template-columns: 1fr; } }

/* the previewer (assets/js/viewer.js) */
.wv { display: flex; flex-direction: column; height: 100%; min-height: 0; background: var(--surface); }
.wv-head { display: flex; flex-direction: column; gap: 14px; padding: 22px 24px 18px; border-bottom: 1px solid var(--line); }
.wv-top { display: flex; align-items: flex-start; gap: 16px; min-width: 0; }
.wv-title { flex: 1 1 auto; min-width: 0; }
.wv-name { margin: 0 0 6px; font-size: 20px; font-weight: 400; letter-spacing: -.01em; line-height: 1.3; overflow-wrap: anywhere; }
.wv-meta { margin: 0; overflow-wrap: anywhere; }
.wv-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.wv-actions:empty { display: none; }
.wv-close { flex: none; }
.wv-back { display: none; flex: none; }
.wv-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 10px; min-height: 53px; padding: 8px 24px; border-bottom: 1px solid var(--line); }
.wv-bar .grow { flex: 1 1 auto; }
.wv-bar .seg button { height: var(--ctl-sm); }
.wv-bar .btn.sm { min-height: var(--ctl-sm); }
.wv-info, .wv-zoom { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 12px; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); white-space: nowrap; }
.wv-zoom { min-width: 48px; text-align: center; }
.wv-zbtn { min-width: 36px; padding-left: 0; padding-right: 0; font-size: 18px; }
.wv-body { position: relative; flex: 1 1 auto; min-height: 0; overflow: auto; }
.wv-body:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; border-radius: 0; }
.wv-note { margin: 0; padding: 10px 24px; border-bottom: 1px solid var(--line); color: var(--muted); font-size: 14px; }
.wv-center { min-height: 100%; display: grid; place-content: center; justify-items: center; gap: 14px; padding: 48px 24px; text-align: center; }
.wv-center > p { margin: 0; max-width: 440px; color: var(--muted); }
.wv-center > strong { overflow-wrap: anywhere; max-width: 100%; }
.wv-center .row { justify-content: center; }
.wv-img { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; padding: 24px; }
.wv-img img { max-width: 100%; max-height: 100%; object-fit: contain; cursor: zoom-in; }
.wv-img.actual { position: static; display: block; width: max-content; min-width: 100%; }
.wv-img.actual img { max-width: none; max-height: none; cursor: zoom-out; }
.wv-media { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; padding: 24px; }
.wv-media video { max-width: 100%; max-height: 100%; }
.wv-audio audio { width: min(480px, 100%); }
.wv-frame { position: absolute; inset: 0; color-scheme: light; background: Canvas; }          /* a document is white paper in both themes */
.wv-frame iframe { display: block; width: 100%; height: 100%; border: 0; }
.wv-pages { display: flex; flex-direction: column; align-items: center; gap: 16px; padding: 24px; min-width: max-content; min-height: 100%; background: var(--surface-2); }
.wv-page { position: relative; flex: none; color-scheme: light; background: Canvas; box-shadow: 0 0 0 1px var(--line); }
.wv-page canvas { display: block; }
.wv-page-err { position: absolute; inset: 0; margin: 0; display: grid; place-items: center; color: GrayText; font-size: 14px; }
.wv-text { width: max-content; min-width: 100%; padding: 16px 24px 40px 0; counter-reset: ln; font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 13px; line-height: 1.6; tab-size: 4; }
.wv-text > div { display: grid; grid-template-columns: var(--ln-w, 4ch) auto; column-gap: 20px; padding-left: 8px; white-space: pre; min-height: 1.6em; }
.wv-text > div::before { counter-increment: ln; content: counter(ln); text-align: right; color: var(--muted); opacity: .7; user-select: none; }
.wv-text.wrap { width: auto; }
.wv-text.wrap > div { grid-template-columns: var(--ln-w, 4ch) minmax(0, 1fr); white-space: pre-wrap; overflow-wrap: anywhere; }
.wv-md { max-width: 780px; margin: 0 auto; padding: 32px 32px 72px; overflow-wrap: break-word; }
.md > :first-child { margin-top: 0; }
.md h1, .md h2, .md h3, .md h4, .md h5, .md h6 { margin: 1.6em 0 .6em; line-height: 1.25; }
.md h1 { font-size: 32px; font-weight: 400; letter-spacing: -.02em; }
.md h2 { font-size: 24px; font-weight: 400; letter-spacing: -.01em; padding-bottom: 8px; border-bottom: 1px solid var(--line); }
.md h3 { font-size: 19px; }
.md h4, .md h5, .md h6 { font-size: 16px; }
.md p, .md ul, .md ol, .md blockquote, .md pre, .md .md-table { margin: 0 0 16px; }
.md ul, .md ol { padding-left: 24px; }
.md li + li { margin-top: 4px; }
.md li > ul, .md li > ol { margin: 4px 0 0; }
.md li.task { list-style: none; margin-left: -22px; }
.md li.task > input { margin: 0 8px 0 0; vertical-align: -2px; accent-color: var(--accent); }
.md code { padding: 1px 5px; border: 1px solid var(--line); border-radius: 4px; background: var(--surface-2); font-size: .88em; }
.md pre { padding: 14px 16px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface-2); overflow-x: auto; font-size: 13.5px; line-height: 1.55; }
.md pre code { padding: 0; border: 0; background: none; font-size: inherit; }
.md blockquote { margin-left: 0; padding: 2px 0 2px 18px; border-left: 2px solid var(--line-strong); color: var(--muted); }
.md hr { border: 0; border-top: 1px solid var(--line); margin: 28px 0; }
.md .md-table { overflow-x: auto; }
.md table { width: auto; font-size: 14px; }
.md th, .md td { padding: 8px 12px; border: 1px solid var(--line); }
.md .md-img { color: var(--muted); }
.wv-tabs { display: flex; gap: 2px; overflow-x: auto; max-width: 100%; }
.wv-tab { padding: 8px 12px; background: none; border: 0; border-bottom: 1px solid transparent; color: var(--muted); font: inherit; font-size: 14px; cursor: pointer; white-space: nowrap; }
.wv-tab:hover { color: var(--fg); }
.wv-tab[aria-selected='true'] { color: var(--fg); border-bottom-color: var(--fg); font-weight: 600; }
.wv-sheet { width: max-content; min-width: 100%; border-collapse: separate; border-spacing: 0; font-size: 13px; }
.wv-sheet th, .wv-sheet td { max-width: 320px; padding: 6px 12px; border-bottom: 1px solid var(--line); border-right: 1px solid var(--line); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; text-align: left; }
.wv-sheet thead th { position: sticky; top: 0; z-index: 2; background: var(--surface); text-align: center; font-size: 11px; padding: 6px 12px; border-bottom: 1px solid var(--line-strong); }
.wv-sheet th.rn { position: sticky; left: 0; z-index: 1; min-width: 48px; background: var(--surface); text-align: right; font-size: 11px; color: var(--muted); }
.wv-sheet thead th.rn { z-index: 3; }
.wv-list { font-size: 14px; }
.wv-list th, .wv-list td { padding: 8px 24px; }
.wv-list td.num { color: var(--muted); white-space: nowrap; }

/* phones: the preview is a full-screen layer with a Back button; rows stack (name, then size and date) */
@media (max-width: 860px) {
  .ws, .ws.has-preview { display: block; height: auto; }
  .ws-list { overflow: visible; padding: 28px 18px 100px; }
  .ws.has-preview .ws-list { padding: 28px 18px 100px; }
  .ws-pane { position: fixed; inset: 0; z-index: 50; border-left: 0; }
  .ws-split { display: none; }
  .ws-drop, .ws.has-preview .ws-drop { right: 0; }
  html.ws-locked, html.ws-locked body { overflow: hidden; }
  .ws-tools { flex-wrap: wrap; }
  .ws-tools input[type='search'] { flex-basis: 100%; max-width: none; }
  .ws-tools .btn.primary { margin-left: 0; }
  .ws-table { table-layout: auto; }
  .ws-table thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0, 0, 0, 0); }
  .ws-table .ws-c-size, .ws-table .ws-c-mtime { display: none; }
  .ws-table td { padding: 12px 4px; }
  .ws-table td.ws-c-name { width: 100%; max-width: 0; }
  .ws-table td.ws-c-act { width: 44px; }
  .ws-mmeta { display: block; }
  .ws-more { opacity: 1; width: 40px; height: 40px; }
  .wv-head { gap: 12px; padding: 12px 16px 14px; }
  .wv-top { gap: 12px; align-items: center; }
  .wv-back { display: inline-flex; }
  .wv-close { display: none; }
  .wv-name { font-size: 18px; margin-bottom: 2px; }
  .wv-bar { padding: 8px 16px; }
  .wv-md { padding: 24px 18px 56px; }
}

/* the public share page (/ghost/share/#<token>) */
.share { max-width: 1320px; margin: 0 auto; padding: 0 24px 32px; }
.share-head { max-width: 760px; margin: 8px auto 28px; text-align: center; }
.share-head h1 { margin: 0 0 8px; font-size: clamp(26px, 3.4vw, 38px); overflow-wrap: anywhere; }
.share-head .eyebrow { margin: 0 0 10px; min-height: 1.4em; }
.share-head p.muted { margin: 0; min-height: 1.5em; }
.share-wait { text-align: center; }
.share-msg { max-width: 520px; margin: 4vh auto 0; text-align: center; }
.share-box { height: calc(100vh - 230px); min-height: 480px; overflow: hidden; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); }
.ws.share-box { height: calc(100vh - 230px); }
.share-box .ws-list { padding: 24px 28px 48px; }
.share-box .ws-statusrow { margin-bottom: 10px; }
.share-box .ws-crumbs ol { margin-bottom: 14px; }
.wv-head.slim { gap: 0; padding-top: 14px; padding-bottom: 14px; }
.wv-head.slim .wv-top { align-items: center; }
.wv-head.slim .wv-actions { flex: none; }
@media (max-width: 860px) {
  .share { padding: 0 14px 24px; }
  .share-head { margin-bottom: 20px; }
  .share-file { height: calc(100vh - 200px); min-height: 420px; }
  .ws.share-box { height: auto; min-height: 0; overflow: visible; }
  .share-box .ws-list { padding: 16px 14px 24px; }
}

/* ==== Office editor (ONLYOFFICE, assets/js/editor-oo.js), Nov 2026: fills its host; a thin status bar, banners, the editor frame ==== */
.oo-host { display: flex; flex-direction: column; height: 100%; min-height: 0; }
.oo-bar { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 6px 12px; min-height: 40px; border-bottom: 1px solid var(--line); }
.oo-status { color: var(--muted); font-size: 13px; }
.oo-banners:empty { display: none; }
.oo-banners { padding: 10px 12px 0; }
.oo-banner { margin-bottom: 10px; padding: 10px 14px; }
.oo-banner p { margin: 0; }
.oo-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.oo-fallback .oo-actions { justify-content: center; }
.oo-frame { position: relative; flex: 1 1 auto; min-height: 0; }
.oo-frame > div, .oo-frame iframe { position: absolute; top: 0; left: 0; width: 100%; height: 100%; border: 0; }
.oo-host[data-phase='error'] .oo-frame { display: none; }
.oo-msg:empty { display: none; }
.oo-host[data-phase='loading'] .oo-msg, .oo-host[data-phase='error'] .oo-msg { flex: 1 1 auto; }
.oo-frame:has(+ .oo-msg:not(:empty)) { flex: 0 0 0; }
.oo-host { position: relative; }
.oo-host[data-phase='waiting'] .oo-msg { flex: 1 1 auto; }
/* Ghost is editing this file: a cover over the editor (it also takes the keyboard), lifted when Ghost is done */
.oo-cover[hidden] { display: none; }
.oo-cover { position: absolute; left: 0; right: 0; bottom: 0; top: 40px; z-index: 5; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; padding: 24px; text-align: center; background: var(--bg); opacity: 0.94; outline: none; }
.oo-cover .oo-cover-t { font-weight: 400; font-size: 17px; }
.oo-cover .oo-cover-p { margin: 0; max-width: 420px; color: var(--muted); }

/* ==== Workspace create + AI (Nov 2026): the New menu, picking several rows, the plain editor, the dashboard pane, Ask Ghost (drawer, popup, chip),
   voice typing. Tokens only, the Workspace look (hairlines, mono uppercase labels, black 8px buttons), no motion, both themes. ==================== */
/* toolbar: Ask Ghost, New, Upload on the right of the search box */
.ws-tools .ws-ask-btn { margin-left: auto; }
.ws-tools .ws-ask-btn ~ .btn.primary { margin-left: 0; }
.ws-new svg { margin: 0 -2px 0 -4px; }
@container wslist (max-width: 470px) { .ws-tools { gap: 8px; } .ws-tools .ws-ask-btn { margin-left: 0; } .ws-tools .btn { padding-left: 14px; padding-right: 14px; } }

/* the name dialog of the New menu: the extension after the box */
.ws-name-row { display: flex; align-items: center; min-width: 0; }
.ws-name-row input { flex: 1 1 auto; min-width: 0; }
.ws-ext { flex: none; padding-left: 10px; font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 14px; color: var(--muted); }

/* several rows: a checkbox takes the place of the type mark on hover / focus, and stays while anything is picked */
.ws-mark { position: relative; flex: none; width: 30px; height: 30px; display: inline-grid; place-items: center; }
.ws-check { position: absolute; inset: 0; margin: auto; width: 20px; height: 20px; appearance: none; display: grid; place-content: center; visibility: hidden;
  border: 1px solid var(--line-strong); border-radius: 5px; background: var(--surface); cursor: pointer; }
.ws-check:hover { border-color: var(--fg); }
.ws-check:checked { background: var(--accent); border-color: var(--accent); }
.ws-check:checked::after { content: ''; width: 10px; height: 5px; border: 2px solid var(--on-accent); border-top: 0; border-right: 0; transform: rotate(-45deg) translate(1px, -1px); }
.ws-check:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.ws-table.picking .ws-check, .ws-row:focus-within .ws-check { visibility: visible; }
@media (hover: hover) { .ws-table.is-multi .ws-row:hover .ws-check { visibility: visible; } .ws-table.is-multi .ws-row:hover .ws-mark > :first-child { visibility: hidden; } }
.ws-table.picking .ws-mark > :first-child, .ws-row:focus-within .ws-mark > :first-child { visibility: hidden; }
.ws-row.is-picked td { background: var(--accent-soft); }
.ws-pickbar { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; min-height: 28px; margin: -4px 0 2px; }
.ws-pickbar[hidden], .ws-statusrow[hidden] { display: none; }
.ws-pick-n { margin-right: 6px; font-weight: 600; font-size: 14px; }

/* the pane: the preview on top, Ask Ghost docked under it (resizable), or only Ask Ghost (no file open); Expand lets the pane cover the list */
.ws { --ws-pane-w: clamp(var(--ws-pane-min, 320px), var(--ws-pane, 50%), calc(100% - 300px)); }
.ws.is-dash { --ws-pane-min: 520px; }
.ws.has-preview .ws-pane { display: flex; flex-direction: column; }
.ws-pane > .wv { flex: 1 1 0; height: auto; min-height: 0; }
.ws-pane.ask-only > .wv { display: none; }
.ws.has-preview.pane-expanded { grid-template-columns: minmax(0, 1fr); }
.ws.pane-expanded .ws-list, .ws.pane-expanded .ws-split { display: none; }
.ws.pane-expanded .ws-pane { border-left: 0; }
.ws.pane-expanded .ws-drop { right: 0; }
.wv-ask[aria-expanded='true'], .wv-expand[aria-pressed='true'], .dp-source[aria-pressed='true'] { border-color: var(--fg); background: var(--accent-soft); }
.wv.is-editing .wv-body { overflow: hidden; }

/* the plain editor: the whole body is the text box; a calm notice above it when the file changed meanwhile */
.ed { display: flex; flex-direction: column; height: 100%; min-height: 0; }
.ed-notice:empty { display: none; }
.ed-notice { padding: 14px 24px 0; }
.ed-banner { margin: 0; }
.ed-banner p { margin: 4px 0 0; }
.ed-banner .row { margin-top: 10px; gap: 8px; }
.ed-errors { margin: 6px 0 0; padding-left: 20px; font-size: 14px; }
.ed-errors li + li { margin-top: 2px; }
.ed-text { flex: 1 1 auto; width: 100%; min-height: 0; margin: 0; padding: 16px 24px 40px; border: 0; border-radius: 0; resize: none; background: var(--surface); color: var(--fg);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 13px; line-height: 1.6; tab-size: 4; }
.ed-text:hover { border: 0; }
.ed-text:focus { outline: none; }
.ed-text:focus-visible { outline: none; box-shadow: inset 2px 0 0 var(--accent); border-radius: 0; }          /* the whole pane is the box: a bar on its edge, not a frame */
.ed-status { min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.wv-oo { position: absolute; inset: 0; }
.wv-oo-missing p { max-width: 440px; }

/* the dashboard pane (the engine draws inside .dp-host) */
.dp { display: flex; flex-direction: column; min-height: 100%; }
.dp[hidden], .ed[hidden] { display: none; }
.dp-fix:empty { display: none; }
.dp-fix { padding: 16px 24px 0; }
.dp-fixbar { margin: 0; }
.dp-fixbar p { margin: 4px 0 10px; }
.dp-note.is-warn { color: var(--warn); }
.dp-host { position: relative; flex: 1 1 auto; min-height: 0; padding: 22px 24px 0; }

/* Ask Ghost: the drawer */
.ask { position: relative; flex: none; display: flex; flex-direction: column; height: var(--ask-h, 34%); min-height: 220px; max-height: 85%; background: var(--surface); border-top: 1px solid var(--line); }
.ask[hidden] { display: none; }
.ask:focus { outline: none; }
.ws-pane.ask-only > .ask { flex: 1 1 auto; height: auto; max-height: none; border-top: 0; }
.ask-grip { position: absolute; left: 0; right: 0; top: -5px; height: 9px; z-index: 3; cursor: row-resize; touch-action: none; }
.ask-grip::before { content: ''; position: absolute; left: 0; right: 0; top: 4px; height: 1px; background: transparent; }
.ask-grip:hover::before, .ask-grip:focus-visible::before, .ask.resizing .ask-grip::before { background: var(--fg); }
.ask-grip:focus-visible { outline: none; }
.ask.resizing, .ask.resizing * { cursor: row-resize; user-select: none; }
.ws-pane.ask-only .ask-grip { display: none; }
.ask-head { flex: none; display: flex; align-items: center; gap: 12px; min-height: 53px; padding: 8px 24px; border-bottom: 1px solid var(--line); }
.ws-pane.ask-only .ask-head { min-height: 0; padding-top: 22px; padding-bottom: 18px; }
.ask-title { flex: 1 1 auto; display: flex; align-items: baseline; gap: 12px; min-width: 0; margin: 0; font-size: 15px; font-weight: 400; letter-spacing: 0; }
.ask-title .eyebrow { flex: none; }
.ask-about { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ws-pane.ask-only .ask-about { font-size: 20px; letter-spacing: -.01em; }
.ask-close { flex: none; }
.ask-scroll { flex: 1 1 auto; min-height: 0; overflow: auto; padding: 0 24px; }
.ask-scroll:focus { outline: none; }
.ask-log { list-style: none; margin: 0; padding: 0; }
.ask-msg, .ask-sys, .ask-empty { padding: 14px 0; border-bottom: 1px solid var(--line); }
.ask-log > :last-child { border-bottom: 0; }
.ask-meta { display: flex; align-items: center; gap: 10px; min-height: 20px; margin: 0 0 4px; }
.ask-role { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 12px; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.ask-msg.is-ghost .ask-role, .ask-work .ask-role, .ask-pop-answer .ask-role { color: var(--fg); }
.ask-time { color: var(--muted); font-size: 13px; }
.ask-text { margin: 0; font-size: 15px; line-height: 1.55; white-space: pre-wrap; overflow-wrap: anywhere; }
.ask-msg.is-auto .ask-text { color: var(--muted); }
.ask-msg.is-failed .ask-text, .ask-pop-answer.is-failed .ask-text { color: var(--err); }
.ask-msg-scope { margin-top: 8px; }
.ask-sys, .ask-empty { color: var(--muted); font-size: 14px; }
.ask-sys.is-err { color: var(--err); }
.ask-work { padding: 14px 0 16px; border-top: 1px solid var(--line); }
.ask-log:has(> .ask-empty) + .ask-work-host .ask-work { border-top: 0; }
.ask-work .spinner { width: 14px; height: 14px; border-width: 2px; vertical-align: 0; }
.ask-state { color: var(--muted); font-size: 14px; }
.ask-steps { margin: 6px 0 8px; padding-left: 20px; color: var(--muted); font-size: 14px; }
.ask-steps li + li { margin-top: 2px; }
.ask-steps li.is-current { color: var(--fg); }
.ask-work > .ask-text { margin-top: 6px; }
.ask-approval { margin: 10px 0 0; }
.ask-approval p { margin: 4px 0 6px; }
.ask-work-foot { margin-top: 12px; }
.ask-foot { flex: none; padding: 12px 24px 16px; border-top: 1px solid var(--line); }
.ask-form { display: grid; gap: 8px; min-width: 0; }
.ask-scope:empty { display: none; }
.ask-input { min-height: 64px; max-height: 168px; padding: 10px 12px; resize: none; font-size: 15px; line-height: 1.5; }
.ask-actions { display: flex; align-items: center; gap: 8px; min-width: 0; }
.ask-note { flex: 1 1 auto; min-width: 0; margin: 0; color: var(--muted); font-size: 13px; line-height: 1.4; overflow-wrap: anywhere; }
.ask-form.is-row { gap: 6px; }
.ask-row { display: flex; align-items: flex-end; gap: 8px; min-width: 0; }
.ask-row .ask-input { flex: 1 1 auto; min-width: 0; min-height: 44px; }
.ask-row .btn.sm { min-height: 44px; }
.ask-form.is-row .ask-note:empty { display: block; height: 0; }
.ask-note.is-err { color: var(--err); }
.ask-send { flex: none; }
.ask-off { margin: 0; font-size: 14px; }
.ask-chip { display: inline-flex; align-items: center; gap: 2px; max-width: 100%; min-height: 28px; padding: 2px 10px; border: 1px solid var(--line-strong); border-radius: 6px;
  background: var(--surface); color: var(--fg); font-size: 13px; line-height: 1.3; vertical-align: middle; }
.ask-chip:has(.ask-chip-x) { padding-right: 2px; }
.ask-chip-t { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ask-chip-x, .ask-x { flex: none; display: inline-grid; place-items: center; width: 28px; height: 28px; padding: 0; border: 0; border-radius: 6px; background: transparent; color: var(--muted); cursor: pointer; }
.ask-chip-x { width: 24px; height: 24px; }
.ask-chip-x:hover, .ask-x:hover { background: var(--surface-2); color: var(--fg); }

/* Ask Ghost: the popup at a selection, and the chip at a text selection */
.ask-pop { position: fixed; z-index: 45; width: min(360px, calc(100vw - 16px)); padding: 10px 14px 14px; background: var(--surface); border: 1px solid var(--line-strong); border-radius: 12px; box-shadow: var(--pop); }
.ask-pop-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin: 0 -6px 6px 0; }
.ask-pop-scope { margin: 0 0 10px; min-width: 0; }
.ask-pop .ask-work { padding: 4px 0 0; border-top: 0; }
.ask-pop .ask-input { min-height: 44px; }
.ask-pop-answer .ask-text { max-height: 240px; overflow: auto; }
.ask-pop-foot { margin-top: 10px; }
.ask-pop-foot .linkbtn { font-size: 14px; }
.ask-selchip { position: fixed; z-index: 44; background: var(--surface); }

/* phones: the pane is a full-screen layer already; Ask Ghost is a sheet over its lower part */
@media (max-width: 860px) {
  .ws-tools .ws-ask-btn { margin-left: 0; }
  .wv-expand { display: none; }
  .ask { position: absolute; left: 0; right: 0; bottom: 0; z-index: 4; height: 72%; max-height: none; border-top: 1px solid var(--line-strong); }
  .ws-pane.ask-only > .ask { position: static; height: 100%; }
  .ask-grip { display: none; }
  .ask-head { padding: 8px 12px 8px 16px; }
  .ws-pane.ask-only .ask-head { padding: 12px 12px 12px 16px; }
  .ask-scroll { padding: 0 16px; }
  .ask-foot { padding: 10px 16px 14px; }
  .ed-notice { padding: 12px 16px 0; }
  .ed-text { padding: 14px 16px 40px; font-size: 14px; }
  .dp-fix { padding: 12px 16px 0; }
  .dp-host { padding: 16px 16px 0; }
}
/* the tree: a folder opens in place, its rows one level further in (20px a level, 14px on phones); a chevron before the folder glyph (a spacer before a
   file's tag, so names line up), hairline guides under the chevrons of the folders above; Size / Modified / actions stay in their columns.
   Quiet rows inside a folder (Loading…, Empty, its error, "Show 500 more") are muted, as tall as a row. Dropping files on a folder row marks that row. */
.ws-table.is-tree th.ws-c-name { padding-left: 34px; }
.ws-table.is-tree td.ws-c-name, .ws-table.is-tree td.ws-c-note { padding-left: 4px;      /* the guides are a background (a positioned cell would cover the row's focus ring) */
  background-image: repeating-linear-gradient(to right, var(--line) 0 1px, transparent 1px 20px); background-repeat: no-repeat; background-position: 16px 0;
  background-size: calc(var(--lvl, 0) * 20px) 100%; }
.ws-table.is-tree .ws-name { padding-left: calc(var(--lvl, 0) * 20px); }
.ws-tw { flex: none; width: 24px; height: 32px; margin: -1px -8px -1px 0; display: inline-grid; place-items: center; padding: 0; border: 0; border-radius: 6px; background: transparent; color: var(--muted); }
button.ws-tw { cursor: pointer; }
button.ws-tw svg { stroke-width: 1.8; }
@media (hover: hover) { button.ws-tw:hover { color: var(--fg); } }
button.ws-tw:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }
.ws-row[aria-expanded='true'] .ws-tw svg { transform: rotate(90deg); }
.ws-note td { padding-top: 8px; padding-bottom: 8px; color: var(--muted); font-size: 14px; }
.ws-note .ws-name { min-height: 30px; }
.ws-note-body { display: flex; align-items: center; flex-wrap: wrap; gap: 6px 14px; min-width: 0; overflow-wrap: anywhere; }
.ws-note.is-more .ws-note-body { flex-wrap: nowrap; }
.ws-note.is-more .ws-note-body > span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ws-note-err { color: var(--err); }
.ws-row.is-drop td { background: var(--accent-soft); }
.ws-row.is-drop { outline: 1px dashed var(--fg); outline-offset: -1px; }
.ws.dragging.drop-row .ws-drop { display: none; }
@media (max-width: 860px) {
  .ws-table.is-tree .ws-name { padding-left: calc(var(--lvl, 0) * 14px); gap: 10px; }
  .ws-table.is-tree td.ws-c-name, .ws-table.is-tree td.ws-c-note { background-image: repeating-linear-gradient(to right, var(--line) 0 1px, transparent 1px 14px); background-position: 22px 0;
    background-size: calc(var(--lvl, 0) * 14px) 100%; }
  .ws-tw { width: 36px; height: 36px; margin: 0 -6px 0 0; }
  .ws-table td.ws-c-note { width: 100%; max-width: 0; padding-top: 10px; padding-bottom: 10px; }
}
/* ==== end Workspace create + AI ==================================================================================================================== */

/* ==== Dashboards (assets/js/dash/: the *.ghostdash engine, 2D grid + 3D scene), Nov 2026 ============================================================
   Tokens only (no new colours). Chart palette = classes dash-c0..dash-c8 built from the tokens: --fg shades first, then --info, --ok, --warn,
   --brand; dash-c8 is the neutral "Other / rest". Marks use fill/stroke="currentColor", so a class sets a mark's colour and the 3D view reads the
   same classes through getComputedStyle (a theme switch re-skins both). Widget titles are mono uppercase eyebrows; hairline cards; motion only for the build-in of NEW widgets (see "build-in animation" below). */
.dash { display: flex; flex-direction: column; gap: 14px; min-width: 0; color: var(--fg); }
.dash [hidden] { display: none !important; }
.dash-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px 20px; flex-wrap: wrap; }
.dash-titles { min-width: 0; flex: 1 1 280px; }
.dash-title { margin: 0; font-size: clamp(22px, 2.4vw, 28px); font-weight: 400; letter-spacing: -.02em; line-height: 1.2; overflow-wrap: anywhere; }
.dash-sub { margin: 4px 0 0; color: var(--muted); font-size: 15px; overflow-wrap: anywhere; }
.dash-actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.dash-seg button { height: var(--ctl-sm); min-width: 48px; justify-content: center; }
.dash-notice { margin: 0; padding: 10px 14px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface-2); color: var(--muted); font-size: 14px; }

/* global filters */
.dash-filters { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 10px 14px; padding: 0 0 14px; border-bottom: 1px solid var(--line); }
.dash-f { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.dash-f > .eyebrow { margin: 0; font-weight: 400; font-size: 11px; }
.dash-f select, .dash-f input { height: var(--ctl-sm); min-height: var(--ctl-sm); font-size: 14px; padding-left: 10px; padding-right: 10px; }
.dash-f select { width: auto; min-width: 150px; max-width: 240px; padding-right: 34px; }
.dash-f-pair { display: flex; align-items: center; gap: 6px; }
.dash-f-pair input { width: 132px; }
.dash-f-range input[type='number'] { width: 104px; }
.dash-f.is-off .dash-f-off { color: var(--muted); font-size: 13px; line-height: var(--ctl-sm); }
.dash-ms { position: relative; }
.dash-ms > summary { list-style: none; display: flex; align-items: center; height: var(--ctl-sm); min-width: 150px; max-width: 240px; padding: 0 34px 0 10px; border: 1px solid var(--line-strong); border-radius: 8px; background: var(--surface); font-size: 14px; cursor: pointer; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; position: relative; }
.dash-ms > summary::-webkit-details-marker { display: none; }
.dash-ms > summary::after { content: ''; position: absolute; right: 14px; top: 50%; width: 6px; height: 6px; border-right: 1.5px solid currentColor; border-bottom: 1.5px solid currentColor; transform: translateY(-70%) rotate(45deg); }
.dash-ms > summary:hover { border-color: var(--fg); }
.dash-ms-pop { position: absolute; left: 0; top: calc(100% + 4px); z-index: 30; min-width: 220px; max-width: 320px; max-height: 280px; overflow: auto; padding: 8px 10px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); box-shadow: var(--pop); }
.dash-ms-o { margin: 0; padding: 6px 2px; font-size: 14px; align-items: center; }
.dash-ms-o span { overflow-wrap: anywhere; }
.dash-chips { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; min-height: var(--ctl-sm); }
.dash-chips:empty { display: none; }
.dash-chip { display: inline-flex; align-items: center; gap: 6px; max-width: 100%; height: var(--ctl-sm); padding: 0 12px; border: 1px solid var(--fg); border-radius: 999px; background: var(--accent-soft); color: var(--fg); font: inherit; font-size: 13.5px; cursor: pointer; }
.dash-chip:hover { background: var(--surface-2); }
.dash-chip-k { color: var(--muted); white-space: nowrap; }
.dash-chip-v { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dash-chip-x { font-size: 17px; line-height: 1; color: var(--muted); }
.dash-clearall { font-size: 14px; color: var(--muted); }

/* the canvas and the cards */
.dash-stage { position: relative; min-width: 0; padding: 2px 0 44px; }
.dash-grid { display: grid; grid-template-columns: repeat(var(--dash-cols, 12), minmax(0, 1fr)); grid-auto-rows: 72px; gap: 16px; }
.dash-card { position: relative; display: flex; flex-direction: column; min-width: 0; min-height: 0; overflow: hidden; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; }
.dash-card:focus { outline: none; }
.dash-card:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.dash-card.is-selected { border-color: var(--fg); outline: 2px solid var(--fg); outline-offset: 2px; }
.dash-head { display: flex; align-items: flex-start; gap: 6px; min-width: 0; padding: 12px 10px 4px 16px; cursor: pointer; user-select: none; }
.dash-htext { flex: 1 1 auto; min-width: 0; }
.dash-wtitle { margin: 0; font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 12px; font-weight: 400; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); line-height: 1.5; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dash-card.is-selected .dash-wtitle, .dash-head:hover .dash-wtitle { color: var(--fg); }
.dash-wsub { margin: 1px 0 0; font-size: 13px; color: var(--muted); line-height: 1.35; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dash-info-wrap { position: relative; flex: none; }
.dash-info { width: 32px; height: 32px; display: inline-grid; place-items: center; padding: 0; margin: -6px -4px 0 0; border: 0; border-radius: 6px; background: transparent; color: var(--muted); cursor: help; }
.dash-info-i { width: 22px; height: 22px; display: inline-grid; place-items: center; border: 1px solid var(--line-strong); border-radius: 50%; font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 11px; line-height: 1; }
.dash-info:hover .dash-info-i, .dash-info:focus-visible .dash-info-i { color: var(--fg); border-color: var(--fg); }
.dash-desc { display: none; position: absolute; right: -6px; top: 30px; z-index: 25; width: max-content; max-width: min(300px, 70vw); padding: 8px 10px; border: 1px solid var(--line-strong); border-radius: 8px; background: var(--surface); color: var(--fg); font-size: 13px; line-height: 1.45; text-transform: none; letter-spacing: 0; box-shadow: var(--pop); }
.dash-info:hover + .dash-desc, .dash-info:focus-visible + .dash-desc { display: block; }
.dash-pick { flex: none; width: 32px; height: 32px; margin: -6px -6px 0 0; display: inline-grid; place-items: center; padding: 0; border: 0; border-radius: 6px; background: transparent; cursor: pointer; opacity: 0; }
.dash-pick-box { width: 14px; height: 14px; border: 1px solid var(--line-strong); border-radius: 3px; background: var(--surface); display: inline-grid; place-content: center; }
.dash-pick[aria-pressed='true'] .dash-pick-box { background: var(--fg); border-color: var(--fg); }
.dash-pick[aria-pressed='true'] .dash-pick-box::after { content: ''; width: 8px; height: 4px; border: 2px solid var(--surface); border-top: 0; border-right: 0; transform: rotate(-45deg) translate(1px, -1px); }
.dash-card:hover .dash-pick, .dash-card:focus-within .dash-pick, .dash-card.is-selected .dash-pick, .dash-pick:focus-visible { opacity: 1; }
@media (hover: none) { .dash-pick { opacity: 1; } }
.dash-body { position: relative; flex: 1 1 auto; min-height: 0; padding: 4px 14px 12px 16px; overflow: hidden; }
.dash-note { margin: -6px 0 0; padding: 0 16px 10px; font-size: 12px; line-height: 1.4; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* palette (series order) and tones */
.dash-c0 { color: color-mix(in srgb, var(--fg) 86%, var(--surface)); }
.dash-c1 { color: color-mix(in srgb, var(--fg) 56%, var(--surface)); }
.dash-c2 { color: color-mix(in srgb, var(--fg) 34%, var(--surface)); }
.dash-c3 { color: var(--info); }
.dash-c4 { color: var(--ok); }
.dash-c5 { color: var(--warn); }
.dash-c6 { color: var(--brand); }
.dash-c7 { color: color-mix(in srgb, var(--info) 50%, var(--surface)); }
.dash-c8 { color: color-mix(in srgb, var(--line-strong) 70%, var(--surface)); }
.dash-tone-ok { color: var(--ok); } .dash-tone-warn { color: var(--warn); } .dash-tone-err { color: var(--err); } .dash-tone-info { color: var(--info); } .dash-tone-plain { color: var(--fg); }

/* SVG charts */
.dash-chart { display: flex; flex-direction: column; height: 100%; min-width: 0; }
.dash-svg { display: block; flex: none; overflow: visible; }
.dash-svg text { font-family: 'Figtree', system-ui, sans-serif; font-size: 12px; fill: var(--muted); font-variant-numeric: tabular-nums; }
.dash-svg .dash-val { fill: var(--fg); font-size: 11.5px; }
.dash-svg .dash-axis-t { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 10.5px; letter-spacing: .06em; text-transform: uppercase; }
.dash-gl { stroke: var(--line); stroke-width: 1; }
.dash-base { stroke: var(--line-strong); stroke-width: 1; }
.dash-mark { cursor: pointer; }
.dash-mark:hover { opacity: .78; }
.dash-line { stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; pointer-events: none; }
.dash-area { fill-opacity: .14; pointer-events: none; }
.dash-dot { stroke: var(--surface); stroke-width: 1.5; pointer-events: none; }
.dash-hit { fill: var(--fg); fill-opacity: 0; cursor: pointer; }
.dash-hit:hover { fill-opacity: .05; }
.dash-hit.is-active { fill-opacity: .09; }
.has-active .dash-mark:not(.is-active) { opacity: .28; }
.has-active .dash-mark.is-active { opacity: 1; }
.dash-slice { stroke: var(--surface); stroke-width: 1.5; }
.dash-pt { stroke: var(--surface); stroke-width: 1.5; fill-opacity: .88; }
.dash-cell { color: var(--fg); }
.dash-cell.is-blank { stroke: var(--line); fill: none; }
.dash-svg .dash-cellv { fill: var(--fg); font-size: 11px; pointer-events: none; }
.dash-svg .dash-cellv.on-dark { fill: var(--surface); }
.dash-svg .dash-center { fill: var(--fg); font-weight: 400; letter-spacing: -.02em; }
.dash-svg .dash-center-l { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 10px; letter-spacing: .08em; }
.dash-track { stroke: var(--line); }
.dash-svg .dash-gnum { fill: var(--fg); font-weight: 400; letter-spacing: -.02em; }
.dash-legend { display: flex; flex-wrap: wrap; gap: 0 12px; margin: -4px 0 2px; height: 32px; overflow: hidden; }
.dash-legend.two { height: 64px; }
.dash-leg { display: inline-flex; align-items: center; gap: 6px; max-width: 100%; height: 32px; padding: 0 2px; border: 0; border-radius: 4px; background: transparent; color: var(--fg); font: inherit; font-size: 12.5px; cursor: pointer; }
.dash-leg:hover .dash-leg-t { text-decoration: underline; text-underline-offset: 3px; }
.dash-leg[aria-pressed='false'] { color: var(--muted); }
.dash-leg[aria-pressed='false'] .dash-sw { opacity: .3; }
.dash-leg[aria-pressed='false'] .dash-leg-t { text-decoration: line-through; }
.dash-leg-t { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 180px; }
.dash-leg-v { color: var(--muted); font-variant-numeric: tabular-nums; }
.dash-sw { flex: none; width: 10px; height: 10px; border-radius: 2px; background: currentColor; }
.dash-pie { align-items: center; }
.dash-pie .dash-legend { justify-content: center; height: auto; max-height: none; margin: 2px 0 0; }
.dash-pie.side { flex-direction: row; justify-content: center; gap: 18px; }
.dash-pie.side .dash-legend { flex-direction: column; flex-wrap: nowrap; align-items: stretch; gap: 0; margin: 0; min-width: 0; height: auto; max-height: 100%; overflow: auto; }
.dash-pie.side .dash-leg { width: 100%; }
.dash-pie.side .dash-leg-v { margin-left: auto; padding-left: 12px; }

/* KPI */
.dash-kpi { display: flex; flex-direction: column; justify-content: flex-end; height: 100%; min-width: 0; }
.dash-kv { margin: 0; font-size: clamp(26px, 2.6vw, 38px); font-weight: 400; letter-spacing: -.025em; line-height: 1.1; font-variant-numeric: tabular-nums; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dash-delta { margin: 6px 0 0; font-size: 13px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dash-delta > span:first-child { font-weight: 600; }
.dash-goal { margin-top: 10px; height: 6px; }
.dash-goal.is-done > span { background: var(--ok); }
.dash-goal-t { margin: 4px 0 0; font-size: 12.5px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* table, text, list */
.dash-tablebox { display: flex; flex-direction: column; height: 100%; min-height: 0; }
.dash-tsearch { flex: none; margin: 0 0 8px; }
.dash-tsearch .dash-search { height: var(--ctl-sm); min-height: var(--ctl-sm); max-width: 280px; font-size: 14px; }
.dash-tablewrap { flex: 1 1 auto; min-height: 0; overflow: auto; border-top: 1px solid var(--line-strong); }
.dash-tablewrap:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.dash-table { font-size: 13.5px; }
.dash-table th, .dash-table td { padding: 7px 10px; white-space: nowrap; max-width: 280px; overflow: hidden; text-overflow: ellipsis; }
.dash-table thead th { position: sticky; top: 0; z-index: 1; padding: 0; background: var(--surface); border-bottom: 1px solid var(--line-strong); }
.dash-table td.num { font-variant-numeric: tabular-nums; }
.dash-sort { display: flex; align-items: center; gap: 4px; width: 100%; min-height: 32px; padding: 6px 10px; border: 0; background: none; color: inherit; font: inherit; letter-spacing: inherit; text-transform: inherit; cursor: pointer; }
th.num .dash-sort { justify-content: flex-end; }
.dash-sort:hover, th[aria-sort] .dash-sort { color: var(--fg); }
.dash-row { cursor: pointer; }
@media (hover: hover) { .dash-row:hover td { background: var(--surface-2); } }
.dash-row.is-active td { background: var(--accent-soft); font-weight: 600; }
.has-active .dash-row:not(.is-active) td { color: var(--muted); }
.dash-tnote { flex: none; margin: 6px 0 0; font-size: 12px; color: var(--muted); }
.dash-text { height: 100%; overflow: auto; font-size: 15px; line-height: 1.55; }
.dash-text .md h1 { font-size: 24px; } .dash-text .md h2 { font-size: 19px; padding-bottom: 6px; } .dash-text .md h3 { font-size: 16px; }
.dash-text .md h1, .dash-text .md h2, .dash-text .md h3 { margin: 0 0 8px; }
.dash-text .md p, .dash-text .md ul, .dash-text .md ol { margin-bottom: 10px; }
.dash-list { list-style: none; margin: 0; padding: 0; height: 100%; overflow: auto; }
.dash-li { display: flex; align-items: flex-start; gap: 10px; padding: 9px 0; border-bottom: 1px solid var(--line); }
.dash-li:first-child { padding-top: 2px; }
.dash-li:last-child { border-bottom: 0; }
.dash-dot2 { flex: none; width: 8px; height: 8px; margin-top: 7px; border-radius: 50%; background: currentColor; }
.dash-dot2.dash-tone-plain { color: var(--line-strong); }
.dash-li-t { display: flex; flex-direction: column; min-width: 0; font-size: 14.5px; line-height: 1.4; }
.dash-li-t strong { font-weight: 600; overflow-wrap: anywhere; }
.dash-li-d { color: var(--muted); font-size: 13px; overflow-wrap: anywhere; }

/* empty / error states, the whole-file error list */
.dash-state { height: 100%; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; padding: 8px; text-align: center; color: var(--muted); font-size: 13.5px; }
.dash-state strong { color: var(--fg); font-weight: 600; font-size: 14px; }
.dash-state p { margin: 0; max-width: 360px; overflow-wrap: anywhere; }
.dash-state-error strong { color: var(--err); }
.dash-state .btn { margin-top: 6px; }
.dash-errlist { margin: 0; }
.dash-errs { margin: 0 0 12px; padding-left: 20px; display: grid; gap: 4px; font-size: 14px; overflow-wrap: anywhere; }
.dash-errs code { font-size: 13px; }

/* tooltip, marquee, the floating "Ask Ghost" chip */
.dash-tip { position: absolute; z-index: 40; max-width: 300px; padding: 8px 10px; border: 1px solid var(--line-strong); border-radius: 8px; background: var(--surface); color: var(--fg); font-size: 13px; line-height: 1.4; pointer-events: none; box-shadow: var(--pop); }
.dash-tip p { margin: 0; }
.dash-tip-h { font-weight: 600; overflow-wrap: anywhere; }
.dash-tip-w { color: var(--muted); font-size: 12px; }
.dash-tip-r { display: flex; align-items: center; gap: 6px; margin-top: 3px !important; }
.dash-tip-n { color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 150px; }
.dash-tip-v { margin-left: auto; padding-left: 10px; font-variant-numeric: tabular-nums; white-space: nowrap; }
.dash-tip-hint { margin-top: 5px !important; color: var(--muted); font-size: 11.5px; }
.dash-marquee { position: absolute; z-index: 30; border: 1px dashed var(--fg); background: color-mix(in srgb, var(--fg) 5%, transparent); pointer-events: none; }
.dash-askchip { position: absolute; z-index: 35; display: inline-flex; align-items: center; gap: 8px; height: 32px; padding: 0 14px; border: 1px solid var(--accent); border-radius: 999px; background: var(--accent); color: var(--on-accent); font: inherit; font-size: 13.5px; font-weight: 600; cursor: pointer; white-space: nowrap; }
.dash-askchip:hover { background: var(--accent-hover); border-color: var(--accent-hover); }
.dash-askchip-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--brand); }

/* org chart (tree) and network */
.dash-treebox { height: 100%; overflow: auto; display: flex; }
.dash-treebox:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.dash-treebox > .dash-svg { margin: auto; }
.dash-link { stroke: var(--line-strong); stroke-width: 1.25; stroke-linejoin: round; }
.dash-node { cursor: pointer; outline: none; transition: opacity .12s; }
.dash-node-box { fill: var(--surface-2); stroke: var(--line); stroke-width: 1; }
.dash-node-bar { fill: var(--line-strong); }
.dash-node[class*='dash-tone-'] .dash-node-bar { fill: currentColor; }
.dash-node:hover .dash-node-box { stroke: var(--fg); }
.dash-node.is-active .dash-node-box { stroke: var(--fg); stroke-width: 2; fill: var(--accent-soft); }
.dash-node:focus-visible .dash-node-box, .dash-toggle:focus-visible .dash-toggle-box { stroke: var(--accent); stroke-width: 2.5; }
.dash-svg .dash-node-l { fill: var(--fg); font-size: 13px; font-weight: 600; letter-spacing: -.005em; }
.dash-svg .dash-node-d { fill: var(--muted); font-size: 11.5px; }
.dash-svg .dash-node-v { fill: var(--muted); font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 11px; }
.dash-toggle { cursor: pointer; outline: none; }
.dash-toggle-box { fill: var(--surface); stroke: var(--line-strong); stroke-width: 1; }
.dash-toggle:hover .dash-toggle-box { stroke: var(--fg); }
.dash-svg .dash-toggle-t { fill: var(--fg); font-size: 12px; font-weight: 600; pointer-events: none; }
.dash-edge-line { stroke: var(--line-strong); fill: none; stroke-linecap: round; }
.dash-edge-head { fill: var(--line-strong); }
.dash-svg .dash-edge-l, .dash-svg .dash-net-l { paint-order: stroke; stroke: var(--surface); stroke-width: 3px; stroke-linejoin: round; }
.dash-svg .dash-edge-l { fill: var(--muted); font-size: 10.5px; }
.dash-svg .dash-net-l { fill: var(--fg); font-size: 12px; pointer-events: none; }
.dash-net .dash-node-dot { stroke: var(--surface); stroke-width: 1.5; }
.dash-net .dash-node:hover .dash-node-dot, .dash-net .dash-node.is-active .dash-node-dot { stroke: var(--fg); stroke-width: 2.5; }
.dash-net .dash-edge { transition: opacity .12s; }
.dash-net .dash-svg.has-hover .dash-node:not(.is-hl), .dash-net .dash-svg.has-sel:not(.has-hover) .dash-node:not(.is-nb) { opacity: .28; }
.dash-net .dash-svg.has-hover .dash-edge:not(.is-hl), .dash-net .dash-svg.has-sel:not(.has-hover) .dash-edge:not(.is-nb) { opacity: .14; }
.dash-net .dash-edge.is-hl .dash-edge-line, .dash-net .dash-edge.is-nb .dash-edge-line { stroke: var(--fg); }
.dash-net .dash-edge.is-hl .dash-edge-head, .dash-net .dash-edge.is-nb .dash-edge-head { fill: var(--fg); }
.dash-tip-note { margin: 2px 0 0 !important; color: var(--muted); font-size: 12.5px; overflow-wrap: anywhere; }

/* build-in animation: classes are added by the engine only for widgets that appear for the first time (anim.js / charts2d.js decorate()); --dash-delay is the card's
   stagger, --i / --lvl the mark's place in the sequence. Nothing here runs with prefers-reduced-motion or GHOST_CONFIG.dashAnimate = false. */
.dash { --dash-ease: cubic-bezier(.2, .7, .2, 1); }
@keyframes dash-rise { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: none; } }
@keyframes dash-gy { from { transform: scaleY(0); } to { transform: scaleY(1); } }
@keyframes dash-gx { from { transform: scaleX(0); } to { transform: scaleX(1); } }
@keyframes dash-draw { from { stroke-dashoffset: 1; } to { stroke-dashoffset: 0; } }
@keyframes dash-fadein { from { opacity: 0; } to { opacity: 1; } }
@keyframes dash-popin { from { opacity: 0; transform: scale(.2); } to { opacity: 1; transform: scale(1); } }
@keyframes dash-nodein { from { opacity: 0; transform: scale(.86); } to { opacity: 1; transform: scale(1); } }
@keyframes dash-liftin { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
.dash-card.dash-in { animation: dash-rise 520ms var(--dash-ease) both; animation-delay: var(--dash-delay, 0ms); }
.dash-a { animation-duration: 560ms; animation-timing-function: var(--dash-ease); animation-fill-mode: both; animation-delay: calc(var(--dash-delay, 0ms) + 220ms + var(--i, 0) * 38ms); }
.dash-a.dash-late { animation-delay: calc(var(--dash-delay, 0ms) + 700ms + var(--i, 0) * 20ms); }
.dash-a.dash-fade { animation-name: dash-fadein; }
.dash-a.dash-lift { animation-name: dash-liftin; }
.dash-a.dash-pop { animation-name: dash-popin; transform-box: fill-box; transform-origin: 50% 50%; }
.dash-a.dash-grow-up { animation-name: dash-gy; transform-box: fill-box; transform-origin: 50% 100%; }
.dash-a.dash-grow-down { animation-name: dash-gy; transform-box: fill-box; transform-origin: 50% 0%; }
.dash-a.dash-grow-right { animation-name: dash-gx; transform-box: fill-box; transform-origin: 0% 50%; }
.dash-a.dash-grow-left { animation-name: dash-gx; transform-box: fill-box; transform-origin: 100% 50%; }
.dash-a.dash-draw { animation-name: dash-draw; animation-duration: 900ms; stroke-dasharray: 1; }
.dash-a.dash-sweep { animation-name: dash-draw; animation-duration: 1000ms; animation-delay: calc(var(--dash-delay, 0ms) + 160ms); stroke-dasharray: 1; }
.dash-n { animation-duration: 420ms; animation-timing-function: var(--dash-ease); animation-fill-mode: both; animation-delay: calc(var(--dash-delay, 0ms) + 200ms + var(--lvl, 0) * 150ms + var(--i, 0) * 26ms); }
.dash-n.dash-node-in { animation-name: dash-nodein; transform-box: fill-box; transform-origin: 50% 50%; }
.dash-n.dash-fade { animation-name: dash-fadein; animation-delay: calc(var(--dash-delay, 0ms) + 360ms + var(--lvl, 0) * 150ms + var(--i, 0) * 26ms); }
.dash-n.dash-draw { animation-name: dash-draw; animation-duration: 520ms; stroke-dasharray: 1; animation-delay: calc(var(--dash-delay, 0ms) + 260ms + var(--lvl, 0) * 150ms + var(--i, 0) * 26ms); }
@media (prefers-reduced-motion: reduce) { .dash-card.dash-in, .dash .dash-a, .dash .dash-n { animation: none !important; } }

/* 3D */
.dash-3d { position: relative; height: clamp(440px, 72vh, 860px); min-height: 0; border: 1px solid var(--line); border-radius: 12px; overflow: hidden; background: var(--surface); touch-action: none; }
.dash-3d canvas { display: block; width: 100%; height: 100%; outline: none; }
.dash-3d canvas:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }
.dash-3d-help { position: absolute; left: 14px; bottom: 10px; margin: 0; font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 11px; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); pointer-events: none; }
.dash-3d-tools { position: absolute; right: 12px; bottom: 10px; display: flex; gap: 6px; }
.dash-3d-tools .btn.sm { min-height: var(--ctl-sm); padding: 3px 12px; font-size: 13px; background: var(--surface); }
.dash-3d-list { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0, 0, 0, 0); }

@media (max-width: 700px) {
  .dash-actions { width: 100%; }
  .dash-askall { margin-left: auto; }
  .dash-filters { gap: 10px; }
  .dash-f { flex: 1 1 140px; }
  .dash-f select, .dash-ms > summary { width: 100%; max-width: none; min-width: 0; }
  .dash-f-range { flex-basis: 100%; }
  .dash-f-pair input { flex: 1 1 0; width: auto; min-width: 0; }
  .dash-grid { gap: 12px; }
  .dash-3d { height: 64vh; }
  .dash-3d-help { display: none; }
  .dash-pick, .dash-info { width: 36px; height: 36px; }
  .dash-leg, .dash-sort { min-height: 36px; height: 36px; }
  .dash-legend { height: 36px; } .dash-legend.two { height: 72px; }
  .dash-pie .dash-legend { height: auto; }
}
@media (forced-colors: active) { .dash-card.is-selected { outline: 3px solid Highlight; } .dash-mark, .dash-sw { forced-color-adjust: none; } }
/* ==== end Dashboards ======================================================================================================================== */

/* ==== Ask Ghost page (conversation list + thread) and Jarvis page (a canvas that builds live), Nov 2026 ============================================
   Tokens only. Ask Ghost: a mail-client layout (list left, conversation right). Jarvis: the picture fills the page, one floating one-row prompt bar. */
.chat { display: grid; grid-template-columns: minmax(280px, 360px) minmax(0, 1fr); height: 100vh; min-height: 0; }
.chat-list { display: flex; flex-direction: column; min-width: 0; min-height: 0; border-right: 1px solid var(--line); }
.chat-lhead { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 28px 20px 14px 24px; }
.chat-lhead h1 { margin: 0; font-size: 26px; }
.chat-new { flex: none; }
.chat-list .chat-search { flex: none; align-self: stretch; margin: 0 16px 10px; width: auto; min-width: 0; }
.chat-items { list-style: none; margin: 0; padding: 0 0 24px; overflow: auto; flex: 1 1 auto; min-height: 0; border-top: 1px solid var(--line); }
.chat-items > li { border-bottom: 1px solid var(--line); }
.chat-item { display: grid; gap: 3px; width: 100%; padding: 14px 20px 14px 24px; border: 0; background: transparent; color: var(--fg); text-align: left; font: inherit; cursor: pointer; }
.chat-item:hover { background: var(--surface-2); }
.chat-item.is-sel { background: var(--accent-soft); box-shadow: inset 3px 0 0 var(--fg); }
.chat-i-top { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; min-width: 0; }
.chat-i-title { font-weight: 600; font-size: 15px; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.chat-i-time { flex: none; color: var(--muted); font-size: 13px; }
.chat-i-prev { color: var(--muted); font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.chat-none { padding: 20px 24px; color: var(--muted); font-size: 14px; border-bottom: 0 !important; }
.chat-none.is-err { color: var(--err); }
.chat-main { display: flex; flex-direction: column; min-width: 0; min-height: 0; background: var(--surface); }
.chat-mhead { flex: none; display: flex; align-items: center; gap: 12px; min-height: 73px; padding: 12px 28px; border-bottom: 1px solid var(--line); }
.chat-title { flex: 1 1 auto; min-width: 0; margin: 0; font-size: 18px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.chat-mhead.is-empty .chat-title { color: var(--muted); font-weight: 400; }
.chat-mact { flex: none; display: flex; gap: 18px; }
.chat-mact .linkbtn { font-size: 14px; color: var(--muted); text-decoration: none; }
.chat-mact .linkbtn:hover { color: var(--fg); text-decoration: underline; }
.chat-back { display: none; }
.chat-rename { width: 100%; font-size: 18px; font-weight: 600; padding: 6px 10px; }
.th { display: flex; flex-direction: column; flex: 1 1 auto; min-height: 0; }
.th-scroll { padding: 0 28px; }
.th-log { max-width: 820px; margin: 0 auto; }
.th-foot { padding: 12px 28px 20px; }
.th-form { max-width: 820px; margin: 0 auto; width: 100%; }
.th-empty-host { border-bottom: 0 !important; }
.th-empty { padding: 12vh 0 0; text-align: left; }
.th-empty h2 { font-size: 28px; font-weight: 400; letter-spacing: -.02em; margin-bottom: 8px; }
.th-suggest { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 18px; }
.th-chip { min-height: 40px; font-weight: 400; }
@media (max-width: 860px) {
  .chat { grid-template-columns: minmax(0, 1fr); }
  .chat-main { display: none; }
  .chat.show-thread .chat-main { display: flex; }
  .chat.show-thread .chat-list { display: none; }
  .chat-back { display: inline-flex; }
  .chat-mhead { padding: 10px 14px; }
  .th-scroll { padding: 0 16px; }
  .th-foot { padding: 10px 16px 16px; }
}

.jv { position: relative; display: flex; flex-direction: column; height: 100vh; min-height: 0; overflow: hidden; background: var(--bg); }
.jv-top { flex: none; z-index: 3; display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 16px 28px; border-bottom: 1px solid var(--line); background: var(--bg); }
.jv-lead { display: flex; align-items: baseline; gap: 14px; min-width: 0; }
.jv-title { margin: 0; font-size: 20px; font-weight: 400; letter-spacing: -.01em; line-height: 1.2; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.jv-acts { display: flex; align-items: center; gap: 8px; flex: none; }
.jv-acts .btn { min-height: 36px; padding: 6px 14px; font-size: 14px; }
.jv-stage { position: relative; flex: 1 1 auto; min-height: 0; overflow: hidden; }
.jv-host { position: absolute; inset: 0; overflow: auto; padding: 16px 28px 150px; }
.jv-host.is-empty { display: none; }
.jv-hero { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; padding: 24px 24px 140px; }
.jv-hero h2 { font-size: clamp(30px, 4.4vw, 52px); font-weight: 400; letter-spacing: -.03em; margin-bottom: 10px; }
.jv-hero p { max-width: 560px; }
.jv-suggest { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; max-width: 860px; margin-top: 10px; }
.jv-chip { min-height: 40px; font-weight: 400; font-size: 14px; text-align: left; }
.jv-fix { position: absolute; left: 50%; top: 16px; transform: translateX(-50%); z-index: 2; width: min(520px, calc(100% - 32px)); }
.jv-bar { position: absolute; left: 50%; bottom: 22px; transform: translateX(-50%); z-index: 4; width: min(760px, calc(100% - 32px)); display: grid; gap: 8px; padding: 12px 14px; background: var(--surface); border: 1px solid var(--line-strong); border-radius: 14px; box-shadow: var(--pop); }
.jv-bar .ask-form { gap: 4px; }
.jv-caption { display: flex; align-items: baseline; justify-content: space-between; gap: 14px; font-size: 15px; line-height: 1.45; padding: 2px 2px 6px; border-bottom: 1px solid var(--line); }
.jv-cap-t { min-width: 0; overflow-wrap: anywhere; max-height: 4.4em; overflow: auto; }
.jv-caption .linkbtn { flex: none; font-size: 13px; color: var(--muted); text-decoration: none; }
.jv-progress { display: flex; align-items: center; gap: 12px; min-height: 36px; font-size: 14px; color: var(--muted); }
.jv-step { flex: 1 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--fg); }
.jv-progress .btn { min-height: 32px; padding: 4px 12px; font-size: 13px; }
.jv-scope:empty { display: none; }
.jv-note:empty { display: none; }
@media (max-width: 860px) {
  .jv-top { padding: 10px 14px; flex-wrap: nowrap; gap: 10px; }
  .jv-lead .eyebrow, #jv-open { display: none; }
  .jv-title { font-size: 18px; }
  .jv-host { padding: 10px 12px 170px; }
  .jv-bar { bottom: 12px; }
  .jv-acts .btn span { display: none; }
}
.ws-create .ask-input { min-height: 44px; width: 100%; }
.jv-hero[hidden], .jv-caption[hidden], .jv-progress[hidden], .jv-fix:empty { display: none; }
.jv .dash-titles { display: none; }                                  /* the page header already names the board */
.jv .dash-top { justify-content: flex-end; }
@media (max-width: 860px) { .chat, .jv { height: calc(100vh - 54px); height: calc(100dvh - 54px); } }          /* under the phone's top bar, so the composer is never cut off */
/* ==== end Ask Ghost + Jarvis pages ========================================================================================================== */

/* ==== Ads Management page (11 Nov 2026): the approval-level slider ========================================================================== */
.ads-page .field { display: grid; gap: 6px; max-width: 420px; margin-bottom: 14px; }
.ads-page select { width: 100%; }
.ads-page input[type=range] { width: 100%; max-width: 420px; accent-color: var(--accent); }
.ads-ticks { display: flex; justify-content: space-between; max-width: 420px; margin: 2px 0 10px; font-family: var(--mono, monospace); font-size: 12px; text-transform: uppercase; color: var(--muted); }
.ads-tick.on { color: var(--fg); font-weight: 600; }
.ads-page .actions { display: flex; align-items: center; gap: 12px; margin-top: 8px; }
/* ==== end Ads Management page ============================================================================================================== */
.ads-page ul.chips { list-style: none; padding: 0; margin: 8px 0; display: flex; flex-wrap: wrap; gap: 8px; }
.ads-page .ads-warn { border: 1px solid var(--err); background: var(--err-soft); color: var(--err); border-radius: 8px; padding: 10px 12px; max-width: 520px; }
.ads-page .field.check { display: flex; align-items: center; gap: 8px; }
.ads-page .hidden { display: none; }

/* ==== Enterprise billing page (11 Nov 2026) ================================================================================================ */
#enterprise-billing .ent-grid { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(280px, 1fr); gap: 24px; align-items: start; }
#enterprise-billing .ent-summary { position: sticky; top: 24px; }
#enterprise-billing .ent-lines { display: flex; flex-direction: column; }
#enterprise-billing .line { display: grid; grid-template-columns: minmax(0, 1fr) auto 84px; gap: 16px; align-items: center; padding: 18px 0; border-top: 1px solid var(--line); }
#enterprise-billing .line:first-child { border-top: 0; padding-top: 4px; }
#enterprise-billing .line-name { font-size: 17px; margin-bottom: 2px; }
#enterprise-billing .line-sub { text-align: right; font-size: 17px; font-variant-numeric: tabular-nums; }
#enterprise-billing .fixed { color: var(--muted); }
#enterprise-billing .stepper { display: inline-flex; align-items: center; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; }
#enterprise-billing .stepper .step { width: 44px; height: 44px; border: 0; background: transparent; color: inherit; font-size: 20px; cursor: pointer; }
#enterprise-billing .stepper .step:hover { background: var(--hover, rgba(127, 127, 127, 0.12)); }
#enterprise-billing .stepper input.qty { width: 56px; min-height: 44px; height: 44px; border: 0; border-left: 1px solid var(--line); border-right: 1px solid var(--line); border-radius: 0; text-align: center; font-variant-numeric: tabular-nums; -moz-appearance: textfield; }
#enterprise-billing .stepper input.qty::-webkit-outer-spin-button, #enterprise-billing .stepper input.qty::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
#enterprise-billing .sum-rows { display: flex; flex-direction: column; gap: 10px; }
#enterprise-billing .sum-row { display: flex; justify-content: space-between; gap: 12px; font-variant-numeric: tabular-nums; }
#enterprise-billing .sum-name { color: var(--muted); }
#enterprise-billing .sum-total { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; padding-top: 14px; border-top: 1px solid var(--line); }
#enterprise-billing .ent-total { font-size: 30px; font-weight: 400; font-variant-numeric: tabular-nums; }
#enterprise-billing .btn.wide { width: 100%; justify-content: center; }
#enterprise-billing .ent-secure { text-align: center; margin: 0; }
@media (max-width: 860px) {
  #enterprise-billing .ent-grid { grid-template-columns: 1fr; }
  #enterprise-billing .ent-summary { position: static; }
  #enterprise-billing .line { grid-template-columns: 1fr auto; }
  #enterprise-billing .line-main { grid-column: 1 / -1; }
}

.row-between { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }

/* read-only seat (viewer): the "You have a view-only seat" notice above every page, and the two seat counters on People */
.viewer-banner { padding: 16px 24px 0; }
.viewer-banner .banner { margin-bottom: 0; }
.seat-cards { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }
.seat-cards > .card { margin: 0; }


/* Status page (19 Nov 2026) */
.status-list { list-style: none; margin: 12px 0 0; padding: 0; display: grid; gap: 8px; }
.status-row { display: grid; grid-template-columns: minmax(110px, 160px) auto 1fr; gap: 10px; align-items: center; }
.status-overall-line { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; font-size: 16px; }
.status-ongoing { margin: 10px 0 0; padding-left: 20px; }
.status-meter { display: grid; grid-template-columns: 90px minmax(80px, 220px) auto 1fr; gap: 10px; align-items: center; }
.status-meter meter { width: 100%; height: 12px; }
.status-advice { margin: 6px 0 0; }
.status-advice.busy { font-weight: 600; }
.status-hours { display: grid; grid-template-columns: repeat(24, minmax(10px, 1fr)); gap: 3px; }
.status-hour { height: 30px; border-radius: 4px; border: 1px solid var(--line); position: relative; }
.status-hour.lvl-ok { background: color-mix(in srgb, var(--ok) 28%, transparent); }
.status-hour.lvl-busy { background: color-mix(in srgb, var(--warn) 40%, transparent); }
.status-hour.lvl-high { background: color-mix(in srgb, var(--err) 45%, transparent); }
.status-hour-n { position: absolute; bottom: -18px; left: 0; font-size: 11px; color: var(--muted); }
#status-hours .status-hours { margin-bottom: 18px; }
.status-incidents { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.status-incident { border-left: 3px solid var(--line); padding-left: 10px; }
.status-incident.ongoing { border-left-color: var(--err); }
@media (max-width: 640px) {
  .status-row { grid-template-columns: 1fr auto; }
  .status-row .muted { grid-column: 1 / -1; }
  .status-meter { grid-template-columns: 80px 1fr auto; }
  .status-meter > .muted { grid-column: 1 / -1; }
}
