/* Travel Guide theme.
 *
 * Light, high-contrast reading layout for long-form guides. System fonts only:
 * the theme CSP declares no font-src, so web fonts are blocked by design.
 * The travel shortcodes ([map], [faq], [cta]) and the Wave-1/2 media macros
 * emit their own class names; the blocks below give them a guide-book look
 * without any per-theme markup.
 *
 * Type: the Quiet Instrument scale only -- 12 / 14.5 / 16 / 20 / 26 / 28px
 * (docs/design/design-system.md). Emphasis is font-weight (450 body, 600
 * headings/labels), never an off-scale size; at most one element per page
 * sits above the body tier (signature move 4).
 */

/* Palette. --tg-muted / --tg-line / --tg-accent are the Quiet Instrument
 * tokens exactly (docs/design/design-system.md, Light row) -- they used to be
 * near-misses of them, which is drift, not identity, and was repointed.
 *
 * Two values here are travel's DELIBERATE divergence from the spec and must
 * not be "fixed" by a later audit: --tg-paper is warm cream (#fcfbf7) rather
 * than the spec's cool #F7F9F9, and --tg-radius is 10px rather than the
 * spec's 6px. Together they are the sun-bleached guide-book identity this
 * theme exists for; see docs/design/public/public-travel-page.html. */
:root {
    /* Travel is a light theme only -- there is no dark palette in this file.
       Declaring it stops the browser painting native form controls dark over
       the warm-cream canvas on a dark-preferring machine. */
    color-scheme: light;

    --tg-ink: #1d2b2b;
    --tg-muted: #5A6E72;
    --tg-line: #DCE4E4;
    --tg-paper: #fcfbf7;   /* deliberate: warm cream, not --paper #F7F9F9 */
    --tg-accent: #0F6E68;
    --tg-accent-dark: #0a544a;
    --tg-radius: 10px;     /* deliberate: guide-card radius, not the spec 6px */
    --tg-measure: 44rem;
}

body.tg {
    margin: 0;
    background: var(--tg-paper);
    color: var(--tg-ink);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    font-size: 1rem;
    line-height: 1.65;
}

body.tg a { color: var(--tg-accent); }
body.tg a:hover { color: var(--tg-accent-dark); }
body.tg img { max-width: 100%; height: auto; }

/* Every theme needs one global focus ring, so a control the theme never
 * styled individually still shows keyboard focus. */
body.tg :focus-visible { outline: 2px solid var(--tg-accent); outline-offset: 2px; }

/* Skip link -- see journal-custom.css's .qj-skip for why. */
.tg-skip {
    position: absolute;
    left: -9999px;
    top: 0;
    z-index: 10;
    padding: .5rem .75rem;
    background: #fff;
    color: var(--tg-ink);
    border: 1px solid var(--tg-line);
    border-radius: var(--tg-radius);
    font-size: .90625rem;
    text-decoration: none;
}
.tg-skip:focus { left: .75rem; top: .75rem; }

/* ---- chrome ---- */

.tg-header {
    max-width: 68rem;
    margin: 0 auto;
    padding: 2rem 1.25rem 1rem;
    border-bottom: 1px solid var(--tg-line);
}
.tg-name {
    margin: 0;
    font-size: 1.25rem;
    font-weight: 600;
    letter-spacing: -0.01em;
}
.tg-name a { color: var(--tg-ink); text-decoration: none; }
.tg-tagline { margin: .35rem 0 0; color: var(--tg-muted); }
/* The nav holds two lists -- categories, then the static pages -- and as two
 * block-level <ul>s the pages wrapped onto a row of their own, so the header
 * read as two unrelated navs. One flex row for both, with a wider gap and a
 * hairline marking where the categories end. */
.tg-nav {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: .5rem 1.75rem;
    margin-top: .85rem;
    font-size: .90625rem;
}
.tg-nav ul { list-style: none; display: flex; flex-wrap: wrap; gap: .5rem 1rem; margin: 0; padding: 0; }
.tg-nav ul.rCategory + ul:has(li) { padding-left: 1.75rem; border-left: 1px solid var(--tg-line); }
/* At phone width the pages wrap under the categories anyway; there the
 * hairline would mark nothing but an indent. */
@media (max-width: 560px) {
    .tg-nav ul.rCategory + ul:has(li) { padding-left: 0; border-left: 0; }
}
.tg-nav a { text-decoration: none; font-weight: 600; }
/* The current category: ink rather than accent, with the accent underline
 * journal's nav uses. .selected is what the showWeblogCategoryLinksList macro
 * emits; [aria-current] is the same state for assistive technology. */
.tg-nav li.selected a,
.tg-nav a[aria-current="page"] { color: var(--tg-ink); box-shadow: inset 0 -2px var(--tg-accent); }

.tg-main { max-width: 68rem; margin: 0 auto; padding: 1.75rem 1.25rem 3rem; }
.tg-main-entry { max-width: 58rem; }

.tg-footer {
    max-width: 68rem;
    margin: 0 auto;
    padding: 1.5rem 1.25rem 3rem;
    border-top: 1px solid var(--tg-line);
}
.tg-header .site-search { margin: .9rem 0 0; }
.tg-search input,
.tg-header .site-search input {
    width: 100%;
    max-width: 22rem;
    padding: .55rem .75rem;
    border: 1px solid var(--tg-line);
    border-radius: var(--tg-radius);
    font: inherit;
    background: #fff;
}

/* The home page's search box sits in the header (the showSearchBox macro);
 * Enter searches and the button stays for assistive technology only. */
.tg-header .site-search-go {
    position: absolute; width: 1px; height: 1px; overflow: hidden;
    clip-path: inset(50%); white-space: nowrap;
}

/* ---- entry-list cards ---- */

.tg-cards { display: grid; gap: 1.5rem; }
@media (min-width: 700px) {
    .tg-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.75rem; }
}
@media (min-width: 1040px) {
    .tg-cards { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

.tg-card {
    background: #fff;
    border: 1px solid var(--tg-line);
    border-radius: var(--tg-radius);
    overflow: hidden;
    display: flex;
    flex-direction: column;
}
.tg-card-media { display: block; line-height: 0; }
.tg-card-img { width: 100%; aspect-ratio: 3 / 2; object-fit: cover; }
.tg-card-body { padding: 1rem 1.1rem 1.25rem; }
.tg-card-title { margin: 0 0 .3rem; font-size: 1rem; font-weight: 600; line-height: 1.3; }
.tg-card-title a { text-decoration: none; color: var(--tg-ink); }
.tg-card-title a:hover { color: var(--tg-accent); }
.tg-card-meta { margin: 0 0 .5rem; color: var(--tg-muted); font-size: .90625rem; }
.tg-card-excerpt { margin: 0; color: var(--tg-muted); overflow-wrap: anywhere; }

/* ---- pager: journal's Newer/Older steps, in travel's tokens ----
 * Older on the left, newer on the right, each a caps label over a line of
 * ink; the older step is first in the markup, so the grid places it. */
.tg-pager { margin-top: 2rem; padding-top: 1.25rem; border-top: 1px solid var(--tg-line); }
.tg-search-head .tg-pager { margin-top: .75rem; padding-top: 0; border-top: 0; }
.tg-main-entry .tg-pager { max-width: var(--tg-measure); }
.tg-steps { display: grid; grid-template-columns: 1fr 1fr; gap: 1.5rem; }
.tg-step { display: block; min-width: 0; text-decoration: none; }
.tg-step-back { grid-column: 1; }
.tg-step-fwd { grid-column: 2; text-align: right; }
.tg-step-label {
    display: block;
    font-size: .75rem;
    font-weight: 600;
    letter-spacing: .08em;
    text-transform: uppercase;
    color: var(--tg-muted);
}
.tg-step-title { display: block; margin-top: .25rem; color: var(--tg-ink); font-weight: 600; line-height: 1.4; }
.tg-step:hover .tg-step-title { color: var(--tg-accent); }
@media (max-width: 560px) {
    .tg-steps { grid-template-columns: 1fr; gap: 1.25rem; }
    .tg-step-fwd { grid-column: 1; text-align: left; }
    .tg-step-empty { display: none; }
}

/* ---- view heading (category and tag views) ---- */
.tg-view { margin: 0 0 1.5rem; }
.tg-view-label {
    margin: 0;
    font-size: .75rem;
    font-weight: 600;
    letter-spacing: .08em;
    text-transform: uppercase;
    color: var(--tg-muted);
}
.tg-view-name { margin: .2rem 0 0; font-size: 1.25rem; font-weight: 600; line-height: 1.3; overflow-wrap: anywhere; }
.tg-search-head { margin-bottom: 1.5rem; }
.tg-search-empty,
.tg-search-error { margin: 0 0 1.5rem; color: var(--tg-muted); }

/* ---- permalink ---- */

.tg-entry { margin: 0 0 2.5rem; }
.tg-hero { margin: 0 0 1.5rem; }
.tg-hero-img { width: 100%; border-radius: var(--tg-radius); }
.tg-entry-title { margin: 0 0 .4rem; font-size: 1.625rem; font-weight: 600; line-height: 1.2; letter-spacing: -0.015em; }
.tg-entry-meta { margin: 0 0 1.75rem; color: var(--tg-muted); font-size: .90625rem; }
/* overflow-wrap: a long bare URL is one unbreakable word, and without this
 * the page scrolled sideways at phone width. */
.tg-entry-content { max-width: var(--tg-measure); overflow-wrap: anywhere; }
/* entry tags -- the guide-card vocabulary: a soft outlined chip on the same
   measure as the content it closes, muted until hovered. */
.tg-entry-tags {
    display: flex;
    flex-wrap: wrap;
    gap: .375rem;
    max-width: var(--tg-measure);
    margin: 1.75rem 0 0;
}
.tg-entry-tags a {
    padding: .125rem .5rem;
    border: 1px solid var(--tg-line);
    border-radius: var(--tg-radius);
    color: var(--tg-muted);
    font-size: .8125rem;
    text-decoration: none;
}
.tg-entry-tags a:hover { color: var(--tg-accent); border-color: var(--tg-accent); }
.tg-entry-content h2 { margin: 2.25rem 0 .6rem; font-size: 1.25rem; font-weight: 600; line-height: 1.3; }
.tg-entry-content h3 { margin: 1.75rem 0 .5rem; font-size: 1rem; font-weight: 600; }
.tg-entry-content blockquote {
    margin: 1.5rem 0;
    padding: .25rem 0 .25rem 1.1rem;
    border-left: 3px solid var(--tg-accent);
    color: var(--tg-muted);
}
/* ---- shortcode blocks: itinerary map, FAQ, booking CTA ---- */

/* [map] — the macro sizes the container; give it guide-book framing. */
body.tg .travel-map {
    height: 380px;
    margin: 1.75rem 0;
    border: 1px solid var(--tg-line);
    border-radius: var(--tg-radius);
    overflow: hidden;
}
@media (max-width: 640px) { body.tg .travel-map { height: 280px; } }

/* [faq] — a definition list styled as a question block. */
body.tg .faq {
    margin: 1.75rem 0;
    padding: .25rem 1.25rem 1rem;
    background: #fff;
    border: 1px solid var(--tg-line);
    border-radius: var(--tg-radius);
}
body.tg .faq dt {
    margin-top: 1rem;
    font-weight: 600;
}
body.tg .faq dd {
    margin: .35rem 0 0;
    color: var(--tg-muted);
}

/* [cta] — booking/print button card. */
body.tg .cta-card {
    display: block;
    margin: 1.75rem 0;
    padding: 1.1rem 1.25rem;
    background: var(--tg-accent);
    color: #fff;
    border-radius: var(--tg-radius);
    text-decoration: none;
}
body.tg .cta-card:hover { background: var(--tg-accent-dark); color: #fff; }
body.tg .cta-card .cta-label { display: block; font-weight: 600; font-size: 1rem; }
body.tg .cta-card .cta-note { display: block; margin-top: .2rem; opacity: .85; font-size: .90625rem; }

/* [gallery] grids and [image] figures inherit the shared macros' rules;
 * only the framing differs here. */
body.tg .shortcode-image { margin: 1.75rem 0; }
body.tg .shortcode-image img { border-radius: var(--tg-radius); }
body.tg .jgrid { margin: 1.75rem 0; }

/* ---- contact form & newsletter subscribe ----
 * the showAudienceAssets/showSubscribeForm macros inject these forms unscoped
 * (form.className = 'contact-form' / 'newsletter-subscribe'); the body.tg
 * prefix here outranks that head-level style block by specificity so the
 * theme's own card treatment wins without touching the shared macro. */
body.tg .contact-form,
body.tg .newsletter-subscribe {
    max-width: var(--tg-measure);
    margin: 1.75rem 0;
    padding: 1.1rem 1.25rem 1.25rem;
    background: #fff;
    border: 1px solid var(--tg-line);
    border-radius: var(--tg-radius);
}
/* Caps-label role (12px, tracked, uppercase) -- the treatment
   docs/design/public/public-travel-page.html's .field label carries, and the
   same one journal-custom.css and portfolio-custom.css already use. */
body.tg .contact-form label,
body.tg .newsletter-subscribe label {
    display: block;
    margin-top: .85rem;
    font-size: .75rem;
    letter-spacing: .08em;
    text-transform: uppercase;
    font-weight: 600;
    color: var(--tg-muted);
}
body.tg .contact-form label:first-child,
body.tg .newsletter-subscribe label:first-child {
    margin-top: 0;
}
body.tg .contact-form input,
body.tg .contact-form textarea,
body.tg .comments .comment-form textarea,
body.tg .newsletter-subscribe input[type=email] {
    display: block;
    width: 100%;
    max-width: none;
    margin-top: .3rem;
    padding: .5rem .65rem;
    box-sizing: border-box;
    font: inherit;
    font-size: .90625rem;
    color: var(--tg-ink);
    background: var(--tg-paper);
    border: 1px solid var(--tg-line);
    border-radius: var(--tg-radius);
}
body.tg .contact-form input:focus,
body.tg .contact-form textarea:focus,
body.tg .comments .comment-form textarea:focus,
body.tg .newsletter-subscribe input[type=email]:focus {
    outline: 2px solid var(--tg-accent);
    outline-offset: 1px;
    border-color: var(--tg-accent);
}
body.tg .contact-form textarea { min-height: 8em; resize: vertical; }
body.tg .contact-form .audience-hp,
body.tg .newsletter-subscribe .audience-hp { position: absolute; left: -9999px; top: -9999px; }
body.tg .contact-form button,
body.tg .comments .comment-form button,
body.tg .newsletter-subscribe button {
    margin-top: 1rem;
    padding: .55rem 1.35rem;
    font: inherit;
    font-size: .90625rem;
    font-weight: 600;
    color: #fff;
    background: var(--tg-accent);
    border: none;
    border-radius: var(--tg-radius);
    cursor: pointer;
}
body.tg .contact-form button:hover,
body.tg .comments .comment-form button:hover,
body.tg .newsletter-subscribe button:hover {
    background: var(--tg-accent-dark);
}
body.tg .audience-message { margin-top: .75rem; color: var(--tg-muted); }

/* ---- search results page ----
 * Same reason as journal-custom.css's block: the showWeblogSearchAgainForm macro's
 * unclassed controls otherwise render as raw OS widgets. */
#searchAgain input.text {
    background: #fff;
    border: 1px solid var(--tg-line);
    color: var(--tg-ink);
    padding: .55rem .75rem;
    font: inherit;
    font-size: .90625rem;
    border-radius: var(--tg-radius);
}
#searchAgain input.text:focus { border-color: var(--tg-accent); }
#searchAgain select,
#searchAgain input.button {
    background: #fff;
    border: 1px solid var(--tg-line);
    color: var(--tg-ink);
    padding: .45rem .75rem;
    font: inherit;
    font-size: .90625rem;
    border-radius: var(--tg-radius);
}
#searchAgain input.button { cursor: pointer; }

/* ---- empty entry list ---- */
.tg-list-empty { margin: 1.5rem 0 0; color: var(--tg-muted); }

/* ---- newsletter prompt (see journal-custom.css for the shared rationale) ---- */
body.tg .newsletter-prompt {
    margin: 0 0 .5rem;
    font-size: .75rem;
    letter-spacing: .08em;
    text-transform: uppercase;
    font-weight: 600;
    color: var(--tg-muted);
}
body.tg .newsletter-subscribe-block { margin-top: 1.5rem; }

/* [video] framing, the one shortcode block this theme had not framed. */
body.tg .video-figure { margin: 1.75rem 0; }
body.tg .video-embed { border-radius: var(--tg-radius); overflow: hidden; }

/* the showNextPrevSearchControl macro's hit count (was an <h3>, now a status line). */
body.tg .search-summary { margin: 0 0 .75rem; font-size: .75rem; color: var(--tg-muted); }

/* The search pager macro's own nav: previous results on the left, more on
 * the right, and a lone "More results" still on the right. The hit line
 * above the search-again form is a status line, quiet like the summary. */
body.tg .search-pager { display: flex; justify-content: space-between; gap: 1rem; }
body.tg .search-pager-next { margin-left: auto; }
body.tg .search-hits { margin: 0 0 .5rem; font-size: .75rem; color: var(--tg-muted); }

/* ---- business card ----
 * the footer card for a blog with a business or place; the markup is the
 * showBusinessCard macro's. Tokens only, so light and dark follow the theme. */
body.tg .business-card {
    margin-top: 1.5rem;
    padding-top: 1rem;
    border-top: 1px solid var(--tg-line);
    font-size: .875rem;
}
body.tg .business-card p { margin: 0 0 .25rem; }
body.tg .business-card-name { font-weight: 600; }
body.tg .business-card-locality { color: var(--tg-muted); }
body.tg .business-card-tel { display: inline-block; margin-right: 1rem; }
body.tg .business-card-book {
    display: inline-block;
    padding: .375rem .875rem;
    border: 1px solid var(--tg-accent);
    border-radius: 6px;
    color: var(--tg-accent);
    text-decoration: none;
}
body.tg .business-card-book:hover { background: var(--tg-accent); color: var(--tg-paper); }

/* ---- colophon: the showColophon macro's last line of the footer ---- */
body.tg .colophon { margin-top: 1.5rem; font-size: .75rem; line-height: 1.5; color: var(--tg-muted); }
body.tg .colophon p { margin: 0 0 .25rem; }
body.tg .colophon a { color: inherit; text-decoration: underline; }
body.tg .colophon-meta span + span::before { content: "\00b7"; margin: 0 .5em; }

/* ---- more from the site: the showMoreFromSite macro, just above the colophon.
 * Quiet on purpose: small type in the theme's own soft ink, one rule above it.
 * The places list (the showPlacesYouveBeen macro's script) stays hidden until
 * the reader's own browser has something to show, so nothing here sets a
 * display on .places-been itself. ---- */
body.tg .more-from-site { margin-top: 2rem; padding-top: 1.25rem; border-top: 1px solid var(--tg-line); }
body.tg .more-from-site-title,
body.tg .places-been-title { margin: 0 0 .5rem; font-size: .75rem; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--tg-muted); }
body.tg .more-from-site-posts,
body.tg .places-been-list { list-style: none; margin: 0; padding: 0; }
body.tg .more-from-site-post { margin: 0 0 .5rem; font-size: .90625rem; line-height: 1.4; overflow-wrap: anywhere; }
body.tg .more-from-site-post a { color: var(--tg-ink); text-decoration: none; }
body.tg .more-from-site-post a:hover { color: var(--tg-accent); text-decoration: underline; }
body.tg .more-from-site-blog { display: block; font-size: .75rem; color: var(--tg-muted); }
body.tg .more-from-site .places-been { margin-top: 1rem; }
body.tg .places-been-list li { display: inline; font-size: .8125rem; }
body.tg .places-been-list li + li::before { content: "\00b7"; margin: 0 .5em; color: var(--tg-muted); }
body.tg .places-been-list a { color: var(--tg-accent); }
body.tg .more-from-site-home { margin: 1rem 0 0; font-size: .8125rem; }
body.tg .more-from-site-home a { color: var(--tg-accent); }

/* ---- site bar ----
 * The strip above the header (the showSiteBar macro, weblog.vm) inherits this
 * theme's ink and font; these two name its menu surface and its rule. */
body.tg { --site-bar-surface: var(--tg-paper); --site-bar-line: var(--tg-line); }

/* A blog's pinned post, marked beside the card's date. */
.tg-card-meta .entry-pinned { text-transform: uppercase; letter-spacing: .06em; font-size: .78125rem; }

/* A strand: the "Part N of M in" bar under a post's byline, and a strand page's list of parts. */
.strand-bar { margin: .5rem 0 0; font-size: .875rem; opacity: .85; }
.strand-bar a { color: inherit; text-underline-offset: .2em; }
.strand-parts { margin: 2rem 0 0; padding-left: 1.5rem; }
.strand-part { margin: 0 0 1rem; }
.strand-part-title { font-size: 1.125rem; }
.strand-part-excerpt { margin: .25rem 0 0; font-size: .9375rem; opacity: .85; }
