/* Theme overrides for Departures templates (.dep). Loaded after departures-pages.css (generated from the
   prototype), so these rules win at equal specificity. */

/* ---------------------------------------------------------------- Departures templates (.dep, see inc/departures.php) */
.rg-dep .site.grid-container,
.rg-dep .site-content {
	max-width: none;
	margin: 0;
	padding: 0;
	display: block;
}
.dep .loc__name[data-len="long"] { font-size: clamp(64px, 10vw, 150px); }
.dep .loc__name[data-len="xlong"] { font-size: clamp(48px, 7.2vw, 112px); line-height: 0.86; }

/* WordPress figures (rg_core_figure) in the prototype's photo style. */
.dep .khero .rg-figure { margin: 0; }
.dep .khero .rg-figure img { width: 100%; aspect-ratio: 21 / 9; object-fit: cover; }
.dep .rg-figure { margin: 28px 0; }
.dep .rg-figure img { width: 100%; height: auto; }
.dep .rg-figure figcaption { padding-top: 8px; font-size: 12px; line-height: 1.4; color: var(--muted); }
.dep .rg-figure figcaption .rg-figure__caption { display: block; color: var(--ink-2); font-size: 13px; }
.dep .prose table { width: 100%; border-collapse: collapse; margin: 1.4em 0; font-size: 15px; }
.dep .prose th, .dep .prose td { text-align: left; padding: 10px 12px 10px 0; border-bottom: 1px solid var(--hair); vertical-align: top; }
.dep .prose thead th { border-bottom: var(--rule) solid var(--ink); font-size: 12px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }

/* Travel advisory: a platform notice. */
.dep .notice {
	margin-top: 24px;
	padding: 16px 18px;
	background: #fff6cf;
	border: var(--rule) solid var(--ink);
}
.dep .notice__h { font-weight: 800; display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-bottom: 8px; }
.dep .notice p + p { margin-top: 8px; }
.dep .dep-note { margin-top: 40px; font-size: 14px; color: var(--muted); }
@media (max-width: 767px) {
	.dep .khero .rg-figure img { aspect-ratio: 4 / 3; }
}
/* Facts without a short form yet: the full sentence at reading size, not the giant fact type. */
.dep .fact__fallback { display: block; font-size: 17px; font-weight: 600; font-stretch: 100%; line-height: 1.35; text-transform: none; letter-spacing: 0; }
.dep .fact:has(.fact__fallback) .fact__long { display: none; }

/* Departures boards: place type in the code column (real types, not invented codes). */
.dep .pcode--type { min-width: 0; font-size: 12px; letter-spacing: .04em; padding: 6px 7px 5px; font-stretch: var(--w-semi); }
.dep .c-days__u { font-size: 13px; color: var(--board-muted); }
.dep .c-img__img { width: 100%; aspect-ratio: 3 / 2; object-fit: cover; }

/* Essentials: a black board of label/value rows (country pages). */
.dep .ess { background: var(--board); color: var(--board-text); padding-block: clamp(32px, 5vw, 56px); margin-top: clamp(32px, 5vw, 56px); }
.dep .ess__h { color: var(--yellow); font-weight: 900; font-stretch: var(--w-cond); text-transform: uppercase; font-size: clamp(40px, 6vw, 88px); line-height: .82; padding-bottom: 14px; border-bottom: var(--rule) solid var(--yellow); }
.dep .ess__grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0 32px; }
.dep .ess__row { padding: 16px 0; border-bottom: 1px solid var(--board-hair); }
.dep .ess__row dt { font-size: 11px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--board-muted); }
.dep .ess__row dd { margin-top: 6px; font-size: 16px; line-height: 1.45; }
.dep .ess__note { margin-top: 18px; font-size: 13px; color: var(--board-muted); max-width: 90ch; }
@media (max-width: 1023px) { .dep .ess__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 560px) { .dep .ess__grid { grid-template-columns: 1fr; } }
.dep .board--compact .board__table td { padding-block: 12px; vertical-align: middle; }
.dep .board--compact .c-dest__name { font-size: clamp(26px, 2.8vw, 40px); }
/* Compact rows have no visible "Learn more": the link stays in the DOM and its stretched ::after makes the whole row the target. */
.dep .board--compact .board__table tbody tr { position: relative; }
.dep .board--compact .c-dest { position: static; }
.dep .board--compact .c-dest .more { display: block; width: 0; height: 0; margin: 0; padding: 0; border: 0; font-size: 0; line-height: 0; }
.dep .board--compact .c-dest .stretch::after { inset: 0; }
.dep .board--compact .c-dest .more:focus-visible { outline: 0; box-shadow: none; }
.dep .board--compact .c-dest .more:focus-visible::after { outline: 3px solid var(--yellow); outline-offset: -3px; }
.dep .board--compact .board__table tbody tr:hover .c-dest__name { color: var(--yellow); }

/* Region pages */
.dep .loc__code--region { background: var(--rc); color: var(--rc-on); }
.dep .loc__code--region .loc__codetop { color: var(--rc-on); }
.dep .loc__sub.prose p + p { margin-top: .6em; }
.dep .board__group th { padding: 22px 0 8px; text-align: left; font-size: 12px; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; color: var(--yellow); border-bottom: 1px solid var(--board-text); }
.dep .c-days__text { font-weight: 800; font-stretch: var(--w-semi); font-size: 18px; white-space: nowrap; }
.dep .rcard__name--sm { font-size: clamp(22px, 2.2vw, 30px); line-height: 1; text-transform: none; font-stretch: var(--w-semi); }

/* Stats: never break a number across lines (live counts can be wider than the prototype's). */
.dep .stat__v { white-space: nowrap; }
@media (max-width: 560px) {
	.dep .stat__v { font-size: clamp(30px, 9vw, 48px); }
}

/* Articles and travel tips: long titles, so large condensed sentence case instead of giant capitals. */
.dep .art { padding-top: 28px; padding-bottom: 28px; border-bottom: var(--rule) solid var(--ink); }
.dep .art__kicker { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-bottom: 18px; }
.dep .art__h1 { font-weight: 900; font-stretch: var(--w-cond); font-size: clamp(40px, 6.4vw, 96px); line-height: .92; letter-spacing: -.01em; max-width: 20ch; text-wrap: balance; }
.dep .art__sub { margin-top: 16px; font-size: clamp(18px, 1.6vw, 22px); max-width: 52ch; color: var(--ink-2); }
.dep .art .byline { margin-top: 18px; }
.dep .art__guides { display: flex; flex-wrap: wrap; gap: 6px 18px; align-items: baseline; margin-top: 14px; font-size: 13px; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; }
.dep .art__guides .more { letter-spacing: normal; text-transform: none; font-size: 16px; }
.dep .qa__cost { margin-top: 10px; font-weight: 600; }
.dep .qa__label { overflow-wrap: normal; word-break: normal; hyphens: none; font-size: clamp(28px, 2.8vw, 40px); }
.dep .ksec--intro { padding-top: 0; border-top: 0; }

/* Index pages (countries, places, articles, tips, regions): header, jump list, pager. */
.dep .idx { padding-block: clamp(28px, 4vw, 56px) clamp(24px, 3vw, 40px); }
.dep .idx__h1 { margin-top: 18px; font-weight: 900; font-stretch: var(--w-cond); text-transform: uppercase; font-size: clamp(56px, 9vw, 150px); line-height: .82; letter-spacing: -.01em; max-width: 14ch; overflow-wrap: anywhere; }
.dep .idx__lede { margin-top: 20px; font-size: clamp(18px, 1.6vw, 22px); line-height: 1.4; max-width: 52ch; }
.dep .idx .stats { max-width: 760px; }
.dep .jump { margin-top: 32px; }
.dep .jump__l { font-size: 12px; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; margin-bottom: 10px; }
.dep .jump__list { display: flex; flex-wrap: wrap; gap: 8px; list-style: none; margin: 0; padding: 0; }
.dep .jump__a { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 6px 12px; border: 2px solid var(--ink); background: var(--paper); color: var(--ink); font-weight: 700; text-decoration: none; }
.dep .jump__a:hover, .dep .jump__a:focus-visible { background: var(--yellow); }
.dep .jump__code { font-weight: 800; font-stretch: var(--w-wide); font-size: 13px; letter-spacing: .02em; background: var(--rc); color: var(--rc-on); padding: 3px 5px 2px; }
.dep .jump__n { font-weight: 800; font-stretch: var(--w-semi); font-variant-numeric: tabular-nums; color: var(--muted); }
.dep .board__group[id], .dep .idx-grid[id] { scroll-margin-top: 90px; }
.dep .idx-grid { padding-block: clamp(24px, 3vw, 48px); }
.dep .idx-grid + .idx-grid { border-top: var(--rule) solid var(--ink); }
.dep .pager { padding-block: 8px 56px; }
.dep .pager ul { display: flex; flex-wrap: wrap; gap: 6px; list-style: none; margin: 0; padding: 0; }
.dep .pager li > .page-numbers { display: inline-grid; place-items: center; min-width: 44px; min-height: 44px; padding: 0 10px; border: 2px solid var(--ink); background: var(--paper); color: var(--ink); font-weight: 800; font-stretch: var(--w-semi); font-variant-numeric: tabular-nums; text-decoration: none; }
.dep .pager a.page-numbers:hover, .dep .pager a.page-numbers:focus-visible { background: var(--yellow); }
.dep .pager li > .page-numbers.current { background: var(--ink); color: var(--paper); }
.dep .pager li > .page-numbers.dots { border-color: transparent; background: transparent; }

/* Card labels that are words (Article, Tip, City), not three-letter codes. */
.dep .rcard__code--label { font-size: 13px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; padding: 5px 7px 4px; }

/* Board on small screens: the stacked-row rule (td display block) outranked the prototype's hide rules. */
@media (max-width: 1023px) {
	.dep .board__table td.c-img, .dep .board__table th.c-img { display: none; }
}
@media (max-width: 767px) {
	.dep .board__table td.c-country, .dep .board__table td.c-region { display: none; }
}

/* Home hero fits the first screen: headline sized by width and height, landscape photo on the featured card. */
.dep .hero { padding-block: clamp(20px, 3vh, 40px) clamp(32px, 5vh, 64px); }
.dep .hero__h1 { margin-top: 14px; font-size: clamp(52px, min(7.4vw, 11.5vh), 132px); }
.dep .hero__lede { margin-top: 18px; max-width: 40ch; }
.dep .hero__ctas { margin-top: 20px; }
.dep .hero .stats { margin-top: 28px; }
.dep .feat .ph--4x5 { aspect-ratio: 4 / 3; }
.dep .feat__title { font-size: clamp(40px, 4vw, 56px); }

/* Persona monogram plates (no generated faces). Tones: yellow, red, ink; paper for the human editor. */
.dep .plate { --pc: var(--yellow); --pc-on: var(--ink); display: grid; grid-template-columns: auto minmax(0, 1fr); background: var(--paper); }
.dep .plate--red { --pc: var(--red); --pc-on: #fff; }
.dep .plate--ink { --pc: var(--ink); --pc-on: var(--paper); }
.dep .plate--paper { --pc: var(--paper); --pc-on: var(--ink); }
.dep .plate__mono { display: grid; place-items: center; aspect-ratio: 1; background: var(--pc); color: var(--pc-on); font-weight: 900; font-stretch: var(--w-cond); line-height: 1; }
.dep .plate--paper .plate__mono { box-shadow: inset 0 0 0 var(--rule) var(--ink); }
.dep .plate--lg { border-bottom: var(--rule) solid var(--ink); }
.dep .plate--lg .plate__mono { width: 132px; font-size: 120px; }
.dep .plate__side { display: flex; flex-direction: column; justify-content: space-between; gap: 6px; padding: 12px 14px; }
.dep .plate__code { font-weight: 900; font-stretch: var(--w-wide); font-size: 22px; letter-spacing: .02em; line-height: 1; }
.dep .plate__lbl { font-size: 12px; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
.dep .plate--sm { display: block; border-right: var(--rule) solid var(--ink); }
.dep .plate--sm .plate__mono { width: 100%; height: 100%; aspect-ratio: auto; font-size: 88px; }
@media (max-width: 560px) {
	.dep .plate--sm { border-right: 0; border-bottom: var(--rule) solid var(--ink); }
	.dep .plate--sm .plate__mono { font-size: 64px; padding-block: 8px; }
}

/* Who we are: editor block, steps, agent cards. */
.dep .team-editor { display: grid; grid-template-columns: minmax(240px, 320px) minmax(0, 1fr); border: var(--rule) solid var(--ink); background: var(--paper); margin-block: 8px clamp(24px, 3vw, 48px); }
.dep .team-editor .plate { align-self: start; border-bottom: 0; border-right: var(--rule) solid var(--ink); height: 100%; align-content: start; }
.dep .team-editor__body { padding: 18px 22px 22px; display: flex; flex-direction: column; gap: 10px; max-width: 70ch; }
.dep .team-editor__name, .dep .pcard__name { font-weight: 900; font-stretch: var(--w-cond); text-transform: uppercase; font-size: clamp(40px, 4vw, 56px); line-height: .85; }
@media (max-width: 760px) {
	.dep .team-editor { grid-template-columns: minmax(0, 1fr); }
	.dep .team-editor .plate { border-right: 0; border-bottom: var(--rule) solid var(--ink); }
}
.dep .steps { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0; list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--ink); border-left: 1px solid var(--ink); }
.dep .steps--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.dep .step { padding: 18px 20px 22px; border-right: 1px solid var(--ink); border-bottom: 1px solid var(--ink); background: var(--paper); display: flex; flex-direction: column; gap: 8px; }
.dep .step__n { font-weight: 900; font-stretch: var(--w-semi); font-size: 40px; line-height: .9; color: var(--red); }
.dep .step__h { font-weight: 900; font-stretch: var(--w-cond); text-transform: uppercase; font-size: 30px; line-height: .9; }
@media (max-width: 860px) { .dep .steps, .dep .steps--2 { grid-template-columns: minmax(0, 1fr); } }
.dep .dep-limits { margin-top: 24px; max-width: 80ch; }
.dep .dep-limits p + p { margin-top: .6em; }
.dep .pgrid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); border-top: 1px solid var(--ink); border-left: 1px solid var(--ink); }
@media (max-width: 1023px) { .dep .pgrid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 640px) { .dep .pgrid { grid-template-columns: minmax(0, 1fr); } }
.dep .pcard { display: flex; flex-direction: column; border-right: 1px solid var(--ink); border-bottom: 1px solid var(--ink); background: var(--paper); min-width: 0; }
.dep .pcard__body { display: flex; flex-direction: column; gap: 10px; padding: 16px 18px 20px; flex: 1; }
.dep .pcard__text { color: var(--ink-2); }
.dep .pcard__list { list-style: none; margin: 0; padding: 10px 0 0; border-top: 1px solid var(--hair); display: grid; gap: 6px; font-size: 15px; }
.dep .pcard__list a { color: var(--ink); text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 3px; }
.dep .pcard__meta { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-top: auto; padding-top: 10px; border-top: 1px solid var(--hair); font-size: 13px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; }

/* Author pages */
.dep .author-head { display: grid; grid-template-columns: minmax(240px, 320px) minmax(0, 1fr); gap: clamp(20px, 3vw, 40px); align-items: end; padding-block: clamp(24px, 3vw, 48px); }
.dep .author-head .plate { border: var(--rule) solid var(--ink); }
.dep .author-head .idx__h1 { margin-top: 10px; }
.dep .author-bio { display: grid; grid-template-columns: minmax(0, 3fr) minmax(0, 2fr); gap: clamp(20px, 3vw, 48px); align-items: start; padding-bottom: clamp(24px, 3vw, 40px); }
.dep .author-bio .prose p + p { margin-top: .8em; }
@media (max-width: 760px) { .dep .author-head, .dep .author-bio { grid-template-columns: minmax(0, 1fr); } }
.dep .dep-box { border: var(--rule) solid var(--ink); background: var(--paper); padding: 16px 18px 18px; box-shadow: 6px 6px 0 var(--yellow); }
.dep .dep-box p + p { margin-top: .6em; }
.dep .sec-head__n { white-space: nowrap; }

/* Travel AI hub */
.dep .ai-status { margin-bottom: clamp(24px, 3vw, 40px); }
.dep .ai-status .step__h a { color: inherit; text-decoration: none; }
.dep .ai-status .step__h a:hover { text-decoration: underline; }
.dep .ai-copy { max-width: 70ch; }
.dep .ai-copy p + p { margin-top: .8em; }
.dep .ai-sub { margin-top: 32px; margin-bottom: 10px; }
.dep .ai-tools { margin: 14px 0 0; border-top: 1px solid var(--ink); }
.dep .ai-tools__row { display: grid; grid-template-columns: minmax(180px, 260px) minmax(0, 1fr); gap: 4px 20px; padding: 12px 0; border-bottom: 1px solid var(--hair); }
.dep .ai-tools dt code { font-weight: 700; font-size: 15px; overflow-wrap: anywhere; }
.dep .ai-tools dd { margin: 0; }
@media (max-width: 640px) { .dep .ai-tools__row { grid-template-columns: minmax(0, 1fr); } }
.dep .ai-note { margin-top: 24px; max-width: 70ch; }
.dep .ai-prompts { margin: 0; padding-left: 1.2em; max-width: 70ch; display: grid; gap: 6px; }

/* Plain pages (About, legal), 404 and search */
.dep-page .idx__h1 { font-size: clamp(48px, 7vw, 110px); max-width: 18ch; }
.dep .dep-page__body { padding-bottom: clamp(40px, 6vw, 80px); }
.dep .dep-page__body .prose h2 {
	margin-top: 2em; padding-top: 12px; border-top: var(--rule) solid var(--ink);
	font-weight: 900; font-stretch: var(--w-cond); text-transform: uppercase;
	font-size: clamp(30px, 3.4vw, 44px); line-height: .95; scroll-margin-top: 24px;
}
.dep .dep-page__body .prose h2 + * { margin-top: .7em; }
.dep .dep-page__body .prose a { text-decoration: underline; overflow-wrap: anywhere; }
.dep .dep-page__body .prose li + li { margin-top: .4em; }
.dep .dep-page__body .prose ol li + li { margin-top: 0; }
.dep .rg-search--page { display: grid; gap: 8px; max-width: 620px; }
.dep .rg-search--page label { font-size: 12px; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; }
.dep .rg-search__row { display: flex; }
.dep .rg-search--page input[type="search"], .dep .rg-search--page input[type="search"]:focus {
	flex: 1 1 auto; min-width: 0; width: auto; height: 52px; padding: 0 14px; font-size: 18px;
	background: var(--paper); color: var(--ink); border: var(--rule) solid var(--ink); border-right: 0; border-radius: 0;
}
.dep .rg-search--page button {
	flex: none; height: 52px; padding: 0 20px; border: var(--rule) solid var(--ink); border-radius: 0;
	background: var(--ink); color: var(--bg); font-weight: 800; letter-spacing: .08em; text-transform: uppercase; font-size: 14px; cursor: pointer;
}
.dep .rg-search--page button:hover, .dep .rg-search--page button:focus-visible { background: var(--red); border-color: var(--red); color: #fff; }
.dep-search .idx__h1 { text-transform: none; }
/* Numbered steps whose items mix a bold lead-in with text: the text must not become its own grid cell. */
.dep .dep-page__body .prose ol li { display: block; position: relative; padding-left: 64px; min-height: 58px; }
.dep .dep-page__body .prose ol li::before { position: absolute; left: 0; top: 14px; }
