/*
 * Per-page visual identities
 * Each document receives a category, a layout rhythm and its own color tokens.
 * Content and semantic order stay intact while repetitive templates feel distinct.
 */
body.page-identity {
  --page-accent: #9b3655;
  --page-accent-2: #d9a05b;
  --page-ink: #292429;
  --page-wash: #fff7f2;
  --page-soft: #f8eae9;
  --page-radius: 26px;
  --page-shadow: 0 22px 60px rgba(54, 38, 45, .11);
  color: var(--page-ink);
}

body.page-identity .subpage-hero,
body.page-identity .v19-hero { position: relative; overflow: hidden; background: var(--page-wash); }
body.page-identity .subpage-hero::before,
body.page-identity .v19-hero::before {
  content: ""; position: absolute; width: 34rem; height: 34rem; border-radius: 50%;
  right: -12rem; top: -18rem; background: var(--page-accent); opacity: .09; pointer-events: none;
}
body.page-identity .subpage-hero::after,
body.page-identity .v19-hero::after {
  content: ""; position: absolute; width: 18rem; height: 18rem; left: -9rem; bottom: -11rem;
  background: var(--page-accent-2); opacity: .09; transform: rotate(28deg); pointer-events: none;
}
body.page-identity .hero-mini,
body.page-identity .v19-hero .container { position: relative; z-index: 1; }
body.page-identity .eyebrow,
body.page-identity .v19-kicker,
body.page-identity .sp-kicker,
body.page-identity .section-title > span { color: var(--page-accent); }
body.page-identity .btn:not(.btn-light),
body.page-identity .cta-btn,
body.page-identity .cta-phone { background: var(--page-accent); border-color: var(--page-accent); }
body.page-identity .page-preview-frame,
body.page-identity .sp-photo { border-radius: var(--page-radius); box-shadow: var(--page-shadow); }
body.page-identity .page-preview-frame { border: 1px solid color-mix(in srgb, var(--page-accent) 22%, white); }
body.page-identity .seo-toc { border-color: color-mix(in srgb, var(--page-accent) 25%, white); background: color-mix(in srgb, var(--page-wash) 82%, white); }
body.page-identity .seo-toc a:hover,
body.page-identity .seo-breadcrumb a:hover { color: var(--page-accent); }
body.page-identity .info-card,
body.page-identity .related-links-grid > a,
body.page-identity .v20-panel,
body.page-identity .v20-local-box,
body.page-identity .v20-topic-nav > a,
body.page-identity .v19-card { border-radius: var(--page-radius); }
body.page-identity .info-card:first-child { border-top: 4px solid var(--page-accent); }
body.page-identity .related-links-grid > a:hover,
body.page-identity .v20-topic-nav > a:hover { border-color: var(--page-accent); box-shadow: 0 12px 34px color-mix(in srgb, var(--page-accent) 15%, transparent); }
body.page-identity .sub-links:nth-of-type(even),
body.page-identity .sp-editorial.alt,
body.page-identity .v19-section.soft { background: var(--page-soft) !important; }
body.page-identity .cta-section { background: linear-gradient(125deg, var(--page-ink), color-mix(in srgb, var(--page-ink) 72%, var(--page-accent))); }

/* Local guides: tactile, place-led editorial pages. */
body.page-cat-local .subpage-hero { border-bottom: 1px solid color-mix(in srgb, var(--page-accent) 22%, white); }
body.page-cat-local .hero-mini-copy h1 { max-width: 12ch; }
body.page-cat-local .page-preview-frame img { aspect-ratio: 4 / 3; object-fit: cover; }
body.page-cat-local .related-links-grid > a { border-left: 5px solid var(--page-accent); }

/* City × country pages: cinematic, image-first. */
body.page-cat-pair .subpage-hero { padding-bottom: 0; }
body.page-cat-pair .hero-mini { align-items: end; }
body.page-cat-pair .page-preview-frame { border-radius: var(--page-radius) var(--page-radius) 0 0; box-shadow: none; }
body.page-cat-pair .page-preview-frame img { aspect-ratio: 16 / 10; object-fit: cover; }
body.page-cat-pair .preview-caption { background: var(--page-ink); color: #fff; border-radius: 0 0 14px 14px; }
body.page-cat-pair .sub-intro .sub-grid { align-items: stretch; }

/* Practical guides: clean reference-manual treatment. */
body.page-cat-guide .subpage-hero,
body.page-cat-guide .v19-hero { background: #fff; border-bottom: 6px solid var(--page-accent); }
body.page-cat-guide .hero-mini { grid-template-columns: 1.25fr .75fr; }
body.page-cat-guide .hero-mini-copy h1 { font-size: clamp(36px, 5vw, 68px); }
body.page-cat-guide .page-preview-frame { transform: rotate(1.5deg); }
body.page-cat-guide .info-card { box-shadow: none; border: 1px solid color-mix(in srgb, var(--page-accent) 20%, #ddd); }
body.page-cat-guide .seo-depth { background-image: linear-gradient(color-mix(in srgb, var(--page-accent) 5%, white) 1px, transparent 1px); background-size: 100% 32px; }

/* Country stories: warm, magazine-like. */
body.page-cat-country .v19-hero,
body.page-cat-country .subpage-hero { background: linear-gradient(135deg, var(--page-wash), var(--page-soft)); }
body.page-cat-country .v19-hero h1,
body.page-cat-country .hero-mini-copy h1 { font-family: Georgia, "Noto Serif KR", serif; font-weight: 700; }
body.page-cat-country .v19-section:nth-of-type(odd) .container { border-left: 3px solid var(--page-accent-2); padding-left: clamp(20px, 4vw, 54px); }

/* Directory/index pages: denser navigation dashboard. */
body.page-cat-hub .subpage-hero { background: var(--page-ink); color: #fff; }
body.page-cat-hub .subpage-hero h1,
body.page-cat-hub .subpage-hero p { color: #fff; }
body.page-cat-hub .subpage-hero::before { opacity: .3; }
body.page-cat-hub .related-links-grid { gap: 8px; }
body.page-cat-hub .related-links-grid > a { border-radius: 10px; box-shadow: none; }

/* Policy/support pages: restrained document treatment. */
body.page-cat-support .subpage-hero { background: #f4f5f7; }
body.page-cat-support .page-preview-frame { border-radius: 8px; box-shadow: 12px 12px 0 var(--page-soft); }
body.page-cat-support .v20-legal,
body.page-cat-support .seo-accordion-body { max-width: 850px; margin-inline: auto; }

/* Six rhythms make sibling pages recognisably different, beyond palette changes. */
body.page-layout-1 { --page-radius: 8px; }
body.page-layout-1 .hero-mini { grid-template-columns: 1.15fr .85fr; }
body.page-layout-1 .related-links-grid { grid-template-columns: repeat(2, 1fr); }

body.page-layout-2 { --page-radius: 34px 8px 34px 8px; }
body.page-layout-2 .hero-mini { grid-template-columns: .86fr 1.14fr; }
body.page-layout-2 .page-preview-frame { transform: translateY(24px); }
body.page-layout-2 .sub-grid > :nth-child(2) { transform: translateY(20px); }

body.page-layout-3 { --page-radius: 999px 999px 24px 24px; }
body.page-layout-3 .page-preview-frame img { aspect-ratio: 1 / 1; object-fit: cover; }
body.page-layout-3 .hero-mini-copy { padding-left: clamp(18px, 4vw, 58px); border-left: 4px solid var(--page-accent); }
body.page-layout-3 .related-links-grid > a { border-radius: 999px; text-align: center; }

body.page-layout-4 { --page-radius: 0; }
body.page-layout-4 .subpage-hero { border-top: 10px solid var(--page-accent); }
body.page-layout-4 .hero-mini { grid-template-columns: 1fr 1fr; }
body.page-layout-4 .page-preview-frame { box-shadow: 18px 18px 0 var(--page-accent-2); margin-bottom: 18px; }
body.page-layout-4 .related-links-grid > a { border-bottom: 3px solid var(--page-accent); }

body.page-layout-5 { --page-radius: 18px 54px 18px 54px; }
body.page-layout-5 .hero-mini { grid-template-columns: .95fr 1.05fr; }
body.page-layout-5 .page-preview-frame { transform: rotate(-1.2deg); }
body.page-layout-5 .info-card:nth-child(2) { background: var(--page-ink); color: #fff; }
body.page-layout-5 .info-card:nth-child(2) h2,
body.page-layout-5 .info-card:nth-child(2) li { color: #fff; }

body.page-layout-6 { --page-radius: 22px; }
body.page-layout-6 .subpage-hero { text-align: center; }
body.page-layout-6 .hero-mini { display: flex; flex-direction: column; }
body.page-layout-6 .hero-mini-copy { max-width: 850px; margin-inline: auto; }
body.page-layout-6 .subpage-hero-visual { width: min(100%, 960px); margin-inline: auto; }
body.page-layout-6 .page-preview-frame img { max-height: 460px; object-fit: cover; }
body.page-layout-6 .mini-links { justify-content: center; }

@media (max-width: 760px) {
  body.page-identity .hero-mini,
  body.page-cat-guide .hero-mini,
  body.page-layout-1 .hero-mini,
  body.page-layout-2 .hero-mini,
  body.page-layout-4 .hero-mini,
  body.page-layout-5 .hero-mini { grid-template-columns: 1fr; }
  body.page-identity .hero-mini-copy h1 { max-width: none; font-size: clamp(31px, 10vw, 46px); }
  body.page-layout-2 .page-preview-frame,
  body.page-layout-2 .sub-grid > :nth-child(2),
  body.page-cat-guide .page-preview-frame,
  body.page-layout-5 .page-preview-frame { transform: none; }
  body.page-layout-3 .page-preview-frame { max-width: 420px; margin-inline: auto; }
  body.page-layout-1 .related-links-grid { grid-template-columns: 1fr; }
  body.page-cat-pair .subpage-hero { padding-bottom: 28px; }
}

/* Page-specific field notes use long-form copy instead of repeated card templates. */
.deep-editorial { padding: clamp(64px, 9vw, 112px) 0; background: color-mix(in srgb, var(--page-wash) 60%, #fff); }
.deep-editorial-grid { display: grid; grid-template-columns: minmax(0, 1.08fr) minmax(300px, .92fr); gap: clamp(30px, 6vw, 76px); align-items: start; }
.deep-editorial-copy > span { color: var(--page-accent); font-size: 11px; font-weight: 900; letter-spacing: .18em; }
.deep-editorial-copy > h2 { margin: 12px 0 30px; max-width: 17ch; font-size: clamp(30px, 4.2vw, 52px); line-height: 1.16; letter-spacing: -.04em; }
.deep-editorial-copy article { padding: 21px 0; border-top: 1px solid color-mix(in srgb, var(--page-accent) 24%, #ddd); }
.deep-editorial-copy h3 { margin: 0 0 8px; color: var(--page-accent); font-size: 15px; }
.deep-editorial-copy p { margin: 0; color: #5f585c; line-height: 1.9; }
.deep-editorial figure { position: sticky; top: 110px; margin: 0; }
.deep-editorial img { display: block; width: 100%; aspect-ratio: 3 / 2; object-fit: cover; border-radius: var(--page-radius); box-shadow: var(--page-shadow); }
.deep-editorial figcaption { padding: 12px 4px; color: #70686d; font-size: 12px; }
@media (max-width: 760px) {
  .deep-editorial-grid { grid-template-columns: 1fr; }
  .deep-editorial figure { position: static; order: -1; }
}

.region-workbook { padding: clamp(58px, 8vw, 96px) 0; background: #fff; }
.region-workbook-inner { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(300px, .75fr); gap: clamp(28px, 6vw, 72px); align-items: end; }
.region-workbook-head > span { color: var(--page-accent); font-size: 11px; font-weight: 900; letter-spacing: .16em; }
.region-workbook-head h2 { margin: 12px 0 18px; max-width: 20ch; font-size: clamp(28px, 4vw, 48px); line-height: 1.18; letter-spacing: -.035em; }
.region-workbook-head p { max-width: 760px; margin: 0; color: #625b60; line-height: 1.9; }
.region-workbook-steps { display: grid; gap: 10px; }
.region-workbook-steps article { padding: 21px; border-left: 4px solid var(--page-accent); background: var(--page-wash); }
.region-workbook-steps b { color: var(--page-accent); font-size: 11px; }
.region-workbook-steps h3 { margin: 5px 0 8px; font-size: 17px; }
.region-workbook-steps p { margin: 0; color: #6a6267; font-size: 14px; line-height: 1.75; }
@media (max-width: 760px) { .region-workbook-inner { grid-template-columns: 1fr; } }

.pair-decision-map { padding: clamp(62px, 9vw, 108px) 0; background: var(--page-ink); color: #fff; }
.pair-decision-title { display: grid; grid-template-columns: .8fr 1.35fr; gap: 12px 40px; align-items: end; }
.pair-decision-title > span { grid-column: 1/-1; color: var(--page-accent-2); font-size: 11px; font-weight: 900; letter-spacing: .18em; }
.pair-decision-title h2 { margin: 0; font-size: clamp(30px, 4.5vw, 54px); line-height: 1.14; letter-spacing: -.04em; color: #fff; }
.pair-decision-title p { margin: 0; color: #d9d3d6; line-height: 1.9; }
.pair-decision-grid { display: grid; grid-template-columns: repeat(3,1fr); gap: 1px; margin-top: 44px; background: rgba(255,255,255,.16); }
.pair-decision-grid article { padding: clamp(22px, 3vw, 34px); background: var(--page-ink); }
.pair-decision-grid small { color: var(--page-accent-2); font-weight: 900; letter-spacing: .14em; }
.pair-decision-grid h3 { margin: 14px 0 11px; color: #fff; font-size: 20px; }
.pair-decision-grid p { margin: 0; color: #cec7cb; font-size: 14px; line-height: 1.85; }
@media (max-width:760px) { .pair-decision-title { grid-template-columns:1fr; } .pair-decision-grid { grid-template-columns:1fr; } }

/* Branch addresses live inside the existing footer navigation area. */
.footer-grid { grid-template-columns: 1.55fr repeat(5, minmax(0,1fr)); gap: 24px; }
.footer-grid .footer-offices { min-width: 190px; }
.footer-grid.footer-grid-offices-only { grid-template-columns: 1fr; }
.footer-grid.footer-grid-offices-only .footer-offices { display: grid; grid-template-columns: repeat(3,1fr); gap: 18px; }
.footer-grid.footer-grid-offices-only .footer-offices h4 { grid-column: 1 / -1; }
.footer-grid .footer-office { display: block; margin: 0 0 12px !important; color: inherit; }
.footer-grid .footer-office strong { display: block; margin-bottom: 3px; color: var(--page-accent, #ef4f7c); font-size: 12px; }
.footer-grid .footer-office address { margin: 0; color: #8a8284; font-size: 11px; font-style: normal; line-height: 1.55; word-break: keep-all; }
.footer-grid .footer-office:hover address { color: #4f474a; }
@media (max-width: 1180px) {
  .footer-grid { grid-template-columns: 1.5fr repeat(3,1fr); }
  .footer-grid .footer-offices { grid-column: span 2; display: grid; grid-template-columns: repeat(3,1fr); gap: 12px; }
  .footer-grid .footer-offices h4 { grid-column: 1 / -1; }
}
@media (max-width: 700px) {
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .footer-grid .footer-offices { grid-column: 1 / -1; grid-template-columns: 1fr; gap: 0; }
  .footer-grid .footer-office { padding: 9px 0; border-bottom: 1px solid #eee7e9; }
}

/* Page-specific editorial notes added to reduce templated content repetition. */
.page-unique-notes { padding: clamp(58px, 8vw, 96px) 0; background: #fff; }
.unique-notes-head { max-width: 780px; margin-bottom: 32px; }
.unique-notes-head > span { display: block; margin-bottom: 10px; color: var(--page-accent); font-size: 11px; font-weight: 900; letter-spacing: .18em; }
.unique-notes-head h2 { margin: 0 0 14px; color: var(--page-ink); font-size: clamp(28px, 4vw, 46px); line-height: 1.18; letter-spacing: -.035em; }
.unique-notes-head p { margin: 0; color: #696168; line-height: 1.9; }
.unique-notes-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.unique-notes-grid article { min-height: 210px; padding: 26px; border: 1px solid color-mix(in srgb, var(--page-accent) 20%, #e6e1e3); border-radius: var(--page-radius); background: linear-gradient(145deg, #fff, var(--page-wash)); }
.unique-notes-grid b { display: inline-grid; width: 38px; height: 38px; place-items: center; border-radius: 50%; background: var(--page-accent); color: #fff; font-size: 11px; }
.unique-notes-grid h3 { margin: 22px 0 10px; color: var(--page-ink); font-size: 19px; }
.unique-notes-grid p { margin: 0; color: #6d656a; font-size: 14px; line-height: 1.75; }
.page-layout-2 .unique-notes-grid article:nth-child(2),
.page-layout-5 .unique-notes-grid article:nth-child(2) { transform: translateY(22px); }
.page-layout-4 .unique-notes-grid { gap: 0; border-top: 1px solid var(--page-accent); border-bottom: 1px solid var(--page-accent); }
.page-layout-4 .unique-notes-grid article { border-width: 0 1px 0 0; }
.page-layout-6 .unique-notes-head { margin-inline: auto; text-align: center; }
@media (max-width: 760px) {
  .unique-notes-grid { grid-template-columns: 1fr; }
  .unique-notes-grid article { min-height: 0; }
  .page-layout-2 .unique-notes-grid article:nth-child(2),
  .page-layout-5 .unique-notes-grid article:nth-child(2) { transform: none; }
}
