/* ============================================================
   VenueMax /guides -- design tokens + shared layout/components.
   Reused by every guide page (app/Views/guides/template.php) and
   the /guides index (app/Views/guides/index.php). Scoped under
   body.guide-page so nothing here leaks onto the rest of the site.
   ============================================================ */

:root {
    --pine: #24433A;
    --pine-deep: #172C26;
    --brass: #A57E2E;
    --paper: #F7F8F6;
    --mist: #DDE5E1;
    --ink: #1F2624;
}

@media (prefers-color-scheme: dark) {
    body.guide-page:not([data-theme="light"]) {
        --paper: #141A18;
        --ink: #E6ECE9;
        --mist: #2A3531;
        --pine: #7FB39F;
    }
}
body.guide-page[data-theme="dark"] {
    --paper: #141A18;
    --ink: #E6ECE9;
    --mist: #2A3531;
    --pine: #7FB39F;
}

body.guide-page {
    margin: 0;
    background: var(--paper);
    color: var(--ink);
    font-family: "Instrument Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
    -webkit-font-smoothing: antialiased;
}

body.guide-page * { box-sizing: border-box; }

body.guide-page a {
    color: var(--pine);
}
body.guide-page a:focus-visible,
body.guide-page button:focus-visible,
body.guide-page input:focus-visible,
body.guide-page summary:focus-visible {
    outline: 2px solid var(--brass);
    outline-offset: 2px;
}

/* ── Nav ─────────────────────────────────────────────────── */
.g-nav {
    background: var(--paper);
    border-bottom: 1px solid var(--mist);
}
.g-nav-inner {
    max-width: 1120px;
    margin: 0 auto;
    padding: 16px 20px;
    display: flex;
    align-items: center;
    gap: 24px;
}
.g-brand {
    font-family: "Newsreader", Georgia, serif;
    font-weight: 600;
    font-size: 1.15rem;
    color: var(--pine);
    text-decoration: none;
    margin-right: auto;
}
.g-nav-links {
    display: flex;
    gap: 20px;
}
.g-nav-links a {
    text-decoration: none;
    font-weight: 600;
    font-size: 0.95rem;
    color: var(--ink);
}
.g-nav-links a:hover { color: var(--pine); }
/* body.guide-page a's color rule (0,1,2) outranks a plain .g-nav-cta
   (0,1,0) on specificity alone regardless of source order -- this
   selector needs to match or beat that to actually win. */
body.guide-page a.g-nav-cta {
    background: var(--pine);
    color: #fff;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.9rem;
    padding: 10px 18px;
    border-radius: 8px;
    white-space: nowrap;
}
.g-nav-cta:hover { background: var(--pine-deep); }
@media (max-width: 640px) {
    .g-nav-links { display: none; }
}

/* ── Page shell ──────────────────────────────────────────── */
.g-main { padding: 32px 0 64px; }
.g-container { max-width: 1120px; margin: 0 auto; padding: 0 20px; }
.g-container-narrow { max-width: 820px; }

.g-breadcrumb {
    font-size: 0.85rem;
    color: #6b7280;
    margin-bottom: 18px;
}
.g-breadcrumb a { color: #6b7280; text-decoration: underline; }
.g-breadcrumb [aria-current="page"] { color: var(--ink); }

h1 {
    font-family: "Newsreader", Georgia, "Times New Roman", serif;
    font-weight: 600;
    font-size: 2.1rem;
    line-height: 1.1;
    margin: 0 0 12px;
    color: var(--ink);
}
@media (min-width: 768px) {
    h1 { font-size: 3rem; }
}

.g-dek {
    font-family: "Newsreader", Georgia, serif;
    font-style: italic;
    font-size: 1.2rem;
    color: var(--ink);
    max-width: 68ch;
    margin: 0 0 16px;
}

.g-byline {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    font-size: 0.9rem;
    color: #6b7280;
    margin-bottom: 28px;
}
.g-byline-photo {
    border-radius: 50%;
    object-fit: cover;
}
.g-byline-dot { color: var(--mist); }

/* ── TOC ─────────────────────────────────────────────────── */
.g-toc-mobile { display: none; margin-bottom: 24px; }
.g-toc-mobile summary {
    cursor: pointer;
    font-weight: 600;
    padding: 12px 16px;
    background: #fff;
    border: 1px solid var(--mist);
    border-radius: 8px;
    min-height: 48px;
    display: flex;
    align-items: center;
}
.g-toc-mobile ul {
    list-style: none;
    margin: 8px 0 0;
    padding: 12px 16px;
    border: 1px solid var(--mist);
    border-radius: 8px;
    background: #fff;
}
.g-toc-mobile li { margin-bottom: 8px; }
.g-toc-mobile a { text-decoration: none; font-size: 0.95rem; display: block; padding: 6px 0; min-height: 32px; }

@media (max-width: 1023px) {
    .g-toc-mobile { display: block; }
    .g-toc-desktop { display: none; }
}

.g-layout {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0;
}
@media (min-width: 1024px) {
    .g-layout { grid-template-columns: 240px 1fr; gap: 48px; align-items: start; }
}

.g-toc-desktop {
    position: sticky;
    top: 24px;
}
.g-toc-title {
    font-size: 0.78rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: #6b7280;
    margin: 0 0 10px;
}
.g-toc-desktop ul { list-style: none; margin: 0; padding: 0; border-left: 2px solid var(--mist); }
.g-toc-desktop li { margin: 0; }
.g-toc-desktop a {
    display: block;
    text-decoration: none;
    font-size: 0.9rem;
    color: #6b7280;
    padding: 6px 0 6px 14px;
    border-left: 2px solid transparent;
    margin-left: -2px;
}
.g-toc-desktop a:hover { color: var(--ink); }
.g-toc-desktop a.is-active {
    color: var(--pine);
    border-left-color: var(--pine);
    font-weight: 600;
}
.g-toc-cta {
    display: block;
    margin-top: 20px;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--pine);
    text-decoration: underline;
}

/* ── Article ─────────────────────────────────────────────── */
.g-article {
    max-width: 68ch;
    font-family: "Newsreader", Georgia, "Times New Roman", serif;
    font-size: 1.125rem;
    line-height: 1.65;
}
@media (min-width: 768px) {
    .g-article { font-size: 1.2rem; }
}
.g-article h2 {
    font-family: "Newsreader", Georgia, serif;
    font-weight: 600;
    font-size: 1.55rem;
    line-height: 1.2;
    margin: 2.2em 0 0.6em;
    color: var(--ink);
    scroll-margin-top: 20px;
}
@media (min-width: 768px) {
    .g-article h2 { font-size: 2rem; }
}
.g-article h3 {
    font-family: "Newsreader", Georgia, serif;
    font-weight: 600;
    font-size: 1.2rem;
    line-height: 1.3;
    margin: 1.6em 0 0.5em;
}
@media (min-width: 768px) {
    .g-article h3 { font-size: 1.35rem; }
}
.g-article p { margin: 0 0 1.1em; }
.g-article a { text-decoration: underline; }

.short-answer {
    background: var(--mist);
    border-left: 4px solid var(--brass);
    border-radius: 6px;
    padding: 16px 20px;
    margin: 1.6em 0;
}
.short-answer p { margin: 0; font-size: 1.05rem; }

.table-wrap { overflow-x: auto; margin: 1.4em 0; }
.g-article table {
    width: 100%;
    border-collapse: collapse;
    font-family: "Instrument Sans", system-ui, sans-serif;
    font-size: 0.95rem;
}
.g-article th, .g-article td {
    text-align: left;
    padding: 10px 14px;
    border-bottom: 1px solid var(--mist);
}
.g-article thead th {
    font-weight: 600;
    font-size: 0.82rem;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    color: #6b7280;
}
.g-article tbody th { font-weight: 600; }

/* "After the booking" column gets a faint mist tint so it reads as the
   side the venue should own. */
.table-before-after th:last-child,
.table-before-after td:last-child {
    background: rgba(221, 229, 225, 0.6);
}

/* ── "Missing" blocks (the six things sections) ─────────────
   Plain text, no cards/icons/shadows per the design spec -- the only
   visual separator is the pine rule on the "With VenueMax" line, so a
   skimmer can read just those six lines and get the pitch. */
.missing-block p { margin: 0 0 0.7em; }
.missing-with-venuemax {
    border-left: 3px solid var(--pine);
    padding-left: 14px;
    font-weight: 500;
}

/* ── 5-step flow ─────────────────────────────────────────── */
.step-list {
    padding-left: 1.3em;
    margin: 1.2em 0;
}
.step-list li {
    margin-bottom: 0.9em;
    padding-left: 4px;
}
.step-list li::marker {
    color: var(--brass);
    font-weight: 600;
}

/* ── Buttons ─────────────────────────────────────────────── */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 48px;
    padding: 0 22px;
    border-radius: 8px;
    font-family: "Instrument Sans", system-ui, sans-serif;
    font-weight: 600;
    font-size: 0.98rem;
    text-decoration: none;
    cursor: pointer;
    border: none;
}
.btn-primary { background: var(--pine); color: #fff; }
.btn-primary:hover { background: var(--pine-deep); }
.btn-secondary {
    background: transparent;
    color: var(--pine);
    text-decoration: underline;
    min-height: auto;
    padding: 0;
}

/* ── Calculator ──────────────────────────────────────────── */
.calc-panel {
    border: 1px solid rgba(31, 38, 36, 0.2);
    border-radius: 10px;
    padding: 24px;
    margin: 1.6em 0;
    background: #fff;
    font-family: "Instrument Sans", system-ui, sans-serif;
}
.calc-inputs { margin-bottom: 20px; }
.calc-row {
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding: 14px 0;
    border-bottom: 1px solid var(--mist);
}
.calc-row-last { border-bottom: none; }
.calc-row label { font-size: 0.9rem; font-weight: 600; color: var(--ink); }
.calc-row input {
    border: none;
    border-bottom: 2px solid var(--mist);
    background: transparent;
    font-family: "Instrument Sans", system-ui, sans-serif;
    font-size: 1.1rem;
    color: var(--ink);
    padding: 6px 2px;
    max-width: 200px;
}
.calc-row input:focus {
    border-bottom-color: var(--brass);
    outline: none;
}
.calc-results {
    background: var(--paper);
    border: 1px solid var(--mist);
    border-radius: 8px;
    padding: 18px 20px;
    display: flex;
    flex-direction: column;
    gap: 14px;
}
.calc-result { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
.calc-result-label { font-size: 0.9rem; color: var(--ink); max-width: 60%; }
.calc-result-value {
    font-family: "Newsreader", Georgia, serif;
    font-weight: 600;
    font-size: 1.5rem;
    color: var(--brass);
    transition: opacity 0.15s ease;
}
.calc-result-highlight { padding-top: 10px; border-top: 1px dashed var(--mist); }
.calc-caption { font-size: 0.88rem; color: #6b7280; margin: 14px 0 0; }
.calc-noscript { font-size: 0.9rem; }
@media (prefers-reduced-motion: reduce) {
    .calc-result-value { transition: none; }
}

/* ── FAQ ─────────────────────────────────────────────────── */
.g-faq { font-family: "Instrument Sans", system-ui, sans-serif; }
.g-faq-item {
    border-bottom: 1px solid var(--mist);
    padding: 16px 0;
}
.g-faq-item summary {
    cursor: pointer;
    font-weight: 600;
    font-size: 1.02rem;
    min-height: 48px;
    display: flex;
    align-items: center;
    color: var(--ink);
}
.g-faq-item p { font-size: 0.98rem; line-height: 1.6; margin: 10px 0 0; color: var(--ink); }

/* ── CTA block ───────────────────────────────────────────── */
.cta-block {
    background: var(--pine);
    color: #fff;
    border-radius: 12px;
    padding: 32px;
    margin: 2em 0;
}
.cta-block h3 {
    font-family: "Newsreader", Georgia, serif;
    font-weight: 600;
    font-size: 1.4rem;
    margin: 0 0 8px;
    color: #fff;
}
.cta-block p { color: rgba(255, 255, 255, 0.88); margin: 0 0 20px; font-family: "Instrument Sans", system-ui, sans-serif; font-size: 1rem; }
.cta-buttons { display: flex; flex-wrap: wrap; gap: 20px; align-items: center; }
/* White-on-pine keeps the button visible against the block's pine
   background (a plain .btn-primary here would be pine-on-pine) while
   staying well clear of AA (10.83:1) -- the brass fill this replaced
   only hit 3.73:1 with white text, below the 4.5:1 small-text minimum. */
.cta-block .btn-primary { background: #fff; color: var(--pine); }
.cta-block .btn-primary:hover { background: var(--mist); }
.cta-block .btn-secondary { color: #fff; }
/* Default focus ring (brass) only reaches 2.9:1 on this pine background,
   under the 3:1 non-text minimum (WCAG 1.4.11) -- use white instead. */
.cta-block a:focus-visible,
.cta-block button:focus-visible {
    outline-color: #fff;
}

/* ── Author box / related / footnote ────────────────────── */
.g-author-box {
    display: flex;
    gap: 16px;
    align-items: flex-start;
    margin: 2.4em 0;
    padding-top: 1.6em;
    border-top: 1px solid var(--mist);
    font-family: "Instrument Sans", system-ui, sans-serif;
}
.g-author-box img { border-radius: 50%; object-fit: cover; flex-shrink: 0; }
.g-author-name { font-size: 0.78rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.03em; color: #6b7280; margin: 0 0 4px; }
.g-author-box p:not(.g-author-name) { font-size: 0.98rem; margin: 0; }

.g-related { font-family: "Instrument Sans", system-ui, sans-serif; margin: 1.6em 0; }
.g-related-title { font-weight: 600; margin: 0 0 8px; }
.g-related ul { margin: 0; padding-left: 20px; }

.g-footnote {
    font-family: "Instrument Sans", system-ui, sans-serif;
    font-size: 0.82rem;
    color: #6b7280;
    margin-top: 2em;
}

/* ── /guides index cards ─────────────────────────────────── */
.g-guide-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 20px;
    margin-top: 28px;
}
@media (min-width: 640px) {
    .g-guide-grid { grid-template-columns: repeat(2, 1fr); }
}
.g-guide-card {
    display: block;
    border: 1px solid var(--mist);
    border-radius: 10px;
    padding: 22px;
    text-decoration: none;
    color: var(--ink);
    background: #fff;
    transition: border-color 0.15s ease;
}
.g-guide-card:hover { border-color: var(--pine); }
.g-guide-card h2 {
    font-family: "Newsreader", Georgia, serif;
    font-weight: 600;
    font-size: 1.25rem;
    margin: 0 0 8px;
    line-height: 1.25;
}
.g-guide-card p {
    font-family: "Instrument Sans", system-ui, sans-serif;
    font-size: 0.95rem;
    color: #6b7280;
    margin: 0 0 12px;
}
.g-guide-card-meta {
    /* brass only reaches 3.51:1 at this size, under the 4.5:1 small-text
       minimum -- pine clears it at 10.17:1. */
    font-family: "Instrument Sans", system-ui, sans-serif;
    font-size: 0.82rem;
    color: var(--pine);
    font-weight: 600;
}

/* ── Footer ──────────────────────────────────────────────── */
.g-footer {
    background: var(--pine-deep);
    padding: 28px 0;
}
.g-footer-inner {
    max-width: 1120px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    gap: 24px;
    flex-wrap: wrap;
}
.g-footer-inner a {
    color: rgba(255, 255, 255, 0.85);
    text-decoration: none;
    font-family: "Instrument Sans", system-ui, sans-serif;
    font-size: 0.9rem;
}
.g-footer-inner a:hover { color: #fff; }
