:root {
    /* ── Skyrsoft brand palette — matches skyrsoft.app (marketing site) ─── */
    --bg: #fcfbfa;            /* app canvas — warm off-white, not cool gray */
    --bg-2: #f5f3f0;
    --panel: #ffffff;         /* cards, panels, bars */
    --panel-2: #f5f3f0;       /* subtle inset (table head, hovers) */
    --border: #e3ded7;
    --border-strong: #d3cbc0;
    --text: #18161c;          /* brand ink */
    --muted: #5b5762;         /* brand ink-muted */
    --accent: #3a47d5;        /* brand primary indigo */
    --accent-2: #df5f3c;      /* brand accent coral — secondary highlights only */
    --accent-ink: #2a34a8;    /* brand primary-strong, for text/links on white */
    --accent-grad: var(--accent); /* flat, not a gradient — matches the marketing site's solid CTAs */
    --accent-soft: #ececfb;   /* brand primary-tint */
    --accent-2-soft: #fbe9e2; /* brand accent-tint (coral) */
    --good: #1f7a4d;  --good-bg: rgba(31,122,77,.12);
    --warn: #b45309;  --warn-bg: #fdf4e7;
    --bad:  #b42318;  --bad-bg: rgba(180,35,24,.1);
    --radius: 12px;
    --shadow-sm: 0 1px 2px rgba(24,22,28,.05), 0 1px 3px rgba(24,22,28,.05);
    --shadow-md: 0 6px 18px rgba(24,22,28,.08);
    --shadow-lg: 0 14px 36px rgba(24,22,28,.14);
    --glow: 0 4px 14px rgba(58,71,213,.28);
    font-size: 16.5px;
}

* { box-sizing: border-box; }

body {
    margin: 0;
    background: var(--bg);
    color: var(--text);
    font-family: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    line-height: 1.55;
    -webkit-font-smoothing: antialiased;
}

a { color: var(--accent-ink); text-decoration: none; font-weight: 500; }
a:hover { text-decoration: underline; }

/* ── Top bar ─────────────────────────────────────────── */
.topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 24px;
    height: 64px;
    background: rgba(255,255,255,.85);
    backdrop-filter: saturate(180%) blur(12px);
    border-bottom: 1px solid var(--border);
    box-shadow: var(--shadow-sm);
    position: sticky; top: 0; z-index: 30;
}
.brand { display: flex; align-items: center; gap: 12px; }
.brand-mark {
    display: inline-grid; place-items: center;
    width: 32px; height: 32px; flex-shrink: 0;
}
.brand-mark svg { width: 100%; height: 100%; }
.brand-name {
    font-family: ui-monospace, "Cascadia Code", "JetBrains Mono", "SF Mono", Menlo, Consolas, monospace;
    font-weight: 600; font-size: 19px; letter-spacing: -.02em;
}
.brand-name .brand-hi { color: var(--accent-ink); }
.brand-sub {
    color: var(--muted); font-size: 12px; font-weight: 600;
    text-transform: uppercase; letter-spacing: .07em;
    padding: 3px 9px; border-radius: 999px; background: var(--panel-2); border: 1px solid var(--border);
}

.session { display: flex; align-items: center; gap: 12px; }
.session-user { color: var(--text); font-weight: 600; }

/* ── Shell / nav ─────────────────────────────────────── */
.shell { display: flex; min-height: calc(100vh - 64px); }
.sidenav {
    width: 232px; flex-shrink: 0;
    background: rgba(255,255,255,.6);
    border-right: 1px solid var(--border);
    padding: 18px 12px;
    display: flex; flex-direction: column; gap: 4px;
}
.nav-item {
    display: flex; align-items: center; gap: 12px;
    padding: 11px 13px; border-radius: 11px;
    color: var(--text); font-size: 15.5px; font-weight: 600;
    transition: background .14s ease, color .14s ease, box-shadow .14s ease;
}
.nav-item svg { width: 21px; height: 21px; flex-shrink: 0; opacity: .7; }
.nav-item:hover { background: var(--panel-2); text-decoration: none; }
.nav-item.active { background: var(--accent-grad); color: #fff; box-shadow: var(--glow); }
.nav-item.active svg { opacity: 1; }
.nav-item.active:hover { text-decoration: none; }
.nav-item.disabled { color: var(--muted); cursor: default; }
.nav-label { flex: 1; }
.soon {
    font-size: 10px; text-transform: uppercase; letter-spacing: .04em;
    background: var(--panel-2); color: var(--muted);
    padding: 1px 6px; border-radius: 6px;
}
.content { flex: 1; padding: 32px 40px; max-width: 1180px; }

/* ── Panels / cards ──────────────────────────────────── */
.page-title { margin: 0 0 4px; font-size: 27px; font-weight: 800; letter-spacing: -.02em; }
.page-sub { color: var(--muted); margin: 0 0 26px; font-size: 15px; }

.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 18px; }
.card {
    background: var(--panel); border: 1px solid var(--border);
    border-radius: var(--radius); padding: 20px 22px; box-shadow: var(--shadow-sm);
    transition: box-shadow .16s ease, transform .16s ease;
}
.card:hover { box-shadow: var(--shadow-md); transform: translateY(-1px); }
.card h3 { margin: 0 0 8px; font-size: 12.5px; color: var(--muted); font-weight: 700; text-transform: uppercase; letter-spacing: .04em; }
.card .metric { font-size: 32px; font-weight: 800; letter-spacing: -.02em; }
.card .metric.pending { color: var(--warn); }

.panel {
    background: var(--panel); border: 1px solid var(--border);
    border-radius: var(--radius); padding: 24px 26px; margin-bottom: 22px;
    box-shadow: var(--shadow-sm);
}
.panel h2 { margin: 0 0 16px; font-size: 18px; font-weight: 700; }

dl.kv { display: grid; grid-template-columns: 190px 1fr; gap: 9px 18px; margin: 0; }
dl.kv dt { color: var(--muted); }
dl.kv dd { margin: 0; word-break: break-all; }

/* ── Badges ──────────────────────────────────────────── */
.badge {
    display: inline-block; padding: 3px 10px; border-radius: 999px;
    font-size: 12.5px; font-weight: 700;
}
.badge-role { background: var(--accent-grad); color: #fff; box-shadow: var(--glow); }
.badge-good { background: var(--good-bg); color: var(--good); }
.badge-warn { background: var(--warn-bg); color: var(--warn); }

/* ── Auth / forms ────────────────────────────────────── */
.auth-wrap { min-height: 100vh; display: grid; place-items: center; }
.auth-card {
    width: 400px; background: var(--panel); border: 1px solid var(--border);
    border-radius: 18px; padding: 36px; text-align: center; box-shadow: var(--shadow-lg);
}
.auth-card .brand-mark { margin: 0 auto 16px; width: 56px; height: 56px; }
.auth-card h1 { font-size: 23px; margin: 0 0 4px; font-weight: 800; letter-spacing: -.02em; }
.auth-card p.sub { color: var(--muted); margin: 0 0 26px; font-size: 14.5px; }

/* First-run credentials panel on the sign-in page (new installs only). Left-aligned inside the
   otherwise centred auth card, because it is read rather than glanced at. */
.first-run { text-align: left; margin-bottom: 22px; }
.first-run p { margin: 8px 0 0; font-size: 13.5px; }
.first-run p.muted { font-size: 12.5px; }
.first-run-creds { display: grid; grid-template-columns: auto 1fr; gap: 4px 12px; margin: 12px 0 0; }
.first-run-creds dt { font-size: 12.5px; color: var(--muted); font-weight: 600; align-self: center; }
.first-run-creds dd { margin: 0; }
.first-run-creds code {
    font-size: 14px; padding: 3px 7px; border-radius: 6px;
    background: rgba(0,0,0,.06); user-select: all; word-break: break-all;
}

/* "Signing in as <user>" strip shown on the password step of the two-step local login. */
.identified-as { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; }
.identified-as strong { font-size: 14.5px; }
.link-subtle { margin-left: auto; font-size: 12.5px; color: var(--muted); text-decoration: underline; }
.link-subtle:hover { color: var(--accent); }

.form-row { text-align: left; margin-bottom: 16px; }
.form-row label { display: block; font-size: 13.5px; color: var(--muted); margin-bottom: 6px; font-weight: 600; }
.form-row input {
    width: 100%; padding: 11px 13px; border-radius: 10px;
    border: 1px solid var(--border-strong); background: #fff; color: var(--text);
    font-size: 15px;
}
.form-row input:focus, input.input:focus, select.input:focus, textarea.input:focus {
    outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft);
}

.btn {
    display: inline-block; border: none; border-radius: 10px; cursor: pointer;
    padding: 11px 18px; font-size: 14.5px; font-weight: 700; font-family: inherit;
    transition: transform .12s ease, box-shadow .12s ease, background .12s ease;
}
.btn-primary { background: var(--accent-grad); color: #fff; width: 100%; box-shadow: var(--glow); }
.btn-primary:hover { transform: translateY(-1px); box-shadow: 0 10px 24px rgba(58,71,213,.35); }
.btn-link { background: none; color: var(--muted); padding: 6px 8px; }
.btn-link:hover { color: var(--text); }
.inline { display: inline; margin: 0; }

.divider { display: flex; align-items: center; gap: 10px; color: var(--muted); font-size: 12.5px; margin: 22px 0; }
.divider::before, .divider::after { content: ""; flex: 1; height: 1px; background: var(--border); }

.alert { border-radius: 11px; padding: 13px 15px; font-size: 14.5px; margin-bottom: 20px; }
.alert-bad { background: var(--bad-bg); color: var(--bad); border: 1px solid rgba(214,48,48,.28); }
.alert-warn { background: var(--warn-bg); color: var(--warn); border: 1px solid rgba(185,116,11,.28); }
.alert-good { background: var(--good-bg); color: var(--good); border: 1px solid rgba(15,157,111,.28); }

.spinner {
    display: inline-block; width: 13px; height: 13px; vertical-align: -2px;
    border: 2px solid rgba(58,71,213,.25); border-top-color: var(--accent); border-radius: 50%;
    animation: spin .7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

.badge-bad { background: var(--bad-bg); color: var(--bad); }
.badge-muted { background: var(--panel-2); color: var(--muted); border: 1px solid var(--border); }

/* ── Tables ──────────────────────────────────────────── */
/* A light surface: white background + hairline border + rounded corners, but no drop shadow — so the
   table reads as a gentle grounded panel rather than a heavy floating module (or a flat, too-embedded
   strip). overflow-x is a thin-scrollbar safety net; cells wrap to fit, so it rarely triggers. */
.table-wrap {
    overflow-x: auto; scrollbar-width: thin;
    background: var(--panel); border: 1px solid var(--border); border-radius: var(--radius);
}
table.grid { width: 100%; border-collapse: collapse; font-size: 14.5px; }
/* No forced nowrap: cells wrap only when the table is tight, so it fits the content column instead
   of forcing a horizontal scrollbar. Action buttons and monospace values stay on one line. */
table.grid th, table.grid td { padding: 12px 16px; text-align: left; vertical-align: middle; }
table.grid td .btn { white-space: nowrap; }
table.grid thead th {
    background: var(--panel-2); color: var(--muted); font-weight: 700;
    font-size: 12px; text-transform: uppercase; letter-spacing: .04em;
    border-bottom: 1px solid var(--border);
}
table.grid tbody tr { border-top: 1px solid var(--border); }
table.grid tbody tr:hover { background: var(--panel-2); }
table.grid td.mono, table.grid td .mono { font-family: ui-monospace, "Cascadia Code", Consolas, monospace; font-size: 13px; }
.muted { color: var(--muted); }
.empty { padding: 30px; text-align: center; color: var(--muted); }

/* ── Table tools (filter + pagination, injected by table-tools.js) ── */
.table-controls { display: flex; align-items: center; gap: 12px; margin-bottom: 10px; font-size: 13.5px; }
.table-controls .tc-spacer { flex: 1; }
.table-controls .tc-count { color: var(--muted); font-variant-numeric: tabular-nums; }
.tc-filter-toggle {
    background: var(--panel); color: var(--text); border: 1px solid var(--border-strong);
    border-radius: 8px; padding: 6px 13px; font-size: 13px; font-weight: 700; cursor: pointer; font-family: inherit;
}
.tc-filter-toggle:hover, .tc-filter-toggle.active { border-color: var(--accent); color: var(--accent-ink); }
.tc-size { display: flex; align-items: center; gap: 6px; color: var(--muted); }
.tc-size select {
    padding: 5px 8px; border-radius: 8px; border: 1px solid var(--border-strong);
    background: #fff; color: var(--text); font-family: inherit; font-size: 13px;
}
.tc-pager { display: flex; align-items: center; gap: 6px; }
.tc-pager button, .tc-pager a, .tc-pager .tc-nav-disabled {
    width: 30px; height: 30px; border: 1px solid var(--border-strong); background: var(--panel);
    border-radius: 8px; cursor: pointer; color: var(--text); font-size: 16px; line-height: 28px;
    text-align: center; text-decoration: none; display: inline-block; box-sizing: border-box;
}
.tc-pager button:hover:not(:disabled), .tc-pager a:hover { border-color: var(--accent); color: var(--accent-ink); }
.tc-pager button:disabled { opacity: .4; cursor: default; }
.tc-pager .tc-nav-disabled { opacity: .4; cursor: default; }
.tc-pageinfo { color: var(--muted); min-width: 54px; text-align: center; font-variant-numeric: tabular-nums; }
table.grid tr.grid-filter th { padding: 6px 10px 8px; background: var(--panel-2); border-bottom: 1px solid var(--border); }
table.grid tr.grid-filter input {
    width: 100%; min-width: 70px; padding: 5px 8px; border: 1px solid var(--border-strong);
    border-radius: 6px; background: #fff; color: var(--text); font-family: inherit; font-size: 12.5px; font-weight: 400;
}
table.grid tr.grid-filter input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 2px var(--accent-soft); }

.toolbar { display: flex; align-items: center; justify-content: space-between; margin-bottom: 18px; gap: 12px; }
.btn-sm { padding: 7px 13px; font-size: 13.5px; box-shadow: none; }
.btn-secondary { background: var(--panel); color: var(--text); border: 1px solid var(--border-strong); }
.btn-secondary:hover { background: var(--panel-2); border-color: var(--accent); color: var(--accent-ink); }
.btn-danger { background: var(--bad); color: #fff; }
.crumb { color: var(--muted); font-size: 13.5px; margin-bottom: 8px; }
.crumb a { color: var(--muted); }
select, textarea { font-family: inherit; }
input.input, select.input, textarea.input {
    width: 100%; padding: 10px 13px; border-radius: 10px;
    border: 1px solid var(--border-strong); background: #fff; color: var(--text); font-size: 15px;
}
.form-inline { display: flex; gap: 12px; align-items: flex-end; flex-wrap: wrap; }
.form-inline .form-row { margin-bottom: 0; min-width: 180px; }

/* Inline help text under a form control (overrides dd's break-all for prose) */
.field-help {
    display: block; margin-top: 4px;
    font-size: 13px; line-height: 1.45; max-width: 560px;
    word-break: normal; overflow-wrap: anywhere;
}
.field-help em { font-style: normal; color: var(--warn); font-weight: 600; }

/* Compact primary button (the global .btn-primary is full-width for auth forms) */
.btn-primary.btn-sm, .toolbar .btn-primary, .subnav-actions .btn-primary { width: auto; }

/* ── Settings sub-navigation ─────────────────────────── */
.subnav {
    display: flex; gap: 4px; flex-wrap: wrap;
    border-bottom: 1px solid var(--border);
    margin: 0 0 24px; padding: 0;
}
.subnav a {
    padding: 10px 16px; border-radius: 10px 10px 0 0;
    color: var(--muted); font-size: 14.5px; font-weight: 700;
    border: 1px solid transparent; border-bottom: none;
    margin-bottom: -1px;
}
.subnav a:hover { color: var(--accent-ink); text-decoration: none; }
.subnav a.active {
    color: var(--accent-ink); background: var(--panel);
    border-color: var(--border);
}

/* ── User menu (topbar dropdown) ─────────────────────── */
.usermenu { position: relative; }
.usermenu > summary {
    list-style: none; cursor: pointer;
    display: flex; align-items: center; gap: 9px;
    padding: 6px 8px; border-radius: 10px;
}
.usermenu > summary:hover { background: var(--panel-2); }
.usermenu > summary::-webkit-details-marker { display: none; }
.usermenu > summary .caret { color: var(--muted); font-size: 11px; }
.usermenu[open] > summary .caret { transform: rotate(180deg); }
.usermenu-panel {
    position: absolute; right: 0; top: calc(100% + 8px);
    background: var(--panel); border: 1px solid var(--border);
    border-radius: 12px; padding: 8px; min-width: 210px; z-index: 40;
    box-shadow: var(--shadow-lg);
    display: flex; flex-direction: column; gap: 2px;
}
.usermenu-panel .menu-head { padding: 6px 10px 10px; border-bottom: 1px solid var(--border); margin-bottom: 6px; }
.usermenu-panel .menu-head .who { font-weight: 700; }
.usermenu-panel .menu-head .sub { color: var(--muted); font-size: 12.5px; word-break: break-all; }
.usermenu-panel a, .usermenu-panel button {
    display: block; width: 100%; text-align: left;
    padding: 9px 11px; border-radius: 8px; font-size: 14.5px;
    color: var(--text); background: none; border: none; cursor: pointer; font-family: inherit;
}
.usermenu-panel a:hover, .usermenu-panel button:hover { background: var(--panel-2); text-decoration: none; }

/* ── Role badge in topbar ────────────────────────────── */
.badge-role { display: inline-block; padding: 3px 10px; border-radius: 999px; font-size: 12px; }

/* ── Modal dialog (native <dialog>) ──────────────────── */
dialog.modal {
    border: 1px solid var(--border); border-radius: 18px;
    background: var(--panel); color: var(--text);
    width: 560px; max-width: calc(100vw - 32px); padding: 0;
    box-shadow: var(--shadow-lg);
}
dialog.modal::backdrop { background: rgba(24,22,28,.45); backdrop-filter: blur(2px); }
dialog.modal .modal-head {
    display: flex; align-items: center; justify-content: space-between;
    padding: 20px 24px; border-bottom: 1px solid var(--border);
}
dialog.modal .modal-head h2 { margin: 0; font-size: 18px; }
dialog.modal .modal-body { padding: 22px 24px; max-height: 70vh; overflow-y: auto; }
dialog.modal .modal-foot {
    display: flex; justify-content: flex-end; gap: 10px;
    padding: 18px 24px; border-top: 1px solid var(--border);
}
dialog.modal .modal-foot .btn-primary { width: auto; }
.modal-close { background: none; border: none; color: var(--muted); font-size: 24px; line-height: 1; cursor: pointer; padding: 0 4px; }
.modal-close:hover { color: var(--text); }

/* ── Topbar right cluster + Help button ──────────────── */
.topbar-right { display: flex; align-items: center; gap: 10px; }
.help-btn {
    display: inline-flex; align-items: center;
    height: 34px; padding: 0 14px; border-radius: 8px;
    background: var(--panel-2); border: 1px solid var(--border-strong);
    color: var(--muted); font-weight: 700; font-size: 13px; line-height: 1;
    text-decoration: none; transition: background .14s ease, color .14s ease, box-shadow .14s ease, border-color .14s ease;
}
.help-btn:hover {
    background: var(--accent-grad); color: #fff; border-color: transparent;
    box-shadow: var(--glow); text-decoration: none;
}

/* ── Help / documentation page ───────────────────────── */
.help { display: grid; grid-template-columns: 236px minmax(0, 1fr); gap: 40px; align-items: start; }

/* Its own card (background/border/padding), not just a bare list of links — sitting directly beside
   the app's real .sidenav, an unstyled TOC read as more app navigation instead of page-local contents
   (worse still, both contain a "Dashboard" entry at nearly the same row). */
.help-toc {
    position: sticky; top: 88px; align-self: start; max-height: calc(100vh - 108px); overflow-y: auto;
    scrollbar-width: thin;
    background: var(--panel); border: 1px solid var(--border); border-radius: var(--radius);
    padding: 14px; box-shadow: var(--shadow-sm);
}
.help-search { margin-bottom: 12px; }
.help-search input {
    width: 100%; padding: 9px 12px; border-radius: 10px;
    border: 1px solid var(--border-strong); background: #fff; color: var(--text);
    font-family: inherit; font-size: 14px;
}
.help-search input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.help-toc nav { display: flex; flex-direction: column; gap: 1px; }
.help-toc .toc-group {
    font-size: 11px; text-transform: uppercase; letter-spacing: .06em; font-weight: 800;
    color: var(--muted); margin: 16px 0 4px; padding: 0 10px;
}
.help-toc .toc-group:first-child { margin-top: 0; }
.help-toc nav a {
    display: block; padding: 6px 10px; border-radius: 8px;
    color: var(--text); font-size: 13.7px; font-weight: 500; border-left: 2px solid transparent;
}
.help-toc nav a:hover { background: var(--panel-2); text-decoration: none; }
.help-toc nav a.active {
    background: var(--accent-soft); color: var(--accent-ink);
    font-weight: 700; border-left-color: var(--accent);
}

.help-body { min-width: 0; }
.help-hero { margin-bottom: 8px; }
.help-back {
    display: inline-flex; align-items: center; gap: 4px;
    margin-bottom: 12px; color: var(--muted); font-size: 13.5px; font-weight: 700;
    text-decoration: none;
}
.help-back:hover { color: var(--accent-ink); text-decoration: none; }
.help-noresults { color: var(--muted); font-style: italic; margin-top: 10px; }

.help-sec {
    padding: 22px 0 6px; border-top: 1px solid var(--border); scroll-margin-top: 84px;
    /* This page is one long document (~30 sections). Rendered as a single tall layer it can exceed
       the browser's max compositing-layer height on some GPUs (notably VMs / remote desktops),
       leaving deep sections blank when you jump straight to them. content-visibility lets the browser
       skip rendering off-screen sections entirely, so only what's near the viewport is painted — which
       keeps the rendered height well within limits. contain-intrinsic-size reserves an estimate for a
       skipped section so the scrollbar and #anchor offsets stay stable; `auto` remembers each
       section's real height once it has been rendered. */
    content-visibility: auto;
    contain-intrinsic-size: auto 420px;
}
.help-sec:first-of-type { border-top: none; padding-top: 6px; }
.help-sec h2 { font-size: 22px; font-weight: 800; letter-spacing: -.01em; margin: 0 0 12px; }
.help-sec h3 { font-size: 16px; font-weight: 700; margin: 20px 0 8px; }
.help-sec p { margin: 0 0 12px; }
.help-sec p:last-child { margin-bottom: 0; }
.help-sec code {
    font-family: ui-monospace, "Cascadia Code", Consolas, monospace; font-size: .86em;
    background: var(--panel-2); border: 1px solid var(--border); border-radius: 5px; padding: 1px 5px;
    word-break: break-word;
}
.help-sec pre.help-code {
    font-family: ui-monospace, "Cascadia Code", Consolas, monospace; font-size: .86em;
    background: var(--panel-2); border: 1px solid var(--border); border-radius: 6px;
    padding: 10px 14px; margin: 0 0 14px; overflow-x: auto; white-space: pre-wrap; word-break: break-word;
}

.help-list, .help-steps { margin: 0 0 14px; padding-left: 22px; }
.help-list li, .help-steps li { margin-bottom: 7px; }
.help-steps { counter-reset: none; }

dl.help-defs { margin: 0 0 14px; }
dl.help-defs dt { font-weight: 700; margin-top: 14px; color: var(--text); }
dl.help-defs dt:first-child { margin-top: 0; }
dl.help-defs dd { margin: 3px 0 0; color: var(--text); }
dl.help-defs dt.admin-dt { display: flex; align-items: center; gap: 8px; }

/* Admin-only pill */
.pill {
    display: inline-block; font-size: 10.5px; font-weight: 800; text-transform: uppercase;
    letter-spacing: .04em; padding: 2px 8px; border-radius: 999px; vertical-align: middle;
}
.pill-admin { background: var(--accent-soft); color: var(--accent-ink); border: 1px solid rgba(58,71,213,.28); }
h2 .pill { vertical-align: 3px; margin-left: 6px; }

/* Callouts */
.callout {
    border-radius: 12px; padding: 13px 16px; margin: 4px 0 16px; font-size: 14.5px;
    border: 1px solid var(--border); background: var(--panel-2);
}
.callout p { margin: 0; }
.callout-info { background: var(--accent-soft); border-color: rgba(58,71,213,.25); }
.callout-warn { background: var(--warn-bg); border-color: rgba(185,116,11,.28); }
.callout em { font-style: italic; }

/* Screenshot placeholders */
figure.shot { position: relative; margin: 6px 0 18px; }
figure.shot img { display: none; max-width: 100%; height: auto; border: 1px solid var(--border); border-radius: 12px; box-shadow: var(--shadow-sm); }
figure.shot.has-img img { display: block; cursor: zoom-in; }
figure.shot.has-img .shot-ph { display: none; }

/* Zoom-to-full-size button — only on a figure whose real screenshot has loaded. */
.shot-zoom {
    display: none; position: absolute; top: 10px; right: 10px; z-index: 2;
    width: 34px; height: 34px; padding: 0; border-radius: 9px; cursor: zoom-in;
    align-items: center; justify-content: center;
    border: 1px solid var(--border-strong); background: rgba(255, 255, 255, .92); color: var(--text);
    box-shadow: var(--shadow-sm); transition: background .14s ease, color .14s ease, box-shadow .14s ease;
}
figure.shot.has-img .shot-zoom { display: inline-flex; }
.shot-zoom:hover { background: var(--accent-grad); color: #fff; border-color: transparent; box-shadow: var(--glow); }
.shot-zoom:focus-visible { outline: none; box-shadow: 0 0 0 3px var(--accent-soft); }

/* Lightbox overlay. Visibility is driven purely by the [hidden] attribute (display:none/flex) — no
   opacity transition, so it can never end up shown-but-transparent if a fade is throttled. */
.shot-lightbox {
    position: fixed; inset: 0; z-index: 1000; padding: 28px;
    flex-direction: column; align-items: center; justify-content: center; gap: 12px;
    background: rgba(15, 17, 26, .82);
}
.shot-lightbox { display: flex; }
.shot-lightbox[hidden] { display: none; }
.shot-lightbox img { max-width: 96vw; max-height: 88vh; width: auto; height: auto; background: #fff; border-radius: 10px; box-shadow: 0 18px 60px rgba(0, 0, 0, .55); }
.shot-lightbox-cap { margin: 0; color: rgba(255, 255, 255, .82); font-size: 13.5px; text-align: center; max-width: 900px; }
.shot-lightbox-close {
    position: fixed; top: 16px; right: 20px; width: 40px; height: 40px; border-radius: 999px; cursor: pointer;
    display: inline-flex; align-items: center; justify-content: center; line-height: 1; font-size: 24px;
    border: 1px solid rgba(255, 255, 255, .3); background: rgba(255, 255, 255, .12); color: #fff;
}
.shot-lightbox-close:hover { background: rgba(255, 255, 255, .24); }
.shot-lightbox-close:focus-visible { outline: none; box-shadow: 0 0 0 3px rgba(255, 255, 255, .4); }
.shot-ph {
    display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px;
    min-height: 132px; padding: 22px; text-align: center;
    border: 2px dashed var(--border-strong); border-radius: 12px; background: var(--panel-2); color: var(--muted);
}
.shot-ph-ic { font-size: 26px; opacity: .7; }
.shot-ph-t { font-weight: 700; font-size: 13.5px; text-transform: uppercase; letter-spacing: .05em; }
.shot-ph code { font-size: 12.5px; }
figure.shot figcaption { margin-top: 8px; color: var(--muted); font-size: 13px; line-height: 1.45; }

.help-foot { margin-top: 28px; padding-top: 16px; border-top: 1px solid var(--border); font-size: 13px; }

@media (max-width: 900px) {
    .help { grid-template-columns: 1fr; gap: 20px; }
    .help-toc { position: static; max-height: none; overflow: visible; }
    .help-toc nav { display: none; }
}
