/* Web portal layout (Phase 5). Tokens and components come from _content/FamilyBrowserNextGen.Ui/ui.css. */

.muted { color: var(--muted); }

/* ---------------------------------------------------------------- loading, errors */
.boot {
    min-height: 100vh; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px;
    color: var(--muted); font-family: var(--font);
}
.boot-logo { color: var(--accent); }
#blazor-error-ui {
    display: none; position: fixed; left: 16px; right: 16px; bottom: 16px; z-index: 1000;
    padding: 14px 48px 14px 16px; border-radius: var(--radius-lg);
    background: var(--danger-soft); color: var(--ink); border: 1px solid var(--danger-line); box-shadow: var(--shadow);
}
#blazor-error-ui .dismiss {
    position: absolute; right: 8px; top: 8px; width: 32px; height: 32px; border: 0; background: transparent;
    font-size: 20px; cursor: pointer; color: inherit;
}
.skip-link { position: absolute; left: -9999px; top: 8px; z-index: 100; }
.skip-link:focus { left: 8px; padding: 8px 12px; background: var(--panel); border-radius: var(--radius); }
/* The page heading (App.razor's FocusOnNavigate) and <main> (skip link) take focus from code so screen readers start
   there; they aren't controls, so no focus ring (browsers show one on load because the focus wasn't from a mouse). */
[tabindex="-1"]:focus, [tabindex="-1"]:focus-visible { outline: none; }

/* ---------------------------------------------------------------- app shell */
.app { display: flex; min-height: 100vh; }
.app-main { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; }
.app-content { flex: 1 1 auto; outline: none; }
.app-strip { padding: 12px 32px 0; }
/* "A new version is ready": solid and hard to miss (owner, 20 Oct 2026). */
.ui-banner.update-ready {
    background: var(--accent); border-color: var(--accent); color: var(--on-accent);
    box-shadow: 0 4px 14px rgba(0, 0, 0, .18);
}
.ui-banner.update-ready .ui-banner-icon { color: var(--on-accent); }
.ui-banner.update-ready .ui-btn,
.ui-banner.update-ready .ui-btn:hover { background: var(--on-accent); border-color: var(--on-accent); color: var(--accent); font-weight: 600; }
.app-scrim { display: none; }

.rail {
    position: sticky; top: 0; align-self: flex-start;
    width: 240px; flex: none; height: 100vh; overflow-y: auto;
    display: flex; flex-direction: column; gap: 4px; padding: 20px 14px;
    background: var(--rail); color: var(--rail-ink);
}
.rail-brand { display: flex; align-items: center; gap: 10px; padding: 4px 8px 18px; color: #ffffff; text-decoration: none; }
.rail-brand:hover { color: #ffffff; }
.rail-brand img { border-radius: 8px; }
.rail-brand-text { display: flex; flex-direction: column; line-height: 1.15; }
.rail-brand-name { font-weight: 600; font-size: 15px; }
.rail-brand-sub { font-size: 12px; color: var(--rail-muted); }
.rail-company {
    display: flex; flex-direction: column; gap: 2px; margin: 0 0 14px; padding: 10px 12px;
    border-radius: var(--radius); border: 1px solid var(--rail-line); background: var(--rail-2); color: #ffffff;
}
.rail-company-name { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rail-company-key { font-size: 11px; color: var(--rail-muted); }
.rail-link {
    display: flex; align-items: center; gap: 12px; min-height: 40px; padding: 0 12px; width: 100%;
    border: 0; border-radius: var(--radius); background: transparent;
    color: var(--rail-ink); font: inherit; text-align: left; text-decoration: none; cursor: pointer;
}
.rail-link:hover { background: var(--rail-2); color: #ffffff; }
.rail-link.active { background: var(--accent); color: var(--on-accent); font-weight: 600; }
:root[data-theme="dark"] .rail-link.active { color: #0b1520; }
.rail-section {
    margin: 20px 8px 6px; font-size: 11px; letter-spacing: .08em; text-transform: uppercase; color: var(--rail-muted);
}
.rail :focus-visible { outline-color: #7dbcec; }

.topbar {
    display: flex; align-items: center; gap: 12px; min-height: 68px; padding: 12px 32px;
    background: var(--panel); border-bottom: 1px solid var(--line);
}
.topbar-menu { display: none; }
.topbar-btn { border-color: var(--line); }
.topbar-readonly {
    display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; border-radius: 999px;
    background: var(--panel-alt); border: 1px solid var(--line); color: var(--muted); font-size: 13px;
}
.topbar-user { display: flex; align-items: center; gap: 10px; padding: 4px 8px 4px 4px; border-radius: var(--radius); color: var(--ink); text-decoration: none; }
.topbar-user:hover { background: var(--panel-alt); color: var(--ink); }
.topbar-user-text { display: flex; flex-direction: column; line-height: 1.2; }
.topbar-user-name { font-weight: 600; }
.topbar-user-role { font-size: 12px; color: var(--muted); }
.avatar {
    width: 36px; height: 36px; border-radius: 50%; flex: none;
    display: inline-flex; align-items: center; justify-content: center;
    background: var(--accent-soft); color: var(--accent); font-weight: 600; font-size: 13px;
}

/* Narrow screens: the rail slides in over the page. */
@media (max-width: 900px) {
    .rail {
        position: fixed; left: 0; top: 0; z-index: 50; height: 100vh; width: min(280px, 86vw);
        transform: translateX(-105%); transition: transform .18s ease-out;
    }
    .menu-open .rail { transform: none; box-shadow: var(--shadow); }
    .menu-open .app-scrim { display: block; position: fixed; inset: 0; z-index: 40; border: 0; background: rgba(15, 42, 68, .35); }
    .topbar { padding: 10px 16px; }
    .topbar-menu { display: inline-flex; }
    .topbar-user-text { display: none; }
    .app-strip { padding: 12px 16px 0; }
}

/* ---------------------------------------------------------------- pages */
.page {
    max-width: 1240px; padding: 28px 32px 48px; display: flex; flex-direction: column; gap: 20px;
}
.page-head { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 12px 16px; }
.page-head h1 { font-size: 28px; }
.page-head p { margin: 6px 0 0; }
@media (max-width: 900px) { .page { padding: 20px 16px 40px; } .page-head h1 { font-size: 24px; } }

.grid-2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 16px; }

.facts { display: grid; grid-template-columns: max-content 1fr; gap: 10px 20px; margin: 0; }
.facts dt { color: var(--muted); }
.facts dd { margin: 0; min-width: 0; overflow-wrap: anywhere; }

.sub-strip {
    display: flex; flex-wrap: wrap; align-items: center; gap: 10px 20px; padding: 14px 18px;
    background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius-lg);
}
.sub-strip-state { display: inline-flex; align-items: center; gap: 8px; font-weight: 600; }
.sub-strip a { font-weight: 600; }
.dot { width: 10px; height: 10px; border-radius: 50%; flex: none; background: var(--muted); }
.dot-success { background: var(--success); }
.dot-danger { background: var(--danger); }
.dot-muted { background: var(--line-strong); }

.steps { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.steps li { display: flex; align-items: center; gap: 12px; padding: 12px 0; border-top: 1px solid var(--line-soft); }
.steps li:first-child { border-top: 0; padding-top: 0; }
.steps-mark {
    width: 22px; height: 22px; flex: none; border-radius: 50%; border: 1.5px solid var(--line-strong);
    display: inline-flex; align-items: center; justify-content: center;
}
.steps li.is-done .steps-mark { background: var(--success); border-color: var(--success); color: #ffffff; }
.steps-text { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.steps-title { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }

/* Overview › Needs attention (design: Main.dc.html) */
.attention { display: flex; flex-direction: column; gap: 10px; }
.attention-item { display: flex; align-items: center; gap: 12px; padding: 12px; border-radius: var(--radius); border: 1px solid transparent;
                  color: var(--ink); text-decoration: none; }
.attention-item:hover { color: var(--ink); filter: brightness(.98); }
.attention-item:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.attention-item .ui-icon, .attention-item svg { flex: none; color: var(--muted); }
.attention-count { flex: none; min-width: 1.5em; font-weight: 700; }
.attention-text { flex: 1; min-width: 0; }
.attention-item.is-danger { background: var(--danger-soft); border-color: var(--danger-line); }
.attention-item.is-danger .attention-count { color: var(--danger); }
.attention-item.is-warning { background: var(--warning-soft); border-color: var(--warning-line); }
.attention-item.is-warning .attention-count { color: var(--warning); }
.attention-item.is-info { background: var(--accent-soft); border-color: var(--accent-line); }
.attention-item.is-info .attention-count { color: var(--accent); }
.attention-clear { display: flex; align-items: center; gap: 10px; }
.attention-clear-icon { width: 28px; height: 28px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center;
                        background: var(--success-soft); color: var(--success); flex: none; }

/* ---------------------------------------------------------------- sign-in */
.bare { min-height: 100vh; }
.signin { display: flex; flex-wrap: wrap; min-height: 100vh; }
.signin-brand {
    flex: 1 1 440px; display: flex; flex-direction: column; gap: 40px; padding: 56px;
    background: var(--rail); color: #ffffff;
}
.signin-logo { display: flex; align-items: center; gap: 12px; font-weight: 600; font-size: 18px; }
.signin-logo img { border-radius: 10px; }
.signin-pitch { max-width: 520px; display: flex; flex-direction: column; gap: 16px; }
.signin-headline { margin: 0; font-size: 42px; line-height: 1.1; font-weight: 600; letter-spacing: -0.02em; }
.signin-sub { margin: 0; color: var(--rail-ink); font-size: 17px; line-height: 1.5; }
.signin-foot { margin-top: auto; color: var(--rail-muted); font-size: 13px; }
.signin-form-side { flex: 1 1 440px; display: flex; align-items: center; justify-content: center; padding: 48px 24px; }
.signin-form { width: 100%; max-width: 400px; display: flex; flex-direction: column; gap: 18px; }
.signin-form h1 { font-size: 28px; }
.signin-form p { margin: 6px 0 0; }
.signin-help { font-size: 13px; }
@media (max-width: 900px) {
    .signin-brand { flex-basis: 100%; padding: 28px 24px; gap: 16px; }
    .signin-headline { font-size: 26px; }
    .signin-sub, .signin-foot { display: none; }
}

/* ---------------------------------------------------------------- step 5c screens */
.page-wide { max-width: 1480px; }
.page-head-text { flex: 1 1 420px; min-width: 0; }
.page-head-text p { max-width: 760px; }
.section-title { font-size: 17px; margin: 8px 0 -6px; }
.small { font-size: 13px; }
.panel-pad { padding: 0 18px 18px; }

.tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 16px; }
.grid-2-1 { display: grid; grid-template-columns: minmax(0, 2fr) minmax(280px, 1fr); gap: 16px; }
@media (max-width: 1100px) { .grid-2-1 { grid-template-columns: 1fr; } }

@keyframes portal-pulse { 0%, 100% { opacity: .55; } 50% { opacity: 1; } }
.chart-skeleton, .tree-skeleton, .is-skeleton {
    background: var(--panel-alt); border-radius: var(--radius); animation: portal-pulse 1.4s ease-in-out infinite;
}
.chart-skeleton { height: 200px; }
.tree-skeleton { height: 320px; margin: 12px; }
@media (prefers-reduced-motion: reduce) { .chart-skeleton, .tree-skeleton, .is-skeleton { animation: none; } }

/* Overview: licence ring with its facts beside it. */
.licence-use { display: flex; flex-wrap: wrap; align-items: center; gap: 20px; }
.licence-use-facts { flex: 1 1 160px; display: flex; flex-direction: column; gap: 6px; }

/* Chips: filters (buttons) and tags (spans). */
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip {
    display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; border-radius: 999px;
    border: 1px solid var(--line); background: var(--panel); color: var(--ink); font: inherit; font-size: 13px; line-height: 1.4;
}
button.chip { cursor: pointer; }
button.chip:hover { border-color: var(--line-strong); }
button.chip:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
.chip.is-active { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
.chip.is-active .ui-mono { opacity: .85; }
.chip.is-on { background: var(--success-soft); border-color: var(--success); }
.chip.is-off { color: var(--muted); border-style: dashed; }

/* People */
.person { display: inline-flex; align-items: center; gap: 10px; min-width: 0; }
.avatar-sm { width: 28px; height: 28px; font-size: 12px; }
.build-cell { display: inline-flex; align-items: center; gap: 6px; }
.build-more { font: inherit; font-size: 12px; font-weight: 500; color: var(--accent); background: var(--accent-soft); border: 1px solid var(--accent-line); border-radius: 999px; padding: 0 8px; line-height: 20px; cursor: pointer; }
.build-more:hover { background: var(--accent-line); }
.build-popover { left: 0; right: auto; min-width: 300px; padding: 6px 0; gap: 0; cursor: default; }
.build-popover-head { padding: 4px 12px 8px; font-weight: 600; border-bottom: 1px solid var(--line-soft); margin-bottom: 4px; white-space: nowrap; }
.build-popover-row { display: grid; grid-template-columns: 44px auto 1fr; align-items: center; gap: 10px; padding: 4px 12px; white-space: nowrap; }
.use-bar { display: inline-flex; align-items: center; gap: 8px; justify-content: center; }
.use-bar-track { width: 72px; height: 6px; border-radius: 3px; background: var(--line-soft); overflow: hidden; }
.use-bar-fill { display: block; height: 100%; background: var(--series-1); border-radius: 3px; }
.sheet-section { display: flex; flex-direction: column; gap: 8px; padding-top: 16px; margin-top: 16px; border-top: 1px solid var(--line-soft); }
.sheet-section h3 { font-size: 15px; margin: 0; }
.plain-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.plain-list li { display: flex; align-items: center; gap: 8px; }
.group-libraries { display: flex; flex-wrap: wrap; gap: 6px; }
.detail-text { display: flex; flex-direction: column; gap: 8px; padding: 4px 0; }
.detail-text p { margin: 0; }
.facts-wide { grid-template-columns: minmax(140px, max-content) 1fr; }
.path { margin: 0 0 12px; overflow-wrap: anywhere; color: var(--muted); }

/* Licences: a dot per seat owned. */
.seat-bar { display: flex; flex-wrap: wrap; gap: 3px; margin-top: 8px; }
.seat { width: 10px; height: 10px; border-radius: 2px; background: var(--line-soft); border: 1px solid var(--line); }
.seat.is-on { background: var(--series-1); border-color: var(--series-1); }

/* Cloud library: folders on the left, files on the right. */
.split { display: grid; grid-template-columns: minmax(240px, 320px) minmax(0, 1fr); gap: 16px; align-items: start; }
.split-side {
    background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius-lg);
    position: sticky; top: 16px; max-height: calc(100vh - 140px); overflow: auto;
}
.split-side-head {
    display: flex; flex-direction: column; gap: 8px; padding: 14px 16px; border-bottom: 1px solid var(--line-soft);
    position: sticky; top: 0; background: var(--panel); z-index: 1;
}
.split-main { display: flex; flex-direction: column; gap: 12px; min-width: 0; }
@media (max-width: 900px) {
    .split { grid-template-columns: 1fr; }
    .split-side { position: static; max-height: 360px; }
}
.legend { display: flex; flex-wrap: wrap; gap: 4px 12px; font-size: 12px; color: var(--muted); }
.legend-item { display: inline-flex; align-items: center; gap: 6px; }
.legend-line { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
/* Folder kinds: shape as well as colour, so it isn't colour alone. */
.kind { width: 10px; height: 10px; flex: none; display: inline-block; border: 1.5px solid var(--muted); }
.kind-library { background: var(--series-1); border-color: var(--series-1); border-radius: 2px; }
.kind-group { background: var(--series-2); border-color: var(--series-2); border-radius: 50%; }
.kind-tab { background: var(--success); border-color: var(--success); transform: rotate(45deg) scale(.85); }
.kind-subfolder { background: transparent; border-color: var(--warning); border-radius: 50%; }
.kind-none { background: transparent; border-style: dashed; }
.tree-name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tree-years { font-size: 11px; color: var(--muted); }
.folder-head { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; }
.crumbs { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 6px; font-weight: 600; flex: 1 1 260px; min-width: 0; }
.crumbs [aria-hidden="true"] { color: var(--muted); font-weight: 400; }
.crumb { border: 0; background: none; padding: 0; font: inherit; color: var(--accent); cursor: pointer; }
.crumb:hover { text-decoration: underline; }
.crumb:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; border-radius: 2px; }
.file-name { display: inline-flex; align-items: center; gap: 10px; min-width: 0; }
.file-icon {
    width: 32px; height: 32px; flex: none; border-radius: var(--radius); background: var(--panel-alt);
    display: inline-flex; align-items: center; justify-content: center; color: var(--muted);
}
.file-text { display: flex; flex-direction: column; min-width: 0; }
.file-title { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.storage-note { display: inline-flex; align-items: center; gap: 6px; color: var(--muted); font-size: 14px; }

/* Libraries: types in the family sheet. */
.type-list { display: flex; flex-wrap: wrap; gap: 6px; }
.type-item {
    padding: 4px 10px; border-radius: var(--radius); border: 1px solid var(--line); background: var(--panel);
    color: var(--ink); font: inherit; font-size: 13px; cursor: pointer;
}
.type-item:hover { border-color: var(--line-strong); }
.type-item.is-selected { background: var(--accent-soft); border-color: var(--accent); color: var(--accent); font-weight: 600; }
.type-item:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }

/* Sharing */
.share-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 16px; }
.share-card {
    display: flex; flex-direction: column; min-height: 260px; overflow: hidden;
    background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius-lg);
}
.share-card.is-skeleton { border: 0; }
/* The whole picture, shrunk to fit (owner, 21 Oct 2026: covering the strip blew logos up and cut them off). */
.share-image {
    height: 96px; padding: 10px 16px; box-sizing: border-box; display: flex; align-items: center; justify-content: center;
    background: var(--panel-alt); color: var(--muted); border-bottom: 1px solid var(--line-soft);
}
.share-image img { max-width: 100%; max-height: 100%; width: auto; height: auto; object-fit: contain; border-radius: 4px; }
.share-body { display: flex; flex-direction: column; gap: 10px; padding: 14px 16px 16px; flex: 1; }
.share-title { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 8px; }
.share-title h2 { font-size: 16px; margin: 0; flex: 1 1 auto; }
.share-text {
    margin: 0; color: var(--ink-2); font-size: 14px;
    display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden;
}
.share-foot { margin-top: auto; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px; }
.share-state { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; color: var(--muted); }
.share-state.is-on { color: var(--success); font-weight: 600; }

/* Share dialog (step 5e part 3) */
.share-edit { display: flex; flex-wrap: wrap; gap: 20px; }
.share-edit-picture { flex: 0 0 200px; display: flex; flex-direction: column; gap: 8px; align-items: flex-start; }
.share-edit-picture .share-image { width: 200px; height: 130px; border: 1px solid var(--line); border-radius: var(--radius-lg); overflow: hidden; }
.share-edit-fields { flex: 1 1 280px; display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.share-edit-fields p { margin: -4px 0 4px; }
.share-description { width: 100%; resize: vertical; min-height: 80px; font: inherit; }
.share-invite { margin-top: 16px; display: flex; flex-direction: column; gap: 8px; }
.share-invite-row { display: flex; align-items: flex-end; gap: 8px; }
.share-invite-row .ui-field { flex: 1; }
.share-members { margin-top: 16px; display: flex; flex-direction: column; gap: 8px; }
.chip-remove {
    display: inline-flex; align-items: center; justify-content: center; width: 18px; height: 18px; margin-right: -4px;
    border: 0; border-radius: 999px; background: transparent; color: var(--muted); cursor: pointer;
}
.chip-remove:hover { background: var(--panel-alt); color: var(--ink); }
.chip-remove:focus-visible { outline: 2px solid var(--focus); outline-offset: 1px; }

/* Add from container (step 5e part 3) */
.project-tree {
    margin-top: 10px; max-height: 50vh; overflow: auto; padding: 8px 10px;
    border: 1px solid var(--line); border-radius: var(--radius-lg); background: var(--panel);
}
.project-group > summary { cursor: pointer; padding: 4px 0; font-weight: 600; }
.project-group > div { padding-left: 18px; }
.project-item { padding: 2px 0; }
.project-item .project-item { padding-left: 22px; }

/* Account */
.profile { display: flex; align-items: center; gap: 14px; margin-bottom: 16px; }
.profile .avatar { width: 48px; height: 48px; font-size: 16px; }

/* Component kit */
.kit-row { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.kit-stack { display: flex; flex-direction: column; gap: 14px; }

/* Step 5d: People changes */
.role-edit { display: flex; align-items: flex-end; gap: 10px; margin-bottom: 16px; }
.role-edit > :first-child { flex: 1; }
.group-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 10px; }
.sheet-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.picker-head { font-size: 14px; margin: 14px 0 6px; color: var(--muted); font-weight: 600; }
.picker-head:first-of-type { margin-top: 4px; }
.picker-list { display: flex; flex-direction: column; gap: 2px; max-height: 50vh; overflow: auto; }
.picker-item {
    display: flex; align-items: center; gap: 10px; padding: 7px 10px; border-radius: var(--radius); cursor: pointer;
    border: 1px solid transparent;
}
.picker-item:hover { background: var(--panel-alt); }
.picker-item.is-on { background: var(--accent-soft); border-color: var(--accent-line); }
.picker-item input { width: 16px; height: 16px; accent-color: var(--accent); flex: none; }
.picker-name { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.picker-note { font-size: 12px; color: var(--muted); white-space: nowrap; }
.picker-count { margin-right: auto; }
.seat-actions { display: inline-flex; gap: 6px; justify-content: flex-end; }

/* Step 5g: Account */
.form-stack { display: flex; flex-direction: column; gap: 14px; max-width: 520px; margin-bottom: 16px; }
.palette-form { display: flex; flex-direction: column; gap: 14px; max-width: 520px; }
.palette-size { display: grid; grid-template-columns: 130px 1fr 60px; align-items: center; gap: 12px; }
.palette-size input[type="range"] { width: 100%; accent-color: var(--accent); }
.palette-row { display: flex; align-items: center; gap: 12px; }
.palette-row > span:first-child { width: 130px; }
.avatar-img { object-fit: cover; padding: 0; }
.avatar-upload { position: relative; display: inline-block; margin-top: 8px; cursor: pointer; }
.avatar-upload input { position: absolute; inset: 0; opacity: 0; cursor: pointer; width: 100%; }
.avatar-upload:focus-within .ui-btn { outline: 2px solid var(--focus); outline-offset: 2px; }
.sub-flow { display: flex; flex-direction: column; gap: 18px; }
.sub-fieldset { border: 1px solid var(--line-soft); border-radius: var(--radius-lg); padding: 14px 16px; margin: 0; display: flex; flex-direction: column; gap: 10px; }
.sub-fieldset legend { font-weight: 600; padding: 0 6px; }
.sub-stepper { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.sub-number, .sub-field input {
    width: 90px; min-height: 34px; padding: 4px 8px; border: 1px solid var(--line-strong); border-radius: var(--radius);
    background: var(--panel); color: var(--ink); font: inherit;
}
.sub-field { display: flex; flex-direction: column; gap: 4px; }
.sub-field input { width: 200px; }
.sub-options { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 8px; }
.sub-option {
    display: flex; flex-direction: column; align-items: flex-start; gap: 2px; padding: 10px 12px; text-align: left;
    border: 1px solid var(--line); border-radius: var(--radius); background: var(--panel); color: var(--ink); font: inherit; cursor: pointer;
}
.sub-option:hover { border-color: var(--line-strong); }
.sub-option.is-on { border-color: var(--accent); background: var(--accent-soft); }
.sub-option:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
.sub-coupon { display: flex; align-items: flex-end; gap: 8px; }
.sub-coupon > :first-child { flex: 1; max-width: 320px; }
.sub-summary { display: flex; flex-direction: column; gap: 10px; padding: 14px 16px; background: var(--panel-alt); border-radius: var(--radius-lg); }
.sub-summary h3 { margin: 0; font-size: 15px; }
.sub-lines { display: flex; flex-direction: column; gap: 6px; }
.sub-line, .sub-total-row { display: flex; justify-content: space-between; gap: 12px; }
.sub-line-text { display: flex; flex-direction: column; }
.sub-total { font-weight: 700; border-top: 1px solid var(--line); padding-top: 6px; }
.sub-error { color: var(--danger); }
.sub-card-form { display: flex; flex-direction: column; gap: 10px; }
.sub-card-form-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.sub-card-form-head h3 { margin: 0; font-size: 15px; }
.stripe-host { min-height: 40px; }
.sub-done { display: flex; flex-direction: column; align-items: flex-start; gap: 10px; }
.sub-done h2 { margin: 0; }
.sub-done-icon { width: 48px; height: 48px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; background: var(--panel-alt); color: var(--muted); }
.sub-done-icon.is-ok { background: var(--success-soft); color: var(--success); }
.steps li.is-partly .steps-mark { border-color: var(--accent); background: linear-gradient(90deg, var(--accent) 50%, transparent 50%); }

/* Cloud library folder changes (5e part 1) */
.folder-actions { display: flex; flex-wrap: wrap; gap: 6px; margin: 10px 0 14px; }
.tree-swatch { width: 10px; height: 10px; flex: none; border-radius: 3px; border: 1px solid var(--line); margin-left: 4px; }
.year-picks { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 8px 12px; margin-top: 8px; }
.color-pick { display: flex; align-items: center; gap: 12px; }
.color-pick input[type=color] { width: 48px; height: 32px; padding: 0; border: 1px solid var(--line); border-radius: 6px; background: none; cursor: pointer; }

/* Cloud library files and uploads (5e part 2) */
.upload-pick { margin: 4px 0 8px; }
.upload-list { list-style: none; margin: 8px 0 4px; padding: 0; max-height: 260px; overflow: auto; border: 1px solid var(--line); border-radius: 8px; }
.upload-item { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 2px 12px; padding: 6px 10px; border-bottom: 1px solid var(--line); align-items: baseline; }
.upload-item:last-child { border-bottom: 0; }
.upload-name { overflow-wrap: anywhere; }
.upload-state { grid-column: 1 / -1; color: var(--muted); }
.upload-item.is-done .upload-state { color: var(--success); }
.upload-item.is-failed .upload-state, .upload-item.is-skipped .upload-state { color: var(--danger); }
.upload-options { margin-top: 12px; display: grid; gap: 8px; }

/* Cloud library file pictures (5e) */
.file-icon.has-picture { background: #fff; border: 1px solid var(--line); overflow: hidden; }
.file-icon img { width: 100%; height: 100%; object-fit: contain; display: block; }
.file-picture { display: none; }
.file-picture.has-picture { display: block; width: 160px; height: 160px; margin-bottom: 10px; border-radius: var(--radius); border: 1px solid var(--line); background: #fff; overflow: hidden; }
.file-picture img { width: 100%; height: 100%; object-fit: contain; display: block; }
.chip-file { display: inline-flex; align-items: center; gap: 6px; }
.chip-file .file-icon { width: 22px; height: 22px; border-radius: 4px; }

/* Super admin (5i) */
.ood-head { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 10px 12px; margin-bottom: 12px; }
.ood-head .ood-version { width: 200px; max-width: 100%; }
.form-row-2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 0 12px; }
.mini-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.mini-table th, .mini-table td { text-align: left; padding: 4px 8px; border-bottom: 1px solid var(--line); }
.mini-table th { color: var(--muted); font-weight: 600; }

/* Libraries page edits (step 5f) */
.section-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 12px; margin-top: 8px; }
.section-head .section-title { margin: 0; }
.form-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 0 12px; }
.form-actions { display: flex; flex-wrap: wrap; gap: 8px; margin: 8px 0 12px; }
.link-row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; padding: 6px 0; border-bottom: 1px solid var(--line); }
.link-row .ui-field { flex: 1 1 180px; margin: 0; }
.people-picks { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 6px 12px; margin: 8px 0 12px; max-height: 320px; overflow-y: auto; }
.mini-table td.ui-mono { word-break: break-all; }

/* Public site (step 5h): PublicLayout and Pages/Public. Same tokens as the portal, so light and dark both work. */
.site { min-height: 100vh; display: flex; flex-direction: column; background: var(--ground); color: var(--ink); }
.site-head { position: sticky; top: 0; z-index: 20; background: var(--panel); border-bottom: 1px solid var(--line); }
.site-bar { max-width: 1160px; margin: 0 auto; padding: 10px 16px; display: flex; align-items: center; gap: 16px; }
.site-brand { display: flex; align-items: center; gap: 10px; font-weight: 600; font-size: 17px; color: var(--ink); text-decoration: none; }
.site-brand img { border-radius: 8px; }
.site-menu-btn { display: none; margin-left: auto; }
.site-nav { flex: 1; display: flex; align-items: center; gap: 2px; min-width: 0; }
.site-link { padding: 8px 10px; border-radius: var(--radius); color: var(--ink-2); text-decoration: none; font-size: 14px; white-space: nowrap; }
.site-link:hover { background: var(--panel-alt); color: var(--ink); }
.site-link.active { color: var(--accent); font-weight: 600; }
.site-nav-end { margin-left: auto; display: flex; gap: 8px; align-items: center; }
.site-strip { max-width: 1160px; width: 100%; margin: 12px auto 0; padding: 0 16px; box-sizing: border-box; }
.site-main { flex: 1; outline: none; }
.site-foot { border-top: 1px solid var(--line); background: var(--panel); margin-top: 48px; }
.site-foot-inner { max-width: 1160px; margin: 0 auto; padding: 24px 16px; display: flex; flex-wrap: wrap; gap: 12px 24px; align-items: center; font-size: 14px; }
.site-foot-brand { display: flex; align-items: center; gap: 8px; font-weight: 600; }
.site-foot-links { display: flex; flex-wrap: wrap; gap: 6px 16px; }
.site-foot-links a { color: var(--ink-2); }
.site-foot-inner > .muted { flex-basis: 100%; }
@media (max-width: 900px) {
    .site-menu-btn { display: inline-flex; }
    .site-nav { display: none; position: absolute; left: 0; right: 0; top: 100%; flex-direction: column; align-items: stretch;
                padding: 8px 16px 16px; background: var(--panel); border-bottom: 1px solid var(--line); box-shadow: var(--shadow); }
    .site-nav.is-open { display: flex; }
    .site-link { padding: 12px 10px; font-size: 16px; }
    .site-nav-end { margin: 8px 0 0; }
    .site-nav-end .ui-btn { flex: 1; justify-content: center; }
}

.site-wrap { max-width: 1160px; margin: 0 auto; padding: 0 16px; box-sizing: border-box; }
.site-page { padding-top: 40px; display: flex; flex-direction: column; gap: 20px; }
.site-h1 { margin: 0; font-size: 36px; line-height: 1.15; letter-spacing: -0.02em; }
.site-h2 { margin: 0 0 20px; font-size: 26px; line-height: 1.2; letter-spacing: -0.01em; }
.site-lead { margin: 0; max-width: 720px; font-size: 17px; line-height: 1.55; color: var(--ink-2); }
.site-section { padding: 56px 0; }
.site-section-alt { background: var(--panel-alt); }
.flip { transform: rotate(180deg); }
.back-link { display: inline-flex; align-items: center; gap: 4px; font-size: 14px; }

.hero { background: var(--rail); color: #ffffff; padding: 72px 0 64px; }
.hero-inner { max-width: 1160px; margin: 0 auto; padding: 0 16px; display: flex; flex-direction: column; gap: 18px; }
.hero-kicker { margin: 0; color: var(--rail-muted); font-size: 14px; letter-spacing: 0.02em; }
.hero-title { margin: 0; max-width: 820px; font-size: 52px; line-height: 1.05; letter-spacing: -0.03em; font-weight: 650; }
.hero-sub { margin: 0; max-width: 680px; font-size: 18px; line-height: 1.55; color: var(--rail-ink); }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 8px; }
.hero-btn { padding: 12px 20px; font-size: 16px; }
.hero-note { margin: 0; color: var(--rail-muted); font-size: 14px; }
@media (max-width: 700px) {
    .hero { padding: 44px 0 40px; }
    .hero-title { font-size: 34px; }
    .hero-sub { font-size: 16px; }
    .site-h1 { font-size: 28px; }
    .site-section { padding: 40px 0; }
}

.feature-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 260px), 1fr)); gap: 16px; }
.feature { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 20px; }
.feature h3 { margin: 12px 0 6px; font-size: 16px; }
.feature p { margin: 0; color: var(--ink-2); line-height: 1.5; font-size: 14px; }
.feature-icon { display: inline-flex; padding: 9px; border-radius: 10px; background: var(--accent-soft); color: var(--accent); }

.quote-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 320px), 1fr)); gap: 16px; }
.quote { margin: 0; background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 20px;
         display: flex; flex-direction: column; justify-content: space-between; gap: 16px; }
.quote blockquote { margin: 0; line-height: 1.55; }
.quote figcaption { display: flex; align-items: center; gap: 12px; font-size: 14px; }
.quote figcaption img { border-radius: 50%; object-fit: cover; flex: none; }
.quote figcaption > span { display: flex; flex-direction: column; }

.cta { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 20px;
       background: var(--accent-soft); border: 1px solid var(--accent-line); border-radius: var(--radius-lg); padding: 28px; }
.cta .site-h2 { margin-bottom: 6px; }

.is-skeleton { min-height: 160px; background: var(--panel-alt); border: 1px solid var(--line-soft); animation: portal-pulse 1.4s ease-in-out infinite; }

.price-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr)); gap: 16px; }
.price-card { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 24px;
              display: flex; flex-direction: column; gap: 14px; align-items: flex-start; }
.price-card.is-main { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent); }
.price-card h2 { margin: 0; font-size: 20px; }
.price { margin: 0; }
.price-num { font-size: 36px; font-weight: 650; letter-spacing: -0.02em; }
.tick-list { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 8px; }
.tick-list li { position: relative; padding-left: 24px; line-height: 1.45; }
.tick-list li::before { content: ""; position: absolute; left: 4px; top: 4px; width: 6px; height: 11px;
                        border: solid var(--success); border-width: 0 2px 2px 0; transform: rotate(45deg); }
.estimate { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 24px; }
.estimate-row { display: flex; flex-wrap: wrap; gap: 16px; align-items: flex-end; }
.estimate-field { width: 140px; }
.estimate-total { display: flex; align-items: baseline; gap: 8px; margin-left: auto; }
.estimate-total strong { font-size: 28px; }
@media (max-width: 600px) { .estimate-total { margin-left: 0; } }

.download-list { display: flex; flex-direction: column; gap: 16px; }
.download-folder { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 18px 20px; }
.download-folder.is-skeleton { min-height: 110px; }
.download-head { display: flex; align-items: center; gap: 8px; color: var(--muted); }
.download-head h3 { margin: 0; font-size: 16px; color: var(--ink); overflow-wrap: anywhere; }
.download-group { display: flex; flex-direction: column; gap: 12px; margin-top: 12px; }
.download-group > .site-h2 { margin: 0; }
.download-group > p { margin: 0; }
.download-more { display: flex; align-items: center; gap: 10px; padding: 14px 18px; border-radius: var(--radius-lg);
                 background: var(--accent-soft); border: 1px solid var(--accent-line); }
.download-more > svg { flex: none; color: var(--accent); }
.download-archive { display: flex; flex-direction: column; gap: 8px; }
.download-build { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius-lg); }
.download-build > summary { list-style: none; cursor: pointer; display: flex; align-items: center; gap: 10px; padding: 12px 16px; flex-wrap: wrap; }
.download-build > summary::-webkit-details-marker { display: none; }
.download-build > summary:hover { background: var(--panel-alt); border-radius: var(--radius-lg); }
.download-build-name { font-weight: 600; overflow-wrap: anywhere; min-width: 0; }
.download-chevron { transition: transform .15s; flex: none; }
.download-build[open] > summary .download-chevron { transform: rotate(90deg); }
.download-build > .download-list { padding: 0 12px 12px; }
.download-build .download-folder { border-color: var(--line-soft); }
.download-sub { margin-top: 10px; border: 1px solid var(--line-soft); border-radius: var(--radius); background: var(--panel-alt); }
.download-sub > summary { list-style: none; cursor: pointer; display: flex; align-items: center; gap: 8px; padding: 10px 12px; flex-wrap: wrap; }
.download-sub > summary::-webkit-details-marker { display: none; }
.download-sub > summary:hover { color: var(--accent); }
.download-sub[open] > summary .download-chevron { transform: rotate(90deg); }
.download-sub-name { font-weight: 600; overflow-wrap: anywhere; min-width: 0; }
.download-sub-body { padding: 0 12px 10px; }
.download-sub-body > .download-files { margin-top: 0; }
.link-btn { background: none; border: 0; padding: 0; font: inherit; color: var(--accent); cursor: pointer; text-align: left; }
.link-btn:hover { text-decoration: underline; }
.link-btn:disabled { opacity: .6; cursor: progress; }
.download-files { list-style: none; margin: 12px 0 0; padding: 0; display: flex; flex-direction: column; }
.download-files li { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 4px 16px; padding: 9px 0; border-top: 1px solid var(--line-soft); }
.download-file { display: inline-flex; align-items: center; gap: 8px; font-weight: 500; min-width: 0; }
.download-name { overflow-wrap: anywhere; }
.download-notes { margin-top: 12px; }
.download-notes summary { cursor: pointer; color: var(--accent); font-size: 14px; }
.download-notes .prose { margin-top: 10px; max-height: 420px; overflow: auto; padding: 12px 14px; background: var(--panel-alt); border-radius: var(--radius); font-size: 14px; }

.post-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr)); gap: 18px; }
.post-card { display: flex; flex-direction: column; background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius-lg);
             overflow: hidden; color: var(--ink); text-decoration: none; transition: border-color .15s, box-shadow .15s; }
.post-card:hover { border-color: var(--accent-line); box-shadow: var(--shadow); }
.post-card.is-skeleton { min-height: 280px; }
.post-image { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; background: var(--panel-alt); }
.post-body { display: flex; flex-direction: column; gap: 6px; padding: 16px 18px 18px; }
.post-title { font-weight: 600; font-size: 17px; line-height: 1.3; }
.post-summary { color: var(--ink-2); font-size: 14px; line-height: 1.5; }
.post-meta { margin: 0; }
.post-page { max-width: 780px; }
.post { display: flex; flex-direction: column; gap: 18px; }
.post-hero { width: 100%; max-height: 420px; object-fit: cover; border-radius: var(--radius-lg); }

.prose { line-height: 1.65; overflow-wrap: anywhere; }
.prose > :first-child { margin-top: 0; }
.prose img { max-width: 100%; height: auto; border-radius: var(--radius); }
.prose pre { overflow-x: auto; background: var(--panel-alt); padding: 12px; border-radius: var(--radius); font-family: var(--mono); font-size: 13px; }
.prose code { font-family: var(--mono); font-size: .92em; }
.prose blockquote { margin: 16px 0; padding: 4px 16px; border-left: 3px solid var(--accent-line); color: var(--ink-2); }
.prose table { border-collapse: collapse; display: block; overflow-x: auto; max-width: 100%; }
.prose th, .prose td { border: 1px solid var(--line); padding: 6px 10px; text-align: left; }
.prose h1, .prose h2, .prose h3 { line-height: 1.25; margin: 28px 0 10px; }
/* Pictures in blog posts and build notes (backlog 110): size, position and text wrap, set in the editor's Picture bar.
   Only these classes survive HtmlAllowList. Sizes are a share of the text column, so they work on any screen. */
.prose::after { content: ""; display: table; clear: both; }
.prose img.img-s { width: 25%; }
.prose img.img-m { width: 50%; }
.prose img.img-l { width: 75%; }
.prose img.img-full { width: 100%; }
.prose img.img-left, .prose img.img-center, .prose img.img-right { display: block; margin: 14px 0; }
.prose img.img-center { margin-left: auto; margin-right: auto; }
.prose img.img-right { margin-left: auto; }
.prose img.img-left.img-wrap { float: left; margin: 4px 20px 12px 0; }
.prose img.img-right.img-wrap { float: right; margin: 4px 0 12px 20px; }
/* YouTube videos (backlog 137): <span class="video …"><iframe></span>, 16:9, the same size/position/wrap classes as a picture. */
.prose .video { display: block; width: 100%; margin: 14px 0; }
.prose .video iframe { display: block; width: 100%; height: auto; aspect-ratio: 16 / 9; border: 0; border-radius: var(--radius); background: #000; }
.prose .video.img-s { width: 25%; min-width: 220px; }
.prose .video.img-m { width: 50%; }
.prose .video.img-l { width: 75%; }
.prose .video.img-center { margin-left: auto; margin-right: auto; }
.prose .video.img-right { margin-left: auto; }
.prose .video.img-left.img-wrap { float: left; margin: 4px 20px 12px 0; }
.prose .video.img-right.img-wrap { float: right; margin: 4px 0 12px 20px; }
/* On a phone a wrapped picture leaves too little room for the text beside it: it sits above the text instead. */
@media (max-width: 560px) {
    .prose img.img-wrap { float: none; margin: 14px auto; }
    .prose img.img-s, .prose img.img-m { width: 100%; max-width: 360px; }
    .prose .video.img-wrap { float: none; margin: 14px 0; }
    .prose .video.img-s, .prose .video.img-m, .prose .video.img-l { width: 100%; }
}

.board { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; align-items: start; }
.board-col { background: var(--panel-alt); border: 1px solid var(--line-soft); border-radius: var(--radius-lg); padding: 12px; display: flex; flex-direction: column; gap: 10px; }
.board-col.is-skeleton { min-height: 300px; }
.board-title { margin: 0 4px 2px; font-size: 15px; display: flex; justify-content: space-between; }
.board-card { background: var(--panel); border: 1px solid var(--line); border-left: 4px solid var(--accent-line); border-radius: var(--radius); padding: 10px 12px; }
.board-card h3 { margin: 0; font-size: 14px; line-height: 1.35; }
.board-card p { margin: 6px 0 0; font-size: 13px; color: var(--ink-2); line-height: 1.45; white-space: pre-line; }
.board-group { display: inline-block; margin-bottom: 4px; font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); }
@media (max-width: 1000px) { .board { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 600px) { .board { grid-template-columns: minmax(0, 1fr); } }

.contact { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 3fr); gap: 32px; align-items: start; }
.contact-intro { display: flex; flex-direction: column; gap: 20px; }
.contact-side { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 16px 18px; }
.contact-side p { margin: 0; display: flex; align-items: center; gap: 8px; }
.contact-side p + p { margin-top: 6px; display: block; }
.contact-form { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 24px; display: flex; flex-direction: column; gap: 16px; }
.contact-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr)); gap: 16px; }
.contact-message { width: 100%; box-sizing: border-box; resize: vertical; min-height: 140px; font: inherit; }
.contact-trap { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.contact-done { align-items: flex-start; }
.contact-done h2 { margin: 0; }
.contact-done > svg { color: var(--success); }
@media (max-width: 860px) { .contact { grid-template-columns: minmax(0, 1fr); } }

/* Home page (step 5h, design option C "Find, preview, place", 20 Oct 2026). */
.home-lift { transition: transform .18s ease, box-shadow .18s ease; }
.home-lift:hover { transform: translateY(-2px); box-shadow: 0 10px 22px rgba(31, 95, 158, .28); }
.home-hero { background: var(--panel); border-bottom: 1px solid var(--line); padding: 72px 0 80px; }
.home-hero-inner { display: flex; flex-wrap: wrap; gap: 56px; align-items: center; }
.home-hero-text { flex: 1 1 420px; min-width: 0; display: flex; flex-direction: column; gap: 20px; }
.home-kicker { margin: 0; font-family: var(--mono); font-size: 13px; letter-spacing: .08em; text-transform: uppercase; color: var(--accent); }
.home-title { margin: 0; font-size: 54px; line-height: 1.05; letter-spacing: -0.03em; font-weight: 700; }
.home-sub { margin: 0; font-size: 18px; line-height: 1.6; color: var(--ink-2); }
.home-note { margin: 0; font-size: 14px; color: var(--muted); }
.home-steps { display: flex; flex-direction: column; gap: 8px; margin-top: 4px; }
.home-step { position: relative; overflow: hidden; display: flex; gap: 14px; align-items: flex-start; width: 100%; min-height: 44px;
             padding: 14px 16px; border-radius: 12px; border: 1px solid var(--line-soft); background: var(--panel); color: var(--ink);
             font: inherit; text-align: left; cursor: pointer; transition: background-color .2s ease, border-color .2s ease, transform .2s ease; }
.home-step:hover { transform: translateX(4px); border-color: var(--accent-line); }
.home-step.is-on { background: var(--accent-soft); border-color: var(--accent-line); }
.home-step-num { flex: none; width: 32px; height: 32px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center;
                 font-weight: 700; font-size: 14px; background: var(--line-soft); color: var(--ink-2); transition: background-color .2s ease, color .2s ease; }
.home-step.is-on .home-step-num { background: var(--accent); color: var(--on-accent); }
.home-step-text { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.home-step-text strong { font-size: 16px; }
.home-step-text span { font-size: 14px; line-height: 1.45; color: var(--ink-2); }
.home-step-bar { position: absolute; left: 0; bottom: 0; width: 100%; height: 3px; background: var(--accent); transform-origin: left;
                 animation: home-bar 4.5s linear forwards; }
.home-steps:hover .home-step-bar, .home-hero-inner:has(.home-demo:hover) .home-step-bar { animation-play-state: paused; }
@keyframes home-bar { from { transform: scaleX(0); } to { transform: scaleX(1); } }

.home-demo { flex: 1 1 480px; min-width: 0; min-height: 440px; box-sizing: border-box; padding: 18px; border-radius: 20px;
             background: var(--rail); color: #ffffff; box-shadow: 0 30px 60px rgba(15, 42, 68, .22); display: flex; flex-direction: column; gap: 14px; }
.home-demo-head { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--rail-ink); }
.home-demo-head img { border-radius: 4px; }
.home-demo-mode, .home-demo-small { color: var(--rail-muted); }
.home-demo-small { font-size: 12px; font-family: var(--mono); }
.home-scene { display: flex; flex-direction: column; gap: 10px; }
.home-search { display: flex; align-items: center; gap: 8px; padding: 10px 12px; border-radius: 10px; background: #0b1520; border: 1px solid #5aa9e6; font-size: 14px; }
.home-search svg { color: #7dbcec; }
.home-caret { display: inline-block; width: 2px; height: 16px; margin-left: -6px; background: #7dbcec; animation: home-blink 1s steps(1) infinite; }
@keyframes home-blink { 50% { opacity: 0; } }
.home-result { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 10px; background: #1b2633; color: #7dbcec; }
.home-result-text { display: flex; flex-direction: column; flex: 1; min-width: 0; color: #ffffff; }
.home-result-text strong { font-size: 14px; }
.home-result-text span { font-size: 12px; color: var(--rail-muted); }
.home-pill { flex: none; font-size: 11px; padding: 3px 8px; border-radius: 999px; background: #24384f; color: #7dbcec; }
.home-in { opacity: 0; transform: translateY(8px); animation: home-in .45s cubic-bezier(.2, .7, .2, 1) forwards; }
@keyframes home-in { to { opacity: 1; transform: none; } }
.home-preview { display: flex; flex-wrap: wrap; gap: 16px; }
.home-preview-3d { flex: 1 1 220px; min-height: 300px; display: flex; align-items: center; justify-content: center; border-radius: 14px;
                   background: #13202e; border: 1px solid #22344a; color: #7dbcec; }
.home-turn { transform-origin: 50% 60%; animation: home-turn 9s ease-in-out infinite; max-width: 100%; }
@keyframes home-turn { 0%, 100% { transform: none; } 50% { transform: rotate(-6deg) scale(1.04); } }
.home-preview-info { flex: 1 1 180px; display: flex; flex-direction: column; gap: 6px; font-size: 13px; }
.home-preview-info strong { font-size: 15px; }
.home-type { padding: 6px 10px; border-radius: 8px; background: #1b2633; }
.home-type.is-on { background: #1f5f9e; }
.home-plan { position: relative; min-height: 340px; border-radius: 14px; border: 1px dashed rgba(125, 188, 236, .45); background: #13202e; overflow: hidden; }
.home-plan > svg { display: block; width: 100%; height: 340px; }
.home-drop { position: absolute; left: calc(50% - 40px); top: 128px; width: 80px; height: 80px; animation: home-drop 1.1s .2s cubic-bezier(.3, 1.5, .5, 1) both; }
@keyframes home-drop { from { opacity: 0; transform: translate(60px, -80px) scale(.7); } to { opacity: 1; transform: none; } }
.home-ring { position: absolute; inset: 0; border: 2px solid #7dbcec; border-radius: 10px; animation: home-ring 1.6s 1.1s ease-out infinite; opacity: 0; }
@keyframes home-ring { from { opacity: .7; transform: scale(1); } to { opacity: 0; transform: scale(1.8); } }
.home-plan-label { position: absolute; left: 14px; right: 14px; bottom: 12px; font-size: 12px; font-family: var(--mono); color: var(--rail-muted); }

.home-h2 { max-width: 760px; }
/* Home page video (backlog 112): 16:9 box held before anything loads, so the page doesn't jump. */
.home-video { max-width: 960px; margin: 0 auto; aspect-ratio: 16 / 9; border-radius: var(--radius-lg, 12px); overflow: hidden; background: #000;
    box-shadow: 0 12px 32px rgba(0, 0, 0, .18); border: 1px solid var(--line); }
.home-video video { display: block; width: 100%; height: 100%; object-fit: cover; }
.home-cols { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr)); gap: 20px; }
.home-col { background: var(--panel); border: 1px solid var(--line); border-radius: 16px; padding: 22px 12px; display: flex; flex-direction: column; gap: 4px;
            transition: transform .25s ease, box-shadow .25s ease; }
.home-col:hover { transform: translateY(-4px); box-shadow: 0 18px 36px rgba(15, 42, 68, .10); }
.home-col-title { padding: 0 12px 10px; font-family: var(--mono); font-size: 12px; letter-spacing: .08em; text-transform: uppercase; color: var(--accent); }
.home-feat { display: flex; gap: 12px; align-items: flex-start; padding: 12px; border-radius: 10px; color: var(--accent);
             transition: background-color .18s ease, padding-left .18s ease; }
.home-feat > svg:first-child { flex: none; }
.home-feat:hover { background: var(--accent-soft); padding-left: 18px; }
.home-feat-text { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; color: var(--ink); }
.home-feat-text span { font-size: 14px; line-height: 1.5; color: var(--ink-2); }
.home-col.is-dark { background: var(--rail); border-color: var(--rail); }
.home-col.is-dark .home-col-title, .home-col.is-dark .home-feat { color: #7dbcec; }
.home-col.is-dark .home-feat-text { color: #ffffff; }
.home-col.is-dark .home-feat-text span { color: var(--rail-ink); }
.home-col.is-dark .home-feat:hover { background: var(--rail-2); }

.home-quotes { background: var(--panel); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.home-quotes-inner { max-width: 900px; display: flex; flex-direction: column; align-items: center; gap: 28px; text-align: center; }
.home-quotes-inner .site-h2 { margin: 0; }
.home-quote { margin: 0; min-height: 200px; display: flex; flex-direction: column; gap: 18px; align-items: center; animation: home-in .5s cubic-bezier(.2, .7, .2, 1) both; }
.home-quote blockquote { margin: 0; font-size: 22px; line-height: 1.5; letter-spacing: -0.01em; }
.home-quote figcaption { display: flex; flex-direction: column; gap: 2px; font-size: 15px; }
.home-faces { display: flex; flex-wrap: wrap; justify-content: center; gap: 14px; }
.home-face { position: relative; width: 64px; height: 64px; padding: 4px; border-radius: 50%; border: 0; background: none; cursor: pointer; opacity: .65;
             transition: transform .2s ease, opacity .2s ease; }
.home-face img { width: 100%; height: 100%; border-radius: 50%; object-fit: cover; display: block; }
.home-face-initials { width: 100%; height: 100%; border-radius: 50%; display: flex; align-items: center; justify-content: center; background: var(--accent-soft); color: var(--accent); font-weight: 700; font-size: 18px; }
.home-face:hover { transform: translateY(-3px) scale(1.06); opacity: 1; }
.home-face.is-on { opacity: 1; }
.home-face-ring { position: absolute; inset: 0; width: 100%; height: 100%; transform: rotate(-90deg); pointer-events: none; }
.home-face-ring circle { fill: none; stroke: var(--accent); stroke-width: 3; stroke-linecap: round; stroke-dasharray: 100; stroke-dashoffset: 100;
                         animation: home-ring-fill linear forwards; }
.home-quotes-inner:hover .home-face-ring circle { animation-play-state: paused; }
@keyframes home-ring-fill { to { stroke-dashoffset: 0; } }

.home-cta { display: flex; flex-wrap: wrap; gap: 28px; align-items: center; justify-content: space-between; padding: 48px; border-radius: 20px;
            background: var(--accent); color: var(--on-accent); }
.home-cta > div:first-child { flex: 1 1 420px; min-width: 0; }
.home-cta .site-h2 { margin: 0 0 10px; }
.home-cta p { margin: 0; line-height: 1.6; opacity: .92; }
.home-cta-main { background: var(--panel); color: var(--ink); border-color: var(--panel); }
.home-cta-main:hover { background: var(--panel); color: var(--ink); }
.home-cta-ghost { background: transparent; color: var(--on-accent); border: 1px solid currentColor; }
.home-cta-ghost:hover { background: rgba(255, 255, 255, .12); color: var(--on-accent); }

@media (max-width: 700px) {
    .home-hero { padding: 40px 0 48px; }
    .home-title { font-size: 34px; }
    .home-sub { font-size: 16px; }
    .home-demo { min-height: 0; }
    .home-quote blockquote { font-size: 18px; }
    .home-cta { padding: 28px 20px; }
}
@media (prefers-reduced-motion: reduce) {
    .home-in, .home-quote, .home-drop { animation: none; opacity: 1; transform: none; }
    .home-turn, .home-ring, .home-caret, .home-step-bar { animation: none; }
    .home-face-ring circle { animation: none; stroke-dashoffset: 0; }
    .home-step-bar { display: none; }
    .home-lift:hover, .home-step:hover, .home-col:hover, .home-face:hover { transform: none; }
}

/* Website editors (step 5i part 2): Website › Blog, Road map, Downloads. */
.site-admin-bar { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 10px; }
.site-admin-search { flex: 0 1 320px; min-width: 200px; }
.admin-posts { display: flex; flex-direction: column; gap: 10px; }
.admin-post { display: flex; flex-wrap: wrap; gap: 14px; align-items: center; padding: 12px; background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius-lg); }
.admin-post > img { width: 96px; height: 64px; object-fit: cover; border-radius: var(--radius); background: var(--panel-alt); flex: none; }
.admin-post-text { flex: 1 1 280px; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.admin-post-title { font-weight: 600; display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.admin-post-summary { font-size: 13px; color: var(--ink-2); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.admin-post-actions { display: flex; gap: 6px; flex-wrap: wrap; }
.post-edit-row { display: flex; flex-wrap: wrap; gap: 16px; align-items: flex-start; }
.post-edit-row > .ui-field { flex: 0 1 220px; }
.post-edit-picture { flex: 1 1 300px; display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.post-edit-picture img { width: 120px; height: 72px; object-fit: cover; border-radius: var(--radius); background: var(--panel-alt); border: 1px solid var(--line); }
.post-edit-picture .muted { flex-basis: 100%; }

.rte { display: flex; flex-direction: column; border: 1px solid var(--line-strong); border-radius: var(--radius); background: var(--panel); overflow: hidden; }
.rte:focus-within { border-color: var(--focus); box-shadow: 0 0 0 1px var(--focus); }
.rte-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 2px; padding: 6px; border-bottom: 1px solid var(--line); background: var(--panel-alt); }
.rte-btn { display: inline-flex; align-items: center; gap: 4px; min-height: 32px; min-width: 32px; justify-content: center; padding: 0 8px; border: 1px solid transparent;
           border-radius: 6px; background: none; color: var(--ink); font: inherit; font-size: 13px; cursor: pointer; }
.rte-btn:hover { background: var(--panel); border-color: var(--line); }
.rte-btn[aria-pressed="true"] { background: var(--accent-soft); border-color: var(--accent-line); }
.rte-b { font-weight: 700; } .rte-i { font-style: italic; } .rte-u { text-decoration: underline; }
.rte-sep { width: 1px; height: 20px; background: var(--line); margin: 0 4px; }
.rte-file { position: relative; overflow: hidden; cursor: pointer; }
.rte-file input[type="file"] { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.rte-box { min-height: 320px; max-height: 60vh; overflow: auto; padding: 14px 16px; outline: none; }
.rte-box:empty::before { content: "Write here…"; color: var(--muted); }
.rte-source { min-height: 320px; border: 0; border-radius: 0; font-family: var(--mono); font-size: 13px; resize: vertical; width: 100%; box-sizing: border-box; }
.rte-link { display: flex; flex-wrap: wrap; gap: 10px; align-items: flex-end; padding: 10px; border-bottom: 1px solid var(--line); }
.rte-link > .ui-field { flex: 1 1 220px; }
.rte-link-actions { display: flex; gap: 6px; }
.rte-box img { cursor: pointer; }
/* In the editor a video shows as its YouTube picture (editor.js); the real player is put back when the post is saved. */
.rte-box img.rte-video { aspect-ratio: 16 / 9; object-fit: cover; border: 3px solid #e62117; border-radius: var(--radius); box-sizing: border-box; }
.rte-box img.rte-video:not(.img-s):not(.img-m):not(.img-l) { width: 100%; }
.rte-box img.rte-picked { outline: 2px solid var(--focus); outline-offset: 2px; }
.rte-pic { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 12px; padding: 6px 8px; border-bottom: 1px solid var(--line); background: var(--accent-soft); }
.rte-pic-title { font-weight: 600; font-size: 13px; }
.rte-pic-group { display: inline-flex; align-items: center; gap: 2px; }
.rte-pic-label { font-size: 12px; color: var(--ink-2); margin-right: 4px; }
.rte-pic .rte-btn { min-height: 28px; font-size: 13px; }
.rte-pic .rte-btn:disabled { opacity: .45; cursor: default; }

.admin-card { position: relative; padding: 0; }
.admin-card-open { display: block; width: 100%; padding: 10px 12px 6px; border: 0; background: none; color: inherit; font: inherit; text-align: left; cursor: pointer; border-radius: var(--radius); }
.admin-card-open:hover h3 { color: var(--accent); }
.admin-card-moves { display: flex; justify-content: flex-end; gap: 2px; padding: 0 6px 6px; }
.admin-colour { width: 64px; height: 36px; padding: 2px; border: 1px solid var(--line-strong); border-radius: var(--radius); background: var(--panel); }

.admin-dl-group { margin: 18px 0 8px; font-size: 18px; display: flex; align-items: baseline; gap: 10px; }
.admin-dl-head { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 8px; color: var(--muted); }
.admin-dl-head h3 { margin: 0; font-size: 15px; color: var(--ink); overflow-wrap: anywhere; min-width: 0; }
.admin-dl-file-end { display: inline-flex; align-items: center; gap: 8px; margin-left: auto; }
.admin-upload-list { list-style: none; margin: 4px 0 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.admin-upload-list li { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; gap: 4px 12px; align-items: center; }
.admin-upload-state { font-size: 13px; color: var(--ink-2); }
.admin-upload-state.is-error { color: var(--danger); grid-column: 1 / -1; }
.admin-upload-bar { grid-column: 1 / -1; height: 4px; border-radius: 4px; background: var(--line-soft); overflow: hidden; }
.admin-upload-bar > span { display: block; height: 100%; background: var(--accent); transition: width .2s ease; }
.admin-delete-list { margin: 0 0 8px; padding-left: 18px; max-height: 240px; overflow: auto; }

/* Privacy policy (/privacy, in the website's header and footer). */
.privacy-page { max-width: 900px; }
.privacy { background: var(--panel); border: 1px solid var(--line); border-radius: 14px; padding: 32px clamp(18px, 4vw, 44px); line-height: 1.6; }
.privacy h1 { font-size: clamp(28px, 4vw, 36px); line-height: 1.15; margin: 0 0 6px; letter-spacing: -0.01em; }
.privacy-meta { color: var(--muted); margin: 0 0 24px; font-size: 14px; }
.privacy h2 { font-size: 20px; margin: 36px 0 8px; padding-top: 20px; border-top: 1px solid var(--line); scroll-margin-top: 80px; }
.privacy h3 { font-size: 16px; margin: 20px 0 4px; }
.privacy p, .privacy li { color: var(--ink-2); }
.privacy ul { padding-left: 22px; }
.privacy li { margin: 4px 0; }
.privacy-summary { background: var(--accent-soft); border-radius: 10px; padding: 14px 18px; margin: 0 0 8px; }
.privacy-summary p { margin: 6px 0; color: var(--ink); }
.privacy-toc { margin: 18px 0 0; font-size: 15px; }
.privacy-toc ol { margin: 6px 0 0; padding-left: 22px; columns: 2; column-gap: 32px; }
@media (max-width: 600px) { .privacy-toc ol { columns: 1; } }
.privacy-table { overflow-x: auto; }
.privacy table { width: 100%; border-collapse: collapse; font-size: 15px; margin: 8px 0; }
.privacy th, .privacy td { text-align: left; vertical-align: top; padding: 8px 10px; border-bottom: 1px solid var(--line); }
.privacy th { color: var(--muted); font-weight: 600; font-size: 14px; }
.admin-quote-photo, .admin-post > .admin-quote-photo, .post-edit-picture .admin-quote-photo { width: 56px; height: 56px; border-radius: 50%; object-fit: cover; flex: none; }
.admin-quote.is-hidden { opacity: .65; }
.admin-quote .admin-post-summary { -webkit-line-clamp: 3; }
/* KC Cloud folder kinds as icons (FolderKindIcon), and the folder panel's padding (owner, 20 Oct 2026). */
.split-side > .ui-field { padding: 14px 16px 0; }
.split-side .ui-tree { padding: 6px 8px 10px; }
.tree-kind { display: inline-flex; flex: none; }
.tree-noname { color: var(--muted); font-style: italic; }
.kind-icon { flex: none; }
.kind-icon-library { color: var(--series-1); }
.kind-icon-group { color: var(--series-2); }
.kind-icon-tab { color: var(--success); }
.kind-icon-subfolder { color: var(--warning); }
.kind-icon-none { color: var(--muted); }
/* Cloud library › Upload: the whole upload's bar, and each file's (moving stripes while it is being sent). */
.upload-total { display: flex; flex-direction: column; gap: 6px; margin: 8px 0 4px; }
.upload-total-bar { height: 8px; border-radius: 8px; background: var(--line-soft); overflow: hidden; }
.upload-total-bar > span { display: block; height: 100%; background: var(--accent); border-radius: 8px; transition: width .3s ease; }
.upload-bar { grid-column: 1 / -1; height: 4px; border-radius: 4px; background: var(--line-soft); overflow: hidden; }
.upload-bar > span { display: block; height: 100%; width: 100%; border-radius: 4px; background: var(--accent); }
.upload-bar.is-sending > span { width: 40%; animation: upload-slide 1.1s ease-in-out infinite; }
.upload-bar.is-done > span { background: var(--success); }
.upload-bar.is-failed > span { background: var(--danger); }
@keyframes upload-slide { from { transform: translateX(-100%); } to { transform: translateX(250%); } }
@media (prefers-reduced-motion: reduce) { .upload-bar.is-sending > span { animation: none; width: 100%; opacity: .5; } }
/* Cloud library: hovering a file's picture shows it at the row detail's size (owner, 21 Oct 2026). */
.file-icon { position: relative; }
.file-peek { position: fixed; z-index: 50; width: 160px; height: 160px; padding: 6px; box-sizing: content-box; background: #fff;
             border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); animation: file-peek-in .12s ease-out; }
.file-peek img { width: 100%; height: 100%; object-fit: contain; display: block; }
@keyframes file-peek-in { from { opacity: 0; transform: scale(.92); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .file-peek { animation: none; } }
/* Cloud library row detail: picture, facts and the family's types side by side (owner, 21 Oct 2026). */
.file-detail-row { display: flex; flex-wrap: wrap; gap: 16px 28px; align-items: flex-start; }
.file-detail-row .file-picture.has-picture { margin-bottom: 0; }
.file-detail-row .facts { flex: 0 1 auto; }
.file-types { flex: 1 1 220px; min-width: 0; display: flex; flex-direction: column; gap: 6px; }
.file-types-find { max-width: 260px; padding-top: 6px; padding-bottom: 6px; }
.file-types-list { margin: 0; padding: 0; list-style: none; max-height: 200px; overflow: auto; columns: 2 180px; column-gap: 20px; font-size: 13px; }
.file-types-list li { padding: 2px 0; break-inside: avoid; overflow-wrap: anywhere; }
/* Cloud library › Thumbnail settings: a picture of the chosen view (the old portal's ThumbnailOptions). */
.thumb-view-preview { display: flex; justify-content: center; padding: 10px; border: 1px solid var(--line); border-radius: var(--radius); background: #fff; }
.thumb-view-preview img { width: 40%; min-width: 120px; max-width: 200px; height: auto; display: block; }
.upload-previews { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 16px; }
/* Top bar's Website button and the website's theme switch (owner, 21 Oct 2026). */
.topbar-site { gap: 6px; }
.site-theme { border-color: var(--line); }
@media (max-width: 600px) { .topbar-site span { display: none; } }
@media (max-width: 900px) { .site-nav-end .site-theme { flex: none; } }

/* ---------------------------------------------------------------- Cloud library › Uploads (owner, 21 Oct 2026) */
.cloud-tab { display: contents; }
.visually-hidden {
    position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden;
    clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}

.ix-status {
    display: flex; flex-wrap: wrap; align-items: center; gap: 20px 28px; padding: 20px 24px;
    background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius-lg);
}
.ix-status-main { display: flex; align-items: center; gap: 14px; flex: 1 1 300px; min-width: 0; }
.ix-status-text { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.ix-status-text strong { font-size: 16px; }
.ix-stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px 20px; flex: 3 1 520px; }
@media (max-width: 700px) { .ix-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

.ix-beacon { width: 44px; height: 44px; border-radius: 50%; display: flex; align-items: center; justify-content: center; flex: none; background: var(--panel-alt); }
.ix-beacon span { width: 12px; height: 12px; border-radius: 50%; background: var(--muted); }
.ix-beacon.is-ok { background: var(--success-soft); }
.ix-beacon.is-ok span { background: var(--success); }
.ix-beacon.is-busy { background: var(--accent-soft); }
.ix-beacon.is-busy span { background: var(--accent); animation: ix-pulse 1.6s ease-in-out infinite; }
.ix-beacon.is-warn { background: var(--warning-soft); }
.ix-beacon.is-warn span { background: var(--warning); }
.ix-beacon.is-off { background: var(--danger-soft); }
.ix-beacon.is-off span { background: var(--danger); }
@keyframes ix-pulse { 50% { opacity: .35; } }
@media (prefers-reduced-motion: reduce) { .ix-beacon.is-busy span { animation: none; } }

.ix-years { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.ix-year {
    display: inline-flex; align-items: center; gap: 6px; height: 24px; padding: 0 9px; font-size: 12px;
    border: 1px solid var(--line); border-radius: 12px; background: var(--panel-alt);
}
.ix-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--muted); flex: none; display: inline-block; }
.ix-dot.is-ok { background: var(--success); }
.ix-dot.is-busy { background: var(--accent); }
.ix-dot.is-warn { background: var(--warning); }
.ix-dot.is-off { background: var(--danger); }

.ix-section { display: flex; flex-direction: column; gap: 12px; }
.ix-section-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 8px; }
.ix-section-head h2 { font-size: 18px; margin: 0; }

.ix-job {
    display: flex; flex-direction: column; gap: 16px; padding: 18px 22px;
    background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius-lg);
}
.ix-job.is-current { border-color: var(--accent-line); box-shadow: var(--shadow); }
.ix-job-head { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 16px; }
.ix-job-title { display: flex; flex-direction: column; gap: 4px; flex: 1 1 260px; min-width: 0; }
.ix-job-name { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 10px; }
.ix-job-name h3 { margin: 0; font-size: 16px; overflow-wrap: anywhere; }
.ix-place {
    width: 52px; height: 52px; border-radius: 10px; flex: none; display: flex; flex-direction: column;
    align-items: center; justify-content: center; line-height: 1.05;
    background: var(--warning-soft); color: var(--warning-ink); border: 1px solid var(--warning-line);
}
.ix-place strong { font-size: 18px; }
.ix-place span { font-size: 10px; }
.ix-progress {
    display: flex; flex-direction: column; gap: 8px; padding: 12px 14px;
    background: var(--panel-alt); border: 1px solid var(--line-soft); border-radius: var(--radius);
}
.ix-progress-text { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 6px 12px; }
.ix-ink { color: var(--ink); }
.ix-bar { height: 8px; border-radius: 4px; background: var(--line); overflow: hidden; }
.ix-bar span { display: block; height: 100%; border-radius: 4px; background: var(--accent); transition: width .4s ease; }
.ix-eta { margin: 0; }
.ix-pad { padding: 12px 20px; margin: 0; }

/* Steps: across on the tab, down on an upload's page. */
.ix-steps { list-style: none; margin: 0; padding: 0; display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); }
.ix-step { display: flex; flex-direction: column; gap: 8px; min-width: 0; position: relative; }
.ix-step-mark { display: flex; align-items: center; }
.ix-step-dot {
    width: 24px; height: 24px; border-radius: 50%; flex: none; display: flex; align-items: center; justify-content: center;
    border: 2px solid var(--line-strong); background: var(--panel); color: var(--on-accent); box-sizing: border-box;
}
.ix-step-line { flex: 1; height: 2px; margin: 0 8px; background: var(--line); }
.ix-step.is-done .ix-step-dot { background: var(--success); border-color: var(--success); }
.ix-step.is-done .ix-step-line { background: var(--success); }
.ix-step.is-current .ix-step-dot { background: var(--accent); border-color: var(--accent); box-shadow: 0 0 0 5px var(--accent-soft); }
.ix-step.is-current .ix-step-dot::after { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--on-accent); }
.ix-step.is-failed .ix-step-dot { background: var(--danger); border-color: var(--danger); }
.ix-step-text { display: flex; flex-direction: column; gap: 2px; min-width: 0; padding-right: 8px; }
.ix-step-label { font-size: 13px; }
.ix-step.is-current .ix-step-label { font-weight: 600; }
.ix-steps.is-vertical { grid-auto-flow: row; grid-auto-columns: auto; }
.ix-steps.is-vertical .ix-step { flex-direction: row; gap: 12px; }
.ix-steps.is-vertical .ix-step-mark { flex-direction: column; align-items: center; align-self: stretch; }
.ix-steps.is-vertical .ix-step-line { width: 2px; height: auto; min-height: 18px; margin: 4px 0; }
.ix-steps.is-vertical .ix-step-text { padding: 2px 0 14px; }
@media (max-width: 760px) {
    .ix-steps:not(.is-vertical) { grid-auto-flow: row; grid-auto-columns: auto; }
    .ix-steps:not(.is-vertical) .ix-step { flex-direction: row; gap: 12px; }
    .ix-steps:not(.is-vertical) .ix-step-mark { flex-direction: column; align-self: stretch; }
    .ix-steps:not(.is-vertical) .ix-step-line { width: 2px; height: auto; min-height: 14px; margin: 4px 0; }
    .ix-steps:not(.is-vertical) .ix-step-text { padding-bottom: 10px; }
}

/* The queue table. */
.ix-table-wrap { overflow-x: auto; }
.ix-table { width: 100%; min-width: 680px; border-collapse: collapse; font-size: 13px; }
.ix-table th { text-align: left; font-weight: 500; color: var(--muted); background: var(--panel-alt); padding: 10px 12px; white-space: nowrap; }
.ix-table td { padding: 11px 12px; border-top: 1px solid var(--line-soft); }
.ix-table th:first-child, .ix-table td:first-child { padding-left: 20px; width: 40px; }
.ix-table th:last-child, .ix-table td:last-child { padding-right: 20px; }
.ix-table .num { text-align: right; }
.ix-table tr.is-mine td { background: var(--accent-soft); }
.ix-strong { font-weight: 600; }
.ix-yours {
    margin-left: 8px; display: inline-flex; align-items: center; height: 20px; padding: 0 7px; border-radius: 10px;
    background: var(--accent); color: var(--on-accent); font-size: 11px; font-weight: 600;
}
.ix-state { display: inline-flex; align-items: center; gap: 6px; }
.ix-state.is-indexing { color: var(--accent); }
.ix-state.is-indexing .ix-dot { background: var(--accent); }
.ix-state.is-waiting .ix-dot, .ix-state.is-receiving .ix-dot { background: var(--warning); }
.ix-state.is-copies .ix-dot { background: var(--success); }
.ix-more { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 8px; padding: 10px 20px; border-top: 1px solid var(--line-soft); }

/* One upload's page. */
.ix-tiles { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.ix-tiles .ui-stat { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 14px 16px; }
@media (max-width: 700px) { .ix-tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.ix-detail { display: flex; flex-wrap: wrap; align-items: flex-start; gap: 20px; }
.ix-detail-main { flex: 999 1 560px; min-width: 0; }
.ix-detail-side { flex: 1 1 300px; min-width: 0; display: flex; flex-direction: column; gap: 16px; }
.ix-file { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.ix-file .ui-mono { font-size: 12px; overflow-wrap: anywhere; }
.ix-note { color: var(--muted); }
.ix-note.is-attention, .ix-note.is-failed { color: var(--warning-ink); }
.ix-cell {
    display: inline-flex; align-items: center; justify-content: center; width: 24px; height: 24px; border-radius: 50%;
    font-weight: 700; background: var(--panel); color: var(--muted); border: 1px solid var(--line);
}
.ix-cell.is-done { background: var(--success-soft); color: var(--success); border-color: transparent; }
.ix-cell.is-working { background: var(--accent-soft); color: var(--accent); border-color: transparent; }
.ix-cell.is-skip { background: var(--warning-soft); color: var(--warning); border-color: transparent; }
.ix-cell.is-failed { background: var(--danger-soft); color: var(--danger); border-color: transparent; }
.ix-cell.is-off { background: transparent; border-color: transparent; }
.ix-cell-wait { width: 8px; height: 8px; border-radius: 50%; border: 2px solid var(--line-strong); }
.ix-legend { display: flex; flex-wrap: wrap; gap: 8px 18px; align-items: center; padding: 12px 20px; border-top: 1px solid var(--line-soft); }
.ix-legend > span { display: inline-flex; align-items: center; gap: 6px; }
.ix-legend .ix-cell { width: 18px; height: 18px; }
.ix-legend-right { margin-left: auto; }
.ix-attention {
    display: flex; flex-direction: column; gap: 10px; padding: 16px 18px; border-radius: var(--radius-lg);
    background: var(--warning-soft); border: 1px solid var(--warning-line); color: var(--ink);
}
.ix-attention h2 { margin: 0; font-size: 15px; display: flex; align-items: center; gap: 8px; color: var(--warning-ink); }
.ix-attention-item { display: flex; flex-direction: column; gap: 2px; }
.ix-attention-item .ui-mono { overflow-wrap: anywhere; }
.ix-fix { color: var(--warning-ink); }
.ix-problems { margin-top: 12px; }
.ix-problems ul { margin: 8px 0 0; padding-left: 18px; display: flex; flex-direction: column; gap: 4px; overflow-wrap: anywhere; }

/* Upload dialog, after the hand-over. */
.ix-sent { display: flex; flex-direction: column; gap: 8px; margin-top: 12px; padding: 14px 16px; border-radius: var(--radius); background: var(--panel-alt); border: 1px solid var(--line-soft); }
.ix-sent-tiles { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.ix-sent p { margin: 0; }
@media (max-width: 560px) { .ix-sent-tiles { grid-template-columns: 1fr; } }

/* Super admin › Companies › Uploads (owner, 21 Oct 2026). */
.ix-admin { display: flex; flex-direction: column; gap: 14px; }
.ix-admin-head { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.ix-admin-tiles { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 12px; }
/* Super admin › Uploads: the Autodesk indexing mode switch (owner, 12 Nov 2026). */
.ix-mode { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 10px 12px; }
.ix-mode .ui-field { min-width: 340px; }
.ix-mode > .muted { flex: 1 1 320px; padding-bottom: 8px; }
.ix-notify { display: flex; align-items: center; min-height: 28px; }
.ix-admin-tiles .ui-stat { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 12px 14px; }
@media (max-width: 1100px) { .ix-admin-tiles { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
@media (max-width: 600px) { .ix-admin-tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* ---- Family suggestions (backlog 101; design canvas "Family Suggestions") ---- */
.rail-count { margin-left: auto; min-width: 20px; padding: 0 7px; border-radius: 999px; background: var(--rail-2); color: var(--rail-ink);
              font-size: 12px; font-weight: 600; line-height: 20px; text-align: center; }
.rail-count.is-new { background: #5aa9e6; color: #0b1520; }
.rail-link.active .rail-count { background: rgba(255, 255, 255, .2); color: inherit; }

.sg-thumb { position: relative; flex: none; width: var(--sg-thumb, 40px); height: var(--sg-thumb, 40px); display: grid; place-items: center;
            border: 1px solid var(--line-soft); border-radius: var(--radius); background: var(--panel-alt); color: var(--muted); }
.sg-thumb img { max-width: 100%; max-height: 100%; object-fit: contain; border-radius: inherit; }
.sg-thumb-dot { position: absolute; top: -4px; right: -4px; width: 10px; height: 10px; border-radius: 999px; background: var(--accent);
                border: 2px solid var(--panel); }
.sg-row-family { display: flex; align-items: center; gap: 12px; min-width: 0; }
.sg-row-text { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.sg-row-short { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 420px; }

.sg-title { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; }
.sg-title h1 { margin: 0; }
.sg-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.sg-detail { display: flex; flex-wrap: wrap; gap: 20px; align-items: flex-start; }
.sg-main { flex: 999 1 560px; min-width: 0; display: flex; flex-direction: column; gap: 20px; }
.sg-side { flex: 1 1 300px; min-width: 0; display: flex; flex-direction: column; gap: 16px; }
.sg-family { display: flex; flex-wrap: wrap; gap: 20px; }
.sg-family-facts { flex: 1 1 280px; min-width: 0; display: flex; flex-direction: column; gap: 14px; }
.sg-facts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px 16px; margin: 0; }
.sg-facts dt { color: var(--muted); font-size: 13px; }
.sg-facts dd { margin: 2px 0 0; }
.sg-types { display: flex; flex-wrap: wrap; gap: 6px; }
.sg-type { padding: 2px 8px; border: 1px solid var(--line-soft); border-radius: 6px; background: var(--panel-alt); font-size: 13px; }
.sg-files { display: flex; flex-wrap: wrap; gap: 8px; }
.sg-long { margin: 0; white-space: pre-wrap; line-height: 1.6; color: var(--ink-2); }

.sg-thread { display: flex; flex-direction: column; gap: 16px; padding: 20px; }
.sg-msg { display: flex; gap: 10px; max-width: 78%; }
.sg-msg.ours { align-self: flex-end; flex-direction: row-reverse; }
.sg-msg.ours .sg-msg-body { align-items: flex-end; }
.sg-msg-body { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.sg-avatar { flex: none; width: 32px; height: 32px; border-radius: 999px; display: grid; place-items: center; font-size: 12px; font-weight: 600;
             background: var(--accent-soft); color: var(--accent); }
.sg-msg.ours .sg-avatar { background: var(--rail); color: #ffffff; }
.sg-bubble { padding: 10px 12px; border-radius: 12px 12px 12px 2px; background: var(--ground); line-height: 1.5; white-space: pre-wrap; overflow-wrap: anywhere; }
.sg-msg.ours .sg-bubble { border-radius: 12px 12px 2px 12px; background: var(--accent); color: var(--on-accent); }
.sg-file-chip { align-self: flex-start; display: inline-flex; align-items: center; gap: 6px; padding: 6px 10px; border: 1px solid var(--line);
                border-radius: var(--radius); font-size: 13px; }
.sg-note { display: flex; gap: 10px; padding: 10px 12px; border: 1px dashed var(--warning-line); border-radius: var(--radius); background: var(--warning-soft);
           color: var(--warning-ink); }
.sg-note-head { display: block; font-weight: 600; }
.sg-note-text { margin-top: 2px; color: var(--ink-2); white-space: pre-wrap; overflow-wrap: anywhere; }
.sg-event { align-self: center; display: flex; flex-direction: column; align-items: center; gap: 2px; max-width: 90%; text-align: center;
            color: var(--muted); font-size: 13px; }
.sg-event.is-info { color: var(--warning-ink); font-weight: 600; }
.sg-event.is-approved, .sg-event.is-committed { color: var(--success); font-weight: 600; }
.sg-event.is-rejected { color: var(--danger); font-weight: 600; }
.sg-event-text { color: var(--ink-2); font-weight: 400; white-space: pre-wrap; }
.sg-composer { display: flex; flex-direction: column; gap: 10px; padding: 16px 20px; border-top: 1px solid var(--line); background: var(--panel-alt);
               border-radius: 0 0 var(--radius-lg) var(--radius-lg); }
.sg-composer .ui-segmented { align-self: flex-start; }
.sg-text { width: 100%; box-sizing: border-box; resize: vertical; min-height: 80px; font: inherit; line-height: 1.5; }
.sg-composer-row { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.sg-composer-row .ui-spacer { flex: 1; }

.sg-side-list { display: flex; flex-direction: column; gap: 12px; }
.sg-side-list > div { display: flex; flex-direction: column; gap: 2px; }
.sg-side-list .ui-btn { align-self: flex-start; }
.sg-who { display: grid; grid-template-columns: 110px minmax(0, 1fr); gap: 8px; margin: 0; font-size: 14px; }
.sg-who dt { color: var(--muted); }
.sg-who dd { margin: 0; overflow-wrap: anywhere; }
.sg-similar { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.sg-similar li { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; }
.sg-similar .muted { flex-basis: 100%; overflow-wrap: anywhere; }

.sg-dest-head { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-bottom: 10px; }
.sg-dest-search { flex: 1 1 220px; }
.sg-dest-list { display: flex; flex-direction: column; gap: 4px; max-height: 50vh; overflow: auto; border: 1px solid var(--line); border-radius: var(--radius);
                padding: 4px; }
.sg-dest { display: flex; align-items: center; gap: 10px; width: 100%; padding: 8px 10px; border: 0; border-radius: 6px; background: transparent;
           color: inherit; font: inherit; text-align: left; cursor: pointer; }
.sg-dest:hover { background: var(--panel-alt); }
.sg-dest.is-chosen { background: var(--accent-soft); font-weight: 600; }
.sg-dest-path { flex: 1; min-width: 0; overflow-wrap: anywhere; }

.sg-commit { display: flex; flex-direction: column; gap: 16px; }
.sg-commit-where { display: flex; align-items: flex-start; gap: 12px; padding: 12px 14px; border: 1px solid var(--accent-line);
                   border-radius: var(--radius); background: var(--accent-soft); }
.sg-commit-where > div { flex: 1; min-width: 0; }
.sg-commit-where p { margin: 4px 0 0; }
.sg-years { border: 0; margin: 0; padding: 0; }
.sg-years-list { display: flex; flex-wrap: wrap; gap: 8px 16px; margin-top: 6px; }
.sg-more { padding: 0; border: 0; background: none; color: var(--accent); font: inherit; font-size: 13px; text-decoration: underline; cursor: pointer; }

/* ---- The website's purchase page (backlog 117): /buy and /buy/embed ---- */
.buy { display: flex; flex-direction: column; gap: 18px; max-width: 860px; }
.buy-head .site-lead { margin-bottom: 0; }
.buy-choices { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 12px; }
.buy-choice { display: flex; flex-direction: column; align-items: flex-start; gap: 6px; padding: 16px; text-align: left; }
.buy-choice strong { font-size: 15px; }
.buy-form { display: flex; flex-direction: column; align-items: flex-start; gap: 14px; max-width: 520px; }
.buy-form > .ui-field, .buy-form > div:not(.sheet-actions) { align-self: stretch; }
.buy-form h2, .buy-company h2 { margin: 0; }
.buy-companies { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; align-self: stretch; }
.buy-company-row { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap;
    border: 1px solid var(--line-soft); border-radius: var(--radius-lg); padding: 12px 14px; }
.buy-company-text { display: flex; flex-direction: column; align-items: flex-start; gap: 3px; }
.buy-company-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.buy-company { display: flex; flex-direction: column; gap: 10px; }
.buy-company-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.buy-key { font-family: "IBM Plex Mono", monospace; user-select: all; word-break: break-all; }
.buy-next { margin-top: 12px; }
.buy-next h3 { margin: 0 0 6px; font-size: 15px; }
.sub-receipt { align-self: stretch; }

.buy-embed { padding: 16px; }
.buy-embed-root { max-width: 900px; margin: 0 auto; display: flex; flex-direction: column; gap: 16px; }
/* The blog in kiwicodes.com's frame: 95% of the frame's width, without the site's 1160px column (owner, 1 Nov 2026). */
.buy-embed-root.is-wide { max-width: none; width: 95%; }
.buy-embed-root.is-wide .site-wrap { max-width: none; padding: 0; }
.buy-embed-root.is-wide .site-page { padding-top: 0; }
.buy-embed-root.is-wide .blog-layout { margin-top: 0; }
.buy-embed-foot { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; margin: 8px 0 0; }

/* Print or save as PDF (done screen): only the receipt. */
@media print {
    body * { visibility: hidden; }
    .print-area, .print-area * { visibility: visible; }
    .print-area { position: absolute; left: 0; top: 0; width: 100%; padding: 24px; color: #000; background: #fff; }
    .no-print { display: none !important; }
}
/* The spinner sits in the middle of the two placeholder cards while the list loads (owner, 31 Oct 2026). */
.download-loading-wrap { position: relative; }
.download-loading { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; gap: 8px; color: var(--muted); pointer-events: none; }

/* Blog categories, tags and sidebar (backlog 125): the public list and post pages, and Website › Categories and tags. */
.blog-layout { display: flex; flex-wrap: wrap; gap: 32px; align-items: flex-start; margin-top: 24px; }
.blog-side { flex: 1 1 260px; max-width: 100%; display: flex; flex-direction: column; gap: 16px; }
.blog-main { flex: 999 1 560px; min-width: 0; display: flex; flex-direction: column; gap: 18px; }
.blog-box { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 16px; margin: 0; }
.blog-box-tree { padding: 12px 8px; }
.blog-box-h { display: block; margin: 0 0 8px; font-size: 13px; font-weight: 600; color: var(--ink-2); }
.blog-box-tree > .blog-box-h { margin: 0 8px 6px; }
.blog-box-note { margin: -4px 0 10px; font-size: 12px; color: var(--muted); }
.blog-search { position: relative; display: flex; align-items: center; }
.blog-search .ui-input { width: 100%; padding-left: 36px; }
.blog-search-icon { position: absolute; left: 12px; color: var(--muted); pointer-events: none; }
.blog-tree, .blog-tree-sub { list-style: none; margin: 0; padding: 0; }
.blog-tree-sub { margin: 0 0 4px 41px; padding-left: 8px; border-left: 1px solid var(--line); }
.blog-tree-months { margin-left: 21px; }
.blog-tree-row { display: flex; align-items: center; }
.blog-tree-toggle { flex: none; width: 28px; height: 38px; display: grid; place-items: center; border: 0; background: transparent; border-radius: 6px; color: var(--muted); cursor: pointer; }
button.blog-tree-toggle:hover { background: var(--panel-alt); }
.blog-tree .ui-icon { transition: transform .15s; }
.blog-tree .ui-icon.is-open { transform: rotate(90deg); }
.blog-tree-link, .blog-tree-year { flex: 1 1 auto; display: flex; align-items: center; gap: 8px; min-height: 38px; padding: 6px 10px 6px 6px; border-radius: var(--radius); color: var(--ink); text-decoration: none; font-size: 14px; }
.blog-box-tree > .blog-tree-link { padding-left: 34px; }
.blog-tree-sub .blog-tree-link { padding-left: 10px; min-height: 36px; }
.blog-tree-year { width: 100%; border: 0; background: transparent; font: inherit; font-size: 14px; font-weight: 600; text-align: left; cursor: pointer; color: var(--ink); }
.blog-tree-year .ui-icon { color: var(--muted); }
.blog-tree-link:hover, .blog-tree-year:hover { background: var(--panel-alt); text-decoration: none; }
.blog-tree-link.is-on { background: var(--accent-soft); color: var(--accent-hover); font-weight: 600; }
.blog-tree-name { flex: 1 1 auto; min-width: 0; overflow-wrap: anywhere; }
.blog-count { font-size: 12px; font-weight: 400; color: var(--muted); }
.blog-tags { display: flex; flex-wrap: wrap; gap: 6px; }
.blog-tag { display: inline-flex; align-items: center; gap: 6px; min-height: 32px; padding: 4px 11px; box-sizing: border-box; border: 1px solid var(--line); border-radius: 999px; background: var(--panel); color: var(--ink-2); font-size: 13px; text-decoration: none; }
.blog-tag:hover { border-color: var(--accent-line); text-decoration: none; }
.blog-tag.is-on { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
.blog-tag.is-on .blog-count { color: inherit; opacity: .85; }
.blog-related { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 12px; font-size: 14px; }
.blog-related li { display: flex; flex-direction: column; gap: 2px; }
.blog-related a { font-weight: 500; line-height: 1.35; }
.blog-head { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 10px 16px; }
.blog-head-text { flex: 1 1 auto; min-width: 0; }
.blog-head-text p { margin: 0; }
.blog-head-text h2 { margin: 2px 0 0; font-size: 22px; letter-spacing: -0.01em; }
.blog-sort { flex: 0 0 170px; }
.blog-chips { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding: 10px 12px; background: var(--accent-soft); border: 1px solid var(--accent-line); border-radius: 10px; }
.blog-chip { display: inline-flex; align-items: center; gap: 4px; padding: 2px 4px 2px 10px; background: var(--panel); border: 1px solid var(--accent-line); border-radius: 999px; font-size: 13px; }
.blog-chip strong { font-weight: 600; }
.blog-chip-x { display: grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; color: var(--ink-2); }
.blog-chip-x:hover { background: var(--panel-alt); }
.blog-chip-clear { font-size: 13px; font-weight: 600; padding: 6px 4px; }
.blog-crumbs { display: flex; flex-wrap: wrap; gap: 6px; font-size: 14px; color: var(--muted); }
.post-card-main { display: flex; flex-direction: column; flex: 1 1 auto; color: inherit; text-decoration: none; }
.post-card-main:hover { text-decoration: none; }
.post-card-main:hover .post-title { color: var(--accent); }
.post-cat { align-self: flex-start; font-size: 12px; font-weight: 600; letter-spacing: .03em; text-transform: uppercase; color: var(--accent); }
.post-tags { display: flex; flex-wrap: wrap; gap: 6px; }
.post-card > .post-tags { padding: 0 18px 16px; }
.post-tag { display: inline-flex; align-items: center; min-height: 26px; padding: 2px 9px; box-sizing: border-box; border: 1px solid var(--line); border-radius: 999px; background: var(--panel-alt); color: var(--ink-2); font-size: 12px; text-decoration: none; }
a.post-tag:hover { border-color: var(--accent-line); text-decoration: none; }
.post-header { display: flex; flex-direction: column; gap: 10px; }
.post-meta-row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; font-size: 14px; }
.blog-main.post { max-width: 780px; }
.post-nav { display: flex; flex-wrap: wrap; gap: 12px; border-top: 1px solid var(--line); padding-top: 18px; margin-top: 8px; }
.post-nav a { flex: 1 1 240px; display: flex; flex-direction: column; gap: 2px; padding: 12px 14px; border: 1px solid var(--line); border-radius: 10px; background: var(--panel); color: var(--ink); font-weight: 500; text-decoration: none; }
.post-nav a:hover { border-color: var(--accent-line); }
.post-nav .post-nav-newer { text-align: right; }
.admin-post-text .post-tags { margin-top: 4px; }
.post-edit-sorting { display: flex; flex-wrap: wrap; gap: 16px; align-items: flex-start; padding: 14px 16px; background: var(--panel-alt); border: 1px solid var(--line-soft); border-radius: 10px; }
.post-edit-category { flex: 0 1 280px; }
.post-edit-tags { flex: 1 1 340px; }
.tag-input { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; min-height: 40px; box-sizing: border-box; padding: 4px 6px; border: 1px solid var(--line-strong); border-radius: var(--radius); background: var(--panel); }
.tag-input:focus-within { border-color: var(--focus); box-shadow: 0 0 0 1px var(--focus); }
.tag-input input { flex: 1 1 120px; min-width: 100px; height: 30px; border: 0; outline: none; background: transparent; font: inherit; font-size: 14px; color: var(--ink); }
.tag-chip { display: inline-flex; align-items: center; gap: 2px; padding: 2px 2px 2px 10px; border-radius: 999px; background: var(--accent-soft); border: 1px solid var(--accent-line); font-size: 13px; font-weight: 500; color: var(--accent-hover); }
.tag-chip button { display: grid; place-items: center; width: 24px; height: 24px; border: 0; border-radius: 50%; background: transparent; color: inherit; cursor: pointer; }
.tag-chip button:hover { background: var(--panel); }
.cat-admin { display: flex; flex-wrap: wrap; gap: 20px; align-items: flex-start; margin-top: 16px; }
.cat-admin-cats { flex: 3 1 460px; min-width: 0; }
.cat-admin-side { flex: 2 1 340px; min-width: 0; display: flex; flex-direction: column; gap: 20px; }
.cat-list, .cat-sublist { list-style: none; margin: 0; padding: 0; }
.cat-item { border-top: 1px solid var(--line-soft); padding: 4px 0; }
.cat-sublist { margin: 0 0 6px 26px; padding-left: 12px; border-left: 1px solid var(--line); }
.cat-row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; min-height: 40px; }
.cat-row-top .cat-name { font-weight: 600; }
.cat-name { flex: 1 1 160px; min-width: 0; overflow-wrap: anywhere; }
.cat-count { min-width: 64px; }
.cat-actions { display: inline-flex; flex-wrap: wrap; gap: 2px; }
.cat-rename { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; flex: 1 1 auto; }
.cat-rename .ui-input { flex: 1 1 200px; height: 34px; }
.cat-add-sub, .cat-add { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding: 6px 0; }
.cat-add-sub .ui-input { flex: 0 1 240px; height: 34px; border-style: dashed; }
.cat-add { border-top: 1px solid var(--line-soft); padding-top: 14px; margin-top: 4px; }
.cat-add .ui-input { flex: 0 1 280px; }
.cat-tags { width: 100%; border-collapse: collapse; font-size: 14px; }
.cat-tags th { text-align: left; font-size: 12px; font-weight: 600; color: var(--ink-2); padding: 6px 4px; border-bottom: 1px solid var(--line); }
.cat-tags td { padding: 6px 4px; border-bottom: 1px solid var(--line-soft); }
.cat-tags .cat-actions { justify-content: flex-end; display: flex; }

/* Help and support (/support; owner, 3 Nov 2026): the Beacon help centre straight under the site header. */
.help-page { padding-bottom: 72px; }
/* Super admin > Website analytics (backlog 133): the website picker above the tiles. */
.wa-sites { margin-bottom: 16px; }
/* Super admin > Companies > Cloud storage (backlog 134). */
.cs-tiles { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin-bottom: 12px; }
.cs-tiles .ui-stat { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 12px 14px; }
@media (max-width: 700px) { .cs-tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.cs-what { margin: 0 0 8px 18px; padding: 0; }
.cs-what li { margin: 2px 0; }
.cs-list { margin: 8px 0 12px; }
.cs-failed { color: var(--danger, #c0392b); }
