/* Travel guide layouts (src/site/guide-templates.js). Loaded on guide pages only.
   Each layout has its own class (gd-howto, gd-compare, gd-checklist, gd-events, gd-faq, gd-terminal)
   and its own structure, so guides never look the same. */

.gd { padding: clamp(36px, 6vw, 72px) 0 clamp(40px, 6vw, 80px); }
.gd-wrap { max-width: 1100px; }
.gd-kind { display: inline-block; margin: 0 0 14px; padding: 5px 12px; border-radius: 999px; background: var(--gold-soft); color: var(--gold-dark); font-size: .8rem; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; }
.gd-lead { font-family: var(--font-display); font-size: clamp(1.2rem, 2vw, 1.5rem); line-height: 1.45; color: var(--ink-2); max-width: 760px; margin: 0 0 clamp(28px, 4vw, 44px); text-wrap: pretty; }
.gd h2 { font-family: var(--font-display); font-weight: 400; font-size: clamp(1.6rem, 3vw, 2.2rem); letter-spacing: -0.02em; line-height: 1.1; margin: 0 0 18px; }
.gd h3 { font-size: 1.12rem; line-height: 1.3; margin: 0 0 6px; }
.gd p { margin: 0 0 12px; }
.gd-h { margin-top: clamp(36px, 5vw, 56px) !important; }
.gd-slot { margin: 0; overflow: hidden; border-radius: var(--radius-sm); background: var(--bg-soft); }
.gd-slot img { width: 100%; height: 100%; object-fit: cover; }
.gd-wide { margin: clamp(28px, 4vw, 44px) 0; aspect-ratio: 21 / 8; border-radius: var(--radius); }
.gd-inset { margin: 32px 0 0; aspect-ratio: 16 / 7; }
.gd-extra { margin-top: clamp(36px, 5vw, 56px); max-width: 760px; }
.gd-extra .prose ol, .gd-extra .prose ul { padding-left: 1.2em; }

/* gallery (any layout) */
.gd-gallery { margin-top: clamp(36px, 5vw, 56px); }
.gd-gallery-grid { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 12px; }
.gd-gallery-item { aspect-ratio: 4 / 3; }
.gd-gallery-item:first-child { grid-row: span 2; aspect-ratio: auto; }

/* plan panel and sources (any layout) */
.gd-plan { margin-top: clamp(40px, 6vw, 64px); padding: clamp(22px, 4vw, 36px); border-radius: var(--radius); background: var(--ink); color: #fff; }
.gd-plan h2 { color: #fff; }
.gd-plan h3 { color: rgba(255, 255, 255, .7); font-size: .85rem; letter-spacing: .1em; text-transform: uppercase; margin: 26px 0 10px; font-family: var(--font); font-style: normal; }
.gd-plan-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.gd-plan-card { display: flex; flex-direction: column; gap: 4px; padding: 18px; border-radius: var(--radius-sm); background: rgba(255, 255, 255, .07); border: 1px solid rgba(255, 255, 255, .12); color: #fff; text-decoration: none; transition: background .2s; }
.gd-plan-card:hover { background: rgba(255, 255, 255, .13); }
.gd-plan-card span { font-size: .85rem; color: rgba(255, 255, 255, .7); }
.gd-plan-card strong { font-size: 1.05rem; }
.gd-plan-card.is-book { background: var(--gold); border-color: var(--gold); color: var(--ink); }
.gd-plan-card.is-book span { color: rgba(0, 0, 0, .65); }
.gd-related { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 8px 20px; }
.gd-related a { color: #fff; }
.gd-legal { margin: 22px 0 0 !important; font-size: .88rem; color: rgba(255, 255, 255, .65); }
.gd-sources { margin-top: 24px; padding: 18px 22px; border-left: 3px solid var(--gold); background: var(--bg-soft); border-radius: 0 var(--radius-sm) var(--radius-sm) 0; }
.gd-sources h2 { font-size: 1.2rem; margin-bottom: 6px; }
.gd-sources ul { margin: 0; padding-left: 1.1em; }

/* (a) step-by-step */
.gd-glance { list-style: none; display: flex; flex-wrap: wrap; gap: 10px; padding: 0; margin: 0; }
.gd-glance li { flex: 1 1 180px; padding: 14px 18px; border: 1px solid var(--line); border-radius: var(--radius-sm); background: #fff; }
.gd-glance span { display: block; font-size: .8rem; color: var(--muted); text-transform: uppercase; letter-spacing: .08em; }
.gd-steps { list-style: none; margin: 0; padding: 0; display: grid; gap: clamp(18px, 3vw, 28px); }
.gd-step { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); gap: clamp(16px, 3vw, 36px); align-items: center; }
.gd-step:nth-child(even) .gd-step-img { order: 2; }
.gd-step-img { aspect-ratio: 3 / 2; }
.gd-step-copy { position: relative; padding-left: 4px; }
.gd-num { display: block; font-family: var(--font-display); font-size: clamp(2.6rem, 6vw, 4rem); line-height: 1; color: var(--gold); margin-bottom: 6px; }
.gd-tipbox { margin-top: clamp(32px, 5vw, 48px); padding: 24px 28px; border-radius: var(--radius); background: var(--gold-soft); }
.gd-tipbox ul { margin: 0; padding-left: 1.2em; }

/* (b) comparison */
.gd-verdict { display: grid; grid-template-columns: auto 1fr; gap: 18px; align-items: center; padding: 22px 26px; border-radius: var(--radius); background: var(--ink); color: #fff; }
.gd-verdict p { margin: 0; font-size: 1.08rem; }
.gd-verdict-label { padding: 8px 14px; border-radius: 999px; background: var(--gold); color: var(--ink); font-weight: 600; font-size: .85rem; white-space: nowrap; }
.gd-table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius-sm); background: #fff; }
.gd-table { width: 100%; border-collapse: collapse; font-size: .95rem; }
.gd-table th, .gd-table td { padding: 14px 16px; text-align: left; vertical-align: top; border-bottom: 1px solid var(--line); }
.gd-table thead th { background: var(--bg-soft); font-size: .8rem; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
.gd-table tbody th { font-weight: 600; min-width: 160px; }
.gd-table tr.is-pick { background: var(--gold-soft); }
.gd-pick { display: inline-block; margin-top: 4px; padding: 2px 8px; border-radius: 999px; background: var(--gold); color: var(--ink); font-size: .72rem; font-weight: 600; }
.gd-pc-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 16px; }
.gd-pc { padding: 22px; border-radius: var(--radius); background: #fff; border: 1px solid var(--line); box-shadow: var(--shadow); }
.gd-pc ul { list-style: none; padding: 0; margin: 12px 0 0; display: grid; gap: 8px; }
.gd-pc li { display: grid; grid-template-columns: 22px 1fr; gap: 8px; align-items: start; }
.gd-pros svg { color: var(--ok); margin-top: 3px; }
.gd-cons svg { color: var(--danger); margin-top: 3px; }

/* (c) checklist */
.gd-check-layout { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); gap: clamp(24px, 4vw, 48px); align-items: start; }
.gd-check-group { margin-bottom: 30px; }
.gd-check-group h2 { display: flex; align-items: center; gap: 12px; font-size: clamp(1.4rem, 2.4vw, 1.8rem); }
.gd-check-count { display: inline-grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; background: var(--ink); color: #fff; font-family: var(--font); font-size: .95rem; flex: none; }
.gd-ticks { list-style: none; padding: 0; margin: 0; border-top: 1px solid var(--line); }
.gd-ticks li { border-bottom: 1px solid var(--line); }
.gd-ticks label { display: flex; gap: 12px; align-items: flex-start; padding: 12px 4px; cursor: pointer; }
.gd-ticks input { appearance: none; -webkit-appearance: none; flex: none; width: 22px; height: 22px; margin: 2px 0 0; border: 2px solid var(--gold-dark); border-radius: 6px; display: grid; place-items: center; cursor: pointer; }
.gd-ticks input:checked { background: var(--gold-dark); }
.gd-ticks input:checked::after { content: ''; width: 6px; height: 11px; border: solid #fff; border-width: 0 2px 2px 0; transform: rotate(45deg) translate(-1px, -1px); }
.gd-ticks input:checked + span { color: var(--muted); text-decoration: line-through; }
.gd-check-img { aspect-ratio: 16 / 9; margin: 0 0 30px; }
.gd-print { position: sticky; top: 96px; padding: 26px; border: 2px dashed var(--ink); border-radius: var(--radius); background: #fff; }
.gd-print-kicker { font-size: .78rem; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; color: var(--gold-dark); }
.gd-print h2 { font-size: 1.5rem; }
.gd-print-list { list-style: none; padding: 0; margin: 0 0 18px; display: grid; gap: 10px; }
.gd-print-list li { display: flex; gap: 10px; align-items: center; }
.gd-box { width: 18px; height: 18px; border: 2px solid var(--ink); border-radius: 3px; flex: none; }

/* (d) seasonal events */
.gd-events .gd-wrap { max-width: 1200px; }
.gd-season { display: inline-flex; gap: 12px; align-items: baseline; padding: 12px 20px; border-radius: 999px; background: var(--ink); color: #fff; }
.gd-season span { color: var(--gold); font-size: .8rem; text-transform: uppercase; letter-spacing: .1em; }
.gd-event-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 18px; }
.gd-event { display: flex; flex-direction: column; border-radius: var(--radius); overflow: hidden; background: #fff; border: 1px solid var(--line); box-shadow: var(--shadow); }
.gd-event-img { aspect-ratio: 4 / 3; border-radius: 0; }
.gd-event-copy { padding: 18px 20px 20px; }
.gd-event-where { display: flex; gap: 6px; align-items: center; font-size: .9rem; color: var(--gold-dark); }
.gd-tip-cols { counter-reset: tip; list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 14px; }
.gd-tip-cols li { counter-increment: tip; padding: 18px; border-top: 3px solid var(--gold); background: var(--bg-soft); border-radius: 0 0 var(--radius-sm) var(--radius-sm); }
.gd-tip-cols li::before { content: counter(tip, decimal-leading-zero); display: block; font-family: var(--font-display); font-size: 1.6rem; color: var(--gold-dark); }
.gd-cta-band { display: flex; justify-content: space-between; align-items: center; gap: 20px; margin-top: clamp(32px, 5vw, 48px); padding: clamp(24px, 4vw, 40px); border-radius: var(--radius); background: linear-gradient(120deg, var(--gold-dark), var(--gold)); color: #fff; }
.gd-cta-band h2 { color: #fff; margin-bottom: 6px; }
.gd-cta-band p { margin: 0; }

/* (e) FAQ explainer */
.gd-faq-layout { display: grid; grid-template-columns: minmax(0, 300px) minmax(0, 1fr); gap: clamp(24px, 5vw, 56px); align-items: start; }
.gd-faq-index { position: sticky; top: 96px; padding: 20px; border-radius: var(--radius-sm); background: var(--bg-soft); font-size: .92rem; }
.gd-faq-index p { font-weight: 600; margin-bottom: 8px; }
.gd-faq-index ol { margin: 0; padding-left: 1.2em; display: grid; gap: 6px; }
.gd-faq-index a { color: var(--ink-2); }
.gd-faq-topic { font-size: .8rem; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; color: var(--gold-dark); border-bottom: 1px solid var(--line); padding-bottom: 8px; }
.gd-qa { padding: 18px 0 8px; scroll-margin-top: 100px; }
.gd-faq .gd-qa h2 { font-family: var(--font); font-weight: 600; font-size: clamp(1.15rem, 2vw, 1.35rem); letter-spacing: -0.01em; margin-bottom: 8px; }
.gd-qa p { color: #3a3a3e; }
.gd-faq-group { margin-bottom: 26px; }
.gd-faq-img { aspect-ratio: 16 / 7; margin: 0 0 28px; }

/* (f) terminal map */
.gd-map { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: clamp(20px, 4vw, 40px); align-items: start; }
.gd-map-svg { width: 100%; height: auto; display: block; }
.gd-map-svg .m-ground { fill: #eceae4; }
.gd-map-svg .m-road { fill: #3a3a3e; }
.gd-map-svg .m-terminal { fill: var(--ink); }
.gd-map-svg .m-park { fill: #d9d4c7; }
.gd-map-svg .m-station { fill: #cfd8dc; }
.gd-map-svg .m-other { fill: #dcdad3; }
.gd-map-svg .m-zone { fill: var(--gold); opacity: .45; }
.gd-map-svg .m-walk { stroke: var(--gold-dark); stroke-width: 4; stroke-dasharray: 8 6; fill: none; }
.gd-map-svg .m-label { font: 600 15px var(--font); fill: #3a3a3e; }
.gd-map-svg .m-light { fill: #fff; }
.gd-map-svg .m-pin circle { fill: #fff; stroke: var(--ink); stroke-width: 3; }
.gd-map-svg .m-pickup circle { fill: #1f8a45; stroke: #fff; }
.gd-map-svg .m-dropoff circle { fill: var(--gold-dark); stroke: #fff; }
.gd-map-svg .m-pin text { font: 700 15px var(--font); fill: var(--ink); }
.gd-map-svg .m-pickup text, .gd-map-svg .m-dropoff text { fill: #fff; }
.gd-map-note { font-size: .85rem; color: var(--muted); margin-top: 8px !important; }
.gd-callouts { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.gd-callout { display: grid; grid-template-columns: 34px 1fr; gap: 12px; padding: 14px 16px; border-radius: var(--radius-sm); background: #fff; border: 1px solid var(--line); }
.gd-callout p { margin: 0; font-size: .94rem; }
.gd-pin { display: grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; background: #fff; border: 2px solid var(--ink); font-weight: 700; }
.gd-callout.is-pickup .gd-pin { background: #1f8a45; border-color: #1f8a45; color: #fff; }
.gd-callout.is-dropoff .gd-pin { background: var(--gold-dark); border-color: var(--gold-dark); color: #fff; }
.gd-tag { display: inline-block; font-size: .72rem; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.gd-callout.is-pickup .gd-tag { color: #1f8a45; }
.gd-callout.is-dropoff .gd-tag { color: var(--gold-dark); }
.gd-walk-wrap { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, .8fr); gap: clamp(20px, 4vw, 40px); align-items: center; }
.gd-walk { counter-reset: walk; list-style: none; padding: 0; margin: 0; border-left: 2px solid var(--gold); }
.gd-walk li { counter-increment: walk; position: relative; padding: 0 0 18px 26px; }
.gd-walk li::before { content: counter(walk); position: absolute; left: -13px; top: 0; width: 24px; height: 24px; border-radius: 50%; background: var(--gold); color: var(--ink); font-size: .8rem; font-weight: 700; display: grid; place-items: center; }
.gd-walk-img { aspect-ratio: 4 / 5; }

@media (max-width: 860px) {
  .gd-step, .gd-check-layout, .gd-faq-layout, .gd-map, .gd-walk-wrap { grid-template-columns: 1fr; }
  .gd-step:nth-child(even) .gd-step-img { order: 0; }
  .gd-print, .gd-faq-index { position: static; }
  .gd-plan-grid { grid-template-columns: 1fr; }
  .gd-related { grid-template-columns: 1fr; }
  .gd-gallery-grid { grid-template-columns: 1fr 1fr; }
  .gd-gallery-item:first-child { grid-column: span 2; grid-row: auto; aspect-ratio: 16 / 9; }
  .gd-wide { aspect-ratio: 16 / 9; }
  .gd-walk-img { aspect-ratio: 16 / 9; }
  .gd-cta-band { flex-direction: column; align-items: flex-start; }
  .gd-verdict { grid-template-columns: 1fr; }
  .gd-verdict-label { justify-self: start; }
  /* Comparison table becomes one card per option on phones. */
  .gd-table-wrap { border: 0; background: none; overflow: visible; }
  .gd-table, .gd-table tbody, .gd-table tr, .gd-table th, .gd-table td { display: block; width: 100%; }
  .gd-table thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  .gd-table tr { margin-bottom: 12px; border: 1px solid var(--line); border-radius: var(--radius-sm); background: #fff; overflow: hidden; }
  .gd-table tbody th { background: var(--bg-soft); }
  .gd-table td { display: grid; grid-template-columns: 42% 1fr; gap: 10px; padding: 10px 16px; }
  .gd-table td::before { content: attr(data-label); font-size: .78rem; font-weight: 600; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; }
}

@media print {
  .tpl-guide header, .tpl-guide footer, .tpl-guide .page-head, .tpl-guide .explore, .tpl-guide .gd-plan, .tpl-guide .gd-gallery, .tpl-guide .gd-slot, .gd-print-btn { display: none !important; }
  .gd-check-layout { display: block; }
  .gd-print { position: static; break-inside: avoid; }
}
