:root {
    --ink: #17211f;
    --muted: #64716e;
    --line: #dce5e1;
    --paper: #fbfdfb;
    --soft: #eef6f0;
    --accent: #0d766e;
    --accent-dark: #07534d;
    --sun: #e2a829;
    --coral: #c95c46;
    --shadow: 0 16px 44px rgba(20, 42, 38, .12);
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    color: var(--ink);
    background: var(--paper);
    font-family: Arial, Helvetica, sans-serif;
    line-height: 1.5;
}

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

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

button,
input,
textarea,
select {
    font: inherit;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 10;
    display: grid;
    grid-template-columns: auto 1fr auto auto auto;
    gap: 24px;
    align-items: center;
    padding: 14px clamp(18px, 4vw, 56px);
    border-bottom: 1px solid rgba(220, 229, 225, .8);
    background: rgba(251, 253, 251, .94);
    backdrop-filter: blur(12px);
}

.brand {
    font-size: 1.2rem;
    font-weight: 800;
    letter-spacing: .02em;
}

.desktop-nav,
.auth-links,
.footer-links,
.hero-actions,
.section-heading,
.pill-row,
.tabs {
    display: flex;
    gap: 16px;
    align-items: center;
    flex-wrap: wrap;
}

.desktop-nav a,
.auth-links a,
.footer-links a,
.tabs a {
    color: var(--muted);
}

.auth-links {
    gap: 10px;
}

.auth-links form {
    margin: 0;
}

.auth-links button {
    padding: 8px 12px;
    color: var(--accent-dark);
    background: var(--soft);
}

.signup-link {
    border: 1px solid var(--accent);
    border-radius: 8px;
    padding: 8px 12px;
    color: var(--accent-dark) !important;
}

.top-search input,
.hero-search input,
.wide-search input,
.editor-form input,
.editor-form textarea,
.editor-form select,
.filters select {
    width: 100%;
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 12px 14px;
    color: var(--ink);
    background: white;
}

.top-search input {
    min-width: 220px;
    padding: 9px 12px;
}

.menu-button,
.mobile-nav {
    display: none;
}

.hero {
    min-height: 76vh;
    display: grid;
    align-items: end;
    padding: clamp(24px, 5vw, 70px);
    background:
        linear-gradient(90deg, rgba(9, 32, 34, .78), rgba(9, 32, 34, .25)),
        url("https://images.unsplash.com/photo-1500530855697-b586d89ba3ee?auto=format&fit=crop&w=1800&q=80") center/cover;
    color: white;
}

.hero-overlay {
    max-width: 820px;
    padding-bottom: 28px;
}

.eyebrow {
    margin: 0 0 10px;
    color: var(--sun);
    font-weight: 700;
    text-transform: uppercase;
    font-size: .8rem;
}

h1,
h2,
h3,
p {
    margin-top: 0;
}

h1 {
    max-width: 900px;
    margin-bottom: 18px;
    font-size: clamp(2.5rem, 7vw, 5.8rem);
    line-height: .96;
}

h2 {
    font-size: clamp(1.5rem, 3vw, 2.2rem);
}

.hero p {
    max-width: 640px;
    font-size: 1.15rem;
}

.hero-search,
.wide-search {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 10px;
    max-width: 720px;
    margin: 28px 0;
}

.hero-search input {
    min-height: 58px;
}

.button,
button,
.hero-search button,
.wide-search button {
    border: 0;
    border-radius: 8px;
    padding: 11px 18px;
    cursor: pointer;
    font-weight: 700;
}

.primary,
.hero-search button,
.wide-search button {
    color: white;
    background: var(--accent);
}

.secondary {
    color: var(--ink);
    background: white;
}

.content-band,
.page-header,
.site-footer {
    padding: clamp(34px, 5vw, 72px) clamp(18px, 4vw, 56px);
}

.auth-page {
    min-height: calc(100vh - 72px);
    display: grid;
    place-items: center;
    padding: clamp(28px, 5vw, 72px);
    background:
        linear-gradient(90deg, rgba(251, 253, 251, .95), rgba(251, 253, 251, .72)),
        url("https://images.unsplash.com/photo-1500530855697-b586d89ba3ee?auto=format&fit=crop&w=1600&q=80") center/cover;
}

.auth-panel {
    width: min(520px, 100%);
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: clamp(24px, 4vw, 42px);
    background: white;
    box-shadow: var(--shadow);
}

.oauth-box {
    display: grid;
    gap: 10px;
    margin: 22px 0;
}

.oauth-button {
    display: block;
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 11px 14px;
    background: var(--soft);
    font-weight: 700;
}

.section-heading {
    justify-content: space-between;
    margin-bottom: 20px;
}

.card-grid,
.results-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
    gap: 18px;
}

.destination-card,
.story-row,
.planner-panel,
.seo-preview,
.filters,
.wizard,
.itinerary-preview,
.metric-grid > div {
    border: 1px solid var(--line);
    border-radius: 8px;
    background: white;
    box-shadow: var(--shadow);
}

.destination-card {
    overflow: hidden;
}

.destination-card img {
    width: 100%;
    aspect-ratio: 4 / 3;
    object-fit: cover;
}

.destination-card div,
.planner-panel,
.seo-preview,
.filters,
.wizard,
.itinerary-preview {
    padding: 18px;
}

.destination-card p,
.story-row p,
.site-footer p,
.filters,
.lede {
    color: var(--muted);
}

.pill-row a,
.pill-row button {
    border: 1px solid var(--line);
    background: var(--soft);
    color: var(--accent-dark);
}

.split,
.explore-layout,
.editor-layout,
.admin-shell {
    display: grid;
    gap: 24px;
}

.split {
    grid-template-columns: minmax(0, 1fr) 360px;
}

.story-list {
    display: grid;
    gap: 14px;
}

.story-row {
    display: grid;
    grid-template-columns: 160px 1fr;
    gap: 18px;
    padding: 12px;
}

.story-row img {
    width: 100%;
    height: 120px;
    object-fit: cover;
    border-radius: 6px;
}

.destination-hero {
    min-height: 58vh;
    display: grid;
    align-items: end;
    padding: clamp(32px, 6vw, 80px);
    color: white;
    background-position: center;
    background-size: cover;
}

.destination-hero > div {
    max-width: 760px;
}

.stats-strip {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1px;
    background: var(--line);
}

.stats-strip span {
    padding: 18px;
    background: white;
}

.stats-strip.compact {
    grid-template-columns: repeat(3, 1fr);
    margin: 24px 0;
}

.tabs {
    position: sticky;
    top: 65px;
    z-index: 8;
    padding: 14px clamp(18px, 4vw, 56px);
    border-bottom: 1px solid var(--line);
    background: white;
}

.article {
    max-width: 900px;
}

.story-detail .cover {
    width: 100%;
    max-height: 540px;
    object-fit: cover;
}

.story-detail .article {
    margin: 0 auto;
}

.explore-layout {
    grid-template-columns: 270px 1fr;
    padding: 0 clamp(18px, 4vw, 56px) 72px;
}

.filters {
    align-self: start;
    display: grid;
    gap: 12px;
}

.editor-layout {
    grid-template-columns: minmax(0, 1fr) 340px;
    padding: 0 clamp(18px, 4vw, 56px) 72px;
}

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

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

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

.seo-preview {
    align-self: start;
}

.preview-title {
    color: #1a0dab;
    font-size: 1.1rem;
}

.preview-url {
    color: #006621;
}

.preview-description {
    color: #545454;
}

.autocomplete-results {
    display: grid;
    gap: 8px;
}

.autocomplete-option {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 10px 12px;
    background: white;
    text-align: left;
}

.link-button {
    justify-self: start;
    padding: 0;
    color: var(--accent);
    background: transparent;
}

.wizard {
    max-width: 820px;
    margin: 0 auto 48px;
}

.wizard-step {
    display: none;
    min-height: 260px;
}

.wizard-step.active {
    display: grid;
    align-content: center;
    gap: 18px;
}

.wizard-step > span,
.timeline article > span {
    color: var(--coral);
    font-weight: 800;
}

.wizard-actions,
.counter-row,
menu {
    display: flex;
    gap: 12px;
    align-items: center;
}

.counter-row {
    justify-content: space-between;
    max-width: 320px;
}

.itinerary-preview {
    max-width: 820px;
    margin: 0 auto 72px;
}

.timeline {
    display: grid;
    gap: 14px;
}

.timeline article {
    border-left: 4px solid var(--accent);
    padding: 14px 18px;
    background: var(--soft);
}

.admin-shell {
    grid-template-columns: 240px 1fr;
    padding: 32px clamp(18px, 4vw, 56px) 72px;
}

.admin-sidebar {
    display: grid;
    align-content: start;
    gap: 12px;
    border-right: 1px solid var(--line);
    padding-right: 20px;
}

.admin-main {
    overflow-x: auto;
}

.metric-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
    margin: 20px 0 30px;
}

.metric-grid > div {
    padding: 18px;
}

.metric-grid strong {
    display: block;
    font-size: 2rem;
}

table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 30px;
    background: white;
}

th,
td {
    border-bottom: 1px solid var(--line);
    padding: 12px;
    text-align: left;
}

.notice {
    border-left: 4px solid var(--accent);
    padding: 12px 14px;
    background: var(--soft);
}

dialog {
    width: min(520px, calc(100vw - 32px));
    border: 1px solid var(--line);
    border-radius: 8px;
}

.compact-form {
    padding: 8px;
}

.site-footer {
    display: flex;
    justify-content: space-between;
    gap: 24px;
    border-top: 1px solid var(--line);
    background: #102a27;
    color: white;
}

@media (max-width: 820px) {
    .site-header {
        grid-template-columns: auto 1fr auto;
    }

    .desktop-nav,
    .auth-links,
    .top-search {
        display: none;
    }

    .menu-button {
        display: inline-flex;
        justify-content: center;
    }

    .mobile-nav.open {
        display: grid;
        gap: 12px;
        padding: 16px 22px;
        border-bottom: 1px solid var(--line);
        background: white;
    }

    .hero-search,
    .wide-search,
    .split,
    .explore-layout,
    .editor-layout,
    .admin-shell,
    .form-grid.two,
    .site-footer {
        grid-template-columns: 1fr;
    }

    .story-row {
        grid-template-columns: 1fr;
    }

    .stats-strip,
    .stats-strip.compact,
    .metric-grid {
        grid-template-columns: 1fr;
    }

    .admin-sidebar {
        border-right: 0;
        border-bottom: 1px solid var(--line);
        padding: 0 0 16px;
    }
}
