:root {
    color-scheme: light;
    --ink: #18313f;
    --muted: #58717b;
    --line: #c5d6dc;
    --header: #e4eef1;
    --surface: #ffffff;
    --soft: #eef4f6;
    --panel: #f8fbfc;
    --accent: #1b6b7c;
    --accent-strong: #103f51;
    --deep: #152848;
    --warn: #8a4b00;
    --shadow: 0 18px 45px rgba(21, 40, 72, .12);
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    min-height: 100vh;
    color: var(--ink);
    background:
        linear-gradient(90deg, rgba(21, 40, 72, .055) 1px, transparent 1px),
        linear-gradient(180deg, rgba(21, 40, 72, .055) 1px, transparent 1px),
        var(--soft);
    background-size: 42px 42px;
    font-family: Arial, Helvetica, sans-serif;
    font-size: 16px;
    line-height: 1.5;
}

a {
    color: inherit;
}

.site-header {
    background: var(--header);
    border-bottom: 4px solid var(--line);
    box-shadow: 0 2px 18px rgba(21, 40, 72, .08);
}

.site-header__inner {
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
    min-height: 86px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
}

.brand {
    text-decoration: none;
    display: grid;
    gap: 2px;
}

.brand__name {
    color: var(--deep);
    font-size: 1.35rem;
    font-weight: 800;
}

.brand__sub {
    color: var(--muted);
    font-size: .95rem;
}

.public-nav {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 18px;
    font-weight: 700;
}

.public-nav a {
    border-radius: 6px;
    padding: 8px 2px;
    text-decoration: none;
}

.public-nav a:hover,
.public-nav a:focus {
    color: var(--accent-strong);
    text-decoration: underline;
    text-underline-offset: 6px;
}

.app-shell {
    width: min(1180px, calc(100% - 32px));
    margin: 28px auto;
    display: grid;
    grid-template-columns: 250px minmax(0, 1fr);
    gap: 24px;
}

.content:first-child,
.app-shell > .content:only-child {
    grid-column: 1 / -1;
}

.sidebar,
.form-card,
.status-panel,
.metric-grid article,
.service-card,
.timeline article,
.section-band {
    background: var(--surface);
    border: 1px solid rgba(20, 47, 58, .12);
    border-radius: 8px;
    box-shadow: 0 10px 28px rgba(21, 40, 72, .08);
}

.sidebar {
    align-self: start;
    padding: 18px;
    position: sticky;
    top: 18px;
}

.user-card {
    display: grid;
    gap: 4px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--line);
}

.user-card span {
    color: var(--muted);
}

.portal-nav {
    display: grid;
    gap: 8px;
    margin-top: 16px;
}

.portal-nav a {
    padding: 10px 12px;
    border-radius: 6px;
    text-decoration: none;
    font-weight: 700;
}

.portal-nav a:hover,
.portal-nav a:focus {
    background: var(--header);
}

.intro-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.2fr) minmax(280px, .8fr);
    gap: 28px;
    align-items: center;
    min-height: 64vh;
    padding: 36px 0;
}

.eyebrow {
    margin: 0 0 8px;
    color: var(--accent-strong);
    font-weight: 800;
    text-transform: uppercase;
}

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

h1 {
    font-size: clamp(2rem, 4vw, 4rem);
    line-height: 1.05;
    max-width: 820px;
    color: var(--deep);
}

.lead,
.page-head p {
    color: var(--muted);
    max-width: 760px;
    font-size: 1.1rem;
}

.button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    padding: 10px 18px;
    border: 0;
    border-radius: 6px;
    background: var(--accent);
    color: white;
    text-decoration: none;
    font-weight: 800;
    cursor: pointer;
}

.button:hover,
.button:focus {
    background: var(--accent-strong);
}

.status-panel {
    margin: 0;
    padding: 22px;
    display: grid;
    gap: 16px;
    border-top: 6px solid var(--deep);
}

.status-panel div {
    padding-bottom: 12px;
    border-bottom: 1px solid var(--line);
}

.status-panel div:last-child {
    border-bottom: 0;
    padding-bottom: 0;
}

.status-panel dt {
    color: var(--muted);
    font-weight: 700;
}

.status-panel dd {
    margin: 2px 0 0;
    font-weight: 800;
    color: var(--deep);
}

.form-wrap {
    min-height: 58vh;
    display: grid;
    place-items: center;
}

.form-card {
    width: min(440px, 100%);
    padding: 28px;
}

form {
    display: grid;
    gap: 12px;
}

label {
    font-weight: 800;
}

input {
    width: 100%;
    min-height: 44px;
    border: 1px solid var(--line);
    border-radius: 6px;
    padding: 10px 12px;
    font: inherit;
}

.alert {
    color: var(--warn);
    font-weight: 800;
}

.page-head {
    margin-bottom: 22px;
}

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

.metric-grid article,
.service-card {
    padding: 18px;
}

.metric-grid span,
.service-card span {
    color: var(--muted);
    font-weight: 700;
}

.metric-grid strong {
    display: block;
    margin: 6px 0;
    font-size: 1.25rem;
}

.metric-grid small {
    color: var(--muted);
}

.section-band {
    margin-top: 22px;
    padding: 22px;
    border-top: 4px solid var(--line);
}

.section-title {
    display: flex;
    justify-content: space-between;
    gap: 20px;
    align-items: end;
    margin-bottom: 16px;
}

.section-title p {
    color: var(--muted);
    max-width: 520px;
}

.service-card h3 {
    margin: 8px 0 6px;
}

.timeline {
    display: grid;
    gap: 12px;
}

.timeline article {
    padding: 16px;
    display: grid;
    gap: 4px;
}

.timeline span,
.check-list {
    color: var(--muted);
}

.check-list {
    margin-bottom: 0;
}

.empty-note {
    color: var(--muted);
    margin-bottom: 0;
}

.table-wrap {
    overflow-x: auto;
}

table {
    width: 100%;
    border-collapse: collapse;
    min-width: 760px;
}

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

th {
    color: var(--deep);
    font-size: .9rem;
}

td {
    color: var(--muted);
    font-size: .92rem;
}

@media (max-width: 860px) {
    .site-header__inner,
    .public-nav {
        justify-content: flex-start;
    }

    .site-header__inner,
    .intro-grid,
    .app-shell,
    .section-title {
        display: grid;
    }

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

    .sidebar {
        position: static;
    }

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

@media (max-width: 560px) {
    .site-header__inner,
    .app-shell {
        width: min(100% - 20px, 1180px);
    }

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

    h1 {
        font-size: 2.15rem;
    }
}
