/* ===================================================================
   Orasty - "islands" design system
   Near-black islands (#0d0e11) floating on a graphite canvas (#202124),
   separated by thin gaps. Poppins throughout, italic caps for
   navigation, one accent: Orasty purple (#676389 / #8b86b7).
   No inline styles anywhere in the app (the CSP forbids them), so every
   look lives here.
   =================================================================== */


:root {
    /* Dark (default): background 05050e, UI 0e0d14, main 676389, text ffffff */
    --canvas: #05050e;
    --island: #0e0d14;
    --panel: #0e0d14;
    --panel-2: #15141d;
    --panel-3: #1d1c27;
    --edge: #2a2935;
    --line: #23222d;
    --line-strong: #383648;

    --text: #ffffff;
    --body: #dcdbe6;
    --muted: #9794ae;
    --dim: #66647c;
    --nav-dim: #78768f;
    --nav-hi: #bdbbcf;

    --accent: #676389;
    --accent-hi: #8b86b7;
    --accent-text: #bdb9df;
    --accent-solid: #676389;
    --accent-solid-hi: #756fa0;
    --accent-soft: rgba(139, 134, 183, 0.15);
    --accent-line: rgba(139, 134, 183, 0.42);

    --ok: #3ddc97;
    --ok-soft: rgba(61, 220, 151, 0.13);
    --warn: #f4c152;
    --warn-soft: rgba(244, 193, 82, 0.13);
    --bad: #ff6b7a;
    --bad-soft: rgba(255, 107, 122, 0.13);
    --warn-text: #f5d68f;
    --bad-text: #ff9aa6;

    --teal: #3fc1c9;
    --sky: #5aa7ff;
    --gold: #f4c152;
    --coral: #ff8a6b;
    --rose: #f06ba1;
    --violet: #a78bfa;
    --aqua: #4de0c0;

    --gap: 6px;
    --r-island: 20px;
    --r-xl: 16px;
    --r-lg: 14px;
    --r-md: 11px;
    --r-sm: 8px;

    --font: "Poppins", "Segoe UI", system-ui, -apple-system, sans-serif;
    --mono: ui-monospace, "SFMono-Regular", Consolas, monospace;

    --top-h: 58px;
    color-scheme: dark;
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

html {
    -webkit-text-size-adjust: 100%;
}

body {
    margin: 0;
    min-height: 100vh;
    background: var(--canvas);
    color: var(--body);
    font-family: var(--font);
    font-size: 14px;
    font-weight: 500;
    line-height: 1.55;
    -webkit-font-smoothing: antialiased;
}

h1,
h2,
h3,
h4 {
    margin: 0;
    color: var(--text);
    font-weight: 700;
    letter-spacing: -0.01em;
    line-height: 1.25;
}

h1 {
    font-size: 26px;
    font-weight: 800;
}

h2 {
    font-size: 18px;
}

h3 {
    font-size: 15px;
}

p {
    margin: 0;
}

b,
strong {
    font-weight: 700;
    color: var(--text);
}

a {
    color: var(--accent-text);
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

/* height:auto keeps images in proportion even if they carry width/height attributes */
img {
    max-width: 100%;
    height: auto;
}

button,
input,
select,
textarea {
    font: inherit;
    color: inherit;
}

[hidden] {
    display: none !important;
}

code,
.mono {
    font-family: var(--mono);
    font-size: 0.9em;
}

code {
    background: var(--panel-3);
    padding: 1px 7px;
    border-radius: 6px;
    color: var(--body);
}

kbd {
    font-family: var(--font);
    font-style: italic;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.04em;
    color: var(--muted);
    border: 1px solid var(--edge);
    border-radius: 8px;
    padding: 2px 9px;
    white-space: nowrap;
}

:focus-visible {
    outline: 2px solid var(--accent-hi);
    outline-offset: 2px;
    border-radius: 8px;
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
}

.muted {
    color: var(--muted);
}

.dim {
    color: var(--dim);
}

.small {
    font-size: 12.5px;
}

.center {
    text-align: center;
}

.grow {
    flex: 1 1 auto;
    min-width: 0;
}

.row {
    display: flex;
    align-items: center;
    gap: 12px;
}

.row.wrap {
    flex-wrap: wrap;
}

.row.between {
    justify-content: space-between;
}

.col {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.gap-sm {
    gap: 8px;
}

.gap-lg {
    gap: 20px;
}

.mt {
    margin-top: 16px;
}

.mt-lg {
    margin-top: 28px;
}

.trunc {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    min-width: 0;
}

svg.icon {
    flex: none;
    display: inline-block;
    vertical-align: middle;
}

* {
    scrollbar-width: thin;
    scrollbar-color: var(--line-strong) transparent;
}

::-webkit-scrollbar {
    width: 10px;
    height: 10px;
}

::-webkit-scrollbar-thumb {
    background: var(--line-strong);
    border-radius: 6px;
    border: 2px solid transparent;
    background-clip: padding-box;
}

::-webkit-scrollbar-track {
    background: transparent;
}

/* ------------------------------------------------------------------ islands */
.island {
    background: var(--island);
    border: 1px solid var(--edge);
    border-radius: var(--r-island);
}

/* ------------------------------------------------------------------ buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    height: 38px;
    padding: 0 16px;
    border-radius: var(--r-md);
    border: 1px solid var(--edge);
    background: var(--panel-3);
    color: var(--text);
    font-weight: 700;
    font-size: 13px;
    cursor: pointer;
    white-space: nowrap;
    transition: background-color 0.15s, border-color 0.15s, opacity 0.15s;
    text-decoration: none;
}

.btn:hover {
    background: var(--panel-3);
    text-decoration: none;
}

.btn:disabled,
.btn[aria-disabled="true"] {
    opacity: 0.5;
    cursor: not-allowed;
}

.btn-primary {
    background: var(--accent-solid);
    border-color: transparent;
    color: #fff;
}

.btn-primary:hover {
    background: var(--accent-solid-hi);
}

.btn-soft {
    background: var(--accent-soft);
    color: var(--accent-text);
    border-color: var(--accent-line);
}

.btn-soft:hover {
    background: rgba(139, 134, 183, 0.26);
}

.btn-ghost {
    background: transparent;
    color: var(--text);
}

.btn-ghost:hover {
    background: var(--panel-3);
}

.btn-danger {
    background: #d6404a;
    border-color: transparent;
    color: #fff;
}

.btn-danger:hover {
    background: #e2525b;
}

.btn-danger-soft {
    background: var(--bad-soft);
    color: var(--bad-text);
    border-color: rgba(255, 107, 122, 0.35);
}

.btn-danger-soft:hover {
    background: rgba(255, 107, 122, 0.24);
}

.btn-warn {
    background: var(--warn-soft);
    color: var(--warn);
    border-color: rgba(244, 193, 82, 0.4);
}

.btn-warn:hover {
    background: rgba(244, 193, 82, 0.22);
}

.btn-sm {
    height: 30px;
    padding: 0 12px;
    font-size: 12px;
    border-radius: 9px;
}

.btn-lg {
    height: 46px;
    padding: 0 24px;
    font-size: 14px;
    border-radius: 14px;
}

.btn-block {
    width: 100%;
}

.btn-icon {
    width: 38px;
    padding: 0;
}

.btn-sm.btn-icon {
    width: 30px;
}

.link-btn {
    background: none;
    border: 0;
    padding: 0;
    color: var(--accent-text);
    cursor: pointer;
    font-weight: 600;
}

.link-btn:hover {
    text-decoration: underline;
}

.link-btn.danger {
    color: var(--bad-text);
}

.iconbtn {
    position: relative;
    display: inline-grid;
    place-items: center;
    width: 38px;
    height: 38px;
    background: transparent;
    border: 1px solid var(--edge);
    border-radius: var(--r-md);
    color: var(--muted);
    cursor: pointer;
}

.iconbtn:hover {
    color: var(--text);
    background: var(--panel-3);
}

.badge {
    position: absolute;
    top: -6px;
    right: -6px;
    min-width: 19px;
    height: 19px;
    padding: 0 5px;
    border-radius: 10px;
    background: var(--accent-solid);
    color: #fff;
    font-size: 10.5px;
    font-weight: 800;
    display: grid;
    place-items: center;
    border: 2px solid var(--island);
}

/* ------------------------------------------------------------------ fields */
.field {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.field>label,
.label {
    font-weight: 700;
    font-size: 13px;
    color: var(--text);
}

.field .req {
    color: var(--bad);
}

.hint {
    color: var(--muted);
    font-size: 12px;
}

.err {
    color: var(--bad-text);
    font-size: 12.5px;
}

.err:empty {
    display: none;
}

.input,
.select,
.textarea {
    width: 100%;
    background: var(--panel-2);
    border: 1px solid var(--edge);
    border-radius: var(--r-md);
    padding: 0 14px;
    height: 42px;
    outline: none;
    transition: border-color 0.15s;
    color: var(--text);
}

.textarea {
    height: auto;
    min-height: 92px;
    padding: 10px 14px;
    resize: vertical;
    line-height: 1.5;
}

.select {
    appearance: none;
    padding-right: 36px;
    cursor: pointer;
    background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(135deg, var(--muted) 50%, transparent 50%);
    background-position: calc(100% - 19px) 18px, calc(100% - 14px) 18px;
    background-size: 5px 5px;
    background-repeat: no-repeat;
}

.select option {
    background: var(--panel-2);
}

.input:focus,
.select:focus,
.textarea:focus {
    border-color: var(--accent-line);
    box-shadow: 0 0 0 3px var(--accent-soft);
}

.input::placeholder,
.textarea::placeholder {
    color: var(--dim);
    font-style: italic;
}

.input:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

input[type="color"] {
    width: 52px;
    height: 42px;
    padding: 4px;
    background: var(--panel-2);
    border: 1px solid var(--edge);
    border-radius: var(--r-md);
    cursor: pointer;
}

.input-icon {
    position: relative;
}

.input-icon .icon {
    position: absolute;
    left: 13px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--dim);
    pointer-events: none;
}

.input-icon .input {
    padding-left: 38px;
}


.input-prefix .input {
    padding-left: 30px;
}

.check {
    display: flex;
    gap: 10px;
    align-items: flex-start;
    cursor: pointer;
}

.check input {
    margin-top: 4px;
    width: 16px;
    height: 16px;
    accent-color: var(--accent);
    flex: none;
}

.switch {
    position: relative;
    width: 42px;
    height: 24px;
    flex: none;
}

.switch input {
    position: absolute;
    inset: 0;
    opacity: 0;
    cursor: pointer;
    margin: 0;
    z-index: 1;
}

.switch i {
    position: absolute;
    inset: 0;
    border-radius: 12px;
    background: var(--panel-3);
    border: 1px solid var(--line-strong);
    transition: background-color 0.15s;
}

.switch i::after {
    content: "";
    position: absolute;
    top: 3px;
    left: 3px;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: #fff;
    transition: transform 0.15s;
}

.switch input:checked+i {
    background: var(--accent-solid);
    border-color: var(--accent);
}

.switch input:checked+i::after {
    transform: translateX(18px);
}

.switch input:focus-visible+i {
    outline: 2px solid var(--accent-hi);
    outline-offset: 2px;
}

.form-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
}

.form-actions {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
    margin-top: 4px;
}
/* ------------------------------------------------------------------ error and account-notice pages: 401 / 403 / 404 / 500 / ban / warning */
.errpage {
    flex: 1;
    display: grid;
    place-items: center;
    padding: clamp(24px, 6vw, 72px);
    background-image: radial-gradient(ellipse at 50% 0%, rgba(139, 134, 183, 0.12), transparent 60%);
}

.errpage-card {
    width: min(560px, 100%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 14px;
    text-align: center;
}

.errpage-icon {
    width: 64px;
    height: 64px;
    border-radius: 18px;
    display: grid;
    place-items: center;
    color: var(--accent-text);
    background: var(--accent-soft);
    border: 1px solid var(--accent-line);
}

.errpage[data-notice="ban"] .errpage-icon {
    color: var(--bad);
    background: var(--bad-soft);
    border-color: rgba(255, 107, 122, 0.4);
}

.errpage[data-notice="warn"] .errpage-icon,
.errpage[data-notice="500"] .errpage-icon {
    color: var(--warn);
    background: var(--warn-soft);
    border-color: rgba(244, 193, 82, 0.4);
}

.errpage-status { margin: 0 0 12px; }

.errpage-code {
    font-size: clamp(56px, 12vw, 96px);
    font-weight: 800;
    font-style: italic;
    line-height: 1;
    letter-spacing: -0.02em;
    color: var(--accent-hi);
}

.oops {
    font-size: clamp(24px, 4vw, 32px);
    text-transform: uppercase;
    font-style: italic;
}

.errpage-text {
    color: var(--body);
    line-height: 1.7;
    max-width: 46ch;
}

.errpage-path {
    color: var(--muted);
    font-size: 13px;
}

.errpage-path code {
    font-family: var(--mono);
    color: var(--accent-text);
    overflow-wrap: anywhere;
}

.errpage-details {
    width: 100%;
    text-align: left;
    background: var(--panel-2);
    border: 1px solid var(--line);
    border-radius: var(--r-lg);
    padding: 6px 16px;
}

.errpage-details[hidden] {
    display: none;
}

.errpage-row {
    display: flex;
    justify-content: space-between;
    gap: 20px;
    padding: 10px 0;
    border-bottom: 1px solid var(--line);
    font-size: 13.5px;
}

.errpage-row:last-child {
    border-bottom: 0;
}

.errpage-row .l {
    color: var(--muted);
    flex: none;
}

.errpage-row .v {
    text-align: right;
    overflow-wrap: anywhere;
}

.errpage-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: center;
    margin-top: 6px;
}

.errpage-actions [hidden] {
    display: none;
}

/* ------------------------------------------------------------------ cards inside islands */
.sect {
    background: var(--panel-2);
    border: 1px solid var(--line);
    border-radius: var(--r-xl);
    overflow: hidden;
}

.sect+.sect {
    margin-top: 14px;
}

.sect-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    padding: 16px 20px;
    border-bottom: 1px solid var(--line);
}

.sect-title {
    font-size: 15px;
    font-weight: 800;
}

.sect-desc {
    color: var(--muted);
    margin-top: 2px;
    font-size: 13px;
}

.sect>.inset {
    padding: 20px;
    background: transparent;
    border: 0;
    border-radius: 0;
}

.inset+.inset {
    border-top: 1px solid var(--line);
}

.sect-foot {
    margin-top: 14px;
    color: var(--muted);
    font-size: 13px;
}

.collapsible-head:hover {
    background: var(--panel-3, rgba(255, 255, 255, 0.03));
}

.collapsible-head .chev {
    margin-left: auto;
    color: var(--dim);
    transition: transform 0.15s;
    flex-shrink: 0;
    align-self: center;
}

.collapsible-head[aria-expanded="true"] .chev {
    transform: rotate(90deg);
}

.card {
    background: var(--panel-2);
    border: 1px solid var(--line);
    border-radius: var(--r-lg);
    padding: 16px;
}

.card-link {
    display: block;
    color: inherit;
    cursor: pointer;
    transition: border-color 0.15s, background-color 0.15s;
    text-align: left;
    width: 100%;
    font: inherit;
}

.card-link:hover {
    border-color: var(--accent-line);
    background: var(--panel-3);
    text-decoration: none;
}

.grid-cards {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(290px, 1fr));
    gap: 12px;
}

.divider {
    height: 1px;
    background: var(--line);
    margin: 16px 0;
    border: 0;
}

.empty {
    text-align: center;
    padding: 34px 20px;
    color: var(--muted);
}

.empty h3 {
    color: var(--text);
    margin-bottom: 6px;
}

.empty .btn {
    margin-top: 14px;
}

.skeleton {
    height: 14px;
    border-radius: 6px;
    background: linear-gradient(90deg, var(--panel-2), var(--panel-3), var(--panel-2));
    background-size: 200% 100%;
    animation: shimmer 1.4s infinite;
}

@keyframes shimmer {
    to {
        background-position: -200% 0;
    }
}

.notice {
    display: flex;
    gap: 10px;
    padding: 12px 14px;
    border-radius: var(--r-md);
    background: var(--warn-soft);
    border: 1px solid rgba(244, 193, 82, 0.35);
    color: var(--warn-text);
}

.notice.bad {
    background: var(--bad-soft);
    border-color: rgba(255, 107, 122, 0.35);
    color: var(--bad-text);
}

.notice.info {
    background: var(--accent-soft);
    border-color: var(--accent-line);
    color: var(--accent-text);
}

.steps {
    margin: 0;
    padding-left: 20px;
    display: grid;
    gap: 6px;
    color: var(--muted);
}

.hook-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(340px, 1fr));
    gap: 12px;
}

.hook {
    display: flex;
    flex-direction: column;
}

.hook .field+.row {
    margin-top: 8px;
}

/* ------------------------------------------------------------------ small parts */
.avatar {
    --s: 36px;
    width: var(--s);
    height: var(--s);
    border-radius: 50%;
    flex: none;
    display: inline-grid;
    place-items: center;
    overflow: hidden;
    background: var(--accent-solid);
    color: #fff;
    font-weight: 800;
    font-size: calc(var(--s) * 0.4);
    object-fit: cover;
    position: relative;
}

.avatar.sq {
    border-radius: calc(var(--s) * 0.28);
}

.avatar.s-xs {
    --s: 24px;
}

.avatar.s-sm {
    --s: 30px;
}

.avatar.s-lg {
    --s: 48px;
}

.avatar.s-xl {
    --s: 72px;
}

.avatar img {
    -webkit-user-drag: none;
    user-select: none;
    -webkit-touch-callout: none;
}

.presence {
    position: absolute;
    right: -1px;
    bottom: -1px;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    border: 2px solid var(--island);
    background: var(--dim);
}

.presence.on_duty {
    background: var(--ok);
}

.presence.on_break {
    background: var(--warn);
}

.presence.off_duty {
    background: var(--bad);
}

.pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    height: 23px;
    padding: 0 10px;
    border-radius: 8px;
    font-size: 11.5px;
    font-weight: 700;
    background: var(--panel-3);
    color: var(--muted);
    white-space: nowrap;
}

.pill.ok {
    background: var(--ok-soft);
    color: var(--ok);
}

.pill.warn {
    background: var(--warn-soft);
    color: var(--warn);
}

.pill.bad {
    background: var(--bad-soft);
    color: var(--bad-text);
}

.pill.accent {
    background: var(--accent-soft);
    color: var(--accent-text);
}

.pill .dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: currentColor;
}

.role-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    height: 24px;
    padding: 0 10px;
    border-radius: 8px;
    border: 1px solid var(--line-strong);
    background: var(--accent-soft);
    font-size: 12px;
    font-weight: 600;
    color: var(--body);
}

.role-chip::before {
    content: "";
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--c, var(--accent-hi));
}

.role-chip.owner {
    color: var(--gold);
    border-color: rgba(244, 193, 82, 0.4);
}

.role-chip.owner::before {
    background: var(--gold);
}

.role-pick {
    padding: 8px 10px;
    border-radius: 10px;
    align-items: center;
}

.role-pick:hover {
    background: var(--panel-3);
}

.role-pick small {
    margin-left: auto;
}

.member-pick {
    max-height: 240px;
    overflow-y: auto;
}

.tag {
    display: inline-block;
    padding: 2px 9px;
    border-radius: 6px;
    background: var(--panel-3);
    color: var(--muted);
    font-size: 12px;
}

.stat {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.stat b {
    font-size: 22px;
    font-weight: 800;
    letter-spacing: -0.02em;
}

.stat span {
    color: var(--muted);
    font-size: 12.5px;
}

.stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
    gap: 14px;
}

.who {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
}

.who b {
    font-weight: 700;
    display: block;
}

.who small {
    color: var(--muted);
    display: block;
}

.list-row {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 0;
    border-top: 1px solid var(--line);
}

.list-row:first-child {
    border-top: 0;
    padding-top: 0;
}

.list-row:last-child {
    padding-bottom: 0;
}

.presence-dot {
    width: 9px;
    height: 9px;
    border-radius: 50%;
    background: var(--line-strong);
    flex: none;
}

.presence-dot.unread {
    background: var(--accent-hi);
}

details.list-row {
    display: block;
}

details.list-row summary {
    cursor: pointer;
    font-weight: 600;
}

.progress {
    height: 6px;
    border-radius: 3px;
    background: var(--panel-3);
    overflow: hidden;
    min-width: 90px;
}

.progress>i {
    display: block;
    height: 100%;
    background: var(--accent-hi);
    border-radius: 3px;
}

.progress.ok>i {
    background: var(--ok);
}

.table-wrap {
    overflow-x: auto;
}

.table {
    width: 100%;
    border-collapse: collapse;
}

.table th {
    text-align: left;
    font-weight: 700;
    font-size: 11px;
    color: var(--muted);
    padding: 0 12px 10px;
    white-space: nowrap;
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

.table td {
    padding: 12px;
    border-top: 1px solid var(--line);
    vertical-align: middle;
}

.table tr:hover td {
    background: rgba(255, 255, 255, 0.015);
}

.table td.actions {
    text-align: right;
    white-space: nowrap;
}

.table td.actions .btn+.btn {
    margin-left: 6px;
}

.segmented {
    display: inline-flex;
    padding: 3px;
    gap: 2px;
    background: var(--panel-2);
    border: 1px solid var(--edge);
    border-radius: var(--r-md);
}

.segmented button {
    border: 0;
    background: transparent;
    color: var(--muted);
    height: 30px;
    padding: 0 12px;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 700;
    font-size: 12px;
}

.segmented button[aria-pressed="true"] {
    background: var(--panel-3);
    color: var(--text);
}

.crumbs {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 0;
    height: 34px;
    margin-left: 46px;
    color: var(--dim);
    font-size: 11.5px;
    font-weight: 700;
    text-transform: uppercase;
    font-style: italic;
    letter-spacing: 0.06em;
}

.crumbs .sep {
    color: var(--line-strong);
}

.page-head {
    margin-bottom: 18px;
}

.page-head h1 {
    margin-top: 2px;
}

.page-head p {
    color: var(--muted);
    margin-top: 4px;
}

.page-head .crumbs {
    color: var(--dim);
}





/* ------------------------------------------------------------------ the shell: top bar */


.top {
    display: flex;
    align-items: stretch;
    gap: var(--gap);
    height: var(--top-h);
    flex: none;
}

.top .island {
    border-radius: var(--r-island);
}

.top .island.tabs {
    background: transparent;
    border: 0;
    min-width: 0;
}

.brand {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: -0.03px;
    width: 232px;
    flex: none;
    color: var(--text);
    font-size: 27px;
    font-weight: 800;
    letter-spacing: -0.03em;
}

.brand:hover {
    text-decoration: none;
}

.brand img {
    width: 34px;
    height: 34px;
    margin-right: -0.3px;
}

.tabs {
    display: flex;
    align-items: stretch;
    background: transparent;
    border: 0;
    border-radius: 0;
}

.tab {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 150px;
    padding: 0 30px 0 44px;
    margin-left: -24px;
    color: var(--nav-dim);
    font-style: italic;
    font-weight: 800;
    font-size: 14px;
    text-transform: uppercase;
    background: var(--island);
    border: 1px solid var(--edge);
    border-radius: var(--r-island);
}

.tab:first-child {
    margin-left: 0;
    padding-left: 30px;
}

.tab:nth-child(1) {
    z-index: 3;
}

.tab:nth-child(2) {
    z-index: 2;
}

.tab:nth-child(3) {
    z-index: 1;
}

.tab:hover {
    color: var(--nav-hi);
    text-decoration: none;
}

.tab[aria-current="page"] {
    color: var(--text);
}

.top-note {
    align-self: center;
    padding: 0 16px;
    color: var(--dim);
    font-size: 10.5px;
    font-weight: 700;
    font-style: italic;
    white-space: nowrap;
}

.top .spacer {
    flex: 1;
}

.top-mid {
    display: flex;
    align-items: center;
    gap: var(--gap);
    flex: 1;
    min-width: 0;
}

.cta-island {
    display: flex;
    flex: none;
    align-items: center;
    padding: 0 30px;
    color: #fff;
    font-style: italic;
    font-weight: 800;
    font-size: 14px;
    text-transform: uppercase;
    background: var(--accent-solid);
    border-radius: var(--r-island);
}

.cta-island:hover {
    background: var(--accent-solid-hi);
    text-decoration: none;
}





/* menus */
.menu-wrap {
    position: relative;
}

.menu {
    position: absolute;
    right: 0;
    top: calc(100% + 8px);
    min-width: 220px;
    padding: 6px;
    z-index: 60;
    background: var(--island);
    border: 1px solid var(--line-strong);
    border-radius: var(--r-xl);
    box-shadow: 0 18px 50px rgba(0, 0, 0, 0.55);
}

.menu.left {
    right: auto;
    left: 0;
}

.menu.up {
    top: auto;
    bottom: calc(100% + 8px);
    right: auto;
    left: 0;
}

.menu-item {
    display: flex;
    align-items: center;
    gap: 12px;
    width: 100%;
    padding: 10px 12px;
    border: 0;
    background: transparent;
    color: var(--text);
    border-radius: 10px;
    cursor: pointer;
    text-align: left;
    font-weight: 600;
    font-size: 13.5px;
}

.menu-item:hover {
    background: var(--panel-3);
    text-decoration: none;
}

.menu-item.danger {
    color: #ff8a95;
}

.menu-item .icon {
    color: var(--accent-hi);
}

.menu-item.danger .icon {
    color: #ff8a95;
}

.menu hr {
    border: 0;
    border-top: 1px solid var(--line);
    margin: 6px 0;
}

.notif-menu {
    width: min(380px, 92vw);
    padding: 0;
}

.notif-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 14px 16px;
    border-bottom: 1px solid var(--line);
}

.notif-list {
    max-height: 380px;
    overflow-y: auto;
}

.notif-item {
    display: block;
    width: 100%;
    text-align: left;
    padding: 12px 16px;
    border: 0;
    border-bottom: 1px solid var(--line);
    background: transparent;
    cursor: pointer;
    color: inherit;
}

.notif-item:hover {
    background: var(--panel-3);
}

.notif-item.unread {
    background: var(--accent-soft);
}

.notif-item b {
    display: block;
    font-weight: 700;
}

.notif-item span {
    color: var(--muted);
    font-size: 12.5px;
    display: block;
}

/* ------------------------------------------------------------------ overlays */
.overlay {
    position: fixed;
    inset: 0;
    z-index: 100;
    display: grid;
    place-items: center;
    padding: 20px;
    background: rgba(4, 5, 8, 0.72);
    backdrop-filter: blur(3px);
    overflow-y: auto;
}

.overlay.overlay-top {
    align-items: start;
    padding-top: 12vh;
}

.modal {
    width: min(520px, 100%);
    background: var(--island);
    border: 1px solid var(--line-strong);
    border-radius: var(--r-island);
    padding: 24px;
    box-shadow: 0 30px 80px rgba(0, 0, 0, 0.6);
    position: relative;
}

.modal.wide {
    width: min(760px, 100%);
}

.modal-x {
    position: absolute;
    top: 14px;
    right: 14px;
}

.modal h2 {
    padding-right: 36px;
}

.modal-sub {
    color: var(--muted);
    margin-top: 4px;
}

.modal-body {
    margin-top: 18px;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.modal-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    margin-top: 22px;
}

.palette {
    width: min(640px, 100%);
    background: var(--island);
    border: 1px solid var(--line-strong);
    border-radius: var(--r-island);
    overflow: hidden;
    box-shadow: 0 30px 80px rgba(0, 0, 0, 0.6);
}

.palette-input {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px 20px;
    border-bottom: 1px solid var(--line);
    color: var(--dim);
}

.palette-input input {
    flex: 1;
    background: none;
    border: 0;
    outline: 0;
    font-size: 15px;
    font-style: italic;
    color: var(--text);
}

.palette-list {
    max-height: 55vh;
    overflow-y: auto;
    padding: 8px;
}

.palette-group {
    padding: 12px 12px 6px;
    font-size: 11px;
    font-weight: 800;
    color: var(--muted);
    letter-spacing: 0.08em;
    text-transform: uppercase;
    font-style: italic;
}

.palette-item {
    display: flex;
    align-items: center;
    gap: 14px;
    width: 100%;
    padding: 10px 12px;
    border: 0;
    background: transparent;
    color: var(--muted);
    border-radius: 12px;
    cursor: pointer;
    text-align: left;
    font-size: 14px;
}

.palette-item .grow {
    color: var(--text);
    font-weight: 600;
}

.palette-item[aria-selected="true"],
.palette-item:hover {
    background: var(--panel-3);
}

.toasts {
    position: fixed;
    right: 20px;
    bottom: 20px;
    z-index: 200;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.toast {
    min-width: 240px;
    max-width: 380px;
    padding: 12px 16px;
    background: var(--island);
    border: 1px solid var(--line-strong);
    border-left: 3px solid var(--accent-hi);
    border-radius: var(--r-md);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.5);
    animation: toast-in 0.18s ease-out;
    font-weight: 600;
}

.toast.error {
    border-left-color: var(--bad);
}

.toast.ok {
    border-left-color: var(--ok);
}

@keyframes toast-in {
    from {
        opacity: 0;
        transform: translateY(8px);
    }
}

/* ------------------------------------------------------------------ the Panel */
.pn-shell {
    height: 100vh;
    padding: var(--gap);
    display: flex;
    flex-direction: column;
    gap: var(--gap);
}

.pn-grid {
    flex: 1;
    display: grid;
    grid-template-columns: 350px minmax(360px, 1fr) 440px;
    grid-template-rows: minmax(0, 1fr);
    gap: var(--gap);
    height: calc(100vh - var(--top-h) - var(--gap) * 3);
    min-height: 0;
}

.pn-col {
    min-width: 0;
    min-height: 0;
    overflow-y: auto;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 0;
}

.pn-col>h2 {
    padding: 20px 22px 0;
    font-size: 17px;
    font-weight: 800;
    text-transform: uppercase;
    font-style: italic;
    letter-spacing: 0.01em;
}

.pn-col>*+* {
    margin-top: 14px;
}

.pn-col>*:not(.pn-block):not(h2) {
    margin-left: 22px;
    margin-right: 22px;
}

.pn-col>*:last-child {
    margin-bottom: 22px;
}

.pn-col>.pn-block+.pn-block {
    margin-top: 0;
}

.pn-col>.divider {
    margin-top: 22px;
    margin-bottom: 22px;
}

.pn-tabs {
    display: none;
}

.pn-block {
    padding: 20px 22px;
    border-top: 1px solid var(--line);
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.pn-block:first-child {
    border-top: 0;
}

.block-title {
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--dim);
    font-style: italic;
}

.greet {
    display: flex;
    align-items: center;
    gap: 14px;
}

.greet h2 {
    font-size: 17px;
    font-weight: 800;
}

.status-row {
    display: flex;
    align-items: center;
    gap: 12px;
}

.status-pill {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    height: 26px;
    padding: 0 12px;
    border-radius: 8px;
    background: var(--panel-3);
    font-size: 11.5px;
    font-weight: 800;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    font-style: italic;
}

.status-pill i {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--bad);
}

.status-pill.on_duty {
    background: var(--ok-soft);
    color: var(--ok);
}

.status-pill.on_duty i {
    background: var(--ok);
}

.status-pill.on_break {
    background: var(--warn-soft);
    color: var(--warn);
}

.status-pill.on_break i {
    background: var(--warn);
}

.shift-box {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.shift-timer {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    padding: 12px 16px;
    border-radius: var(--r-md);
    background: var(--panel-2);
    border: 1px solid var(--line);
}

.shift-timer b {
    font-size: 26px;
    font-variant-numeric: tabular-nums;
    letter-spacing: -0.02em;
    font-weight: 800;
}

.shift-btns {
    display: grid;
    grid-template-columns: 1fr;
    gap: 10px;
}

.shift-btns.two {
    grid-template-columns: 1fr 1fr;
}

.btn-shift {
    height: 44px;
    font-size: 13.5px;
    border-radius: var(--r-md);
    font-style: italic;
    text-transform: uppercase;
    letter-spacing: 0.02em;
    font-weight: 800;
}

.btn-shift.start {
    background: var(--accent-solid);
    color: #fff;
    border-color: transparent;
}

.btn-shift.start:hover {
    background: var(--accent-solid-hi);
}

.btn-shift.brk {
    background: var(--warn-soft);
    color: var(--warn);
    border: 1px solid rgba(244, 193, 82, 0.35);
}

.btn-shift.stop {
    background: var(--bad-soft);
    color: var(--bad-text);
    border: 1px solid rgba(255, 107, 122, 0.35);
}

.btn-shift.stop:hover {
    background: rgba(255, 107, 122, 0.24);
}

.btn-shift.brk:hover {
    background: rgba(244, 193, 82, 0.22);
}

.week-card {
    display: flex;
    align-items: center;
    gap: 16px;
    padding-top: 16px;
    border-top: 1px dashed var(--line-strong);
}

.ring {
    --p: 0;
    flex: none;
    width: 84px;
    height: 84px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    background: conic-gradient(var(--accent-hi) calc(var(--p) * 1%), var(--panel-3) 0);
}

.ring.done {
    background: conic-gradient(var(--ok) 100%, var(--panel-3) 0);
}

.ring-inner {
    width: 66px;
    height: 66px;
    border-radius: 50%;
    background: var(--island);
    display: grid;
    place-items: center;
    font-variant-numeric: tabular-nums;
}

.ring-inner b {
    font-size: 14px;
    font-weight: 800;
}

.week-time {
    font-size: 20px;
    font-weight: 800;
    letter-spacing: -0.02em;
    color: var(--text);
    font-variant-numeric: tabular-nums;
}

.action-list {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.action {
    --tc: var(--accent-hi);
    display: flex;
    align-items: center;
    gap: 12px;
    width: 100%;
    padding: 8px;
    border: 0;
    background: transparent;
    color: var(--text);
    border-radius: var(--r-md);
    cursor: pointer;
    text-align: left;
}

.action:hover {
    background: var(--panel-2);
}

.action b {
    display: block;
    font-weight: 700;
    font-size: 13.5px;
}

.action small {
    display: block;
    color: var(--muted);
    font-size: 12px;
    font-weight: 500;
}

.action>.icon:last-child {
    color: var(--dim);
}

.action-chip {
    display: inline-grid;
    place-items: center;
    width: 34px;
    height: 34px;
    border-radius: 10px;
    flex: none;
    color: var(--tc);
    background: color-mix(in srgb, var(--tc) 16%, transparent);
}

.a-teal {
    --tc: var(--teal);
}

.a-sky {
    --tc: var(--sky);
}

.a-gold {
    --tc: var(--gold);
}

.a-violet {
    --tc: var(--violet);
}

.a-coral {
    --tc: var(--coral);
}

.a-aqua {
    --tc: var(--aqua);
}

.a-rose {
    --tc: var(--rose);
}

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

.ingame h3 {
    font-size: 15px;
    font-weight: 800;
}

.btn-join {
    height: 34px;
    border-radius: 10px;
    background: var(--ok-soft);
    color: var(--ok);
    border: 1px solid rgba(61, 220, 151, 0.35);
}

.btn-join:hover {
    background: rgba(61, 220, 151, 0.24);
}

.players {
    display: flex;
    flex-direction: column;
    gap: 2px;
    max-height: 240px;
    overflow-y: auto;
}

.player-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 7px 10px;
    border-radius: 10px;
}

.player-row:hover {
    background: var(--panel-2);
}

.player-row small {
    color: var(--muted);
}

.feed {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.feed-tools {
    display: flex;
    gap: 10px;
}

.feed-tools .input-icon {
    flex: 1;
}

.feed-item {
    padding: 12px 14px;
    border-radius: var(--r-md);
    background: var(--panel-2);
    border-left: 3px solid var(--accent-hi);
    overflow-wrap: anywhere;
}

.feed-item small {
    color: var(--muted);
}

.plog {
    --tc: var(--accent-hi);
    padding: 14px 16px;
    border-radius: var(--r-md);
    background: var(--panel-2);
    border-left: 3px solid var(--tc);
}

.plog-head {
    display: flex;
    align-items: center;
    gap: 12px;
}

.plog-head .iconbtn {
    width: 32px;
    height: 32px;
}

.plog h3 {
    font-size: 16px;
    margin: 10px 0 4px;
    color: var(--tc);
    font-weight: 800;
    text-transform: uppercase;
    font-style: italic;
}

.plog dl {
    margin: 0;
    display: grid;
    gap: 4px;
}

.plog dt {
    font-weight: 700;
    display: inline;
    color: var(--text);
}

.plog dd {
    display: inline;
    margin: 0;
    color: var(--muted);
    overflow-wrap: anywhere;
}

.plog .reason {
    color: var(--body);
    margin: 4px 0 10px;
    white-space: pre-wrap;
    overflow-wrap: anywhere;
    line-height: 1.55;
}

.plog .foot {
    color: var(--muted);
    font-size: 12px;
    margin-top: 12px;
}

.user-pick {
    display: flex;
    flex-direction: column;
    gap: 4px;
    max-height: 260px;
    overflow-y: auto;
    margin-top: 8px;
}

.user-pick button {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    padding: 8px 10px;
    border: 0;
    background: transparent;
    color: inherit;
    border-radius: 10px;
    cursor: pointer;
    text-align: left;
}

.user-pick button:hover {
    background: var(--panel-2);
}

.chosen {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 12px;
    border-radius: var(--r-md);
    background: var(--accent-soft);
    border: 1px solid var(--accent-line);
}

/* ------------------------------------------------------------------ public pages: landing, login, legal */
.public {
    min-height: 100vh;
    padding: var(--gap);
    display: flex;
    flex-direction: column;
    gap: var(--gap);
}

.public main {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: var(--gap);
}

.hero-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr);
    gap: var(--gap);
}

.hero {
    padding: clamp(28px, 5vw, 64px);
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.hero h1 {
    font-size: clamp(32px, 4.6vw, 54px);
    line-height: 1.08;
    letter-spacing: -0.035em;
    font-weight: 800;
}

.hero h1 em {
    color: var(--accent-hi);
    font-style: italic;
}

.hero p.lead {
    color: var(--muted);
    font-size: 16px;
    margin-top: 18px;
    max-width: 46ch;
    line-height: 1.7;
    font-weight: 500;
}

.feature-grid p.lead {
    color: var(--muted);
    font-size: 16px;
    margin-top: 18px;
    max-width: 46ch;
    line-height: 1.7;
    font-weight: 500;
}


.hero .cta {
    display: flex;
    gap: 10px;
    margin-top: 30px;
    flex-wrap: wrap;
}

.mock-wrap {
    padding: 100px;
    display: grid;
    place-items: center;
    background-image: radial-gradient(circle at 70% 20%, rgba(139, 134, 183, 0.16), transparent 55%);
}

.mock {
    width: 100%;
    background: var(--island);
    border: 1px solid var(--edge);
    border-radius: 18px;
    overflow: hidden;
    box-shadow: 0 30px 80px rgba(0, 0, 0, 0.5);
}

.mock-bar {
    display: flex;
    align-items: center;
    gap: 2px;
    padding: 12px 16px;
    border-bottom: 1px solid var(--line);
    color: var(--muted);
    font-weight: 700;
}

.mock-bar img {
    width: 20px;
    height: 20px;
}

.mock-grid {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
}

.mock-col {
    padding: 14px;
    border-left: 1px solid var(--line);
    display: flex;
    flex-direction: column;
    gap: 10px;
    min-height: 240px;
}

.mock-col:first-child {
    border-left: 0;
}

.mock-line {
    height: 9px;
    border-radius: 5px;
    background: var(--panel-3);
}

.mock-line.w60 {
    width: 60%;
}

.mock-line.w80 {
    width: 80%;
}

.mock-line.w40 {
    width: 40%;
}

.mock-btn {
    height: 30px;
    border-radius: 9px;
    background: var(--accent-solid);
}

.mock-tiles {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 6px;
}

.mock-tiles i {
    height: 26px;
    border-radius: 8px;
    background: var(--tc);
}

.mock-card {
    padding: 10px;
    border: 1px solid var(--line);
    border-radius: 10px;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.t-green {
    --tc: var(--teal);
}

.t-pink {
    --tc: var(--rose);
}

.t-blue {
    --tc: var(--sky);
}

.t-amber {
    --tc: var(--gold);
}

.t-orange {
    --tc: var(--coral);
}

.t-purple {
    --tc: var(--accent-hi);
}

.features {
    padding: clamp(24px, 4vw, 48px);
}

.features h2 {
    font-size: clamp(22px, 3vw, 30px);
    letter-spacing: -0.02em;
    margin-bottom: 24px;
    max-width: 26ch;
    font-weight: 800;
}

.feature-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(290px, 1fr));
    gap: 10px;
}

.feature {
    background: var(--panel-2);
    border: 1px solid var(--line);
    border-radius: var(--r-lg);
    padding: 20px;
}

.feature .icon-wrap {
    width: 42px;
    height: 42px;
    border-radius: 12px;
    background: var(--accent-soft);
    color: var(--accent-hi);
    display: grid;
    place-items: center;
    margin-bottom: 14px;
}

.feature p {
    color: var(--muted);
    margin-top: 6px;
    font-size: 13.5px;
}

.site-footer,
footer {
    display: flex;
    flex-wrap: wrap;
    gap: 12px 28px;
    justify-content: space-between;
    align-items: center;
    padding: 18px 26px;
    color: var(--muted);
    font-size: 12.5px;
    background: var(--island);
    border: 1px solid var(--edge);
    border-radius: var(--r-island);
}

.footer-links {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
}

.footer-links a {
    color: var(--muted);
    font-weight: 600;
}

.footer-links a:hover {
    color: var(--text);
}

.login-wrap {
    flex: 1;
    display: grid;
    place-items: center;
    padding: 24px;
    background-image: radial-gradient(ellipse at 50% 0%, rgba(139, 134, 183, 0.12), transparent 60%);
}

.login-card {
    width: min(440px, 100%);
    padding: 36px;
    text-align: center;
    display: flex;
    flex-direction: column;
    gap: 16px;
    align-items: stretch;
}

.login-card img.logo {
    width: 64px;
    height: 64px;
    margin: 0 auto;
}

.login-card h1 {
    font-size: 24px;
    text-transform: uppercase;
    font-style: italic;
}

.btn-discord {
    background: #5865f2;
    color: #fff;
    border-color: transparent;
    height: 48px;
    font-size: 14px;
    border-radius: 14px;
}

.btn-discord:hover {
    background: #6b77f5;
}

.doc {
    flex: 1;
    padding: clamp(24px, 4vw, 52px);
}

.privacy-container {
    max-width: 800px;
    margin: 0 auto;
}

.privacy-container h1 {
    font-size: 32px;
    margin-bottom: 10px;
    text-transform: uppercase;
    font-style: italic;
}

.privacy-updated {
    color: var(--muted);
    margin-bottom: 28px;
}

.privacy-section {
    margin-top: 30px;
}

.privacy-section h2 {
    margin-bottom: 10px;
    font-size: 19px;
}

.privacy-section p,
.privacy-section li {
    color: #c7c9d1;
    line-height: 1.75;
}

.privacy-section ul {
    padding-left: 22px;
    display: grid;
    gap: 6px;
}

.discordinv {
    color: var(--accent-text);
}

/* ------------------------------------------------------------------ documentation */
.docs-layout {
    display: grid;
    grid-template-columns: 240px minmax(0, 1fr);
    gap: clamp(20px, 4vw, 48px);
    max-width: 1100px;
    margin: 0 auto;
}

.docs-side {
    position: sticky;
    top: calc(var(--top-h) + 20px);
    align-self: start;
    display: flex;
    flex-direction: column;
    gap: 12px;
    max-height: calc(100vh - var(--top-h) - 40px);
}

.docs-toc {
    display: flex;
    flex-direction: column;
    gap: 2px;
    overflow-y: auto;
}

.docs-link {
    padding: 7px 12px;
    border-radius: var(--r-sm);
    color: var(--muted);
    font-size: 13.5px;
    font-weight: 600;
}

.docs-link:hover {
    color: var(--text);
    background: var(--accent-soft);
}

.docs-link[aria-current="true"] {
    color: var(--text);
    background: var(--accent-soft);
    box-shadow: inset 2px 0 0 var(--accent-hi);
}

.docs-link[hidden],
.docs-section[hidden],
.docs-empty[hidden] {
    display: none;
}

.docs-body h1 {
    font-size: 32px;
    margin-bottom: 10px;
    text-transform: uppercase;
    font-style: italic;
}

.docs-section {
    margin-top: 34px;
    scroll-margin-top: calc(var(--top-h) + 24px);
}

.docs-section h2 {
    font-size: 20px;
    margin-bottom: 10px;
}

.docs-section p,
.docs-section li {
    color: #c7c9d1;
    line-height: 1.75;
}

.docs-section p+p,
.docs-section p+ul,
.docs-section p+ol,
.docs-section ul+p,
.docs-section ol+p,
.docs-section .docs-table-wrap+p {
    margin-top: 10px;
}

.docs-section ul,
.docs-section ol {
    padding-left: 22px;
    display: grid;
    gap: 6px;
}

.docs-section code,
.docs-section kbd {
    font-family: var(--mono);
    font-size: 12.5px;
    padding: 1px 6px;
    border-radius: 6px;
    background: var(--panel-2);
    border: 1px solid var(--line);
    color: var(--accent-text);
}

.docs-table-wrap {
    overflow-x: auto;
    border: 1px solid var(--line);
    border-radius: var(--r-lg);
}

.docs-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13.5px;
}

.docs-table th,
.docs-table td {
    padding: 10px 14px;
    text-align: left;
    border-bottom: 1px solid var(--line);
    color: var(--body);
}

.docs-table th {
    color: var(--muted);
    font-weight: 700;
    background: var(--panel-2);
}

.docs-table tr:last-child td {
    border-bottom: 0;
}

@media (max-width: 800px) {
    /* minmax(0, ...) lets the column shrink; a bare 1fr can't go below its widest child and spilled off-screen */
    .docs-layout {
        grid-template-columns: minmax(0, 1fr);
    }

    .docs-side {
        position: static;
        max-height: none;
        min-width: 0;
    }

    /* one swipeable row of sections instead of a wrapped wall of links */
    .docs-toc {
        flex-direction: row;
        flex-wrap: nowrap;
        overflow-x: auto;
        gap: 6px;
        padding-bottom: 6px;
        scrollbar-width: thin;
    }

    .docs-toc .docs-link {
        flex: none;
        white-space: nowrap;
    }

    .docs-toc .docs-link.docs-sub {
        display: none;
    }
}

/* ------------------------------------------------------------------ responsive */
@media (max-width: 1280px) {
    .pn-grid {
        grid-template-columns: 320px minmax(320px, 1fr) 380px;
    }

    .brand {
        width: 190px;
        font-size: 24px;
    }
}

@media (max-width: 1100px) {
    .pn-shell {
        height: auto;
        min-height: 100vh;
    }

    .pn-grid {
        grid-template-columns: 1fr;
        grid-template-rows: auto;
        height: auto;
    }

    .pn-col {
        display: none;
        min-height: calc(100vh - var(--top-h) - 110px);
    }

    .pn-shell[data-col="1"] .pn-col:nth-child(1),
    .pn-shell[data-col="2"] .pn-col:nth-child(2),
    .pn-shell[data-col="3"] .pn-col:nth-child(3) {
        display: flex;
    }

    .pn-tabs {
        display: grid;
        grid-template-columns: repeat(3, 1fr);
        gap: var(--gap);
    }

    .pn-tabs button {
        height: 44px;
        border: 1px solid var(--edge);
        border-radius: 14px;
        background: var(--island);
        color: var(--muted);
        font-weight: 800;
        font-style: italic;
        text-transform: uppercase;
        cursor: pointer;
    }

    .pn-tabs button[aria-selected="true"] {
        color: var(--text);
        border-color: var(--accent-line);
        background: var(--accent-soft);
    }
}

@media (max-width: 900px) {
    .hero-grid {
        grid-template-columns: 1fr;
    }

    .brand {
        width: auto;
        padding: 0 16px;
        font-size: 22px;
    }

    .tabs .tab {
        flex: none;
        min-width: 96px;
        margin-left: -18px;
        padding: 0 16px 0 26px;
        font-size: 12px;
    }

    /* a long tab row scrolls sideways instead of pushing the Sign in button off-screen */
    .top .island.tabs {
        overflow-x: auto;
        scrollbar-width: none;
    }

    .top .island.tabs::-webkit-scrollbar {
        display: none;
    }

    .cta-island {
        padding: 0 18px;
    }

    .top-note,
    .top-mid .server-chip .trunc {
        display: none;
    }

    .tab:first-child {
        padding-left: 20px;
    }
}

@media (max-width: 640px) {
    .tabs {
        display: none;
    }

    .mock-grid {
        grid-template-columns: 1fr;
    }
}

@media (prefers-reduced-motion: reduce) {

    *,
    *::before,
    *::after {
        animation: none !important;
        transition: none !important;
    }
}

/* --- glue --- */

.changes {
    margin: 8px 0 0;
    padding-left: 20px;
    display: grid;
    gap: 6px;
    color: var(--body);
    font-size: 13.5px;
}

.plog.bolo {
    --tc: #ff5a68;
    background: rgba(255, 90, 104, 0.09);
    box-shadow: inset 0 0 0 1px rgba(255, 90, 104, 0.38);
    border-left-width: 4px;
}

.plog.bolo h3 {
    color: #ff7a86;
}

.plog.done-bolo {
    opacity: 0.85;
}

.pin-tag {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    height: 22px;
    padding: 0 9px;
    border-radius: 7px;
    background: rgba(255, 90, 104, 0.18);
    color: #ff8b95;
    font-size: 10.5px;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    font-style: italic;
}

.iconbtn.check {
    color: var(--ok);
    border-color: rgba(61, 220, 151, 0.4);
    background: var(--ok-soft);
}

.iconbtn.check:hover {
    background: rgba(61, 220, 151, 0.25);
    color: #6ff0b5;
}

.count-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.count-chip {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 4px 10px;
    border-radius: 9px;
    background: var(--panel-2);
    border: 1px solid var(--line);
    font-size: 12.5px;
    font-weight: 600;
}

.count-chip b {
    font-size: 14px;
}

.count-chip.hot {
    border-color: rgba(255, 107, 122, 0.4);
    background: var(--bad-soft);
}

.staff-row {
    cursor: pointer;
    border-radius: 12px;
    padding: 10px;
    margin: 0 -10px;
    width: calc(100% + 20px);
    border: 0;
    background: transparent;
    color: inherit;
    font: inherit;
    text-align: left;
}

.staff-row:hover {
    background: var(--panel-2);
}
/* ===================================================================
   Status page (status.html / status.js)
   =================================================================== */

.status-wrap {
    max-width: 900px;
    margin: 0 auto;
}

.status-wrap h1 {
    font-size: 32px;
    margin-bottom: 10px;
    text-transform: uppercase;
    font-style: italic;
}

.status-banner {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 20px 22px;
    border-radius: var(--r-lg);
    background: var(--panel-2);
    border: 1px solid var(--line);
    margin: 24px 0 18px;
}

.status-banner .dot-lg {
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: var(--dim);
    box-shadow: 0 0 0 6px var(--panel-3);
    flex-shrink: 0;
    transition: background-color 0.2s, box-shadow 0.2s;
}

.status-banner.ok .dot-lg {
    background: var(--ok);
    box-shadow: 0 0 0 6px var(--ok-soft);
}

.status-banner.warn .dot-lg {
    background: var(--warn);
    box-shadow: 0 0 0 6px var(--warn-soft);
}

.status-banner.bad .dot-lg {
    background: var(--bad);
    box-shadow: 0 0 0 6px var(--bad-soft);
}

.status-banner-text h2 {
    margin: 0 0 2px;
    font-size: 17px;
}

.status-banner-text p {
    color: var(--muted);
    font-size: 12.5px;
}

.status-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 14px;
    margin-bottom: 18px;
}

.status-card {
    background: var(--panel-2);
    border: 1px solid var(--line);
    border-radius: var(--r-lg);
    padding: 20px;
}

.status-card-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 14px;
}

.status-card-head h3 {
    display: flex;
    align-items: center;
    gap: 9px;
    font-size: 15px;
}

.status-card-head .icon-wrap {
    width: 30px;
    height: 30px;
    border-radius: 9px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--panel-3);
    color: var(--accent-hi);
    flex-shrink: 0;
}

.status-rows {
    display: flex;
    flex-direction: column;
}

.status-line {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 9px 0;
    border-top: 1px solid var(--line);
}

.status-line:first-child {
    border-top: none;
    padding-top: 0;
}

.status-line:last-child {
    padding-bottom: 0;
}

.status-line .l {
    color: var(--muted);
    font-size: 13px;
}

.status-line .v {
    font-weight: 700;
    font-size: 13px;
    color: var(--text);
    text-align: right;
}

.status-foot {
    text-align: center;
    color: var(--dim);
    font-size: 12px;
    margin-top: 6px;
}
/* ===================================================================
   Settings > Support (rotating code), LOA Module preview, changelog
   =================================================================== */

.support-code {
    display: flex;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
    padding: 18px 20px;
    background: var(--panel-2);
    border: 1px solid var(--line-strong);
    border-radius: var(--r-lg);
}

.support-code-value {
    display: block;
    font-family: var(--mono);
    font-size: clamp(26px, 6vw, 38px);
    font-weight: 600;
    letter-spacing: 0.14em;
    color: var(--text);
    user-select: all;
    overflow-wrap: anywhere;
}

.support-timer {
    font-variant-numeric: tabular-nums;
    color: var(--body);
}

.support-meter {
    height: 4px;
    margin-top: 12px;
    border-radius: 99px;
    background: var(--line);
    overflow: hidden;
}

.support-meter > span {
    display: block;
    width: var(--pct, 100%);
    height: 100%;
    background: var(--accent-hi);
    transition: width 1s linear;
}

.changelog-title {
    margin: 6px 0 4px;
    color: var(--text);
    font-weight: 600;
}

.docs-section h3 {
    margin: 22px 0 6px;
    font-size: 16px;
}

/* A look-alike of the Discord LOA Request card (Dashboard > LOA Module). */
.dc-card {
    max-width: 460px;
    padding: 18px 20px;
    background: #2b2d31;
    border: 1px solid #1e1f22;
    border-radius: 10px;
    color: #dbdee1;
    font-family: "gg sans", "Segoe UI", system-ui, sans-serif;
}

.dc-card h4 {
    margin: 0 0 6px;
    font-size: 22px;
    font-weight: 700;
    color: #f2f3f5;
}

.dc-quote {
    margin: 0 0 12px;
    padding: 4px 0 4px 12px;
    border-left: 4px solid #4e5058;
    font-size: 12px;
    font-weight: 700;
    color: #b5bac1;
}

.dc-rule {
    margin: 12px 0;
    border: 0;
    border-top: 1px solid #3f4147;
}

.dc-field {
    margin-bottom: 12px;
}

.dc-field b {
    display: block;
    font-size: 18px;
    font-weight: 700;
    color: #f2f3f5;
}

.dc-field span {
    display: block;
    margin-top: 2px;
    font-size: 14px;
}

.dc-buttons {
    display: flex;
    gap: 8px;
}

.dc-btn {
    padding: 7px 18px;
    border-radius: 4px;
    font-size: 14px;
    font-weight: 500;
    color: #fff;
}

.dc-btn.ok {
    background: #248046;
}

.dc-btn.bad {
    background: #da373c;
}

.dc-foot {
    font-size: 12px;
    font-style: italic;
    color: #949ba4;
}

/* ===================================================================
   Home page motion. Everything below is decoration: with
   prefers-reduced-motion the global rule at the end of the file turns the
   animations off, and .reveal content is only hidden once landing.js has
   added .anim to <html>.
   =================================================================== */

@keyframes rise {
    from { opacity: 0; transform: translateY(18px); }
    to { opacity: 1; transform: none; }
}

@keyframes drop-in {
    from { opacity: 0; transform: translateY(-14px); }
    to { opacity: 1; transform: none; }
}

@keyframes pop-in {
    from { opacity: 0; transform: translateY(10px) scale(0.96); }
    to { opacity: 1; transform: none; }
}

@keyframes glow-drift {
    0%, 100% { transform: translate(0, 0) scale(1); opacity: 0.85; }
    50% { transform: translate(-6%, 8%) scale(1.15); opacity: 1; }
}

@keyframes float-y {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-8px); }
}

@keyframes text-sheen {
    to { background-position: 200% center; }
}

@keyframes pulse-ring {
    0% { box-shadow: 0 0 0 0 rgba(61, 220, 151, 0.55); }
    70%, 100% { box-shadow: 0 0 0 7px rgba(61, 220, 151, 0); }
}

@keyframes meter-fill {
    0% { width: 8%; }
    85%, 100% { width: 92%; }
}

@keyframes btn-sheen {
    0%, 60% { transform: translateX(-130%) skewX(-20deg); }
    100% { transform: translateX(260%) skewX(-20deg); }
}

/* the approve loop on the mock LOA card: 9s, requested -> accepted -> reset */
@keyframes loa-actions {
    0%, 45% { opacity: 1; transform: none; }
    50%, 92% { opacity: 0; transform: translateY(4px); }
    100% { opacity: 1; transform: none; }
}

@keyframes loa-accept-press {
    0%, 36% { transform: none; filter: none; }
    40% { transform: scale(0.9); filter: brightness(1.25); }
    46%, 100% { transform: none; filter: none; }
}

@keyframes loa-status {
    0%, 46% { opacity: 0; transform: translateY(6px) scale(0.96); }
    52%, 90% { opacity: 1; transform: none; }
    96%, 100% { opacity: 0; transform: translateY(6px) scale(0.96); }
}

@keyframes row-glow {
    0%, 100% { background: transparent; }
    8%, 18% { background: var(--accent-soft); }
}

.public > .top { animation: drop-in 0.6s cubic-bezier(0.2, 0.7, 0.2, 1) both; }

.rise { animation: rise 0.7s cubic-bezier(0.2, 0.7, 0.2, 1) var(--d, 0ms) both; }

.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    align-self: flex-start;
    margin-bottom: 14px;
    padding: 5px 12px;
    border: 1px solid var(--accent-line);
    border-radius: 99px;
    background: var(--accent-soft);
    color: var(--accent-text);
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.live-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--ok);
    animation: pulse-ring 1.8s ease-out infinite;
}

.hero h1 em {
    background: linear-gradient(100deg, var(--accent-hi) 20%, #d9d6f3 45%, var(--accent-hi) 70%);
    background-size: 200% auto;
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: text-sheen 4.5s linear infinite;
}

.btn-shine {
    position: relative;
    overflow: hidden;
    isolation: isolate;
}

.btn-shine::after {
    content: "";
    position: absolute;
    inset: 0 auto 0 0;
    width: 40%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.28), transparent);
    animation: btn-sheen 3.6s ease-in-out 1.2s infinite;
    pointer-events: none;
    z-index: -1;
}

.mock-wrap {
    position: relative;
    overflow: hidden;
    padding: clamp(20px, 4vw, 56px);
    perspective: 1100px;
}

.mock-glow {
    position: absolute;
    top: -20%;
    right: -10%;
    width: 70%;
    aspect-ratio: 1;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(139, 134, 183, 0.34), transparent 65%);
    filter: blur(30px);
    animation: glow-drift 9s ease-in-out infinite;
    pointer-events: none;
}

.mock {
    position: relative;
    transform: rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg));
    transition: transform 0.25s ease-out;
    animation: pop-in 0.8s cubic-bezier(0.2, 0.7, 0.2, 1) 0.25s both;
}

.mock-wrap .mock { will-change: transform; }

.mock-live {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-left: auto;
    font-size: 11px;
    color: var(--ok);
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

.mock-label {
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--dim);
}

.mock-in {
    animation: pop-in 0.55s cubic-bezier(0.2, 0.7, 0.2, 1) calc(0.55s + var(--i, 0) * 0.14s) both;
}

.mock-timer {
    font-family: var(--mono);
    font-size: 18px;
    font-weight: 600;
    color: var(--text);
    font-variant-numeric: tabular-nums;
}

.mock-meter {
    height: 6px;
    border-radius: 99px;
    background: var(--panel-3);
    overflow: hidden;
}

.mock-meter span {
    display: block;
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(90deg, var(--accent), var(--accent-hi));
    animation: meter-fill 6s ease-in-out 1s infinite alternate;
}

.mock-btn { animation-name: pop-in; }

.mock-tiles i { animation: float-y 5s ease-in-out infinite; }
.mock-tiles i:nth-child(2) { animation-delay: -1.2s; }
.mock-tiles i:nth-child(3) { animation-delay: -2.4s; }
.mock-tiles i:nth-child(4) { animation-delay: -3.6s; }

.mock-line {
    background: linear-gradient(90deg, var(--panel-3) 30%, #2b2d35 50%, var(--panel-3) 70%);
    background-size: 220% 100%;
    animation: shimmer-line 2.8s linear infinite;
}

@keyframes shimmer-line {
    from { background-position: 120% 0; }
    to { background-position: -120% 0; }
}

.mock-row {
    display: flex;
    gap: 9px;
    align-items: center;
    padding: 6px;
    margin: 0 -6px;
    border-radius: 10px;
}

.mock-row > div { display: flex; flex-direction: column; gap: 5px; flex: 1; }

.mock-row > i {
    width: 22px;
    height: 22px;
    flex: none;
    border-radius: 7px;
    background: var(--tc);
}

/* the feed rows take turns lighting up, like new events arriving */
.mock-row:nth-child(2) { animation-name: pop-in, row-glow; animation-duration: 0.55s, 8s; animation-delay: calc(0.55s + var(--i) * 0.14s), 1.6s; animation-iteration-count: 1, infinite; animation-fill-mode: both, none; }
.mock-row:nth-child(3) { animation-name: pop-in, row-glow; animation-duration: 0.55s, 8s; animation-delay: calc(0.55s + var(--i) * 0.14s), 3.6s; animation-iteration-count: 1, infinite; animation-fill-mode: both, none; }
.mock-row:nth-child(4) { animation-name: pop-in, row-glow; animation-duration: 0.55s, 8s; animation-delay: calc(0.55s + var(--i) * 0.14s), 5.6s; animation-iteration-count: 1, infinite; animation-fill-mode: both, none; }
.mock-row:nth-child(5) { animation-name: pop-in, row-glow; animation-duration: 0.55s, 8s; animation-delay: calc(0.55s + var(--i) * 0.14s), 7.6s; animation-iteration-count: 1, infinite; animation-fill-mode: both, none; }

.mock-loa { position: relative; }

.mock-title { font-size: 12px; color: var(--text); }

.mock-actions {
    display: flex;
    gap: 6px;
    margin-top: 2px;
    animation: loa-actions 9s ease-in-out 1.6s infinite;
}

.mock-actions span {
    flex: 1;
    padding: 5px 0;
    border-radius: 5px;
    text-align: center;
    font-size: 10px;
    font-weight: 600;
    color: #fff;
}

.mock-accept { background: #248046; animation: loa-accept-press 9s ease-in-out 1.6s infinite; }
.mock-deny { background: #da373c; }

.mock-status {
    position: absolute;
    left: 10px;
    right: 10px;
    bottom: 10px;
    padding: 5px 0;
    border-radius: 5px;
    background: var(--ok-soft);
    border: 1px solid rgba(61, 220, 151, 0.4);
    color: var(--ok);
    text-align: center;
    font-size: 10px;
    font-weight: 700;
    opacity: 0;
    animation: loa-status 9s ease-in-out 1.6s infinite;
}

/* scroll reveal */
.anim .reveal {
    opacity: 0;
    transform: translateY(26px);
    transition: opacity 0.7s cubic-bezier(0.2, 0.7, 0.2, 1), transform 0.7s cubic-bezier(0.2, 0.7, 0.2, 1);
    transition-delay: calc(var(--i, 0) * 90ms);
}

.anim .reveal.in {
    opacity: 1;
    transform: none;
}

.feature {
    transition: transform 0.25s ease, border-color 0.25s ease, background 0.25s ease, box-shadow 0.25s ease, opacity 0.7s cubic-bezier(0.2, 0.7, 0.2, 1);
}

.anim .feature.reveal:not(.in) { transition-property: opacity, transform; }

.feature:hover {
    transform: translateY(-4px);
    border-color: var(--accent-line);
    background: var(--panel-3);
    box-shadow: 0 14px 34px rgba(0, 0, 0, 0.35);
}

.feature .icon-wrap { transition: transform 0.3s cubic-bezier(0.3, 1.6, 0.5, 1), background 0.25s ease; }

.feature:hover .icon-wrap {
    transform: scale(1.12) rotate(-6deg);
    background: var(--accent-line);
}

html { scroll-behavior: smooth; }

@media (max-width: 900px) {
    .hero-grid { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    .mock-status { opacity: 1; }
    .mock-actions { display: none; }
}

/* ===================================================================
   Documentation page extras: progress bar, heading links, sub-entries,
   search highlighting, back-to-top
   =================================================================== */

html { scroll-padding-top: calc(var(--top-h, 70px) + 20px); }

.docs-progress {
    position: fixed;
    inset: 0 0 auto 0;
    height: 3px;
    z-index: 60;
    pointer-events: none;
}

.docs-progress span {
    display: block;
    height: 100%;
    background: linear-gradient(90deg, var(--accent), var(--accent-hi));
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.12s linear;
}

.docs-link.docs-sub {
    margin-left: 14px;
    padding-top: 4px;
    padding-bottom: 4px;
    font-size: 12.5px;
    font-weight: 500;
    color: var(--muted);
}

.docs-link[aria-current="location"] {
    color: var(--text);
}

.docs-section h2,
.docs-section h3 {
    position: relative;
}

.docs-anchor {
    margin-left: 8px;
    color: var(--dim);
    font-weight: 600;
    text-decoration: none;
    opacity: 0;
    transition: opacity 0.15s ease, color 0.15s ease;
}

.docs-section h2:hover .docs-anchor,
.docs-section h3:hover .docs-anchor,
.docs-anchor:focus-visible {
    opacity: 1;
}

.docs-anchor:hover {
    color: var(--accent-hi);
}

@media (hover: none) {
    .docs-anchor { display: none; }
}

.docs-section mark {
    padding: 0 2px;
    border-radius: 4px;
    background: rgba(244, 193, 82, 0.28);
    color: var(--text);
}

.docs-section[id] {
    animation: docs-fade 0.35s ease both;
}

@keyframes docs-fade {
    from { opacity: 0; transform: translateY(6px); }
    to { opacity: 1; transform: none; }
}

.docs-section [data-limit] {
    font-weight: 700;
    color: var(--text);
}

.docs-top {
    position: fixed;
    right: 22px;
    bottom: 22px;
    width: 42px;
    height: 42px;
    border-radius: 50%;
    border: 1px solid var(--accent-line);
    background: var(--island);
    color: var(--accent-text);
    font-size: 18px;
    cursor: pointer;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    transition: transform 0.2s ease, background 0.2s ease;
    z-index: 50;
}

.docs-top[hidden] { display: none; }
.docs-top:hover { transform: translateY(-3px); background: var(--accent-soft); }

.docs-body h1 {
    animation: rise 0.6s cubic-bezier(0.2, 0.7, 0.2, 1) both;
}

.docs-toc {
    max-height: calc(100vh - var(--top-h, 70px) - 120px);
    overflow-y: auto;
    scrollbar-width: thin;
}

.docs-side { top: calc(var(--top-h, 70px) + 16px); }

/* ===================================================================
   v3.0: Discord pages (embed editor, role pickers), the handle display
   fix, and motion for the Dashboard, settings, servers and admin portal.
   =================================================================== */

.mb { margin-bottom: 14px; }

/* a handle is never cut: long Discord usernames wrap instead */
.menu { max-width: min(340px, calc(100vw - 24px)); }
.menu .who { align-items: flex-start; }
.menu .who > div { min-width: 0; }
.menu .who b,
.menu .who small { white-space: normal; overflow-wrap: anywhere; word-break: break-word; }
.who small { overflow-wrap: anywhere; }

/* ---- embed editor ---- */
.embed-editor { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); gap: 28px; align-items: start; }
.embed-form { display: flex; flex-direction: column; gap: 14px; min-width: 0; }
.embed-side { position: sticky; top: calc(var(--top-h, 70px) + 16px); min-width: 0; }
@media (max-width: 1100px) {
    .embed-editor { grid-template-columns: 1fr; }
    .embed-side { position: static; }
}

.var-chip {
    padding: 4px 9px;
    border: 1px solid var(--accent-line);
    border-radius: 8px;
    background: var(--accent-soft);
    color: var(--accent-text);
    font: 600 12px var(--mono, ui-monospace, monospace);
    cursor: pointer;
    transition: transform 0.15s ease, background 0.15s ease;
}
.var-chip:hover:not(:disabled) { background: var(--accent-line); transform: translateY(-1px); }
.var-chip:disabled { opacity: 0.5; cursor: default; }

.dc-stage { padding: 18px; border-radius: 12px; background: #313338; overflow-x: auto; }
.dc-card.wide { max-width: 520px; }
.dc-md { font-size: 14px; line-height: 1.4; overflow-wrap: anywhere; }
.dc-md a { color: #00a8fc; }
.dc-md code { padding: 1px 4px; border-radius: 4px; background: #1e1f22; font-size: 13px; }
.dc-gap { height: 8px; }
.dc-h1 { margin: 6px 0 4px; font-size: 22px; font-weight: 700; color: #f2f3f5; }
.dc-h2 { margin: 6px 0 2px; font-size: 18px; font-weight: 700; color: #f2f3f5; }
.dc-h3 { margin: 8px 0 0; font-size: 15px; font-weight: 700; color: #f2f3f5; }
.dc-small { font-size: 12px; color: #949ba4; }
.dc-li { padding-left: 14px; position: relative; }
.dc-li::before { content: "\2022"; position: absolute; left: 2px; }
.dc-quote.plain { font-size: 14px; font-weight: 400; }
.dc-mention { padding: 0 3px; border-radius: 4px; background: rgba(88, 101, 242, 0.3); color: #c9cdfb; }
/* Banners keep their own proportions: full width, natural height, never cropped or squashed */
.dc-img { display: block; width: 100%; height: auto; max-height: none; object-fit: contain; margin: 4px 0 8px; border-radius: 8px; }
.dc-thumb { display: block; width: auto; height: auto; max-width: 100%; max-height: 160px; object-fit: contain; margin: 6px 0; border-radius: 8px; border: 1px solid var(--line); }
.dc-btn.grey { background: #4e5058; color: #fff; }
.dc-foot { margin-top: 6px; font-size: 12px; font-style: italic; color: #949ba4; }

/* ---- role picker ---- */
.role-picker { display: flex; flex-direction: column; gap: 8px; }
.role-list { max-height: 220px; overflow-y: auto; border: 1px solid var(--line); border-radius: 10px; padding: 4px; }
.chip-x { margin-left: 2px; border: 0; background: transparent; color: inherit; font-size: 15px; line-height: 1; cursor: pointer; opacity: 0.7; }
.chip-x:hover { opacity: 1; }

.radio-list { display: flex; flex-direction: column; gap: 6px; }
.radio-row { display: flex; align-items: flex-start; gap: 12px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; cursor: pointer; transition: border-color 0.15s ease, background 0.15s ease; }
.radio-row:hover { background: var(--panel-3); }
.radio-row:has(input:checked) { border-color: var(--accent-line); background: var(--accent-soft); }
.radio-row small { display: block; color: var(--muted); font-weight: 400; }
.steps-plain { margin: 0; padding-left: 20px; display: flex; flex-direction: column; gap: 8px; color: var(--body); }

/* ---- motion ---------------------------------------------------------
   Things ease in when a page draws, lists stagger, cards lift on hover and
   buttons press. All of it switches off under prefers-reduced-motion. */
@keyframes page-in { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
@keyframes item-in { from { opacity: 0; transform: translateX(-10px); } to { opacity: 1; transform: none; } }
@keyframes modal-pop { from { opacity: 0; transform: translateY(14px) scale(0.97); } to { opacity: 1; transform: none; } }
@keyframes overlay-in { from { opacity: 0; } to { opacity: 1; } }
@keyframes menu-drop { from { opacity: 0; transform: translateY(-6px) scale(0.98); } to { opacity: 1; transform: none; } }

.sect, .content-group-label, .notice, .page-head { animation: page-in 0.45s cubic-bezier(0.2, 0.7, 0.2, 1) both; }
.sect:nth-of-type(2) { animation-delay: 0.05s; }
.sect:nth-of-type(3) { animation-delay: 0.1s; }
.sect:nth-of-type(4) { animation-delay: 0.15s; }
.sect:nth-of-type(n + 5) { animation-delay: 0.2s; }

.list-row, .adm-userrow, .card, .hook, .count-chip { animation: page-in 0.4s cubic-bezier(0.2, 0.7, 0.2, 1) both; }
:is(.inset, .adm-list, .grid-cards, .hook-grid) > :nth-child(2) { animation-delay: 0.04s; }
:is(.inset, .adm-list, .grid-cards, .hook-grid) > :nth-child(3) { animation-delay: 0.08s; }
:is(.inset, .adm-list, .grid-cards, .hook-grid) > :nth-child(4) { animation-delay: 0.12s; }
:is(.inset, .adm-list, .grid-cards, .hook-grid) > :nth-child(5) { animation-delay: 0.16s; }
:is(.inset, .adm-list, .grid-cards, .hook-grid) > :nth-child(6) { animation-delay: 0.2s; }
:is(.inset, .adm-list, .grid-cards, .hook-grid) > :nth-child(n + 7) { animation-delay: 0.24s; }

.modal { animation: modal-pop 0.28s cubic-bezier(0.2, 0.8, 0.2, 1) both; }
.overlay { animation: overlay-in 0.2s ease both; }
.menu { animation: menu-drop 0.18s ease both; }

.card, .card-link, .server-card, .hook, .side-item, .btn, .list-row, .radio-row, .segmented button {
    transition: transform 0.18s ease, box-shadow 0.2s ease, border-color 0.2s ease, background 0.2s ease, color 0.2s ease, opacity 0.2s ease;
}
.card:hover, .card-link:hover, .server-card:hover { transform: translateY(-3px); box-shadow: 0 14px 30px rgba(0, 0, 0, 0.3); border-color: var(--accent-line); }

.btn:active:not(:disabled) { transform: scale(0.96); }
.btn:hover:not(:disabled) { transform: translateY(-1px); }
.switch i, .switch i::after { transition: background 0.2s ease, transform 0.25s cubic-bezier(0.3, 1.4, 0.5, 1); }
.pill, .tag { animation: pop-in 0.3s ease both; }
.toast { animation: toast-in 0.3s cubic-bezier(0.2, 0.8, 0.2, 1) both; }
.skeleton { background-size: 220% 100%; }
.icon-wrap, .avatar { transition: transform 0.25s cubic-bezier(0.3, 1.4, 0.5, 1); }
.card:hover .avatar, .list-row:hover .avatar { transform: scale(1.06); }

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { animation: none !important; transition: none !important; }
}

/* ---- documentation menu fix ----
   Jumping to a heading used two offsets at once (page scroll-padding AND the
   heading's scroll-margin), so the heading landed lower than the reading line
   and the menu highlighted a neighbour. One offset now, and the sections no
   longer re-run an animation whenever the search redraws them. */
html { scroll-padding-top: 0; }
.docs-section[id] { animation: none; }
.docs-section, .docs-section h3[id] { scroll-margin-top: calc(var(--top-h, 70px) + 24px); }
.docs-toc { overscroll-behavior: contain; }
.docs-link { display: block; }

/* ---- verification page steps ---- */
.verify-steps { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; width: 100%; }
.verify-steps li { display: flex; align-items: center; gap: 12px; padding: 10px 14px; border: 1px solid var(--line); border-radius: 12px; color: var(--muted); font-weight: 600; transition: border-color 0.25s ease, color 0.25s ease, background 0.25s ease; }
.verify-steps li i { width: 14px; height: 14px; border-radius: 50%; border: 2px solid var(--line-strong); flex: none; transition: background 0.25s ease, border-color 0.25s ease, transform 0.25s ease; }
.verify-steps li.active { color: var(--text); border-color: var(--accent-line); background: var(--accent-soft); }
.verify-steps li.active i { border-color: var(--accent-hi); animation: pulse-ring 1.8s ease-out infinite; }
.verify-steps li.done { color: var(--text); }
.verify-steps li.done i { background: var(--ok); border-color: var(--ok); transform: scale(1.1); }

/* ===================================================================
   Home page, modern pass: centered hero, a faithful copy of the real
   Panel, a bento feature grid and a closing call to action.
   No inline styles (CSP), so delays and colours live in classes.
   =================================================================== */

.public { position: relative; }
.public::before {
    content: "";
    position: fixed;
    inset: 0;
    z-index: -1;
    pointer-events: none;
    background:
        radial-gradient(60% 40% at 50% -5%, rgba(139, 134, 183, 0.16), transparent 70%),
        radial-gradient(40% 30% at 100% 40%, rgba(90, 167, 255, 0.05), transparent 70%);
}

.d0 { --d: 0ms; } .d1 { --d: 80ms; } .d2 { --d: 180ms; } .d3 { --d: 280ms; } .d4 { --d: 380ms; }

.hero-center {
    align-items: center;
    text-align: center;
    padding: clamp(40px, 7vw, 96px) clamp(20px, 5vw, 64px) clamp(36px, 5vw, 64px);
    position: relative;
    overflow: hidden;
    background-image:
        linear-gradient(rgba(255, 255, 255, 0.025) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.025) 1px, transparent 1px);
    background-size: 44px 44px;
}

.hero-center::before {
    content: "";
    position: absolute;
    inset: 0;
    background: radial-gradient(ellipse at 50% 0%, rgba(139, 134, 183, 0.22), transparent 62%), linear-gradient(180deg, transparent 55%, var(--island));
    pointer-events: none;
}

.hero-center > * { position: relative; }
.hero-center .eyebrow { align-self: center; }
.hero-center h1 { font-size: clamp(34px, 6vw, 68px); max-width: 17ch; letter-spacing: -0.04em; }
.hero-center p.lead { max-width: 58ch; margin-left: auto; margin-right: auto; font-size: 17px; }
.hero-center .cta { justify-content: center; }

.trust {
    list-style: none;
    margin: 34px 0 0;
    padding: 0;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px;
}

.trust li {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 7px 14px;
    border: 1px solid var(--edge);
    border-radius: 99px;
    background: color-mix(in srgb, var(--panel-2) 70%, transparent);
    color: var(--muted);
    font-size: 12.5px;
    font-weight: 600;
}

.trust li .icon { color: var(--accent-hi); }

.kicker {
    margin-bottom: 10px;
    color: var(--accent-hi);
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 0.14em;
    text-transform: uppercase;
}

/* ---- hero showcase: floating cards, not an app window ---- */
.pv-wrap {
    position: relative;
    overflow: hidden;
    padding: clamp(24px, 5vw, 64px) clamp(14px, 3vw, 40px);
    perspective: 1600px;
    background: radial-gradient(ellipse at 50% 0%, rgba(139, 134, 183, 0.14), transparent 60%);
}

.pv-glow {
    position: absolute;
    top: -30%;
    left: 50%;
    width: 60%;
    aspect-ratio: 1;
    margin-left: -30%;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(139, 134, 183, 0.3), transparent 65%);
    filter: blur(40px);
    animation: glow-drift 9s ease-in-out infinite;
    pointer-events: none;
}

.fl {
    position: relative;
    max-width: 1020px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 16px;
    transform: rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg));
    transition: transform 0.25s ease-out;
    pointer-events: none;
    text-align: left;
}

.fl-card {
    position: relative;
    padding: 20px;
    border: 1px solid var(--edge);
    border-radius: 22px;
    background: linear-gradient(160deg, var(--panel-3), var(--island) 60%);
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.5), inset 0 1px 0 rgba(255, 255, 255, 0.04);
    animation: pop-in 0.7s cubic-bezier(0.2, 0.7, 0.2, 1) both, float-y 7s ease-in-out infinite;
}

.fl-shift { grid-column: 1 / 4; animation-delay: 0.3s, 1s; }
.fl-feed { grid-column: 4 / 7; margin-top: 44px; animation-delay: 0.45s, 2.5s; }
.fl-loa { grid-column: 1 / 3; margin-top: -8px; animation-delay: 0.6s, 4s; }
.fl-log { grid-column: 3 / 7; margin-top: 18px; animation-delay: 0.75s, 5.5s; display: flex; align-items: center; gap: 16px; }

.fl-head { display: flex; align-items: center; gap: 12px; }
.fl-grow { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.fl-grow b { color: var(--text); font-weight: 800; font-size: 14px; line-height: 1.3; }
.fl-grow small { color: var(--muted); font-size: 12px; }

.fl-av {
    position: relative;
    display: grid;
    place-items: center;
    flex: none;
    width: 42px;
    height: 42px;
    border-radius: 14px;
    background: linear-gradient(140deg, var(--accent-hi), var(--accent));
    color: #fff;
    font-weight: 800;
    font-size: 17px;
}

.fl-av img {
    width: 100%;
    height: 100%;
    border-radius: inherit;
    object-fit: cover;
    display: block;
}

.fl-av i {
    position: absolute;
    right: -3px;
    bottom: -3px;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: var(--ok);
    border: 2px solid var(--island);
}

.fl-timerrow { display: flex; align-items: center; justify-content: space-between; margin-top: 18px; }
.fl-cap { display: block; color: var(--dim); font-size: 10.5px; font-weight: 800; letter-spacing: 0.12em; text-transform: uppercase; }
.fl-timer { display: block; margin-top: 2px; font-size: clamp(28px, 3.6vw, 40px); font-weight: 800; letter-spacing: -0.03em; font-variant-numeric: tabular-nums; }
.fl .ring { width: 72px; height: 72px; animation: ring-in 1.4s cubic-bezier(0.2, 0.7, 0.2, 1) 0.9s both; }
.fl .ring-inner { width: 56px; height: 56px; }
.fl .ring.p68 { --p: 68; }

@property --p { syntax: "<number>"; inherits: true; initial-value: 0; }
@keyframes ring-in { from { --p: 0; } }

.fl-meter { height: 6px; margin-top: 16px; border-radius: 99px; background: var(--panel-3); overflow: hidden; }
.fl-meter span { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--accent), var(--accent-hi)); animation: meter-fill 6s ease-in-out 1s infinite alternate; }
.fl-note { margin-top: 10px; color: var(--muted); font-size: 12.5px; }

.fl-title { display: flex; align-items: center; gap: 9px; margin-bottom: 14px; color: var(--accent-text); font-size: 11.5px; font-weight: 800; font-style: italic; letter-spacing: 0.08em; text-transform: uppercase; }

.fl-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 4px; }
.fl-list li { display: flex; align-items: center; gap: 10px; padding: 8px 10px; margin: 0 -10px; border-radius: 12px; font-size: 13px; color: var(--body); animation: feed-glow 10s ease-in-out infinite; }
.fl-list li span { flex: 1; min-width: 0; }
.fl-list li small { color: var(--dim); font-size: 11.5px; }
.fl-list i { width: 8px; height: 8px; border-radius: 50%; background: var(--c); box-shadow: 0 0 10px var(--c); flex: none; }
.c-green { --c: var(--ok); } .c-blue { --c: var(--sky); } .c-pink { --c: var(--rose); } .c-amber { --c: var(--gold); }
.fl-i1 { animation-delay: 2s; } .fl-i2 { animation-delay: 4.5s; } .fl-i3 { animation-delay: 7s; } .fl-i4 { animation-delay: 9.5s; }

@keyframes feed-glow { 0%, 100% { background: transparent; } 6%, 16% { background: var(--accent-soft); } }

.fl-who { display: flex; flex-direction: column; margin-bottom: 14px; }
.fl-who b { color: var(--text); font-size: 14px; }
.fl-who small { color: var(--muted); font-size: 12px; }
.fl-actions { display: flex; gap: 8px; animation: loa-actions 9s ease-in-out 1.6s infinite; }
.fl-actions span { flex: 1; padding: 8px 0; border-radius: 10px; text-align: center; font-size: 12px; font-weight: 800; }
.fl-yes { background: var(--ok-soft); color: var(--ok); border: 1px solid rgba(61, 220, 151, 0.35); animation: loa-accept-press 9s ease-in-out 1.6s infinite; }
.fl-no { background: var(--bad-soft); color: var(--bad-text); border: 1px solid rgba(255, 107, 122, 0.35); }
.fl-approved { position: absolute; left: 20px; right: 20px; bottom: 20px; display: flex; align-items: center; justify-content: center; gap: 7px; padding: 8px 0; border-radius: 10px; background: var(--ok); color: #06150d; font-size: 12px; font-weight: 800; opacity: 0; animation: loa-status 9s ease-in-out 1.6s infinite; }

.fl-tag { flex: none; padding: 6px 12px; border-radius: 10px; background: var(--warn-soft); color: var(--warn); font-size: 11.5px; font-weight: 800; font-style: italic; letter-spacing: 0.06em; text-transform: uppercase; }
.fl-logbody { flex: 1; min-width: 0; }
.fl-logbody b { color: var(--text); font-size: 14px; }
.fl-logbody p { margin-top: 2px; color: var(--muted); font-size: 13px; }
.fl-chip { display: inline-flex; align-items: center; gap: 6px; flex: none; padding: 5px 10px; border: 1px solid var(--line-strong); border-radius: 99px; color: var(--body); font-size: 12px; font-weight: 600; }
.fl-when { flex: none; color: var(--dim); font-size: 12px; }

.pv-av { display: none; }

/* ---- bento features ---- */
.features { position: relative; }
.features h2 { font-size: clamp(24px, 3.4vw, 38px); letter-spacing: -0.03em; max-width: 22ch; }

.bento {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 10px;
}

.bento .feature { grid-column: span 1; position: relative; overflow: hidden; padding: 24px; }
.bento .feature.span2 { grid-column: span 2; }
.bento .feature::before {
    content: "";
    position: absolute;
    inset: 0;
    background: radial-gradient(260px 160px at 0% 0%, var(--accent-soft), transparent 70%);
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
}
.bento .feature:hover::before { opacity: 1; }
.bento .feature > * { position: relative; }
.bento .feature h3 { font-size: 16px; }
.bento .feature p { font-size: 13.5px; line-height: 1.65; }

.duo {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: var(--gap);
}

.duo .features h2 { margin-bottom: 14px; }
.duo .features p.lead { margin-top: 0; max-width: none; font-size: 15px; }

/* ---- closing call to action ---- */
.closer {
    position: relative;
    overflow: hidden;
    padding: clamp(40px, 6vw, 80px) 24px;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 14px;
}

.closer-glow {
    position: absolute;
    inset: auto 0 -60% 0;
    height: 120%;
    background: radial-gradient(ellipse at 50% 100%, rgba(139, 134, 183, 0.3), transparent 65%);
    pointer-events: none;
}

.closer > * { position: relative; }
.closer h2 { font-size: clamp(26px, 4vw, 44px); letter-spacing: -0.035em; font-weight: 800; }
.closer p { color: var(--muted); font-size: 16px; margin-bottom: 8px; }

@media (max-width: 1000px) {
    .bento { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .bento .feature.span2 { grid-column: span 2; }
}

@media (max-width: 700px) {
    .fl { grid-template-columns: 1fr; }
    .fl-card, .fl-shift, .fl-feed, .fl-loa, .fl-log { grid-column: 1; margin-top: 0; }
    .fl-log { flex-wrap: wrap; }
    .fl-chip, .fl-when { display: none; }
    .bento { grid-template-columns: 1fr; }
    .bento .feature.span2 { grid-column: span 1; }
    .duo { grid-template-columns: 1fr; }
}

/* ---- home polish: sticky nav, colored feature icons, steps, FAQ ---- */
.home > .top { position: sticky; top: var(--gap); z-index: 40; }
.home > .top .island, .home > .top .cta-island { backdrop-filter: blur(14px); }

.bento .feature:nth-child(1) { --tc: var(--teal); }
.bento .feature:nth-child(2) { --tc: var(--rose); }
.bento .feature:nth-child(3) { --tc: var(--sky); }
.bento .feature:nth-child(4) { --tc: var(--violet); }
.bento .feature:nth-child(5) { --tc: var(--gold); }
.bento .feature:nth-child(6) { --tc: var(--coral); }
.bento .feature:nth-child(7) { --tc: var(--aqua); }
.bento .feature:nth-child(8) { --tc: var(--teal); }
.bento .feature:nth-child(9) { --tc: var(--gold); }
.bento .feature .icon-wrap { background: color-mix(in srgb, var(--tc, var(--accent-hi)) 16%, transparent); color: var(--tc, var(--accent-hi)); }
.bento .feature:hover { border-color: color-mix(in srgb, var(--tc, var(--accent-hi)) 45%, transparent); }
.bento .feature:hover .icon-wrap { background: color-mix(in srgb, var(--tc, var(--accent-hi)) 28%, transparent); }
.bento .feature::before { background: radial-gradient(260px 160px at 0% 0%, color-mix(in srgb, var(--tc, var(--accent-hi)) 16%, transparent), transparent 70%); }

.steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; counter-reset: s; }
.step { position: relative; padding: 24px; border: 1px solid var(--line); border-radius: var(--r-lg); background: var(--panel-2); }
.step-n { display: grid; place-items: center; width: 34px; height: 34px; margin-bottom: 14px; border-radius: 11px; background: var(--accent-solid); color: #fff; font-weight: 800; font-style: italic; }
.step h3 { font-size: 16px; }
.step p { margin-top: 6px; color: var(--muted); font-size: 13.5px; line-height: 1.65; }
.step:not(:last-child)::after { content: ""; position: absolute; top: 40px; right: -11px; width: 12px; height: 2px; background: var(--accent-line); }

.faq { display: flex; flex-direction: column; gap: 8px; max-width: 820px; }
.faq details { border: 1px solid var(--line); border-radius: var(--r-lg); background: var(--panel-2); transition: border-color 0.2s ease, background 0.2s ease; }
.faq details[open] { border-color: var(--accent-line); background: var(--panel-3); }
.faq summary { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 16px 20px; color: var(--text); font-weight: 700; cursor: pointer; list-style: none; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; flex: none; display: grid; place-items: center; width: 26px; height: 26px; border-radius: 8px; background: var(--accent-soft); color: var(--accent-text); font-size: 18px; line-height: 1; transition: transform 0.25s ease; }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq details p { padding: 0 20px 18px; color: var(--muted); font-size: 14px; line-height: 1.7; }

.site-footer { margin-top: 0; }

@media (max-width: 800px) {
    .steps { grid-template-columns: 1fr; }
    .step:not(:last-child)::after { display: none; }
}

/* ===================================================================
   Home: solid sticky header band, page width cap, calmer proportions,
   and a proper footer.
   =================================================================== */

.home { --pad: clamp(28px, 4.5vw, 64px); }

.home > .top,
.home > main,
.home > .site-footer {
    width: 100%;
    max-width: 1560px;
    margin-left: auto;
    margin-right: auto;
}

/* The header is a full-width band with its own background, so nothing
   shows through the gaps between the islands while you scroll. */
.home > .top {
    position: sticky;
    top: 0;
    z-index: 40;
    max-width: none;
    height: calc(var(--top-h) + var(--gap) * 2);
    margin: calc(var(--gap) * -1) calc(var(--gap) * -1) 0;
    padding: var(--gap) max(var(--gap), calc((100% - 1560px) / 2 + var(--gap)));
    background: color-mix(in srgb, var(--canvas) 94%, transparent);
    border-bottom: 1px solid transparent;
    transition: background 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
}

.home > .top.scrolled {
    background: color-mix(in srgb, var(--canvas) 93%, transparent);
    -webkit-backdrop-filter: blur(18px) saturate(1.2);
    backdrop-filter: blur(18px) saturate(1.2);
    border-bottom-color: var(--edge);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.35);
}

.home > .top .island,
.home > .top .cta-island { backdrop-filter: none; }

.home { scroll-padding-top: 84px; }
html { scroll-padding-top: 84px; }

/* proportions */
.home .features { padding: var(--pad); }
.home .features h2 { margin-bottom: clamp(24px, 3vw, 40px); }
.home .hero-center { padding-top: clamp(56px, 9vw, 120px); padding-bottom: clamp(48px, 6vw, 84px); }
.home .hero-center h1 { max-width: 15ch; }
.home .hero-center p.lead { font-size: clamp(16px, 1.3vw, 18px); }
.home .pv-wrap { padding-top: clamp(32px, 6vw, 80px); padding-bottom: clamp(32px, 6vw, 80px); }
.home .bento .feature { padding: clamp(20px, 2vw, 30px); min-height: 190px; }
.home .bento .feature.span2 { min-height: 190px; }
.home .bento .icon-wrap { margin-bottom: 18px; }
.home .duo .features { display: flex; flex-direction: column; justify-content: center; }
.home .closer { padding: clamp(56px, 8vw, 110px) 24px; }

/* footer */
.home .site-footer.rich {
    display: grid;
    grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr);
    gap: 32px 48px;
    align-items: start;
    padding: clamp(28px, 4vw, 56px) var(--pad) 22px;
    margin-top: 0;
    color: var(--muted);
    background:
        radial-gradient(60% 120% at 0% 0%, rgba(139, 134, 183, 0.1), transparent 60%),
        var(--island);
}

.foot-logo { display: inline-flex; align-items: center; color: var(--text); font-size: 28px; font-weight: 800; letter-spacing: -0.03em; }
.foot-logo:hover { text-decoration: none; }
.foot-logo img { width: 32px; height: 32px; }
.foot-brand p { margin-top: 12px; max-width: 32ch; color: var(--muted); font-size: 14px; line-height: 1.6; }

.foot-cols { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; }
.foot-cols h4 { margin-bottom: 14px; color: var(--dim); font-size: 11px; font-weight: 800; font-style: italic; letter-spacing: 0.14em; text-transform: uppercase; }
.foot-cols a { display: block; padding: 5px 0; color: var(--muted); font-size: 13.5px; font-weight: 600; transition: color 0.15s ease, transform 0.15s ease; }
.foot-cols a:hover { color: var(--text); text-decoration: none; transform: translateX(3px); }

.foot-copy {
    grid-column: 1 / -1;
    padding-top: 20px;
    border-top: 1px solid var(--line);
    color: var(--dim);
    font-size: 12.5px;
}

@media (max-width: 800px) {
    .home .site-footer.rich { grid-template-columns: 1fr; }
}

/* ---- Roles: drag and drop ---- */
.role-card.draggable { cursor: grab; transition: transform .15s ease, box-shadow .15s ease, opacity .15s ease; }
.role-card.dragging { opacity: .45; cursor: grabbing; }
.role-card .drag-handle { display: inline-flex; color: var(--muted, #8b8aa5); cursor: grab; }
.role-card.drop-before { box-shadow: 0 -3px 0 0 var(--accent, #8b87c9); }
.role-card.drop-after { box-shadow: 0 3px 0 0 var(--accent, #8b87c9); }
@media (prefers-reduced-motion: reduce) { .role-card.draggable { transition: none; } }

/* ---- v2.6 layout: tabs Dashboard / Settings / Terms, one continuous sidebar, thin scrollbar ---- */
@media (max-width: 1100px) { .top-note { display: none; } }

/* ---- v2.7 themes: Dark (default, above) and Light ----
   Light: background f0f0fa, UI 7b779c, main 7a779c, text 000000.
   The theme is chosen in Settings > Theme and saved in this browser (theme.js). */
html[data-theme="light"] {
    --rail: #edecf3;
    --rail-icon: #1d1b36;
    --pill: #615d84;
    --canvas: #f0f0fa;
    --island: #edecf3;
    --panel: #edecf3;
    --panel-2: #8985a9;
    --panel-3: #9692b4;
    --edge: #615d84;
    --line: #6c6890;
    --line-strong: #4f4b73;

    --text: #000000;
    --body: #000000;
    --muted: #17152b;
    --dim: #25233c;
    --nav-dim: #1d1b33;
    --nav-hi: #000000;

    --accent: #7a779c;
    --accent-hi: #2f2c52;
    --accent-text: #12102b;
    --accent-solid: #3f3c66;
    --accent-solid-hi: #4d497a;
    --accent-soft: rgba(0, 0, 0, 0.12);
    --accent-line: rgba(0, 0, 0, 0.38);

    --ok: #0b5c36;
    --ok-soft: rgba(11, 92, 54, 0.18);
    --warn: #6b4700;
    --warn-soft: rgba(107, 71, 0, 0.18);
    --bad: #8a0f20;
    --bad-soft: rgba(138, 15, 32, 0.16);
    --warn-text: #5c3d00;
    --bad-text: #7a0c1b;

    --teal: #0b5f66;
    --sky: #12428f;
    --gold: #6b4700;
    --coral: #8a2e12;
    --rose: #8c1f55;
    --violet: #3f2a8c;
    --aqua: #0b6350;

    color-scheme: light;
}

html[data-theme="light"] .btn-primary,
html[data-theme="light"] .badge,
html[data-theme="light"] .cta-island,
html[data-theme="light"] .btn-shift.start,
html[data-theme="light"] .mock-btn,
html[data-theme="light"] .step-n {
    color: #ffffff;
}

html[data-theme="light"] .avatar-btn .avatar,
html[data-theme="light"] .sw-icon {
    background-color: #f0f0fa !important;
}

html[data-theme="light"] .fl-card,
html[data-theme="light"] .faq details[open] {
    background: var(--panel-3);
}

/* Theme picker (Settings > Theme) */
.theme-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 14px; }
.theme-opt {
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding: 14px;
    border: 2px solid var(--edge);
    border-radius: var(--r-lg);
    background: var(--panel-2);
    cursor: pointer;
    text-align: left;
    transition: border-color 0.15s, transform 0.15s;
}
.theme-opt:hover { transform: translateY(-2px); border-color: var(--accent-line); }
.theme-opt[aria-pressed="true"] { border-color: var(--accent-hi); }
.theme-opt b { color: var(--text); }
.theme-opt small { color: var(--muted); }
.theme-prev { display: grid; grid-template-columns: 34% 1fr; gap: 5px; height: 86px; padding: 6px; border-radius: 10px; }
.theme-prev i { display: block; border-radius: 7px; }
.theme-prev.dark { background: #05050e; }
.theme-prev.dark i { background: #0e0d14; box-shadow: inset 0 0 0 1px #2a2935; }
.theme-prev.dark i:first-child { box-shadow: inset 0 0 0 1px #676389; }
.theme-prev.light { background: #f0f0fa; }
.theme-prev.light i { background: #7b779c; box-shadow: inset 0 0 0 1px #615d84; }
.theme-prev.light i:first-child { box-shadow: inset 0 0 0 1px #000; }

html[data-theme="light"] .hero h1 em {
    background-image: linear-gradient(100deg, #2f2c52 20%, #5b5790 45%, #2f2c52 70%);
}

/* ---- v2.8 Dashboard: feature tabs above each page ---- */
.page-tabs { margin: 0 0 18px; }
.page-tabs .segmented { display: flex; flex-wrap: wrap; width: fit-content; max-width: 100%; }
.page-tabs .segmented button { display: inline-flex; align-items: center; gap: 6px; height: 36px; padding: 0 16px; font-size: 13px; }
.page-tabs .segmented button:hover { color: var(--text); }

/* ===================================================================
   APP SHELL - the one place the signed-in layout is defined.
   [ top bar island                                                  ]
   [ sidebar island | stage island (collapse arrow, tabs, page)      ]
   [ dock island    |                                                ]
   Sizes follow the 1920x1080 design; the sidebar and bar shrink on smaller screens.
   =================================================================== */
:root {
    --rail: var(--island);    /* sidebar + dock fill = UI colour */
    --rail-icon: #7c78a3;     /* sidebar icons */
    --pill: var(--edge);      /* outlines on tabs, search, dock tiles, scrollbar */
    --u: max(0.6px, calc(100vw / 1920));
    --top-h: calc(var(--u) * 70);
    --shell-gap: calc(var(--u) * 5);
    --r-shell: calc(var(--u) * 22);
    --side-w: calc(var(--u) * 359);
}

.shell {
    overflow: hidden;
    height: 100vh;
    padding: calc(var(--u) * 8) calc(var(--u) * 6) calc(var(--u) * 5) calc(var(--u) * 5);
    display: flex;
    flex-direction: column;
    gap: calc(var(--u) * 6);
}

/* ---- top bar ---- */
.appbar {
    flex: none;
    height: var(--top-h);
    display: flex;
    align-items: center;
    padding: 0 calc(var(--u) * 7) 0 calc(var(--u) * 23);
    background: var(--island);
    border-radius: var(--r-shell);
}

.appbar-brand {
    flex: none;
    display: flex;
    align-items: center;
    width: clamp(calc(var(--u) * 190), 20.4vw, calc(var(--u) * 392));
    color: var(--text);
    font-size: calc(var(--u) * 44);
    font-weight: 800;
    letter-spacing: -0.03em;
    line-height: 1;
}

.appbar-brand:hover { text-decoration: none; }
.appbar-brand img { width: calc(var(--u) * 46); height: calc(var(--u) * 46); margin: 0 calc(var(--u) * 5) 0 -3px; }

.appbar-tabs { flex: none; display: flex; gap: calc(var(--u) * 17); }

.appbar-tab {
    display: grid;
    place-items: center;
    width: calc(var(--u) * 209);
    height: calc(var(--u) * 54);
    border: 2px solid var(--pill);
    border-radius: calc(var(--u) * 14);
    color: #7b7b7b;
    font-size: calc(var(--u) * 24);
    font-style: italic;
    font-weight: 800;
    text-transform: uppercase;
}

.appbar-tab:hover { color: var(--text); text-decoration: none; border-color: var(--line-strong); }
.appbar-tab[aria-current="page"] { color: var(--text); }

.appbar-mid {
    flex: 1;
    min-width: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    align-self: stretch;
    padding: 0 calc(var(--u) * 16);
}

.appbar-note { color: #363638; font-size: calc(var(--u) * 15); font-style: italic; font-weight: 800; white-space: nowrap; }

.searchbtn {
    flex: none;
    display: flex;
    align-items: center;
    gap: calc(var(--u) * 14);
    width: calc(var(--u) * 426);
    height: calc(var(--u) * 58);
    padding: 0 calc(var(--u) * 8) 0 calc(var(--u) * 14);
    margin-right: calc(var(--u) * 15);
    cursor: pointer;
    color: #363638;
    background: transparent;
    border: 2px solid var(--pill);
    border-radius: calc(var(--u) * 20);
    font-size: calc(var(--u) * 18);
    font-style: italic;
    font-weight: 500;
}

.searchbtn:hover { border-color: var(--line-strong); }
.searchbtn .icon { color: var(--accent); width: calc(var(--u) * 42); height: calc(var(--u) * 42); }
.searchbtn .grow { flex: 1; text-align: left; }
.searchbtn kbd {
    padding: 2px calc(var(--u) * 9);
    border: 2px solid var(--pill);
    border-radius: calc(var(--u) * 9);
    color: inherit;
    background: transparent;
    font: inherit;
    font-size: calc(var(--u) * 15);
    font-weight: 500;
    text-transform: uppercase;
}

.avatar-btn {
    flex: none;
    display: grid;
    place-items: center;
    width: calc(var(--u) * 64);
    height: calc(var(--u) * 64);
    padding: 0;
    cursor: pointer;
    background: #fff;
    border: calc(var(--u) * 5) solid var(--pill);
    border-radius: 50%;
}

.avatar-btn .avatar { --s: calc(var(--u) * 54); background: #fff !important; color: #0d0e11; }
.appbar .menu-wrap { display: flex; align-items: center; }

.top-btn {
    position: relative;
    display: grid;
    place-items: center;
    width: calc(var(--u) * 54);
    height: calc(var(--u) * 54);
    margin-right: calc(var(--u) * 12);
    color: var(--muted);
    cursor: pointer;
    background: transparent;
    border: 2px solid var(--pill);
    border-radius: calc(var(--u) * 14);
}

.top-btn:hover { color: var(--text); }

/* ---- body: [sidebar + dock] [stage] ---- */
.body {
    flex: 1;
    min-height: 0;
    display: grid;
    grid-template-columns: var(--side-w) minmax(0, 1fr);
    gap: var(--shell-gap);
}

.shell[data-collapsed="true"] .body { grid-template-columns: minmax(0, 1fr); }
.shell[data-collapsed="true"] .left { display: none; }

.left { display: flex; flex-direction: column; gap: var(--shell-gap); min-height: 0; min-width: 0; margin-bottom: -1px; }

.rail { background: var(--rail); border-radius: var(--r-shell); }
.side-wrap { flex: 1; min-height: 0; overflow: hidden; }

/* The list scrolls; its bottom edge fades out, but the island behind it stays solid. */
.side {
    height: 100%;
    display: flex;
    flex-direction: column;
    gap: calc(var(--u) * 28);
    padding: calc(var(--u) * 12) 0 calc(var(--u) * 90);
    overflow-y: auto;
    -webkit-mask-image: linear-gradient(#000 calc(100% - 36px), transparent);
    mask-image: linear-gradient(#000 calc(100% - 36px), transparent);
}

/* Firefox has no custom thumb size; Chrome/Safari/Edge get the calc(var(--u) * 14) pill below. */
.side { scrollbar-width: auto; scrollbar-color: auto; }
@supports not selector(::-webkit-scrollbar) { .side { scrollbar-width: thin; scrollbar-color: var(--pill) transparent; } }

.side::-webkit-scrollbar { width: calc(var(--u) * 24); }
.side::-webkit-scrollbar-track { background: transparent; margin: calc(var(--u) * 76) 0 calc(var(--u) * 72); }
.side::-webkit-scrollbar-thumb { background: var(--pill); background-clip: padding-box; border: calc(var(--u) * 5) solid transparent; border-right-width: calc(var(--u) * 5); border-left-width: calc(var(--u) * 5); border-radius: calc(var(--u) * 14); }

.side-group { display: contents; }
.side-label { display: none; }

.side-item {
    flex: none;
    white-space: nowrap;
    display: flex;
    align-items: center;
    gap: calc(var(--u) * 25);
    height: calc(var(--u) * 60);
    padding: 0 calc(var(--u) * 16) 0 calc(var(--u) * 20);
    margin: 0 calc(var(--u) * 12);
    border: 0;
    border-radius: calc(var(--u) * 18);
    background: transparent;
    color: var(--text);
    font-family: inherit;
    font-size: calc(var(--u) * 23);
    font-weight: 800;
    text-align: left;
    cursor: pointer;
}

.side-item:hover { text-decoration: none; background: rgba(255, 255, 255, 0.04); }
.side-item > .icon:first-child { flex: none; width: calc(var(--u) * 37); height: calc(var(--u) * 37); color: var(--rail-icon); }
.side-item .side-text { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.side-item .count { margin-left: auto; }
.side-item[aria-current="page"] { background: rgba(255, 255, 255, 0.07); }
.side-item[aria-current="page"] > .icon:first-child { color: var(--text); }
.side-item:focus-visible { outline: 2px solid var(--accent-hi); outline-offset: -2px; }

/* ---- dock ---- */
.dock { flex: none; background: var(--rail); border: 0; display: grid; grid-template-columns: repeat(5, 1fr); gap: calc(var(--u) * 12); padding: calc(var(--u) * 12); height: calc(var(--u) * 104); }

.dock-btn {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: calc(var(--u) * 80);
    padding: 0;
    cursor: pointer;
    background: transparent;
    border: 2px solid var(--pill);
    border-radius: calc(var(--u) * 18);
    color: var(--accent);
}

.dock-btn:hover { background: rgba(255, 255, 255, 0.04); color: var(--accent-hi); }
.dock-btn > .icon { width: calc(var(--u) * 38); height: calc(var(--u) * 38); }
.dock-btn img { width: calc(var(--u) * 56); height: calc(var(--u) * 56); }
.dock-btn .plus { position: absolute; top: calc(var(--u) * 4); right: calc(var(--u) * 6); color: #fff; font-size: calc(var(--u) * 24); font-weight: 600; line-height: 1; }
.dock .badge { top: -6px; right: -6px; }
.dock .menu-wrap { display: block; width: 100%; }

/* ---- stage ---- */
.stage { position: relative; min-width: 0; min-height: 0; display: flex; flex-direction: column; overflow: hidden; background: var(--island); border-radius: var(--r-shell); }

.stage-bar { flex: none; display: flex; align-items: center; gap: calc(var(--u) * 16); min-height: calc(var(--u) * 56); padding: calc(var(--u) * 15) calc(var(--u) * 28) 0 calc(var(--u) * 21); }

.collapse { flex: none; display: grid; place-items: center; width: calc(var(--u) * 34); height: calc(var(--u) * 36); padding: 0; cursor: pointer; color: #fff; background: transparent; border: 0; border-radius: calc(var(--u) * 10); }
.collapse:hover { background: rgba(255, 255, 255, 0.07); }
.collapse-chevron { width: calc(var(--u) * 16); height: calc(var(--u) * 26); fill: none; stroke: currentColor; stroke-width: 2.6; stroke-linecap: round; stroke-linejoin: round; transition: transform 0.2s; }
.shell[data-collapsed="true"] .collapse-chevron { transform: rotate(180deg); }

.stage-bar .page-tabs { min-width: 0; overflow-x: auto; scrollbar-width: none; }
.stage-bar .page-tabs::-webkit-scrollbar { display: none; }

.stage-scroll { flex: 1; min-height: 0; overflow-y: auto; }
.content { padding: calc(var(--u) * 8) calc(var(--u) * 32) calc(var(--u) * 56); min-width: 0; }
.content-inner { max-width: calc(var(--u) * 1080); }

/* ---- smaller screens ---- */
@media (max-width: 1100px) {
    .appbar-note { display: none; }
    .searchbtn { width: 58px; padding: 0; justify-content: center; }
    .searchbtn .grow, .searchbtn kbd { display: none; }
}

@media (max-width: 900px) {
    :root { --u: 0.85px; }
    .shell { overflow: visible; height: auto; min-height: 100vh; }
    .body { grid-template-columns: 1fr; min-height: calc(100vh - var(--top-h) - 24px); }
    .appbar-brand { width: auto; font-size: 30px; }
    .appbar-tab { width: auto; padding: 0 14px; height: 44px; font-size: 13px; }
    .appbar-tabs { gap: 8px; }
    .appbar-mid { padding: 0; }
    .left { position: fixed; z-index: 70; left: 6px; top: calc(var(--top-h) + 14px); bottom: 6px; width: min(340px, calc(100vw - 12px)); transform: translateX(-110%); transition: transform 0.2s; }
    .shell[data-collapsed="false"] .left { transform: none; box-shadow: 0 0 0 100vmax rgba(0, 0, 0, 0.6); }
    .shell[data-collapsed="true"] .left { display: flex; transform: translateX(-110%); }
    .stage { min-height: 70vh; }
}

@media (max-width: 640px) {
    .appbar-tabs { display: none; }
    .content { padding: 8px 14px 40px; }
}

.content-group-label { margin: 28px 0 10px; font-size: 11px; font-weight: 800; letter-spacing: 0.1em; text-transform: uppercase; color: var(--dim); }
.content-group-label:first-of-type { margin-top: 0; }

/* Panel: server chip inside the top bar */
.server-chip {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 0 16px 0 10px;
    height: 100%;
    color: var(--text);
    font-weight: 800;
    font-size: 14px;
    text-transform: uppercase;
    cursor: pointer;
    max-width: 340px;
}
.server-chip .trunc {
    max-width: 210px;
}
.server-chip {
    gap: 12px;
    padding: 0 10px 0 9px;
    text-transform: none;
    font-weight: 700;
    font-size: 14px;
    letter-spacing: -0.005em;
    background: var(--island);
    border: 1px solid var(--edge);
    transition: border-color 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
}
.server-chip:hover,
.server-chip[aria-expanded="true"] {
    border-color: var(--accent-line);
    background: var(--panel-2);
    box-shadow: 0 0 0 4px var(--accent-soft);
}
.server-chip .avatar {
    --s: 32px;
    border-radius: 10px;
    background: linear-gradient(140deg, var(--accent-hi), var(--accent));
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.25);
}
.server-chip .trunc {
    color: var(--text);
}
.server-chip > .icon:last-child {
    width: 24px;
    height: 24px;
    padding: 4px;
    border-radius: 8px;
    background: var(--panel-3);
    color: var(--muted);
    transition: transform 0.2s ease, color 0.2s ease, background 0.2s ease;
}
.server-chip:hover > .icon:last-child,
.server-chip[aria-expanded="true"] > .icon:last-child {
    color: var(--accent-text);
    background: var(--accent-soft);
}
.server-chip[aria-expanded="true"] > .icon:last-child {
    transform: rotate(180deg);
}
.server-chip {
    padding: 0 12px 0 14px;
    gap: 10px;
}
.server-chip .avatar {
    --s: 26px;
    border-radius: 8px;
    font-size: 12px;
}
.server-chip .avatar {
    --s: 34px;
    border-radius: 11px;
    font-size: 14px;
}
.server-chip > .icon:last-child {
    width: 28px;
    height: 28px;
    padding: 5px;
    border-radius: 9px;
}
.appbar-mid .menu-wrap { align-self: stretch; }
.appbar-mid .server-chip { height: 54px; }
.appbar-mid .menu-wrap { margin-left: 8px; }

html[data-theme="light"] .appbar-tab, html[data-theme="light"] .appbar-note, html[data-theme="light"] .searchbtn { color: #17152b; }
html[data-theme="light"] .side-item { color: #000; }
html[data-theme="light"] .dock-btn { color: #1d1b36; }


/* ===================================================================
   v3 - ONE header, ONE footer, calmer sizing (all pages)
   The signed-in app used to scale everything from a 1920px design, which
   made it feel zoomed in on laptops. Sizes are now fixed, readable px
   values, and the same header/footer markup is used on every page.
   =================================================================== */
:root {
    --u: clamp(0.6px, calc(100vw / 2200), 0.74px);
    --top-h: 56px;
    --side-w: 256px;
    --shell-gap: 6px;
    --r-shell: 18px;
}

/* ---- header ---- */
.appbar {
    flex: none;
    position: relative;
    display: flex;
    align-items: center;
    gap: 6px;
    height: var(--top-h);
    padding: 0 10px 0 16px;
    background: var(--island);
    border: 1px solid var(--edge);
    border-radius: var(--r-island);
}

.public > .appbar {
    position: sticky;
    top: var(--gap);
    z-index: 40;
    box-shadow: 0 0 0 var(--gap) var(--canvas);
}

.appbar-brand {
    flex: none;
    width: auto;
    margin-right: 14px;
    font-size: 26px;
    letter-spacing: -0.03em;
}

.appbar-brand img { width: 30px; height: 30px; margin: 0 1px 0 0; }

.appbar-tabs { flex: none; display: flex; gap: 4px; }

.appbar-tab {
    display: inline-flex;
    align-items: center;
    width: auto;
    height: 38px;
    padding: 0 16px;
    border: 0;
    border-radius: 11px;
    color: var(--nav-hi);
    font-size: 14px;
    font-style: normal;
    font-weight: 600;
    text-transform: none;
}

.appbar-tab:hover { color: var(--text); text-decoration: none; background: rgba(255, 255, 255, 0.06); }
.appbar-tab[aria-current="page"] { color: var(--text); background: var(--accent-soft); box-shadow: inset 0 0 0 1px var(--accent-line); }
.appbar-tab:focus-visible, .appbar-brand:focus-visible { outline: 2px solid var(--accent-hi); outline-offset: 2px; }

.appbar-mid { flex: 1; min-width: 0; display: flex; align-items: center; justify-content: flex-end; padding: 0 8px; }
.appbar-note { display: none; }

.searchbtn {
    width: 250px;
    height: 38px;
    margin-right: 6px;
    padding: 0 6px 0 10px;
    gap: 8px;
    border: 1px solid var(--edge);
    border-radius: 11px;
    color: var(--muted);
    font-size: 13px;
    font-style: normal;
    font-weight: 500;
}
.searchbtn:hover { color: var(--text); border-color: var(--line-strong); }
.searchbtn .icon { width: 18px; height: 18px; }
.searchbtn kbd { padding: 1px 7px; border: 1px solid var(--edge); border-radius: 7px; font-size: 11px; }

.top-btn { width: 38px; height: 38px; margin-right: 6px; border: 1px solid var(--edge); border-radius: 11px; }

.avatar-btn { width: 38px; height: 38px; border: 2px solid var(--edge); }
.avatar-btn .avatar { --s: 30px; }

.appbar-cta { flex: none; height: 38px; padding: 0 18px; font-size: 14px; }

.appbar-mid .server-chip { height: 40px; }
.appbar-mid .menu-wrap { margin-left: 0; }

/* ---- app shell: fixed, readable sizes ---- */
.shell { padding: 6px; gap: 6px; }
.side { gap: 4px; padding: 10px 0 40px; }
.side::-webkit-scrollbar { width: 12px; }
.side::-webkit-scrollbar-track { margin: 20px 0; }
.side::-webkit-scrollbar-thumb { border-width: 3px; border-radius: 8px; }
.side-item { gap: 12px; height: 42px; padding: 0 12px; margin: 0 8px; border-radius: 12px; font-size: 14px; font-weight: 600; }
.side-item > .icon:first-child { width: 20px; height: 20px; }
.side-item[aria-current="page"] { background: var(--accent-soft); box-shadow: inset 0 0 0 1px var(--accent-line); }
.side-label { display: block; margin: 10px 20px 4px; color: var(--dim); font-size: 11px; font-weight: 800; letter-spacing: 0.1em; text-transform: uppercase; }
.side-label:first-child { margin-top: 4px; }
.side-divider { height: 1px; margin: 8px 20px; background: var(--line); }

.dock { height: auto; gap: 8px; padding: 10px; }
.dock-btn { height: 46px; border-width: 1px; border-radius: 12px; }
.dock-btn > .icon { width: 22px; height: 22px; }
.dock-btn img { width: 30px; height: 30px; }
.dock-btn .plus { top: 2px; right: 5px; font-size: 14px; }

.stage-bar { min-height: 44px; gap: 10px; padding: 12px 16px 0 14px; }
.collapse { width: 30px; height: 30px; border-radius: 9px; }
.collapse-chevron { width: 10px; height: 16px; }
.content { padding: 6px 28px 28px; }
.content-inner { max-width: 1040px; }

.crumbs { height: auto; margin: 0 0 6px; font-style: normal; letter-spacing: 0.08em; }
.page-head { margin-bottom: 20px; }

/* ---- footer ---- */
footer.site-footer {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 20px 56px;
    align-items: start;
    padding: 26px 32px 18px;
    color: var(--muted);
    font-size: 13px;
    background: var(--island);
    border: 1px solid var(--edge);
    border-radius: var(--r-island);
}
.sf-logo { display: inline-flex; align-items: center; color: var(--text); font-size: 22px; font-weight: 800; letter-spacing: -0.03em; line-height: 1; }
.sf-logo:hover { text-decoration: none; }
.sf-logo img { width: 24px; height: 24px; margin-right: 1px; }
.sf-brand p { margin-top: 8px; color: var(--muted); font-size: 13px; }
.sf-links { display: flex; gap: 64px; }
.sf-links h4 { margin: 0 0 8px; color: var(--dim); font-size: 11px; font-weight: 800; letter-spacing: 0.1em; text-transform: uppercase; }
.sf-links a { display: block; padding: 3px 0; color: var(--muted); font-size: 13px; font-weight: 600; }
.sf-links a:hover { color: var(--text); text-decoration: none; }
.sf-copy { grid-column: 1 / -1; padding-top: 14px; border-top: 1px solid var(--line); color: var(--dim); font-size: 12px; }
.stage-scroll > footer.site-footer { margin: 8px 28px 22px; background: transparent; }
.pn-shell + footer.site-footer, body > footer.site-footer { margin: 0 6px 6px; }

/* ---- links are easy to find: legal pages sit in a readable column ---- */
.public .doc { scroll-margin-top: 80px; }

/* ---- smaller screens: the tabs never disappear, they move to their own row ---- */
@media (max-width: 1100px) {
    .searchbtn { width: 38px; padding: 0; justify-content: center; margin-right: 6px; }
    .searchbtn .grow, .searchbtn kbd { display: none; }
}

@media (max-width: 760px) {
    .appbar { flex-wrap: wrap; height: auto; padding: 8px 10px; row-gap: 6px; }
    .appbar-brand { margin-right: 0; font-size: 24px; }
    .appbar-mid { flex: 1; }
    .appbar-tabs { order: 5; flex: 1 1 100%; overflow-x: auto; scrollbar-width: none; }
    .appbar-tabs::-webkit-scrollbar { display: none; }
    .appbar-tab { height: 36px; padding: 0 14px; font-size: 13px; }
    footer.site-footer { grid-template-columns: 1fr; padding: 22px 20px 16px; }
    .sf-links { gap: 40px; }
    .stage-scroll > footer.site-footer { margin: 8px 14px 18px; }
    .content { padding: 6px 14px 24px; }
}

html[data-theme="light"] .appbar-tab, html[data-theme="light"] .searchbtn { color: #000; }

/* compact footer: brand left, one row of links right, copyright underneath */
footer.site-footer { padding: 20px 28px 14px; gap: 14px 40px; align-items: center; }
.sf-brand { display: flex; align-items: center; gap: 14px; min-width: 0; }
.sf-brand p { margin: 0; }
.sf-links { flex-wrap: wrap; gap: 4px 22px; justify-content: flex-end; }
.sf-links > div { display: contents; }
.sf-links h4 { display: none; }
.sf-links a { padding: 4px 0; }
.sf-copy { padding-top: 12px; }
.searchbtn .grow { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
@media (max-width: 760px) {
    footer.site-footer { padding: 18px 18px 14px; }
    .sf-brand { flex-wrap: wrap; gap: 6px 14px; }
    .sf-links { justify-content: flex-start; }
}
.sf-brand p { white-space: nowrap; }

/* ---- every inner page speaks the same language: same title, same column, same spacing ---- */
.public .privacy-container h1,
.public .status-wrap h1,
.public .docs-body h1 {
    margin: 0 0 8px;
    font-size: 28px;
    font-weight: 800;
    font-style: normal;
    letter-spacing: -0.02em;
    text-transform: none;
}
.public .privacy-container,
.public .status-wrap { max-width: 860px; margin-left: auto; margin-right: auto; }
.public main.doc { padding: clamp(24px, 4vw, 44px) clamp(18px, 4vw, 52px) clamp(32px, 5vw, 56px); }
.privacy-updated, .status-wrap > p { color: var(--muted); font-size: 14px; }
.privacy-section h2 { font-size: 18px; }
.public .login-card h1,
.public .errpage h1,
.public .errpage .oops { font-style: normal; text-transform: none; letter-spacing: -0.02em; font-size: 28px; font-weight: 800; }

/* ===================================================================
   v4 - public pages use the SAME layout as Dashboard / Settings:
   header, sidebar island, stage island. They scroll with the page
   (not inside the box) so the docs and home page keep working.
   =================================================================== */
.shell.flow { height: auto; min-height: 100vh; overflow: visible; }
.shell.flow > .appbar { position: sticky; top: 6px; z-index: 40; box-shadow: 0 0 0 6px var(--canvas); }
.shell.flow .body { align-items: start; flex: 1; }
.shell.flow .left { position: sticky; top: calc(var(--top-h) + 12px); height: calc(100vh - var(--top-h) - 24px); margin-bottom: 0; }
.shell.flow .stage { overflow: visible; min-height: calc(100vh - var(--top-h) - 24px); }
.shell.flow .stage-scroll { flex: 1; overflow: visible; display: flex; flex-direction: column; }
.shell.flow .content { flex: 1; display: flex; flex-direction: column; padding: 6px 28px 8px; }
.shell.flow .content > main { flex: 1; display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.shell.flow .stage-bar { position: sticky; top: calc(var(--top-h) + 12px); z-index: 5; width: fit-content; background: transparent; }
.shell.flow .stage-scroll > footer.site-footer { margin: 8px 28px 22px; }
.shell.flow .privacy-container h1,
.shell.flow .status-wrap h1,
.shell.flow .docs-body h1 { margin: 0 0 8px; font-size: 28px; font-weight: 800; font-style: normal; letter-spacing: -0.02em; text-transform: none; }
.shell.flow .privacy-container,
.shell.flow .status-wrap { max-width: 860px; margin-left: auto; margin-right: auto; }
.shell.flow main.doc { padding: 12px 0 32px; }
.shell.flow .login-card h1,
.shell.flow .errpage h1,
.shell.flow .errpage .oops { font-style: normal; text-transform: none; letter-spacing: -0.02em; font-size: 28px; font-weight: 800; }
.shell.flow .docs-toc { max-height: calc(100vh - var(--top-h) - 120px); }
.shell.flow .home-pad { padding: 0; }
@media (max-width: 900px) {
    .shell.flow .body { grid-template-columns: 1fr; }
    .shell.flow .left { position: fixed; height: auto; top: calc(var(--top-h) + 14px); }
    .shell.flow:not([data-collapsed]) .left { transform: translateX(-110%); }
    .shell.flow .content { padding: 6px 14px 8px; }
    .shell.flow .stage-scroll > footer.site-footer { margin: 8px 14px 18px; }
}

.savebar {
    position: absolute;
    left: 50%;
    bottom: 18px;
    z-index: 60;
    width: min(700px, calc(100% - 28px));
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 10px 10px 10px 18px;
    background: linear-gradient(90deg, var(--accent-soft), transparent 55%), var(--panel-2);
    border: 1px solid var(--accent-line);
    border-radius: var(--r-lg);
    box-shadow: 0 18px 48px rgba(0, 0, 0, 0.55), 0 0 0 4px var(--accent-soft);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transform: translate(-50%, 28px) scale(0.98);
    transition: transform 0.24s cubic-bezier(0.2, 0.9, 0.3, 1.1), opacity 0.18s, visibility 0s 0.24s, border-color 0.2s, box-shadow 0.2s;
}

.savebar[data-open="true"] {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: translate(-50%, 0);
    transition-delay: 0s;
}

.savebar-dot {
    flex: none;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--warn);
    box-shadow: 0 0 0 4px var(--warn-soft);
    animation: savebar-pulse 2s ease-in-out infinite;
}

.savebar-text {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 1px;
}

.savebar-text b {
    font-size: 14px;
    font-weight: 700;
    color: var(--text);
}

.savebar-text small {
    font-size: 12px;
    font-weight: 500;
    color: var(--muted);
}

.savebar-actions {
    flex: none;
    display: flex;
    gap: 8px;
}

.savebar.nudge {
    border-color: var(--bad);
    background: linear-gradient(90deg, var(--bad-soft), transparent 60%), var(--panel-2);
    box-shadow: 0 18px 48px rgba(0, 0, 0, 0.55), 0 0 0 4px var(--bad-soft);
    animation: savebar-shake 0.5s cubic-bezier(0.36, 0.07, 0.19, 0.97) both;
}

.savebar.nudge .savebar-dot {
    background: var(--bad);
    box-shadow: 0 0 0 4px var(--bad-soft);
}

.savebar.nudge .savebar-text b {
    color: var(--bad-text);
}

@keyframes savebar-shake {
    10%, 90% { transform: translate(calc(-50% - 2px), 0); }
    20%, 80% { transform: translate(calc(-50% + 4px), 0); }
    30%, 50%, 70% { transform: translate(calc(-50% - 7px), 0); }
    40%, 60% { transform: translate(calc(-50% + 7px), 0); }
}

@keyframes savebar-pulse {
    50% { box-shadow: 0 0 0 7px transparent; }
}

@media (max-width: 560px) {
    .savebar {
        bottom: 10px;
        flex-wrap: wrap;
        padding: 12px;
    }
    .savebar-text { flex-basis: calc(100% - 30px); }
    .savebar-actions { width: 100%; }
    .savebar-actions .btn { flex: 1; }
}

@media (max-width: 900px) {
    .savebar { position: fixed; }
}

/* ---- prefixed inputs: the prefix is a real flex item, so any length works ---- */
.input-prefix {
    display: flex;
    align-items: center;
    width: 100%;
    height: 42px;
    background: var(--panel-2);
    border: 1px solid var(--edge);
    border-radius: var(--r-md);
    transition: border-color 0.15s, box-shadow 0.15s;
}

.input-prefix:focus-within {
    border-color: var(--accent-line);
    box-shadow: 0 0 0 3px var(--accent-soft);
}

.input-prefix > span {
    flex: none;
    padding-left: 14px;
    color: var(--dim);
    font-size: 13px;
    white-space: nowrap;
    user-select: none;
}

.input-prefix > .input {
    flex: 1 1 auto;
    min-width: 0;
    height: 100%;
    padding-left: 2px;
    background: transparent;
    border: 0;
    border-radius: 0 var(--r-md) var(--r-md) 0;
    box-shadow: none;
}

.input-prefix > .input:focus {
    border: 0;
    box-shadow: none;
}
.sc-log { display: flex; flex-direction: column; gap: 12px; height: 45vh; min-height: 240px; overflow-y: auto; }
.sc-msg { display: flex; gap: 10px; align-items: flex-start; }
.sc-msg small { color: var(--muted); }
.sc-tools { display: flex; gap: 2px; opacity: 0; transition: opacity .15s; }
.sc-msg:hover .sc-tools, .sc-msg:focus-within .sc-tools { opacity: 1; }
@media (hover: none) { .sc-tools { opacity: 1; } }
.sc-body { white-space: pre-wrap; word-break: break-word; margin-top: 2px; }
.sc-bar { display: flex; gap: 10px; align-items: flex-end; }
.sc-bar .textarea { flex: 1; resize: none; }

/* ---- reports: the "!" buttons and the report dialog ---- */
.report-btn {
    display: inline-flex; align-items: center; justify-content: center;
    width: 30px; height: 30px; padding: 0; flex: none; cursor: pointer;
    background: transparent; border: 1px solid transparent; border-radius: 50%;
    color: var(--muted); opacity: 0.8;
}
.report-btn:hover, .report-btn:focus-visible { color: var(--bad-text); background: var(--bad-soft); opacity: 1; }
.report-btn:focus-visible { outline: 2px solid var(--accent-hi); outline-offset: 1px; }

/* corner of a card (server cards on the Dashboard) */
.has-report { position: relative; }
.report-corner { position: absolute; top: 10px; right: 10px; z-index: 2; }
.has-report > .row:first-of-type { padding-right: 34px; }

.report-form { gap: 16px; }
.report-q { display: block; margin-bottom: 6px; font-weight: 600; }
.report-count { display: block; margin-top: 4px; text-align: right; }
.report-target { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border: 1px solid var(--edge); border-radius: var(--r-md); background: var(--panel-3); }
.report-target small { color: var(--muted); }
.report-thumbs { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 10px; }
.report-thumbs:empty { display: none; }
.report-thumb { position: relative; width: 96px; height: 96px; border: 1px solid var(--edge); border-radius: var(--r-md); overflow: hidden; background: var(--panel-3); }
.report-thumb img { display: block; width: 100%; height: 100%; object-fit: cover; }
.report-thumb-x { position: absolute; top: 4px; right: 4px; width: 22px; height: 22px; padding: 0; display: inline-flex; align-items: center; justify-content: center; border: 0; border-radius: 50%; background: rgba(0, 0, 0, 0.7); color: #fff; cursor: pointer; }
.report-thumb-x:hover { background: var(--bad); }
/* ---------------------------------------------------------------- Plans page */
.plans-wrap { max-width: 900px; margin: 0 auto; }
.plans-wrap h1 { font-size: 32px; margin-bottom: 10px; text-transform: uppercase; font-style: italic; }
.plans-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr)); gap: 14px; margin-bottom: 36px; }
.plan-card { display: flex; flex-direction: column; background: var(--panel-2); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 24px; }
.plan-card.plan-pro { border-color: var(--accent-line); background: linear-gradient(180deg, var(--accent-soft), var(--panel-2) 55%); }
.plan-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.plan-head h2 { font-size: 20px; }
.plan-plus { color: var(--accent-text); font-size: 13px; font-weight: 600; margin-left: 6px; }
.plan-price { display: flex; align-items: baseline; flex-wrap: wrap; gap: 8px; margin: 14px 0 6px; }
.plan-amount { font-size: 38px; font-weight: 800; line-height: 1; }
.plan-per { color: var(--muted); font-size: 13px; }
.plan-blurb { color: var(--muted); font-size: 14px; margin-bottom: 16px; }
.plan-list { list-style: none; padding: 0; margin: 0 0 22px; display: flex; flex-direction: column; gap: 10px; flex: 1; }
.plan-list li { position: relative; padding-left: 26px; color: var(--body); font-size: 14px; line-height: 1.5; }
.plan-list li::before { content: ""; position: absolute; left: 2px; top: 5px; width: 6px; height: 11px; border: solid var(--ok); border-width: 0 2px 2px 0; transform: rotate(45deg) scale(0.85); }
.plan-note { margin-top: 10px; color: var(--muted); font-size: 12.5px; text-align: center; }
.plans-section { margin-top: 34px; }
.plans-section h2 { font-size: 19px; margin-bottom: 12px; }
.plans-q { font-size: 15px; margin: 18px 0 4px; }
.plans-a { color: var(--body); line-height: 1.7; font-size: 14px; }

/* Footer: with the Plans link added, let the tagline wrap instead of colliding with the links. */
.sf-brand { flex: 1 1 260px; flex-wrap: wrap; }
.sf-brand p { white-space: normal; }
.sf-links { flex: 0 1 auto; }


/* ===================================================================
   PATROL: the dispatch-console redesign.
   One layer appended to the end of the stylesheet. Deleting this block
   (and the font link in each page head) restores the original look.

   Palette   asphalt #05070d, console #0a101c, steel #0f1829
             siren blue #2f7bff, siren red #ff3d57, badge silver #d5deef
   Type      Barlow Condensed for signage-style headings and numbers,
             IBM Plex Sans for reading, IBM Plex Mono for codes.
   Shape     small radii, hard edges, blue and red used as a pair, never
             blended. The light bar is the one animated moment.
   =================================================================== */

html:not([data-theme="old"]) {
    --font: "IBM Plex Sans", "Segoe UI", system-ui, -apple-system, sans-serif;
    --display: "Barlow Condensed", "Arial Narrow", "DejaVu Sans Condensed", system-ui, sans-serif;
    --mono: "IBM Plex Mono", ui-monospace, "SFMono-Regular", Consolas, monospace;

    --siren-blue: #2f7bff;
    --siren-red: #ff3d57;

    --r-island: 10px;
    --r-xl: 10px;
    --r-lg: 8px;
    --r-md: 6px;
    --r-sm: 4px;
    --r-shell: calc(var(--u) * 10);
}

html:not([data-theme="old"]):not([data-theme="light"]) {
    --canvas: #05070d;
    --island: #0a101c;
    --panel: #0a101c;
    --panel-2: #0f1829;
    --panel-3: #152138;
    --edge: #1d2b46;
    --line: #172238;
    --line-strong: #2a3d63;
    --rail: #080d18;
    --rail-icon: #7d8bab;

    --text: #ffffff;
    --body: #d5deef;
    --muted: #8d9bb8;
    --dim: #5f6e8d;
    --nav-dim: #7d8bab;
    --nav-hi: #c5d2ec;

    --accent: #2f7bff;
    --accent-hi: #5aa2ff;
    --accent-text: #bcd7ff;
    --accent-solid: #2f7bff;
    --accent-solid-hi: #5a96ff;
    --accent-soft: rgba(47, 123, 255, 0.16);
    --accent-line: rgba(90, 162, 255, 0.45);
    --bad: #ff3d57;
    --bad-soft: rgba(255, 61, 87, 0.14);
    --bad-text: #ff98a6;
}
html[data-theme="light"] {
    --accent: #1f5fd6;
    --accent-hi: #1b4fb0;
    --accent-text: #12306b;
    --accent-solid: #1f5fd6;
    --accent-solid-hi: #3b78ea;
}

html:not([data-theme="old"]) body { font-family: var(--font); font-weight: 400; font-size: 14.5px; line-height: 1.6; }
html:not([data-theme="old"]) b, html:not([data-theme="old"]) strong { font-weight: 600; }
html:not([data-theme="old"]) h1, html:not([data-theme="old"]) h2, html:not([data-theme="old"]) h3, html:not([data-theme="old"]) .appbar-brand, html:not([data-theme="old"]) .fl-timer, html:not([data-theme="old"]) .plan-amount { font-family: var(--display); }
html:not([data-theme="old"]) h1, html:not([data-theme="old"]) h2 { font-weight: 800; letter-spacing: 0; line-height: 1.02; }
html:not([data-theme="old"]) h3 { font-weight: 700; letter-spacing: 0.005em; }
html:not([data-theme="old"]) h1 { font-size: 34px; }
html:not([data-theme="old"]) h2 { font-size: 24px; }
html:not([data-theme="old"]) h3 { font-size: 18px; }
html:not([data-theme="old"]) .mono, html:not([data-theme="old"]) code, html:not([data-theme="old"]) kbd { font-family: var(--mono); }
html:not([data-theme="old"]) .btn, html:not([data-theme="old"]) .appbar-tab, html:not([data-theme="old"]) .side-item { font-family: var(--font); }

/* ---- the light bar on every page: blue and red, side by side, steady */
html:not([data-theme="old"]) .appbar { position: relative; }
html:not([data-theme="old"]) .appbar::after {
    content: "";
    position: absolute;
    left: 0; right: 0; bottom: -1px;
    height: 3px;
    border-radius: 0 0 var(--r-shell) var(--r-shell);
    background: linear-gradient(90deg, var(--siren-blue) 0 50%, var(--siren-red) 50% 100%);
    opacity: 0.9;
}
html:not([data-theme="old"]) .appbar-brand { font-weight: 800; font-size: calc(var(--u) * 50); letter-spacing: 0.01em; }
html:not([data-theme="old"]) .appbar-tab {
    font-family: var(--display);
    font-size: calc(var(--u) * 27);
    font-weight: 700;
    font-style: normal;
    letter-spacing: 0.06em;
    border-radius: var(--r-md);
    border-color: transparent;
    color: var(--nav-dim);
}
html:not([data-theme="old"]) .appbar-tab:hover { border-color: var(--line-strong); }
html:not([data-theme="old"]) .appbar-tab[aria-current="page"] { color: #fff; background: var(--panel-2); border-color: var(--accent-line); box-shadow: inset 0 -3px 0 var(--siren-blue); }

html:not([data-theme="old"]) .side-item { border-radius: var(--r-md); }
html:not([data-theme="old"]) .side-item[aria-current="page"] { box-shadow: inset 3px 0 0 var(--siren-blue); }
html:not([data-theme="old"]) .side-label { font-family: var(--display); font-size: 14px; letter-spacing: 0.1em; }

/* ---- buttons: flat siren blue; the large ones get a cut corner */
html:not([data-theme="old"]) .btn { border-radius: var(--r-md); font-weight: 600; transition: background-color 0.15s, border-color 0.15s, transform 0.15s; }
html:not([data-theme="old"]) .btn-primary { background: var(--siren-blue); box-shadow: none; background-image: none; }
html:not([data-theme="old"]) .btn-primary:hover { background: #5a96ff; transform: none; box-shadow: none; background-image: none; }
html:not([data-theme="old"]) .btn-primary:active { transform: translateY(1px); }
html:not([data-theme="old"]) .btn-lg { height: 48px; padding: 0 26px; font-size: 15px; }
html:not([data-theme="old"]) .btn-primary.btn-lg, html:not([data-theme="old"]) .appbar-cta {
    border-radius: 0;
    clip-path: polygon(0 0, calc(100% - 11px) 0, 100% 11px, 100% 100%, 11px 100%, 0 calc(100% - 11px));
}
html:not([data-theme="old"]) .btn-primary.btn-lg:hover, html:not([data-theme="old"]) .appbar-cta:hover { background: var(--siren-red); }
html:not([data-theme="old"]) .btn-primary.btn-lg:focus-visible, html:not([data-theme="old"]) .appbar-cta:focus-visible { clip-path: none; outline-offset: 3px; }
html:not([data-theme="old"]) .btn-ghost:hover, html:not([data-theme="old"]) .btn-soft:hover { transform: none; }
html:not([data-theme="old"]) .btn-shine::after { display: none; }

/* ---- surfaces */
html:not([data-theme="old"]) .island { border-radius: var(--r-island); }
html:not([data-theme="old"]) .card:hover, html:not([data-theme="old"]) .card-link:hover, html:not([data-theme="old"]) .server-card:hover { transform: none; box-shadow: none; border-color: var(--accent-line); }

/* ---- home: hero as a split with the live console on the right */
html:not([data-theme="old"]) .hero-split {
    position: relative;
    isolation: isolate;
    overflow: hidden;
    display: grid;
    grid-template-columns: minmax(0, 1.02fr) minmax(0, 0.98fr);
    gap: clamp(28px, 4vw, 64px);
    align-items: center;
    padding: clamp(56px, 7vw, 104px) clamp(20px, 5vw, 80px) clamp(40px, 5vw, 72px);
    background-image:
        linear-gradient(rgba(255, 255, 255, 0.022) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.022) 1px, transparent 1px);
    background-size: 40px 40px;
}
html:not([data-theme="old"]) .hero-split::before, html:not([data-theme="old"]) .hero-split::after {
    content: "";
    position: absolute;
    top: -30%;
    width: 60%;
    height: 90%;
    z-index: -1;
    pointer-events: none;
    filter: blur(30px);
    opacity: 0.2;
    animation: spill 0.9s ease-in-out 0.2s 5 backwards;
}
html:not([data-theme="old"]) .hero-split::before { left: -15%; background: radial-gradient(closest-side, var(--siren-blue), transparent); }
html:not([data-theme="old"]) .hero-split::after { right: -15%; background: radial-gradient(closest-side, var(--siren-red), transparent); animation-delay: 0.65s; }
@keyframes spill { 0%, 100% { opacity: 0.04; } 30%, 55% { opacity: 0.55; } }

html:not([data-theme="old"]) .lightbar {
    position: absolute;
    top: 0; left: 0; right: 0;
    display: grid;
    grid-template-columns: repeat(8, 1fr);
    gap: 4px;
    padding: 0 4px;
    height: 12px;
}
html:not([data-theme="old"]) .lightbar i:nth-child(4) { margin-right: clamp(16px, 4vw, 64px); }
html:not([data-theme="old"]) .lightbar i { display: block; border-radius: 0 0 4px 4px; background: var(--siren-blue); opacity: 0.85; box-shadow: 0 0 18px 1px rgba(47, 123, 255, 0.55); animation: lamp 0.9s ease-in-out 0.2s 5 backwards; }
html:not([data-theme="old"]) .lightbar i:nth-child(n+5) { background: var(--siren-red); box-shadow: 0 0 18px 1px rgba(255, 61, 87, 0.55); animation-delay: 0.65s; }
@keyframes lamp { 0%, 100% { opacity: 0.12; box-shadow: none; } 30%, 55% { opacity: 1; box-shadow: 0 0 34px 6px currentColor; } }
html:not([data-theme="old"]) .lightbar i { color: rgba(47, 123, 255, 0.8); }
html:not([data-theme="old"]) .lightbar i:nth-child(n+5) { color: rgba(255, 61, 87, 0.8); }

html:not([data-theme="old"]) .hs-copy { position: relative; min-width: 0; text-align: left; }
html:not([data-theme="old"]) .hs-copy .eyebrow {
    display: inline-flex; align-items: center; gap: 8px;
    padding: 5px 12px; margin-bottom: 22px;
    border: 1px solid var(--line-strong); border-radius: var(--r-sm);
    background: var(--panel-2); color: var(--body);
    font-size: 12.5px; font-weight: 600; letter-spacing: 0.02em; text-transform: none;
}
html:not([data-theme="old"]) .hs-copy h1 {
    font-size: clamp(44px, 5.4vw, 84px);
    line-height: 0.95;
    max-width: 12ch;
    overflow-wrap: break-word;
    letter-spacing: -0.005em;
    color: #fff;
}
html:not([data-theme="old"]) .hs-copy h1 em { font-style: normal; background: none; color: inherit; -webkit-text-fill-color: currentColor; animation: none; }
html:not([data-theme="old"]) .hs-copy .lead { max-width: 46ch; margin-top: 22px; font-size: clamp(16px, 1.25vw, 18px); color: var(--body); }
html:not([data-theme="old"]) .hs-copy .cta { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 30px; }
html:not([data-theme="old"]) .hs-copy .trust { justify-content: flex-start; margin-top: 34px; gap: 8px 18px; }
html:not([data-theme="old"]) .hs-copy .trust li { padding: 0; border: 0; background: none; border-radius: 0; color: var(--muted); font-size: 13px; font-weight: 500; }
html:not([data-theme="old"]) .hs-copy .trust li:hover { transform: none; color: var(--body); }
html:not([data-theme="old"]) .hs-copy .trust li .icon { color: var(--siren-blue); }
html:not([data-theme="old"]) .hs-copy .trust li:nth-child(even) .icon { color: var(--siren-red); }

/* console: the live panels, stacked and still */
html:not([data-theme="old"]) .hs-console {
    position: relative;
    min-width: 0;
    border: 1px solid var(--line-strong);
    border-radius: var(--r-lg);
    background: linear-gradient(180deg, var(--panel-2), var(--island));
    box-shadow: 0 30px 80px -40px rgba(0, 0, 0, 0.9);
}
html:not([data-theme="old"]) .console-bar {
    display: flex; align-items: center; gap: 10px;
    padding: 10px 16px;
    border-bottom: 1px solid var(--line-strong);
    color: var(--muted);
    font-family: var(--mono); font-size: 12px; font-weight: 500;
}
html:not([data-theme="old"]) .console-bar b { color: var(--body); font-weight: 500; }
html:not([data-theme="old"]) .console-bar .tag-live { margin-left: auto; color: var(--siren-red); }
html:not([data-theme="old"]) .hs-console .fl { display: flex; flex-direction: column; gap: 10px; max-width: none; margin: 0; padding: 14px; transform: none !important; }
html:not([data-theme="old"]) .hs-console .fl-card {
    margin: 0 !important;
    animation: none;
    padding: 14px 16px;
    border-radius: var(--r-md);
    border: 1px solid var(--line-strong);
    background: var(--island);
    box-shadow: none;
}
html:not([data-theme="old"]) .hs-console .fl-shift { border-left: 3px solid var(--siren-blue); }
html:not([data-theme="old"]) .hs-console .fl-feed { border-left: 3px solid var(--siren-red); }
html:not([data-theme="old"]) .hs-console .fl-loa { border-left: 3px solid var(--siren-blue); }
html:not([data-theme="old"]) .hs-console .fl-log { border-left: 3px solid var(--siren-red); }
html:not([data-theme="old"]) .fl-av { border-radius: var(--r-md); background: var(--panel-3); }
html:not([data-theme="old"]) .fl-timer { font-family: var(--mono); font-weight: 500; letter-spacing: -0.02em; font-size: clamp(26px, 3vw, 36px); }
html:not([data-theme="old"]) .fl-meter span { background: var(--siren-blue); }
html:not([data-theme="old"]) .fl-title { font-style: normal; letter-spacing: 0.04em; color: var(--body); }
html:not([data-theme="old"]) .fl-tag { border-radius: var(--r-sm); font-style: normal; }
html:not([data-theme="old"]) .fl-list li { border-radius: var(--r-sm); }
html:not([data-theme="old"]) .fl-actions span, html:not([data-theme="old"]) .fl-approved { border-radius: var(--r-sm); }

/* ---- sections: plain blocks, headings do the work */
html:not([data-theme="old"]) .home .island.features, html:not([data-theme="old"]) .home .island.steps-sec, html:not([data-theme="old"]) .home .island.closer { background-image: none; }
html:not([data-theme="old"]) .kicker {
    display: flex; align-items: center; gap: 10px;
    background: none; -webkit-text-fill-color: currentColor;
    color: var(--accent-hi);
    font-size: 14px; font-weight: 600; letter-spacing: 0.01em; text-transform: none;
    margin-bottom: 12px;
}
html:not([data-theme="old"]) .kicker::before { content: ""; width: 16px; height: 8px; background: linear-gradient(90deg, var(--siren-blue) 50%, var(--siren-red) 50%); border-radius: 1px; }
html:not([data-theme="old"]) .home .features h2, html:not([data-theme="old"]) .features h2 { font-size: clamp(34px, 4.4vw, 56px); line-height: 0.98; max-width: 18ch; letter-spacing: 0; }

/* features: a roster, one lamp colour per row position */
html:not([data-theme="old"]) .bento { gap: 8px; }
html:not([data-theme="old"]) .bento .feature {
    border-radius: var(--r-md);
    border: 1px solid var(--line-strong);
    border-left-width: 3px;
    border-left-color: var(--siren-blue);
    background: var(--panel-2);
    transition: border-color 0.2s, background-color 0.2s;
}
html:not([data-theme="old"]) .bento .feature:nth-child(even) { border-left-color: var(--siren-red); }
html:not([data-theme="old"]) .bento .feature:hover { transform: none; box-shadow: none; background: var(--panel-3); border-color: var(--accent-line); border-left-color: inherit; }
html:not([data-theme="old"]) .bento .feature::before { display: none; }
html:not([data-theme="old"]) .bento .feature h3 { font-size: 21px; }
html:not([data-theme="old"]) .bento .feature p { color: var(--muted); }
html:not([data-theme="old"]) .bento .feature .icon-wrap, html:not([data-theme="old"]) .bento .feature:hover .icon-wrap { width: 36px; height: 36px; margin-bottom: 14px; border-radius: var(--r-sm); background: var(--island); box-shadow: inset 0 0 0 1px var(--line-strong); color: var(--siren-blue); }
html:not([data-theme="old"]) .bento .feature:nth-child(even) .icon-wrap { color: var(--siren-red); }
html:not([data-theme="old"]) .bento .feature .icon-wrap svg { color: inherit; }

/* how it works: a real sequence, drawn as a road with lane markings */
html:not([data-theme="old"]) .steps { gap: 0; }
html:not([data-theme="old"]) .step { background: none; border: 0; border-radius: 0; padding: 26px 28px 0 0; border-top: 3px dashed var(--line-strong); }
html:not([data-theme="old"]) .step:not(:last-child)::after { display: none; }
html:not([data-theme="old"]) .step-n {
    display: block; width: auto; height: auto; margin: 0 0 6px;
    background: none; box-shadow: none; border-radius: 0; place-items: initial;
    font-family: var(--display); font-weight: 800; font-style: italic; font-size: 72px; line-height: 0.9;
    color: var(--siren-blue);
}
html:not([data-theme="old"]) .step:nth-child(2) .step-n { color: #fff; }
html:not([data-theme="old"]) .step:nth-child(3) .step-n { color: var(--siren-red); }
html:not([data-theme="old"]) .step h3 { font-size: 24px; }
html:not([data-theme="old"]) .step p { color: var(--muted); }

html:not([data-theme="old"]) .duo .lead { color: var(--body); }
html:not([data-theme="old"]) .faq details { border-radius: var(--r-md); }

/* closer */
html:not([data-theme="old"]) .home .closer {
    text-align: left;
    background: var(--panel-2);
    border: 1px solid var(--line-strong);
    border-top: 4px solid transparent;
    border-image: linear-gradient(90deg, var(--siren-blue) 50%, var(--siren-red) 50%) 1;
    border-image-slice: 1;
    border-radius: 0;
}
html:not([data-theme="old"]) .closer-glow { display: none; }
html:not([data-theme="old"]) .closer h2 { font-size: clamp(36px, 5vw, 64px); }
html:not([data-theme="old"]) .closer p { color: var(--body); }

/* ---- inputs, tables, pills: same family, smaller corners */
html:not([data-theme="old"]) .input, html:not([data-theme="old"]) input, html:not([data-theme="old"]) select, html:not([data-theme="old"]) textarea { border-radius: var(--r-md); }
html:not([data-theme="old"]) .pill, html:not([data-theme="old"]) .tag, html:not([data-theme="old"]) .badge, html:not([data-theme="old"]) .status-pill { border-radius: var(--r-sm); }
html:not([data-theme="old"]) .modal { border-radius: var(--r-lg); }
html:not([data-theme="old"]) .site-footer { border-radius: var(--r-lg); }

/* landing page: no app sidebar, the content gets the full width */
html:not([data-theme="old"]) .shell.home .body { grid-template-columns: minmax(0, 1fr); }
html:not([data-theme="old"]) .shell.home .left, html:not([data-theme="old"]) .shell.home .stage-bar { display: none; }

@media (max-width: 900px) {
    html:not([data-theme="old"]) .hero-split { grid-template-columns: 1fr; padding-top: 64px; }
    html:not([data-theme="old"]) .hs-copy h1 { max-width: 12ch; }
    html:not([data-theme="old"]) .steps { grid-template-columns: 1fr; gap: 8px; }
    html:not([data-theme="old"]) .step { border-top-width: 0; border-left: 3px dashed var(--line-strong); padding: 0 0 22px 20px; }
}
@media (max-width: 700px) {
    html:not([data-theme="old"]) .appbar-tabs { overflow-x: auto; scrollbar-width: none; }
    html:not([data-theme="old"]) .appbar-tab { width: auto; padding: 0 12px; font-size: 18px; letter-spacing: 0.03em; height: 34px; }
    html:not([data-theme="old"]) .appbar-brand { font-size: 30px; }
}
@media (prefers-reduced-motion: reduce) {
    html:not([data-theme="old"]) .hero-split::before, html:not([data-theme="old"]) .hero-split::after, html:not([data-theme="old"]) .lightbar i { animation: none; }
    html:not([data-theme="old"]) .hero-split::before, html:not([data-theme="old"]) .hero-split::after { opacity: 0.2; }
}

/* ===================================================================
   OLD ORASTY: the original look, selectable in Settings > Theme.
   The original styles are the base of this file, so this theme only
   needs to lay out the new homepage hero in the old style.
   =================================================================== */
html[data-theme="old"] .lightbar { display: none; }
html[data-theme="old"] .hero-split {
    position: relative; overflow: hidden;
    display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
    gap: clamp(24px, 3vw, 48px); align-items: center;
    padding: clamp(40px, 6vw, 88px) clamp(20px, 4vw, 56px);
    background-image:
        radial-gradient(ellipse at 50% 0%, rgba(139, 134, 183, 0.22), transparent 62%),
        linear-gradient(rgba(255, 255, 255, 0.025) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.025) 1px, transparent 1px);
    background-size: auto, 44px 44px, 44px 44px;
}
html[data-theme="old"] .hs-copy { text-align: left; }
html[data-theme="old"] .hs-copy h1 { font-size: clamp(34px, 4.6vw, 62px); line-height: 1.06; letter-spacing: -0.04em; max-width: 14ch; }
html[data-theme="old"] .hs-copy h1 em { color: var(--accent-hi); font-style: italic; }
html[data-theme="old"] .hs-copy .lead { color: var(--muted); font-size: 16px; margin-top: 18px; max-width: 46ch; line-height: 1.7; }
html[data-theme="old"] .hs-copy .cta { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 26px; }
html[data-theme="old"] .hs-copy .trust { justify-content: flex-start; }
html[data-theme="old"] .hs-copy .eyebrow { margin-bottom: 18px; }
html[data-theme="old"] .hs-console { border: 1px solid var(--edge); border-radius: 20px; background: var(--panel); }
html[data-theme="old"] .console-bar { display: flex; align-items: center; gap: 10px; padding: 10px 16px; color: var(--muted); font-size: 12px; border-bottom: 1px solid var(--edge); }
html[data-theme="old"] .console-bar .tag-live { margin-left: auto; }
html[data-theme="old"] .hs-console .fl { display: flex; flex-direction: column; gap: 10px; max-width: none; margin: 0; padding: 14px; transform: none !important; }
html[data-theme="old"] .hs-console .fl-card { margin: 0 !important; animation: none; }
@media (max-width: 900px) { html[data-theme="old"] .hero-split { grid-template-columns: 1fr; } }

/* theme picker swatches */
.theme-prev.dark { background: #05070d; }
.theme-prev.dark i { background: #0a101c; box-shadow: inset 0 0 0 1px #1d2b46; }
.theme-prev.dark i:first-child { box-shadow: inset 3px 0 0 #2f7bff, inset 0 0 0 1px #1d2b46; }
.theme-prev.dark i:last-child { box-shadow: inset 0 3px 0 #ff3d57, inset 0 0 0 1px #1d2b46; }
.theme-prev.old { background: #05050e; }
.theme-prev.old i { background: #0e0d14; box-shadow: inset 0 0 0 1px #2a2935; }
.theme-prev.old i:first-child { box-shadow: inset 0 0 0 1px #676389; }


/* ---- SEO landing pages and homepage "Learn more" links (all themes) */
.feature-link { display: inline-block; margin-top: 14px; font-weight: 600; font-size: 13.5px; color: var(--accent-hi); }
.feature-link::after { content: " \203A"; }
.feature-link:hover { text-decoration: underline; }
.seo-crumbs { display: flex; gap: 8px; margin-bottom: 14px; color: var(--muted); font-size: 13px; }
.seo-crumbs a { color: var(--accent-text); }
.seo-lead { max-width: 62ch; margin: 10px 0 0; font-size: 17px; line-height: 1.65; color: var(--body); }
.seo-cta { display: flex; flex-wrap: wrap; gap: 12px; margin: 24px 0 8px; }
.seo-list { margin: 10px 0 0; padding-left: 20px; display: flex; flex-direction: column; gap: 8px; color: var(--body); line-height: 1.6; }
.seo-related { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 10px; margin-top: 12px; }
.seo-rel { display: flex; flex-direction: column; gap: 4px; padding: 14px 16px; border: 1px solid var(--edge); border-radius: var(--r-md); background: var(--panel-2); color: var(--body); }
.seo-rel b { color: var(--text); }
.seo-rel span { color: var(--muted); font-size: 13px; line-height: 1.5; }
.seo-rel:hover { border-color: var(--accent-line); text-decoration: none; }

/* Safezones */
.grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
@media (max-width: 560px) { .grid-3 { grid-template-columns: minmax(0, 1fr); } }
.sz-plot .sz-svg { display: block; width: 100%; max-width: 460px; aspect-ratio: 1; margin: 0 auto; border: 1px solid var(--line, rgba(128, 128, 128, .3)); border-radius: 12px; background: rgba(128, 128, 128, .06); color: inherit; }
.sz-plot.picking .sz-svg { cursor: crosshair; outline: 2px solid #3b82f6; }
