:root {
    --color-bg: #f6f7f5;
    --color-surface: #ffffff;
    --color-panel: #eef3f1;
    --color-text: #202426;
    --color-muted: #667073;
    --color-line: #d9e0dc;
    --color-accent: #2f6f73;
    --color-accent-strong: #1f4f54;
    --color-ink: #2d3748;
    --color-warm: #b8782f;
    --shadow-soft: 0 12px 30px rgba(32, 36, 38, 0.07);
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    background: var(--color-bg);
    color: var(--color-text);
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    line-height: 1.75;
}

a {
    color: var(--color-accent-strong);
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

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

.site-shell {
    width: min(1120px, calc(100% - 32px));
    margin: 0 auto;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    border-bottom: 1px solid var(--color-line);
    background: rgba(255, 255, 255, 0.94);
    backdrop-filter: blur(10px);
    will-change: transform;
}

.admin-bar .site-header {
    position: fixed;
    top: 32px;
    left: 0;
    right: 0;
}

.admin-bar .site-main {
    padding-top: 70px;
}

.admin-bar.is-front-page .site-main {
    padding-top: 0;
}

@media screen and (max-width: 782px) {
    .admin-bar .site-header {
        top: 46px;
    }
}

.is-front-page .site-header {
    display: none;
}

.site-header__inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 28px;
    min-height: 70px;
}

.site-brand {
    color: var(--color-text);
    font-size: 21px;
    font-weight: 800;
    text-transform: capitalize;
}

.site-nav ul {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 18px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.site-nav a {
    color: var(--color-muted);
    font-size: 14px;
    font-weight: 700;
}

.site-nav a:hover {
    color: var(--color-accent-strong);
    text-decoration: none;
}

.home-intro {
    border-bottom: 1px solid var(--color-line);
    background:
        url("../images/hero-title-bg.png") center center / cover no-repeat,
        var(--color-surface);
}

.home-intro__inner {
    padding: 190px 0 160px;
}

.home-intro__copy {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    max-width: min(720px, 100%);
}

.home-intro__copy h1 {
    margin: 0;
    padding: 10px 18px 14px;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.6);
    font-size: clamp(44px, 6vw, 72px);
    line-height: 1.04;
}

.home-intro__copy .eyebrow {
    display: inline-block;
    padding: 7px 12px;
    border-radius: 6px;
    background: rgba(255, 255, 255, 0.6);
}

.home-intro__lead {
    max-width: 760px;
    margin: 22px 0 0;
    color: var(--color-ink);
    font-size: 21px;
}

.home-menu-bar {
    border-top: 1px solid var(--color-line);
    background: #fffaf0;
}

.home-menu-bar__inner {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: flex-start;
    gap: 0;
}

.home-menu-bar a {
    display: inline-flex;
    align-items: center;
    justify-content: flex-start;
    gap: 14px;
    min-height: 82px;
    min-width: 210px;
    padding: 0 28px 0 24px;
    border-left: 1px solid rgba(32, 36, 38, 0.12);
    color: var(--color-text);
    font-size: 15px;
    font-weight: 800;
}

.home-menu-bar a:last-child {
    border-right: 1px solid rgba(32, 36, 38, 0.12);
}

.home-menu-bar a:hover {
    background: rgba(47, 111, 115, 0.08);
    color: var(--color-accent-strong);
    text-decoration: none;
}

.menu-illustration {
    position: relative;
    width: 42px;
    height: 42px;
    flex: 0 0 42px;
    border: 2px solid var(--color-accent-strong);
    border-radius: 8px;
    background: #ffffff;
}

.menu-illustration--articles::before,
.menu-illustration--articles::after {
    content: "";
    position: absolute;
    left: 9px;
    right: 9px;
    height: 2px;
    border-radius: 999px;
    background: var(--color-accent-strong);
}

.menu-illustration--articles::before {
    top: 13px;
    box-shadow: 0 7px 0 var(--color-accent-strong);
}

.menu-illustration--articles::after {
    bottom: 10px;
    width: 14px;
}

.menu-illustration--antenna::before {
    content: "";
    position: absolute;
    inset: 7px 8px;
    background: url("data:image/svg+xml,%3Csvg width='26' height='28' viewBox='0 0 26 28' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Ccircle cx='13' cy='21' r='2' fill='%23c2701a'/%3E%3Cpath d='M9 17 A5.7 5.7 0 0 1 17 17' stroke='%232a646b' stroke-width='2' stroke-linecap='round'/%3E%3Cpath d='M6 13 A9 9 0 0 1 20 13' stroke='%232a646b' stroke-width='2' stroke-linecap='round'/%3E%3Cpath d='M3 9 A13 13 0 0 1 23 9' stroke='%232a646b' stroke-width='1.8' stroke-linecap='round'/%3E%3C/svg%3E") center center / contain no-repeat;
}

.menu-illustration--antenna::after {
    content: "";
    display: none;
}

.menu-illustration--gusta::before {
    content: "";
    position: absolute;
    inset: 7px 8px;
    background: url("data:image/svg+xml,%3Csvg width='26' height='28' viewBox='0 0 26 28' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cellipse cx='7' cy='7' rx='4.5' ry='6' stroke='%23c2701a' stroke-width='2.4'/%3E%3Cpath d='M7 13V25' stroke='%23c2701a' stroke-width='2.4' stroke-linecap='round'/%3E%3Cpath d='M18 3V25' stroke='%232a646b' stroke-width='2.4' stroke-linecap='round'/%3E%3Cpath d='M14 3V10' stroke='%232a646b' stroke-width='2.2' stroke-linecap='round'/%3E%3Cpath d='M18 3V10' stroke='%232a646b' stroke-width='2.2' stroke-linecap='round'/%3E%3Cpath d='M22 3V10' stroke='%232a646b' stroke-width='2.2' stroke-linecap='round'/%3E%3C/svg%3E") center center / contain no-repeat;
}

.menu-illustration--gusta::after {
    content: "";
    display: none;
}

.menu-illustration--apps::before {
    content: "";
    position: absolute;
    left: 9px;
    right: 9px;
    top: 9px;
    bottom: 13px;
    border: 2px solid var(--color-accent-strong);
    border-radius: 4px;
}

.menu-illustration--apps::after {
    content: "";
    position: absolute;
    left: 15px;
    right: 15px;
    bottom: 7px;
    height: 2px;
    background: var(--color-warm);
    box-shadow: 0 -18px 0 -1px var(--color-warm);
}

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

.section {
    padding: 58px 0;
}

.section--articles {
    background: var(--color-surface);
}

.section--routes,
.section--apps {
    background: var(--color-bg);
}

.section--apps {
    padding-top: 32px;
}

.section--about {
    background: var(--color-surface);
}

.section__header {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 18px;
    margin-bottom: 24px;
}

.section__header h2 {
    margin: 0;
    font-size: 30px;
    line-height: 1.25;
}

.section__header--stacked {
    display: block;
    max-width: 720px;
}

.section__header--stacked p:last-child,
.article-layout__intro p {
    margin: 0;
    color: var(--color-muted);
}

.article-layout {
    display: grid;
    grid-template-columns: minmax(230px, 320px) 1fr;
    gap: 56px;
    align-items: start;
}

.article-layout__intro {
    position: sticky;
    top: 96px;
}

.article-layout__intro h2 {
    margin: 0 0 10px;
    font-size: 32px;
    line-height: 1.25;
}

.post-list {
    display: grid;
    gap: 0;
    border-top: 1px solid var(--color-line);
}

.post-row {
    display: grid;
    grid-template-columns: 118px 1fr;
    gap: 18px;
    padding: 17px 0;
    border-bottom: 1px solid var(--color-line);
}

.post-row time {
    color: var(--color-muted);
    font-size: 14px;
}

.post-row a {
    color: var(--color-text);
    font-size: 17px;
    font-weight: 800;
}

.post-row a:hover {
    color: var(--color-accent-strong);
}

.article-list-link {
    justify-self: start;
    margin-top: 22px;
    color: var(--color-accent-strong);
    font-size: 15px;
    font-weight: 800;
}

.article-list-link::after {
    content: "  →";
}

.section--article-archive {
    min-height: 70vh;
}

.article-layout__intro h1 {
    margin: 0 0 10px;
    font-size: 32px;
    line-height: 1.25;
}

.post-row--archive {
    grid-template-columns: 110px minmax(100px, 160px) minmax(0, 1fr);
    align-items: start;
}

.post-row__categories {
    display: flex;
    flex-wrap: wrap;
    gap: 5px 10px;
}

.post-row__categories a,
.post-row__categories span {
    color: var(--color-muted);
    font-size: 13px;
    font-weight: 700;
}

.post-row__title {
    min-width: 0;
}

.post-pagination,
.nav-links {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
    margin-top: 22px;
}

.post-pagination .page-numbers,
.nav-links .page-numbers {
    min-width: 38px;
    padding: 8px 12px;
    border: 1px solid var(--color-line);
    border-radius: 6px;
    background: var(--color-surface);
    text-align: center;
    font-size: 14px;
    line-height: 1.2;
}

.post-pagination .current,
.nav-links .current {
    background: var(--color-accent-strong);
    border-color: var(--color-accent-strong);
    color: #fff;
}

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

.route-card,
.tool-card {
    display: flex;
    flex-direction: column;
    min-height: 230px;
    padding: 24px;
    border: 1px solid var(--color-line);
    border-radius: 8px;
    background: var(--color-surface);
    box-shadow: 0 8px 20px rgba(32, 36, 38, 0.05);
}

.route-card p {
    margin: 0 0 10px;
    color: var(--color-warm);
    font-size: 13px;
    font-weight: 800;
}

.route-card h3,
.tool-card h2 {
    margin: 0 0 10px;
    font-size: 22px;
    line-height: 1.35;
}

.route-card span,
.tool-card p {
    color: var(--color-muted);
}

.route-card a,
.tool-card__link {
    margin-top: auto;
    padding-top: 20px;
    font-weight: 800;
}

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

.app-link-card {
    position: relative;
    display: flex;
    flex-direction: column;
    min-height: 210px;
    padding: 26px;
    border: 1px solid var(--color-line);
    border-radius: 8px;
    background:
        linear-gradient(90deg, rgba(255, 255, 255, 0.82) 0%, rgba(255, 255, 255, 0.58) 48%, rgba(255, 255, 255, 0.24) 100%),
        var(--app-card-bg) center center / cover no-repeat,
        var(--color-surface);
    box-shadow: 0 8px 20px rgba(32, 36, 38, 0.05);
    overflow: hidden;
}

.app-link-card p {
    margin: 0 0 10px;
    color: var(--color-warm);
    font-size: 13px;
    font-weight: 800;
}

.app-link-card h3 {
    margin: 0 0 10px;
    font-size: 24px;
    line-height: 1.35;
}

.app-link-card h3 br.app-card-br {
    display: none;
}

.app-link-card span {
    max-width: 68%;
    color: var(--color-ink);
}

.app-link-card a {
    margin-top: auto;
    padding-top: 22px;
    font-weight: 800;
}

.about-band {
    display: grid;
    grid-template-columns: minmax(240px, 360px) 1fr;
    gap: 40px;
    align-items: center;
    padding: 34px;
    border: 1px solid var(--color-line);
    border-radius: 8px;
    background: var(--color-panel);
}

.about-band h2 {
    margin: 0;
    font-size: 28px;
    line-height: 1.35;
}

.about-band > p {
    margin: 0;
    color: var(--color-ink);
    font-size: 18px;
}

.page-heading {
    padding: 58px 0 38px;
    border-bottom: 1px solid var(--color-line);
    background: var(--color-surface);
}

.page-heading h1 {
    margin: 0;
    font-size: clamp(34px, 5vw, 58px);
    line-height: 1.1;
}

.page-heading p:not(.eyebrow) {
    max-width: 720px;
    margin: 14px 0 0;
    color: var(--color-muted);
    font-size: 18px;
}

.page-heading--tools {
    background: linear-gradient(135deg, #ffffff, #eef3f1);
}

.content {
    max-width: 780px;
    padding: 42px 0 70px;
}

.content p,
.content li {
    color: var(--color-ink);
}

.entry {
    margin-bottom: 32px;
}

.empty-note {
    padding: 20px;
    border: 1px solid var(--color-line);
    border-radius: 8px;
    background: #fafbf9;
    color: var(--color-muted);
}

.empty-note p {
    margin: 0;
}

.tool-detail__body {
    padding: 40px 0 64px;
}

.tool-frame {
    margin-bottom: 32px;
    padding: 20px;
    border: 1px solid var(--color-line);
    border-radius: 8px;
    background: var(--color-surface);
}

.embedded-tool {
    display: block;
    width: 100%;
    border: 0;
    background: var(--color-surface);
}

.embedded-tool--marmot {
    min-height: 920px;
}

.embedded-tool--rainmixer {
    min-height: 980px;
}

.is-tool-page .page-heading,
.is-tool-page .site-header {
    display: none;
}

.is-tool-page .tool-detail__body {
    padding-top: 0;
}

.is-tool-page .tool-frame {
    padding: 0;
    overflow: hidden;
}

.site-footer {
    border-top: 1px solid var(--color-line);
    background: var(--color-surface);
}

.site-footer__inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 24px 0;
    color: var(--color-muted);
    font-size: 14px;
}

.site-footer__inner p {
    margin: 0;
}

.footer-nav {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
}

.footer-nav a {
    color: var(--color-muted);
}

.static-page {
    padding: 56px 0 72px;
}

.static-page__content {
    max-width: 780px;
    padding: 32px;
    border: 1px solid var(--color-line);
    border-radius: 8px;
    background: var(--color-surface);
}

.static-page__content h1 {
    margin: 0 0 22px;
    font-size: 34px;
    line-height: 1.25;
}

.static-page__content h2 {
    margin: 30px 0 10px;
    font-size: 20px;
}

.static-page__content p,
.static-page__content li {
    color: var(--color-muted);
}

.static-page__content p {
    margin: 0 0 14px;
}

@media (max-width: 860px) {
    .home-intro__inner,
    .article-layout,
    .about-band {
        grid-template-columns: 1fr;
    }

    .article-layout__intro {
        position: static;
    }

    .route-grid,
    .app-link-grid,
    .card-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 720px) {
    .app-link-card h3 br.app-card-br {
        display: block;
    }

    .site-header__inner,
    .section__header {
        align-items: flex-start;
        flex-direction: column;
    }

    .site-header__inner {
        padding: 14px 0;
    }

    .home-intro__inner {
        gap: 28px;
        padding: 118px 0 102px;
    }

    .home-intro__copy {
        max-width: 100%;
    }

    .home-intro__copy h1 {
        padding: 8px 12px 10px;
    }

    .home-intro__copy .eyebrow {
        padding: 6px 10px;
    }

    .home-intro__lead {
        font-size: 18px;
    }

    .home-menu-bar__inner {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        grid-auto-rows: minmax(70px, auto);
        align-items: stretch;
        width: 100%;
    }

    .home-menu-bar a {
        display: flex;
        flex-direction: row;
        justify-content: flex-start;
        align-items: center;
        gap: 12px;
        min-width: 0;
        min-height: 70px;
        padding: 12px 16px;
        font-size: 13px;
        border-right: 1px solid rgba(32, 36, 38, 0.12);
        border-bottom: 1px solid rgba(32, 36, 38, 0.12);
    }

    .menu-illustration {
        width: 32px;
        height: 32px;
        flex-basis: 32px;
    }

    .app-link-card span {
        max-width: 100%;
    }

    .post-row {
        grid-template-columns: 1fr;
        gap: 4px;
    }

    .post-row--archive {
        gap: 7px;
    }

    .about-band {
        padding: 24px;
    }

    .site-footer__inner {
        align-items: flex-start;
        flex-direction: column;
    }
}
