/* ── Settling in (settling-in.njk; design reference 7a/7b) ────────────────────────────────────
   Full redesign, wide site-shell column like the About page above (not the .content-page 70ch
   reading width) — Renting / Places to work / Communities / Useful links, plus a collapsible
   Gangwon-do price-snapshot table (data: rentalMarketScan.js). Colours below map 1:1 onto
   existing tokens. Outbound/in-site link hover (DESIGN.md palette: Orange ink / Green deep) below. */

.settling-page {
  max-width: var(--content-max-width);
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  /* DESIGN.md Geometry: "Section gaps 26–36px" — top of that range. */
  gap: 36px;
}

/* Outbound-link colour + hover (Orange text / Orange ink) is now the global base.css
   a[target="_blank"] rule — every link on this page that leaves the site carries
   target="_blank" rel="noopener" (link-hover unification), so no page-scoped override is
   needed here any more. */

.settling-ko {
  font-family: var(--font-family-ko);
}

.settling-ko--medium {
  font-weight: 500;
}

.settling-nowrap {
  white-space: nowrap;
}

.settling-muted {
  color: var(--color-text-muted);
}

/* Hero — orange 56×3 rule → H1 → Korean subtitle → intro → last-updated caption. */
.settling-hero {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.settling-hero__rule {
  display: block;
  width: 56px;
  height: 3px;
  background: var(--color-accent-rule);
}

.settling-hero h1 {
  font-size: clamp(1.875rem, 1.52rem + 1.75vw, 2.625rem);
  letter-spacing: -0.028em;
  line-height: 1.12;
  margin: 8px 0 0;
  max-width: 20ch;
}

.settling-hero__ko {
  font-family: var(--font-family-ko);
  font-size: 17px;
  font-weight: 400;
  color: var(--color-text-muted);
}

.settling-hero__intro {
  font-size: 16px;
  line-height: 1.7;
  margin: 14px 0 0;
  max-width: 62ch;
  text-wrap: pretty;
}

.settling-hero__updated {
  font-size: 13px;
  color: var(--color-text-muted);
  margin-top: 10px;
}

/* Section-nav strip: shared .section-nav component (section-nav.css, section-nav.js) — same sticky sub-nav as visa-info, same 26px gap around
   it below 1024px (36px from 1024px, matching .visa-page's own gap breakpoint). .settling-page's
   own flex gap is a flat 36px at every width (its section-to-section rhythm, unrelated to this),
   so these two edges pull in below 1024px; flex-item margins add directly to the row gap rather
   than collapsing with it, unlike region-page.css's block-flow version of this same fix. */
@media (max-width: 1023.98px) {
  .settling-page > .section-nav {
    margin-top: -10px;
    margin-bottom: -10px;
  }
}

/* Section shell — 3×15 orange tick → H2, body copy, subsections. */
.settling-section {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.settling-section__head {
  display: flex;
  align-items: center;
  gap: 9px;
}

.settling-section__tick {
  width: 3px;
  height: 15px;
  background: var(--color-accent-rule);
}

.settling-section h2 {
  font-size: 21px;
  font-weight: 600;
  letter-spacing: -0.015em;
  margin: 0;
}

.settling-body {
  font-size: 15px;
  line-height: 1.7;
  margin: 0;
  color: var(--color-text-soft);
  max-width: 66ch;
  text-wrap: pretty;
}

.settling-body--sm {
  font-size: 14px;
  color: var(--color-text-secondary);
}

.settling-body--muted {
  font-size: 14px;
  color: var(--color-text-muted);
}

.settling-subsection {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding-top: 4px;
}

.settling-subhead {
  display: flex;
  align-items: center;
  gap: 9px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--color-border);
  font-size: 15px;
  font-weight: 600;
  letter-spacing: -0.01em;
}

.settling-subhead__tick {
  width: 3px;
  height: 14px;
  background: var(--color-accent-rule);
  flex-shrink: 0;
}

/* Small inline label rows ("Reviews:" / "Guides:"). */
/* Not flex: when this sits inside an outer align-items:baseline row (.settling-reviews), a
   flex container's exported baseline is its first flex item's baseline — and a plain decorative
   tick with no text has no real baseline, so it was exporting its own bottom edge as the whole
   label's baseline instead of "Guides:"/"Reviews:" text's actual baseline, dropping the label
   noticeably above the link it's meant to sit level with. Plain inline content (tick as
   inline-block, text inline) reports the text line's own baseline instead — this is the pattern
   to copy for any future tick+label pair that sits in a baseline row. */
.settling-inline-label {
  font-size: 13px;
  color: var(--color-text-soft);
}

.settling-inline-tick {
  display: inline-block;
  width: 2px;
  height: 13px;
  margin-right: 9px;
  vertical-align: -1px;
  background: var(--color-accent-rule);
}

/* Mobile only: force the "Guides:"/"Reviews:" label onto its own line instead of letting it
   share a row with whichever item happens to fit next to it — Reviews has several items
   (label, subreddit links, article source-block) that would otherwise wrap unpredictably
   mid-group. Above 600px everything already fits on one row (label inline), so this is scoped
   out there rather than fought with flex-basis: auto. */
@media (max-width: 599px) {
  .settling-inline-label {
    flex-basis: 100%;
  }
}

.settling-label {
  font-size: 14px;
  font-weight: 500;
  color: var(--color-text-soft);
}

.settling-label--pad {
  padding-top: 8px;
}

/* Tinted callout boxes. */
.settling-callout {
  border-radius: 10px;
  padding: 16px 20px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.settling-callout--tip {
  background: var(--color-primary-tint);
  border: 1px solid var(--color-primary-tint-border-soft);
  flex-direction: row;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 24px;
}

.settling-callout__text {
  font-size: 15px;
  line-height: 1.6;
  flex: 1 1 380px;
  min-width: 0;
  text-wrap: pretty;
}

.settling-callout__link {
  display: flex;
  flex-direction: column;
  gap: 2px;
  flex: 0 0 auto;
}

.settling-callout__link a {
  font-size: 14px;
  font-weight: 500;
}

.settling-callout--accent {
  background: var(--color-accent-tint);
  border: 1px solid var(--color-accent-rule);
}

.settling-callout__title {
  font-size: 15px;
  font-weight: 600;
}

.settling-callout__linkrow {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 20px;
}

.settling-callout__linkrow a {
  font-size: 14px;
  font-weight: 500;
}

.settling-source {
  font-size: 12px;
  color: var(--color-text-muted);
}

/* Neutral grey panels (reviews, guides, goshiwon note, useful links). */
.settling-panel {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: 10px;
  padding: 14px 18px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.settling-reviews {
  flex-direction: row;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 8px 22px;
}

/* font-weight 500 to match region-page.css .region-guides__link — same outbound-link style,
   Gangwon-do's Guides panel and this page's Reviews/Guides links should read identically.
   min-height/inline-flex/center — same 44px tap-target treatment as .section-nav__links a: at
   14px/1.65 these were rendering ~23px tall, stacked close together, well under DESIGN.md's
   44px control minimum and easy to mis-tap on phone. */
.settling-reviews__plain {
  font-size: 14px;
  font-weight: 500;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
}

.settling-reviews__source-block {
  display: flex;
  flex-direction: column;
  /* Matches region-page.css .region-guides__item — same link+caption stack, same gap. */
  gap: 2px;
  min-width: 0;
}

/* 44px tap target via an invisible ::before hit-area instead of min-height: this link sits in a
   column stack directly above its non-tappable source/date caption (gap: 2px) — growing the
   link's own box would shove that caption away from it, breaking the "one element" look. The
   pseudo-element extends the tappable area without taking up layout space, so the visible text
   stays exactly where it was. */
.settling-reviews__source-block a {
  position: relative;
  font-size: 14px;
  font-weight: 500;
}

.settling-reviews__source-block a::before {
  content: "";
  position: absolute;
  inset: -11px 0;
}

.settling-note {
  padding: 16px 20px;
  gap: 8px;
}

/* .settling-body's 66ch reading-width cap (DESIGN.md prose rule) is meant for running body copy,
   not these note-style plates — the plates themselves are already full content-width (unlike a
   prose paragraph), so the text inside should fill them too rather than wrap narrower than its
   own box. */
.settling-callout .settling-body,
.settling-note .settling-body {
  max-width: none;
}

.settling-note__title {
  font-size: 15px;
  font-weight: 600;
  color: var(--color-text-soft);
}

/* Platform cards (Enkostay / 33m2). */
.settling-platform-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 310px), 1fr));
  gap: 16px;
  align-items: stretch;
}

.settling-platform-card {
  border: 1px solid var(--color-border);
  border-radius: 12px;
  padding: 20px 22px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-width: 0;
}

.settling-platform-card__name {
  font-size: 18px;
  font-weight: 600;
  letter-spacing: -0.01em;
}

.settling-platform-card__desc {
  font-size: 14px;
  line-height: 1.65;
  color: var(--color-text-secondary);
  margin: 0;
  text-wrap: pretty;
}

.settling-platform-card__stats {
  display: flex;
  flex-direction: column;
}

.settling-platform-card__stat {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 18px;
  padding: 10px 0;
  border-top: 1px solid var(--color-border-soft);
}

.settling-platform-card__stat-label {
  font-size: 14px;
  color: var(--color-text-soft);
}

.settling-platform-card__stat-value {
  font-size: 14px;
  font-weight: 600;
  text-align: right;
  font-variant-numeric: tabular-nums;
}

.settling-platform-card__tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 26px;
  padding: 11px 0 0;
  border-top: 1px solid var(--color-border-soft);
}

.settling-tag__label {
  font-size: 12px;
  color: var(--color-text-muted);
}

.settling-tag__value {
  font-size: 14px;
  font-weight: 600;
}

.settling-platform-card__linkrow {
  margin-top: auto;
  padding-top: 4px;
}

.settling-platform-card__linkrow a {
  font-size: 14px;
  font-weight: 500;
}

/* Coliving list. Every row but the first gets a top hairline — simpler and correct at any
   auto-fit column count, unlike the source design's fixed "first two rows" rule (hand-tuned for
   its one hard-coded 2-column snapshot). */
.settling-coliving-list {
  border: 1px solid var(--color-border);
  border-radius: 12px;
  overflow: hidden;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(max(280px, 48%), 1fr));
}

.settling-coliving-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 18px;
  padding: 13px 20px;
  min-width: 0;
  border-top: 1px solid var(--color-border-soft);
}

.settling-coliving-row:first-child {
  border-top: none;
}

/* A lone last row keeps its cell, but its divider continues across the empty cell beside it
   (clipped by the list when there is a single column). */
.settling-coliving-row:last-child:nth-child(odd) {
  position: relative;
}

.settling-coliving-row:last-child:nth-child(odd)::after {
  content: "";
  position: absolute;
  top: -1px;
  left: 100%;
  width: 100%;
  border-top: 1px solid var(--color-border-soft);
}

.settling-coliving-row__name {
  font-size: 15px;
  font-weight: 600;
  white-space: nowrap;
}

.settling-coliving-row__loc {
  font-size: 13px;
  line-height: 1.5;
  color: var(--color-text-muted);
  text-align: right;
  min-width: 0;
}

/* Same glyph/sizing as the attraction/festival/coworking pins (region-page.css
   .attraction-card__pin) — inline-block is required here because base.css's global
   `svg { display: block }` reset otherwise drops the icon to its own line instead of sitting
   inline before the location text. */
.settling-coliving-row__pin {
  display: inline-block;
  width: 12px;
  height: 12px;
  vertical-align: -1px;
  margin-right: 5px;
}

/* Work cards. */
.settling-work-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr));
  gap: 16px;
  align-items: stretch;
}

.settling-work-card {
  border: 1px solid var(--color-border);
  border-radius: 12px;
  padding: 20px 22px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-width: 0;
}

.settling-work-card__title-row {
  display: flex;
  align-items: baseline;
  gap: 9px;
  flex-wrap: wrap;
}

.settling-work-card__title {
  font-size: 18px;
  font-weight: 600;
  letter-spacing: -0.01em;
}

.settling-work-card__title-row .settling-ko {
  font-size: 15px;
  color: var(--color-text-muted);
}

/* Keyword / other-result rows. */
.settling-keyword-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 250px), 1fr));
  gap: 16px 28px;
  align-items: start;
}

.settling-keyword {
  display: flex;
  gap: 11px;
  align-items: flex-start;
  min-width: 0;
}

.settling-keyword__icon {
  flex-shrink: 0;
  margin-top: 4px;
}

.settling-keyword__text {
  font-size: 14px;
  line-height: 1.6;
}

.settling-otherresult {
  display: flex;
  gap: 11px;
  align-items: flex-start;
  min-width: 0;
}

.settling-otherresult__icon {
  flex-shrink: 0;
  margin-top: 4px;
}

.settling-otherresult__body {
  min-width: 0;
}

.settling-otherresult__desc {
  font-size: 13px;
  line-height: 1.6;
  color: var(--color-text-secondary);
  margin: 0;
  text-wrap: pretty;
}

.settling-otherresult__link {
  font-size: 13px;
}

/* Communities. */
.settling-communities-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr));
  gap: 26px 40px;
  align-items: start;
}

.settling-community-col {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.settling-community-list {
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding-top: 14px;
}

.settling-community-item {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.settling-community-item a {
  font-size: 15px;
  font-weight: 600;
}

.settling-community-item__desc {
  font-size: 13px;
  line-height: 1.55;
  color: var(--color-text-muted);
  text-wrap: pretty;
}

.settling-community-item__note {
  font-size: 13px;
  line-height: 1.6;
  color: var(--color-text-secondary);
  margin: 0;
  text-wrap: pretty;
}

/* Useful links. */
.settling-links-panel {
  flex-direction: row;
  flex-wrap: wrap;
  gap: 16px 40px;
  padding: 16px 20px;
}

.settling-link-block {
  display: flex;
  flex-direction: column;
  /* Matches region-page.css .region-guides__item / .settling-reviews__source-block — same
     link+caption stack, same gap, everywhere on the site. */
  gap: 2px;
  min-width: 0;
  flex: 1 1 280px;
}

.settling-link-block a {
  font-size: 15px;
  font-weight: 500;
}

/* Price-snapshot <details> fold. */
.settling-price-table {
  border: 1px solid var(--color-border);
  border-radius: 10px;
}

.settling-price-table summary {
  list-style: none;
}

.settling-price-table summary::-webkit-details-marker,
.settling-price-table summary::marker {
  display: none;
}

.settling-price-table__summary {
  display: flex;
  align-items: center;
  gap: 14px;
  cursor: pointer;
  padding: 16px 20px;
}

.settling-price-table__label {
  flex: 1 1 auto;
  min-width: 0;
}

.settling-price-table__title {
  display: block;
  font-size: 16px;
  font-weight: 600;
  letter-spacing: -0.01em;
}

.settling-price-table__sub {
  display: block;
  font-size: 13px;
  color: var(--color-text-muted);
  margin-top: 2px;
}

.settling-chevron {
  flex-shrink: 0;
  width: 10px;
  height: 10px;
  border-right: 1.5px solid var(--color-primary);
  border-bottom: 1.5px solid var(--color-primary);
  transform: rotate(45deg);
  transform-origin: 60% 60%;
  transition: transform 140ms ease;
}

.settling-price-table[open] .settling-chevron {
  transform: rotate(225deg);
}

.settling-price-table__body {
  padding: 0 20px 18px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.settling-price-table__scroll {
  overflow-x: auto;
  display: none;
}

.settling-price-table__el {
  border-collapse: collapse;
  width: 100%;
  min-width: 900px;
  font-size: 13px;
}

.settling-price-table__el tbody {
  font-variant-numeric: tabular-nums;
}

.settling-price-table__el td {
  text-align: left;
  padding: 9px 14px 9px 0;
  border-bottom: 1px solid var(--color-border-soft);
  white-space: nowrap;
}

.settling-price-table__el tbody tr:last-child td {
  border-bottom: none;
}

.settling-price-table__city-head {
  text-align: left;
  font-size: 12px;
  font-weight: 500;
  color: var(--color-text-muted);
  padding: 0 14px 7px 0;
  border-bottom: 1px solid var(--color-border);
  white-space: nowrap;
}

.settling-price-table__group-head {
  text-align: left;
  font-size: 12px;
  font-weight: 600;
  color: var(--color-text);
  padding: 0 14px 7px 0;
  border-bottom: 1px solid var(--color-border);
  white-space: nowrap;
}

.settling-price-table__group-head--last {
  padding-right: 0;
}

.settling-price-table__sub-head {
  text-align: left;
  font-size: 12px;
  font-weight: 400;
  color: var(--color-text-muted);
  padding: 6px 14px 6px 0;
  border-bottom: 1px solid var(--color-border-soft);
}

.settling-price-table__sub-head--last {
  padding-right: 0;
}

.settling-price-table__city {
  font-weight: 600;
}

.settling-price-table__muted {
  color: var(--color-text-muted);
}

.settling-price-table__note {
  color: var(--color-text-muted);
  font-size: 12px;
}

.settling-price-table__mobile {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.settling-price-city {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding-top: 12px;
  border-top: 1px solid var(--color-border);
}

.settling-price-city:first-child {
  padding-top: 0;
  border-top: none;
}

.settling-price-city__name {
  font-size: 15px;
  font-weight: 600;
}

.settling-price-city__rows {
  display: flex;
  flex-direction: column;
  font-size: 13px;
  font-variant-numeric: tabular-nums;
}

.settling-price-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 7px 0;
  border-top: 1px solid var(--color-border-soft);
}

.settling-price-row__label {
  color: var(--color-text-muted);
}

.settling-price-row__value {
  text-align: right;
}

.settling-price-row__meta {
  color: var(--color-text-muted);
}

.settling-price-table__footnote {
  font-size: 12px;
  line-height: 1.6;
  color: var(--color-text-muted);
  max-width: 92ch;
  margin: 0;
  text-wrap: pretty;
}

/* Structural swap: real table ≥1024px (matches --bp-desktop, the same "wide vs narrow structure"
   threshold as the homepage region-info infographic/carousel swap) — the one exception to this
   page's no-media-query grids, because the phone view isn't a reflowed table, it's a different
   set of elements entirely. Both markups always render (progressive enhancement: no JS
   either way); CSS alone picks which one is visible. */
@media (min-width: 1024px) {
  .settling-price-table__scroll {
    display: block;
  }

  .settling-price-table__mobile {
    display: none;
  }
}

/* Full-bleed band reusing the same calc()-based technique as region-page.css's .region-band —
   ::before bleeds past .settling-page's own edge by exactly <main class="page">'s own padding
   (--space-4), same math, no viewport units (the 100vw/negative-margin trick overflows the
   document by the scrollbar's width — visible as a few px of horizontal scroll — so it's not
   used here). */
.settling-disclaimer {
  position: relative;
}

.settling-disclaimer::before {
  content: "";
  position: absolute;
  z-index: -1;
  inset: 0;
  margin-inline: calc(-1 * var(--space-4));
  background: var(--color-bg);
}

.settling-disclaimer__text {
  font-size: 13px;
  line-height: 1.6;
  color: var(--color-text-muted);
  text-wrap: pretty;
}
