@import url('https://fonts.googleapis.com/css2?family=Calistoga&family=Lato:wght@400;700;900&display=swap');

:root {
    --navy: #263B6E;
    --navy-secondary: #263B6E;
    --navy-accent: #445F9D;
    --navy-dark: #010811;
    --footer-navy: #051b3a;
    --red: #E74C3C;
    --red-dark: #bf2718;
    --amber: #942f1e;
    --grey: #6c757d;
    --grey-light: #F1F3F7;
    --border: #dee2e6;
}

* { box-sizing: border-box; }

body {
    margin: 0;
    font-family: "Lato", sans-serif;
    color: var(--navy);
    background: #fff;
    line-height: 1.6;
    padding-top: 88px; /* offset for fixed header */
}

a { color: var(--navy); text-decoration: none; }
a:hover { color: var(--red); text-decoration: underline; }

.container {
    max-width: 1080px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

.container-wide { max-width: 1320px; }

/* Header — kept as a dark navy bar with light text/CTA; the only part of the
   site that stays "inverted" relative to the rest of the page. */
.site-header {
    background: #051E40;
    border-bottom: 2px solid #fff;
    position: fixed;
    top: 0; left: 0; right: 0;
    z-index: 100;
}

.site-header .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-top: 0.5rem;
    padding-bottom: 0.5rem;
    gap: 1.5rem;
}

.brand {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    color: #fff;
}

.brand:hover { color: #fff; text-decoration: none; }

.brand img { height: 70px; width: 70px; }

.brand-text {
    display: flex;
    flex-direction: column;
    line-height: 1.15;
}

.brand-text strong { font-family: "Calistoga", serif; font-size: 1.5rem; font-weight: 400; letter-spacing: 0.02em; color: #fff; }
.brand-text span { font-size: 0.85rem; color: #cdd7e5; }

nav { flex: 1; display: flex; justify-content: flex-end; align-items: center; gap: 1.5rem; }

nav ul {
    list-style: none;
    display: flex;
    gap: 1.5rem;
    margin: 0;
    padding: 0;
}

/* "Restore Monmouthshire & Torfaen" is a lot longer than the old name —
   fine above ~1300px, but between the desktop nav's full width and the
   900px hamburger breakpoint it needs a bit less room per element to
   avoid wrapping onto multiple lines. */
@media (max-width: 1300px) {
    .brand-text strong { font-size: 1.15rem; }
    nav { gap: 1rem; }
    nav ul { gap: 1rem; }
}

nav a {
    color: #fff;
    font-weight: 700;
    font-size: 0.92rem;
    white-space: nowrap;
}

nav a:hover, nav a.active { color: var(--amber); text-decoration: none; }

.nav-cta {
    flex-shrink: 0;
    padding: 0.55rem 1.35rem;
    font-size: 0.92rem;
}

.nav-toggle {
    display: none;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    width: 40px;
    height: 40px;
    padding: 0;
    border: none;
    background: none;
    cursor: pointer;
    flex-shrink: 0;
}

.nav-toggle span {
    display: block;
    width: 100%;
    height: 2px;
    background: #fff;
    border-radius: 2px;
}

.btn.nav-cta { background: #fff; color: var(--navy); }
.btn.nav-cta:hover { background: var(--grey-light); color: var(--navy); }

/* Hero — full-bleed image with dark overlay, matching their feature-carousel look */
.hero {
    position: relative;
    color: #fff;
    text-align: center;
    padding: 5.5rem 1.5rem;
    overflow: hidden;
}

.hero-bg {
    position: absolute;
    inset: 0;
    background-image: linear-gradient(rgba(5,30,64,0.72), rgba(1,8,17,0.82)), url('../img/hero.jpg');
    background-size: cover;
    background-position: center 30%;
    z-index: 0;
    transform: scale(1);
    will-change: transform;
}

.hero .container { position: relative; z-index: 1; }

.hero h1 {
    font-family: "Calistoga", serif;
    font-size: 2.75rem;
    font-weight: 400;
    margin: 0 0 1rem;
    text-shadow: 0 2px 8px rgba(0,0,0,0.4);
}

.hero p {
    font-size: 1.2rem;
    color: #e7ecf3;
    max-width: 640px;
    margin: 0 auto 2rem;
}

/* Page banner — slim title band used on interior pages, matching their jumbotron pattern */
.page-banner {
    background: linear-gradient(135deg, var(--navy) 0%, var(--navy-dark) 100%);
    color: #fff;
    padding: 2.75rem 1.5rem;
    text-align: center;
}

.page-banner h1 {
    margin: 0;
    font-size: 2rem;
    font-weight: 900;
}

/* Rupert Lowe feature — photo left, founding quote right, edge to edge */
.rupert-feature {
    display: grid;
    grid-template-columns: 1.4fr 1fr;
    min-height: 680px;
}

.rupert-feature-img { position: relative; overflow: hidden; }

.rupert-feature-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.rupert-feature-img img { filter: grayscale(55%) contrast(1.05); }

.rupert-feature-img::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image: linear-gradient(160deg, rgba(148,47,30,0.65) 0%, rgba(5,30,64,0.55) 60%, rgba(1,8,17,0.75) 100%);
    mix-blend-mode: multiply;
    z-index: 1;
}

.rupert-feature-img::after {
    content: '';
    position: absolute;
    inset: 0;
    background-image: linear-gradient(to right, transparent 55%, var(--navy) 100%);
    z-index: 2;
}

.rupert-feature-quote {
    background: var(--navy);
    color: #fff;
    display: flex;
    align-items: center;
    padding: 3.5rem 4rem;
}

.rupert-feature-quote blockquote {
    margin: 0;
    max-width: 620px;
}

.rupert-feature-quote blockquote p {
    font-size: 1.1rem;
    line-height: 1.75;
    margin: 0 0 1.1rem;
}

.rupert-feature-quote footer {
    margin-top: 1.5rem;
    font-weight: 700;
    font-style: normal;
    color: var(--amber);
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.65);
}

@media (max-width: 900px) {
    .rupert-feature { grid-template-columns: 1fr; min-height: 0; }
    .rupert-feature-img { height: 320px; }
    .rupert-feature-quote { padding: 2.5rem 1.5rem; }
}

/* Subnav — tab-style links under a page banner, matching their Policies subnav */
.subnav {
    background: var(--grey-light);
    border-bottom: 1px solid var(--border);
}

.subnav .container {
    display: flex;
    justify-content: center;
    gap: 2rem;
    padding-top: 0.85rem;
    padding-bottom: 0.85rem;
}

.subnav a {
    font-weight: 700;
    color: var(--navy);
    font-size: 0.95rem;
}

.subnav a:hover { color: var(--red); }

/* Buttons — navy primary CTA, matching their btn-color-1 */
.btn {
    display: inline-block;
    background: var(--navy);
    color: #fff;
    font-weight: 700;
    padding: 0.75rem 1.75rem;
    border-radius: 4px;
    border: none;
    cursor: pointer;
    font-size: 1rem;
    transition: background 0.15s ease, color 0.15s ease, box-shadow 0.15s ease, transform 0.15s ease;
}

.btn:active { transform: translateY(1px); }

.btn:hover { background: #fff; color: var(--navy); text-decoration: none; box-shadow: inset 0 0 0 2px var(--navy); }

.btn-secondary {
    background: transparent;
    border: 2px solid #fff;
    color: #fff;
}

.btn-secondary:hover { background: #fff; color: var(--navy); }

/* Sections */
.section { padding: 3.5rem 0; }
.section-alt { background: var(--grey-light); }

.section h2 {
    font-size: 1.9rem;
    font-weight: 900;
    margin-bottom: 1rem;
}

.section-intro {
    text-align: center;
    max-width: 700px;
    margin: 0 auto 1.5rem;
    color: var(--grey);
    font-size: 1.05rem;
}

.cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1.5rem;
    margin-top: 2rem;
}

.card {
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 6px;
    padding: 1.5rem;
    transition: box-shadow 0.15s ease, transform 0.15s ease;
}

.card:hover { box-shadow: 0 8px 20px rgba(5,30,64,0.12); transform: translateY(-3px); }

.card h3 { margin-top: 0; color: var(--navy); }

.card-icon { color: var(--amber); margin-bottom: 0.9rem; }
.card-icon svg { width: 32px; height: 32px; }

.stat-card { text-align: center; }

.stat-number, .stat-icon {
    font-family: "Calistoga", serif;
    color: var(--amber);
    line-height: 1;
    margin-bottom: 0.6rem;
}

.stat-number { font-size: 2.5rem; }
.stat-icon { font-size: 1.5rem; letter-spacing: 0.04em; }

.stat-card h3 { font-size: 1.05rem; margin: 0 0 0.5rem; }
.stat-card p { margin: 0; color: var(--grey); font-size: 0.95rem; }

/* Reusable closing call-to-action banner, used across interior pages */
.cta-banner {
    background: linear-gradient(135deg, var(--navy) 0%, var(--navy-dark) 100%);
    color: #fff;
    padding: 3.5rem 1.5rem;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.cta-banner::before {
    content: '';
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 5rem;
    border-top: 1px solid rgba(255,255,255,0.4);
}

.cta-banner::after {
    content: '';
    position: absolute;
    top: 50%;
    right: -4rem;
    transform: translateY(-50%);
    width: 22rem;
    height: 22rem;
    background: url('../img/logo-watermark.png') no-repeat center / contain;
    opacity: 0.05;
    z-index: 0;
    pointer-events: none;
}

.cta-banner .container { position: relative; z-index: 1; }

.cta-banner h2 {
    font-family: "Calistoga", serif;
    font-weight: 400;
    font-size: 1.9rem;
    margin: 0 0 0.75rem;
}

.cta-banner p { max-width: 560px; margin: 0 auto 1.75rem; color: #cdd7e5; }

.cta-banner-actions { display: flex; gap: 1rem; justify-content: center; flex-wrap: wrap; }

/* Scroll-reveal utility — sections fade/slide in as they enter the viewport */
.reveal { opacity: 0; transform: translateY(24px); transition: opacity 0.6s ease, transform 0.6s ease; }
.reveal.is-visible { opacity: 1; transform: translateY(0); }

.paper-cards { grid-template-columns: repeat(4, 1fr); gap: 2rem; }

.paper-card {
    display: block;
    color: var(--navy);
    text-align: center;
    transition: box-shadow 0.15s, transform 0.15s;
}

.paper-card:hover {
    text-decoration: none;
    box-shadow: 0 8px 20px rgba(5,30,64,0.15);
    transform: translateY(-3px);
}

.paper-thumb {
    width: 100%;
    aspect-ratio: 210 / 297;
    object-fit: cover;
    border-radius: 4px;
    border: 1px solid var(--border);
    margin-bottom: 1rem;
    box-shadow: 0 3px 8px rgba(0,0,0,0.15);
}

.paper-card h3 { font-size: 1.1rem; }
.paper-card .post-date { display: block; }

/* News */
.post-list { list-style: none; padding: 0; margin: 2rem 0 0; }

.post-item {
    padding: 1.5rem 0;
    border-bottom: 1px solid var(--border);
}

.post-item h3 { margin: 0 0 0.25rem; }
.post-item .post-date { color: var(--grey); font-size: 0.9rem; }

.post-body { margin-top: 2rem; white-space: pre-line; }

/* Forms */
.form-group { margin-bottom: 1.25rem; }

.form-group label {
    display: block;
    font-weight: 700;
    margin-bottom: 0.4rem;
}

.form-group input:not([type="radio"]):not([type="checkbox"]),
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 0.65rem 0.85rem;
    border: 1px solid var(--border);
    border-radius: 4px;
    font-family: inherit;
    font-size: 1rem;
    background: #fff;
}

.form-group input[type="radio"],
.form-group input[type="checkbox"] {
    width: auto;
    flex-shrink: 0;
}

.form-group select {
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    padding-right: 2.5rem;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23263B6E' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 0.85rem center;
    background-size: 16px;
    cursor: pointer;
}

.form-group select:focus {
    outline: none;
    border-color: var(--navy);
    box-shadow: 0 0 0 3px rgba(38,59,110,0.15);
}

.form-group textarea { min-height: 140px; resize: vertical; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1.25rem; }

/* Branch toggle (contact.php) — a two-way choice presented as clickable
   cards rather than a plain dropdown, since routing the message to the
   right inbox is the first thing a sender should decide. :has() is used
   to style the checked state in pure CSS (no JS needed) — well supported
   in current evergreen browsers. */
.branch-toggle { display: flex; gap: 0.85rem; }

.branch-toggle-option {
    flex: 1 1 0;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0.85rem 1rem;
    border: 2px solid var(--border);
    border-radius: 6px;
    font-weight: 700;
    text-align: center;
    cursor: pointer;
    transition: border-color 0.15s ease, background 0.15s ease, color 0.15s ease;
}

.branch-toggle-option input { position: absolute; opacity: 0; width: 0; height: 0; }

.branch-toggle-option:hover { border-color: var(--navy-accent); }

.branch-toggle-option:has(input:checked) {
    background: var(--navy);
    border-color: var(--navy);
    color: #fff;
}

.form-card {
    background: var(--grey-light);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 2rem;
    max-width: 560px;
    margin: 2rem auto 0;
}

/* FOI contacts grid */
.foi-contacts-grid {
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    margin: 1.5rem 0 2rem;
}

.foi-contact-card {
    display: block;
    transition: box-shadow 0.15s, transform 0.15s;
}

.foi-contact-card:hover {
    text-decoration: none;
    box-shadow: 0 8px 20px rgba(0,0,0,0.12);
    transform: translateY(-3px);
}

.foi-contact-card h3 { font-size: 1.05rem; color: var(--navy); }

.foi-contact-card span {
    display: block;
    color: var(--red);
    font-weight: 700;
    word-break: break-word;
}

.foi-contact-card:hover span { color: var(--red-dark); }

.foi-contacts-name { font-weight: 700; color: var(--navy); }

.alert {
    padding: 1rem 1.25rem;
    border-radius: 4px;
    margin-bottom: 1.5rem;
}

.alert-success { background: #e6f4ea; color: #1e7e34; border: 1px solid #b6dfc3; }
.alert-error { background: #fdedec; color: var(--red-dark); border: 1px solid #f5c6c0; }

/* Community feedback — the homepage centrepiece. Photo as a full-bleed
   background with a navy gradient overlay; content sits in a right-hand
   column so the image reads clearly on the left instead of being covered. */
.feedback-hero {
    background-image: linear-gradient(rgba(5,30,64,0.55), rgba(1,8,17,0.72)), url('../img/bigpitnew.png');
    background-size: cover;
    background-position: left top;
    color: #fff;
    padding: 4rem 0;
}

.feedback-hero-grid {
    display: grid;
    grid-template-columns: 1fr 1.3fr;
    gap: 2rem;
    align-items: start;
}

.feedback-hero-spacer { min-height: 1px; }

.feedback-card {
    background: #fff;
    color: var(--navy);
    border-radius: 10px;
    max-width: 680px;
    margin: 2rem auto 0;
    box-shadow: 0 12px 30px rgba(0,0,0,0.25);
    overflow: hidden;
}

.feedback-card-intro {
    background: rgba(5, 30, 64, 0.9);
    padding: 1.75rem 2.25rem;
}

.feedback-card-intro h2 { margin-top: 0; margin-bottom: 0.85rem; color: #fff; }

.feedback-card-intro p {
    color: #e7ecf3;
    font-size: 1.05rem;
    margin: 0 0 0.75rem;
}

.feedback-card-intro p:last-child { margin-bottom: 0; }

.feedback-card-body { padding: 2.25rem; }

.feedback-card .btn { width: 100%; padding: 0.9rem; font-size: 1.05rem; }
.feedback-note { font-size: 0.85rem; color: var(--grey); margin-top: 0.75rem; text-align: center; }

.form-trust {
    display: flex;
    justify-content: center;
    gap: 1.5rem;
    flex-wrap: wrap;
    margin-bottom: 1rem;
    font-size: 0.85rem;
    color: var(--grey);
}

.form-trust span { display: inline-flex; align-items: center; gap: 0.4rem; }
.form-trust svg { width: 15px; height: 15px; flex-shrink: 0; }

/* Follow / social section */
.follow-section {
    background: var(--navy);
    color: #fff;
    text-align: center;
    padding: 4rem 0;
}

.follow-section h2 { margin-bottom: 0.5rem; }

.facebook-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.65rem;
    margin-top: 1.75rem;
    padding: 0.85rem 2rem;
    background: #fff;
    color: var(--navy);
    font-weight: 700;
    font-size: 1.05rem;
    border-radius: 999px;
    box-shadow: 0 8px 20px rgba(0,0,0,0.18);
    transition: transform 0.15s, box-shadow 0.15s, background 0.15s;
}

.facebook-btn:hover {
    background: var(--grey-light);
    transform: translateY(-2px);
    box-shadow: 0 10px 26px rgba(0,0,0,0.22);
    color: var(--navy);
    text-decoration: none;
}

.facebook-btn svg { width: 22px; height: 22px; fill: var(--navy); flex-shrink: 0; }

/* Ward map hero — a map of the combined Monmouthshire + Torfaen
   constituency outline (real bounding-box aspect ratio ~0.732 width:height,
   computed from the dissolved union of all 57 wards) paired with an intro +
   postcode-search column. No ward list/grid — postcode search (which
   returns both the ward name and which council area it's in) and clicking
   the map directly are the only ways to find a ward. A soft navy-tinted
   gradient (plus a faint corner glow) replaces the flat grey-light backdrop
   used elsewhere, giving the map card and search panel some depth to sit
   on. */
.ward-hero-section {
    background: linear-gradient(135deg, #eef1f8 0%, #dde5f3 100%);
    padding: 3rem 0;
    position: relative;
    overflow: hidden;
}

.ward-hero-section::before {
    content: '';
    position: absolute;
    top: -140px;
    right: -140px;
    width: 480px;
    height: 480px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(38,59,110,0.09) 0%, rgba(38,59,110,0) 70%);
    pointer-events: none;
}

.ward-hero-top {
    display: flex;
    align-items: stretch;
    gap: 2.5rem;
    margin-bottom: 2.5rem;
}

.ward-hero-map { flex: 0 0 auto; }

#ward-leaflet-map {
    height: 560px;
    width: auto;
    aspect-ratio: 0.732;
    z-index: 1;
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid rgba(38,59,110,0.12);
    box-shadow: 0 10px 30px rgba(5,30,64,0.15);
}

.leaflet-control-zoom {
    border: none !important;
    box-shadow: 0 6px 16px rgba(5,30,64,0.2) !important;
    overflow: hidden;
}

.leaflet-control-zoom a {
    background: #fff !important;
    color: var(--navy) !important;
    font-weight: 700;
}

.leaflet-control-zoom a:hover {
    background: var(--navy) !important;
    color: #fff !important;
}

.leaflet-control-attribution {
    background: rgba(255,255,255,0.85) !important;
    border-radius: 4px 0 0 0;
}

.ward-leaflet-tooltip {
    background: var(--navy-dark);
    color: #fff;
    font-weight: 700;
    font-size: 0.85rem;
    border: none;
    border-radius: 4px;
    box-shadow: 0 6px 16px rgba(0,0,0,0.3);
}

.ward-leaflet-tooltip::before { display: none; }

.ward-hero-intro {
    flex: 1 1 auto;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.ward-hero-intro h2 {
    font-family: "Calistoga", serif;
    font-weight: 400;
    font-size: 2.75rem;
    line-height: 1.1;
    margin: 0 0 1rem;
}

.ward-hero-intro h2 .ward-hero-highlight {
    color: var(--amber);
}

.ward-hero-intro p {
    color: var(--grey);
    font-size: 1.05rem;
    margin: 0 0 1.5rem;
    max-width: 480px;
}

.ward-search {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    background: rgba(255,255,255,0.7);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255,255,255,0.8);
    border-radius: 10px;
    padding: 0.6rem 0.6rem 0.6rem 1.1rem;
    max-width: 460px;
    margin-bottom: 0.85rem;
    box-shadow: 0 8px 24px rgba(38,59,110,0.1);
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.ward-search:focus-within {
    border-color: var(--navy-accent);
    box-shadow: 0 0 0 3px rgba(38,59,110,0.12);
}

.ward-search svg {
    width: 20px;
    height: 20px;
    color: var(--grey);
    flex-shrink: 0;
}

.ward-search input {
    border: none;
    outline: none;
    background: transparent;
    font-family: inherit;
    font-size: 1rem;
    width: 100%;
    min-width: 0;
    color: var(--navy);
}

.ward-search-btn {
    flex-shrink: 0;
    background: var(--navy);
    color: #fff;
    border: none;
    border-radius: 6px;
    padding: 0.65rem 1.1rem;
    font-weight: 700;
    font-size: 0.9rem;
    white-space: nowrap;
    cursor: pointer;
    transition: background 0.15s ease;
}

.ward-search-btn:hover { background: var(--navy-accent); }
.ward-search-btn:disabled { opacity: 0.6; cursor: default; }

.postcode-result { max-width: 460px; margin: 0 0 1rem; }

.postcode-status {
    margin: 0 0 0.65rem;
    font-size: 0.95rem;
}

.postcode-status-error { color: var(--red-dark); }
.postcode-status-success { color: var(--navy); font-size: 1.05rem; }

.postcode-highlight-ward {
    font-weight: 900;
    color: var(--amber);
}

.postcode-highlight-area {
    display: inline-block;
    font-weight: 700;
    color: var(--navy);
    background: var(--grey-light);
    padding: 0.1rem 0.6rem;
    border-radius: 999px;
    font-size: 0.9em;
}

.postcode-result .btn {
    padding: 0.6rem 1.25rem;
    font-size: 0.9rem;
}

.ward-hero-cta {
    font-weight: 700;
    font-size: 0.95rem;
}

@media (max-width: 900px) {
    .ward-hero-section { padding: 1.5rem 0 2rem; }
    .ward-hero-top { flex-direction: column; gap: 1.5rem; }
    /* Intro + postcode search before the map on mobile — the search is the
       fastest path to an answer on a small screen, so it shouldn't require
       scrolling past the map first. */
    .ward-hero-intro { order: 1; }
    .ward-hero-map { order: 2; }
    #ward-leaflet-map { height: auto; width: 100%; }
    .ward-hero-intro h2 { font-size: 2.1rem; }
    .ward-hero-intro p { max-width: none; }
    .ward-search { max-width: none; flex-wrap: wrap; }
    .postcode-result { max-width: none; }
}

/* Footer — matching restorebritain.org.uk's dark navy footer */
.site-footer {
    background: var(--footer-navy);
    color: #cdd7e5;
    padding: 3rem 0 0;
    font-size: 0.9rem;
    text-align: left;
}

.site-footer a { color: #fff; }
.site-footer a:hover { color: var(--amber); }

.footer-grid {
    display: grid;
    grid-template-columns: 1.4fr 1fr 1fr 1fr;
    gap: 2rem;
    padding-bottom: 2.5rem;
}

.footer-brand-title {
    display: block;
    color: #fff;
    font-family: "Calistoga", serif;
    font-size: 1.15rem;
    text-transform: uppercase;
    margin-bottom: 0.75rem;
}

.footer-col p { margin: 0 0 0.5rem; }

.footer-col h4 {
    color: #fff;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    margin: 0 0 1rem;
}

.footer-col ul { list-style: none; margin: 0; padding: 0; }
.footer-col ul li { margin-bottom: 0.6rem; }

.footer-social { display: inline-flex; align-items: center; gap: 0.5rem; }
.footer-social svg { width: 18px; height: 18px; fill: currentColor; }

.footer-bottom { text-align: center; padding-bottom: 2.5rem; }

.footer-ruler {
    width: 5rem;
    margin: 0 auto 1.5rem;
    border: none;
    border-top: 1px solid rgba(255,255,255,0.4);
}

.footer-fineprint { color: #8fa0ba; font-size: 0.8rem; margin: 0; }

@media (max-width: 700px) {
    .footer-grid { grid-template-columns: 1fr 1fr; }
    .footer-brand { grid-column: 1 / -1; }
}

@media (max-width: 480px) {
    .footer-grid { grid-template-columns: 1fr; text-align: center; }
    .footer-social { justify-content: center; }
}

/* Admin */
.admin-bar {
    background: var(--amber);
    color: var(--navy-dark);
    text-align: center;
    padding: 0.5rem;
    font-weight: 700;
    font-size: 0.9rem;
}

table.admin-table { width: 100%; border-collapse: collapse; margin-top: 1.5rem; }
table.admin-table th, table.admin-table td {
    text-align: left;
    padding: 0.75rem;
    border-bottom: 1px solid var(--border);
}

@media (max-width: 900px) {
    .nav-toggle { display: flex; }

    nav {
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        flex-direction: column;
        align-items: stretch;
        gap: 0;
        background: #051E40;
        border-bottom: 2px solid #fff;
        max-height: 0;
        overflow: hidden;
        transition: max-height 0.25s ease;
    }

    .site-header.nav-open nav { max-height: 70vh; overflow-y: auto; }

    nav ul {
        flex-direction: column;
        gap: 0;
        padding: 0.5rem 1.5rem;
    }

    nav ul li { border-top: 1px solid rgba(255, 255, 255, 0.12); }
    nav ul li:first-child { border-top: none; }

    nav a { display: block; padding: 0.9rem 0; }

    .nav-cta { display: block; margin: 0.5rem 1.5rem 1.25rem; text-align: center; }

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

@media (max-width: 900px) {
    .feedback-hero-grid { grid-template-columns: 1fr; }
    .feedback-hero-spacer { display: none; }
}

@media (max-width: 700px) {
    .hero { padding: 3.5rem 1.25rem; }
    .hero h1 { font-size: 2rem; }
    .form-row { grid-template-columns: 1fr; }
    .feedback-card-intro { padding: 1.5rem; }
    .feedback-card-body { padding: 1.5rem; }
}

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

/* App page (app.php) — a private, password-gated tab switcher. */
.app-tabs {
    display: flex;
    gap: 0.5rem;
    border-bottom: 2px solid var(--border);
    margin-bottom: 2rem;
}

.app-tab {
    background: none;
    border: none;
    padding: 0.85rem 1.5rem;
    font-family: inherit;
    font-weight: 700;
    font-size: 1rem;
    color: var(--grey);
    cursor: pointer;
    border-bottom: 3px solid transparent;
    margin-bottom: -2px;
    transition: color 0.15s ease, border-color 0.15s ease;
}

.app-tab:hover { color: var(--navy); }

.app-tab.active {
    color: var(--navy);
    border-bottom-color: var(--amber);
}

.app-placeholder {
    text-align: center;
    padding: 4rem 1.5rem;
    color: var(--grey);
}

.app-placeholder svg {
    width: 44px;
    height: 44px;
    color: var(--amber);
    margin-bottom: 1rem;
}

.app-placeholder h3 {
    color: var(--navy);
    margin: 0 0 0.5rem;
}
