:root {
    --ink: #161410;
    --muted: #5c574e;
    --paper: #f4f0e8;
    --card: #fffdf8;
    --line: #d8d1c4;
    --accent: #3d4f45;
    --accent-ink: #f4f0e8;
}

* { box-sizing: border-box; }

html, body {
    margin: 0;
    background: var(--paper);
    color: var(--ink);
    font-family: "Instrument Sans", system-ui, sans-serif;
    line-height: 1.6;
    overflow-x: clip;
    overflow-wrap: anywhere;
}

a { color: inherit; }

.site {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    max-width: 100%;
    overflow-x: clip;
}

.wrap {
    width: min(1080px, calc(100% - 2rem));
    margin: 0 auto;
}

.wrap.narrow { width: min(680px, calc(100% - 2rem)); }

.header {
    position: sticky;
    top: 0;
    z-index: 40;
    background: var(--paper);
    border-bottom: 1px solid var(--line);
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 1rem;
    min-height: 4.25rem;
}

.logo {
    font-family: "Instrument Serif", Georgia, serif;
    font-size: 1.5rem;
    text-decoration: none;
}

.nav {
    display: none;
    flex-direction: column;
    width: 100%;
    gap: 0;
    padding: 0.25rem 0 0.85rem;
}
.nav.is-open { display: flex; }

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

.nav a.is-active,
.nav a:hover { color: var(--ink); }

.auth-logout { display: inline; margin: 0; }
.auth-logout button {
    background: none;
    border: 0;
    padding: 0;
    font: inherit;
    color: var(--muted);
    cursor: pointer;
}
.auth-logout button:hover { color: var(--ink); }

.auth-box,
.package-page { max-width: 36rem; }
.auth-box form,
.package-page form { display: grid; gap: 0.85rem; }
.auth-box label,
.package-page label { display: grid; gap: 0.35rem; }
.auth-box input,
.package-page input,
.package-page textarea {
    width: 100%;
    border: 1px solid var(--line);
    background: var(--card);
    color: var(--ink);
    font: inherit;
    padding: 0.7rem 0.8rem;
}

.main { flex: 1; }

.hero,
.page,
.section { padding: 4.5rem 0; }

.section { padding-top: 0; }

.eyebrow {
    text-transform: uppercase;
    letter-spacing: 0.12em;
    font-size: 0.78rem;
    color: var(--muted);
    margin: 0 0 0.75rem;
}

h1, h2, h3 {
    font-family: "Instrument Serif", Georgia, serif;
    font-weight: 400;
    line-height: 1.15;
}

h1 { font-size: clamp(2.4rem, 6vw, 4.2rem); margin: 0 0 1rem; }
h2 { font-size: 2rem; margin: 0 0 1.5rem; }
h3 { font-size: 1.4rem; margin: 0 0 0.5rem; }

.lead {
    font-size: 1.2rem;
    color: var(--muted);
    max-width: 36rem;
}

.actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-top: 1.75rem;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 2.75rem;
    padding: 0 1.1rem;
    background: var(--accent);
    color: var(--accent-ink);
    text-decoration: none;
    border: 1px solid var(--accent);
    border-radius: 999px;
    cursor: pointer;
    font: inherit;
}

.btn-ghost {
    background: transparent;
    color: var(--ink);
}

.grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
}

.card {
    background: var(--card);
    border: 1px solid var(--line);
    padding: 1.25rem;
}

.page p { color: var(--muted); }

.form {
    display: grid;
    gap: 1rem;
    margin-top: 1.5rem;
}

.form label { display: grid; gap: 0.35rem; }

.form span { font-size: 0.9rem; }

.form input,
.form textarea {
    width: 100%;
    border: 1px solid var(--line);
    background: var(--card);
    color: var(--ink);
    font: inherit;
    padding: 0.7rem 0.8rem;
}

.form small { color: #8a3b2a; }

.notice {
    background: #e8efe8;
    border: 1px solid #c3d4c4;
    padding: 0.8rem 1rem;
}

.footer {
    border-top: 1px solid var(--line);
    padding: 1.75rem 0 1.25rem;
    color: var(--muted);
    font-size: 0.92rem;
}

.footer-copy {
    margin-top: 1.25rem;
    padding-top: 1rem;
    border-top: 1px solid var(--line);
    text-align: center;
}

.footer-copy p { margin: 0; }

.footer-links {
    display: flex;
    flex-wrap: wrap;
    gap: 0.85rem 1.1rem;
}

.footer-links--col {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.45rem;
}

.footer-links a {
    color: var(--muted);
    text-decoration: none;
}

.footer-links a:hover { color: var(--ink); }

.hsf-footer-social a {
    display: inline-flex;
    width: 36px;
    height: 36px;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--line);
    border-radius: 50%;
    text-decoration: none;
}

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

.nav-toggle {
    display: inline-flex;
    flex-shrink: 0;
    width: 44px;
    height: 44px;
    margin-left: auto;
    padding: 0;
    border: 1px solid var(--ink);
    border-radius: 10px;
    background: var(--ink);
    cursor: pointer;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 5px;
}
.nav-toggle span {
    display: block;
    width: 18px;
    height: 2px;
    background: var(--paper);
    border-radius: 2px;
}
.nav a,
.nav .auth-logout button {
    display: flex;
    align-items: center;
    min-height: 44px;
    padding: 0.35rem 0;
    border-bottom: 1px solid var(--line);
}

@media (min-width: 1200px) {
    .header-inner { flex-wrap: nowrap; }
    .nav-toggle { display: none !important; }
    .nav {
        display: flex !important;
        flex-direction: row;
        width: auto;
        gap: 1.25rem;
        padding: 0;
    }
    .nav a,
    .nav .auth-logout button {
        min-height: 0;
        padding: 0;
        border-bottom: 0;
    }
}

@media (max-width: 1199px) {
    .wrap, .wrap.narrow { width: calc(100% - 2rem); }
    .header-inner {
        min-height: 3.5rem;
        padding: 0.35rem 0;
    }
    .hero, .page, .section { padding: 2.25rem 0; }
    .section { padding-top: 0; }
    h1 { font-size: 2.1rem; }
    h2 { font-size: 1.55rem; }
    .lead { font-size: 1.05rem; }
    .grid { grid-template-columns: 1fr; }
    .actions { flex-direction: column; align-items: stretch; }
    .btn { width: 100%; }
    .hsf-footer-grid__cols { grid-template-columns: 1fr !important; }
    .hsf-consent__bar { left: 10px; right: 10px; }
    .logo { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
    .form input,
    .form textarea,
    .auth-box input,
    .package-page input,
    .package-page textarea { font-size: 16px; }
}

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