:root {
    --ink: #171717;
    --muted: #66645f;
    --paper: #f7f6f2;
    --white: #ffffff;
    --line: #dfdcd3;
    --signal: #1f6f61;
    --blue: #214c8f;
    --gold: #b7862c;
    --danger: #9d2d25;
    --soft: #fbfaf7;
    --panel-shadow: 0 14px 34px rgba(23, 23, 23, 0.08);
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    color: var(--ink);
    background: var(--paper);
    font-family: "Poppins", Arial, Helvetica, sans-serif;
    line-height: 1.45;
}

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

.site-header {
    position: sticky;
    top: 0;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    padding: 18px clamp(18px, 4vw, 56px);
    background: rgba(246, 244, 239, 0.94);
    border-bottom: 1px solid var(--line);
    backdrop-filter: blur(14px);
}

.brand {
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 220px;
}

.brand-mark {
    display: grid;
    width: 40px;
    height: 40px;
    place-items: center;
    color: var(--white);
    background: var(--signal);
    font-weight: 800;
}

.brand strong,
.brand small {
    display: block;
}

.brand small {
    max-width: 280px;
    color: var(--muted);
    font-size: 12px;
}

.nav-links {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 8px;
}

.nav-links a {
    padding: 10px 12px;
    border: 1px solid transparent;
    font-size: 14px;
}

.nav-links .icon-link {
    display: inline-grid;
    width: 42px;
    height: 42px;
    place-items: center;
    padding: 0;
}

.icon-link svg {
    width: 20px;
    height: 20px;
    fill: none;
    stroke: currentColor;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-width: 1.8;
}

.nav-links a:hover,
.nav-links a.active {
    border-color: var(--line);
    background: var(--white);
}

.page-shell {
    width: min(1180px, calc(100% - 36px));
    margin: 0 auto;
    padding: 30px 0 72px;
}

.is-home .page-shell {
    padding-top: 0;
}

.hero {
    display: grid;
    width: 100vw;
    gap: 16px;
    max-width: 860px;
    margin: 0 calc(50% - 50vw) 34px;
    padding: 10px max(18px, calc((100vw - 1180px) / 2)) 38px;
    border-bottom: 1px solid var(--line);
    max-width: none;
}

.hero.compact {
    min-height: 55vh;
    align-content: center;
}

.hero > * {
    max-width: 860px;
}

.eyebrow {
    margin: 0;
    color: var(--signal);
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 0;
    text-transform: uppercase;
}

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

h1 {
    max-width: 820px;
    margin-bottom: 0;
    font-size: clamp(40px, 6vw, 78px);
    line-height: 1;
    letter-spacing: 0;
}

h2 {
    margin-bottom: 6px;
    font-size: 24px;
    line-height: 1.12;
    letter-spacing: 0;
}

.hero p:not(.eyebrow) {
    max-width: 640px;
    margin-bottom: 0;
    color: var(--muted);
    font-size: 18px;
}

.home-hero {
    position: relative;
    display: grid;
    width: 100vw;
    min-height: 560px;
    overflow: hidden;
    align-items: end;
    margin: 0 calc(50% - 50vw) 42px;
    padding: clamp(26px, 5vw, 58px) max(18px, calc((100vw - 1180px) / 2));
    color: var(--white);
    background: #151816;
    border-top: 1px solid #151816;
    border-bottom: 1px solid #151816;
}

.home-hero::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, rgba(17, 17, 17, 0.96), rgba(17, 17, 17, 0.7) 48%, rgba(17, 17, 17, 0.32));
}

.home-hero-content {
    position: relative;
    z-index: 2;
    display: grid;
    max-width: 780px;
    gap: 18px;
}

.home-hero h1 {
    font-size: clamp(64px, 13vw, 150px);
}

.home-hero p:not(.eyebrow) {
    max-width: 720px;
    margin-bottom: 0;
    color: rgba(255, 255, 255, 0.82);
    font-size: clamp(18px, 2.4vw, 28px);
}

.home-hero .eyebrow {
    color: #76d5c4;
}

.pathway-board {
    position: absolute;
    inset: 0;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    grid-auto-rows: 1fr;
    opacity: 0.62;
}

.pathway-board span {
    border: 1px solid rgba(255, 255, 255, 0.22);
    background: rgba(255, 255, 255, 0.04);
}

.pathway-board span:nth-child(2),
.pathway-board span:nth-child(6) {
    background: rgba(31, 111, 97, 0.72);
}

.pathway-board span:nth-child(4) {
    background: rgba(33, 76, 143, 0.74);
}

.pathway-board span:nth-child(8) {
    background: rgba(183, 134, 44, 0.72);
}

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 18px;
    margin-top: 6px;
}

.home-hero .button {
    color: var(--ink);
    background: var(--white);
}

.home-hero .button:hover {
    color: var(--white);
    background: var(--signal);
}

.text-link {
    color: inherit;
    font-weight: 800;
    text-decoration: underline;
    text-underline-offset: 5px;
}

.intro-band {
    display: grid;
    grid-template-columns: minmax(0, 1.1fr) minmax(280px, 0.9fr);
    gap: clamp(24px, 5vw, 70px);
    align-items: start;
    margin: 0 0 34px;
    padding: 34px 0;
    border-top: 1px solid var(--ink);
    border-bottom: 1px solid var(--ink);
}

.intro-band h2 {
    margin: 0;
    font-size: clamp(30px, 5vw, 64px);
    line-height: 1;
}

.intro-band p {
    margin: 0;
    color: var(--muted);
    font-size: 18px;
}

.step-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px;
    margin-top: 44px;
}

.step {
    display: grid;
    min-height: 240px;
    align-content: space-between;
    padding: 20px;
    border: 1px solid var(--line);
    background: rgba(255, 255, 255, 0.48);
}

.step strong {
    color: var(--gold);
    font-size: 18px;
}

.step p {
    margin-bottom: 0;
    color: var(--muted);
}

.dashboard-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.4fr) minmax(280px, 0.8fr);
    gap: 14px;
    margin-bottom: 42px;
}

.dashboard-panel {
    display: grid;
    gap: 18px;
    min-height: 250px;
    padding: clamp(20px, 3vw, 28px);
    border: 1px solid var(--line);
    background: var(--white);
    box-shadow: var(--panel-shadow);
}

.dashboard-panel h2 {
    font-size: clamp(28px, 4vw, 48px);
}

.dashboard-panel p:not(.eyebrow) {
    color: var(--muted);
}

.progress-panel {
    align-content: space-between;
}

.progress-track {
    height: 14px;
    overflow: hidden;
    border: 1px solid var(--line);
    background: var(--soft);
}

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

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

.status-list li,
.match-list a {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    padding: 14px 0;
    border-bottom: 1px solid var(--line);
}

.status-list li:first-child,
.match-list a:first-child {
    border-top: 1px solid var(--line);
}

.status-list strong,
.match-list strong {
    color: var(--signal);
    font-size: 13px;
    text-align: right;
}

.privacy-panel {
    color: var(--white);
    background: #17221f;
}

.privacy-panel .eyebrow,
.privacy-panel .text-link {
    color: #76d5c4;
}

.privacy-panel p:not(.eyebrow) {
    color: rgba(255, 255, 255, 0.76);
}

.match-panel {
    background: #fbfaf7;
}

.match-list {
    display: grid;
}

.match-list a:hover span {
    text-decoration: underline;
    text-underline-offset: 4px;
}

.section-heading {
    display: grid;
    gap: 8px;
    max-width: 760px;
    margin-bottom: 22px;
}

.section-heading h2 {
    margin: 0;
    font-size: clamp(28px, 4vw, 46px);
}

.settings-shell {
    display: grid;
    grid-template-columns: 240px minmax(0, 1fr);
    gap: 22px;
    align-items: start;
}

.settings-summary {
    position: sticky;
    top: 128px;
    display: grid;
    gap: 8px;
    padding: 18px;
    border: 1px solid var(--line);
    background: var(--white);
    box-shadow: var(--panel-shadow);
}

.settings-summary a {
    padding: 10px 0;
    border-bottom: 1px solid var(--line);
    color: var(--muted);
    font-weight: 700;
}

.settings-summary a:last-child {
    border-bottom: 0;
}

.panel-heading {
    margin-bottom: 18px;
}

.user-panel {
    max-width: 880px;
}

.tile-grid,
.pathway-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 14px;
}

.tile,
.pathway-card,
.auth-panel,
.form-panel,
.table-panel {
    background: var(--white);
    border: 1px solid var(--line);
    box-shadow: var(--panel-shadow);
}

.tile {
    display: grid;
    min-height: 190px;
    padding: 20px;
    align-content: space-between;
    transition: transform 140ms ease, box-shadow 140ms ease;
}

.tile:hover {
    transform: translateY(-2px);
    box-shadow: 0 18px 38px rgba(23, 23, 23, 0.12);
}

.tile span {
    font-size: 22px;
    font-weight: 800;
    line-height: 1.05;
}

.tile p {
    margin-bottom: 0;
    color: var(--muted);
}

.auth-panel,
.form-panel,
.table-panel {
    padding: clamp(20px, 4vw, 34px);
}

.auth-panel {
    display: grid;
    gap: 18px;
    max-width: 520px;
}

.form-heading {
    max-width: 720px;
    margin-bottom: 26px;
}

.form-heading p:not(.eyebrow) {
    color: var(--muted);
}

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

.field {
    display: grid;
    gap: 8px;
    min-width: 0;
    font-weight: 700;
}

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

input,
select,
textarea {
    width: 100%;
    border: 1px solid var(--line);
    border-radius: 0;
    padding: 13px 12px;
    color: var(--ink);
    background: var(--soft);
    font: inherit;
}

textarea {
    resize: vertical;
}

input:focus,
select:focus,
textarea:focus {
    outline: 3px solid rgba(31, 111, 97, 0.22);
}

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

.choice {
    display: flex;
    align-items: center;
    gap: 8px;
    min-height: 48px;
    padding: 10px;
    border: 1px solid var(--line);
    background: var(--soft);
    font-weight: 600;
}

.choice input {
    width: 18px;
    height: 18px;
    margin: 0;
}

.form-actions {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 14px;
    margin-top: 28px;
}

.button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 46px;
    padding: 12px 18px;
    border: 1px solid var(--signal);
    color: var(--white);
    background: var(--signal);
    font: inherit;
    font-weight: 800;
    cursor: pointer;
}

.button:hover {
    border-color: var(--ink);
    background: var(--ink);
}

.save-note,
.notice {
    color: var(--muted);
    font-size: 14px;
}

.notice {
    padding: 12px;
    border: 1px solid var(--line);
    background: var(--soft);
}

.notice.error {
    color: var(--danger);
    border-color: var(--danger);
}

.pathway-card {
    display: grid;
    min-height: 230px;
    padding: 20px;
    align-content: space-between;
}

.pathway-card strong {
    justify-self: start;
    padding: 8px 10px;
    color: var(--blue);
    background: rgba(33, 76, 143, 0.1);
    font-size: 18px;
}

.pathway-card p:last-child {
    margin-bottom: 0;
    color: var(--muted);
}

table {
    width: 100%;
    border-collapse: collapse;
}

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

th {
    color: var(--signal);
    font-size: 12px;
    text-transform: uppercase;
}

@media (max-width: 980px) {
    .site-header {
        align-items: flex-start;
        flex-direction: column;
        gap: 0;
    }

    .nav-links {
        justify-content: flex-start;
        margin-top: 14px;
    }

    .tile-grid,
    .pathway-grid,
    .step-grid,
    .dashboard-grid,
    .choice-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .intro-band {
        grid-template-columns: 1fr;
    }

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

    .settings-summary {
        position: static;
    }
}

@media (max-width: 640px) {
    .page-shell {
        width: min(100% - 28px, 1180px);
        padding-top: 30px;
    }

    .is-home .page-shell {
        padding-top: 0;
    }

    .tile-grid,
    .pathway-grid,
    .step-grid,
    .dashboard-grid,
    .field-grid,
    .choice-grid {
        grid-template-columns: 1fr;
    }

    .home-hero {
        min-height: 560px;
    }

    h1 {
        font-size: 44px;
    }

    .tile,
    .pathway-card {
        min-height: 180px;
    }

    .brand {
        min-width: 0;
    }
}
