/* DiscoverPuri 1.0.0 — an editorial travel-guide theme for Puri, Odisha */

/* 1. Tokens ---------------------------------------------------------- */
:root {
    /* Colour: sand paper, ink, temple maroon, turmeric */
    --paper: #faf6ee;
    --paper-deep: #f3ebdc;
    --surface: #fffdf8;
    --ink: #1f1a17;
    --ink-soft: #3b322c;
    --muted: #5f544b;          /* 7.0:1 on paper */
    --rule: #e4d8c4;
    --rule-strong: #cdbb9f;
    --maroon: #8a1c1c;          /* 8.3:1 on paper */
    --maroon-deep: #5e1212;
    --temple-red: var(--ghost-accent-color, #a50404);
    --turmeric: #e2a524;
    --turmeric-soft: #f6e3b4;
    --sea: #1d4b57;

    /* Type */
    --font-display: var(--gh-font-heading, "Fraunces"), Georgia, "Times New Roman", serif;
    --font-text: "Source Serif 4", Georgia, "Times New Roman", serif;
    --font-ui: var(--gh-font-body, "Inter"), system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;

    /* Modular scale, ratio 1.25, fluid at the top end */
    --step--2: 0.75rem;
    --step--1: 0.875rem;
    --step-0: 1rem;
    --step-1: 1.25rem;
    --step-2: clamp(1.375rem, 1.2rem + 0.6vw, 1.563rem);
    --step-3: clamp(1.6rem, 1.35rem + 1vw, 1.953rem);
    --step-4: clamp(1.9rem, 1.5rem + 1.6vw, 2.441rem);
    --step-5: clamp(2.2rem, 1.6rem + 2.4vw, 3.052rem);
    --step-6: clamp(2.5rem, 1.7rem + 3.2vw, 3.815rem);

    /* Spacing scale (4px base) */
    --s-1: 0.25rem; --s-2: 0.5rem; --s-3: 0.75rem; --s-4: 1rem; --s-5: 1.5rem;
    --s-6: 2rem; --s-7: 3rem; --s-8: 4rem; --s-9: 6rem;

    /* Layout */
    --container: 1200px;
    --gutter: clamp(1.125rem, 4vw, 2rem);
    --measure: 42rem;   /* ~68ch at the article size */
    --wide: 60rem;
    --radius: 4px;
}

/* 2. Base ------------------------------------------------------------ */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 5rem; }
body {
    margin: 0;
    background: var(--paper);
    color: var(--ink);
    font: 400 var(--step-0)/1.6 var(--font-ui);
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}
img, svg, video { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }
a:hover { color: var(--maroon); }
h1, h2, h3, h4, p, figure, ul, ol, blockquote { margin: 0; }
ul[class], ol[class] { list-style: none; padding: 0; }
button { font: inherit; color: inherit; cursor: pointer; }
:focus-visible { outline: 2px solid var(--maroon); outline-offset: 3px; border-radius: 2px; }
::selection { background: var(--turmeric-soft); color: var(--ink); }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip-link { position: absolute; left: var(--s-4); top: -4rem; z-index: 100; background: var(--ink); color: var(--paper); padding: var(--s-2) var(--s-4); }
.skip-link:focus, .skip-link:focus-visible { top: var(--s-4); color: var(--paper); outline: 2px solid var(--turmeric); outline-offset: 2px; }

.container { width: min(var(--container), 100% - 2 * var(--gutter)); margin-inline: auto; }
.mark { width: 1.75rem; height: 1.75rem; color: var(--maroon); flex: none; }

/* Shared type pieces */
.eyebrow, .kicker, .section-label, .meta, .footer-head, .listing-count, .byline {
    font-family: var(--font-ui);
}
.eyebrow {
    font-size: var(--step--2); font-weight: 600; letter-spacing: 0.12em; text-transform: uppercase;
    color: var(--maroon); margin-bottom: var(--s-3);
}
.eyebrow a { color: inherit; border-bottom: 1px solid currentColor; }
.kicker {
    display: inline-block; font-size: var(--step--2); font-weight: 600; letter-spacing: 0.1em;
    text-transform: uppercase; color: var(--maroon); margin-bottom: var(--s-2);
}
.kicker:hover { color: var(--maroon-deep); text-decoration: underline; text-underline-offset: 3px; }
.kicker--lg { font-size: var(--step--1); }
.meta { font-size: var(--step--1); color: var(--muted); display: flex; flex-wrap: wrap; align-items: center; gap: 0 var(--s-2); }
.meta-dot { color: var(--rule-strong); }
.link-arrow { display: inline-flex; align-items: center; gap: var(--s-2); font: 500 var(--step--1)/1 var(--font-ui); color: var(--maroon); white-space: nowrap; }
.link-arrow .i-arrow { transition: transform .2s ease; }
.link-arrow:hover .i-arrow { transform: translateX(3px); }

/* Buttons */
.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: var(--s-2);
    min-height: 2.75rem; padding: 0 var(--s-5); border: 1px solid var(--maroon); border-radius: var(--radius);
    background: var(--maroon); color: #fff; font: 600 var(--step--1)/1 var(--font-ui); letter-spacing: .01em;
    transition: background .2s ease, color .2s ease;
}
.btn:hover { background: var(--maroon-deep); border-color: var(--maroon-deep); color: #fff; }
.btn-line { background: transparent; color: var(--maroon); }
.btn-line:hover { background: var(--maroon); color: #fff; }
.btn-sm { min-height: 2.25rem; padding: 0 var(--s-4); }
.btn-block { display: flex; width: 100%; }
.btn-turmeric { background: var(--turmeric); border-color: var(--turmeric); color: var(--ink); }
.btn-turmeric:hover { background: #f0b938; border-color: #f0b938; color: var(--ink); }
.btn-loading { display: none; }
.icon-btn { display: inline-grid; place-items: center; width: 2.75rem; height: 2.75rem; border: 0; border-radius: 50%; background: transparent; color: var(--ink); }
.icon-btn:hover { background: var(--paper-deep); color: var(--maroon); }

/* 3. Masthead -------------------------------------------------------- */
.topline { background: var(--maroon-deep); color: #f4e6d0; font: 500 var(--step--2)/1 var(--font-ui); letter-spacing: .04em; }
.topline-inner { display: flex; justify-content: space-between; gap: var(--s-4); padding-block: var(--s-2); }
.topline-note { opacity: .85; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.masthead {
    position: sticky; top: 0; z-index: 50; background: rgba(250, 246, 238, .96);
    backdrop-filter: saturate(1.2) blur(8px); border-bottom: 1px solid var(--rule);
}
.masthead.is-scrolled { box-shadow: 0 6px 18px -14px rgba(31, 26, 23, .5); }
.masthead-inner { display: flex; align-items: center; gap: var(--s-6); min-height: 4.25rem; }
.brand { display: inline-flex; align-items: center; gap: var(--s-3); color: var(--ink); }
.brand:hover { color: var(--ink); }
.brand-name { font: 600 1.5rem/1 var(--font-display); letter-spacing: -0.01em; font-variation-settings: "opsz" 72; }
.primary-nav { margin-left: auto; }
.primary-nav ul { list-style: none; margin: 0; padding: 0; display: flex; gap: var(--s-5); }
.primary-nav a { font: 500 var(--step--1)/1 var(--font-ui); color: var(--ink-soft); padding-block: var(--s-2); border-bottom: 2px solid transparent; }
.primary-nav a:hover,
.primary-nav .nav-current a { color: var(--maroon); border-bottom-color: var(--turmeric); }
.masthead-actions { display: flex; align-items: center; gap: var(--s-2); }
.menu-btn { display: none; }
.mobile-nav { border-top: 1px solid var(--rule); background: var(--paper); padding-block: var(--s-5) var(--s-6); max-height: calc(100vh - 6rem); overflow-y: auto; }
.mobile-nav-label { font: 600 var(--step--2)/1 var(--font-ui); letter-spacing: .12em; text-transform: uppercase; color: var(--muted); margin-bottom: var(--s-3); }
.mobile-nav-list { list-style: none; margin: 0; padding: 0; }
.mobile-nav-list a { display: block; padding: var(--s-3) 0; font: 500 var(--step-2)/1.2 var(--font-display); border-bottom: 1px solid var(--rule); }
.mobile-nav-site { display: flex; flex-wrap: wrap; gap: var(--s-2) var(--s-6); margin: var(--s-5) 0; }
.mobile-nav-site ul { list-style: none; padding: 0; margin: 0; }
.mobile-nav-site a { display: block; padding: var(--s-1) 0; font-size: var(--step--1); color: var(--muted); }

/* 4. Homepage -------------------------------------------------------- */
.hero { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: var(--s-7); align-items: start; padding-block: var(--s-6) var(--s-5); }
.hero--lead-only,
.hero--side-only { grid-template-columns: minmax(0, 1fr); }
.hero--side-only .hero-side { max-width: 40rem; }
.lead-media { display: block; overflow: hidden; border-radius: var(--radius); background: var(--paper-deep); }
.lead-media img { width: 100%; aspect-ratio: 3 / 2; object-fit: cover; transition: transform .6s ease; }
.lead-media:hover img { transform: scale(1.02); }
.lead-body { padding-top: var(--s-5); }
.lead-title { font: 500 var(--step-5)/1.08 var(--font-display); letter-spacing: -0.015em; font-variation-settings: "opsz" 120; margin-bottom: var(--s-4); text-wrap: balance; }
.lead-title a:hover { color: var(--maroon); }
.lead-excerpt { font: 400 var(--step-1)/1.55 var(--font-text); color: var(--ink-soft); max-width: 38em; margin-bottom: var(--s-4); }
.lead--text .lead-body { padding: var(--s-7); background: var(--surface); border-top: 4px solid var(--turmeric); }

.hero-side { display: flex; flex-direction: column; gap: var(--s-6); }
.welcome { background: var(--surface); border: 1px solid var(--rule); border-top: 4px solid var(--maroon); padding: var(--s-6); }
.welcome-title { font: 500 italic var(--step-4)/1.1 var(--font-display); letter-spacing: -0.01em; margin-bottom: var(--s-4); color: var(--ink); }
.welcome p { font-family: var(--font-text); font-size: 1.0625rem; line-height: 1.6; color: var(--ink-soft); }
.welcome-links { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s-5); margin-top: var(--s-5); }
.section-label { font-size: var(--step--2); font-weight: 600; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); padding-bottom: var(--s-3); border-bottom: 2px solid var(--ink); }
.latest-list ol { list-style: none; padding: 0; counter-reset: latest; }
.latest-list li { position: relative; padding: var(--s-4) 0 var(--s-4) 2.75rem; border-bottom: 1px solid var(--rule); counter-increment: latest; }
.latest-list li:last-child { border-bottom: 0; padding-bottom: 0; }
.latest-list li::before { content: counter(latest); position: absolute; left: 0; top: var(--s-4); font: 500 var(--step-3)/1 var(--font-display); color: var(--turmeric); font-variant-numeric: lining-nums; }
.latest-list .kicker { margin-bottom: var(--s-1); }
.latest-title { display: block; font: 500 var(--step-1)/1.3 var(--font-display); margin-bottom: var(--s-1); }
.latest-list .meta { font-size: var(--step--2); }

.section { padding-block: var(--s-8); }
.section-head { display: flex; align-items: flex-end; justify-content: space-between; gap: var(--s-5); margin-bottom: var(--s-6); }
.section-head .eyebrow { margin-bottom: var(--s-2); }
.section-head--rule { padding-top: var(--s-4); border-top: 2px solid var(--ink); margin-bottom: var(--s-5); align-items: baseline; }
.section-title { font: 500 var(--step-4)/1.1 var(--font-display); letter-spacing: -0.01em; text-wrap: balance; }
.section-title--sm { font-size: var(--step-3); }

.section--explore { background: var(--paper-deep); border-block: 1px solid var(--rule); }
.topic-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--s-4); }
.topic a { display: flex; flex-direction: column; height: 100%; padding: var(--s-5); background: var(--surface); border: 1px solid var(--rule); border-radius: var(--radius); transition: border-color .2s ease, transform .2s ease; }
.topic a:hover { border-color: var(--maroon); color: var(--ink); transform: translateY(-2px); }
.topic-name { font: 500 var(--step-2)/1.2 var(--font-display); margin-bottom: var(--s-2); }
.topic-desc { font: 400 0.9375rem/1.5 var(--font-text); color: var(--muted); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; margin-bottom: var(--s-4); }
.topic-count { margin-top: auto; display: inline-flex; align-items: center; gap: var(--s-2); font: 600 var(--step--2)/1 var(--font-ui); letter-spacing: .08em; text-transform: uppercase; color: var(--maroon); }

.shelves { display: grid; gap: var(--s-8); }

.section--visit { background: var(--sea); color: #f3efe6; }
.visit-inner { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: var(--s-7); align-items: start; }
.section--visit .eyebrow { color: var(--turmeric); }
.section--visit .section-title { color: #fff; margin-bottom: var(--s-4); }
.visit-copy p:not(.eyebrow) { font: 400 var(--step-1)/1.55 var(--font-text); color: #d9e2e1; }
.visit-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 var(--s-6); }
.visit-list a { display: block; padding: var(--s-4) 0; border-top: 1px solid rgba(255, 255, 255, .22); color: #fff; }
.visit-list a:hover { color: var(--turmeric); }
.visit-list strong { display: block; font: 500 var(--step-2)/1.25 var(--font-display); margin-bottom: var(--s-1); }
.visit-list span { font-size: var(--step--1); color: #c5d3d2; }

/* 5. Cards ----------------------------------------------------------- */
.card-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--s-7) var(--s-6); }
.card-grid--4 { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--s-6) var(--s-5); }
.card { display: flex; flex-direction: column; min-width: 0; }
.card-media { display: block; overflow: hidden; border-radius: var(--radius); background: var(--paper-deep); margin-bottom: var(--s-4); }
.card-media img { width: 100%; aspect-ratio: 3 / 2; object-fit: cover; transition: transform .5s ease; }
.card-media:hover img { transform: scale(1.03); }
.card-title { font: 500 var(--step-2)/1.22 var(--font-display); letter-spacing: -0.005em; margin-bottom: var(--s-2); text-wrap: balance; }
.card-title a:hover { color: var(--maroon); }
.card-excerpt { font: 400 1rem/1.55 var(--font-text); color: var(--ink-soft); margin-bottom: var(--s-3); display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.card .meta { margin-top: auto; font-size: var(--step--2); }
.card--compact .card-title { font-size: var(--step-1); line-height: 1.3; }
.card--compact .card-media img { aspect-ratio: 4 / 3; }
.card--text-legacy .card-body { padding: var(--s-5); background: var(--surface); border: 1px solid var(--rule); border-top: 4px solid var(--turmeric); border-radius: var(--radius); height: 100%; display: flex; flex-direction: column; }

.card-media--placeholder { aspect-ratio: 3 / 2; display: grid; place-items: center; background:
    radial-gradient(circle at 50% 50%, rgba(226, 165, 36, .18) 0 28%, transparent 29%),
    repeating-linear-gradient(45deg, rgba(138, 28, 28, .05) 0 2px, transparent 2px 14px), var(--paper-deep);
    border: 1px solid var(--rule); }
.card--compact .card-media--placeholder { aspect-ratio: 4 / 3; }
.placeholder-inner { display: flex; flex-direction: column; align-items: center; gap: var(--s-3); text-align: center; padding: var(--s-4); }
.placeholder-inner .mark { width: 2.75rem; height: 2.75rem; }
.placeholder-tag { font: 500 italic var(--step-1)/1.2 var(--font-display); color: var(--maroon-deep); }

/* 6. Listing pages --------------------------------------------------- */
.listing-head { padding-block: var(--s-8) var(--s-7); margin-bottom: var(--s-7); border-bottom: 1px solid var(--rule); }
.listing-title { font: 500 var(--step-6)/1.05 var(--font-display); letter-spacing: -0.02em; font-variation-settings: "opsz" 144; margin-bottom: var(--s-4); max-width: 18ch; }
.listing-intro { font: 400 var(--step-2)/1.5 var(--font-text); color: var(--ink-soft); max-width: 38em; }
.listing-count { margin-top: var(--s-4); font-size: var(--step--1); font-weight: 500; color: var(--muted); }
.empty-state { grid-column: 1 / -1; text-align: center; padding: var(--s-8) var(--s-5); background: var(--surface); border: 1px dashed var(--rule-strong); border-radius: var(--radius); }
.empty-state .mark { margin: 0 auto var(--s-4); width: 2.5rem; height: 2.5rem; }
.empty-state h2 { font: 500 var(--step-3)/1.2 var(--font-display); margin-bottom: var(--s-3); }
.empty-state p { font-family: var(--font-text); color: var(--ink-soft); max-width: 32em; margin: 0 auto var(--s-5); }
.empty-state .btn { margin: var(--s-1); }
.pagination { display: flex; align-items: center; justify-content: space-between; gap: var(--s-4); padding-block: var(--s-8) var(--s-7); }
.pagination-info { font-size: var(--step--1); color: var(--muted); }
.error { text-align: center; padding-block: var(--s-9); }
.error .mark { width: 3rem; height: 3rem; margin: 0 auto var(--s-5); }
.error .listing-title, .error .listing-intro { margin-inline: auto; }
.error .listing-intro { margin-bottom: var(--s-6); }

/* 7. Articles -------------------------------------------------------- */
.article-head { width: min(48rem, 100% - 2 * var(--gutter)); margin: 0 auto; padding-block: var(--s-8) var(--s-6); text-align: center; }
.article-title { font: 500 var(--step-6)/1.06 var(--font-display); letter-spacing: -0.02em; font-variation-settings: "opsz" 144; margin-bottom: var(--s-5); text-wrap: balance; }
.article-dek { font: 400 italic var(--step-2)/1.45 var(--font-text); color: var(--ink-soft); margin: 0 auto var(--s-5); max-width: 36em; text-wrap: pretty; }
.byline { display: flex; flex-wrap: wrap; justify-content: center; gap: var(--s-2) var(--s-5); font-size: var(--step--1); color: var(--muted); padding-top: var(--s-4); border-top: 1px solid var(--rule); max-width: 32rem; margin-inline: auto; }
.byline a { color: var(--ink); font-weight: 600; }
.byline-author::after { content: none; }
.article-image { width: min(70rem, 100%); margin: 0 auto var(--s-7); }
.article-image img { width: 100%; height: auto; aspect-ratio: 2 / 1; max-height: 36rem; object-fit: cover; object-position: center; }
.article-image--page { width: min(60rem, 100%); }
.article-image figcaption, .gh-content figcaption {
    font: 400 var(--step--1)/1.5 var(--font-ui); color: var(--muted); padding: var(--s-3) var(--gutter) 0; text-align: center;
}
.article-image figcaption a, .gh-content figcaption a { text-decoration: underline; text-underline-offset: 2px; }
.article--page .article-head { padding-bottom: var(--s-7); }

/* Content grid: main / wide / full columns for Koenig cards */
.gh-content {
    display: grid;
    grid-template-columns:
        [full-start] minmax(var(--gutter), 1fr)
        [wide-start] minmax(0, calc((var(--wide) - var(--measure)) / 2))
        [main-start] min(var(--measure), 100% - 2 * var(--gutter)) [main-end]
        minmax(0, calc((var(--wide) - var(--measure)) / 2)) [wide-end]
        minmax(var(--gutter), 1fr) [full-end];
    font-family: var(--font-text);
    font-size: clamp(1.0625rem, 1rem + 0.25vw, 1.1875rem);
    line-height: 1.72;
    color: var(--ink);
    padding-bottom: var(--s-7);
}
.gh-content > * { grid-column: main-start / main-end; }
.gh-content > * + * { margin-top: 1.4em; }
.gh-content > .kg-width-wide { grid-column: wide-start / wide-end; }
.gh-content > .kg-width-full { grid-column: full-start / full-end; }
.gh-content > .kg-width-full img { width: 100%; }
.gh-content a { color: var(--maroon); text-decoration: underline; text-decoration-color: rgba(138, 28, 28, .35); text-decoration-thickness: 1px; text-underline-offset: .2em; }
.gh-content a:hover { text-decoration-color: var(--maroon); }
.gh-content > :is(h2, h3, h4) { font-family: var(--font-display); font-weight: 500; letter-spacing: -0.01em; text-wrap: balance; }
.gh-content > h2 { font-size: var(--step-4); line-height: 1.15; margin-top: 2.2em; }
.gh-content > h3 { font-size: var(--step-2); line-height: 1.25; margin-top: 1.9em; }
.gh-content > h4 { font: 600 var(--step-0)/1.4 var(--font-ui); letter-spacing: .04em; text-transform: uppercase; margin-top: 1.8em; }
.gh-content > :is(h2, h3, h4) + * { margin-top: .7em; }
.gh-content :is(ul, ol) { padding-left: 1.3em; }
.gh-content li + li { margin-top: .4em; }
.gh-content li::marker { color: var(--maroon); }
.gh-content strong { font-weight: 600; }
.gh-content hr { border: 0; height: auto; margin-block: 2.6em; text-align: center; }
.gh-content hr::after { content: "\2022  \2022  \2022"; color: var(--turmeric); letter-spacing: .6em; font-size: 1.1rem; }
.gh-content blockquote:not([class]) {
    position: relative; padding: .2em 0 .2em 1.4em; border-left: 3px solid var(--maroon);
    font: 400 italic 1.2em/1.55 var(--font-display); color: var(--ink-soft);
}
.gh-content blockquote:not([class]) p + p { margin-top: .8em; }
.gh-content .kg-blockquote-alt {
    font: 400 italic var(--step-3)/1.35 var(--font-display); text-align: center; color: var(--maroon-deep);
    padding: var(--s-5) var(--s-6); border-block: 1px solid var(--rule-strong);
}
.gh-content figure img { border-radius: 2px; }
.gh-content > figure, .gh-content > .kg-card { margin-top: 2em; }
.gh-content > figure + *, .gh-content > .kg-card + * { margin-top: 2em; }
.gh-content code { font-size: .88em; background: var(--paper-deep); padding: .1em .35em; border-radius: 3px; }
.gh-content pre { background: var(--ink); color: var(--paper); padding: var(--s-5); overflow-x: auto; border-radius: var(--radius); font-size: .85em; }
.gh-content pre code { background: none; padding: 0; }
.gh-content table { width: 100%; border-collapse: collapse; font: 400 var(--step--1)/1.5 var(--font-ui); }
.gh-content :is(th, td) { padding: var(--s-2) var(--s-3); border-bottom: 1px solid var(--rule); text-align: left; vertical-align: top; }
.gh-content th { font-weight: 600; border-bottom: 2px solid var(--ink); }
.gh-content > p:first-of-type::first-letter { }

/* Koenig cards that need theme help */
.kg-image-card img { margin-inline: auto; }
.kg-gallery-container { display: flex; flex-direction: column; gap: 8px; }
.kg-gallery-row { display: flex; gap: 8px; }
.kg-gallery-image img { width: 100%; height: 100%; object-fit: cover; }
.gh-content .kg-callout-card { font-family: var(--font-ui); font-size: .95em; border-radius: var(--radius); }
.gh-content .kg-callout-card-grey, .gh-content .kg-callout-card-white { background: var(--surface); border: 1px solid var(--rule); }
.gh-content .kg-callout-card-accent { background: var(--maroon); }
.gh-content .kg-bookmark-card a.kg-bookmark-container { text-decoration: none; color: var(--ink); background: var(--surface); border-color: var(--rule); border-radius: var(--radius); }
.gh-content .kg-bookmark-title { font-family: var(--font-display); font-weight: 500; }
.gh-content .kg-bookmark-description, .gh-content .kg-bookmark-metadata { font-family: var(--font-ui); }
.gh-content .kg-toggle-card, .gh-content .kg-product-card-container, .gh-content .kg-header-card { font-family: var(--font-ui); }
.gh-content .kg-button-card a.kg-btn, .gh-content .kg-btn-accent { text-decoration: none; }
.kg-embed-card { display: flex; flex-direction: column; align-items: center; }

/* Table of contents */
.toc { margin-bottom: 2.2em; background: var(--surface); border: 1px solid var(--rule); border-left: 3px solid var(--turmeric); border-radius: var(--radius); font-family: var(--font-ui); }
.toc summary { cursor: pointer; padding: var(--s-3) var(--s-4); font: 600 var(--step--1)/1.4 var(--font-ui); letter-spacing: .06em; text-transform: uppercase; color: var(--ink-soft); }
.toc ol { margin: 0; padding: 0 var(--s-5) var(--s-4) 2.6em; font-size: var(--step--1); line-height: 1.5; }
.toc li + li { margin-top: var(--s-2); }
.toc a { color: var(--ink-soft); text-decoration: none; }
.toc a:hover { color: var(--maroon); text-decoration: underline; }

/* Article footer */
.article-foot { width: min(var(--measure), 100% - 2 * var(--gutter)); margin: 0 auto; padding-bottom: var(--s-7); }
.article-tags { font-size: var(--step--1); color: var(--muted); padding-block: var(--s-4); border-top: 1px solid var(--rule); }
.article-tags a { display: inline-block; margin-left: var(--s-2); padding: 2px var(--s-3); background: var(--paper-deep); border-radius: 999px; color: var(--ink-soft); font-weight: 500; }
.article-tags a:hover { background: var(--turmeric-soft); color: var(--ink); }
.author-box { display: flex; gap: var(--s-4); align-items: flex-start; padding: var(--s-5); background: var(--surface); border: 1px solid var(--rule); border-radius: var(--radius); }
.author-avatar { width: 3.5rem; height: 3.5rem; border-radius: 50%; object-fit: cover; flex: none; }
.author-avatar--mark { display: grid; place-items: center; background: var(--paper-deep); }
.author-name { font: 600 var(--step-0)/1.4 var(--font-ui); margin-bottom: var(--s-1); }
.author-name a { color: var(--maroon); }
.author-bio { font: 400 var(--step--1)/1.55 var(--font-text); color: var(--ink-soft); }
.container-measure { width: min(var(--measure), 100% - 2 * var(--gutter)); margin: 0 auto var(--s-7); }
.related { border-top: 1px solid var(--rule); }

/* 8. Subscribe ------------------------------------------------------- */
.subscribe-band { background: var(--maroon); color: #fbeee0; padding-block: var(--s-8); }
.subscribe-inner { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: var(--s-7); align-items: center; }
.subscribe-copy .mark { color: var(--turmeric); width: 2.25rem; height: 2.25rem; margin-bottom: var(--s-4); }
.subscribe-copy h2 { font: 500 italic var(--step-5)/1.05 var(--font-display); color: #fff; margin-bottom: var(--s-3); }
.subscribe-copy p { font: 400 var(--step-1)/1.55 var(--font-text); color: #f3dccb; max-width: 30em; }
.subscribe-form { display: flex; flex-wrap: wrap; gap: var(--s-2); }
.subscribe-form input {
    flex: 1 1 14rem; min-width: 0; min-height: 3rem; padding: 0 var(--s-4); border: 1px solid transparent; border-radius: var(--radius);
    background: #fffdf8; color: var(--ink); font: 400 var(--step-0)/1 var(--font-ui);
}
.subscribe-form input:focus { outline: 2px solid var(--turmeric); outline-offset: 1px; }
.subscribe-form .btn { min-height: 3rem; }
.form-msg { display: none; flex-basis: 100%; font-size: var(--step--1); margin-top: var(--s-2); }
.subscribe-form.loading .btn-label { display: none; }
.subscribe-form.loading .btn-loading { display: inline; }
.subscribe-form.success .form-success, .subscribe-form.error .form-error { display: block; }
.subscribe-form--footer input { background: var(--surface); border-color: var(--rule-strong); min-height: 2.75rem; }
.subscribe-form--footer .btn { min-height: 2.75rem; }

/* 9. Footer ---------------------------------------------------------- */
.site-footer { background: var(--ink); color: #d8cfc4; font-size: var(--step--1); }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: var(--s-7) var(--s-6); padding-block: var(--s-8) var(--s-7); }
.footer-about p { font: 400 var(--step-0)/1.6 var(--font-text); color: #e9e1d6; margin-top: var(--s-4); max-width: 26em; }
.footer-about .footer-small { font: 400 var(--step--1)/1.55 var(--font-ui); color: #b5aa9d; }
.brand-footer, .brand-footer:hover { color: #fff; }
.brand-footer .mark { color: var(--turmeric); }
.footer-head { font-size: var(--step--2); font-weight: 600; letter-spacing: .12em; text-transform: uppercase; color: var(--turmeric); margin-bottom: var(--s-4); }
.footer-col ul { list-style: none; padding: 0; margin: 0; }
.footer-col li + li { margin-top: var(--s-2); }
.footer-col a { color: #e6ddd2; }
.footer-col a:hover { color: #fff; text-decoration: underline; text-underline-offset: 3px; }
.footer-site ul + ul { margin-top: var(--s-4); padding-top: var(--s-4); border-top: 1px solid rgba(255, 255, 255, .12); }
.footer-subscribe { grid-column: 1 / -1; display: grid; grid-template-columns: 1.4fr 2fr; gap: var(--s-2) var(--s-6); align-items: center; padding-top: var(--s-6); border-top: 1px solid rgba(255, 255, 255, .12); }
.footer-subscribe .footer-head { margin: 0; grid-column: 1; }
.footer-subscribe p { grid-column: 1; color: #c9bfb3; }
.footer-subscribe .subscribe-form { grid-column: 2; grid-row: 1 / span 2; }
.footer-base { display: flex; justify-content: space-between; gap: var(--s-4); padding-block: var(--s-5); border-top: 1px solid rgba(255, 255, 255, .12); color: #a89d90; font-size: var(--step--2); letter-spacing: .03em; }

/* 10. Responsive ----------------------------------------------------- */
@media (max-width: 1080px) {
    .primary-nav ul { gap: var(--s-4); }
    .card-grid--4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 960px) {
    .primary-nav { display: none; }
    .menu-btn { display: inline-grid; }
    .masthead-actions { margin-left: auto; }
    .hero { grid-template-columns: 1fr; gap: var(--s-5); padding-block: var(--s-5); }
    .card-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .topic-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .visit-inner, .subscribe-inner { grid-template-columns: 1fr; gap: var(--s-6); }
    .footer-grid { grid-template-columns: 1fr 1fr; }
    .footer-about { grid-column: 1 / -1; }
    .footer-subscribe { grid-template-columns: 1fr; }
    .footer-subscribe .subscribe-form { grid-column: 1; grid-row: auto; }
}
@media (max-width: 800px) {
    .topline-note { display: none; }
}
@media (max-width: 640px) {
    .masthead-inner { min-height: 3.75rem; gap: var(--s-3); }
    .brand-name { font-size: 1.3rem; }
    .mark { width: 1.5rem; height: 1.5rem; }
    .hide-xs { display: none; }
    .lead-title { font-size: var(--step-4); }
    .lead-excerpt { font-size: 1.0625rem; }
    .welcome { padding: var(--s-5); }
    .section { padding-block: var(--s-7); }
    .section-head { flex-direction: column; align-items: flex-start; gap: var(--s-3); }
    .visit-list { grid-template-columns: 1fr; }
    .card-grid { grid-template-columns: 1fr; gap: 0; }
    .card-grid > .card:first-child { padding-bottom: var(--s-5); }
    .card-grid:not(.card-grid--4) > .card:not(:first-child) {
        display: grid; grid-template-columns: minmax(0, 1fr) 6.5rem; gap: 0 var(--s-4); align-items: start;
        padding-block: var(--s-4); border-top: 1px solid var(--rule);
    }
    .card-grid:not(.card-grid--4) > .card:not(:first-child) .card-media { grid-column: 2; grid-row: 1; margin: 0; }
    .card-grid:not(.card-grid--4) > .card:not(:first-child) .card-media img,
    .card-grid:not(.card-grid--4) > .card:not(:first-child) .card-media--placeholder { aspect-ratio: 1; }
    .card-grid:not(.card-grid--4) > .card:not(:first-child) .placeholder-tag { display: none; }
    .card-grid:not(.card-grid--4) > .card:not(:first-child) .placeholder-inner .mark { width: 1.75rem; height: 1.75rem; }
    .card-grid:not(.card-grid--4) > .card:not(:first-child) .card-body { grid-column: 1; grid-row: 1; }
    .card-grid:not(.card-grid--4) > .card:not(:first-child) .card-title { font-size: var(--step-1); line-height: 1.3; }
    .card-grid:not(.card-grid--4) > .card:not(:first-child) .card-excerpt { display: none; }
    .topic-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--s-3); }
    .topic a { padding: var(--s-4); }
    .topic-name { font-size: var(--step-1); }
    .topic-desc { display: none; }
    .topic-count { font-size: 0.6875rem; letter-spacing: .06em; }
    .empty-state { padding: var(--s-7) var(--s-4); }
    .card-grid--4 { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--s-5) var(--s-4); }
    .card--compact .card-title { font-size: 1.0625rem; }
    .listing-head { padding-block: var(--s-7) var(--s-6); margin-bottom: var(--s-6); }
    .article-head { padding-block: var(--s-7) var(--s-5); text-align: left; }
    .byline { justify-content: flex-start; margin-inline: 0; }
    .article-dek { margin-inline: 0; }
    .article-image { margin-bottom: var(--s-6); }
    .article-image figcaption { text-align: left; }
    .footer-grid { grid-template-columns: 1fr; padding-top: var(--s-7); }
    .footer-base { flex-direction: column; gap: var(--s-1); }
    .pagination { flex-wrap: wrap; justify-content: center; }
}
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { transition: none !important; animation: none !important; scroll-behavior: auto !important; }
    .lead-media:hover img, .card-media:hover img, .topic a:hover { transform: none !important; }
}
@media print {
    .masthead, .site-footer, .subscribe-band, .related, .toc { display: none !important; }
    body { background: #fff; }
}

/* 1.0.4: breathing room between the tag-page grid and the newsletter band */
.listing-body { padding-bottom: var(--s-8); }
.listing-body + .pagination { padding-top: 0; }
@media (max-width: 640px) { .listing-body { padding-bottom: var(--s-7); } }

/* Comments (Ghost comments-ui lazy-loads when this block enters the viewport) */
.article-comments { scroll-margin-top: 6rem; }
#ghost-comments-root { width: 100%; min-height: 12rem; }
#ghost-comments-root iframe { display: block; width: 100%; border: 0; color-scheme: light; }

/* 11. Directory layouts (Business, People, Places, Jobs) ------------ */
/* One shared frame: image, title, panel and body all use .container. */
.layout-frame { padding-bottom: var(--s-7); }

/* Hidden placeholders must never leave a box, border or grid track. */
.layout-quote[hidden],
.layout-glance[hidden],
.layout-tips[hidden],
.layout-aside[hidden],
.layout-role[hidden],
.layout-dates[hidden],
.layout-employer[hidden],
.layout-badge[hidden] { display: none !important; }

/* Hero / figure: contained, consistent crop, no full-bleed mismatch. */
.layout-figure { margin: 0 0 var(--s-5); }
.layout-figure img {
    width: 100%;
    aspect-ratio: 2 / 1;
    height: auto;
    object-fit: cover;
    object-position: center;
    background: var(--paper-deep);
    border-radius: 2px;
}

/* Caption: credit line only, never raw alt, aligned to the frame. */
.layout-caption {
    margin: 0;
    padding: 0.55rem 0 0;
    text-align: left;
    font-family: var(--font-ui);
    font-size: var(--step--2);
    font-weight: 400;
    line-height: 1.45;
    color: var(--muted);
}
.layout-caption,
.layout-caption span,
.layout-caption p {
    font: inherit;
    color: inherit;
    white-space: normal;
}
.layout-caption a {
    color: var(--muted);
    text-decoration: underline;
    text-underline-offset: 0.15em;
}
.layout-caption a:hover { color: var(--maroon); }

.layout-header { padding: 0 0 var(--s-6); }
.layout-header-copy { text-align: left; max-width: 46rem; }
.layout-header-copy .article-title {
    text-align: left;
    margin: 0 0 var(--s-4);
    overflow-wrap: anywhere;
    text-wrap: balance;
}
.layout-header-copy .article-dek {
    margin: 0;
    max-width: 38rem;
    text-align: left;
}
.layout-badges {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-start;
    align-items: center;
    gap: var(--s-3);
    margin-bottom: var(--s-3);
}
.layout-badge {
    display: inline-flex; align-items: center; gap: var(--s-2);
    font: 600 var(--step--2)/1 var(--font-ui); letter-spacing: .1em; text-transform: uppercase;
    padding: .35rem .7rem; border-radius: 999px; background: var(--turmeric-soft); color: var(--maroon-deep);
}
.layout-badge--open { background: var(--turmeric-soft); color: var(--maroon-deep); }
.layout-badge--closed { background: var(--paper-deep); color: var(--muted); }
.layout--expired .layout-badge--open { display: none; }
.layout-employer { margin-top: var(--s-3); font: 500 var(--step-1)/1.4 var(--font-display); color: var(--ink-soft); }

/* People: portrait + copy share the same frame. No empty portrait column. */
.layout-header--people {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: var(--s-6);
    align-items: start;
    padding: var(--s-6) 0;
}
.layout-header--people.layout-header--has-portrait {
    grid-template-columns: minmax(0, 16rem) minmax(0, 1fr);
}
.layout-portrait { margin: 0; }
.layout-portrait img {
    width: 100%;
    aspect-ratio: 4 / 5;
    height: auto;
    object-fit: cover;
    object-position: center top;
    border-radius: var(--radius);
    background: var(--paper-deep);
}
.layout-role { font: 500 italic var(--step-2)/1.35 var(--font-display); color: var(--maroon); margin: 0 0 var(--s-4); }
.layout-dates { font: 500 var(--step--1)/1.5 var(--font-ui); color: var(--muted); letter-spacing: .02em; margin: var(--s-4) 0 0; }

.layout-quote {
    font: 400 italic var(--step-3)/1.4 var(--font-display); color: var(--maroon-deep);
    text-align: left; max-width: 38rem;
    margin: 0 0 var(--s-6);
    padding: var(--s-5) 0;
    border-block: 1px solid var(--rule-strong);
}
.layout-quote footer {
    display: block; margin-top: var(--s-4);
    font: 500 var(--step--1)/1.4 var(--font-ui); font-style: normal;
    letter-spacing: .06em; text-transform: uppercase; color: var(--muted);
}

.layout-glance {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: var(--s-5) var(--s-6);
    margin: 0 0 var(--s-6);
    padding: var(--s-5) 0;
    border-block: 1px solid var(--rule);
}
.layout-glance:not([hidden]) { display: grid; }
.layout-glance-item dt, .facts-list dt, .apply-box dt {
    font: 600 var(--step--2)/1 var(--font-ui); letter-spacing: .12em; text-transform: uppercase; color: var(--maroon);
    margin-bottom: var(--s-2);
}
.layout-glance-item dd, .facts-list dd, .apply-box dd {
    font: 400 var(--step-0)/1.45 var(--font-text); color: var(--ink); margin: 0;
}
.layout-glance-item dd a, .facts-list dd a, .apply-box dd a { color: var(--maroon); text-decoration: underline; text-underline-offset: .2em; }

/* Body + facts: one column until a panel is actually present. */
.layout-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: var(--s-7) var(--s-6);
    align-items: start;
}
@media (min-width: 901px) {
    .layout-grid.layout-grid--with-panel,
    .layout-grid:has(> .layout-aside:not([hidden])) {
        grid-template-columns: minmax(0, 1fr) minmax(16rem, 20rem);
    }
}
.layout-main { min-width: 0; }

/* Content sits in the main column; do not re-inset it with the article measure grid.
   Without a facts panel, keep a readable measure, left-aligned to the same edge as the title. */
.layout .gh-content {
    display: block;
    padding-bottom: var(--s-6);
}
.layout .gh-content > * + * { margin-top: 1.4em; }
.layout-grid:not(.layout-grid--with-panel) .layout-main,
.layout-grid:not(.layout-grid--with-panel) .layout-main .gh-content,
.layout .article-foot {
    max-width: var(--measure);
}
.layout .article-foot {
    width: auto;
    margin: var(--s-6) 0 0;
    padding-bottom: 0;
}

.layout-aside, .apply-box, .facts-card {
    background: var(--surface); border: 1px solid var(--rule); border-top: 4px solid var(--maroon);
    border-radius: var(--radius); padding: var(--s-5);
}
.layout-aside { position: sticky; top: 5.5rem; }
.facts-card-title, .apply-box-title {
    font: 500 var(--step-2)/1.2 var(--font-display); margin-bottom: var(--s-5);
}
.facts-list, .apply-box dl { display: grid; gap: var(--s-4); margin: 0; }
.layout-cta { margin-top: var(--s-5); width: 100%; }
.layout-cta[aria-disabled="true"], .layout-cta:disabled {
    background: var(--paper-deep); border-color: var(--rule); color: var(--muted); pointer-events: none;
}
.layout-expired-note {
    margin-top: var(--s-4); font: 400 var(--step--1)/1.5 var(--font-ui); color: var(--muted);
}

.layout-tips {
    background: var(--turmeric-soft); border-left: 3px solid var(--turmeric);
    padding: var(--s-5); margin-bottom: var(--s-6); border-radius: var(--radius);
}
.layout-tips h2 { font: 500 var(--step-1)/1.3 var(--font-display); color: var(--maroon-deep); margin-bottom: var(--s-3); }
.layout-tips p, .layout-tips li { font: 400 1.0625rem/1.55 var(--font-text); color: var(--ink-soft); }
.layout-tips ul { padding-left: 1.2em; margin: 0; }
.layout-tips li + li { margin-top: .4em; }

/* Hide the editor-facing metadata block once JS has painted the panel */
.gh-content .dp-meta, .gh-content [data-dp-meta], .gh-content .dp-meta-used { display: none; }
.no-js .gh-content .dp-meta, .no-js .gh-content [data-dp-meta], .no-js .gh-content .dp-meta-used {
    display: block; background: var(--paper-deep); padding: var(--s-5); margin-bottom: var(--s-6);
    border-left: 3px solid var(--turmeric); font-family: var(--font-ui); font-size: var(--step--1);
}

@media (max-width: 900px) {
    .layout-header--people.layout-header--has-portrait {
        grid-template-columns: minmax(0, 13rem) minmax(0, 1fr);
        gap: var(--s-5);
        padding-top: var(--s-5);
    }
    .layout-glance { grid-template-columns: 1fr 1fr; }
    .layout-aside { position: static; }
    .layout-grid.layout-grid--with-panel { grid-template-columns: 1fr; }
    .layout-grid--with-panel .layout-aside { order: -1; }
}
@media (max-width: 640px) {
    .layout-header--people,
    .layout-header--people.layout-header--has-portrait {
        grid-template-columns: 1fr;
    }
    .layout-portrait { max-width: 16rem; }
    .layout-figure { margin-bottom: var(--s-4); }
    .layout-header { padding-bottom: var(--s-5); }
    .layout-glance { gap: var(--s-4); }
}
