/* =========================
   Navo Safe-to-Quit

   Controls:
   - Authenticated Safe-to-Quit page
   - Public Safe-to-Quit calculator
   - Calculator form
   - Result status
   - Progress indicators
   - Metric cards
   - Recommendation banner
   - Public navigation and hero
   - Responsive behavior
========================= */


/* =========================
   Safe-to-Quit Tokens
========================= */

:root {
    --safe-bg: #020617;
    --safe-surface: rgba(15, 23, 42, 0.88);
    --safe-surface-strong: rgba(15, 23, 42, 0.97);
    --safe-surface-soft: rgba(30, 41, 59, 0.66);
    --safe-row: rgba(255, 255, 255, 0.035);
    --safe-row-hover: rgba(255, 255, 255, 0.052);

    --safe-border: rgba(148, 163, 184, 0.16);
    --safe-border-soft: rgba(148, 163, 184, 0.10);
    --safe-border-strong: rgba(148, 163, 184, 0.24);

    --safe-heading: #f8fafc;
    --safe-text: #e2e8f0;
    --safe-muted: #94a3b8;
    --safe-muted-soft: #64748b;

    --safe-blue: #60a5fa;
    --safe-blue-strong: #2563eb;
    --safe-blue-dark: #1d4ed8;

    --safe-teal: #2dd4bf;
    --safe-teal-soft: #5eead4;

    --safe-green: #22c55e;
    --safe-green-soft: #86efac;

    --safe-amber: #f59e0b;
    --safe-amber-soft: #fcd34d;

    --safe-red: #ef4444;
    --safe-red-soft: #fca5a5;

    --safe-radius-xl: 28px;
    --safe-radius-lg: 24px;
    --safe-radius: 18px;
    --safe-radius-sm: 13px;

    --safe-shadow:
        0 18px 44px rgba(0, 0, 0, 0.24),
        inset 0 1px 0 rgba(255, 255, 255, 0.025);

    --safe-shadow-strong:
        0 24px 64px rgba(0, 0, 0, 0.34),
        inset 0 1px 0 rgba(255, 255, 255, 0.035);
}


/* =========================
   Shared Foundation
========================= */

.safe-page,
.safe-public-page {
    color: var(--safe-text);
}

.safe-page *,
.safe-page *::before,
.safe-page *::after,
.safe-public-page *,
.safe-public-page *::before,
.safe-public-page *::after {
    box-sizing: border-box;
}

.safe-page {
    display: flex;
    flex-direction: column;
    gap: 28px;
    min-width: 0;
    width: 100%;
}

.safe-page h1,
.safe-page h2,
.safe-page h3,
.safe-page p,
.safe-public-page h1,
.safe-public-page h2,
.safe-public-page h3,
.safe-public-page p {
    overflow-wrap: break-word;
}

.safe-page .eyebrow,
.safe-public-page .eyebrow {
    color: var(--safe-teal);
    display: block;
    font-size: 0.69rem;
    font-weight: 950;
    letter-spacing: 0.13em;
    line-height: 1.2;
    text-transform: uppercase;
}


/* =========================
   Shared Surfaces
========================= */

.safe-surface,
.safe-app-hero,
.safe-public-hero,
.safe-public-positioning {
    background:
        radial-gradient(
            circle at 94% 8%,
            rgba(45, 212, 191, 0.065),
            transparent 28%
        ),
        var(--safe-surface);
    border: 1px solid var(--safe-border);
    box-shadow: var(--safe-shadow);
}

.safe-surface {
    border-radius: 22px;
    min-width: 0;
    overflow: hidden;
    padding: 28px;
}

.safe-section-header {
    align-items: flex-start;
    display: flex;
    gap: 22px;
    justify-content: space-between;
    margin-bottom: 26px;
}

.safe-section-header > div:first-child {
    min-width: 0;
}

.safe-section-header h2 {
    color: var(--safe-heading);
    font-family: Outfit, Inter, sans-serif;
    font-size: clamp(1.35rem, 2vw, 1.75rem);
    font-weight: 950;
    letter-spacing: -0.045em;
    line-height: 1.1;
    margin: 6px 0 0;
}

.safe-section-header p {
    color: var(--safe-muted);
    font-size: 0.86rem;
    font-weight: 700;
    line-height: 1.6;
    margin: 10px 0 0;
    max-width: 680px;
}


/* =========================
   Authenticated App Hero
========================= */

.safe-app-hero {
    align-items: flex-end;
    border-radius: var(--safe-radius-lg);
    display: flex;
    gap: 34px;
    justify-content: space-between;
    min-height: 220px;
    overflow: hidden;
    padding: 34px;
    position: relative;
}

.safe-app-hero::before {
    background:
        radial-gradient(
            circle at 8% 12%,
            rgba(45, 212, 191, 0.15),
            transparent 30%
        ),
        radial-gradient(
            circle at 96% 5%,
            rgba(59, 130, 246, 0.14),
            transparent 32%
        );
    content: "";
    inset: 0;
    pointer-events: none;
    position: absolute;
}

.safe-app-hero::after {
    background:
        radial-gradient(
            circle,
            rgba(96, 165, 250, 0.08),
            transparent 68%
        );
    content: "";
    height: 320px;
    pointer-events: none;
    position: absolute;
    right: -100px;
    top: -125px;
    width: 320px;
}

.safe-app-hero > * {
    position: relative;
    z-index: 1;
}

.safe-app-hero-content {
    min-width: 0;
}

.safe-app-hero h1 {
    color: var(--safe-heading);
    font-family: Outfit, Inter, sans-serif;
    font-size: clamp(2.3rem, 4.5vw, 4rem);
    font-weight: 950;
    letter-spacing: -0.065em;
    line-height: 0.98;
    margin: 9px 0 0;
}

.safe-app-hero p {
    color: var(--safe-muted);
    font-size: 0.96rem;
    font-weight: 700;
    line-height: 1.68;
    margin: 18px 0 0;
    max-width: 760px;
}

.safe-app-hero-actions {
    align-items: center;
    display: flex;
    flex: 0 0 auto;
    flex-wrap: wrap;
    gap: 11px;
    justify-content: flex-end;
}

.safe-app-hero-actions .button {
    min-height: 46px;
    white-space: nowrap;
}

.safe-app-hero-actions .button:first-child::before {
    content: "\2190";
    font-size: 0.92rem;
    margin-right: 8px;
}

.safe-app-hero-actions .button:last-child::after {
    content: "\2192";
    font-size: 0.92rem;
    margin-left: 8px;
}


/* =========================
   Auto-Tracked Notice
========================= */

.safe-data-notice {
    align-items: center;
    background:
        linear-gradient(
            135deg,
            rgba(37, 99, 235, 0.14),
            rgba(45, 212, 191, 0.075)
        );
    border: 1px solid rgba(96, 165, 250, 0.22);
    border-radius: var(--safe-radius);
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.025),
        0 12px 28px rgba(2, 6, 23, 0.16);
    display: grid;
    gap: 16px;
    grid-template-columns: auto minmax(0, 1fr);
    padding: 19px;
}

.safe-data-notice-icon {
    align-items: center;
    background: rgba(96, 165, 250, 0.14);
    border: 1px solid rgba(96, 165, 250, 0.22);
    border-radius: 13px;
    color: #bfdbfe;
    display: inline-flex;
    font-size: 1rem;
    font-weight: 950;
    height: 44px;
    justify-content: center;
    width: 44px;
}

.safe-data-notice strong {
    color: var(--safe-heading);
    display: block;
    font-size: 0.9rem;
    font-weight: 950;
}

.safe-data-notice p {
    color: var(--safe-muted);
    font-size: 0.79rem;
    font-weight: 700;
    line-height: 1.55;
    margin: 5px 0 0;
}


/* =========================
   Calculator Layout
========================= */

.safe-calculator-layout {
    align-items: start;
    display: grid;
    gap: 24px;
    grid-template-columns:
        minmax(0, 1.05fr)
        minmax(380px, 0.95fr);
    width: 100%;
}

.safe-form-panel,
.safe-result-panel {
    min-height: 100%;
}

.safe-result-panel {
    align-self: start;
    position: sticky;
    top: 90px;
}


/* =========================
   Calculator Form
========================= */

.safe-form {
    display: grid;
    gap: 24px;
}

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

.safe-form .form-group {
    display: flex;
    flex-direction: column;
    gap: 9px;
    margin: 0;
    min-width: 0;
    position: relative;
}

.safe-form label {
    align-items: center;
    color: var(--safe-text);
    display: flex;
    font-size: 0.78rem;
    font-weight: 900;
    gap: 8px;
    line-height: 1.3;
}

.safe-form label::before {
    align-items: center;
    background: rgba(96, 165, 250, 0.10);
    border: 1px solid rgba(96, 165, 250, 0.15);
    border-radius: 8px;
    color: #93c5fd;
    display: inline-flex;
    flex: 0 0 auto;
    font-size: 0.68rem;
    font-weight: 950;
    height: 24px;
    justify-content: center;
    width: 24px;
}

.safe-form-grid .form-group:nth-child(1) label::before {
    content: "\2212";
    background: rgba(239, 68, 68, 0.10);
    border-color: rgba(239, 68, 68, 0.17);
    color: var(--safe-red-soft);
}

.safe-form-grid .form-group:nth-child(2) label::before {
    content: "\25A3";
    background: rgba(45, 212, 191, 0.10);
    border-color: rgba(45, 212, 191, 0.17);
    color: var(--safe-teal-soft);
}

.safe-form-grid .form-group:nth-child(3) label::before {
    content: "\2197";
    background: rgba(96, 165, 250, 0.10);
    border-color: rgba(96, 165, 250, 0.17);
    color: #93c5fd;
}

.safe-form-grid .form-group:nth-child(4) label::before {
    content: "+";
    background: rgba(34, 197, 94, 0.10);
    border-color: rgba(34, 197, 94, 0.17);
    color: var(--safe-green-soft);
}

.safe-form-grid .form-group:nth-child(5) label::before {
    content: "\2212";
    background: rgba(239, 68, 68, 0.10);
    border-color: rgba(239, 68, 68, 0.17);
    color: var(--safe-red-soft);
}

.safe-form-grid .form-group:nth-child(6) label::before {
    content: "\25CE";
    background: rgba(245, 158, 11, 0.10);
    border-color: rgba(245, 158, 11, 0.17);
    color: var(--safe-amber-soft);
}

.safe-form .form-group > small {
    color: var(--safe-muted);
    font-size: 0.69rem;
    font-weight: 700;
    line-height: 1.5;
    min-height: 2.9em;
}

.safe-currency-input,
.safe-month-input {
    align-items: center;
    background: rgba(2, 6, 23, 0.64);
    border: 1px solid var(--safe-border-soft);
    border-radius: var(--safe-radius-sm);
    display: flex;
    min-width: 0;
    overflow: hidden;
    transition:
        background 0.18s ease,
        border-color 0.18s ease,
        box-shadow 0.18s ease,
        transform 0.18s ease;
}

.safe-currency-input:hover,
.safe-month-input:hover {
    background: rgba(2, 6, 23, 0.76);
    border-color: rgba(148, 163, 184, 0.22);
}

.safe-currency-input:focus-within,
.safe-month-input:focus-within {
    background: rgba(2, 6, 23, 0.88);
    border-color: var(--safe-teal);
    box-shadow: 0 0 0 4px rgba(45, 212, 191, 0.11);
    transform: translateY(-1px);
}

.safe-currency-input > span,
.safe-month-input > span {
    align-items: center;
    color: var(--safe-muted);
    display: inline-flex;
    flex: 0 0 auto;
    font-size: 0.8rem;
    font-weight: 900;
    min-height: 52px;
    padding: 0 14px;
}

.safe-currency-input > span {
    border-right: 1px solid var(--safe-border-soft);
}

.safe-month-input > span {
    border-left: 1px solid var(--safe-border-soft);
}

.safe-currency-input input,
.safe-month-input input {
    background: transparent !important;
    border: 0 !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    color: var(--safe-heading);
    flex: 1 1 auto;
    font-size: 0.94rem;
    font-weight: 800;
    min-height: 52px;
    min-width: 0;
    outline: 0;
    padding: 0 14px;
    width: 100%;
}

.safe-submit-button {
    justify-self: start;
    min-height: 48px;
    min-width: 240px;
}

.safe-submit-button::after {
    content: "\2192";
    margin-left: 9px;
}

.safe-form-disclaimer {
    border-top: 1px solid var(--safe-border-soft);
    color: var(--safe-muted);
    font-size: 0.67rem;
    font-weight: 700;
    line-height: 1.5;
    margin: -5px 0 0;
    padding-top: 15px;
}

.safe-form.is-submitting {
    pointer-events: none;
}

.safe-form.is-submitting input {
    opacity: 0.72;
}

.safe-form.is-submitting .safe-submit-button {
    cursor: wait;
    opacity: 0.76;
}

.safe-form.is-submitting .safe-submit-button::after {
    animation:
        safe-button-loading
        0.8s
        linear
        infinite;
    border: 2px solid rgba(255, 255, 255, 0.34);
    border-radius: 999px;
    border-top-color: #ffffff;
    content: "";
    height: 14px;
    margin-left: 9px;
    width: 14px;
}

@keyframes safe-button-loading {
    to {
        transform: rotate(360deg);
    }
}


/* =========================
   Result Heading
========================= */

.safe-result-heading {
    align-items: flex-start;
    display: flex;
    gap: 18px;
    justify-content: space-between;
}

.safe-result-heading > div:first-child {
    min-width: 0;
}

.safe-result-heading h2 {
    color: var(--safe-heading);
    font-family: Outfit, Inter, sans-serif;
    font-size: clamp(1.3rem, 1.8vw, 1.65rem);
    font-weight: 950;
    letter-spacing: -0.04em;
    line-height: 1.1;
    margin: 6px 0 0;
}

.safe-source-badge {
    align-items: center;
    border: 1px solid;
    border-radius: 999px;
    display: inline-flex;
    flex: 0 0 auto;
    font-size: 0.62rem;
    font-weight: 950;
    letter-spacing: 0.09em;
    line-height: 1;
    min-height: 30px;
    padding: 0 11px;
    text-transform: uppercase;
    white-space: nowrap;
}

.safe-source-badge--flowpilot {
    background: rgba(45, 212, 191, 0.11);
    border-color: rgba(45, 212, 191, 0.22);
    color: var(--safe-teal-soft);
}

.safe-source-badge--manual {
    background: rgba(96, 165, 250, 0.11);
    border-color: rgba(96, 165, 250, 0.22);
    color: #bfdbfe;
}


/* =========================
   Readiness Status
========================= */

.safe-status {
    border: 1px solid;
    border-radius: 20px;
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.025),
        0 16px 34px rgba(0, 0, 0, 0.16);
    margin-top: 22px;
    overflow: hidden;
    padding: 22px;
    position: relative;
}

.safe-status::before {
    background: currentColor;
    content: "";
    height: 3px;
    inset: 0 0 auto;
    opacity: 0.92;
    position: absolute;
}

.safe-status::after {
    background: currentColor;
    border-radius: 999px;
    content: "";
    filter: blur(42px);
    height: 130px;
    opacity: 0.09;
    pointer-events: none;
    position: absolute;
    right: -35px;
    top: -45px;
    width: 130px;
}

.safe-status--safe {
    background:
        radial-gradient(
            circle at 100% 0,
            rgba(34, 197, 94, 0.13),
            transparent 34%
        ),
        rgba(34, 197, 94, 0.075);
    border-color: rgba(34, 197, 94, 0.30);
    color: var(--safe-green);
}

.safe-status--close {
    background:
        radial-gradient(
            circle at 100% 0,
            rgba(245, 158, 11, 0.14),
            transparent 34%
        ),
        rgba(245, 158, 11, 0.075);
    border-color: rgba(245, 158, 11, 0.30);
    color: var(--safe-amber);
}

.safe-status--not_safe {
    background:
        radial-gradient(
            circle at 100% 0,
            rgba(239, 68, 68, 0.14),
            transparent 34%
        ),
        rgba(239, 68, 68, 0.075);
    border-color: rgba(239, 68, 68, 0.30);
    color: var(--safe-red);
}

.safe-status-score {
    align-items: flex-start;
    display: flex;
    gap: 18px;
    justify-content: space-between;
    position: relative;
    z-index: 1;
}

.safe-status-score span {
    color: var(--safe-muted);
    font-size: 0.65rem;
    font-weight: 950;
    letter-spacing: 0.09em;
    padding-top: 6px;
    text-transform: uppercase;
}

.safe-status-score strong {
    color: var(--safe-heading);
    display: block;
    font-family: Outfit, Inter, sans-serif;
    font-size: clamp(2.65rem, 5vw, 4.2rem);
    font-weight: 950;
    letter-spacing: -0.07em;
    line-height: 0.82;
    text-shadow: 0 10px 32px rgba(0, 0, 0, 0.26);
}

.safe-status-score strong::after {
    color: var(--safe-muted);
    content: "Overall Readiness";
    display: block;
    font-family: Inter, sans-serif;
    font-size: 0.57rem;
    font-weight: 950;
    letter-spacing: 0.1em;
    line-height: 1.2;
    margin-top: 12px;
    text-align: right;
    text-transform: uppercase;
}

.safe-status h3 {
    color: var(--safe-heading);
    font-family: Outfit, Inter, sans-serif;
    font-size: 1.28rem;
    font-weight: 950;
    letter-spacing: -0.035em;
    line-height: 1.22;
    margin: 22px 0 0;
    position: relative;
    z-index: 1;
}

.safe-status p {
    color: var(--safe-text);
    font-size: 0.84rem;
    font-weight: 800;
    line-height: 1.55;
    margin: 8px 0 0;
    position: relative;
    z-index: 1;
}

.safe-status--safe h3,
.safe-status--safe p {
    color: #dcfce7;
}

.safe-status--close h3,
.safe-status--close p {
    color: #fef3c7;
}

.safe-status--not_safe h3,
.safe-status--not_safe p {
    color: #fee2e2;
}


/* =========================
   Progress
========================= */

.safe-progress-card {
    background: var(--safe-row);
    border: 1px solid var(--safe-border-soft);
    border-radius: var(--safe-radius);
    margin-top: 18px;
    padding: 18px;
}

.safe-progress-header {
    align-items: center;
    display: flex;
    gap: 14px;
    justify-content: space-between;
}

.safe-progress-header span {
    color: var(--safe-muted);
    font-size: 0.67rem;
    font-weight: 950;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.safe-progress-header strong {
    color: var(--safe-heading);
    font-size: 1rem;
    font-weight: 950;
}

.safe-progress-track {
    background: rgba(148, 163, 184, 0.19);
    border-radius: 999px;
    height: 11px;
    margin-top: 13px;
    overflow: hidden;
    width: 100%;
}

.safe-progress-fill {
    border-radius: inherit;
    display: block;
    height: 100%;
    max-width: 100%;
    min-width: 0;
    position: relative;
    transition: width 0.45s ease;
    width: 0;
}

.safe-progress-fill::after {
    background:
        linear-gradient(
            90deg,
            transparent,
            rgba(255, 255, 255, 0.32),
            transparent
        );
    content: "";
    inset: 0;
    position: absolute;
    transform: translateX(-100%);
}

.safe-progress-fill--safe {
    background:
        linear-gradient(
            90deg,
            #16a34a,
            var(--safe-green)
        );
}

.safe-progress-fill--close {
    background:
        linear-gradient(
            90deg,
            #d97706,
            var(--safe-amber)
        );
}

.safe-progress-fill--not_safe {
    background:
        linear-gradient(
            90deg,
            #dc2626,
            var(--safe-red)
        );
}

.safe-progress-breakdown {
    display: grid;
    gap: 11px;
    grid-template-columns:
        repeat(2, minmax(0, 1fr));
    margin-top: 16px;
}

.safe-progress-breakdown > div {
    background: rgba(2, 6, 23, 0.25);
    border: 1px solid var(--safe-border-soft);
    border-radius: 13px;
    padding: 13px;
}

.safe-progress-breakdown span {
    color: var(--safe-muted);
    display: block;
    font-size: 0.61rem;
    font-weight: 950;
    letter-spacing: 0.07em;
    text-transform: uppercase;
}

.safe-progress-breakdown strong {
    color: var(--safe-heading);
    display: block;
    font-size: 0.95rem;
    font-weight: 950;
    margin-top: 6px;
}


/* =========================
   Result Metrics
========================= */

.safe-metrics-grid {
    display: grid;
    gap: 12px;
    grid-template-columns:
        repeat(2, minmax(0, 1fr));
    margin-top: 18px;
}

.safe-metric {
    background: var(--safe-row);
    border: 1px solid var(--safe-border-soft);
    border-radius: 15px;
    min-width: 0;
    padding: 15px;
    transition:
        background 0.18s ease,
        border-color 0.18s ease,
        transform 0.18s ease;
}

.safe-metric:hover {
    background: var(--safe-row-hover);
    border-color: rgba(148, 163, 184, 0.18);
    transform: translateY(-1px);
}

.safe-metric > span {
    color: var(--safe-muted);
    display: block;
    font-size: 0.61rem;
    font-weight: 950;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.safe-metric > strong {
    color: var(--safe-heading);
    display: block;
    font-family: Outfit, Inter, sans-serif;
    font-size: 1.12rem;
    font-weight: 950;
    line-height: 1.1;
    margin-top: 9px;
    overflow-wrap: anywhere;
}

.safe-metric > small {
    color: var(--safe-muted);
    display: block;
    font-size: 0.66rem;
    font-weight: 700;
    line-height: 1.4;
    margin-top: 5px;
}


/* =========================
   Recommendation
========================= */

.safe-recommendation {
    align-items: flex-start;
    background:
        radial-gradient(
            circle at 100% 0,
            rgba(45, 212, 191, 0.10),
            transparent 34%
        ),
        linear-gradient(
            135deg,
            rgba(37, 99, 235, 0.17),
            rgba(45, 212, 191, 0.075)
        );
    border: 1px solid rgba(96, 165, 250, 0.24);
    border-radius: 19px;
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.025),
        0 16px 34px rgba(0, 0, 0, 0.16);
    display: grid;
    gap: 16px;
    grid-template-columns: auto minmax(0, 1fr);
    margin-top: 18px;
    min-height: 116px;
    padding: 20px;
    position: relative;
}

.safe-recommendation::before {
    background:
        linear-gradient(
            90deg,
            var(--safe-blue),
            var(--safe-teal)
        );
    border-radius: 999px;
    content: "";
    height: 3px;
    inset: 0 20px auto;
    position: absolute;
}

.safe-recommendation-icon {
    align-items: center;
    background:
        linear-gradient(
            135deg,
            rgba(96, 165, 250, 0.20),
            rgba(45, 212, 191, 0.12)
        );
    border: 1px solid rgba(96, 165, 250, 0.24);
    border-radius: 13px;
    color: #dbeafe;
    display: inline-flex;
    font-size: 1rem;
    font-weight: 950;
    height: 44px;
    justify-content: center;
    margin-top: 4px;
    width: 44px;
}

.safe-recommendation h3 {
    color: var(--safe-heading);
    font-family: Outfit, Inter, sans-serif;
    font-size: 1rem;
    font-weight: 950;
    letter-spacing: -0.025em;
    margin: 3px 0 0;
}

.safe-recommendation p {
    color: #cbd5e1;
    font-size: 0.8rem;
    font-weight: 700;
    line-height: 1.6;
    margin: 7px 0 0;
}

.safe-result-actions {
    border-top: 1px solid var(--safe-border-soft);
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 20px;
    padding-top: 18px;
}

.safe-result-actions .button:first-child::after {
    content: "\2192";
    margin-left: 8px;
}

.safe-result-actions .button:last-child::after {
    content: "\2192";
    margin-left: 8px;
}


/* =========================
   Preview Panel
========================= */

.safe-preview-panel {
    display: flex;
    flex-direction: column;
    min-height: 100%;
}

.safe-preview-icon {
    align-items: center;
    background:
        linear-gradient(
            135deg,
            rgba(96, 165, 250, 0.18),
            rgba(45, 212, 191, 0.10)
        );
    border: 1px solid rgba(96, 165, 250, 0.20);
    border-radius: 15px;
    color: #bfdbfe;
    display: inline-flex;
    font-size: 1.2rem;
    font-weight: 950;
    height: 52px;
    justify-content: center;
    margin-bottom: 20px;
    width: 52px;
}

.safe-preview-panel h2 {
    color: var(--safe-heading);
    font-family: Outfit, Inter, sans-serif;
    font-size: clamp(1.5rem, 2.3vw, 2rem);
    font-weight: 950;
    letter-spacing: -0.05em;
    line-height: 1.08;
    margin: 8px 0 0;
}

.safe-preview-intro {
    color: var(--safe-muted);
    font-size: 0.84rem;
    font-weight: 700;
    line-height: 1.6;
    margin: 13px 0 0;
}

.safe-preview-list {
    display: grid;
    gap: 12px;
    margin-top: 24px;
}

.safe-preview-list article {
    align-items: flex-start;
    background: var(--safe-row);
    border: 1px solid var(--safe-border-soft);
    border-radius: 15px;
    display: grid;
    gap: 13px;
    grid-template-columns: auto minmax(0, 1fr);
    padding: 15px;
    transition:
        background 0.18s ease,
        border-color 0.18s ease,
        transform 0.18s ease;
}

.safe-preview-list article:hover {
    background: var(--safe-row-hover);
    border-color: rgba(96, 165, 250, 0.18);
    transform: translateY(-1px);
}

.safe-preview-list article > span {
    align-items: center;
    background: rgba(96, 165, 250, 0.12);
    border-radius: 9px;
    color: #93c5fd;
    display: inline-flex;
    font-size: 0.65rem;
    font-weight: 950;
    height: 31px;
    justify-content: center;
    width: 31px;
}

.safe-preview-list strong {
    color: var(--safe-heading);
    display: block;
    font-size: 0.83rem;
    font-weight: 950;
}

.safe-preview-list p {
    color: var(--safe-muted);
    font-size: 0.73rem;
    font-weight: 700;
    line-height: 1.5;
    margin: 5px 0 0;
}


/* =========================
   Explanation Panel
========================= */

.safe-explanation-grid {
    display: grid;
    gap: 14px;
    grid-template-columns:
        repeat(3, minmax(0, 1fr));
}

.safe-explanation-grid article {
    background: var(--safe-row);
    border: 1px solid var(--safe-border-soft);
    border-radius: 16px;
    min-height: 150px;
    padding: 18px;
    transition:
        background 0.18s ease,
        border-color 0.18s ease,
        transform 0.18s ease;
}

.safe-explanation-grid article:hover {
    background: var(--safe-row-hover);
    border-color: rgba(96, 165, 250, 0.18);
    transform: translateY(-1px);
}

.safe-explanation-grid article > span {
    color: var(--safe-blue);
    font-family: Outfit, Inter, sans-serif;
    font-size: 0.78rem;
    font-weight: 950;
}

.safe-explanation-grid h3 {
    color: var(--safe-heading);
    font-size: 0.92rem;
    font-weight: 950;
    margin: 14px 0 0;
}

.safe-explanation-grid p {
    color: var(--safe-muted);
    font-size: 0.76rem;
    font-weight: 700;
    line-height: 1.55;
    margin: 8px 0 0;
}


/* =========================
   Public Page Foundation
========================= */

body.safe-public-page {
    background:
        radial-gradient(
            circle at 16% 8%,
            rgba(45, 212, 191, 0.14),
            transparent 30%
        ),
        radial-gradient(
            circle at 86% 14%,
            rgba(129, 140, 248, 0.12),
            transparent 32%
        ),
        var(--safe-bg);
    color: var(--safe-text);
    font-family:
        Inter,
        ui-sans-serif,
        system-ui,
        -apple-system,
        BlinkMacSystemFont,
        "Segoe UI",
        sans-serif;
    margin: 0;
    min-height: 100vh;
}

body.safe-public-page::before {
    background-image:
        linear-gradient(
            rgba(148, 163, 184, 0.03) 1px,
            transparent 1px
        ),
        linear-gradient(
            90deg,
            rgba(148, 163, 184, 0.03) 1px,
            transparent 1px
        );
    background-size: 44px 44px;
    content: "";
    inset: 0;
    pointer-events: none;
    position: fixed;
}


/* =========================
   Public Navigation
========================= */

.safe-public-nav {
    align-items: center;
    backdrop-filter: blur(18px);
    background: rgba(15, 23, 42, 0.82);
    border: 1px solid var(--safe-border);
    border-radius: 20px;
    box-shadow: var(--safe-shadow);
    display: flex;
    justify-content: space-between;
    margin: 18px auto 0;
    min-height: 72px;
    padding: 12px 14px 12px 20px;
    position: sticky;
    top: 18px;
    width: min(
        1180px,
        calc(100% - 40px)
    );
    z-index: 20;
}

.safe-brand {
    align-items: center;
    color: #ffffff;
    display: inline-flex;
    font-size: 1.05rem;
    font-weight: 950;
    gap: 10px;
    letter-spacing: -0.03em;
    text-decoration: none;
}

.safe-brand::before {
    align-items: center;
    background:
        linear-gradient(
            135deg,
            var(--safe-teal),
            var(--safe-blue-strong)
        );
    border-radius: 9px;
    color: #020617;
    content: "N";
    display: inline-flex;
    font-size: 0.61rem;
    font-weight: 950;
    height: 29px;
    justify-content: center;
    width: 29px;
}

.safe-public-nav-links {
    align-items: center;
    display: flex;
    gap: 7px;
}

.safe-public-nav-links a {
    align-items: center;
    border-radius: 11px;
    color: #cbd5e1;
    display: inline-flex;
    font-size: 0.83rem;
    font-weight: 850;
    justify-content: center;
    min-height: 40px;
    padding: 0 13px;
    text-decoration: none;
    transition:
        background 0.18s ease,
        color 0.18s ease,
        transform 0.18s ease;
}

.safe-public-nav-links a:hover {
    background: rgba(255, 255, 255, 0.055);
    color: #ffffff;
    transform: translateY(-1px);
}

.safe-public-nav-links .safe-nav-cta {
    background: var(--safe-blue-strong);
    color: #ffffff;
}

.safe-public-nav-links .safe-nav-cta:hover {
    background: var(--safe-blue-dark);
}


/* =========================
   Public Hero and Layout
========================= */

.safe-public-main {
    margin: 32px auto 84px;
    position: relative;
    width: min(
        1180px,
        calc(100% - 40px)
    );
    z-index: 1;
}

.safe-public-hero {
    border-radius: 30px;
    overflow: hidden;
    padding: clamp(
        42px,
        7vw,
        80px
    );
    position: relative;
}

.safe-public-hero::before {
    background:
        radial-gradient(
            circle at 90% 5%,
            rgba(96, 165, 250, 0.17),
            transparent 32%
        ),
        radial-gradient(
            circle at 7% 90%,
            rgba(45, 212, 191, 0.12),
            transparent 32%
        );
    content: "";
    inset: 0;
    position: absolute;
}

.safe-public-hero-content {
    max-width: 850px;
    position: relative;
    z-index: 1;
}

.safe-public-hero h1 {
    color: #ffffff;
    font-family: Outfit, Inter, sans-serif;
    font-size: clamp(
        2.5rem,
        6vw,
        5.7rem
    );
    font-weight: 950;
    letter-spacing: -0.075em;
    line-height: 0.94;
    margin: 11px 0 0;
    max-width: 800px;
}

.safe-public-hero-lead {
    color: #cbd5e1;
    font-size: clamp(
        1rem,
        1.4vw,
        1.16rem
    );
    font-weight: 700;
    line-height: 1.75;
    margin: 26px 0 0;
    max-width: 760px;
}

.safe-public-hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 11px;
    margin-top: 32px;
}

.safe-public-hero-actions .button:first-child::after {
    content: "\2193";
    margin-left: 8px;
}

.safe-public-hero-actions .button:last-child::after {
    content: "\2192";
    margin-left: 8px;
}

.safe-public-calculator-layout {
    margin-top: 30px;
}

.safe-public-positioning {
    border-radius: 24px;
    margin-top: 30px;
    overflow: hidden;
    padding: 38px;
}

.safe-public-positioning h2 {
    color: #ffffff;
    font-family: Outfit, Inter, sans-serif;
    font-size: clamp(
        1.7rem,
        3vw,
        2.6rem
    );
    font-weight: 950;
    letter-spacing: -0.05em;
    line-height: 1.08;
    margin: 9px 0 0;
}

.safe-public-positioning p {
    color: var(--safe-muted);
    font-size: 0.9rem;
    font-weight: 700;
    line-height: 1.7;
    margin: 16px 0 22px;
    max-width: 880px;
}


/* =========================
   Responsive
========================= */

@media (max-width: 1180px) {
    .safe-calculator-layout {
        grid-template-columns:
            minmax(0, 1fr)
            minmax(350px, 0.88fr);
    }
}

@media (max-width: 1050px) {
    .safe-calculator-layout {
        grid-template-columns: 1fr;
    }

    .safe-result-panel {
        position: static;
    }

    .safe-explanation-grid {
        grid-template-columns:
            repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 800px) {
    .safe-app-hero {
        align-items: flex-start;
        flex-direction: column;
    }

    .safe-app-hero-actions {
        justify-content: flex-start;
    }

    .safe-section-header,
    .safe-result-heading {
        flex-direction: column;
    }

    .safe-form-grid {
        grid-template-columns: 1fr;
    }

    .safe-form .form-group > small {
        min-height: 0;
    }

    .safe-public-nav {
        align-items: stretch;
        flex-direction: column;
        gap: 10px;
    }

    .safe-public-nav-links {
        display: grid;
        grid-template-columns:
            repeat(2, minmax(0, 1fr));
    }

    .safe-public-nav-links .safe-nav-cta {
        grid-column: 1 / -1;
    }
}

@media (max-width: 650px) {
    .safe-page {
        gap: 20px;
    }

    .safe-app-hero,
    .safe-surface,
    .safe-public-positioning {
        padding: 20px;
    }

    .safe-app-hero {
        min-height: 0;
    }

    .safe-app-hero-actions,
    .safe-public-hero-actions,
    .safe-result-actions {
        align-items: stretch;
        flex-direction: column;
        width: 100%;
    }

    .safe-app-hero-actions .button,
    .safe-public-hero-actions .button,
    .safe-result-actions .button {
        width: 100%;
    }

    .safe-status-score {
        align-items: flex-start;
        flex-direction: column;
    }

    .safe-status-score strong::after {
        text-align: left;
    }

    .safe-metrics-grid,
    .safe-progress-breakdown,
    .safe-explanation-grid {
        grid-template-columns: 1fr;
    }

    .safe-submit-button {
        justify-self: stretch;
        width: 100%;
    }

    .safe-public-main {
        margin-top: 16px;
        width: min(
            calc(100% - 24px),
            1180px
        );
    }

    .safe-public-nav {
        margin-top: 12px;
        width: min(
            calc(100% - 24px),
            1180px
        );
    }

    .safe-public-hero {
        border-radius: 22px;
        padding: 25px;
    }

    .safe-public-positioning {
        margin-top: 20px;
    }
}

@media (max-width: 460px) {
    .safe-app-hero h1 {
        font-size: 2.2rem;
    }

    .safe-data-notice,
    .safe-recommendation,
    .safe-preview-list article {
        grid-template-columns: 1fr;
    }

    .safe-data-notice-icon,
    .safe-recommendation-icon {
        margin-bottom: 3px;
    }

    .safe-status-score strong {
        font-size: 3rem;
    }

    .safe-recommendation {
        min-height: 0;
    }
}


/* =========================
   Reduced Motion
========================= */

@media (prefers-reduced-motion: reduce) {
    .safe-page *,
    .safe-page *::before,
    .safe-page *::after,
    .safe-public-page *,
    .safe-public-page *::before,
    .safe-public-page *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        scroll-behavior: auto !important;
        transition-duration: 0.01ms !important;
    }
}
/* =========================
   Safe-to-Quit Brand + Buttons
========================= */

.safe-page .button,
.safe-public-page .button {
    align-items: center;
    appearance: none;
    border: 1px solid transparent;
    border-radius: 13px;
    box-shadow: none;
    cursor: pointer;
    display: inline-flex;
    font-family:
        Inter,
        ui-sans-serif,
        system-ui,
        -apple-system,
        BlinkMacSystemFont,
        "Segoe UI",
        sans-serif;
    font-size: 0.82rem;
    font-weight: 900;
    gap: 8px;
    justify-content: center;
    line-height: 1;
    min-height: 46px;
    padding: 0 18px;
    position: relative;
    text-align: center;
    text-decoration: none !important;
    transition:
        background 0.18s ease,
        border-color 0.18s ease,
        box-shadow 0.18s ease,
        color 0.18s ease,
        transform 0.18s ease;
    user-select: none;
    white-space: nowrap;
}

.safe-page .button:hover,
.safe-public-page .button:hover {
    text-decoration: none !important;
    transform: translateY(-2px);
}

.safe-page .button:active,
.safe-public-page .button:active {
    transform: translateY(0);
}

.safe-page .button:focus-visible,
.safe-public-page .button:focus-visible {
    outline: 3px solid rgba(45, 212, 191, 0.25);
    outline-offset: 3px;
}


/* Primary button */

.safe-page .button.primary,
.safe-public-page .button.primary {
    background:
        linear-gradient(
            135deg,
            #2563eb 0%,
            #3b82f6 48%,
            #14b8a6 100%
        );
    border-color: rgba(96, 165, 250, 0.42);
    box-shadow:
        0 12px 28px rgba(37, 99, 235, 0.24),
        inset 0 1px 0 rgba(255, 255, 255, 0.20);
    color: #ffffff;
}

.safe-page .button.primary:hover,
.safe-public-page .button.primary:hover {
    background:
        linear-gradient(
            135deg,
            #1d4ed8 0%,
            #2563eb 48%,
            #0f9f91 100%
        );
    border-color: rgba(94, 234, 212, 0.50);
    box-shadow:
        0 16px 34px rgba(37, 99, 235, 0.30),
        inset 0 1px 0 rgba(255, 255, 255, 0.24);
    color: #ffffff;
}


/* Secondary button */

.safe-page .button.secondary,
.safe-public-page .button.secondary {
    background:
        linear-gradient(
            180deg,
            rgba(30, 41, 59, 0.92),
            rgba(15, 23, 42, 0.92)
        );
    border-color: rgba(148, 163, 184, 0.24);
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.045),
        0 8px 20px rgba(0, 0, 0, 0.16);
    color: #e2e8f0;
}

.safe-page .button.secondary:hover,
.safe-public-page .button.secondary:hover {
    background:
        linear-gradient(
            180deg,
            rgba(37, 51, 75, 0.96),
            rgba(19, 29, 49, 0.96)
        );
    border-color: rgba(96, 165, 250, 0.38);
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.065),
        0 12px 26px rgba(0, 0, 0, 0.22);
    color: #ffffff;
}


/* Hero button sizing */

.safe-public-hero-actions .button {
    min-height: 52px;
    padding-left: 22px;
    padding-right: 22px;
}

.safe-public-positioning .button {
    min-height: 48px;
}


/* Submit button */

.safe-submit-button {
    background:
        linear-gradient(
            135deg,
            #2563eb,
            #3b82f6 55%,
            #14b8a6
        ) !important;
    border: 1px solid rgba(96, 165, 250, 0.45) !important;
    box-shadow:
        0 12px 28px rgba(37, 99, 235, 0.25),
        inset 0 1px 0 rgba(255, 255, 255, 0.20) !important;
    color: #ffffff !important;
}

.safe-submit-button:hover {
    background:
        linear-gradient(
            135deg,
            #1d4ed8,
            #2563eb 55%,
            #0f9f91
        ) !important;
    box-shadow:
        0 16px 34px rgba(37, 99, 235, 0.30),
        inset 0 1px 0 rgba(255, 255, 255, 0.24) !important;
}


/* =========================
   Refined Navo Wordmark
========================= */

.safe-brand {
    align-items: center;
    color: #ffffff;
    display: inline-flex;
    font-family:
        Outfit,
        Inter,
        ui-sans-serif,
        system-ui,
        sans-serif;
    font-size: 1.16rem;
    font-weight: 950;
    gap: 11px;
    letter-spacing: -0.045em;
    line-height: 1;
    text-decoration: none !important;
}

.safe-brand::before {
    align-items: center;
    background:
        linear-gradient(
            135deg,
            #2dd4bf,
            #3b82f6
        );
    border: 1px solid rgba(96, 165, 250, 0.28);
    border-radius: 10px;
    box-shadow:
        0 8px 20px rgba(37, 99, 235, 0.18),
        inset 0 1px 0 rgba(255, 255, 255, 0.18);
    color: #06111f;
    content: "N";
    display: inline-flex;
    flex: 0 0 auto;
    font-family:
        Outfit,
        Inter,
        sans-serif;
    font-size: 0.67rem;
    font-weight: 950;
    height: 34px;
    justify-content: center;
    letter-spacing: -0.04em;
    width: 34px;
}

.safe-brand:hover {
    color: #ffffff;
    text-decoration: none !important;
}

.safe-brand:hover::before {
    border-color: rgba(94, 234, 212, 0.42);
    box-shadow:
        0 10px 24px rgba(37, 99, 235, 0.24),
        inset 0 1px 0 rgba(255, 255, 255, 0.22);
}