*, *::before, *::after { box-sizing: border-box; }

html {
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
    overflow-x: clip;
}

body {
    overflow-x: clip;
    font-family: var(--font-body);
    font-size: var(--text-base);
    font-weight: var(--weight-regular);
    color: var(--color-forest-black);
    background: var(--bg-panel);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

/* ─── Typography Helpers ─── */

.display-hero {
    font-family: var(--font-display);
    font-size: var(--text-4xl);
    font-weight: var(--weight-medium);
    line-height: 1.1;
}

.display-secondary {
    font-family: var(--font-display);
    font-size: var(--text-3xl);
    font-weight: var(--weight-medium);
    line-height: 1.2;
}

.display-sm {
    font-family: var(--font-display);
    font-size: var(--text-2xl);
    font-weight: var(--weight-regular);
    line-height: 1.3;
}

.code-label {
    font-family: var(--font-mono);
    font-size: var(--text-xs);
    font-weight: var(--weight-medium);
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.text-muted { color: var(--color-sage); }
.text-green  { color: var(--color-spring-green); }
.text-white  { color: var(--color-white); }

/* ─── Layout Utilities ─── */

.container {
    width: 100%;
    max-width: var(--content-max);
    margin: 0 auto;
    padding: 0 var(--space-6);
}

.container--wide {
    max-width: var(--content-wide);
}

.section { padding: var(--space-20) 0; }
.section--dark {
    background: var(--bg-dark);
    color: var(--color-white);
}

@media (max-width: 768px) {
    .section { padding: var(--space-12) 0; }
    .container { padding: 0 var(--space-4); }
    .display-hero      { font-size: var(--text-3xl); }
    .display-secondary { font-size: var(--text-2xl); }
}

@media (max-width: 480px) {
    .section           { padding: var(--space-10) 0; }
    .display-hero      { font-size: var(--text-2xl); }
    .display-secondary { font-size: var(--text-xl); }
}

/* ─── Accessibility ─── */
.sr-only {
    position: absolute;
    width: 1px; height: 1px;
    overflow: hidden;
    clip: rect(0,0,0,0);
    white-space: nowrap;
}

:focus-visible {
    outline: 2px solid var(--color-spring-green);
    outline-offset: 2px;
}

/* ─── Availability Date Note ─── */
/* Small label shown wherever availability chips appear without an explicit search. */
.avail-date-note {
    font-size: var(--text-sm);
    color: var(--color-sage);
    margin: 0 0 var(--space-4);
}
.avail-date-note strong { color: var(--color-forest-black); font-weight: var(--weight-semibold); }

/* Variant for dark hero backgrounds (campground detail) */
.avail-date-note--hero {
    color: rgba(255,255,255,0.65);
    margin-top: var(--space-2);
}
.avail-date-note--hero strong { color: var(--color-spring-green); }

/* Variant that sits above a grid with a bit more breathing room */
.avail-date-note--above-grid { margin-bottom: var(--space-3); }

/* ─── Renewal-failure grace banner (Phase 36) ─── */
.grace-banner {
    background: #7c2d12;
    color: #fff;
    font-size: var(--text-sm);
    position: sticky;
    top: 0;
    z-index: 200;
    border-bottom: 2px solid #ea580c;
}
.grace-banner__inner {
    display: flex;
    align-items: center;
    gap: var(--space-3);
    max-width: 1200px;
    margin: 0 auto;
    padding: var(--space-2) var(--space-4);
    flex-wrap: wrap;
}
.grace-banner__icon { font-size: 1.1em; flex-shrink: 0; }
.grace-banner__text { flex: 1; min-width: 0; }
.grace-banner__cta {
    background: #fff;
    color: #7c2d12;
    font-weight: var(--weight-semibold);
    padding: 6px 14px;
    border-radius: var(--radius-sm);
    text-decoration: none;
    white-space: nowrap;
    flex-shrink: 0;
}
.grace-banner__cta:hover { background: #fef3c7; }

/* ─── Unsubscribe page (Phase 35) ─── */
.unsub-page {
    min-height: 60vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: var(--space-8) var(--space-4);
}
.unsub-card {
    background: var(--color-white);
    border: 1px solid var(--color-stone);
    border-radius: var(--radius-lg);
    padding: var(--space-10) var(--space-8);
    max-width: 480px;
    width: 100%;
    text-align: center;
    box-shadow: 0 4px 24px rgba(0,0,0,.06);
}
.unsub-icon {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1.6rem;
    margin-bottom: var(--space-4);
}
.unsub-icon--success { background: #d1fae5; color: #065f46; }
.unsub-icon--error   { background: #fee2e2; color: #991b1b; }
.unsub-title {
    font-family: var(--font-display);
    font-size: var(--text-2xl);
    color: var(--color-forest-dark);
    margin: 0 0 var(--space-3);
}
.unsub-body {
    color: var(--color-muted);
    font-size: var(--text-base);
    margin: 0 0 var(--space-6);
    line-height: 1.6;
}
.unsub-body a { color: var(--color-primary-green); }
.unsub-actions {
    display: flex;
    gap: var(--space-3);
    justify-content: center;
    flex-wrap: wrap;
}

