:root {
    --ink: #14211f;
    --ink-soft: #42514e;
    --forest: #154442;
    --forest-deep: #0d312f;
    --signal: #d9f99d;
    --signal-strong: #b7ee50;
    --paper: #f4f1e8;
    --paper-raised: #fffdf7;
    --line: #d8d6cc;
    --line-dark: #b5bab4;
    --danger: #9d2c29;
    --success: #276746;
    --radius: 14px;
    --shadow: 0 20px 60px rgb(20 33 31 / 9%);
    --shell: 1180px;
    color: var(--ink);
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    font-synthesis: none;
}

* {
    box-sizing: border-box;
}

html {
    background: var(--paper);
    scroll-behavior: smooth;
}

body {
    min-height: 100vh;
    margin: 0;
    background:
        linear-gradient(rgb(20 68 66 / 4%) 1px, transparent 1px),
        linear-gradient(90deg, rgb(20 68 66 / 4%) 1px, transparent 1px),
        var(--paper);
    background-size: 36px 36px;
    color: var(--ink);
}

a {
    color: var(--forest);
    text-underline-offset: 3px;
}

button,
input,
select {
    font: inherit;
}

button,
a {
    -webkit-tap-highlight-color: transparent;
}

:focus-visible {
    outline: 3px solid #7cac31;
    outline-offset: 3px;
}

.skip-link {
    position: fixed;
    z-index: 100;
    top: 12px;
    left: 12px;
    padding: 10px 14px;
    transform: translateY(-150%);
    border-radius: 8px;
    background: var(--ink);
    color: white;
}

.skip-link:focus {
    transform: translateY(0);
}

.shell {
    width: min(calc(100% - 40px), var(--shell));
    margin-inline: auto;
}

.site-header {
    position: relative;
    z-index: 20;
    display: flex;
    min-height: 72px;
    align-items: center;
    justify-content: space-between;
    padding: 12px max(20px, calc((100vw - var(--shell)) / 2));
    border-bottom: 1px solid rgb(20 33 31 / 12%);
    background: rgb(244 241 232 / 92%);
    backdrop-filter: blur(14px);
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    color: var(--ink);
    font-size: 15px;
    font-weight: 760;
    letter-spacing: -.01em;
    text-decoration: none;
}

.brand-mark {
    display: grid;
    width: 36px;
    height: 36px;
    align-content: center;
    gap: 4px;
    padding: 9px 8px;
    border-radius: 10px;
    background: var(--forest);
}

.brand-mark i {
    display: block;
    height: 3px;
    border-radius: 99px;
    background: var(--signal);
}

.brand-mark i:nth-child(2) {
    width: 70%;
}

.site-nav {
    display: flex;
    align-items: center;
    gap: 22px;
}

.site-nav form {
    margin: 0;
}

.site-nav > a:not(.button),
.nav-button {
    border: 0;
    background: none;
    color: var(--ink);
    font-size: 14px;
    font-weight: 650;
    text-decoration: none;
    cursor: pointer;
}

.button {
    display: inline-flex;
    min-height: 48px;
    align-items: center;
    justify-content: center;
    padding: 12px 20px;
    border: 1px solid var(--forest);
    border-radius: 10px;
    background: var(--forest);
    box-shadow: 0 8px 22px rgb(21 68 66 / 16%);
    color: white;
    font-weight: 740;
    text-decoration: none;
    cursor: pointer;
    transition: background .18s ease, transform .18s ease;
}

.button:hover {
    background: var(--forest-deep);
    transform: translateY(-1px);
}

.button-small {
    min-height: 40px;
    padding: 8px 14px;
    font-size: 14px;
}

.button-wide {
    width: 100%;
}

.text-link {
    font-size: 14px;
    font-weight: 700;
}

.eyebrow,
.kicker {
    margin: 0 0 12px;
    color: var(--forest);
    font-size: 12px;
    font-weight: 780;
    letter-spacing: .13em;
    text-transform: uppercase;
}

h1,
h2,
h3,
p {
    margin-top: 0;
}

h1,
h2,
h3 {
    text-wrap: balance;
}

.hero {
    display: grid;
    min-height: 640px;
    grid-template-columns: minmax(0, 1.12fr) minmax(370px, .88fr);
    align-items: center;
    gap: clamp(50px, 8vw, 110px);
    padding-block: 80px;
}

.hero h1 {
    max-width: 720px;
    margin-bottom: 24px;
    font-size: clamp(44px, 6.1vw, 78px);
    font-weight: 730;
    letter-spacing: -.055em;
    line-height: .99;
}

.hero-lead {
    max-width: 640px;
    color: var(--ink-soft);
    font-size: clamp(18px, 2vw, 21px);
    line-height: 1.65;
}

.hero-actions {
    display: flex;
    align-items: center;
    gap: 24px;
    margin-top: 34px;
}

.process-card {
    position: relative;
    overflow: hidden;
    padding: 30px;
    border: 1px solid rgb(217 249 157 / 35%);
    border-radius: 22px;
    background: var(--forest-deep);
    box-shadow: var(--shadow);
    color: white;
}

.process-card::after {
    position: absolute;
    right: -50px;
    bottom: -70px;
    width: 210px;
    height: 210px;
    border: 1px solid rgb(217 249 157 / 25%);
    border-radius: 50%;
    content: '';
}

.process-label {
    color: var(--signal);
    font-size: 12px;
    font-weight: 750;
    letter-spacing: .14em;
    text-transform: uppercase;
}

.process-list {
    position: relative;
    z-index: 1;
    display: grid;
    gap: 0;
    margin: 0;
    padding: 0;
    list-style: none;
}

.process-list li {
    display: grid;
    grid-template-columns: 42px 1fr;
    gap: 2px 14px;
    padding: 19px 0;
    border-top: 1px solid rgb(255 255 255 / 14%);
}

.process-list li > span {
    grid-row: 1 / 3;
    color: var(--signal);
    font-size: 13px;
    font-variant-numeric: tabular-nums;
}

.process-list strong {
    font-size: 18px;
}

.process-list small {
    color: rgb(255 255 255 / 65%);
    line-height: 1.5;
}

.principles {
    padding-block: 70px 110px;
}

.section-heading {
    max-width: 720px;
    margin-bottom: 42px;
}

.section-heading h2 {
    margin-bottom: 0;
    font-size: clamp(32px, 4vw, 48px);
    letter-spacing: -.04em;
    line-height: 1.07;
}

.principle-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    border-top: 1px solid var(--line-dark);
}

.principle-grid article {
    min-height: 220px;
    padding: 28px;
    border-right: 1px solid var(--line-dark);
}

.principle-grid article:first-child {
    border-left: 1px solid var(--line-dark);
}

.ordinal {
    display: inline-flex;
    width: 32px;
    height: 32px;
    align-items: center;
    justify-content: center;
    margin-bottom: 34px;
    border: 1px solid var(--line-dark);
    border-radius: 50%;
    color: var(--forest);
    font-size: 12px;
    font-weight: 800;
}

.principle-grid h3 {
    margin-bottom: 10px;
    font-size: 20px;
}

.principle-grid p {
    color: var(--ink-soft);
    line-height: 1.65;
}

.auth-shell {
    display: grid;
    min-height: calc(100vh - 150px);
    grid-template-columns: minmax(300px, .8fr) minmax(520px, 1.2fr);
    align-items: start;
    gap: clamp(44px, 8vw, 100px);
    padding-block: 70px 90px;
}

.auth-shell-narrow {
    grid-template-columns: minmax(300px, 1fr) minmax(400px, .82fr);
    align-items: center;
}

.auth-intro {
    position: sticky;
    top: 100px;
    padding-top: 30px;
}

.auth-intro h1 {
    margin-bottom: 22px;
    font-size: clamp(38px, 4.5vw, 58px);
    letter-spacing: -.05em;
    line-height: 1.02;
}

.auth-intro > p:not(.eyebrow) {
    max-width: 560px;
    color: var(--ink-soft);
    font-size: 18px;
    line-height: 1.65;
}

.auth-facts {
    display: grid;
    margin: 38px 0 0;
}

.auth-facts div {
    display: grid;
    grid-template-columns: 36px 1fr;
    padding: 15px 0;
    border-top: 1px solid var(--line-dark);
}

.auth-facts dt {
    color: var(--forest);
    font-weight: 800;
}

.auth-facts dd {
    margin: 0;
    font-weight: 650;
}

.form-card {
    padding: clamp(26px, 4vw, 44px);
    border: 1px solid var(--line);
    border-radius: 22px;
    background: var(--paper-raised);
    box-shadow: var(--shadow);
}

.form-card-heading {
    margin-bottom: 28px;
}

.form-card-heading h2 {
    margin-bottom: 8px;
    font-size: 28px;
    letter-spacing: -.025em;
}

.form-card-heading > p:last-child,
.form-footnote {
    color: var(--ink-soft);
}

.form-grid,
.stacked-form {
    display: grid;
    gap: 19px;
}

.form-grid > div,
.stacked-form > div {
    display: grid;
    gap: 7px;
}

label {
    font-size: 14px;
    font-weight: 720;
}

.field-label-row {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 16px;
}

.field-label-row a {
    font-size: 12px;
    font-weight: 680;
}

input,
select {
    width: 100%;
    min-height: 48px;
    padding: 11px 13px;
    border: 1px solid var(--line-dark);
    border-radius: 9px;
    background: white;
    color: var(--ink);
}

input:hover,
select:hover {
    border-color: var(--forest);
}

.password-control {
    position: relative;
}

.password-control input {
    padding-right: 82px;
}

.password-toggle {
    position: absolute;
    top: 50%;
    right: 6px;
    min-width: 68px;
    min-height: 36px;
    padding: 7px 10px;
    transform: translateY(-50%);
    border: 0;
    border-radius: 7px;
    background: transparent;
    color: var(--forest);
    font-size: 12px;
    font-weight: 760;
    cursor: pointer;
}

.password-toggle:hover,
.password-toggle[aria-pressed="true"] {
    background: rgb(21 68 66 / 8%);
}

.password-requirements {
    display: grid;
    gap: 7px;
    margin: 3px 0 0;
    padding: 0;
    color: var(--ink-soft);
    font-size: 12px;
    list-style: none;
}

.password-requirements li {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    line-height: 1.4;
    transition: color .18s ease;
}

.password-requirements li[data-met="true"] {
    color: var(--success);
}

.password-requirement-marker {
    position: relative;
    display: block;
    width: 17px;
    height: 17px;
    flex: 0 0 17px;
    margin-top: 0;
    border: 1px solid var(--line-dark);
    border-radius: 50%;
    background: white;
    transition: border-color .18s ease, background .18s ease;
}

[data-met="true"] .password-requirement-marker {
    border-color: var(--success);
    background: var(--success);
}

[data-met="true"] .password-requirement-marker::after {
    position: absolute;
    top: 2px;
    left: 5px;
    width: 4px;
    height: 8px;
    transform: rotate(45deg);
    border-right: 2px solid white;
    border-bottom: 2px solid white;
    content: '';
}

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

.form-grid ul {
    margin: 2px 0 0;
    padding-left: 18px;
    color: var(--danger);
    font-size: 13px;
}

.form-grid .help-text,
.form-grid > div > div:not(:first-child) {
    color: var(--ink-soft);
    font-size: 12px;
}

.form-alert,
.flash {
    padding: 13px 15px;
    border-radius: 9px;
    font-size: 14px;
    line-height: 1.5;
}

.form-alert {
    margin-bottom: 20px;
    border: 1px solid #deb1ae;
    background: #fff0ef;
    color: var(--danger);
}

.flash-stack {
    position: fixed;
    z-index: 50;
    top: 86px;
    right: 20px;
    width: min(390px, calc(100% - 40px));
}

.flash-success {
    border: 1px solid #9dc9a9;
    background: #edf8ef;
    box-shadow: var(--shadow);
    color: var(--success);
}

.form-footnote {
    margin: 24px 0 0;
    font-size: 14px;
    text-align: center;
}

.app-shell {
    display: grid;
    min-height: calc(100vh - 160px);
    grid-template-columns: 230px minmax(0, 1fr);
    gap: 46px;
    padding-block: 38px 70px;
}

.app-sidebar {
    position: sticky;
    top: 24px;
    align-self: start;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--paper-raised);
}

.tenant-switcher,
.sidebar-meta {
    padding: 20px;
}

.tenant-switcher > span,
.sidebar-meta span {
    display: block;
    margin-bottom: 5px;
    color: var(--ink-soft);
    font-size: 11px;
    font-weight: 750;
    letter-spacing: .1em;
    text-transform: uppercase;
}

.tenant-switcher strong {
    display: block;
    line-height: 1.35;
    overflow-wrap: anywhere;
}

.tenant-switcher details {
    margin-top: 12px;
    font-size: 13px;
}

.tenant-switcher ul {
    margin: 10px 0 0;
    padding: 0;
    list-style: none;
}

.tenant-switcher li + li {
    margin-top: 7px;
}

.app-nav {
    display: grid;
    padding: 8px;
    border-block: 1px solid var(--line);
}

.app-nav a,
.app-nav > span {
    display: flex;
    min-height: 42px;
    align-items: center;
    justify-content: space-between;
    padding: 9px 12px;
    border-radius: 8px;
    color: var(--ink-soft);
    font-size: 14px;
    font-weight: 620;
    text-decoration: none;
}

.app-nav a.active {
    background: var(--forest);
    color: white;
}

.app-nav small {
    font-size: 10px;
    font-weight: 550;
    opacity: .65;
}

.page-heading-row {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 24px;
    margin-bottom: 34px;
    padding-top: 8px;
}

.page-heading-row > div {
    max-width: 700px;
}

.page-heading-row h1 {
    margin-bottom: 10px;
    font-size: clamp(34px, 4vw, 50px);
    letter-spacing: -.045em;
}

.page-heading-row > div > p:last-child {
    color: var(--ink-soft);
    line-height: 1.6;
}

.status-pill {
    display: inline-flex;
    padding: 7px 10px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: .07em;
}

.status-onboarding {
    border: 1px solid #abc56d;
    background: #f0f8d9;
    color: #466321;
}

.readiness-card {
    display: grid;
    grid-template-columns: minmax(260px, .75fr) minmax(420px, 1.25fr);
    overflow: hidden;
    margin-bottom: 26px;
    border: 1px solid var(--line);
    border-radius: 18px;
    background: var(--paper-raised);
    box-shadow: 0 12px 30px rgb(20 33 31 / 5%);
}

.readiness-summary {
    padding: 30px;
    background: var(--forest-deep);
    color: white;
}

.readiness-summary .kicker {
    color: var(--signal);
}

.readiness-summary h2 {
    margin-bottom: 28px;
    font-size: 27px;
    letter-spacing: -.03em;
}

.progress-track {
    overflow: hidden;
    height: 8px;
    border-radius: 10px;
    background: rgb(255 255 255 / 16%);
}

.progress-track span {
    display: block;
    height: 100%;
    border-radius: inherit;
    background: var(--signal);
}

.setup-list {
    margin: 0;
    padding: 8px 24px;
    list-style: none;
}

.setup-list li {
    display: grid;
    grid-template-columns: 38px 1fr;
    gap: 12px;
    padding: 16px 0;
    border-bottom: 1px solid var(--line);
}

.setup-list li:last-child {
    border-bottom: 0;
}

.setup-list li > span {
    display: inline-flex;
    width: 31px;
    height: 31px;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--line-dark);
    border-radius: 50%;
    color: var(--ink-soft);
    font-size: 10px;
    font-weight: 800;
}

.setup-list li.done > span {
    border-color: var(--forest);
    background: var(--forest);
    color: var(--signal);
}

.setup-list li.current > span {
    border-color: #8ba547;
    background: var(--signal);
    color: var(--forest-deep);
}

.setup-list strong,
.setup-list small {
    display: block;
}

.setup-list strong {
    margin-bottom: 3px;
    font-size: 14px;
}

.setup-list small {
    color: var(--ink-soft);
    line-height: 1.4;
}

.dashboard-grid {
    display: grid;
    grid-template-columns: 1.1fr .9fr;
    gap: 26px;
}

.empty-panel,
.facts-panel {
    padding: 28px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: rgb(255 253 247 / 78%);
}

.empty-panel h2,
.facts-panel h2 {
    font-size: 22px;
}

.empty-panel > p:not(.kicker) {
    color: var(--ink-soft);
    line-height: 1.6;
}

.muted-action {
    display: inline-flex;
    margin-top: 10px;
    padding: 9px 12px;
    border: 1px dashed var(--line-dark);
    border-radius: 8px;
    color: var(--ink-soft);
    font-size: 13px;
}

.facts-panel dl {
    margin: 0;
}

.facts-panel dl div {
    display: grid;
    grid-template-columns: minmax(100px, .8fr) minmax(0, 1.2fr);
    gap: 16px;
    padding: 13px 0;
    border-bottom: 1px solid var(--line);
}

.facts-panel dl div:last-child {
    border-bottom: 0;
}

.facts-panel dt {
    color: var(--ink-soft);
    font-size: 13px;
}

.facts-panel dd {
    margin: 0;
    overflow-wrap: anywhere;
    font-size: 13px;
    font-weight: 650;
}

code {
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    font-size: .92em;
}

.single-message {
    min-height: 60vh;
    padding-block: 100px;
}

.single-message h1 {
    font-size: clamp(36px, 5vw, 60px);
    letter-spacing: -.045em;
}

.site-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    padding: 24px max(20px, calc((100vw - var(--shell)) / 2));
    border-top: 1px solid var(--line-dark);
    color: var(--ink-soft);
    font-size: 12px;
}

@media (max-width: 900px) {
    .hero,
    .auth-shell,
    .auth-shell-narrow,
    .readiness-card {
        grid-template-columns: 1fr;
    }

    .hero {
        gap: 48px;
        padding-block: 64px;
    }

    .auth-intro {
        position: static;
    }

    .principle-grid,
    .dashboard-grid {
        grid-template-columns: 1fr;
    }

    .principle-grid article,
    .principle-grid article:first-child {
        border-inline: 1px solid var(--line-dark);
        border-bottom: 1px solid var(--line-dark);
    }

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

    .app-sidebar {
        position: static;
    }

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

@media (max-width: 620px) {
    .site-header {
        min-height: 64px;
    }

    .site-nav {
        gap: 12px;
    }

    .site-nav > a:not(.button) {
        display: none;
    }

    .brand > span:last-child {
        display: none;
    }

    .shell {
        width: min(calc(100% - 28px), var(--shell));
    }

    .hero {
        min-height: auto;
        padding-block: 46px 70px;
    }

    .hero h1 {
        font-size: 43px;
    }

    .hero-actions,
    .page-heading-row,
    .site-footer {
        align-items: flex-start;
        flex-direction: column;
    }

    .process-card,
    .form-card {
        padding: 24px;
    }

    .auth-shell {
        padding-block: 42px 70px;
    }

    .app-shell {
        gap: 24px;
        padding-block: 20px 50px;
    }

    .app-sidebar {
        display: grid;
        grid-template-columns: minmax(0, 1fr) auto;
    }

    .tenant-switcher {
        grid-column: 1;
        grid-row: 1;
        padding: 16px;
    }

    .app-nav {
        grid-column: 1 / -1;
        grid-row: 2;
        grid-template-columns: 1fr;
    }

    .app-nav > span {
        display: none;
    }

    .sidebar-meta {
        grid-column: 2;
        grid-row: 1;
        padding: 16px;
        border-left: 1px solid var(--line);
    }

    .page-heading-row {
        margin-bottom: 24px;
        padding-top: 0;
    }

    .readiness-summary,
    .empty-panel,
    .facts-panel {
        padding: 22px;
    }
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        scroll-behavior: auto !important;
        transition-duration: .01ms !important;
    }
}
