:root {
    color-scheme: light;
    --background: #f7fdf8;
    --foreground: #0b1f17;
    --card: #ffffff;
    --card-foreground: #0b1f17;
    --popover: #ffffff;
    --popover-foreground: #0b1f17;
    --brand-lime: #b8ff2c;
    --brand-deep: #022c22;
    --primary: #047857;
    --primary-foreground: #ffffff;
    --secondary: #eef8f1;
    --secondary-foreground: #0b1f17;
    --muted: #edf7f0;
    --muted-foreground: #496157;
    --accent: #e8fbea;
    --accent-foreground: #065f46;
    --destructive: #dc2626;
    --destructive-foreground: #ffffff;
    --border: #d8e7dd;
    --input: #b8cfc0;
    --ring: #10b981;
    --success: #15803d;
    --success-bg: #dcfce7;
    --warning: #b45309;
    --warning-foreground: #92400e;
    --warning-bg: #fef3c7;
    --radius: 0.5rem;
    --radius-xs: 0.3rem;
    --radius-sm: 0.35rem;
    --radius-md: 0.45rem;
    --radius-lg: var(--radius);
    --radius-xl: 0.65rem;
    --radius-2xl: 0.75rem;
    --radius-pill: 999px;
    --space-1: 0.25rem;
    --space-2: 0.35rem;
    --space-3: 0.45rem;
    --space-4: 0.55rem;
    --space-5: 0.65rem;
    --space-6: 0.75rem;
    --control-height-sm: 2.25rem;
    --control-height-md: 2.4rem;
    --icon-control-size: 2.25rem;
    --touch-target: 2.75rem;
    --shadow: 0 1px 2px rgba(15, 23, 42, 0.08);
    --shadow-soft: 0 10px 30px rgba(15, 23, 42, 0.08);
    --shadow-elevated: 0 18px 48px rgba(15, 23, 42, 0.12);
    --shadow-lg: var(--shadow-elevated);
    --motion-fast: 150ms ease;
    --motion-default: 220ms ease;
}

/* Account privacy and permanent deletion */
.account-privacy-page {
    display: grid;
    gap: 1rem;
}

.account-privacy-header,
.account-danger-zone__header,
.account-auth-check {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
}

.account-privacy-header h1,
.account-danger-zone h2,
.account-deleted-card h1 {
    margin: 0.2rem 0 0;
}

.account-privacy-header p,
.account-danger-zone__header p,
.account-deleted-card p {
    max-width: 54rem;
    margin: 0.35rem 0 0;
    color: var(--muted-foreground);
}

.account-privacy-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.45fr) minmax(18rem, 0.75fr);
    gap: 1rem;
    align-items: start;
}

.account-data-card,
.account-retention-card,
.account-danger-zone,
.account-deleted-card {
    overflow: hidden;
}

.account-data-map {
    display: grid;
    margin: 0;
}

.account-data-map > div {
    display: grid;
    grid-template-columns: minmax(8rem, 0.35fr) minmax(0, 1fr);
    gap: 1rem;
    border-top: 1px solid var(--border);
    padding: 0.85rem 1rem;
}

.account-data-map dt {
    color: var(--muted-foreground);
    font-size: 0.74rem;
    font-weight: 750;
    text-transform: uppercase;
}

.account-data-map dd {
    margin: 0;
    line-height: 1.55;
}

.account-retention-list {
    display: grid;
    gap: 0.8rem;
    margin: 0;
    padding: 0 1rem 1rem 2rem;
    color: var(--muted-foreground);
}

.account-retention-list li {
    padding-left: 0.15rem;
    line-height: 1.5;
}

.account-danger-zone {
    border-color: color-mix(in srgb, var(--destructive) 36%, var(--border));
}

.account-danger-zone__header {
    border-bottom: 1px solid color-mix(in srgb, var(--destructive) 22%, var(--border));
    background: color-mix(in srgb, var(--destructive) 5%, var(--card));
    padding: 1rem;
}

.account-danger-zone__header .section-label {
    color: var(--destructive);
}

.account-deletion-form {
    display: grid;
    gap: 1rem;
    padding: 1rem;
}

.account-auth-check {
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--secondary);
    padding: 0.8rem;
}

.account-auth-check > div {
    display: grid;
    gap: 0.2rem;
}

.account-auth-check span:not(.badge) {
    color: var(--muted-foreground);
    font-size: 0.8rem;
    line-height: 1.45;
}

.account-confirmation-statement {
    display: block;
    width: fit-content;
    max-width: 100%;
    border: 1px solid color-mix(in srgb, var(--destructive) 28%, var(--border));
    border-radius: 0.35rem;
    background: color-mix(in srgb, var(--destructive) 6%, var(--card));
    color: var(--destructive);
    padding: 0.45rem 0.6rem;
    overflow-wrap: anywhere;
    white-space: normal;
}

.field-success {
    color: var(--success) !important;
}

.account-deleted-page {
    min-height: 70vh;
}

.account-deleted-shell {
    display: grid;
    place-items: center;
}

.account-deleted-card {
    display: grid;
    gap: 0.8rem;
    width: min(42rem, 100%);
    padding: 1.25rem;
}

.account-deleted-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.55rem;
    margin-top: 0.35rem;
}

@media (max-width: 880px) {
    .account-privacy-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 620px) {
    .account-privacy-header,
    .account-danger-zone__header,
    .account-auth-check {
        align-items: stretch;
        flex-direction: column;
    }

    .account-data-map > div {
        grid-template-columns: 1fr;
        gap: 0.35rem;
    }

    .account-deleted-actions {
        display: grid;
    }
}

html[data-theme="dark"],
html.dark {
    color-scheme: dark;
    --background: #04130f;
    --foreground: #e7f8ee;
    --card: #0a1c16;
    --card-foreground: #e7f8ee;
    --popover: #0a1c16;
    --popover-foreground: #e7f8ee;
    --brand-lime: #b8ff2c;
    --brand-deep: #022c22;
    --primary: #86efac;
    --primary-foreground: #022c22;
    --secondary: #102821;
    --secondary-foreground: #e7f8ee;
    --muted: #102821;
    --muted-foreground: #9ab7aa;
    --accent: #123728;
    --accent-foreground: #d9f99d;
    --destructive: #f87171;
    --destructive-foreground: #111827;
    --border: #214236;
    --input: #31584a;
    --ring: #a3e635;
    --success: #bef264;
    --success-bg: #1f3f18;
    --warning: #facc15;
    --warning-bg: #713f12;
    --shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
    --shadow-soft: 0 10px 30px rgba(0, 0, 0, 0.28);
    --shadow-elevated: 0 18px 48px rgba(0, 0, 0, 0.34);
}

html,
body {
    max-width: 100%;
    overflow-x: hidden;
}

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

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    min-width: 320px;
    min-height: 100dvh;
    background: var(--background);
    color: var(--foreground);
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    font-size: 14px;
    line-height: 1.5;
    letter-spacing: 0;
}

a {
    color: inherit;
    text-decoration: none;
}

code {
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    background: var(--muted);
    color: var(--foreground);
    padding: 0.05rem 0.3rem;
    font-size: 0.78rem;
}

svg {
    width: 1rem;
    height: 1rem;
}

.app-shell {
    min-height: 100vh;
    min-height: 100dvh;
}

.page-progress {
    position: fixed;
    top: 0;
    right: 0;
    left: 0;
    z-index: 220;
    height: 0.18rem;
    overflow: hidden;
    opacity: 0;
    pointer-events: none;
    transition: opacity var(--motion-fast);
}

.page-progress span {
    position: absolute;
    inset: 0 auto 0 0;
    width: min(42rem, 46vw);
    border-radius: var(--radius-pill);
    background: linear-gradient(90deg, transparent, var(--primary), var(--success), transparent);
    box-shadow: 0 0 18px color-mix(in srgb, var(--primary) 38%, transparent);
    transform: translateX(-105%);
}

body[data-page-state="loading"] .page-progress,
body[data-page-state="settling"] .page-progress {
    opacity: 1;
}

body[data-page-state="loading"] .page-progress {
    background: color-mix(in srgb, var(--primary) 12%, transparent);
}

body[data-page-state="loading"] .page-progress span {
    animation: page-progress-run 1.05s cubic-bezier(0.65, 0, 0.35, 1) infinite;
}

body[data-page-state="settling"] .page-progress span {
    width: 100%;
    background: var(--primary);
    transform: translateX(0);
}

@keyframes page-progress-run {
    to {
        transform: translateX(calc(100vw + 105%));
    }
}

.toast-region {
    position: fixed;
    top: max(0.75rem, env(safe-area-inset-top));
    right: max(0.75rem, env(safe-area-inset-right));
    z-index: 230;
    display: grid;
    gap: var(--space-4);
    width: min(24rem, calc(100vw - 1.5rem));
    pointer-events: none;
}

.toast {
    justify-self: end;
    max-width: 100%;
    border: 1px solid color-mix(in srgb, var(--border) 84%, var(--primary));
    border-radius: var(--radius-lg);
    background: color-mix(in srgb, var(--card) 92%, var(--background));
    color: var(--foreground);
    padding: 0.58rem 0.75rem;
    box-shadow: var(--shadow-elevated);
    font-size: 0.8rem;
    font-weight: 700;
    opacity: 0;
    transform: translateY(-0.45rem);
    transition: opacity var(--motion-fast), transform var(--motion-fast);
}

.toast[data-visible="true"] {
    opacity: 1;
    transform: translateY(0);
}

.toast[data-state="success"] {
    border-color: color-mix(in srgb, var(--success) 34%, var(--border));
}

.toast[data-state="warning"] {
    border-color: color-mix(in srgb, var(--warning) 42%, var(--border));
}

.toast[data-state="error"] {
    border-color: color-mix(in srgb, var(--destructive) 42%, var(--border));
}

.skip-link {
    position: fixed;
    top: max(0.65rem, env(safe-area-inset-top));
    left: max(0.65rem, env(safe-area-inset-left));
    z-index: 100;
    transform: translateY(-180%);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    background: var(--card);
    color: var(--foreground);
    padding: 0.45rem 0.65rem;
    box-shadow: var(--shadow-elevated);
    font-size: 0.8rem;
    font-weight: 700;
    opacity: 0;
    pointer-events: none;
    transition: opacity var(--motion-fast), transform var(--motion-fast);
}

.skip-link:focus,
.skip-link:focus-visible {
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0);
    outline: 2px solid var(--ring);
    outline-offset: 2px;
}

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

.topbar {
    position: sticky;
    top: 0;
    z-index: 20;
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    gap: clamp(0.75rem, 2vw, var(--space-6));
    align-items: center;
    min-height: 3.5rem;
    padding: max(0.5rem, env(safe-area-inset-top)) max(1rem, env(safe-area-inset-right)) 0.5rem max(1rem, env(safe-area-inset-left));
    border-bottom: 1px solid var(--border);
    background: color-mix(in srgb, var(--background) 94%, transparent);
    backdrop-filter: blur(10px);
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: var(--space-4);
    min-width: 0;
}

.brand-wordmark {
    gap: 0;
}

.brand strong,
.brand small {
    display: block;
    line-height: 1.1;
}

.brand strong {
    font-size: 0.9rem;
    font-weight: 650;
}

.brand small {
    color: var(--muted-foreground);
    font-size: 0.72rem;
}

.brand-tagline {
    color: var(--primary);
    font-size: 0.64rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.brand-mark {
    display: grid;
    place-items: center;
    width: 2.15rem;
    height: 2.15rem;
    overflow: hidden;
    border: 1px solid color-mix(in srgb, var(--primary) 24%, var(--border));
    border-radius: 0.6rem;
    background: var(--brand-deep);
    color: var(--primary);
    box-shadow: 0 0.45rem 1rem color-mix(in srgb, var(--primary) 14%, transparent), var(--shadow);
}

.brand-mark img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.brand-full-logo {
    display: block;
    flex: 0 0 auto;
    width: min(12.7rem, 100%);
    height: 3.4rem;
    overflow: hidden;
}

.brand-full-logo img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: contain;
    object-position: left center;
}

html[data-theme="dark"] img[data-theme-logo="full"],
html.dark img[data-theme-logo="full"] {
    content: url("/assets/icons/evalat-full-logo-dark.png");
}

.topbar .brand-full-logo {
    width: 12.4rem;
    height: 3.25rem;
}

.topnav {
    display: flex;
    min-width: 0;
    align-items: center;
    justify-content: center;
    gap: var(--space-1);
    overflow: hidden;
}

.topnav a {
    flex: 0 0 auto;
    border-radius: var(--radius-sm);
    padding: 0.35rem 0.55rem;
    color: var(--muted-foreground);
    font-size: 0.78rem;
    white-space: nowrap;
    transition: background var(--motion-fast), color var(--motion-fast);
}

.topnav a:hover,
.topnav a:focus-visible,
.topnav a[aria-current="page"] {
    background: var(--secondary);
    color: var(--foreground);
}

.icon-button.public-menu-toggle {
    display: none;
}

.public-menu-toggle svg {
    width: 1.05rem;
    height: 1.05rem;
}

.public-mobile-nav-layer[hidden] {
    display: none;
}

.public-mobile-nav-layer {
    position: fixed;
    inset: 0;
    z-index: 70;
}

body.public-nav-open {
    overflow: hidden;
}

.public-mobile-nav-backdrop {
    position: absolute;
    inset: 0;
    border: 0;
    background: color-mix(in srgb, var(--brand-deep) 48%, transparent);
    cursor: pointer;
}

.public-mobile-drawer {
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    display: grid;
    grid-template-rows: auto auto auto minmax(0, 1fr) auto;
    gap: 1rem;
    width: min(26.25rem, 100vw);
    overflow: hidden;
    border-left: 1px solid var(--border);
    background: color-mix(in srgb, var(--background) 96%, var(--card));
    padding: max(0.8rem, env(safe-area-inset-top)) max(1rem, env(safe-area-inset-right)) max(1rem, env(safe-area-inset-bottom)) 1rem;
    box-shadow: -1.2rem 0 3rem color-mix(in srgb, var(--brand-deep) 28%, transparent);
}

.public-mobile-drawer:focus {
    outline: none;
}

.public-mobile-drawer-header {
    position: sticky;
    top: 0;
    z-index: 2;
    display: flex;
    align-items: center;
    align-self: start;
    justify-content: space-between;
    gap: 1rem;
    width: 100%;
    background: color-mix(in srgb, var(--background) 96%, var(--card));
}

.public-mobile-drawer-header .brand-full-logo {
    width: min(11rem, 64vw);
    height: 2.85rem;
}

.public-mobile-drawer-close {
    width: 2.25rem;
    height: 2.25rem;
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    background: var(--card);
    color: var(--foreground);
}

.public-mobile-drawer-intro {
    display: grid;
    gap: 0.3rem;
    border: 1px solid color-mix(in srgb, var(--primary) 18%, var(--border));
    border-radius: var(--radius-lg);
    background: color-mix(in srgb, var(--primary) 7%, var(--card));
    padding: 0.9rem;
}

.public-mobile-drawer-intro h2,
.public-mobile-drawer-intro p {
    margin: 0;
}

.public-mobile-drawer-intro h2 {
    color: var(--foreground);
    font-size: 1rem;
    line-height: 1.2;
}

.public-mobile-drawer-intro p {
    color: var(--muted-foreground);
    font-size: 0.86rem;
    line-height: 1.45;
}

.public-mobile-actions {
    display: grid;
    gap: 0.55rem;
}

.public-mobile-actions .button {
    justify-content: center;
    min-height: 2.75rem;
}

.public-mobile-links,
.public-mobile-legal-links {
    display: grid;
    gap: 0.22rem;
}

.public-mobile-links {
    align-self: stretch;
    align-content: start;
    min-height: 0;
    max-height: 100%;
    overflow-y: auto;
    overscroll-behavior: contain;
    padding-right: 0.15rem;
    scrollbar-gutter: stable;
    -webkit-overflow-scrolling: touch;
}

.public-mobile-links a,
.public-mobile-legal-links a {
    display: flex;
    align-items: center;
    min-height: 2.65rem;
    border-radius: var(--radius-md);
    color: var(--foreground);
    text-decoration: none;
    transition: background var(--motion-fast), color var(--motion-fast);
}

.public-mobile-links a {
    padding: 0.68rem 0.8rem;
    font-size: 0.92rem;
    font-weight: 750;
}

.public-mobile-links a:hover,
.public-mobile-links a:focus-visible,
.public-mobile-links a[aria-current="page"] {
    background: color-mix(in srgb, var(--primary) 10%, var(--card));
    color: var(--primary);
}

.public-mobile-legal-links {
    position: sticky;
    bottom: 0;
    z-index: 2;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    align-self: end;
    justify-items: start;
    width: 100%;
    border-top: 1px solid var(--border);
    background: color-mix(in srgb, var(--background) 96%, var(--card));
    padding-top: 0.75rem;
}

.public-mobile-legal-links a {
    min-height: 2.25rem;
    color: var(--muted-foreground);
    font-size: 0.78rem;
    font-weight: 700;
}

.public-nav-actions {
    display: inline-flex;
    gap: 0.45rem;
    align-items: center;
    justify-content: end;
    min-width: 0;
}

.public-nav-actions .button-small {
    min-height: 2.25rem;
    padding: 0.45rem 0.7rem;
}

.theme-control {
    display: inline-flex;
    gap: 0.2rem;
    padding: 0.2rem;
    border: 1px solid var(--border);
    border-radius: calc(var(--radius-lg) + 0.05rem);
    background: var(--card);
}

.theme-toggle-button {
    position: relative;
}

.theme-icon {
    display: inline-grid;
    place-items: center;
}

.theme-icon[hidden] {
    display: none;
}

.icon-button {
    display: inline-grid;
    place-items: center;
    width: 1.9rem;
    height: 1.9rem;
    border: 0;
    border-radius: var(--radius-sm);
    background: transparent;
    color: var(--muted-foreground);
    cursor: pointer;
    transition: background var(--motion-fast), color var(--motion-fast), box-shadow var(--motion-fast);
}

.icon-button:hover,
.icon-button:focus-visible,
.icon-button.is-active {
    background: var(--secondary);
    color: var(--foreground);
    outline: none;
}

.icon-button:disabled {
    cursor: not-allowed;
    opacity: 0.42;
}

.icon-button-danger {
    border: 1px solid color-mix(in srgb, var(--destructive) 22%, var(--border));
    background: color-mix(in srgb, var(--destructive) 6%, transparent);
    color: var(--destructive);
}

.icon-button-danger:hover,
.icon-button-danger:focus-visible {
    border-color: color-mix(in srgb, var(--destructive) 46%, var(--border));
    background: color-mix(in srgb, var(--destructive) 12%, var(--card));
    color: var(--destructive);
    box-shadow: 0 0 0 2px color-mix(in srgb, var(--destructive) 14%, transparent);
}

[data-tooltip] {
    position: relative;
}

[data-tooltip]::before,
[data-tooltip]::after {
    position: absolute;
    z-index: 260;
    opacity: 0;
    pointer-events: none;
    transition: opacity var(--motion-fast), transform var(--motion-fast);
}

[data-tooltip]::before {
    max-width: min(18rem, calc(100vw - 2rem));
    border: 1px solid color-mix(in srgb, var(--border) 76%, var(--foreground));
    border-radius: var(--radius-sm);
    background: color-mix(in srgb, var(--foreground) 92%, var(--card));
    color: var(--background);
    padding: 0.34rem 0.52rem;
    box-shadow: var(--shadow-elevated);
    content: attr(data-tooltip);
    font-size: 0.72rem;
    font-weight: 750;
    line-height: 1.25;
    text-align: center;
    white-space: nowrap;
}

[data-tooltip]::after {
    width: 0.5rem;
    height: 0.5rem;
    background: color-mix(in srgb, var(--foreground) 92%, var(--card));
    content: "";
    transform: rotate(45deg);
}

[data-tooltip][data-tooltip-floating="true"]::before,
[data-tooltip][data-tooltip-floating="true"]::after {
    display: none;
}

[data-tooltip][data-tooltip-side="top"]::before {
    bottom: calc(100% + 0.48rem);
    left: 50%;
    transform: translate(-50%, 0.16rem);
}

[data-tooltip][data-tooltip-side="top"]::after {
    bottom: calc(100% + 0.24rem);
    left: calc(50% - 0.25rem);
}

[data-tooltip][data-tooltip-side="bottom"]::before {
    top: calc(100% + 0.48rem);
    left: 50%;
    transform: translate(-50%, -0.16rem);
}

[data-tooltip][data-tooltip-side="bottom"]::after {
    top: calc(100% + 0.24rem);
    left: calc(50% - 0.25rem);
}

[data-tooltip][data-tooltip-side="right"]::before {
    top: 50%;
    left: calc(100% + 0.55rem);
    transform: translate(-0.18rem, -50%);
}

[data-tooltip][data-tooltip-side="right"]::after {
    top: calc(50% - 0.25rem);
    left: calc(100% + 0.32rem);
}

[data-tooltip]:hover::before,
[data-tooltip]:hover::after,
[data-tooltip]:focus-visible::before,
[data-tooltip]:focus-visible::after {
    opacity: 1;
}

[data-tooltip][data-tooltip-side="top"]:hover::before,
[data-tooltip][data-tooltip-side="top"]:focus-visible::before {
    transform: translate(-50%, 0);
}

[data-tooltip][data-tooltip-side="bottom"]:hover::before,
[data-tooltip][data-tooltip-side="bottom"]:focus-visible::before {
    transform: translate(-50%, 0);
}

[data-tooltip][data-tooltip-side="right"]:hover::before,
[data-tooltip][data-tooltip-side="right"]:focus-visible::before {
    transform: translate(0, -50%);
}

.workspace-brand[data-tooltip]::before,
.workspace-brand[data-tooltip]::after,
.workspace-nav-item[data-tooltip]::before,
.workspace-nav-item[data-tooltip]::after {
    display: none;
}

.floating-tooltip {
    position: fixed;
    top: 0;
    left: 0;
    z-index: 520;
    max-width: min(18rem, calc(100vw - 1rem));
    border: 1px solid color-mix(in srgb, var(--border) 76%, var(--foreground));
    border-radius: var(--radius-sm);
    background: color-mix(in srgb, var(--foreground) 92%, var(--card));
    color: var(--background);
    padding: 0.34rem 0.52rem;
    box-shadow: var(--shadow-elevated);
    font-size: 0.72rem;
    font-weight: 750;
    line-height: 1.25;
    opacity: 0;
    pointer-events: none;
    text-align: center;
    transform: translateY(0.12rem);
    transition: opacity var(--motion-fast), transform var(--motion-fast);
    white-space: nowrap;
}

.floating-tooltip[data-visible="true"] {
    opacity: 1;
    transform: translateY(0);
}

.floating-tooltip[hidden] {
    display: none;
}

.public-main {
    width: min(1440px, 100%);
    margin: 0 auto;
    padding: 1rem;
}

.public-main.auth-public-main {
    width: 100%;
    max-width: none;
    padding: 0;
}

.public-main:focus,
.workspace-content:focus {
    outline: 2px solid color-mix(in srgb, var(--ring) 34%, transparent);
    outline-offset: 0.25rem;
}

.landing-page {
    display: grid;
    gap: clamp(2.5rem, 6vw, 5rem);
}

.landing-hero {
    display: grid;
    gap: clamp(1.25rem, 3vw, 2rem);
    align-items: center;
    min-height: calc(100dvh - 5.5rem);
    padding: clamp(2rem, 6vw, 4.5rem) 0 0;
}

.landing-hero-copy {
    display: grid;
    justify-items: center;
    gap: calc(var(--space-6) + 0.1rem);
    width: min(820px, 100%);
    margin: 0 auto;
    text-align: center;
}

.landing-hero h1 {
    margin: 0;
    color: var(--foreground);
    font-size: clamp(2rem, 5vw, 4.2rem);
    font-weight: 700;
    line-height: 1;
    letter-spacing: 0;
}

.landing-hero-copy p,
.landing-section-header p {
    margin: 0;
    color: var(--muted-foreground);
    font-size: clamp(0.96rem, 2vw, 1.08rem);
    line-height: 1.7;
}

.landing-actions {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-4);
    justify-content: center;
    margin-top: 0.25rem;
}

.landing-hero-metrics {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-3);
    justify-content: center;
    color: var(--muted-foreground);
    font-size: 0.78rem;
    font-weight: 700;
}

.landing-hero-metrics span:not(.badge) {
    display: inline-flex;
    align-items: center;
    min-height: 1.35rem;
    border: 1px solid var(--border);
    border-radius: var(--radius-pill);
    background: var(--card);
    padding: 0.1rem 0.55rem;
}

.landing-demo-stage {
    display: grid;
    gap: var(--space-6);
    width: 100%;
    border: 1px solid var(--border);
    border-radius: var(--radius-2xl);
    background: var(--card);
    box-shadow: var(--shadow-elevated);
    overflow: hidden;
}

.demo-tabs {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: var(--space-2);
    padding: 0.6rem;
    border-bottom: 1px solid var(--border);
    background: color-mix(in srgb, var(--secondary) 62%, var(--card));
}

.demo-tabs button {
    display: flex;
    gap: var(--space-4);
    align-items: center;
    min-width: 0;
    min-height: var(--control-height-md);
    border: 1px solid transparent;
    border-radius: var(--radius-md);
    background: transparent;
    color: var(--muted-foreground);
    padding: 0.35rem 0.55rem;
    cursor: pointer;
    font: inherit;
    text-align: left;
    transition: background var(--motion-fast), border-color var(--motion-fast), color var(--motion-fast), box-shadow var(--motion-fast);
}

.demo-tabs button span {
    display: grid;
    place-items: center;
    width: 1.45rem;
    height: 1.45rem;
    border: 1px solid var(--border);
    border-radius: var(--radius-pill);
    font-size: 0.68rem;
    font-weight: 800;
}

.demo-tabs button strong {
    overflow: hidden;
    font-size: 0.8rem;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.demo-tabs button:hover,
.demo-tabs button:focus-visible,
.demo-tabs button[aria-selected="true"] {
    border-color: color-mix(in srgb, var(--primary) 34%, var(--border));
    background: var(--card);
    color: var(--foreground);
    box-shadow: var(--shadow);
    outline: none;
}

.demo-panels {
    min-width: 0;
}

.demo-panel {
    padding: var(--space-6);
}

.demo-panel.is-active {
    animation: demo-panel-enter var(--motion-default);
}

.demo-media-panel {
    display: grid;
    gap: var(--space-6);
}

.demo-media-copy {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(16rem, 0.42fr);
    gap: 1rem;
    align-items: end;
}

.demo-media-copy h2 {
    margin: 0.2rem 0 0;
    font-size: clamp(1.1rem, 2.4vw, 1.55rem);
    line-height: 1.15;
}

.demo-media-copy p {
    margin: 0;
    color: var(--muted-foreground);
    font-size: 0.84rem;
    line-height: 1.6;
}

.demo-media-frame {
    position: relative;
    overflow: hidden;
    aspect-ratio: 16 / 8.6;
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    background: var(--background);
    box-shadow: inset 0 1px 0 color-mix(in srgb, var(--foreground) 8%, transparent), var(--shadow);
}

.demo-media-video {
    display: block;
    width: 100%;
    height: 100%;
    background: var(--secondary);
    object-fit: cover;
    object-position: left top;
}

.demo-media-evidence {
    padding-top: 0.1rem;
}

.landing-principle,
.workflow-shot {
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    background: var(--card);
    box-shadow: var(--shadow);
}

.landing-section {
    display: grid;
    gap: 1rem;
}

.landing-section-header {
    display: grid;
    gap: var(--space-3);
    width: min(720px, 100%);
}

.landing-section-header h2 {
    margin: 0;
    font-size: clamp(1.55rem, 4vw, 2.6rem);
    line-height: 1.08;
}

.landing-principles,
.workflow-media-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: calc(var(--space-6) + 0.1rem);
}

.landing-principle {
    display: grid;
    align-content: start;
    gap: var(--space-3);
    padding: 1rem;
}

.landing-principle h3,
.workflow-shot h3 {
    margin: 0;
    font-size: 0.98rem;
}

.landing-principle p,
.workflow-shot p {
    margin: 0;
    color: var(--muted-foreground);
    font-size: 0.84rem;
    line-height: 1.6;
}

.workflow-shot {
    display: grid;
    gap: calc(var(--space-6) - 0.05rem);
    padding: var(--space-6);
}

.workflow-shot-evidence {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-2);
}

.workflow-shot-evidence span {
    display: inline-flex;
    align-items: center;
    min-width: 0;
    min-height: 1.35rem;
    border: 1px solid var(--border);
    border-radius: var(--radius-pill);
    background: var(--secondary);
    color: var(--muted-foreground);
    padding: 0.12rem 0.45rem;
    font-size: 0.66rem;
    font-weight: 800;
}

.workflow-shot-evidence code {
    color: var(--foreground);
    font: inherit;
    margin-left: 0.2rem;
}

.workflow-shot-frame {
    position: relative;
    overflow: hidden;
    aspect-ratio: 16 / 10;
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    background: var(--background);
    box-shadow: inset 0 1px 0 color-mix(in srgb, var(--foreground) 8%, transparent);
}

.workflow-shot-video {
    display: block;
    width: 100%;
    height: 100%;
    background: var(--secondary);
    object-fit: cover;
    object-position: left top;
}

.workflow-shot-toggle {
    position: absolute;
    right: var(--space-4);
    bottom: var(--space-4);
    display: grid;
    place-items: center;
    width: var(--icon-control-size);
    height: var(--icon-control-size);
    border: 1px solid color-mix(in srgb, var(--border) 72%, var(--foreground));
    border-radius: var(--radius-pill);
    background: color-mix(in srgb, var(--background) 88%, transparent);
    color: var(--foreground);
    cursor: pointer;
    box-shadow: var(--shadow);
    backdrop-filter: blur(10px);
    transition: background var(--motion-fast), border-color var(--motion-fast), color var(--motion-fast), box-shadow var(--motion-fast);
}

.workflow-shot-toggle:hover,
.workflow-shot-toggle:focus-visible {
    border-color: color-mix(in srgb, var(--primary) 42%, var(--border));
    background: var(--card);
    color: var(--primary);
    outline: none;
    box-shadow: 0 0 0 2px color-mix(in srgb, var(--ring) 16%, transparent), var(--shadow);
}

.workflow-shot-toggle svg {
    width: 1rem;
    height: 1rem;
}

.media-icon {
    display: grid;
    place-items: center;
}

.workflow-shot-toggle .media-icon-play,
.workflow-shot-toggle[data-media-state="paused"] .media-icon-pause {
    display: none;
}

.workflow-shot-toggle[data-media-state="paused"] .media-icon-play {
    display: grid;
}

.landing-audience-grid,
.landing-pricing-grid,
.landing-proof-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.85rem;
}

.landing-audience-card,
.landing-pricing-card,
.landing-proof-card,
.landing-faq-item,
.landing-final-cta {
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--card);
    box-shadow: var(--shadow);
}

.landing-audience-card,
.landing-pricing-card,
.landing-proof-card {
    display: grid;
    align-content: start;
    gap: 0.85rem;
    min-width: 0;
    padding: 1rem;
}

.landing-audience-card h3,
.landing-pricing-card h3,
.landing-proof-card h3,
.landing-final-cta h2 {
    margin: 0;
    font-size: 1.05rem;
    line-height: 1.22;
}

.landing-audience-card p,
.landing-pricing-card p,
.landing-proof-card p,
.landing-final-cta p,
.landing-faq-item p {
    margin: 0;
    color: var(--muted-foreground);
    font-size: 0.84rem;
    line-height: 1.6;
}

.landing-card-label {
    display: inline-flex;
    width: fit-content;
    align-items: center;
    min-height: 1.4rem;
    border: 1px solid color-mix(in srgb, var(--primary) 28%, var(--border));
    border-radius: 999px;
    background: color-mix(in srgb, var(--primary) 8%, var(--card));
    color: var(--primary);
    padding: 0.08rem 0.5rem;
    font-size: 0.66rem;
    font-weight: 800;
    text-transform: uppercase;
}

.landing-capability-list {
    display: grid;
    gap: 0.38rem;
    margin: 0;
    padding: 0;
    list-style: none;
}

.landing-capability-list li {
    position: relative;
    color: var(--muted-foreground);
    padding-left: 1rem;
    font-size: 0.78rem;
    line-height: 1.45;
}

.landing-capability-list li::before {
    position: absolute;
    top: 0.52rem;
    left: 0;
    width: 0.36rem;
    height: 0.36rem;
    border-radius: 999px;
    background: var(--success);
    content: "";
}

.landing-pricing-card {
    grid-template-rows: auto 1fr auto;
}

.landing-pricing-card.is-featured {
    border-color: color-mix(in srgb, var(--primary) 46%, var(--border));
    box-shadow: var(--shadow-soft);
}

.landing-pricing-head {
    display: grid;
    gap: 0.45rem;
}

.landing-pricing-head strong {
    color: var(--foreground);
    font-size: 1.35rem;
    line-height: 1;
}

.landing-proof-card strong {
    display: inline-flex;
    width: fit-content;
    align-items: center;
    min-height: 1.45rem;
    border: 1px solid color-mix(in srgb, var(--success) 30%, var(--border));
    border-radius: 999px;
    background: color-mix(in srgb, var(--success-bg) 45%, var(--card));
    color: var(--success);
    padding: 0.08rem 0.5rem;
    font-size: 0.7rem;
    font-weight: 800;
}

.landing-faq-list {
    display: grid;
    gap: 0.55rem;
}

.landing-faq-item {
    padding: 0.85rem 1rem;
}

.landing-faq-item summary {
    color: var(--foreground);
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 750;
}

.landing-faq-item summary:focus-visible {
    border-radius: 0.3rem;
    outline: 2px solid var(--ring);
    outline-offset: 0.2rem;
}

.landing-faq-item p {
    margin-top: 0.55rem;
}

.landing-final-cta {
    display: flex;
    gap: 1rem;
    align-items: center;
    justify-content: space-between;
    padding: clamp(1rem, 3vw, 1.5rem);
}

.landing-final-cta > div:first-child {
    display: grid;
    gap: 0.45rem;
    width: min(620px, 100%);
}

.landing-footer {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(20rem, 0.86fr);
    gap: clamp(1rem, 3vw, 2rem);
    border-top: 1px solid var(--border);
    padding: 1.5rem 0 0.25rem;
}

.landing-footer-brand {
    display: grid;
    gap: 0.45rem;
    align-content: start;
}

.landing-footer-brand h2 {
    max-width: 36rem;
    margin: 0;
    font-size: clamp(1.1rem, 2vw, 1.45rem);
    line-height: 1.15;
}

.landing-footer-brand p {
    max-width: 46rem;
    margin: 0;
    color: var(--muted-foreground);
    font-size: 0.86rem;
}

.landing-footer-links {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.75rem;
}

.landing-footer-links div {
    display: grid;
    gap: 0.32rem;
    align-content: start;
}

.landing-footer-links h3 {
    margin: 0 0 0.12rem;
    color: var(--foreground);
    font-size: 0.78rem;
}

.landing-footer-links a {
    width: fit-content;
    max-width: 100%;
    border-radius: 0.35rem;
    color: var(--muted-foreground);
    font-size: 0.78rem;
    font-weight: 650;
    transition: color var(--motion-fast), background var(--motion-fast), box-shadow var(--motion-fast);
}

.landing-footer-links a:hover,
.landing-footer-links a:focus-visible {
    background: var(--accent);
    color: var(--foreground);
    outline: none;
    box-shadow: 0 0 0 0.18rem var(--accent);
}

.public-site-footer {
    display: grid;
    grid-template-columns: minmax(0, 0.42fr) minmax(0, 1fr);
    gap: clamp(1rem, 3vw, 2rem);
    width: 100%;
    margin: 1rem 0 0;
    border-top: 1px solid var(--border);
    padding: clamp(1rem, 3vw, 1.5rem) max(clamp(1rem, 3vw, 1.75rem), calc((100vw - 1440px) / 2 + 1rem));
}

.public-site-footer-brand {
    display: grid;
    gap: 0.65rem;
    align-content: start;
    min-width: 0;
}

.public-site-footer-brand .brand-full-logo {
    width: 12.5rem;
    height: 3.35rem;
}

.public-site-footer-brand h2,
.public-site-footer-brand p {
    margin: 0;
}

.public-site-footer-brand h2 {
    font-size: 1rem;
}

.public-site-footer-brand p:not(.brand-tagline) {
    max-width: 42rem;
    margin-top: 0.35rem;
    color: var(--muted-foreground);
    font-size: 0.82rem;
    line-height: 1.55;
}

.public-site-footer-links {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 1rem;
}

.public-site-footer-links div {
    display: grid;
    gap: 0.35rem;
    align-content: start;
}

.public-site-footer-links h3 {
    margin: 0 0 0.15rem;
    color: var(--foreground);
    font-size: 0.76rem;
    font-weight: 850;
}

.public-site-footer-links a {
    color: var(--muted-foreground);
    font-size: 0.78rem;
    font-weight: 700;
}

.public-site-footer-links a:hover,
.public-site-footer-links a:focus-visible {
    color: var(--foreground);
    outline: none;
}

.public-site-footer-bottom {
    display: flex;
    flex-wrap: wrap;
    grid-column: 1 / -1;
    gap: 0.75rem;
    justify-content: space-between;
    border-top: 1px solid var(--border);
    padding-top: 0.85rem;
    color: var(--muted-foreground);
    font-size: 0.74rem;
    font-weight: 700;
}

.public-site-footer-bottom a {
    color: inherit;
}

@keyframes demo-panel-enter {
    from {
        opacity: 0;
        transform: translateY(0.35rem);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.page-grid {
    display: grid;
    grid-template-columns: minmax(260px, 0.38fr) minmax(0, 0.62fr);
    gap: 1rem;
    align-items: start;
}

.sidebar-panel,
.card {
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--card);
    color: var(--card-foreground);
    box-shadow: var(--shadow);
}

.sidebar-panel {
    position: sticky;
    top: 4.5rem;
    padding: 1rem;
}

.sidebar-panel h1 {
    margin: 0.35rem 0 0.65rem;
    font-size: 1.35rem;
    line-height: 1.2;
    letter-spacing: 0;
}

.sidebar-panel p,
.muted {
    color: var(--muted-foreground);
    font-size: 0.86rem;
}

.content-stack {
    display: grid;
    gap: 1rem;
}

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

.card {
    position: relative;
    overflow: hidden;
    min-width: 0;
}

.card-header {
    display: flex;
    align-items: start;
    justify-content: space-between;
    gap: 0.75rem;
    padding: 0.85rem 1rem;
    border-bottom: 1px solid var(--border);
}

.card:has(.switch-control--corner) .card-header {
    padding-right: 3.15rem;
}

.card-header > * {
    min-width: 0;
}

.card h2 {
    margin: 0;
    font-size: 0.95rem;
    font-weight: 650;
}

.card p,
.card ul {
    margin: 0;
    padding: 1rem;
}

.section-label {
    color: var(--muted-foreground);
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0;
    text-transform: uppercase;
}

.action-row {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    align-items: center;
    margin-top: 0.85rem;
}

.button {
    position: relative;
    display: inline-flex;
    gap: 0.4rem;
    align-items: center;
    justify-content: center;
    max-width: 100%;
    min-height: 2.25rem;
    border: 1px solid transparent;
    border-radius: 0.45rem;
    padding: 0.45rem 0.75rem;
    font-size: 0.82rem;
    font-weight: 600;
    text-align: center;
    cursor: pointer;
    transition: background var(--motion-fast), border-color var(--motion-fast), color var(--motion-fast), opacity var(--motion-fast), box-shadow var(--motion-fast);
}

.button-primary {
    background: var(--primary);
    color: var(--primary-foreground);
}

.button-secondary {
    border-color: var(--border);
    background: var(--secondary);
    color: var(--secondary-foreground);
}

.button-danger {
    border-color: color-mix(in srgb, var(--destructive) 28%, var(--border));
    background: color-mix(in srgb, var(--destructive) 7%, var(--card));
    color: var(--destructive);
}

.button-primary:hover,
.button-primary:focus-visible,
.button-secondary:hover,
.button-secondary:focus-visible,
.button-danger:hover,
.button-danger:focus-visible {
    opacity: 0.92;
    outline: 2px solid var(--ring);
    outline-offset: 2px;
}

.button-danger:hover,
.button-danger:focus-visible {
    border-color: color-mix(in srgb, var(--destructive) 46%, var(--border));
    background: color-mix(in srgb, var(--destructive) 12%, var(--card));
    box-shadow: 0 0 0 2px color-mix(in srgb, var(--destructive) 12%, transparent);
}

.button-full {
    width: 100%;
}

.button-small {
    min-height: 1.9rem;
    padding: 0.25rem 0.5rem;
    font-size: 0.74rem;
}

.button[data-loading="true"],
.button[aria-busy="true"] {
    cursor: progress;
    opacity: 0.88;
    pointer-events: none;
}

.button[aria-busy="true"]:not([data-loading="true"])::after {
    flex: 0 0 auto;
    width: 0.85rem;
    height: 0.85rem;
    border: 2px solid currentColor;
    border-right-color: transparent;
    border-radius: 999px;
    content: "";
    animation: control-spin 760ms linear infinite;
}

.button[data-copy-state="copied"] {
    border-color: color-mix(in srgb, var(--success) 38%, var(--border));
    background: color-mix(in srgb, var(--success-bg) 58%, var(--card));
    color: var(--success);
}

.button[data-copy-state="loading"] {
    cursor: progress;
}

.icon-button[aria-busy="true"] {
    position: relative;
    cursor: progress;
    pointer-events: none;
}

.icon-button[aria-busy="true"] > * {
    opacity: 0;
}

.icon-button[aria-busy="true"]::after {
    position: absolute;
    inset: calc(50% - 0.43rem);
    width: 0.86rem;
    height: 0.86rem;
    border: 2px solid currentColor;
    border-right-color: transparent;
    border-radius: 999px;
    content: "";
    animation: control-spin 760ms linear infinite;
}

@keyframes control-spin {
    to {
        transform: rotate(1turn);
    }
}

.confirmation-dialog {
    width: min(32rem, calc(100vw - 2rem));
    max-width: calc(100vw - 2rem);
    border: 0;
    background: transparent;
    color: var(--foreground);
    padding: 0;
}

.confirmation-dialog::backdrop {
    background: color-mix(in srgb, var(--foreground) 36%, transparent);
}

.confirmation-dialog-panel {
    display: grid;
    gap: 1rem;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--card);
    box-shadow: var(--shadow-strong);
    padding: 1rem;
}

.confirmation-dialog-copy {
    display: grid;
    gap: 0.45rem;
    min-width: 0;
}

.confirmation-dialog[data-tone="danger"] .section-label {
    color: var(--destructive);
}

.confirmation-dialog h2 {
    margin: 0;
    font-size: 1rem;
    line-height: 1.25;
}

.confirmation-dialog p {
    margin: 0;
    color: var(--muted-foreground);
    font-size: 0.84rem;
    line-height: 1.55;
}

.confirmation-dialog-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    justify-content: flex-end;
}

.badge {
    display: inline-flex;
    align-items: center;
    max-width: 100%;
    min-height: 1.35rem;
    border: 1px solid var(--border);
    border-radius: 999px;
    background: var(--secondary);
    color: var(--secondary-foreground);
    padding: 0.1rem 0.45rem;
    font-size: 0.72rem;
    font-weight: 650;
    text-transform: capitalize;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.badge-success,
.badge-pass {
    border-color: color-mix(in srgb, var(--success) 36%, var(--border));
    background: var(--success-bg);
    color: var(--success);
}

.badge-warning,
.badge-warn {
    border-color: color-mix(in srgb, var(--warning) 36%, var(--border));
    background: var(--warning-bg);
    color: var(--warning);
}

.badge-fail {
    border-color: color-mix(in srgb, var(--destructive) 40%, var(--border));
    background: color-mix(in srgb, var(--destructive) 14%, var(--card));
    color: var(--destructive);
}

.table-wrap {
    position: relative;
    width: 100%;
    overflow: auto;
    -webkit-overflow-scrolling: touch;
    border-radius: calc(var(--radius) - 0.08rem);
    overscroll-behavior-inline: contain;
    scrollbar-color: color-mix(in srgb, var(--muted-foreground) 36%, transparent) transparent;
    scrollbar-width: thin;
    transition: box-shadow var(--motion-fast);
}

.table-wrap:focus-visible {
    outline: 2px solid var(--ring);
    outline-offset: 2px;
}

[data-ajax-table] {
    position: relative;
}

[data-ajax-table][data-processing="true"] .table-wrap,
.table-wrap[data-processing="true"] table {
    opacity: 0.58;
    pointer-events: none;
}

.datatable-processing {
    position: absolute;
    inset: 0.65rem;
    z-index: 8;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.55rem;
    border: 1px solid color-mix(in srgb, var(--border) 74%, transparent);
    border-radius: calc(var(--radius) - 0.08rem);
    background: color-mix(in srgb, var(--card) 86%, transparent);
    color: var(--foreground);
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0;
    box-shadow: var(--shadow-lg);
    backdrop-filter: blur(10px);
}

.datatable-processing[hidden] {
    display: none;
}

.datatable-spinner {
    width: 0.95rem;
    height: 0.95rem;
    border: 2px solid color-mix(in srgb, var(--primary) 28%, var(--border));
    border-right-color: var(--primary);
    border-radius: 999px;
    animation: control-spin 760ms linear infinite;
}

.table-scroll-controls {
    display: flex;
    justify-content: flex-end;
    gap: 0.25rem;
    min-height: 1.85rem;
    margin: -0.2rem 0 0.45rem;
}

.table-scroll-button {
    width: 1.75rem;
    height: 1.75rem;
    border: 1px solid var(--border);
    background: color-mix(in srgb, var(--card) 88%, var(--secondary));
    box-shadow: var(--shadow);
}

.table-scroll-button svg {
    width: 1rem;
    height: 1rem;
}

.table-wrap[data-has-overflow-x="true"][data-scroll-x="start"] {
    box-shadow: inset -1rem 0 0.85rem -1.05rem color-mix(in srgb, var(--foreground) 28%, transparent);
}

.table-wrap[data-has-overflow-x="true"][data-scroll-x="middle"] {
    box-shadow:
        inset 1rem 0 0.85rem -1.05rem color-mix(in srgb, var(--foreground) 22%, transparent),
        inset -1rem 0 0.85rem -1.05rem color-mix(in srgb, var(--foreground) 22%, transparent);
}

.table-wrap[data-has-overflow-x="true"][data-scroll-x="end"] {
    box-shadow: inset 1rem 0 0.85rem -1.05rem color-mix(in srgb, var(--foreground) 28%, transparent);
}

table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.82rem;
}

th,
td {
    padding: 0.65rem 1rem;
    border-bottom: 1px solid var(--border);
    text-align: left;
    vertical-align: top;
}

th {
    position: sticky;
    top: 0;
    z-index: 3;
    background: color-mix(in srgb, var(--card) 96%, var(--secondary));
    color: var(--muted-foreground);
    font-size: 0.72rem;
    font-weight: 700;
    box-shadow: inset 0 -1px 0 var(--border);
    text-transform: uppercase;
    white-space: nowrap;
}

.datatable-sort-link {
    display: inline-flex;
    align-items: center;
    gap: 0.32rem;
    max-width: 100%;
    color: inherit;
    text-decoration: none;
    transition: color var(--motion-fast), opacity var(--motion-fast);
}

.datatable-sort-link::after {
    width: 0.42rem;
    height: 0.42rem;
    border-right: 1.5px solid currentColor;
    border-bottom: 1.5px solid currentColor;
    opacity: 0.34;
    content: "";
    transform: rotate(45deg) translateY(-0.08rem);
    transition: opacity var(--motion-fast), transform var(--motion-fast);
}

.datatable-sort-link:hover,
.datatable-sort-link:focus-visible,
.datatable-sort-link.is-active {
    color: var(--foreground);
    opacity: 1;
}

.datatable-sort-link.is-active::after {
    opacity: 0.82;
}

.datatable-sort-link.is-descending::after {
    transform: rotate(45deg) translateY(-0.08rem);
}

.datatable-sort-link.is-ascending::after {
    transform: rotate(225deg) translateY(-0.08rem);
}

.sort-indicator {
    font-size: 0;
}

tbody tr {
    transition: background var(--motion-fast), box-shadow var(--motion-fast);
}

tbody tr:hover {
    background: color-mix(in srgb, var(--accent) 72%, var(--card));
}

tbody tr:focus-within {
    background: color-mix(in srgb, var(--accent) 82%, var(--card));
    box-shadow: inset 3px 0 0 var(--primary);
}

.stacked-table {
    min-width: 44rem;
    background: var(--card);
}

.stacked-table td {
    overflow-wrap: anywhere;
}

.stacked-table .table-action-cell {
    text-align: right;
    white-space: nowrap;
}

.stacked-table .table-action-cell form {
    display: inline-flex;
    gap: 0.4rem;
    align-items: center;
    justify-content: flex-end;
}

@media (min-width: 821px) {
    .table-wrap[data-has-overflow-x="true"] .stacked-table th:first-child,
    .table-wrap[data-has-overflow-x="true"] .stacked-table td:first-child {
        position: sticky;
        left: 0;
        z-index: 2;
        background: var(--card);
        box-shadow: 1px 0 0 var(--border);
    }

    .table-wrap[data-has-overflow-x="true"] .stacked-table th:first-child {
        z-index: 4;
        background: color-mix(in srgb, var(--card) 96%, var(--secondary));
    }

    .table-wrap[data-has-overflow-x="true"] .stacked-table tbody tr:hover td:first-child,
    .table-wrap[data-has-overflow-x="true"] .stacked-table tbody tr:focus-within td:first-child {
        background: color-mix(in srgb, var(--accent) 72%, var(--card));
    }
}

.result-ledger-table td[data-label="Score"],
.student-result-history-table td[data-label="Score"] {
    white-space: nowrap;
}

.check-list {
    list-style: none;
}

.check-list li {
    position: relative;
    padding: 0.3rem 0 0.3rem 1.3rem;
    color: var(--muted-foreground);
    font-size: 0.86rem;
}

.check-list li::before {
    position: absolute;
    left: 0;
    color: var(--success);
    content: "✓";
    font-weight: 800;
}

.auth-grid {
    display: grid;
    grid-template-columns: minmax(300px, 0.52fr) minmax(0, 0.48fr);
    gap: clamp(0.9rem, 2vw, 1.25rem);
    align-items: stretch;
    width: min(1080px, 100%);
    margin: clamp(0.5rem, 2vw, 1.25rem) auto;
}

.error-page {
    display: grid;
    min-height: calc(100dvh - 6rem);
    place-items: center;
    padding: clamp(1rem, 5vw, 3rem) 0;
}

.error-panel {
    display: grid;
    grid-template-columns: minmax(0, 0.8fr) minmax(12rem, 0.36fr);
    gap: clamp(1rem, 3vw, 1.5rem);
    align-items: stretch;
    width: min(780px, 100%);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--card);
    box-shadow: var(--shadow-soft);
    padding: clamp(1rem, 3vw, 1.35rem);
}

.error-copy {
    display: grid;
    align-content: center;
    gap: 0.75rem;
    min-width: 0;
}

.error-copy h1 {
    margin: 0;
    font-size: clamp(1.65rem, 4vw, 2.8rem);
    line-height: 1.05;
}

.error-copy p {
    margin: 0;
    color: var(--muted-foreground);
    font-size: 0.94rem;
    line-height: 1.65;
}

.error-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 0.25rem;
}

.error-status-card {
    display: grid;
    align-content: space-between;
    gap: 1rem;
    min-width: 0;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: color-mix(in srgb, var(--secondary) 52%, var(--card));
    padding: 1rem;
}

.error-status-code {
    color: var(--primary);
    font-size: clamp(2.4rem, 8vw, 4.25rem);
    font-weight: 800;
    line-height: 0.9;
}

.error-status-list {
    display: grid;
    gap: 0.45rem;
    margin: 0;
    padding: 0;
    list-style: none;
}

.error-status-list li {
    display: flex;
    gap: 0.4rem;
    align-items: center;
    color: var(--muted-foreground);
    font-size: 0.76rem;
    font-weight: 700;
}

.error-status-list li::before {
    width: 0.4rem;
    height: 0.4rem;
    border-radius: 999px;
    background: var(--success);
    content: "";
}

.auth-page {
    min-height: 0;
}

.auth-page .auth-card {
    order: 1;
}

.auth-page .auth-panel {
    order: 2;
}

.auth-copy {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    min-width: 0;
    padding: clamp(1rem, 3vw, 1.5rem);
}

.auth-panel {
    position: relative;
    overflow: hidden;
    justify-content: space-between;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--card);
    box-shadow: var(--shadow-soft);
}

.auth-panel::before {
    position: absolute;
    inset: 0 0 auto;
    height: 0.2rem;
    background: linear-gradient(90deg, var(--primary), var(--success), var(--warning));
    content: "";
}

.auth-copy h1 {
    max-width: 12ch;
    margin: 0;
    font-size: clamp(1.65rem, 4vw, 2.65rem);
    line-height: 1.02;
}

.auth-copy p {
    max-width: 42rem;
    margin: 0;
    color: var(--muted-foreground);
    font-size: 0.94rem;
    line-height: 1.65;
}

.auth-signal-grid,
.auth-check-list {
    display: grid;
    gap: 0.55rem;
    margin-top: 0.35rem;
}

.auth-signal-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.auth-signal-grid div,
.auth-check-list div,
.auth-path-note {
    min-width: 0;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: color-mix(in srgb, var(--secondary) 55%, var(--card));
    padding: 0.7rem;
}

.auth-signal-grid span,
.auth-check-list span,
.auth-path-note span {
    display: block;
    min-width: 0;
    color: var(--muted-foreground);
    font-size: 0.75rem;
    line-height: 1.45;
}

.auth-signal-grid strong,
.auth-check-list strong,
.auth-path-note strong {
    display: block;
    margin-top: 0.12rem;
    color: var(--foreground);
    font-size: 0.88rem;
    line-height: 1.35;
}

.auth-signal-grid small {
    display: block;
    color: var(--muted-foreground);
    font-size: 0.72rem;
    line-height: 1.35;
}

.auth-check-list div {
    border-left: 0.2rem solid color-mix(in srgb, var(--primary) 70%, var(--border));
}

.auth-path-note {
    display: grid;
    gap: 0.2rem;
    border-color: color-mix(in srgb, var(--warning) 36%, var(--border));
    background: color-mix(in srgb, var(--warning-bg) 42%, var(--card));
}

.auth-path-note strong {
    margin: 0;
}

.auth-preview {
    display: grid;
    gap: 0.75rem;
    margin-top: auto;
    border: 1px solid color-mix(in srgb, var(--primary) 24%, var(--border));
    border-radius: var(--radius-lg);
    background: linear-gradient(135deg, color-mix(in srgb, var(--primary) 9%, var(--card)), var(--card));
    padding: 0.85rem;
    box-shadow: var(--shadow-soft);
}

.auth-preview-header {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    align-items: center;
    justify-content: space-between;
}

.auth-preview-header span,
.auth-preview-header strong {
    border: 1px solid var(--border);
    border-radius: var(--radius-pill);
    background: color-mix(in srgb, var(--secondary) 42%, var(--card));
    padding: 0.2rem 0.55rem;
    font-size: 0.7rem;
    font-weight: 850;
}

.auth-preview-header span {
    color: var(--primary);
}

.auth-preview-list {
    display: grid;
    gap: 0.5rem;
}

.auth-preview-list span {
    display: grid;
    gap: 0.12rem;
    border: 1px solid color-mix(in srgb, var(--border) 74%, transparent);
    border-radius: var(--radius-md);
    background: color-mix(in srgb, var(--background) 54%, transparent);
    padding: 0.58rem;
}

.auth-preview-list strong {
    font-size: 0.8rem;
}

.auth-preview-list small {
    color: var(--muted-foreground);
    font-size: 0.72rem;
    line-height: 1.4;
}

.auth-progress {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.45rem;
    border-bottom: 1px solid var(--border);
    padding: 0.9rem 1rem 0;
}

.auth-progress span {
    display: grid;
    gap: 0.22rem;
    min-width: 0;
    border-bottom: 0.16rem solid var(--border);
    padding-bottom: 0.65rem;
}

.auth-progress span[data-active="true"] {
    border-color: var(--primary);
}

.auth-progress strong {
    display: grid;
    place-items: center;
    width: 1.6rem;
    height: 1.6rem;
    border: 1px solid color-mix(in srgb, var(--primary) 32%, var(--border));
    border-radius: var(--radius-pill);
    background: color-mix(in srgb, var(--primary) 8%, var(--card));
    color: var(--primary);
    font-size: 0.72rem;
}

.auth-progress small {
    overflow: hidden;
    color: var(--muted-foreground);
    font-size: 0.68rem;
    font-weight: 800;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.auth-form-options {
    display: flex;
    flex-wrap: wrap;
    gap: 0.65rem;
    align-items: center;
    justify-content: space-between;
}

.auth-form-options a {
    color: var(--primary);
    font-size: 0.78rem;
    font-weight: 800;
}

.auth-remember.switch-control {
    width: fit-content;
    min-height: 2rem;
    border: 0;
    background: transparent;
    padding: 0;
}

.auth-remember strong {
    font-size: 0.78rem;
}

.auth-provider-note {
    display: grid;
    gap: 0.14rem;
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    background: color-mix(in srgb, var(--secondary) 45%, var(--card));
    padding: 0.7rem;
}

.auth-provider-note strong {
    font-size: 0.8rem;
}

.auth-provider-note span {
    color: var(--muted-foreground);
    font-size: 0.72rem;
    line-height: 1.45;
}

.auth-experience {
    position: relative;
    display: grid;
    grid-template-columns: minmax(320px, 0.4fr) minmax(0, 0.6fr);
    gap: 0;
    min-height: calc(100dvh - 3.6rem);
    width: min(1440px, 100%);
    margin: 0 auto;
    overflow: hidden;
}

.auth-public-main .auth-experience {
    min-height: 100dvh;
}

.auth-minimal-topbar {
    position: absolute;
    top: 0;
    right: 0;
    left: 0;
    z-index: 5;
    display: flex;
    gap: 1rem;
    align-items: center;
    justify-content: space-between;
    padding: max(0.8rem, env(safe-area-inset-top)) max(1rem, env(safe-area-inset-right)) 0.8rem max(1rem, env(safe-area-inset-left));
    pointer-events: none;
}

.auth-mini-logo,
.auth-home-link {
    pointer-events: auto;
}

.auth-mini-logo {
    display: inline-flex;
    gap: 0.55rem;
    align-items: center;
    min-width: 0;
    color: var(--foreground);
}

.auth-mini-logo .brand-mark {
    width: 1.85rem;
    height: 1.85rem;
    border-radius: 0.52rem;
}

.auth-mini-logo .brand-full-logo {
    width: 11.3rem;
    height: 3.05rem;
}

.auth-mini-logo strong,
.auth-mini-logo small {
    display: block;
    line-height: 1.08;
}

.auth-mini-logo strong {
    font-size: 0.82rem;
}

.auth-mini-logo small {
    color: var(--primary);
    font-size: 0.55rem;
    font-weight: 850;
    letter-spacing: 0.08em;
}

.auth-home-link {
    border: 1px solid color-mix(in srgb, var(--border) 82%, transparent);
    border-radius: var(--radius-pill);
    background: color-mix(in srgb, var(--card) 72%, transparent);
    color: var(--muted-foreground);
    padding: 0.36rem 0.72rem;
    font-size: 0.75rem;
    font-weight: 820;
    text-decoration: none;
    backdrop-filter: blur(12px);
    transition: background var(--motion-fast), border-color var(--motion-fast), color var(--motion-fast), transform var(--motion-fast), box-shadow var(--motion-fast);
}

.auth-home-link:hover,
.auth-home-link:focus-visible {
    border-color: color-mix(in srgb, var(--primary) 32%, var(--border));
    background: var(--card);
    color: var(--foreground);
    outline: none;
    box-shadow: var(--shadow-soft);
    transform: translateY(-1px);
}

.auth-form-pane {
    display: grid;
    align-content: center;
    gap: clamp(0.85rem, 2vh, 1.15rem);
    min-width: 0;
    padding: clamp(1.1rem, 3.4vw, 3rem);
}

.auth-login-experience .auth-form-pane {
    padding-top: clamp(4.4rem, 8vh, 5.5rem);
    padding-bottom: clamp(1.2rem, 4vh, 2rem);
}

.auth-login-experience .auth-form-copy,
.auth-login-experience .auth-minimal-form {
    max-width: 23rem;
}

.auth-login-experience .auth-form-copy h1 {
    font-size: clamp(1.85rem, 3.4vw, 2.45rem);
}

.auth-login-experience .auth-form-copy p {
    font-size: 0.8rem;
}

.auth-brand-lockup {
    display: inline-flex;
    gap: 0.65rem;
    align-items: center;
    width: fit-content;
    color: var(--foreground);
}

.auth-brand-lockup .brand-full-logo {
    width: 12rem;
    height: 3.2rem;
}

.auth-brand-lockup strong,
.auth-brand-lockup small {
    display: block;
    line-height: 1.1;
}

.auth-brand-lockup strong {
    font-size: 0.9rem;
}

.auth-brand-lockup small {
    color: var(--primary);
    font-size: 0.62rem;
    font-weight: 850;
    letter-spacing: 0.08em;
}

.auth-form-copy {
    display: grid;
    gap: 0.35rem;
    max-width: 25rem;
}

.auth-eyebrow {
    color: var(--primary);
    font-size: 0.68rem;
    font-weight: 850;
    text-transform: uppercase;
}

.auth-form-copy h1 {
    margin: 0;
    font-size: clamp(1.75rem, 4vw, 2.65rem);
    letter-spacing: 0;
    line-height: 1.02;
}

.auth-form-copy p,
.auth-switch-copy,
.auth-advanced-access p {
    margin: 0;
    color: var(--muted-foreground);
    font-size: 0.82rem;
    line-height: 1.6;
}

.auth-minimal-form {
    display: grid;
    gap: 0.72rem;
    max-width: 25rem;
}

.auth-field {
    display: grid;
    gap: 0.32rem;
}

.auth-field > span:first-child {
    color: var(--foreground);
    font-size: 0.74rem;
    font-weight: 800;
}

.auth-field input {
    width: 100%;
    min-height: 2.8rem;
    border: 1px solid color-mix(in srgb, var(--border) 88%, var(--foreground));
    border-radius: 0.7rem;
    background: color-mix(in srgb, var(--card) 82%, transparent);
    color: var(--foreground);
    padding: 0.7rem 0.82rem;
    font: inherit;
    font-size: 0.86rem;
    transition: border-color var(--motion-fast), background var(--motion-fast), box-shadow var(--motion-fast), transform var(--motion-fast);
}

.auth-field input:hover {
    border-color: color-mix(in srgb, var(--primary) 24%, var(--border));
    background: var(--card);
}

.auth-field input:focus-visible {
    border-color: var(--ring);
    background: var(--card);
    box-shadow: 0 0 0 0.22rem color-mix(in srgb, var(--ring) 18%, transparent);
    outline: none;
    transform: translateY(-1px);
}

.auth-field small {
    color: var(--destructive);
    font-size: 0.72rem;
}

.auth-field-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.65rem;
    align-items: start;
}

.auth-utility-row {
    display: flex;
    flex-wrap: wrap;
    gap: 0.65rem;
    align-items: center;
    justify-content: space-between;
}

.auth-utility-row a,
.auth-switch-copy a,
.auth-advanced-access summary {
    color: var(--primary);
    cursor: pointer;
    font-size: 0.78rem;
    font-weight: 820;
}

.auth-check {
    display: inline-flex;
    gap: 0.45rem;
    align-items: center;
    color: var(--muted-foreground);
    cursor: pointer;
    font-size: 0.78rem;
    font-weight: 750;
}

.auth-check input {
    width: 1rem;
    height: 1rem;
    accent-color: var(--primary);
}

.auth-primary {
    min-height: 2.85rem;
    border-radius: 0.72rem;
    box-shadow: 0 0.65rem 1.2rem color-mix(in srgb, var(--primary) 20%, transparent);
}

.auth-primary:hover,
.auth-primary:focus-visible {
    transform: translateY(-1px);
}

.auth-provider-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.55rem;
}

.auth-provider-grid button,
.auth-provider-grid a,
.auth-role-chooser a {
    display: grid;
    place-items: center;
    min-height: 2.55rem;
    border: 1px solid color-mix(in srgb, var(--border) 84%, var(--foreground));
    border-radius: 0.72rem;
    background: color-mix(in srgb, var(--card) 70%, transparent);
    color: var(--foreground);
    cursor: pointer;
    font: inherit;
    font-size: 0.78rem;
    font-weight: 800;
    text-align: center;
    transition: border-color var(--motion-fast), background var(--motion-fast), box-shadow var(--motion-fast), transform var(--motion-fast), color var(--motion-fast);
}

.auth-provider-grid button:hover,
.auth-provider-grid button:focus-visible,
.auth-provider-grid a:hover,
.auth-provider-grid a:focus-visible,
.auth-role-chooser a:hover,
.auth-role-chooser a:focus-visible,
.auth-role-chooser a[aria-current="page"] {
    border-color: color-mix(in srgb, var(--primary) 34%, var(--border));
    background: color-mix(in srgb, var(--primary) 8%, var(--card));
    color: var(--foreground);
    box-shadow: var(--shadow-soft);
    outline: none;
    transform: translateY(-1px);
}

.auth-switch-copy {
    display: flex;
    flex-wrap: wrap;
    gap: 0.45rem;
    align-items: center;
    max-width: 25rem;
}

.auth-role-chooser {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.45rem;
    max-width: 25rem;
}

.auth-role-chooser a {
    display: grid;
    place-items: center;
    text-decoration: none;
}

.auth-stepper {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 0.35rem;
    max-width: 25rem;
}

.auth-stepper span {
    position: relative;
    overflow: hidden;
    border-radius: var(--radius-pill);
    background: color-mix(in srgb, var(--secondary) 50%, transparent);
    color: var(--muted-foreground);
    padding: 0.28rem 0.42rem;
    font-size: 0.66rem;
    font-weight: 850;
    text-align: center;
    white-space: nowrap;
}

.auth-stepper span[data-active="true"] {
    background: color-mix(in srgb, var(--primary) 13%, var(--secondary));
    color: var(--primary);
}

.auth-advanced-access {
    max-width: 25rem;
    border: 0;
    padding: 0;
}

.auth-advanced-access summary {
    width: fit-content;
    list-style: none;
}

.auth-advanced-access summary::-webkit-details-marker {
    display: none;
}

.auth-advanced-access p {
    margin-top: 0.35rem;
}

.auth-advanced-access .auth-field-grid {
    margin-top: 0.65rem;
}

.auth-showcase-pane {
    position: relative;
    display: grid;
    min-width: 0;
    overflow: hidden;
    border-left: 1px solid color-mix(in srgb, var(--border) 72%, transparent);
    background:
        radial-gradient(circle at 20% 18%, color-mix(in srgb, var(--primary) 18%, transparent), transparent 27rem),
        radial-gradient(circle at 78% 74%, color-mix(in srgb, var(--success) 16%, transparent), transparent 25rem),
        linear-gradient(135deg, color-mix(in srgb, var(--card) 72%, var(--background)), var(--background));
    padding: clamp(1rem, 4vw, 3rem);
}

.auth-showcase-canvas {
    position: relative;
    display: grid;
    place-items: center;
    min-height: 100%;
    perspective: 1200px;
}

.auth-device-frame {
    position: relative;
    z-index: 2;
    width: min(46rem, 92%);
    overflow: hidden;
    border: 1px solid color-mix(in srgb, var(--border) 68%, var(--primary));
    border-radius: 1.35rem;
    background: color-mix(in srgb, var(--card) 88%, transparent);
    box-shadow: 0 1.4rem 4rem color-mix(in srgb, var(--foreground) 14%, transparent), var(--shadow-elevated);
    transform: rotateX(4deg) rotateY(-7deg);
    animation: auth-device-float 9s ease-in-out infinite;
}

.auth-window-bar {
    display: flex;
    gap: 0.42rem;
    align-items: center;
    border-bottom: 1px solid var(--border);
    background: color-mix(in srgb, var(--secondary) 48%, var(--card));
    padding: 0.7rem 0.85rem;
}

.auth-window-bar span {
    width: 0.58rem;
    height: 0.58rem;
    border-radius: var(--radius-pill);
    background: var(--muted-foreground);
    opacity: 0.55;
}

.auth-window-bar strong {
    margin-left: 0.4rem;
    color: var(--muted-foreground);
    font-size: 0.72rem;
}

.auth-dashboard-preview {
    display: grid;
    gap: 0.9rem;
    padding: clamp(1rem, 3vw, 1.4rem);
}

.auth-preview-headerline {
    display: flex;
    gap: 0.7rem;
    align-items: center;
    justify-content: space-between;
}

.auth-preview-headerline span,
.auth-float-card span {
    color: var(--muted-foreground);
    font-size: 0.68rem;
    font-weight: 850;
    text-transform: uppercase;
}

.auth-preview-headerline strong {
    color: var(--primary);
    font-size: clamp(1.8rem, 4vw, 3rem);
    line-height: 1;
}

.auth-preview-metrics {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.65rem;
}

.auth-preview-metrics span,
.auth-activity span {
    display: grid;
    gap: 0.16rem;
    border: 1px solid color-mix(in srgb, var(--border) 78%, transparent);
    border-radius: 0.85rem;
    background: color-mix(in srgb, var(--background) 54%, transparent);
    padding: 0.7rem;
}

.auth-preview-metrics strong,
.auth-activity strong,
.auth-float-card strong {
    font-size: 0.84rem;
}

.auth-preview-metrics small,
.auth-activity small,
.auth-float-card small {
    color: var(--muted-foreground);
    font-size: 0.72rem;
    line-height: 1.4;
}

.auth-chart {
    display: flex;
    gap: 0.58rem;
    align-items: end;
    height: 10rem;
    border: 1px solid color-mix(in srgb, var(--border) 78%, transparent);
    border-radius: 1rem;
    background: linear-gradient(180deg, color-mix(in srgb, var(--secondary) 36%, transparent), color-mix(in srgb, var(--background) 54%, transparent));
    padding: 0.85rem;
}

.auth-chart span {
    flex: 1;
    min-width: 0.7rem;
    height: 68%;
    border-radius: var(--radius-pill) var(--radius-pill) 0.28rem 0.28rem;
    background: linear-gradient(180deg, var(--primary), color-mix(in srgb, var(--success) 64%, var(--primary)));
    box-shadow: 0 0.45rem 1rem color-mix(in srgb, var(--primary) 20%, transparent);
    animation: auth-bar-rise 4.8s ease-in-out infinite;
}

.auth-chart span:nth-child(2) {
    animation-delay: 220ms;
}

.auth-chart span:nth-child(3) {
    animation-delay: 420ms;
}

.auth-chart span:nth-child(4) {
    animation-delay: 640ms;
}

.auth-chart span:nth-child(5) {
    animation-delay: 820ms;
}

.auth-activity {
    display: grid;
    gap: 0.55rem;
}

.auth-login-experience .auth-showcase-pane {
    padding: clamp(4.25rem, 8vh, 5.25rem) clamp(1rem, 4vw, 2.5rem) clamp(1rem, 4vh, 2rem);
}

.auth-login-experience .auth-device-frame {
    width: min(39rem, 88%);
}

.auth-login-experience .auth-dashboard-preview {
    gap: 0.72rem;
    padding: clamp(0.85rem, 2vw, 1.15rem);
}

.auth-login-experience .auth-chart {
    height: 7.8rem;
}

.auth-login-experience .auth-activity span,
.auth-login-experience .auth-preview-metrics span {
    padding: 0.56rem;
}

.auth-login-experience .auth-float-card {
    width: min(14rem, 36%);
    padding: 0.68rem;
}

.auth-float-card {
    position: absolute;
    z-index: 3;
    display: grid;
    gap: 0.18rem;
    width: min(16rem, 42%);
    border: 1px solid color-mix(in srgb, var(--border) 72%, var(--primary));
    border-radius: 1rem;
    background: color-mix(in srgb, var(--card) 82%, transparent);
    padding: 0.8rem;
    box-shadow: 0 1rem 2.2rem color-mix(in srgb, var(--foreground) 13%, transparent), var(--shadow);
    backdrop-filter: blur(14px);
    animation: auth-card-drift 8s ease-in-out infinite;
}

.auth-float-ai {
    top: 12%;
    left: 4%;
}

.auth-float-students {
    right: 4%;
    bottom: 13%;
    animation-delay: 550ms;
}

.auth-float-institution {
    right: 10%;
    top: 10%;
    animation-delay: 1050ms;
}

@keyframes auth-device-float {
    0%,
    100% {
        transform: rotateX(4deg) rotateY(-7deg) translateY(0);
    }

    50% {
        transform: rotateX(2deg) rotateY(-4deg) translateY(-0.65rem);
    }
}

@keyframes auth-card-drift {
    0%,
    100% {
        transform: translate3d(0, 0, 0);
    }

    50% {
        transform: translate3d(0.35rem, -0.55rem, 0);
    }
}

@keyframes auth-bar-rise {
    0%,
    100% {
        transform: scaleY(0.92);
        transform-origin: bottom;
    }

    50% {
        transform: scaleY(1);
        transform-origin: bottom;
    }
}

.auth-links {
    display: flex;
    flex-wrap: wrap;
    gap: 0.45rem;
    margin-top: 0.15rem;
}

.auth-links a {
    border: 1px solid var(--border);
    border-radius: 999px;
    background: var(--card);
    padding: 0.3rem 0.65rem;
    color: var(--muted-foreground);
    font-size: 0.75rem;
    font-weight: 650;
    line-height: 1.2;
    transition: border-color var(--motion-fast), color var(--motion-fast), background var(--motion-fast), transform var(--motion-fast);
}

.auth-links a:hover,
.auth-links a:focus-visible {
    border-color: var(--ring);
    background: var(--accent);
    color: var(--foreground);
    outline: none;
    transform: translateY(-1px);
}

.form-card {
    max-width: 620px;
    justify-self: stretch;
}

.auth-card {
    align-self: center;
    width: 100%;
    border-color: color-mix(in srgb, var(--border) 82%, var(--primary));
    box-shadow: var(--shadow-soft);
}

.form-stack {
    display: grid;
    gap: 0.75rem;
    padding: 1rem;
}

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

.settings-section {
    display: grid;
    min-width: 0;
    margin: 0;
    border: 1px solid color-mix(in srgb, var(--border) 86%, var(--primary));
    border-radius: var(--radius);
    background: color-mix(in srgb, var(--muted) 36%, var(--card));
    padding: 0.75rem;
    gap: 0.65rem;
}

.settings-section legend {
    float: left;
    width: 100%;
    margin: 0 0 0.1rem;
    padding: 0;
    color: var(--muted-foreground);
    font-size: 0.68rem;
    font-weight: 800;
    letter-spacing: 0;
    text-transform: uppercase;
}

.settings-section > legend + * {
    clear: both;
}

.settings-section-save {
    align-items: center;
    background: var(--card);
}

.settings-section-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.45rem;
    align-items: center;
    justify-content: flex-end;
}

.settings-section-actions .muted {
    margin-right: auto;
}

.field {
    display: grid;
    gap: 0.3rem;
}

.field span {
    color: var(--foreground);
    font-size: 0.78rem;
    font-weight: 650;
}

.field input,
.field select,
.field textarea {
    width: 100%;
    min-height: 2.5rem;
    border: 1px solid var(--input);
    border-radius: 0.45rem;
    background: var(--background);
    color: var(--foreground);
    padding: 0.45rem 0.65rem;
    font: inherit;
    font-size: 0.86rem;
    transition: border-color var(--motion-fast), background var(--motion-fast), box-shadow var(--motion-fast);
}

input[type="search"]::-webkit-search-cancel-button {
    cursor: pointer;
}

.password-control {
    position: relative;
    display: inline-grid;
    min-width: 0;
}

.field .password-control {
    display: block;
    width: 100%;
    color: inherit;
    font: inherit;
}

.password-control input {
    padding-right: 2.65rem;
}

.password-toggle {
    position: absolute;
    top: 50%;
    right: 0.35rem;
    display: grid;
    width: 1.85rem;
    height: 1.85rem;
    place-items: center;
    border: 1px solid transparent;
    border-radius: 0.4rem;
    background: transparent;
    color: var(--muted-foreground);
    cursor: pointer;
    transform: translateY(-50%);
    transition: border-color var(--motion-fast), background var(--motion-fast), color var(--motion-fast), box-shadow var(--motion-fast);
}

.password-toggle:hover,
.password-toggle:focus-visible {
    border-color: color-mix(in srgb, var(--ring) 34%, var(--border));
    background: var(--accent);
    color: var(--foreground);
    outline: none;
    box-shadow: 0 0 0 2px color-mix(in srgb, var(--ring) 16%, transparent);
}

.password-toggle[aria-pressed="true"] {
    border-color: color-mix(in srgb, var(--primary) 36%, var(--border));
    background: color-mix(in srgb, var(--primary) 9%, var(--card));
    color: var(--primary);
}

.password-toggle svg {
    width: 1rem;
    height: 1rem;
}

.field input:focus,
.field select:focus,
.field textarea:focus {
    border-color: var(--ring);
    outline: 2px solid color-mix(in srgb, var(--ring) 28%, transparent);
    outline-offset: 1px;
}

.field input:hover,
.field select:hover,
.field textarea:hover {
    border-color: color-mix(in srgb, var(--ring) 32%, var(--input));
}

.field input[aria-invalid="true"],
.field select[aria-invalid="true"],
.field textarea[aria-invalid="true"] {
    border-color: color-mix(in srgb, var(--destructive) 72%, var(--input));
    background: color-mix(in srgb, var(--destructive) 5%, var(--background));
    box-shadow: 0 0 0 1px color-mix(in srgb, var(--destructive) 12%, transparent);
}

.field[data-field-state="valid"] input:not([aria-invalid="true"]),
.field[data-field-state="valid"] select:not([aria-invalid="true"]),
.field[data-field-state="valid"] textarea:not([aria-invalid="true"]) {
    border-color: color-mix(in srgb, var(--success) 42%, var(--input));
    background: color-mix(in srgb, var(--success-bg) 18%, var(--background));
}

.field textarea {
    min-height: 7rem;
    resize: vertical;
}

.field small {
    display: inline-flex;
    gap: 0.35rem;
    align-items: flex-start;
    color: var(--destructive);
    font-size: 0.74rem;
}

.field > small:not(.upload-help):not(.muted)::before,
.field-error::before,
.field-error-wide::before {
    flex: 0 0 auto;
    width: 0.35rem;
    height: 0.35rem;
    margin-top: 0.42rem;
    border-radius: 999px;
    background: currentColor;
    content: "";
}

.field-validation-hint[hidden] {
    display: none;
}

:where(.field, .auth-field, .support-field) {
    display: grid;
    gap: 0.34rem;
    align-content: start;
}

:where(.field, .auth-field, .support-field) > :where(span, label):first-child {
    color: var(--foreground);
    font-size: 0.78rem;
    font-weight: 720;
    line-height: 1.25;
}

.required-indicator {
    display: inline-block;
    margin-left: 0.12rem;
    color: var(--destructive);
    font-size: 0.68em;
    font-weight: 850;
    line-height: 0;
    vertical-align: super;
}

:where(.field, .auth-field, .support-field) :where(input, select, textarea),
:where(.reference-newsletter, .support-newsletter, .resources-newsletter) input {
    width: 100%;
    min-height: 2.5rem;
    border: 1px solid var(--input);
    border-radius: 0.45rem;
    background: var(--background);
    color: var(--foreground);
    padding: 0.48rem 0.68rem;
    font: inherit;
    font-size: 0.86rem;
    line-height: 1.35;
    transition: border-color var(--motion-fast), background var(--motion-fast), box-shadow var(--motion-fast), opacity var(--motion-fast);
}

:where(.field, .auth-field, .support-field) :where(input, select, textarea):hover,
:where(.reference-newsletter, .support-newsletter, .resources-newsletter) input:hover {
    border-color: color-mix(in srgb, var(--ring) 32%, var(--input));
}

:where(.field, .auth-field, .support-field) :where(input, select, textarea):focus,
:where(.field, .auth-field, .support-field) :where(input, select, textarea):focus-visible,
:where(.reference-newsletter, .support-newsletter, .resources-newsletter) input:focus,
:where(.reference-newsletter, .support-newsletter, .resources-newsletter) input:focus-visible {
    border-color: var(--ring);
    outline: 2px solid color-mix(in srgb, var(--ring) 28%, transparent);
    outline-offset: 1px;
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--ring) 12%, transparent);
}

:where(.field, .auth-field, .support-field) :where(input, select, textarea):disabled,
:where(.reference-newsletter, .support-newsletter, .resources-newsletter) input:disabled {
    cursor: not-allowed;
    opacity: 0.62;
}

:where(.field, .auth-field, .support-field) :where(input, select, textarea)[aria-invalid="true"],
:where(.reference-newsletter, .support-newsletter, .resources-newsletter) input[aria-invalid="true"] {
    border-color: color-mix(in srgb, var(--destructive) 72%, var(--input));
    background: color-mix(in srgb, var(--destructive) 5%, var(--background));
    box-shadow: 0 0 0 1px color-mix(in srgb, var(--destructive) 12%, transparent);
}

:where(.field, .auth-field, .support-field)[data-field-state="valid"] :where(input, select, textarea):not([aria-invalid="true"]) {
    border-color: color-mix(in srgb, var(--success) 42%, var(--input));
    background: color-mix(in srgb, var(--success-bg) 18%, var(--background));
}

:where(.field, .auth-field, .support-field) :where(small, .field-error),
.form-error-summary {
    color: var(--destructive);
    font-size: 0.74rem;
}

:where(.field, .auth-field, .support-field) > small:not(.muted),
.field-error {
    display: inline-flex;
    gap: 0.35rem;
    align-items: flex-start;
}

:where(.field, .auth-field, .support-field) > small:not(.muted)::before,
.field-error::before {
    flex: 0 0 auto;
    width: 0.35rem;
    height: 0.35rem;
    margin-top: 0.42rem;
    border-radius: 999px;
    background: currentColor;
    content: "";
}

.field-character-counter {
    justify-self: end;
    color: var(--muted-foreground);
}

.password-strength-meter {
    display: grid;
    grid-template-columns: minmax(4.5rem, 1fr) auto;
    gap: 0.5rem;
    align-items: center;
    color: var(--muted-foreground);
}

.password-strength-meter span {
    display: block;
    height: 0.32rem;
    overflow: hidden;
    border-radius: var(--radius-pill);
    background: color-mix(in srgb, var(--border) 72%, transparent);
}

.password-strength-meter i {
    display: block;
    width: 0%;
    height: 100%;
    border-radius: inherit;
    background: var(--warning);
    transition: width var(--motion-default), background var(--motion-fast);
}

.password-strength-meter[data-score="1"] i {
    width: 28%;
    background: var(--destructive);
}

.password-strength-meter[data-score="3"] i {
    width: 72%;
    background: var(--warning);
}

.password-strength-meter[data-score="4"] i {
    width: 100%;
    background: var(--success);
}

.form-error-summary {
    display: grid;
    gap: 0.35rem;
    border: 1px solid color-mix(in srgb, var(--destructive) 38%, var(--border));
    border-radius: var(--radius);
    background: color-mix(in srgb, var(--destructive) 7%, var(--card));
    padding: 0.65rem 0.75rem;
}

.form-error-summary[hidden] {
    display: none;
}

.form-error-summary strong {
    color: var(--foreground);
    font-size: 0.8rem;
}

.form-error-summary ul {
    display: grid;
    gap: 0.2rem;
    margin: 0;
    padding-left: 1rem;
}

.button[data-loading="true"] {
    pointer-events: none;
}

.button[data-loading="true"],
button[data-loading="true"] {
    display: inline-flex;
    gap: 0.5rem;
    align-items: center;
    justify-content: center;
}

.button-spinner {
    width: 0.9rem;
    height: 0.9rem;
    border: 2px solid currentColor;
    border-right-color: transparent;
    border-radius: 999px;
    animation: evalat-spin 720ms linear infinite;
}

.hp-field {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    overflow: hidden !important;
    clip: rect(0 0 0 0) !important;
    white-space: nowrap !important;
}

@keyframes evalat-spin {
    to {
        transform: rotate(360deg);
    }
}

.alert {
    display: grid;
    grid-template-columns: 0.45rem minmax(0, 1fr);
    gap: 0.55rem;
    align-items: start;
    margin: 0.75rem 1rem 0;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--muted);
    color: var(--foreground);
    padding: 0.65rem 0.75rem;
    font-size: 0.82rem;
}

.alert::before {
    width: 0.45rem;
    height: 0.45rem;
    margin-top: 0.33rem;
    border-radius: 999px;
    background: var(--muted-foreground);
    content: "";
}

.alert-success {
    border-color: color-mix(in srgb, var(--success) 38%, var(--border));
    background: var(--success-bg);
    color: var(--success);
}

.alert-success::before {
    background: var(--success);
}

.alert-error {
    border-color: color-mix(in srgb, var(--destructive) 38%, var(--border));
    background: color-mix(in srgb, var(--destructive) 12%, var(--card));
    color: var(--destructive);
}

.alert-error::before {
    background: var(--destructive);
}

.inline-form {
    margin-top: 1rem;
}

.row-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
}

.workspace-frame {
    display: grid;
    grid-template-columns: 16rem minmax(0, 1fr);
    max-width: 100vw;
    min-height: 100vh;
    overflow-x: hidden;
    transition: grid-template-columns var(--motion-default);
}

.workspace-sidebar {
    position: sticky;
    top: 0;
    display: grid;
    grid-template-rows: auto auto minmax(0, 1fr) auto;
    height: 100vh;
    overflow: hidden;
    border-right: 1px solid var(--border);
    background: linear-gradient(180deg, var(--card), color-mix(in srgb, var(--secondary) 34%, var(--card)));
    padding: 0.75rem;
}

.workspace-pinned {
    display: grid;
    gap: 0.2rem;
    margin-bottom: 0.65rem;
    border-bottom: 1px solid var(--border);
    padding-bottom: 0.65rem;
}

.workspace-pinned h2 {
    margin: 0.15rem 0.45rem;
    color: var(--muted-foreground);
    font-size: 0.68rem;
    font-weight: 750;
    text-transform: uppercase;
}

.workspace-pinned-list {
    display: grid;
    gap: 0.2rem;
}

.workspace-brand {
    position: sticky;
    top: 0;
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    flex-wrap: wrap;
    gap: 0.1rem 0.55rem;
    width: 100%;
    min-height: 3.45rem;
    margin-bottom: 0.7rem;
    background: var(--card);
}

.workspace-brand .brand-full-logo {
    width: 12.2rem;
    height: 3.25rem;
}

.workspace-brand .brand-mark {
    display: none;
    flex: 0 0 auto;
}

.workspace-brand-meta {
    display: block;
    flex: 1 1 100%;
    min-width: 0;
    padding-left: 0.18rem;
}

.workspace-brand-meta small {
    overflow: hidden;
    display: block;
    color: var(--muted-foreground);
    font-size: 0.72rem;
    line-height: 1.15;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.workspace-nav {
    display: grid;
    align-self: stretch;
    align-content: start;
    gap: 0.65rem;
    min-height: 0;
    max-height: 100%;
    overflow-y: auto;
    overscroll-behavior: contain;
    padding-right: 0.15rem;
    scrollbar-gutter: stable;
    -webkit-overflow-scrolling: touch;
}

.workspace-nav-group {
    display: grid;
    gap: 0.2rem;
}

.workspace-nav-group h2 {
    margin: 0.45rem 0.45rem 0.15rem;
    color: var(--muted-foreground);
    font-size: 0.68rem;
    font-weight: 750;
    letter-spacing: 0;
    text-transform: uppercase;
}

.workspace-nav-item {
    display: flex;
    gap: 0.55rem;
    align-items: center;
    min-height: 2.15rem;
    border: 1px solid transparent;
    border-radius: 0.45rem;
    padding: 0.35rem 0.45rem;
    color: var(--muted-foreground);
    font-size: 0.82rem;
    font-weight: 600;
    transition: background var(--motion-fast), border-color var(--motion-fast), color var(--motion-fast), transform var(--motion-fast);
}

.workspace-nav-item svg {
    flex: 0 0 auto;
}

.workspace-nav-item:hover,
.workspace-nav-item:focus-visible,
.workspace-nav-item[aria-current="page"] {
    background: var(--secondary);
    color: var(--foreground);
    outline: none;
}

.workspace-nav-item:hover,
.workspace-nav-item:focus-visible {
    transform: translateX(1px);
}

.workspace-nav-item[aria-current="page"] {
    border-color: color-mix(in srgb, var(--primary) 30%, var(--border));
    box-shadow: inset 0.18rem 0 0 var(--primary);
}

.workspace-nav-form {
    display: block;
    margin: 0;
}

.workspace-nav-button {
    width: 100%;
    cursor: pointer;
    appearance: none;
    background: transparent;
    font: inherit;
    text-align: left;
}

.workspace-sidebar-footer {
    position: sticky;
    bottom: 0;
    z-index: 2;
    display: flex;
    flex-wrap: wrap;
    align-self: end;
    justify-content: flex-start;
    gap: 0.35rem;
    width: 100%;
    margin-top: 0.75rem;
    padding-top: 0.75rem;
    border-top: 1px solid var(--border);
    background: color-mix(in srgb, var(--secondary) 34%, var(--card));
}

.workspace-operator {
    display: grid;
    grid-template-columns: 2rem minmax(0, 1fr) auto;
    gap: 0.6rem;
    align-items: center;
    width: 100%;
    min-width: 0;
    border-radius: 0.45rem;
    padding: 0.35rem;
    color: inherit;
    transition: background var(--motion-fast), color var(--motion-fast);
}

.workspace-operator:hover,
.workspace-operator:focus-visible {
    background: var(--secondary);
    outline: none;
}

.workspace-operator-avatar {
    display: grid;
    place-items: center;
    width: 2rem;
    height: 2rem;
    border: 1px solid color-mix(in srgb, var(--primary) 32%, var(--border));
    border-radius: 0.4rem;
    background: color-mix(in srgb, var(--primary) 10%, var(--card));
    color: var(--primary);
    font-size: 0.76rem;
    font-weight: 850;
}

.workspace-operator-copy {
    display: grid;
    gap: 0.08rem;
    min-width: 0;
}

.workspace-operator-copy strong,
.workspace-operator-copy small {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.workspace-operator-copy strong {
    color: var(--foreground);
    font-size: 0.78rem;
    line-height: 1.2;
}

.workspace-operator-copy small {
    color: var(--muted-foreground);
    font-size: 0.66rem;
}

.workspace-operator-status {
    width: 0.48rem;
    height: 0.48rem;
    border-radius: 999px;
    background: var(--success);
    box-shadow: 0 0 0 0.18rem color-mix(in srgb, var(--success) 14%, transparent);
}

.workspace-role-super-admin .workspace-frame {
    grid-template-columns: 17rem minmax(0, 1fr);
}

.workspace-role-super-admin .workspace-sidebar {
    border-right-color: color-mix(in srgb, var(--border) 82%, var(--foreground));
    background: var(--card);
}

.workspace-role-super-admin .workspace-brand {
    margin-bottom: 0.35rem;
    border-bottom: 1px solid var(--border);
    padding-bottom: 0.6rem;
}

.workspace-role-super-admin .workspace-brand-meta small {
    color: var(--primary);
    font-size: 0.65rem;
    font-weight: 800;
    text-transform: uppercase;
}

.workspace-role-super-admin .workspace-nav {
    gap: 0.35rem;
    padding-block: 0.15rem 0.75rem;
}

.workspace-role-super-admin .workspace-nav-group {
    gap: 0.12rem;
}

.workspace-role-super-admin .workspace-nav-group h2 {
    margin-top: 0.7rem;
    font-size: 0.61rem;
    font-weight: 850;
}

.workspace-role-super-admin .workspace-nav-item {
    min-height: 2rem;
    border-radius: 0.38rem;
    padding-inline: 0.5rem;
    font-size: 0.78rem;
}

.workspace-role-super-admin .workspace-nav-item svg {
    width: 1rem;
    height: 1rem;
}

.workspace-role-super-admin .workspace-nav-item:hover,
.workspace-role-super-admin .workspace-nav-item:focus-visible {
    transform: none;
}

.workspace-role-super-admin .workspace-nav-item[aria-current="page"] {
    border-color: color-mix(in srgb, var(--primary) 24%, var(--border));
    background: color-mix(in srgb, var(--primary) 9%, var(--card));
    color: var(--primary);
    box-shadow: inset 0.16rem 0 0 var(--primary);
}

.workspace-role-super-admin .workspace-sidebar-footer {
    background: var(--card);
}

.workspace-role-super-admin .workspace-main {
    background: color-mix(in srgb, var(--background) 88%, var(--secondary));
}

.workspace-role-super-admin .workspace-header {
    min-height: 3.75rem;
    background: color-mix(in srgb, var(--card) 96%, transparent);
}

.workspace-role-super-admin .workspace-content {
    width: min(1600px, 100%);
    padding: 1.1rem clamp(0.85rem, 2vw, 1.5rem) 1.5rem;
}

.workspace-main {
    min-width: 0;
    max-width: 100vw;
    overflow-x: hidden;
}

.workspace-header {
    position: sticky;
    top: 0;
    z-index: 30;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    min-height: 3.5rem;
    padding: max(0.55rem, env(safe-area-inset-top)) max(1rem, env(safe-area-inset-right)) 0.55rem max(1rem, env(safe-area-inset-left));
    border-bottom: 1px solid var(--border);
    background: color-mix(in srgb, var(--background) 94%, transparent);
    backdrop-filter: blur(10px);
}

.workspace-header-left,
.workspace-actions {
    display: flex;
    align-items: center;
    gap: 0.7rem;
    min-width: 0;
}

.workspace-actions > *,
.workspace-actions .logout-form,
.workspace-actions > .theme-control {
    display: inline-flex;
    align-items: center;
}

.workspace-actions > .workspace-os-shell,
.workspace-actions > .workflow-actions-shell,
.workspace-actions > .notification-popover-shell,
.workspace-actions > .icon-button,
.workspace-actions > .counter-button,
.workspace-actions > .theme-control,
.workspace-actions > .logout-form {
    flex: 0 0 2rem;
    justify-content: center;
    width: 2rem;
}

.workspace-actions > .icon-button,
.workspace-actions > .workspace-os-shell > .icon-button,
.workspace-actions > .workflow-actions-shell > .icon-button,
.workspace-actions > .notification-popover-shell > .icon-button,
.workspace-actions > .theme-control > .theme-toggle-button,
.workspace-actions > .logout-form > .icon-button {
    width: 2rem;
    height: 2rem;
    min-width: 2rem;
    min-height: 2rem;
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
    padding: 0;
    color: var(--muted-foreground);
}

.workspace-actions > .icon-button:hover,
.workspace-actions > .icon-button:focus-visible,
.workspace-actions > .icon-button.is-active,
.workspace-actions > .workspace-os-shell > .icon-button:hover,
.workspace-actions > .workspace-os-shell > .icon-button:focus-visible,
.workspace-actions > .workspace-os-shell > .icon-button.is-active,
.workspace-actions > .workflow-actions-shell > .icon-button:hover,
.workspace-actions > .workflow-actions-shell > .icon-button:focus-visible,
.workspace-actions > .workflow-actions-shell > .icon-button.is-active,
.workspace-actions > .notification-popover-shell > .icon-button:hover,
.workspace-actions > .notification-popover-shell > .icon-button:focus-visible,
.workspace-actions > .notification-popover-shell > .icon-button.is-active,
.workspace-actions > .theme-control > .theme-toggle-button:hover,
.workspace-actions > .theme-control > .theme-toggle-button:focus-visible,
.workspace-actions > .theme-control > .theme-toggle-button.is-active,
.workspace-actions > .logout-form > .icon-button:hover,
.workspace-actions > .logout-form > .icon-button:focus-visible,
.workspace-actions > .logout-form > .icon-button.is-active {
    background: transparent;
    color: var(--foreground);
    box-shadow: none;
}

.workspace-actions > .icon-button:focus-visible,
.workspace-actions > .workspace-os-shell > .icon-button:focus-visible,
.workspace-actions > .workflow-actions-shell > .icon-button:focus-visible,
.workspace-actions > .notification-popover-shell > .icon-button:focus-visible,
.workspace-actions > .theme-control > .theme-toggle-button:focus-visible,
.workspace-actions > .logout-form > .icon-button:focus-visible {
    outline: 2px solid color-mix(in srgb, var(--ring) 54%, transparent);
    outline-offset: 0.2rem;
}

.workspace-actions > .icon-button svg,
.workspace-actions > .workspace-os-shell > .icon-button svg,
.workspace-actions > .workflow-actions-shell > .icon-button svg,
.workspace-actions > .notification-popover-shell > .icon-button svg,
.workspace-actions > .theme-control > .theme-toggle-button svg,
.workspace-actions > .logout-form > .icon-button svg {
    display: block;
    width: 1.15rem;
    height: 1.15rem;
}

.workspace-actions > .notification-popover-shell > .counter-button > svg,
.workspace-actions > .counter-button > svg {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

.workspace-actions > .notification-popover-shell > .counter-button > span,
.workspace-actions > .counter-button > span {
    top: auto;
    right: 0;
    bottom: 0;
    z-index: 2;
    min-width: 0.92rem;
    height: 0.92rem;
    border-width: 2px;
    padding: 0 0.14rem;
    font-size: 0.55rem;
    line-height: 1;
    transform: none;
}

.workspace-actions > .theme-control {
    border: 0;
    border-radius: 0;
    background: transparent;
    padding: 0;
}

.workspace-title-stack {
    display: grid;
    gap: 0.15rem;
    min-width: 0;
}

.workspace-breadcrumb {
    display: flex;
    flex-wrap: wrap;
    gap: 0.22rem;
    align-items: center;
    color: var(--muted-foreground);
    font-size: 0.68rem;
    font-weight: 700;
}

.workspace-breadcrumb a:hover,
.workspace-breadcrumb a:focus-visible {
    color: var(--foreground);
    outline: none;
}

.workspace-header h1 {
    margin: 0;
    font-size: 0.98rem;
    line-height: 1.1;
}

.workspace-kicker {
    color: var(--muted-foreground);
    font-size: 0.68rem;
    font-weight: 700;
    text-transform: capitalize;
}

.counter-button {
    position: relative;
}

.counter-button span {
    position: absolute;
    top: -0.35rem;
    right: -0.35rem;
    display: grid;
    place-items: center;
    min-width: 1rem;
    height: 1rem;
    border: 1px solid var(--card);
    border-radius: 999px;
    background: var(--primary);
    color: var(--primary-foreground);
    padding: 0 0.2rem;
    font-size: 0.62rem;
    font-weight: 800;
}

.counter-button span[data-empty="true"] {
    opacity: 0;
    transform: scale(0.78);
}

.notification-popover-shell {
    display: inline-flex;
}

.notification-popover {
    position: fixed;
    top: calc(max(0.55rem, env(safe-area-inset-top)) + 3.35rem);
    right: max(1rem, env(safe-area-inset-right));
    z-index: 95;
    display: grid;
    width: min(24rem, calc(100vw - 1rem));
    max-height: min(34rem, calc(100vh - 5rem));
    overflow: hidden;
    border: 1px solid color-mix(in srgb, var(--border) 86%, var(--foreground));
    border-radius: calc(var(--radius) - 0.08rem);
    background: color-mix(in srgb, var(--card) 98%, var(--background));
    color: var(--foreground);
    box-shadow: var(--shadow-elevated);
}

.notification-popover[hidden] {
    display: none;
}

.notification-popover-header,
.notification-popover-footer {
    display: flex;
    gap: 0.75rem;
    align-items: center;
    justify-content: space-between;
    padding: 0.85rem 0.95rem;
}

.notification-popover-header {
    border-bottom: 1px solid var(--border);
}

.notification-popover-header h2 {
    margin: 0;
    font-size: 0.88rem;
    line-height: 1.2;
}

.notification-popover-header p {
    margin: 0.18rem 0 0;
    color: var(--muted-foreground);
    font-size: 0.72rem;
    font-weight: 650;
}

.notification-mark-all {
    flex: 0 0 auto;
    width: 1.85rem;
    height: 1.85rem;
}

.notification-popover-list {
    display: grid;
    max-height: min(25rem, calc(100vh - 12rem));
    overflow-y: auto;
    scrollbar-color: color-mix(in srgb, var(--muted-foreground) 36%, transparent) transparent;
    scrollbar-width: thin;
}

.notification-popover-item {
    position: relative;
    display: grid;
    gap: 0.55rem;
    padding: 0.82rem 2.75rem 0.82rem 0.95rem;
    border-bottom: 1px solid color-mix(in srgb, var(--border) 78%, transparent);
    transition: background var(--motion-fast), box-shadow var(--motion-fast);
}

.notification-popover-item:hover,
.notification-popover-item:focus-within {
    background: color-mix(in srgb, var(--accent) 76%, var(--card));
}

.notification-popover-item[data-unread="true"] {
    box-shadow: inset 3px 0 0 var(--primary);
}

.notification-popover-item[data-unread="true"]::before {
    position: absolute;
    top: 0.9rem;
    right: 0.9rem;
    width: 0.45rem;
    height: 0.45rem;
    border-radius: 999px;
    background: var(--primary);
    content: "";
}

.notification-popover-item-copy {
    display: grid;
    gap: 0.28rem;
    min-width: 0;
}

.notification-popover-item h3 {
    margin: 0;
    font-size: 0.82rem;
    line-height: 1.25;
}

.notification-popover-item p {
    margin: 0;
    color: var(--muted-foreground);
    font-size: 0.76rem;
    line-height: 1.45;
}

.notification-popover-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
    align-items: center;
    color: var(--muted-foreground);
    font-size: 0.68rem;
    font-weight: 700;
    text-transform: capitalize;
}

.notification-popover-read {
    position: absolute;
    top: 0.65rem;
    right: 0.7rem;
    width: 1.75rem;
    height: 1.75rem;
    border-color: color-mix(in srgb, var(--primary) 30%, var(--border));
    color: var(--primary);
}

.notification-popover-read svg,
.notification-mark-all svg {
    width: 0.95rem;
    height: 0.95rem;
}

.notification-popover-action {
    width: fit-content;
    border: 1px solid var(--border);
    border-radius: 999px;
    background: var(--secondary);
    color: var(--secondary-foreground);
    padding: 0.18rem 0.55rem;
    font-size: 0.72rem;
    font-weight: 750;
    text-decoration: none;
    transition: background var(--motion-fast), border-color var(--motion-fast), color var(--motion-fast);
}

.notification-popover-action:hover,
.notification-popover-action:focus-visible {
    border-color: color-mix(in srgb, var(--primary) 35%, var(--border));
    background: color-mix(in srgb, var(--primary) 10%, var(--secondary));
    color: var(--foreground);
    outline: none;
}

.notification-popover-footer {
    border-top: 1px solid var(--border);
    justify-content: center;
}

.notification-popover-empty {
    display: grid;
    gap: 0.25rem;
    justify-items: center;
    padding: 1.5rem 1rem;
    color: var(--muted-foreground);
    text-align: center;
}

.notification-popover-empty strong {
    color: var(--foreground);
    font-size: 0.86rem;
}

.notification-popover-empty span {
    font-size: 0.76rem;
}

.notification-popover-shell[data-loading="true"] .notification-popover-list {
    opacity: 0.58;
}

.workspace-os-shell {
    display: inline-flex;
}

.workspace-os-panel {
    position: fixed;
    top: calc(max(0.55rem, env(safe-area-inset-top)) + 3.35rem);
    right: max(1rem, env(safe-area-inset-right));
    z-index: 92;
    display: grid;
    width: min(43rem, calc(100vw - 1rem));
    max-height: min(42rem, calc(100dvh - 5rem));
    overflow: hidden;
    border: 1px solid color-mix(in srgb, var(--border) 86%, var(--foreground));
    border-radius: calc(var(--radius) - 0.08rem);
    background: color-mix(in srgb, var(--card) 98%, var(--background));
    color: var(--foreground);
    box-shadow: var(--shadow-elevated);
}

.workspace-os-panel[hidden] {
    display: none;
}

.workspace-os-header,
.workspace-os-footer {
    display: flex;
    gap: 0.75rem;
    align-items: center;
    justify-content: space-between;
    padding: 0.9rem 1rem;
}

.workspace-os-header {
    border-bottom: 1px solid var(--border);
}

.workspace-os-header h2 {
    margin: 0.15rem 0 0;
    font-size: 0.94rem;
    line-height: 1.2;
}

.workspace-os-header p {
    margin: 0.18rem 0 0;
    color: var(--muted-foreground);
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: capitalize;
}

.workspace-os-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0;
    overflow-y: auto;
}

.workspace-os-section {
    display: grid;
    align-content: start;
    gap: 0.65rem;
    min-height: 15rem;
    border-right: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
    padding: 0.85rem;
}

.workspace-os-section:nth-child(2n) {
    border-right: 0;
}

.workspace-os-section-header {
    display: flex;
    gap: 0.65rem;
    align-items: center;
    justify-content: space-between;
}

.workspace-os-section-header h3 {
    margin: 0;
    font-size: 0.78rem;
    font-weight: 850;
}

.workspace-os-list {
    display: grid;
    gap: 0.45rem;
}

.workspace-os-item,
.workspace-os-empty {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    gap: 0.55rem;
    align-items: start;
    min-height: 3.6rem;
    border: 1px solid color-mix(in srgb, var(--border) 82%, transparent);
    border-radius: var(--radius-md);
    background: color-mix(in srgb, var(--secondary) 35%, var(--card));
    color: var(--foreground);
    padding: 0.55rem;
    text-align: left;
    text-decoration: none;
    transition: transform var(--motion-fast), border-color var(--motion-fast), background var(--motion-fast), box-shadow var(--motion-fast);
}

.workspace-os-item {
    cursor: pointer;
}

.workspace-os-item:hover,
.workspace-os-item:focus-visible {
    border-color: color-mix(in srgb, var(--primary) 36%, var(--border));
    background: color-mix(in srgb, var(--accent) 46%, var(--card));
    box-shadow: var(--shadow-soft);
    outline: none;
    transform: translateY(-1px);
}

.workspace-os-item[data-state="warning"] {
    border-color: color-mix(in srgb, var(--warning) 36%, var(--border));
}

.workspace-os-item[data-state="recommended"] {
    border-color: color-mix(in srgb, var(--primary) 28%, var(--border));
    background: color-mix(in srgb, var(--primary) 7%, var(--card));
}

.workspace-os-item-icon {
    display: grid;
    place-items: center;
    width: 1.65rem;
    height: 1.65rem;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    background: var(--card);
    color: var(--primary);
}

.workspace-os-item-icon:empty {
    display: none;
}

.workspace-os-item-icon svg {
    width: 0.95rem;
    height: 0.95rem;
}

.workspace-os-item span:last-child,
.workspace-os-empty {
    min-width: 0;
}

.workspace-os-item strong,
.workspace-os-empty strong {
    display: block;
    overflow: hidden;
    font-size: 0.79rem;
    line-height: 1.25;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.workspace-os-item small,
.workspace-os-empty small {
    display: -webkit-box;
    overflow: hidden;
    margin-top: 0.12rem;
    color: var(--muted-foreground);
    font-size: 0.7rem;
    line-height: 1.35;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
}

.workspace-os-empty {
    grid-template-columns: 1fr;
    cursor: default;
}

.workspace-os-footer {
    border-top: 1px solid var(--border);
    background: color-mix(in srgb, var(--secondary) 34%, transparent);
}

.workspace-os-footer span {
    display: grid;
    gap: 0.08rem;
    min-width: 0;
}

.workspace-os-footer strong {
    overflow: hidden;
    font-size: 0.77rem;
    line-height: 1.15;
    text-overflow: ellipsis;
    text-transform: capitalize;
    white-space: nowrap;
}

.workspace-os-footer small {
    color: var(--muted-foreground);
    font-size: 0.66rem;
    font-weight: 800;
    text-transform: uppercase;
}

.workspace-os-shell[data-loading="true"] .workspace-os-section:nth-child(3) .workspace-os-list {
    opacity: 0.62;
}

.logout-form {
    margin: 0;
}

.command-trigger {
    display: inline-flex;
    gap: 0.45rem;
    align-items: center;
    min-width: 9rem;
    height: 1.9rem;
    border: 1px solid var(--border);
    border-radius: 0.45rem;
    background: var(--card);
    color: var(--muted-foreground);
    padding: 0 0.55rem;
    cursor: pointer;
    font-size: 0.78rem;
    font-weight: 700;
    transition: background var(--motion-fast), border-color var(--motion-fast), color var(--motion-fast), box-shadow var(--motion-fast);
}

.command-trigger:hover,
.command-trigger:focus-visible {
    border-color: color-mix(in srgb, var(--primary) 35%, var(--border));
    background: var(--secondary);
    color: var(--foreground);
    outline: none;
}

.command-palette-backdrop {
    position: fixed;
    inset: 0;
    z-index: 70;
    background: rgba(15, 23, 42, 0.32);
    backdrop-filter: blur(3px);
}

.command-palette-open {
    overflow: hidden;
}

.command-palette {
    position: fixed;
    top: max(4.25rem, calc(env(safe-area-inset-top) + 1rem));
    left: 50%;
    z-index: 75;
    display: grid;
    grid-template-rows: auto minmax(0, 1fr);
    width: min(40rem, calc(100vw - 2rem));
    height: min(42rem, calc(100dvh - 6rem));
    max-height: min(42rem, calc(100dvh - 6rem));
    overflow: hidden;
    transform: translateX(-50%);
    border: 1px solid var(--border);
    border-radius: 0.65rem;
    background: var(--popover);
    color: var(--popover-foreground);
    box-shadow: var(--shadow-elevated);
}

.command-palette[hidden],
.command-palette-backdrop[hidden] {
    display: none;
}

.command-palette-header {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    gap: 0.65rem;
    align-items: center;
    border-bottom: 1px solid var(--border);
    padding: 0.75rem;
}

.command-palette-header input {
    width: 100%;
    border: 0;
    background: transparent;
    color: var(--foreground);
    font: inherit;
    font-size: 0.92rem;
    outline: none;
}

.command-palette-body {
    display: grid;
    gap: 0.75rem;
    min-height: 0;
    overflow-y: auto;
    overscroll-behavior: contain;
    padding: 0.75rem;
    scrollbar-gutter: stable;
}

.command-section {
    display: grid;
    gap: 0.35rem;
}

.command-section[hidden] {
    display: none;
}

.command-section h2 {
    margin: 0;
    color: var(--muted-foreground);
    font-size: 0.68rem;
    font-weight: 800;
    text-transform: uppercase;
}

.command-list {
    display: grid;
    gap: 0.28rem;
}

.command-item {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 0.35rem;
    align-items: center;
    border: 1px solid transparent;
    border-radius: 0.5rem;
    padding: 0.2rem;
}

.command-item:hover,
.command-item:focus-within,
.command-item[data-command-active="true"] {
    border-color: var(--border);
    background: var(--secondary);
}

.command-item[data-command-active="true"] {
    box-shadow: inset 3px 0 0 var(--primary);
}

.command-item[data-command-active="true"] .command-item-icon {
    border-color: color-mix(in srgb, var(--primary) 34%, var(--border));
    background: color-mix(in srgb, var(--primary) 10%, var(--card));
}

.command-item[hidden] {
    display: none;
}

.command-item-link {
    display: grid;
    grid-template-columns: 1.75rem minmax(0, 1fr);
    gap: 0.55rem;
    align-items: center;
    min-height: 2.65rem;
    border-radius: 0.4rem;
    padding: 0.32rem 0.45rem;
}

.command-item-link:focus-visible {
    outline: 2px solid var(--ring);
    outline-offset: 2px;
}

.command-item-icon {
    display: grid;
    place-items: center;
    width: 1.75rem;
    height: 1.75rem;
    border: 1px solid var(--border);
    border-radius: 0.4rem;
    background: var(--card);
    color: var(--primary);
}

.command-item strong,
.command-item small {
    display: block;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.command-item strong {
    font-size: 0.84rem;
}

.command-item small {
    color: var(--muted-foreground);
    font-size: 0.72rem;
}

.command-pin-button.is-active {
    color: var(--warning);
}

.command-empty {
    border: 1px dashed var(--border);
    border-radius: 0.5rem;
    color: var(--muted-foreground);
    padding: 0.75rem;
    text-align: center;
}

.workspace-content {
    width: min(1440px, 100%);
    max-width: 100%;
    margin: 0 auto;
    padding: 1rem;
    padding-right: max(1rem, env(safe-area-inset-right));
    padding-left: max(1rem, env(safe-area-inset-left));
    padding-bottom: max(1rem, env(safe-area-inset-bottom));
    overflow-x: hidden;
}

.workspace-page {
    display: grid;
    gap: 1rem;
    min-width: 0;
}

.workspace-hero {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 1rem;
    align-items: start;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--card);
    padding: 1rem;
    box-shadow: var(--shadow);
}

.workspace-command-hero {
    position: relative;
    overflow: hidden;
    padding: clamp(1rem, 2vw, 1.35rem);
    box-shadow: var(--shadow-soft);
}

.workspace-command-hero::before {
    position: absolute;
    inset: 0 0 auto;
    height: 0.18rem;
    background: linear-gradient(90deg, var(--primary), var(--success), var(--warning));
    content: "";
}

.workspace-hero > * {
    min-width: 0;
}

.workspace-hero h2 {
    margin: 0 0 0.3rem;
    font-size: 1rem;
}

.workspace-command-hero h2 {
    max-width: 18ch;
    font-size: clamp(1.35rem, 3vw, 2.15rem);
    line-height: 1.05;
}

.workspace-hero p {
    max-width: 56rem;
    margin: 0;
    color: var(--muted-foreground);
    font-size: 0.86rem;
    overflow-wrap: anywhere;
}

.workspace-command-hero .action-row {
    justify-content: flex-end;
}

.section-nav {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.45rem;
    min-width: 0;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: color-mix(in srgb, var(--card) 92%, var(--secondary));
    padding: 0.55rem;
    box-shadow: var(--shadow);
}

.section-nav span {
    flex: 0 0 auto;
    color: var(--muted-foreground);
    font-size: 0.68rem;
    font-weight: 800;
    letter-spacing: 0;
    text-transform: uppercase;
}

.section-nav a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 2rem;
    border: 1px solid transparent;
    border-radius: 999px;
    background: var(--secondary);
    color: var(--muted-foreground);
    font-size: 0.78rem;
    font-weight: 750;
    line-height: 1.2;
    padding: 0.42rem 0.72rem;
    text-decoration: none;
    transition: border-color 150ms ease, background 150ms ease, color 150ms ease, box-shadow 150ms ease;
    white-space: nowrap;
}

.section-nav a:hover {
    border-color: var(--ring);
    background: var(--accent);
    color: var(--foreground);
}

.section-nav a:focus-visible {
    border-color: var(--ring);
    background: var(--accent);
    color: var(--foreground);
    box-shadow: 0 0 0 3px var(--focus-ring);
    outline: none;
}

.workspace-page [id] {
    scroll-margin-top: 5rem;
}

.workspace-signal-grid {
    display: grid;
    grid-column: 1 / -1;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.65rem;
}

.workspace-signal-card {
    min-width: 0;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: color-mix(in srgb, var(--secondary) 48%, var(--card));
    padding: 0.75rem;
}

.workspace-signal-card span,
.workspace-signal-card small {
    display: block;
    min-width: 0;
    color: var(--muted-foreground);
    font-size: 0.74rem;
    line-height: 1.4;
}

.workspace-signal-card span {
    font-weight: 750;
    text-transform: uppercase;
}

.workspace-signal-card strong {
    display: block;
    min-width: 0;
    margin-top: 0.2rem;
    color: var(--foreground);
    font-size: 1rem;
    line-height: 1.25;
    overflow-wrap: anywhere;
}

.metric-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.75rem;
}

.metric-card {
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--card);
    padding: 0.85rem;
    box-shadow: var(--shadow);
    transition: border-color var(--motion-fast), box-shadow var(--motion-fast), transform var(--motion-fast);
}

.metric-card:hover {
    border-color: color-mix(in srgb, var(--primary) 26%, var(--border));
    box-shadow: var(--shadow-soft);
    transform: translateY(-1px);
}

.metric-card span {
    display: block;
    color: var(--muted-foreground);
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
}

.metric-card strong {
    display: block;
    margin-top: 0.25rem;
    font-size: 1.25rem;
}

.dashboard-request-table,
.dashboard-network-exams-table,
.dashboard-join-table {
    min-width: 44rem;
}

.dashboard-invite-table {
    min-width: 24rem;
}

.dashboard-network-exams-table td[data-label="Exam"],
.dashboard-join-table td[data-label="Email"] {
    min-width: 16rem;
}

.dashboard-join-table td[data-label="Name"] {
    min-width: 12rem;
}

.dashboard-page .stacked-table td[data-label="Requested"],
.dashboard-page .stacked-table td[data-label="Duration"] {
    white-space: nowrap;
}

.dashboard-page .table-action-cell form {
    margin: 0;
}

.profile-public-exams-table {
    min-width: 42rem;
}

.profile-public-exams-table td[data-label="Exam"] {
    min-width: 18rem;
}

.profile-public-shell .stacked-table td[data-label="Duration"] {
    white-space: nowrap;
}

.student-submitted-attempts-table {
    min-width: 0;
}

.student-submitted-attempts-table td[data-label="Exam"] {
    min-width: 12rem;
}

.student-exams-page .stacked-table td[data-label="Score"],
.student-exams-page .stacked-table td[data-label="Submitted"] {
    white-space: nowrap;
}

.list-stack {
    display: grid;
    gap: 0.65rem;
    padding: 1rem;
}

.list-item {
    display: grid;
    gap: 0.25rem;
    border: 1px solid var(--border);
    border-radius: 0.45rem;
    padding: 0.7rem;
    background: var(--background);
    transition: background var(--motion-fast), border-color var(--motion-fast), box-shadow var(--motion-fast), transform var(--motion-fast);
}

.list-item:hover,
.list-item:focus-within {
    border-color: color-mix(in srgb, var(--primary) 24%, var(--border));
    background: color-mix(in srgb, var(--card) 78%, var(--secondary));
    box-shadow: var(--shadow);
}

.list-item-header {
    display: flex;
    align-items: start;
    justify-content: space-between;
    gap: 0.75rem;
}

.list-item h3 {
    margin: 0;
    font-size: 0.88rem;
}

.list-item p {
    margin: 0;
    padding: 0;
    color: var(--muted-foreground);
    font-size: 0.8rem;
}

.empty-state,
.empty-state-small {
    position: relative;
    display: grid;
    gap: 0.45rem;
    place-items: center;
    min-height: 9rem;
    border: 1px dashed var(--border);
    border-radius: var(--radius);
    background: color-mix(in srgb, var(--secondary) 44%, var(--card));
    color: var(--muted-foreground);
    padding: 1rem;
    text-align: center;
}

.empty-state::before,
.empty-state-small::before {
    display: block;
    width: 2.15rem;
    height: 2.15rem;
    border: 1px solid color-mix(in srgb, var(--primary) 24%, var(--border));
    border-radius: 0.55rem;
    background:
        linear-gradient(var(--primary), var(--primary)) 50% 50% / 0.75rem 0.12rem no-repeat,
        linear-gradient(var(--primary), var(--primary)) 50% 50% / 0.12rem 0.75rem no-repeat,
        color-mix(in srgb, var(--primary) 8%, var(--card));
    box-shadow: var(--shadow);
    content: "";
}

.empty-state strong,
.empty-state-small strong {
    display: block;
    color: var(--foreground);
    font-size: 0.9rem;
    line-height: 1.3;
}

.empty-state p,
.empty-state-small p {
    max-width: 34rem;
    margin: 0;
    padding: 0;
    color: var(--muted-foreground);
    font-size: 0.8rem;
}

.empty-state .action-row,
.empty-state-small .action-row {
    justify-content: center;
    margin-top: 0.15rem;
}

.empty-state .button {
    margin-top: 0.1rem;
}

.loading-state {
    display: grid;
    gap: 0.65rem;
    place-items: center;
    min-height: 8rem;
    color: var(--muted-foreground);
    padding: 1rem;
    text-align: center;
}

.loading-state::before {
    width: 1.25rem;
    height: 1.25rem;
    border: 2px solid color-mix(in srgb, var(--ring) 28%, var(--border));
    border-right-color: var(--ring);
    border-radius: 999px;
    content: "";
    animation: control-spin 760ms linear infinite;
}

.loading-feedback {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    gap: 0.65rem;
    align-items: start;
    border: 1px solid color-mix(in srgb, var(--ring) 26%, var(--border));
    border-radius: var(--radius);
    background: color-mix(in srgb, var(--accent) 42%, var(--card));
    color: var(--foreground);
    padding: 0.65rem 0.75rem;
}

.loading-feedback[hidden],
.loading-skeleton-list[hidden] {
    display: none;
}

.loading-feedback::before {
    width: 1rem;
    height: 1rem;
    margin-top: 0.16rem;
    border: 2px solid color-mix(in srgb, var(--ring) 28%, var(--border));
    border-right-color: var(--ring);
    border-radius: 999px;
    content: "";
    animation: control-spin 760ms linear infinite;
}

.loading-feedback strong,
.loading-feedback p {
    margin: 0;
}

.loading-feedback strong {
    display: block;
    font-size: 0.82rem;
}

.loading-feedback p {
    color: var(--muted-foreground);
    font-size: 0.76rem;
    line-height: 1.45;
}

.loading-skeleton-list {
    display: grid;
    gap: 0.55rem;
    padding: 0.75rem 1rem 1rem;
}

.loading-skeleton-row {
    display: grid;
    grid-template-columns: minmax(8rem, 1fr) minmax(5rem, 0.4fr) minmax(4rem, 0.3fr);
    gap: 0.7rem;
    align-items: center;
}

.skeleton,
.skeleton-line,
.skeleton-card {
    position: relative;
    overflow: hidden;
    border-radius: 0.45rem;
    background: color-mix(in srgb, var(--secondary) 72%, var(--card));
    color: transparent;
}

.skeleton-line {
    width: 100%;
    height: 0.85rem;
}

.skeleton-card {
    min-height: 7rem;
    border: 1px solid var(--border);
}

.skeleton::after,
.skeleton-line::after,
.skeleton-card::after {
    position: absolute;
    inset: 0;
    transform: translateX(-100%);
    background: linear-gradient(90deg, transparent, color-mix(in srgb, var(--card) 64%, transparent), transparent);
    content: "";
    animation: skeleton-sweep 1.2s ease-in-out infinite;
}

@keyframes skeleton-sweep {
    to {
        transform: translateX(100%);
    }
}

.toolbar-row {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    align-items: center;
    justify-content: space-between;
}

.workbench-compact-actions {
    justify-content: flex-start;
}

.workbench-compact-actions form {
    display: inline-flex;
    margin: 0;
}

.filter-bar,
.compact-filter-form {
    display: grid;
    gap: 0.7rem;
    border-bottom: 1px solid var(--border);
    background: color-mix(in srgb, var(--muted) 24%, transparent);
    padding: 1rem;
}

.filter-row {
    display: flex;
    flex-wrap: wrap;
    gap: 0.45rem;
    align-items: center;
}

.filter-row a,
.segmented-link,
.filter-chip,
.filter-reset {
    display: inline-flex;
    align-items: center;
    min-height: 1.85rem;
    border: 1px solid var(--border);
    border-radius: 999px;
    background: var(--card);
    padding: 0.2rem 0.55rem;
    color: var(--muted-foreground);
    font-size: 0.75rem;
    font-weight: 650;
    line-height: 1.2;
    white-space: nowrap;
}

.filter-row a[aria-current="page"],
.filter-row a:hover,
.filter-row a:focus-visible,
.segmented-link:hover,
.segmented-link:focus-visible,
.filter-reset:hover,
.filter-reset:focus-visible {
    border-color: var(--ring);
    color: var(--foreground);
    outline: none;
}

.filter-row a[aria-current="page"],
.filter-chip {
    border-color: color-mix(in srgb, var(--primary) 34%, var(--border));
    background: color-mix(in srgb, var(--primary) 9%, var(--card));
    color: var(--primary);
}

.filter-summary {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    align-items: center;
}

.filter-summary-label {
    color: var(--muted-foreground);
    font-size: 0.7rem;
    font-weight: 800;
    text-transform: uppercase;
}

.filter-reset {
    background: transparent;
}

.note-card {
    display: grid;
    gap: 0.65rem;
}

.note-card details {
    border-top: 1px solid var(--border);
    padding-top: 0.65rem;
}

.note-card summary {
    cursor: pointer;
    color: var(--muted-foreground);
    font-size: 0.78rem;
    font-weight: 700;
}

.tag-row {
    display: flex;
    flex-wrap: wrap;
    gap: 0.3rem;
}

.tag {
    border: 1px solid var(--border);
    border-radius: 999px;
    background: var(--secondary);
    padding: 0.05rem 0.4rem;
    color: var(--muted-foreground);
    font-size: 0.68rem;
    font-weight: 650;
}

.card-header .card-subtitle {
    margin: 0.2rem 0 0;
    padding: 0;
    color: var(--muted-foreground);
    font-size: 0.78rem;
    overflow-wrap: anywhere;
}

.question-bank-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.5fr) minmax(280px, 0.68fr);
    gap: 1rem;
    align-items: start;
}

.question-bank-grid > *,
.grid-2 > *,
.metric-grid > * {
    min-width: 0;
}

.question-bank-form-workspace {
    display: grid;
}

.question-form-tabs {
    display: flex;
    gap: clamp(1rem, 3vw, 2rem);
    align-items: end;
    overflow-x: auto;
    border-bottom: 1px solid var(--border);
    padding: 0.85rem 1rem 0;
    scrollbar-width: thin;
}

.question-form-tabs button {
    display: inline-flex;
    gap: 0.55rem;
    align-items: center;
    min-height: 3rem;
    border: 0;
    border-bottom: 0.2rem solid transparent;
    background: transparent;
    color: var(--muted-foreground);
    cursor: pointer;
    padding: 0.25rem 0.15rem 0.85rem;
    font: inherit;
    font-size: 0.88rem;
    font-weight: 700;
    line-height: 1.1;
    white-space: nowrap;
    transition: border-color var(--motion-fast), color var(--motion-fast);
}

.question-form-tabs button:hover,
.question-form-tabs button:focus-visible,
.question-form-tabs button[aria-selected="true"] {
    border-bottom-color: var(--foreground);
    color: var(--foreground);
    outline: none;
}

.question-form-tabs button:focus-visible {
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--ring) 18%, transparent);
}

.question-form-tabs svg {
    flex: 0 0 auto;
    width: 1.15rem;
    height: 1.15rem;
}

.question-form-panels {
    min-width: 0;
}

.question-form-panel {
    display: grid;
    gap: 1rem;
    padding: 1rem;
}

.question-form-panel > .form-stack {
    padding: 0;
}

.question-tab-stack {
    display: grid;
    gap: 1rem;
    width: 100%;
}

.question-tab-section {
    display: grid;
    width: 100%;
    overflow: hidden;
    border: 1px solid var(--border);
    border-radius: 0.5rem;
    background: var(--card);
}

.question-tab-section-header {
    display: flex;
    gap: 0.75rem;
    align-items: start;
    justify-content: space-between;
    border-bottom: 1px solid var(--border);
    padding: 1rem;
}

.question-tab-section-header h3 {
    margin: 0;
    color: var(--foreground);
    font-size: 1rem;
    font-weight: 820;
    line-height: 1.2;
}

.question-tab-section-header .card-subtitle {
    margin: 0.25rem 0 0;
    padding: 0;
}

.question-tab-section > .empty-state,
.question-tab-section > .loading-feedback {
    margin: 1rem;
}

.question-form-panel[hidden] {
    display: none;
}

.question-form-panel-header {
    display: flex;
    gap: 0.75rem;
    align-items: start;
    justify-content: space-between;
}

.question-form-panel-header > * {
    min-width: 0;
}

.question-form-panel-header h2 {
    margin: 0;
    color: var(--foreground);
    font-size: clamp(1.25rem, 2vw, 1.65rem);
    font-weight: 850;
    line-height: 1.12;
}

.question-form-panel-header .card-subtitle {
    margin: 0.35rem 0 0;
    padding: 0;
    color: var(--muted-foreground);
    font-size: 0.9rem;
    line-height: 1.45;
}

.question-metric-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.question-bank-page .workspace-command-hero,
.exam-authoring-page .workspace-command-hero {
    align-items: start;
}

.question-bank-page .workspace-signal-card,
.exam-authoring-page .workspace-signal-card {
    background: color-mix(in srgb, var(--secondary) 56%, var(--card));
}

.ai-metric-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

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

.ai-provider-grid > *,
.ai-admin-grid > * {
    min-width: 0;
}

.ai-provider-form-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.ai-inline-grid {
    grid-template-columns: minmax(180px, 0.8fr) minmax(180px, 1fr) auto auto;
    align-items: end;
}

.ai-safe-error {
    margin: 0;
    padding: 0;
    color: var(--destructive);
}

.ai-check-form {
    border-top: 1px solid var(--border);
}

.ai-allowlist-table {
    min-width: 34rem;
}

.ai-usage-ledger-table {
    min-width: 42rem;
}

.ai-page .stacked-table td[data-label="Units"],
.ai-page .stacked-table td[data-label="Tokens"],
.ai-page .stacked-table td[data-label="When"] {
    white-space: nowrap;
}

.ai-page .table-action-cell form {
    display: inline-flex;
    margin: 0;
}

.side-stack {
    display: grid;
    gap: 1rem;
}

.question-form-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.option-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.field-full {
    grid-column: 1 / -1;
}

.field input[type="file"] {
    min-height: 2.5rem;
    padding: 0.4rem 0.55rem;
    font-size: 0.8rem;
}

.file-drop-field {
    gap: 0.4rem;
}

.file-drop-control {
    position: relative;
    display: block;
    width: 100%;
    min-width: 0;
    cursor: pointer;
}

.field .file-drop-input {
    position: absolute;
    inset: 0;
    z-index: 2;
    width: 100%;
    height: 100%;
    min-height: 0;
    border: 0;
    opacity: 0;
    cursor: pointer;
}

.field .file-drop-input:disabled {
    cursor: not-allowed;
}

.upload-dropzone {
    display: grid;
    grid-template-columns: 2.45rem minmax(0, 1fr);
    gap: 0.75rem;
    align-items: center;
    min-height: 6.4rem;
    border: 1px dashed color-mix(in srgb, var(--border) 76%, var(--primary));
    border-radius: 0.65rem;
    background: color-mix(in srgb, var(--secondary) 46%, var(--card));
    padding: 0.85rem;
    color: var(--foreground);
    transition: border-color var(--motion-fast), background var(--motion-fast), box-shadow var(--motion-fast);
}

.file-drop-control:hover .upload-dropzone,
.file-drop-control.is-focused .upload-dropzone,
.file-drop-control.is-dragover .upload-dropzone {
    border-color: color-mix(in srgb, var(--primary) 62%, var(--border));
    background: color-mix(in srgb, var(--primary) 7%, var(--card));
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--ring) 14%, transparent);
}

.field .file-drop-input:focus-visible + .upload-dropzone {
    outline: 2px solid var(--ring);
    outline-offset: 2px;
}

.file-drop-control.has-file .upload-dropzone {
    border-style: solid;
    border-color: color-mix(in srgb, var(--success) 48%, var(--border));
    background: color-mix(in srgb, var(--success) 8%, var(--card));
}

.field .file-drop-input:disabled + .upload-dropzone {
    opacity: 0.65;
    cursor: not-allowed;
}

.upload-dropzone__icon {
    display: grid;
    place-items: center;
    width: 2.25rem;
    height: 2.25rem;
    border: 1px solid color-mix(in srgb, var(--primary) 38%, var(--border));
    border-radius: 999px;
    background: var(--card);
    color: var(--primary);
}

.upload-dropzone__preview {
    display: none;
    width: 2.45rem;
    height: 2.45rem;
    overflow: hidden;
    border: 1px solid color-mix(in srgb, var(--success) 45%, var(--border));
    border-radius: 0.55rem;
    background: var(--card);
}

.upload-dropzone__preview img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.file-drop-control.has-preview .upload-dropzone__preview {
    display: block;
}

.file-drop-control.has-preview .upload-dropzone__icon {
    display: none;
}

.upload-dropzone__icon svg {
    width: 1.15rem;
    height: 1.15rem;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.9;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.upload-dropzone__body {
    display: grid;
    gap: 0.22rem;
    min-width: 0;
}

.upload-dropzone__body strong {
    color: var(--foreground);
    font-size: 0.88rem;
    font-weight: 820;
    line-height: 1.2;
}

.upload-dropzone__meta {
    color: var(--muted-foreground);
    font-size: 0.75rem;
    line-height: 1.35;
}

.upload-dropzone__file {
    display: inline-flex;
    width: fit-content;
    max-width: 100%;
    min-height: 1.35rem;
    align-items: center;
    overflow: hidden;
    border: 1px solid var(--border);
    border-radius: var(--radius-pill);
    background: var(--card);
    padding: 0.18rem 0.5rem;
    color: var(--muted-foreground);
    font-size: 0.72rem;
    font-weight: 760;
    line-height: 1.2;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.file-drop-control.has-file .upload-dropzone__file {
    border-color: color-mix(in srgb, var(--success) 45%, var(--border));
    color: var(--success);
}

.field-error-wide {
    display: inline-flex;
    gap: 0.35rem;
    align-items: flex-start;
    grid-column: 1 / -1;
    color: var(--destructive);
    font-size: 0.74rem;
}

.error-list {
    margin: 0.4rem 0 0;
    padding: 0 0 0 1rem;
}

.filter-grid {
    display: grid;
    grid-template-columns: minmax(220px, 1fr) minmax(150px, 0.35fr) minmax(150px, 0.35fr) auto;
    gap: 0.65rem;
    align-items: end;
}

.question-table-wrap {
    border-top: 0;
}

.question-table {
    min-width: 70rem;
}

.question-table .table-select-cell {
    width: 2.8rem;
    min-width: 2.8rem;
    max-width: 2.8rem;
    padding-inline: 0.5rem;
}

.question-table th:first-child:not(.table-select-cell),
.question-table td:first-child:not(.table-select-cell),
.question-table th:nth-child(2),
.question-table td.question-main-cell {
    min-width: 24rem;
}

.question-main-cell {
    display: grid;
    gap: 0.5rem;
}

.question-row-title {
    display: flex;
    flex-wrap: wrap;
    gap: 0.3rem;
}

.question-prompt,
.compact-text {
    margin: 0;
    padding: 0;
}

.question-prompt {
    max-width: 58rem;
    color: var(--foreground);
    font-size: 0.84rem;
}

.media-link {
    width: fit-content;
    border-bottom: 1px solid var(--border);
    color: var(--primary);
    font-size: 0.76rem;
    font-weight: 650;
}

.question-diagram-preview {
    display: grid;
    gap: 0.45rem;
    min-width: 0;
    margin: 0;
}

.question-diagram-preview img {
    display: block;
    width: min(100%, 42rem);
    max-height: 18rem;
    object-fit: contain;
    border: 1px solid var(--border);
    border-radius: 0.55rem;
    background: color-mix(in srgb, var(--muted) 22%, transparent);
    padding: 0.4rem;
}

.question-diagram-preview figcaption {
    color: var(--muted-foreground);
    font-size: 0.72rem;
    font-weight: 800;
}

.question-diagram-preview--editor {
    border: 1px solid color-mix(in srgb, var(--border) 88%, var(--primary));
    border-radius: 0.5rem;
    background: color-mix(in srgb, var(--secondary) 28%, var(--card));
    padding: 0.7rem;
}

.question-diagram-preview--editor img {
    max-height: 13rem;
}

.question-diagram-preview--drawer img {
    width: 100%;
}

.question-editor {
    border-top: 1px solid var(--border);
    padding-top: 0.55rem;
}

.question-editor summary {
    cursor: pointer;
    color: var(--muted-foreground);
    font-size: 0.76rem;
    font-weight: 700;
}

.question-editor .form-stack {
    margin-top: 0.55rem;
    border: 1px solid var(--border);
    border-radius: 0.45rem;
    background: var(--card);
    padding: 0.75rem;
}

.option-list {
    display: grid;
    gap: 0.35rem;
    margin: 0;
    padding: 0;
    list-style: none;
}

.option-list li {
    display: grid;
    grid-template-columns: 1.35rem minmax(0, 1fr);
    gap: 0.45rem;
    align-items: start;
    min-width: 12rem;
}

.option-label {
    display: grid;
    place-items: center;
    width: 1.25rem;
    height: 1.25rem;
    border: 1px solid var(--border);
    border-radius: 999px;
    color: var(--muted-foreground);
    font-size: 0.68rem;
    font-weight: 800;
}

.option-label.is-correct {
    border-color: color-mix(in srgb, var(--success) 45%, var(--border));
    background: var(--success-bg);
    color: var(--success);
}

.pagination-row,
.datatable-pagination-row,
.import-summary {
    display: flex;
    flex-wrap: wrap;
    gap: 0.65rem;
    align-items: center;
    justify-content: space-between;
    padding: 0.75rem 1rem;
}

.import-summary {
    justify-content: start;
    border-bottom: 1px solid var(--border);
}

.import-summary span {
    border: 1px solid var(--border);
    border-radius: 999px;
    background: var(--secondary);
    padding: 0.2rem 0.55rem;
    color: var(--muted-foreground);
    font-size: 0.75rem;
}

.compact-form {
    border-bottom: 1px solid var(--border);
    padding-block: 0.75rem;
}

.question-import-preview-table {
    min-width: 34rem;
}

.question-generation-table,
.question-import-history-table {
    min-width: 36rem;
}

.question-bank-page .table-action-cell form {
    display: inline-flex;
    margin: 0;
}

.question-bank-page .stacked-table td[data-label="Row"],
.question-bank-page .stacked-table td[data-label="Scoring"],
.question-bank-page .stacked-table td[data-label="Status"],
.question-bank-page .stacked-table td[data-label="Provider"],
.question-bank-page .stacked-table td[data-label="Created"],
.question-bank-page .stacked-table td[data-label="Rows"] {
    white-space: nowrap;
}

.empty-state-small {
    min-height: 5.75rem;
    margin: 0.75rem 1rem 1rem;
}

.exam-authoring-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.35fr) minmax(300px, 0.7fr);
    gap: 1rem;
    align-items: start;
}

.exam-authoring-grid > *,
.exam-side-stack > *,
.exam-table-wrap *,
.assignment-grid > * {
    min-width: 0;
}

.exam-side-stack,
.snapshot-source-list,
.group-list,
.assignment-list,
.status-strip {
    display: grid;
    gap: 0.65rem;
}

.exam-metric-grid {
    grid-template-columns: repeat(5, minmax(0, 1fr));
}

.exam-form-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.exam-filter-grid {
    grid-template-columns: minmax(220px, 1fr) minmax(150px, 0.3fr) minmax(170px, 0.35fr) auto;
}

.field-wide {
    grid-column: span 2;
}

.check-field {
    display: flex;
    gap: 0.45rem;
    align-items: center;
    min-height: 2.45rem;
    border: 1px solid var(--border);
    border-radius: 0.45rem;
    background: var(--card);
    padding: 0.45rem 0.6rem;
    color: var(--foreground);
    font-size: 0.78rem;
    font-weight: 650;
}

.check-field input {
    width: 0.95rem;
    height: 0.95rem;
    accent-color: var(--primary);
}

.snapshot-source-item,
.group-card {
    border: 1px solid var(--border);
    border-radius: 0.5rem;
    background: var(--card);
    padding: 0.65rem;
}

.snapshot-source-item {
    display: grid;
    gap: 0.55rem;
}

.snapshot-source-body {
    display: grid;
    gap: 0.35rem;
}

.snapshot-source-body p,
.exam-paper-list p {
    margin: 0;
    color: var(--foreground);
    font-size: 0.78rem;
    line-height: 1.45;
}

.exam-main-cell {
    display: grid;
    gap: 0.45rem;
    min-width: 24rem;
}

.exam-main-cell h3 {
    margin: 0;
    color: var(--foreground);
    font-size: 0.95rem;
    line-height: 1.25;
}

.exam-table {
    min-width: 71rem;
}

.exam-table td[data-label="Settings"] {
    min-width: 12rem;
}

.exam-table td[data-label="Paper"] {
    min-width: 14rem;
}

.exam-table td[data-label="Assignments"] {
    min-width: 10rem;
}

.exam-table td[data-label="Workflow"] {
    min-width: 8rem;
}

.status-strip {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.35rem;
}

.status-strip span {
    border: 1px solid var(--border);
    border-radius: 999px;
    background: var(--secondary);
    padding: 0.14rem 0.45rem;
    color: var(--muted-foreground);
    font-size: 0.68rem;
    font-weight: 750;
    text-align: center;
}

.exam-paper-list {
    display: grid;
    gap: 0.55rem;
    margin: 0.5rem 0 0;
    padding: 0;
    list-style: none;
}

.exam-paper-list li {
    display: grid;
    grid-template-columns: 1.65rem minmax(0, 1fr);
    gap: 0.5rem;
    align-items: start;
    border-top: 1px solid var(--border);
    padding-top: 0.55rem;
}

.exam-paper-list li > span {
    display: grid;
    place-items: center;
    width: 1.45rem;
    height: 1.45rem;
    border: 1px solid var(--border);
    border-radius: 999px;
    color: var(--muted-foreground);
    font-size: 0.7rem;
    font-weight: 800;
}

.vertical-actions {
    display: grid;
    justify-content: stretch;
}

.vertical-actions .button,
.vertical-actions form {
    width: 100%;
}

.rejection-form {
    gap: 0.35rem;
    border: 1px solid var(--border);
    border-radius: 0.45rem;
    padding: 0.45rem;
}

.rejection-form textarea {
    min-height: 4.8rem;
}

.group-card summary {
    display: flex;
    gap: 0.5rem;
    align-items: center;
    justify-content: space-between;
    cursor: pointer;
    color: var(--foreground);
    font-size: 0.82rem;
}

.group-card summary span {
    color: var(--muted-foreground);
    font-size: 0.72rem;
    font-weight: 700;
}

.inline-assignment-form {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 0.5rem;
    align-items: end;
    border-top: 1px solid var(--border);
    margin-top: 0.6rem;
    padding-top: 0.6rem;
}

.member-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
    margin-top: 0.55rem;
}

.member-pill,
.assignment-pill {
    display: inline-flex;
    gap: 0.45rem;
    align-items: center;
    max-width: 100%;
    border: 1px solid var(--border);
    border-radius: 999px;
    background: var(--secondary);
    padding: 0.18rem 0.28rem 0.18rem 0.55rem;
    color: var(--foreground);
    font-size: 0.72rem;
    font-weight: 700;
}

.assignment-pill {
    justify-content: space-between;
    border-radius: 0.45rem;
    padding: 0.38rem 0.45rem;
}

.assignment-pill span {
    display: grid;
    gap: 0.1rem;
    min-width: 0;
}

.assignment-pill small {
    color: var(--muted-foreground);
    font-size: 0.66rem;
}

.member-pill .pill-remove-button,
.assignment-pill .pill-remove-button {
    display: inline-grid;
    place-items: center;
    flex: 0 0 auto;
    width: 1.25rem;
    height: 1.25rem;
    border-radius: 999px;
    padding: 0;
    line-height: 1;
}

.member-pill .pill-remove-button svg,
.assignment-pill .pill-remove-button svg {
    display: block;
    width: 0.78rem;
    height: 0.78rem;
}

.assignment-grid .form-stack {
    border: 1px solid var(--border);
    border-radius: 0.5rem;
    padding: 0.75rem;
}

.exam-workspace-page {
    display: grid;
    gap: 1rem;
}

.exam-workspace-card {
    min-width: 0;
    overflow: hidden;
}

.exam-workspace-card > .question-form-panel-header {
    padding: 1rem;
}

.exam-workspace-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 1rem;
    align-items: start;
    padding: 1rem;
}

.exam-workspace-row > * {
    min-width: 0;
}

.exam-workspace-row .row-actions {
    justify-content: flex-end;
}

.exam-workspace-card .question-tab-stack {
    gap: 0.85rem;
}

.exam-workspace-card .question-tab-section > .form-stack,
.exam-workspace-card .question-tab-section > .member-list {
    margin: 0;
    padding: 1rem;
}

.exam-workspace-card .question-tab-section > .form-stack + .form-stack,
.exam-workspace-card .question-tab-section > .form-stack + .member-list {
    border-top: 1px solid var(--border);
}

.exam-workspace-card .question-tab-section > .member-list {
    margin-top: 0;
}

.exam-workspace-card .question-tab-section .compact-form {
    border-top: 1px solid var(--border);
}

.assignment-workflow-form {
    gap: 0.85rem;
}

.assignment-workflow-form > .smart-assist-strip {
    display: none;
}

.assignment-workflow-grid,
.assignment-window-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.75rem;
}

.assignment-workflow-step {
    display: grid;
    grid-template-columns: 2rem minmax(0, 1fr);
    gap: 0.65rem;
    align-items: start;
    min-width: 0;
    border: 1px solid color-mix(in srgb, var(--border) 84%, var(--primary));
    border-radius: 0.5rem;
    background: color-mix(in srgb, var(--secondary) 34%, var(--card));
    padding: 0.72rem;
}

.assignment-workflow-step > span:first-child {
    display: grid;
    place-items: center;
    width: 1.55rem;
    height: 1.55rem;
    border: 1px solid color-mix(in srgb, var(--primary) 34%, var(--border));
    border-radius: 999px;
    background: var(--card);
    color: var(--primary);
    font-size: 0.72rem;
    font-weight: 850;
    line-height: 1;
}

.assignment-workflow-step .field,
.assignment-window-grid .field {
    min-width: 0;
}

.assignment-form-footer {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    align-items: center;
    justify-content: space-between;
}

.assignment-form-footer .button {
    margin-left: auto;
}

.assignment-ledger-list {
    display: grid;
    gap: 0.7rem;
    border-top: 1px solid var(--border);
    padding: 1rem;
}

.assignment-ledger-item {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 0.85rem;
    align-items: start;
    min-width: 0;
    border: 1px solid var(--border);
    border-radius: 0.5rem;
    background: var(--card);
    padding: 0.8rem;
}

.assignment-ledger-main {
    display: grid;
    gap: 0.45rem;
    min-width: 0;
}

.assignment-ledger-main h3,
.assignment-ledger-main p {
    margin: 0;
}

.assignment-ledger-main h3 {
    color: var(--foreground);
    font-size: 0.95rem;
    line-height: 1.25;
}

.assignment-ledger-main p {
    color: var(--muted-foreground);
    font-size: 0.8rem;
}

.assignment-ledger-meta {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.5rem;
    margin: 0;
}

.assignment-ledger-meta div {
    min-width: 0;
    border: 1px solid color-mix(in srgb, var(--border) 82%, transparent);
    border-radius: 0.45rem;
    background: color-mix(in srgb, var(--muted) 32%, transparent);
    padding: 0.5rem;
}

.assignment-ledger-meta dt {
    color: var(--muted-foreground);
    font-size: 0.66rem;
    font-weight: 800;
    text-transform: uppercase;
}

.assignment-ledger-meta dd {
    margin: 0.15rem 0 0;
    color: var(--foreground);
    font-size: 0.76rem;
    line-height: 1.3;
}

.assignment-ledger-item form {
    display: inline-flex;
    margin: 0;
}

.exam-manage-form .exam-form-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.exam-manage-form .field,
.exam-manage-form .field input,
.exam-manage-form .field select,
.exam-manage-form .field textarea {
    min-width: 0;
}

.group-member-empty-state {
    margin: 0;
    min-height: 16rem;
}

.exam-selection-empty-state {
    margin: 0;
    min-height: 16rem;
}

.group-member-empty-state[hidden] {
    display: none !important;
}

.exam-selection-empty-state[hidden] {
    display: none !important;
}

.inline-help {
    border: 1px solid color-mix(in srgb, var(--primary) 22%, var(--border));
    border-radius: 0.5rem;
    background: color-mix(in srgb, var(--primary) 7%, var(--card));
    color: var(--muted-foreground);
    margin: 0 1rem;
    padding: 0.7rem 0.8rem;
    font-size: 0.78rem;
    line-height: 1.45;
}

[data-group-member-detail][hidden] {
    display: none;
}

[data-exam-detail][hidden],
[data-exam-selection-extra][hidden] {
    display: none;
}

[data-workbench-ajax-form][aria-busy="true"] {
    opacity: 0.78;
}

[data-workbench-ajax-form][aria-busy="true"] button[type="submit"] {
    cursor: progress;
}

.educator-workbench {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(19rem, 22rem);
    gap: 1rem;
    align-items: start;
}

.educator-workbench__main {
    display: grid;
    gap: 1rem;
    min-width: 0;
}

.educator-workbench__panel {
    position: sticky;
    top: 0rem;
    display: grid;
    grid-template-rows: auto auto auto minmax(0, 1fr) auto;
    gap: 0.85rem;
    max-height: calc(100dvh - 2rem);
    min-height: min(42rem, calc(100dvh - 2rem));
    overflow: hidden;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: color-mix(in srgb, var(--card) 94%, var(--secondary));
    box-shadow: var(--shadow);
    padding: 0.85rem;
    scrollbar-color: color-mix(in srgb, var(--muted-foreground) 34%, transparent) transparent;
    scrollbar-width: thin;
}

.educator-workbench__panel--instant-search {
    grid-template-rows: auto auto minmax(0, 1fr) auto;
}

.workbench-panel-header {
    display: flex;
    gap: 0.65rem;
    align-items: start;
    justify-content: space-between;
    border-bottom: 1px solid var(--border);
    padding-bottom: 0.75rem;
}

.workbench-panel-header h2,
.workbench-panel-header p,
.workbench-panel-item h3,
.workbench-panel-item p,
.workbench-preview-card h3,
.workbench-preview-card p,
.workbench-preview-section h4,
.workbench-preview-section p {
    margin: 0;
    padding: 0;
}

.workbench-panel-header h2 {
    font-size: 1rem;
    line-height: 1.2;
}

.workbench-panel-header p {
    margin-top: 0.18rem;
    color: var(--muted-foreground);
    font-size: 0.75rem;
    line-height: 1.35;
}

.workbench-panel-search {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 0.5rem;
    align-items: end;
}

.workbench-panel-search .field {
    min-width: 0;
}

.workbench-panel-search--instant {
    grid-template-columns: minmax(0, 1fr);
}

.workbench-panel-actions,
.workbench-panel-item__actions,
.workbench-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    align-items: center;
}

.workbench-tabs {
    border: 1px solid var(--border);
    border-radius: 999px;
    background: color-mix(in srgb, var(--muted) 22%, transparent);
    padding: 0.35rem;
    width: fit-content;
    max-width: 100%;
}

.workbench-tabs a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 2rem;
    border: 1px solid transparent;
    border-radius: 999px;
    padding: 0.25rem 0.65rem;
    color: var(--muted-foreground);
    font-size: 0.76rem;
    font-weight: 750;
    line-height: 1.1;
    white-space: nowrap;
}

.workbench-tabs a:hover,
.workbench-tabs a:focus-visible,
.workbench-tabs a[aria-current="page"] {
    border-color: color-mix(in srgb, var(--primary) 28%, var(--border));
    background: var(--card);
    color: var(--foreground);
    outline: none;
}

.workbench-panel-section {
    display: grid;
    gap: 0.55rem;
}

.workbench-panel-rail {
    position: relative;
    display: grid;
    align-content: start;
    gap: 0.85rem;
    min-height: 0;
    overflow: auto;
    padding-right: 0.15rem;
    scrollbar-color: color-mix(in srgb, var(--muted-foreground) 34%, transparent) transparent;
    scrollbar-width: thin;
}

.workbench-panel-rail[aria-busy="true"] .workbench-panel-list,
.workbench-panel-rail[aria-busy="true"] .empty-state {
    opacity: 0.48;
    pointer-events: none;
}

.workbench-rail-loader {
    position: sticky;
    top: 0;
    z-index: 4;
    display: flex;
    gap: 0.55rem;
    align-items: center;
    justify-content: center;
    border: 1px solid color-mix(in srgb, var(--primary) 24%, var(--border));
    border-radius: 0.55rem;
    background: color-mix(in srgb, var(--card) 92%, var(--primary) 8%);
    box-shadow: var(--shadow-soft);
    padding: 0.6rem 0.75rem;
    color: var(--foreground);
    font-size: 0.78rem;
    font-weight: 800;
}

.workbench-rail-loader[hidden] {
    display: none;
}

.workbench-rail-loader__spinner {
    width: 1rem;
    height: 1rem;
    border: 2px solid color-mix(in srgb, var(--primary) 22%, transparent);
    border-top-color: var(--primary);
    border-radius: 999px;
    animation: workbench-rail-spin 0.72s linear infinite;
}

@keyframes workbench-rail-spin {
    to {
        transform: rotate(360deg);
    }
}

.workbench-panel-section-title {
    display: flex;
    align-items: center;
    justify-content: space-between;
    color: var(--muted-foreground);
    font-size: 0.72rem;
    font-weight: 800;
    text-transform: uppercase;
}

.workbench-panel-section-title strong {
    color: var(--foreground);
}

.workbench-panel-list {
    display: grid;
    gap: 0.55rem;
}

.workbench-panel-item {
    display: grid;
    gap: 0.55rem;
    border: 1px solid var(--border);
    border-radius: 0.5rem;
    background: var(--card);
    padding: 0.65rem;
    transition: border-color var(--motion-fast), box-shadow var(--motion-fast);
}

.workbench-panel-item[data-workbench-select-exam-card],
.workbench-panel-item[data-workbench-select-group-card],
.paper-question-source-card[data-paper-question-draggable="true"] {
    cursor: pointer;
}

.workbench-panel-item:hover,
.workbench-panel-item:focus-within {
    border-color: color-mix(in srgb, var(--primary) 30%, var(--border));
    box-shadow: var(--shadow-soft);
}

.workbench-panel-item[aria-current="true"] {
    border-color: color-mix(in srgb, var(--primary) 45%, var(--border));
    background: color-mix(in srgb, var(--primary) 8%, var(--card));
    box-shadow: var(--shadow-soft);
}

.workbench-panel-item[hidden],
.educator-workbench__panel [hidden] {
    display: none;
}

.workbench-panel-item__body {
    display: grid;
    gap: 0.35rem;
    min-width: 0;
}

.workbench-panel-item h3 {
    color: var(--foreground);
    font-size: 0.84rem;
    line-height: 1.3;
}

.workbench-panel-item p {
    color: var(--muted-foreground);
    font-size: 0.72rem;
    line-height: 1.4;
}

.workbench-panel-pagination {
    position: relative;
    z-index: 1;
    display: flex;
    gap: 0.65rem;
    align-items: center;
    justify-content: space-between;
    border-top: 1px solid var(--border);
    background: color-mix(in srgb, var(--card) 94%, var(--secondary));
    margin: 0 -0.85rem -0.85rem;
    min-height: 3.35rem;
    padding: 0.65rem 0.85rem;
}

.workbench-panel-pagination span {
    color: var(--muted-foreground);
    font-size: 0.74rem;
    font-weight: 800;
    white-space: nowrap;
}

.workbench-panel-pagination__controls {
    display: inline-flex;
    gap: 0.35rem;
    align-items: center;
}

.workbench-panel-pagination .icon-button {
    width: 2rem;
    height: 2rem;
    min-height: 2rem;
}

.workbench-panel-pagination .icon-button:disabled {
    cursor: not-allowed;
    opacity: 0.45;
}

.workbench-panel-pagination .icon-button svg {
    width: 1rem;
    height: 1rem;
}

.workbench-preview-card {
    display: grid;
    gap: 0.9rem;
}

.workbench-preview-card h3 {
    color: var(--foreground);
    font-size: 1.05rem;
    line-height: 1.3;
}

.workbench-preview-prompt {
    border: 1px solid var(--border);
    border-radius: 0.5rem;
    background: color-mix(in srgb, var(--muted) 26%, transparent);
    padding: 0.8rem;
    color: var(--foreground);
    font-size: 0.9rem;
    line-height: 1.55;
}

.workbench-preview-section {
    display: grid;
    gap: 0.35rem;
    border-top: 1px solid var(--border);
    padding-top: 0.75rem;
}

.workbench-preview-section h4 {
    color: var(--foreground);
    font-size: 0.82rem;
}

.workbench-preview-section p {
    color: var(--muted-foreground);
    font-size: 0.82rem;
    line-height: 1.5;
}

.workbench-preview-options {
    border: 1px solid var(--border);
    border-radius: 0.5rem;
    padding: 0.75rem;
}

.workbench-preview-facts {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.55rem;
    margin: 0;
}

.workbench-preview-facts div {
    border: 1px solid var(--border);
    border-radius: 0.5rem;
    background: var(--card);
    padding: 0.55rem;
}

.workbench-preview-facts dt {
    color: var(--muted-foreground);
    font-size: 0.68rem;
    font-weight: 800;
    text-transform: uppercase;
}

.workbench-preview-facts dd {
    margin: 0.18rem 0 0;
    color: var(--foreground);
    font-size: 0.8rem;
    line-height: 1.35;
}

.workbench-preview-paper {
    margin-top: 0;
}

.paper-question-source-card[data-paper-question-draggable="true"] {
    cursor: grab;
}

.paper-question-source-card[data-paper-question-draggable="false"] {
    opacity: 0.68;
}

.paper-question-source-card.is-dragging,
.exam-paper-list li.is-dragging {
    opacity: 0.55;
}

[data-paper-question-dropzone].is-drop-target,
.exam-paper-list li.is-drop-target {
    border-color: color-mix(in srgb, var(--primary) 48%, var(--border));
    background: color-mix(in srgb, var(--primary) 10%, var(--card));
    box-shadow: var(--shadow-soft);
}

.paper-question-workspace > .inline-help {
    margin-top: 1rem;
}

.workbench-panel-section > .inline-help {
    margin: 0;
}

.paper-question-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 0.75rem;
    align-items: start;
}

.paper-question-row__body {
    display: grid;
    gap: 0.45rem;
    min-width: 0;
}

.paper-question-image-preview {
    display: grid;
    gap: 0.35rem;
    width: min(100%, 22rem);
    margin: 0;
}

.paper-question-image-preview img {
    display: block;
    width: 100%;
    max-height: 9rem;
    object-fit: contain;
    border: 1px solid var(--border);
    border-radius: 0.5rem;
    background: color-mix(in srgb, var(--muted) 24%, transparent);
    padding: 0.35rem;
}

.paper-question-image-preview figcaption {
    color: var(--muted-foreground);
    font-size: 0.7rem;
    font-weight: 800;
}

.paper-question-row__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
    align-items: center;
    justify-content: flex-end;
}

.paper-question-row__actions form {
    display: inline-flex;
    margin: 0;
}

.paper-question-drag-handle {
    cursor: grab;
}

.paper-question-drag-handle svg {
    width: 1rem;
    height: 1rem;
}

.paper-question-reorder-form {
    display: none;
}

.exam-edit-image-panel {
    display: grid;
    gap: 0.75rem;
    border-top: 1px solid var(--border);
    margin-top: 0.9rem;
    padding-top: 0.9rem;
}

.exam-edit-image-panel h3,
.exam-edit-image-panel p {
    margin: 0;
}

.exam-edit-image-panel h3 {
    color: var(--foreground);
    font-size: 0.94rem;
    line-height: 1.25;
}

.exam-edit-image-list {
    display: grid;
    gap: 0.65rem;
}

.exam-edit-image-item {
    display: grid;
    grid-template-columns: 4.5rem minmax(0, 1fr);
    gap: 0.7rem;
    align-items: center;
    border: 1px solid var(--border);
    border-radius: 0.55rem;
    background: color-mix(in srgb, var(--secondary) 24%, var(--card));
    padding: 0.65rem;
}

.exam-edit-image-item img {
    display: block;
    width: 4.5rem;
    height: 3.25rem;
    object-fit: contain;
    border: 1px solid var(--border);
    border-radius: 0.42rem;
    background: var(--card);
    padding: 0.25rem;
}

.exam-edit-image-item strong,
.exam-edit-image-item p {
    display: block;
    min-width: 0;
}

.exam-edit-image-item strong {
    color: var(--foreground);
    font-size: 0.78rem;
}

.exam-edit-image-item p {
    margin-top: 0.18rem;
    color: var(--muted-foreground);
    font-size: 0.73rem;
    line-height: 1.35;
}

.exam-edit-image-actions {
    display: grid;
    grid-column: 1 / -1;
    gap: 0.55rem;
}

.exam-edit-image-replace-form {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 0.55rem;
    align-items: end;
}

.exam-edit-image-replace-form .field {
    min-width: 0;
}

.exam-edit-image-remove-form {
    display: inline-flex;
    width: fit-content;
    margin: 0;
}

.educator-workbench[data-workbench-collapsed="true"] {
    grid-template-columns: minmax(0, 1fr) 3.5rem;
}

.educator-workbench[data-workbench-collapsed="true"] .educator-workbench__panel {
    align-content: start;
    min-height: auto;
    overflow: hidden;
    padding: 0.65rem;
}

.educator-workbench[data-workbench-collapsed="true"] .workbench-panel-header {
    justify-content: center;
    border-bottom: 0;
    padding-bottom: 0;
}

.educator-workbench[data-workbench-collapsed="true"] .workbench-panel-header > div,
.educator-workbench[data-workbench-collapsed="true"] .workbench-panel-search,
.educator-workbench[data-workbench-collapsed="true"] .workbench-panel-actions,
.educator-workbench[data-workbench-collapsed="true"] .workbench-panel-rail,
.educator-workbench[data-workbench-collapsed="true"] .workbench-panel-pagination {
    display: none;
}

.educator-workbench[data-workbench-collapsed="true"] [data-workbench-panel-toggle] svg {
    transform: rotate(180deg);
}

@media (max-width: 1100px) {
    .educator-workbench {
        grid-template-columns: 1fr;
    }

    .educator-workbench__panel {
        position: static;
        order: -1;
        max-height: min(78dvh, 42rem);
        min-height: min(30rem, 78dvh);
    }

    .educator-workbench[data-workbench-collapsed="true"] {
        grid-template-columns: 1fr;
    }

}

@media (max-width: 720px) {
    .workbench-panel-search,
    .workbench-preview-facts,
    .exam-edit-image-item,
    .exam-edit-image-replace-form {
        grid-template-columns: 1fr;
    }

    .exam-edit-image-item img {
        width: min(100%, 16rem);
        height: auto;
        max-height: 9rem;
    }

    .workbench-tabs {
        width: 100%;
        overflow-x: auto;
        flex-wrap: nowrap;
    }

    .workbench-tabs a {
        flex: 0 0 auto;
    }
}

.available-exam-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.85rem;
    padding: 1rem;
}

.exam-tile,
.attempt-question-card {
    display: grid;
    gap: 0.65rem;
    border: 1px solid var(--border);
    border-radius: 0.55rem;
    background: var(--card);
    padding: 0.85rem;
    transition: border-color var(--motion-fast), box-shadow var(--motion-fast), transform var(--motion-fast);
}

.exam-tile:hover,
.exam-tile:focus-within,
.attempt-question-card:focus-within {
    border-color: color-mix(in srgb, var(--primary) 26%, var(--border));
    box-shadow: var(--shadow-soft);
    transform: translateY(-1px);
}

.exam-tile h3,
.attempt-question-card h3 {
    margin: 0;
    color: var(--foreground);
    font-size: 0.98rem;
    line-height: 1.25;
}

.exam-tile p {
    margin: 0;
    color: var(--muted-foreground);
    font-size: 0.8rem;
    line-height: 1.45;
}

.attempt-meta {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 0.4rem;
    margin: 0;
}

.attempt-meta div {
    border: 1px solid var(--border);
    border-radius: 0.45rem;
    background: var(--secondary);
    padding: 0.4rem;
}

.attempt-meta dt,
.attempt-meta dd {
    margin: 0;
}

.attempt-meta dt {
    color: var(--muted-foreground);
    font-size: 0.66rem;
    font-weight: 750;
    text-transform: uppercase;
}

.attempt-meta dd {
    color: var(--foreground);
    font-size: 0.78rem;
    font-weight: 800;
}

.attempt-list {
    display: grid;
    gap: 0.55rem;
    padding: 0.75rem 1rem 1rem;
}

.attempt-row {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    align-items: center;
    justify-content: space-between;
    border: 1px solid var(--border);
    border-radius: 0.5rem;
    background: var(--card);
    padding: 0.65rem;
    color: var(--foreground);
    cursor: pointer;
    transition: background var(--motion-fast), border-color var(--motion-fast), box-shadow var(--motion-fast), transform var(--motion-fast);
}

.attempt-row:hover,
.attempt-row:focus-visible {
    border-color: color-mix(in srgb, var(--primary) 28%, var(--border));
    background: color-mix(in srgb, var(--accent) 52%, var(--card));
    box-shadow: var(--shadow);
    outline: none;
    transform: translateY(-1px);
}

.attempt-row span:first-child {
    display: grid;
    flex: 1 1 14rem;
    gap: 0.12rem;
    min-width: 0;
}

.attempt-row > .badge {
    flex: 0 0 auto;
    max-width: 100%;
}

.attempt-row strong {
    overflow-wrap: anywhere;
}

.attempt-row small {
    color: var(--muted-foreground);
    font-size: 0.7rem;
}

.attempt-page {
    position: relative;
}

.attempt-page:-webkit-full-screen {
    overflow: auto;
    min-height: 100vh;
    background: var(--background);
    padding: 1rem;
}

.attempt-page:fullscreen {
    overflow: auto;
    min-height: 100vh;
    background: var(--background);
    padding: 1rem;
}

.attempt-page.is-fullscreen-required [data-attempt-content][aria-hidden="true"] {
    opacity: 0.42;
    pointer-events: none;
    user-select: none;
}

.attempt-header {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 1rem;
    align-items: start;
    border: 1px solid var(--border);
    border-radius: 0.7rem;
    background: var(--card);
    padding: 1rem;
}

.attempt-command-header {
    position: relative;
    overflow: hidden;
    box-shadow: var(--shadow-soft);
}

.attempt-command-header::before {
    position: absolute;
    inset: 0 0 auto;
    height: 0.18rem;
    background: linear-gradient(90deg, var(--primary), var(--success), var(--warning));
    content: "";
}

.attempt-header h2,
.attempt-header p {
    margin: 0;
}

.attempt-header h2 {
    font-size: 1.25rem;
    line-height: 1.2;
}

.attempt-header p {
    margin-top: 0.35rem;
    color: var(--muted-foreground);
    font-size: 0.82rem;
}

.attempt-fullscreen-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    align-items: center;
    margin-top: 0.75rem;
}

.attempt-fullscreen-gate {
    position: sticky;
    z-index: 20;
    top: 0.75rem;
    border: 1px solid color-mix(in srgb, var(--warning) 40%, var(--border));
    border-radius: 0.7rem;
    background: color-mix(in srgb, var(--warning) 8%, var(--card));
    box-shadow: var(--shadow);
    padding: 0.85rem;
}

.attempt-fullscreen-panel {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    align-items: center;
    justify-content: space-between;
}

.attempt-fullscreen-panel h2,
.attempt-fullscreen-panel p {
    margin: 0;
}

.attempt-fullscreen-panel h2 {
    font-size: 1rem;
    line-height: 1.25;
}

.attempt-fullscreen-panel p {
    max-width: 54rem;
    margin-top: 0.25rem;
    color: var(--muted-foreground);
    font-size: 0.82rem;
    line-height: 1.5;
}

.attempt-page.is-fullscreen-active .attempt-fullscreen-gate,
.attempt-page.is-fullscreen-unavailable .attempt-fullscreen-gate {
    display: none;
}

.attempt-page.is-fullscreen-active .attempt-command-header {
    border-color: color-mix(in srgb, var(--success) 34%, var(--border));
}

.attempt-clock {
    display: grid;
    gap: 0.2rem;
    min-width: 9rem;
    border: 1px solid var(--border);
    border-radius: 0.55rem;
    background: var(--secondary);
    padding: 0.65rem;
    text-align: right;
}

.attempt-clock span {
    color: var(--muted-foreground);
    font-size: 0.68rem;
    font-weight: 750;
    text-transform: uppercase;
}

.attempt-clock strong {
    color: var(--foreground);
    font-size: 1.3rem;
    font-variant-numeric: tabular-nums;
    line-height: 1;
}

.attempt-signal-grid {
    grid-column: 1 / -1;
}

.attempt-command-header .workspace-signal-card {
    background: color-mix(in srgb, var(--secondary) 54%, var(--card));
}

.attempt-status-bar {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 1rem;
    align-items: center;
    border: 1px solid var(--border);
    border-radius: 0.55rem;
    background: var(--card);
    padding: 0.75rem 1rem;
}

.attempt-status-bar span {
    color: var(--muted-foreground);
    font-size: 0.76rem;
    font-weight: 700;
}

.progress-track {
    position: relative;
    overflow: hidden;
    height: 0.45rem;
    margin-top: 0.45rem;
    border-radius: 999px;
    background: var(--muted);
}

.progress-track span {
    position: absolute;
    inset: 0 auto 0 0;
    border-radius: inherit;
    background: var(--primary);
}

.progress-meter {
    display: block;
    width: 100%;
    border: 0;
    appearance: none;
}

.progress-meter::-webkit-progress-bar {
    border-radius: inherit;
    background: var(--muted);
}

.progress-meter::-webkit-progress-value {
    border-radius: inherit;
    background: var(--primary);
}

.progress-meter::-moz-progress-bar {
    border-radius: inherit;
    background: var(--primary);
}

.attempt-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(280px, 0.35fr);
    gap: 1rem;
    align-items: start;
}

.attempt-question-stack,
.attempt-side-panel {
    display: grid;
    gap: 1rem;
    min-width: 0;
}

.attempt-side-panel {
    position: sticky;
    top: 1rem;
}

.attempt-prompt {
    margin: 0;
    color: var(--foreground);
    font-size: 0.92rem;
    line-height: 1.6;
}

.attempt-media {
    width: min(100%, 36rem);
    border: 1px solid var(--border);
    border-radius: 0.5rem;
}

.attempt-options {
    display: grid;
    gap: 0.55rem;
}

.attempt-option {
    display: grid;
    grid-template-columns: auto 1.8rem minmax(0, 1fr);
    gap: 0.55rem;
    align-items: center;
    border: 1px solid var(--border);
    border-radius: 0.55rem;
    background: var(--secondary);
    padding: 0.55rem;
    cursor: pointer;
}

.attempt-option input {
    width: 1rem;
    height: 1rem;
    accent-color: var(--primary);
}

.attempt-option span {
    display: grid;
    place-items: center;
    width: 1.45rem;
    height: 1.45rem;
    border: 1px solid var(--border);
    border-radius: 999px;
    color: var(--muted-foreground);
    font-size: 0.72rem;
    font-weight: 850;
}

.attempt-option strong {
    color: var(--foreground);
    font-size: 0.82rem;
    line-height: 1.4;
}

.attempt-option:has(input:checked) {
    border-color: color-mix(in srgb, var(--primary) 45%, var(--border));
    background: color-mix(in srgb, var(--primary) 8%, var(--card));
}

.attempt-action-row,
.attempt-pager {
    display: flex;
    flex-wrap: wrap;
    gap: 0.55rem;
    align-items: center;
    justify-content: space-between;
}

.attempt-question-nav {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 0.4rem;
    padding: 0 1rem 1rem;
}

.attempt-question-nav a {
    display: grid;
    place-items: center;
    aspect-ratio: 1;
    border: 1px solid var(--border);
    border-radius: 0.45rem;
    background: var(--card);
    color: var(--foreground);
    font-size: 0.78rem;
    font-weight: 800;
}

.attempt-question-nav a.is-active {
    border-color: var(--primary);
    background: color-mix(in srgb, var(--primary) 12%, var(--card));
}

.attempt-question-nav a.is-saved {
    color: var(--success);
}

/* Focused secure exam experience */
.focused-exam-body {
    overflow: hidden;
    min-height: 100dvh;
    margin: 0;
    background: var(--background);
    color: var(--foreground);
}

.focused-exam-body #main-content {
    min-height: 100dvh;
}

.exam-instruction-page,
.secure-attempt {
    height: 100dvh;
    min-height: 0;
    background: var(--background);
}

.exam-instruction-page {
    display: grid;
    grid-template-rows: auto minmax(0, 1fr) auto;
}

.exam-focus-header,
.secure-attempt-header {
    z-index: 40;
    border-bottom: 1px solid var(--border);
    background: color-mix(in srgb, var(--card) 94%, transparent);
    box-shadow: 0 0.1rem 0.35rem rgb(15 23 42 / 5%);
    backdrop-filter: blur(0.75rem);
}

.exam-focus-header {
    display: flex;
    gap: 1rem;
    align-items: center;
    justify-content: space-between;
    min-height: 4.5rem;
    padding: 0.75rem clamp(1rem, 3vw, 2rem);
}

.exam-focus-brand {
    display: flex;
    gap: 0.65rem;
    align-items: center;
    min-width: 0;
}

.exam-focus-brand img {
    width: 2rem;
    height: 2rem;
}

.exam-focus-brand div,
.secure-attempt-title,
.secure-attempt-progress {
    display: grid;
    gap: 0.1rem;
    min-width: 0;
}

.exam-focus-brand span,
.secure-attempt-title span,
.secure-attempt-progress span {
    color: var(--muted-foreground);
    font-size: 0.68rem;
    font-weight: 750;
    text-transform: uppercase;
}

.exam-focus-brand strong,
.secure-attempt-title strong {
    overflow: hidden;
    max-width: min(52vw, 42rem);
    color: var(--foreground);
    font-size: 0.92rem;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.exam-focus-statuses,
.secure-attempt-runtime,
.secure-attempt-tools {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

.exam-status-chip {
    display: inline-flex;
    gap: 0.35rem;
    align-items: center;
    min-height: 2rem;
    border: 1px solid var(--border);
    border-radius: 999px;
    background: var(--secondary);
    padding: 0.3rem 0.65rem;
    color: var(--muted-foreground);
    font-size: 0.7rem;
    font-weight: 750;
    white-space: nowrap;
}

.exam-status-chip::before {
    width: 0.45rem;
    height: 0.45rem;
    border-radius: 50%;
    background: currentColor;
    content: "";
}

.exam-status-chip.is-ready {
    border-color: color-mix(in srgb, var(--success) 35%, var(--border));
    color: var(--success);
}

.exam-status-chip.is-warning {
    border-color: color-mix(in srgb, var(--warning) 42%, var(--border));
    color: var(--warning-foreground);
}

.exam-status-chip.is-failed {
    border-color: color-mix(in srgb, var(--destructive) 42%, var(--border));
    color: var(--destructive);
}

.exam-instruction-scroll {
    min-height: 0;
    overflow-y: auto;
    overscroll-behavior: contain;
}

.exam-instruction-content {
    display: grid;
    gap: 1rem;
    width: min(100% - 2rem, 68rem);
    margin: 0 auto;
    padding: clamp(1.5rem, 4vw, 3rem) 0 2rem;
}

.exam-instruction-intro {
    display: grid;
    gap: 0.45rem;
}

.exam-instruction-intro h1,
.exam-instruction-intro p,
.exam-preflight-panel h2,
.exam-policy-panel h2,
.exam-policy-panel p,
.exam-recovery-note h2,
.exam-recovery-note p {
    margin: 0;
}

.exam-instruction-intro h1 {
    max-width: 46rem;
    font-size: 2.35rem;
    line-height: 1.08;
}

.exam-instruction-intro p,
.exam-policy-panel > header p,
.exam-recovery-note p {
    color: var(--muted-foreground);
    font-size: 0.9rem;
    line-height: 1.55;
}

.exam-summary-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 0;
    overflow: hidden;
    margin: 0;
    border: 1px solid var(--border);
    border-radius: 0.5rem;
    background: var(--card);
}

.exam-summary-grid div {
    display: grid;
    gap: 0.2rem;
    min-width: 0;
    padding: 1rem;
}

.exam-summary-grid div + div {
    border-left: 1px solid var(--border);
}

.exam-summary-grid dt,
.exam-summary-grid dd,
.exam-submit-summary dt,
.exam-submit-summary dd,
.exam-submitted-details dt,
.exam-submitted-details dd {
    margin: 0;
}

.exam-summary-grid dt,
.exam-submit-summary dt,
.exam-submitted-details dt {
    color: var(--muted-foreground);
    font-size: 0.68rem;
    font-weight: 750;
    text-transform: uppercase;
}

.exam-summary-grid dd {
    overflow-wrap: anywhere;
    font-size: 0.9rem;
    font-weight: 800;
}

.exam-preflight-panel,
.exam-policy-panel,
.exam-recovery-note {
    border: 1px solid var(--border);
    border-radius: 0.5rem;
    background: var(--card);
}

.exam-preflight-panel,
.exam-policy-panel > header,
.exam-recovery-note {
    padding: 1.15rem;
}

.exam-preflight-panel {
    display: grid;
    grid-template-columns: minmax(12rem, 0.35fr) minmax(0, 1fr);
    gap: 1rem;
}

.exam-preflight-panel h2,
.exam-policy-panel h2,
.exam-recovery-note h2 {
    margin-top: 0.25rem;
    font-size: 1rem;
    line-height: 1.25;
}

.exam-preflight-list {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.65rem;
}

.exam-preflight-item {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    gap: 0.55rem;
    align-items: start;
    border: 1px solid var(--border);
    border-radius: 0.45rem;
    background: var(--secondary);
    padding: 0.7rem;
}

.exam-preflight-item > span:last-child {
    display: grid;
    gap: 0.15rem;
}

.exam-preflight-item strong {
    font-size: 0.78rem;
}

.exam-preflight-item small {
    color: var(--muted-foreground);
    font-size: 0.7rem;
    line-height: 1.4;
}

.exam-check-mark {
    display: grid;
    place-items: center;
    width: 1.25rem;
    height: 1.25rem;
    border-radius: 50%;
    background: color-mix(in srgb, var(--success) 12%, var(--card));
    color: var(--success);
    font-size: 0.75rem;
    font-weight: 900;
}

.exam-policy-panel {
    overflow: hidden;
}

.exam-policy-panel > header {
    border-bottom: 1px solid var(--border);
}

.exam-policy-list {
    display: grid;
}

.exam-policy-item {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    gap: 0.8rem;
    padding: 0.9rem 1.15rem;
}

.exam-policy-item + .exam-policy-item {
    border-top: 1px solid var(--border);
}

.exam-policy-item > span {
    display: grid;
    place-items: center;
    width: 1.65rem;
    height: 1.65rem;
    border: 1px solid var(--border);
    border-radius: 50%;
    color: var(--muted-foreground);
    font-size: 0.68rem;
    font-weight: 800;
}

.exam-policy-item h3,
.exam-policy-item p {
    margin: 0;
}

.exam-policy-item h3 {
    font-size: 0.85rem;
    line-height: 1.3;
}

.exam-policy-item p {
    margin-top: 0.2rem;
    color: var(--muted-foreground);
    font-size: 0.76rem;
    line-height: 1.5;
}

.exam-policy-list.is-compact {
    overflow-y: auto;
    min-height: 0;
}

.exam-recovery-note {
    display: grid;
    gap: 0.35rem;
    border-color: color-mix(in srgb, var(--warning) 32%, var(--border));
    background: color-mix(in srgb, var(--warning) 6%, var(--card));
}

.exam-instruction-end {
    padding: 1rem;
    color: var(--muted-foreground);
    font-size: 0.72rem;
    text-align: center;
}

.exam-instruction-actions {
    z-index: 40;
    display: grid;
    grid-template-columns: auto minmax(18rem, 1fr) auto;
    gap: 1rem;
    align-items: center;
    border-top: 1px solid var(--border);
    background: var(--card);
    padding: 0.75rem clamp(1rem, 3vw, 2rem) max(0.75rem, env(safe-area-inset-bottom));
}

.exam-instruction-consent {
    display: grid;
    gap: 0.15rem;
    justify-self: center;
    max-width: 42rem;
}

.exam-instruction-consent .check-field {
    margin: 0;
}

.exam-instruction-consent small {
    color: var(--muted-foreground);
    font-size: 0.68rem;
}

.exam-instruction-primary-actions,
.exam-dialog-actions,
.exam-submitted-actions {
    display: flex;
    gap: 0.55rem;
    align-items: center;
    justify-content: flex-end;
}

.exam-confirm-dialog,
.exam-submit-review,
.exam-attempt-drawer {
    max-width: none;
    max-height: none;
    border: 0;
    background: transparent;
    padding: 0;
    color: var(--foreground);
}

.exam-confirm-dialog {
    width: min(100% - 2rem, 31rem);
}

.exam-confirm-dialog::backdrop,
.exam-submit-review::backdrop,
.exam-attempt-drawer::backdrop {
    background: rgb(8 24 18 / 62%);
    backdrop-filter: blur(0.15rem);
}

.exam-confirm-dialog > div,
.exam-submit-review-panel {
    border: 1px solid var(--border);
    border-radius: 0.5rem;
    background: var(--card);
    box-shadow: var(--shadow-lg);
    padding: 1.25rem;
}

.exam-confirm-dialog h2,
.exam-confirm-dialog p,
.exam-submit-review h2,
.exam-submit-review p {
    margin: 0;
}

.exam-confirm-dialog h2,
.exam-submit-review h2 {
    margin-top: 0.3rem;
    font-size: 1.15rem;
}

.exam-confirm-dialog p,
.exam-submit-review header p {
    margin-top: 0.4rem;
    color: var(--muted-foreground);
    font-size: 0.82rem;
    line-height: 1.5;
}

.exam-confirm-dialog .exam-dialog-actions,
.exam-submit-review .exam-dialog-actions {
    margin-top: 1rem;
}

.secure-attempt {
    display: grid;
    grid-template-rows: auto minmax(0, 1fr) auto;
}

.secure-attempt:fullscreen,
.secure-attempt:-webkit-full-screen {
    width: 100vw;
    height: 100dvh;
    background: var(--background);
}

.secure-attempt-header {
    display: grid;
    grid-template-columns: minmax(12rem, 1fr) auto auto auto;
    gap: 1rem;
    align-items: center;
    min-height: 4.65rem;
    padding: 0.65rem clamp(0.8rem, 2vw, 1.35rem);
}

.secure-attempt-progress {
    min-width: 8rem;
}

.secure-attempt-progress strong {
    color: var(--success);
    font-size: 0.68rem;
}

.secure-attempt-progress strong.is-saving {
    color: var(--warning-foreground);
}

.secure-attempt-progress strong.is-failed {
    color: var(--destructive);
}

.secure-attempt-timer {
    display: grid;
    gap: 0.05rem;
    min-width: 7.4rem;
    border-left: 1px solid var(--border);
    padding-left: 0.85rem;
    text-align: right;
}

.secure-attempt-timer span {
    color: var(--muted-foreground);
    font-size: 0.62rem;
    font-weight: 750;
    text-transform: uppercase;
}

.secure-attempt-timer strong {
    font-size: 1rem;
    font-variant-numeric: tabular-nums;
}

.secure-attempt-timer.is-warning strong {
    color: var(--warning-foreground);
}

.secure-attempt-timer.is-critical strong {
    color: var(--destructive);
}

.exam-icon-button {
    display: inline-grid;
    place-items: center;
    width: 2.35rem;
    height: 2.35rem;
    border: 0;
    border-radius: 0.35rem;
    background: transparent;
    color: var(--muted-foreground);
    font: inherit;
    font-size: 1rem;
    font-weight: 800;
    cursor: pointer;
}

.exam-icon-button:hover,
.exam-icon-button:focus-visible {
    background: var(--secondary);
    color: var(--foreground);
    outline: 2px solid color-mix(in srgb, var(--primary) 30%, transparent);
    outline-offset: 1px;
}

.secure-attempt-content {
    min-height: 0;
    overflow-y: auto;
    overscroll-behavior: contain;
    padding: 1rem max(1rem, calc((100vw - 78rem) / 2));
    scroll-behavior: smooth;
}

.secure-question-workspace {
    display: grid;
    gap: 1rem;
    width: 100%;
    max-width: 70rem;
    margin: 0 auto;
}

.secure-question {
    scroll-margin-top: 1rem;
    overflow: hidden;
    border: 1px solid var(--border);
    border-radius: 0.5rem;
    background: var(--card);
    box-shadow: var(--shadow-soft);
}

.secure-question.is-flagged {
    border-color: color-mix(in srgb, var(--warning) 46%, var(--border));
}

.secure-question-header {
    display: flex;
    gap: 1rem;
    align-items: start;
    justify-content: space-between;
    border-bottom: 1px solid var(--border);
    background: color-mix(in srgb, var(--secondary) 42%, var(--card));
    padding: 0.9rem 1rem;
}

.secure-question-header h2 {
    margin: 0.2rem 0 0;
    font-size: 0.9rem;
    line-height: 1.3;
    text-transform: capitalize;
}

.secure-question-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    justify-content: flex-end;
}

.secure-question-meta span {
    border: 1px solid var(--border);
    border-radius: 999px;
    background: var(--card);
    padding: 0.25rem 0.5rem;
    color: var(--muted-foreground);
    font-size: 0.68rem;
    font-weight: 750;
}

.secure-question-body {
    display: grid;
    gap: 1rem;
    padding: clamp(1rem, 3vw, 1.5rem);
}

.secure-question-prompt {
    max-width: 62rem;
    margin: 0;
    font-size: 1.05rem;
    line-height: 1.65;
}

.secure-question-media {
    max-width: min(100%, 42rem);
    max-height: 28rem;
    border: 1px solid var(--border);
    border-radius: 0.5rem;
    object-fit: contain;
}

.secure-answer-form {
    display: grid;
    gap: 0.85rem;
}

.secure-answer-options {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.65rem;
    min-width: 0;
    margin: 0;
    border: 0;
    padding: 0;
}

.secure-answer-option {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    gap: 0.65rem;
    align-items: center;
    min-height: 4rem;
    border: 1px solid var(--border);
    border-radius: 0.5rem;
    background: var(--secondary);
    padding: 0.75rem;
    cursor: pointer;
}

.secure-answer-option:hover {
    border-color: color-mix(in srgb, var(--primary) 30%, var(--border));
}

.secure-answer-option:has(input:checked) {
    border-color: var(--primary);
    background: color-mix(in srgb, var(--primary) 8%, var(--card));
    box-shadow: 0 0 0 1px color-mix(in srgb, var(--primary) 18%, transparent);
}

.secure-answer-option input {
    position: absolute;
    width: 1px;
    height: 1px;
    opacity: 0;
}

.secure-answer-option > span {
    display: grid;
    place-items: center;
    grid-row: 1;
    width: 1.8rem;
    height: 1.8rem;
    border: 1px solid var(--border);
    border-radius: 50%;
    background: var(--card);
    color: var(--muted-foreground);
    font-size: 0.75rem;
    font-weight: 850;
}

.secure-answer-option > strong {
    grid-column: 2;
    grid-row: 1;
    min-width: 0;
    overflow-wrap: anywhere;
    font-size: 0.84rem;
    line-height: 1.45;
}

.secure-answer-option:has(input:focus-visible) {
    outline: 2px solid var(--primary);
    outline-offset: 2px;
}

.secure-long-answer textarea {
    min-height: 13rem;
}

.secure-question-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    align-items: center;
}

.secure-question-actions [data-flag-question].is-active {
    border-color: color-mix(in srgb, var(--warning) 52%, var(--border));
    color: var(--warning-foreground);
}

.secure-question-save-status {
    margin-left: auto;
    color: var(--muted-foreground);
    font-size: 0.7rem;
    font-weight: 700;
}

.secure-question-save-status.is-saving {
    color: var(--warning-foreground);
}

.secure-question-save-status.is-saved {
    color: var(--success);
}

.secure-question-save-status.is-failed {
    color: var(--destructive);
}

.secure-manual-save {
    display: none;
}

.secure-attempt-bottom-bar {
    z-index: 40;
    display: grid;
    grid-template-columns: minmax(8rem, auto) minmax(0, 1fr) minmax(8rem, auto);
    gap: 1rem;
    align-items: center;
    min-height: 4.4rem;
    border-top: 1px solid var(--border);
    background: color-mix(in srgb, var(--card) 96%, transparent);
    padding: 0.65rem clamp(0.8rem, 2vw, 1.35rem) max(0.65rem, env(safe-area-inset-bottom));
    backdrop-filter: blur(0.75rem);
}

.secure-attempt-bottom-bar > :last-child {
    justify-self: end;
}

.secure-attempt-counts {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    align-items: center;
    justify-content: center;
    color: var(--muted-foreground);
    font-size: 0.72rem;
}

.secure-attempt-counts strong {
    color: var(--foreground);
    font-variant-numeric: tabular-nums;
}

.secure-fullscreen-blocker,
.secure-expiry-blocker {
    position: fixed;
    z-index: 100;
    inset: 0;
    display: grid;
    place-items: center;
    background: color-mix(in srgb, var(--background) 94%, transparent);
    padding: 1rem;
    backdrop-filter: blur(1rem);
}

.secure-fullscreen-blocker[hidden],
.secure-expiry-blocker[hidden] {
    display: none;
}

.secure-fullscreen-panel,
.secure-expiry-blocker > div {
    width: min(100%, 36rem);
    border: 1px solid var(--border);
    border-radius: 0.5rem;
    background: var(--card);
    box-shadow: var(--shadow-lg);
    padding: 1.35rem;
    text-align: center;
}

.secure-fullscreen-panel h2,
.secure-fullscreen-panel p,
.secure-expiry-blocker h2,
.secure-expiry-blocker p {
    margin: 0;
}

.secure-fullscreen-panel h2,
.secure-expiry-blocker h2 {
    margin-top: 0.35rem;
    font-size: 1.25rem;
}

.secure-fullscreen-panel p,
.secure-expiry-blocker p {
    margin-top: 0.45rem;
    color: var(--muted-foreground);
    font-size: 0.84rem;
    line-height: 1.55;
}

.secure-fullscreen-panel dl {
    display: grid;
    gap: 0;
    overflow: hidden;
    margin: 1rem 0;
    border: 1px solid var(--border);
    border-radius: 0.45rem;
    text-align: left;
}

.secure-fullscreen-panel dl div {
    display: grid;
    grid-template-columns: minmax(7rem, 0.35fr) minmax(0, 1fr);
    gap: 0.7rem;
    padding: 0.65rem;
}

.secure-fullscreen-panel dl div + div {
    border-top: 1px solid var(--border);
}

.secure-fullscreen-panel dt,
.secure-fullscreen-panel dd {
    margin: 0;
    font-size: 0.72rem;
}

.secure-fullscreen-panel dt {
    color: var(--muted-foreground);
    font-weight: 750;
}

.secure-fullscreen-panel .button + .button {
    margin-top: 0.5rem;
}

.exam-inline-loader {
    display: inline-block;
    width: 1.5rem;
    height: 1.5rem;
    margin-top: 1rem;
    border: 2px solid var(--border);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: exam-spin 0.8s linear infinite;
}

@keyframes exam-spin {
    to {
        transform: rotate(360deg);
    }
}

.exam-attempt-drawer {
    width: min(92vw, 29rem);
    height: 100dvh;
    margin: 0 0 0 auto;
}

.exam-attempt-drawer[open] {
    display: block;
}

.exam-attempt-drawer-panel {
    display: grid;
    grid-template-rows: auto minmax(0, 1fr) auto;
    width: 100%;
    height: 100%;
    border-left: 1px solid var(--border);
    background: var(--card);
    box-shadow: var(--shadow-lg);
}

.exam-attempt-drawer-panel > header {
    display: flex;
    gap: 1rem;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid var(--border);
    padding: 1rem;
}

.exam-attempt-drawer-panel h2 {
    margin: 0.2rem 0 0;
    font-size: 1rem;
}

.exam-attempt-drawer-panel > form {
    display: grid;
    grid-template-rows: minmax(0, 1fr) auto;
    min-height: 0;
    padding: 1rem;
}

.exam-attempt-drawer-panel > form .field,
.exam-attempt-drawer-panel > form textarea {
    min-height: 0;
    height: 100%;
}

.exam-drawer-footer {
    display: flex;
    gap: 0.75rem;
    align-items: center;
    justify-content: space-between;
    padding-top: 0.75rem;
}

.exam-drawer-footer small {
    color: var(--muted-foreground);
    font-size: 0.7rem;
}

.secure-question-navigator {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.55rem;
    align-content: start;
    overflow-y: auto;
    padding: 1rem;
}

.secure-question-navigator a,
.secure-question-navigator button {
    display: grid;
    gap: 0.15rem;
    min-width: 0;
    min-height: 3.5rem;
    border: 1px solid var(--border);
    border-radius: 0.45rem;
    background: var(--secondary);
    padding: 0.55rem;
    color: var(--foreground);
    text-align: left;
    cursor: pointer;
}

.secure-question-navigator span {
    font-size: 0.82rem;
    font-weight: 850;
}

.secure-question-navigator small {
    overflow: hidden;
    color: var(--muted-foreground);
    font-size: 0.62rem;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.secure-question-navigator .is-current {
    border-color: var(--primary);
    box-shadow: 0 0 0 1px color-mix(in srgb, var(--primary) 20%, transparent);
}

.secure-question-navigator .is-answered {
    border-color: color-mix(in srgb, var(--success) 44%, var(--border));
}

.secure-question-navigator .is-flagged {
    background: color-mix(in srgb, var(--warning) 8%, var(--card));
}

.secure-navigator-legend {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    border-top: 1px solid var(--border);
    padding: 0.75rem 1rem;
    color: var(--muted-foreground);
    font-size: 0.65rem;
}

.secure-navigator-legend span {
    display: inline-flex;
    gap: 0.35rem;
    align-items: center;
}

.secure-navigator-legend i {
    width: 0.7rem;
    height: 0.7rem;
    border: 1px solid var(--border);
    border-radius: 50%;
}

.secure-navigator-legend i.is-answered {
    border-color: var(--success);
    background: var(--success);
}

.secure-navigator-legend i.is-flagged {
    border-color: var(--warning);
    background: var(--warning);
}

.exam-submit-review {
    width: min(100% - 2rem, 42rem);
}

.exam-submit-summary {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0;
    overflow: hidden;
    margin: 1rem 0 0;
    border: 1px solid var(--border);
    border-radius: 0.45rem;
}

.exam-submit-summary div {
    display: grid;
    gap: 0.25rem;
    padding: 0.8rem;
}

.exam-submit-summary div:nth-child(n + 4) {
    border-top: 1px solid var(--border);
}

.exam-submit-summary div:not(:nth-child(3n + 1)) {
    border-left: 1px solid var(--border);
}

.exam-submit-summary dd {
    font-size: 1rem;
    font-weight: 850;
    font-variant-numeric: tabular-nums;
}

.exam-submit-warning {
    border: 1px solid color-mix(in srgb, var(--destructive) 40%, var(--border));
    border-radius: 0.45rem;
    background: color-mix(in srgb, var(--destructive) 7%, var(--card));
    padding: 0.65rem;
    color: var(--destructive);
    font-size: 0.75rem;
}

.exam-submitted-page {
    display: grid;
    place-items: center;
    min-height: 100dvh;
    padding: 1rem;
}

.exam-submitted-panel {
    display: grid;
    gap: 0.55rem;
    width: min(100%, 42rem);
    border: 1px solid var(--border);
    border-radius: 0.5rem;
    background: var(--card);
    box-shadow: var(--shadow-lg);
    padding: clamp(1.25rem, 4vw, 2rem);
    text-align: center;
}

.exam-submitted-mark {
    display: grid;
    place-items: center;
    width: 3rem;
    height: 3rem;
    margin: 0 auto 0.25rem;
    border-radius: 50%;
    background: color-mix(in srgb, var(--success) 12%, var(--card));
    color: var(--success);
    font-size: 1.5rem;
    font-weight: 900;
}

.exam-submitted-panel h1,
.exam-submitted-panel > p {
    margin: 0;
}

.exam-submitted-panel h1 {
    font-size: 1.9rem;
}

.exam-submitted-panel > p {
    color: var(--muted-foreground);
}

.exam-submitted-details {
    display: grid;
    gap: 0;
    overflow: hidden;
    margin: 1rem 0;
    border: 1px solid var(--border);
    border-radius: 0.45rem;
    text-align: left;
}

.exam-submitted-details div {
    display: grid;
    grid-template-columns: minmax(8rem, 0.35fr) minmax(0, 1fr);
    gap: 1rem;
    padding: 0.75rem;
}

.exam-submitted-details div + div {
    border-top: 1px solid var(--border);
}

.exam-submitted-details dd {
    overflow-wrap: anywhere;
    font-size: 0.78rem;
    font-weight: 750;
}

@media (max-width: 900px) {
    .secure-attempt-header {
        grid-template-columns: minmax(0, 1fr) auto;
        gap: 0.55rem 0.8rem;
    }

    .secure-attempt-progress {
        order: 3;
    }

    .secure-attempt-tools {
        order: 4;
        justify-content: flex-end;
    }

    .secure-attempt-runtime {
        justify-content: flex-end;
    }

    .secure-answer-options {
        grid-template-columns: 1fr;
    }

    .exam-preflight-panel {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 700px) {
    .exam-focus-header {
        align-items: flex-start;
    }

    .exam-focus-statuses {
        align-items: flex-end;
        flex-direction: column;
    }

    .exam-instruction-content {
        width: min(100% - 1.25rem, 68rem);
        padding-top: 1rem;
    }

    .exam-summary-grid,
    .exam-preflight-list {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .exam-summary-grid div:nth-child(3) {
        border-top: 1px solid var(--border);
        border-left: 0;
    }

    .exam-summary-grid div:nth-child(4) {
        border-top: 1px solid var(--border);
    }

    .exam-instruction-actions {
        grid-template-columns: 1fr;
        gap: 0.55rem;
    }

    .exam-instruction-consent {
        justify-self: stretch;
    }

    .exam-instruction-primary-actions {
        display: grid;
        grid-template-columns: 1fr 1fr;
    }

    .exam-instruction-primary-actions .button {
        width: 100%;
    }

    .secure-attempt-header {
        grid-template-columns: minmax(0, 1fr) auto;
        padding: 0.5rem 0.65rem;
    }

    .secure-attempt-title strong {
        max-width: 52vw;
    }

    .secure-attempt-progress,
    .secure-attempt-runtime .exam-status-chip,
    .secure-attempt-tools [data-open-attempt-drawer="instructions"] {
        display: none;
    }

    .secure-attempt-runtime {
        grid-column: 2;
        grid-row: 1;
    }

    .secure-attempt-tools {
        grid-column: 1 / -1;
        grid-row: 2;
        justify-content: space-between;
    }

    .secure-attempt-tools .button {
        margin-left: auto;
    }

    .secure-attempt-timer {
        min-width: 6.5rem;
        border-left: 0;
        padding-left: 0;
    }

    .secure-attempt-content {
        padding: 0.65rem;
    }

    .secure-question-header,
    .secure-question-body {
        padding: 0.75rem;
    }

    .secure-question-actions {
        align-items: stretch;
        flex-direction: column;
    }

    .secure-question-save-status {
        order: -1;
        margin-left: 0;
    }

    .secure-attempt-bottom-bar {
        grid-template-columns: auto minmax(0, 1fr) auto;
        gap: 0.5rem;
        padding-inline: 0.65rem;
    }

    .secure-attempt-counts {
        gap: 0.4rem;
        font-size: 0.65rem;
    }

    .secure-attempt-counts span:nth-child(2) {
        display: none;
    }

    .secure-question-navigator {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .exam-submit-summary {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .exam-submit-summary div:nth-child(n + 3) {
        border-top: 1px solid var(--border);
    }

    .exam-submit-summary div:not(:nth-child(3n + 1)) {
        border-left: 0;
    }

    .exam-submit-summary div:nth-child(even) {
        border-left: 1px solid var(--border);
    }

    .exam-dialog-actions,
    .exam-submitted-actions {
        align-items: stretch;
        flex-direction: column-reverse;
    }

    .exam-dialog-actions .button,
    .exam-dialog-actions form,
    .exam-dialog-actions form .button,
    .exam-submitted-actions .button {
        width: 100%;
    }
}

@media (max-width: 430px) {
    .exam-summary-grid,
    .exam-preflight-list {
        grid-template-columns: 1fr;
    }

    .exam-summary-grid div + div,
    .exam-summary-grid div:nth-child(3) {
        border-top: 1px solid var(--border);
        border-left: 0;
    }

    .exam-instruction-primary-actions {
        grid-template-columns: 1fr;
    }

    .secure-attempt-tools .exam-icon-button:first-child {
        display: none;
    }

    .secure-attempt-bottom-bar .button {
        min-width: 5rem;
        padding-inline: 0.65rem;
    }
}

@media (prefers-reduced-motion: reduce) {
    .exam-inline-loader {
        animation-duration: 1.8s;
    }

    .secure-attempt-content {
        scroll-behavior: auto;
    }
}

form[aria-busy="true"] button[type="submit"][data-loading="true"] {
    cursor: progress;
    opacity: 0.88;
    pointer-events: none;
}

.result-metrics {
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 0.75rem;
}

.result-detail-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(280px, 0.34fr);
    gap: 1rem;
    align-items: start;
}

.result-answer-stack,
.result-side-panel {
    display: grid;
    gap: 1rem;
}

.result-answer-stack > form {
    display: grid;
    gap: 1rem;
}

.result-side-panel {
    position: sticky;
}

.result-answer-body {
    display: grid;
    gap: 0.75rem;
    padding: 1rem;
}

.result-answer-body p {
    padding: 0;
}

.result-answer-body textarea[readonly] {
    min-height: 8rem;
    background: var(--muted);
}

.result-option-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(min(100%, 18rem), 1fr));
    gap: 0.65rem;
}

.result-option {
    display: grid;
    grid-template-columns: 1.75rem minmax(0, 1fr) 2rem;
    gap: 0.6rem;
    align-items: center;
    min-width: 0;
    border: 1px solid var(--border);
    border-radius: 0.6rem;
    background: var(--card);
    padding: 0.72rem;
}

.result-option-marker {
    display: grid;
    place-items: center;
    width: 1.55rem;
    height: 1.55rem;
    border: 1px solid var(--border);
    border-radius: 999px;
    background: var(--secondary);
    color: var(--muted-foreground);
    font-size: 0.72rem;
    font-weight: 850;
    line-height: 1;
}

.result-option strong {
    min-width: 0;
    color: var(--foreground);
    font-size: 0.86rem;
    line-height: 1.45;
    overflow-wrap: anywhere;
}

.result-option-icon {
    display: grid;
    grid-column: 3;
    place-items: center;
    justify-self: end;
    align-self: center;
    width: 1.7rem;
    height: 1.7rem;
    border: 1px solid var(--border);
    border-radius: 999px;
    background: var(--card);
    color: var(--muted-foreground);
}

.result-option-icon svg {
    width: 1rem;
    height: 1rem;
}

.result-option.is-correct {
    border-color: color-mix(in srgb, var(--success) 56%, var(--border));
    background: color-mix(in srgb, var(--success) 11%, var(--card));
}

.result-option.is-correct .result-option-marker {
    border-color: color-mix(in srgb, var(--success) 60%, var(--border));
    background: color-mix(in srgb, var(--success) 15%, var(--card));
    color: var(--success);
}

.result-option.is-wrong {
    border-color: color-mix(in srgb, var(--destructive) 52%, var(--border));
    background: color-mix(in srgb, var(--destructive) 9%, var(--card));
}

.result-option.is-wrong .result-option-marker {
    border-color: color-mix(in srgb, var(--destructive) 55%, var(--border));
    background: color-mix(in srgb, var(--destructive) 10%, var(--card));
    color: var(--destructive);
}

.result-option-icon--correct {
    border-color: color-mix(in srgb, var(--success) 48%, var(--border));
    color: var(--success);
}

.result-option-icon--wrong {
    border-color: color-mix(in srgb, var(--destructive) 48%, var(--border));
    color: var(--destructive);
}

.certificate-card .certificate-body {
    display: grid;
    grid-template-columns: minmax(160px, 0.32fr) minmax(0, 1fr);
    gap: 1rem;
    align-items: center;
    padding: 1rem;
}

.certificate-card img {
    width: 100%;
    max-width: 14rem;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: #fff;
    padding: 0.5rem;
}

.certificate-card-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.45rem;
    align-items: center;
    justify-content: end;
    min-width: min(100%, 18rem);
}

.certificate-card-actions .badge {
    flex: 0 0 auto;
}

.public-certificate-page {
    width: min(1080px, 100%);
    margin: 0 auto;
    padding: 1rem;
}

.certificate-verify-panel {
    position: sticky;
    overflow: hidden;
    border-color: color-mix(in srgb, var(--border) 78%, var(--primary));
    box-shadow: var(--shadow-soft);
}

.certificate-verify-panel::before {
    position: absolute;
    inset: 0 0 auto;
    height: 0.18rem;
    background: linear-gradient(90deg, var(--primary), var(--success), var(--warning));
    content: "";
}

.certificate-verify-signals {
    display: grid;
    gap: 0.55rem;
    margin-top: 0.8rem;
}

.certificate-verify-signals div {
    min-width: 0;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: color-mix(in srgb, var(--secondary) 52%, var(--card));
    padding: 0.65rem;
}

.certificate-verify-signals span,
.certificate-verify-signals strong {
    display: block;
    min-width: 0;
    line-height: 1.35;
}

.certificate-verify-signals span {
    color: var(--muted-foreground);
    font-size: 0.72rem;
    font-weight: 800;
    text-transform: uppercase;
}

.certificate-verify-signals strong {
    margin-top: 0.12rem;
    color: var(--foreground);
    font-size: 0.86rem;
}

.certificate-status-card p {
    margin: 0;
    padding: 1rem;
    color: var(--muted-foreground);
    line-height: 1.55;
}

.compact-list {
    display: grid;
    gap: 0.55rem;
    padding: 1rem;
}

.compact-list > span {
    display: block;
    padding: 0.65rem 0.75rem;
    border: 1px solid color-mix(in srgb, var(--border) 70%, transparent);
    border-radius: 0.55rem;
    background: color-mix(in srgb, var(--muted) 48%, transparent);
    color: var(--foreground);
    font-size: 0.82rem;
    line-height: 1.45;
}

.insight-card {
    display: grid;
    gap: 0.75rem;
    margin-top: 0.85rem;
    padding: 1rem;
    border: 1px solid color-mix(in srgb, var(--primary) 20%, var(--border));
    border-radius: 0.8rem;
    background: color-mix(in srgb, var(--primary) 5%, var(--card));
}

.mini-table {
    display: grid;
    gap: 0.45rem;
}

.mini-table > div {
    display: flex;
    gap: 0.75rem;
    align-items: center;
    justify-content: space-between;
    padding: 0.55rem 0.65rem;
    border-radius: 0.55rem;
    background: color-mix(in srgb, var(--card) 80%, transparent);
    color: var(--muted-foreground);
    font-size: 0.76rem;
}

.mini-table strong {
    color: var(--foreground);
}

.compact-list .list-item {
    display: flex;
    gap: 0.75rem;
    align-items: center;
    justify-content: space-between;
    color: var(--foreground);
}

.compact-list .list-item span:first-child {
    display: grid;
    gap: 0.1rem;
    min-width: 0;
}

.compact-list .list-item strong,
.compact-list .list-item small {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.compact-list .list-item small {
    color: var(--muted-foreground);
    font-size: 0.72rem;
}

.check-row {
    display: flex;
    gap: 0.45rem;
    align-items: center;
    color: var(--foreground);
    font-size: 0.82rem;
    font-weight: 600;
}

.check-row input {
    width: 1rem;
    height: 1rem;
    accent-color: var(--primary);
}

.switch-control {
    position: relative;
    display: inline-grid;
    place-items: center;
    width: var(--icon-control-size);
    min-width: var(--icon-control-size);
    height: var(--icon-control-size);
    min-height: var(--icon-control-size);
    border: 0;
    border-radius: var(--radius-pill);
    background: transparent;
    color: var(--muted-foreground);
    padding: 0;
    cursor: pointer;
    user-select: none;
    transition: background var(--motion-fast), color var(--motion-fast), transform var(--motion-fast);
}

.switch-control > input[type="checkbox"] {
    position: absolute;
    width: 1px;
    height: 1px;
    margin: 0;
    opacity: 0;
    pointer-events: none;
}

.switch-control__icon {
    position: relative;
    display: inline-grid;
    place-items: center;
    width: 1.35rem;
    height: 1.35rem;
    color: currentColor;
}

.switch-control__icon-on,
.switch-control__icon-off {
    position: absolute;
    inset: 0;
    display: block;
    opacity: 0;
    transform: scale(0.82);
    transition: opacity var(--motion-fast), transform var(--motion-fast), color var(--motion-fast);
}

.switch-control__icon-on::before {
    position: absolute;
    left: 0.42rem;
    top: 0.2rem;
    width: 0.42rem;
    height: 0.78rem;
    border-right: 2px solid currentColor;
    border-bottom: 2px solid currentColor;
    border-radius: 1px;
    content: "";
    transform: rotate(45deg);
}

.switch-control__icon-off::before,
.switch-control__icon-off::after {
    position: absolute;
    left: 0.28rem;
    top: 0.62rem;
    width: 0.82rem;
    height: 2px;
    border-radius: 999px;
    background: currentColor;
    content: "";
}

.switch-control__icon-off::before {
    transform: rotate(45deg);
}

.switch-control__icon-off::after {
    transform: rotate(-45deg);
}

.switch-control__icon-off {
    color: var(--muted-foreground);
    opacity: 1;
    transform: scale(1);
}

.switch-control > input[type="checkbox"]:checked + .switch-control__icon {
    color: var(--primary);
}

.switch-control > input[type="checkbox"]:checked + .switch-control__icon .switch-control__icon-on {
    opacity: 1;
    transform: scale(1);
}

.switch-control > input[type="checkbox"]:checked + .switch-control__icon .switch-control__icon-off {
    opacity: 0;
    transform: scale(0.82);
}

.switch-control > input[type="checkbox"]:focus-visible + .switch-control__icon {
    border-radius: var(--radius-pill);
    outline: 2px solid var(--ring);
    outline-offset: 3px;
}

.switch-control:hover {
    background: color-mix(in srgb, var(--primary) 8%, transparent);
    color: var(--foreground);
}

.switch-control:active {
    transform: scale(0.96);
}

.switch-control > input[type="checkbox"]:disabled + .switch-control__icon {
    opacity: 0.48;
}

.check-field.switch-control,
.check-row.switch-control,
.admin-toggle-row .switch-control,
.admin-mini-toggle.switch-control,
.identity-switch-row .switch-control {
    border: 0;
    background: transparent;
    box-shadow: none;
    padding: 0;
    font-size: 0;
}

.switch-control--corner {
    position: absolute;
    top: 0.72rem;
    right: 0.8rem;
    z-index: 2;
}

.check-field.switch-control.switch-control--labeled {
    display: inline-flex;
    gap: 0.7rem;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    min-width: 0;
    height: auto;
    min-height: 2.45rem;
    border: 1px solid var(--border);
    border-radius: 0.45rem;
    background: var(--card);
    box-shadow: none;
    padding: 0.45rem 0.6rem;
    color: var(--foreground);
    font-size: 0.78rem;
    font-weight: 650;
}

.check-field.switch-control.switch-control--labeled:hover {
    border-color: color-mix(in srgb, var(--primary) 30%, var(--border));
    background: color-mix(in srgb, var(--primary) 4%, var(--card));
    color: var(--foreground);
}

.check-field.switch-control.switch-control--labeled:active {
    transform: none;
}

.switch-control--labeled .switch-control-text {
    min-width: 0;
    overflow-wrap: anywhere;
    line-height: 1.2;
}

.switch-control--labeled .switch-control__icon {
    display: inline-block;
    flex: 0 0 auto;
    width: 2.25rem;
    height: 1.25rem;
    border: 1px solid var(--border);
    border-radius: var(--radius-pill);
    background: color-mix(in srgb, var(--muted) 76%, var(--card));
    transition: background var(--motion-fast), border-color var(--motion-fast), box-shadow var(--motion-fast);
}

.switch-control--labeled .switch-control__icon::after {
    position: absolute;
    top: 50%;
    left: 0.16rem;
    width: 0.86rem;
    height: 0.86rem;
    border-radius: var(--radius-pill);
    background: var(--muted-foreground);
    box-shadow: 0 1px 2px color-mix(in srgb, var(--foreground) 16%, transparent);
    content: "";
    transform: translateY(-50%);
    transition: transform var(--motion-fast), background var(--motion-fast);
}

.switch-control--labeled .switch-control__icon-on,
.switch-control--labeled .switch-control__icon-off {
    display: none;
}

.switch-control--labeled > input[type="checkbox"]:checked + .switch-control__icon {
    border-color: color-mix(in srgb, var(--primary) 80%, var(--border));
    background: var(--primary);
}

.switch-control--labeled > input[type="checkbox"]:checked + .switch-control__icon::after {
    background: var(--primary-foreground);
    transform: translate(1rem, -50%);
}

.switch-control--labeled > input[type="checkbox"]:focus-visible + .switch-control__icon {
    outline: 2px solid var(--ring);
    outline-offset: 3px;
}

.profile-shell,
.profile-public-shell {
    gap: 1rem;
}

.profile-hero {
    position: relative;
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    gap: 1rem;
    align-items: center;
    overflow: hidden;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--card);
    padding: 1rem;
    box-shadow: var(--shadow);
}

.profile-command-hero {
    padding: clamp(1rem, 2vw, 1.35rem);
    box-shadow: var(--shadow-soft);
}

.profile-command-hero::before {
    position: absolute;
    inset: 0 0 auto;
    height: 0.18rem;
    background: linear-gradient(90deg, var(--primary), var(--success), var(--warning));
    content: "";
}

.profile-command-hero .profile-avatar {
    background: color-mix(in srgb, var(--secondary) 72%, var(--card));
}

.profile-hero h2,
.profile-hero p {
    margin: 0;
}

.profile-hero h2 {
    font-size: 1.08rem;
    line-height: 1.2;
}

.profile-hero p {
    margin-top: 0.25rem;
    color: var(--muted-foreground);
    font-size: 0.86rem;
}

.profile-avatar {
    display: grid;
    place-items: center;
    width: 4.5rem;
    height: 4.5rem;
    overflow: hidden;
    border: 1px solid var(--border);
    border-radius: 999px;
    background: var(--secondary);
    color: var(--primary);
    font-size: 1.2rem;
    font-weight: 800;
}

.profile-avatar-large {
    width: 5.5rem;
    height: 5.5rem;
}

.profile-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.profile-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.45rem;
    justify-content: end;
}

.profile-actions form {
    margin: 0;
}

.profile-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(280px, 0.36fr);
    gap: 1rem;
    align-items: start;
}

.profile-grid > *,
.profile-side > * {
    min-width: 0;
}

.profile-side {
    display: grid;
    gap: 1rem;
}

.metric-grid-tight {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    padding: 1rem;
}

.profile-copy {
    display: grid;
    gap: 0.75rem;
    padding: 1rem;
}

.profile-copy p {
    margin: 0;
    padding: 0;
    color: var(--foreground);
    font-size: 0.86rem;
}

.profile-contact {
    display: flex;
    flex-wrap: wrap;
    gap: 0.45rem;
    padding: 0 1rem 1rem;
}

.public-page {
    display: grid;
    gap: 1rem;
}

.public-content-shell {
    max-width: 1440px;
    margin: 0 auto;
    padding: 1rem;
}

.public-content-hero {
    align-items: center;
}

.public-content-hero h1 {
    max-width: 18ch;
    margin: 0 0 0.45rem;
    font-size: clamp(1.45rem, 2.4vw, 2.2rem);
    font-weight: 700;
    line-height: 1.05;
}

.public-content-hero p {
    max-width: 70ch;
}

.public-content-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1rem;
}

.public-page-hero {
    min-height: auto;
}

.public-workflow-timeline {
    display: grid;
    gap: 0.75rem;
}

.public-workflow-step {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    gap: 1rem;
    align-items: start;
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    background: var(--card);
    padding: 1rem;
    box-shadow: var(--shadow);
}

.public-workflow-step > span {
    display: grid;
    place-items: center;
    width: 2.4rem;
    height: 2.4rem;
    border: 1px solid color-mix(in srgb, var(--primary) 24%, var(--border));
    border-radius: var(--radius-md);
    background: color-mix(in srgb, var(--primary) 8%, var(--card));
    color: var(--primary);
    font-size: 0.78rem;
    font-weight: 850;
}

.public-workflow-step h2,
.public-workflow-step p {
    margin: 0;
}

.public-workflow-step h2 {
    font-size: 1rem;
}

.public-workflow-step p {
    margin-top: 0.25rem;
    color: var(--muted-foreground);
}

.public-workflow-step a {
    display: inline-flex;
    margin-top: 0.65rem;
    color: var(--primary);
    font-size: 0.78rem;
    font-weight: 800;
}

.public-how-page {
    gap: 1.2rem;
}

.how-hero .landing-hero-metrics {
    justify-content: flex-start;
    margin-top: 1rem;
}

.how-journey-demo {
    border-radius: var(--radius-lg);
}

.how-journey-tabs button {
    min-height: 3.15rem;
}

.how-journey-panel {
    padding: 0;
}

.how-journey-layout {
    display: grid;
    grid-template-columns: minmax(0, 0.72fr) minmax(22rem, 1fr);
    gap: 0;
    min-height: 30rem;
}

.how-journey-copy {
    display: grid;
    align-content: start;
    gap: 0.8rem;
    border-right: 1px solid var(--border);
    background: color-mix(in srgb, var(--secondary) 36%, var(--card));
    padding: clamp(1rem, 2.4vw, 1.5rem);
}

.how-journey-copy h2,
.how-journey-copy p,
.how-journey-preview h3,
.how-journey-preview p,
.how-outcome-grid p {
    margin: 0;
}

.how-journey-copy h2 {
    max-width: 16ch;
    font-size: clamp(1.35rem, 2.8vw, 2.15rem);
    line-height: 1.08;
}

.how-journey-copy p,
.how-journey-preview p,
.how-outcome-grid p {
    color: var(--muted-foreground);
    line-height: 1.6;
}

.how-journey-copy .button {
    width: fit-content;
}

.how-journey-stat {
    display: grid;
    gap: 0.12rem;
    width: fit-content;
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    background: var(--card);
    padding: 0.7rem 0.8rem;
}

.how-journey-stat strong {
    font-size: 1.25rem;
    line-height: 1;
}

.how-journey-stat span {
    color: var(--muted-foreground);
    font-size: 0.72rem;
    font-weight: 800;
    text-transform: uppercase;
}

.how-journey-workspace {
    display: grid;
    grid-template-columns: minmax(15rem, 0.48fr) minmax(0, 1fr);
    gap: 1rem;
    align-items: stretch;
    padding: clamp(1rem, 2.4vw, 1.5rem);
}

.how-journey-steps {
    display: grid;
    gap: 0.6rem;
    align-content: start;
}

.how-journey-step {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    gap: 0.5rem 0.65rem;
    align-items: center;
    min-height: 4.35rem;
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    background: var(--card);
    color: var(--foreground);
    padding: 0.62rem;
    cursor: pointer;
    font: inherit;
    text-align: left;
    transition: transform var(--motion-fast), border-color var(--motion-fast), background var(--motion-fast), box-shadow var(--motion-fast);
}

.how-journey-step:hover,
.how-journey-step:focus-visible,
.how-journey-step[aria-pressed="true"] {
    border-color: color-mix(in srgb, var(--primary) 36%, var(--border));
    background: color-mix(in srgb, var(--accent) 52%, var(--card));
    box-shadow: var(--shadow-soft);
    outline: none;
    transform: translateY(-1px);
}

.how-journey-step > span {
    display: grid;
    grid-row: span 2;
    place-items: center;
    width: 2rem;
    height: 2rem;
    border: 1px solid color-mix(in srgb, var(--primary) 26%, var(--border));
    border-radius: var(--radius-sm);
    background: color-mix(in srgb, var(--primary) 8%, var(--card));
    color: var(--primary);
    font-size: 0.72rem;
    font-weight: 900;
}

.how-journey-step strong {
    overflow: hidden;
    font-size: 0.82rem;
    line-height: 1.2;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.how-journey-step small {
    color: var(--muted-foreground);
    font-size: 0.7rem;
    font-weight: 750;
}

.how-journey-preview {
    position: relative;
    display: grid;
    align-content: start;
    gap: 0.85rem;
    overflow: hidden;
    min-height: 100%;
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    background: linear-gradient(135deg, color-mix(in srgb, var(--card) 92%, var(--primary)), var(--card));
    padding: clamp(1rem, 2.5vw, 1.35rem);
    box-shadow: var(--shadow);
}

.how-preview-topline {
    display: flex;
    flex-wrap: wrap;
    gap: 0.45rem;
    align-items: center;
    justify-content: space-between;
}

.how-preview-topline span,
.how-preview-topline strong {
    border: 1px solid var(--border);
    border-radius: var(--radius-pill);
    background: color-mix(in srgb, var(--secondary) 42%, var(--card));
    padding: 0.2rem 0.55rem;
    font-size: 0.7rem;
    font-weight: 850;
}

.how-preview-topline span {
    color: var(--primary);
}

.how-journey-preview h3 {
    max-width: 18ch;
    font-size: clamp(1.25rem, 2.4vw, 1.75rem);
    line-height: 1.08;
}

.how-preview-surface {
    display: grid;
    gap: 0.65rem;
    margin-top: auto;
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    background: color-mix(in srgb, var(--background) 65%, transparent);
    padding: 0.85rem;
}

.how-preview-surface span {
    display: block;
    height: 0.6rem;
    border-radius: var(--radius-pill);
    background: color-mix(in srgb, var(--primary) 18%, var(--secondary));
}

.how-preview-surface span:nth-child(2) {
    width: 74%;
}

.how-preview-surface span:nth-child(3) {
    width: 48%;
}

.how-tour-controls {
    padding: 0.85rem 1rem;
}

.how-outcome-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1rem;
}

.public-pricing-grid,
.public-policy-layout {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1rem;
}

.public-plan-card,
.public-policy-card,
.public-evidence-card {
    display: grid;
    gap: 1rem;
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    background: var(--card);
    padding: 1rem;
    box-shadow: var(--shadow);
}

.public-plan-card.is-featured {
    border-color: color-mix(in srgb, var(--primary) 38%, var(--border));
    box-shadow: var(--shadow-soft);
}

.public-plan-head {
    display: grid;
    gap: 0.35rem;
}

.public-plan-head h2,
.public-plan-head p,
.public-policy-card p {
    margin: 0;
}

.public-plan-head h2 {
    font-size: 1.15rem;
}

.public-plan-head strong {
    color: var(--foreground);
    font-size: 1.6rem;
    line-height: 1.1;
}

.public-plan-head p,
.public-policy-card p {
    color: var(--muted-foreground);
}

.pricing-hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.65rem;
    align-items: center;
    justify-content: flex-end;
}

.pricing-toggle {
    display: inline-grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.2rem;
    min-width: 12rem;
    border: 1px solid var(--border);
    border-radius: var(--radius-pill);
    background: var(--card);
    padding: 0.22rem;
}

.pricing-toggle button {
    min-height: 2rem;
    border: 0;
    border-radius: var(--radius-pill);
    background: transparent;
    color: var(--muted-foreground);
    cursor: pointer;
    font: inherit;
    font-size: 0.76rem;
    font-weight: 800;
    transition: background var(--motion-fast), color var(--motion-fast), box-shadow var(--motion-fast);
}

.pricing-toggle button:hover,
.pricing-toggle button:focus-visible,
.pricing-toggle button[aria-pressed="true"] {
    background: var(--primary);
    color: var(--primary-foreground);
    outline: none;
    box-shadow: var(--shadow-soft);
}

.pricing-trust-strip {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 0.75rem;
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    background: color-mix(in srgb, var(--secondary) 42%, var(--card));
    padding: 0.85rem;
}

.pricing-trust-strip span {
    display: grid;
    gap: 0.12rem;
    min-width: 0;
}

.pricing-trust-strip strong {
    font-size: 0.82rem;
}

.pricing-trust-strip small,
.public-plan-head small {
    color: var(--muted-foreground);
    font-size: 0.72rem;
    line-height: 1.4;
}

.pricing-plan-card {
    align-content: start;
}

.pricing-plan-card.is-featured {
    position: relative;
}

.pricing-plan-card.is-featured::before {
    position: absolute;
    top: 0.85rem;
    right: 0.85rem;
    border: 1px solid color-mix(in srgb, var(--primary) 35%, var(--border));
    border-radius: var(--radius-pill);
    background: color-mix(in srgb, var(--primary) 10%, var(--card));
    color: var(--primary);
    padding: 0.2rem 0.5rem;
    content: "Recommended";
    font-size: 0.66rem;
    font-weight: 850;
}

.pricing-comparison-card {
    overflow: hidden;
}

.pricing-comparison-table {
    min-width: 46rem;
}

.pricing-comparison-table td:first-child,
.pricing-comparison-table th:first-child {
    min-width: 15rem;
    font-weight: 800;
}

.pricing-implementation-grid {
    display: grid;
    grid-template-columns: minmax(0, 0.95fr) minmax(280px, 0.7fr);
    gap: 1rem;
}

.pricing-rollout-steps {
    display: grid;
    gap: 0.65rem;
    padding: 1rem;
}

.pricing-rollout-steps span {
    display: grid;
    gap: 0.12rem;
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    background: color-mix(in srgb, var(--secondary) 40%, var(--card));
    padding: 0.7rem;
}

.pricing-rollout-steps strong {
    font-size: 0.84rem;
}

.pricing-rollout-steps small {
    color: var(--muted-foreground);
    font-size: 0.74rem;
    line-height: 1.45;
}

.pricing-sticky-cta {
    position: sticky;
    bottom: max(0.75rem, env(safe-area-inset-bottom));
    z-index: 15;
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    align-items: center;
    justify-content: space-between;
    border: 1px solid color-mix(in srgb, var(--primary) 28%, var(--border));
    border-radius: var(--radius-lg);
    background: color-mix(in srgb, var(--card) 96%, var(--background));
    padding: 0.75rem;
    box-shadow: var(--shadow-elevated);
}

.pricing-sticky-cta > span {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    align-items: center;
}

.pricing-sticky-cta strong,
.pricing-sticky-cta small {
    display: block;
}

.pricing-sticky-cta small {
    color: var(--muted-foreground);
    font-size: 0.74rem;
}

.public-content-card {
    min-width: 0;
}

.public-content-card > p,
.public-policy-card > p {
    margin: 0;
    padding: 1rem 1rem 0;
    color: var(--muted-foreground);
    font-size: 0.9rem;
    line-height: 1.65;
}

.public-point-list {
    display: grid;
    gap: 0.55rem;
    margin: 0;
    padding: 1rem 1.25rem 1.1rem 2rem;
    color: var(--foreground);
    font-size: 0.88rem;
}

.public-point-list li::marker {
    color: var(--primary);
}

.public-form-grid {
    align-items: start;
}

.public-route-list {
    display: grid;
    gap: 0.6rem;
    padding: 1rem;
}

.public-route-list a {
    display: grid;
    gap: 0.2rem;
    border: 1px solid var(--border);
    border-radius: 0.55rem;
    background: var(--muted);
    color: var(--foreground);
    padding: 0.75rem;
    text-decoration: none;
    transition: border-color 180ms ease, background 180ms ease, transform 180ms ease;
}

.public-route-list a:hover,
.public-route-list a:focus-visible {
    border-color: var(--primary);
    background: var(--background);
    transform: translateY(-1px);
}

.public-route-list span {
    color: var(--muted-foreground);
    font-size: 0.82rem;
}

.public-cookie-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.65rem;
    padding: 1rem;
}

.public-legal-page {
    gap: 1.15rem;
}

.public-legal-operator {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    gap: 0.85rem;
    align-items: start;
    border: 1px solid color-mix(in srgb, var(--primary) 28%, var(--border));
    border-radius: var(--radius-lg);
    background: color-mix(in srgb, var(--primary) 5%, var(--card));
    padding: 1rem;
}

.public-legal-operator .badge {
    margin-top: 0.08rem;
    white-space: nowrap;
}

.public-legal-operator strong,
.public-legal-operator p {
    display: block;
    margin: 0;
}

.public-legal-operator strong {
    color: var(--foreground);
    font-size: 0.92rem;
}

.public-legal-operator p {
    margin-top: 0.25rem;
    color: var(--muted-foreground);
    font-size: 0.82rem;
    line-height: 1.55;
}

.public-legal-layout {
    display: grid;
    grid-template-columns: minmax(11rem, 0.28fr) minmax(0, 1fr);
    gap: clamp(1.25rem, 3vw, 2.5rem);
    align-items: start;
}

.public-legal-toc {
    position: sticky;
    top: 5.5rem;
    display: grid;
    gap: 0.18rem;
    max-height: calc(100vh - 7rem);
    border-left: 1px solid var(--border);
    padding: 0.2rem 0 0.2rem 0.8rem;
    overflow-y: auto;
    overscroll-behavior: contain;
}

.public-legal-toc .section-label {
    margin-bottom: 0.35rem;
}

.public-legal-toc a {
    display: block;
    border-radius: 0.35rem;
    color: var(--muted-foreground);
    padding: 0.35rem 0.45rem;
    font-size: 0.76rem;
    font-weight: 700;
    line-height: 1.3;
    text-decoration: none;
    transition: background var(--motion-fast), color var(--motion-fast);
}

.public-legal-toc a:hover,
.public-legal-toc a:focus-visible {
    background: color-mix(in srgb, var(--primary) 8%, var(--card));
    color: var(--primary);
    outline: none;
}

.public-legal-document {
    min-width: 0;
    border-top: 1px solid var(--border);
}

.public-legal-section {
    min-width: 0;
    padding: clamp(1.15rem, 2vw, 1.65rem) 0;
    border-bottom: 1px solid var(--border);
    scroll-margin-top: 6rem;
}

.public-legal-heading {
    display: grid;
    grid-template-columns: 2rem minmax(0, 1fr);
    gap: 0.65rem;
    align-items: start;
    margin-bottom: 0.75rem;
}

.public-legal-heading > span {
    display: grid;
    place-items: center;
    width: 2rem;
    height: 2rem;
    border: 1px solid color-mix(in srgb, var(--primary) 28%, var(--border));
    border-radius: var(--radius-pill);
    background: color-mix(in srgb, var(--primary) 7%, var(--card));
    color: var(--primary);
    font-size: 0.68rem;
    font-weight: 850;
}

.public-legal-heading h2 {
    margin: 0;
    font-size: clamp(1.05rem, 1.6vw, 1.3rem);
    line-height: 1.25;
}

.public-legal-section h3 {
    margin: 1.05rem 0 0.35rem;
    color: var(--foreground);
    font-size: 0.9rem;
    line-height: 1.35;
}

.public-legal-section p,
.public-legal-section li {
    color: var(--muted-foreground);
    font-size: 0.86rem;
    line-height: 1.7;
}

.public-legal-section p {
    max-width: 82ch;
    margin: 0.65rem 0 0;
}

.public-legal-section p:first-of-type {
    margin-top: 0;
}

.public-legal-section ul,
.public-legal-section ol {
    display: grid;
    gap: 0.45rem;
    max-width: 82ch;
    margin: 0.75rem 0 0;
    padding-left: 1.25rem;
}

.public-legal-section li::marker {
    color: var(--primary);
    font-weight: 800;
}

.public-legal-section a {
    color: var(--primary);
    font-weight: 750;
    text-underline-offset: 0.16rem;
}

.public-legal-table-wrap {
    width: 100%;
    margin-top: 0.85rem;
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    overflow-x: auto;
    background: var(--card);
    scrollbar-gutter: stable;
}

.public-legal-table {
    width: 100%;
    min-width: 42rem;
    border-collapse: collapse;
    table-layout: auto;
}

.public-legal-table th,
.public-legal-table td {
    padding: 0.75rem;
    border-bottom: 1px solid var(--border);
    color: var(--muted-foreground);
    font-size: 0.76rem;
    line-height: 1.5;
    text-align: left;
    vertical-align: top;
}

.public-legal-table th {
    background: color-mix(in srgb, var(--secondary) 58%, var(--card));
    color: var(--foreground);
    font-size: 0.68rem;
    font-weight: 850;
    text-transform: uppercase;
}

.public-legal-table th:first-child,
.public-legal-table td:first-child {
    width: 10.5rem;
    color: var(--foreground);
    font-weight: 750;
}

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

.public-legal-table code {
    white-space: nowrap;
}

.public-legal-contact {
    max-width: 40rem;
    border-left: 3px solid var(--primary);
    background: color-mix(in srgb, var(--secondary) 42%, transparent);
    padding: 0.85rem 1rem;
    color: var(--muted-foreground);
    font-size: 0.84rem;
    font-style: normal;
    line-height: 1.65;
}

.public-legal-contact strong {
    color: var(--foreground);
}

.public-cookie-current {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem 0.75rem;
    align-items: center;
    justify-content: space-between;
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    background: color-mix(in srgb, var(--secondary) 44%, var(--card));
    padding: 0.75rem;
}

.public-cookie-current span {
    color: var(--muted-foreground);
    font-size: 0.74rem;
    font-weight: 750;
}

.public-cookie-current strong {
    color: var(--foreground);
    font-size: 0.8rem;
}

.public-cookie-preference-form {
    display: grid;
    margin-top: 0.85rem;
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    background: var(--card);
    padding: 0 0.9rem 0.9rem;
}

.public-cookie-preference-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 1rem;
    align-items: center;
    min-height: 4.25rem;
    border-bottom: 1px solid var(--border);
    padding: 0.7rem 0;
}

.public-cookie-preference-row label:not(.switch-control) {
    color: var(--foreground);
    font-size: 0.84rem;
    font-weight: 800;
}

.public-cookie-preference-row p {
    margin: 0.12rem 0 0;
    font-size: 0.75rem;
    line-height: 1.45;
}

.public-cookie-preference-row .switch-control--labeled {
    width: 2.25rem;
    min-width: 2.25rem;
    height: 1.25rem;
    min-height: 1.25rem;
}

.public-cookie-preference-form .public-cookie-actions {
    padding: 0.9rem 0 0;
}

@media (max-width: 820px) {
    .public-legal-layout {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .public-legal-toc {
        position: static;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        max-height: none;
        border: 1px solid var(--border);
        border-radius: var(--radius-md);
        padding: 0.7rem;
        overflow: visible;
    }

    .public-legal-toc .section-label {
        grid-column: 1 / -1;
    }
}

@media (max-width: 640px) {
    .public-legal-operator {
        grid-template-columns: 1fr;
    }

    .public-legal-operator .badge {
        width: fit-content;
        white-space: normal;
    }

    .public-legal-toc {
        grid-template-columns: 1fr;
    }

    .public-cookie-preference-row {
        gap: 0.65rem;
    }

    .public-cookie-preference-form .public-cookie-actions .button {
        flex: 1 1 10rem;
    }
}

.public-profile-lookup {
    align-items: center;
}

.public-lookup-hero h1 {
    max-width: 18ch;
    margin: 0 0 0.3rem;
    font-size: clamp(1.35rem, 2.4vw, 2rem);
    font-weight: 700;
    line-height: 1.05;
}

.public-profile-hero {
    box-shadow: var(--shadow-soft);
}

.public-profile-hero::before {
    position: absolute;
    inset: 0 0 auto;
    height: 0.18rem;
    background: linear-gradient(90deg, var(--primary), var(--success), var(--warning));
    content: "";
}

.lookup-form {
    display: grid;
    grid-template-columns: minmax(12rem, 1fr) auto;
    gap: 0.5rem;
    width: min(28rem, 100%);
}

.lookup-form input {
    min-height: 2.3rem;
    border: 1px solid var(--input);
    border-radius: 0.45rem;
    background: var(--background);
    color: var(--foreground);
    padding: 0.45rem 0.65rem;
    font: inherit;
    font-size: 0.86rem;
}

.notes-drawer-overlay {
    position: fixed;
    inset: 0;
    z-index: 65;
    display: none;
    background: rgba(15, 23, 42, 0.28);
}

.notes-drawer {
    position: fixed;
    top: 0;
    right: 0;
    z-index: 70;
    display: grid;
    grid-template-rows: auto auto minmax(0, 1fr) auto;
    width: min(25rem, 94vw);
    height: 100vh;
    border-left: 1px solid var(--border);
    background: var(--card);
    box-shadow: -12px 0 24px rgba(15, 23, 42, 0.16);
    transform: translateX(102%);
    transition: transform 180ms ease;
}

.notes-drawer-open .notes-drawer {
    transform: translateX(0);
}

.notes-drawer-open .notes-drawer-overlay {
    display: block;
}

.notes-drawer-header {
    display: flex;
    align-items: start;
    justify-content: space-between;
    gap: 0.75rem;
    border-bottom: 1px solid var(--border);
    padding: 0.85rem 1rem;
}

.notes-drawer-header h2 {
    margin: 0.15rem 0 0;
    font-size: 0.98rem;
}

.notes-drawer-status {
    border-bottom: 1px solid var(--border);
    padding: 0.45rem 1rem;
    color: var(--muted-foreground);
    font-size: 0.75rem;
    font-weight: 700;
}

.notes-drawer-status[data-state="saved"] {
    color: var(--success);
}

.notes-drawer-status[data-state="error"] {
    color: var(--destructive);
}

.notes-drawer-list {
    display: grid;
    align-content: start;
    gap: 0.5rem;
    overflow-y: auto;
    padding: 0.85rem 1rem;
}

.notes-drawer-note {
    display: grid;
    gap: 0.25rem;
    width: 100%;
    border: 1px solid var(--border);
    border-radius: 0.45rem;
    background: var(--background);
    color: var(--foreground);
    padding: 0.65rem;
    text-align: left;
    cursor: pointer;
}

.notes-drawer-note:hover,
.notes-drawer-note:focus-visible {
    border-color: var(--ring);
    outline: none;
}

.notes-drawer-note strong,
.notes-drawer-note small {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.notes-drawer-note small {
    color: var(--muted-foreground);
    font-size: 0.72rem;
}

.notes-drawer-form {
    border-top: 1px solid var(--border);
    background: var(--card);
}

.identity-metric-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.identity-user-grid,
.identity-admin-grid {
    align-items: start;
}

.identity-provider-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1rem;
    align-items: start;
}

.identity-provider-grid > *,
.identity-user-grid > *,
.identity-admin-grid > * {
    min-width: 0;
}

.identity-admin-grid #reviews {
    grid-column: 1 / -1;
}

.identity-provider-form-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.65rem;
}

.identity-provider-form-grid .field:first-child,
.identity-provider-form-grid .field:nth-child(2) {
    grid-column: span 1;
}

.identity-switch-row {
    display: flex;
    flex-wrap: wrap;
    gap: 0.45rem;
    align-items: center;
}

.identity-switch-row label {
    display: inline-flex;
    gap: 0.35rem;
    align-items: center;
    min-height: 1.85rem;
    border: 1px solid var(--border);
    border-radius: 999px;
    background: var(--secondary);
    padding: 0.2rem 0.55rem;
    color: var(--muted-foreground);
    font-size: 0.74rem;
    font-weight: 700;
}

.identity-switch-row input[type="checkbox"] {
    width: 0.9rem;
    height: 0.9rem;
    accent-color: var(--primary);
}

.identity-health-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.55rem;
    margin: 0;
    padding: 1rem;
}

.identity-health-grid div {
    min-width: 0;
    border: 1px solid var(--border);
    border-radius: 0.45rem;
    background: var(--secondary);
    padding: 0.55rem 0.65rem;
}

.identity-health-grid dt,
.identity-health-grid dd {
    margin: 0;
}

.identity-health-grid dt {
    color: var(--muted-foreground);
    font-size: 0.68rem;
    font-weight: 750;
    text-transform: uppercase;
}

.identity-health-grid dd {
    color: var(--foreground);
    font-size: 1.1rem;
    font-weight: 800;
}

.identity-review-actions {
    align-items: stretch;
}

.identity-review-table {
    min-width: 58rem;
}

.identity-review-table td[data-label="Submitted"] {
    white-space: nowrap;
}

.identity-review-table td[data-label="User"] {
    min-width: 16rem;
}

.identity-review-table td[data-label="User"] .compact-text {
    overflow-wrap: anywhere;
    word-break: normal;
}

.identity-review-table .table-action-cell {
    min-width: 18rem;
}

.identity-reject-form {
    display: flex;
    gap: 0.4rem;
    align-items: center;
}

.identity-reject-form input {
    width: min(12rem, 100%);
    min-height: 1.9rem;
    border: 1px solid var(--input);
    border-radius: 0.45rem;
    background: var(--background);
    color: var(--foreground);
    padding: 0.25rem 0.5rem;
    font: inherit;
    font-size: 0.78rem;
}

.field-error {
    color: var(--destructive);
    font-size: 0.74rem;
}

.billing-metric-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.billing-main-grid,
.billing-ledger-grid,
.billing-admin-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1rem;
    align-items: start;
}

.billing-plan-admin-grid {
    display: grid;
    gap: 1rem;
    align-items: start;
}

.billing-main-grid > *,
.billing-ledger-grid > *,
.billing-admin-grid > *,
.billing-plan-admin-grid > *,
.billing-plan-grid > * {
    min-width: 0;
}

.billing-plan-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1rem;
    align-items: stretch;
}

.billing-plan-card {
    display: grid;
    grid-template-rows: auto auto auto 1fr auto;
}

.billing-price-block {
    display: grid;
    gap: 0.15rem;
    padding: 1rem 1rem 0.75rem;
}

.billing-price-block strong {
    color: var(--foreground);
    font-size: 1.3rem;
    line-height: 1;
}

.billing-price-block span,
.billing-price-block small {
    color: var(--muted-foreground);
    font-size: 0.75rem;
    font-weight: 650;
}

.billing-limit-grid,
.billing-detail-list {
    display: grid;
    gap: 0.45rem;
    margin: 0;
    padding: 0.85rem 1rem;
}

.billing-limit-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.billing-limit-grid div,
.billing-detail-list div {
    min-width: 0;
    border: 1px solid var(--border);
    border-radius: 0.45rem;
    background: var(--secondary);
    padding: 0.45rem 0.55rem;
}

.billing-limit-grid dt,
.billing-limit-grid dd,
.billing-detail-list dt,
.billing-detail-list dd {
    margin: 0;
}

.billing-limit-grid dt,
.billing-detail-list dt {
    color: var(--muted-foreground);
    font-size: 0.66rem;
    font-weight: 750;
    text-transform: uppercase;
}

.billing-limit-grid dd,
.billing-detail-list dd {
    overflow-wrap: anywhere;
    color: var(--foreground);
    font-size: 0.82rem;
    font-weight: 800;
}

.billing-feature-list {
    display: grid;
    align-content: start;
    gap: 0.35rem;
    margin: 0;
    padding: 0 1rem 0.85rem;
    list-style: none;
}

.billing-feature-list li {
    position: relative;
    padding-left: 1rem;
    color: var(--muted-foreground);
    font-size: 0.78rem;
}

.billing-feature-list li::before {
    position: absolute;
    left: 0;
    color: var(--success);
    content: "✓";
    font-weight: 800;
}

.billing-gateway-form-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.billing-plan-admin-form-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.billing-plan-admin-card textarea {
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
    font-size: 0.78rem;
    line-height: 1.5;
}

.billing-ledger-grid .stacked-table {
    min-width: 36rem;
}

.billing-admin-orders-table {
    min-width: 48rem;
}

.billing-page .stacked-table td[data-label="Total"],
.billing-page .stacked-table td[data-label="Created"],
.billing-page .stacked-table td[data-label="Date"],
.billing-page .stacked-table td[data-label="Reset at"] {
    white-space: nowrap;
}

.billing-page .table-action-cell form {
    display: inline-flex;
    margin: 0;
}

.billing-page .table-action-cell .muted {
    display: block;
}

.button:disabled,
.field select:disabled {
    cursor: not-allowed;
    opacity: 0.55;
}

.button[data-loading="true"]:disabled,
.button[aria-busy="true"]:disabled {
    cursor: progress;
    opacity: 0.88;
}

.admin-metric-grid {
    grid-template-columns: repeat(6, minmax(0, 1fr));
}

.admin-page {
    align-content: start;
    gap: 0.85rem;
}

.admin-page .card,
.admin-page .metric-card,
.admin-command-hero {
    transition: border-color var(--motion-fast), box-shadow var(--motion-fast), background var(--motion-fast);
}

.admin-page .card,
.admin-page .metric-card {
    border-radius: 0.5rem;
    box-shadow: none;
}

.admin-ops-header,
.admin-module-header {
    display: flex;
    gap: 1rem;
    align-items: end;
    justify-content: space-between;
    min-width: 0;
    border-bottom: 1px solid var(--border);
    padding: 0.25rem 0 0.9rem;
}

.admin-ops-heading,
.admin-module-heading {
    display: grid;
    gap: 0.28rem;
    min-width: 0;
}

.admin-ops-heading h2,
.admin-module-heading h2,
.admin-ops-heading p,
.admin-module-heading p {
    margin: 0;
}

.admin-ops-heading h2,
.admin-module-heading h2 {
    color: var(--foreground);
    font-size: clamp(1.35rem, 2vw, 1.75rem);
    line-height: 1.1;
}

.admin-ops-heading p,
.admin-module-heading p {
    max-width: 52rem;
    color: var(--muted-foreground);
    font-size: 0.8rem;
    line-height: 1.45;
}

.admin-ops-actions,
.admin-module-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.45rem;
    align-items: center;
    justify-content: flex-end;
}

.admin-ops-state {
    display: inline-flex;
    gap: 0.4rem;
    align-items: center;
    min-height: 2.15rem;
    border: 1px solid var(--border);
    border-radius: 0.42rem;
    background: var(--card);
    padding: 0.4rem 0.65rem;
    color: var(--muted-foreground);
    font-size: 0.72rem;
    font-weight: 800;
}

.admin-ops-state > span {
    width: 0.48rem;
    height: 0.48rem;
    border-radius: 999px;
    background: currentColor;
}

.admin-ops-state.badge-success {
    color: var(--success);
}

.admin-ops-state.badge-warning {
    color: var(--warning);
}

.admin-ops-state.badge-fail {
    color: var(--destructive);
}

.admin-attention-board {
    display: grid;
    gap: 0;
    overflow: hidden;
    border: 1px solid var(--border);
    border-radius: 0.5rem;
    background: var(--card);
}

.admin-attention-heading {
    display: flex;
    gap: 1rem;
    align-items: end;
    justify-content: space-between;
    border-bottom: 1px solid var(--border);
    padding: 0.72rem 0.85rem;
}

.admin-attention-heading h3,
.admin-attention-heading small {
    margin: 0;
}

.admin-attention-heading h3 {
    margin-top: 0.18rem;
    color: var(--foreground);
    font-size: 0.94rem;
    line-height: 1.25;
}

.admin-attention-heading small {
    color: var(--muted-foreground);
    font-size: 0.7rem;
}

.admin-attention-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.admin-attention-item {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    gap: 0.65rem;
    align-items: center;
    min-width: 0;
    border-right: 1px solid var(--border);
    padding: 0.78rem 0.85rem;
    color: inherit;
    transition: background var(--motion-fast), color var(--motion-fast);
}

.admin-attention-item:last-child {
    border-right: 0;
}

.admin-attention-item:hover,
.admin-attention-item:focus-visible {
    background: var(--secondary);
    outline: none;
}

.admin-attention-value {
    min-width: 1.8rem;
    color: var(--foreground);
    font-size: 1.2rem;
    font-weight: 850;
    line-height: 1;
}

.admin-attention-value.is-warning {
    color: var(--warning);
}

.admin-attention-value.is-clear {
    color: var(--success);
}

.admin-attention-copy {
    display: grid;
    gap: 0.12rem;
    min-width: 0;
}

.admin-attention-copy strong,
.admin-attention-copy small {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.admin-attention-copy strong {
    color: var(--foreground);
    font-size: 0.76rem;
}

.admin-attention-copy small {
    color: var(--muted-foreground);
    font-size: 0.66rem;
}

.admin-attention-arrow {
    color: var(--muted-foreground);
    font-size: 0.85rem;
}

.admin-overview-tabs {
    display: grid;
    gap: 0.75rem;
}

.admin-entity-tabs {
    display: grid;
    gap: 0.75rem;
    min-width: 0;
}

.admin-entity-tabs > .admin-page-tabs {
    margin-bottom: 0;
}

.admin-entity-tabs > .admin-tab-panel > .card {
    width: 100%;
}

.admin-entity-tabs .settings-section {
    border-radius: 0.42rem;
}

.admin-overview-tabs > .admin-page-tabs {
    margin-bottom: 0;
}

.admin-dashboard-primary-grid {
    grid-template-columns: minmax(0, 1.15fr) minmax(18rem, 0.85fr);
}

.admin-dashboard-stack {
    display: grid;
    gap: 0.85rem;
    align-content: start;
    min-width: 0;
}

.admin-runtime-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.admin-page .card-header {
    min-height: 3.9rem;
    padding: 0.75rem 0.85rem;
}

.admin-page .card-header h2 {
    font-size: 0.96rem;
    line-height: 1.2;
}

.admin-page .card-subtitle {
    margin-top: 0.15rem;
    font-size: 0.7rem;
    line-height: 1.35;
}

.admin-page .metric-card {
    gap: 0.24rem;
    min-height: 5.4rem;
    padding: 0.72rem 0.78rem;
}

.admin-page .metric-card > span {
    color: var(--muted-foreground);
    font-size: 0.65rem;
    font-weight: 800;
    text-transform: uppercase;
}

.admin-page .metric-card > strong {
    margin-top: auto;
    font-size: 1.15rem;
    line-height: 1.08;
}

.admin-page .filter-bar {
    border-top: 0;
    background: color-mix(in srgb, var(--secondary) 58%, var(--card));
    padding: 0.75rem 0.85rem;
}

.admin-page .table-wrap {
    border-top: 1px solid var(--border);
}

.admin-page .table-wrap table thead th {
    height: 2.5rem;
    background: color-mix(in srgb, var(--secondary) 62%, var(--card));
    color: var(--muted-foreground);
    font-size: 0.65rem;
    font-weight: 850;
    text-transform: uppercase;
}

.admin-command-hero {
    grid-template-columns: minmax(0, 0.95fr) minmax(22rem, 0.74fr);
    align-items: stretch;
    overflow: hidden;
    background:
        linear-gradient(135deg, color-mix(in srgb, var(--primary) 7%, var(--card)), var(--card) 42%),
        var(--card);
}

.admin-page-tabs,
.admin-route-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 0.45rem;
    align-items: center;
    border: 1px solid var(--border);
    border-radius: 0.5rem;
    background: var(--card);
    box-shadow: none;
    padding: 0.35rem;
}

.workspace-role-super-admin .admin-route-tabs {
    position: sticky;
    top: 4.05rem;
    z-index: 12;
}

.admin-page-tabs {
    margin-bottom: 1rem;
}

.admin-route-tabs a,
.admin-page-tabs button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 2rem;
    border: 1px solid transparent;
    border-radius: 0.45rem;
    background: transparent;
    color: var(--muted-foreground);
    cursor: pointer;
    font: inherit;
    font-size: 0.74rem;
    font-weight: 800;
    line-height: 1;
    padding: 0.45rem 0.68rem;
    text-decoration: none;
    transition: background var(--motion-fast), border-color var(--motion-fast), color var(--motion-fast), box-shadow var(--motion-fast);
}

.admin-route-tabs a:hover,
.admin-route-tabs a:focus-visible,
.admin-page-tabs button:hover,
.admin-page-tabs button:focus-visible,
.admin-route-tabs a[aria-current="page"],
.admin-page-tabs button[aria-selected="true"] {
    border-color: color-mix(in srgb, var(--primary) 24%, var(--border));
    background: var(--card);
    color: var(--foreground);
    box-shadow: none;
    outline: none;
}

.admin-tab-panel[hidden] {
    display: none;
}

.admin-command-copy {
    display: grid;
    align-content: center;
    gap: 0.45rem;
}

.admin-command-copy h2 {
    margin: 0;
    font-size: clamp(1.35rem, 3vw, 2.15rem);
    line-height: 1.05;
}

.admin-command-actions {
    margin-top: 0.35rem;
}

.admin-signal-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.65rem;
    min-width: 0;
}

.admin-signal-card {
    display: grid;
    align-content: space-between;
    gap: 0.35rem;
    min-width: 0;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: color-mix(in srgb, var(--background) 72%, var(--card));
    padding: 0.75rem;
}

.admin-signal-card span,
.admin-metric-card small {
    color: var(--muted-foreground);
    font-size: 0.68rem;
    font-weight: 800;
    text-transform: uppercase;
}

.admin-signal-card strong {
    overflow: hidden;
    color: var(--foreground);
    font-size: 1.1rem;
    line-height: 1;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.admin-signal-card strong.badge-success {
    color: var(--success);
}

.admin-signal-card strong.badge-warning {
    color: var(--warning);
}

.admin-signal-card strong.badge-fail {
    color: var(--destructive);
}

.admin-signal-card small {
    color: var(--muted-foreground);
    font-size: 0.72rem;
    line-height: 1.35;
}

.super-admin-hero {
    min-height: 14rem;
}

.super-admin-kpi-grid {
    grid-template-columns: repeat(auto-fit, minmax(9.5rem, 1fr));
    gap: 0.75rem;
}

.super-admin-kpi-card {
    min-height: 5.85rem;
}

.super-admin-kpi-card strong {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.super-admin-kpi-card strong.badge-success {
    color: var(--success);
}

.super-admin-kpi-card strong.badge-warning {
    color: var(--warning);
}

.super-admin-kpi-card strong.badge-fail {
    color: var(--destructive);
}

.super-admin-kpi-card strong.badge-success,
.super-admin-kpi-card strong.badge-warning,
.super-admin-kpi-card strong.badge-fail {
    width: auto;
    border: 0;
    border-radius: 0;
    background: transparent;
    padding: 0;
}

.super-admin-kpi-card small {
    color: var(--muted-foreground);
    font-size: 0.72rem;
    line-height: 1.35;
}

.super-admin-section-nav {
    align-items: center;
}

.super-admin-dashboard-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(18rem, 1fr));
    gap: 1rem;
    align-items: start;
    grid-auto-flow: dense;
}

.super-admin-dashboard-grid > *,
.super-admin-module-grid > *,
.super-admin-list-item > span:first-child {
    min-width: 0;
}

.super-admin-list-card,
.super-admin-ai-card,
.super-admin-module-card {
    display: grid;
    grid-template-rows: auto minmax(0, 1fr);
}

.super-admin-list {
    display: grid;
    gap: 0.45rem;
    align-content: start;
    padding: 0.75rem;
}

.super-admin-list-item {
    display: flex;
    gap: 0.75rem;
    align-items: center;
    justify-content: space-between;
    min-width: 0;
    border: 1px solid var(--border);
    border-radius: 0.5rem;
    background: color-mix(in srgb, var(--secondary) 50%, var(--card));
    padding: 0.58rem 0.65rem;
    color: inherit;
    cursor: pointer;
    transition: border-color var(--motion-fast), background var(--motion-fast), box-shadow var(--motion-fast), transform var(--motion-fast);
}

.super-admin-list-item:hover,
.super-admin-list-item:focus-visible {
    border-color: color-mix(in srgb, var(--primary) 30%, var(--border));
    background: var(--card);
    box-shadow: var(--shadow-soft);
    outline: none;
    transform: translateY(-1px);
}

.super-admin-list-item strong {
    display: block;
    overflow: hidden;
    color: var(--foreground);
    font-size: 0.86rem;
    line-height: 1.25;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.super-admin-list-item small {
    display: block;
    overflow: hidden;
    margin-top: 0.18rem;
    color: var(--muted-foreground);
    font-size: 0.72rem;
    line-height: 1.35;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.super-admin-list-item .badge {
    flex: 0 0 auto;
}

.super-admin-module-section {
    display: grid;
    gap: 1rem;
}

.super-admin-section-header {
    display: flex;
    gap: 1rem;
    align-items: end;
    justify-content: space-between;
}

.super-admin-section-header h2,
.super-admin-section-header p {
    margin: 0;
}

.super-admin-section-header h2 {
    font-size: 1.2rem;
    line-height: 1.18;
}

.super-admin-section-header p {
    margin-top: 0.25rem;
    color: var(--muted-foreground);
    font-size: 0.82rem;
}

.super-admin-module-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1rem;
    align-items: stretch;
}

.super-admin-module-card {
    grid-template-rows: auto minmax(0, 1fr) auto;
}

.super-admin-module-stats {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.55rem;
    padding: 1rem;
}

.super-admin-module-stats div {
    display: grid;
    gap: 0.24rem;
    min-width: 0;
    border: 1px solid var(--border);
    border-radius: 0.45rem;
    background: color-mix(in srgb, var(--secondary) 58%, var(--card));
    padding: 0.62rem;
}

.super-admin-module-stats span {
    overflow: hidden;
    color: var(--muted-foreground);
    font-size: 0.68rem;
    font-weight: 800;
    text-overflow: ellipsis;
    text-transform: uppercase;
    white-space: nowrap;
}

.super-admin-module-stats strong {
    overflow: hidden;
    color: var(--foreground);
    font-size: 0.95rem;
    line-height: 1.1;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.super-admin-module-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.45rem;
    align-items: center;
    border-top: 1px solid var(--border);
    padding: 0.85rem 1rem 1rem;
}

.admin-metric-card {
    display: grid;
    gap: 0.24rem;
    min-height: 6.7rem;
}

.admin-section-page .card-header {
    padding-block: 0.72rem;
}

.admin-section-page .filter-bar,
.admin-section-page .form-stack,
.admin-section-page .settings-section {
    gap: 0.7rem;
}

.admin-metric-card strong {
    font-size: 1.35rem;
    line-height: 1;
}

.admin-metric-card small {
    text-transform: none;
}

.admin-ops-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.08fr) minmax(18rem, 0.58fr) minmax(18rem, 0.58fr);
    gap: 1rem;
    align-items: start;
}

.admin-ops-grid > * {
    min-width: 0;
}

.admin-pulse-card,
.admin-priority-card,
.admin-feed-card {
    display: grid;
    grid-template-rows: auto 1fr;
}

.admin-pulse-list,
.admin-priority-list,
.admin-feed-list {
    display: grid;
    gap: 0.55rem;
    align-content: start;
    padding: 1rem;
}

.admin-pulse-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.admin-pulse-item,
.admin-priority-item,
.admin-feed-item {
    min-width: 0;
    border: 1px solid var(--border);
    border-radius: 0.45rem;
    background: color-mix(in srgb, var(--secondary) 58%, var(--card));
    padding: 0.65rem;
}

.admin-pulse-item {
    display: grid;
    gap: 0.45rem;
}

.admin-pulse-item > div:first-child {
    display: flex;
    gap: 0.55rem;
    align-items: baseline;
    justify-content: space-between;
    min-width: 0;
}

.admin-pulse-item span,
.admin-pulse-item small,
.admin-priority-item small,
.admin-feed-item small {
    color: var(--muted-foreground);
    font-size: 0.7rem;
    font-weight: 700;
    line-height: 1.35;
}

.admin-pulse-item span {
    text-transform: uppercase;
}

.admin-pulse-item strong {
    color: var(--foreground);
    font-size: 0.92rem;
    line-height: 1;
    white-space: nowrap;
}

.admin-pulse-item strong.badge-success {
    color: var(--success);
}

.admin-pulse-item strong.badge-warning {
    color: var(--warning);
}

.admin-pulse-item strong.badge-fail {
    color: var(--destructive);
}

.admin-pulse-bar {
    display: block;
    width: 100%;
    border: 0;
    overflow: hidden;
    height: 0.38rem;
    border-radius: 999px;
    appearance: none;
    background: color-mix(in srgb, var(--border) 74%, var(--background));
}

.admin-pulse-bar::-webkit-progress-bar {
    border-radius: inherit;
    background: color-mix(in srgb, var(--border) 74%, var(--background));
}

.admin-pulse-bar::-webkit-progress-value {
    border-radius: inherit;
    background: linear-gradient(90deg, var(--primary), var(--success));
    transition: width var(--motion-default);
}

.admin-pulse-bar::-moz-progress-bar {
    border-radius: inherit;
    background: linear-gradient(90deg, var(--primary), var(--success));
}

.admin-priority-item {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    gap: 0.6rem;
    align-items: start;
    color: inherit;
    transition: border-color var(--motion-fast), background var(--motion-fast), box-shadow var(--motion-fast);
}

.admin-priority-item:hover,
.admin-priority-item:focus-visible {
    border-color: color-mix(in srgb, var(--primary) 28%, var(--border));
    background: var(--card);
    box-shadow: var(--shadow);
    outline: none;
}

.admin-priority-item strong,
.admin-feed-item strong {
    display: block;
    overflow: hidden;
    color: var(--foreground);
    font-size: 0.82rem;
    line-height: 1.35;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.admin-feed-item {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    gap: 0.6rem;
    align-items: start;
}

.admin-feed-dot {
    width: 0.5rem;
    height: 0.5rem;
    margin-top: 0.35rem;
    border-radius: 999px;
    background: var(--primary);
    box-shadow: 0 0 0 0.22rem color-mix(in srgb, var(--primary) 14%, transparent);
}

.admin-top-grid,
.admin-ledger-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1rem;
    align-items: start;
}

.admin-top-grid {
    grid-template-columns: minmax(0, 1.16fr) minmax(0, 0.84fr);
}

.admin-top-grid > .card:first-child {
    grid-row: span 2;
}

.admin-top-grid > *,
.admin-ledger-grid > *,
.admin-template-grid > * {
    min-width: 0;
}

.admin-check-grid,
.admin-live-panel {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.55rem;
    padding: 1rem;
}

.production-readiness-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.production-readiness-summary {
    padding-bottom: 0;
}

.admin-check-item,
.admin-live-panel div {
    display: grid;
    gap: 0.25rem;
    min-width: 0;
    border: 1px solid var(--border);
    border-radius: 0.45rem;
    background: var(--secondary);
    padding: 0.6rem;
}

.admin-check-item {
    min-height: 6.3rem;
}

.admin-check-item strong,
.admin-live-panel strong {
    color: var(--foreground);
    font-size: 0.9rem;
    line-height: 1.2;
}

.admin-check-item small,
.admin-live-panel span,
.admin-live-panel small {
    color: var(--muted-foreground);
    font-size: 0.72rem;
    font-weight: 700;
}

.admin-live-panel small {
    grid-column: 1 / -1;
}

.admin-live-panel small[data-state="saved"] {
    color: var(--success);
}

.admin-live-panel small[data-state="error"] {
    color: var(--destructive);
}

.admin-mini-table {
    border-top: 1px solid var(--border);
}

.admin-page .table-wrap table thead th {
    position: sticky;
    top: 0;
    z-index: 1;
    background: var(--card);
}

.admin-settings-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.email-settings-page,
.email-deliveries-page {
    gap: var(--space-5);
}

.email-provider-status {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.email-settings-layout {
    display: grid;
    grid-template-columns: minmax(0, 1.7fr) minmax(18rem, 0.7fr);
    gap: var(--space-5);
    align-items: start;
}

.email-provider-form,
.email-test-column > .card,
.email-deliveries-page > .card {
    padding: var(--space-5);
}

.email-provider-form > .card-header,
.email-test-column .card-header {
    padding: 0 0 var(--space-4);
}

.email-smtp-grid {
    grid-template-columns: minmax(12rem, 1.5fr) minmax(7rem, 0.5fr);
}

.email-smtp-grid .field-wide {
    grid-column: auto;
}

.email-test-column {
    position: sticky;
    top: var(--space-5);
}

.email-safety-card > p {
    margin: 0;
}

.email-delivery-filters {
    align-items: end;
    padding: 0 0 var(--space-4);
}

.email-delivery-log-table th:first-child,
.email-delivery-log-table td:first-child {
    min-width: 12rem;
}

.email-delivery-log-table th:nth-child(2),
.email-delivery-log-table td:nth-child(2) {
    width: 28%;
    min-width: 16rem;
}

.email-delivery-log-table th:nth-child(6),
.email-delivery-log-table td:nth-child(6) {
    width: 24%;
    min-width: 15rem;
}

.email-delivery-log-table td:first-child small {
    display: block;
    margin-top: var(--space-1);
}

.admin-toggle-row {
    display: flex;
    flex-wrap: wrap;
    gap: 0.45rem;
    align-items: center;
}

.admin-toggle-row label,
.admin-mini-toggle {
    display: inline-flex;
    gap: 0.35rem;
    align-items: center;
    min-height: 1.85rem;
    border: 1px solid var(--border);
    border-radius: 999px;
    background: var(--secondary);
    padding: 0.18rem 0.55rem;
    color: var(--muted-foreground);
    font-size: 0.72rem;
    font-weight: 700;
    white-space: nowrap;
}

.admin-toggle-row input,
.admin-mini-toggle input {
    width: 0.9rem;
    height: 0.9rem;
    accent-color: var(--primary);
}

.admin-toggle-row .switch-control,
.admin-mini-toggle.switch-control,
.identity-switch-row .switch-control {
    display: inline-grid;
    place-items: center;
    gap: 0;
    width: var(--icon-control-size);
    min-width: var(--icon-control-size);
    min-height: var(--icon-control-size);
    border: 0;
    background: transparent;
    box-shadow: none;
    padding: 0;
    color: var(--muted-foreground);
    font-size: 0;
}

.admin-toggle-row .switch-control > input[type="checkbox"],
.admin-mini-toggle.switch-control > input[type="checkbox"],
.identity-switch-row .switch-control > input[type="checkbox"] {
    width: 1px;
    height: 1px;
    accent-color: auto;
}

.admin-filter-grid {
    grid-template-columns: minmax(180px, 1fr) minmax(130px, 0.28fr) minmax(130px, 0.28fr) auto;
}

.admin-table {
    min-width: 68rem;
    table-layout: auto;
}

.admin-page .admin-table .table-select-cell {
    box-sizing: border-box;
    width: 2.8rem;
    min-width: 2.8rem;
    max-width: 2.8rem;
    padding-inline: 0.55rem;
    text-align: center;
}

.admin-page .admin-table .table-select-cell input {
    display: block;
    margin-inline: auto;
}

.admin-table > thead > tr > th:first-child:not(.table-select-cell),
.admin-table > tbody > tr > td:first-child:not(.table-select-cell),
.admin-table .table-select-cell + th,
.admin-table .table-select-cell + td {
    min-width: 17rem;
}

.admin-table td[data-label="Institution"],
.admin-table td[data-label="User"],
.admin-table td[data-label="Requester"],
.admin-table td[data-label="Resource"],
.admin-table td[data-label="Feature"],
.admin-table td[data-label="Order"],
.admin-table td[data-label="Invoice"],
.admin-table td[data-label="Event"],
.admin-table td[data-label="Request"] {
    min-width: 17rem;
}

.admin-table td[data-label="Subject"],
.admin-table td[data-label="Actor"],
.admin-table td[data-label="Host"],
.admin-table td[data-label="Period"],
.admin-table td[data-label="Tags"] {
    min-width: 13rem;
}

.admin-table .table-action-cell {
    min-width: 10rem;
}

.admin-operational-table {
    min-width: 34rem;
}

.admin-user-table {
    min-width: 82rem;
}

.admin-user-table .table-action-cell {
    min-width: 23rem;
}

.admin-institution-table {
    min-width: 72rem;
}

.admin-institution-table .table-action-cell,
.admin-identity-review-table .table-action-cell {
    min-width: 25rem;
}

.admin-subscription-table,
.admin-order-table,
.admin-ai-usage-table {
    min-width: 64rem;
}

.admin-invoice-table {
    min-width: 56rem;
}

.admin-ai-allowlist-table {
    min-width: 48rem;
}

.admin-identity-review-table {
    min-width: 70rem;
}

.admin-audit-table,
.admin-request-table {
    min-width: 68rem;
}

.admin-page .admin-ledger-grid > .card {
    grid-column: 1 / -1;
}

.admin-page .admin-ledger-grid .table-wrap {
    max-height: 34rem;
    overflow: auto;
}

.admin-page .stacked-table td[data-label="Last seen"],
.admin-page .stacked-table td[data-label="Users"],
.admin-page .stacked-table td[data-label="Pending joins"],
.admin-page .stacked-table td[data-label="Created"],
.admin-page .stacked-table td[data-label="Latency"] {
    white-space: nowrap;
}

.admin-row-actions {
    display: grid;
    gap: 0.45rem;
}

.admin-row-actions form,
.admin-password-reset form,
.admin-reject-form {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
    align-items: center;
}

.admin-password-field {
    display: grid;
    min-width: min(10rem, 100%);
}

.inline-reason-field {
    display: grid;
    gap: 0.14rem;
    min-width: min(12rem, 100%);
}

.inline-reason-field > span {
    color: var(--muted-foreground);
    font-size: 0.64rem;
    font-weight: 750;
    line-height: 1;
}

.admin-row-actions select,
.admin-password-reset input,
.admin-reject-form input {
    min-height: 1.9rem;
    border: 1px solid var(--input);
    border-radius: 0.4rem;
    background: var(--background);
    color: var(--foreground);
    padding: 0.25rem 0.5rem;
    font: inherit;
    font-size: 0.76rem;
}

.admin-password-field input,
.admin-reject-form .inline-reason-field input,
.identity-reject-form .inline-reason-field input {
    width: 100%;
}

.admin-password-reset .password-control {
    flex: 1 1 9rem;
    min-width: 8rem;
}

.admin-password-reset .password-control input {
    width: 100%;
    min-width: 0;
    padding-right: 2.5rem;
}

.admin-password-reset .password-toggle {
    right: 0.22rem;
    width: 1.75rem;
    height: 1.75rem;
    border-radius: 0.35rem;
}

.admin-password-reset .password-toggle svg {
    width: 0.88rem;
    height: 0.88rem;
}

.admin-password-reset {
    border-top: 1px solid var(--border);
    padding-top: 0.35rem;
}

.admin-password-reset summary {
    cursor: pointer;
    color: var(--muted-foreground);
    font-size: 0.74rem;
    font-weight: 750;
}

.admin-password-reset form {
    margin-top: 0.45rem;
}

.admin-template-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1rem;
    align-items: start;
}

.admin-template-grid textarea {
    min-height: 7rem;
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
    font-size: 0.78rem;
}

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

    .super-admin-kpi-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .super-admin-dashboard-grid,
    .super-admin-module-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .admin-attention-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .admin-attention-item:nth-child(2) {
        border-right: 0;
    }

    .admin-attention-item:nth-child(-n + 2) {
        border-bottom: 1px solid var(--border);
    }

    .admin-dashboard-primary-grid {
        grid-template-columns: minmax(0, 1.08fr) minmax(17rem, 0.92fr);
    }
}

.notification-metric-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.notification-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.45fr) minmax(280px, 0.55fr);
    gap: 1rem;
    align-items: start;
}

.notification-grid > *,
.notification-page .side-stack > *,
.notification-channel-stack > * {
    min-width: 0;
}

.notification-table {
    min-width: 60rem;
}

.notification-table .table-content-heading,
.notification-table td[data-label="Message"] {
    width: 100%;
    min-width: 28rem;
}

.notification-table .table-status-heading,
.notification-table td[data-label="Status"] {
    width: 7.5rem;
    min-width: 7.5rem;
    white-space: nowrap;
}

.notification-table .table-time-heading,
.notification-table td[data-label="Created"] {
    width: 11.5rem;
    min-width: 11.5rem;
}

.notification-table .table-action-heading,
.notification-table .table-action-cell {
    width: 9rem;
    min-width: 9rem;
}

.notification-delivery-table {
    min-width: 54rem;
}

.notification-delivery-table td[data-label="Channel"],
.notification-delivery-table td[data-label="Status"] {
    width: 8rem;
    min-width: 8rem;
    white-space: nowrap;
}

.notification-delivery-table td[data-label="Subject"] {
    width: 100%;
    min-width: 24rem;
}

.notification-delivery-table td[data-label="Created"] {
    width: 11.5rem;
    min-width: 11.5rem;
}

.notification-page .admin-ledger-grid > .card:first-child {
    grid-column: 1 / -1;
}

.notification-page .admin-ledger-grid > .card:first-child .table-wrap {
    max-height: 34rem;
    overflow: auto;
}

.notification-admin-delivery-table {
    min-width: 52rem;
}

.notification-admin-delivery-table td[data-label="Recipient"] {
    min-width: 14rem;
}

.notification-admin-delivery-table td[data-label="Error"] {
    width: 100%;
    min-width: 20rem;
}

.notification-admin-delivery-table th {
    position: sticky;
    top: 0;
    z-index: 1;
    background: var(--card);
}

.notification-page .stacked-table td[data-label="Created"] {
    white-space: nowrap;
}

.notification-page .table-action-cell form {
    display: inline-flex;
    margin: 0;
}

.notification-error,
.notification-form-error {
    margin: 0.25rem 0 0;
    padding: 0;
    color: var(--destructive);
    font-size: 0.74rem;
}

.notification-switch-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
}

.notification-queue-panel {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.notification-channel-stack {
    display: grid;
    gap: 0.75rem;
    padding: 1rem;
}

.notification-channel-form {
    position: relative;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--background);
}

.notification-channel-form:has(.switch-control--corner) .list-item-header {
    padding-right: 3rem;
}

.pwa-install-card,
.push-registration-card {
    min-width: 0;
}

.pwa-install-grid,
.push-device-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    align-items: center;
    justify-content: space-between;
    padding: 1rem;
}

.pwa-install-grid strong {
    display: block;
    margin-bottom: 0.15rem;
    font-size: 0.86rem;
}

[data-pwa-status][data-state="loading"],
[data-push-status][data-state="loading"] {
    color: var(--warning);
}

[data-pwa-status][data-state="saved"],
[data-pwa-display-mode][data-state="saved"],
[data-push-status][data-state="saved"] {
    color: var(--success);
}

[data-pwa-status][data-state="error"],
[data-push-status][data-state="error"] {
    color: var(--destructive);
}

.offline-body {
    display: grid;
    min-height: 100vh;
    min-height: 100dvh;
}

.offline-shell {
    display: grid;
    place-items: center;
    width: min(42rem, 100%);
    margin: 0 auto;
    padding: max(1rem, env(safe-area-inset-top)) max(1rem, env(safe-area-inset-right)) max(1rem, env(safe-area-inset-bottom)) max(1rem, env(safe-area-inset-left));
}

.offline-card {
    width: 100%;
}

.uploads-metric-grid {
    grid-template-columns: repeat(5, minmax(0, 1fr));
}

.uploads-action-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1rem;
    align-items: start;
}

.uploads-action-grid > *,
.upload-brand-grid > *,
.uploads-table * {
    min-width: 0;
}

.upload-brand-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.75rem;
    padding: 1rem;
}

.upload-brand-item {
    display: grid;
    grid-template-columns: 4rem minmax(0, 1fr);
    gap: 0.65rem;
    align-items: center;
    border: 1px solid var(--border);
    border-radius: 0.5rem;
    background: var(--background);
    padding: 0.65rem;
}

.upload-brand-item img,
.upload-asset-cell img,
.upload-thumb-placeholder {
    width: 3.5rem;
    height: 3.5rem;
    border: 1px solid var(--border);
    border-radius: 0.45rem;
    background: var(--secondary);
    object-fit: contain;
}

.upload-thumb-placeholder {
    display: grid;
    place-items: center;
    color: var(--muted-foreground);
    font-size: 0.68rem;
    font-weight: 800;
    text-align: center;
}

.upload-brand-item strong {
    display: block;
    margin-bottom: 0.2rem;
    font-size: 0.84rem;
}

.uploads-filter-grid {
    grid-template-columns: minmax(220px, 1fr) minmax(170px, 0.35fr) minmax(140px, 0.28fr) auto;
}

.uploads-table .upload-asset-cell {
    min-width: 17rem;
}

.upload-asset-cell {
    display: grid;
    grid-template-columns: 3.5rem minmax(0, 1fr);
    gap: 0.65rem;
    align-items: start;
}

.field .upload-help {
    color: var(--muted-foreground);
    font-size: 0.73rem;
}

[data-notification-live-state][data-state="loading"] {
    color: var(--warning);
}

[data-notification-live-state][data-state="saved"] {
    color: var(--success);
}

[data-notification-live-state][data-state="error"] {
    color: var(--destructive);
}

button[aria-busy="true"] {
    cursor: progress;
    opacity: 0.88;
    pointer-events: none;
}

@media (max-width: 980px) {
    .topbar {
        grid-template-columns: minmax(0, 1fr) auto auto;
        gap: 0.55rem;
    }

    .topbar .brand {
        order: 1;
        min-width: 0;
    }

    .topbar .brand-full-logo {
        width: min(10.8rem, 52vw);
        height: 2.8rem;
    }

    .topnav {
        display: none;
    }

    .public-nav-actions {
        order: 2;
        justify-content: end;
    }

    .public-nav-actions .button-small {
        display: none;
    }

    .icon-button.public-menu-toggle {
        display: inline-grid;
        order: 3;
        width: 2.25rem;
        height: 2.25rem;
        border: 1px solid var(--border);
        border-radius: var(--radius-md);
        background: var(--card);
        color: var(--foreground);
        box-shadow: var(--shadow-soft);
    }

    .public-menu-toggle:hover,
    .public-menu-toggle:focus-visible,
    .public-menu-toggle[aria-expanded="true"] {
        border-color: color-mix(in srgb, var(--primary) 36%, var(--border));
        background: color-mix(in srgb, var(--primary) 8%, var(--card));
        color: var(--primary);
    }
}

@media (max-width: 820px) {
    .toast-region {
        top: auto;
        right: max(0.75rem, env(safe-area-inset-right));
        bottom: max(0.75rem, env(safe-area-inset-bottom));
        left: max(0.75rem, env(safe-area-inset-left));
        width: auto;
    }

    .toast {
        justify-self: stretch;
        transform: translateY(0.45rem);
    }

    .toast[data-visible="true"] {
        transform: translateY(0);
    }

    .page-grid,
    .auth-grid,
    .grid-2,
    .demo-media-copy,
    .public-site-footer,
    .public-site-footer-links,
    .landing-principles,
    .landing-audience-grid,
    .landing-pricing-grid,
    .landing-proof-grid,
    .workflow-media-grid,
    .public-content-grid,
    .public-pricing-grid,
    .public-policy-layout,
    .how-journey-layout,
    .how-journey-workspace,
    .how-outcome-grid,
    .pricing-trust-strip,
    .pricing-implementation-grid,
    .error-panel {
        grid-template-columns: 1fr;
    }

    .how-journey-layout {
        min-height: 0;
    }

    .how-journey-copy {
        border-right: 0;
        border-bottom: 1px solid var(--border);
    }

    .how-journey-preview {
        min-height: 17rem;
    }

    .auth-page {
        min-height: auto;
    }

    .auth-copy h1 {
        max-width: 100%;
    }

    .auth-signal-grid {
        grid-template-columns: 1fr;
    }

    .auth-card {
        align-self: stretch;
    }

    .auth-page .auth-card {
        order: 1;
    }

    .auth-page .auth-panel {
        order: 2;
    }

    .auth-progress {
        grid-template-columns: 1fr;
    }

    .auth-experience {
        grid-template-columns: 1fr;
        min-height: auto;
    }

    .auth-form-pane {
        order: 1;
        padding: 1.2rem;
    }

    .auth-showcase-pane {
        order: 2;
        min-height: 34rem;
        border-top: 1px solid var(--border);
        border-left: 0;
        padding: 1.25rem;
    }

    .auth-minimal-form,
    .auth-form-copy,
    .auth-role-chooser,
    .auth-stepper,
    .auth-switch-copy {
        max-width: 100%;
    }

    .auth-field-grid,
    .auth-provider-grid,
    .auth-role-chooser,
    .auth-stepper,
    .auth-preview-metrics {
        grid-template-columns: 1fr;
    }

    .auth-device-frame {
        width: 100%;
        transform: none;
    }

    .auth-float-card {
        width: min(14rem, 54%);
    }

    .auth-float-ai {
        top: 4%;
        left: 0.5rem;
    }

    .auth-float-institution {
        top: auto;
        right: 0.5rem;
        bottom: 2rem;
    }

    .auth-float-students {
        right: 0.5rem;
        bottom: 9rem;
    }

    .pricing-hero-actions,
    .pricing-sticky-cta {
        align-items: stretch;
        flex-direction: column;
    }

    .pricing-toggle {
        width: 100%;
    }

    .error-page {
        min-height: auto;
        place-items: stretch;
        padding-top: 1rem;
    }

    .error-panel {
        width: 100%;
    }

    .landing-hero {
        min-height: auto;
        padding-top: 2rem;
    }

    .landing-hero-copy {
        justify-items: start;
        text-align: left;
    }

    .landing-actions,
    .landing-hero-metrics {
        justify-content: start;
    }

    .landing-final-cta {
        align-items: stretch;
        flex-direction: column;
    }

    .landing-footer,
    .landing-footer-links {
        grid-template-columns: 1fr;
    }

    .demo-tabs {
        grid-template-columns: 1fr;
    }

    .demo-panel {
        padding: 0.55rem;
    }

    .demo-media-frame {
        aspect-ratio: 4 / 3;
    }

    .workflow-shot-toggle {
        right: 0.45rem;
        bottom: 0.45rem;
        width: 2.75rem;
        height: 2.75rem;
        min-width: 2.75rem;
        min-height: 2.75rem;
    }

    .sidebar-panel {
        position: static;
    }

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

    .button,
    .button-small,
    .icon-button {
        min-width: 2.75rem;
        min-height: 2.75rem;
    }

    .workspace-nav-button,
    .workbench-panel-pagination .icon-button {
        min-height: 2.75rem;
    }

    .workspace-role-super-admin .workspace-nav-item {
        min-height: 2.75rem;
    }

    .workbench-panel-pagination .icon-button {
        width: 2.75rem;
        height: 2.75rem;
    }

    .workspace-actions > .workspace-os-shell,
    .workspace-actions > .workflow-actions-shell,
    .workspace-actions > .notification-popover-shell,
    .workspace-actions > .icon-button,
    .workspace-actions > .counter-button,
    .workspace-actions > .theme-control,
    .workspace-actions > .logout-form {
        flex-basis: 2.75rem;
        width: 2.75rem;
    }

    .workspace-actions > .icon-button,
    .workspace-actions > .workspace-os-shell > .icon-button,
    .workspace-actions > .workflow-actions-shell > .icon-button,
    .workspace-actions > .notification-popover-shell > .icon-button,
    .workspace-actions > .theme-control > .theme-toggle-button,
    .workspace-actions > .logout-form > .icon-button {
        width: 2.75rem;
        height: 2.75rem;
        min-width: 2.75rem;
        min-height: 2.75rem;
    }

    .confirmation-dialog-actions {
        align-items: stretch;
        flex-direction: column;
    }

    .confirmation-dialog-actions .button {
        width: 100%;
    }

    .password-control input,
    .admin-password-reset .password-control input {
        min-height: 2.75rem;
        padding-right: 3.35rem;
    }

    .password-toggle,
    .admin-password-reset .password-toggle {
        right: 0.25rem;
        width: 2.75rem;
        height: 2.75rem;
        min-width: 2.75rem;
        min-height: 2.75rem;
    }

    .password-toggle svg,
    .admin-password-reset .password-toggle svg {
        width: 1.05rem;
        height: 1.05rem;
    }

    .member-pill,
    .assignment-pill {
        padding-right: 0.35rem;
    }

    .member-pill .pill-remove-button,
    .assignment-pill .pill-remove-button {
        width: 2.75rem;
        height: 2.75rem;
        min-width: 2.75rem;
        min-height: 2.75rem;
    }

    .workspace-frame {
        grid-template-columns: 1fr;
    }

    .workspace-role-super-admin .workspace-frame {
        grid-template-columns: 1fr;
    }

    .workspace-main {
        width: 100vw;
        max-width: 100vw;
    }

    .workspace-sidebar {
        position: fixed;
        inset: 0 auto 0 0;
        z-index: 50;
        width: min(18rem, 86vw);
        transform: translateX(-102%);
        transition: transform 180ms ease;
    }

    .workspace-sidebar-open .workspace-sidebar {
        transform: translateX(0);
    }

    .workspace-overlay {
        position: fixed;
        inset: 0;
        z-index: 45;
        display: none;
        background: rgba(15, 23, 42, 0.35);
    }

    .workspace-sidebar-open .workspace-overlay {
        display: block;
    }

    .workspace-header {
        align-items: start;
        flex-direction: column;
        width: 100vw;
        max-width: 100vw;
    }

    .workspace-actions {
        flex-wrap: wrap;
        gap: 0.45rem;
        width: 100%;
        justify-content: start;
    }

    .workspace-breadcrumb {
        display: none;
    }

    .command-trigger {
        justify-content: center;
        width: 2.75rem;
        min-width: 2.75rem;
        min-height: 2.75rem;
        padding: 0;
    }

    .command-trigger span {
        display: none;
    }

    .command-palette {
        top: max(0.75rem, env(safe-area-inset-top));
        width: min(100vw - 1rem, 36rem);
        height: calc(100dvh - 1.5rem);
        max-height: calc(100dvh - 1.5rem);
    }

    .workspace-hero,
    .workspace-signal-grid,
    .metric-grid,
    .profile-hero,
    .profile-grid,
    .lookup-form {
        grid-template-columns: 1fr;
    }

    .profile-actions {
        justify-content: start;
    }

    .certificate-card-actions {
        justify-content: start;
        width: 100%;
    }

    .workspace-content {
        width: 100vw;
        max-width: 100vw;
        padding: 0.75rem;
    }

    .workspace-role-super-admin .workspace-content {
        width: 100vw;
        padding: 0.75rem;
    }

    .admin-ops-header,
    .admin-module-header {
        align-items: stretch;
        flex-direction: column;
    }

    .admin-ops-actions,
    .admin-module-actions {
        justify-content: flex-start;
    }

    .admin-ops-actions .button,
    .admin-module-actions .button {
        flex: 1 1 auto;
    }

    .admin-attention-heading {
        align-items: start;
        flex-direction: column;
    }

    .admin-attention-grid {
        grid-template-columns: 1fr;
    }

    .admin-attention-item,
    .admin-attention-item:nth-child(2) {
        border-right: 0;
        border-bottom: 1px solid var(--border);
    }

    .admin-attention-item:last-child {
        border-bottom: 0;
    }

    .admin-route-tabs,
    .admin-page-tabs {
        flex-wrap: nowrap;
        overflow-x: auto;
        scrollbar-width: thin;
        -webkit-overflow-scrolling: touch;
    }

    .workspace-role-super-admin .admin-route-tabs {
        position: static;
    }

    .admin-route-tabs a,
    .admin-page-tabs button {
        flex: 0 0 auto;
        min-height: 2.75rem;
    }

    .admin-runtime-list {
        grid-template-columns: 1fr;
    }

    .card-header {
        flex-wrap: wrap;
    }

    .question-form-tabs {
        gap: 1rem;
        padding-inline: 0.85rem;
    }

    .question-form-tabs button {
        min-height: 2.7rem;
        font-size: 0.84rem;
    }

    .question-form-panel {
        padding: 0.85rem;
    }

    .question-form-panel-header {
        flex-direction: column;
    }

    .exam-workspace-row {
        grid-template-columns: 1fr;
    }

    .exam-workspace-row .row-actions {
        justify-content: start;
    }

    .assignment-workflow-grid,
    .assignment-window-grid,
    .assignment-ledger-item,
    .assignment-ledger-meta {
        grid-template-columns: 1fr;
    }

    .assignment-form-footer {
        align-items: stretch;
        flex-direction: column;
    }

    .assignment-form-footer .button,
    .assignment-ledger-item form,
    .assignment-ledger-item .button {
        width: 100%;
        margin-left: 0;
    }

    .workspace-hero .action-row {
        justify-content: start;
    }

    .section-nav {
        flex-wrap: nowrap;
        overflow-x: auto;
        padding: 0.5rem;
        scroll-snap-type: x proximity;
        -webkit-overflow-scrolling: touch;
    }

    .section-nav a {
        flex: 0 0 auto;
        min-height: 2.5rem;
        scroll-snap-align: start;
    }

    .workspace-page [id] {
        scroll-margin-top: 4.75rem;
    }

    .results-page .result-metrics {
        display: none;
    }

    .pwa-install-grid,
    .push-device-actions {
        align-items: stretch;
        flex-direction: column;
    }

    .attempt-fullscreen-panel {
        align-items: stretch;
        flex-direction: column;
    }

    .attempt-fullscreen-panel .button {
        width: 100%;
    }

    .question-bank-grid,
    .question-metric-grid,
    .ai-metric-grid,
    .ai-provider-grid,
    .ai-provider-form-grid,
    .ai-inline-grid,
    .question-form-grid,
    .option-grid,
    .filter-grid,
    .exam-authoring-grid,
    .exam-metric-grid,
    .exam-form-grid,
    .exam-filter-grid,
    .status-strip,
    .inline-assignment-form,
    .available-exam-grid,
    .attempt-meta,
    .attempt-header,
    .attempt-status-bar,
    .attempt-layout,
    .result-metrics,
    .result-option-grid,
    .filter-bar,
    .result-detail-grid,
    .certificate-card .certificate-body,
    .identity-metric-grid,
    .identity-provider-grid,
    .identity-provider-form-grid,
    .identity-health-grid,
    .billing-metric-grid,
    .billing-main-grid,
    .billing-ledger-grid,
    .billing-admin-grid,
    .billing-plan-admin-grid,
    .billing-plan-grid,
    .billing-gateway-form-grid,
    .billing-plan-admin-form-grid,
    .billing-limit-grid,
    .admin-signal-grid,
    .admin-metric-grid,
    .super-admin-kpi-grid,
    .super-admin-dashboard-grid,
    .super-admin-module-grid,
    .super-admin-module-stats,
    .admin-ops-grid,
    .admin-pulse-list,
    .admin-top-grid,
    .admin-ledger-grid,
    .admin-check-grid,
    .admin-live-panel,
    .production-readiness-grid,
    .admin-settings-grid,
    .admin-filter-grid,
    .admin-template-grid,
    .notification-metric-grid,
    .notification-grid,
    .notification-queue-panel,
    .pwa-install-grid,
    .push-device-actions,
    .uploads-metric-grid,
    .uploads-action-grid,
    .upload-brand-grid,
    .uploads-filter-grid {
        grid-template-columns: 1fr;
    }

    .admin-top-grid > .card:first-child {
        grid-row: auto;
    }

    .super-admin-hero {
        min-height: 0;
    }

    .super-admin-section-header,
    .super-admin-module-actions {
        align-items: stretch;
        flex-direction: column;
    }

    .super-admin-list-item {
        align-items: start;
    }

    .question-table .table-select-cell {
        width: 2.6rem;
        min-width: 2.6rem;
        max-width: 2.6rem;
    }

    .question-table th:first-child:not(.table-select-cell),
    .question-table td:first-child:not(.table-select-cell),
    .question-table th:nth-child(2),
    .question-table td.question-main-cell {
        min-width: 18rem;
    }

    .field-wide {
        grid-column: auto;
    }

    .exam-table th:first-child,
    .exam-table td:first-child,
    .exam-table th:nth-child(2),
    .exam-table td:nth-child(2),
    .exam-table th:nth-child(3),
    .exam-table td:nth-child(3),
    .exam-table th:nth-child(4),
    .exam-table td:nth-child(4),
    .exam-table th:nth-child(5),
    .exam-table td:nth-child(5),
    .exam-main-cell {
        min-width: 18rem;
    }

    .uploads-table,
    .uploads-table tbody,
    .uploads-table tr,
    .uploads-table td {
        display: block;
        width: 100%;
        min-width: 0;
    }

    .uploads-table thead {
        display: none;
    }

    .uploads-table tr {
        display: grid;
        gap: 0.25rem;
        padding: 0.75rem;
        border-bottom: 1px solid var(--border);
    }

    .uploads-table td {
        display: grid;
        grid-template-columns: minmax(5.5rem, 0.32fr) minmax(0, 1fr);
        gap: 0.55rem;
        align-items: start;
        border-bottom: 0;
        padding: 0.28rem 0;
    }

    .uploads-table td::before {
        color: var(--muted-foreground);
        content: attr(data-label);
        font-size: 0.68rem;
        font-weight: 800;
        line-height: 1.4;
        text-transform: uppercase;
    }

    .uploads-table .upload-asset-cell {
        grid-template-columns: minmax(5.5rem, 0.32fr) 3.5rem minmax(0, 1fr);
    }

    .uploads-table .upload-asset-cell::before {
        grid-column: 1;
    }

    .uploads-table .upload-asset-cell img,
    .uploads-table .upload-asset-cell .upload-thumb-placeholder {
        grid-column: 2;
    }

    .uploads-table .upload-asset-cell > div {
        grid-column: 3;
    }

    .uploads-table .row-actions {
        justify-content: start;
    }

    .uploads-table.summary-table tbody {
        display: grid;
        gap: 0.65rem;
        padding: 0.75rem;
    }

    .uploads-table.summary-table tr {
        border: 1px solid var(--border);
        border-radius: var(--radius);
        background: var(--card);
        box-shadow: var(--shadow-soft);
    }

    .uploads-table.summary-table td:first-child {
        display: block;
        margin-bottom: 0.1rem;
        border-bottom: 1px solid var(--border);
        padding-bottom: 0.6rem;
    }

    .uploads-table.summary-table td:first-child::before {
        display: none;
    }

    .uploads-table.summary-table td:first-child strong {
        display: block;
        color: var(--foreground);
        font-size: 0.9rem;
        line-height: 1.35;
    }

    .uploads-table.summary-table td.upload-asset-cell {
        display: grid;
        grid-template-columns: 3.5rem minmax(0, 1fr);
    }

    .uploads-table.summary-table td.upload-asset-cell::before {
        display: none;
    }

    .uploads-table.summary-table td.upload-asset-cell img,
    .uploads-table.summary-table td.upload-asset-cell .upload-thumb-placeholder,
    .uploads-table.summary-table td.upload-asset-cell > div {
        grid-column: auto;
    }

    .uploads-table.summary-table td[data-label="Actions"] {
        display: block;
        margin-top: 0.1rem;
        border-top: 1px dashed var(--border);
        padding-top: 0.6rem;
    }

    .uploads-table.summary-table td[data-label="Actions"]::before {
        display: none;
    }

    .uploads-table.summary-table td[data-label="Actions"] .row-actions {
        align-items: stretch;
        flex-direction: column;
    }

    .uploads-table.summary-table td[data-label="Actions"] .button {
        width: 100%;
        justify-content: center;
    }

    .table-scroll-controls {
        display: none;
    }

    .stacked-table,
    .stacked-table tbody,
    .stacked-table tr,
    .stacked-table td {
        display: block;
        width: 100%;
        min-width: 0;
    }

    .stacked-table {
        border-collapse: separate;
        border-spacing: 0;
    }

    .stacked-table thead {
        display: none;
    }

    .stacked-table tbody {
        display: grid;
        gap: 0.65rem;
        padding: 0.75rem;
    }

    .stacked-table tr {
        display: grid;
        gap: 0.45rem;
        border: 1px solid var(--border);
        border-radius: 0.55rem;
        background: var(--card);
        padding: 0.75rem;
    }

    .stacked-table tr:hover {
        background: var(--card);
    }

    .stacked-table td {
        display: block;
        border-bottom: 0;
        padding: 0.12rem 0;
    }

    .stacked-table td::before {
        display: block;
        margin-bottom: 0.18rem;
        color: var(--muted-foreground);
        content: attr(data-label);
        font-size: 0.68rem;
        font-weight: 800;
        line-height: 1.4;
        text-transform: uppercase;
    }

    .stacked-table .table-action-cell {
        display: block;
        text-align: left;
        white-space: normal;
    }

    .stacked-table .table-action-cell form {
        display: grid;
        justify-content: stretch;
    }

    .stacked-table .table-action-cell::before {
        display: none;
    }

    .stacked-table .table-action-cell .button {
        width: 100%;
        justify-content: center;
    }

    .stacked-table.summary-table tbody {
        gap: 0.75rem;
        padding: 0.65rem;
    }

    .stacked-table.summary-table tr {
        gap: 0.5rem;
        border-radius: var(--radius);
        box-shadow: var(--shadow-soft);
        padding: 0.8rem;
    }

    .stacked-table.summary-table td {
        display: grid;
        grid-template-columns: minmax(5.75rem, 0.36fr) minmax(0, 1fr);
        gap: 0.55rem;
        align-items: start;
        padding: 0.18rem 0;
    }

    .stacked-table.summary-table td::before {
        margin-bottom: 0;
    }

    .stacked-table.summary-table td:first-child,
    .stacked-table.summary-table td[data-summary-cell] {
        display: block;
        margin-bottom: 0.1rem;
        border-bottom: 1px solid var(--border);
        padding-bottom: 0.6rem;
    }

    .stacked-table.summary-table td[data-summary-cell] {
        order: -1;
    }

    .stacked-table.summary-table td:first-child::before,
    .stacked-table.summary-table td[data-summary-cell]::before {
        display: none;
    }

    .stacked-table.summary-explicit-table td:first-child:not([data-summary-cell]) {
        display: grid;
        grid-template-columns: minmax(5.75rem, 0.36fr) minmax(0, 1fr);
        margin-bottom: 0;
        border-bottom: 0;
        padding-bottom: 0.18rem;
    }

    .stacked-table.summary-explicit-table td:first-child:not([data-summary-cell])::before {
        display: block;
    }

    .stacked-table.summary-table td:first-child strong,
    .stacked-table.summary-table td[data-summary-cell] strong {
        display: block;
        color: var(--foreground);
        font-size: 0.9rem;
        line-height: 1.35;
    }

    .stacked-table.summary-table td:first-child .muted,
    .stacked-table.summary-table td[data-summary-cell] .muted,
    .stacked-table.summary-table td:first-child .compact-text,
    .stacked-table.summary-table td[data-summary-cell] .compact-text {
        display: block;
        margin-top: 0.25rem;
    }

    .stacked-table.summary-table .badge,
    .uploads-table.summary-table .badge {
        white-space: normal;
    }

    .stacked-table.summary-table .table-action-cell,
    .stacked-table.summary-table td[data-label="Action"],
    .stacked-table.summary-table td[data-label="Actions"] {
        display: block;
        margin-top: 0.1rem;
        border-top: 1px dashed var(--border);
        padding-top: 0.6rem;
    }

    .stacked-table.summary-table .table-action-cell::before,
    .stacked-table.summary-table td[data-label="Action"]::before,
    .stacked-table.summary-table td[data-label="Actions"]::before {
        display: none;
    }

    .stacked-table.summary-table .row-actions {
        gap: 0.45rem;
    }

    .stacked-table.summary-table .table-action-cell .button,
    .stacked-table.summary-table td[data-label="Action"] .button,
    .stacked-table.summary-table td[data-label="Actions"] .button {
        min-height: 2.5rem;
        width: 100%;
        justify-content: center;
    }

    .dashboard-request-table,
    .dashboard-network-exams-table,
    .dashboard-invite-table,
    .dashboard-join-table {
        min-width: 0;
    }

    .dashboard-page .table-action-cell form {
        display: block;
    }

    .dashboard-page .stacked-table td[data-label="Requested"],
    .dashboard-page .stacked-table td[data-label="Duration"] {
        white-space: normal;
    }

    .profile-public-exams-table {
        min-width: 0;
    }

    .profile-public-shell .stacked-table td[data-label="Duration"] {
        white-space: normal;
    }

    .student-submitted-attempts-table {
        min-width: 0;
    }

    .student-exams-page .stacked-table td[data-label="Score"],
    .student-exams-page .stacked-table td[data-label="Submitted"] {
        white-space: normal;
    }

    .question-table,
    .question-import-preview-table,
    .question-generation-table,
    .question-import-history-table {
        min-width: 0;
    }

    .question-table .table-select-cell,
    .question-table th:first-child:not(.table-select-cell),
    .question-table td:first-child:not(.table-select-cell),
    .question-table th:nth-child(2),
    .question-table td.question-main-cell {
        min-width: 0;
    }

    .question-bank-page .table-action-cell form {
        display: block;
    }

    .question-bank-page .stacked-table td[data-label="Row"],
    .question-bank-page .stacked-table td[data-label="Scoring"],
    .question-bank-page .stacked-table td[data-label="Status"],
    .question-bank-page .stacked-table td[data-label="Provider"],
    .question-bank-page .stacked-table td[data-label="Created"],
    .question-bank-page .stacked-table td[data-label="Rows"] {
        white-space: normal;
    }

    .exam-table {
        min-width: 0;
    }

    .exam-table th:first-child,
    .exam-table td:first-child,
    .exam-table th:nth-child(3),
    .exam-table td:nth-child(3),
    .exam-table th:nth-child(5),
    .exam-table td:nth-child(5),
    .exam-main-cell {
        min-width: 0;
    }

    .exam-authoring-page .vertical-actions,
    .exam-authoring-page .vertical-actions form {
        align-items: stretch;
        width: 100%;
    }

    .exam-authoring-page .vertical-actions .button {
        width: 100%;
        justify-content: center;
    }

    .admin-table,
    .admin-operational-table,
    .admin-user-table,
    .admin-institution-table,
    .admin-subscription-table,
    .admin-order-table,
    .admin-invoice-table,
    .admin-ai-usage-table,
    .admin-ai-allowlist-table,
    .admin-identity-review-table,
    .admin-audit-table,
    .admin-request-table {
        min-width: 0;
    }

    .admin-page .admin-table td,
    .admin-page .admin-table .table-action-cell,
    .admin-table > tbody > tr > td:first-child:not(.table-select-cell),
    .admin-table .table-select-cell + td {
        min-width: 0;
    }

    .admin-page .admin-table tr {
        position: relative;
    }

    .admin-page .admin-table td.table-select-cell {
        position: absolute;
        top: 0.72rem;
        right: 0.72rem;
        z-index: 2;
        display: grid;
        place-items: center;
        width: 2rem;
        min-width: 2rem;
        max-width: 2rem;
        height: 2rem;
        margin: 0;
        border: 0;
        padding: 0;
    }

    .admin-page .admin-table td.table-select-cell::before {
        display: none;
    }

    .admin-page .admin-table td.table-select-cell + td {
        padding-right: 2.65rem;
    }

    .admin-page .admin-table.summary-table td.table-select-cell + td {
        display: block;
        margin-bottom: 0.1rem;
        border-bottom: 1px solid var(--border);
        padding-bottom: 0.6rem;
    }

    .admin-page .admin-table.summary-table td.table-select-cell + td::before {
        display: none;
    }

    .admin-page .admin-ledger-grid > .card {
        grid-column: auto;
    }

    .admin-page .admin-ledger-grid .table-wrap {
        max-height: none;
        overflow: visible;
    }

    .admin-page .table-action-cell form,
    .admin-page .admin-institution-actions,
    .admin-page .admin-reject-form {
        display: grid;
        gap: 0.45rem;
        align-items: stretch;
        width: 100%;
    }

    .admin-page .table-action-cell select,
    .admin-page .table-action-cell input {
        width: 100%;
    }

    .admin-page .stacked-table td[data-label="Last seen"],
    .admin-page .stacked-table td[data-label="Users"],
    .admin-page .stacked-table td[data-label="Pending joins"],
    .admin-page .stacked-table td[data-label="Created"],
    .admin-page .stacked-table td[data-label="Latency"] {
        white-space: normal;
    }

    .billing-admin-orders-table {
        min-width: 0;
    }

    .billing-page .table-action-cell form {
        display: block;
    }

    .billing-page .stacked-table td[data-label="Total"],
    .billing-page .stacked-table td[data-label="Created"],
    .billing-page .stacked-table td[data-label="Date"],
    .billing-page .stacked-table td[data-label="Reset at"] {
        white-space: normal;
    }

    .ai-allowlist-table,
    .ai-usage-ledger-table {
        min-width: 0;
    }

    .ai-page .table-action-cell form {
        display: block;
    }

    .ai-page .stacked-table td[data-label="Units"],
    .ai-page .stacked-table td[data-label="Tokens"],
    .ai-page .stacked-table td[data-label="When"] {
        white-space: normal;
    }

    .identity-review-table {
        min-width: 0;
    }

    .identity-review-table td[data-label="Submitted"] {
        white-space: normal;
    }

    .identity-review-table .table-action-cell {
        min-width: 0;
    }

    .identity-review-actions,
    .identity-reject-form {
        align-items: stretch;
        flex-direction: column;
        width: 100%;
    }

    .identity-reject-form input {
        width: 100%;
    }

    .notification-table,
    .notification-delivery-table,
    .notification-admin-delivery-table {
        min-width: 0;
    }

    .notification-page .admin-ledger-grid > .card:first-child {
        grid-column: auto;
    }

    .notification-page .admin-ledger-grid > .card:first-child .table-wrap {
        max-height: none;
        overflow-x: auto;
        overflow-y: visible;
    }

    .notification-page .table-action-cell form {
        display: block;
    }

    .notification-page .stacked-table td[data-label="Created"] {
        white-space: normal;
    }

    .attempt-side-panel {
        position: static;
    }

    .result-side-panel {
        position: static;
    }

    .attempt-clock {
        text-align: left;
    }
}

@media (min-width: 821px) {
    .workspace-frame[data-sidebar-state="collapsed"] {
        grid-template-columns: 4.4rem minmax(0, 1fr);
    }

    .workspace-frame[data-sidebar-state="collapsed"] .workspace-sidebar {
        overflow: visible;
        padding-inline: 0.55rem;
    }

    .workspace-frame[data-sidebar-state="collapsed"] .workspace-brand {
        justify-content: center;
        min-height: 2.75rem;
    }

    .workspace-frame[data-sidebar-state="collapsed"] .workspace-brand > span:not(.brand-mark),
    .workspace-frame[data-sidebar-state="collapsed"] .workspace-nav-group h2,
    .workspace-frame[data-sidebar-state="collapsed"] .workspace-pinned h2,
    .workspace-frame[data-sidebar-state="collapsed"] .workspace-nav-item span,
    .workspace-frame[data-sidebar-state="collapsed"] .workspace-sidebar-footer {
        display: none;
    }

    .workspace-frame[data-sidebar-state="collapsed"] .workspace-brand .brand-mark {
        display: grid;
    }

    .workspace-frame[data-sidebar-state="collapsed"] .workspace-pinned {
        margin-bottom: 0.45rem;
        padding-bottom: 0.45rem;
    }

    .workspace-frame[data-sidebar-state="collapsed"] .workspace-nav-item {
        justify-content: center;
        min-height: 2.35rem;
        padding: 0.35rem;
    }

    .workspace-frame[data-sidebar-state="collapsed"] .workspace-nav-item[data-tooltip]::before,
    .workspace-frame[data-sidebar-state="collapsed"] .workspace-nav-item[data-tooltip]::after {
        display: block;
    }

    .workspace-frame[data-sidebar-state="collapsed"] .workspace-brand[data-tooltip]::before,
    .workspace-frame[data-sidebar-state="collapsed"] .workspace-brand[data-tooltip]::after {
        display: block;
    }

    .workspace-overlay {
        display: none;
    }
}

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

    body[data-page-state="loading"] .page-progress span {
        width: 100%;
        transform: translateX(0);
    }
}

.workflow-actions-shell {
    position: relative;
}

.workflow-actions-panel {
    position: absolute;
    top: calc(100% + 0.55rem);
    right: 0;
    z-index: 62;
    display: grid;
    gap: 0.65rem;
    width: min(23rem, calc(100vw - 1.5rem));
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    background: var(--popover);
    color: var(--popover-foreground);
    padding: 0.75rem;
    box-shadow: var(--shadow-elevated);
}

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

.workflow-actions-header {
    display: flex;
    gap: 0.75rem;
    align-items: start;
    justify-content: space-between;
    border-bottom: 1px solid var(--border);
    padding-bottom: 0.65rem;
}

.workflow-actions-header h2,
.workflow-actions-header p {
    margin: 0;
    padding: 0;
}

.workflow-actions-header h2 {
    font-size: 0.9rem;
}

.workflow-actions-header p {
    color: var(--muted-foreground);
    font-size: 0.74rem;
}

.kbd {
    display: inline-grid;
    place-items: center;
    min-height: 1.55rem;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    background: var(--secondary);
    padding: 0 0.4rem;
    color: var(--muted-foreground);
    font-size: 0.68rem;
    font-weight: 800;
}

.workflow-actions-list {
    display: grid;
    gap: 0.35rem;
}

.workflow-action-item {
    display: grid;
    grid-template-columns: 1.85rem minmax(0, 1fr);
    grid-template-areas:
        "icon title"
        "icon meta";
    gap: 0.08rem 0.55rem;
    align-items: center;
    border: 1px solid transparent;
    border-radius: var(--radius-md);
    padding: 0.45rem;
    transition: background var(--motion-fast), border-color var(--motion-fast), box-shadow var(--motion-fast);
}

.workflow-action-item:hover,
.workflow-action-item:focus-visible {
    border-color: var(--border);
    background: var(--secondary);
    outline: none;
}

.workflow-action-item span {
    display: grid;
    grid-area: icon;
    place-items: center;
    width: 1.85rem;
    height: 1.85rem;
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    background: var(--card);
    color: var(--primary);
}

.workflow-action-item strong,
.workflow-action-item small {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.workflow-action-item strong {
    grid-area: title;
    font-size: 0.8rem;
}

.workflow-action-item small {
    grid-area: meta;
    color: var(--muted-foreground);
    font-size: 0.7rem;
    font-weight: 650;
}

.command-item-action .command-item-icon {
    color: var(--success);
}

.saved-view-toolbar {
    display: grid;
    gap: 0.55rem;
    border: 1px solid color-mix(in srgb, var(--border) 78%, transparent);
    border-radius: var(--radius-md);
    background: color-mix(in srgb, var(--card) 58%, transparent);
    padding: 0.65rem;
}

.saved-view-summary,
.saved-view-actions,
.saved-view-list,
.saved-view-item {
    display: flex;
    flex-wrap: wrap;
    gap: 0.45rem;
    align-items: center;
}

.saved-view-summary {
    justify-content: space-between;
}

.saved-view-summary strong {
    font-size: 0.78rem;
}

.saved-view-summary span {
    color: var(--muted-foreground);
    font-size: 0.72rem;
}

.saved-view-name {
    width: min(12rem, 100%);
    min-height: var(--control-height-sm);
    border: 1px solid var(--input);
    border-radius: var(--radius-sm);
    background: var(--card);
    color: var(--foreground);
    padding: 0.35rem 0.5rem;
    font: inherit;
    font-size: 0.78rem;
}

.saved-view-chip {
    display: inline-flex;
    align-items: center;
    min-height: 1.85rem;
    border: 1px solid color-mix(in srgb, var(--primary) 28%, var(--border));
    border-radius: var(--radius-pill);
    background: color-mix(in srgb, var(--primary) 8%, var(--card));
    padding: 0.2rem 0.55rem;
    color: var(--primary);
    font-size: 0.75rem;
    font-weight: 700;
}

.saved-view-remove {
    display: inline-grid;
    place-items: center;
    width: 1.45rem;
    height: 1.45rem;
    border: 1px solid var(--border);
    border-radius: var(--radius-pill);
    background: var(--card);
    color: var(--muted-foreground);
    cursor: pointer;
    font: inherit;
    font-size: 0.72rem;
    font-weight: 800;
}

.saved-view-remove:hover,
.saved-view-remove:focus-visible {
    border-color: var(--destructive);
    color: var(--destructive);
    outline: none;
}

.smart-assist-strip {
    display: flex;
    flex-wrap: wrap;
    gap: 0.65rem;
    align-items: center;
    justify-content: space-between;
    border: 1px solid color-mix(in srgb, var(--primary) 24%, var(--border));
    border-radius: var(--radius-md);
    background: color-mix(in srgb, var(--accent) 48%, transparent);
    padding: 0.6rem 0.7rem;
}

.smart-assist-strip strong,
.smart-assist-strip span {
    display: block;
}

.smart-assist-strip strong {
    font-size: 0.78rem;
}

.smart-assist-strip span {
    color: var(--muted-foreground);
    font-size: 0.72rem;
}

.bulk-toolbar {
    position: sticky;
    top: 0;
    z-index: 5;
    display: flex;
    flex-wrap: wrap;
    gap: 0.65rem;
    align-items: center;
    justify-content: space-between;
    border: 1px solid color-mix(in srgb, var(--primary) 24%, var(--border));
    border-radius: var(--radius-md);
    background: color-mix(in srgb, var(--card) 92%, var(--secondary));
    padding: 0.6rem 0.75rem;
    box-shadow: var(--shadow);
}

.bulk-toolbar[hidden] {
    display: none;
}

.bulk-toolbar strong {
    font-size: 0.78rem;
}

.bulk-toolbar-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.45rem;
    align-items: center;
}

.table-select-cell,
.table-wrap .stacked-table .table-select-cell {
    box-sizing: border-box;
    width: 2.8rem;
    min-width: 2.8rem;
    max-width: 2.8rem;
    padding-inline: 0.55rem;
    text-align: center;
}

.table-select-cell input {
    width: 1rem;
    height: 1rem;
    margin-inline: auto;
    accent-color: var(--primary);
}

@media (min-width: 821px) {
    :where(.table-wrap .stacked-table td[data-summary-cell]) {
        width: 100%;
        min-width: 20rem;
    }

    :where(.table-wrap .stacked-table td[data-label="Question"]) {
        min-width: 22rem;
    }

    :where(.table-wrap .stacked-table td[data-label="Exam"]),
    :where(.table-wrap .stacked-table td[data-label="Email"]),
    :where(.table-wrap .stacked-table td[data-label="Error"]) {
        min-width: 18rem;
    }

    :where(.table-wrap .stacked-table td[data-label="Student"]),
    :where(.table-wrap .stacked-table td[data-label="Recipient"]) {
        min-width: 16rem;
    }
}

@media (max-width: 820px) {
    .stacked-table tr {
        position: relative;
    }

    .table-wrap .stacked-table td.table-select-cell {
        position: absolute;
        top: 0.72rem;
        right: 0.72rem;
        z-index: 2;
        display: grid;
        place-items: center;
        width: 2rem;
        min-width: 2rem;
        max-width: 2rem;
        height: 2rem;
        margin: 0;
        border: 0;
        padding: 0;
    }

    .table-wrap .stacked-table.summary-table td.table-select-cell::before,
    .table-wrap .stacked-table td.table-select-cell::before {
        display: none;
    }

    .table-wrap .stacked-table td.table-select-cell + td {
        padding-right: 2.65rem;
    }

    .table-wrap .stacked-table.summary-table td.table-select-cell + td:not([data-summary-cell]) {
        display: block;
        margin-bottom: 0.1rem;
        border-bottom: 1px solid var(--border);
        padding-bottom: 0.6rem;
    }

    .table-wrap .stacked-table.summary-table td.table-select-cell + td:not([data-summary-cell])::before {
        display: none;
    }

    .notification-page .notification-table td,
    .notification-page .notification-delivery-table td,
    .notification-page .notification-admin-delivery-table td {
        width: 100%;
        min-width: 0;
        max-width: none;
        white-space: normal;
    }
}

.detail-drawer-overlay {
    position: fixed;
    inset: 0;
    z-index: 82;
    background: rgba(15, 23, 42, 0.34);
    opacity: 0;
    pointer-events: none;
    transition: opacity var(--motion-fast);
}

.detail-drawer {
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    z-index: 83;
    display: grid;
    grid-template-rows: auto minmax(0, 1fr);
    width: min(42rem, 100vw);
    border-left: 1px solid var(--border);
    background: var(--card);
    color: var(--card-foreground);
    box-shadow: var(--shadow-elevated);
    transform: translateX(100%);
    transition: transform var(--motion-default);
}

.detail-drawer[hidden],
.detail-drawer-overlay[hidden] {
    display: none;
}

.detail-drawer-open .detail-drawer-overlay {
    opacity: 1;
    pointer-events: auto;
}

.detail-drawer-open .detail-drawer {
    transform: translateX(0);
}

.detail-drawer-header {
    display: flex;
    gap: 0.75rem;
    align-items: start;
    justify-content: space-between;
    border-bottom: 1px solid var(--border);
    padding: 1rem;
}

.detail-drawer-header h2,
.detail-drawer-header p {
    margin: 0;
    padding: 0;
}

.detail-drawer-header h2 {
    font-size: 1rem;
}

.detail-drawer-header p {
    margin-top: 0.2rem;
    color: var(--muted-foreground);
    font-size: 0.78rem;
}

.detail-drawer-body {
    overflow: auto;
    padding: 1rem;
}

.detail-drawer-body .form-stack {
    border: 0;
    background: transparent;
    padding: 0;
}

.button,
.icon-button,
.command-trigger,
.segmented-link,
.filter-reset,
.workspace-nav-item,
.workflow-action-item,
.demo-tabs button,
.landing-faq-item summary,
.attempt-row,
.list-item,
.notification-popover-action {
    position: relative;
    overflow: hidden;
    touch-action: manipulation;
}

[data-pressed="true"] {
    transform: translateY(1px) scale(0.992);
}

.interaction-ripple {
    position: absolute;
    z-index: 0;
    border-radius: 999px;
    background: color-mix(in srgb, currentColor 18%, transparent);
    opacity: 0.5;
    pointer-events: none;
    transform: scale(0);
    animation: interaction-ripple-out 520ms ease-out forwards;
}

.button > :not(.interaction-ripple),
.icon-button > :not(.interaction-ripple),
.command-trigger > :not(.interaction-ripple) {
    position: relative;
    z-index: 1;
}

.workspace-actions > .notification-popover-shell > .counter-button > span,
.workspace-actions > .counter-button > span {
    position: absolute;
    top: auto;
    right: 0;
    bottom: 0;
    left: auto;
    z-index: 2;
}

@keyframes interaction-ripple-out {
    to {
        opacity: 0;
        transform: scale(2.35);
    }
}

.badge {
    transition: background var(--motion-fast), border-color var(--motion-fast), color var(--motion-fast), transform var(--motion-fast), box-shadow var(--motion-fast);
}

.badge:hover {
    transform: translateY(-1px);
}

.counter-button span:not([data-empty="true"]),
.notification-popover-item[data-unread="true"]::before {
    animation: status-pulse 1.8s ease-in-out infinite;
}

@keyframes status-pulse {
    0%,
    100% {
        box-shadow: 0 0 0 0 color-mix(in srgb, var(--primary) 20%, transparent);
    }

    50% {
        box-shadow: 0 0 0 0.22rem color-mix(in srgb, var(--primary) 0%, transparent);
    }
}

tbody tr[data-row-animated="true"] {
    animation: table-row-enter 360ms ease both;
}

tbody tr[data-row-animated="true"]:nth-child(2) { animation-delay: 24ms; }
tbody tr[data-row-animated="true"]:nth-child(3) { animation-delay: 48ms; }
tbody tr[data-row-animated="true"]:nth-child(4) { animation-delay: 72ms; }
tbody tr[data-row-animated="true"]:nth-child(5) { animation-delay: 96ms; }
tbody tr[data-row-animated="true"]:nth-child(6) { animation-delay: 120ms; }
tbody tr[data-row-animated="true"]:nth-child(7) { animation-delay: 144ms; }
tbody tr[data-row-animated="true"]:nth-child(8) { animation-delay: 168ms; }
tbody tr[data-row-animated="true"]:nth-child(9) { animation-delay: 192ms; }
tbody tr[data-row-animated="true"]:nth-child(n+10) { animation-delay: 220ms; }

@keyframes table-row-enter {
    from {
        opacity: 0;
        transform: translateY(0.28rem);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.filter-live-feedback {
    display: inline-flex;
    width: fit-content;
    border: 1px solid color-mix(in srgb, var(--primary) 24%, var(--border));
    border-radius: var(--radius-pill);
    background: color-mix(in srgb, var(--primary) 7%, var(--card));
    padding: 0.16rem 0.48rem;
    color: var(--primary);
    font-size: 0.72rem;
    font-weight: 750;
    animation: filter-feedback-in 180ms ease both;
}

.filter-live-feedback[hidden] {
    display: none;
}

@keyframes filter-feedback-in {
    from {
        opacity: 0;
        transform: translateY(-0.22rem);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.workspace-intelligence {
    display: grid;
    gap: 0.75rem;
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    background: color-mix(in srgb, var(--card) 82%, var(--secondary));
    padding: 0.85rem;
    box-shadow: var(--shadow);
}

.workspace-intelligence-header {
    display: flex;
    gap: 0.75rem;
    align-items: start;
    justify-content: space-between;
}

.workspace-intelligence-header h2 {
    margin: 0.15rem 0 0;
    font-size: 0.92rem;
}

.workspace-intelligence-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 0.65rem;
}

.workspace-intelligence-card {
    display: grid;
    gap: 0.2rem;
    align-content: start;
    min-height: 5.6rem;
    border: 1px solid color-mix(in srgb, var(--border) 82%, transparent);
    border-radius: var(--radius-md);
    background: var(--card);
    color: var(--foreground);
    padding: 0.65rem;
    text-align: left;
    cursor: pointer;
    transition: transform var(--motion-fast), border-color var(--motion-fast), background var(--motion-fast), box-shadow var(--motion-fast);
}

.workspace-intelligence-card:hover,
.workspace-intelligence-card:focus-visible {
    border-color: color-mix(in srgb, var(--primary) 32%, var(--border));
    background: color-mix(in srgb, var(--accent) 42%, var(--card));
    box-shadow: var(--shadow-soft);
    outline: none;
    transform: translateY(-1px);
}

.workspace-intelligence-label {
    color: var(--muted-foreground);
    font-size: 0.66rem;
    font-weight: 800;
    text-transform: uppercase;
}

.workspace-intelligence-card strong {
    font-size: 0.8rem;
}

.workspace-intelligence-card small {
    color: var(--muted-foreground);
    font-size: 0.72rem;
}

.landing-tour-controls {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    align-items: center;
    justify-content: space-between;
    border-top: 1px solid var(--border);
    padding-top: 0.75rem;
}

.landing-tour-copy {
    display: grid;
    gap: 0.12rem;
}

.landing-tour-copy strong {
    font-size: 0.82rem;
}

.landing-tour-copy span {
    color: var(--muted-foreground);
    font-size: 0.75rem;
}

.landing-tour-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 0.45rem;
}

.landing-roi-grid {
    display: grid;
    grid-template-columns: minmax(0, 0.9fr) minmax(280px, 0.55fr);
    gap: 1rem;
    align-items: stretch;
}

.landing-roi-panel,
.landing-roi-output {
    display: grid;
    gap: 0.75rem;
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    background: var(--card);
    padding: 1rem;
    box-shadow: var(--shadow);
}

.landing-roi-control {
    display: grid;
    gap: 0.35rem;
}

.landing-roi-control span {
    display: flex;
    justify-content: space-between;
    gap: 0.75rem;
    color: var(--muted-foreground);
    font-size: 0.78rem;
    font-weight: 750;
}

.landing-roi-control input[type="range"] {
    width: 100%;
    accent-color: var(--primary);
}

.landing-roi-output-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.65rem;
}

.landing-roi-stat {
    display: grid;
    gap: 0.12rem;
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    background: color-mix(in srgb, var(--secondary) 50%, var(--card));
    padding: 0.65rem;
}

.landing-roi-stat span {
    color: var(--muted-foreground);
    font-size: 0.68rem;
    font-weight: 800;
    text-transform: uppercase;
}

.landing-roi-stat strong {
    font-size: 1.05rem;
}

.landing-faq-search {
    display: flex;
    flex-wrap: wrap;
    gap: 0.65rem;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 0.85rem;
}

.landing-faq-search label {
    display: grid;
    gap: 0.25rem;
    min-width: min(24rem, 100%);
    color: var(--muted-foreground);
    font-size: 0.75rem;
    font-weight: 750;
}

.landing-faq-search input {
    min-height: var(--control-height-md);
    border: 1px solid var(--input);
    border-radius: var(--radius-md);
    background: var(--card);
    color: var(--foreground);
    padding: 0.45rem 0.65rem;
    font: inherit;
}

.landing-faq-search input:focus-visible {
    border-color: var(--ring);
    outline: 2px solid color-mix(in srgb, var(--ring) 34%, transparent);
    outline-offset: 2px;
}

.landing-faq-count {
    border: 1px solid var(--border);
    border-radius: var(--radius-pill);
    background: var(--secondary);
    padding: 0.2rem 0.55rem;
    color: var(--muted-foreground);
    font-size: 0.74rem;
    font-weight: 750;
}

.dashboard-next-actions {
    overflow: visible;
}

.dashboard-next-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.75rem;
    padding: 1rem;
}

.dashboard-next-card {
    display: grid;
    gap: 0.25rem;
    min-height: 7rem;
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    background: color-mix(in srgb, var(--secondary) 38%, var(--card));
    padding: 0.75rem;
    transition: border-color var(--motion-fast), background var(--motion-fast), box-shadow var(--motion-fast), transform var(--motion-fast);
}

.dashboard-next-card:hover,
.dashboard-next-card:focus-visible {
    border-color: color-mix(in srgb, var(--primary) 36%, var(--border));
    background: color-mix(in srgb, var(--accent) 52%, var(--card));
    box-shadow: var(--shadow-soft);
    outline: none;
    transform: translateY(-1px);
}

.dashboard-next-card span {
    color: var(--muted-foreground);
    font-size: 0.68rem;
    font-weight: 850;
}

.dashboard-next-card strong {
    font-size: 0.86rem;
}

.dashboard-next-card small {
    color: var(--muted-foreground);
    font-size: 0.74rem;
}

.dashboard-next-card.is-warning {
    border-color: color-mix(in srgb, var(--warning) 36%, var(--border));
}

.dashboard-next-card.is-success {
    border-color: color-mix(in srgb, var(--success) 34%, var(--border));
}

@media (max-width: 640px) {
    .workflow-actions-panel {
        position: fixed;
        top: max(4rem, calc(env(safe-area-inset-top) + 0.75rem));
        right: max(0.75rem, env(safe-area-inset-right));
        left: max(0.75rem, env(safe-area-inset-left));
        width: auto;
    }

    .workspace-os-panel {
        top: max(4rem, calc(env(safe-area-inset-top) + 0.75rem));
        right: max(0.75rem, env(safe-area-inset-right));
        left: max(0.75rem, env(safe-area-inset-left));
        width: auto;
        max-height: calc(100dvh - 5rem);
    }

    .workspace-os-grid {
        grid-template-columns: 1fr;
    }

    .workspace-os-section {
        min-height: 0;
        border-right: 0;
    }

    .workspace-os-footer {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .saved-view-summary {
        align-items: flex-start;
        flex-direction: column;
    }

    .smart-assist-strip,
    .bulk-toolbar {
        align-items: stretch;
        flex-direction: column;
    }

    .detail-drawer {
        width: 100vw;
    }

    .workspace-intelligence-grid,
    .landing-roi-grid,
    .landing-roi-output-grid,
    .dashboard-next-grid {
        grid-template-columns: 1fr;
    }

    .landing-tour-controls {
        align-items: stretch;
        flex-direction: column;
    }
}

@media (max-width: 520px) {
    .auth-showcase-pane {
        min-height: auto;
    }

    .auth-showcase-canvas {
        gap: 0.75rem;
        place-items: stretch;
    }

    .auth-device-frame {
        animation: none;
    }

    .auth-float-card {
        position: static;
        width: 100%;
        animation: none;
    }

    .auth-chart {
        height: 7.5rem;
    }
}

@media (max-width: 980px) {
    .workspace-intelligence-grid,
    .landing-roi-grid,
    .dashboard-next-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 720px) {
    .workspace-intelligence-grid,
    .landing-roi-grid,
    .dashboard-next-grid {
        grid-template-columns: 1fr;
    }
}

/* Premium public homepage */
.landing-page-premium {
    gap: clamp(3rem, 7vw, 6rem);
    overflow: hidden;
}

.landing-page-premium svg {
    width: 1rem;
    height: 1rem;
    flex: 0 0 auto;
}

.premium-hero {
    position: relative;
    grid-template-columns: minmax(0, 0.9fr) minmax(32rem, 1.1fr);
    gap: clamp(1.5rem, 4vw, 3.25rem);
    min-height: calc(100dvh - 5.25rem);
    padding: clamp(2.5rem, 7vw, 5.25rem) 0 clamp(1.5rem, 4vw, 3rem);
}

.premium-hero::before {
    position: absolute;
    inset: 8% -8% auto 42%;
    z-index: -1;
    height: 34rem;
    border-radius: 999px;
    background:
        radial-gradient(circle at 30% 30%, color-mix(in srgb, var(--primary) 18%, transparent), transparent 52%),
        radial-gradient(circle at 70% 45%, color-mix(in srgb, var(--success) 15%, transparent), transparent 48%);
    content: "";
    filter: blur(34px);
    opacity: 0.78;
}

.premium-hero-copy {
    display: grid;
    gap: clamp(1rem, 2.2vw, 1.45rem);
    align-content: center;
    max-width: 45rem;
}

.landing-eyebrow {
    display: inline-flex;
    width: fit-content;
    align-items: center;
    gap: 0.45rem;
    border: 1px solid color-mix(in srgb, var(--primary) 26%, var(--border));
    border-radius: var(--radius-pill);
    background: color-mix(in srgb, var(--card) 88%, transparent);
    color: var(--primary);
    padding: 0.28rem 0.62rem 0.28rem 0.34rem;
    font-size: 0.72rem;
    font-weight: 850;
    letter-spacing: 0;
    text-transform: uppercase;
    box-shadow: var(--shadow);
}

.landing-eyebrow-icon {
    display: grid;
    place-items: center;
    width: 1.65rem;
    height: 1.65rem;
    border-radius: var(--radius-pill);
    background: color-mix(in srgb, var(--primary) 12%, var(--card));
}

.premium-hero h1 {
    margin: 0;
    color: var(--foreground);
    font-size: clamp(2.2rem, 5vw, 4.5rem);
    font-weight: 700;
    line-height: 1;
    letter-spacing: 0;
}

.premium-hero-copy p {
    max-width: 40rem;
    margin: 0;
    color: var(--muted-foreground);
    font-size: clamp(1rem, 1.8vw, 1.15rem);
    line-height: 1.65;
}

.premium-hero-actions {
    justify-content: flex-start;
}

.premium-hero-actions .button {
    gap: 0.45rem;
}

.premium-hero-proof {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    align-items: center;
    color: var(--muted-foreground);
    font-size: 0.78rem;
    font-weight: 750;
}

.premium-hero-proof span:not(.badge) {
    display: inline-flex;
    align-items: center;
    min-height: 1.6rem;
    border: 1px solid var(--border);
    border-radius: var(--radius-pill);
    background: var(--card);
    padding: 0.16rem 0.6rem;
}

.premium-product-stage {
    position: relative;
    display: grid;
    align-content: center;
    min-width: 0;
    perspective: 1400px;
}

.product-browser {
    overflow: hidden;
    border: 1px solid color-mix(in srgb, var(--border) 76%, var(--primary));
    border-radius: var(--radius-2xl);
    background: color-mix(in srgb, var(--card) 92%, var(--primary) 8%);
    box-shadow: 0 1.4rem 4rem color-mix(in srgb, var(--foreground) 16%, transparent), var(--shadow-elevated);
    transform: rotateX(2deg) rotateY(-4deg);
    transform-style: preserve-3d;
    transition: transform 220ms ease-out, box-shadow 220ms ease-out;
}

.product-browser[data-tilt-active="true"] {
    box-shadow: 0 1.8rem 4.6rem color-mix(in srgb, var(--foreground) 20%, transparent), var(--shadow-elevated);
}

.product-browser-top {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    gap: 0.75rem;
    align-items: center;
    border-bottom: 1px solid var(--border);
    background: color-mix(in srgb, var(--secondary) 62%, var(--card));
    padding: 0.72rem 0.85rem;
}

.browser-dots {
    display: flex;
    gap: 0.32rem;
}

.browser-dots span {
    width: 0.58rem;
    height: 0.58rem;
    border-radius: 999px;
    background: color-mix(in srgb, var(--muted-foreground) 50%, var(--card));
}

.browser-dots span:first-child {
    background: var(--danger);
}

.browser-dots span:nth-child(2) {
    background: var(--warning);
}

.browser-dots span:nth-child(3) {
    background: var(--success);
}

.browser-address {
    overflow: hidden;
    border: 1px solid var(--border);
    border-radius: var(--radius-pill);
    background: var(--background);
    color: var(--muted-foreground);
    padding: 0.28rem 0.75rem;
    font-size: 0.75rem;
    font-weight: 750;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.browser-status {
    border-radius: var(--radius-pill);
    background: color-mix(in srgb, var(--success-bg) 68%, var(--card));
    color: var(--success);
    padding: 0.22rem 0.58rem;
    font-size: 0.7rem;
    font-weight: 850;
}

.product-browser-body {
    display: grid;
    grid-template-columns: 10.5rem minmax(0, 1fr);
    min-height: clamp(31rem, 58vw, 43rem);
}

.product-demo-nav {
    display: grid;
    gap: 0.42rem;
    align-content: start;
    border-right: 1px solid var(--border);
    background: color-mix(in srgb, var(--secondary) 46%, var(--card));
    padding: 1rem 0.75rem;
}

.product-demo-brand {
    display: flex;
    gap: 0.5rem;
    align-items: center;
    margin-bottom: 0.55rem;
    color: var(--foreground);
    font-size: 0.82rem;
    font-weight: 850;
}

.product-demo-brand img {
    width: 1.75rem;
    height: 1.75rem;
    border-radius: 0.5rem;
}

.product-demo-nav button,
.journey-switcher button,
.ai-capability-list button,
.segmented-control button {
    min-width: 0;
    border: 1px solid transparent;
    background: transparent;
    color: var(--muted-foreground);
    cursor: pointer;
    font: inherit;
    transition: background var(--motion-fast), border-color var(--motion-fast), color var(--motion-fast), box-shadow var(--motion-fast), transform var(--motion-fast);
}

.product-demo-nav button {
    display: flex;
    gap: 0.5rem;
    align-items: center;
    min-height: 2.4rem;
    border-radius: var(--radius-md);
    padding: 0.4rem 0.5rem;
    font-size: 0.78rem;
    font-weight: 800;
    text-align: left;
}

.product-demo-nav button:hover,
.product-demo-nav button:focus-visible,
.product-demo-nav button[aria-pressed="true"] {
    border-color: color-mix(in srgb, var(--primary) 28%, var(--border));
    background: var(--card);
    color: var(--foreground);
    box-shadow: var(--shadow);
    outline: none;
}

.product-demo-main {
    display: grid;
    gap: 0.9rem;
    align-content: start;
    padding: clamp(0.9rem, 2vw, 1.35rem);
}

.product-demo-toolbar {
    display: flex;
    gap: 1rem;
    align-items: center;
    justify-content: space-between;
}

.product-demo-toolbar h2 {
    margin: 0.14rem 0 0;
    font-size: clamp(1.05rem, 2vw, 1.45rem);
    line-height: 1.15;
}

.product-demo-search {
    display: flex;
    gap: 0.45rem;
    align-items: center;
    width: min(15.5rem, 42%);
    border: 1px solid var(--border);
    border-radius: var(--radius-pill);
    background: var(--background);
    color: var(--muted-foreground);
    padding: 0.45rem 0.65rem;
    font-size: 0.72rem;
    font-weight: 750;
}

.product-demo-search span {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.product-demo-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.1fr) minmax(12rem, 0.74fr);
    gap: 0.75rem;
}

.live-dashboard-panel {
    display: grid;
    gap: 0.72rem;
    align-content: start;
    min-width: 0;
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    background: color-mix(in srgb, var(--background) 68%, var(--card));
    padding: 0.85rem;
    box-shadow: var(--shadow);
}

.live-panel-primary {
    grid-row: span 2;
    min-height: 19rem;
}

.live-panel-head {
    display: flex;
    gap: 0.75rem;
    align-items: center;
    justify-content: space-between;
}

.live-panel-head span {
    color: var(--muted-foreground);
    font-size: 0.72rem;
    font-weight: 850;
    text-transform: uppercase;
}

.live-panel-head strong {
    color: var(--foreground);
    font-size: clamp(1.2rem, 3vw, 2rem);
    line-height: 1;
}

.live-dashboard-panel p,
.live-dashboard-panel small {
    margin: 0;
    color: var(--muted-foreground);
    font-size: 0.78rem;
    line-height: 1.55;
}

.hero-chart {
    display: flex;
    gap: 0.55rem;
    align-items: end;
    min-height: 12rem;
    margin-top: auto;
    border-bottom: 1px solid var(--border);
    padding-top: 1rem;
}

.hero-chart span {
    flex: 1;
    min-width: 0.9rem;
    height: 60%;
    border-radius: 999px 999px 0.25rem 0.25rem;
    background: linear-gradient(180deg, color-mix(in srgb, var(--primary) 78%, var(--success)), color-mix(in srgb, var(--primary) 24%, var(--card)));
    transform-origin: bottom;
    animation: hero-bar-rise 3.8s ease-in-out infinite;
}

.hero-chart span:nth-child(2) {
    animation-delay: 120ms;
}

.hero-chart span[data-bar="48"] { height: 48%; }
.hero-chart span[data-bar="52"] { height: 52%; }
.hero-chart span[data-bar="58"] { height: 58%; }
.hero-chart span[data-bar="64"] { height: 64%; }
.hero-chart span[data-bar="66"] { height: 66%; }
.hero-chart span[data-bar="69"] { height: 69%; }
.hero-chart span[data-bar="70"] { height: 70%; }
.hero-chart span[data-bar="72"] { height: 72%; }
.hero-chart span[data-bar="73"] { height: 73%; }
.hero-chart span[data-bar="74"] { height: 74%; }
.hero-chart span[data-bar="76"] { height: 76%; }
.hero-chart span[data-bar="78"] { height: 78%; }
.hero-chart span[data-bar="80"] { height: 80%; }
.hero-chart span[data-bar="81"] { height: 81%; }
.hero-chart span[data-bar="82"] { height: 82%; }
.hero-chart span[data-bar="84"] { height: 84%; }
.hero-chart span[data-bar="86"] { height: 86%; }
.hero-chart span[data-bar="88"] { height: 88%; }
.hero-chart span[data-bar="90"] { height: 90%; }
.hero-chart span[data-bar="92"] { height: 92%; }
.hero-chart span[data-bar="94"] { height: 94%; }

.hero-chart span:nth-child(3) {
    animation-delay: 240ms;
}

.hero-chart span:nth-child(4) {
    animation-delay: 360ms;
}

.hero-chart span:nth-child(5) {
    animation-delay: 480ms;
}

.hero-chart span:nth-child(6) {
    animation-delay: 600ms;
}

.question-stream {
    display: grid;
    gap: 0.38rem;
}

.question-stream span,
.student-activity span {
    display: flex;
    align-items: center;
    gap: 0.45rem;
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    background: var(--card);
    color: var(--foreground);
    padding: 0.48rem 0.55rem;
    font-size: 0.74rem;
    font-weight: 750;
}

.ai-progress {
    overflow: hidden;
    height: 0.44rem;
    border-radius: 999px;
    background: color-mix(in srgb, var(--secondary) 70%, var(--card));
}

.ai-progress span {
    display: block;
    width: 58%;
    height: 100%;
    border-radius: inherit;
    background: var(--primary);
    animation: ai-progress-scan 2.8s ease-in-out infinite;
}

.student-activity {
    display: grid;
    gap: 0.4rem;
}

.student-activity i {
    width: 0.5rem;
    height: 0.5rem;
    border-radius: 999px;
    background: var(--success);
    box-shadow: 0 0 0 0.28rem color-mix(in srgb, var(--success) 12%, transparent);
}

.score-ring {
    display: grid;
    place-items: center;
    width: 6.8rem;
    height: 6.8rem;
    justify-self: center;
    border-radius: 999px;
    background:
        radial-gradient(circle at center, var(--card) 0 53%, transparent 54%),
        conic-gradient(var(--primary) 0 87%, color-mix(in srgb, var(--secondary) 80%, var(--card)) 87% 100%);
}

.score-ring span {
    color: var(--foreground);
    font-size: 1.55rem;
    font-weight: 850;
}

.hero-floating-panel {
    position: absolute;
    display: flex;
    gap: 0.65rem;
    align-items: flex-start;
    width: min(18rem, 48vw);
    border: 1px solid color-mix(in srgb, var(--primary) 24%, var(--border));
    border-radius: var(--radius-lg);
    background: color-mix(in srgb, var(--card) 84%, transparent);
    color: var(--foreground);
    padding: 0.78rem;
    box-shadow: var(--shadow-elevated);
    backdrop-filter: blur(14px);
    animation: hero-float 6s ease-in-out infinite;
}

.hero-floating-panel strong,
.hero-floating-panel span {
    display: block;
}

.hero-floating-panel strong {
    font-size: 0.8rem;
}

.hero-floating-panel span {
    margin-top: 0.12rem;
    color: var(--muted-foreground);
    font-size: 0.72rem;
    line-height: 1.4;
}

.hero-notification-panel {
    top: 11%;
    right: -1.25rem;
}

.hero-ai-panel {
    bottom: 9%;
    left: -1.5rem;
    animation-delay: 900ms;
}

.landing-trust-strip {
    display: grid;
    grid-template-columns: minmax(0, 0.78fr) minmax(0, 1fr);
    gap: clamp(1rem, 3vw, 2rem);
    align-items: center;
    border-block: 1px solid var(--border);
    padding: clamp(1.25rem, 3vw, 2rem) 0;
}

.landing-trust-strip h2 {
    max-width: 46rem;
    margin: 0.2rem 0 0;
    font-size: clamp(1.1rem, 2.6vw, 1.8rem);
    line-height: 1.16;
}

.trust-logo-row {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 0.65rem;
}

.trust-logo-row span {
    display: grid;
    place-items: center;
    min-height: 4rem;
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    background: var(--card);
    color: var(--muted-foreground);
    padding: 0.75rem;
    font-size: 0.78rem;
    font-weight: 850;
    text-align: center;
    box-shadow: var(--shadow);
}

.journey-switcher {
    display: inline-grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    width: min(33rem, 100%);
    gap: 0.35rem;
    border: 1px solid var(--border);
    border-radius: var(--radius-pill);
    background: var(--secondary);
    padding: 0.3rem;
}

.journey-switcher button,
.segmented-control button {
    min-height: 2.45rem;
    border-radius: var(--radius-pill);
    padding: 0.35rem 0.75rem;
    font-size: 0.8rem;
    font-weight: 850;
}

.journey-switcher button:hover,
.journey-switcher button:focus-visible,
.journey-switcher button[aria-selected="true"],
.segmented-control button:hover,
.segmented-control button:focus-visible,
.segmented-control button[aria-pressed="true"] {
    background: var(--card);
    color: var(--foreground);
    box-shadow: var(--shadow);
    outline: none;
}

.journey-panels {
    min-width: 0;
}

.journey-panel {
    display: grid;
    grid-template-columns: minmax(0, 0.78fr) minmax(0, 1fr);
    gap: clamp(1rem, 3vw, 2rem);
    align-items: stretch;
    border: 1px solid var(--border);
    border-radius: var(--radius-2xl);
    background: color-mix(in srgb, var(--card) 92%, var(--primary) 5%);
    padding: clamp(1rem, 3vw, 1.6rem);
    box-shadow: var(--shadow-elevated);
}

.journey-panel.is-active {
    animation: demo-panel-enter 280ms ease-out;
}

.journey-copy {
    display: grid;
    gap: 0.85rem;
    align-content: center;
}

.journey-copy h3,
.ai-explanation h3 {
    margin: 0;
    font-size: clamp(1.35rem, 3vw, 2.25rem);
    line-height: 1.08;
}

.journey-problem-outcome {
    display: grid;
    gap: 0.55rem;
}

.journey-problem-outcome p,
.ai-explanation p {
    margin: 0;
    color: var(--muted-foreground);
    font-size: 0.88rem;
    line-height: 1.65;
}

.journey-problem-outcome strong {
    display: block;
    margin-bottom: 0.18rem;
    color: var(--foreground);
    font-size: 0.72rem;
    text-transform: uppercase;
}

.journey-timeline {
    display: grid;
    gap: 0.75rem;
}

.journey-step {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    gap: 0.8rem;
    align-items: start;
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    background: var(--background);
    padding: 0.85rem;
}

.journey-step > span {
    display: grid;
    place-items: center;
    width: 2rem;
    height: 2rem;
    border-radius: var(--radius-pill);
    background: color-mix(in srgb, var(--primary) 12%, var(--card));
    color: var(--primary);
    font-size: 0.72rem;
    font-weight: 900;
}

.journey-step strong {
    display: block;
    font-size: 0.92rem;
}

.journey-step p {
    margin: 0.18rem 0 0;
    color: var(--muted-foreground);
    font-size: 0.78rem;
    line-height: 1.5;
}

.journey-step small {
    display: inline-flex;
    width: fit-content;
    margin-top: 0.55rem;
    border-radius: var(--radius-pill);
    background: color-mix(in srgb, var(--success-bg) 62%, var(--card));
    color: var(--success);
    padding: 0.12rem 0.5rem;
    font-size: 0.68rem;
    font-weight: 850;
}

.ai-showcase-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(16rem, 0.65fr);
    gap: 1rem;
    align-items: stretch;
}

.ai-console,
.ai-explanation,
.pricing-comparison {
    border: 1px solid var(--border);
    border-radius: var(--radius-2xl);
    background: var(--card);
    box-shadow: var(--shadow-elevated);
}

.ai-console {
    display: grid;
    grid-row: span 2;
    gap: 1rem;
    min-height: 26rem;
    padding: 1rem;
}

.ai-console-head {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    align-items: center;
    border-bottom: 1px solid var(--border);
    padding-bottom: 0.8rem;
}

.ai-console-head span {
    display: flex;
    gap: 0.5rem;
    align-items: center;
    font-size: 0.88rem;
    font-weight: 850;
}

.ai-console-head strong {
    border-radius: var(--radius-pill);
    background: color-mix(in srgb, var(--primary) 10%, var(--card));
    color: var(--primary);
    padding: 0.22rem 0.6rem;
    font-size: 0.7rem;
    text-transform: uppercase;
}

.ai-output {
    display: grid;
    gap: 1rem;
    align-content: center;
    border: 1px solid color-mix(in srgb, var(--primary) 22%, var(--border));
    border-radius: var(--radius-xl);
    background:
        linear-gradient(135deg, color-mix(in srgb, var(--primary) 10%, transparent), transparent 48%),
        color-mix(in srgb, var(--background) 72%, var(--card));
    padding: clamp(1rem, 4vw, 2rem);
}

.ai-output > span {
    max-width: 42rem;
    color: var(--foreground);
    font-size: clamp(1.2rem, 3vw, 2rem);
    font-weight: 850;
    line-height: 1.15;
}

.ai-token-lines {
    display: grid;
    gap: 0.45rem;
    max-width: 24rem;
}

.ai-token-lines i {
    display: block;
    height: 0.54rem;
    border-radius: 999px;
    background: color-mix(in srgb, var(--primary) 24%, var(--border));
    animation: ai-token-pulse 2.8s ease-in-out infinite;
}

.ai-token-lines i:nth-child(2) {
    width: 82%;
    animation-delay: 120ms;
}

.ai-token-lines i:nth-child(3) {
    width: 64%;
    animation-delay: 240ms;
}

.ai-capability-list {
    display: grid;
    gap: 0.65rem;
}

.ai-capability-list button {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    gap: 0.35rem 0.7rem;
    align-items: center;
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    background: var(--card);
    padding: 0.85rem;
    text-align: left;
}

.ai-capability-list button > span {
    display: grid;
    grid-row: span 2;
    place-items: center;
    width: 2.15rem;
    height: 2.15rem;
    border-radius: var(--radius-md);
    background: color-mix(in srgb, var(--primary) 10%, var(--card));
    color: var(--primary);
}

.ai-capability-list button strong,
.ai-capability-list button small {
    min-width: 0;
}

.ai-capability-list button strong {
    color: var(--foreground);
    font-size: 0.88rem;
}

.ai-capability-list button small {
    overflow: hidden;
    color: var(--muted-foreground);
    font-size: 0.74rem;
    line-height: 1.35;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.ai-capability-list button:hover,
.ai-capability-list button:focus-visible,
.ai-capability-list button[aria-selected="true"] {
    border-color: color-mix(in srgb, var(--primary) 34%, var(--border));
    background: color-mix(in srgb, var(--primary) 7%, var(--card));
    box-shadow: var(--shadow);
    outline: none;
}

.ai-explanation {
    display: grid;
    gap: 0.75rem;
    align-content: end;
    padding: 1rem;
}

.workflow-lanes {
    display: grid;
    gap: 0.85rem;
}

.workflow-lane {
    display: grid;
    grid-template-columns: minmax(10rem, 0.22fr) minmax(0, 1fr);
    gap: 0.75rem;
    align-items: center;
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    background: var(--card);
    padding: 0.8rem;
    box-shadow: var(--shadow);
}

.workflow-lane > strong {
    font-size: 0.86rem;
}

.workflow-lane-steps {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 0.55rem;
}

.workflow-lane-steps span {
    position: relative;
    display: grid;
    place-items: center;
    min-height: 3.3rem;
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    background: color-mix(in srgb, var(--secondary) 58%, var(--card));
    color: var(--foreground);
    padding: 0.5rem;
    font-size: 0.74rem;
    font-weight: 800;
    text-align: center;
}

.workflow-lane-steps span:not(:last-child)::after {
    position: absolute;
    top: 50%;
    right: -0.48rem;
    width: 0.4rem;
    height: 1px;
    background: var(--border);
    content: "";
}

.trust-metric-grid {
    display: grid;
    grid-template-columns: repeat(7, minmax(0, 1fr));
    gap: 0.65rem;
}

.trust-metric-card {
    display: grid;
    gap: 0.2rem;
    align-content: start;
    min-height: 8rem;
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    background: var(--card);
    padding: 0.8rem;
    box-shadow: var(--shadow);
}

.trust-metric-card strong {
    font-size: clamp(1.25rem, 2.5vw, 2rem);
    line-height: 1;
}

.trust-metric-card span {
    color: var(--foreground);
    font-size: 0.78rem;
    font-weight: 820;
}

.trust-metric-card small {
    color: var(--muted-foreground);
    font-size: 0.7rem;
    line-height: 1.35;
}

.testimonial-row {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.85rem;
}

.testimonial-row figure {
    margin: 0;
    border: 1px solid var(--border);
    border-radius: var(--radius-xl);
    background: color-mix(in srgb, var(--secondary) 35%, var(--card));
    padding: 1rem;
    box-shadow: var(--shadow);
}

.testimonial-row blockquote {
    margin: 0;
    color: var(--foreground);
    font-size: 1rem;
    line-height: 1.5;
}

.testimonial-row figcaption {
    margin-top: 0.7rem;
    color: var(--muted-foreground);
    font-size: 0.78rem;
    font-weight: 750;
}

.pricing-toolbar {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    align-items: center;
    justify-content: space-between;
}

.segmented-control {
    display: inline-grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    min-width: min(18rem, 100%);
    gap: 0.32rem;
    border: 1px solid var(--border);
    border-radius: var(--radius-pill);
    background: var(--secondary);
    padding: 0.28rem;
}

.pricing-toolbar > span {
    color: var(--muted-foreground);
    font-size: 0.78rem;
    font-weight: 750;
}

.premium-pricing .landing-pricing-card {
    position: relative;
    overflow: hidden;
    border-radius: var(--radius-xl);
    transition: border-color var(--motion-fast), box-shadow var(--motion-fast), transform var(--motion-fast);
}

.premium-pricing .landing-pricing-card:hover {
    border-color: color-mix(in srgb, var(--primary) 28%, var(--border));
    box-shadow: var(--shadow-elevated);
    transform: translateY(-2px);
}

.recommended-plan {
    position: absolute;
    top: 0.8rem;
    right: 0.8rem;
    border-radius: var(--radius-pill);
    background: color-mix(in srgb, var(--primary) 12%, var(--card));
    color: var(--primary);
    padding: 0.18rem 0.55rem;
    font-size: 0.68rem;
    font-weight: 900;
    text-transform: uppercase;
}

.pricing-feature-details {
    border-top: 1px solid var(--border);
    padding-top: 0.65rem;
}

.pricing-feature-details summary {
    width: fit-content;
    border-radius: 0.35rem;
    color: var(--foreground);
    cursor: pointer;
    font-size: 0.78rem;
    font-weight: 850;
}

.pricing-feature-details summary:focus-visible {
    outline: 2px solid var(--ring);
    outline-offset: 0.2rem;
}

.pricing-feature-details p {
    margin-top: 0.45rem;
}

.pricing-comparison {
    overflow: auto;
    margin-top: 1rem;
}

.comparison-row {
    display: grid;
    grid-template-columns: minmax(14rem, 1.4fr) repeat(3, minmax(9rem, 1fr));
    min-width: 48rem;
    border-bottom: 1px solid var(--border);
}

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

.comparison-row span {
    padding: 0.75rem 0.85rem;
    color: var(--muted-foreground);
    font-size: 0.78rem;
    font-weight: 750;
}

.comparison-row span:first-child,
.comparison-head span {
    color: var(--foreground);
    font-weight: 850;
}

.comparison-head {
    background: color-mix(in srgb, var(--secondary) 68%, var(--card));
}

.deployment-timeline {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 0.65rem;
}

.deployment-timeline span {
    display: grid;
    gap: 0.15rem;
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    background: var(--card);
    padding: 0.85rem;
    color: var(--muted-foreground);
    font-size: 0.76rem;
    box-shadow: var(--shadow);
}

.deployment-timeline strong {
    color: var(--foreground);
    font-size: 0.82rem;
}

.premium-final-cta {
    border-radius: var(--radius-2xl);
    background:
        linear-gradient(135deg, color-mix(in srgb, var(--primary) 10%, transparent), transparent 52%),
        var(--card);
}

.premium-footer {
    grid-template-columns: minmax(0, 0.8fr) minmax(0, 1fr);
    border-top: 1px solid var(--border);
    padding-bottom: 1.25rem;
}

.premium-footer .landing-footer-links {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.newsletter-form {
    display: flex;
    flex-wrap: wrap;
    gap: 0.55rem;
    align-items: end;
    margin-top: 0.55rem;
}

.newsletter-form label {
    display: grid;
    gap: 0.25rem;
    min-width: min(20rem, 100%);
    color: var(--muted-foreground);
    font-size: 0.74rem;
    font-weight: 750;
}

.newsletter-form input {
    min-height: var(--control-height-md);
    border: 1px solid var(--input);
    border-radius: var(--radius-md);
    background: var(--card);
    color: var(--foreground);
    padding: 0.45rem 0.65rem;
    font: inherit;
}

.newsletter-form input:focus-visible {
    border-color: var(--ring);
    outline: 2px solid color-mix(in srgb, var(--ring) 34%, transparent);
    outline-offset: 2px;
}

.premium-footer-bottom {
    grid-column: 1 / -1;
}

@keyframes hero-bar-rise {
    0%,
    100% {
        transform: scaleY(0.82);
        opacity: 0.72;
    }
    45% {
        transform: scaleY(1);
        opacity: 1;
    }
}

@keyframes ai-progress-scan {
    0%,
    100% {
        width: 36%;
    }
    50% {
        width: 88%;
    }
}

@keyframes hero-float {
    0%,
    100% {
        transform: translate3d(0, 0, 0);
    }
    50% {
        transform: translate3d(0, -0.55rem, 0);
    }
}

@keyframes ai-token-pulse {
    0%,
    100% {
        opacity: 0.46;
        transform: scaleX(0.84);
        transform-origin: left;
    }
    50% {
        opacity: 1;
        transform: scaleX(1);
    }
}

@media (max-width: 1180px) {
    .premium-hero {
        grid-template-columns: 1fr;
        min-height: auto;
    }

    .premium-hero-copy {
        max-width: 55rem;
    }

    .product-browser {
        transform: none;
    }

    .trust-metric-grid {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }
}

@media (max-width: 940px) {
    .product-browser-body,
    .journey-panel,
    .landing-trust-strip,
    .ai-showcase-grid,
    .premium-footer {
        grid-template-columns: 1fr;
    }

    .product-demo-nav {
        grid-template-columns: repeat(5, minmax(0, 1fr));
        border-right: 0;
        border-bottom: 1px solid var(--border);
        overflow: auto;
    }

    .product-demo-brand {
        margin-bottom: 0;
    }

    .product-demo-grid,
    .workflow-media-grid,
    .landing-pricing-grid,
    .testimonial-row {
        grid-template-columns: 1fr;
    }

    .workflow-lane {
        grid-template-columns: 1fr;
    }

    .workflow-lane-steps {
        overflow-x: auto;
        grid-template-columns: repeat(5, minmax(9rem, 1fr));
        padding-bottom: 0.1rem;
    }

    .trust-logo-row,
    .deployment-timeline {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .premium-footer .landing-footer-links {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 680px) {
    .landing-page-premium {
        gap: 2.75rem;
    }

    .premium-hero {
        padding-top: 1.75rem;
    }

    .premium-hero h1 {
        font-size: clamp(2.25rem, 12vw, 3.6rem);
        line-height: 0.98;
    }

    .premium-hero-actions,
    .premium-hero-proof,
    .pricing-toolbar,
    .landing-final-cta {
        align-items: stretch;
        flex-direction: column;
    }

    .premium-hero-actions .button,
    .landing-final-cta .button {
        width: 100%;
    }

    .product-browser-top {
        grid-template-columns: auto minmax(0, 1fr);
    }

    .browser-status {
        display: none;
    }

    .product-demo-nav {
        grid-template-columns: repeat(4, minmax(7rem, 1fr));
    }

    .product-demo-brand {
        display: none;
    }

    .product-demo-toolbar {
        align-items: stretch;
        flex-direction: column;
    }

    .product-demo-search {
        width: 100%;
    }

    .product-demo-grid {
        grid-template-columns: 1fr;
    }

    .live-panel-primary {
        min-height: 16rem;
    }

    .hero-chart {
        min-height: 8.5rem;
    }

    .hero-floating-panel {
        position: static;
        width: 100%;
        margin-top: 0.75rem;
        animation: none;
    }

    .journey-switcher,
    .segmented-control {
        width: 100%;
    }

    .trust-metric-grid,
    .trust-logo-row,
    .deployment-timeline,
    .landing-roi-output-grid {
        grid-template-columns: 1fr;
    }

    .premium-footer .landing-footer-links {
        grid-template-columns: 1fr;
    }
}

@media (prefers-reduced-motion: reduce) {
    .hero-chart span,
    .ai-progress span,
    .hero-floating-panel,
    .ai-token-lines i,
    .journey-panel.is-active {
        animation: none;
    }

    .product-browser {
        transition: none;
    }
}

/* Screenshot-matched public homepage */
.landing-reference {
    --reference-ink: #0b1f17;
    --reference-muted: color-mix(in srgb, var(--muted-foreground) 92%, #33564a);
    --reference-line: color-mix(in srgb, var(--border) 78%, var(--primary) 22%);
    --reference-soft: color-mix(in srgb, var(--primary) 6%, var(--background));
    --reference-card: color-mix(in srgb, var(--card) 94%, var(--primary) 6%);
    gap: clamp(2rem, 4vw, 3.25rem);
    background:
        radial-gradient(circle at 18% 8%, color-mix(in srgb, var(--primary) 10%, transparent), transparent 30rem),
        radial-gradient(circle at 86% 18%, color-mix(in srgb, var(--success) 7%, transparent), transparent 28rem);
    color: var(--reference-ink);
}

html[data-theme="dark"] .landing-reference,
html.dark .landing-reference {
    --reference-ink: #ecfdf5;
}

.landing-reference svg {
    width: 1rem;
    height: 1rem;
    flex: 0 0 auto;
}

.reference-hero {
    display: grid;
    grid-template-columns: minmax(0, 0.82fr) minmax(36rem, 1.1fr);
    gap: clamp(2rem, 5vw, 5rem);
    align-items: center;
    min-height: min(42rem, calc(100dvh - 4.25rem));
    padding: clamp(2rem, 5vw, 4rem) clamp(1rem, 3vw, 1.75rem) 0;
}

.landing-reference .reference-hero {
    min-height: auto;
    padding-inline: 0;
    padding-block: clamp(0.75rem, 2vw, 1.5rem) 0;
}

.reference-hero-copy {
    display: grid;
    gap: 1.35rem;
    align-content: center;
}

.reference-eyebrow {
    display: inline-flex;
    width: fit-content;
    align-items: center;
    gap: 0.45rem;
    min-height: 2rem;
    border: 1px solid color-mix(in srgb, var(--primary) 26%, var(--border));
    border-radius: var(--radius-pill);
    background: color-mix(in srgb, var(--primary) 9%, var(--card));
    color: var(--primary);
    padding: 0.28rem 0.75rem;
    font-size: 0.78rem;
    font-weight: 850;
}

.reference-hero h1 {
    max-width: 40rem;
    margin: 0;
    color: var(--reference-ink);
    font-size: clamp(2.15rem, 4vw, 3.9rem);
    font-weight: 700;
    line-height: 1;
    letter-spacing: 0;
}

.reference-hero h1 span {
    color: var(--primary);
}

.reference-hero-copy p {
    max-width: 36.5rem;
    margin: 0;
    color: var(--reference-muted);
    font-size: clamp(1rem, 1.35vw, 1.18rem);
    line-height: 1.62;
}

.reference-actions,
.reference-proof-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    align-items: center;
}

.reference-actions .button {
    gap: 0.45rem;
    min-height: 3.1rem;
    border-radius: 0.55rem;
    padding-inline: 1.15rem;
}

.reference-proof-list {
    gap: 1.4rem;
    color: var(--reference-muted);
    font-size: 0.82rem;
    font-weight: 800;
}

.reference-proof-list span {
    display: inline-flex;
    gap: 0.45rem;
    align-items: center;
}

.reference-proof-list svg {
    color: var(--success);
}

.reference-dashboard {
    position: relative;
    display: grid;
    grid-template-columns: 8.6rem minmax(0, 1fr);
    min-height: 34.8rem;
    border: 1px solid var(--reference-line);
    border-radius: 1.35rem;
    background: color-mix(in srgb, var(--card) 96%, var(--primary) 4%);
    box-shadow: 0 1.8rem 4rem color-mix(in srgb, var(--foreground) 13%, transparent), var(--shadow-elevated);
}

.reference-dashboard-sidebar {
    display: grid;
    gap: 0.45rem;
    align-content: start;
    border-right: 1px solid var(--border);
    padding: 1.15rem 0.75rem;
}

.reference-dashboard-brand {
    display: block;
    width: 7.4rem;
    height: 2rem;
    margin-bottom: 1rem;
}

.reference-dashboard-brand img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: contain;
    object-position: left center;
}

.reference-dashboard-sidebar span:not(.reference-dashboard-brand) {
    display: flex;
    gap: 0.45rem;
    align-items: center;
    min-height: 2rem;
    border-radius: 0.5rem;
    color: var(--reference-muted);
    padding: 0.35rem 0.45rem;
    font-size: 0.76rem;
    font-weight: 800;
}

.reference-dashboard-sidebar .is-active {
    background: color-mix(in srgb, var(--primary) 10%, var(--card));
    color: var(--reference-ink);
}

.reference-dashboard-main {
    display: grid;
    gap: 0.9rem;
    align-content: start;
    padding: 1.2rem;
}

.reference-dashboard-top,
.reference-panel-head {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    align-items: center;
}

.reference-dashboard-top > strong {
    font-size: 1rem;
}

.reference-user-pill {
    display: inline-flex;
    gap: 0.5rem;
    align-items: center;
    color: var(--reference-muted);
    font-size: 0.72rem;
    font-weight: 800;
}

.reference-user-pill small {
    color: var(--muted-foreground);
    font-weight: 650;
}

.reference-dashboard-metrics {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.65rem;
}

.reference-dashboard-metrics article,
.reference-panel,
.reference-float {
    border: 1px solid var(--border);
    border-radius: 0.85rem;
    background: var(--card);
    box-shadow: var(--shadow);
}

.reference-dashboard-metrics article {
    display: grid;
    gap: 0.1rem;
    min-height: 6.2rem;
    padding: 0.75rem;
}

.reference-dashboard-metrics span,
.reference-panel-head span,
.reference-ring-panel > span {
    color: var(--reference-muted);
    font-size: 0.68rem;
    font-weight: 850;
}

.reference-dashboard-metrics strong {
    font-size: 1.55rem;
    line-height: 1;
}

.reference-dashboard-metrics small {
    color: var(--success);
    font-size: 0.72rem;
    font-weight: 900;
}

.reference-dashboard-metrics i {
    display: block;
    width: 3.8rem;
    height: 1.4rem;
    margin-left: auto;
    background:
        linear-gradient(140deg, transparent 0 16%, var(--primary) 16% 19%, transparent 19% 34%, var(--primary) 34% 37%, transparent 37% 55%, var(--primary) 55% 58%, transparent 58%),
        linear-gradient(to top, color-mix(in srgb, var(--primary) 10%, transparent), transparent);
    clip-path: polygon(0 80%, 18% 65%, 35% 78%, 55% 42%, 72% 55%, 100% 24%, 100% 100%, 0 100%);
}

.reference-dashboard-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(9rem, 0.72fr) minmax(10rem, 0.76fr);
    gap: 0.65rem;
}

.reference-panel {
    padding: 0.8rem;
}

.reference-chart-panel {
    min-height: 12.4rem;
}

.reference-line-chart {
    position: relative;
    display: flex;
    gap: 0.5rem;
    align-items: end;
    min-height: 8.5rem;
    margin-top: 0.9rem;
    border-bottom: 1px solid var(--border);
    background:
        linear-gradient(to top, color-mix(in srgb, var(--border) 52%, transparent) 1px, transparent 1px) 0 0 / 100% 33.33%;
    padding: 0 0.4rem;
}

.reference-line-chart::before {
    position: absolute;
    inset: 1.2rem 0.8rem 1rem;
    background:
        linear-gradient(135deg, transparent 0 10%, var(--primary) 10% 12%, transparent 12% 25%, var(--primary) 25% 27%, transparent 27% 41%, var(--primary) 41% 43%, transparent 43% 55%, var(--primary) 55% 57%, transparent 57% 71%, var(--primary) 71% 73%, transparent 73%),
        linear-gradient(25deg, transparent 0 20%, color-mix(in srgb, var(--primary) 28%, transparent) 20% 22%, transparent 22%);
    clip-path: polygon(0 72%, 16% 50%, 31% 68%, 47% 38%, 63% 54%, 79% 20%, 100% 58%, 100% 100%, 0 100%);
    content: "";
    opacity: 0.95;
}

.reference-line-chart i {
    flex: 1;
    min-width: 0.45rem;
    border-radius: 999px 999px 0.2rem 0.2rem;
    background: linear-gradient(180deg, color-mix(in srgb, var(--primary) 82%, var(--success)), color-mix(in srgb, var(--primary) 18%, transparent));
    opacity: 0.42;
}

.reference-line-chart i:nth-child(1) {
    height: 40%;
}

.reference-line-chart i:nth-child(2) {
    height: 62%;
}

.reference-line-chart i:nth-child(3) {
    height: 48%;
}

.reference-line-chart i:nth-child(4) {
    height: 70%;
}

.reference-line-chart i:nth-child(5) {
    height: 56%;
}

.reference-line-chart i:nth-child(6) {
    height: 90%;
}

.reference-ring-panel {
    display: grid;
    place-items: center;
    text-align: center;
}

.reference-ring {
    display: grid;
    place-items: center;
    width: 7.2rem;
    height: 7.2rem;
    margin-top: 0.55rem;
    border-radius: 999px;
    background:
        radial-gradient(circle, var(--card) 0 54%, transparent 55%),
        conic-gradient(var(--primary) 0 94%, color-mix(in srgb, var(--secondary) 78%, var(--card)) 94% 100%);
}

.reference-ring strong,
.reference-ring small {
    grid-area: 1 / 1;
}

.reference-ring strong {
    font-size: 1.55rem;
}

.reference-ring small {
    margin-top: 2.25rem;
    color: var(--success);
    font-size: 0.65rem;
    font-weight: 850;
}

.reference-activity-panel {
    display: grid;
    gap: 0.65rem;
}

.reference-activity-panel > span {
    display: grid;
    gap: 0.08rem;
    color: var(--reference-ink);
    font-size: 0.75rem;
    font-weight: 850;
}

.reference-activity-panel small {
    color: var(--muted-foreground);
    font-size: 0.68rem;
}

.reference-activity-panel a {
    display: inline-flex;
    justify-content: center;
    border: 1px solid color-mix(in srgb, var(--primary) 28%, var(--border));
    border-radius: var(--radius-md);
    color: var(--primary);
    padding: 0.55rem;
    font-size: 0.72rem;
    font-weight: 850;
}

.reference-float {
    position: absolute;
    display: flex;
    gap: 0.65rem;
    align-items: center;
    padding: 0.8rem;
}

.reference-ai-float {
    bottom: -1.1rem;
    left: -3.8rem;
    width: 17rem;
}

.reference-question-float {
    right: 12.5rem;
    bottom: 1.3rem;
    display: grid;
    min-width: 13rem;
}

.reference-float span,
.reference-question-float span {
    color: var(--reference-muted);
    font-size: 0.73rem;
    line-height: 1.35;
}

.reference-float strong,
.reference-question-float strong {
    display: block;
    color: var(--reference-ink);
    font-size: 1.45rem;
}

.reference-question-float small {
    color: var(--success);
    font-size: 0.72rem;
    font-weight: 850;
}

.reference-trust-row {
    display: grid;
    grid-template-columns: minmax(0, 1.08fr) minmax(28rem, 0.92fr);
    gap: 1rem;
    align-items: stretch;
    padding-inline: clamp(1rem, 3vw, 1.75rem);
}

.reference-logo-card,
.reference-stat-card-grid article,
.reference-audience-card,
.reference-workflow-card-grid article,
.reference-review-card,
.reference-plan,
.reference-contact-plan,
.reference-newsletter {
    border: 1px solid var(--reference-line);
    border-radius: 0.85rem;
    background: var(--card);
    box-shadow: var(--shadow);
}

.reference-logo-card {
    display: grid;
    gap: 0.8rem;
    padding: 1rem;
}

.reference-logo-card > span {
    color: var(--reference-muted);
    font-size: 0.82rem;
    font-weight: 800;
}

.reference-logo-card > div {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 0.65rem;
}

.reference-logo-card strong {
    display: flex;
    gap: 0.35rem;
    align-items: center;
    min-width: 0;
    color: var(--reference-muted);
    font-size: 0.72rem;
    line-height: 1.1;
    text-transform: uppercase;
}

.reference-stat-card-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.reference-stat-card-grid article {
    display: grid;
    place-items: center;
    gap: 0.22rem;
    min-height: 7rem;
    border-radius: 0;
    text-align: center;
}

.reference-stat-card-grid article:first-child {
    border-radius: 0.85rem 0 0 0.85rem;
}

.reference-stat-card-grid article:last-child {
    border-radius: 0 0.85rem 0.85rem 0;
}

.reference-stat-card-grid strong {
    font-size: 1.45rem;
    line-height: 1;
}

.reference-stat-card-grid span {
    color: var(--reference-muted);
    font-size: 0.72rem;
    font-weight: 800;
}

.reference-section,
.reference-pricing,
.reference-final-cta,
.reference-footer {
    margin-inline: clamp(1rem, 3vw, 1.75rem);
}

.landing-reference .reference-section,
.landing-reference .reference-pricing,
.landing-reference .reference-final-cta {
    margin-inline: 0;
}

.reference-section {
    display: grid;
    gap: 1.35rem;
}

.reference-section-head {
    display: flex;
    gap: 1rem;
    align-items: end;
    justify-content: space-between;
}

.reference-section-head h2,
.reference-security h2,
.reference-pricing-intro h2,
.reference-final-cta h2 {
    max-width: 44rem;
    margin: 0.25rem 0 0;
    color: var(--reference-ink);
    font-size: clamp(1.65rem, 3vw, 2.5rem);
    line-height: 1.08;
}

.reference-kicker {
    color: var(--reference-muted);
    font-size: 0.72rem;
    font-weight: 900;
    text-transform: uppercase;
}

.reference-section-head a,
.reference-audience-card a {
    display: inline-flex;
    gap: 0.35rem;
    align-items: center;
    color: var(--primary);
    font-size: 0.8rem;
    font-weight: 850;
}

.reference-timeline {
    position: relative;
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: clamp(0.75rem, 3vw, 4rem);
    padding-top: 3.8rem;
}

.reference-timeline::before {
    position: absolute;
    top: 1.75rem;
    right: 7%;
    left: 7%;
    height: 1px;
    border-top: 1px dashed color-mix(in srgb, var(--primary) 36%, var(--border));
    content: "";
}

.reference-timeline article {
    position: relative;
    display: grid;
    gap: 0.35rem;
    min-height: 8.9rem;
    border: 1px solid var(--reference-line);
    border-radius: 0.75rem;
    background: var(--card);
    padding: 1.1rem;
    box-shadow: var(--shadow);
}

.reference-step-icon {
    position: absolute;
    top: -4rem;
    left: 50%;
    display: grid;
    place-items: center;
    width: 4rem;
    height: 4rem;
    border: 1px solid var(--reference-line);
    border-radius: 999px;
    background: var(--card);
    color: var(--primary);
    box-shadow: var(--shadow-soft);
    transform: translateX(-50%);
}

.reference-step-icon svg {
    width: 1.35rem;
    height: 1.35rem;
}

.reference-timeline article > span {
    color: var(--primary);
    font-size: 0.82rem;
    font-weight: 900;
}

.reference-timeline h3,
.reference-audience-card h3,
.reference-capability-grid h3,
.reference-workflow-card-grid h3,
.reference-plan h3,
.reference-contact-plan h3 {
    margin: 0;
    color: var(--reference-ink);
    font-size: 0.98rem;
    line-height: 1.2;
}

.reference-timeline p,
.reference-capability-grid p,
.reference-workflow-card-grid p,
.reference-contact-plan p,
.reference-pricing-intro p,
.reference-final-cta p {
    margin: 0;
    color: var(--reference-muted);
    font-size: 0.82rem;
    line-height: 1.55;
}

.reference-audience-grid,
.reference-workflow-card-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1rem;
}

.reference-audience-card {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 8rem;
    gap: 0.75rem;
    min-height: 12rem;
    overflow: hidden;
    padding: 1.1rem 0 0 1.1rem;
}

.reference-audience-card h3 {
    display: flex;
    gap: 0.5rem;
    align-items: center;
    font-size: 1.12rem;
}

.reference-audience-card h3 svg {
    color: var(--primary);
}

.reference-audience-card ul,
.reference-plan ul {
    display: grid;
    gap: 0.45rem;
    margin: 0.8rem 0;
    padding: 0;
    list-style: none;
}

.reference-audience-card li,
.reference-plan li {
    display: flex;
    gap: 0.45rem;
    align-items: flex-start;
    color: var(--reference-muted);
    font-size: 0.78rem;
    line-height: 1.4;
}

.reference-audience-card li svg,
.reference-plan li svg {
    width: 0.85rem;
    height: 0.85rem;
    color: var(--primary);
    margin-top: 0.1rem;
}

.reference-illustration {
    position: relative;
    align-self: end;
    min-height: 9rem;
    border-radius: 1rem 0 0 0;
    background:
        radial-gradient(circle at 40% 30%, color-mix(in srgb, var(--primary) 24%, transparent), transparent 44%),
        color-mix(in srgb, var(--primary) 5%, var(--secondary));
}

.reference-illustration span,
.reference-illustration i {
    position: absolute;
    display: block;
    border-radius: 999px 999px 0.7rem 0.7rem;
    background: color-mix(in srgb, var(--primary) 72%, var(--card));
}

.reference-illustration span {
    right: 2.7rem;
    bottom: 2.4rem;
    width: 2.8rem;
    height: 3.7rem;
}

.reference-illustration i {
    right: 1.3rem;
    bottom: 0.8rem;
    width: 5rem;
    height: 2.6rem;
    border-radius: 0.35rem;
    background: color-mix(in srgb, var(--foreground) 18%, var(--card));
}

.reference-illustration-institutions span {
    width: 5.8rem;
    height: 4.6rem;
    border-radius: 0.4rem 0.4rem 0 0;
    background: color-mix(in srgb, var(--primary) 16%, var(--card));
}

.reference-illustration-institutions i {
    background: var(--primary);
}

.reference-capability-grid {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 1.2rem;
}

.reference-capability-grid article {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    gap: 0.7rem;
    align-items: start;
}

.reference-capability-grid article > span {
    display: grid;
    place-items: center;
    width: 2.8rem;
    height: 2.8rem;
    border: 1px solid color-mix(in srgb, var(--primary) 22%, var(--border));
    border-radius: 0.65rem;
    background: color-mix(in srgb, var(--primary) 7%, var(--card));
    color: var(--primary);
}

.reference-workflow-card-grid article {
    display: grid;
    gap: 0.75rem;
    padding: 0.75rem;
}

.reference-workflow-media {
    position: relative;
    display: block;
    width: 100%;
    overflow: hidden;
    aspect-ratio: 16 / 9;
    border: 1px solid var(--border);
    border-radius: 0.65rem;
    background: var(--secondary);
    color: var(--primary);
    padding: 0;
    cursor: pointer;
    font: inherit;
    text-align: left;
}

.reference-workflow-media img {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: cover;
    object-position: left top;
    transition: transform var(--motion-base);
}

.reference-workflow-play {
    position: absolute;
    right: 0.75rem;
    bottom: 0.75rem;
    display: grid;
    place-items: center;
    width: 2.35rem;
    height: 2.35rem;
    border: 1px solid var(--reference-line);
    border-radius: 999px;
    background: color-mix(in srgb, var(--card) 88%, transparent);
    color: var(--primary);
    box-shadow: var(--shadow);
    backdrop-filter: blur(10px);
}

.reference-workflow-media:hover img,
.reference-workflow-media:focus-visible img {
    transform: scale(1.015);
}

.reference-workflow-media:hover .reference-workflow-play,
.reference-workflow-media:focus-visible .reference-workflow-play {
    border-color: color-mix(in srgb, var(--primary) 44%, var(--reference-line));
    background: var(--card);
}

.reference-workflow-media:focus-visible {
    border-color: var(--primary);
    outline: 3px solid color-mix(in srgb, var(--ring) 24%, transparent);
    outline-offset: 3px;
}

.workflow-video-modal-open {
    overflow: hidden;
}

.workflow-video-dialog {
    width: min(70rem, calc(100vw - 2rem), calc((100dvh - 12rem) * 1.6));
    max-width: none;
    max-height: calc(100dvh - 2rem);
    overflow: hidden;
    border: 1px solid var(--reference-line);
    border-radius: 0.75rem;
    background: var(--card);
    color: var(--foreground);
    padding: 0;
    box-shadow: 0 1.5rem 4rem rgba(0, 0, 0, 0.34);
}

.workflow-video-dialog::backdrop {
    background: rgba(2, 18, 14, 0.78);
    backdrop-filter: blur(6px);
}

.workflow-video-dialog-shell {
    display: grid;
    max-height: calc(100dvh - 2rem);
    overflow: auto;
}

.workflow-video-dialog header {
    display: flex;
    gap: 1rem;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid var(--border);
    padding: 1rem 1.15rem;
}

.workflow-video-dialog h2 {
    margin: 0.15rem 0 0;
    color: var(--reference-ink);
    font-size: 1.15rem;
    line-height: 1.25;
}

.workflow-video-dialog header button {
    display: grid;
    place-items: center;
    flex: 0 0 auto;
    width: 2.25rem;
    height: 2.25rem;
    border: 0;
    background: transparent;
    color: var(--reference-muted);
    padding: 0;
    cursor: pointer;
}

.workflow-video-dialog header button:hover,
.workflow-video-dialog header button:focus-visible {
    color: var(--foreground);
}

.workflow-video-dialog header button:focus-visible {
    outline: 2px solid var(--ring);
    outline-offset: 2px;
}

.workflow-video-dialog header button svg {
    width: 1.35rem;
    height: 1.35rem;
}

.workflow-video-dialog-frame {
    display: grid;
    place-items: center;
    aspect-ratio: 16 / 10;
    background: #020807;
}

.workflow-video-dialog video {
    display: block;
    width: 100%;
    height: 100%;
    max-height: calc(100dvh - 12rem);
    object-fit: contain;
}

.workflow-video-dialog > .workflow-video-dialog-shell > p {
    margin: 0;
    color: var(--reference-muted);
    font-size: 0.82rem;
    line-height: 1.55;
    padding: 0.85rem 1.15rem 1rem;
}

.reference-security {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(23rem, 0.45fr);
    gap: 1.5rem;
    align-items: end;
}

.reference-security-grid {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 0.85rem;
    margin-top: 2rem;
    border-top: 1px solid var(--border);
    padding-top: 1.2rem;
}

.reference-security-grid article {
    display: grid;
    justify-items: center;
    gap: 0.35rem;
    text-align: center;
}

.reference-security-grid article > span {
    display: grid;
    place-items: center;
    width: 3.1rem;
    height: 3.1rem;
    border: 1px solid var(--reference-line);
    border-radius: 999px;
    background: var(--card);
    color: var(--primary);
}

.reference-security-grid strong {
    font-size: 0.78rem;
}

.reference-security-grid small {
    color: var(--reference-muted);
    font-size: 0.72rem;
}

.reference-review-card {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    min-height: 10rem;
    background:
        radial-gradient(circle at 82% 24%, color-mix(in srgb, var(--success) 28%, transparent), transparent 6rem),
        linear-gradient(135deg, #063f2d, #006b43);
    color: white;
    padding: 1.35rem;
}

.reference-review-card > svg {
    width: 4.5rem;
    height: 4.5rem;
    opacity: 0.24;
}

.reference-review-card strong {
    display: block;
    font-size: 1.1rem;
}

.reference-stars {
    display: flex;
    gap: 0.16rem;
    align-items: center;
    margin: 1rem 0 0.35rem;
    color: #ffd166;
    font-size: 0.85rem;
    font-weight: 850;
}

.reference-review-card small {
    color: color-mix(in srgb, white 84%, transparent);
    font-size: 0.82rem;
    font-weight: 800;
}

.reference-pricing {
    display: grid;
    grid-template-columns: minmax(15rem, 0.86fr) repeat(3, minmax(0, 1fr)) minmax(14rem, 0.78fr);
    gap: 0;
    align-items: stretch;
}

.reference-pricing-intro {
    display: grid;
    gap: 1rem;
    align-content: center;
    min-height: 18rem;
    border-radius: 0.85rem 0 0 0.85rem;
    background:
        radial-gradient(circle at 70% 20%, color-mix(in srgb, var(--success) 18%, transparent), transparent 8rem),
        linear-gradient(135deg, #053927, #006b43);
    color: white;
    padding: 1.35rem;
}

.reference-pricing-intro h2,
.reference-pricing-intro p {
    color: white;
}

.reference-pricing-intro .reference-kicker {
    color: color-mix(in srgb, white 75%, transparent);
}

.reference-pricing-intro .button {
    width: fit-content;
}

.reference-plan {
    position: relative;
    display: grid;
    align-content: center;
    gap: 0.65rem;
    border-radius: 0;
    border-left: 0;
    padding: 1.35rem;
    box-shadow: none;
}

.reference-plan.is-featured {
    border-color: color-mix(in srgb, var(--primary) 34%, var(--border));
}

.reference-plan-badge {
    position: absolute;
    top: -0.8rem;
    left: 50%;
    border-radius: var(--radius-pill);
    background: var(--primary);
    color: var(--primary-foreground);
    padding: 0.3rem 0.75rem;
    font-size: 0.7rem;
    font-weight: 900;
    transform: translateX(-50%);
    white-space: nowrap;
}

.reference-plan > p {
    margin: 0;
    color: var(--reference-muted);
    font-size: 0.78rem;
}

.reference-plan-price {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    align-items: flex-start;
    margin: 0.5rem 0;
}

.reference-plan-price-row {
    display: flex;
    flex-wrap: wrap;
    gap: 0.45rem;
    align-items: baseline;
}

.reference-plan-price strong {
    font-size: 2.1rem;
    line-height: 1;
}

.reference-plan-price s {
    color: color-mix(in srgb, var(--reference-muted) 82%, transparent);
    font-size: 1rem;
    font-weight: 850;
    line-height: 1;
    text-decoration-thickness: 0.1em;
}

.reference-plan-price span {
    color: var(--reference-muted);
    font-size: 0.82rem;
    line-height: 1.35;
}

.reference-contact-plan {
    display: grid;
    gap: 0.75rem;
    align-content: center;
    border-left: 0;
    border-radius: 0 0.85rem 0.85rem 0;
    background: color-mix(in srgb, var(--primary) 5%, var(--card));
    padding: 1.35rem;
}

.reference-final-cta {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    align-items: center;
    border-radius: 0.85rem;
    background:
        radial-gradient(circle at 80% 20%, color-mix(in srgb, var(--success) 20%, transparent), transparent 11rem),
        linear-gradient(135deg, #063f2d, #006b43);
    color: white;
    padding: clamp(1.4rem, 3vw, 2rem) clamp(1.5rem, 4vw, 3rem);
}

.reference-final-cta h2,
.reference-final-cta p {
    color: white;
}

.reference-final-cta .button {
    background: white;
    color: #06432f;
}

.reference-footer {
    display: grid;
    grid-template-columns: minmax(16rem, 0.7fr) minmax(0, 1.2fr) minmax(16rem, 0.55fr);
    gap: clamp(1rem, 3vw, 2rem);
    border-top: 1px solid var(--border);
    padding: 1.5rem 0 0.75rem;
}

.reference-footer-brand {
    display: grid;
    gap: 1rem;
    align-content: start;
}

.reference-footer-brand .brand-full-logo {
    width: 12.7rem;
    height: 3.4rem;
}

.reference-footer-brand p {
    margin: 0;
    color: var(--reference-muted);
    font-size: 0.78rem;
}

.reference-footer-links {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 0.85rem;
}

.reference-footer-links div {
    display: grid;
    gap: 0.35rem;
    align-content: start;
}

.reference-footer-links h3 {
    margin: 0 0 0.25rem;
    font-size: 0.78rem;
}

.reference-footer-links a,
.reference-footer-bottom a {
    color: var(--reference-muted);
    font-size: 0.76rem;
    font-weight: 700;
}

.reference-newsletter {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 0.55rem;
    align-content: start;
    padding: 1rem;
}

.reference-newsletter label {
    display: grid;
    gap: 0.55rem;
    color: var(--reference-ink);
    font-size: 0.82rem;
    font-weight: 850;
}

.reference-newsletter input {
    min-height: 2.6rem;
    border: 1px solid var(--input);
    border-radius: var(--radius-md);
    background: var(--card);
    color: var(--foreground);
    padding: 0.45rem 0.65rem;
    font: inherit;
}

.reference-newsletter button {
    align-self: end;
    display: grid;
    place-items: center;
    width: 2.6rem;
    height: 2.6rem;
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    background: var(--card);
    color: var(--primary);
    cursor: pointer;
}

.reference-footer-bottom {
    display: flex;
    flex-wrap: wrap;
    grid-column: 1 / -1;
    gap: 1rem;
    border-top: 1px solid var(--border);
    padding-top: 0.8rem;
}

@media (max-width: 1180px) {
    .reference-hero,
    .reference-trust-row,
    .reference-security,
    .reference-footer {
        grid-template-columns: 1fr;
    }

    .reference-dashboard {
        grid-template-columns: 8rem minmax(0, 1fr);
    }

    .reference-pricing {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 0.85rem;
    }

    .reference-pricing-intro,
    .reference-contact-plan,
    .reference-plan {
        border: 1px solid var(--reference-line);
        border-radius: 0.85rem;
    }
}

@media (max-width: 920px) {
    .reference-dashboard,
    .reference-dashboard-grid,
    .reference-audience-grid,
    .reference-workflow-card-grid,
    .reference-capability-grid,
    .reference-security-grid,
    .reference-footer-links {
        grid-template-columns: 1fr;
    }

    .reference-dashboard-sidebar {
        grid-template-columns: repeat(6, minmax(7rem, 1fr));
        border-right: 0;
        border-bottom: 1px solid var(--border);
        overflow-x: auto;
    }

    .reference-dashboard-brand {
        margin: 0;
    }

    .reference-dashboard-metrics,
    .reference-logo-card > div,
    .reference-stat-card-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .reference-stat-card-grid {
        gap: 0.75rem;
    }

    .reference-stat-card-grid article,
    .reference-stat-card-grid article:first-child,
    .reference-stat-card-grid article:last-child {
        border-radius: 0.85rem;
    }

    .reference-timeline {
        grid-template-columns: 1fr;
        gap: 4rem;
    }

    .reference-timeline::before {
        display: none;
    }

    .reference-pricing {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 640px) {
    .reference-hero {
        gap: 1.5rem;
        min-height: auto;
        padding-inline: 0;
    }

    .workflow-video-dialog {
        width: calc(100vw - 1rem);
        max-height: calc(100dvh - 1rem);
    }

    .workflow-video-dialog-shell {
        max-height: calc(100dvh - 1rem);
    }

    .workflow-video-dialog header {
        padding: 0.8rem 0.9rem;
    }

    .workflow-video-dialog h2 {
        font-size: 1rem;
    }

    .workflow-video-dialog > .workflow-video-dialog-shell > p {
        padding: 0.75rem 0.9rem 0.9rem;
    }

    .reference-hero h1 {
        font-size: clamp(2rem, 9vw, 2.8rem);
    }

    .reference-actions,
    .reference-final-cta {
        align-items: stretch;
        flex-direction: column;
    }

    .reference-actions .button,
    .reference-final-cta .button {
        width: 100%;
    }

    .reference-dashboard {
        min-height: auto;
    }

    .reference-dashboard-sidebar {
        grid-template-columns: repeat(3, minmax(7.5rem, 1fr));
    }

    .reference-dashboard-metrics,
    .reference-logo-card > div,
    .reference-stat-card-grid {
        grid-template-columns: 1fr;
    }

    .reference-float {
        position: static;
        width: auto;
        margin: 0.75rem;
    }

    .reference-audience-card {
        grid-template-columns: 1fr;
        padding: 1rem;
    }

    .reference-illustration {
        min-height: 7rem;
        border-radius: 0.75rem;
    }

    .reference-section-head {
        align-items: flex-start;
        flex-direction: column;
    }

    .reference-footer {
        margin-inline: 0;
    }

    .reference-newsletter {
        grid-template-columns: 1fr;
    }
}

.pricing-reference {
    --pricing-ink: #0b1f17;
    --pricing-muted: #4f6259;
    --pricing-line: #dbe9e0;
    --pricing-soft: #f3fbf5;
    --pricing-card: rgba(255, 255, 255, 0.88);
    --pricing-green: #047857;
    --pricing-green-dark: #064e3b;
    --pricing-purple: #7c3aed;
    gap: clamp(1.15rem, 2vw, 1.65rem);
    padding-block: clamp(1.75rem, 2vw, 2.5rem) 1.25rem;
    background:
        radial-gradient(circle at 78% 12%, color-mix(in srgb, var(--primary) 10%, transparent), transparent 23rem),
        radial-gradient(circle at 0% 38%, color-mix(in srgb, var(--brand-lime) 14%, transparent), transparent 25rem),
        linear-gradient(135deg, color-mix(in srgb, var(--background) 94%, #ffffff), var(--background));
}

.pricing-reference svg {
    width: 1rem;
    height: 1rem;
    flex: 0 0 auto;
}

.pricing-reference-hero {
    display: grid;
    grid-template-columns: minmax(0, 1.12fr) minmax(24rem, 0.72fr);
    gap: clamp(1.4rem, 5vw, 5rem);
    align-items: center;
}

.pricing-reference-copy {
    display: grid;
    gap: 1.15rem;
    max-width: 52rem;
}

.pricing-reference-pill,
.pricing-plan-label,
.pricing-recommended,
.pricing-reference-card header span {
    width: fit-content;
    border-radius: var(--radius-pill);
    background: color-mix(in srgb, var(--primary) 12%, var(--card));
    color: var(--pricing-green);
    padding: 0.28rem 0.58rem;
    font-size: 0.72rem;
    font-weight: 900;
    letter-spacing: 0.06em;
    line-height: 1;
    text-transform: uppercase;
}

.pricing-reference h1,
.pricing-reference h2,
.pricing-reference p {
    margin: 0;
}

.pricing-reference h1 {
    max-width: 13ch;
    color: var(--pricing-ink);
    font-size: clamp(2.1rem, 4.2vw, 3.8rem);
    font-weight: 700;
    line-height: 1;
}

.pricing-reference-copy > p {
    max-width: 64ch;
    color: var(--pricing-muted);
    font-size: clamp(0.98rem, 1.2vw, 1.08rem);
    line-height: 1.7;
}

.pricing-reference-signals {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: clamp(0.75rem, 2vw, 1.75rem);
    margin-top: 0.6rem;
}

.pricing-reference-signals span {
    display: grid;
    grid-template-columns: 2rem minmax(0, 1fr);
    gap: 0.12rem 0.65rem;
    align-items: center;
    min-width: 0;
}

.pricing-reference-signals svg {
    grid-row: span 2;
    width: 2rem;
    height: 2rem;
    border-radius: 999px;
    background: color-mix(in srgb, var(--primary) 10%, var(--card));
    color: var(--primary);
    padding: 0.48rem;
}

.pricing-reference-signals strong {
    overflow: hidden;
    color: var(--pricing-ink);
    font-size: 0.78rem;
    line-height: 1.15;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.pricing-reference-signals small {
    overflow: hidden;
    color: var(--pricing-muted);
    font-size: 0.72rem;
    line-height: 1.25;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.pricing-reference-advisor {
    display: grid;
    gap: 1.6rem;
    justify-items: stretch;
    align-content: center;
}

.pricing-reference-toggle {
    justify-self: start;
    display: grid;
    grid-template-columns: repeat(2, minmax(6.4rem, 1fr)) auto;
    align-items: center;
    overflow: hidden;
    border: 1px solid color-mix(in srgb, var(--primary) 25%, var(--pricing-line));
    border-radius: var(--radius-pill);
    background: color-mix(in srgb, var(--card) 82%, transparent);
    padding: 0.28rem;
    box-shadow: var(--shadow);
}

.pricing-reference-toggle button {
    min-height: 2.55rem;
    border: 0;
    border-radius: var(--radius-pill);
    background: transparent;
    color: var(--pricing-ink);
    cursor: pointer;
    font: inherit;
    font-size: 0.82rem;
    font-weight: 850;
    transition: background var(--motion-default), color var(--motion-default), box-shadow var(--motion-default), transform var(--motion-fast);
}

.pricing-reference-toggle button:hover,
.pricing-reference-toggle button:focus-visible {
    background: color-mix(in srgb, var(--primary) 9%, var(--card));
    outline: none;
}

.pricing-reference-toggle button:active {
    transform: translateY(1px);
}

.pricing-reference-toggle button[aria-pressed="true"] {
    background: linear-gradient(135deg, var(--pricing-green), #059669);
    color: #ffffff;
    box-shadow: 0 0.65rem 1.2rem rgba(4, 120, 87, 0.2);
}

.pricing-reference-toggle span {
    padding: 0 0.95rem;
    color: var(--pricing-green);
    font-size: 0.76rem;
    font-weight: 900;
    white-space: nowrap;
}

.pricing-advisor-card,
.pricing-reference-plan,
.pricing-reference-comparison,
.pricing-reference-card,
.pricing-reference-trust {
    border: 1px solid var(--pricing-line);
    border-radius: 0.9rem;
    background: var(--pricing-card);
    box-shadow: 0 1rem 2.5rem rgba(15, 23, 42, 0.045);
}

.pricing-advisor-card {
    display: grid;
    grid-template-columns: 3.8rem minmax(0, 1fr);
    gap: 1.1rem;
    min-height: 12.8rem;
    align-items: center;
    padding: clamp(1.35rem, 2.4vw, 2rem);
}

.pricing-advisor-icon,
.pricing-plan-icon {
    display: grid;
    place-items: center;
    width: 3.3rem;
    height: 3.3rem;
    border-radius: 0.9rem;
    background: color-mix(in srgb, var(--primary) 11%, var(--card));
    color: var(--primary);
}

.pricing-advisor-icon svg,
.pricing-plan-icon svg {
    width: 1.35rem;
    height: 1.35rem;
}

.pricing-advisor-card h2 {
    color: var(--pricing-ink);
    font-size: 1rem;
    line-height: 1.2;
}

.pricing-advisor-card p {
    margin-top: 0.55rem;
    max-width: 31rem;
    color: var(--pricing-muted);
    font-size: 0.85rem;
    line-height: 1.55;
}

.pricing-advisor-card .button {
    margin-top: 1.15rem;
}

.pricing-reference-plans {
    display: grid;
    gap: clamp(1.1rem, 2vw, 1.75rem);
}

.pricing-plan-group {
    display: grid;
    gap: clamp(0.9rem, 1.8vw, 1.25rem);
}

.pricing-plan-group-header {
    display: flex;
    gap: 1rem;
    align-items: end;
    justify-content: space-between;
    border: 1px solid var(--pricing-line);
    border-radius: 1rem;
    background: color-mix(in srgb, var(--pricing-card) 88%, var(--primary) 4%);
    padding: clamp(1rem, 2vw, 1.35rem);
}

.pricing-plan-group-header > div {
    display: grid;
    gap: 0.45rem;
    max-width: 52rem;
}

.pricing-plan-group-header h2 {
    margin: 0;
    color: var(--pricing-ink);
    font-size: clamp(1.35rem, 2vw, 1.9rem);
    line-height: 1.08;
}

.pricing-plan-group-header p {
    margin: 0;
    color: var(--pricing-muted);
    font-size: 0.92rem;
    line-height: 1.55;
}

.pricing-plan-group-header .pricing-plan-label {
    width: fit-content;
}

.pricing-plan-group-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 18rem), 1fr));
    gap: clamp(1rem, 2vw, 1.75rem);
    align-items: stretch;
}

.pricing-reference-plan {
    position: relative;
    display: grid;
    grid-template-rows: auto auto minmax(0, 1fr) auto;
    gap: 1.2rem;
    min-height: 32rem;
    padding: clamp(1.35rem, 2.2vw, 2rem);
    transition: border-color var(--motion-default), box-shadow var(--motion-default), transform var(--motion-default);
}

.pricing-reference-plan:hover,
.pricing-reference-plan:focus-within {
    border-color: color-mix(in srgb, var(--primary) 32%, var(--pricing-line));
    box-shadow: 0 1.3rem 3.2rem rgba(15, 23, 42, 0.08);
    transform: translateY(-2px);
}

.pricing-reference-plan.is-featured {
    border-color: var(--pricing-green);
    box-shadow: 0 1.6rem 3.4rem rgba(4, 120, 87, 0.13);
}

.pricing-reference-plan.is-purple .pricing-plan-label {
    background: color-mix(in srgb, var(--pricing-purple) 10%, var(--card));
    color: var(--pricing-purple);
}

.pricing-reference-plan.is-purple .pricing-plan-icon {
    background: color-mix(in srgb, var(--pricing-purple) 12%, var(--card));
    color: var(--pricing-purple);
}

.pricing-recommended {
    position: absolute;
    top: -0.72rem;
    left: 50%;
    background: linear-gradient(135deg, var(--pricing-green), #059669);
    color: #ffffff;
    box-shadow: 0 0.65rem 1.2rem rgba(4, 120, 87, 0.2);
    transform: translateX(-50%);
}

.pricing-plan-top {
    display: flex;
    gap: 1rem;
    align-items: flex-start;
    justify-content: space-between;
}

.pricing-plan-top > div {
    display: grid;
    gap: 0.65rem;
    min-width: 0;
}

.pricing-plan-top h2 {
    color: var(--pricing-ink);
    font-size: clamp(1.4rem, 2vw, 1.85rem);
    line-height: 1.08;
}

.pricing-plan-top p {
    max-width: 27rem;
    color: var(--pricing-ink);
    font-size: 0.9rem;
    line-height: 1.55;
}

.pricing-plan-price {
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
    align-items: flex-start;
}

.pricing-plan-price-row {
    display: flex;
    flex-wrap: wrap;
    gap: 0.55rem;
    align-items: baseline;
}

.pricing-plan-price strong {
    color: #020617;
    font-size: clamp(2rem, 3vw, 2.75rem);
    font-weight: 900;
    line-height: 1;
}

.pricing-plan-price strong[data-active-period] {
    animation: pricing-price-pop 220ms ease;
}

.pricing-plan-price span {
    color: var(--pricing-ink);
    font-size: 0.95rem;
    font-weight: 700;
}

.pricing-plan-price s {
    color: color-mix(in srgb, var(--pricing-muted) 84%, transparent);
    font-size: clamp(1rem, 1.5vw, 1.22rem);
    font-weight: 850;
    line-height: 1;
    text-decoration-thickness: 0.1em;
}

.pricing-plan-price small {
    color: var(--pricing-muted);
    font-size: 0.82rem;
    font-weight: 700;
    line-height: 1.35;
}

.pricing-reference-list {
    display: grid;
    align-content: start;
    gap: 0.62rem;
    margin: 0;
    padding: 0;
    list-style: none;
}

.pricing-reference-list li {
    display: flex;
    gap: 0.55rem;
    align-items: center;
    color: var(--pricing-muted);
    font-size: 0.88rem;
    line-height: 1.35;
}

.pricing-reference-list svg {
    width: 1.05rem;
    height: 1.05rem;
    border-radius: 999px;
    background: color-mix(in srgb, var(--primary) 12%, var(--card));
    color: var(--primary);
    padding: 0.12rem;
}

.pricing-reference-plan .button {
    align-self: end;
    width: 100%;
    height: 2.85rem;
    min-height: 2.85rem;
    padding-inline: 1rem;
    white-space: nowrap;
}

.pricing-reference-comparison {
    overflow: hidden;
}

.pricing-comparison-groups {
    display: grid;
    border-top: 1px solid var(--pricing-line);
}

.pricing-comparison-group {
    display: grid;
}

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

.pricing-comparison-empty {
    padding: 1.25rem 1.35rem;
    color: var(--pricing-muted);
    font-size: 0.9rem;
}

.pricing-reference-comparison header,
.pricing-reference-card header {
    display: flex;
    gap: 1rem;
    align-items: center;
    justify-content: space-between;
    padding: 1.05rem 1.35rem;
}

.pricing-reference-comparison h2,
.pricing-reference-comparison h3,
.pricing-reference-card h2,
.pricing-custom-card h2 {
    margin: 0;
    color: var(--pricing-ink);
    font-size: 1rem;
    line-height: 1.2;
}

.pricing-reference-comparison p,
.pricing-reference-card header p,
.pricing-custom-card p {
    margin-top: 0.22rem;
    color: var(--pricing-muted);
    font-size: 0.84rem;
    line-height: 1.45;
}

.pricing-table-wrap {
    overflow-x: auto;
    border-top: 1px solid var(--pricing-line);
}

.pricing-reference-comparison table {
    width: 100%;
    min-width: 54rem;
    border-collapse: collapse;
}

.pricing-reference-comparison th,
.pricing-reference-comparison td {
    border-bottom: 1px solid var(--pricing-line);
    padding: 0.72rem 1.35rem;
    color: var(--pricing-muted);
    font-size: 0.82rem;
    text-align: left;
    vertical-align: middle;
}

.pricing-reference-comparison tr:last-child td {
    border-bottom: 0;
}

.pricing-reference-comparison th {
    color: #66766e;
    font-size: 0.72rem;
    font-weight: 900;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.pricing-reference-comparison th small {
    display: block;
    margin-top: 0.12rem;
    color: var(--pricing-green);
    font-size: 0.72rem;
    letter-spacing: 0;
    text-transform: none;
}

.pricing-reference-comparison td:first-child {
    display: flex;
    gap: 0.75rem;
    align-items: center;
    color: var(--pricing-ink);
}

.pricing-reference-comparison td:first-child svg {
    display: grid;
    place-items: center;
    width: 1.4rem;
    height: 1.4rem;
    border-radius: 0.35rem;
    background: color-mix(in srgb, var(--primary) 9%, var(--card));
    color: var(--pricing-green);
    padding: 0.25rem;
}

.pricing-reference-lower {
    display: grid;
    grid-template-columns: minmax(0, 0.95fr) minmax(0, 0.95fr) minmax(0, 1fr);
    gap: clamp(1rem, 2vw, 1.4rem);
    align-items: stretch;
}

.pricing-reference-card {
    display: grid;
    align-content: start;
    overflow: hidden;
}

.pricing-timeline-list {
    display: grid;
    gap: 0;
    padding: 0 1.35rem 1rem;
}

.pricing-timeline-list span {
    position: relative;
    display: grid;
    grid-template-columns: 1.35rem minmax(0, 1fr);
    gap: 0.08rem 0.75rem;
    padding: 0.42rem 0 0.68rem;
}

.pricing-timeline-list span:not(:last-child)::after {
    position: absolute;
    top: 1.75rem;
    bottom: -0.2rem;
    left: 0.67rem;
    width: 1px;
    background: color-mix(in srgb, var(--primary) 28%, var(--pricing-line));
    content: "";
}

.pricing-timeline-list svg {
    position: relative;
    z-index: 1;
    grid-row: span 2;
    width: 1.35rem;
    height: 1.35rem;
    border-radius: 999px;
    background: var(--card);
    color: var(--primary);
}

.pricing-timeline-list strong {
    color: var(--pricing-ink);
    font-size: 0.82rem;
}

.pricing-timeline-list small {
    color: var(--pricing-muted);
    font-size: 0.78rem;
    line-height: 1.4;
}

.pricing-reference-card > a,
.pricing-custom-card a {
    display: inline-flex;
    gap: 0.35rem;
    align-items: center;
    width: fit-content;
    margin: auto 1.35rem 1.25rem;
    color: var(--pricing-green);
    font-size: 0.82rem;
    font-weight: 850;
}

.pricing-reference-faq {
    display: grid;
    gap: 0.55rem;
    padding: 0 1.35rem 1rem;
}

.pricing-reference-faq details {
    border: 1px solid var(--pricing-line);
    border-radius: 0.55rem;
    background: color-mix(in srgb, var(--card) 82%, var(--pricing-soft));
    transition: border-color var(--motion-fast), background var(--motion-fast);
}

.pricing-reference-faq details:hover,
.pricing-reference-faq details:focus-within {
    border-color: color-mix(in srgb, var(--primary) 30%, var(--pricing-line));
}

.pricing-reference-faq summary {
    cursor: pointer;
    padding: 0.72rem 0.85rem;
    color: var(--pricing-ink);
    font-size: 0.84rem;
    font-weight: 750;
}

.pricing-reference-faq p {
    padding: 0 0.85rem 0.85rem;
    color: var(--pricing-muted);
    font-size: 0.8rem;
}

.pricing-custom-card {
    position: relative;
    display: grid;
    grid-template-columns: minmax(0, 1fr) 11rem;
    gap: 1rem;
    overflow: hidden;
    border: 1px solid color-mix(in srgb, var(--primary) 25%, #07533f);
    border-radius: 0.9rem;
    background:
        radial-gradient(circle at 92% 12%, rgba(184, 255, 44, 0.22), transparent 8rem),
        linear-gradient(135deg, #073e30, #00835c);
    color: #ffffff;
    padding: 1.5rem;
    box-shadow: 0 1.5rem 3.2rem rgba(6, 78, 59, 0.2);
}

.pricing-custom-card h2,
.pricing-custom-card p {
    color: #ffffff;
}

.pricing-custom-card ul {
    display: grid;
    gap: 0.65rem;
    margin: 1.1rem 0 1.4rem;
    padding: 0;
    list-style: none;
}

.pricing-custom-card li {
    display: flex;
    gap: 0.55rem;
    align-items: center;
    font-size: 0.84rem;
    font-weight: 750;
}

.pricing-custom-card .button {
    margin: 0;
    background: #ffffff;
    color: #064e3b;
}

.pricing-custom-illustration {
    position: relative;
    align-self: end;
    min-height: 12rem;
}

.pricing-custom-illustration span,
.pricing-custom-illustration i,
.pricing-custom-illustration b {
    position: absolute;
    display: block;
    border: 1px solid rgba(255, 255, 255, 0.38);
    background: linear-gradient(145deg, rgba(255, 255, 255, 0.95), rgba(209, 250, 229, 0.62));
    box-shadow: 0 1rem 1.6rem rgba(3, 34, 24, 0.22);
}

.pricing-custom-illustration span {
    right: 0;
    bottom: 0;
    width: 7.2rem;
    height: 7.2rem;
    border-radius: 1rem 1rem 0.4rem 0.4rem;
    transform: perspective(8rem) rotateX(8deg) rotateY(-12deg);
}

.pricing-custom-illustration i {
    right: 1.4rem;
    bottom: 5.8rem;
    width: 4.6rem;
    height: 3.2rem;
    border-radius: 0.75rem 0.75rem 0.35rem 0.35rem;
}

.pricing-custom-illustration b {
    right: 5.2rem;
    bottom: 1.3rem;
    width: 2.1rem;
    height: 5rem;
    border-radius: 0.5rem;
}

.pricing-reference-trust {
    display: grid;
    grid-template-columns: minmax(18rem, 0.45fr) minmax(0, 1fr);
    gap: 1.5rem;
    align-items: center;
    padding: 1rem 1.25rem;
}

.pricing-reference-trust > div:first-child {
    display: grid;
    grid-template-columns: 3rem minmax(0, 1fr);
    gap: 0.85rem;
    align-items: center;
}

.pricing-reference-trust > div:first-child > svg {
    width: 3rem;
    height: 3rem;
    border-radius: 0.75rem;
    background: color-mix(in srgb, var(--primary) 10%, var(--card));
    color: var(--primary);
    padding: 0.7rem;
}

.pricing-reference-trust strong,
.pricing-reference-trust small,
.pricing-reference-trust span {
    display: block;
}

.pricing-reference-trust > div:first-child strong {
    color: var(--pricing-ink);
    font-size: 0.9rem;
}

.pricing-reference-trust small,
.pricing-reference-trust > div:nth-child(2) > span {
    color: var(--pricing-muted);
    font-size: 0.76rem;
}

.pricing-reference-trust > div:nth-child(2) {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 0.75rem;
    align-items: center;
}

.pricing-reference-trust > div:nth-child(2) > span {
    grid-column: 1 / -1;
    color: var(--pricing-green);
    font-weight: 850;
    text-align: center;
}

.pricing-reference-trust > div:nth-child(2) strong {
    display: flex;
    gap: 0.45rem;
    align-items: center;
    justify-content: center;
    min-width: 0;
    color: #7a8b83;
    font-size: 0.74rem;
    line-height: 1.15;
    text-align: center;
}

.pricing-reference-trust > div:nth-child(2) strong svg {
    color: #8da39a;
}

@keyframes pricing-price-pop {
    0% {
        opacity: 0.75;
        transform: translateY(0.18rem);
    }

    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

html[data-theme="dark"] .pricing-reference,
html.dark .pricing-reference {
    --pricing-ink: #ecfdf5;
    --pricing-muted: #a7bdb2;
    --pricing-line: #214236;
    --pricing-soft: #0d221a;
    --pricing-card: rgba(8, 28, 22, 0.88);
    --pricing-green: #86efac;
    --pricing-green-dark: #86efac;
    background:
        radial-gradient(circle at 78% 12%, color-mix(in srgb, var(--primary) 8%, transparent), transparent 23rem),
        radial-gradient(circle at 0% 38%, color-mix(in srgb, var(--brand-lime) 7%, transparent), transparent 25rem),
        linear-gradient(135deg, #04130f, #071b15);
}

html[data-theme="dark"] .pricing-plan-price strong,
html.dark .pricing-plan-price strong {
    color: #f8fff9;
}

html[data-theme="dark"] .pricing-reference-comparison th,
html.dark .pricing-reference-comparison th,
html[data-theme="dark"] .pricing-reference-trust > div:nth-child(2) strong,
html.dark .pricing-reference-trust > div:nth-child(2) strong {
    color: #a7bdb2;
}

@media (max-width: 1180px) {
    .pricing-reference-hero,
    .pricing-reference-trust {
        grid-template-columns: 1fr;
    }

    .pricing-reference-advisor {
        grid-template-columns: minmax(18rem, 0.7fr) minmax(0, 1fr);
        align-items: stretch;
    }

    .pricing-reference-toggle {
        align-self: start;
    }

    .pricing-reference-lower {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .pricing-custom-card {
        grid-column: 1 / -1;
    }
}

@media (max-width: 940px) {
    .pricing-reference {
        padding-block-start: 1.5rem;
    }

    .pricing-reference h1 {
        max-width: 14ch;
    }

    .pricing-reference-signals,
    .pricing-reference-plans,
    .pricing-reference-lower,
    .pricing-reference-advisor {
        grid-template-columns: 1fr;
    }

    .pricing-reference-advisor {
        gap: 1rem;
    }

    .pricing-reference-trust > div:nth-child(2) {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 680px) {
    .pricing-reference {
        padding-inline: 0.85rem;
    }

    .pricing-reference h1 {
        font-size: clamp(2rem, 9.5vw, 2.8rem);
    }

    .pricing-reference-copy > p {
        font-size: 0.94rem;
    }

    .pricing-reference-toggle {
        justify-self: stretch;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        border-radius: 1rem;
    }

    .pricing-reference-toggle span {
        grid-column: 1 / -1;
        padding: 0.5rem 0.65rem 0.3rem;
        text-align: center;
    }

    .pricing-advisor-card,
    .pricing-plan-top,
    .pricing-custom-card,
    .pricing-reference-trust > div:first-child {
        grid-template-columns: 1fr;
    }

    .pricing-reference-comparison header,
    .pricing-reference-card header,
    .pricing-plan-group-header {
        align-items: flex-start;
        flex-direction: column;
    }

    .pricing-reference-plan {
        min-height: auto;
    }

    .pricing-reference-plan .button {
        width: 100%;
    }

    .pricing-plan-top {
        display: grid;
    }

    .pricing-plan-icon {
        order: -1;
    }

    .pricing-custom-illustration {
        min-height: 8rem;
    }

    .pricing-reference-trust > div:nth-child(2) {
        grid-template-columns: 1fr;
        justify-items: start;
    }

    .pricing-reference-trust > div:nth-child(2) > span,
    .pricing-reference-trust > div:nth-child(2) strong {
        justify-content: flex-start;
        text-align: left;
    }
}

@media (prefers-reduced-motion: reduce) {
    .pricing-reference-plan,
    .pricing-reference-toggle button,
    .pricing-plan-price strong[data-active-period] {
        animation: none;
        transition: none;
    }

    .pricing-reference-plan:hover,
    .pricing-reference-plan:focus-within {
        transform: none;
    }
}

.how-reference {
    --how-ink: #0b1f17;
    --how-muted: #4d6258;
    --how-line: #dbe9e0;
    --how-soft: #f2fbf5;
    --how-card: rgba(255, 255, 255, 0.88);
    --how-green: #047857;
    --how-green-dark: #064e3b;
    gap: clamp(1.15rem, 2vw, 1.55rem);
    padding-block: clamp(1.75rem, 2vw, 2.5rem) 1.35rem;
    background:
        radial-gradient(circle at 44% 18%, color-mix(in srgb, var(--primary) 9%, transparent), transparent 22rem),
        radial-gradient(circle at 100% 44%, color-mix(in srgb, var(--brand-lime) 11%, transparent), transparent 28rem),
        linear-gradient(135deg, color-mix(in srgb, var(--background) 96%, #ffffff), var(--background));
}

.how-reference svg {
    width: 1rem;
    height: 1rem;
    flex: 0 0 auto;
}

.how-reference h1,
.how-reference h2,
.how-reference h3,
.how-reference p {
    margin: 0;
}

.how-reference-hero {
    display: grid;
    grid-template-columns: minmax(0, 0.82fr) minmax(38rem, 1fr);
    gap: clamp(1.5rem, 5vw, 5.5rem);
    align-items: center;
}

.how-reference-copy {
    display: grid;
    gap: 1.2rem;
    align-content: center;
}

.how-reference-pill {
    width: fit-content;
    border: 1px solid color-mix(in srgb, var(--primary) 25%, var(--how-line));
    border-radius: var(--radius-pill);
    background: color-mix(in srgb, var(--primary) 10%, var(--card));
    color: var(--how-green);
    padding: 0.28rem 0.62rem;
    font-size: 0.72rem;
    font-weight: 900;
    letter-spacing: 0.06em;
    line-height: 1;
    text-transform: uppercase;
}

.how-reference h1 {
    max-width: 12ch;
    color: var(--how-ink);
    font-size: clamp(2.15rem, 4.4vw, 4rem);
    font-weight: 700;
    line-height: 1;
}

.how-reference h1 span {
    color: var(--how-green);
}

.how-reference-copy > p {
    max-width: 61ch;
    color: var(--how-muted);
    font-size: clamp(1rem, 1.25vw, 1.1rem);
    line-height: 1.72;
}

.how-reference-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.8rem;
    align-items: center;
}

.how-reference-actions .button {
    min-height: 3rem;
    gap: 0.45rem;
}

.how-reference-signals {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: clamp(0.75rem, 2vw, 1.5rem);
    margin-top: 1rem;
}

.how-reference-signals span {
    display: grid;
    grid-template-columns: 2.25rem minmax(0, 1fr);
    gap: 0.08rem 0.7rem;
    align-items: center;
    min-width: 0;
}

.how-reference-signals svg {
    grid-row: span 2;
    width: 2.25rem;
    height: 2.25rem;
    border-radius: 0.7rem;
    background: color-mix(in srgb, var(--primary) 10%, var(--card));
    color: var(--primary);
    padding: 0.55rem;
}

.how-reference-signals strong {
    overflow: hidden;
    color: var(--how-ink);
    font-size: 0.84rem;
    line-height: 1.15;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.how-reference-signals small {
    overflow: hidden;
    color: var(--how-muted);
    font-size: 0.72rem;
    line-height: 1.25;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.how-product-demo {
    position: relative;
}

.how-product-demo::before {
    position: absolute;
    inset: 4rem -1.6rem auto auto;
    width: 12rem;
    height: 14rem;
    opacity: 0.34;
    background-image: radial-gradient(color-mix(in srgb, var(--primary) 45%, transparent) 1px, transparent 1px);
    background-size: 0.78rem 0.78rem;
    content: "";
}

.how-demo-window {
    position: relative;
    z-index: 1;
    overflow: hidden;
    border: 1px solid var(--how-line);
    border-radius: 0.95rem;
    background: var(--how-card);
    box-shadow: 0 2rem 5rem rgba(15, 23, 42, 0.1);
}

.how-demo-top {
    display: flex;
    gap: 0.38rem;
    align-items: center;
    min-height: 3.2rem;
    border-bottom: 1px solid var(--how-line);
    padding: 0.72rem 1rem;
}

.how-demo-top > .how-demo-dot {
    flex: 0 0 0.48rem;
    width: 0.48rem;
    height: 0.48rem;
    border-radius: 999px;
    background: color-mix(in srgb, var(--primary) 28%, var(--how-line));
}

.how-demo-top strong {
    margin-left: 0.35rem;
    color: var(--how-ink);
    font-size: 0.9rem;
}

.how-demo-top .how-demo-brand {
    display: block;
    width: 5.7rem;
    height: 1.55rem;
}

.how-demo-brand img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: contain;
    object-position: left center;
}

.how-demo-top .how-demo-period {
    margin-left: auto;
    display: inline-flex;
    flex: 0 0 auto;
    align-items: center;
    justify-content: center;
    min-width: 4.5rem;
    min-height: 2rem;
    border: 1px solid var(--how-line);
    border-radius: var(--radius-pill);
    background: var(--card);
    color: var(--how-ink);
    padding: 0 0.75rem;
    font: inherit;
    font-size: 0.72rem;
    font-weight: 800;
    white-space: nowrap;
}

.how-demo-grid {
    display: grid;
    grid-template-columns: 8.5rem minmax(0, 1fr);
    min-height: 31rem;
}

.how-demo-sidebar {
    display: grid;
    align-content: start;
    gap: 0.38rem;
    border-right: 1px solid var(--how-line);
    padding: 1rem 0.8rem;
}

.how-demo-sidebar strong {
    margin-bottom: 0.35rem;
    color: var(--how-ink);
    font-size: 0.9rem;
}

.how-demo-sidebar .how-demo-brand {
    display: block;
    width: 5.8rem;
    height: 1.55rem;
}

.how-demo-sidebar span {
    display: flex;
    gap: 0.45rem;
    align-items: center;
    min-height: 2.1rem;
    border-radius: 0.45rem;
    color: var(--how-muted);
    padding: 0 0.55rem;
    font-size: 0.73rem;
    font-weight: 750;
}

.how-demo-sidebar span.is-active {
    background: color-mix(in srgb, var(--primary) 11%, var(--card));
    color: var(--how-green);
}

.how-demo-sidebar svg {
    width: 0.88rem;
    height: 0.88rem;
}

.how-demo-main {
    display: grid;
    gap: 1rem;
    align-content: start;
    padding: 1.15rem;
}

.how-demo-heading {
    display: flex;
    gap: 1rem;
    align-items: center;
    justify-content: space-between;
}

.how-demo-heading h2 {
    color: var(--how-ink);
    font-size: 1.05rem;
}

.how-demo-heading p {
    color: var(--how-muted);
    font-size: 0.75rem;
}

.how-demo-heading > span {
    display: grid;
    place-items: center;
    width: 2.2rem;
    height: 2.2rem;
    border: 1px solid var(--how-line);
    border-radius: 0.65rem;
    background: var(--card);
    color: var(--primary);
}

.how-demo-metrics {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 0.7rem;
}

.how-demo-metrics article,
.how-demo-panels article,
.how-demo-bottom article {
    border: 1px solid var(--how-line);
    border-radius: 0.65rem;
    background: color-mix(in srgb, var(--card) 88%, transparent);
    box-shadow: var(--shadow);
}

.how-demo-metrics article {
    display: grid;
    gap: 0.2rem;
    padding: 0.78rem;
}

.how-demo-metrics span,
.how-demo-metrics small,
.how-demo-bottom span,
.how-demo-activity small {
    color: var(--how-muted);
    font-size: 0.68rem;
    font-weight: 750;
}

.how-demo-metrics strong {
    color: var(--how-ink);
    font-size: 1.2rem;
    line-height: 1;
}

.how-demo-metrics small {
    color: var(--success);
}

.how-demo-panels {
    display: grid;
    grid-template-columns: minmax(0, 1.15fr) minmax(9rem, 0.75fr) minmax(10rem, 0.8fr);
    gap: 0.75rem;
}

.how-demo-chart {
    display: grid;
    gap: 1rem;
    padding: 0.85rem;
}

.how-demo-chart header {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.how-demo-chart header strong,
.how-demo-activity > strong,
.how-demo-bottom strong {
    color: var(--how-ink);
    font-size: 0.78rem;
}

.how-demo-chart header small {
    border-radius: var(--radius-pill);
    background: color-mix(in srgb, var(--primary) 10%, var(--card));
    color: var(--primary);
    padding: 0.18rem 0.42rem;
    font-size: 0.7rem;
    font-weight: 850;
}

.how-demo-chart div {
    display: flex;
    align-items: end;
    gap: 0.45rem;
    height: 7.4rem;
}

.how-demo-chart div span {
    flex: 1;
    border-radius: 999px 999px 0.2rem 0.2rem;
    background: linear-gradient(180deg, var(--primary), color-mix(in srgb, var(--primary) 25%, transparent));
}

.how-demo-chart div span:nth-child(1) { height: 36%; }
.how-demo-chart div span:nth-child(2) { height: 58%; }
.how-demo-chart div span:nth-child(3) { height: 45%; }
.how-demo-chart div span:nth-child(4) { height: 72%; }
.how-demo-chart div span:nth-child(5) { height: 66%; }
.how-demo-chart div span:nth-child(6) { height: 86%; }

.how-demo-donut {
    display: grid;
    place-items: center;
    align-content: center;
    gap: 0.25rem;
    min-height: 11rem;
    background:
        radial-gradient(circle, var(--card) 0 52%, transparent 53%),
        conic-gradient(var(--primary) 0 76%, color-mix(in srgb, var(--primary) 13%, var(--how-line)) 76% 100%);
}

.how-demo-donut strong {
    color: var(--how-ink);
    font-size: 1.85rem;
    line-height: 1;
}

.how-demo-donut small {
    color: var(--how-muted);
    font-size: 0.68rem;
    font-weight: 750;
    text-align: center;
}

.how-demo-activity {
    display: grid;
    gap: 0.65rem;
    align-content: start;
    padding: 0.85rem;
}

.how-demo-activity span {
    display: grid;
    gap: 0.08rem;
    color: var(--how-ink);
    font-size: 0.72rem;
    font-weight: 800;
}

.how-demo-activity a {
    color: var(--primary);
    font-size: 0.72rem;
    font-weight: 850;
}

.how-demo-bottom {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(15rem, 0.7fr);
    gap: 0.75rem;
}

.how-demo-bottom article {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    gap: 0.1rem 0.65rem;
    align-items: center;
    padding: 0.8rem;
}

.how-demo-bottom svg {
    grid-row: span 2;
    width: 2rem;
    height: 2rem;
    border-radius: 0.55rem;
    background: color-mix(in srgb, var(--primary) 10%, var(--card));
    color: var(--primary);
    padding: 0.5rem;
}

.how-demo-bottom b {
    color: var(--how-ink);
    font-size: 1.25rem;
}

.how-demo-bottom small {
    color: var(--success);
    font-size: 0.72rem;
    font-weight: 850;
}

.how-demo-bottom .how-demo-ai-count {
    grid-template-columns: minmax(0, 1fr) auto;
    grid-template-areas:
        "label label"
        "trend count";
    gap: 0.35rem 0.75rem;
}

.how-demo-ai-count strong {
    grid-area: label;
    min-width: 0;
}

.how-demo-ai-count b {
    grid-area: count;
    justify-self: end;
    line-height: 1;
}

.how-demo-ai-count small {
    grid-area: trend;
    align-self: end;
}

.how-reference-journeys {
    display: grid;
    gap: 1.2rem;
}

.how-role-tabs {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    overflow: hidden;
    border: 1px solid var(--how-line);
    border-radius: 0.9rem;
    background: var(--how-card);
    box-shadow: var(--shadow);
}

.how-role-tabs button {
    display: grid;
    grid-template-columns: 2.65rem auto minmax(0, 1fr);
    gap: 0.08rem 0.85rem;
    align-items: center;
    min-height: 5.4rem;
    border: 0;
    border-right: 1px solid var(--how-line);
    background: transparent;
    color: var(--how-ink);
    cursor: pointer;
    padding: 1rem 1.25rem;
    font: inherit;
    text-align: left;
    transition: background var(--motion-default), box-shadow var(--motion-default), color var(--motion-default);
}

.how-role-tabs button:last-child {
    border-right: 0;
}

.how-role-tabs button:hover,
.how-role-tabs button:focus-visible,
.how-role-tabs button[aria-selected="true"] {
    background: linear-gradient(135deg, color-mix(in srgb, var(--primary) 11%, var(--card)), color-mix(in srgb, var(--card) 82%, transparent));
    box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--primary) 42%, transparent);
    outline: none;
}

.how-tab-icon {
    display: grid;
    grid-row: span 2;
    place-items: center;
    width: 2.65rem;
    height: 2.65rem;
    border: 1px solid var(--how-line);
    border-radius: 0.65rem;
    background: var(--card);
    color: var(--primary);
}

.how-tab-number {
    color: var(--primary);
    font-size: 0.76rem;
    font-weight: 900;
}

.how-role-tabs strong {
    color: var(--how-ink);
    font-size: 0.92rem;
    line-height: 1.15;
}

.how-role-tabs small {
    grid-column: 3;
    color: var(--how-muted);
    font-size: 0.78rem;
}

.how-reference-panels {
    display: grid;
}

.how-reference-panel {
    display: grid;
    grid-template-columns: minmax(0, 0.85fr) minmax(0, 0.82fr) minmax(22rem, 0.92fr);
    gap: clamp(1rem, 2.5vw, 2rem);
    overflow: hidden;
    border: 1px solid var(--how-line);
    border-radius: 0.95rem;
    background: var(--how-card);
    padding: clamp(1.4rem, 3vw, 2rem);
    box-shadow: 0 1.4rem 3.5rem rgba(15, 23, 42, 0.06);
}

.how-reference-panel[hidden] {
    display: none;
}

.how-panel-story {
    display: grid;
    gap: 1.25rem;
    align-content: start;
    padding-right: clamp(0.5rem, 2vw, 1.5rem);
    border-right: 1px solid var(--how-line);
}

.how-panel-story h2 {
    max-width: 14ch;
    color: var(--how-ink);
    font-size: clamp(1.9rem, 3.2vw, 3rem);
    font-weight: 850;
    line-height: 1.05;
}

.how-panel-story > p {
    max-width: 42rem;
    color: var(--how-muted);
    line-height: 1.65;
}

.how-feature-list {
    display: grid;
    gap: 1rem;
    margin-top: 0.35rem;
}

.how-feature-list span {
    display: grid;
    grid-template-columns: 2.8rem minmax(0, 1fr);
    gap: 0.05rem 0.8rem;
    align-items: center;
}

.how-feature-list svg {
    grid-row: span 2;
    width: 2.8rem;
    height: 2.8rem;
    border-radius: 0.65rem;
    background: color-mix(in srgb, var(--primary) 10%, var(--card));
    color: var(--primary);
    padding: 0.68rem;
}

.how-feature-list strong {
    color: var(--how-ink);
    font-size: 0.88rem;
}

.how-feature-list small {
    color: var(--how-muted);
    font-size: 0.78rem;
    line-height: 1.35;
}

.how-panel-steps {
    position: relative;
    display: grid;
    gap: 1.25rem;
    align-content: center;
    padding-inline: clamp(0.5rem, 1.5vw, 1.1rem);
}

.how-panel-steps::before {
    position: absolute;
    top: 1.8rem;
    bottom: 1.8rem;
    left: clamp(1.1rem, 2.5vw, 1.7rem);
    width: 1px;
    background: repeating-linear-gradient(to bottom, color-mix(in srgb, var(--primary) 26%, var(--how-line)) 0 0.4rem, transparent 0.4rem 0.75rem);
    content: "";
}

.how-step-card {
    position: relative;
    z-index: 1;
    display: grid;
    grid-template-columns: 2.25rem 3rem minmax(0, 1fr);
    gap: 0.1rem 0.85rem;
    align-items: center;
    min-height: 5rem;
    border: 0;
    background: transparent;
    color: var(--how-ink);
    cursor: pointer;
    padding: 0;
    font: inherit;
    text-align: left;
}

.how-step-card:focus-visible {
    outline: 2px solid var(--ring);
    outline-offset: 4px;
}

.how-step-card:hover .how-step-icon,
.how-step-card[aria-pressed="true"] .how-step-icon {
    border-color: color-mix(in srgb, var(--primary) 42%, var(--how-line));
    background: color-mix(in srgb, var(--primary) 10%, var(--card));
    color: var(--primary);
    box-shadow: var(--shadow-soft);
}

.how-step-index {
    display: grid;
    grid-row: span 2;
    place-items: center;
    width: 2rem;
    height: 2rem;
    border: 1px solid color-mix(in srgb, var(--primary) 40%, var(--how-line));
    border-radius: 999px;
    background: color-mix(in srgb, var(--primary) 10%, var(--card));
    color: var(--primary);
    font-size: 0.74rem;
    font-weight: 900;
}

.how-step-icon {
    display: grid;
    grid-row: span 2;
    place-items: center;
    width: 3rem;
    height: 3rem;
    border: 1px solid var(--how-line);
    border-radius: 0.7rem;
    background: var(--card);
    color: var(--how-muted);
    transition: border-color var(--motion-fast), background var(--motion-fast), box-shadow var(--motion-fast), color var(--motion-fast);
}

.how-step-card strong {
    grid-column: 3;
    color: var(--how-ink);
    font-size: 1rem;
    line-height: 1.2;
}

.how-step-card small {
    grid-column: 3;
    color: var(--how-muted);
    font-size: 0.82rem;
    line-height: 1.4;
}

.how-live-preview {
    display: grid;
    align-content: start;
    gap: 1rem;
    border: 1px solid var(--how-line);
    border-radius: 0.85rem;
    background:
        radial-gradient(circle at 88% 0%, color-mix(in srgb, var(--primary) 10%, transparent), transparent 11rem),
        color-mix(in srgb, var(--card) 86%, var(--how-soft));
    padding: clamp(1rem, 2vw, 1.35rem);
}

.how-reference .how-preview-topline {
    display: flex;
    flex-wrap: wrap;
    gap: 0.55rem;
    align-items: center;
    justify-content: space-between;
}

.how-reference .how-preview-topline span,
.how-reference .how-preview-topline strong {
    border: 1px solid var(--how-line);
    border-radius: var(--radius-pill);
    background: color-mix(in srgb, var(--primary) 9%, var(--card));
    padding: 0.25rem 0.6rem;
    color: var(--how-green);
    font-size: 0.72rem;
    font-weight: 900;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.how-reference .how-preview-topline strong {
    background: var(--card);
    color: var(--how-ink);
    letter-spacing: 0;
    text-transform: none;
}

.how-live-preview h3 {
    color: var(--how-ink);
    font-size: clamp(1.5rem, 2.6vw, 2.25rem);
    line-height: 1.05;
}

.how-live-preview > p {
    color: var(--how-muted);
    line-height: 1.6;
}

.how-preview-card {
    display: grid;
    gap: 0.75rem;
    border: 1px solid var(--how-line);
    border-radius: 0.75rem;
    background: var(--card);
    padding: 1rem;
}

.how-preview-card > strong {
    color: var(--how-ink);
    font-size: 0.9rem;
}

.how-preview-card > small {
    color: var(--how-muted);
    font-size: 0.78rem;
    line-height: 1.4;
}

.how-preview-card > span {
    display: grid;
    grid-template-columns: 2rem minmax(0, 1fr) auto;
    gap: 0.65rem;
    align-items: center;
    border: 1px solid var(--how-line);
    border-radius: 0.55rem;
    background: color-mix(in srgb, var(--background) 58%, transparent);
    padding: 0.6rem;
}

.how-preview-card svg {
    width: 2rem;
    height: 2rem;
    border-radius: 0.5rem;
    background: color-mix(in srgb, var(--primary) 9%, var(--card));
    color: var(--primary);
    padding: 0.5rem;
}

.how-preview-card b {
    display: block;
    color: var(--how-ink);
    font-size: 0.82rem;
}

.how-preview-card span small {
    color: var(--how-muted);
    font-size: 0.72rem;
}

.how-preview-card em {
    border-radius: 0.4rem;
    background: var(--primary);
    color: var(--primary-foreground);
    padding: 0.35rem 0.6rem;
    font-size: 0.72rem;
    font-style: normal;
    font-weight: 850;
}

.how-preview-tip {
    display: grid;
    grid-template-columns: 2.6rem minmax(0, 1fr);
    gap: 0.75rem;
    align-items: center;
    border: 1px solid color-mix(in srgb, var(--primary) 17%, var(--how-line));
    border-radius: 0.75rem;
    background: color-mix(in srgb, var(--primary) 7%, var(--card));
    padding: 0.85rem;
}

.how-preview-tip svg {
    width: 2.6rem;
    height: 2.6rem;
    border-radius: 0.65rem;
    background: color-mix(in srgb, var(--primary) 11%, var(--card));
    color: var(--primary);
    padding: 0.65rem;
}

.how-preview-tip strong,
.how-preview-tip small {
    display: block;
}

.how-preview-tip strong {
    color: var(--how-ink);
    font-size: 0.84rem;
}

.how-preview-tip small {
    color: var(--how-muted);
    font-size: 0.76rem;
    line-height: 1.4;
}

.how-reference-controls {
    display: flex;
    gap: 1rem;
    align-items: center;
    justify-content: space-between;
    border: 1px solid var(--how-line);
    border-radius: 0.85rem;
    background: var(--how-card);
    padding: 1rem 1.25rem;
    box-shadow: var(--shadow);
}

.how-reference-controls > div {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    align-items: center;
}

.how-reference-controls > div:first-child > svg {
    width: 2.6rem;
    height: 2.6rem;
    border-radius: 0.65rem;
    background: color-mix(in srgb, var(--primary) 10%, var(--card));
    color: var(--primary);
    padding: 0.65rem;
}

.how-reference-controls strong,
.how-reference-controls small {
    display: block;
}

.how-reference-controls strong {
    color: var(--how-ink);
    font-size: 0.9rem;
}

.how-reference-controls small {
    color: var(--how-muted);
    font-size: 0.78rem;
}

.how-outcome-cards {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1.15rem;
}

.how-outcome-card {
    display: grid;
    grid-template-columns: 4.5rem minmax(0, 1fr);
    gap: 1rem;
    align-items: center;
    min-height: 9rem;
    border: 1px solid var(--how-line);
    border-radius: 0.95rem;
    background: var(--how-card);
    padding: 1.35rem;
    box-shadow: 0 1rem 2.4rem rgba(15, 23, 42, 0.045);
}

.how-outcome-card.is-green {
    background: linear-gradient(135deg, color-mix(in srgb, var(--primary) 10%, var(--card)), var(--how-card));
}

.how-outcome-card.is-blue {
    background: linear-gradient(135deg, color-mix(in srgb, #0ea5e9 10%, var(--card)), var(--how-card));
}

.how-outcome-card.is-gold {
    background: linear-gradient(135deg, color-mix(in srgb, #d97706 10%, var(--card)), var(--how-card));
}

.how-outcome-card > span {
    display: grid;
    place-items: center;
    width: 4.5rem;
    height: 4.5rem;
    border-radius: 999px;
    background: color-mix(in srgb, var(--primary) 12%, var(--card));
    color: var(--primary);
}

.how-outcome-card.is-blue > span {
    background: color-mix(in srgb, #0ea5e9 12%, var(--card));
    color: #0369a1;
}

.how-outcome-card.is-gold > span {
    background: color-mix(in srgb, #d97706 14%, var(--card));
    color: #92400e;
}

.how-outcome-card svg {
    width: 2.1rem;
    height: 2.1rem;
}

.how-outcome-card h2 {
    color: var(--how-ink);
    font-size: 1.1rem;
}

.how-outcome-card p {
    margin-top: 0.35rem;
    color: var(--how-muted);
    line-height: 1.55;
}

.how-trust-band {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(26rem, 0.72fr);
    gap: 2rem;
    align-items: center;
    overflow: hidden;
    border-radius: 0.95rem;
    background:
        radial-gradient(circle at 82% 12%, rgba(184, 255, 44, 0.2), transparent 14rem),
        linear-gradient(135deg, #063f2d, #007a52);
    color: #ffffff;
    padding: clamp(1.4rem, 3vw, 2.2rem);
    box-shadow: 0 1.5rem 3.2rem rgba(6, 78, 59, 0.2);
}

.how-trust-band h2 {
    color: #ffffff;
    font-size: 1.15rem;
}

.how-trust-metrics {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 1.2rem;
    margin-top: 1.3rem;
}

.how-trust-metrics strong,
.how-trust-metrics small {
    display: block;
}

.how-trust-metrics strong {
    color: #ffffff;
    font-size: clamp(1.25rem, 2vw, 1.65rem);
    line-height: 1;
}

.how-trust-metrics small {
    margin-top: 0.35rem;
    color: rgba(255, 255, 255, 0.82);
    font-size: 0.8rem;
}

.how-institution-logos {
    display: flex;
    flex-wrap: wrap;
    gap: 0.85rem;
    align-items: center;
    justify-content: flex-end;
}

.how-institution-logos span {
    display: grid;
    place-items: center;
    width: 3.4rem;
    height: 3.4rem;
    border: 1px solid rgba(255, 255, 255, 0.44);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.12);
    color: #ffffff;
    font-size: 0.78rem;
    font-weight: 900;
}

.how-institution-logos strong {
    flex-basis: 100%;
    color: rgba(255, 255, 255, 0.88);
    font-size: 0.95rem;
    text-align: right;
}

html[data-theme="dark"] .how-reference,
html.dark .how-reference {
    --how-ink: #ecfdf5;
    --how-muted: #a7bdb2;
    --how-line: #214236;
    --how-soft: #0d221a;
    --how-card: rgba(8, 28, 22, 0.88);
    --how-green: #86efac;
    --how-green-dark: #86efac;
    background:
        radial-gradient(circle at 44% 18%, color-mix(in srgb, var(--primary) 8%, transparent), transparent 22rem),
        radial-gradient(circle at 100% 44%, color-mix(in srgb, var(--brand-lime) 7%, transparent), transparent 28rem),
        linear-gradient(135deg, #04130f, #071b15);
}

html[data-theme="dark"] .how-demo-metrics strong,
html.dark .how-demo-metrics strong,
html[data-theme="dark"] .how-demo-donut strong,
html.dark .how-demo-donut strong,
html[data-theme="dark"] .how-demo-bottom b,
html.dark .how-demo-bottom b {
    color: #f8fff9;
}

@media (max-width: 1180px) {
    .how-reference-hero,
    .how-reference-panel,
    .how-trust-band {
        grid-template-columns: 1fr;
    }

    .how-panel-story {
        border-right: 0;
        border-bottom: 1px solid var(--how-line);
        padding-right: 0;
        padding-bottom: 1.4rem;
    }

    .how-panel-steps {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        align-content: start;
    }

    .how-panel-steps::before {
        display: none;
    }

    .how-step-card {
        border: 1px solid var(--how-line);
        border-radius: 0.75rem;
        background: color-mix(in srgb, var(--card) 76%, transparent);
        padding: 0.75rem;
    }

    .how-institution-logos {
        justify-content: flex-start;
    }

    .how-institution-logos strong {
        text-align: left;
    }
}

@media (max-width: 940px) {
    .how-demo-grid,
    .how-demo-panels,
    .how-demo-bottom,
    .how-role-tabs,
    .how-outcome-cards,
    .how-trust-metrics {
        grid-template-columns: 1fr;
    }

    .how-demo-sidebar {
        grid-template-columns: repeat(6, minmax(7rem, 1fr));
        border-right: 0;
        border-bottom: 1px solid var(--how-line);
        overflow-x: auto;
    }

    .how-demo-sidebar strong {
        grid-column: 1 / -1;
    }

    .how-role-tabs {
        overflow: visible;
    }

    .how-role-tabs button {
        border-right: 0;
        border-bottom: 1px solid var(--how-line);
    }

    .how-role-tabs button:last-child {
        border-bottom: 0;
    }

    .how-reference-controls {
        align-items: stretch;
        flex-direction: column;
    }

    .how-reference-controls > div:last-child {
        justify-content: flex-end;
    }
}

@media (max-width: 680px) {
    .how-reference {
        padding-inline: 0.85rem;
        padding-block-start: 1.5rem;
    }

    .how-reference h1 {
        font-size: clamp(2.05rem, 9.5vw, 2.9rem);
    }

    .how-reference-signals,
    .how-panel-steps {
        grid-template-columns: 1fr;
    }

    .how-reference-actions {
        align-items: stretch;
        flex-direction: column;
    }

    .how-reference-actions .button {
        width: 100%;
    }

    .how-demo-window {
        border-radius: 0.75rem;
    }

    .how-demo-main,
    .how-reference-panel {
        padding: 1rem;
    }

    .how-demo-metrics {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .how-role-tabs button {
        grid-template-columns: 2.5rem auto minmax(0, 1fr);
        padding: 0.85rem;
    }

    .how-panel-story h2 {
        max-width: 100%;
    }

    .how-step-card {
        grid-template-columns: 2rem 2.8rem minmax(0, 1fr);
    }

    .how-preview-card > span {
        grid-template-columns: 2rem minmax(0, 1fr);
    }

    .how-preview-card em {
        grid-column: 2;
        width: fit-content;
    }

    .how-reference-controls > div:last-child,
    .how-reference-controls .button {
        width: 100%;
    }

    .how-reference-controls > div:last-child {
        display: grid;
        grid-template-columns: 1fr;
    }

    .how-outcome-card {
        grid-template-columns: 1fr;
    }

    .how-trust-band {
        padding: 1.2rem;
    }
}

@media (prefers-reduced-motion: reduce) {
    .how-role-tabs button,
    .how-step-icon {
        transition: none;
    }
}

.security-reference {
    --security-ink: #0b1f17;
    --security-muted: #4d6258;
    --security-line: #dbe9e0;
    --security-card: rgba(255, 255, 255, 0.88);
    --security-soft: #f2fbf5;
    --security-green: #047857;
    --security-green-dark: #064e3b;
    gap: clamp(1.2rem, 2vw, 1.7rem);
    padding-block: clamp(1.75rem, 2vw, 2.5rem) 1.25rem;
    background:
        radial-gradient(circle at 74% 19%, color-mix(in srgb, var(--primary) 10%, transparent), transparent 26rem),
        radial-gradient(circle at 0% 48%, color-mix(in srgb, var(--brand-lime) 10%, transparent), transparent 27rem),
        linear-gradient(135deg, color-mix(in srgb, var(--background) 96%, #ffffff), var(--background));
}

.security-reference svg {
    width: 1rem;
    height: 1rem;
    flex: 0 0 auto;
}

.security-reference h1,
.security-reference h2,
.security-reference h3,
.security-reference p {
    margin: 0;
}

.security-reference-hero {
    display: grid;
    grid-template-columns: minmax(0, 0.85fr) minmax(36rem, 1fr);
    gap: clamp(1.5rem, 5vw, 5.5rem);
    align-items: center;
}

.security-reference-copy {
    display: grid;
    gap: 1.15rem;
    align-content: center;
}

.security-reference-pill {
    display: inline-flex;
    gap: 0.45rem;
    align-items: center;
    width: fit-content;
    border: 1px solid color-mix(in srgb, var(--primary) 25%, var(--security-line));
    border-radius: var(--radius-pill);
    background: color-mix(in srgb, var(--primary) 10%, var(--card));
    color: var(--security-green);
    padding: 0.3rem 0.7rem;
    font-size: 0.72rem;
    font-weight: 900;
    letter-spacing: 0.06em;
    line-height: 1;
    text-transform: uppercase;
}

.security-reference h1 {
    max-width: 14ch;
    color: var(--security-ink);
    font-size: clamp(2.1rem, 4.2vw, 3.8rem);
    font-weight: 700;
    line-height: 1;
}

.security-reference h1 span {
    color: var(--security-green);
}

.security-reference-copy > p {
    max-width: 65ch;
    color: var(--security-muted);
    font-size: clamp(1rem, 1.25vw, 1.1rem);
    line-height: 1.7;
}

.security-reference-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.8rem;
    align-items: center;
    margin-top: 0.2rem;
}

.security-reference-actions .button {
    gap: 0.45rem;
    min-height: 3rem;
}

.security-reference-checks {
    display: flex;
    flex-wrap: wrap;
    gap: clamp(0.75rem, 2vw, 1.55rem);
    margin-top: 0.6rem;
}

.security-reference-checks span {
    display: inline-flex;
    gap: 0.48rem;
    align-items: center;
    color: var(--security-muted);
    font-size: 0.82rem;
    font-weight: 750;
}

.security-reference-checks svg {
    width: 1.05rem;
    height: 1.05rem;
    color: var(--primary);
}

.security-orbit {
    position: relative;
    min-height: 24rem;
}

.security-orbit-stage {
    position: absolute;
    inset: 50% auto auto 50%;
    width: min(34rem, 92%);
    height: 18rem;
    transform: translate(-50%, -46%);
}

.security-platform {
    position: absolute;
    right: 16%;
    bottom: 0.6rem;
    left: 16%;
    height: 4rem;
    border: 1px solid color-mix(in srgb, var(--primary) 22%, var(--security-line));
    border-radius: 50%;
    background:
        radial-gradient(ellipse at center, color-mix(in srgb, var(--primary) 27%, transparent), transparent 42%),
        linear-gradient(180deg, color-mix(in srgb, var(--card) 90%, var(--primary)), color-mix(in srgb, var(--secondary) 80%, var(--card)));
    box-shadow: 0 1.8rem 2.6rem rgba(15, 23, 42, 0.12);
}

.security-glow {
    position: absolute;
    right: 28%;
    bottom: 2.2rem;
    left: 28%;
    height: 1.3rem;
    border-radius: 999px;
    background: color-mix(in srgb, var(--brand-lime) 35%, var(--primary));
    filter: blur(1rem);
    opacity: 0.55;
}

.security-ring {
    position: absolute;
    inset: auto 8% 3.5rem;
    height: 5.5rem;
    border: 1px solid color-mix(in srgb, var(--primary) 32%, transparent);
    border-radius: 50%;
    transform: rotate(-8deg);
}

.security-ring-two {
    inset: auto 2% 3.1rem;
    border-style: dashed;
    opacity: 0.55;
    transform: rotate(13deg);
}

.security-shield {
    position: absolute;
    left: 50%;
    bottom: 4.05rem;
    display: grid;
    place-items: center;
    width: 8.4rem;
    height: 10rem;
    border: 2px solid rgba(255, 255, 255, 0.72);
    background:
        radial-gradient(circle at 50% 34%, rgba(255, 255, 255, 0.34), transparent 2.8rem),
        linear-gradient(145deg, #049767, #064e3b 72%);
    color: #ffffff;
    box-shadow: 0 1.3rem 2rem rgba(6, 78, 59, 0.3), inset 0 0 0 0.45rem rgba(255, 255, 255, 0.14);
    clip-path: polygon(50% 0%, 92% 14%, 86% 70%, 50% 100%, 14% 70%, 8% 14%);
    transform: translateX(-50%);
}

.security-shield svg {
    width: 3rem;
    height: 3rem;
    filter: drop-shadow(0 0.45rem 0.75rem rgba(0, 0, 0, 0.22));
}

.security-node {
    position: absolute;
    width: 0.65rem;
    height: 0.65rem;
    border: 2px solid #ffffff;
    border-radius: 999px;
    background: var(--primary);
    box-shadow: 0 0 0 0.25rem color-mix(in srgb, var(--primary) 15%, transparent);
}

.security-node-one {
    top: 6.7rem;
    left: 18%;
}

.security-node-two {
    top: 4.8rem;
    right: 30%;
}

.security-node-three {
    right: 17%;
    bottom: 7.1rem;
}

.security-orbit-card {
    position: absolute;
    z-index: 2;
    display: grid;
    grid-template-columns: 2.1rem minmax(0, 1fr);
    gap: 0.65rem;
    align-items: center;
    width: 11.5rem;
    border: 1px solid var(--security-line);
    border-radius: 0.75rem;
    background: var(--security-card);
    padding: 0.8rem;
    box-shadow: 0 1rem 2.2rem rgba(15, 23, 42, 0.075);
}

.security-orbit-card svg {
    width: 2.1rem;
    height: 2.1rem;
    border-radius: 0.6rem;
    background: color-mix(in srgb, var(--primary) 10%, var(--card));
    color: var(--primary);
    padding: 0.55rem;
}

.security-orbit-card small,
.security-orbit-card strong {
    display: block;
}

.security-orbit-card small {
    color: var(--security-ink);
    font-size: 0.74rem;
    font-weight: 750;
    line-height: 1.25;
}

.security-orbit-card strong {
    margin-top: 0.1rem;
    color: var(--security-green);
    font-size: 0.86rem;
}

.security-orbit-card.is-attempts {
    top: 1rem;
    left: 5%;
}

.security-orbit-card.is-certificate {
    bottom: 5.25rem;
    left: 0;
}

.security-orbit-card.is-public {
    right: 39%;
    bottom: 0;
}

.security-orbit-card.is-operators {
    top: 1.45rem;
    right: 2%;
}

.security-orbit-card.is-data {
    right: 0;
    bottom: 5rem;
}

.security-cert-strip {
    display: grid;
    grid-template-columns: minmax(14rem, 0.9fr) repeat(6, minmax(0, 1fr));
    gap: 0;
    align-items: stretch;
    overflow: hidden;
    border: 1px solid var(--security-line);
    border-radius: 0.8rem;
    background: var(--security-card);
    box-shadow: var(--shadow);
}

.security-cert-intro {
    display: grid;
    align-content: center;
    border-right: 1px solid var(--security-line);
    color: var(--security-ink);
    padding: 1.15rem 1.45rem;
    font-size: 1.05rem;
    font-weight: 850;
    line-height: 1.35;
}

.security-cert-strip article {
    display: grid;
    grid-template-columns: 2.4rem minmax(0, 1fr);
    gap: 0.72rem;
    align-items: center;
    min-width: 0;
    border-right: 1px solid var(--security-line);
    padding: 1rem;
}

.security-cert-strip article:last-child {
    border-right: 0;
}

.security-cert-strip svg {
    width: 2.4rem;
    height: 2.4rem;
    border-radius: 999px;
    background: color-mix(in srgb, var(--primary) 10%, var(--card));
    color: var(--primary);
    padding: 0.62rem;
}

.security-cert-strip strong,
.security-cert-strip small {
    display: block;
}

.security-cert-strip strong {
    overflow: hidden;
    color: var(--security-ink);
    font-size: 0.88rem;
    line-height: 1.2;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.security-cert-strip small {
    overflow: hidden;
    color: var(--security-muted);
    font-size: 0.74rem;
    line-height: 1.25;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.security-lifecycle {
    display: grid;
    gap: 1.25rem;
}

.security-lifecycle > header {
    display: grid;
    gap: 0.35rem;
    justify-items: center;
    text-align: center;
}

.security-lifecycle h2 {
    color: var(--security-ink);
    font-size: clamp(1.75rem, 2.6vw, 2.35rem);
    line-height: 1.1;
}

.security-lifecycle > header p {
    max-width: 66ch;
    color: var(--security-muted);
    line-height: 1.6;
}

.security-control-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1.15rem;
}

.security-control-card {
    display: grid;
    grid-template-columns: 5.3rem minmax(0, 1fr);
    gap: 1rem;
    align-content: start;
    border: 1px solid var(--security-line);
    border-radius: 0.85rem;
    background: var(--security-card);
    padding: 1.35rem;
    box-shadow: 0 1rem 2.6rem rgba(15, 23, 42, 0.045);
}

.security-control-card:hover,
.security-control-card:focus-within {
    border-color: color-mix(in srgb, var(--primary) 30%, var(--security-line));
    box-shadow: 0 1.3rem 3rem rgba(15, 23, 42, 0.075);
}

.security-control-icon {
    display: grid;
    place-items: center;
    width: 4.75rem;
    height: 4.75rem;
    border-radius: 999px;
    background: color-mix(in srgb, var(--primary) 10%, var(--card));
    color: var(--primary);
}

.security-control-icon svg {
    width: 2.15rem;
    height: 2.15rem;
}

.security-control-head {
    display: flex;
    gap: 0.75rem;
    align-items: center;
    justify-content: space-between;
}

.security-control-head h3 {
    color: var(--security-ink);
    font-size: 1.2rem;
    line-height: 1.2;
}

.security-control-head span {
    border: 1px solid color-mix(in srgb, var(--primary) 24%, var(--security-line));
    border-radius: var(--radius-pill);
    background: color-mix(in srgb, var(--primary) 8%, var(--card));
    color: var(--security-green);
    padding: 0.22rem 0.55rem;
    font-size: 0.7rem;
    font-weight: 900;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.security-control-card p {
    margin-top: 0.65rem;
    color: var(--security-muted);
    line-height: 1.55;
}

.security-control-card ul {
    display: grid;
    gap: 0.5rem;
    margin: 0.85rem 0 0;
    padding: 0;
    list-style: none;
}

.security-control-card li {
    display: flex;
    gap: 0.45rem;
    align-items: center;
    color: var(--security-ink);
    font-size: 0.84rem;
    font-weight: 720;
}

.security-control-card li svg {
    width: 1rem;
    height: 1rem;
    color: var(--primary);
}

.security-control-card footer {
    grid-column: 1 / -1;
    display: grid;
    place-items: center;
    min-height: 2.25rem;
    border: 1px solid color-mix(in srgb, var(--primary) 15%, var(--security-line));
    border-radius: 0.45rem;
    background: color-mix(in srgb, var(--primary) 6%, var(--card));
    color: var(--security-green-dark);
    font-size: 0.82rem;
    font-weight: 850;
}

.security-metric-band {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(21rem, 0.36fr);
    gap: 1.25rem;
    align-items: center;
    overflow: hidden;
    border-radius: 0.9rem;
    background:
        radial-gradient(circle at 82% 15%, rgba(184, 255, 44, 0.2), transparent 14rem),
        linear-gradient(135deg, #063f2d, #007a52);
    color: #ffffff;
    padding: 1rem;
    box-shadow: 0 1.5rem 3.2rem rgba(6, 78, 59, 0.2);
}

.security-metric-list {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 0;
}

.security-metric-list span {
    display: grid;
    grid-template-columns: 3.15rem minmax(0, 1fr);
    gap: 0.05rem 0.8rem;
    align-items: center;
    min-height: 5.6rem;
    border-right: 1px solid rgba(255, 255, 255, 0.15);
    padding: 0.7rem 1rem;
}

.security-metric-list span:last-child {
    border-right: 0;
}

.security-metric-list svg {
    grid-row: span 2;
    width: 3.15rem;
    height: 3.15rem;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.16);
    color: #ffffff;
    padding: 0.78rem;
}

.security-metric-list strong,
.security-metric-list small {
    display: block;
}

.security-metric-list strong {
    color: #ffffff;
    font-size: clamp(1.35rem, 2.2vw, 1.9rem);
    line-height: 1;
}

.security-metric-list small {
    color: rgba(255, 255, 255, 0.84);
    font-size: 0.82rem;
    font-weight: 750;
}

.security-metric-band aside {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 4rem;
    gap: 1rem;
    align-items: center;
    border: 1px solid rgba(255, 255, 255, 0.32);
    border-radius: 0.75rem;
    background: rgba(255, 255, 255, 0.95);
    color: var(--security-ink);
    padding: 1rem 1.1rem;
}

.security-metric-band aside h2 {
    color: var(--security-ink);
    font-size: 1rem;
    line-height: 1.25;
}

.security-metric-band aside p {
    margin-top: 0.4rem;
    color: var(--security-muted);
    font-size: 0.84rem;
    line-height: 1.45;
}

.security-metric-band aside > svg {
    width: 4rem;
    height: 4rem;
    color: var(--primary);
}

html[data-theme="dark"] .security-reference,
html.dark .security-reference {
    --security-ink: #ecfdf5;
    --security-muted: #a7bdb2;
    --security-line: #214236;
    --security-card: rgba(8, 28, 22, 0.88);
    --security-soft: #0d221a;
    --security-green: #86efac;
    --security-green-dark: #86efac;
    background:
        radial-gradient(circle at 74% 19%, color-mix(in srgb, var(--primary) 8%, transparent), transparent 26rem),
        radial-gradient(circle at 0% 48%, color-mix(in srgb, var(--brand-lime) 7%, transparent), transparent 27rem),
        linear-gradient(135deg, #04130f, #071b15);
}

html[data-theme="dark"] .security-control-card footer,
html.dark .security-control-card footer {
    color: var(--primary);
}

html[data-theme="dark"] .security-metric-band aside,
html.dark .security-metric-band aside {
    background: rgba(8, 28, 22, 0.94);
}

html[data-theme="dark"] .security-metric-band aside h2,
html.dark .security-metric-band aside h2 {
    color: var(--foreground);
}

@media (max-width: 1180px) {
    .security-reference-hero,
    .security-metric-band {
        grid-template-columns: 1fr;
    }

    .security-orbit {
        min-height: 25rem;
    }

    .security-cert-strip {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .security-cert-intro {
        grid-column: 1 / -1;
        border-right: 0;
        border-bottom: 1px solid var(--security-line);
    }

    .security-cert-strip article:nth-child(4),
    .security-cert-strip article:nth-child(7) {
        border-right: 0;
    }

    .security-control-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 940px) {
    .security-orbit {
        min-height: auto;
    }

    .security-orbit-stage {
        position: relative;
        inset: auto;
        width: 100%;
        margin: 0 auto;
        transform: none;
    }

    .security-orbit-card {
        position: relative;
        inset: auto !important;
        width: auto;
        margin-top: 0.65rem;
    }

    .security-orbit {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 0.65rem;
    }

    .security-orbit-stage {
        grid-column: 1 / -1;
    }

    .security-cert-strip,
    .security-metric-list {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .security-cert-strip article {
        border-right: 1px solid var(--security-line);
        border-bottom: 1px solid var(--security-line);
    }

    .security-cert-strip article:nth-child(odd) {
        border-right: 0;
    }

    .security-cert-strip article:nth-last-child(-n + 2) {
        border-bottom: 0;
    }

    .security-metric-list span {
        border-right: 0;
        border-bottom: 1px solid rgba(255, 255, 255, 0.15);
    }

    .security-metric-list span:nth-last-child(-n + 2) {
        border-bottom: 0;
    }
}

@media (max-width: 680px) {
    .security-reference {
        padding-inline: 0.85rem;
        padding-block-start: 1.5rem;
    }

    .security-reference h1 {
        font-size: clamp(2rem, 9.5vw, 2.8rem);
    }

    .security-reference-actions {
        align-items: stretch;
        flex-direction: column;
    }

    .security-reference-actions .button {
        width: 100%;
    }

    .security-reference-checks,
    .security-orbit,
    .security-cert-strip,
    .security-metric-list {
        grid-template-columns: 1fr;
    }

    .security-orbit-card,
    .security-cert-strip article,
    .security-cert-strip article:nth-child(odd),
    .security-cert-strip article:nth-child(4),
    .security-cert-strip article:nth-child(7) {
        border-right: 0;
    }

    .security-cert-strip article:nth-last-child(-n + 2) {
        border-bottom: 1px solid var(--security-line);
    }

    .security-cert-strip article:last-child {
        border-bottom: 0;
    }

    .security-control-card,
    .security-metric-band aside {
        grid-template-columns: 1fr;
    }

    .security-control-icon {
        width: 4rem;
        height: 4rem;
    }

    .security-control-head {
        align-items: flex-start;
        flex-direction: column;
    }

    .security-metric-list span,
    .security-metric-list span:nth-last-child(-n + 2) {
        border-bottom: 1px solid rgba(255, 255, 255, 0.15);
    }

    .security-metric-list span:last-child {
        border-bottom: 0;
    }
}

@media (prefers-reduced-motion: reduce) {
    .security-control-card,
    .security-control-card:hover,
    .security-control-card:focus-within {
        transition: none;
    }
}

.support-reference {
    --support-ink: #0b1f17;
    --support-muted: #4d6258;
    --support-line: #dbe9e0;
    --support-card: rgba(255, 255, 255, 0.9);
    --support-soft: #f2fbf5;
    --support-green: #047857;
    --support-green-dark: #064e3b;
    gap: clamp(1.2rem, 2vw, 1.65rem);
    padding-block: clamp(1.75rem, 2vw, 2.5rem) 1.25rem;
    background:
        radial-gradient(circle at 78% 16%, color-mix(in srgb, var(--primary) 9%, transparent), transparent 26rem),
        radial-gradient(circle at 0% 50%, color-mix(in srgb, var(--brand-lime) 10%, transparent), transparent 27rem),
        linear-gradient(135deg, color-mix(in srgb, var(--background) 96%, #ffffff), var(--background));
}

.support-reference svg {
    width: 1rem;
    height: 1rem;
    flex: 0 0 auto;
}

.support-reference h1,
.support-reference h2,
.support-reference h3,
.support-reference p {
    margin: 0;
}

.support-reference-hero {
    display: grid;
    grid-template-columns: minmax(0, 0.8fr) minmax(34rem, 1fr);
    gap: clamp(1.5rem, 5vw, 5rem);
    align-items: center;
}

.support-reference-copy {
    display: grid;
    gap: 1.2rem;
    align-content: center;
}

.support-reference-pill {
    display: inline-flex;
    gap: 0.45rem;
    align-items: center;
    width: fit-content;
    border: 1px solid color-mix(in srgb, var(--primary) 25%, var(--support-line));
    border-radius: var(--radius-pill);
    background: color-mix(in srgb, var(--primary) 10%, var(--card));
    color: var(--support-green);
    padding: 0.3rem 0.7rem;
    font-size: 0.72rem;
    font-weight: 900;
    letter-spacing: 0.06em;
    line-height: 1;
    text-transform: uppercase;
}

.support-reference h1 {
    max-width: 13ch;
    color: var(--support-ink);
    font-size: clamp(2.1rem, 4.2vw, 3.8rem);
    font-weight: 700;
    line-height: 1;
}

.support-reference h1 span {
    color: var(--support-green);
}

.support-reference-copy > p {
    max-width: 61ch;
    color: var(--support-muted);
    font-size: clamp(1rem, 1.25vw, 1.1rem);
    line-height: 1.7;
}

.support-reference-signals {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: clamp(0.85rem, 2vw, 1.5rem);
    margin-top: 1.15rem;
}

.support-reference-signals span {
    display: grid;
    grid-template-columns: 2.55rem minmax(0, 1fr);
    gap: 0.08rem 0.75rem;
    align-items: center;
    min-width: 0;
}

.support-reference-signals svg {
    grid-row: span 2;
    width: 2.55rem;
    height: 2.55rem;
    border-radius: 0.75rem;
    background: color-mix(in srgb, var(--primary) 10%, var(--card));
    color: var(--primary);
    padding: 0.65rem;
}

.support-reference-signals strong {
    overflow: hidden;
    color: var(--support-ink);
    font-size: 0.82rem;
    line-height: 1.15;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.support-reference-signals small {
    overflow: hidden;
    color: var(--support-muted);
    font-size: 0.72rem;
    line-height: 1.25;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.support-orbit {
    position: relative;
    min-height: 24rem;
}

.support-orbit-stage {
    position: absolute;
    inset: 50% auto auto 50%;
    width: min(36rem, 94%);
    height: 20rem;
    transform: translate(-50%, -48%);
}

.support-globe {
    position: absolute;
    inset: 0 10% auto;
    height: 17rem;
    border-radius: 999px;
    opacity: 0.48;
    background:
        radial-gradient(circle at 55% 44%, transparent 0 46%, color-mix(in srgb, var(--primary) 9%, transparent) 47% 48%, transparent 49%),
        radial-gradient(circle at 50% 50%, color-mix(in srgb, var(--primary) 6%, transparent), transparent 60%);
}

.support-ring {
    position: absolute;
    right: 9%;
    bottom: 3.25rem;
    left: 9%;
    height: 5.3rem;
    border: 1px solid color-mix(in srgb, var(--primary) 32%, transparent);
    border-radius: 50%;
    transform: rotate(-8deg);
}

.support-ring-two {
    right: 2%;
    left: 2%;
    border-style: dashed;
    opacity: 0.5;
    transform: rotate(15deg);
}

.support-platform {
    position: absolute;
    right: 17%;
    bottom: 0.5rem;
    left: 17%;
    height: 4rem;
    border: 1px solid color-mix(in srgb, var(--primary) 22%, var(--support-line));
    border-radius: 50%;
    background:
        radial-gradient(ellipse at center, color-mix(in srgb, var(--primary) 20%, transparent), transparent 42%),
        linear-gradient(180deg, color-mix(in srgb, var(--card) 90%, var(--primary)), color-mix(in srgb, var(--secondary) 80%, var(--card)));
    box-shadow: 0 1.7rem 2.5rem rgba(15, 23, 42, 0.12);
}

.support-glow {
    position: absolute;
    right: 31%;
    bottom: 2.1rem;
    left: 31%;
    height: 1.2rem;
    border-radius: 999px;
    background: color-mix(in srgb, var(--brand-lime) 35%, var(--primary));
    filter: blur(1rem);
    opacity: 0.55;
}

.support-headset {
    position: absolute;
    left: 50%;
    bottom: 4.3rem;
    display: grid;
    place-items: center;
    width: 11rem;
    height: 11rem;
    border-radius: 999px;
    background:
        linear-gradient(90deg, transparent 0 18%, #10b981 18% 27%, #17211d 27% 36%, transparent 36% 64%, #17211d 64% 73%, #10b981 73% 82%, transparent 82%),
        radial-gradient(circle at 50% 52%, var(--primary) 0 22%, transparent 23%);
    color: #ffffff;
    transform: translateX(-50%);
}

.support-headset::before {
    position: absolute;
    inset: 0.7rem 1.2rem auto;
    height: 6.4rem;
    border: 1rem solid #1f2b27;
    border-bottom: 0;
    border-radius: 999px 999px 0 0;
    content: "";
}

.support-headset svg {
    position: relative;
    z-index: 1;
    width: 3.8rem;
    height: 3.8rem;
}

.support-float {
    position: absolute;
    z-index: 2;
    display: grid;
    place-items: center;
    width: 4.2rem;
    height: 4.2rem;
    border: 1px solid var(--support-line);
    border-radius: 0.85rem;
    background: var(--support-card);
    color: var(--primary);
    box-shadow: 0 1rem 2.2rem rgba(15, 23, 42, 0.08);
}

.support-float svg {
    width: 1.7rem;
    height: 1.7rem;
}

.support-float-mail {
    top: 4.2rem;
    left: 8%;
}

.support-float-docs {
    top: 3.8rem;
    right: 7%;
}

.support-float-question {
    right: 12%;
    bottom: 3.6rem;
}

.support-main-grid {
    display: grid;
    grid-template-columns: minmax(0, 0.96fr) minmax(30rem, 0.84fr);
    gap: clamp(1.3rem, 3vw, 2.25rem);
    align-items: start;
}

.support-channel-area {
    display: grid;
    gap: 1.1rem;
}

.support-channel-area h2,
.support-message-card h2,
.support-response-panel h2,
.support-faq-card h2,
.support-enterprise-card h2,
.support-newsletter h2 {
    color: var(--support-ink);
    font-size: clamp(1.25rem, 2vw, 1.55rem);
    line-height: 1.2;
}

.support-channel-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1rem;
}

.support-channel-card,
.support-message-card,
.support-response-panel,
.support-faq-card,
.support-enterprise-card,
.support-newsletter {
    border: 1px solid var(--support-line);
    border-radius: 0.85rem;
    background: var(--support-card);
    box-shadow: 0 1rem 2.5rem rgba(15, 23, 42, 0.045);
}

.support-channel-card {
    display: grid;
    align-content: start;
    gap: 0.65rem;
    min-height: 13.4rem;
    padding: 1.25rem;
    transition: border-color var(--motion-default), box-shadow var(--motion-default), transform var(--motion-default);
}

.support-channel-card:hover,
.support-channel-card:focus-within {
    border-color: color-mix(in srgb, var(--primary) 32%, var(--support-line));
    box-shadow: 0 1.2rem 2.8rem rgba(15, 23, 42, 0.075);
    transform: translateY(-2px);
}

.support-channel-card > span,
.support-enterprise-card > div > span,
.support-newsletter > span {
    display: grid;
    place-items: center;
    width: 3rem;
    height: 3rem;
    border-radius: 999px;
    background: color-mix(in srgb, var(--primary) 10%, var(--card));
    color: var(--primary);
}

.support-channel-card > span svg,
.support-enterprise-card > div > span svg,
.support-newsletter > span svg {
    width: 1.45rem;
    height: 1.45rem;
}

.support-channel-card h3 {
    color: var(--support-ink);
    font-size: 1.04rem;
}

.support-channel-card p,
.support-message-card p,
.support-response-panel p,
.support-faq-card p,
.support-enterprise-card p,
.support-newsletter p {
    color: var(--support-muted);
    line-height: 1.55;
}

.support-channel-card a {
    display: inline-flex;
    gap: 0.35rem;
    align-items: center;
    width: fit-content;
    margin-top: auto;
    border: 1px solid var(--support-line);
    border-radius: 0.45rem;
    background: var(--card);
    color: var(--support-ink);
    padding: 0.58rem 0.75rem;
    font-size: 0.8rem;
    font-weight: 850;
    transition: border-color var(--motion-fast), background var(--motion-fast), color var(--motion-fast);
}

.support-channel-card a:hover,
.support-channel-card a:focus-visible {
    border-color: var(--primary);
    background: color-mix(in srgb, var(--primary) 8%, var(--card));
    color: var(--primary);
    outline: none;
}

.support-message-card {
    display: grid;
    gap: 1.15rem;
    padding: clamp(1.3rem, 2.4vw, 2rem);
}

.support-message-card header {
    display: grid;
    gap: 0.35rem;
}

.support-message-card form {
    display: grid;
    gap: 0.85rem;
}

.support-field {
    display: grid;
    gap: 0.38rem;
}

.support-field span {
    color: var(--support-ink);
    font-size: 0.82rem;
    font-weight: 850;
}

.support-field input,
.support-field select,
.support-field textarea,
.support-newsletter input {
    width: 100%;
    min-height: 2.7rem;
    border: 1px solid var(--input);
    border-radius: 0.55rem;
    background: var(--card);
    color: var(--foreground);
    padding: 0.55rem 0.72rem;
    font: inherit;
    font-size: 0.88rem;
    transition: border-color var(--motion-fast), box-shadow var(--motion-fast), background var(--motion-fast);
}

.support-field textarea {
    min-height: 8rem;
    resize: vertical;
}

.support-field input:focus,
.support-field select:focus,
.support-field textarea:focus,
.support-newsletter input:focus {
    border-color: var(--ring);
    box-shadow: 0 0 0 0.18rem color-mix(in srgb, var(--ring) 20%, transparent);
    outline: none;
}

.support-message-card .button {
    width: 100%;
    min-height: 3rem;
    gap: 0.45rem;
}

.support-form-note {
    color: var(--support-muted);
    font-size: 0.78rem;
    text-align: center;
}

.support-form-note a {
    color: var(--primary);
    font-weight: 850;
}

.support-response-panel {
    display: grid;
    grid-template-columns: minmax(0, 0.92fr) minmax(0, 1fr);
    gap: 1.5rem;
    align-items: center;
    padding: 1.4rem 1.65rem;
}

.support-response-panel > div:first-child {
    display: grid;
    gap: 0.7rem;
    align-content: center;
    border-right: 1px solid var(--support-line);
    padding-right: 1.5rem;
}

.support-response-panel > div:first-child > div {
    display: flex;
    flex-wrap: wrap;
    gap: 0.65rem;
    margin-top: 0.35rem;
}

.support-response-panel .button {
    gap: 0.4rem;
}

.support-response-times {
    display: grid;
    gap: 0.65rem;
}

.support-response-times > div {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 0.8rem;
    margin-top: 0.35rem;
}

.support-response-times span {
    display: grid;
    grid-template-columns: 2.7rem minmax(0, 1fr);
    gap: 0.05rem 0.65rem;
    align-items: center;
}

.support-response-times svg {
    grid-row: span 2;
    width: 2.7rem;
    height: 2.7rem;
    border-radius: 999px;
    background: color-mix(in srgb, var(--primary) 10%, var(--card));
    color: var(--primary);
    padding: 0.68rem;
}

.support-response-times strong,
.support-response-times small {
    overflow: hidden;
    display: block;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.support-response-times strong {
    color: var(--support-ink);
    font-size: 0.82rem;
}

.support-response-times small {
    color: var(--support-muted);
    font-size: 0.72rem;
    font-weight: 800;
}

.support-bottom-grid {
    display: grid;
    grid-template-columns: minmax(0, 0.82fr) minmax(0, 1fr);
    gap: 1.2rem;
    align-items: stretch;
}

.support-faq-card {
    display: grid;
    gap: 1rem;
    align-content: start;
    padding: 0;
    background: transparent;
    border: 0;
    box-shadow: none;
}

.support-faq-card > div {
    display: grid;
    overflow: hidden;
    border: 1px solid var(--support-line);
    border-radius: 0.75rem;
    background: var(--support-card);
}

.support-faq-card details {
    border-bottom: 1px solid var(--support-line);
}

.support-faq-card details:last-child {
    border-bottom: 0;
}

.support-faq-card summary {
    cursor: pointer;
    padding: 0.88rem 1rem;
    color: var(--support-ink);
    font-size: 0.9rem;
    font-weight: 850;
}

.support-faq-card details[open] summary {
    color: var(--primary);
}

.support-faq-card details p {
    padding: 0 1rem 0.95rem;
}

.support-faq-card > a {
    display: inline-flex;
    gap: 0.35rem;
    align-items: center;
    width: fit-content;
    color: var(--primary);
    font-size: 0.84rem;
    font-weight: 850;
}

.support-enterprise-card {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 14rem;
    gap: 1rem;
    overflow: hidden;
    min-height: 17rem;
    padding: 1.6rem;
    background:
        radial-gradient(circle at 100% 0%, color-mix(in srgb, var(--primary) 11%, transparent), transparent 12rem),
        var(--support-card);
}

.support-enterprise-card > div:first-child {
    display: grid;
    gap: 0.7rem;
    align-content: start;
}

.support-enterprise-card ul {
    display: grid;
    gap: 0.45rem;
    margin: 0.3rem 0 0.6rem;
    padding: 0;
    list-style: none;
}

.support-enterprise-card li {
    display: flex;
    gap: 0.45rem;
    align-items: center;
    color: var(--support-ink);
    font-size: 0.84rem;
    font-weight: 760;
}

.support-enterprise-card li svg {
    width: 1rem;
    height: 1rem;
    color: var(--primary);
}

.support-building-illustration {
    position: relative;
    align-self: end;
    min-height: 13rem;
}

.support-building-illustration span,
.support-building-illustration i,
.support-building-illustration b {
    position: absolute;
    display: block;
    border: 1px solid color-mix(in srgb, var(--primary) 22%, var(--support-line));
    background: linear-gradient(145deg, rgba(255, 255, 255, 0.95), rgba(209, 250, 229, 0.7));
    box-shadow: 0 1rem 1.6rem rgba(3, 34, 24, 0.12);
}

.support-building-illustration span {
    right: 0.8rem;
    bottom: 0;
    width: 8rem;
    height: 8.4rem;
    border-radius: 1rem 1rem 0.35rem 0.35rem;
}

.support-building-illustration i {
    right: 3rem;
    bottom: 7.5rem;
    width: 3.2rem;
    height: 2.6rem;
    border-radius: 0.6rem;
}

.support-building-illustration b {
    right: 8rem;
    bottom: 1.2rem;
    width: 3.4rem;
    height: 5.5rem;
    border-radius: 0.65rem;
}

.support-newsletter {
    display: grid;
    grid-template-columns: 4.4rem minmax(14rem, 0.62fr) minmax(18rem, 1fr);
    gap: 1.2rem;
    align-items: center;
    padding: 1.25rem 1.5rem;
}

.support-newsletter > span {
    width: 4.4rem;
    height: 4.4rem;
}

.support-newsletter form {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 0.65rem;
}

html[data-theme="dark"] .support-reference,
html.dark .support-reference {
    --support-ink: #ecfdf5;
    --support-muted: #a7bdb2;
    --support-line: #214236;
    --support-card: rgba(8, 28, 22, 0.88);
    --support-soft: #0d221a;
    --support-green: #86efac;
    --support-green-dark: #86efac;
    background:
        radial-gradient(circle at 78% 16%, color-mix(in srgb, var(--primary) 8%, transparent), transparent 26rem),
        radial-gradient(circle at 0% 50%, color-mix(in srgb, var(--brand-lime) 7%, transparent), transparent 27rem),
        linear-gradient(135deg, #04130f, #071b15);
}

html[data-theme="dark"] .support-building-illustration span,
html.dark .support-building-illustration span,
html[data-theme="dark"] .support-building-illustration i,
html.dark .support-building-illustration i,
html[data-theme="dark"] .support-building-illustration b,
html.dark .support-building-illustration b {
    background: linear-gradient(145deg, rgba(22, 64, 51, 0.95), rgba(6, 78, 59, 0.74));
}

@media (max-width: 1180px) {
    .support-reference-hero,
    .support-main-grid,
    .support-response-panel,
    .support-bottom-grid {
        grid-template-columns: 1fr;
    }

    .support-response-panel > div:first-child {
        border-right: 0;
        border-bottom: 1px solid var(--support-line);
        padding-right: 0;
        padding-bottom: 1.2rem;
    }
}

@media (max-width: 940px) {
    .support-channel-grid,
    .support-response-times > div,
    .support-newsletter {
        grid-template-columns: 1fr;
    }

    .support-orbit {
        min-height: 21rem;
    }

    .support-orbit-stage {
        width: min(30rem, 100%);
    }

    .support-enterprise-card {
        grid-template-columns: 1fr;
    }

    .support-building-illustration {
        min-height: 9rem;
    }
}

@media (max-width: 680px) {
    .support-reference {
        padding-inline: 0.85rem;
        padding-block-start: 1.5rem;
    }

    .support-reference h1 {
        font-size: clamp(2rem, 9.5vw, 2.8rem);
    }

    .support-reference-signals {
        grid-template-columns: 1fr;
    }

    .support-orbit-stage {
        position: relative;
        inset: auto;
        width: 100%;
        height: 18rem;
        transform: none;
    }

    .support-float {
        width: 3.5rem;
        height: 3.5rem;
    }

    .support-headset {
        width: 9rem;
        height: 9rem;
    }

    .support-headset::before {
        inset: 0.65rem 1rem auto;
        height: 5.2rem;
        border-width: 0.82rem;
    }

    .support-channel-card,
    .support-message-card,
    .support-response-panel,
    .support-enterprise-card,
    .support-newsletter {
        padding: 1rem;
    }

    .support-newsletter form {
        grid-template-columns: 1fr;
    }

    .support-newsletter .button {
        width: 100%;
    }
}

@media (prefers-reduced-motion: reduce) {
    .support-channel-card,
    .support-channel-card:hover,
    .support-channel-card:focus-within {
        transition: none;
        transform: none;
    }
}

.resources-reference {
    --resources-ink: #0b1f17;
    --resources-muted: #50635b;
    --resources-line: #dbe9e0;
    --resources-card: rgba(255, 255, 255, 0.92);
    --resources-soft: #f4fbf7;
    --resources-green: #047857;
    --resources-green-dark: #064e3b;
    gap: clamp(1.2rem, 2vw, 1.65rem);
    padding-block: clamp(1.75rem, 2vw, 2.5rem) 1.25rem;
    background:
        radial-gradient(circle at 78% 15%, color-mix(in srgb, var(--primary) 7%, transparent), transparent 27rem),
        radial-gradient(circle at 1% 46%, color-mix(in srgb, var(--brand-lime) 9%, transparent), transparent 30rem),
        linear-gradient(135deg, color-mix(in srgb, var(--background) 97%, #ffffff), var(--background));
}

.resources-reference svg {
    width: 1rem;
    height: 1rem;
    flex: 0 0 auto;
}

.resources-reference h1,
.resources-reference h2,
.resources-reference h3,
.resources-reference p {
    margin: 0;
}

.resources-reference-hero {
    display: grid;
    grid-template-columns: minmax(0, 0.82fr) minmax(34rem, 1fr);
    gap: clamp(1.4rem, 5vw, 5rem);
    align-items: center;
}

.resources-reference-copy {
    display: grid;
    gap: 1.05rem;
    align-content: center;
}

.resources-reference-pill,
.resources-resource-kind {
    display: inline-flex;
    gap: 0.42rem;
    align-items: center;
    width: fit-content;
    border: 1px solid color-mix(in srgb, var(--primary) 24%, var(--resources-line));
    border-radius: var(--radius-pill);
    background: color-mix(in srgb, var(--primary) 9%, var(--card));
    color: var(--resources-green);
    padding: 0.32rem 0.7rem;
    font-size: 0.72rem;
    font-weight: 900;
    letter-spacing: 0.06em;
    line-height: 1;
    text-transform: uppercase;
}

.reference-eyebrow,
.pricing-reference-pill,
.how-reference-pill,
.security-reference-pill,
.support-reference-pill,
.resources-reference-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    width: fit-content;
    min-height: 2rem;
    border: 1px solid color-mix(in srgb, var(--primary) 26%, var(--border));
    border-radius: var(--radius-pill);
    background: color-mix(in srgb, var(--primary) 9%, var(--card));
    color: var(--primary);
    padding: 0.3rem 0.75rem;
    font-size: 0.72rem;
    font-weight: 900;
    letter-spacing: 0.06em;
    line-height: 1;
    text-transform: uppercase;
}

.resources-reference h1 {
    max-width: 13.5ch;
    color: var(--resources-ink);
    font-size: clamp(2.1rem, 4.2vw, 3.8rem);
    font-weight: 700;
    letter-spacing: 0;
    line-height: 1.02;
}

.resources-reference h1 span {
    color: var(--resources-green);
}

.resources-reference-copy > p {
    max-width: 61ch;
    color: var(--resources-muted);
    font-size: clamp(0.98rem, 1.2vw, 1.08rem);
    line-height: 1.7;
}

.resources-search-form {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto auto;
    gap: 0.6rem;
    align-items: center;
    max-width: 38rem;
    margin-top: 0.45rem;
    border: 1px solid var(--resources-line);
    border-radius: 0.72rem;
    background: var(--resources-card);
    padding: 0.55rem;
    box-shadow: 0 1rem 2.2rem rgba(15, 23, 42, 0.045);
}

.resources-search-form > svg {
    width: 1.25rem;
    height: 1.25rem;
    margin-left: 0.28rem;
    color: var(--resources-muted);
}

.resources-search-form input {
    width: 100%;
    min-width: 0;
    border: 0;
    background: transparent;
    color: var(--foreground);
    font: inherit;
    font-size: 0.96rem;
    outline: none;
}

.resources-search-form:focus-within {
    border-color: var(--ring);
    box-shadow: 0 0 0 0.18rem color-mix(in srgb, var(--ring) 18%, transparent), 0 1rem 2.2rem rgba(15, 23, 42, 0.06);
}

.resources-search-shortcut {
    display: inline-flex;
    gap: 0.2rem;
    align-items: center;
    justify-content: center;
    min-width: 2.8rem;
    border: 1px solid color-mix(in srgb, var(--primary) 20%, var(--resources-line));
    border-radius: 0.45rem;
    background: color-mix(in srgb, var(--primary) 8%, var(--card));
    color: var(--resources-green-dark);
    padding: 0.34rem 0.45rem;
    font-size: 0.8rem;
    font-weight: 900;
}

.resources-search-shortcut svg {
    width: 0.82rem;
    height: 0.82rem;
}

.resources-docs-showcase {
    position: relative;
    display: grid;
    align-items: center;
    min-height: 25.5rem;
}

.resources-docs-showcase::before {
    position: absolute;
    inset: 4rem auto auto 2rem;
    width: 16rem;
    height: 16rem;
    opacity: 0.38;
    background-image: radial-gradient(color-mix(in srgb, var(--primary) 24%, transparent) 1px, transparent 1px);
    background-size: 12px 12px;
    content: "";
}

.resources-docs-window {
    position: relative;
    z-index: 1;
    overflow: hidden;
    width: min(41rem, 100%);
    margin-left: auto;
    border: 1px solid var(--resources-line);
    border-radius: 1.1rem;
    background: var(--resources-card);
    box-shadow: 0 1.8rem 4rem rgba(15, 23, 42, 0.12);
    transform: perspective(1200px) rotateY(-7deg) rotateX(2deg);
    transform-origin: center;
}

.resources-window-chrome {
    display: flex;
    gap: 0.34rem;
    align-items: center;
    height: 2.3rem;
    border-bottom: 1px solid var(--resources-line);
    padding: 0 1rem;
}

.resources-window-chrome span {
    width: 0.45rem;
    height: 0.45rem;
    border-radius: 999px;
    background: color-mix(in srgb, var(--resources-muted) 35%, var(--resources-line));
}

.resources-docs-layout {
    display: grid;
    grid-template-columns: 11.6rem minmax(0, 1fr);
    min-height: 20.5rem;
}

.resources-docs-layout aside {
    display: grid;
    align-content: start;
    gap: 0.35rem;
    border-right: 1px solid var(--resources-line);
    background: color-mix(in srgb, var(--resources-soft) 72%, transparent);
    padding: 1rem;
}

.resources-docs-layout aside strong,
.resources-docs-layout aside span {
    display: flex;
    gap: 0.45rem;
    align-items: center;
    min-width: 0;
    border-radius: 0.45rem;
    color: var(--resources-muted);
    padding: 0.46rem 0.55rem;
    font-size: 0.78rem;
    font-weight: 850;
}

.resources-docs-layout aside strong {
    color: var(--resources-ink);
    margin-bottom: 0.5rem;
    padding-inline: 0;
}

.resources-docs-layout aside span.is-active {
    background: color-mix(in srgb, var(--primary) 10%, var(--card));
    color: var(--primary);
}

.resources-docs-layout main {
    display: grid;
    gap: 1rem;
    align-content: start;
    padding: 1rem;
}

.resources-docs-card {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 7rem;
    gap: 1rem;
    align-items: center;
    border: 1px solid var(--resources-line);
    border-radius: 0.8rem;
    background:
        radial-gradient(circle at 100% 10%, color-mix(in srgb, var(--primary) 10%, transparent), transparent 8rem),
        var(--card);
    padding: 1rem;
}

.resources-docs-card h2,
.resources-docs-list h3 {
    color: var(--resources-ink);
    font-size: 1rem;
    line-height: 1.2;
}

.resources-docs-card p {
    margin-top: 0.35rem;
    color: var(--resources-muted);
    font-size: 0.78rem;
    line-height: 1.5;
}

.resources-docs-card a,
.resources-docs-list a,
.resources-topic-section header a,
.resources-featured-section header a,
.resources-article-card > a {
    display: inline-flex;
    gap: 0.3rem;
    align-items: center;
    width: fit-content;
    color: var(--primary);
    font-size: 0.82rem;
    font-weight: 850;
}

.resources-docs-card a {
    margin-top: 0.6rem;
}

.resources-docs-card > span {
    display: grid;
    place-items: center;
    width: 6rem;
    height: 5.6rem;
    border: 1px solid color-mix(in srgb, var(--primary) 20%, var(--resources-line));
    border-radius: 0.9rem;
    background: linear-gradient(145deg, color-mix(in srgb, var(--primary) 9%, var(--card)), var(--card));
    color: var(--primary);
}

.resources-docs-card > span svg {
    width: 2.35rem;
    height: 2.35rem;
}

.resources-docs-list {
    display: grid;
    gap: 0.45rem;
    border: 1px solid var(--resources-line);
    border-radius: 0.8rem;
    background: var(--card);
    padding: 0.95rem;
}

.resources-docs-list a {
    justify-content: space-between;
    width: 100%;
    border-radius: 0.45rem;
    color: var(--resources-ink);
    padding: 0.46rem 0.5rem;
    transition: background var(--motion-fast), color var(--motion-fast);
}

.resources-docs-list a:hover,
.resources-docs-list a:focus-visible {
    background: color-mix(in srgb, var(--primary) 8%, var(--card));
    color: var(--primary);
    outline: none;
}

.resources-float {
    position: absolute;
    z-index: 2;
    display: inline-flex;
    gap: 0.45rem;
    align-items: center;
    border: 1px solid var(--resources-line);
    border-radius: 0.7rem;
    background: var(--resources-card);
    color: var(--primary);
    padding: 0.75rem 0.95rem;
    font-size: 0.82rem;
    font-weight: 900;
    box-shadow: 0 1rem 2rem rgba(15, 23, 42, 0.08);
    animation: resources-float 7s ease-in-out infinite;
}

.resources-float svg {
    width: 1.25rem;
    height: 1.25rem;
}

.resources-float-guide {
    top: 3.7rem;
    left: 4%;
}

.resources-float-video {
    top: 8.4rem;
    right: 0;
    color: #4f46e5;
    animation-delay: -2s;
}

.resources-float-api {
    right: 1.4rem;
    bottom: 4.5rem;
    color: #b45309;
    animation-delay: -4s;
}

@keyframes resources-float {
    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-0.55rem);
    }
}

.resources-category-rail {
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    border: 1px solid var(--resources-line);
    border-radius: 0.9rem;
    background: var(--resources-card);
    box-shadow: 0 1rem 2.2rem rgba(15, 23, 42, 0.035);
}

.resources-category-rail a {
    display: grid;
    grid-template-columns: 2.7rem minmax(0, 1fr);
    gap: 0.05rem 0.7rem;
    align-items: center;
    min-height: 5.2rem;
    min-width: 0;
    border-right: 1px solid var(--resources-line);
    color: var(--resources-ink);
    padding: 1rem;
    transition: background var(--motion-fast), color var(--motion-fast);
}

.resources-category-rail a:last-child {
    border-right: 0;
}

.resources-category-rail a:hover,
.resources-category-rail a:focus-visible {
    background: color-mix(in srgb, var(--primary) 7%, var(--card));
    color: var(--primary);
    outline: none;
}

.resources-category-rail span,
.resources-topic-card > div span,
.resources-newsletter > span {
    display: grid;
    place-items: center;
    width: 2.7rem;
    height: 2.7rem;
    border-radius: 0.72rem;
    background: color-mix(in srgb, var(--primary) 10%, var(--card));
    color: var(--primary);
}

.resources-category-rail span {
    grid-row: span 2;
}

.resources-category-rail span svg,
.resources-topic-card > div span svg,
.resources-newsletter > span svg {
    width: 1.35rem;
    height: 1.35rem;
}

.resources-category-rail strong,
.resources-category-rail small {
    overflow: hidden;
    display: block;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.resources-category-rail strong {
    font-size: 0.84rem;
    font-weight: 900;
}

.resources-category-rail small {
    color: var(--resources-muted);
    font-size: 0.72rem;
}

.resources-topic-section,
.resources-featured-section {
    display: grid;
    gap: 1rem;
    border: 1px solid var(--resources-line);
    border-radius: 0.9rem;
    background: var(--resources-card);
    padding: 1.25rem;
    box-shadow: 0 1rem 2.2rem rgba(15, 23, 42, 0.035);
}

.resources-topic-section header,
.resources-featured-section header {
    display: flex;
    gap: 1rem;
    align-items: center;
    justify-content: space-between;
}

.resources-topic-section h2,
.resources-featured-section h2,
.resources-support-card h2,
.resources-article-card h2,
.resources-newsletter h2 {
    color: var(--resources-ink);
    font-size: clamp(1.2rem, 2vw, 1.45rem);
    line-height: 1.2;
}

.resources-topic-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 1rem;
}

.resources-topic-card {
    display: grid;
    gap: 0.85rem;
    align-content: start;
    min-height: 10.5rem;
    border: 1px solid var(--resources-line);
    border-radius: 0.78rem;
    background: var(--card);
    padding: 1rem;
    transition: border-color var(--motion-default), box-shadow var(--motion-default), transform var(--motion-default);
}

.resources-topic-card:hover,
.resources-topic-card:focus-within,
.resources-resource-card:hover,
.resources-resource-card:focus-within {
    border-color: color-mix(in srgb, var(--primary) 30%, var(--resources-line));
    box-shadow: 0 1.1rem 2.4rem rgba(15, 23, 42, 0.065);
    transform: translateY(-2px);
}

.resources-topic-card > div {
    display: flex;
    gap: 0.65rem;
    align-items: center;
}

.resources-topic-card h3 {
    color: var(--resources-ink);
    font-size: 1rem;
    line-height: 1.2;
}

.resources-topic-card ul,
.resources-support-card ul {
    display: grid;
    gap: 0.45rem;
    margin: 0;
    padding: 0;
    list-style: none;
}

.resources-topic-card li,
.resources-support-card li {
    display: flex;
    gap: 0.35rem;
    align-items: center;
    color: var(--resources-muted);
    font-size: 0.83rem;
    line-height: 1.35;
}

.resources-topic-card li svg {
    width: 0.82rem;
    height: 0.82rem;
    color: var(--primary);
}

.resources-topic-card > a {
    width: fit-content;
    margin-top: auto;
    color: var(--primary);
    font-size: 0.78rem;
    font-weight: 900;
}

.resources-featured-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 1rem;
}

.resources-resource-card {
    position: relative;
    display: grid;
    gap: 0.72rem;
    align-content: start;
    overflow: hidden;
    min-height: 17rem;
    border: 1px solid var(--resources-line);
    border-radius: 0.82rem;
    background: var(--card);
    padding: 1rem;
    transition: border-color var(--motion-default), box-shadow var(--motion-default), transform var(--motion-default);
}

.resources-resource-card h3 {
    color: var(--resources-ink);
    font-size: 1.02rem;
    line-height: 1.2;
}

.resources-resource-card p {
    color: var(--resources-muted);
    font-size: 0.84rem;
    line-height: 1.55;
}

.resources-resource-card small {
    display: inline-flex;
    gap: 0.35rem;
    align-items: center;
    margin-top: auto;
    color: var(--resources-muted);
    font-size: 0.78rem;
    font-weight: 800;
}

.resources-resource-art {
    position: relative;
    display: grid;
    place-items: center;
    width: 100%;
    min-height: 7.1rem;
    border-radius: 0.72rem;
    background:
        radial-gradient(circle at 50% 44%, color-mix(in srgb, var(--primary) 13%, transparent), transparent 5rem),
        color-mix(in srgb, var(--primary) 5%, var(--resources-soft));
}

.resources-resource-art svg {
    position: relative;
    z-index: 1;
    width: 3.6rem;
    height: 3.6rem;
    color: var(--primary);
}

.resources-resource-art span {
    position: absolute;
    inset: auto 18% 1.2rem;
    height: 0.9rem;
    border-radius: 999px;
    background: color-mix(in srgb, var(--primary) 18%, transparent);
    filter: blur(0.45rem);
}

.resources-tone-blue .resources-resource-kind,
.resources-tone-blue .resources-resource-art svg {
    color: #2563eb;
}

.resources-tone-amber .resources-resource-kind,
.resources-tone-amber .resources-resource-art svg {
    color: #b45309;
}

.resources-help-grid {
    display: grid;
    grid-template-columns: minmax(0, 0.94fr) minmax(0, 1fr);
    border: 1px solid var(--resources-line);
    border-radius: 0.9rem;
    background: var(--resources-card);
    box-shadow: 0 1rem 2.2rem rgba(15, 23, 42, 0.035);
}

.resources-support-card,
.resources-article-card {
    display: grid;
    gap: 1rem;
    align-content: center;
    min-height: 17rem;
    padding: 1.45rem;
}

.resources-support-card {
    grid-template-columns: minmax(0, 1fr) 13rem;
    border-right: 1px solid var(--resources-line);
}

.resources-support-card > div:first-child {
    display: grid;
    gap: 0.75rem;
    align-content: center;
}

.resources-support-card p,
.resources-article-card p,
.resources-newsletter p {
    color: var(--resources-muted);
    line-height: 1.55;
}

.resources-support-card li {
    color: var(--resources-ink);
    font-weight: 760;
}

.resources-support-card li svg {
    color: var(--primary);
}

.resources-headset-art {
    display: grid;
    place-items: center;
}

.resources-headset-art span {
    display: grid;
    place-items: center;
    width: 9rem;
    height: 9rem;
    border: 1px solid color-mix(in srgb, var(--primary) 22%, var(--resources-line));
    border-radius: 999px;
    background:
        radial-gradient(circle at 50% 55%, color-mix(in srgb, var(--primary) 20%, transparent), transparent 50%),
        linear-gradient(145deg, color-mix(in srgb, var(--primary) 12%, var(--card)), var(--card));
    color: var(--primary);
    box-shadow: 0 1.4rem 2.6rem rgba(15, 23, 42, 0.08);
}

.resources-headset-art svg {
    width: 4.4rem;
    height: 4.4rem;
}

.resources-article-card > div {
    display: grid;
    overflow: hidden;
    border: 1px solid var(--resources-line);
    border-radius: 0.75rem;
    background: var(--card);
}

.resources-article-card details {
    border-bottom: 1px solid var(--resources-line);
}

.resources-article-card details:last-child {
    border-bottom: 0;
}

.resources-article-card summary {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    gap: 0.48rem;
    align-items: center;
    cursor: pointer;
    color: var(--resources-ink);
    padding: 0.78rem 0.9rem;
    font-size: 0.86rem;
    font-weight: 850;
    list-style: none;
}

.resources-article-card summary::-webkit-details-marker {
    display: none;
}

.resources-article-card summary svg:first-child {
    color: var(--resources-muted);
}

.resources-article-card summary svg:last-child {
    margin-left: auto;
    transition: transform var(--motion-fast);
}

.resources-article-card details[open] summary {
    color: var(--primary);
}

.resources-article-card details[open] summary svg:last-child {
    transform: rotate(180deg);
}

.resources-article-card details p {
    padding: 0 0.9rem 0.9rem 2.4rem;
    font-size: 0.84rem;
}

.resources-newsletter {
    display: grid;
    grid-template-columns: 4.25rem minmax(15rem, 0.55fr) minmax(18rem, 1fr) minmax(18rem, 0.9fr);
    gap: 1.2rem;
    align-items: center;
    border: 1px solid var(--resources-line);
    border-radius: 0.9rem;
    background: var(--resources-card);
    padding: 1.25rem 1.45rem;
    box-shadow: 0 1rem 2.2rem rgba(15, 23, 42, 0.035);
}

.resources-newsletter > span {
    width: 4.25rem;
    height: 4.25rem;
    border-radius: 999px;
}

.resources-newsletter form {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 0.65rem;
}

.resources-newsletter input {
    width: 100%;
    min-height: 2.65rem;
    border: 1px solid var(--input);
    border-radius: 0.55rem;
    background: var(--card);
    color: var(--foreground);
    padding: 0.55rem 0.75rem;
    font: inherit;
    font-size: 0.88rem;
    outline: none;
    transition: border-color var(--motion-fast), box-shadow var(--motion-fast);
}

.resources-newsletter input:focus {
    border-color: var(--ring);
    box-shadow: 0 0 0 0.18rem color-mix(in srgb, var(--ring) 18%, transparent);
}

.resources-newsletter > div:last-child {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.55rem 0.8rem;
}

.resources-newsletter > div:last-child span {
    display: flex;
    gap: 0.4rem;
    align-items: center;
    min-width: 0;
    color: var(--resources-ink);
    font-size: 0.82rem;
    font-weight: 780;
}

.resources-newsletter > div:last-child svg {
    width: 1rem;
    height: 1rem;
    color: var(--primary);
}

.resources-helpfulness-card {
    grid-template-columns: 4.25rem minmax(0, 1fr) auto;
}

.resources-helpfulness-card form {
    display: flex;
    justify-content: flex-end;
    gap: 0.6rem;
}

.resources-helpfulness-button {
    width: 2.75rem;
    min-height: 2.75rem;
    padding: 0;
    border-radius: 0.75rem;
}

.resources-helpfulness-button svg {
    width: 1.15rem;
    height: 1.15rem;
}

.resources-helpfulness-button:hover,
.resources-helpfulness-button:focus-visible {
    color: var(--primary);
    border-color: color-mix(in srgb, var(--primary) 32%, var(--resources-line));
    background: color-mix(in srgb, var(--primary) 9%, var(--card));
}

.resources-helpfulness-button.is-negative:hover,
.resources-helpfulness-button.is-negative:focus-visible {
    color: var(--destructive);
    border-color: color-mix(in srgb, var(--destructive) 32%, var(--resources-line));
    background: color-mix(in srgb, var(--destructive) 8%, var(--card));
}

html[data-theme="dark"] .resources-reference,
html.dark .resources-reference {
    --resources-ink: #ecfdf5;
    --resources-muted: #a7bdb2;
    --resources-line: #214236;
    --resources-card: rgba(8, 28, 22, 0.88);
    --resources-soft: #0d221a;
    --resources-green: #86efac;
    --resources-green-dark: #86efac;
    background:
        radial-gradient(circle at 78% 15%, color-mix(in srgb, var(--primary) 8%, transparent), transparent 27rem),
        radial-gradient(circle at 1% 46%, color-mix(in srgb, var(--brand-lime) 7%, transparent), transparent 30rem),
        linear-gradient(135deg, #04130f, #071b15);
}

html[data-theme="dark"] .public-page :where(
    .badge,
    .tag,
    .reference-eyebrow,
    .reference-user-pill,
    .reference-plan-badge,
    .pricing-reference-pill,
    .pricing-plan-label,
    .pricing-recommended,
    .pricing-reference-card header span,
    .how-reference-pill,
    .security-reference-pill,
    .support-reference-pill,
    .resources-reference-pill,
    .resources-resource-kind
),
html.dark .public-page :where(
    .badge,
    .tag,
    .reference-eyebrow,
    .reference-user-pill,
    .reference-plan-badge,
    .pricing-reference-pill,
    .pricing-plan-label,
    .pricing-recommended,
    .pricing-reference-card header span,
    .how-reference-pill,
    .security-reference-pill,
    .support-reference-pill,
    .resources-reference-pill,
    .resources-resource-kind
) {
    color: #86efac;
}

html[data-theme="dark"] .public-page :where(.badge, .tag),
html.dark .public-page :where(.badge, .tag) {
    border-color: color-mix(in srgb, #86efac 28%, var(--border));
    background: color-mix(in srgb, #86efac 9%, var(--card));
}

html[data-theme="dark"] .public-page .reference-plan-badge,
html.dark .public-page .reference-plan-badge {
    background: color-mix(in srgb, #86efac 13%, var(--card));
}

html[data-theme="dark"] .resources-docs-card > span,
html.dark .resources-docs-card > span,
html[data-theme="dark"] .resources-headset-art span,
html.dark .resources-headset-art span {
    background: linear-gradient(145deg, rgba(22, 64, 51, 0.96), rgba(6, 78, 59, 0.74));
}

@media (max-width: 1180px) {
    .resources-reference-hero,
    .resources-help-grid {
        grid-template-columns: 1fr;
    }

    .resources-docs-window {
        margin-inline: auto;
    }

    .resources-support-card {
        border-right: 0;
        border-bottom: 1px solid var(--resources-line);
    }

    .resources-topic-grid,
    .resources-featured-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .resources-newsletter {
        grid-template-columns: 4.25rem minmax(0, 1fr);
    }

    .resources-helpfulness-card {
        grid-template-columns: 4.25rem minmax(0, 1fr) auto;
    }

    .resources-newsletter form,
    .resources-newsletter > div:last-child {
        grid-column: 1 / -1;
    }

    .resources-helpfulness-card form {
        grid-column: auto;
    }
}

@media (max-width: 960px) {
    .resources-category-rail {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .resources-category-rail a {
        border-right: 0;
        border-bottom: 1px solid var(--resources-line);
    }

    .resources-category-rail a:nth-last-child(-n + 2) {
        border-bottom: 0;
    }

    .resources-docs-window {
        transform: none;
    }

    .resources-float-guide {
        left: 0;
    }

    .resources-float-video,
    .resources-float-api {
        right: 0;
    }
}

@media (max-width: 700px) {
    .resources-reference {
        padding-inline: 0.85rem;
        padding-block-start: 1.5rem;
    }

    .resources-reference h1 {
        font-size: clamp(2rem, 9.5vw, 2.8rem);
    }

    .resources-search-form {
        grid-template-columns: auto minmax(0, 1fr) auto;
    }

    .resources-search-shortcut {
        display: none;
    }

    .resources-docs-showcase {
        min-height: auto;
        padding-top: 3.4rem;
    }

    .resources-docs-showcase::before {
        display: none;
    }

    .resources-float {
        position: relative;
        inset: auto;
        justify-self: start;
        margin-bottom: 0.5rem;
        animation: none;
    }

    .resources-float-video,
    .resources-float-api {
        display: none;
    }

    .resources-docs-layout,
    .resources-docs-card,
    .resources-support-card,
    .resources-newsletter {
        grid-template-columns: 1fr;
    }

    .resources-docs-layout aside {
        display: none;
    }

    .resources-docs-card > span {
        width: 100%;
    }

    .resources-category-rail,
    .resources-topic-grid,
    .resources-featured-grid,
    .resources-newsletter > div:last-child {
        grid-template-columns: 1fr;
    }

    .resources-category-rail a,
    .resources-category-rail a:nth-last-child(-n + 2) {
        border-bottom: 1px solid var(--resources-line);
    }

    .resources-category-rail a:last-child {
        border-bottom: 0;
    }

    .resources-topic-section,
    .resources-featured-section,
    .resources-support-card,
    .resources-article-card,
    .resources-newsletter {
        padding: 1rem;
    }

    .resources-topic-section header,
    .resources-featured-section header {
        align-items: flex-start;
        flex-direction: column;
    }

    .resources-newsletter form {
        grid-template-columns: 1fr;
    }

    .resources-helpfulness-card form {
        justify-content: flex-start;
    }

    .resources-helpfulness-button {
        width: 2.75rem;
    }

    .resources-newsletter .button,
    .resources-search-form .button {
        width: 100%;
    }

    .resources-helpfulness-card .resources-helpfulness-button {
        width: 2.75rem;
    }
}

@media (prefers-reduced-motion: reduce) {
    .resources-float,
    .resources-topic-card,
    .resources-resource-card,
    .resources-article-card summary svg:last-child,
    .resources-topic-card:hover,
    .resources-topic-card:focus-within,
    .resources-resource-card:hover,
    .resources-resource-card:focus-within {
        animation: none;
        transition: none;
        transform: none;
    }
}

.auth-reference {
    --auth-ref-ink: #09251b;
    --auth-ref-muted: #4f655d;
    --auth-ref-line: #d8e6de;
    --auth-ref-card: rgba(255, 255, 255, 0.88);
    --auth-ref-soft: #f2fbf6;
    --auth-ref-green: #047857;
    --auth-ref-deep: #064e3b;
    display: grid;
    grid-template-columns: 1fr;
    grid-template-rows: minmax(0, 1fr) auto;
    width: 100%;
    max-width: none;
    min-height: 100dvh;
    margin: 0;
    overflow: hidden;
    background:
        radial-gradient(circle at 0% 10%, color-mix(in srgb, var(--primary) 10%, transparent), transparent 34rem),
        radial-gradient(circle at 65% 32%, color-mix(in srgb, var(--primary) 5%, transparent), transparent 28rem),
        linear-gradient(110deg, color-mix(in srgb, var(--background) 94%, #ffffff), var(--background));
    color: var(--auth-ref-ink);
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    font-size: 14px;
    line-height: 1.5;
}

.auth-reference svg {
    width: 1rem;
    height: 1rem;
    flex: 0 0 auto;
}

.auth-reference h1,
.auth-reference h2,
.auth-reference p {
    margin: 0;
}

.auth-reference-home {
    position: absolute;
    top: max(1rem, env(safe-area-inset-top));
    right: max(1rem, env(safe-area-inset-right));
    z-index: 10;
}

.auth-reference-grid {
    box-sizing: border-box;
    display: grid;
    grid-template-columns: minmax(28rem, 0.95fr) minmax(31rem, 0.92fr);
    gap: clamp(2rem, 7vw, 7rem);
    align-items: center;
    width: min(1440px, 100%);
    min-height: calc(100dvh - 4.6rem);
    margin: 0 auto;
    padding: clamp(1.8rem, 4.1vw, 4rem) clamp(1.2rem, 5vw, 4.8rem) clamp(0.75rem, 2vw, 1.15rem);
}

.auth-reference-story {
    position: relative;
    display: grid;
    gap: clamp(1.05rem, 2.1vw, 1.55rem);
    align-content: center;
    min-height: min(48rem, calc(100dvh - 6rem));
}

.auth-reference-logo {
    display: block;
    width: min(21rem, 76vw);
    height: auto;
    border-radius: 0.8rem;
}

.auth-reference-logo img {
    display: block;
    width: 100%;
    height: auto;
}

.auth-reference-copy {
    display: grid;
    gap: 0.85rem;
    max-width: 33rem;
}

.auth-reference-copy h1 {
    color: var(--auth-ref-ink);
    font-size: clamp(1.85rem, 3vw, 2.55rem);
    font-weight: 800;
    letter-spacing: 0;
    line-height: 1.08;
}

.auth-reference-copy p {
    color: var(--auth-ref-muted);
    font-size: 0.86rem;
    line-height: 1.6;
}

.auth-reference-benefits {
    display: grid;
    gap: 0.9rem;
    max-width: 35rem;
}

.auth-reference-benefits div {
    display: grid;
    grid-template-columns: 2.65rem minmax(0, 1fr);
    gap: 0.12rem 0.95rem;
    align-items: center;
}

.auth-reference-benefits span {
    grid-row: span 2;
    display: grid;
    place-items: center;
    width: 2.65rem;
    height: 2.65rem;
    border-radius: 0.8rem;
    background: color-mix(in srgb, var(--primary) 10%, var(--card));
    color: var(--primary);
}

.auth-reference-benefits span svg {
    width: 1.32rem;
    height: 1.32rem;
}

.auth-reference-benefits strong {
    color: var(--auth-ref-ink);
    font-size: 0.88rem;
    font-weight: 650;
    line-height: 1.32;
}

.auth-reference-benefits p {
    color: var(--auth-ref-muted);
    font-size: 0.78rem;
    line-height: 1.45;
}

.auth-reference-art {
    position: relative;
    min-height: clamp(9rem, 17vw, 13rem);
    margin-top: 0.15rem;
}

.auth-wave {
    position: absolute;
    inset: auto 0 0 -6rem;
    height: 11rem;
    opacity: 0.38;
    background:
        repeating-radial-gradient(ellipse at 40% 100%, transparent 0 1.15rem, color-mix(in srgb, var(--primary) 22%, transparent) 1.2rem 1.26rem, transparent 1.31rem 2.1rem);
    transform: rotate(-5deg);
}

.auth-wave-two {
    inset: auto -3rem 1.2rem 2rem;
    opacity: 0.24;
    transform: rotate(8deg);
}

.auth-laptop {
    position: absolute;
    left: 18%;
    bottom: 1.1rem;
    width: min(16rem, 44vw);
    height: 7rem;
    border: 1px solid color-mix(in srgb, var(--primary) 17%, var(--auth-ref-line));
    border-radius: 0.85rem 0.85rem 0.35rem 0.35rem;
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.86), rgba(237, 252, 243, 0.82)),
        color-mix(in srgb, var(--primary) 4%, var(--card));
    box-shadow: 0 1.2rem 2.5rem rgba(15, 23, 42, 0.08);
    transform: rotate(-5deg);
}

.auth-laptop::after {
    position: absolute;
    right: -0.6rem;
    bottom: -0.85rem;
    left: -0.6rem;
    height: 1rem;
    border-radius: 0 0 1rem 1rem;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.92), rgba(219, 244, 231, 0.86));
    content: "";
}

.auth-laptop span,
.auth-laptop b,
.auth-laptop i {
    position: absolute;
    display: block;
    border-radius: 999px;
    background: color-mix(in srgb, var(--primary) 35%, transparent);
}

.auth-laptop span {
    top: 1.3rem;
    left: 1.3rem;
    width: 7rem;
    height: 0.45rem;
}

.auth-laptop b {
    top: 3rem;
    left: 1.3rem;
    width: 10rem;
    height: 0.55rem;
}

.auth-laptop i {
    top: 4.8rem;
    left: 1.3rem;
    width: 6.5rem;
    height: 0.55rem;
}

.auth-art-shield {
    position: absolute;
    left: 51%;
    bottom: 2.65rem;
    display: grid;
    place-items: center;
    width: 4.55rem;
    height: 5.35rem;
    clip-path: polygon(50% 0, 92% 18%, 82% 78%, 50% 100%, 18% 78%, 8% 18%);
    background: linear-gradient(145deg, #14b87a, #047857 58%, #d7ffe1);
    color: #ffffff;
    filter: drop-shadow(0 1rem 1.35rem rgba(4, 120, 87, 0.22));
}

.auth-art-shield svg {
    width: 1.9rem;
    height: 1.9rem;
}

.auth-mini-bars {
    position: absolute;
    left: 8%;
    bottom: 0.85rem;
    display: flex;
    gap: 0.45rem;
    align-items: end;
}

.auth-mini-bars i {
    display: block;
    width: 1.35rem;
    border-radius: 0.35rem 0.35rem 0.12rem 0.12rem;
    background: linear-gradient(180deg, #86efac, #047857);
    box-shadow: 0 0.6rem 1.1rem rgba(4, 120, 87, 0.14);
}

.auth-mini-bars i:nth-child(1) {
    height: 2.7rem;
}

.auth-mini-bars i:nth-child(2) {
    height: 4.2rem;
}

.auth-mini-bars i:nth-child(3) {
    height: 5.8rem;
}

.auth-books {
    position: absolute;
    right: 8%;
    bottom: 1.4rem;
    width: 7rem;
    height: 4.25rem;
}

.auth-books span {
    position: absolute;
    right: 0;
    left: 0;
    height: 1.15rem;
    border: 1px solid color-mix(in srgb, var(--primary) 18%, var(--auth-ref-line));
    border-radius: 0.24rem;
    background: linear-gradient(90deg, rgba(255, 255, 255, 0.95), #dff8e8);
}

.auth-books span:nth-child(1) {
    bottom: 0;
}

.auth-books span:nth-child(2) {
    right: 0.5rem;
    bottom: 1.15rem;
}

.auth-books span:nth-child(3) {
    right: 1rem;
    bottom: 2.3rem;
}

.auth-card-column {
    display: grid;
    gap: 1.5rem;
    justify-items: center;
}

.auth-reference-card {
    display: grid;
    gap: 1.5rem;
    width: min(36.5rem, 100%);
    border: 1px solid var(--auth-ref-line);
    border-radius: 1.05rem;
    background: var(--auth-ref-card);
    padding: clamp(2rem, 4vw, 3.4rem);
    box-shadow: 0 1.2rem 3.2rem rgba(15, 23, 42, 0.075);
    backdrop-filter: blur(18px);
}

.auth-reference-card-register {
    gap: 1rem;
    padding-block: clamp(1.35rem, 3vw, 2.1rem);
}

.auth-card-header {
    display: grid;
    gap: 0.55rem;
    text-align: center;
}

.auth-card-header h1 {
    color: var(--auth-ref-ink);
    font-size: clamp(1.2rem, 1.8vw, 1.45rem);
    font-weight: 700;
    line-height: 1.18;
}

.auth-card-header p {
    color: var(--auth-ref-muted);
    font-size: 0.86rem;
    line-height: 1.55;
}

.auth-card-tabs {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    border-bottom: 1px solid var(--auth-ref-line);
}

.auth-card-tabs a {
    position: relative;
    display: grid;
    place-items: center;
    min-height: 3.05rem;
    color: var(--auth-ref-muted);
    font-size: 0.82rem;
    font-weight: 750;
    text-decoration: none;
}

.auth-card-tabs a::after {
    position: absolute;
    right: 0;
    bottom: -1px;
    left: 0;
    height: 0.18rem;
    background: transparent;
    content: "";
}

.auth-card-tabs a:hover,
.auth-card-tabs a:focus-visible {
    color: var(--auth-ref-ink);
    outline: none;
}

.auth-card-tabs a[aria-current="page"] {
    color: var(--primary);
}

.auth-card-tabs a[aria-current="page"]::after {
    background: var(--primary);
}

.auth-reference .alert {
    margin: 0;
}

.auth-reference .auth-minimal-form {
    max-width: none;
    gap: 1.05rem;
}

.auth-reference .auth-field {
    gap: 0.5rem;
    align-content: start;
}

.auth-reference .auth-field > span:first-child,
.auth-reference .auth-field > label:first-child {
    color: var(--auth-ref-ink);
    font-size: 0.74rem;
    font-weight: 800;
}

.auth-reference .auth-field input {
    min-height: 2.5rem;
    border: 1px solid var(--input);
    border-radius: 0.45rem;
    background: var(--background);
    color: var(--foreground);
    padding: 0.48rem 0.68rem;
    font-size: 0.86rem;
}

.auth-input-shell {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    gap: 0.55rem;
    align-items: center;
    min-height: 2.5rem;
    border: 1px solid var(--input);
    border-radius: 0.45rem;
    background: var(--background);
    padding: 0 0.68rem;
    font-size: 0.86rem;
    font-weight: 400;
    line-height: 1.35;
    transition: border-color var(--motion-fast), box-shadow var(--motion-fast), background var(--motion-fast);
}

.auth-input-shell:focus-within {
    border-color: var(--ring);
    outline: 2px solid color-mix(in srgb, var(--ring) 28%, transparent);
    outline-offset: 1px;
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--ring) 12%, transparent);
}

.auth-input-shell > svg {
    width: 1.15rem;
    height: 1.15rem;
    color: color-mix(in srgb, var(--auth-ref-muted) 72%, transparent);
}

.auth-reference .auth-input-shell input,
.auth-reference .auth-input-shell .password-control input {
    min-height: 2.38rem;
    border: 0;
    background: transparent;
    padding: 0;
    font: inherit;
    font-weight: 400;
    box-shadow: none;
}

.auth-reference .auth-input-shell input:hover,
.auth-reference .auth-input-shell input:focus-visible,
.auth-reference .auth-input-shell .password-control input:focus-visible {
    border: 0;
    background: transparent;
    box-shadow: none;
    outline: none;
    transform: none;
}

.auth-input-shell .password-control {
    display: block;
    width: 100%;
}

.auth-input-shell .password-toggle {
    right: 0;
}

.phone-input-shell {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    gap: 0.5rem;
    align-items: center;
    min-height: 2.5rem;
    border: 1px solid var(--input);
    border-radius: 0.45rem;
    background: var(--background);
    padding: 0 0.68rem;
    font-size: 0.86rem;
    font-weight: 400;
    line-height: 1.35;
    transition: border-color var(--motion-fast), background var(--motion-fast), box-shadow var(--motion-fast);
}

.phone-input-shell:focus-within {
    border-color: var(--ring);
    outline: 2px solid color-mix(in srgb, var(--ring) 28%, transparent);
    outline-offset: 1px;
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--ring) 12%, transparent);
}

:where(.field, .auth-field, .support-field)[data-field-state="error"] .phone-input-shell {
    border-color: color-mix(in srgb, var(--destructive) 72%, var(--input));
    background: color-mix(in srgb, var(--destructive) 5%, var(--background));
    box-shadow: 0 0 0 1px color-mix(in srgb, var(--destructive) 12%, transparent);
}

:where(.field, .auth-field, .support-field)[data-field-state="valid"] .phone-input-shell {
    border-color: color-mix(in srgb, var(--success) 42%, var(--input));
    background: color-mix(in srgb, var(--success-bg) 18%, var(--background));
}

.phone-input-prefix {
    display: inline-flex;
    align-items: center;
    color: var(--foreground);
    font-size: 0.86rem;
    font-weight: 650;
    line-height: 1.35;
    white-space: nowrap;
}

.phone-input-shell input[data-phone-national],
.phone-input-shell input[data-phone-national]:hover,
.phone-input-shell input[data-phone-national]:focus,
.phone-input-shell input[data-phone-national]:focus-visible {
    min-height: 2.38rem;
    border: 0;
    border-radius: 0;
    background: transparent;
    padding: 0;
    font: inherit;
    font-size: 0.86rem;
    font-weight: 400;
    line-height: 1.35;
    outline: 0;
    box-shadow: none;
    transform: none;
}

.auth-forgot-row {
    display: flex;
    justify-content: flex-end;
    margin-top: -0.3rem;
}

.auth-forgot-row a,
.auth-reference .auth-utility-row a,
.auth-support-link a,
.auth-legal a,
.auth-advanced-access summary {
    color: var(--primary);
    font-size: 0.78rem;
    font-weight: 820;
    text-decoration: none;
}

.auth-forgot-row a:hover,
.auth-forgot-row a:focus-visible,
.auth-support-link a:hover,
.auth-support-link a:focus-visible,
.auth-legal a:hover,
.auth-legal a:focus-visible,
.auth-advanced-access summary:hover,
.auth-advanced-access summary:focus-visible {
    text-decoration: underline;
    outline: none;
}

.auth-reference .auth-utility-row {
    justify-content: flex-start;
}

.auth-reference .auth-check {
    color: var(--auth-ref-ink);
    font-size: 0.78rem;
    font-weight: 750;
}

.auth-reference .auth-check input {
    width: 1.2rem;
    height: 1.2rem;
    accent-color: var(--primary);
}

.auth-consent-panel {
    display: grid;
    gap: 0.85rem;
    margin: 0;
    border: 1px solid color-mix(in srgb, var(--primary) 24%, var(--border));
    border-radius: 0.65rem;
    background: color-mix(in srgb, var(--primary) 4%, var(--card));
    padding: 1rem;
}

.auth-consent-panel legend {
    padding: 0 0.3rem;
    color: var(--auth-ref-ink);
    font-size: 0.82rem;
    font-weight: 800;
}

.auth-consent-panel > p {
    margin: 0;
    color: var(--auth-ref-muted);
    font-size: 0.76rem;
    line-height: 1.55;
}

.auth-reference .auth-consent-check {
    align-items: flex-start;
    font-weight: 600;
    line-height: 1.48;
}

.auth-reference .auth-consent-check input {
    flex: 0 0 auto;
    margin-top: 0.08rem;
}

.auth-consent-check a {
    color: var(--primary);
    font-weight: 780;
}

.auth-guardian-fields {
    display: grid;
    gap: 0.75rem;
    border-left: 3px solid color-mix(in srgb, var(--primary) 45%, var(--border));
    padding-left: 0.85rem;
}

.auth-guardian-fields[hidden] {
    display: none;
}

.auth-consent-error {
    display: block;
    margin-top: -0.45rem;
    color: var(--destructive);
    font-size: 0.72rem;
    font-weight: 700;
}

.auth-reference .auth-primary {
    min-height: 3.25rem;
    border-radius: 0.45rem;
    background: linear-gradient(135deg, #047857, #059669);
    color: #ffffff;
    font-size: 0.86rem;
    font-weight: 750;
    box-shadow: 0 1rem 1.8rem rgba(4, 120, 87, 0.17);
}

.auth-divider {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
    gap: 1rem;
    align-items: center;
    color: var(--auth-ref-muted);
    font-size: 0.78rem;
}

.auth-divider::before,
.auth-divider::after {
    height: 1px;
    background: var(--auth-ref-line);
    content: "";
}

.auth-provider-stack {
    grid-template-columns: 1fr;
}

.auth-reference .auth-provider-grid button,
.auth-reference .auth-provider-grid a {
    display: flex;
    gap: 0.75rem;
    align-items: center;
    justify-content: center;
    min-height: 3.05rem;
    border-color: var(--auth-ref-line);
    border-radius: 0.55rem;
    background: color-mix(in srgb, var(--card) 88%, transparent);
    font-size: 0.86rem;
    font-weight: 750;
}

.auth-provider-icon {
    display: grid;
    place-items: center;
    width: 1.25rem;
    height: 1.25rem;
    font-size: 1rem;
    font-weight: 950;
    line-height: 1;
}

.auth-provider-icon img {
    display: block;
    width: 1.15rem;
    height: 1.15rem;
    object-fit: contain;
}

.auth-google {
    color: inherit;
}

.auth-legal {
    max-width: 27rem;
    margin-inline: auto;
    color: var(--auth-ref-muted);
    font-size: 0.78rem;
    line-height: 1.6;
    text-align: center;
}

.auth-support-link {
    color: var(--auth-ref-muted);
    font-size: 0.82rem;
    text-align: center;
}

.auth-reference .auth-role-chooser {
    max-width: none;
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.auth-reference .auth-role-chooser a {
    border-color: var(--auth-ref-line);
    border-radius: 0.55rem;
    background: color-mix(in srgb, var(--card) 88%, transparent);
}

.auth-reference .auth-role-chooser a[aria-current="page"] {
    border-color: color-mix(in srgb, var(--primary) 42%, var(--auth-ref-line));
    background: color-mix(in srgb, var(--primary) 9%, var(--card));
    color: var(--primary);
}

.auth-reference .auth-role-chooser a {
    font-size: 0.78rem;
    font-weight: 750;
}

.auth-reference .auth-stepper {
    max-width: none;
}

.auth-reference .auth-stepper span {
    border-radius: 0.5rem;
    font-size: 0.68rem;
    font-weight: 800;
}

.auth-registration-progress {
    display: none;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.4rem;
    margin: 0;
    padding: 0;
    list-style: none;
}

.auth-registration-wizard.is-enhanced .auth-registration-progress {
    display: grid;
}

.auth-registration-progress li {
    display: grid;
    grid-template-columns: 1.45rem minmax(0, 1fr);
    gap: 0.4rem;
    align-items: center;
    min-width: 0;
    border-top: 3px solid var(--auth-ref-line);
    color: var(--auth-ref-muted);
    padding: 0.55rem 0.1rem 0;
}

.auth-registration-progress li > span {
    display: grid;
    place-items: center;
    width: 1.45rem;
    height: 1.45rem;
    border: 1px solid var(--auth-ref-line);
    border-radius: 50%;
    background: var(--background);
    font-size: 0.68rem;
    font-weight: 800;
}

.auth-registration-progress li > strong {
    min-width: 0;
    font-size: 0.7rem;
    font-weight: 750;
    line-height: 1.25;
    overflow-wrap: anywhere;
}

.auth-registration-progress li.is-current {
    border-top-color: var(--primary);
    color: var(--primary);
}

.auth-registration-progress li.is-current > span {
    border-color: var(--primary);
    background: var(--primary);
    color: var(--primary-foreground);
}

.auth-registration-progress li.is-complete {
    border-top-color: var(--success);
    color: var(--foreground);
}

.auth-registration-progress li.is-complete > span {
    border-color: color-mix(in srgb, var(--success) 65%, var(--border));
    background: var(--success-bg);
    color: var(--success);
}

.auth-registration-panel {
    display: grid;
    gap: 1rem;
    min-width: 0;
}

.auth-registration-panel + .auth-registration-panel {
    border-top: 1px solid var(--auth-ref-line);
    padding-top: 1.25rem;
}

.auth-registration-wizard.is-enhanced .auth-registration-panel {
    border-top: 0;
    padding-top: 0;
}

.auth-registration-wizard.is-enhanced .auth-registration-panel[hidden] {
    display: none;
}

.auth-registration-wizard.is-enhanced [hidden] {
    display: none !important;
}

.auth-registration-step-header {
    display: grid;
    gap: 0.35rem;
    text-align: left;
}

.auth-registration-step-header > span {
    color: var(--primary);
    font-size: 0.7rem;
    font-weight: 800;
    text-transform: uppercase;
}

.auth-registration-step-header h2 {
    margin: 0;
    color: var(--auth-ref-ink);
    font-size: 1.05rem;
    font-weight: 750;
    line-height: 1.3;
    outline: none;
}

.auth-registration-step-header p,
.auth-registration-note {
    margin: 0;
    color: var(--auth-ref-muted);
    font-size: 0.78rem;
    line-height: 1.55;
}

.auth-registration-note {
    text-align: center;
}

.auth-reference .auth-field > span:first-child small {
    color: var(--auth-ref-muted);
    font: inherit;
    font-weight: 600;
}

.auth-registration-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.65rem;
    align-items: center;
    justify-content: space-between;
}

.auth-registration-actions-end {
    justify-content: flex-end;
}

.auth-registration-actions [data-registration-next] {
    flex: 1 1 100%;
    width: 100%;
}

.auth-registration-actions .button,
.auth-registration-actions .auth-provider-button {
    min-width: 7.5rem;
}

.auth-registration-actions .auth-provider-button {
    display: inline-flex;
    gap: 0.65rem;
    align-items: center;
    justify-content: center;
    min-height: 3.25rem;
    border: 1px solid var(--auth-ref-line);
    border-radius: 0.45rem;
    background: var(--background);
    color: var(--foreground);
    padding: 0.5rem 0.85rem;
    font-size: 0.82rem;
    font-weight: 750;
    cursor: pointer;
}

.auth-registration-actions .auth-provider-button:hover,
.auth-registration-actions .auth-provider-button:focus-visible {
    border-color: var(--ring);
    outline: 2px solid color-mix(in srgb, var(--ring) 28%, transparent);
    outline-offset: 1px;
}

.auth-access-method-field {
    min-width: 0;
    margin: 0;
    border: 0;
    padding: 0;
}

.auth-access-method-field > legend {
    margin-bottom: 0.7rem;
    color: var(--auth-ref-ink);
    font-size: 0.78rem;
    font-weight: 800;
}

.auth-access-option-list {
    display: grid;
    gap: 0.55rem;
}

.auth-access-option {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    gap: 0.7rem;
    align-items: start;
    min-width: 0;
    border: 1px solid var(--auth-ref-line);
    border-radius: 0.5rem;
    background: var(--background);
    padding: 0.75rem;
    cursor: pointer;
    transition: border-color var(--motion-fast), background var(--motion-fast), box-shadow var(--motion-fast);
}

.auth-access-option:hover,
.auth-access-option:focus-within,
.auth-access-option:has(input:checked) {
    border-color: color-mix(in srgb, var(--primary) 55%, var(--auth-ref-line));
    background: color-mix(in srgb, var(--primary) 5%, var(--background));
    box-shadow: 0 0 0 2px color-mix(in srgb, var(--primary) 8%, transparent);
}

.auth-access-option.is-disabled {
    opacity: 0.52;
    cursor: not-allowed;
}

.auth-access-option input {
    width: 1.05rem;
    height: 1.05rem;
    margin: 0.12rem 0 0;
    accent-color: var(--primary);
}

.auth-access-option > span {
    display: grid;
    gap: 0.2rem;
    min-width: 0;
}

.auth-access-option strong {
    color: var(--auth-ref-ink);
    font-size: 0.8rem;
    font-weight: 750;
    line-height: 1.35;
}

.auth-access-option small,
.auth-access-fields .auth-field > small.muted {
    color: var(--auth-ref-muted);
    font-size: 0.72rem;
    font-weight: 500;
    line-height: 1.45;
}

.auth-access-fields {
    border-left: 3px solid color-mix(in srgb, var(--primary) 42%, var(--auth-ref-line));
    padding-left: 0.85rem;
}

.auth-access-fields[hidden] {
    display: none;
}

.auth-registration-google-note {
    padding: 0.75rem;
    font-size: 0.76rem;
    line-height: 1.5;
}

.auth-registration-review {
    display: grid;
    margin: 0;
    border: 1px solid var(--auth-ref-line);
    border-radius: 0.5rem;
    background: color-mix(in srgb, var(--primary) 3%, var(--background));
}

.auth-registration-review > div {
    display: grid;
    grid-template-columns: minmax(7rem, 0.45fr) minmax(0, 1fr);
    gap: 0.75rem;
    padding: 0.65rem 0.75rem;
}

.auth-registration-review > div + div {
    border-top: 1px solid var(--auth-ref-line);
}

.auth-registration-review dt,
.auth-registration-review dd {
    min-width: 0;
    margin: 0;
    font-size: 0.76rem;
    line-height: 1.45;
    overflow-wrap: anywhere;
}

.auth-registration-review dt {
    color: var(--auth-ref-muted);
    font-weight: 700;
}

.auth-registration-review dd {
    color: var(--auth-ref-ink);
    font-weight: 750;
}

.auth-reference .auth-field-grid {
    gap: 0.85rem;
    align-items: start;
}

.auth-reference .auth-advanced-access {
    max-width: none;
}

.auth-reference .auth-advanced-access p {
    color: var(--auth-ref-muted);
    font-size: 0.78rem;
    line-height: 1.5;
}

.auth-reference-footer {
    display: flex;
    gap: 1rem;
    align-items: center;
    justify-content: space-between;
    border-top: 1px solid var(--auth-ref-line);
    background: color-mix(in srgb, var(--card) 64%, transparent);
    color: var(--auth-ref-muted);
    padding: 1.25rem max(1rem, env(safe-area-inset-right)) 1.25rem max(1rem, env(safe-area-inset-left));
    font-size: 0.78rem;
}

.auth-reference-footer span {
    display: inline-flex;
    gap: 0.55rem;
    align-items: center;
}

.auth-reference-footer svg {
    width: 1.35rem;
    height: 1.35rem;
    color: var(--primary);
}

html[data-theme="dark"] .auth-reference,
html.dark .auth-reference {
    --auth-ref-ink: #ecfdf5;
    --auth-ref-muted: #a7bdb2;
    --auth-ref-line: #214236;
    --auth-ref-card: rgba(8, 28, 22, 0.88);
    --auth-ref-soft: #0d221a;
    background:
        radial-gradient(circle at 0% 10%, color-mix(in srgb, var(--primary) 10%, transparent), transparent 34rem),
        radial-gradient(circle at 70% 32%, color-mix(in srgb, var(--brand-lime) 4%, transparent), transparent 28rem),
        linear-gradient(110deg, #04130f, #071b15);
}

html[data-theme="dark"] .auth-laptop,
html.dark .auth-laptop,
html[data-theme="dark"] .auth-books span,
html.dark .auth-books span {
    background: linear-gradient(145deg, rgba(22, 64, 51, 0.95), rgba(6, 78, 59, 0.74));
}

html[data-theme="dark"] .auth-reference-logo,
html.dark .auth-reference-logo {
    background: transparent;
    padding: 0;
    box-shadow: none;
}

@media (max-width: 1080px) {
    .auth-reference {
        overflow: visible;
    }

    .auth-reference-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
        min-height: auto;
        padding-top: 5.2rem;
    }

    .auth-reference-story {
        min-height: auto;
    }

    .auth-reference-art {
        min-height: 10rem;
    }

    .auth-card-column {
        padding-bottom: 1rem;
    }
}

@media (max-width: 720px) {
    .auth-reference-home {
        top: 0.75rem;
        right: 0.75rem;
    }

    .auth-reference-grid {
        gap: 1.25rem;
        padding: 4.7rem 1rem 1.2rem;
    }

    .auth-reference-logo {
        width: min(14rem, 70vw);
    }

    .auth-reference-copy h1 {
        font-size: clamp(2rem, 9vw, 2.8rem);
    }

    .auth-reference-benefits {
        gap: 0.8rem;
    }

    .auth-reference-benefits div {
        grid-template-columns: 2.5rem minmax(0, 1fr);
    }

    .auth-reference-benefits span {
        width: 2.5rem;
        height: 2.5rem;
    }

    .auth-reference-art {
        display: none;
    }

    .auth-register-experience .auth-reference-story {
        min-height: 0;
        gap: 0;
        align-items: center;
    }

    .auth-register-experience .auth-reference-copy,
    .auth-register-experience .auth-reference-benefits {
        display: none;
    }

    .auth-register-experience .auth-reference-logo {
        width: min(11rem, 56vw);
        margin-inline: auto;
    }

    .auth-reference-card,
    .auth-reference-card-register {
        padding: 1.1rem;
        border-radius: 0.9rem;
    }

    .auth-card-header {
        text-align: left;
    }

    .auth-card-tabs a {
        min-height: 2.65rem;
        font-size: 0.9rem;
    }

    .auth-reference .auth-field-grid,
    .auth-reference .auth-provider-grid,
    .auth-reference .auth-role-chooser,
    .auth-reference .auth-stepper {
        grid-template-columns: 1fr;
    }

    .auth-register-experience .auth-role-chooser {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .auth-registration-progress {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .auth-registration-progress li {
        grid-template-columns: 1fr;
        justify-items: start;
        gap: 0.3rem;
    }

    .auth-registration-progress li > strong {
        font-size: 0.66rem;
    }

    .auth-registration-actions {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        width: 100%;
    }

    .auth-registration-actions-end {
        grid-template-columns: 1fr;
    }

    .auth-registration-actions .button,
    .auth-registration-actions .auth-provider-button {
        width: 100%;
        min-width: 0;
    }

    .auth-registration-actions [data-registration-next] {
        grid-column: 1 / -1;
    }

    .auth-registration-review > div {
        grid-template-columns: 1fr;
        gap: 0.15rem;
    }

    .auth-reference-footer {
        align-items: flex-start;
        flex-direction: column;
    }
}

@media (prefers-reduced-motion: reduce) {
    .auth-reference .auth-provider-grid button,
    .auth-reference .auth-provider-grid a,
    .auth-card-tabs a,
    .auth-reference .auth-primary,
    .auth-reference .auth-role-chooser a,
    .auth-input-shell,
    .auth-reference .auth-field input {
        transition: none;
    }
}

/* Global form-system final layer: keep auth, public, and app forms visually identical. */
.auth-reference .auth-field input,
.auth-reference .auth-field select,
.auth-reference .auth-field textarea,
.support-reference .support-field input,
.support-reference .support-field select,
.support-reference .support-field textarea,
.field input,
.field select,
.field textarea,
.reference-newsletter input,
.resources-newsletter input,
.support-newsletter input {
    min-height: 2.5rem;
    border: 1px solid var(--input);
    border-radius: 0.45rem;
    background: var(--background);
    color: var(--foreground);
    padding: 0.48rem 0.68rem;
    font-size: 0.86rem;
    font-weight: 400;
    line-height: 1.35;
    transform: none;
}

.auth-reference .auth-field input::placeholder,
.auth-reference .auth-field textarea::placeholder,
.support-reference .support-field input::placeholder,
.support-reference .support-field textarea::placeholder,
.field input::placeholder,
.field textarea::placeholder,
.reference-newsletter input::placeholder,
.resources-newsletter input::placeholder,
.support-newsletter input::placeholder {
    color: var(--muted-foreground);
    font-size: 0.86rem;
    font-weight: 400;
    opacity: 0.76;
}

.auth-reference .auth-field input:focus-visible,
.auth-reference .auth-field select:focus-visible,
.auth-reference .auth-field textarea:focus-visible,
.support-reference .support-field input:focus,
.support-reference .support-field select:focus,
.support-reference .support-field textarea:focus,
.field input:focus,
.field select:focus,
.field textarea:focus,
.reference-newsletter input:focus,
.resources-newsletter input:focus,
.support-newsletter input:focus {
    border-color: var(--ring);
    outline: 2px solid color-mix(in srgb, var(--ring) 28%, transparent);
    outline-offset: 1px;
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--ring) 12%, transparent);
    transform: none;
}

.auth-reference .auth-input-shell input,
.auth-reference .auth-input-shell input:hover,
.auth-reference .auth-input-shell input:focus,
.auth-reference .auth-input-shell input:focus-visible,
.auth-reference .auth-input-shell .password-control input,
.auth-reference .auth-input-shell .password-control input:hover,
.auth-reference .auth-input-shell .password-control input:focus,
.auth-reference .auth-input-shell .password-control input:focus-visible {
    min-height: 2.38rem;
    border: 0;
    border-radius: 0;
    background: transparent;
    padding: 0;
    font: inherit;
    font-size: 0.86rem;
    font-weight: 400;
    line-height: 1.35;
    outline: 0;
    box-shadow: none;
}

.phone-input-shell input[data-phone-national],
.phone-input-shell input[data-phone-national]:hover,
.phone-input-shell input[data-phone-national]:focus,
.phone-input-shell input[data-phone-national]:focus-visible,
.auth-reference .phone-input-shell input[data-phone-national],
.auth-reference .phone-input-shell input[data-phone-national]:hover,
.auth-reference .phone-input-shell input[data-phone-national]:focus,
.auth-reference .phone-input-shell input[data-phone-national]:focus-visible {
    min-height: 2.38rem;
    border: 0;
    border-radius: 0;
    background: transparent;
    padding: 0;
    font: inherit;
    font-size: 0.86rem;
    font-weight: 400;
    line-height: 1.35;
    outline: 0;
    box-shadow: none;
    transform: none;
}

@media (prefers-reduced-motion: reduce) {
    .button-spinner {
        animation: none;
    }
}

.cookie-consent-banner {
    position: fixed;
    right: clamp(1rem, 3vw, 1.5rem);
    bottom: clamp(1rem, 3vw, 1.5rem);
    z-index: 80;
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 0.85rem;
    width: min(32rem, calc(100vw - 2rem));
    border: 1px solid var(--border);
    border-radius: 0.75rem;
    background: color-mix(in srgb, var(--card) 96%, transparent);
    box-shadow: var(--shadow-strong);
    padding: 1rem;
    backdrop-filter: blur(14px);
}

.cookie-consent-banner h2 {
    margin: 0.4rem 0 0.2rem;
    font-size: 1rem;
    line-height: 1.25;
}

.cookie-consent-banner p {
    margin: 0;
    color: var(--muted-foreground);
    font-size: 0.86rem;
    line-height: 1.55;
}

.cookie-consent-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    justify-content: flex-end;
}

@media (max-width: 640px) {
    .cookie-consent-actions {
        align-items: stretch;
        flex-direction: column;
    }

    .cookie-consent-actions .button {
        width: 100%;
    }
}

.admin-tab-shell {
    display: grid;
    gap: 1rem;
    min-width: 0;
}

.admin-tab-panel {
    display: grid;
    gap: 1rem;
    min-width: 0;
}

.admin-tab-panel > .metric-grid {
    margin-bottom: 0;
}

.admin-page .grid-2,
.billing-admin-grid,
.identity-provider-grid,
.ai-provider-grid,
.admin-template-grid {
    grid-template-columns: repeat(auto-fit, minmax(min(27rem, 100%), 1fr));
}

.billing-plan-admin-grid {
    grid-template-columns: repeat(auto-fit, minmax(min(34rem, 100%), 1fr));
}

.billing-plan-admin-card .settings-section,
.ai-provider-card .settings-section,
.identity-provider-card .settings-section {
    padding-block: 0.75rem;
}

.admin-page .form-grid {
    gap: 0.6rem;
}

.admin-page .table-wrap {
    margin-top: 0;
}

@media (max-width: 1180px) {
    .super-admin-kpi-grid,
    .identity-metric-grid,
    .ai-metric-grid {
        grid-template-columns: repeat(auto-fit, minmax(10.5rem, 1fr));
    }
}

/* Educator workspace: one compact, task-first system across every teaching surface. */
.workspace-role-educator .workspace-frame {
    grid-template-columns: 15.5rem minmax(0, 1fr);
}

.workspace-role-educator .workspace-sidebar {
    border-right-color: color-mix(in srgb, var(--border) 88%, var(--foreground));
    background: color-mix(in srgb, var(--card) 97%, var(--secondary));
    padding: 0.8rem 0.7rem;
}

.workspace-role-educator .workspace-brand {
    margin-bottom: 0.3rem;
    padding: 0.1rem 0.15rem 0.7rem;
    border-bottom: 1px solid var(--border);
}

.workspace-role-educator .workspace-nav {
    gap: 0.42rem;
    padding-block: 0.1rem 0.65rem;
}

.workspace-role-educator .workspace-nav-group {
    gap: 0.12rem;
}

.workspace-role-educator .workspace-nav-group h2 {
    margin: 0.62rem 0.45rem 0.18rem;
    font-size: 0.62rem;
    font-weight: 850;
}

.workspace-role-educator .workspace-nav-item {
    min-height: 2.05rem;
    border-radius: 0.38rem;
    padding: 0.32rem 0.45rem;
    font-size: 0.79rem;
}

.workspace-role-educator .workspace-nav-item:hover,
.workspace-role-educator .workspace-nav-item:focus-visible {
    transform: none;
}

.workspace-role-educator .workspace-nav-item[aria-current="page"] {
    border-color: color-mix(in srgb, var(--primary) 28%, var(--border));
    background: color-mix(in srgb, var(--primary) 8%, var(--card));
    color: var(--foreground);
    box-shadow: inset 0.16rem 0 0 var(--primary);
}

.workspace-role-educator .workspace-sidebar-footer {
    margin-top: 0.55rem;
    padding-top: 0.55rem;
    background: color-mix(in srgb, var(--card) 97%, var(--secondary));
}

.workspace-role-educator .workspace-main {
    background: color-mix(in srgb, var(--background) 91%, var(--secondary));
}

.workspace-role-educator .workspace-header {
    min-height: 3.7rem;
    padding-block: 0.5rem;
    background: color-mix(in srgb, var(--background) 97%, transparent);
}

.workspace-role-educator .workspace-content {
    width: min(1560px, 100%);
    padding: 1rem clamp(0.8rem, 1.45vw, 1.15rem) 1.35rem;
}

.workspace-role-educator .workspace-page {
    gap: 0.85rem;
}

.workspace-role-educator .card,
.workspace-role-educator .workspace-hero,
.workspace-role-educator .section-nav,
.workspace-role-educator .metric-card,
.workspace-role-educator .educator-workbench__panel {
    border-radius: 0.45rem;
    box-shadow: 0 1px 2px color-mix(in srgb, var(--foreground) 7%, transparent);
}

.workspace-role-educator .card-header {
    gap: 0.6rem;
    padding: 0.75rem 0.85rem;
}

.workspace-role-educator .card-header h2 {
    font-size: 0.92rem;
    font-weight: 750;
}

.workspace-role-educator .workspace-command-hero {
    gap: 0.75rem;
    padding: 0.95rem 1rem;
}

.workspace-role-educator .workspace-command-hero::before {
    height: 0.14rem;
    background: var(--primary);
}

.workspace-role-educator .workspace-command-hero h2 {
    max-width: none;
    margin-bottom: 0.2rem;
    font-size: 1.5rem;
    line-height: 1.15;
}

.workspace-role-educator .workspace-command-hero p {
    max-width: 66rem;
    font-size: 0.82rem;
    line-height: 1.45;
}

.workspace-role-educator .workspace-signal-grid {
    gap: 0.55rem;
}

.workspace-role-educator .workspace-signal-card {
    border-radius: 0.4rem;
    padding: 0.65rem 0.72rem;
}

.workspace-role-educator .metric-grid {
    gap: 0.65rem;
}

.workspace-role-educator .metric-card {
    padding: 0.72rem 0.8rem;
}

.workspace-role-educator .metric-card:hover {
    transform: none;
}

.workspace-role-educator .section-nav {
    gap: 0.85rem;
    padding: 0 0.75rem;
    overflow-x: auto;
    flex-wrap: nowrap;
    background: var(--card);
}

.workspace-role-educator .section-nav > span {
    display: none;
}

.workspace-role-educator .section-nav a {
    flex: 0 0 auto;
    min-height: 2.65rem;
    border: 0;
    border-bottom: 2px solid transparent;
    border-radius: 0;
    background: transparent;
    padding: 0.45rem 0.15rem;
}

.workspace-role-educator .section-nav a:hover,
.workspace-role-educator .section-nav a:focus-visible {
    border-bottom-color: var(--primary);
    background: transparent;
    box-shadow: none;
}

.workspace-role-educator .filter-bar,
.workspace-role-educator .compact-filter-form {
    gap: 0.55rem;
    padding: 0.75rem 0.85rem;
}

.workspace-role-educator .stacked-table th,
.workspace-role-educator .stacked-table td {
    padding-block: 0.68rem;
}

.workspace-role-educator .educator-workbench {
    grid-template-columns: minmax(0, 1fr) minmax(20rem, 23rem);
    gap: 0.85rem;
}

.workspace-role-educator .educator-workbench__main {
    gap: 0.85rem;
}

.workspace-role-educator .educator-workbench__panel {
    gap: 0.72rem;
    padding: 0.78rem;
}

.workspace-role-educator .workbench-panel-list {
    gap: 0.5rem;
}

.workspace-role-educator .workbench-panel-item {
    gap: 0.45rem;
    border-radius: 0.42rem;
    padding: 0.6rem;
}

.workspace-role-educator .educator-dashboard-metric {
    display: grid;
    gap: 0.1rem;
    color: inherit;
    text-decoration: none;
}

.workspace-role-educator .educator-dashboard-metric strong {
    color: var(--foreground);
    font-size: 1.05rem;
}

.workspace-role-educator .educator-dashboard-metric small {
    color: var(--muted-foreground);
    font-size: 0.73rem;
    line-height: 1.35;
}

.workspace-role-educator .dashboard-next-grid {
    gap: 0.6rem;
    padding: 0.8rem;
}

.workspace-role-educator .dashboard-next-card {
    min-height: 5.8rem;
    border-radius: 0.42rem;
    padding: 0.68rem;
}

.workspace-role-educator .dashboard-next-card:hover,
.workspace-role-educator .dashboard-next-card:focus-visible {
    transform: none;
}

.workspace-role-educator .educator-dashboard-toolkit .dashboard-next-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.workspace-role-educator .educator-support-card .card-header {
    padding-bottom: 0.55rem;
}

.workspace-role-educator .educator-support-card .pwa-install-grid {
    padding: 0.65rem 0.85rem;
}

.workspace-role-educator .workspace-notes-page > .grid-2 {
    align-items: start;
}

.workspace-role-educator .results-page .filter-grid,
.workspace-role-educator .exam-monitoring-page .filter-grid {
    grid-template-columns: minmax(18rem, 2fr) minmax(10rem, 0.7fr) minmax(10rem, 0.7fr) auto;
}

.workspace-role-educator .exam-monitoring-page .filter-grid {
    grid-template-columns: minmax(18rem, 2fr) minmax(11rem, 0.8fr) minmax(8rem, 0.55fr);
}

.workspace-role-educator .profile-grid {
    grid-template-columns: minmax(0, 1fr) minmax(17rem, 0.32fr);
    gap: 0.85rem;
}

.workspace-role-educator .notification-grid {
    grid-template-columns: minmax(0, 1.7fr) minmax(17rem, 0.55fr);
    gap: 0.85rem;
}

.workspace-role-educator .chart-grid-layout,
.workspace-role-educator .chart-grid-layout--wide {
    gap: 0.85rem;
    margin-bottom: 0;
}

@media (max-width: 1180px) {
    .workspace-role-educator .workspace-frame {
        grid-template-columns: 14.5rem minmax(0, 1fr);
    }

    .workspace-role-educator .educator-workbench,
    .workspace-role-educator .profile-grid,
    .workspace-role-educator .notification-grid {
        grid-template-columns: 1fr;
    }

    .workspace-role-educator .educator-workbench__panel {
        position: static;
        order: -1;
    }

    .workspace-role-educator .educator-dashboard-toolkit .dashboard-next-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 720px) {
    .workspace-role-educator .workspace-frame {
        grid-template-columns: 1fr;
    }

    .workspace-role-educator .workspace-content {
        padding: 0.65rem;
    }

    .workspace-role-educator .workspace-command-hero {
        padding: 0.8rem;
    }

    .workspace-role-educator .workspace-command-hero h2 {
        font-size: 1.25rem;
    }

    .workspace-role-educator .workspace-signal-grid,
    .workspace-role-educator .dashboard-metric-grid,
    .workspace-role-educator .educator-dashboard-toolkit .dashboard-next-grid,
    .workspace-role-educator .results-page .filter-grid,
    .workspace-role-educator .exam-monitoring-page .filter-grid {
        grid-template-columns: 1fr;
    }

    .workspace-role-educator .educator-workbench__panel {
        max-height: min(76dvh, 40rem);
        min-height: min(28rem, 76dvh);
    }

    .workspace-role-educator .section-nav {
        padding-inline: 0.65rem;
    }
}

/* Institution workspace: compact tenant operations across onboarding, delivery, results, and billing. */
.workspace-role-institution-admin .workspace-frame {
    grid-template-columns: 15.5rem minmax(0, 1fr);
}

.workspace-role-institution-admin .workspace-sidebar {
    border-right-color: color-mix(in srgb, var(--border) 88%, var(--foreground));
    background: color-mix(in srgb, var(--card) 97%, var(--secondary));
    padding: 0.8rem 0.7rem;
}

.workspace-role-institution-admin .workspace-brand {
    margin-bottom: 0.3rem;
    padding: 0.1rem 0.15rem 0.7rem;
    border-bottom: 1px solid var(--border);
}

.workspace-role-institution-admin .workspace-nav {
    gap: 0.42rem;
    padding-block: 0.1rem 0.65rem;
}

.workspace-role-institution-admin .workspace-nav-group {
    gap: 0.12rem;
}

.workspace-role-institution-admin .workspace-nav-group h2 {
    margin: 0.62rem 0.45rem 0.18rem;
    font-size: 0.62rem;
    font-weight: 850;
}

.workspace-role-institution-admin .workspace-nav-item {
    min-height: 2.05rem;
    border-radius: 0.38rem;
    padding: 0.32rem 0.45rem;
    font-size: 0.79rem;
}

.workspace-role-institution-admin .workspace-nav-item:hover,
.workspace-role-institution-admin .workspace-nav-item:focus-visible,
.workspace-role-institution-admin .metric-card:hover,
.workspace-role-institution-admin .dashboard-next-card:hover,
.workspace-role-institution-admin .dashboard-next-card:focus-visible {
    transform: none;
}

.workspace-role-institution-admin .workspace-nav-item[aria-current="page"] {
    border-color: color-mix(in srgb, var(--primary) 28%, var(--border));
    background: color-mix(in srgb, var(--primary) 8%, var(--card));
    color: var(--foreground);
    box-shadow: inset 0.16rem 0 0 var(--primary);
}

.workspace-role-institution-admin .workspace-sidebar-footer {
    margin-top: 0.55rem;
    padding-top: 0.55rem;
    background: color-mix(in srgb, var(--card) 97%, var(--secondary));
}

.workspace-role-institution-admin .workspace-main {
    background: color-mix(in srgb, var(--background) 91%, var(--secondary));
}

.workspace-role-institution-admin .workspace-header {
    min-height: 3.7rem;
    padding-block: 0.5rem;
    background: color-mix(in srgb, var(--background) 97%, transparent);
}

.workspace-role-institution-admin .workspace-content {
    width: min(1560px, 100%);
    padding: 1rem clamp(0.8rem, 1.45vw, 1.15rem) 1.35rem;
}

.workspace-role-institution-admin .workspace-page {
    gap: 0.85rem;
}

.workspace-role-institution-admin .card,
.workspace-role-institution-admin .workspace-hero,
.workspace-role-institution-admin .section-nav,
.workspace-role-institution-admin .metric-card,
.workspace-role-institution-admin .educator-workbench__panel {
    border-radius: 0.45rem;
    box-shadow: 0 1px 2px color-mix(in srgb, var(--foreground) 7%, transparent);
}

.workspace-role-institution-admin .card-header {
    gap: 0.6rem;
    padding: 0.75rem 0.85rem;
}

.workspace-role-institution-admin .card-header h2 {
    font-size: 0.92rem;
    font-weight: 750;
}

.workspace-role-institution-admin .workspace-command-hero {
    gap: 0.75rem;
    padding: 0.95rem 1rem;
}

.workspace-role-institution-admin .workspace-command-hero::before {
    height: 0.14rem;
    background: var(--primary);
}

.workspace-role-institution-admin .workspace-command-hero h2 {
    max-width: 52rem;
    margin-bottom: 0.2rem;
    font-size: 1.5rem;
    line-height: 1.15;
}

.workspace-role-institution-admin .workspace-command-hero p {
    max-width: 68rem;
    font-size: 0.82rem;
    line-height: 1.45;
}

.workspace-role-institution-admin .workspace-signal-grid,
.workspace-role-institution-admin .metric-grid {
    gap: 0.6rem;
}

.workspace-role-institution-admin .workspace-signal-card,
.workspace-role-institution-admin .metric-card {
    border-radius: 0.4rem;
    padding: 0.68rem 0.75rem;
}

.workspace-role-institution-admin .section-nav {
    gap: 0.9rem;
    padding: 0 0.75rem;
    overflow-x: auto;
    flex-wrap: nowrap;
    background: var(--card);
}

.workspace-role-institution-admin .section-nav > span {
    display: none;
}

.workspace-role-institution-admin .section-nav a {
    flex: 0 0 auto;
    min-height: 2.65rem;
    border: 0;
    border-bottom: 2px solid transparent;
    border-radius: 0;
    background: transparent;
    padding: 0.45rem 0.15rem;
}

.workspace-role-institution-admin .section-nav a:hover,
.workspace-role-institution-admin .section-nav a:focus-visible {
    border-bottom-color: var(--primary);
    background: transparent;
    box-shadow: none;
}

.workspace-role-institution-admin .filter-bar,
.workspace-role-institution-admin .compact-filter-form {
    gap: 0.55rem;
    padding: 0.72rem 0.82rem;
}

.workspace-role-institution-admin .stacked-table th,
.workspace-role-institution-admin .stacked-table td {
    padding-block: 0.64rem;
}

.workspace-role-institution-admin .educator-workbench {
    grid-template-columns: minmax(0, 1fr) minmax(20rem, 22rem);
    gap: 0.85rem;
}

.workspace-role-institution-admin .educator-workbench__main {
    gap: 0.85rem;
}

.workspace-role-institution-admin .educator-workbench__panel {
    gap: 0.72rem;
    padding: 0.78rem;
}

.workspace-role-institution-admin .workbench-panel-list {
    gap: 0.5rem;
}

.workspace-role-institution-admin .workbench-panel-item {
    gap: 0.45rem;
    border-radius: 0.42rem;
    padding: 0.6rem;
}

.workspace-role-institution-admin .institution-dashboard-metric {
    display: grid;
    gap: 0.1rem;
    color: inherit;
    text-decoration: none;
}

.workspace-role-institution-admin .institution-dashboard-metric strong {
    color: var(--foreground);
    font-size: 1.05rem;
}

.workspace-role-institution-admin .institution-dashboard-metric small {
    color: var(--muted-foreground);
    font-size: 0.73rem;
    line-height: 1.35;
}

.workspace-role-institution-admin .dashboard-next-grid {
    gap: 0.6rem;
    padding: 0.78rem;
}

.workspace-role-institution-admin .dashboard-next-card {
    min-height: 5.7rem;
    border-radius: 0.42rem;
    padding: 0.68rem;
}

.workspace-role-institution-admin .institution-dashboard-toolkit .dashboard-next-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.workspace-role-institution-admin .institution-support-card .card-header {
    padding-bottom: 0.55rem;
}

.workspace-role-institution-admin .institution-support-card .pwa-install-grid {
    padding: 0.65rem 0.85rem;
}

.workspace-role-institution-admin .institution-overview-page > .grid-2,
.workspace-role-institution-admin .workspace-notes-page > .grid-2 {
    align-items: start;
}

.workspace-role-institution-admin .workspace-notes-page > .grid-2 {
    grid-template-columns: minmax(0, 1.15fr) minmax(18rem, 0.85fr);
}

.workspace-role-institution-admin .results-page .filter-grid {
    grid-template-columns: minmax(18rem, 2fr) minmax(10rem, 0.7fr) minmax(10rem, 0.7fr) auto;
}

.workspace-role-institution-admin .exam-monitoring-page .filter-grid {
    grid-template-columns: minmax(18rem, 2fr) minmax(11rem, 0.8fr) minmax(8rem, 0.55fr);
}

.workspace-role-institution-admin .result-ledger-table th:first-child,
.workspace-role-institution-admin .result-ledger-table td:first-child {
    width: 31%;
}

.workspace-role-institution-admin .result-ledger-table th:nth-child(2),
.workspace-role-institution-admin .result-ledger-table td:nth-child(2) {
    width: 23%;
}

.workspace-role-institution-admin .institution-result-detail-page .result-answer-stack > form {
    display: grid;
    gap: 0.7rem;
}

.workspace-role-institution-admin .institution-result-detail-page .result-answer-card {
    margin: 0;
}

.workspace-role-institution-admin .institution-result-detail-page .result-answer-summary {
    position: relative;
    cursor: pointer;
    list-style: none;
    padding-right: 3rem;
}

.workspace-role-institution-admin .institution-result-detail-page .result-answer-summary::-webkit-details-marker {
    display: none;
}

.workspace-role-institution-admin .institution-result-detail-page .result-answer-summary::after {
    position: absolute;
    top: 50%;
    right: 0.9rem;
    display: grid;
    place-items: center;
    width: 1.5rem;
    height: 1.5rem;
    border: 1px solid var(--border);
    border-radius: 50%;
    background: var(--secondary);
    color: var(--muted-foreground);
    content: "+";
    font-size: 1rem;
    line-height: 1;
    transform: translateY(-50%);
}

.workspace-role-institution-admin .institution-result-detail-page .result-answer-card[open] > .result-answer-summary::after {
    content: "−";
}

.workspace-role-institution-admin .institution-result-detail-page .result-answer-card:not([open]) > .result-answer-summary {
    border-bottom: 0;
}

.workspace-role-institution-admin .institution-result-detail-page .result-answer-summary-prompt {
    max-width: 58rem;
    margin-top: 0.16rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.workspace-role-institution-admin .notification-grid {
    grid-template-columns: minmax(0, 1fr);
    gap: 0.85rem;
}

.workspace-role-institution-admin .notification-grid > .content-stack {
    display: grid;
    grid-template-columns: minmax(0, 1.55fr) minmax(18rem, 0.65fr);
    gap: 0.85rem;
    align-items: start;
}

.workspace-role-institution-admin .notification-grid > .side-stack {
    display: grid;
    grid-template-columns: minmax(16rem, 0.6fr) minmax(0, 1.4fr);
    gap: 0.85rem;
    align-items: start;
}

.workspace-role-institution-admin .notification-grid #messaging-admin {
    grid-column: 1 / -1;
}

.workspace-role-institution-admin .institution-broadcast-form {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 0.65rem;
    align-items: end;
}

.workspace-role-institution-admin .institution-broadcast-form > .form-grid {
    display: contents;
}

.workspace-role-institution-admin .institution-broadcast-form > .smart-assist,
.workspace-role-institution-admin .institution-broadcast-form > .smart-assist-strip {
    grid-column: 1 / -1;
}

.workspace-role-institution-admin .institution-broadcast-form > label.field {
    grid-column: span 2;
}

.workspace-role-institution-admin .institution-broadcast-form textarea {
    min-height: 6.25rem;
}

.workspace-role-institution-admin .institution-broadcast-form > .notification-switch-grid {
    grid-column: span 3;
    align-self: center;
}

.workspace-role-institution-admin .institution-broadcast-form > .notification-form-error {
    grid-column: 1 / -1;
}

.workspace-role-institution-admin .institution-broadcast-form > .button {
    min-height: 2.5rem;
}

.workspace-role-institution-admin .billing-metric-grid,
.workspace-role-institution-admin .ai-metric-grid {
    display: none;
}

.workspace-role-institution-admin .billing-chart-grid,
.workspace-role-institution-admin .ai-chart-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.85rem;
    margin-bottom: 0;
}

.workspace-role-institution-admin .chart-card {
    gap: 0.75rem;
    padding: 0.85rem;
}

.workspace-role-institution-admin .chart-visual,
.workspace-role-institution-admin .chart-visual[data-chart-size="large"] {
    min-height: 14.5rem;
    padding: 0.85rem 1rem;
}

.workspace-role-institution-admin .billing-plan-grid,
.workspace-role-institution-admin .billing-main-grid {
    gap: 0.85rem;
}

@media (max-width: 1180px) {
    .workspace-role-institution-admin .workspace-frame {
        grid-template-columns: 14.5rem minmax(0, 1fr);
    }

    .workspace-role-institution-admin .educator-workbench,
    .workspace-role-institution-admin .notification-grid > .content-stack,
    .workspace-role-institution-admin .notification-grid > .side-stack,
    .workspace-role-institution-admin .workspace-notes-page > .grid-2 {
        grid-template-columns: 1fr;
    }

    .workspace-role-institution-admin .educator-workbench__panel {
        position: static;
        order: -1;
    }

    .workspace-role-institution-admin .notification-grid #messaging-admin {
        grid-column: auto;
    }

    .workspace-role-institution-admin .billing-chart-grid,
    .workspace-role-institution-admin .ai-chart-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 720px) {
    .workspace-role-institution-admin .workspace-frame {
        grid-template-columns: 1fr;
    }

    .workspace-role-institution-admin .workspace-content {
        padding: 0.65rem;
    }

    .workspace-role-institution-admin .workspace-command-hero {
        padding: 0.8rem;
    }

    .workspace-role-institution-admin .workspace-command-hero h2 {
        font-size: 1.25rem;
    }

    .workspace-role-institution-admin .workspace-signal-grid,
    .workspace-role-institution-admin .dashboard-metric-grid,
    .workspace-role-institution-admin .institution-dashboard-toolkit .dashboard-next-grid,
    .workspace-role-institution-admin .results-page .filter-grid,
    .workspace-role-institution-admin .exam-monitoring-page .filter-grid,
    .workspace-role-institution-admin .billing-chart-grid,
    .workspace-role-institution-admin .ai-chart-grid,
    .workspace-role-institution-admin .institution-broadcast-form {
        grid-template-columns: 1fr;
    }

    .workspace-role-institution-admin .institution-broadcast-form > label.field,
    .workspace-role-institution-admin .institution-broadcast-form > .notification-switch-grid,
    .workspace-role-institution-admin .institution-broadcast-form > .notification-form-error {
        grid-column: auto;
    }

    .workspace-role-institution-admin .educator-workbench__panel {
        max-height: min(76dvh, 40rem);
        min-height: min(28rem, 76dvh);
    }

    .workspace-role-institution-admin .section-nav {
        padding-inline: 0.65rem;
    }
}

/* Student workspace: calm, task-focused surfaces for exams, outcomes, and learning notes. */
.workspace-role-student .workspace-frame {
    grid-template-columns: 15.5rem minmax(0, 1fr);
}

.workspace-role-student .workspace-sidebar {
    border-right-color: color-mix(in srgb, var(--border) 88%, var(--foreground));
    background: color-mix(in srgb, var(--card) 97%, var(--secondary));
    padding: 0.8rem 0.7rem;
}

.workspace-role-student .workspace-brand {
    margin-bottom: 0.3rem;
    padding: 0.1rem 0.15rem 0.7rem;
    border-bottom: 1px solid var(--border);
}

.workspace-role-student .workspace-nav {
    gap: 0.42rem;
    padding-block: 0.1rem 0.65rem;
}

.workspace-role-student .workspace-nav-group {
    gap: 0.12rem;
}

.workspace-role-student .workspace-nav-group h2 {
    margin: 0.62rem 0.45rem 0.18rem;
    font-size: 0.62rem;
    font-weight: 850;
}

.workspace-role-student .workspace-nav-item {
    min-height: 2.05rem;
    border-radius: 0.38rem;
    padding: 0.32rem 0.45rem;
    font-size: 0.79rem;
}

.workspace-role-student .workspace-nav-item:hover,
.workspace-role-student .workspace-nav-item:focus-visible,
.workspace-role-student .metric-card:hover,
.workspace-role-student .dashboard-next-card:hover,
.workspace-role-student .dashboard-next-card:focus-visible {
    transform: none;
}

.workspace-role-student .workspace-nav-item[aria-current="page"] {
    border-color: color-mix(in srgb, var(--primary) 28%, var(--border));
    background: color-mix(in srgb, var(--primary) 8%, var(--card));
    color: var(--foreground);
    box-shadow: inset 0.16rem 0 0 var(--primary);
}

.workspace-role-student .workspace-sidebar-footer {
    margin-top: 0.55rem;
    padding-top: 0.55rem;
    background: color-mix(in srgb, var(--card) 97%, var(--secondary));
}

.workspace-role-student .workspace-main {
    background: color-mix(in srgb, var(--background) 91%, var(--secondary));
}

.workspace-role-student .workspace-header {
    min-height: 3.7rem;
    padding-block: 0.5rem;
    background: color-mix(in srgb, var(--background) 97%, transparent);
}

.workspace-role-student .workspace-content {
    width: min(1440px, 100%);
    padding: 1rem clamp(0.8rem, 1.45vw, 1.15rem) 1.35rem;
}

.workspace-role-student .workspace-page {
    gap: 0.85rem;
}

.workspace-role-student .card,
.workspace-role-student .workspace-hero,
.workspace-role-student .metric-card {
    border-radius: 0.45rem;
    box-shadow: 0 1px 2px color-mix(in srgb, var(--foreground) 7%, transparent);
}

.workspace-role-student .card-header {
    gap: 0.6rem;
    padding: 0.75rem 0.85rem;
}

.workspace-role-student .card-header h2 {
    font-size: 0.92rem;
    font-weight: 750;
}

.workspace-role-student .workspace-command-hero {
    gap: 0.75rem;
    padding: 0.95rem 1rem;
}

.workspace-role-student .workspace-command-hero::before {
    height: 0.14rem;
    background: var(--primary);
}

.workspace-role-student .workspace-command-hero h2 {
    max-width: 52rem;
    margin-bottom: 0.2rem;
    font-size: 1.5rem;
    line-height: 1.15;
}

.workspace-role-student .workspace-command-hero p {
    max-width: 66rem;
    font-size: 0.82rem;
    line-height: 1.45;
}

.workspace-role-student .workspace-signal-grid,
.workspace-role-student .metric-grid {
    gap: 0.6rem;
}

.workspace-role-student .workspace-signal-card,
.workspace-role-student .metric-card {
    border-radius: 0.4rem;
    padding: 0.68rem 0.75rem;
}

.workspace-role-student .student-dashboard-metric {
    display: grid;
    gap: 0.1rem;
    color: inherit;
    text-decoration: none;
}

.workspace-role-student .student-dashboard-metric strong {
    color: var(--foreground);
    font-size: 1.05rem;
}

.workspace-role-student .student-dashboard-metric small {
    color: var(--muted-foreground);
    font-size: 0.73rem;
    line-height: 1.35;
}

.workspace-role-student .dashboard-next-grid {
    gap: 0.6rem;
    padding: 0.78rem;
}

.workspace-role-student .dashboard-next-card {
    min-height: 5.7rem;
    border-radius: 0.42rem;
    padding: 0.68rem;
}

.workspace-role-student .student-dashboard-toolkit .dashboard-next-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.workspace-role-student .workspace-notes-page > .grid-2,
.workspace-role-student .profile-grid,
.workspace-role-student .notification-grid {
    grid-template-columns: minmax(0, 1.35fr) minmax(18rem, 0.65fr);
    align-items: start;
    gap: 0.85rem;
}

.workspace-role-student .available-exam-grid {
    grid-template-columns: repeat(auto-fit, minmax(min(19rem, 100%), 1fr));
    gap: 0.75rem;
    padding: 0.85rem;
}

.workspace-role-student .exam-tile {
    align-content: start;
    min-height: 100%;
    border-radius: 0.42rem;
    padding: 0.75rem;
}

.workspace-role-student .exam-tile > form,
.workspace-role-student .exam-tile > .button {
    align-self: end;
    margin-top: auto;
}

.workspace-role-student .exam-tile > form .button,
.workspace-role-student .exam-tile > .button {
    width: 100%;
}

.workspace-role-student .attempt-meta {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.workspace-role-student .chart-grid-layout {
    gap: 0.85rem;
    margin-bottom: 0;
}

.workspace-role-student .chart-card__header,
.workspace-role-student .chart-summary,
.workspace-role-student .chart-data-fallback {
    margin-inline: 0;
}

.workspace-role-student .student-result-history-table th:first-child,
.workspace-role-student .student-result-history-table td:first-child {
    width: 42%;
}

.workspace-role-student .billing-main-grid {
    align-items: start;
}

@media (max-width: 1180px) {
    .workspace-role-student .workspace-frame {
        grid-template-columns: 14.5rem minmax(0, 1fr);
    }

    .workspace-role-student .workspace-notes-page > .grid-2,
    .workspace-role-student .profile-grid,
    .workspace-role-student .notification-grid {
        grid-template-columns: 1fr;
    }

    .workspace-role-student .student-dashboard-toolkit .dashboard-next-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 720px) {
    .workspace-role-student .workspace-frame {
        grid-template-columns: 1fr;
    }

    .workspace-role-student .workspace-content {
        padding: 0.65rem;
    }

    .workspace-role-student .workspace-command-hero {
        padding: 0.8rem;
    }

    .workspace-role-student .workspace-command-hero h2 {
        font-size: 1.25rem;
    }

    .workspace-role-student .workspace-signal-grid,
    .workspace-role-student .dashboard-metric-grid,
    .workspace-role-student .student-dashboard-toolkit .dashboard-next-grid,
    .workspace-role-student .available-exam-grid {
        grid-template-columns: 1fr;
    }

    .workspace-role-student .available-exam-grid {
        padding: 0.65rem;
    }

    .workspace-role-student .student-result-history-table th:first-child,
    .workspace-role-student .student-result-history-table td:first-child {
        width: auto;
    }
}

/* Shared labeled switch and contained mobile row-selection controls. */
.switch-control:not(.switch-control--labeled),
.check-field.switch-control:not(.switch-control--labeled),
.check-row.switch-control:not(.switch-control--labeled),
.admin-toggle-row .switch-control:not(.switch-control--labeled),
.admin-mini-toggle.switch-control:not(.switch-control--labeled),
.identity-switch-row .switch-control:not(.switch-control--labeled) {
    position: relative;
    display: inline-flex;
    gap: 0.7rem;
    align-items: center;
    justify-content: space-between;
    width: auto;
    min-width: min(12rem, 100%);
    height: auto;
    min-height: 2.45rem;
    border: 1px solid var(--border);
    border-radius: 0.5rem;
    background: var(--card);
    box-shadow: none;
    padding: 0.45rem 0.6rem;
    color: var(--foreground);
    font-size: 0.76rem;
    font-weight: 700;
    line-height: 1.25;
    white-space: normal;
}

.switch-control:not(.switch-control--labeled)::before {
    min-width: 0;
    content: attr(title);
    overflow-wrap: anywhere;
}

.switch-control--labeled,
.admin-mini-toggle.switch-control--labeled,
.identity-switch-row .switch-control--labeled {
    display: inline-flex;
    gap: 0.7rem;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    min-width: 0;
    height: auto;
    min-height: 2.45rem;
    border: 1px solid var(--border);
    border-radius: 0.5rem;
    background: var(--card);
    box-shadow: none;
    padding: 0.45rem 0.6rem;
    color: var(--foreground);
    font-size: 0.76rem;
    font-weight: 700;
    line-height: 1.25;
    white-space: normal;
}

.switch-control:not(.switch-control--labeled) .switch-control__icon {
    position: relative;
    display: inline-block;
    flex: 0 0 auto;
    width: 2.25rem;
    height: 1.25rem;
    border: 1px solid var(--border);
    border-radius: var(--radius-pill);
    background: color-mix(in srgb, var(--muted) 76%, var(--card));
    color: transparent;
    transition: background var(--motion-fast), border-color var(--motion-fast), box-shadow var(--motion-fast);
}

.switch-control:not(.switch-control--labeled) .switch-control__icon::after {
    position: absolute;
    top: 50%;
    left: 0.16rem;
    width: 0.86rem;
    height: 0.86rem;
    border-radius: var(--radius-pill);
    background: var(--muted-foreground);
    box-shadow: 0 1px 2px color-mix(in srgb, var(--foreground) 16%, transparent);
    content: "";
    transform: translateY(-50%);
    transition: transform var(--motion-fast), background var(--motion-fast);
}

.switch-control:not(.switch-control--labeled) .switch-control__icon-on,
.switch-control:not(.switch-control--labeled) .switch-control__icon-off {
    display: none;
}

.switch-control:not(.switch-control--labeled) > input[type="checkbox"]:checked + .switch-control__icon {
    border-color: color-mix(in srgb, var(--primary) 80%, var(--border));
    background: var(--primary);
}

.switch-control:not(.switch-control--labeled) > input[type="checkbox"]:checked + .switch-control__icon::after {
    background: var(--primary-foreground);
    transform: translate(1rem, -50%);
}

.switch-control:not(.switch-control--labeled) > input[type="checkbox"]:focus-visible + .switch-control__icon {
    outline: 2px solid var(--ring);
    outline-offset: 3px;
}

.switch-control--corner,
.check-field.switch-control.switch-control--corner,
.admin-mini-toggle.switch-control.switch-control--corner {
    position: static;
    inset: auto;
    z-index: auto;
    align-self: end;
    justify-self: start;
}

.notification-switch-grid,
.identity-switch-row {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.55rem;
}

.notification-switch-grid .switch-control,
.identity-switch-row .switch-control {
    width: 100%;
    min-width: 0;
}

@media (max-width: 820px) {
    .table-wrap .stacked-table td.table-select-cell,
    .admin-page .admin-table td.table-select-cell {
        top: 0.9rem;
        right: 1rem;
        width: 1.65rem;
        min-width: 1.65rem;
        max-width: 1.65rem;
        height: 1.65rem;
    }

    .table-wrap .stacked-table td.table-select-cell + td,
    .admin-page .admin-table td.table-select-cell + td {
        padding-right: 3.15rem;
    }

    .notification-switch-grid,
    .identity-switch-row {
        grid-template-columns: 1fr;
    }
}

/* Public profiles */
.public-profile-flash {
    width: min(76rem, calc(100% - 2rem));
    margin: 1rem auto 0;
}

.public-profile-page {
    min-width: 0;
    background: var(--background);
}

.public-profile-container {
    width: min(76rem, calc(100% - 2rem));
    margin-inline: auto;
}

.public-profile-identity {
    border-bottom: 1px solid var(--border);
    background: color-mix(in srgb, var(--card) 82%, var(--background));
}

.public-profile-breadcrumb {
    display: flex;
    gap: 0.5rem;
    align-items: center;
    min-height: 3.25rem;
    color: var(--muted-foreground);
    font-size: 0.78rem;
}

.public-profile-breadcrumb a {
    color: inherit;
    text-decoration: none;
}

.public-profile-breadcrumb a:hover,
.public-profile-breadcrumb a:focus-visible {
    color: var(--primary);
}

.public-profile-identity__grid {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    gap: 1.5rem;
    align-items: center;
    padding: 2.25rem 0 2.5rem;
}

.public-profile-avatar {
    display: grid;
    place-items: center;
    width: 7.5rem;
    aspect-ratio: 1;
    overflow: hidden;
    border: 1px solid color-mix(in srgb, var(--primary) 22%, var(--border));
    border-radius: 50%;
    background: var(--secondary);
    color: var(--primary);
    font-size: 1.65rem;
    font-weight: 800;
}

.public-profile-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.public-profile-identity__copy {
    min-width: 0;
}

.public-profile-kicker-row,
.public-profile-meta,
.public-profile-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
}

.public-profile-kicker-row {
    gap: 0.75rem;
    margin-bottom: 0.55rem;
}

.public-profile-kicker {
    color: var(--primary);
    font-size: 0.72rem;
    font-weight: 800;
    text-transform: uppercase;
}

.public-profile-verified {
    display: inline-flex;
    gap: 0.35rem;
    align-items: center;
    color: var(--success);
    font-size: 0.76rem;
    font-weight: 750;
}

.public-profile-verified svg,
.public-profile-meta svg,
.public-profile-actions svg,
.public-profile-link-list svg,
.public-profile-highlight svg {
    flex: 0 0 auto;
    width: 1rem;
    height: 1rem;
}

.public-profile-identity h1 {
    max-width: 24ch;
    margin: 0;
    color: var(--foreground);
    font-size: 2.4rem;
    font-weight: 720;
    line-height: 1.08;
}

.public-profile-headline {
    max-width: 62ch;
    margin: 0.55rem 0 0;
    color: var(--muted-foreground);
    font-size: 1.02rem;
    line-height: 1.55;
}

.public-profile-meta {
    gap: 0.55rem 1rem;
    margin-top: 1rem;
    color: var(--muted-foreground);
    font-size: 0.8rem;
}

.public-profile-meta span {
    display: inline-flex;
    gap: 0.38rem;
    align-items: center;
}

.public-profile-meta .is-availability i {
    width: 0.48rem;
    height: 0.48rem;
    border-radius: 50%;
    background: var(--success);
    box-shadow: 0 0 0 0.18rem color-mix(in srgb, var(--success) 14%, transparent);
}

.public-profile-actions {
    max-width: 22rem;
    gap: 0.5rem;
    justify-content: flex-end;
}

.public-profile-actions form {
    margin: 0;
}

.public-profile-actions .button {
    min-height: 2.5rem;
}

.public-profile-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(18rem, 21rem);
    gap: 3.5rem;
    align-items: start;
    padding-block: 2.5rem 4rem;
}

.public-profile-main,
.public-profile-aside {
    min-width: 0;
}

.public-profile-main {
    display: grid;
    gap: 0;
}

.public-profile-section {
    display: grid;
    grid-template-columns: minmax(9.5rem, 0.26fr) minmax(0, 1fr);
    gap: 1.75rem;
    padding: 2rem 0;
    border-top: 1px solid var(--border);
}

.public-profile-section:first-child {
    padding-top: 0;
    border-top: 0;
}

.public-profile-section__heading {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    gap: 0.3rem 0.6rem;
    align-content: start;
}

.public-profile-section__heading > span {
    color: var(--primary);
    font-size: 0.7rem;
    font-weight: 800;
}

.public-profile-section__heading h2 {
    margin: 0;
    font-size: 1rem;
    line-height: 1.3;
}

.public-profile-section__heading small {
    grid-column: 2;
    color: var(--muted-foreground);
    font-size: 0.72rem;
}

.public-profile-prose {
    display: grid;
    gap: 1.25rem;
}

.public-profile-prose > p {
    max-width: 68ch;
    margin: 0;
    color: var(--foreground);
    font-size: 0.98rem;
    line-height: 1.75;
}

.public-profile-focus {
    display: grid;
    gap: 0.25rem;
    padding-left: 1rem;
    border-left: 0.2rem solid var(--primary);
}

.public-profile-focus span {
    color: var(--muted-foreground);
    font-size: 0.72rem;
    font-weight: 750;
    text-transform: uppercase;
}

.public-profile-focus strong {
    font-size: 0.92rem;
    line-height: 1.5;
}

.public-profile-highlight-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.75rem;
}

.public-profile-highlight {
    display: grid;
    align-content: start;
    gap: 0.65rem;
    min-width: 0;
    border: 1px solid var(--border);
    border-radius: 0.45rem;
    background: var(--card);
    padding: 1rem;
    transition: border-color var(--motion-fast), box-shadow var(--motion-fast);
}

.public-profile-highlight:hover {
    border-color: color-mix(in srgb, var(--primary) 28%, var(--border));
    box-shadow: var(--shadow-soft);
}

.public-profile-highlight__icon {
    display: grid;
    place-items: center;
    width: 2rem;
    height: 2rem;
    border: 1px solid color-mix(in srgb, var(--primary) 20%, var(--border));
    border-radius: 50%;
    background: color-mix(in srgb, var(--primary) 8%, var(--card));
    color: var(--primary);
}

.public-profile-highlight h3,
.public-profile-exam h3 {
    margin: 0;
    font-size: 0.94rem;
    line-height: 1.35;
}

.public-profile-highlight p,
.public-profile-exam p {
    margin: 0;
    color: var(--muted-foreground);
    font-size: 0.8rem;
    line-height: 1.55;
}

.public-profile-highlight a {
    display: inline-flex;
    gap: 0.35rem;
    align-items: center;
    width: fit-content;
    margin-top: auto;
    color: var(--primary);
    font-size: 0.76rem;
    font-weight: 750;
    text-decoration: none;
}

.public-profile-skill-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin: 0;
    padding: 0;
    list-style: none;
}

.public-profile-skill-list li {
    border: 1px solid var(--border);
    border-radius: 999px;
    background: color-mix(in srgb, var(--secondary) 72%, var(--card));
    padding: 0.4rem 0.65rem;
    color: var(--foreground);
    font-size: 0.76rem;
    font-weight: 650;
}

.public-profile-exam-list {
    display: grid;
    gap: 0.75rem;
}

.public-profile-exam {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 1rem;
    border: 1px solid var(--border);
    border-radius: 0.45rem;
    background: var(--card);
    padding: 1rem;
}

.public-profile-exam__label {
    display: block;
    margin-bottom: 0.35rem;
    color: var(--primary);
    font-size: 0.68rem;
    font-weight: 800;
    text-transform: uppercase;
}

.public-profile-exam dl {
    display: flex;
    gap: 1rem;
    align-self: center;
    margin: 0;
}

.public-profile-exam dl div {
    display: grid;
    gap: 0.15rem;
    min-width: 3.5rem;
}

.public-profile-exam dt {
    color: var(--muted-foreground);
    font-size: 0.65rem;
}

.public-profile-exam dd {
    margin: 0;
    font-size: 0.82rem;
    font-weight: 750;
}

.public-profile-exam__action {
    display: flex;
    grid-column: 1 / -1;
    align-items: center;
    justify-content: flex-end;
    min-height: 2rem;
    padding-top: 0.75rem;
    border-top: 1px solid var(--border);
}

.public-profile-exam__action > span {
    color: var(--muted-foreground);
    font-size: 0.72rem;
}

.public-profile-empty {
    border: 1px dashed var(--border);
    border-radius: 0.45rem;
    color: var(--muted-foreground);
    padding: 1.25rem;
    font-size: 0.84rem;
    text-align: center;
}

.public-profile-aside {
    position: sticky;
    top: 5.25rem;
    display: grid;
    gap: 0.85rem;
}

.public-profile-fact-panel {
    border: 1px solid var(--border);
    border-radius: 0.45rem;
    background: var(--card);
    padding: 1rem;
}

.public-profile-fact-panel h2 {
    margin: 0 0 0.85rem;
    font-size: 0.84rem;
}

.public-profile-stat-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.5rem;
}

.public-profile-stat-grid div {
    display: grid;
    gap: 0.2rem;
    min-width: 0;
}

.public-profile-stat-grid strong {
    font-size: 1.1rem;
}

.public-profile-stat-grid span {
    color: var(--muted-foreground);
    font-size: 0.64rem;
    line-height: 1.3;
}

.public-profile-link-list {
    display: grid;
}

.public-profile-link-list a {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    gap: 0.6rem;
    align-items: center;
    min-height: 2.65rem;
    border-top: 1px solid var(--border);
    color: var(--foreground);
    font-size: 0.78rem;
    font-weight: 700;
    text-decoration: none;
}

.public-profile-link-list a:first-child {
    border-top: 0;
}

.public-profile-link-list a:hover,
.public-profile-link-list a:focus-visible {
    color: var(--primary);
}

.public-profile-link-list a > svg:last-child {
    width: 0.85rem;
    height: 0.85rem;
}

.public-profile-trust-panel {
    background: color-mix(in srgb, var(--secondary) 62%, var(--card));
}

.public-profile-trust-panel p {
    margin: 0;
    color: var(--muted-foreground);
    font-size: 0.76rem;
    line-height: 1.55;
}

.public-profile-directory {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(20rem, 0.7fr);
    gap: 3rem;
    align-items: end;
    min-height: 28rem;
    padding-block: 4.5rem;
}

.public-profile-directory__intro h1 {
    max-width: 18ch;
    margin: 0.6rem 0 0;
    font-size: 2.35rem;
    font-weight: 720;
    line-height: 1.1;
}

.public-profile-directory__intro p {
    max-width: 58ch;
    margin: 1rem 0 0;
    color: var(--muted-foreground);
    line-height: 1.7;
}

.public-profile-search {
    display: grid;
    gap: 0.55rem;
}

.public-profile-search > label {
    font-size: 0.78rem;
    font-weight: 750;
}

.public-profile-search > div {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    gap: 0.5rem;
    align-items: center;
    border: 1px solid var(--input);
    border-radius: 0.45rem;
    background: var(--card);
    padding: 0.35rem;
}

.public-profile-search > div > span {
    display: grid;
    place-items: center;
    width: 2rem;
    color: var(--muted-foreground);
}

.public-profile-search svg {
    width: 1rem;
    height: 1rem;
}

.public-profile-search input {
    min-width: 0;
    min-height: 2.6rem;
    border: 0;
    background: transparent;
    color: var(--foreground);
    font: inherit;
    outline: 0;
}

.public-profile-directory__footer {
    display: flex;
    grid-column: 1 / -1;
    gap: 0.4rem;
    align-items: center;
    padding-top: 1rem;
    border-top: 1px solid var(--border);
    color: var(--muted-foreground);
    font-size: 0.78rem;
}

.public-profile-directory__footer a {
    color: var(--primary);
    font-weight: 750;
}

/* Profile editor */
.profile-editor-page {
    gap: 1rem;
}

.profile-editor-header {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    gap: 1rem;
    align-items: center;
    border-bottom: 1px solid var(--border);
    padding: 0.25rem 0 1rem;
}

.profile-editor-avatar {
    width: 4rem;
    height: 4rem;
}

.profile-editor-header__copy h1 {
    margin: 0.15rem 0 0;
    font-size: 1.35rem;
    line-height: 1.2;
}

.profile-editor-header__copy p {
    margin: 0.3rem 0 0;
    color: var(--muted-foreground);
    font-size: 0.82rem;
}

.profile-editor-header__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    justify-content: flex-end;
}

.profile-editor-header__actions svg,
.profile-editor-tabs svg {
    width: 1rem;
    height: 1rem;
}

.profile-editor-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(17rem, 20rem);
    gap: 1rem;
    align-items: start;
}

.profile-editor-layout > * {
    min-width: 0;
}

.profile-editor-card {
    overflow: clip;
}

.profile-editor-tabs {
    padding-top: 0;
}

.profile-editor-panels {
    min-height: 28rem;
}

.profile-editor-panel {
    gap: 1rem;
    padding: 1rem;
}

.profile-editor-panel__intro {
    padding-bottom: 0.85rem;
    border-bottom: 1px solid var(--border);
}

.profile-editor-panel__intro h2,
.profile-editor-panel__intro p {
    margin: 0;
}

.profile-editor-panel__intro h2 {
    font-size: 1rem;
}

.profile-editor-panel__intro p {
    margin-top: 0.3rem;
    color: var(--muted-foreground);
    font-size: 0.78rem;
    line-height: 1.5;
}

.profile-editor-panel .field > small.muted {
    color: var(--muted-foreground);
}

.profile-highlight-editor-list {
    display: grid;
    gap: 0.75rem;
}

.profile-highlight-editor {
    display: grid;
    grid-template-columns: minmax(0, 0.7fr) minmax(0, 1.3fr);
    gap: 0.75rem;
    min-width: 0;
    margin: 0;
    border: 1px solid var(--border);
    border-radius: 0.45rem;
    padding: 1rem;
}

.profile-highlight-editor legend {
    padding: 0 0.35rem;
    color: var(--muted-foreground);
    font-size: 0.72rem;
    font-weight: 800;
    text-transform: uppercase;
}

.profile-highlight-editor .field:nth-of-type(3) {
    grid-column: 1 / -1;
}

.profile-publish-field {
    max-width: 28rem;
}

.profile-visibility-list {
    display: grid;
    border: 1px solid var(--border);
    border-radius: 0.45rem;
}

.profile-visibility-option {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 1rem;
    align-items: center;
    min-height: 4.2rem;
    padding: 0.75rem 0.9rem;
    border-top: 1px solid var(--border);
}

.profile-visibility-option:first-child {
    border-top: 0;
}

.profile-visibility-option > div {
    display: grid;
    gap: 0.15rem;
}

.profile-visibility-option strong {
    font-size: 0.82rem;
}

.profile-visibility-option > div span {
    color: var(--muted-foreground);
    font-size: 0.72rem;
    line-height: 1.4;
}

.profile-visibility-option .switch-control {
    min-height: 2rem;
    border: 0;
    padding: 0;
}

.profile-editor-savebar {
    position: sticky;
    bottom: 0;
    z-index: 3;
    display: flex;
    gap: 1rem;
    align-items: center;
    justify-content: space-between;
    border-top: 1px solid var(--border);
    background: color-mix(in srgb, var(--card) 94%, transparent);
    padding: 0.75rem 1rem;
    backdrop-filter: blur(0.6rem);
}

.profile-editor-savebar span {
    color: var(--muted-foreground);
    font-size: 0.72rem;
}

.profile-editor-aside {
    display: grid;
    gap: 1rem;
}

.profile-editor-summary {
    overflow: hidden;
}

.profile-completion-track {
    display: block;
    width: calc(100% - 2rem);
    height: 0.45rem;
    margin: 0.25rem 1rem 0;
    overflow: hidden;
    border: 0;
    border-radius: 999px;
    background: var(--secondary);
}

.profile-completion-track::-webkit-progress-bar {
    border-radius: 999px;
    background: var(--secondary);
}

.profile-completion-track::-webkit-progress-value,
.profile-completion-track::-moz-progress-bar {
    border-radius: 999px;
    background: var(--primary);
}

.profile-readiness-list {
    display: grid;
    gap: 0.5rem;
    margin: 0;
    padding: 1rem;
    list-style: none;
}

.profile-readiness-list li {
    position: relative;
    padding-left: 1.35rem;
    color: var(--muted-foreground);
    font-size: 0.75rem;
}

.profile-readiness-list li::before {
    position: absolute;
    top: 0.22rem;
    left: 0;
    width: 0.65rem;
    height: 0.65rem;
    border: 1px solid var(--border);
    border-radius: 50%;
    content: "";
}

.profile-readiness-list li.is-complete {
    color: var(--foreground);
}

.profile-readiness-list li.is-complete::before {
    border-color: var(--success);
    background: var(--success);
    box-shadow: inset 0 0 0 0.14rem var(--card);
}

.profile-url-preview {
    display: grid;
    gap: 0.3rem;
    margin: 0 1rem 1rem;
    border-top: 1px solid var(--border);
    padding-top: 0.75rem;
}

.profile-url-preview span {
    color: var(--muted-foreground);
    font-size: 0.68rem;
    font-weight: 750;
    text-transform: uppercase;
}

.profile-url-preview code {
    overflow: hidden;
    color: var(--foreground);
    font-size: 0.72rem;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.profile-editor-metrics {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.75rem;
    padding: 1rem;
}

.profile-editor-metrics div {
    display: grid;
    gap: 0.15rem;
}

.profile-editor-metrics strong {
    font-size: 1.25rem;
}

.profile-editor-metrics span {
    color: var(--muted-foreground);
    font-size: 0.7rem;
}

.profile-editor-summary > .muted {
    margin: 0;
    padding: 0 1rem 1rem;
}

@media (max-width: 1024px) {
    .public-profile-identity__grid {
        grid-template-columns: auto minmax(0, 1fr);
    }

    .public-profile-actions {
        grid-column: 2;
        max-width: none;
        justify-content: flex-start;
    }

    .public-profile-layout {
        grid-template-columns: minmax(0, 1fr) minmax(16rem, 18rem);
        gap: 2rem;
    }

    .profile-editor-layout {
        grid-template-columns: minmax(0, 1fr) 17rem;
    }
}

@media (max-width: 820px) {
    .public-profile-container {
        width: min(100% - 1.5rem, 76rem);
    }

    .public-profile-identity__grid,
    .public-profile-layout,
    .public-profile-directory,
    .profile-editor-header,
    .profile-editor-layout {
        grid-template-columns: 1fr;
    }

    .public-profile-avatar {
        width: 6rem;
    }

    .public-profile-actions,
    .profile-editor-header__actions {
        grid-column: auto;
        justify-content: flex-start;
    }

    .public-profile-aside {
        position: static;
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .public-profile-directory {
        gap: 2rem;
        min-height: auto;
        padding-block: 3rem;
    }

    .profile-editor-aside {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 600px) {
    .public-profile-identity__grid {
        gap: 1rem;
        padding: 1.25rem 0 1.5rem;
    }

    .public-profile-identity h1,
    .public-profile-directory__intro h1 {
        font-size: 1.85rem;
    }

    .public-profile-actions,
    .public-profile-actions form,
    .public-profile-actions .button {
        width: 100%;
    }

    .public-profile-layout {
        gap: 1.5rem;
        padding-block: 1.5rem 2.5rem;
    }

    .public-profile-section {
        grid-template-columns: 1fr;
        gap: 1rem;
        padding: 1.5rem 0;
    }

    .public-profile-section__heading {
        grid-template-columns: auto minmax(0, 1fr) auto;
    }

    .public-profile-section__heading small {
        grid-column: auto;
    }

    .public-profile-highlight-grid,
    .public-profile-aside,
    .profile-editor-aside,
    .profile-highlight-editor {
        grid-template-columns: 1fr;
    }

    .public-profile-exam {
        grid-template-columns: 1fr;
    }

    .public-profile-exam dl {
        justify-content: space-between;
    }

    .public-profile-search > div {
        grid-template-columns: auto minmax(0, 1fr);
    }

    .public-profile-search .button {
        grid-column: 1 / -1;
        width: 100%;
    }

    .public-profile-directory__footer {
        align-items: flex-start;
        flex-direction: column;
    }

    .profile-editor-header {
        align-items: start;
    }

    .profile-editor-header__actions,
    .profile-editor-header__actions .button {
        width: 100%;
    }

    .profile-editor-tabs {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 0;
        overflow: visible;
        padding: 0;
    }

    .profile-editor-tabs button {
        width: 100%;
        min-width: 0;
        justify-content: center;
        padding-inline: 0.5rem;
        white-space: normal;
    }

    .profile-highlight-editor .field:nth-of-type(3) {
        grid-column: auto;
    }

    .profile-editor-savebar {
        align-items: stretch;
        flex-direction: column;
    }

    .profile-editor-savebar .button {
        width: 100%;
    }
}

/* Identity Center and Secure ID operations */
.identity-center-page,
.identity-operations-page {
    display: grid;
    gap: 1rem;
}

.identity-center-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
    padding-block: 0.15rem;
}

.identity-center-header h1,
.identity-operations-page .admin-module-header h1 {
    margin: 0.15rem 0 0.25rem;
    font-size: clamp(1.55rem, 2vw, 2rem);
    line-height: 1.18;
    letter-spacing: 0;
}

.identity-center-header p {
    max-width: 48rem;
    margin: 0;
    color: var(--muted-foreground);
}

.identity-progress {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0;
    margin: 0;
    padding: 0;
    overflow: hidden;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--card);
    box-shadow: var(--shadow);
    list-style: none;
}

.identity-progress li {
    position: relative;
    display: grid;
    grid-template-columns: 2rem minmax(0, 1fr);
    align-items: center;
    gap: 0.7rem;
    min-height: 4.7rem;
    padding: 0.85rem 1rem;
}

.identity-progress li + li {
    border-left: 1px solid var(--border);
}

.identity-progress li > span {
    display: grid;
    place-items: center;
    width: 2rem;
    height: 2rem;
    border: 1px solid var(--input);
    border-radius: 50%;
    color: var(--muted-foreground);
    font-weight: 750;
}

.identity-progress li[data-state="complete"] > span {
    border-color: var(--success);
    background: var(--success-bg);
    color: var(--success);
}

.identity-progress li[data-state="current"] {
    background: color-mix(in srgb, var(--accent) 58%, var(--card));
}

.identity-progress li[data-state="current"] > span {
    border-color: var(--primary);
    background: var(--primary);
    color: var(--primary-foreground);
}

.identity-progress strong,
.identity-progress small {
    display: block;
}

.identity-progress strong {
    font-size: 0.88rem;
}

.identity-progress small {
    margin-top: 0.12rem;
    color: var(--muted-foreground);
    font-size: 0.76rem;
}

.identity-center-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.45fr) minmax(17.5rem, 0.72fr);
    align-items: start;
    gap: 1rem;
}

.identity-center-main,
.identity-center-aside {
    display: grid;
    min-width: 0;
    gap: 1rem;
}

.identity-center-page .card,
.identity-operations-page .card {
    min-width: 0;
}

.identity-state-card--verified {
    border-color: color-mix(in srgb, var(--success) 45%, var(--border));
}

.identity-consent-card .card-header {
    flex-wrap: wrap;
}

.identity-consent-card .card-header > div {
    min-width: min(100%, 19rem);
}

.identity-consent-card .card-header > .badge {
    max-width: 100%;
    white-space: normal;
    text-align: center;
    overflow-wrap: anywhere;
}

.identity-summary-list,
.identity-data-list,
.identity-provider-facts {
    display: grid;
    gap: 0;
    margin: 0;
}

.identity-summary-list {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    border-top: 1px solid var(--border);
}

.identity-summary-list div,
.identity-data-list div,
.identity-provider-facts div {
    min-width: 0;
    padding: 0.85rem 1rem;
}

.identity-summary-list div + div {
    padding-left: 1rem;
    border-left: 1px solid var(--border);
}

.identity-summary-list dt,
.identity-data-list dt,
.identity-provider-facts dt {
    margin-bottom: 0.2rem;
    color: var(--muted-foreground);
    font-size: 0.73rem;
    font-weight: 750;
    text-transform: uppercase;
}

.identity-summary-list dd,
.identity-data-list dd,
.identity-provider-facts dd {
    min-width: 0;
    margin: 0;
    overflow-wrap: anywhere;
    font-weight: 650;
}

.identity-choice-group {
    min-width: 0;
    margin: 0;
    padding: 0;
    border: 0;
}

.identity-choice-group legend {
    margin-bottom: 0.55rem;
    font-weight: 750;
}

.identity-choice-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.65rem;
}

.identity-choice {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    align-items: start;
    gap: 0.65rem;
    min-height: 4.65rem;
    padding: 0.8rem;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--card);
    cursor: pointer;
    transition: border-color var(--motion-fast), background var(--motion-fast);
}

.identity-choice:hover,
.identity-choice:has(input:checked) {
    border-color: var(--primary);
    background: color-mix(in srgb, var(--accent) 55%, var(--card));
}

.identity-choice input {
    width: 1rem;
    height: 1rem;
    margin: 0.15rem 0 0;
    accent-color: var(--primary);
}

.identity-choice strong,
.identity-choice small {
    display: block;
}

.identity-choice small {
    margin-top: 0.15rem;
    color: var(--muted-foreground);
}

.identity-capacity-confirmations {
    display: grid;
    gap: 0.45rem;
}

.identity-capacity-confirmation {
    display: grid;
    gap: 0.3rem;
}

.identity-consent-form:has(input[name="consent_capacity"][value="self"]:checked) .identity-capacity-confirmation--guardian,
.identity-consent-form:has(input[name="consent_capacity"][value="guardian"]:checked) .identity-capacity-confirmation--self {
    display: none;
}

.identity-consent-check {
    align-items: flex-start;
    gap: 0.65rem;
    margin: 0;
    padding: 0.7rem 0.8rem;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--card);
}

.identity-consent-check input {
    flex: 0 0 auto;
    width: 1rem;
    height: 1rem;
    margin: 0.14rem 0 0;
    accent-color: var(--primary);
}

.identity-consent-check--primary {
    border-color: color-mix(in srgb, var(--primary) 45%, var(--border));
    background: color-mix(in srgb, var(--accent) 58%, var(--card));
    font-weight: 650;
}

.identity-notice {
    padding: 0.9rem 1rem;
    border-left: 3px solid var(--primary);
    background: var(--muted);
}

.identity-notice h3,
.identity-notice p {
    margin-top: 0;
}

.identity-notice h3 {
    margin-bottom: 0.4rem;
    font-size: 0.95rem;
}

.identity-notice p {
    margin-bottom: 0.55rem;
}

.identity-notice ul {
    display: grid;
    gap: 0.35rem;
    margin: 0;
    padding-left: 1.1rem;
    color: var(--muted-foreground);
}

.identity-form-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.55rem;
}

.identity-alternative-card {
    padding: 0;
    overflow: hidden;
}

.identity-alternative-card summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 4.25rem;
    padding: 0.9rem 1rem;
    cursor: pointer;
    list-style-position: inside;
}

.identity-alternative-card summary strong,
.identity-alternative-card summary small {
    display: block;
}

.identity-alternative-card summary small {
    margin-top: 0.15rem;
    color: var(--muted-foreground);
}

.identity-alternative-card[open] summary {
    border-bottom: 1px solid var(--border);
}

.identity-alternative-card > form {
    padding: 1rem;
}

.identity-control-card > form {
    padding: 1rem;
}

.identity-data-list div,
.identity-provider-facts div {
    display: grid;
    grid-template-columns: minmax(7rem, 0.42fr) minmax(0, 1fr);
    gap: 0.75rem;
    border-top: 1px solid var(--border);
}

.identity-gate-list,
.identity-policy-list {
    display: grid;
    gap: 0.55rem;
}

.identity-gate-list div {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 0.75rem;
    padding: 0.7rem 1rem;
    border-top: 1px solid var(--border);
}

.identity-gate-list span {
    color: var(--muted-foreground);
}

.identity-gate-list strong {
    text-align: right;
}

.identity-operations-metrics {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.identity-operations-metrics .metric-card small {
    display: block;
    color: var(--muted-foreground);
}

.identity-operations-table {
    min-width: 66rem;
    table-layout: fixed;
}

.identity-operations-table th:nth-child(1) { width: 21%; }
.identity-operations-table th:nth-child(2) { width: 27%; }
.identity-operations-table th:nth-child(3) { width: 17%; }
.identity-operations-table th:nth-child(4) { width: 35%; }

.identity-operations-table td {
    vertical-align: top;
}

.identity-review-reason {
    max-width: 34rem;
    margin: 0.45rem 0 0;
    overflow-wrap: anywhere;
}

.identity-review-decision,
.identity-approve-form,
.identity-reject-form {
    display: grid;
    gap: 0.55rem;
    min-width: 0;
}

.identity-review-decision {
    grid-template-columns: minmax(11rem, 0.75fr) minmax(13rem, 1fr);
    align-items: end;
}

.identity-evidence-check {
    align-items: flex-start;
    min-height: 2.45rem;
    margin: 0;
    padding: 0.45rem 0.55rem;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    background: var(--muted);
}

.identity-evidence-check input {
    flex: 0 0 auto;
    width: 1rem;
    height: 1rem;
    margin-top: 0.12rem;
    accent-color: var(--primary);
}

.identity-provider-layout {
    display: grid;
    grid-template-columns: minmax(18rem, 0.75fr) minmax(0, 1.25fr);
    align-items: start;
    gap: 1rem;
}

.identity-provider-form-grid {
    grid-template-columns: minmax(12rem, 0.7fr) minmax(16rem, 1fr);
}

.identity-provider-toggle {
    min-width: 0;
    margin: 0;
}

.identity-policy-list .profile-visibility-option {
    margin: 0;
}

.identity-provider-fallback {
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--muted);
}

.identity-provider-fallback summary {
    padding: 0.75rem 0.85rem;
    cursor: pointer;
    font-weight: 750;
}

.identity-provider-fallback[open] summary {
    border-bottom: 1px solid var(--border);
}

.identity-provider-fallback > p,
.identity-provider-fallback > .form-grid,
.identity-provider-fallback > .field {
    margin-right: 0.85rem;
    margin-left: 0.85rem;
}

.identity-provider-fallback > p {
    color: var(--muted-foreground);
}

.identity-provider-fallback > .field {
    margin-bottom: 0.85rem;
}

@media (max-width: 1100px) {
    .identity-center-grid,
    .identity-provider-layout {
        grid-template-columns: 1fr;
    }

    .identity-center-aside {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .identity-center-aside .identity-control-card:last-child:nth-child(odd) {
        grid-column: 1 / -1;
    }
}

@media (max-width: 760px) {
    .identity-center-header,
    .identity-operations-page .admin-module-header {
        align-items: flex-start;
        flex-direction: column;
    }

    .identity-progress {
        grid-template-columns: 1fr;
    }

    .identity-progress li + li {
        border-top: 1px solid var(--border);
        border-left: 0;
    }

    .identity-choice-grid,
    .identity-summary-list,
    .identity-center-aside,
    .identity-operations-metrics,
    .identity-provider-form-grid {
        grid-template-columns: 1fr;
    }

    .identity-summary-list div + div {
        padding-left: 1rem;
        border-top: 1px solid var(--border);
        border-left: 0;
    }

    .identity-form-actions,
    .identity-form-actions .button,
    .identity-operations-page .admin-module-actions,
    .identity-operations-page .admin-module-actions .button,
    .identity-operations-page .admin-module-actions form {
        width: 100%;
    }

    .identity-data-list div,
    .identity-provider-facts div {
        grid-template-columns: 1fr;
        gap: 0.2rem;
    }

    .identity-center-aside .identity-control-card:last-child:nth-child(odd) {
        grid-column: auto;
    }

    .identity-operations-table {
        min-width: 0;
    }

    .identity-review-decision {
        grid-template-columns: 1fr;
    }
}

/* Registration access radios opt out of the shared text-input geometry. */
.auth-reference .auth-access-option input[type="radio"],
.auth-reference .auth-access-option input[type="radio"]:hover,
.auth-reference .auth-access-option input[type="radio"]:focus,
.auth-reference .auth-access-option input[type="radio"]:focus-visible {
    width: 1.05rem;
    height: 1.05rem;
    min-height: 1.05rem;
    border: initial;
    border-radius: 50%;
    background: initial;
    padding: 0;
    box-shadow: none;
    outline-offset: 2px;
    appearance: auto;
    accent-color: var(--primary);
}

@media print {
    .topbar,
    .workspace-sidebar,
    .workspace-header,
    .public-site-footer,
    .toast-region,
    .page-progress,
    .cookie-consent-banner,
    .command-palette,
    .notes-drawer,
    .notes-drawer-overlay,
    .confirmation-dialog,
    .certificate-card-actions,
    .action-row,
    .button {
        display: none !important;
    }

    body,
    .public-body,
    .workspace-body {
        background: #fff !important;
        color: #000 !important;
    }

    .app-shell,
    .workspace-frame,
    .workspace-main,
    .workspace-content,
    .public-main {
        display: block !important;
        width: auto !important;
        max-width: none !important;
        min-height: auto !important;
        padding: 0 !important;
        margin: 0 !important;
        background: #fff !important;
    }

    .card,
    .certificate-card,
    .invoice-card,
    .report-card,
    .result-detail-card {
        border-color: #bbb !important;
        box-shadow: none !important;
        break-inside: avoid;
    }

    a[href]::after {
        content: "";
    }
}

/* Shared progressive-AJAX states. PHP remains the source of updated markup. */
[data-ajax-fragment] {
    position: relative;
}

[data-ajax-fragment][aria-busy="true"],
form[data-ajax-busy="true"] {
    cursor: progress;
}

[data-ajax-fragment][data-ajax-loading="true"]::before {
    position: absolute;
    z-index: 8;
    top: 0;
    left: 0;
    width: 30%;
    height: 3px;
    border-radius: 2px;
    background: var(--primary);
    content: "";
    pointer-events: none;
    animation: evalat-ajax-progress 1.1s ease-in-out infinite;
}

@keyframes evalat-ajax-progress {
    0% {
        transform: translateX(0);
    }

    50% {
        transform: translateX(120%);
    }

    100% {
        transform: translateX(230%);
    }
}

@media (prefers-reduced-motion: reduce) {
    [data-ajax-fragment][data-ajax-loading="true"]::before {
        width: 100%;
        animation: none;
    }
}

form[data-ajax-busy="true"] button[type="submit"],
form[data-ajax-busy="true"] input[type="submit"] {
    cursor: wait;
}

form[data-ajax-busy="true"] button[type="submit"]::after {
    width: 0.85rem;
    height: 0.85rem;
    margin-left: 0.5rem;
    border: 2px solid currentColor;
    border-right-color: transparent;
    border-radius: 50%;
    content: "";
    display: inline-block;
    vertical-align: -0.12rem;
    animation: spin 0.7s linear infinite;
}

.field-error[data-ajax-field-error] {
    display: block;
    color: var(--danger);
    font-size: 0.82rem;
    font-weight: 650;
}

.ajax-upload-progress {
    width: 100%;
    height: 0.45rem;
    margin-top: 0.75rem;
    accent-color: var(--primary);
}

@media (max-width: 1100px) {
    .email-settings-layout {
        grid-template-columns: 1fr;
    }

    .email-test-column {
        position: static;
    }
}

@media (max-width: 720px) {
    .email-provider-status,
    .email-smtp-grid {
        grid-template-columns: 1fr;
    }

    .email-provider-form,
    .email-test-column > .card,
    .email-deliveries-page > .card {
        padding: var(--space-4);
    }
}
