/* Phase 1 shared components.
   Keep these additive so existing page styles continue to work during migration. */

.theme-version-chip {
    font-size: 10px;
    color: var(--theme-chip-text);
    margin-left: auto;
    padding: 2px 6px;
    background: var(--theme-chip-bg);
    border-radius: 4px;
    cursor: pointer;
}

.theme-modal-overlay {
    position: fixed;
    inset: 0;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 12px;
    background: var(--theme-overlay);
    -webkit-backdrop-filter: var(--theme-backdrop-blur);
    backdrop-filter: var(--theme-backdrop-blur);
    z-index: 9999;
}

.theme-modal-panel {
    background: var(--bg-card, #FFFFFF);
    color: var(--text-primary, #111827);
    border-radius: var(--radius-lg, 16px);
    box-shadow: var(--theme-modal-shadow);
    overflow: hidden;
}

.theme-modal-header {
    background: var(--brand-gradient);
    color: #FFFFFF;
}

.theme-modal-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    border-top: 1px solid var(--border-primary, #E5E7EB);
    background: var(--bg-card-nested, #F8FAFC);
}

.theme-modal-cta {
    border: none;
    border-radius: 10px;
    background: var(--brand-gradient);
    color: #FFFFFF;
    cursor: pointer;
    font: inherit;
    font-weight: 600;
}

.theme-release-pill {
    display: inline-block;
    padding: 2px 10px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

.theme-release-pill[data-tone="cloud"] {
    background: var(--theme-release-cloud-bg);
    color: var(--theme-release-cloud-text);
}

.theme-release-pill[data-tone="ui"] {
    background: var(--theme-release-ui-bg);
    color: var(--theme-release-ui-text);
}

.theme-release-pill[data-tone="setup"] {
    background: var(--theme-release-setup-bg);
    color: var(--theme-release-setup-text);
}

.theme-release-pill[data-tone="performance"] {
    background: var(--theme-release-performance-bg);
    color: var(--theme-release-performance-text);
}

.theme-card-surface {
    background: var(--bg-card, #FFFFFF);
    border: 1px solid var(--border-primary, #E5E7EB);
    border-radius: var(--radius-lg, 16px);
    box-shadow: var(--shadow-md);
}

.theme-auth-card-wrapper {
    max-width: var(--theme-auth-card-compact-max-width);
}

.theme-auth-header-compact {
    padding: var(--theme-auth-card-header-padding-compact);
}

.theme-auth-body-compact {
    padding: var(--theme-auth-card-body-padding-compact);
}

.theme-auth-footer-compact {
    padding: var(--theme-auth-card-footer-padding-compact);
}

.theme-auth-submit {
    margin-top: var(--theme-auth-submit-margin-top);
}

.theme-auth-submit--login {
    margin-top: 6px;
}

.theme-auth-message {
    margin-top: var(--theme-auth-message-margin-top);
}

.theme-auth-message--login {
    margin-top: 14px;
}

.theme-auth-error {
    display: none;
    margin-bottom: 10px;
    padding: 8px 12px;
    border-radius: 8px;
    border-left: 3px solid var(--theme-auth-error-border);
    background: var(--theme-auth-error-bg);
    color: var(--theme-auth-error-text);
    font-size: 12px;
}

.theme-auth-remember {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 12px;
    font-size: 13px;
    color: var(--theme-auth-remember-text);
    cursor: pointer;
    -webkit-user-select: none;
    user-select: none;
}

.theme-auth-remember-checkbox {
    accent-color: var(--theme-auth-checkbox-accent);
    width: 16px;
    height: 16px;
    cursor: pointer;
}

.theme-auth-links {
    margin-top: var(--theme-auth-links-margin-top);
    font-size: 11px;
    color: var(--theme-auth-link-muted);
}

.theme-auth-links a {
    color: inherit;
    text-decoration: none;
}

.theme-auth-links a:hover {
    text-decoration: underline;
}

.theme-auth-links a + a {
    margin-left: 12px;
}

.theme-auth-shell {
    position: relative;
    z-index: 1;
    display: grid;
    grid-template-columns: minmax(0, 1.05fr) minmax(320px, var(--theme-auth-card-compact-max-width));
    gap: var(--theme-auth-shell-gap);
    width: min(100%, var(--theme-auth-shell-max-width));
    margin-inline: auto;
    align-items: center;
}

.theme-auth-shell--setup {
    align-items: stretch;
}

.theme-auth-shell--card-only {
    grid-template-columns: minmax(0, var(--theme-auth-card-compact-max-width));
    width: min(100%, var(--theme-auth-card-compact-max-width));
    justify-content: center;
}

.theme-auth-card-wrapper--wide {
    max-width: 560px;
}

.theme-auth-card--wide {
    min-height: 100%;
}

.theme-auth-spotlight {
    position: relative;
    overflow: hidden;
    padding: 32px;
    border-radius: 28px;
    background: var(--theme-auth-spotlight-surface);
    color: var(--theme-auth-spotlight-text);
    border: 1px solid var(--theme-auth-spotlight-border);
    box-shadow: var(--theme-auth-spotlight-shadow);
    min-height: 100%;
}

.theme-auth-spotlight::before,
.theme-auth-spotlight::after {
    content: '';
    position: absolute;
    border-radius: 999px;
    pointer-events: none;
}

.theme-auth-spotlight::before {
    width: 220px;
    height: 220px;
    top: -84px;
    right: -72px;
    background: rgba(255, 255, 255, 0.12);
}

.theme-auth-spotlight::after {
    width: 180px;
    height: 180px;
    bottom: -96px;
    left: -48px;
    background: rgba(255, 255, 255, 0.08);
}

.theme-auth-spotlight > * {
    position: relative;
    z-index: 1;
}

.theme-auth-spotlight-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    border-radius: 999px;
    background: var(--theme-auth-spotlight-badge-bg);
    border: 1px solid var(--theme-auth-spotlight-badge-border);
    color: var(--theme-auth-spotlight-text);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.theme-auth-spotlight-eyebrow {
    margin-top: 18px;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--theme-auth-spotlight-muted);
}

.theme-auth-spotlight-title {
    margin-top: 12px;
    font-size: clamp(28px, 3.4vw, 40px);
    line-height: 1.08;
    letter-spacing: -0.04em;
}

.theme-auth-spotlight-copy {
    margin-top: 14px;
    max-width: 46ch;
    font-size: 15px;
    line-height: 1.7;
    color: var(--theme-auth-spotlight-muted);
}

.theme-auth-spotlight-metrics {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
    margin-top: 24px;
}

.theme-auth-spotlight-metric {
    padding: 14px 16px;
    border-radius: 18px;
    background: var(--theme-auth-spotlight-card-bg);
    border: 1px solid var(--theme-auth-spotlight-card-border);
    -webkit-backdrop-filter: blur(12px);
    backdrop-filter: blur(12px);
}

.theme-auth-spotlight-metric-label {
    display: block;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--theme-auth-spotlight-muted);
}

.theme-auth-spotlight-metric-value {
    display: block;
    margin-top: 8px;
    font-size: 15px;
    font-weight: 700;
    line-height: 1.4;
    color: var(--theme-auth-spotlight-text);
}

.theme-auth-spotlight-list {
    list-style: none;
    display: grid;
    gap: 10px;
    margin-top: 24px;
}

.theme-auth-spotlight-list li {
    display: flex;
    gap: 10px;
    align-items: flex-start;
    font-size: 14px;
    line-height: 1.6;
    color: var(--theme-auth-spotlight-muted);
}

.theme-auth-spotlight-list li::before {
    content: '';
    width: 8px;
    height: 8px;
    border-radius: 50%;
    flex-shrink: 0;
    margin-top: 8px;
    background: var(--theme-auth-spotlight-list-marker);
    box-shadow: 0 0 0 6px rgba(255, 255, 255, 0.08);
}

.theme-auth-spotlight-footer {
    margin-top: 24px;
    padding-top: 18px;
    border-top: 1px solid rgba(255, 255, 255, 0.14);
    font-size: 13px;
    line-height: 1.65;
    color: var(--theme-auth-spotlight-muted);
}

.theme-auth-card-footer-stack {
    display: grid;
    gap: 10px;
}

.theme-login-card-shell {
    width: 100%;
    max-width: var(--theme-auth-card-compact-max-width);
}

.theme-login-card {
    background: var(--theme-auth-card-bg, rgba(255, 255, 255, 0.94));
    border: 1px solid var(--theme-auth-card-border, rgba(255, 255, 255, 0.72));
    border-radius: var(--radius-xl, 22px);
    overflow: hidden;
    box-shadow: var(--theme-auth-card-shadow);
    -webkit-backdrop-filter: var(--theme-auth-card-backdrop, blur(18px));
    backdrop-filter: var(--theme-auth-card-backdrop, blur(18px));
}

.theme-login-card-header {
    position: relative;
    overflow: hidden;
    padding: var(--theme-auth-card-header-padding-compact);
    background: var(--brand-gradient);
    text-align: center;
}

.theme-login-card-header::after {
    content: '';
    position: absolute;
    top: -50%;
    right: -30%;
    width: 200px;
    height: 200px;
    background: rgba(255, 255, 255, 0.08);
    border-radius: 50%;
    pointer-events: none;
}

.theme-login-card-header::before {
    content: '';
    position: absolute;
    left: -14%;
    bottom: -58%;
    width: 180px;
    height: 180px;
    background: rgba(255, 255, 255, 0.06);
    border-radius: 50%;
    pointer-events: none;
}

.theme-login-card-header > * {
    position: relative;
    z-index: 1;
}

.theme-login-card-mark {
    width: auto;
    max-width: min(280px, 100%);
    height: auto;
    min-height: 0;
    margin: 0 auto 14px;
    border-radius: 0;
    background: transparent;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: none;
    padding: 0;
}

.theme-login-card-mark img {
    width: auto;
    height: auto;
    max-width: min(260px, 100%);
    max-height: 80px;
    object-fit: contain;
    display: block;
}

.theme-page {
    min-height: 100vh;
    min-height: 100dvh;
    color: #D9E4F2;
    background:
        radial-gradient(ellipse 80% 50% at 0% 0%, rgba(var(--brand-primary-rgb, 17, 34, 51), 0.18), transparent 55%),
        radial-gradient(ellipse 70% 45% at 100% 0%, rgba(var(--brand-secondary-rgb, 56, 189, 248), 0.14), transparent 50%),
        radial-gradient(ellipse 60% 40% at 10% 100%, rgba(14, 165, 233, 0.12), transparent 55%),
        linear-gradient(180deg, #07101D 0%, #0B1628 52%, #07101D 100%);
    background-repeat: no-repeat;
    background-size: 100% 100%;
    background-attachment: scroll;
}

.theme-page-shell {
    width: min(1180px, calc(100% - clamp(24px, 5vw, 72px)));
    margin: 0 auto;
    padding: clamp(28px, 5vw, 56px) 0 72px;
    position: relative;
    z-index: 1;
}

.theme-page-shell--narrow {
    width: min(980px, calc(100% - clamp(24px, 5vw, 72px)));
}

.theme-page-orb {
    position: fixed;
    inset: auto;
    width: 360px;
    height: 360px;
    border-radius: 50%;
    pointer-events: none;
    filter: blur(16px);
    opacity: 0.7;
    z-index: 0;
}

.theme-page-orb--primary {
    top: -120px;
    right: -110px;
    background: radial-gradient(circle, rgba(var(--brand-secondary-rgb, 56, 189, 248), 0.3) 0%, rgba(var(--brand-secondary-rgb, 56, 189, 248), 0) 72%);
}

.theme-page-orb--secondary {
    bottom: -160px;
    left: -120px;
    background: radial-gradient(circle, rgba(14, 165, 233, 0.24) 0%, rgba(14, 165, 233, 0) 72%);
}

.theme-section-header {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    max-width: 720px;
    margin: 0 auto 32px;
    text-align: center;
}

.theme-section-header--left {
    align-items: flex-start;
    max-width: none;
    margin: 0 0 28px;
    text-align: left;
}

.theme-section-header--compact {
    gap: 8px;
    margin-bottom: 22px;
}

.theme-section-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 7px 16px;
    border-radius: 999px;
    background: rgba(var(--brand-secondary-rgb, 56, 189, 248), 0.12);
    border: 1px solid rgba(var(--brand-secondary-rgb, 56, 189, 248), 0.2);
    color: #C4B5FD;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.theme-section-header h1,
.theme-section-header h2 {
    font-size: clamp(32px, 4vw, 48px);
    line-height: 1.05;
    letter-spacing: -0.04em;
    color: #F8FAFC;
}

.theme-section-header--compact h2 {
    font-size: clamp(24px, 2.8vw, 34px);
}

.theme-section-header p {
    max-width: 64ch;
    font-size: 15px;
    line-height: 1.75;
    color: #94A3B8;
}

.theme-pill-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
}

.theme-pill-row--center {
    justify-content: center;
}

.theme-surface-card {
    position: relative;
    overflow: hidden;
    padding: 24px;
    border-radius: 26px;
    background: linear-gradient(180deg, rgba(15, 23, 42, 0.9), rgba(9, 14, 28, 0.96));
    border: 1px solid rgba(148, 163, 184, 0.16);
    box-shadow: 0 24px 70px rgba(2, 6, 23, 0.32), inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

.theme-surface-card::before {
    content: '';
    position: absolute;
    inset: 0 0 auto 0;
    height: 120px;
    background: radial-gradient(circle at top right, rgba(56, 189, 248, 0.16), transparent 42%), radial-gradient(circle at top left, rgba(var(--brand-primary-rgb, 17, 34, 51), 0.2), transparent 36%);
    pointer-events: none;
}

.theme-surface-card > * {
    position: relative;
    z-index: 1;
}

.theme-surface-card__title {
    font-size: 16px;
    font-weight: 800;
    color: #F8FAFC;
    letter-spacing: -0.02em;
}

.theme-surface-card__copy {
    margin-top: 8px;
    font-size: 13px;
    line-height: 1.7;
    color: #94A3B8;
}

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

.theme-metric-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 18px;
}

.theme-metric-card {
    position: relative;
    overflow: hidden;
    padding: 22px;
    border-radius: 22px;
    background: rgba(255, 255, 255, 0.035);
    border: 1px solid rgba(148, 163, 184, 0.12);
    min-height: 168px;
}

.theme-metric-card::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.06), transparent 48%);
    pointer-events: none;
}

.theme-metric-card__eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: #94A3B8;
}

.theme-metric-card__eyebrow::before {
    content: '';
    width: 8px;
    height: 8px;
    border-radius: 999px;
    background: var(--metric-accent, #60A5FA);
    box-shadow: 0 0 0 7px rgba(96, 165, 250, 0.16);
}

.theme-metric-card__value {
    margin-top: 20px;
    font-size: clamp(30px, 4vw, 42px);
    line-height: 1;
    letter-spacing: -0.05em;
    font-weight: 900;
    color: var(--metric-accent, #F8FAFC);
}

.theme-metric-card__meta {
    margin-top: 12px;
    font-size: 13px;
    line-height: 1.7;
    color: #94A3B8;
}

.theme-meter {
    margin-top: 18px;
}

.theme-meter__row {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 12px;
    margin-bottom: 10px;
}

.theme-meter__label {
    font-size: 12px;
    font-weight: 700;
    color: #CBD5E1;
}

.theme-meter__value {
    font-size: 12px;
    font-weight: 700;
    color: #F8FAFC;
}

.theme-meter__track {
    height: 12px;
    border-radius: 999px;
    background: rgba(30, 41, 59, 0.88);
    overflow: hidden;
}

.theme-meter__fill {
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(90deg, var(--meter-accent-start, #34D399), var(--meter-accent-end, #10B981));
    transition: width 0.6s cubic-bezier(.4, 0, .2, 1);
}

.theme-meter__meta {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    margin-top: 8px;
    font-size: 11px;
    color: #94A3B8;
}

.theme-price-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
}

.theme-price-card {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 18px;
    padding: 30px 24px;
    border-radius: 24px;
    background: rgba(255, 255, 255, 0.035);
    border: 1px solid rgba(148, 163, 184, 0.12);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
    transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
}

.theme-price-card:hover {
    transform: translateY(-4px);
    border-color: rgba(196, 181, 253, 0.28);
    box-shadow: 0 24px 60px rgba(2, 6, 23, 0.28), inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

.theme-price-card--featured {
    border: 2px solid rgba(129, 140, 248, 0.34);
    background: linear-gradient(180deg, rgba(99, 102, 241, 0.12), rgba(124, 58, 237, 0.05));
    box-shadow: 0 24px 64px rgba(99, 102, 241, 0.18), inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

.theme-price-card__badge {
    position: absolute;
    top: -12px;
    left: 24px;
    display: inline-flex;
    align-items: center;
    padding: 6px 14px;
    border-radius: 999px;
    background: linear-gradient(135deg, var(--brand-primary, #112233), var(--brand-secondary, #38BDF8));
    color: #FFFFFF;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    box-shadow: 0 12px 24px rgba(var(--brand-primary-rgb, 17, 34, 51), 0.24);
}

.theme-price-card__eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    align-self: flex-start;
    padding: 6px 12px;
    border-radius: 999px;
    background: rgba(96, 165, 250, 0.14);
    border: 1px solid rgba(96, 165, 250, 0.24);
    color: var(--plan-accent, #BFDBFE);
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.theme-price-card__title {
    font-size: 26px;
    line-height: 1.05;
    letter-spacing: -0.04em;
    color: #F8FAFC;
}

.theme-price-card__copy {
    margin-top: 8px;
    font-size: 13px;
    line-height: 1.7;
    color: #94A3B8;
}

.theme-price-card__amount {
    display: flex;
    align-items: flex-end;
    gap: 6px;
    margin-top: 8px;
}

.theme-price-card__currency {
    font-size: 20px;
    font-weight: 800;
    line-height: 1.2;
    color: #CBD5E1;
}

.theme-price-card__value {
    font-size: clamp(36px, 5vw, 48px);
    line-height: 0.94;
    letter-spacing: -0.06em;
    font-weight: 900;
    color: #FFFFFF;
}

.theme-price-card__period {
    font-size: 14px;
    font-weight: 600;
    color: #64748B;
}

.theme-price-card__meta {
    font-size: 12px;
    font-weight: 700;
    color: var(--plan-accent, #A5B4FC);
}

.theme-feature-list {
    list-style: none;
    display: grid;
    gap: 11px;
    margin: 0;
    padding: 0;
}

.theme-feature-list li {
    position: relative;
    padding-left: 28px;
    font-size: 13px;
    line-height: 1.6;
    color: #CBD5E1;
}

.theme-feature-list li::before {
    position: absolute;
    left: 0;
    top: 0;
    font-weight: 800;
}

.theme-feature-list li[data-state="included"]::before {
    content: '✓';
    color: var(--plan-accent, #A5B4FC);
}

.theme-feature-list li[data-state="excluded"] {
    color: #64748B;
}

.theme-feature-list li[data-state="excluded"]::before {
    content: '✕';
    color: #475569;
}

.theme-feature-list li[data-state="note"] {
    color: var(--plan-accent, #A5B4FC);
    font-style: italic;
}

.theme-feature-list li[data-state="note"]::before {
    content: '✳';
    color: var(--plan-accent, #A5B4FC);
}

.theme-data-list {
    display: grid;
    gap: 12px;
}

.theme-data-row {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    padding-bottom: 12px;
    border-bottom: 1px solid rgba(148, 163, 184, 0.12);
    font-size: 13px;
}

.theme-data-row:last-child {
    padding-bottom: 0;
    border-bottom: none;
}

.theme-data-row span {
    color: #94A3B8;
}

.theme-data-row strong {
    text-align: right;
    color: #F8FAFC;
    font-weight: 700;
}

.theme-inline-link-list {
    display: grid;
    gap: 12px;
}

.theme-inline-link-list a {
    color: #F8FAFC;
    text-decoration: none;
}

.theme-inline-link-list a:hover {
    color: #BFDBFE;
}

.theme-legal-nav {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 20px;
    padding: 12px;
    border-radius: 18px;
    background: rgba(15, 23, 42, 0.72);
    border: 1px solid rgba(148, 163, 184, 0.16);
    -webkit-backdrop-filter: blur(12px);
    backdrop-filter: blur(12px);
}

.theme-legal-nav a {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 9px 14px;
    border-radius: 12px;
    color: #94A3B8;
    text-decoration: none;
    font-size: 12px;
    font-weight: 700;
    transition: background 0.2s ease, color 0.2s ease, transform 0.2s ease;
}

.theme-legal-nav a:hover {
    color: #F8FAFC;
    background: rgba(255, 255, 255, 0.06);
    transform: translateY(-1px);
}

.theme-legal-nav a.is-active {
    color: #EDE9FE;
    background: rgba(var(--brand-secondary-rgb, 56, 189, 248), 0.18);
    border: 1px solid rgba(var(--brand-secondary-rgb, 56, 189, 248), 0.22);
}

.theme-back-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 18px;
    color: #94A3B8;
    text-decoration: none;
    font-size: 13px;
    font-weight: 600;
}

.theme-back-link:hover {
    color: #F8FAFC;
}

.theme-prose-card {
    position: relative;
    overflow: hidden;
    padding: clamp(24px, 4vw, 36px);
    border-radius: 28px;
    background: linear-gradient(180deg, rgba(15, 23, 42, 0.92), rgba(9, 14, 28, 0.98));
    border: 1px solid rgba(148, 163, 184, 0.16);
    box-shadow: 0 30px 72px rgba(2, 6, 23, 0.34), inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.theme-prose-card::before {
    content: '';
    position: absolute;
    inset: 0 0 auto 0;
    height: 140px;
    background: radial-gradient(circle at top right, rgba(56, 189, 248, 0.14), transparent 42%), radial-gradient(circle at top left, rgba(var(--brand-primary-rgb, 17, 34, 51), 0.18), transparent 34%);
    pointer-events: none;
}

.theme-prose-card > * {
    position: relative;
    z-index: 1;
}

.theme-prose h2 {
    margin: 34px 0 14px;
    padding-bottom: 10px;
    border-bottom: 1px solid rgba(148, 163, 184, 0.14);
    font-size: 22px;
    line-height: 1.25;
    color: #F8FAFC;
    letter-spacing: -0.03em;
}

.theme-prose h2:first-of-type {
    margin-top: 0;
}

.theme-prose h3 {
    margin: 22px 0 8px;
    font-size: 15px;
    color: #E2E8F0;
}

.theme-prose p,
.theme-prose li {
    font-size: 14px;
    line-height: 1.8;
    color: #CBD5E1;
}

.theme-prose p {
    margin: 8px 0;
}

.theme-prose ul,
.theme-prose ol {
    margin: 10px 0 12px 22px;
}

.theme-prose strong {
    color: #F8FAFC;
}

.theme-prose a {
    color: #C4B5FD;
    text-decoration: none;
}

.theme-prose a:hover {
    text-decoration: underline;
}

.theme-prose table {
    width: 100%;
    border-collapse: collapse;
    margin: 16px 0;
    border-radius: 16px;
    overflow: hidden;
    background: rgba(255, 255, 255, 0.03);
}

.theme-prose th,
.theme-prose td {
    padding: 11px 14px;
    border-bottom: 1px solid rgba(148, 163, 184, 0.12);
    text-align: left;
    font-size: 13px;
}

.theme-prose th {
    background: rgba(255, 255, 255, 0.04);
    color: #E2E8F0;
    font-weight: 700;
}

.theme-prose tr:last-child td {
    border-bottom: none;
}

.theme-callout {
    margin: 18px 0;
    padding: 14px 16px;
    border-radius: 16px;
    border: 1px solid rgba(var(--brand-secondary-rgb, 56, 189, 248), 0.2);
    background: rgba(var(--brand-secondary-rgb, 56, 189, 248), 0.1);
    color: #D8B4FE;
    font-size: 13px;
    line-height: 1.7;
}

.theme-callout--warning {
    border-color: rgba(239, 68, 68, 0.22);
    background: rgba(239, 68, 68, 0.08);
    color: #FCA5A5;
}

.theme-page-footer {
    margin-top: 24px;
    text-align: center;
    font-size: 11px;
    line-height: 1.7;
    color: #64748B;
}

.theme-surface-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    flex-wrap: wrap;
}

.theme-surface-toolbar__group {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.theme-filter-select {
    min-height: 38px;
    padding: 9px 14px;
    border-radius: 14px;
    border: 1px solid rgba(148, 163, 184, 0.18);
    background: rgba(15, 23, 42, 0.76);
    color: #E2E8F0;
    font: inherit;
    font-size: 13px;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.03);
}

.theme-filter-select:focus {
    outline: none;
    border-color: rgba(129, 140, 248, 0.45);
    box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.12);
}

.theme-count-chip {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 9px 14px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(148, 163, 184, 0.12);
    color: #CBD5E1;
    font-size: 12px;
    font-weight: 700;
}

.theme-inline-form {
    display: flex;
    align-items: flex-end;
    gap: 12px;
    flex-wrap: wrap;
}

.theme-inline-form__field {
    flex: 1;
    min-width: 220px;
}

.theme-inline-feedback {
    min-height: 18px;
    font-size: 13px;
}

.theme-empty-state {
    padding: 28px;
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px dashed rgba(148, 163, 184, 0.18);
    text-align: center;
    font-size: 13px;
    line-height: 1.7;
    color: #94A3B8;
}

.theme-proof-grid {
    display: grid;
    gap: 14px;
}

.theme-proof-card {
    position: relative;
    overflow: hidden;
    padding: 20px;
    border-radius: 22px;
    background: rgba(255, 255, 255, 0.035);
    border: 1px solid rgba(148, 163, 184, 0.14);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.theme-proof-card::before {
    content: '';
    position: absolute;
    inset: 0 0 auto 0;
    height: 110px;
    background: radial-gradient(circle at top right, rgba(56, 189, 248, 0.12), transparent 42%), radial-gradient(circle at top left, rgba(99, 102, 241, 0.12), transparent 36%);
    pointer-events: none;
}

.theme-proof-card > * {
    position: relative;
    z-index: 1;
}

.theme-proof-card__header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
}

.theme-proof-card__title {
    margin-top: 10px;
    font-size: 18px;
    line-height: 1.2;
    letter-spacing: -0.03em;
    color: #F8FAFC;
}

.theme-proof-card__subtitle {
    margin-top: 8px;
    font-size: 13px;
    line-height: 1.7;
    color: #94A3B8;
}

.theme-proof-card__actions {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.theme-proof-card__alert {
    margin-top: 14px;
    padding: 12px 14px;
    border-radius: 14px;
    border: 1px solid rgba(239, 68, 68, 0.2);
    background: rgba(239, 68, 68, 0.08);
    font-size: 12px;
    line-height: 1.6;
    color: #FCA5A5;
}

.theme-table-shell {
    overflow-x: auto;
    border-radius: 22px;
    border: 1px solid rgba(148, 163, 184, 0.14);
    background: rgba(255, 255, 255, 0.03);
}

.theme-table {
    width: 100%;
    min-width: 940px;
    border-collapse: collapse;
}

.theme-table thead {
    background: rgba(15, 23, 42, 0.72);
}

.theme-table th,
.theme-table td {
    padding: 14px 16px;
    border-bottom: 1px solid rgba(148, 163, 184, 0.12);
    font-size: 12px;
    text-align: left;
    vertical-align: middle;
}

.theme-table th {
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #94A3B8;
}

.theme-table td {
    color: #E2E8F0;
}

.theme-table tbody tr:last-child td {
    border-bottom: none;
}

.theme-table tbody tr:hover {
    background: rgba(255, 255, 255, 0.025);
}

.theme-table__row--warning {
    background: rgba(220, 38, 38, 0.08);
}

.theme-table__numeric {
    text-align: right;
}

.theme-table__center {
    text-align: center;
}

.theme-status-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 5px 10px;
    border-radius: 999px;
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #FFFFFF;
}

.theme-status-badge[data-tone="neutral"] {
    background: #64748B;
}

.theme-status-badge[data-tone="info"] {
    background: #3B82F6;
}

.theme-status-badge[data-tone="success"] {
    background: #10B981;
}

.theme-status-badge[data-tone="warning"] {
    background: #F59E0B;
}

.theme-status-badge[data-tone="danger"] {
    background: #EF4444;
}

.theme-aging {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
    font-weight: 700;
}

.theme-aging[data-tone="muted"] {
    color: #94A3B8;
}

.theme-aging[data-tone="success"] {
    color: #34D399;
}

.theme-aging[data-tone="warning"] {
    color: #F59E0B;
}

.theme-aging[data-tone="danger"] {
    color: #F87171;
}

.theme-table-actions {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    flex-wrap: wrap;
}

.theme-chart-bars {
    display: flex;
    align-items: flex-end;
    gap: 12px;
    min-height: 220px;
}

.theme-chart-bar-column {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}

.theme-chart-bar-value {
    font-size: 10px;
    color: #94A3B8;
}

.theme-chart-bar {
    width: min(100%, 48px);
    min-height: 8px;
    border-radius: 16px 16px 6px 6px;
    background: linear-gradient(180deg, var(--brand-secondary, #38BDF8), var(--brand-primary, #112233));
    box-shadow: 0 14px 26px rgba(37, 99, 235, 0.18);
}

.theme-chart-bar-label {
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #64748B;
}

@media (max-width: 860px) {
    .theme-surface-grid {
        grid-template-columns: 1fr;
    }

    .theme-price-grid {
        grid-template-columns: 1fr;
    }

    .theme-price-card__badge {
        left: 20px;
    }

    .theme-proof-card__header {
        flex-direction: column;
    }
}

@media (max-width: 640px) {
    .theme-page-shell,
    .theme-page-shell--narrow {
        width: calc(100% - 28px);
        padding-bottom: 56px;
    }

    .theme-section-header {
        margin-bottom: 24px;
    }

    .theme-section-header h1,
    .theme-section-header h2 {
        font-size: clamp(28px, 10vw, 38px);
    }

    .theme-metric-grid {
        grid-template-columns: 1fr;
    }

    .theme-data-row {
        flex-direction: column;
        gap: 6px;
    }

    .theme-data-row strong {
        text-align: left;
    }

    .theme-surface-toolbar,
    .theme-surface-toolbar__group,
    .theme-inline-form,
    .theme-table-actions {
        align-items: stretch;
    }

    .theme-count-chip {
        width: 100%;
        justify-content: center;
    }

    .theme-chart-bars {
        gap: 8px;
        min-height: 180px;
    }

    .theme-chart-bar {
        width: min(100%, 34px);
    }
}

@media print {
    .theme-page {
        background: #FFFFFF;
        color: #111827;
    }

    .theme-page-orb,
    .theme-legal-nav,
    .theme-back-link,
    .screen-only {
        display: none !important;
    }

    .theme-page-shell,
    .theme-page-shell--narrow {
        width: 100%;
        padding: 0;
    }

    .theme-prose-card,
    .theme-surface-card {
        background: #FFFFFF;
        border: 1px solid #D1D5DB;
        box-shadow: none;
    }

    .theme-prose-card::before,
    .theme-surface-card::before {
        display: none;
    }

    .theme-prose h2,
    .theme-prose h3,
    .theme-prose p,
    .theme-prose li,
    .theme-prose strong,
    .theme-prose th,
    .theme-prose td,
    .theme-page-footer {
        color: #111827 !important;
    }
}

.theme-login-card-mark svg {
    width: 26px;
    height: 26px;
    color: #FFFFFF;
}

.theme-login-card-title {
    color: #FFFFFF;
    font-size: 22px;
    font-weight: 700;
    letter-spacing: -0.3px;
}

.theme-login-card-subtitle {
    margin-top: 4px;
    color: rgba(255, 255, 255, 0.78);
    font-size: 13px;
}

.theme-login-card-body {
    padding: var(--theme-auth-card-body-padding-compact);
}

.theme-login-field {
    margin-bottom: 16px;
}

.theme-login-field-label {
    display: block;
    margin-bottom: 6px;
    font-size: 13px;
    font-weight: 600;
    color: var(--text-secondary, #334155);
}

.theme-login-input-wrap {
    position: relative;
}

.theme-login-input-icon {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--theme-auth-input-icon, var(--text-muted, #94A3B8));
    pointer-events: none;
}

.theme-login-input {
    width: 100%;
    padding: 12px 16px 12px 44px;
    border-radius: var(--radius-md, 12px);
    border: 1px solid var(--theme-auth-input-border, rgba(148, 163, 184, 0.28));
    background: var(--theme-auth-input-bg, rgba(255, 255, 255, 0.92));
    color: var(--text-primary, #0F172A);
    font-size: 14px;
    font-weight: 500;
    transition: all var(--transition-normal, 0.25s ease);
    font-family: inherit;
    box-shadow: var(--pillow-shadow-sm), var(--pillow-inset);
}

.theme-login-input::placeholder {
    color: var(--text-placeholder, #94A3B8);
    font-weight: 400;
}

.theme-login-input:hover {
    border-color: var(--border-secondary, #CBD5E1);
}

.theme-login-input:focus {
    outline: none;
    border-color: var(--brand-primary, #112233);
    background: var(--bg-card, #FFFFFF);
    box-shadow: 0 0 0 3px var(--brand-primary-ring, rgba(17, 34, 51, 0.15)), var(--shadow-md);
}

.password-toggle-wrap {
    position: relative;
}

.password-toggle-wrap .password-toggle-target {
    padding-right: 82px;
}

.password-toggle-btn {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 56px;
    padding: 6px 10px;
    border: 0;
    border-radius: 10px;
    background: transparent;
    color: var(--theme-auth-input-icon, var(--text-muted, #94A3B8));
    font: inherit;
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
    transition: all var(--transition-fast, 0.2s ease);
}

.password-toggle-btn:hover {
    background: rgba(148, 163, 184, 0.12);
    color: var(--text-primary, #0F172A);
}

.password-toggle-btn[aria-pressed="true"] {
    color: var(--brand-accent-text, #112233);
}

.password-toggle-btn:focus-visible {
    outline: 2px solid var(--brand-primary, #112233);
    outline-offset: 2px;
}

.theme-login-submit {
    width: 100%;
    margin-top: 6px;
}

.theme-login-footer {
    padding: var(--theme-auth-card-footer-padding-compact);
    border-top: 1px solid var(--border-primary, #E2E8F0);
    background: var(--bg-card, transparent);
    text-align: center;
    display: grid;
    gap: 10px;
    color: var(--text-secondary, #334155);
}

.theme-login-note {
    font-size: 12px;
    line-height: 1.55;
    color: var(--text-tertiary, #64748B);
}

.theme-login-meta {
    display: grid;
    justify-items: center;
    gap: 8px;
}

.theme-auth-2fa-panel {
    display: none;
    margin-top: 16px;
    padding: 16px;
    background: var(--theme-auth-2fa-bg);
    border: 2px solid var(--theme-auth-2fa-border);
    border-radius: 12px;
}

.theme-auth-2fa-header {
    text-align: center;
    margin-bottom: 10px;
}

.theme-auth-2fa-title {
    font-weight: 700;
    color: var(--theme-auth-2fa-title);
    font-size: 14px;
    margin-top: 4px;
}

.theme-auth-2fa-copy {
    font-size: 12px;
    color: var(--theme-auth-2fa-text);
}

.theme-auth-2fa-panel--mobile {
    margin-top: 0;
    padding: 0;
    background: none;
    border: none;
}

.theme-auth-2fa-header--mobile {
    margin-bottom: 14px;
    padding: 12px;
    background: var(--theme-mobile-login-2fa-bg);
    border-radius: 10px;
    text-align: center;
}

.theme-auth-2fa-title--mobile {
    font-size: 13px;
    color: var(--theme-mobile-login-2fa-title);
}

.theme-auth-2fa-copy--mobile {
    margin-top: 2px;
    font-size: 11px;
    color: var(--theme-mobile-login-2fa-copy);
}

.theme-auth-2fa-icon {
    fill: var(--theme-auth-2fa-icon);
}

.theme-auth-2fa-field {
    margin-bottom: 0;
}

.theme-auth-2fa-input {
    text-align: center;
    letter-spacing: 8px;
    font-size: 22px;
    font-family: monospace;
    font-weight: 700;
}

.theme-inline-icon {
    vertical-align: middle;
}

.theme-inline-icon--button {
    margin-right: 6px;
    margin-top: -2px;
}

.theme-inline-icon--back {
    margin-right: 4px;
    margin-top: -1px;
}

.theme-inline-icon--forward {
    margin-left: 4px;
    vertical-align: -2px;
}

.theme-inline-icon--settings {
    vertical-align: -2px;
}

.theme-inline-icon--heading {
    margin-right: 8px;
    vertical-align: -3px;
}

.theme-inline-icon--label {
    margin-right: 6px;
    vertical-align: -2px;
}

.theme-inline-icon--spin {
    animation: spin 1s linear infinite;
}

.theme-divider-compact {
    margin: 12px 28px 16px;
}

.theme-hidden-input {
    display: none;
}

.theme-share-overlay {
    position: fixed;
    inset: 0;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 16px;
    background: rgba(0, 0, 0, 0.55);
    -webkit-backdrop-filter: blur(4px);
    backdrop-filter: blur(4px);
    z-index: 100000;
}

.theme-share-panel {
    width: 100%;
    max-width: 480px;
    background: var(--bg-card, #FFFFFF);
    border-radius: 20px;
    box-shadow: 0 24px 64px rgba(0, 0, 0, 0.25);
    overflow: hidden;
    animation: wizCardEntry 0.5s cubic-bezier(.16, 1, .3, 1) both;
}

.theme-share-header {
    background: var(--brand-gradient);
    padding: 24px 24px 20px;
}

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

.theme-share-icon-box {
    width: 44px;
    height: 44px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.theme-share-title {
    margin: 0;
    color: #FFFFFF;
    font-size: 18px;
    font-weight: 700;
}

.theme-share-subtitle {
    margin: 4px 0 0;
    color: rgba(255, 255, 255, 0.75);
    font-size: 13px;
}

.theme-share-body {
    padding: 24px;
}

.theme-share-qr-section {
    text-align: center;
    margin-bottom: 20px;
}

.theme-share-qr-box {
    display: inline-block;
    padding: 12px;
    background: #FFFFFF;
    border-radius: 12px;
    border: 2px solid var(--border-primary, #E5E7EB);
}

.theme-share-caption {
    margin: 10px 0 0;
    font-size: 12px;
    color: var(--text-tertiary, #6B7280);
}

.theme-share-url-row {
    background: var(--bg-card-nested, #F9FAFB);
    border: 1px solid var(--border-primary, #E5E7EB);
    border-radius: 10px;
    padding: 10px 12px;
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 20px;
}

.theme-share-url-icon {
    flex-shrink: 0;
    fill: var(--brand-primary, #112233);
}

.theme-share-url-text {
    flex: 1;
    font-size: 13px;
    color: var(--text-primary, #111827);
    font-family: monospace;
    word-break: break-all;
}

.theme-share-copy-btn {
    flex-shrink: 0;
    background: var(--brand-primary, #112233);
    color: #FFFFFF;
    border: none;
    border-radius: 7px;
    padding: 6px 12px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
}

.theme-share-copy-btn.is-copied {
    background: var(--theme-share-copy-success);
}

.theme-setup-upload-icon {
    color: var(--theme-setup-upload-icon);
}

.theme-share-help {
    background: #EEF2FF;
    border-radius: 10px;
    padding: 14px 16px;
    margin-bottom: 20px;
}

.theme-share-help-title {
    margin: 0 0 8px;
    font-size: 13px;
    font-weight: 600;
    color: var(--theme-release-ui-text);
}

.theme-share-help-list {
    margin: 0;
    padding-left: 18px;
    font-size: 13px;
    color: var(--text-secondary, #374151);
    line-height: 1.7;
}

.theme-share-actions {
    display: flex;
    gap: 10px;
}

.theme-share-primary-btn {
    flex: 1;
    background: var(--brand-primary, #112233);
    color: #FFFFFF;
    border: none;
    border-radius: 10px;
    padding: 13px;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
}

.theme-share-secondary-btn {
    flex-shrink: 0;
    background: var(--bg-hover, #F3F4F6);
    color: var(--text-secondary, #374151);
    border: 1px solid var(--border-primary, #E5E7EB);
    border-radius: 10px;
    padding: 13px 16px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
}

.theme-strength-meter {
    height: 4px;
    border-radius: 2px;
    margin-top: 6px;
    transition: all 0.3s;
    background: var(--theme-auth-strength-empty);
}

.theme-strength-text {
    font-size: 11px;
    margin-top: 4px;
    color: var(--theme-auth-strength-text);
}

.theme-auth-submit--stacked {
    margin-bottom: 8px;
}

.theme-auth-back-link {
    width: 100%;
    padding: 8px;
    border: none;
    background: none;
    color: var(--theme-auth-back-link);
    font: inherit;
    font-size: 13px;
    text-align: center;
    cursor: pointer;
}

.theme-auth-links--compact-centered {
    margin-top: 6px;
    font-size: 10px;
    text-align: center;
}

@media (max-width: 960px) {
    .theme-auth-shell {
        grid-template-columns: 1fr;
        max-width: 560px;
    }

    .theme-auth-spotlight {
        padding: 26px;
    }

    .theme-auth-spotlight-metrics {
        grid-template-columns: 1fr;
    }

    .theme-auth-shell--setup .theme-auth-spotlight {
        order: -1;
    }
}