/* Health Parcel — apps.iliausatov.com/health-parcel/
   Colors and type follow the app's design language (mint-teal accent, cool light greys).
   System font stack only: no web fonts, no scripts, no third-party assets. */

:root {
    --bg: #F1F3F6;
    --bg-top: #F7F8FA;
    --surface: #FAFBFC;
    --card-border: rgba(255, 255, 255, 0.6);
    --card-shadow: 0 4px 18px rgba(0, 0, 0, 0.06);

    --text: #1C1E21;
    --text-secondary: #6E7378;
    --text-tertiary: #9BA0A6;

    --accent: #0E6E63;
    --accent-tint: #2FBFAE;
    --accent-soft: #D8F2EE;
    --hero-start: #DFF5F0;
    --hero-end: #B8E6DC;
    --hero-text: #0B3D37;

    --coverage-gap: #E9ECEF;
    --coverage-gap-line: #CDD2D8;

    --radius-card: 22px;
    --radius-tile: 16px;
    --measure: 720px;
}

@media (prefers-color-scheme: dark) {
    :root {
        --bg: #15181B;
        --bg-top: #1B1F23;
        --surface: #20252A;
        --card-border: rgba(255, 255, 255, 0.06);
        --card-shadow: 0 4px 18px rgba(0, 0, 0, 0.35);

        --text: #ECEFF2;
        --text-secondary: #A7AEB5;
        --text-tertiary: #7D858C;

        --accent: #4FD2BF;
        --accent-soft: rgba(47, 191, 174, 0.16);
        --hero-start: #12352F;
        --hero-end: #0E2B27;
        --hero-text: #D8F2EE;

        --coverage-gap: #2B3136;
        --coverage-gap-line: #3B4249;
    }
}

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

body {
    margin: 0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    font-size: 17px;
    line-height: 1.6;
    color: var(--text);
    background: linear-gradient(180deg, var(--bg-top) 0%, var(--bg) 420px) no-repeat, var(--bg);
    -webkit-font-smoothing: antialiased;
    -webkit-text-size-adjust: 100%;
}

.page {
    max-width: var(--measure);
    margin: 0 auto;
    padding: 24px 20px 48px;
}

a {
    color: var(--accent);
}

a:focus-visible,
.button:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 3px;
    border-radius: 6px;
}

img,
svg {
    max-width: 100%;
    height: auto;
}

/* Masthead */

.masthead {
    display: flex;
    flex-wrap: wrap;
    gap: 12px 20px;
    align-items: center;
    justify-content: space-between;
    padding-bottom: 28px;
}

.masthead .wordmark {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-weight: 600;
    letter-spacing: -0.01em;
    color: var(--text);
    text-decoration: none;
}

.masthead .wordmark img {
    width: 28px;
    height: 28px;
    border-radius: 7px;
}

.nav {
    display: flex;
    gap: 18px;
    font-size: 0.95rem;
}

.nav a {
    color: var(--text-secondary);
    text-decoration: none;
}

.nav a:hover {
    color: var(--accent);
}

/* Hero */

.hero {
    background: linear-gradient(135deg, var(--hero-start), var(--hero-end));
    border-radius: var(--radius-card);
    padding: 36px 32px 32px;
    color: var(--hero-text);
    box-shadow: var(--card-shadow);
}

.hero .mark {
    width: 76px;
    height: 76px;
    border-radius: 18px;
    margin-bottom: 22px;
    box-shadow: 0 10px 22px rgba(11, 61, 55, 0.22);
}

.hero h1 {
    margin: 0 0 12px;
    font-size: 2.5rem;
    line-height: 1.12;
    letter-spacing: -0.03em;
    font-weight: 700;
}

.hero .pitch {
    margin: 0;
    max-width: 34em;
    font-size: 1.15rem;
    color: var(--hero-text);
    opacity: 0.86;
}

.hero .facts {
    margin: 18px 0 0;
    padding: 0;
    list-style: none;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.hero .facts li {
    font-size: 0.85rem;
    font-weight: 600;
    letter-spacing: 0.02em;
    padding: 5px 12px;
    border-radius: 99px;
    background: rgba(255, 255, 255, 0.55);
    color: var(--hero-text);
}

@media (prefers-color-scheme: dark) {
    .hero .facts li {
        background: rgba(255, 255, 255, 0.08);
    }
}

/* Call to action */

.cta {
    margin-top: 26px;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 12px 16px;
}

.button {
    display: inline-block;
    padding: 13px 24px;
    border-radius: 14px;
    background: var(--accent);
    color: #FFFFFF;
    font-weight: 600;
    text-decoration: none;
}

@media (prefers-color-scheme: dark) {
    .button {
        color: #08201D;
    }
}

.button.pending {
    background: rgba(11, 61, 55, 0.12);
    color: var(--hero-text);
    cursor: default;
}

@media (prefers-color-scheme: dark) {
    .button.pending {
        background: rgba(255, 255, 255, 0.1);
        color: var(--hero-text);
    }
}

.cta .note {
    margin: 0;
    font-size: 0.9rem;
    color: var(--hero-text);
    opacity: 0.75;
}

/* Sections */

section {
    margin-top: 40px;
}

h2 {
    margin: 0 0 16px;
    font-size: 1.35rem;
    font-weight: 600;
    letter-spacing: -0.01em;
}

h3 {
    margin: 0 0 6px;
    font-size: 1.05rem;
    font-weight: 600;
}

p {
    margin: 0 0 14px;
}

.card {
    background: var(--surface);
    border: 1px solid var(--card-border);
    border-radius: var(--radius-card);
    box-shadow: var(--card-shadow);
    padding: 24px;
}

.cards {
    display: grid;
    gap: 16px;
    grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
}

.cards p {
    margin: 0;
    color: var(--text-secondary);
    font-size: 0.98rem;
}

.tile {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    margin-bottom: 14px;
    border-radius: var(--radius-tile);
    background: var(--accent-soft);
    color: var(--accent);
}

.tile svg {
    width: 22px;
    height: 22px;
}

/* Coverage strip — the app's core signifier, drawn in CSS (no app data) */

.coverage {
    display: flex;
    height: 22px;
    border-radius: 7px;
    overflow: hidden;
    background: var(--coverage-gap);
}

.coverage span {
    display: block;
}

.coverage .exported {
    background: var(--accent-soft);
}

.coverage .new {
    background: var(--accent-tint);
}

.coverage .none {
    background: repeating-linear-gradient(135deg,
            var(--coverage-gap) 0 5px,
            var(--coverage-gap-line) 5px 7px);
}

.legend {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 20px;
    margin: 12px 0 0;
    padding: 0;
    list-style: none;
    font-size: 0.88rem;
    color: var(--text-secondary);
}

.legend li {
    display: flex;
    align-items: center;
    gap: 8px;
}

.legend .swatch {
    width: 14px;
    height: 14px;
    border-radius: 4px;
    flex: none;
}

.legend .swatch.exported {
    background: var(--accent-soft);
}

.legend .swatch.new {
    background: var(--accent-tint);
}

.legend .swatch.none {
    background: repeating-linear-gradient(135deg,
            var(--coverage-gap) 0 4px,
            var(--coverage-gap-line) 4px 6px);
}

/* Flow: Apple Health → Health Parcel → Your files */

.flow {
    display: flex;
    flex-wrap: wrap;
    align-items: stretch;
    gap: 10px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.flow li {
    flex: 1 1 170px;
    background: var(--surface);
    border: 1px solid var(--card-border);
    border-radius: var(--radius-tile);
    box-shadow: var(--card-shadow);
    padding: 16px 18px;
}

.flow .step {
    display: block;
    font-size: 0.78rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--text-tertiary);
    margin-bottom: 4px;
}

.flow .what {
    font-weight: 600;
}

.flow .detail {
    display: block;
    font-size: 0.9rem;
    color: var(--text-secondary);
}

/* Legal pages */

.legal-head {
    padding: 8px 0 4px;
}

.legal-head h1 {
    margin: 0 0 6px;
    font-size: 2rem;
    letter-spacing: -0.02em;
}

.legal-meta {
    margin: 0;
    color: var(--text-tertiary);
    font-size: 0.9rem;
}

article {
    margin-top: 24px;
}

article h2 {
    margin-top: 30px;
    font-size: 1.15rem;
}

article ul {
    margin: 0 0 14px;
    padding-left: 22px;
    color: var(--text);
}

article li {
    margin-bottom: 6px;
}

article .lead {
    font-size: 1.05rem;
}

/* Footer */

footer {
    margin-top: 48px;
    padding-top: 20px;
    border-top: 1px solid var(--coverage-gap);
    color: var(--text-tertiary);
    font-size: 0.9rem;
}

footer .links {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 18px;
    margin-bottom: 10px;
}

footer p {
    margin: 0;
}

@media (max-width: 480px) {
    .page {
        padding: 20px 16px 40px;
    }

    .hero {
        padding: 26px 20px 24px;
    }

    .hero h1 {
        font-size: 2rem;
    }

    .card {
        padding: 20px;
    }
}
