:root {
    color-scheme: light;
    --background: #f8fafc;
    --background-muted: #f1f5f9;
    --surface: #ffffff;
    --surface-muted: #f8fafc;
    --sidebar: #ffffff;
    --text: #0f172a;
    --muted: #64748b;
    --line: #e2e8f0;
    --line-strong: #cbd5e1;
    --primary: #111827;
    --primary-strong: #020617;
    --primary-foreground: #ffffff;
    --brand: #d97706;
    --brand-soft: #ffedd5;
    --plus: #2563eb;
    --plus-soft: rgba(37, 99, 235, 0.12);
    --pro: #d97706;
    --pro-soft: rgba(217, 119, 6, 0.14);
    --success: #16a34a;
    --success-soft: rgba(22, 163, 74, 0.1);
    --warning: #d97706;
    --warning-soft: rgba(217, 119, 6, 0.12);
    --error: #dc2626;
    --error-soft: rgba(220, 38, 38, 0.12);
    --shadow-sm: 0 2px 6px rgba(15, 23, 42, 0.04);
    --shadow-md: 0 10px 30px rgba(15, 23, 42, 0.08);
    --shadow-lg: 0 24px 60px rgba(15, 23, 42, 0.12);
    --radius-xl: 28px;
    --radius-lg: 20px;
    --radius-md: 16px;
    --radius-sm: 12px;
    --font-ui: "Inter", "Segoe UI", "Helvetica Neue", Arial, sans-serif;
}

html[data-theme="dark"] {
    color-scheme: dark;
    --background: #020617;
    --background-muted: #0f172a;
    --surface: #0f172a;
    --surface-muted: #111c31;
    --sidebar: #020617;
    --text: #e2e8f0;
    --muted: #94a3b8;
    --line: #1e293b;
    --line-strong: #334155;
    --primary: #e2e8f0;
    --primary-strong: #ffffff;
    --primary-foreground: #020617;
    --brand: #fb923c;
    --brand-soft: rgba(251, 146, 60, 0.12);
    --plus: #60a5fa;
    --plus-soft: rgba(96, 165, 250, 0.16);
    --pro: #fbbf24;
    --pro-soft: rgba(251, 191, 36, 0.16);
    --success: #4ade80;
    --success-soft: rgba(74, 222, 128, 0.14);
    --warning: #fbbf24;
    --warning-soft: rgba(251, 191, 36, 0.15);
    --error: #f87171;
    --error-soft: rgba(248, 113, 113, 0.16);
    --shadow-sm: 0 2px 6px rgba(2, 6, 23, 0.38);
    --shadow-md: 0 14px 36px rgba(2, 6, 23, 0.44);
    --shadow-lg: 0 24px 70px rgba(2, 6, 23, 0.55);
}

* {
    box-sizing: border-box;
}

[hidden] {
    display: none !important;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    min-height: 100vh;
    background: var(--background);
    color: var(--text);
    font-family: var(--font-ui);
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}

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

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

form {
    margin: 0;
}

svg {
    display: block;
    width: 100%;
    height: 100%;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
}

code {
    padding: 3px 8px;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: var(--surface-muted);
    color: var(--text);
    font-size: 0.92em;
}

h1,
h2,
h3 {
    margin: 0;
    letter-spacing: -0.03em;
    line-height: 1.05;
}

h1 {
    font-size: clamp(2.6rem, 4.8vw, 4.6rem);
    font-weight: 800;
}

h2 {
    font-size: clamp(1.8rem, 2.8vw, 2.7rem);
    font-weight: 750;
}

h3 {
    font-size: 1.35rem;
    font-weight: 700;
}

p {
    margin: 0;
}

.section-kicker,
.header-label {
    color: var(--muted);
    text-transform: uppercase;
    letter-spacing: 0.18em;
    font-size: 0.75rem;
    font-weight: 700;
}

.section-copy {
    color: var(--muted);
    line-height: 1.7;
    font-size: 1rem;
}

.muted-inline {
    color: var(--muted);
    font-size: 0.95rem;
}

.nav-link,
.text-link {
    color: var(--muted);
    transition: color 160ms ease;
}

.nav-link:hover,
.text-link:hover {
    color: var(--text);
}

.text-link.is-strong {
    color: var(--text);
    font-weight: 700;
}

.panel {
    border: 1px solid var(--line);
    border-radius: var(--radius-xl);
    background: var(--surface);
    box-shadow: var(--shadow-sm);
}

.message {
    padding: 16px 18px;
    border-radius: var(--radius-md);
    border: 1px solid var(--line);
    font-size: 0.95rem;
}

.message.success {
    background: var(--success-soft);
    border-color: color-mix(in srgb, var(--success) 35%, var(--line));
    color: var(--success);
}

.message.info {
    background: var(--brand-soft);
    border-color: color-mix(in srgb, var(--brand) 28%, var(--line));
    color: var(--text);
}

.message.error {
    background: var(--error-soft);
    border-color: color-mix(in srgb, var(--error) 35%, var(--line));
    color: var(--error);
}

.cookie-banner {
    position: fixed;
    top: 16px;
    left: 50%;
    z-index: 1400;
    width: min(1060px, calc(100% - 24px));
    padding: 18px 20px;
    border-radius: 22px;
    box-shadow: var(--shadow-lg);
    transform: translateX(-50%);
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 18px;
    align-items: center;
    background: color-mix(in srgb, var(--surface) 92%, transparent);
    backdrop-filter: blur(18px);
}

.cookie-banner-copy {
    display: grid;
    gap: 8px;
}

.cookie-banner-copy strong {
    font-size: 1rem;
    font-weight: 700;
    color: var(--text);
}

.cookie-banner-copy p {
    color: var(--muted);
    line-height: 1.6;
    font-size: 0.95rem;
}

.cookie-banner-actions {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
    justify-content: flex-end;
}

@media (max-width: 720px) {
    .cookie-banner {
        top: 12px;
        width: calc(100% - 16px);
        padding: 16px;
        grid-template-columns: 1fr;
        gap: 14px;
    }

    .cookie-banner-actions {
        justify-content: stretch;
    }

    .cookie-banner-actions .primary-button,
    .cookie-banner-actions .secondary-button {
        width: 100%;
    }
}

.primary-button,
.danger-button,
.secondary-button,
.ghost-button,
.header-button,
.theme-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    min-height: 42px;
    padding: 0 16px;
    border-radius: 12px;
    border: 1px solid transparent;
    cursor: pointer;
    font-weight: 600;
    transition:
        background-color 160ms ease,
        color 160ms ease,
        border-color 160ms ease,
        transform 160ms ease,
        box-shadow 160ms ease;
}

.primary-button:hover,
.danger-button:hover,
.secondary-button:hover,
.ghost-button:hover,
.header-button:hover,
.theme-button:hover {
    transform: translateY(-1px);
}

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

.primary-button:hover {
    background: var(--primary-strong);
}

.danger-button {
    background: var(--error);
    color: #fff;
    box-shadow: var(--shadow-sm);
}

.danger-button:hover {
    background: color-mix(in srgb, var(--error) 88%, #000);
}

.secondary-button,
.ghost-button,
.header-button,
.theme-button {
    background: var(--surface);
    color: var(--text);
    border-color: var(--line);
}

.secondary-button:hover,
.ghost-button:hover,
.header-button:hover,
.theme-button:hover {
    background: var(--surface-muted);
    border-color: var(--line-strong);
}

.primary-button:disabled,
.danger-button:disabled,
.secondary-button:disabled,
.ghost-button:disabled,
.header-button:disabled {
    cursor: not-allowed;
    opacity: 0.55;
    transform: none;
}

.theme-button {
    color: var(--muted);
    padding-inline: 14px;
}

.theme-button-icon {
    font-size: 0.95rem;
}

.theme-button-label {
    white-space: nowrap;
}

.public-shell {
    width: min(1220px, calc(100vw - 32px));
    margin: 0 auto;
    padding: 24px 0 40px;
}

.public-header {
    position: sticky;
    top: 16px;
    z-index: 20;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    min-height: 76px;
    padding: 16px 20px;
    border: 1px solid var(--line);
    border-radius: 24px;
    background: color-mix(in srgb, var(--surface) 94%, transparent);
    backdrop-filter: blur(12px);
    box-shadow: var(--shadow-sm);
}

.public-brand,
.sidebar-brand {
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 0;
}

.public-brand-mark,
.sidebar-brand-mark {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    flex-shrink: 0;
    border-radius: 0;
    overflow: hidden;
    background: transparent;
}

.brand-mark-image {
    width: 100%;
    height: 100%;
    object-fit: contain;
    object-position: center;
    display: block;
    background: transparent;
    border-radius: inherit;
}

html[data-theme="dark"] .public-brand-mark,
html[data-theme="dark"] .sidebar-brand-mark {
    border-radius: 10px;
}

.public-brand-copy,
.sidebar-brand-copy {
    display: flex;
    flex-direction: column;
    min-width: 0;
    overflow: hidden;
    max-width: 180px;
    opacity: 1;
    transform: translateX(0);
    transition:
        max-width 280ms cubic-bezier(0.22, 1, 0.36, 1),
        opacity 180ms ease,
        transform 280ms cubic-bezier(0.22, 1, 0.36, 1);
}

.public-brand-name,
.sidebar-brand-name {
    font-size: 1.5rem;
    font-weight: 800;
    letter-spacing: -0.03em;
}

.public-brand-tag,
.sidebar-brand-tag {
    color: var(--muted);
    text-transform: uppercase;
    letter-spacing: 0.18em;
    font-size: 0.7rem;
}

.public-nav {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.public-header-mobile-leading {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
}

.public-mobile-menu,
.public-mobile-backdrop,
.public-header-menu-button {
    display: none;
}

.public-mobile-menu {
    position: fixed;
    inset: 0 auto 0 0;
    width: min(86vw, 340px);
    max-width: 340px;
    height: 100dvh;
    padding: 18px 16px 24px;
    border-right: 1px solid var(--line);
    background: var(--sidebar);
    box-shadow: 0 24px 70px rgba(3, 8, 20, 0.34);
    z-index: 40;
    overflow-y: auto;
    transform: translateX(calc(-100% - 24px));
    transition:
        transform 280ms cubic-bezier(0.22, 1, 0.36, 1),
        border-color 220ms ease,
        background-color 220ms ease;
}

.public-mobile-menu-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 16px;
}

.public-mobile-nav {
    margin-bottom: 16px;
}

.public-mobile-bottom {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.sidebar-mobile-auth-link {
    width: 100%;
    justify-content: center;
}

.public-main {
    display: flex;
    flex-direction: column;
    gap: 24px;
    padding-top: 24px;
}

.site-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
    margin-top: 24px;
    padding: 18px 4px 0;
    border-top: 1px solid color-mix(in srgb, var(--line) 92%, transparent);
}

.site-footer-copy {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
    min-width: 0;
}

.site-footer-brand {
    color: var(--text);
    font-size: 0.95rem;
    font-weight: 700;
    letter-spacing: -0.02em;
}

.site-footer-tagline {
    color: var(--muted);
    font-size: 0.9rem;
}

.site-footer-links {
    display: flex;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.site-footer-links a {
    color: var(--muted);
    font-size: 0.9rem;
    font-weight: 600;
    text-decoration: none;
    transition: color 160ms ease;
}

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

.auth-page .public-shell {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    padding-bottom: 0;
}

.auth-page .public-main {
    flex: 1;
    justify-content: center;
    padding-top: 32px;
    padding-bottom: 32px;
}

.marketing-hero,
.marketing-grid,
.workflow-grid,
.auth-layout,
.editor-grid,
.analysis-grid {
    display: grid;
    gap: 24px;
}

.marketing-hero {
    grid-template-columns: minmax(0, 1.08fr) minmax(320px, 0.92fr);
}

.marketing-hero-card,
.marketing-card,
.workflow-strip,
.cta-panel,
.auth-context,
.auth-card,
.status-card,
.editor-intro,
.app-notice,
.editor-card,
.analysis-card,
.preview-panel {
    padding: 28px;
}

.hero-action-row,
.hero-trust-row,
.status-actions,
.auth-link-row,
.editor-actions,
.app-notice-actions {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    align-items: center;
}

.marketing-hero-card .section-copy,
.marketing-card .section-copy,
.workflow-step p,
.cta-panel .section-copy,
.auth-card .section-copy,
.auth-context .section-copy,
.editor-intro .section-copy,
.editor-card .section-copy,
.analysis-card .section-copy,
.status-card .section-copy,
.preview-copy {
    margin-top: 14px;
}

.hero-action-row {
    margin-top: 24px;
}

.hero-trust-row {
    margin-top: 18px;
}

.trust-pill,
.detector-pill,
.metric-chip,
.status-chip {
    display: inline-flex;
    align-items: center;
    min-height: 34px;
    padding: 0 12px;
    border-radius: 999px;
    border: 1px solid var(--line);
    background: var(--surface-muted);
    color: var(--muted);
    font-size: 0.8rem;
    font-weight: 700;
    white-space: nowrap;
    font-variant-numeric: tabular-nums;
}

.marketing-preview {
    display: grid;
    gap: 16px;
}

.preview-panel {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

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

.preview-badge {
    display: inline-flex;
    align-items: center;
    padding: 6px 10px;
    border-radius: 999px;
    background: var(--brand-soft);
    color: var(--brand);
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.12em;
}

.preview-badge.is-success {
    background: var(--success-soft);
    color: var(--success);
}

.preview-note {
    color: var(--muted);
    font-size: 0.82rem;
}

.preview-copy {
    font-size: 1rem;
    line-height: 1.7;
    color: var(--text);
}

.preview-panel-accent {
    border-color: color-mix(in srgb, var(--success) 25%, var(--line));
}

.detector-row {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 6px;
}

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

.marketing-card h2 {
    margin-top: 10px;
}

.workflow-strip {
    display: flex;
    flex-direction: column;
    gap: 22px;
}

.workflow-head h2 {
    margin-top: 10px;
}

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

.workflow-step {
    padding: 22px;
    border: 1px solid var(--line);
    border-radius: 18px;
    background: var(--surface-muted);
}

.workflow-step-number {
    color: var(--muted);
    font-size: 0.82rem;
    font-weight: 700;
    letter-spacing: 0.18em;
}

.workflow-step h3 {
    margin-top: 14px;
}

.workflow-step p {
    color: var(--muted);
    line-height: 1.65;
}

.cta-panel {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
}

.auth-simple-layout {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 100%;
}

.auth-simple-card {
    width: min(520px, 100%);
    padding: 32px;
    border-color: color-mix(in srgb, var(--brand) 16%, var(--line));
    box-shadow:
        0 0 0 1px color-mix(in srgb, var(--brand-soft) 24%, transparent),
        0 18px 42px color-mix(in srgb, var(--brand-soft) 10%, transparent);
}

.auth-simple-head {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 24px;
}

.auth-simple-head h1 {
    font-size: clamp(2rem, 4vw, 2.4rem);
    line-height: 1.1;
}

.auth-page .site-footer {
    margin-top: 0;
    padding: 0 4px 16px;
}

.app-frame > .site-footer {
    width: min(1440px, 100%);
    margin: 0 auto;
    padding: 0 24px 28px;
}

.standalone-shell > .site-footer {
    padding-top: 16px;
}

.policy-consent {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 14px 16px;
    border: 1px solid color-mix(in srgb, var(--line-strong) 56%, transparent);
    border-radius: 16px;
    background: color-mix(in srgb, var(--surface) 90%, var(--surface-muted));
    cursor: pointer;
}

.policy-consent input {
    width: 18px;
    height: 18px;
    margin: 2px 0 0;
    accent-color: var(--primary);
    flex-shrink: 0;
}

.policy-consent-copy {
    color: var(--muted);
    line-height: 1.6;
    font-size: 0.93rem;
}

.legal-layout {
    display: flex;
    justify-content: center;
}

.legal-card {
    width: min(980px, 100%);
    padding: 34px;
}

.legal-head {
    display: grid;
    gap: 10px;
    margin-bottom: 28px;
    padding-bottom: 24px;
    border-bottom: 1px solid color-mix(in srgb, var(--line-strong) 44%, transparent);
}

.legal-head h1 {
    font-size: clamp(2.1rem, 4.8vw, 3rem);
    line-height: 1.05;
    letter-spacing: -0.05em;
}

.legal-updated {
    color: var(--muted);
    font-size: 0.92rem;
    font-weight: 600;
}

.legal-body {
    display: grid;
    gap: 14px;
}

.legal-body h1,
.legal-body h2,
.legal-body h3 {
    color: var(--text);
    letter-spacing: -0.03em;
}

.legal-body h2 {
    margin-top: 18px;
    font-size: 1.4rem;
}

.legal-body h3 {
    margin-top: 10px;
    font-size: 1.05rem;
}

.legal-body p,
.legal-body ul {
    color: var(--muted);
    line-height: 1.72;
}

.legal-list {
    display: grid;
    gap: 10px;
    padding-left: 22px;
}

.legal-list li::marker {
    color: var(--text);
}

.standalone-shell {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    width: min(1320px, calc(100vw - 32px));
    margin: 0 auto;
    padding: 20px 0 28px;
}

.standalone-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.standalone-brand {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    color: inherit;
    text-decoration: none;
}

.standalone-main {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 20px;
    padding-top: 22px;
}

.onboarding-layout {
    flex: 1;
    display: grid;
    grid-template-columns: minmax(320px, 0.82fr) minmax(0, 1.18fr);
    gap: 28px;
    align-items: stretch;
}

.onboarding-hero {
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 20px;
    padding: 34px;
    border-radius: 28px;
    border: 1px solid color-mix(in srgb, var(--brand) 18%, var(--line));
    background:
        radial-gradient(circle at top left, color-mix(in srgb, var(--brand-soft) 24%, transparent) 0, transparent 40%),
        radial-gradient(circle at bottom right, color-mix(in srgb, var(--success-soft) 16%, transparent) 0, transparent 32%),
        linear-gradient(180deg, color-mix(in srgb, var(--surface) 88%, var(--background-muted)) 0%, var(--surface) 100%);
}

.onboarding-hero::after {
    content: "";
    position: absolute;
    inset: auto auto -90px -60px;
    width: 220px;
    height: 220px;
    border-radius: 999px;
    background: color-mix(in srgb, var(--brand-soft) 24%, transparent);
    filter: blur(16px);
    pointer-events: none;
}

.onboarding-hero h1 {
    max-width: 12ch;
    font-size: clamp(2.3rem, 5vw, 4rem);
    line-height: 0.98;
    letter-spacing: -0.05em;
}

.onboarding-hero .section-copy {
    max-width: 40ch;
}

.onboarding-hero-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 8px;
}

.onboarding-card {
    display: flex;
    flex-direction: column;
    gap: 24px;
    padding: 30px;
    border-color: color-mix(in srgb, var(--brand) 16%, var(--line));
    box-shadow:
        0 0 0 1px color-mix(in srgb, var(--brand-soft) 26%, transparent),
        0 22px 44px color-mix(in srgb, var(--brand-soft) 12%, transparent);
}

.onboarding-question {
    display: flex;
    flex-direction: column;
    gap: 16px;
    padding-bottom: 24px;
    border-bottom: 1px solid color-mix(in srgb, var(--line-strong) 48%, transparent);
}

.onboarding-question:last-of-type {
    padding-bottom: 0;
    border-bottom: none;
}

.onboarding-question-head {
    display: flex;
    align-items: flex-start;
    gap: 14px;
}

.onboarding-step-tag {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    border-radius: 14px;
    border: 1px solid color-mix(in srgb, var(--brand) 20%, var(--line));
    background: color-mix(in srgb, var(--brand-soft) 20%, var(--surface));
    font-size: 0.78rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    flex-shrink: 0;
}

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

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

.onboarding-choice-card {
    position: relative;
    display: flex;
    align-items: center;
    min-height: 70px;
    padding: 16px 18px;
    border: 1px solid var(--line);
    border-radius: 18px;
    background: color-mix(in srgb, var(--surface) 88%, var(--surface-muted));
    color: var(--text);
    cursor: pointer;
    transition:
        transform 150ms ease,
        border-color 150ms ease,
        box-shadow 150ms ease,
        background-color 150ms ease;
}

.onboarding-choice-card:hover {
    transform: translateY(-2px);
    border-color: color-mix(in srgb, var(--brand) 22%, var(--line));
}

.onboarding-choice-card:has(.onboarding-choice-input:checked) {
    border-color: color-mix(in srgb, var(--brand) 28%, var(--line));
    background: color-mix(in srgb, var(--brand-soft) 20%, var(--surface));
    box-shadow:
        0 0 0 1px color-mix(in srgb, var(--brand-soft) 30%, transparent),
        0 14px 28px color-mix(in srgb, var(--brand-soft) 10%, transparent);
}

.onboarding-choice-card span {
    display: block;
    font-weight: 700;
    line-height: 1.45;
}

.onboarding-choice-input {
    position: absolute;
    inset: 0;
    opacity: 0;
    cursor: pointer;
}

.onboarding-other-field.is-hidden {
    display: none;
}

.field-with-counter {
    position: relative;
}

.field-with-counter input {
    padding-right: 84px;
}

.field-counter {
    position: absolute;
    right: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--muted);
    font-size: 0.78rem;
    font-weight: 700;
}

.onboarding-actions {
    display: flex;
    justify-content: flex-end;
    padding-top: 8px;
}

.onboarding-simple-shell {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px 0 8px;
}

.onboarding-simple-card {
    width: min(760px, 100%);
    display: flex;
    flex-direction: column;
    gap: 24px;
    padding: 36px;
}

.onboarding-simple-head {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.onboarding-simple-kicker {
    color: var(--brand);
    font-size: 0.94rem;
    font-weight: 700;
    letter-spacing: 0.02em;
}

.onboarding-simple-step {
    color: var(--muted);
    font-size: 0.9rem;
    font-weight: 600;
}

.onboarding-simple-head h1 {
    max-width: 16ch;
    font-size: clamp(2rem, 4.4vw, 3rem);
    line-height: 1.04;
    letter-spacing: -0.05em;
}

.onboarding-simple-answers {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}

.onboarding-simple-answer {
    position: relative;
    display: flex;
    align-items: center;
    gap: 14px;
    min-height: 74px;
    padding: 18px 20px;
    border: 1px solid var(--line);
    border-radius: 18px;
    background: color-mix(in srgb, var(--surface) 92%, var(--surface-muted));
    cursor: pointer;
    transition:
        transform 160ms ease,
        border-color 160ms ease,
        background-color 160ms ease,
        box-shadow 160ms ease;
}

.onboarding-simple-answer:hover {
    transform: translateY(-1px);
    border-color: color-mix(in srgb, var(--brand) 18%, var(--line));
}

.onboarding-simple-answer:has(input:checked) {
    border-color: color-mix(in srgb, var(--brand) 34%, var(--line));
    background: color-mix(in srgb, var(--brand-soft) 14%, var(--surface));
    box-shadow: 0 0 0 1px color-mix(in srgb, var(--brand-soft) 22%, transparent);
}

.onboarding-simple-answer input {
    position: absolute;
    inset: 0;
    opacity: 0;
    cursor: pointer;
}

.onboarding-simple-answer-indicator {
    width: 18px;
    height: 18px;
    border-radius: 999px;
    border: 1.5px solid color-mix(in srgb, var(--line-strong) 88%, transparent);
    background: var(--surface);
    flex-shrink: 0;
    transition:
        border-color 160ms ease,
        background-color 160ms ease,
        box-shadow 160ms ease;
}

.onboarding-simple-answer:has(input[type="checkbox"]) .onboarding-simple-answer-indicator {
    border-radius: 6px;
}

.onboarding-simple-answer:has(input:checked) .onboarding-simple-answer-indicator {
    border-color: var(--brand);
    background: var(--brand);
    box-shadow: inset 0 0 0 4px var(--surface);
}

.onboarding-simple-answer-text {
    font-size: 1rem;
    font-weight: 700;
    line-height: 1.4;
}

.onboarding-simple-other.is-hidden {
    display: none;
}

.onboarding-simple-actions {
    display: flex;
    justify-content: flex-end;
    padding-top: 4px;
}

@media (max-width: 720px) {
    .onboarding-simple-shell {
        align-items: stretch;
        padding-top: 12px;
    }

    .onboarding-simple-card {
        padding: 24px 18px;
    }

    .onboarding-simple-head h1 {
        max-width: none;
        font-size: clamp(1.8rem, 8vw, 2.4rem);
    }

    .onboarding-simple-answers {
        grid-template-columns: 1fr;
    }

    .onboarding-simple-actions {
        justify-content: stretch;
    }

    .onboarding-simple-actions .primary-button {
        width: 100%;
    }
}

.auth-layout {
    grid-template-columns: minmax(0, 1.05fr) minmax(380px, 0.95fr);
    align-items: stretch;
}

.auth-context {
    position: relative;
    overflow: hidden;
    background:
        radial-gradient(circle at top left, color-mix(in srgb, var(--brand-soft) 24%, transparent) 0, transparent 42%),
        radial-gradient(circle at bottom right, color-mix(in srgb, var(--warning-soft) 16%, transparent) 0, transparent 36%),
        var(--surface);
}

.auth-context::after {
    content: "";
    position: absolute;
    inset: auto 28px 0;
    height: 1px;
    background:
        linear-gradient(
            90deg,
            transparent 0%,
            color-mix(in srgb, var(--brand) 22%, var(--line)) 18%,
            color-mix(in srgb, var(--warning) 18%, var(--line)) 50%,
            color-mix(in srgb, var(--brand) 22%, var(--line)) 82%,
            transparent 100%
        );
    pointer-events: none;
}

.auth-feature-list {
    display: grid;
    gap: 14px;
    margin-top: 24px;
}

.auth-feature-item {
    padding: 18px;
    border: 1px solid var(--line);
    border-radius: 16px;
    background: color-mix(in srgb, var(--surface) 74%, var(--surface-muted));
    box-shadow: 0 14px 32px color-mix(in srgb, var(--brand-soft) 10%, transparent);
}

.auth-feature-item strong,
.support-note-card strong {
    display: block;
    margin-bottom: 8px;
}

.auth-feature-item span {
    color: var(--muted);
    line-height: 1.6;
}

.auth-card-head {
    margin-bottom: 24px;
}

.auth-card {
    border-color: color-mix(in srgb, var(--brand) 16%, var(--line));
    box-shadow:
        0 0 0 1px color-mix(in srgb, var(--brand-soft) 28%, transparent),
        0 20px 46px color-mix(in srgb, var(--brand-soft) 12%, transparent);
}

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

.auth-inline-link {
    font-size: 0.82rem;
    font-weight: 700;
}

.auth-card-note {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 16px 18px;
    border: 1px solid color-mix(in srgb, var(--brand) 20%, var(--line));
    border-radius: 16px;
    background: color-mix(in srgb, var(--brand-soft) 16%, var(--surface));
}

.auth-card-note strong {
    color: var(--text);
}

.auth-card-note span {
    color: var(--muted);
    line-height: 1.6;
}

.auth-link-row-simple {
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    margin-top: 18px;
}

.stack {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

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

.field-label {
    font-size: 0.92rem;
    font-weight: 700;
}

input,
textarea {
    width: 100%;
    padding: 14px 16px;
    border: 1px solid var(--line);
    border-radius: 14px;
    background: var(--surface);
    color: var(--text);
    outline: none;
    transition:
        border-color 150ms ease,
        background-color 150ms ease,
        box-shadow 150ms ease;
}

input:focus,
textarea:focus {
    border-color: color-mix(in srgb, var(--brand) 55%, var(--line));
    box-shadow: 0 0 0 4px color-mix(in srgb, var(--brand-soft) 70%, transparent);
}

input:disabled,
textarea:disabled {
    cursor: not-allowed;
    background: var(--surface-muted);
    color: var(--muted);
}

textarea {
    resize: vertical;
    line-height: 1.65;
    min-height: 220px;
}

.status-layout {
    display: flex;
    justify-content: center;
}

.status-card {
    width: min(760px, 100%);
    text-align: center;
}

.status-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 72px;
    height: 72px;
    margin-bottom: 18px;
    border-radius: 22px;
    background: var(--surface-muted);
    border: 1px solid var(--line);
    font-size: 2rem;
}

.status-actions {
    justify-content: center;
    margin-top: 26px;
}

.not-found-path {
    margin-top: 18px;
    color: var(--muted);
    font-size: 0.92rem;
}

.not-found-path code {
    color: var(--text);
}

.status-form {
    margin-top: 26px;
    text-align: left;
}

.dev-preview {
    margin-top: 24px;
    padding: 18px;
    border: 1px solid var(--line);
    border-radius: 16px;
    background: var(--surface-muted);
    text-align: left;
}

.dev-preview-title {
    margin-bottom: 10px;
    font-weight: 700;
    color: var(--text);
}

.dev-preview p + p {
    margin-top: 8px;
}

.dev-preview .secondary-button {
    margin-top: 14px;
}

.app-shell {
    display: grid;
    --sidebar-width: 272px;
    grid-template-columns: var(--sidebar-width) minmax(0, 1fr);
    min-height: 100vh;
    transition: grid-template-columns 300ms cubic-bezier(0.22, 1, 0.36, 1);
}

.app-shell[data-sidebar="collapsed"] {
    --sidebar-width: 92px;
}

.app-sidebar {
    position: sticky;
    top: 0;
    height: 100vh;
    display: flex;
    flex-direction: column;
    gap: 18px;
    padding: 16px;
    border-right: 1px solid var(--line);
    background: var(--sidebar);
    overflow: hidden;
    transition:
        padding 300ms cubic-bezier(0.22, 1, 0.36, 1),
        gap 300ms cubic-bezier(0.22, 1, 0.36, 1),
        border-color 220ms ease,
        background-color 220ms ease;
}

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

.sidebar-top-actions {
    display: flex;
    align-items: center;
    gap: 10px;
}

.sidebar-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    border-radius: 999px;
    border: 1px solid var(--line);
    background: var(--surface);
    color: var(--muted);
    cursor: pointer;
    transition:
        transform 240ms ease,
        background-color 160ms ease,
        border-color 160ms ease,
        color 160ms ease;
}

.sidebar-toggle:hover {
    background: var(--surface-muted);
}

.sidebar-toggle-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: transform 300ms cubic-bezier(0.22, 1, 0.36, 1);
}

.app-header-menu-button,
.public-header-menu-button,
.sidebar-mobile-close {
    display: none;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 14px;
    border: 1px solid var(--line);
    background: var(--surface);
    color: var(--text);
    cursor: pointer;
    transition:
        transform 160ms ease,
        background-color 160ms ease,
        border-color 160ms ease,
        color 160ms ease;
}

.app-header-menu-button:hover,
.public-header-menu-button:hover,
.sidebar-mobile-close:hover {
    transform: translateY(-1px);
    background: var(--surface-muted);
    border-color: var(--line-strong);
}

.app-header-menu-icon,
.sidebar-mobile-close-icon {
    font-size: 1.1rem;
    line-height: 1;
}

.app-header-brand-mobile {
    display: none;
    align-items: center;
    gap: 10px;
    color: var(--text);
}

.app-header-mobile-leading {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
}

.app-header-brand-mark {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    flex-shrink: 0;
}

.app-header-brand-copy {
    display: flex;
    flex-direction: column;
    gap: 1px;
}

.app-header-brand-name {
    font-size: 1.22rem;
    font-weight: 800;
    letter-spacing: -0.03em;
}

.app-header-brand-tag {
    font-size: 0.62rem;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: var(--muted);
}

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

.sidebar-link {
    display: flex;
    align-items: center;
    gap: 12px;
    width: 100%;
    padding: 10px;
    border-radius: 16px;
    border: 1px solid transparent;
    background: transparent;
    color: var(--muted);
    text-align: left;
    overflow: hidden;
    transition:
        background-color 180ms ease,
        border-color 180ms ease,
        color 180ms ease,
        transform 220ms ease,
        width 300ms cubic-bezier(0.22, 1, 0.36, 1),
        height 300ms cubic-bezier(0.22, 1, 0.36, 1),
        padding 300ms cubic-bezier(0.22, 1, 0.36, 1),
        min-height 300ms cubic-bezier(0.22, 1, 0.36, 1),
        gap 300ms cubic-bezier(0.22, 1, 0.36, 1);
}

.sidebar-link:hover {
    background: var(--surface-muted);
    border-color: var(--line);
}

.sidebar-link.is-active {
    background: var(--surface-muted);
    border-color: var(--line);
    color: var(--text);
}

.sidebar-link.is-disabled {
    cursor: not-allowed;
    opacity: 0.72;
}

.sidebar-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    flex-shrink: 0;
    border-radius: 14px;
    background: var(--surface-muted);
    border: 1px solid var(--line);
}

.sidebar-icon svg {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
}

.sidebar-label-wrap {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
    overflow: hidden;
    max-width: 180px;
    opacity: 1;
    transform: translateX(0);
    transition:
        max-width 280ms cubic-bezier(0.22, 1, 0.36, 1),
        opacity 180ms ease,
        transform 280ms cubic-bezier(0.22, 1, 0.36, 1);
}

.sidebar-label {
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--text);
}

.sidebar-hint {
    color: var(--muted);
    font-size: 0.78rem;
}

.sidebar-link-mobile-only,
.sidebar-mobile-only,
.app-sidebar-backdrop {
    display: none;
}

.sidebar-bottom-link {
    width: 100%;
}

.sidebar-bottom.sidebar-mobile-only,
.sidebar-bottom.public-mobile-bottom {
    display: none;
}

.sidebar-bottom {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-top: auto;
    overflow: hidden;
    max-height: 240px;
    opacity: 1;
    transform: translateY(0);
    transition:
        max-height 280ms cubic-bezier(0.22, 1, 0.36, 1),
        opacity 180ms ease,
        transform 280ms cubic-bezier(0.22, 1, 0.36, 1);
}

.sidebar-user {
    padding: 14px;
    border: 1px solid var(--line);
    border-radius: 16px;
    background: var(--surface-muted);
}

.sidebar-user-label {
    color: var(--muted);
    font-size: 0.82rem;
    overflow: hidden;
    max-height: 24px;
    opacity: 1;
    transition:
        max-height 220ms ease,
        opacity 160ms ease;
}

.sidebar-user-email {
    display: block;
    margin-top: 6px;
    font-size: 0.92rem;
    line-height: 1.45;
    overflow-wrap: anywhere;
    overflow: hidden;
    max-height: 60px;
    opacity: 1;
    transition:
        max-height 220ms ease,
        opacity 160ms ease,
        margin-top 220ms ease;
}

.sidebar-user-guest {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.sidebar-guest-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.app-shell[data-sidebar="collapsed"] .sidebar-link {
    align-self: center;
    justify-content: center;
    width: 56px;
    min-width: 56px;
    height: 56px;
    min-height: 56px;
    padding: 0;
    gap: 0;
    border-radius: 18px;
}

.app-shell[data-sidebar="collapsed"] .sidebar-nav {
    align-items: center;
}

.app-shell[data-sidebar="collapsed"] .sidebar-bottom {
    max-height: 0;
    opacity: 0;
    transform: translateY(8px);
    pointer-events: none;
}

.app-shell[data-sidebar="collapsed"] .sidebar-brand-copy,
.app-shell[data-sidebar="collapsed"] .sidebar-label-wrap {
    max-width: 0;
    opacity: 0;
    transform: translateX(-8px);
    pointer-events: none;
}

.app-shell[data-sidebar="collapsed"] .sidebar-user-label {
    max-height: 0;
    opacity: 0;
    pointer-events: none;
}

.app-shell[data-sidebar="collapsed"] .sidebar-user-email {
    max-height: 0;
    margin-top: 0;
    opacity: 0;
    pointer-events: none;
}

.app-shell[data-sidebar="collapsed"] .sidebar-toggle-icon {
    transform: rotate(180deg);
}

.app-frame {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.app-header {
    position: sticky;
    top: 0;
    z-index: 15;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    min-height: 72px;
    padding: 16px 24px;
    border-bottom: 1px solid var(--line);
    background: color-mix(in srgb, var(--surface) 92%, transparent);
    backdrop-filter: blur(12px);
}

.header-title {
    font-size: 1.25rem;
    font-weight: 700;
    letter-spacing: -0.02em;
}

.app-header-actions {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
    margin-left: auto;
}

.header-plan-link,
.header-account {
    display: inline-flex;
    align-items: center;
    min-height: 42px;
    padding: 8px 14px;
    border-radius: 14px;
    border: 1px solid var(--line);
    background: var(--surface);
    color: var(--text);
    transition:
        transform 160ms ease,
        background-color 160ms ease,
        border-color 160ms ease,
        box-shadow 160ms ease;
}

.header-plan-link:hover,
.header-account:hover {
    transform: translateY(-1px);
    background: var(--surface-muted);
    border-color: var(--line-strong);
}

.header-plan-link {
    padding-inline: 18px;
}

.header-plan-link.is-active {
    border-color: color-mix(in srgb, var(--brand) 24%, var(--line));
    background: color-mix(in srgb, var(--brand-soft) 16%, var(--surface));
    box-shadow: 0 0 0 1px color-mix(in srgb, var(--brand-soft) 24%, transparent);
}

.header-plan-link.is-free {
    border-color: color-mix(in srgb, var(--warning) 28%, var(--line));
    background:
        radial-gradient(circle at top right, color-mix(in srgb, var(--warning-soft) 84%, transparent) 0, transparent 58%),
        linear-gradient(135deg, color-mix(in srgb, var(--surface) 76%, var(--warning-soft)) 0%, color-mix(in srgb, var(--surface) 88%, var(--warning-soft)) 100%);
    box-shadow:
        0 0 0 1px color-mix(in srgb, var(--warning-soft) 38%, transparent),
        0 0 0 10px color-mix(in srgb, var(--warning-soft) 22%, transparent),
        0 16px 34px color-mix(in srgb, var(--warning-soft) 30%, transparent);
}

.header-plan-link.is-free .header-plan-label {
    color: color-mix(in srgb, var(--warning) 82%, #000);
}

.header-plan-link.is-plus {
    border-color: color-mix(in srgb, var(--plus) 42%, var(--line));
    background:
        radial-gradient(circle at top right, color-mix(in srgb, var(--plus-soft) 88%, transparent) 0, transparent 54%),
        linear-gradient(135deg, color-mix(in srgb, var(--surface) 74%, var(--plus-soft)) 0%, color-mix(in srgb, var(--surface) 86%, var(--plus-soft)) 100%);
    box-shadow:
        0 0 0 1px color-mix(in srgb, var(--plus-soft) 52%, transparent),
        0 0 0 12px color-mix(in srgb, var(--plus-soft) 28%, transparent),
        0 18px 38px color-mix(in srgb, var(--plus-soft) 38%, transparent);
}

.header-plan-link.is-plus .header-plan-label {
    color: var(--plus);
}

.header-plan-link.is-pro {
    border-color: color-mix(in srgb, var(--pro) 44%, var(--line));
    background:
        radial-gradient(circle at top right, color-mix(in srgb, var(--pro-soft) 90%, transparent) 0, transparent 54%),
        linear-gradient(135deg, color-mix(in srgb, var(--surface) 72%, var(--pro-soft)) 0%, color-mix(in srgb, var(--surface) 86%, var(--pro-soft)) 100%);
    box-shadow:
        0 0 0 1px color-mix(in srgb, var(--pro-soft) 54%, transparent),
        0 0 0 12px color-mix(in srgb, var(--pro-soft) 30%, transparent),
        0 18px 40px color-mix(in srgb, var(--pro-soft) 40%, transparent);
}

.header-plan-link.is-pro .header-plan-label {
    color: var(--pro);
}

.header-account.is-active {
    border-color: color-mix(in srgb, var(--brand) 24%, var(--line));
    background: color-mix(in srgb, var(--brand-soft) 16%, var(--surface));
    box-shadow: 0 0 0 1px color-mix(in srgb, var(--brand-soft) 24%, transparent);
}

.header-account.is-plus {
    border-color: color-mix(in srgb, var(--plus) 34%, var(--line));
    background:
        radial-gradient(circle at top right, color-mix(in srgb, var(--plus-soft) 80%, transparent) 0, transparent 56%),
        linear-gradient(135deg, color-mix(in srgb, var(--surface) 74%, var(--plus-soft)) 0%, color-mix(in srgb, var(--surface) 88%, var(--plus-soft)) 100%);
    box-shadow:
        0 0 0 1px color-mix(in srgb, var(--plus-soft) 48%, transparent),
        0 0 0 12px color-mix(in srgb, var(--plus-soft) 28%, transparent),
        0 18px 40px color-mix(in srgb, var(--plus-soft) 34%, transparent);
}

.header-account.is-plus .header-account-label {
    color: var(--plus);
}

.header-account.is-plus .header-account-email {
    color: color-mix(in srgb, var(--text) 90%, var(--plus));
}

.header-account.is-plus:hover,
.header-account.is-plus.is-active {
    border-color: color-mix(in srgb, var(--plus) 42%, var(--line));
    box-shadow:
        0 0 0 1px color-mix(in srgb, var(--plus-soft) 54%, transparent),
        0 0 0 14px color-mix(in srgb, var(--plus-soft) 32%, transparent),
        0 20px 46px color-mix(in srgb, var(--plus-soft) 38%, transparent);
}

.header-account.is-pro {
    border-color: color-mix(in srgb, var(--pro) 36%, var(--line));
    background:
        radial-gradient(circle at top right, color-mix(in srgb, var(--pro-soft) 82%, transparent) 0, transparent 56%),
        linear-gradient(135deg, color-mix(in srgb, var(--surface) 72%, var(--pro-soft)) 0%, color-mix(in srgb, var(--surface) 88%, var(--pro-soft)) 100%);
    box-shadow:
        0 0 0 1px color-mix(in srgb, var(--pro-soft) 50%, transparent),
        0 0 0 12px color-mix(in srgb, var(--pro-soft) 30%, transparent),
        0 18px 40px color-mix(in srgb, var(--pro-soft) 36%, transparent);
}

.header-account.is-pro .header-account-label {
    color: var(--pro);
}

.header-account.is-pro .header-account-email {
    color: color-mix(in srgb, var(--text) 90%, var(--pro));
}

.header-account.is-pro:hover,
.header-account.is-pro.is-active {
    border-color: color-mix(in srgb, var(--pro) 44%, var(--line));
    box-shadow:
        0 0 0 1px color-mix(in srgb, var(--pro-soft) 56%, transparent),
        0 0 0 14px color-mix(in srgb, var(--pro-soft) 34%, transparent),
        0 20px 46px color-mix(in srgb, var(--pro-soft) 40%, transparent);
    }

.header-plan-copy,
.header-account-copy {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
}

.header-plan-label,
.header-account-label {
    color: var(--muted);
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.header-plan-copy {
    justify-content: center;
}

.header-plan-label {
    font-size: 0.92rem;
    letter-spacing: 0;
    text-transform: none;
    line-height: 1.1;
}

.header-account-email {
    font-size: 0.9rem;
    font-weight: 700;
    line-height: 1.2;
}

.status-chip.is-success {
    border-color: color-mix(in srgb, var(--success) 28%, var(--line));
    color: var(--success);
    background: var(--success-soft);
}

.status-chip.is-warning {
    border-color: color-mix(in srgb, var(--warning) 28%, var(--line));
    color: var(--warning);
    background: var(--warning-soft);
}

.app-main {
    width: min(1440px, 100%);
    margin: 0 auto;
    padding: 24px;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.support-note-label {
    display: block;
    margin-bottom: 8px;
    color: var(--muted);
    text-transform: uppercase;
    letter-spacing: 0.14em;
    font-size: 0.72rem;
    font-weight: 700;
}

.app-notice {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
}

.app-notice-copy strong {
    display: block;
    margin-bottom: 8px;
    font-size: 1rem;
}

.app-notice-copy p {
    color: var(--muted);
    line-height: 1.6;
}

.app-notice-copy span {
    color: var(--text);
    font-weight: 700;
}

.account-page-head {
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 4px 0 2px;
}

.account-page-head h1 {
    font-size: clamp(1.95rem, 3.4vw, 2.85rem);
    line-height: 1.06;
    letter-spacing: -0.05em;
}

.account-overview-grid,
.account-settings-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 24px;
    align-items: start;
}

.account-card {
    display: flex;
    flex-direction: column;
    gap: 18px;
    padding: 28px;
}

.account-card-danger {
    min-height: 100%;
}

.account-card-head {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 12px;
}

.account-card-head h2 {
    line-height: 1.15;
}

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

.account-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    padding: 14px 16px;
    border-radius: 16px;
    border: 1px solid var(--line);
    background: var(--surface-muted);
}

.account-row-label {
    color: var(--muted);
    font-size: 0.92rem;
}

.account-row-value {
    color: var(--text);
    font-size: 0.96rem;
    font-weight: 700;
    text-align: right;
    overflow-wrap: anywhere;
}

.account-row-value.is-success {
    color: var(--success);
}

.account-row-value.is-warning {
    color: var(--warning);
}

.subscription-current-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
}

.subscription-current-copy {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.subscription-current-name {
    font-size: 1.45rem;
    line-height: 1.08;
    letter-spacing: -0.03em;
}

.subscription-current-price {
    color: var(--muted);
    font-size: 0.96rem;
    font-weight: 600;
}

.subscription-current-card {
    position: relative;
    overflow: hidden;
}

.subscription-current-card::after {
    content: "";
    position: absolute;
    inset: auto -40px -80px auto;
    width: 220px;
    height: 220px;
    border-radius: 999px;
    pointer-events: none;
    filter: blur(20px);
    opacity: 0.7;
}

.subscription-current-card-free {
    border-color: color-mix(in srgb, var(--line-strong) 38%, var(--line));
}

.subscription-current-card-free::after {
    background: color-mix(in srgb, var(--brand-soft) 26%, transparent);
}

.subscription-current-card-plus {
    border-color: color-mix(in srgb, var(--plus) 24%, var(--line));
    background:
        radial-gradient(circle at top right, color-mix(in srgb, var(--plus-soft) 58%, transparent) 0, transparent 42%),
        linear-gradient(180deg, color-mix(in srgb, var(--surface) 90%, var(--plus-soft)) 0%, var(--surface) 100%);
}

.subscription-current-card-plus::after {
    background: color-mix(in srgb, var(--plus-soft) 44%, transparent);
}

.subscription-current-card-pro {
    border-color: color-mix(in srgb, var(--pro) 24%, var(--line));
    background:
        radial-gradient(circle at top right, color-mix(in srgb, var(--pro-soft) 60%, transparent) 0, transparent 42%),
        linear-gradient(180deg, color-mix(in srgb, var(--surface) 88%, var(--pro-soft)) 0%, var(--surface) 100%);
}

.subscription-current-card-pro::after {
    background: color-mix(in srgb, var(--pro-soft) 46%, transparent);
}

.subscription-plans-card {
    gap: 20px;
}

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

.subscription-plan-card {
    display: flex;
    flex-direction: column;
    gap: 14px;
    padding: 18px;
    border-radius: 18px;
    border: 1px solid var(--line);
    background: var(--surface-muted);
}

.subscription-plan-card.is-current {
    border-color: color-mix(in srgb, var(--brand) 28%, var(--line));
    background: color-mix(in srgb, var(--brand-soft) 18%, var(--surface));
    box-shadow:
        0 0 0 1px color-mix(in srgb, var(--brand-soft) 24%, transparent),
        0 16px 30px color-mix(in srgb, var(--brand-soft) 10%, transparent);
}

.subscription-plan-top {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
}

.subscription-plan-top h3 {
    margin: 0;
}

.subscription-plan-price {
    color: var(--text);
    font-size: 0.95rem;
    font-weight: 700;
    white-space: nowrap;
}

.account-inline-actions,
.account-form-actions {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.account-subtle-link {
    color: var(--muted);
    font-size: 0.92rem;
    font-weight: 600;
}

button.account-subtle-link {
    padding: 0;
    border: none;
    background: transparent;
    cursor: pointer;
    font: inherit;
}

.account-subtle-link:hover {
    color: var(--text);
}

.account-card .section-copy {
    max-width: 62ch;
    margin-top: 0;
}

.account-card-danger {
    border-color: color-mix(in srgb, var(--error) 18%, var(--line));
    background:
        linear-gradient(180deg, color-mix(in srgb, var(--error-soft) 30%, var(--surface)) 0%, var(--surface) 100%);
}

.account-settings-grid .account-card,
.account-overview-grid .account-card {
    min-height: 100%;
}

.subscription-manage-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
    gap: 24px;
    align-items: start;
}

.subscription-manage-hero,
.subscription-manage-card {
    display: flex;
    flex-direction: column;
    gap: 18px;
    padding: 28px;
}

.subscription-manage-hero-top {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
}

.subscription-manage-stats {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
}

.subscription-manage-stat {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 16px;
    border-radius: 18px;
    border: 1px solid var(--line);
    background: color-mix(in srgb, var(--surface) 92%, var(--background-muted));
}

.subscription-manage-stat span {
    color: var(--muted);
    font-size: 0.84rem;
}

.subscription-manage-stat strong {
    font-size: 1.12rem;
    line-height: 1.15;
}

.subscription-manage-stat strong.is-success {
    color: var(--success);
}

.subscription-manage-stat strong.is-warning {
    color: var(--warning);
}

.subscription-manage-copy {
    max-width: 54ch;
}

.subscription-manage-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.subscription-manage-notes {
    display: flex;
    flex-direction: column;
    gap: 10px;
    color: var(--muted);
    line-height: 1.65;
}

.subscription-manage-warning {
    color: var(--warning);
    font-weight: 600;
}

.subscription-manage-actions {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.subscription-manage-cancel-row {
    margin-top: 10px;
    padding-top: 16px;
    border-top: 1px dashed color-mix(in srgb, var(--line-strong) 40%, transparent);
}

.subscription-cancel-dialog {
    display: none;
    width: min(520px, calc(100vw - 32px));
    padding: 0;
    border: 1px solid var(--line);
    border-radius: 28px;
    background: var(--surface);
    box-shadow: 0 24px 70px rgba(15, 23, 42, 0.22);
}

.subscription-cancel-dialog[open] {
    display: block;
    position: fixed;
    inset: 50% auto auto 50%;
    transform: translate(-50%, -50%);
    margin: 0;
    z-index: 140;
    max-height: calc(100vh - 32px);
    overflow: auto;
}

.subscription-cancel-dialog::backdrop {
    background: rgba(2, 6, 23, 0.42);
    backdrop-filter: blur(6px);
}

body.has-subscription-cancel-dialog::before,
body.has-account-delete-dialog::before {
    content: "";
    position: fixed;
    inset: 0;
    z-index: 130;
    background: rgba(2, 6, 23, 0.42);
    backdrop-filter: blur(6px);
}

.subscription-cancel-dialog-body {
    display: flex;
    flex-direction: column;
    gap: 16px;
    padding: 24px;
}

.subscription-cancel-dialog-body h2 {
    margin: 0;
}

.subscription-cancel-dialog-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 12px;
    flex-wrap: wrap;
}

.subscription-cancel-keep-button {
    border-color: color-mix(in srgb, var(--success) 28%, var(--line));
    background: color-mix(in srgb, var(--success-soft) 76%, var(--surface));
    color: color-mix(in srgb, var(--success) 90%, #000);
    box-shadow: 0 10px 24px color-mix(in srgb, var(--success-soft) 28%, transparent);
}

.subscription-cancel-keep-button:hover {
    background: color-mix(in srgb, var(--success-soft) 88%, var(--surface));
    border-color: color-mix(in srgb, var(--success) 38%, var(--line));
}

.subscription-cancel-confirm-button {
    background: color-mix(in srgb, var(--error) 84%, #fff);
    box-shadow: 0 10px 22px color-mix(in srgb, var(--error-soft) 28%, transparent);
}

.subscription-cancel-confirm-button:hover {
    background: color-mix(in srgb, var(--error) 78%, #fff);
}

.free-plan-dialog {
    display: none;
    width: min(560px, calc(100vw - 32px));
    padding: 0;
    border: 1px solid color-mix(in srgb, var(--brand) 16%, var(--line));
    border-radius: 28px;
    background:
        radial-gradient(circle at top right, color-mix(in srgb, var(--brand-soft) 34%, transparent), transparent 42%),
        radial-gradient(circle at bottom left, color-mix(in srgb, var(--warning-soft) 28%, transparent), transparent 36%),
        var(--surface);
    box-shadow: 0 28px 80px rgba(15, 23, 42, 0.24);
}

.free-plan-dialog[open] {
    display: block;
    position: fixed;
    inset: 50% auto auto 50%;
    transform: translate(-50%, -50%);
    margin: 0;
    z-index: 140;
    max-height: calc(100vh - 32px);
    overflow: auto;
}

.free-plan-dialog::backdrop {
    background: rgba(2, 6, 23, 0.5);
    backdrop-filter: blur(8px);
}

body.has-free-plan-dialog::before {
    content: "";
    position: fixed;
    inset: 0;
    z-index: 130;
    background: rgba(2, 6, 23, 0.5);
    backdrop-filter: blur(8px);
}

.free-plan-dialog-body {
    display: flex;
    flex-direction: column;
    gap: 18px;
    align-items: center;
    text-align: center;
    padding: 28px 28px 28px;
}

.free-plan-dialog-body h2 {
    margin: 0;
    max-width: 16ch;
    font-size: clamp(1.95rem, 2.45vw, 2.7rem);
    line-height: 1.04;
    letter-spacing: -0.04em;
}

.free-plan-dialog-body .section-copy {
    max-width: 44ch;
    color: var(--muted);
    font-size: 1rem;
    line-height: 1.74;
}

.free-plan-dialog-meta {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
    margin-top: 2px;
}

.free-plan-dialog-chip {
    display: inline-flex;
    align-items: center;
    min-height: 36px;
    padding: 0 13px;
    border-radius: 999px;
    border: 1px solid color-mix(in srgb, var(--brand) 18%, var(--line));
    background: color-mix(in srgb, var(--brand-soft) 22%, var(--surface));
    color: var(--text);
    font-size: 0.84rem;
    font-weight: 700;
    letter-spacing: -0.01em;
}

.free-plan-dialog-chip:first-child {
    border-color: color-mix(in srgb, var(--warning) 28%, var(--line));
    background: color-mix(in srgb, var(--warning-soft) 52%, var(--surface));
}

.free-plan-dialog-actions {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
    margin-top: 6px;
}

.free-plan-dialog .primary-button {
    min-width: 168px;
}

.free-plan-dialog .secondary-button {
    min-width: 108px;
}

.upgrade-hero {
    position: relative;
    overflow: hidden;
    display: grid;
    grid-template-columns: minmax(0, 1.2fr) minmax(300px, 390px);
    gap: 20px;
    align-items: stretch;
    padding: 24px;
    background:
        radial-gradient(circle at top left, color-mix(in srgb, var(--plus-soft) 74%, transparent) 0, transparent 34%),
        radial-gradient(circle at right 14%, color-mix(in srgb, var(--pro-soft) 78%, transparent) 0, transparent 38%),
        linear-gradient(145deg, color-mix(in srgb, var(--surface) 88%, var(--background-muted)) 0%, var(--surface) 100%);
}

.upgrade-hero::before {
    content: "";
    position: absolute;
    inset: 16px auto auto 16px;
    width: 96px;
    height: 96px;
    border-radius: 24px;
    border: 1px solid color-mix(in srgb, var(--line-strong) 60%, transparent);
    opacity: 0.24;
    transform: rotate(-8deg);
    pointer-events: none;
}

.upgrade-hero-copy {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    gap: 14px;
    max-width: 820px;
}

.upgrade-hero-kicker {
    color: color-mix(in srgb, var(--warning) 82%, #fff);
}

.upgrade-hero h1 {
    max-width: none;
    margin: 0;
    font-size: clamp(2.8rem, 4vw, 4rem);
    line-height: 0.98;
    letter-spacing: -0.05em;
}

.upgrade-hero .section-copy {
    max-width: 50ch;
    font-size: 0.98rem;
    line-height: 1.65;
}

.upgrade-hero-inline {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.upgrade-hero-chip {
    display: inline-flex;
    align-items: center;
    min-height: 34px;
    padding: 0 13px;
    border-radius: 999px;
    border: 1px solid color-mix(in srgb, var(--line-strong) 32%, transparent);
    background: color-mix(in srgb, var(--surface) 90%, var(--background-muted));
    color: var(--text);
    font-size: 0.88rem;
    font-weight: 600;
}

.upgrade-current-spotlight {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    gap: 14px;
    padding: 18px;
    min-height: 100%;
    box-shadow:
        0 28px 70px color-mix(in srgb, var(--background-muted) 50%, transparent),
        inset 0 1px 0 color-mix(in srgb, #fff 10%, transparent);
}

.upgrade-current-spotlight-top {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
}

.upgrade-current-label {
    color: var(--muted);
    text-transform: uppercase;
    letter-spacing: 0.16em;
    font-size: 0.68rem;
    font-weight: 700;
}

.upgrade-current-meter-block {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 12px;
    border-radius: 16px;
    border: 1px solid color-mix(in srgb, var(--line-strong) 34%, transparent);
    background: color-mix(in srgb, var(--surface) 88%, var(--background-muted));
}

.upgrade-current-meter-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    color: var(--muted);
    font-size: 0.95rem;
    flex-wrap: wrap;
}

.upgrade-current-meter-meta strong {
    color: var(--text);
    font-size: 1rem;
}

.upgrade-current-meter-track {
    position: relative;
    width: 100%;
    height: 8px;
    border-radius: 999px;
    background: color-mix(in srgb, var(--line) 84%, var(--surface));
    overflow: hidden;
}

.upgrade-current-meter-fill {
    position: absolute;
    inset: 0 auto 0 0;
    border-radius: inherit;
    min-width: 10px;
    background: linear-gradient(90deg, var(--brand) 0%, color-mix(in srgb, var(--warning) 72%, #fff) 100%);
    box-shadow: 0 0 18px color-mix(in srgb, var(--brand-soft) 48%, transparent);
}

.subscription-current-card-plus .upgrade-current-meter-fill {
    background: linear-gradient(90deg, var(--plus) 0%, color-mix(in srgb, var(--warning) 76%, #fff) 100%);
    box-shadow: 0 0 18px color-mix(in srgb, var(--plus-soft) 46%, transparent);
}

.subscription-current-card-pro .upgrade-current-meter-fill {
    background: linear-gradient(90deg, var(--pro) 0%, color-mix(in srgb, #67d6ff 68%, #fff) 100%);
    box-shadow: 0 0 18px color-mix(in srgb, var(--pro-soft) 44%, transparent);
}

.upgrade-current-stats {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
}

.upgrade-current-stat {
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding: 12px;
    border-radius: 14px;
    background: color-mix(in srgb, var(--surface) 90%, var(--background-muted));
    border: 1px solid color-mix(in srgb, var(--line-strong) 28%, transparent);
}

.upgrade-current-stat span {
    color: var(--muted);
    font-size: 0.84rem;
    line-height: 1.4;
}

.upgrade-current-stat strong {
    color: var(--text);
    font-size: 0.98rem;
    line-height: 1.3;
}

.upgrade-current-stat strong.is-success {
    color: var(--success);
}

.upgrade-current-stat strong.is-warning {
    color: var(--warning);
}

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

.upgrade-plan-card {
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    gap: 20px;
    min-height: 100%;
    padding: 30px;
    transition:
        transform 200ms ease,
        box-shadow 200ms ease,
        border-color 200ms ease;
}

.upgrade-plan-card::after {
    content: "";
    position: absolute;
    inset: auto -48px -82px auto;
    width: 220px;
    height: 220px;
    border-radius: 999px;
    pointer-events: none;
    filter: blur(18px);
    opacity: 0.82;
}

.upgrade-plan-card-plus {
    border-color: color-mix(in srgb, var(--plus) 28%, var(--line));
    background:
        radial-gradient(circle at top right, color-mix(in srgb, var(--plus-soft) 72%, transparent) 0, transparent 40%),
        linear-gradient(180deg, color-mix(in srgb, var(--surface) 88%, var(--plus-soft)) 0%, var(--surface) 100%);
    box-shadow:
        0 0 0 1px color-mix(in srgb, var(--plus-soft) 38%, transparent),
        0 24px 54px color-mix(in srgb, var(--plus-soft) 22%, transparent);
}

.upgrade-plan-card-plus::after {
    background: color-mix(in srgb, var(--plus-soft) 58%, transparent);
}

.upgrade-plan-card-pro {
    border-color: color-mix(in srgb, var(--pro) 28%, var(--line));
    background:
        radial-gradient(circle at top right, color-mix(in srgb, var(--pro-soft) 74%, transparent) 0, transparent 40%),
        linear-gradient(180deg, color-mix(in srgb, var(--surface) 86%, var(--pro-soft)) 0%, var(--surface) 100%);
    box-shadow:
        0 0 0 1px color-mix(in srgb, var(--pro-soft) 40%, transparent),
        0 24px 54px color-mix(in srgb, var(--pro-soft) 24%, transparent);
}

.upgrade-plan-card-pro::after {
    background: color-mix(in srgb, var(--pro-soft) 60%, transparent);
}

.upgrade-plan-card:hover {
    transform: translateY(-8px);
}

.upgrade-plan-card.is-current {
    transform: translateY(-4px);
}

.upgrade-plan-card.is-current .status-chip {
    box-shadow: 0 0 0 1px color-mix(in srgb, var(--success) 18%, transparent);
}

.upgrade-plan-card-plus:hover,
.upgrade-plan-card-plus.is-current {
    box-shadow:
        0 0 0 1px color-mix(in srgb, var(--plus-soft) 42%, transparent),
        0 32px 76px color-mix(in srgb, var(--plus-soft) 28%, transparent);
}

.upgrade-plan-card-pro:hover,
.upgrade-plan-card-pro.is-current {
    box-shadow:
        0 0 0 1px color-mix(in srgb, var(--pro-soft) 46%, transparent),
        0 34px 78px color-mix(in srgb, var(--pro-soft) 30%, transparent);
}

.upgrade-plan-topline {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
}

.upgrade-plan-kicker {
    display: inline-flex;
    align-items: center;
    min-height: 30px;
    padding: 0 12px;
    border-radius: 999px;
    font-size: 0.78rem;
    font-weight: 800;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.upgrade-plan-card-plus .upgrade-plan-kicker {
    background: color-mix(in srgb, var(--plus-soft) 82%, var(--surface));
    color: var(--plus);
}

.upgrade-plan-card-pro .upgrade-plan-kicker {
    background: color-mix(in srgb, var(--pro-soft) 82%, var(--surface));
    color: var(--pro);
}

.upgrade-plan-title-wrap {
    display: flex;
    flex-direction: column;
    gap: 10px;
    max-width: 22ch;
}

.upgrade-plan-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 20px;
}

.upgrade-plan-head h2 {
    margin: 0;
}

.upgrade-plan-tagline {
    color: var(--muted);
    line-height: 1.6;
}

.upgrade-plan-price-block {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 6px;
}

.upgrade-plan-price {
    font-size: clamp(2rem, 4vw, 2.5rem);
    font-weight: 800;
    white-space: nowrap;
    line-height: 0.96;
    letter-spacing: -0.05em;
}

.upgrade-plan-period {
    color: var(--muted);
    font-size: 0.92rem;
    font-weight: 700;
}

.upgrade-plan-limit-pill {
    display: inline-flex;
    align-items: center;
    align-self: flex-start;
    min-height: 38px;
    padding: 0 14px;
    border-radius: 999px;
    font-size: 0.92rem;
    font-weight: 700;
}

.upgrade-plan-card-plus .upgrade-plan-limit-pill {
    background: color-mix(in srgb, var(--plus-soft) 82%, var(--surface));
    color: var(--plus);
}

.upgrade-plan-card-pro .upgrade-plan-limit-pill {
    background: color-mix(in srgb, var(--pro-soft) 82%, var(--surface));
    color: var(--pro);
}

.upgrade-plan-description {
    color: var(--text);
    line-height: 1.65;
}

.upgrade-plan-points {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.upgrade-plan-points span {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    color: var(--text);
    line-height: 1.55;
}

.upgrade-plan-points span::before {
    content: "";
    width: 8px;
    height: 8px;
    border-radius: 999px;
    flex-shrink: 0;
    margin-top: 0.42em;
}

.upgrade-plan-card-plus .upgrade-plan-points span::before {
    background: var(--plus);
    box-shadow: 0 0 0 6px color-mix(in srgb, var(--plus-soft) 36%, transparent);
}

.upgrade-plan-card-pro .upgrade-plan-points span::before {
    background: var(--pro);
    box-shadow: 0 0 0 6px color-mix(in srgb, var(--pro-soft) 34%, transparent);
}

.upgrade-plan-actions {
    margin-top: auto;
}

.upgrade-plan-disclaimer {
    margin: 12px 4px 0;
    color: var(--text-muted);
    font-size: 0.86rem;
    line-height: 1.5;
    text-align: center;
}

.upgrade-plan-button {
    width: 100%;
    min-height: 48px;
    border-radius: 18px;
    border: none;
    color: #fff;
    font-weight: 700;
    box-shadow: var(--shadow-sm);
}

.upgrade-plan-button.upgrade-plan-button-plus {
    background: linear-gradient(135deg, var(--plus) 0%, color-mix(in srgb, var(--warning) 72%, #fff) 100%);
}

.upgrade-plan-button.upgrade-plan-button-plus:hover {
    background: linear-gradient(135deg, color-mix(in srgb, var(--plus) 88%, #000) 0%, color-mix(in srgb, var(--warning) 82%, #fff) 100%);
}

.upgrade-plan-button.upgrade-plan-button-pro {
    background: linear-gradient(135deg, var(--pro) 0%, color-mix(in srgb, #67d6ff 76%, #fff) 100%);
}

.upgrade-plan-button.upgrade-plan-button-pro:hover {
    background: linear-gradient(135deg, color-mix(in srgb, var(--pro) 86%, #000) 0%, color-mix(in srgb, #67d6ff 84%, #fff) 100%);
}

.request-pack-section {
    display: flex;
    flex-direction: column;
    gap: 22px;
    margin-top: 24px;
    padding: 28px;
    background:
        radial-gradient(circle at top right, color-mix(in srgb, var(--brand-soft) 28%, transparent) 0, transparent 34%),
        linear-gradient(180deg, color-mix(in srgb, var(--surface) 92%, var(--background-muted)) 0%, var(--surface) 100%);
}

.request-pack-head {
    display: flex;
    flex-direction: column;
    gap: 10px;
    max-width: 64ch;
}

.request-pack-head h2 {
    margin: 0;
}

.request-pack-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px;
}

.request-pack-card {
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    gap: 18px;
    padding: 24px;
    border-radius: 22px;
    border: 1px solid color-mix(in srgb, var(--line-strong) 64%, var(--line));
    background:
        radial-gradient(circle at top right, color-mix(in srgb, var(--brand-soft) 30%, transparent) 0, transparent 42%),
        linear-gradient(180deg, color-mix(in srgb, var(--surface) 94%, var(--background-muted)) 0%, var(--surface) 100%);
    box-shadow:
        0 0 0 1px color-mix(in srgb, var(--line-strong) 22%, transparent),
        0 18px 40px rgba(15, 23, 42, 0.08);
    transition:
        transform 220ms ease,
        box-shadow 220ms ease,
        border-color 220ms ease;
}

.request-pack-card::after {
    content: "";
    position: absolute;
    inset: auto -54px -90px auto;
    width: 200px;
    height: 200px;
    border-radius: 999px;
    filter: blur(22px);
    opacity: 0.85;
    pointer-events: none;
}

.request-pack-card-pack_10 {
    border-color: color-mix(in srgb, var(--plus) 20%, var(--line));
}

.request-pack-card-pack_10::after {
    background: color-mix(in srgb, var(--plus-soft) 54%, transparent);
}

.request-pack-card-pack_20 {
    border-color: color-mix(in srgb, var(--warning) 24%, var(--line));
}

.request-pack-card-pack_20::after {
    background: color-mix(in srgb, var(--warning-soft) 54%, transparent);
}

.request-pack-card-pack_50 {
    border-color: color-mix(in srgb, var(--pro) 24%, var(--line));
}

.request-pack-card-pack_50::after {
    background: color-mix(in srgb, var(--pro-soft) 58%, transparent);
}

.request-pack-card:hover {
    transform: translateY(-6px);
    box-shadow:
        0 0 0 1px color-mix(in srgb, var(--brand-soft) 32%, transparent),
        0 28px 56px rgba(15, 23, 42, 0.12);
}

.request-pack-topline {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    flex-wrap: wrap;
}

.request-pack-kicker,
.request-pack-chip {
    display: inline-flex;
    align-items: center;
    min-height: 30px;
    padding: 0 12px;
    border-radius: 999px;
    font-size: 0.76rem;
    font-weight: 800;
    letter-spacing: 0.06em;
}

.request-pack-kicker {
    color: color-mix(in srgb, var(--warning) 88%, #fff);
    background: color-mix(in srgb, var(--warning-soft) 54%, var(--surface));
    text-transform: uppercase;
}

.request-pack-chip {
    color: var(--muted);
    background: color-mix(in srgb, var(--surface-muted) 88%, var(--surface));
    border: 1px solid color-mix(in srgb, var(--line-strong) 22%, transparent);
}

.request-pack-copy {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.request-pack-copy strong {
    font-size: 1.12rem;
    line-height: 1.1;
}

.request-pack-copy span {
    color: var(--muted);
    line-height: 1.6;
}

.request-pack-price-block {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.request-pack-price {
    font-size: 2rem;
    font-weight: 800;
    letter-spacing: -0.04em;
    line-height: 0.96;
}

.request-pack-price-note {
    color: var(--muted);
    font-size: 0.88rem;
    font-weight: 700;
}

.request-pack-actions {
    margin-top: auto;
}

.request-pack-button {
    width: 100%;
    min-height: 46px;
    border-radius: 18px;
    border-color: color-mix(in srgb, var(--brand) 18%, var(--line));
    background: color-mix(in srgb, var(--surface) 86%, var(--brand-soft));
    font-weight: 700;
    box-shadow: 0 12px 24px color-mix(in srgb, var(--brand-soft) 18%, transparent);
}

.request-pack-button:hover {
    background: color-mix(in srgb, var(--surface) 78%, var(--brand-soft));
    border-color: color-mix(in srgb, var(--brand) 28%, var(--line));
}

.editor-intro {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.tool-hub-hero {
    position: relative;
    overflow: hidden;
    padding: 28px;
    background:
        radial-gradient(circle at top left, color-mix(in srgb, var(--brand-soft) 24%, transparent) 0, transparent 42%),
        radial-gradient(circle at right center, color-mix(in srgb, var(--warning-soft) 18%, transparent) 0, transparent 36%),
        var(--surface);
}

.tool-hub-brand {
    display: flex;
    align-items: center;
    gap: 22px;
}

.tool-hub-brand-mark {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 88px;
    height: 88px;
    border-radius: 28px;
    border: 1px solid color-mix(in srgb, var(--brand) 20%, var(--line));
    background: color-mix(in srgb, var(--brand-soft) 18%, var(--surface));
    box-shadow: 0 18px 42px color-mix(in srgb, var(--brand-soft) 16%, transparent);
    flex-shrink: 0;
}

.tool-hub-brand-mark img {
    width: 72px;
    height: 72px;
    object-fit: contain;
}

.tool-hub-brand-copy h1 {
    margin-top: 2px;
}

.tool-hub-split {
    height: 1px;
    margin-top: 22px;
    background:
        linear-gradient(
            90deg,
            transparent 0%,
            color-mix(in srgb, var(--brand) 22%, var(--line)) 16%,
            color-mix(in srgb, var(--warning) 18%, var(--line)) 50%,
            color-mix(in srgb, var(--brand) 22%, var(--line)) 84%,
            transparent 100%
        );
}

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

.tool-hub-card {
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: flex-start;
    gap: 18px;
    min-height: 310px;
    padding: 28px;
    color: inherit;
    text-decoration: none;
    transition:
        transform 180ms ease,
        border-color 180ms ease,
        box-shadow 180ms ease,
        background-color 180ms ease;
}

.tool-hub-card::before {
    content: "";
    position: absolute;
    inset: auto auto 0 -18%;
    width: 180px;
    height: 180px;
    border-radius: 999px;
    background: color-mix(in srgb, var(--brand-soft) 20%, transparent);
    filter: blur(10px);
    pointer-events: none;
}

.tool-hub-card:hover {
    transform: translateY(-8px);
    border-color: color-mix(in srgb, var(--brand) 26%, var(--line));
    box-shadow: 0 30px 56px color-mix(in srgb, var(--brand-soft) 18%, transparent);
}

.tool-hub-card-primary {
    border-color: color-mix(in srgb, var(--brand) 24%, var(--line));
    background:
        radial-gradient(circle at top right, color-mix(in srgb, var(--brand-soft) 22%, transparent) 0, transparent 42%),
        linear-gradient(180deg, color-mix(in srgb, var(--surface) 86%, var(--brand-soft)) 0%, var(--surface) 100%);
    box-shadow:
        0 0 0 1px color-mix(in srgb, var(--brand-soft) 45%, transparent),
        0 0 0 6px color-mix(in srgb, var(--brand-soft) 16%, transparent),
        0 26px 54px color-mix(in srgb, var(--brand-soft) 20%, transparent);
}

.tool-hub-card-primary::after {
    content: "";
    position: absolute;
    inset: -18% -12% auto auto;
    width: 220px;
    height: 220px;
    border-radius: 999px;
    background:
        radial-gradient(circle at center, color-mix(in srgb, var(--brand-soft) 42%, transparent) 0, transparent 64%);
    filter: blur(14px);
    opacity: 0.78;
    pointer-events: none;
    transition:
        opacity 180ms ease,
        transform 180ms ease,
        filter 180ms ease;
}

.tool-hub-card-primary:focus-visible {
    outline: none;
    border-color: color-mix(in srgb, var(--brand) 38%, var(--line));
    box-shadow:
        0 0 0 3px color-mix(in srgb, var(--brand-soft) 46%, transparent),
        0 0 0 10px color-mix(in srgb, var(--brand-soft) 18%, transparent),
        0 34px 64px color-mix(in srgb, var(--brand-soft) 24%, transparent);
}

.tool-hub-card-primary .tool-hub-card-icon {
    border-color: color-mix(in srgb, var(--brand) 24%, var(--line));
    background: color-mix(in srgb, var(--brand-soft) 24%, var(--surface));
}

.tool-hub-card-primary:hover,
.tool-hub-card-primary:focus-visible {
    border-color: color-mix(in srgb, var(--brand) 34%, var(--line));
    box-shadow:
        0 0 0 1px color-mix(in srgb, var(--brand-soft) 55%, transparent),
        0 0 0 10px color-mix(in srgb, var(--brand-soft) 18%, transparent),
        0 34px 64px color-mix(in srgb, var(--brand-soft) 24%, transparent);
}

.tool-hub-card-primary:hover::after,
.tool-hub-card-primary:focus-visible::after {
    opacity: 1;
    transform: scale(1.08);
    filter: blur(18px);
}

.tool-hub-card-icon {
    position: relative;
    z-index: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 58px;
    height: 58px;
    border-radius: 18px;
    border: 1px solid var(--line);
    background: var(--surface-muted);
    flex-shrink: 0;
}

.tool-hub-card-icon svg {
    width: 26px;
    height: 26px;
}

.tool-hub-card-copy {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    gap: 10px;
    flex: 1;
}

.tool-hub-card-copy h2 {
    font-size: 1.5rem;
    line-height: 1.2;
}

.tool-hub-card-cta,
.tool-hub-card-status {
    margin-top: auto;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    align-self: flex-start;
    min-height: 36px;
    padding: 0 14px;
    border-radius: 999px;
    border: 1px solid var(--line);
    font-size: 0.82rem;
    font-weight: 700;
}

.tool-hub-card-cta {
    color: var(--text);
    background: color-mix(in srgb, var(--brand-soft) 22%, var(--surface));
}

.tool-hub-card-primary .tool-hub-card-cta {
    position: relative;
    padding-right: 42px;
    border-color: color-mix(in srgb, var(--brand) 24%, var(--line));
    background: color-mix(in srgb, var(--brand-soft) 28%, var(--surface));
    box-shadow: 0 12px 24px color-mix(in srgb, var(--brand-soft) 10%, transparent);
    transition:
        transform 180ms ease,
        border-color 180ms ease,
        background-color 180ms ease;
}

.tool-hub-card-primary .tool-hub-card-cta::after {
    content: "";
    position: absolute;
    right: 16px;
    top: 50%;
    width: 8px;
    height: 8px;
    border-top: 2px solid currentColor;
    border-right: 2px solid currentColor;
    transform: translateY(-50%) rotate(45deg);
    transition: transform 180ms ease;
}

.tool-hub-card-primary:hover .tool-hub-card-cta::after,
.tool-hub-card-primary:focus-visible .tool-hub-card-cta::after {
    transform: translate(4px, -50%) rotate(45deg);
}

.tool-hub-card-primary:hover .tool-hub-card-cta,
.tool-hub-card-primary:focus-visible .tool-hub-card-cta {
    transform: translateX(4px);
    border-color: color-mix(in srgb, var(--brand) 34%, var(--line));
    background: color-mix(in srgb, var(--brand-soft) 34%, var(--surface));
}

.tool-hub-card-disabled {
    opacity: 0.86;
    cursor: default;
    background:
        radial-gradient(circle at top left, color-mix(in srgb, var(--surface-muted) 70%, transparent) 0, transparent 44%),
        linear-gradient(135deg, color-mix(in srgb, var(--surface) 82%, var(--surface-muted)) 0%, var(--surface) 100%);
}

.tool-hub-card-disabled:hover {
    transform: none;
    border-color: var(--line);
    box-shadow: var(--shadow-sm);
}

.tool-hub-card-status {
    color: var(--warning);
    border-color: color-mix(in srgb, var(--warning) 28%, var(--line));
    background: var(--warning-soft);
}

.app-home-info-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 20px;
}

.app-home-info-shell {
    position: relative;
    overflow: hidden;
    display: grid;
    grid-template-columns: minmax(220px, 280px) minmax(0, 1fr);
    gap: 24px;
    padding: 28px;
    background:
        radial-gradient(circle at top left, color-mix(in srgb, var(--brand-soft) 22%, transparent) 0, transparent 32%),
        radial-gradient(circle at bottom right, color-mix(in srgb, var(--success-soft) 30%, transparent) 0, transparent 34%),
        var(--surface);
}

.app-home-insight-visual {
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 18px;
    min-height: 100%;
    padding: 20px;
    border-radius: 24px;
    border: 1px solid color-mix(in srgb, var(--brand) 18%, var(--line));
    background:
        linear-gradient(180deg, color-mix(in srgb, var(--surface) 74%, var(--brand-soft)) 0%, var(--surface-muted) 100%);
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.2),
        0 20px 40px color-mix(in srgb, var(--brand-soft) 10%, transparent);
}

.app-home-insight-orbit {
    position: relative;
    width: 150px;
    height: 150px;
    margin: 0 auto;
    border-radius: 999px;
    border: 1px dashed color-mix(in srgb, var(--brand) 26%, var(--line));
    background:
        radial-gradient(circle at center, color-mix(in srgb, var(--brand-soft) 52%, var(--surface)) 0, transparent 48%);
}

.app-home-insight-orbit::before,
.app-home-insight-orbit::after {
    content: "";
    position: absolute;
    inset: 18px;
    border-radius: inherit;
    border: 1px solid color-mix(in srgb, var(--line-strong) 58%, transparent);
}

.app-home-insight-orbit::after {
    inset: 38px;
}

.app-home-insight-dot {
    position: absolute;
    width: 18px;
    height: 18px;
    border-radius: 999px;
    border: 3px solid var(--surface);
    box-shadow: 0 10px 18px rgba(15, 23, 42, 0.16);
}

.app-home-insight-dot-brand {
    top: 10px;
    left: calc(50% - 9px);
    background: var(--brand);
}

.app-home-insight-dot-text {
    right: 18px;
    bottom: 28px;
    background: #2563eb;
}

.app-home-insight-dot-success {
    left: 16px;
    bottom: 26px;
    background: var(--success);
}

.app-home-insight-stack {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.app-home-insight-chip {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 36px;
    padding: 0 14px;
    border-radius: 999px;
    border: 1px solid var(--line);
    background: color-mix(in srgb, var(--surface) 88%, var(--surface-muted));
    color: var(--text);
    font-size: 0.82rem;
    font-weight: 700;
}

.app-home-info-card {
    display: flex;
    flex-direction: column;
    gap: 12px;
    min-height: 220px;
    padding: 26px;
}

.app-home-info-card-accent {
    border-color: color-mix(in srgb, var(--brand) 24%, var(--line));
    background:
        radial-gradient(circle at top right, color-mix(in srgb, var(--brand-soft) 26%, transparent) 0, transparent 48%),
        linear-gradient(180deg, color-mix(in srgb, var(--surface) 88%, var(--brand-soft)) 0%, var(--surface) 100%);
    box-shadow:
        0 0 0 1px color-mix(in srgb, var(--brand-soft) 32%, transparent),
        0 20px 42px color-mix(in srgb, var(--brand-soft) 12%, transparent);
}

.app-home-info-card:not(.app-home-info-card-accent) {
    background:
        linear-gradient(180deg, color-mix(in srgb, var(--surface) 88%, var(--surface-muted)) 0%, var(--surface) 100%);
}

.app-home-info-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    border-radius: 16px;
    border: 1px solid color-mix(in srgb, var(--brand) 18%, var(--line));
    background: color-mix(in srgb, var(--brand-soft) 18%, var(--surface));
    color: var(--text);
}

.app-home-info-icon svg {
    width: 22px;
    height: 22px;
}

.app-home-example {
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    gap: 22px;
    padding: 32px;
    background:
        radial-gradient(circle at top center, color-mix(in srgb, var(--brand-soft) 18%, transparent) 0, transparent 36%),
        linear-gradient(180deg, color-mix(in srgb, var(--surface) 80%, var(--surface-muted)) 0%, var(--surface) 100%);
}

.app-home-example::before {
    content: "";
    position: absolute;
    inset: auto -10% -26px auto;
    width: 220px;
    height: 220px;
    border-radius: 999px;
    background: color-mix(in srgb, var(--brand-soft) 20%, transparent);
    filter: blur(12px);
    pointer-events: none;
}

.app-home-example-head {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 18px;
}

.app-home-example-head > div {
    max-width: 820px;
    margin: 0 auto;
    text-align: center;
}

.app-home-compare-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 72px minmax(0, 1fr);
    align-items: stretch;
    gap: 20px;
}

.app-home-compare-card {
    display: flex;
    flex-direction: column;
    gap: 18px;
    padding: 24px;
    border: 1px solid var(--line);
    border-radius: 22px;
    background: var(--surface-muted);
}

.app-home-compare-card-success {
    border-color: color-mix(in srgb, var(--success) 24%, var(--line));
    background:
        radial-gradient(circle at top right, color-mix(in srgb, var(--success-soft) 42%, transparent) 0, transparent 50%),
        var(--surface-muted);
}

.app-home-compare-bridge {
    display: flex;
    align-items: center;
    justify-content: center;
}

.app-home-compare-bridge-core {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 62px;
    height: 62px;
    border-radius: 20px;
    border: 1px solid color-mix(in srgb, var(--brand) 24%, var(--line));
    background:
        linear-gradient(180deg, color-mix(in srgb, var(--surface) 82%, var(--brand-soft)) 0%, var(--surface) 100%);
    color: var(--text);
    box-shadow:
        0 0 0 1px color-mix(in srgb, var(--brand-soft) 28%, transparent),
        0 18px 38px color-mix(in srgb, var(--brand-soft) 16%, transparent);
}

.app-home-compare-bridge-core svg {
    width: 28px;
    height: 28px;
}

.app-home-compare-top {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
}

.app-home-score {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 6px;
    flex-shrink: 0;
    text-align: right;
}

.app-home-score-label {
    color: var(--muted);
    font-size: 0.74rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.app-home-score strong {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 56px;
    padding: 0 18px;
    border-radius: 18px;
    border: 1px solid var(--line);
    font-size: 1.55rem;
    font-weight: 800;
    letter-spacing: -0.04em;
}

.app-home-score-ai strong {
    color: #b91c1c;
    border-color: rgba(185, 28, 28, 0.22);
    background: rgba(254, 226, 226, 0.82);
}

html[data-theme="dark"] .app-home-score-ai strong {
    color: #fca5a5;
    border-color: rgba(248, 113, 113, 0.26);
    background: rgba(127, 29, 29, 0.28);
}

.app-home-score-human strong {
    color: #15803d;
    border-color: rgba(21, 128, 61, 0.22);
    background: rgba(220, 252, 231, 0.88);
}

html[data-theme="dark"] .app-home-score-human strong {
    color: #86efac;
    border-color: rgba(74, 222, 128, 0.28);
    background: rgba(20, 83, 45, 0.3);
}

.app-home-compare-text {
    display: flex;
    flex-direction: column;
    gap: 14px;
    color: var(--text);
    line-height: 1.72;
    font-size: 0.98rem;
}

.workflow-strip-app {
    position: relative;
    overflow: hidden;
    background:
        radial-gradient(circle at top left, rgba(251, 146, 60, 0.12) 0, transparent 30%),
        radial-gradient(circle at bottom right, rgba(74, 222, 128, 0.12) 0, transparent 28%),
        linear-gradient(180deg, color-mix(in srgb, var(--surface) 80%, var(--background-muted)) 0%, var(--surface) 100%);
}

.workflow-strip-app::before {
    content: "";
    position: absolute;
    left: 60px;
    right: 60px;
    top: 122px;
    height: 1px;
    background:
        linear-gradient(
            90deg,
            transparent 0%,
            color-mix(in srgb, var(--brand) 24%, var(--line)) 18%,
            color-mix(in srgb, var(--success) 22%, var(--line)) 50%,
            color-mix(in srgb, var(--brand) 24%, var(--line)) 82%,
            transparent 100%
        );
    pointer-events: none;
}

.workflow-strip-app .workflow-grid {
    gap: 20px;
}

.workflow-strip-app .workflow-step {
    position: relative;
    background: color-mix(in srgb, var(--surface) 88%, var(--surface-muted));
    box-shadow: 0 18px 38px rgba(15, 23, 42, 0.05);
}

.workflow-step-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 46px;
    height: 46px;
    margin-bottom: 14px;
    border-radius: 16px;
    border: 1px solid color-mix(in srgb, var(--brand) 18%, var(--line));
    background: color-mix(in srgb, var(--brand-soft) 18%, var(--surface));
}

.workflow-step-icon svg {
    width: 22px;
    height: 22px;
}

.app-home-story {
    position: relative;
    overflow: hidden;
    display: grid;
    grid-template-columns: minmax(0, 1.12fr) minmax(360px, 0.88fr);
    gap: 34px;
    padding: 36px;
    background:
        radial-gradient(circle at top left, color-mix(in srgb, var(--brand-soft) 22%, transparent) 0, transparent 34%),
        radial-gradient(circle at bottom right, color-mix(in srgb, var(--success-soft) 24%, transparent) 0, transparent 30%),
        linear-gradient(180deg, color-mix(in srgb, var(--surface) 88%, var(--background-muted)) 0%, var(--surface) 100%);
}

.app-home-story::before {
    content: "";
    position: absolute;
    inset: auto auto -120px -80px;
    width: 280px;
    height: 280px;
    border-radius: 999px;
    background: color-mix(in srgb, var(--brand-soft) 20%, transparent);
    filter: blur(18px);
    pointer-events: none;
}

.app-home-story-copy {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 30px;
}

.app-home-story-intro {
    display: flex;
    flex-direction: column;
    gap: 16px;
    max-width: 780px;
}

.app-home-story-kicker {
    display: inline-flex;
    align-items: center;
    align-self: flex-start;
    min-height: 0;
    padding: 0;
    margin: 0;
    border: none;
    background: none;
    color: color-mix(in srgb, var(--brand) 78%, var(--text));
    font-size: 0.92rem;
    font-weight: 800;
    letter-spacing: 0.12em;
}

.app-home-story-copy h2 {
    max-width: 23ch;
    margin: 0;
    font-size: clamp(1.95rem, 3vw, 3.05rem);
    line-height: 1.02;
    letter-spacing: -0.045em;
    text-wrap: balance;
}

.app-home-story-lead {
    max-width: 62ch;
    margin: 0;
    font-size: 1rem;
    line-height: 1.76;
    color: color-mix(in srgb, var(--muted) 88%, var(--text));
}

.app-home-story-list {
    display: flex;
    flex-direction: column;
    gap: 0;
    margin-top: 2px;
}

.app-home-story-row {
    display: grid;
    grid-template-columns: 46px minmax(0, 1fr);
    gap: 18px;
    align-items: flex-start;
    padding: 18px 0;
    border-top: 1px solid color-mix(in srgb, var(--line-strong) 56%, transparent);
}

.app-home-story-row:last-child {
    padding-bottom: 0;
}

.app-home-story-row h3 {
    margin-bottom: 6px;
    font-size: 1.08rem;
}

.app-home-story-row p {
    color: var(--muted);
    line-height: 1.65;
}

.app-home-story-index {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    border-radius: 14px;
    border: 1px solid color-mix(in srgb, var(--brand) 24%, var(--line));
    background: color-mix(in srgb, var(--brand-soft) 18%, var(--surface));
    color: var(--text);
    font-size: 0.78rem;
    font-weight: 800;
    letter-spacing: 0.08em;
}

.app-home-story-detectors {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 6px;
}

.app-home-story-detectors span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 38px;
    padding: 0 16px;
    border-radius: 999px;
    border: 1px solid color-mix(in srgb, var(--brand) 18%, var(--line));
    background: color-mix(in srgb, var(--surface) 86%, var(--surface-muted));
    font-size: 0.82rem;
    font-weight: 700;
}

.app-home-story-visual {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

.app-home-story-stage {
    position: relative;
    width: min(100%, 620px);
    min-height: 480px;
    border-radius: 34px;
    border: 1px solid color-mix(in srgb, var(--brand) 20%, var(--line));
    background:
        radial-gradient(circle at top center, color-mix(in srgb, var(--brand-soft) 24%, transparent) 0, transparent 34%),
        linear-gradient(135deg, color-mix(in srgb, var(--surface) 92%, var(--background-muted)) 0%, var(--surface-muted) 100%);
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.16),
        0 28px 54px color-mix(in srgb, var(--brand-soft) 14%, transparent);
    overflow: hidden;
}

.app-home-story-stage::before {
    content: "";
    position: absolute;
    inset: 24px;
    border-radius: 26px;
    border: 1px dashed color-mix(in srgb, var(--brand) 14%, var(--line));
    pointer-events: none;
}

.app-home-story-logo {
    position: absolute;
    top: 26px;
    right: 26px;
    width: 84px;
    height: 84px;
    object-fit: contain;
    opacity: 0.95;
    filter: saturate(0.92);
}

.app-home-story-sheet {
    position: absolute;
    width: min(46%, 260px);
    min-height: 260px;
    padding: 54px 20px 22px;
    border-radius: 26px;
    border: 1px solid var(--line);
    backdrop-filter: blur(8px);
    box-shadow: 0 22px 40px rgba(15, 23, 42, 0.12);
}

.app-home-story-sheet-source {
    top: 80px;
    left: 34px;
    transform: rotate(-8deg);
    background:
        linear-gradient(180deg, color-mix(in srgb, var(--surface) 90%, var(--error-soft)) 0%, var(--surface) 100%);
}

.app-home-story-sheet-result {
    right: 38px;
    bottom: 52px;
    transform: rotate(7deg);
    background:
        linear-gradient(180deg, color-mix(in srgb, var(--surface) 90%, var(--success-soft)) 0%, var(--surface) 100%);
}

.app-home-story-sheet-label {
    position: absolute;
    top: 18px;
    left: 18px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 34px;
    padding: 0 14px;
    border-radius: 999px;
    font-size: 0.78rem;
    font-weight: 800;
    letter-spacing: 0.06em;
}

.app-home-story-sheet-label-ai {
    color: #b91c1c;
    background: rgba(254, 226, 226, 0.92);
}

.app-home-story-sheet-label-human {
    color: #15803d;
    background: rgba(220, 252, 231, 0.94);
}

html[data-theme="dark"] .app-home-story-sheet-label-ai {
    color: #fca5a5;
    background: rgba(127, 29, 29, 0.32);
}

html[data-theme="dark"] .app-home-story-sheet-label-human {
    color: #86efac;
    background: rgba(20, 83, 45, 0.34);
}

.app-home-story-lines {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.app-home-story-lines span {
    display: block;
    height: 12px;
    border-radius: 999px;
    background: color-mix(in srgb, var(--line-strong) 54%, transparent);
}

.app-home-story-lines .is-long {
    width: 88%;
}

.app-home-story-lines .is-mid {
    width: 72%;
}

.app-home-story-lines .is-short {
    width: 58%;
}

.app-home-story-glow {
    position: absolute;
    inset: 50% auto auto 50%;
    width: 170px;
    height: 170px;
    transform: translate(-50%, -50%);
    border-radius: 999px;
    background:
        radial-gradient(circle at center, color-mix(in srgb, var(--brand-soft) 38%, transparent) 0, transparent 62%);
    filter: blur(14px);
}

.app-home-story-float {
    position: absolute;
    display: inline-flex;
    align-items: center;
    min-height: 38px;
    padding: 0 16px;
    border-radius: 999px;
    border: 1px solid color-mix(in srgb, var(--line-strong) 56%, transparent);
    background: color-mix(in srgb, var(--surface) 88%, transparent);
    box-shadow: 0 16px 28px rgba(15, 23, 42, 0.1);
    font-size: 0.8rem;
    font-weight: 700;
    backdrop-filter: blur(10px);
}

.app-home-story-float-top {
    top: 36px;
    left: 36px;
}

.app-home-story-float-bottom {
    right: 24px;
    bottom: 24px;
}

.app-home-example {
    position: relative;
    overflow: hidden;
    padding: 34px 0 0;
    background:
        radial-gradient(circle at top center, color-mix(in srgb, var(--brand-soft) 15%, transparent) 0, transparent 34%),
        linear-gradient(180deg, color-mix(in srgb, var(--surface) 82%, var(--background-muted)) 0%, var(--surface) 100%);
}

.app-home-example::before {
    content: "";
    position: absolute;
    inset: auto 0 0 auto;
    width: 260px;
    height: 260px;
    border-radius: 999px;
    background: color-mix(in srgb, var(--success-soft) 24%, transparent);
    filter: blur(18px);
    pointer-events: none;
}

.app-home-example-head {
    padding: 0 32px 26px;
}

.app-home-example-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 84px minmax(0, 1fr);
    align-items: stretch;
    min-height: 100%;
}

.app-home-example-pane {
    position: relative;
    padding: 30px 32px 34px;
}

.app-home-example-pane-ai {
    background:
        linear-gradient(180deg, color-mix(in srgb, var(--surface) 92%, var(--error-soft)) 0%, var(--surface-muted) 100%);
}

.app-home-example-pane-human {
    background:
        linear-gradient(180deg, color-mix(in srgb, var(--surface) 92%, var(--success-soft)) 0%, var(--surface-muted) 100%);
}

.app-home-example-pane-top {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 18px;
    margin-bottom: 18px;
}

.app-home-example-divider {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

.app-home-example-divider::before {
    content: "";
    position: absolute;
    top: 26px;
    bottom: 26px;
    width: 1px;
    background: linear-gradient(180deg, transparent 0%, color-mix(in srgb, var(--brand) 18%, var(--line)) 18%, color-mix(in srgb, var(--brand) 18%, var(--line)) 82%, transparent 100%);
}

.app-home-example-divider-core {
    position: relative;
    z-index: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 62px;
    height: 62px;
    border-radius: 20px;
    border: 1px solid color-mix(in srgb, var(--brand) 24%, var(--line));
    background:
        linear-gradient(180deg, color-mix(in srgb, var(--surface) 84%, var(--brand-soft)) 0%, var(--surface) 100%);
    box-shadow:
        0 0 0 1px color-mix(in srgb, var(--brand-soft) 26%, transparent),
        0 18px 36px color-mix(in srgb, var(--brand-soft) 14%, transparent);
}

.app-home-example-divider-core svg {
    width: 28px;
    height: 28px;
}

.app-home-example-text {
    display: flex;
    flex-direction: column;
    gap: 14px;
    line-height: 1.72;
    font-size: 0.98rem;
}

.app-home-flow {
    position: relative;
    overflow: hidden;
    padding: 36px;
    background:
        radial-gradient(circle at top left, rgba(251, 146, 60, 0.11) 0, transparent 30%),
        radial-gradient(circle at bottom right, rgba(74, 222, 128, 0.11) 0, transparent 28%),
        linear-gradient(180deg, color-mix(in srgb, var(--surface) 82%, var(--background-muted)) 0%, var(--surface) 100%);
}

.app-home-flow-head {
    max-width: 760px;
    margin: 0 auto 34px;
    text-align: center;
}

.app-home-flow-track {
    position: relative;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 28px;
}

.app-home-flow-line {
    position: absolute;
    left: 10%;
    right: 10%;
    top: 31px;
    height: 1px;
    background:
        linear-gradient(
            90deg,
            transparent 0%,
            color-mix(in srgb, var(--brand) 20%, var(--line)) 12%,
            color-mix(in srgb, var(--success) 18%, var(--line)) 50%,
            color-mix(in srgb, var(--brand) 20%, var(--line)) 88%,
            transparent 100%
        );
}

.app-home-flow-step {
    position: relative;
    z-index: 1;
    padding-top: 82px;
}

.app-home-flow-step-icon {
    position: absolute;
    top: 0;
    left: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 62px;
    height: 62px;
    border-radius: 20px;
    border: 1px solid color-mix(in srgb, var(--brand) 18%, var(--line));
    background: color-mix(in srgb, var(--surface) 86%, var(--brand-soft));
    box-shadow: 0 18px 32px color-mix(in srgb, var(--brand-soft) 12%, transparent);
}

.app-home-flow-step-icon svg {
    width: 26px;
    height: 26px;
}

.app-home-flow-step-number {
    display: inline-block;
    margin-bottom: 10px;
    color: var(--muted);
    font-size: 0.76rem;
    font-weight: 800;
    letter-spacing: 0.1em;
}

.app-home-flow-step h3 {
    margin-bottom: 8px;
}

.app-home-flow-step p {
    color: var(--muted);
    line-height: 1.65;
}

.editor-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    align-items: stretch;
}

.editor-card {
    display: flex;
    flex-direction: column;
    gap: 18px;
    height: 100%;
}

.editor-card.is-primary-panel {
    border-color: color-mix(in srgb, var(--brand) 24%, var(--line));
    box-shadow:
        0 0 0 1px color-mix(in srgb, var(--brand-soft) 38%, transparent),
        0 18px 42px color-mix(in srgb, var(--brand-soft) 18%, transparent);
}

.editor-card-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
}

.metric-group {
    display: flex;
    flex-wrap: nowrap;
    gap: 8px;
    justify-content: flex-end;
    align-items: center;
}

.editor-form {
    display: flex;
    flex-direction: column;
    gap: 18px;
    flex: 1;
}

.editor-textarea {
    min-height: 380px;
}

.editor-card-source.is-primary-panel .editor-textarea-source {
    border-color: color-mix(in srgb, var(--brand) 32%, var(--line));
    background: color-mix(in srgb, var(--brand-soft) 18%, var(--surface));
    box-shadow:
        0 0 0 4px color-mix(in srgb, var(--brand-soft) 32%, transparent),
        inset 0 1px 0 color-mix(in srgb, #ffffff 24%, transparent);
}

.editor-card-source.is-primary-panel .editor-textarea-source::placeholder {
    color: color-mix(in srgb, var(--text) 34%, var(--muted));
}

.editor-card-source.is-locked .editor-textarea-source {
    background: color-mix(in srgb, var(--surface-muted) 88%, var(--surface));
    border-color: color-mix(in srgb, var(--line-strong) 72%, var(--line));
    box-shadow: none;
}

.editor-toolbar {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 18px;
    flex-wrap: wrap;
}

.helper-text {
    max-width: 46ch;
    color: var(--muted);
    line-height: 1.6;
    font-size: 0.95rem;
}

.helper-text-error {
    color: var(--error);
}

.editor-inline-notice {
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding: 14px 16px;
    border-radius: 16px;
    border: 1px solid color-mix(in srgb, var(--brand) 24%, var(--line));
    background: color-mix(in srgb, var(--brand-soft) 22%, var(--surface));
}

.editor-inline-notice strong {
    color: var(--text);
    font-size: 0.96rem;
}

.editor-inline-notice p {
    color: var(--muted);
    font-size: 0.92rem;
    line-height: 1.55;
}

.editor-inline-notice span {
    color: var(--text);
    font-weight: 600;
}

.editor-inline-notice a {
    color: var(--brand);
}

.editor-inline-notice-warning {
    border-color: color-mix(in srgb, var(--warning) 26%, var(--line));
    background: color-mix(in srgb, var(--warning-soft) 42%, var(--surface));
}

.metric-chip.is-error {
    border-color: color-mix(in srgb, var(--error) 35%, var(--line));
    background: var(--error-soft);
    color: var(--error);
}

.copy-button {
    min-height: 34px;
    padding: 0 12px;
    border-radius: 999px;
    font-size: 0.8rem;
    font-weight: 700;
}

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

.support-note-card {
    padding: 16px;
    border: 1px solid var(--line);
    border-radius: 16px;
    background: var(--surface-muted);
}

.result-stack {
    display: flex;
    flex-direction: column;
    gap: 16px;
    flex: 1;
}

.result-textarea-wrap {
    position: relative;
}

.result-textarea {
    background: var(--surface-muted);
    transition:
        opacity 180ms ease,
        filter 180ms ease;
}

.result-textarea::placeholder {
    color: var(--muted);
}

.result-summary-card {
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 16px;
    border: 1px solid var(--line);
    border-radius: 16px;
    background: var(--surface-muted);
}

.result-summary-card.is-awaiting {
    border-style: dashed;
}

.result-summary-row {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    color: var(--muted);
    font-size: 0.92rem;
}

.result-summary-row strong {
    color: var(--text);
}

.analysis-score-mark {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 72px;
    height: 72px;
    border-radius: 20px;
    background: var(--surface-muted);
    border: 1px solid var(--line);
    font-size: 1.4rem;
    font-weight: 800;
}

.result-summary-copy {
    color: var(--muted);
    line-height: 1.6;
    font-size: 0.92rem;
}

.result-loading {
    position: absolute;
    inset: 1px;
    z-index: 2;
    display: grid;
    place-items: center;
    padding: 24px;
    border-radius: 14px;
    border: 1px solid var(--line);
    background: color-mix(in srgb, var(--surface) 94%, transparent);
    backdrop-filter: blur(10px);
    text-align: center;
}

.result-loading[hidden] {
    display: none;
}

.result-loading > * + * {
    margin-top: 12px;
}

.result-loading-note {
    color: var(--muted);
    font-size: 0.9rem;
    line-height: 1.5;
}

.result-loading-pulse {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    border: 4px solid color-mix(in srgb, var(--line-strong) 45%, transparent);
    border-top-color: var(--primary);
    border-right-color: color-mix(in srgb, var(--primary) 55%, var(--surface));
    animation: spin 0.9s linear infinite;
}

.billing-status-page {
    width: min(100%, 720px);
    margin: 0 auto;
    padding: clamp(2rem, 5vw, 4rem) 0;
}

.billing-status-card {
    min-height: 360px;
    display: grid;
    align-content: center;
    justify-items: center;
    gap: 1.25rem;
    text-align: center;
    padding: clamp(2rem, 4vw, 3rem);
}

.billing-status-loading {
    display: grid;
    place-items: center;
}

.billing-status-loading.is-hidden,
.billing-status-actions.is-hidden {
    display: none;
}

.billing-status-copy {
    display: grid;
    gap: 0.75rem;
    max-width: 34rem;
}

.billing-status-copy h1 {
    margin: 0;
}

.billing-status-note {
    margin: 0;
    max-width: 30rem;
    color: var(--muted);
    font-size: 0.98rem;
    line-height: 1.6;
}

.billing-status-actions {
    padding-top: 0.5rem;
}

.result-loading-progress {
    margin: 8px auto 0;
    width: min(360px, 100%);
}

.detector-loading-brands {
    display: none;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
    margin-top: 6px;
}

.result-loading[data-active-stage="detector_check"] .detector-loading-brands {
    display: flex;
}

.detector-loading-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: color-mix(in srgb, var(--surface) 86%, var(--surface-muted));
    color: var(--text);
    font-size: 0.8rem;
    font-weight: 700;
    box-shadow: 0 10px 24px rgba(15, 23, 42, 0.08);
}

.detector-loading-badge-mark {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 20px;
    border-radius: 999px;
    color: #fff;
    font-size: 0.72rem;
    font-weight: 800;
}

.detector-loading-badge-gptzero .detector-loading-badge-mark {
    background: #2563eb;
}

.detector-loading-badge-turnitin .detector-loading-badge-mark {
    background: #16a34a;
}

.detector-loading-badge-originality .detector-loading-badge-mark {
    background: #f97316;
}

.result-loading-steps {
    margin-top: 12px;
}

.editor-card.is-loading .result-textarea {
    opacity: 0.2;
    filter: saturate(0.7);
}

.analysis-grid {
    grid-template-columns: 1.1fr 1fr 1fr;
}

.analysis-score {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 16px;
}

.check-list {
    margin: 16px 0 0;
    padding-left: 18px;
    color: var(--muted);
    line-height: 1.65;
}

.check-list li + li {
    margin-top: 8px;
}

.loading-progress {
    height: 10px;
    margin: 20px 0 18px;
    overflow: hidden;
    border-radius: 999px;
    background: var(--surface-muted);
}

.loading-progress span {
    display: block;
    width: 12%;
    height: 100%;
    border-radius: inherit;
    background: var(--primary);
    transition: width 800ms ease;
}

.loading-steps {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
}

.loading-step {
    padding: 8px 12px;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: var(--surface-muted);
    color: var(--muted);
    font-size: 0.82rem;
    font-weight: 700;
}

.loading-step.is-active {
    color: var(--text);
    border-color: var(--line-strong);
    background: color-mix(in srgb, var(--primary) 10%, var(--surface));
}

.loading-step.is-complete {
    color: var(--text);
    border-color: color-mix(in srgb, var(--primary) 30%, var(--line-strong));
    background: color-mix(in srgb, var(--primary) 16%, var(--surface));
}

@keyframes spin {
    from {
        transform: rotate(0deg);
    }

    to {
        transform: rotate(360deg);
    }
}

@media (max-width: 1180px) {
    .marketing-hero,
    .marketing-grid,
    .workflow-grid,
    .tool-hub-grid,
    .onboarding-layout,
    .app-home-info-grid,
    .app-home-flow-track,
    .subscription-manage-grid,
    .account-overview-grid,
    .account-settings-grid,
    .upgrade-plan-grid,
    .request-pack-grid,
    .auth-layout,
    .editor-grid,
    .analysis-grid {
        grid-template-columns: 1fr;
    }

    .upgrade-hero {
        grid-template-columns: 1fr;
    }

    .upgrade-hero h1 {
        max-width: none;
    }

    .app-home-info-shell {
        grid-template-columns: 1fr;
    }

    .app-home-compare-grid {
        grid-template-columns: 1fr;
    }

    .app-home-story {
        grid-template-columns: 1fr;
    }

    .app-home-example-layout {
        grid-template-columns: 1fr;
    }

    .app-home-story-intro {
        max-width: none;
    }

    .app-home-compare-bridge {
        min-height: 28px;
    }

    .app-home-compare-bridge-core {
        transform: rotate(90deg);
    }

    .workflow-strip-app::before {
        display: none;
    }

    .app-home-example-divider {
        min-height: 44px;
    }

    .app-home-example-divider::before,
    .app-home-flow-line {
        display: none;
    }

    .app-home-example-divider-core {
        transform: rotate(90deg);
    }
}

@media (max-width: 980px) {
    .app-shell,
    .app-shell[data-sidebar="collapsed"] {
        grid-template-columns: 1fr;
    }

    .app-sidebar {
        position: fixed;
        inset: 0 auto 0 0;
        width: min(86vw, 340px);
        max-width: 340px;
        height: 100dvh;
        border-right: 1px solid var(--line);
        border-bottom: none;
        padding: 18px 16px 24px;
        gap: 16px;
        overflow-y: auto;
        z-index: 40;
        box-shadow: 0 24px 70px rgba(3, 8, 20, 0.34);
        transform: translateX(calc(-100% - 24px));
        transition:
            transform 280ms cubic-bezier(0.22, 1, 0.36, 1),
            border-color 220ms ease,
            background-color 220ms ease;
    }

    .app-shell[data-mobile-sidebar="open"] .app-sidebar {
        transform: translateX(0);
    }

    .app-sidebar-backdrop {
        display: block;
        position: fixed;
        inset: 0;
        z-index: 35;
        border: none;
        padding: 0;
        margin: 0;
        background: rgba(4, 10, 24, 0.42);
        opacity: 0;
        pointer-events: none;
        transition: opacity 220ms ease;
    }

    .app-shell[data-mobile-sidebar="open"] .app-sidebar-backdrop {
        opacity: 1;
        pointer-events: auto;
    }

    .app-header-menu-button,
    .sidebar-mobile-close,
    .sidebar-link-mobile-only {
        display: inline-flex;
    }

    .sidebar-bottom.sidebar-mobile-only,
    .sidebar-bottom.public-mobile-bottom,
    .sidebar-mobile-only {
        display: flex;
    }

    .sidebar-mobile-close {
        flex-shrink: 0;
    }

    .app-header-brand-mobile {
        display: inline-flex;
        min-width: 0;
        flex: 0 1 auto;
    }

    .app-header-brand-tag {
        display: none;
    }

    .app-header .status-chip,
    .header-logout-form,
    .app-header .theme-button,
    .app-header .header-account {
        display: none;
    }

    .sidebar-toggle {
        display: none;
    }

    .app-shell[data-sidebar="collapsed"] .sidebar-brand-copy,
    .app-shell[data-sidebar="collapsed"] .sidebar-label-wrap,
    .app-shell[data-sidebar="collapsed"] .sidebar-user-label,
    .app-shell[data-sidebar="collapsed"] .sidebar-user-email {
        width: auto;
        max-width: none;
        max-height: none;
        opacity: 1;
        transform: none;
        overflow: visible;
        pointer-events: auto;
    }

    .app-shell[data-sidebar="collapsed"] .sidebar-bottom {
        max-height: none;
        opacity: 1;
        transform: none;
        pointer-events: auto;
    }

    .sidebar-nav {
        flex-direction: column;
        flex-wrap: nowrap;
        align-items: stretch;
    }

    .sidebar-link {
        flex: none;
        width: 100%;
    }

    .app-shell[data-sidebar="collapsed"] .sidebar-link {
        align-self: stretch;
        width: 100%;
        min-width: 0;
        height: auto;
        min-height: 60px;
        padding: 10px;
        gap: 12px;
        border-radius: 16px;
    }

    .sidebar-bottom {
        display: flex;
        flex-direction: column;
        flex-wrap: nowrap;
        margin-top: auto;
        gap: 12px;
    }

    .sidebar-mobile-logout {
        width: 100%;
    }

    .sidebar-mobile-theme-button,
    .sidebar-mobile-logout-button {
        width: 100%;
        justify-content: center;
    }

    .sidebar-mobile-theme-button {
        justify-content: flex-start;
    }

    .app-header {
        padding: 14px 16px;
        gap: 12px;
        align-items: stretch;
        justify-content: flex-start;
        flex-wrap: wrap;
    }

    .app-header-actions {
        width: 100%;
        min-width: 0;
        flex: 1 1 100%;
        justify-content: flex-start;
        margin-left: 0;
        flex-wrap: wrap;
    }

    .header-plan-link,
    .header-account {
        width: auto;
    }

    .header-account {
        min-width: 0;
        flex: 1 1 220px;
    }

    .header-plan-link {
        flex: 1 1 100%;
        min-height: 40px;
        padding: 7px 12px;
        justify-content: center;
    }

    .header-plan-link .header-plan-label {
        white-space: nowrap;
    }

    .editor-card,
    .editor-card-head,
    .editor-card-head > div,
    .metric-group {
        min-width: 0;
    }

    .tool-hub-brand {
        align-items: flex-start;
    }

    .app-home-compare-top,
    .app-home-example-pane-top {
        flex-direction: column;
        align-items: flex-start;
    }

    .app-home-score {
        align-items: flex-start;
        text-align: left;
    }

    .app-home-insight-visual {
        min-height: 0;
    }

    .app-home-story-stage {
        min-height: 420px;
    }

    .app-home-story-sheet {
        width: min(48%, 240px);
    }

    .app-home-story-float {
        font-size: 0.76rem;
    }

    .onboarding-choice-grid,
    .onboarding-choice-grid-single {
        grid-template-columns: 1fr;
    }

    .subscription-plan-grid {
        grid-template-columns: 1fr;
    }

    .upgrade-current-stats,
    .subscription-manage-stats {
        grid-template-columns: 1fr;
    }

    .request-pack-section {
        padding: 24px;
    }

    .metric-group {
        flex-wrap: wrap;
        justify-content: flex-start;
    }
}

@media (max-width: 760px) {
    .public-shell {
        width: min(1220px, calc(100vw - 20px));
        padding-top: 16px;
    }

    .standalone-shell {
        width: min(1320px, calc(100vw - 20px));
        padding-top: 16px;
    }

    .public-header,
    .app-header {
        position: static;
    }

    .public-header,
    .standalone-header,
    .site-footer,
    .cta-panel,
    .app-header,
    .app-notice,
    .editor-toolbar,
    .status-actions,
    .auth-link-row {
        flex-direction: column;
        align-items: flex-start;
    }

    .public-nav,
    .app-header-actions {
        width: 100%;
    }

    .site-footer-links {
        justify-content: flex-start;
    }

    .header-plan-link,
    .header-account {
        width: 100%;
        justify-content: flex-start;
    }

    .public-main,
    .app-main {
        padding-top: 16px;
    }

    .app-main {
        padding: 16px;
    }

    .marketing-hero-card,
    .marketing-card,
    .workflow-strip,
    .tool-hub-hero,
    .tool-hub-card,
    .upgrade-hero,
    .upgrade-current-spotlight,
    .upgrade-plan-card,
    .subscription-manage-hero,
    .subscription-manage-card,
    .app-home-story,
    .app-home-flow,
    .onboarding-hero,
    .onboarding-card,
    .cta-panel,
    .auth-context,
    .auth-card,
    .status-card,
    .app-notice,
    .editor-card,
    .analysis-card,
    .preview-panel {
        padding: 22px;
    }

    .support-note-grid {
        grid-template-columns: 1fr;
    }

    h1 {
        font-size: clamp(2rem, 10vw, 3rem);
    }

    .tool-hub-brand {
        flex-direction: column;
        gap: 16px;
    }

    .onboarding-layout {
        gap: 20px;
    }

    .onboarding-hero h1 {
        max-width: 14ch;
    }

    .app-home-story-stage {
        min-height: 360px;
    }

    .app-home-story-intro {
        gap: 14px;
    }

    .app-home-story-logo {
        width: 72px;
        height: 72px;
    }

    .app-home-story-sheet {
        width: calc(50% - 28px);
        min-height: 210px;
        padding: 52px 16px 18px;
    }

    .app-home-story-sheet-source {
        top: 82px;
        left: 22px;
    }

    .app-home-story-sheet-result {
        right: 24px;
        bottom: 36px;
    }

    .app-home-story-float-top {
        top: 18px;
        left: 18px;
    }

    .app-home-story-float-bottom {
        right: 18px;
        bottom: 18px;
        max-width: 210px;
    }

    .app-home-example-head {
        padding: 0 22px 22px;
    }

    .app-home-example-pane {
        padding: 24px 22px 28px;
    }

    .app-home-flow-step {
        padding-top: 72px;
    }

    .app-home-flow-step-icon {
        width: 56px;
        height: 56px;
    }

    .upgrade-plan-head {
        flex-direction: column;
    }

    .upgrade-plan-price-block {
        align-items: flex-start;
    }
}

@media (max-width: 560px) {
    .public-brand-copy,
    .sidebar-brand-copy {
        gap: 3px;
    }

    .public-brand-name,
    .sidebar-brand-name {
        font-size: 1.25rem;
    }

    .public-brand-tag,
    .sidebar-brand-tag {
        letter-spacing: 0.12em;
        font-size: 0.65rem;
    }

    .header-plan-copy,
    .header-account-copy {
        gap: 1px;
    }

    .header-plan-label,
    .header-account-label {
        font-size: 0.68rem;
    }

    .header-account-email {
        font-size: 0.84rem;
    }

    .hero-action-row,
    .hero-trust-row,
    .status-actions,
    .editor-actions,
    .app-notice-actions,
    .onboarding-actions {
        width: 100%;
    }

    .hero-action-row > *,
    .status-actions > *,
    .editor-actions > *,
    .app-notice-actions > *,
    .onboarding-actions > * {
        width: 100%;
    }
}

@media (max-width: 760px) {
    .public-shell .public-header {
        flex-direction: row;
        align-items: stretch;
        justify-content: flex-start;
        flex-wrap: wrap;
        gap: 12px;
    }

    .public-shell .public-header-mobile-leading {
        display: flex;
        align-items: center;
        gap: 10px;
        width: 100%;
        min-width: 0;
    }

    .public-shell .public-brand {
        gap: 10px;
    }

    .public-shell .public-brand-mark {
        width: 40px;
        height: 40px;
    }

    .public-shell .public-brand-name {
        font-size: 1.22rem;
    }

    .public-shell .public-brand-tag {
        display: none;
    }

    .public-shell .public-header-menu-button {
        display: inline-flex;
    }

    .public-shell .public-nav {
        width: 100%;
        min-width: 0;
        flex: 1 1 100%;
        justify-content: flex-start;
        gap: 10px;
    }

    .public-shell .public-nav > .theme-button,
    .public-shell .public-nav > .public-home-link,
    .public-shell .public-nav > .status-chip,
    .public-shell .public-nav > .header-account,
    .public-shell .public-nav form {
        display: none;
    }

    .public-shell .public-nav > .header-plan-link {
        width: 100%;
        min-height: 40px;
        padding: 7px 12px;
        justify-content: center;
    }

    .public-shell .public-nav > .nav-link,
    .public-shell .public-nav > .nav-button {
        white-space: nowrap;
        justify-content: center;
    }

    .public-shell .public-nav > .nav-link {
        flex: 0 0 auto;
    }

    .public-shell .public-nav > .nav-button {
        flex: 1 1 auto;
        min-width: 0;
    }

    .editor-card-head {
        display: grid;
        grid-template-columns: 1fr;
        gap: 12px;
    }

    .editor-card-head > :first-child {
        width: 100%;
    }

    .metric-group {
        width: 100%;
        min-width: 0;
        justify-content: flex-start;
        align-items: stretch;
        gap: 8px;
    }

    .editor-card-head .metric-chip {
        flex: 1 1 0;
        min-width: 0;
        max-width: 100%;
        min-height: 0;
        padding: 8px 12px;
        white-space: normal;
        line-height: 1.2;
        justify-content: center;
        text-align: center;
    }

    .result-textarea-wrap,
    .result-textarea {
        min-height: 620px;
    }

    .result-loading {
        padding: 18px 14px;
    }

    .public-shell[data-public-mobile-nav="open"] .public-mobile-menu {
        display: block;
        transform: translateX(0);
    }

    .public-shell .public-mobile-backdrop {
        display: block;
        position: fixed;
        inset: 0;
        z-index: 35;
        border: none;
        padding: 0;
        margin: 0;
        background: rgba(4, 10, 24, 0.42);
        opacity: 0;
        pointer-events: none;
        transition: opacity 220ms ease;
    }

    .public-shell[data-public-mobile-nav="open"] .public-mobile-backdrop {
        opacity: 1;
        pointer-events: auto;
    }

    .app-shell .app-header {
        flex-direction: row;
        align-items: stretch;
        justify-content: flex-start;
    }

    .app-shell .app-header-mobile-leading {
        width: 100%;
        flex: 1 1 100%;
        min-width: 0;
        justify-content: flex-start;
    }

    .app-shell .app-header-actions {
        width: 100%;
        min-width: 0;
        flex: 1 1 100%;
        flex-direction: row;
        align-items: center;
        justify-content: flex-start;
        gap: 10px;
    }

    .app-shell .header-plan-link {
        width: 100%;
        justify-content: center;
        max-width: none;
    }

    .app-shell .app-header-actions > .header-button,
    .app-shell .app-header-actions > .primary-button {
        white-space: nowrap;
        justify-content: center;
    }

    .app-shell .app-header-actions > .header-button {
        flex: 0 0 auto;
    }

    .app-shell .app-header-actions > .primary-button {
        flex: 1 1 auto;
        min-width: 0;
    }
}

@media (max-width: 980px) {
    body.has-public-mobile-menu-open {
        overflow: hidden;
    }

    body.has-mobile-sidebar-open {
        overflow: hidden;
    }

    .app-shell #result-panel {
        scroll-margin-top: 16px;
    }
}
