@font-face {
    font-family: "Lexend";
    src: url("fonts/lexend.woff2") format("woff2");
    font-weight: 100 900;
    font-display: swap;
}

@font-face {
    font-family: "Atkinson Hyperlegible Next";
    src: url("fonts/atkinson.woff2") format("woff2");
    font-weight: 200 800;
    font-display: swap;
}

:root {
    color-scheme: light dark;
    --page: #FBF8F3;
    --band: #ECE5DA;
    --panel: #FFFFFF;
    --line: #D9D0C2;
    --ink: #1B2A3E;
    --ink-soft: #4A5868;
    --teal: #2F6F6B;
    --teal-soft: #D5E6E2;
    --on-teal: #FFFFFF;
    --help: #B54708;
    --help-soft: #F6E1D3;
    --on-help: #FFFFFF;
    --navy: #1B2A3E;
    --navy-deep: #0E1824;
    --on-navy: #EDE6DA;
    --on-navy-soft: #B9C3CE;
    --navy-line: #33475F;
    --teal-on-navy: #8CC7BF;
    --display: "Lexend", system-ui, sans-serif;
    --text: "Atkinson Hyperlegible Next", system-ui, sans-serif;
    --measure: 66ch;
}

@media (prefers-color-scheme: dark) {
    :root {
        --page: #0E1824;
        --band: #0A121C;
        --panel: #162233;
        --line: #2A384A;
        --ink: #EDE6DA;
        --ink-soft: #A9B4C0;
        --teal: #6FB3AA;
        --teal-soft: #1E3A3C;
        --on-teal: #0E1824;
        --help: #F08A4B;
        --help-soft: #3A2214;
        --on-help: #1A0F06;
        --navy: #131F2F;
        --navy-deep: #0A121C;
        --navy-line: #2A384A;
    }
}

*, *::before, *::after { box-sizing: border-box; }

html {
    -webkit-text-size-adjust: 100%;
    text-size-adjust: 100%;
}

body {
    margin: 0;
    background: var(--page);
    color: var(--ink);
    font-family: var(--text);
    font-size: 1.0625rem;
    line-height: 1.6;
    overflow-wrap: break-word;
}

h1, h2, h3 {
    font-family: var(--display);
    line-height: 1.15;
    margin: 0 0 16px;
    letter-spacing: -0.01em;
}

h1 { font-size: clamp(2rem, 1.3rem + 3.2vw, 3.6rem); font-weight: 600; letter-spacing: -0.025em; }
h2 { font-size: clamp(1.5rem, 1.2rem + 1.2vw, 2.1rem); font-weight: 600; }
h3 { font-size: 1.2rem; font-weight: 600; letter-spacing: 0; margin-bottom: 8px; }

p, ul, ol, dl { margin: 0 0 16px; max-width: var(--measure); }
li { margin-bottom: 6px; }

a {
    color: var(--teal);
    text-decoration-thickness: 1px;
    text-underline-offset: 3px;
}

a:hover { text-decoration-thickness: 2px; }

:focus-visible {
    outline: 3px solid var(--teal);
    outline-offset: 3px;
    border-radius: 4px;
}

.skip {
    position: absolute;
    left: 16px;
    top: -100px;
    background: var(--panel);
    color: var(--ink);
    padding: 12px 16px;
    border-radius: 10px;
    z-index: 10;
}

.skip:focus { top: 12px; }

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

.wrap {
    width: 100%;
    max-width: 1140px;
    margin: 0 auto;
    padding: 0 20px;
}

.muted { color: var(--ink-soft); }
.small { font-size: 0.9375rem; }

.site-header {
    position: relative;
    background: var(--navy-deep);
    color: var(--on-navy);
}

.bar {
    display: flex;
    align-items: center;
    gap: 12px;
    min-height: 68px;
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    margin-right: auto;
    min-height: 48px;
    color: var(--on-navy);
    text-decoration: none;
    font-family: var(--display);
    font-weight: 600;
    font-size: 1.2rem;
    letter-spacing: -0.01em;
}

.brand svg { flex: none; }

.help-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    padding: 0 18px;
    border-radius: 999px;
    background: var(--help);
    color: var(--on-help);
    font-weight: 700;
    text-decoration: none;
    white-space: nowrap;
}

.help-link:hover { text-decoration: underline; }

.menu > summary {
    list-style: none;
    display: inline-flex;
    align-items: center;
    min-height: 44px;
    padding: 0 14px;
    border: 1px solid var(--navy-line);
    border-radius: 10px;
    cursor: pointer;
    font-weight: 700;
    color: var(--on-navy);
}

.menu > summary::-webkit-details-marker { display: none; }

.menu nav {
    position: absolute;
    left: 0;
    right: 0;
    top: 100%;
    background: var(--navy-deep);
    border-top: 1px solid var(--navy-line);
    padding: 8px 20px 20px;
    z-index: 5;
}

.menu ul, .nav-wide ul {
    list-style: none;
    margin: 0;
    padding: 0;
    max-width: none;
}

.menu li, .nav-wide li { margin: 0; }

.menu li a, .nav-wide li a {
    display: flex;
    align-items: center;
    min-height: 48px;
    padding: 0 10px;
    color: var(--on-navy-soft);
    text-decoration: none;
    border-radius: 8px;
}

.menu li a:hover, .nav-wide li a:hover { color: var(--on-navy); }

.menu li a[aria-current="page"], .nav-wide li a[aria-current="page"] {
    color: var(--on-navy);
    box-shadow: inset 0 -2px 0 var(--teal-on-navy);
    border-radius: 0;
}

.nav-wide { display: none; }

@media (min-width: 1000px) {
    .menu { display: none; }
    .nav-wide { display: block; }
    .nav-wide ul { display: flex; gap: 4px; }
    .bar { gap: 24px; }
    .brand { margin-right: 0; }
    .nav-wide { margin-right: auto; }
}

.hero {
    background-color: var(--navy);
    background-image: url("contours.svg");
    background-size: cover;
    background-position: center;
    color: var(--on-navy);
    padding: 56px 0 64px;
}

.hero-grid {
    display: grid;
    gap: 40px;
    align-items: center;
}

@media (min-width: 900px) {
    .hero-grid { grid-template-columns: 1.15fr 0.85fr; gap: 56px; }
    .hero { padding: 88px 0 96px; }
}

.hero h1 { color: var(--on-navy); max-width: 14ch; }

.hero .lead { color: var(--on-navy-soft); font-size: 1.1875rem; max-width: 56ch; }

.hero a:not(.button) { color: var(--teal-on-navy); }

.lead { font-size: 1.1875rem; color: var(--ink-soft); }

.actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin: 28px 0 0;
}

.button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 48px;
    padding: 0 24px;
    border-radius: 999px;
    background: var(--teal);
    color: var(--on-teal);
    font-weight: 700;
    text-decoration: none;
    border: 2px solid var(--teal);
}

.button:hover { text-decoration: underline; }

.button-quiet {
    background: transparent;
    color: var(--teal);
}

.hero .button { background: var(--teal-on-navy); border-color: var(--teal-on-navy); color: var(--navy-deep); }
.hero .button-quiet { background: transparent; color: var(--on-navy); border-color: var(--on-navy-soft); }

.store-note { margin-top: 20px; font-size: 0.9375rem; color: var(--on-navy-soft); }

.views {
    margin: 0;
    max-width: 440px;
    justify-self: center;
    width: 100%;
}

.view {
    border-radius: 18px;
    padding: 20px;
}

.view-helper {
    background: var(--page);
    color: var(--ink);
    box-shadow: 0 24px 48px -24px rgba(0, 0, 0, 0.55);
}

.view-server {
    margin: -6px 18px 0;
    background: var(--navy-deep);
    border: 1px solid var(--navy-line);
    border-top: 0;
    border-radius: 0 0 18px 18px;
    padding: 18px 20px 20px;
}

.view-label {
    font-size: 0.875rem;
    font-weight: 700;
    color: var(--ink-soft);
    margin: 0 0 12px;
}

.view-server .view-label { color: var(--on-navy-soft); }

.who {
    display: flex;
    align-items: center;
    gap: 12px;
    padding-bottom: 14px;
    margin-bottom: 14px;
    border-bottom: 1px solid var(--line);
}

.avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--teal-soft);
    color: var(--teal);
    display: grid;
    place-items: center;
    font-family: var(--display);
    font-weight: 700;
}

.who strong { display: block; font-family: var(--display); font-size: 1.05rem; }
.who span { font-size: 0.875rem; color: var(--ink-soft); }

.bubble {
    background: var(--teal-soft);
    color: var(--ink);
    border-radius: 16px 16px 16px 4px;
    padding: 10px 14px;
    margin: 0 0 8px;
    max-width: 88%;
}

.bubble-own {
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: 16px 16px 4px 16px;
    margin-left: auto;
}

.cipher {
    font-family: ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;
    font-size: 0.8125rem;
    line-height: 1.55;
    color: var(--teal-on-navy);
    word-break: break-all;
    margin: 0;
    opacity: 0.9;
}

.crisis-strip {
    background: var(--help-soft);
    border-bottom: 1px solid var(--line);
    padding: 22px 0;
}

.crisis-strip .wrap {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 12px 28px;
}

.crisis-strip p { margin: 0; font-weight: 700; max-width: 46ch; }

.crisis-strip .contact-list { margin: 0; display: flex; flex-wrap: wrap; gap: 0 20px; }

.crisis-strip .contact-list li { margin: 0; }

.section { padding: 64px 0; }

.section-band { background: var(--band); }

.section-intro { max-width: 62ch; margin-bottom: 32px; }

.section-intro p { color: var(--ink-soft); }

.helper-table {
    width: 100%;
    border-collapse: collapse;
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: 14px;
    overflow: hidden;
}

.helper-table th, .helper-table td {
    text-align: left;
    vertical-align: top;
    padding: 18px 20px;
    border-top: 1px solid var(--line);
}

.helper-table thead th {
    border-top: 0;
    font-size: 0.9375rem;
    color: var(--ink-soft);
    font-weight: 700;
    background: var(--page);
}

.helper-table tbody th { font-family: var(--display); font-weight: 600; width: 26%; }

.yes, .no {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-weight: 700;
    white-space: nowrap;
}

.yes::before, .no::before {
    content: "";
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--teal);
}

.no::before { background: transparent; border: 2px solid var(--ink-soft); }

@media (max-width: 720px) {
    .helper-table thead { display: none; }
    .helper-table, .helper-table tbody, .helper-table tr, .helper-table th, .helper-table td { display: block; width: 100%; }
    .helper-table tr { border-top: 1px solid var(--line); padding: 8px 0; }
    .helper-table tr:first-child { border-top: 0; }
    .helper-table th, .helper-table td { border-top: 0; padding: 6px 18px; }
    .helper-table tbody th { width: auto; padding-top: 14px; }
    .helper-table td[data-label]::before { content: attr(data-label) ": "; color: var(--ink-soft); font-weight: 700; }
}

.timeline {
    list-style: none;
    margin: 0;
    padding: 0;
    max-width: none;
    display: grid;
    gap: 28px;
    counter-reset: step;
}

@media (min-width: 860px) {
    .timeline { grid-template-columns: repeat(4, 1fr); gap: 32px; }
    .timeline li { border-top: 2px solid var(--line); padding-top: 22px; }
}

.timeline li { counter-increment: step; margin: 0; position: relative; }

.timeline li::before {
    content: counter(step);
    display: inline-grid;
    place-items: center;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--navy);
    color: var(--on-navy);
    font-family: var(--display);
    font-weight: 600;
    margin-bottom: 12px;
}

.timeline p { color: var(--ink-soft); margin: 0; }

.split {
    display: grid;
    gap: 24px;
}

@media (min-width: 800px) {
    .split { grid-template-columns: 1fr 1fr; gap: 40px; }
}

.split h3 { display: flex; align-items: center; gap: 10px; }

.split ul { padding-left: 1.1rem; }

.mark-open, .mark-locked {
    width: 26px;
    height: 26px;
    border-radius: 7px;
    display: inline-grid;
    place-items: center;
    flex: none;
}

.mark-open { background: var(--band); border: 1px solid var(--line); }
.mark-locked { background: var(--navy); }
.mark-locked svg { stroke: var(--teal-on-navy); }
.mark-open svg { stroke: var(--ink-soft); }

.pair {
    display: grid;
    gap: 20px;
}

@media (min-width: 800px) {
    .pair { grid-template-columns: 1fr 1fr; }
}

.pair > section {
    border-left: 4px solid var(--teal);
    padding: 4px 0 4px 20px;
}

.pair > section > :last-child { margin-bottom: 0; }

.page-head {
    background-color: var(--navy);
    background-image: url("contours.svg");
    background-size: cover;
    background-position: 70% 30%;
    color: var(--on-navy);
    padding: 44px 0 48px;
}

.page-head h1 { color: var(--on-navy); font-size: clamp(1.9rem, 1.4rem + 2vw, 2.8rem); margin-bottom: 12px; }
.page-head .lead { color: var(--on-navy-soft); margin-bottom: 0; }
.page-head a { color: var(--teal-on-navy); }

main { display: block; }

.content { padding: 40px 0 64px; }

.content h2 { margin-top: 48px; }
.content h2:first-child { margin-top: 0; }
.content h3 { margin-top: 24px; }

.grid {
    display: grid;
    gap: 16px;
    grid-template-columns: 1fr;
    margin: 16px 0;
    padding: 0;
    list-style: none;
    max-width: none;
}

@media (min-width: 680px) { .grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 980px) { .grid-3 { grid-template-columns: repeat(3, 1fr); } }

.card {
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: 14px;
    padding: 20px 22px;
    margin: 0;
}

.card > :last-child { margin-bottom: 0; }
.card h2, .card h3 { margin-top: 0; }

.card-help {
    background: var(--help-soft);
    border-color: transparent;
    border-left: 4px solid var(--help);
    border-radius: 6px 14px 14px 6px;
}

.steps { counter-reset: step; list-style: none; padding: 0; }

.steps > li {
    counter-increment: step;
    position: relative;
    padding-left: 56px;
    margin-bottom: 28px;
}

.steps > li::before {
    content: counter(step);
    position: absolute;
    left: 0;
    top: 0;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--navy);
    color: var(--on-navy);
    font-family: var(--display);
    font-weight: 600;
    display: grid;
    place-items: center;
}

.steps h2, .steps h3 { margin-top: 4px; font-size: 1.3rem; }

.tag {
    display: inline-block;
    padding: 2px 10px;
    border-radius: 999px;
    background: var(--teal-soft);
    color: var(--ink);
    font-size: 0.875rem;
    font-weight: 700;
}

.notice {
    border-left: 4px solid var(--teal);
    background: var(--teal-soft);
    padding: 12px 16px;
    border-radius: 0 10px 10px 0;
    max-width: var(--measure);
    margin: 0 0 24px;
}

.notice a { color: var(--ink); }

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

.contact-list li { display: flex; flex-wrap: wrap; gap: 4px 8px; align-items: baseline; margin-bottom: 2px; }

.contact-list a { display: inline-flex; align-items: center; min-height: 44px; font-weight: 700; }

.card-help .contact-list a, .crisis-strip a { color: var(--ink); }

.search { display: flex; flex-wrap: wrap; gap: 12px; align-items: flex-end; margin: 0 0 32px; }
.search label { display: block; font-weight: 700; margin-bottom: 6px; }

.search input {
    min-height: 48px;
    width: min(100%, 380px);
    padding: 0 14px;
    font: inherit;
    color: var(--ink);
    background: var(--panel);
    border: 2px solid var(--line);
    border-radius: 10px;
}

.search button {
    min-height: 48px;
    padding: 0 24px;
    font: inherit;
    font-weight: 700;
    border: 0;
    border-radius: 999px;
    background: var(--teal);
    color: var(--on-teal);
    cursor: pointer;
}

.cover {
    display: block;
    width: 100%;
    height: auto;
    aspect-ratio: 16 / 10;
    object-fit: cover;
    border-radius: 10px;
    background: var(--band);
    margin-bottom: 14px;
}

.faq dt { font-family: var(--display); font-weight: 600; font-size: 1.15rem; margin-top: 28px; }
.faq dd { margin: 8px 0 0; max-width: var(--measure); }

.site-footer {
    background: var(--navy-deep);
    color: var(--on-navy-soft);
    padding: 40px 0 48px;
    font-size: 0.9375rem;
}

.site-footer a { color: var(--on-navy); }

.site-footer ul {
    list-style: none;
    padding: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 0 20px;
    max-width: none;
}

.site-footer li { margin: 0; }
.site-footer li a { display: inline-flex; align-items: center; min-height: 44px; }

.footer-brand { display: inline-flex; align-items: center; gap: 10px; color: var(--on-navy); font-family: var(--display); font-weight: 600; margin-bottom: 12px; }

@media (prefers-reduced-motion: reduce) {
    html, body, body * { transition: none !important; animation: none !important; }
}

.notice-help { border-left-color: var(--help); background: var(--help-soft); font-weight: 700; }

.table-note { margin-top: 16px; }

.site-footer .muted { color: var(--on-navy-soft); }
