* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

:root {
    --bg: #eef2ef;
    --panel: #ffffff;
    --ink: #151716;
    --muted: #59625d;
    --line: rgba(21, 23, 22, .12);
    --green: #1f6b57;
    --rust: #b64d34;
}

html {
    overflow-x: hidden;
}

body {
    min-height: 100vh;
    background: var(--bg);
    color: var(--ink);
    font-family: Helvetica, Arial, "Hiragino Sans GB", sans-serif;
    -webkit-text-size-adjust: none;
}

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

.site-header,
main,
footer,
div.wrapper {
    width: min(1080px, calc(100% - 40px));
    margin: 0 auto;
}

.wrapper.main {
    max-width: 700px;
    margin-top: 24px;
    padding: 20px;
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: 8px;
}

#intro {
    color: var(--muted);
    line-height: 1.8;
}

.site-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 76px;
}

.brand,
.top-links,
.hero-actions {
    display: flex;
    align-items: center;
}

.brand {
    gap: 10px;
    font-size: 13px;
    font-weight: 700;
    color: var(--green);
}

.brand img {
    width: 34px;
    height: 34px;
}

.top-links {
    gap: 18px;
    color: var(--muted);
    font-size: 14px;
    font-weight: 700;
}

.top-links a:hover,
footer a:hover {
    color: var(--green);
}

.hero {
    display: grid;
    grid-template-columns: minmax(0, 1.1fr) 360px;
    gap: 54px;
    align-items: center;
    min-height: 620px;
    padding: 54px 0 68px;
    border-top: 1px solid var(--line);
    border-bottom: 1px solid var(--line);
}

.kicker {
    margin-bottom: 16px;
    color: var(--green);
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 0;
    text-transform: uppercase;
}

h1 {
    max-width: 760px;
    font-size: 72px;
    line-height: 1.02;
    letter-spacing: 0;
}

.lead {
    max-width: 660px;
    margin-top: 26px;
    color: var(--muted);
    font-size: 21px;
    line-height: 1.75;
}

.hero-actions {
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 34px;
}

.button {
    display: inline-flex;
    align-items: center;
    min-height: 44px;
    padding: 0 18px;
    border: 1px solid var(--line);
    border-radius: 8px;
    font-weight: 800;
}

.button.primary {
    background: var(--ink);
    color: #fff;
}

.button.secondary {
    background: var(--panel);
}

.button:hover {
    border-color: rgba(31, 107, 87, .55);
    color: var(--green);
}

.button.primary:hover {
    background: var(--green);
    color: #fff;
}

.signal-panel {
    padding: 24px;
    background: var(--ink);
    border-radius: 8px;
    color: #fff;
    box-shadow: 0 24px 70px rgba(21, 23, 22, .18);
}

.panel-header {
    display: flex;
    align-items: center;
    gap: 12px;
    padding-bottom: 24px;
    border-bottom: 1px solid rgba(255, 255, 255, .16);
    color: rgba(255, 255, 255, .76);
    font-size: 13px;
    font-weight: 800;
}

.panel-header img {
    width: 38px;
    height: 38px;
}

.signal-panel dl {
    display: grid;
    gap: 22px;
    margin-top: 26px;
}

.signal-panel dt {
    color: #9be3c7;
    font-size: 12px;
    font-weight: 800;
    text-transform: uppercase;
}

.signal-panel dd {
    margin-top: 6px;
    color: rgba(255, 255, 255, .9);
    font-size: 22px;
    font-weight: 800;
    line-height: 1.35;
}

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

.text-block,
.notes-strip {
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 28px;
}

.text-block h2,
.notes-strip h2 {
    font-size: 26px;
    line-height: 1.35;
    letter-spacing: 0;
}

.text-block p,
.notes-strip p {
    color: var(--muted);
    font-size: 16px;
    line-height: 1.85;
}

.text-block h2 + p {
    margin-top: 18px;
}

.tag-list {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 22px;
    list-style: none;
}

.tag-list li {
    padding: 8px 11px;
    border: 1px solid rgba(182, 77, 52, .28);
    border-radius: 8px;
    color: var(--rust);
    font-size: 13px;
    font-weight: 800;
}

.notes-strip {
    display: grid;
    grid-template-columns: 300px minmax(0, 1fr);
    gap: 28px;
    align-items: start;
}

footer {
    padding: 28px 0 34px;
    color: rgba(89, 98, 93, .85);
    font-size: 13px;
    line-height: 1.8;
}

/* Legacy category pages */
#nav {
    background: #2f2f2f;
}

#nav .wrapper {
    display: flex;
    align-items: center;
    min-height: 46px;
}

#logo {
    padding: 8px 12px 8px 0;
}

#logo img {
    width: 30px;
    height: 30px;
    vertical-align: middle;
}

#nav ul {
    display: flex;
    flex-wrap: wrap;
    gap: 18px;
    list-style: none;
}

#nav li a {
    color: #fff;
    font-size: 14px;
    font-weight: 700;
}

#nav li.active a {
    text-decoration: underline;
}

.category-main {
    padding: 52px 0 0;
}

.category-hero {
    padding-bottom: 28px;
    border-bottom: 1px solid var(--line);
}

.category-hero h1 {
    font-size: 34px;
    line-height: 1.25;
}

.category-hero p:last-child,
.empty-state p {
    color: var(--muted);
    line-height: 1.8;
}

.empty-state {
    margin-top: 30px;
    padding: 26px;
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: 8px;
}

.empty-state h2 {
    margin-bottom: 10px;
    font-size: 20px;
}

.empty-state .button {
    margin-top: 20px;
}

#footer {
    padding: 24px 0;
}

@media (max-width: 860px) {
    .hero,
    .section-grid,
    .notes-strip {
        grid-template-columns: 1fr;
    }

    .hero {
        gap: 34px;
        min-height: auto;
        padding: 42px 0 46px;
    }

    h1 {
        font-size: 50px;
    }

    .lead {
        font-size: 18px;
    }

    .signal-panel {
        max-width: 460px;
    }
}

@media (max-width: 520px) {
    .site-header,
    main,
    footer,
    div.wrapper {
        width: min(100% - 28px, 1080px);
    }

    .site-header {
        align-items: flex-start;
        flex-direction: column;
        gap: 14px;
        padding: 18px 0;
    }

    h1 {
        font-size: 40px;
    }

    .lead {
        font-size: 16px;
    }

    .text-block,
    .notes-strip,
    .signal-panel {
        padding: 22px;
    }

    #nav .wrapper {
        justify-content: center;
    }
}
