:root {
    --bg: #22140a;
    --bg-soft: #3a2210;
    --sand: #f4d39e;
    --sand-deep: #cf9a5a;
    --sun: #f58b2a;
    --sun-soft: #ffb55d;
    --oasis: #2e6e5b;
    --oasis-soft: #94d8b1;
    --ink: #fff3df;
    --muted: #e4c8a3;
    --panel: rgba(46, 26, 11, 0.78);
    --panel-strong: rgba(63, 34, 12, 0.88);
    --line: rgba(255, 201, 129, 0.18);
    --line-strong: rgba(255, 155, 45, 0.44);
    --shadow: 0 28px 60px rgba(33, 14, 3, 0.35);
    --radius: 22px;
    --max: 1180px;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    font-family: "Palatino Linotype", "Book Antiqua", Georgia, serif;
    color: var(--ink);
    background:
        radial-gradient(circle at 10% 10%, rgba(255, 193, 105, 0.28), transparent 22%),
        radial-gradient(circle at 85% 12%, rgba(129, 214, 170, 0.16), transparent 18%),
        radial-gradient(circle at 50% 100%, rgba(255, 124, 27, 0.18), transparent 28%),
        linear-gradient(180deg, #3f230e 0%, #23150c 34%, #140d0a 100%);
    min-height: 100vh;
}

a {
    color: #ffe1b7;
    text-decoration-color: rgba(255, 225, 183, 0.4);
    transition: color 0.25s ease, text-decoration-color 0.25s ease, border-color 0.25s ease, transform 0.25s ease, box-shadow 0.25s ease;
}

a:hover,
a:focus-visible {
    color: #fff2de;
    text-decoration-color: rgba(255, 242, 222, 0.76);
}

img {
    display: block;
    max-width: 100%;
}

.page-noise {
    position: fixed;
    inset: 0;
    pointer-events: none;
    opacity: 0.16;
    background-image:
        repeating-linear-gradient(0deg, rgba(255, 236, 204, 0.04), rgba(255, 236, 204, 0.04) 1px, transparent 1px, transparent 4px),
        repeating-linear-gradient(90deg, rgba(48, 27, 11, 0.14), rgba(48, 27, 11, 0.14) 1px, transparent 1px, transparent 7px);
}

.site-shell {
    width: min(calc(100% - 32px), var(--max));
    margin: 24px auto;
    position: relative;
    z-index: 1;
}

.topbar,
.manual-hero,
.section-panel,
.site-footer,
.contact-form,
.note-card,
.stat-card,
.chapter-card,
.quote-panel,
.image-card,
.photo-feature,
.hero-media {
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    backdrop-filter: blur(10px);
}

.topbar {
    padding: 26px;
    margin-bottom: 24px;
    background:
        linear-gradient(135deg, rgba(88, 48, 18, 0.92), rgba(39, 23, 11, 0.88)),
        rgba(46, 26, 11, 0.78);
}

.eyebrow {
    text-transform: uppercase;
    letter-spacing: 0.16em;
    font-size: 0.74rem;
    color: #f6ddb5;
    margin: 0 0 12px;
}

.brand-mark {
    display: inline-block;
    font-size: clamp(2.2rem, 4vw, 3.8rem);
    line-height: 1;
    font-weight: 700;
    color: var(--ink);
    text-decoration: none;
    margin-bottom: 12px;
    text-shadow: 0 2px 12px rgba(0, 0, 0, 0.25);
}

.brand-copy {
    max-width: 780px;
    color: var(--muted);
    margin: 0;
    line-height: 1.7;
}

.main-nav {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 10px;
    margin-top: 22px;
}

.main-nav a {
    display: block;
    padding: 12px 14px;
    border-radius: 14px;
    text-decoration: none;
    color: var(--ink);
    border: 1px solid rgba(255, 201, 129, 0.16);
    background: linear-gradient(180deg, rgba(83, 49, 18, 0.78), rgba(54, 29, 12, 0.72));
    font-size: 0.95rem;
}

.main-nav a:hover,
.main-nav a:focus-visible,
.main-nav a.active {
    border-color: var(--line-strong);
    background: linear-gradient(180deg, rgba(126, 68, 21, 0.88), rgba(68, 35, 14, 0.84));
    transform: translateY(-2px);
    box-shadow: 0 10px 26px rgba(252, 158, 56, 0.16);
}

main {
    display: grid;
    gap: 24px;
}

.manual-hero {
    overflow: hidden;
    position: relative;
    padding: 32px;
    background:
        linear-gradient(135deg, rgba(96, 54, 19, 0.82), rgba(39, 23, 11, 0.88)),
        rgba(46, 26, 11, 0.78);
}

.manual-hero::after {
    content: "";
    position: absolute;
    inset: 0;
    background:
        linear-gradient(130deg, transparent 0 52%, rgba(255, 179, 87, 0.12) 52% 60%, transparent 60% 100%),
        radial-gradient(circle at 84% 12%, rgba(255, 209, 150, 0.18), transparent 18%);
    pointer-events: none;
}

.hero-grid,
.grid-two,
.grid-three,
.tips-grid,
.image-grid,
.feature-grid {
    display: grid;
    gap: 18px;
}

.hero-grid,
.grid-two {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.grid-three,
.tips-grid,
.image-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.manual-hero h1,
.section-panel h2,
.section-panel h3,
.contact-form h2,
.quote-panel h2 {
    margin-top: 0;
}

.manual-hero h1 {
    font-size: clamp(2.5rem, 5vw, 4.4rem);
    margin-bottom: 16px;
    max-width: 10ch;
}

.manual-hero p,
.section-panel p,
.note-card p,
.chapter-card p,
.quote-panel p,
.stat-card p,
.image-card p,
li,
td,
th,
label,
input,
textarea,
figcaption {
    line-height: 1.72;
}

.manual-hero p {
    max-width: 58ch;
    color: #ffe5c2;
}

.hero-stack,
.hero-copy {
    position: relative;
    z-index: 1;
}

.hero-stack {
    display: grid;
    gap: 18px;
    align-content: start;
}

.hero-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 18px;
}

.badge-chip {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    border-radius: 999px;
    background: rgba(255, 204, 134, 0.12);
    border: 1px solid rgba(255, 190, 104, 0.24);
    color: #fff1dc;
    font-size: 0.92rem;
}

.hero-aside,
.section-panel,
.contact-form,
.quote-panel,
.image-card,
.photo-feature,
.stat-card,
.chapter-card,
.note-card {
    padding: 24px;
}

.hero-aside {
    background: linear-gradient(180deg, rgba(62, 35, 13, 0.82), rgba(43, 24, 12, 0.88));
    border: 1px solid rgba(255, 195, 112, 0.16);
    border-radius: 18px;
}

.hero-media,
.image-card,
.photo-feature {
    overflow: hidden;
}

.hero-media img,
.image-card img,
.photo-feature img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.45s ease;
}

.hero-media {
    min-height: 430px;
    position: relative;
    padding: 0;
}

.hero-media:hover img,
.image-card:hover img,
.photo-feature:hover img {
    transform: scale(1.05);
}

.media-caption {
    position: absolute;
    right: 16px;
    bottom: 16px;
    left: 16px;
    z-index: 1;
    padding: 12px 14px;
    border-radius: 14px;
    background: linear-gradient(180deg, rgba(36, 20, 9, 0.18), rgba(36, 20, 9, 0.76));
    color: #fff1db;
    font-size: 0.95rem;
}

.hero-aside ul,
.section-panel ul,
.section-panel ol {
    margin: 0;
    padding-left: 20px;
}

.section-panel,
.contact-form,
.quote-panel {
    position: relative;
    background:
        linear-gradient(180deg, rgba(84, 47, 19, 0.74), rgba(47, 27, 13, 0.84)),
        rgba(46, 26, 11, 0.78);
}

.section-panel::before,
.note-card::before,
.stat-card::before,
.chapter-card::before,
.contact-form::before,
.quote-panel::before {
    content: attr(data-label);
    display: inline-block;
    margin-bottom: 14px;
    padding: 5px 10px;
    border-radius: 999px;
    border: 1px solid var(--line-strong);
    color: #fff0d7;
    background: rgba(255, 171, 78, 0.09);
    font-size: 0.76rem;
    text-transform: uppercase;
    letter-spacing: 0.14em;
}

.note-card,
.stat-card,
.chapter-card {
    background:
        linear-gradient(180deg, rgba(95, 54, 21, 0.72), rgba(53, 29, 14, 0.82)),
        rgba(46, 26, 11, 0.78);
}

.note-card h3,
.stat-card h3,
.chapter-card h3,
.image-card h3 {
    margin-top: 0;
}

.stat-card strong {
    display: block;
    font-size: 1.85rem;
    color: #fff0d4;
    margin-bottom: 6px;
}

.chapter-card a,
.image-card a {
    text-decoration: none;
}

.checklist,
.tip-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.checklist li,
.tip-list li {
    position: relative;
    padding-left: 30px;
    margin-bottom: 12px;
}

.checklist li::before,
.tip-list li::before {
    content: "🐾";
    position: absolute;
    left: 0;
    top: 0;
}

.image-grid {
    align-items: stretch;
}

.image-card {
    position: relative;
    display: grid;
    grid-template-rows: 220px auto;
    padding: 0;
}

.image-card::before {
    content: attr(data-label);
    position: absolute;
    top: 16px;
    left: 16px;
    z-index: 2;
    padding: 5px 10px;
    border-radius: 999px;
    border: 1px solid var(--line-strong);
    color: #fff0d7;
    background: rgba(52, 29, 12, 0.72);
    font-size: 0.76rem;
    text-transform: uppercase;
    letter-spacing: 0.14em;
}

.image-card .card-copy {
    padding: 22px;
}

.photo-feature {
    display: grid;
    grid-template-columns: minmax(0, 0.95fr) minmax(0, 1.05fr);
    min-height: 320px;
    padding: 0;
}

.photo-feature.reverse {
    grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
}

.photo-feature .feature-copy {
    padding: 26px;
    background:
        linear-gradient(180deg, rgba(89, 49, 19, 0.74), rgba(47, 27, 13, 0.88)),
        rgba(46, 26, 11, 0.78);
}

.photo-feature .feature-copy h2,
.photo-feature .feature-copy h3 {
    margin-top: 0;
}

.table-wrap {
    overflow-x: auto;
}

table {
    width: 100%;
    border-collapse: collapse;
}

th,
td {
    padding: 14px 12px;
    text-align: left;
    border-bottom: 1px solid rgba(255, 197, 121, 0.14);
    vertical-align: top;
}

th {
    color: #fff0d6;
    font-weight: 700;
}

.callout-link {
    display: inline-block;
    margin-top: 12px;
    padding-bottom: 4px;
    border-bottom: 1px solid rgba(255, 217, 163, 0.46);
    text-decoration: none;
}

.site-footer {
    margin-top: 24px;
    padding: 24px;
    display: grid;
    gap: 16px;
    background:
        linear-gradient(135deg, rgba(72, 39, 16, 0.88), rgba(36, 20, 9, 0.9)),
        rgba(46, 26, 11, 0.78);
}

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

.footer-note {
    margin: 0;
    color: var(--muted);
}

.form-grid {
    display: grid;
    gap: 16px;
}

label {
    display: grid;
    gap: 8px;
    color: #fff0d7;
}

input,
textarea {
    width: 100%;
    border: 1px solid rgba(255, 196, 116, 0.26);
    border-radius: 14px;
    padding: 14px 15px;
    background: rgba(30, 17, 9, 0.82);
    color: var(--ink);
    font: inherit;
}

input:focus,
textarea:focus {
    outline: 2px solid rgba(255, 178, 87, 0.34);
    border-color: rgba(255, 178, 87, 0.48);
}

textarea {
    min-height: 180px;
    resize: vertical;
}

button {
    justify-self: start;
    border: 1px solid rgba(255, 173, 70, 0.6);
    border-radius: 999px;
    padding: 12px 18px;
    background: linear-gradient(180deg, rgba(245, 139, 42, 0.34), rgba(203, 102, 21, 0.3));
    color: #fff4e2;
    font: inherit;
    cursor: pointer;
    transition: transform 0.25s ease, background 0.25s ease, box-shadow 0.25s ease;
}

button:hover,
button:focus-visible {
    transform: translateY(-2px);
    background: linear-gradient(180deg, rgba(255, 159, 68, 0.42), rgba(214, 109, 25, 0.36));
    box-shadow: 0 12px 26px rgba(255, 143, 38, 0.18);
}

.message {
    border-radius: 14px;
    padding: 14px 16px;
    margin-bottom: 18px;
}

.message.success {
    border: 1px solid rgba(115, 202, 149, 0.34);
    background: rgba(38, 108, 73, 0.34);
}

.message.error {
    border: 1px solid rgba(233, 126, 94, 0.34);
    background: rgba(122, 42, 26, 0.34);
}

.microcopy {
    color: var(--muted);
    font-size: 0.94rem;
}

@media (max-width: 860px) {
    .hero-grid,
    .grid-two,
    .grid-three,
    .tips-grid,
    .image-grid,
    .photo-feature,
    .photo-feature.reverse {
        grid-template-columns: 1fr;
    }

    .site-shell {
        width: min(calc(100% - 20px), var(--max));
        margin: 12px auto;
    }

    .topbar,
    .manual-hero,
    .section-panel,
    .site-footer,
    .contact-form,
    .hero-aside,
    .note-card,
    .stat-card,
    .chapter-card {
        padding: 20px;
    }

    .image-card {
        grid-template-rows: 210px auto;
    }

    .hero-media {
        min-height: 320px;
    }

    .brand-mark {
        font-size: 2.65rem;
    }
}
