/* ============ Guide / city page template ============ */

/* header dropdown */
.nav-dd { position: relative; }
.nav-dd > button { font: inherit; font-weight: 550; color: var(--ink-2); background: none; border: 0; cursor: pointer; display: inline-flex; align-items: center; gap: 4px; padding: 0; }
.nav-dd > button svg { width: 14px; height: 14px; transition: transform .15s; }
.nav-dd:hover > button, .nav-dd:focus-within > button { color: var(--ink); }
.nav-dd:hover > button svg, .nav-dd:focus-within > button svg { transform: rotate(180deg); }
.nav-menu {
  position: absolute; top: calc(100% + 14px); left: 50%; transform: translateX(-50%); width: 320px;
  background: #fff; border: 1px solid var(--line); border-radius: 14px; box-shadow: var(--shadow-lg); padding: 10px;
  opacity: 0; visibility: hidden; transition: opacity .15s, visibility .15s;
}
.nav-menu::before { content: ""; position: absolute; top: -14px; left: 0; right: 0; height: 14px; }
.nav-dd:hover .nav-menu, .nav-dd:focus-within .nav-menu { opacity: 1; visibility: visible; }
.nav-menu a { display: block; padding: 10px 12px; border-radius: 9px; text-decoration: none; }
.nav-menu a:hover { background: var(--bg-soft); }
.nav-menu b { display: block; color: var(--ink); font-size: .93rem; font-weight: 650; }
.nav-menu span { display: block; color: var(--muted); font-size: .82rem; font-weight: 450; line-height: 1.4; }
.nav-menu .all { border-top: 1px solid var(--line); margin-top: 6px; padding-top: 12px; color: var(--accent-2); font-weight: 650; font-size: .9rem; }
@media (max-width: 860px) { .nav-dd { display: none; } }

/* hero */
.g-hero {
  position: relative; overflow: hidden; color: #cbd5e1; padding: 40px 0 0;
  background: radial-gradient(900px 420px at 88% -10%, rgba(234,106,31,.18), transparent 60%), linear-gradient(180deg, #0b1b33, #0e2342);
}
.g-hero::before {
  content: ""; position: absolute; inset: 0; pointer-events: none; opacity: .5;
  background-image: linear-gradient(rgba(255,255,255,.04) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.04) 1px, transparent 1px);
  background-size: 44px 44px; -webkit-mask-image: linear-gradient(180deg, #000, transparent 85%); mask-image: linear-gradient(180deg, #000, transparent 85%);
}
.g-hero .wrap { position: relative; }
.crumbs { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; font-size: .85rem; margin: 0 0 26px; padding: 0; list-style: none; }
.crumbs a { color: #94a3b8; text-decoration: none; }
.crumbs a:hover { color: #fff; }
.crumbs li + li::before { content: "/"; color: #475569; margin-right: 6px; }
.crumbs li[aria-current] { color: #e2e8f0; }
.g-hero .eyebrow { color: #fdba74; }
.g-hero h1 { color: #fff; font-size: clamp(2.1rem, 4.6vw, 3.4rem); max-width: 20ch; margin-bottom: 18px; }
.g-sub { font-size: 1.18rem; color: #94a3b8; max-width: 44em; margin-bottom: 26px; }
.g-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 22px; font-size: .9rem; color: #94a3b8; margin-bottom: 40px; }
.g-meta .who { display: inline-flex; align-items: center; gap: 10px; color: #e2e8f0; font-weight: 600; }
.avatar { width: 34px; height: 34px; border-radius: 50%; background: var(--accent); color: #fff; display: grid; place-items: center; font-weight: 800; font-size: .95rem; flex: none; }
.g-meta .dot { width: 4px; height: 4px; border-radius: 50%; background: #475569; }
.g-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 0; background: #fff; border-radius: 16px 16px 0 0; box-shadow: 0 -10px 40px -20px rgba(0,0,0,.5); }
.g-stats.n3 { grid-template-columns: repeat(3, 1fr); }
@media (max-width: 860px) { .g-stats, .g-stats.n3 { grid-template-columns: 1fr 1fr; } }
.g-stat { padding: 22px 24px; border-right: 1px solid var(--line); }
.g-stat:last-child { border-right: 0; }
@media (max-width: 860px) { .g-stat:nth-child(2n) { border-right: 0; } .g-stat:nth-child(-n+2) { border-bottom: 1px solid var(--line); } }
.g-stat b { display: block; font-size: clamp(1.35rem, 2.4vw, 1.75rem); font-weight: 800; color: var(--ink); letter-spacing: -.03em; line-height: 1.15; }
.g-stat span { display: block; font-size: .86rem; color: var(--muted); margin-top: 4px; line-height: 1.4; }
.g-stat-note { background: #fff; border-top: 1px solid var(--line); font-size: .78rem; color: var(--muted); padding: 10px 24px; }

/* layout */
.g-main { background: #fff; }
.g-layout { display: grid; grid-template-columns: 260px minmax(0, 1fr); gap: 64px; padding-top: 48px; padding-bottom: 72px; }
@media (max-width: 980px) { .g-layout { grid-template-columns: minmax(0, 1fr); gap: 24px; padding-top: 28px; } }
.g-side { position: relative; }
.g-side-inner { position: sticky; top: 90px; display: grid; gap: 18px; }
@media (max-width: 980px) { .g-side-inner { position: static; } .g-side-cta { display: none; } }

.g-toc { border: 1px solid var(--line); border-radius: 14px; padding: 6px 0 10px; background: #fff; }
.g-toc summary { list-style: none; font-size: .76rem; font-weight: 750; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); padding: 12px 18px 8px; cursor: default; }
.g-toc summary::-webkit-details-marker { display: none; }
.g-toc ol { list-style: none; margin: 0; padding: 0; counter-reset: t; }
.g-toc li { counter-increment: t; }
.g-toc a { display: flex; gap: 10px; padding: 7px 18px; font-size: .9rem; line-height: 1.4; color: var(--ink-2); text-decoration: none; border-left: 2px solid transparent; }
.g-toc a::before { content: counter(t, decimal-leading-zero); font-size: .75rem; font-weight: 700; color: #94a3b8; padding-top: 2px; }
.g-toc a:hover { color: var(--ink); background: var(--bg-soft); }
.g-toc a.active { color: var(--accent-2); border-left-color: var(--accent); background: var(--accent-soft); font-weight: 600; }
.g-toc a.active::before { color: var(--accent); }
@media (max-width: 980px) {
  .g-toc summary { cursor: pointer; display: flex; justify-content: space-between; align-items: center; padding: 14px 18px; font-size: .82rem; }
  .g-toc summary::after { content: "+"; font-size: 1.2rem; color: var(--ink); font-weight: 500; letter-spacing: 0; }
  .g-toc[open] summary::after { content: "–"; }
}

.g-side-cta { background: var(--navy); color: #cbd5e1; border-radius: 14px; padding: 22px; }
.g-side-cta b { display: block; color: #fff; font-size: 1.02rem; line-height: 1.3; margin-bottom: 8px; }
.g-side-cta p { font-size: .88rem; color: #94a3b8; margin: 0 0 16px; line-height: 1.5; }
.g-side-cta .btn { width: 100%; padding: 11px 14px; font-size: .92rem; }

/* article body */
.g-body { max-width: 760px; font-size: 1.06rem; }
.g-body > section { padding: 0; scroll-margin-top: 90px; }
.g-body > section + section { margin-top: 56px; }
.g-body h2 { font-size: clamp(1.5rem, 2.6vw, 1.95rem); margin-bottom: .6em; }
.g-body h2 .num { display: block; font-size: .8rem; letter-spacing: .1em; color: var(--accent-2); font-weight: 750; margin-bottom: 8px; }
.g-body h3 { font-size: 1.14rem; margin: 1.6em 0 .5em; }
.g-body p, .g-body li { color: var(--ink-2); }
.g-body ul, .g-body ol { padding-left: 1.3em; }
.g-body li { margin-bottom: .5em; }
.g-body li::marker { color: var(--accent); font-weight: 700; }
.g-body a { color: var(--accent-2); }

.g-answer { position: relative; background: var(--bg-soft); border: 1px solid var(--line); border-radius: 14px; padding: 18px 20px 18px 22px; margin: 0 0 1.4em; }
.g-answer::before { content: ""; position: absolute; left: 0; top: 14px; bottom: 14px; width: 3px; border-radius: 3px; background: var(--accent); }
.g-answer .lbl { display: block; font-size: .72rem; font-weight: 750; letter-spacing: .1em; text-transform: uppercase; color: var(--accent-2); margin-bottom: 4px; }
.g-answer p { margin: 0; color: var(--ink); font-weight: 500; }

.g-table { width: 100%; border-collapse: separate; border-spacing: 0; border: 1px solid var(--line); border-radius: 14px; overflow: hidden; margin: 0 0 1.4em; font-size: .97rem; }
.g-table th { background: var(--navy); color: #fff; font-size: .8rem; letter-spacing: .03em; text-transform: uppercase; font-weight: 700; padding: 12px 16px; text-align: left; }
.g-table td { padding: 13px 16px; border-bottom: 1px solid var(--line); vertical-align: top; }
.g-table tr:last-child td { border-bottom: 0; }
.g-table tr:nth-child(even) td { background: var(--bg-soft); }
.g-table td:first-child { font-weight: 600; color: var(--ink); }
.g-table .hi { color: var(--green); font-weight: 700; }
.g-table .lo { color: var(--red); font-weight: 700; }
.g-tablewrap { overflow-x: auto; margin: 0 0 1.4em; }
.g-tablewrap .g-table { margin: 0; min-width: 520px; }

.g-steps { list-style: none; padding: 0 !important; counter-reset: s; display: grid; gap: 12px; margin: 0 0 1.4em; }
.g-steps li { counter-increment: s; position: relative; padding: 16px 18px 16px 62px; border: 1px solid var(--line); border-radius: 12px; margin: 0; background: #fff; }
.g-steps li::before { content: counter(s); position: absolute; left: 16px; top: 14px; width: 30px; height: 30px; border-radius: 9px; background: var(--navy); color: #fff; font-weight: 750; font-size: .9rem; display: grid; place-items: center; }
.g-steps li strong { display: block; color: var(--ink); }

.g-chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 1.4em; padding: 0; list-style: none; }
.g-chips li { margin: 0; font-size: .9rem; background: var(--bg-soft); border: 1px solid var(--line); border-radius: 99px; padding: 6px 12px; color: var(--ink); font-weight: 550; }
.g-chips.neg li { background: #fef2f2; border-color: #fecaca; color: var(--red); }

.g-cards { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin: 0 0 1.4em; }
@media (max-width: 640px) { .g-cards { grid-template-columns: 1fr; } }
.g-card { border: 1px solid var(--line); border-radius: 14px; padding: 18px 20px; background: #fff; }
.g-card h3 { margin: 0 0 6px; font-size: 1.04rem; }
.g-card p { margin: 0; font-size: .96rem; }
.g-card .tag { display: inline-block; font-size: .72rem; font-weight: 750; letter-spacing: .06em; text-transform: uppercase; border-radius: 99px; padding: 3px 9px; margin-bottom: 10px; }
.g-card .tag.good { background: var(--green-soft); color: var(--green); }
.g-card .tag.bad { background: #fef2f2; color: var(--red); }
.g-card .tag.mid { background: var(--accent-soft); color: var(--accent-2); }

.g-callout { display: flex; gap: 14px; background: var(--accent-soft); border: 1px solid #fed7aa; border-radius: 14px; padding: 18px 20px; margin: 0 0 1.4em; }
.g-callout svg { width: 22px; height: 22px; color: var(--accent-2); flex: none; margin-top: 2px; }
.g-callout p { margin: 0; color: var(--ink); }

.g-math { background: var(--navy); color: #cbd5e1; border-radius: 14px; padding: 20px 22px; margin: 0 0 1.4em; font-size: .98rem; }
.g-math .row { display: flex; justify-content: space-between; gap: 16px; padding: 8px 0; border-bottom: 1px solid rgba(255,255,255,.08); }
.g-math .row:last-child { border-bottom: 0; }
.g-math .row b { color: #fff; }
.g-math .row.total b { color: #fdba74; font-size: 1.1rem; }

/* mid-article CTA */
.g-band { margin: 56px 0; border-radius: 18px; padding: 30px; background: linear-gradient(135deg, #0b1b33, #17325a); color: #cbd5e1; display: grid; grid-template-columns: 1fr auto; gap: 20px; align-items: center; }
@media (max-width: 640px) { .g-band { grid-template-columns: 1fr; padding: 24px; } }
.g-band b { display: block; color: #fff; font-size: 1.25rem; letter-spacing: -.02em; margin-bottom: 4px; }
.g-band p { margin: 0; color: #94a3b8; font-size: .97rem; }

/* faq, author, terms */
.g-faq details:first-of-type { border-top: 1px solid var(--line); }
.g-author { display: flex; gap: 18px; align-items: flex-start; border: 1px solid var(--line); border-radius: 16px; padding: 22px; margin-top: 56px; background: var(--bg-soft); }
.g-author .avatar { width: 54px; height: 54px; font-size: 1.3rem; }
.g-author b { display: block; color: var(--ink); font-size: 1.05rem; }
.g-author .role { display: block; color: var(--accent-2); font-size: .85rem; font-weight: 650; margin-bottom: 8px; }
.g-author p { margin: 0; font-size: .96rem; }
.g-terms { margin-top: 28px; border: 1px solid var(--line); border-radius: 16px; padding: 22px 24px; }
.g-terms h2 { font-size: 1.1rem !important; margin-bottom: 14px !important; }
.g-terms dl { margin: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 14px 28px; }
@media (max-width: 640px) { .g-terms dl { grid-template-columns: 1fr; } }
.g-terms dt { font-weight: 700; color: var(--ink); font-size: .95rem; }
.g-terms dd { margin: 2px 0 0; color: var(--muted); font-size: .92rem; line-height: 1.5; }
.g-updated { margin-top: 22px; font-size: .85rem; color: var(--muted); }

/* related + hub cards */
.r-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
@media (max-width: 900px) { .r-grid { grid-template-columns: 1fr; } }
.r-card { display: flex; flex-direction: column; text-decoration: none; background: #fff; border: 1px solid var(--line); border-radius: 16px; padding: 24px; box-shadow: var(--shadow-sm); transition: transform .15s, box-shadow .15s, border-color .15s; }
.r-card:hover { transform: translateY(-3px); box-shadow: var(--shadow); border-color: var(--line-2); }
.r-card .kind { font-size: .72rem; font-weight: 750; letter-spacing: .1em; text-transform: uppercase; color: var(--accent-2); margin-bottom: 10px; }
.r-card h3 { color: var(--ink); font-size: 1.12rem; margin-bottom: 8px; }
.r-card p { color: var(--muted); font-size: .95rem; margin: 0 0 18px; flex: 1; }
.r-card .go { color: var(--ink); font-weight: 650; font-size: .92rem; display: inline-flex; align-items: center; gap: 6px; }
.r-card .go svg { width: 16px; height: 16px; transition: transform .15s; }
.r-card:hover .go svg { transform: translateX(3px); }
.r-card.feature { grid-column: span 2; background: var(--navy); border-color: var(--navy); }
.r-card.feature h3, .r-card.feature .go { color: #fff; }
.r-card.feature p { color: #94a3b8; }
.r-card.feature .kind { color: #fdba74; }
@media (max-width: 900px) { .r-card.feature { grid-column: auto; } }

/* hub hero (shorter, no stats) */
.g-hero.hub { padding-bottom: 56px; }
.g-hero.hub .g-meta { margin-bottom: 0; }

/* footer columns */
.foot.cols { grid-template-columns: 1.3fr 1fr 1fr; }
@media (max-width: 860px) { .foot.cols { grid-template-columns: 1fr; } }
.foot-col h4 { color: #fff; font-size: .78rem; letter-spacing: .1em; text-transform: uppercase; margin: 0 0 14px; }
.foot-col ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }

/* fixes after visual review */
.g-toc { border-bottom: 1px solid var(--line); }
.g-toc summary { padding-right: 18px; }
.g-toc summary::after { content: none; position: static; width: auto; height: auto; margin: 0; background: none; border: 0; border-radius: 0; transform: none; }
@media (max-width: 980px) {
  .g-toc summary::after { content: "+"; font-size: 1.25rem; line-height: 1; color: var(--ink); }
  .g-toc[open] summary::after { content: "\2013"; transform: none; }
}
.g-body .g-chips { padding-left: 0; }
.g-tablewrap .g-table { min-width: 0; }
@media (max-width: 640px) {
  .g-meta .dot { display: none; }
  .g-meta { gap: 8px 16px; }
  .g-table th, .g-table td { padding: 11px 12px; }
}
.r-card.feature { grid-column: 1 / -1; }
.r-card.feature p { max-width: 60em; }
