@font-face {
  font-family: "Bricolage Grotesque";
  src: url(fonts/bricolage-grotesque.ttf) format("truetype");
  font-weight: 200 800;
  font-display: swap;
}
@font-face {
  font-family: "Source Sans";
  src: url(fonts/source-sans.ttf) format("truetype");
  font-weight: 200 900;
  font-display: swap;
}
:root {
  scrollbar-gutter: stable;
  --paper: #f6f4ed;
  --ink: #1d3531;
  --green: #153e37;
  --muted: #53645b;
  --line: #d5d7ca;
  --rust: #9c542e;
  --gold: #dbaf68;
  --typeface: "Bricolage Grotesque", sans-serif;
  font: 16px/1.4 var(--typeface);
  color: var(--ink);
  background: var(--paper);
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
}
button,
select {
  font: inherit;
  color: inherit;
}
button,
a,
select {
  touch-action: manipulation;
}
button {
  cursor: pointer;
}
button:focus-visible,
select:focus-visible,
a:focus-visible {
  outline: 3px solid #ca8138;
  outline-offset: 3px;
}
button {
  background: none;
  border: none;
}
a {
  color: var(--green);
}
[hidden] {
  display: none !important;
}
header {
  background: #153b35;
  color: #fbf7e8;
  border-bottom: 3px solid #c7aa72;
}
.header-inner,
main {
  max-width: 1600px;
  margin: auto;
  padding: 0 clamp(16px, 3.4vw, 64px);
}
.header-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  min-height: 70px;
  gap: 16px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: inherit;
  font: 600 1.78rem var(--typeface);
  letter-spacing: -0.055em;
}
.brand-mark,
.loading-map {
  -webkit-mask: url(turkiye-nokta.svg) center / contain no-repeat;
  mask: url(turkiye-nokta.svg) center / contain no-repeat;
  aspect-ratio: 54 / 24;
}
.brand-mark {
  display: block;
  flex: none;
  width: 74px;
  background: #edc780;
}
.header-inner nav {
  display: flex;
  align-self: stretch;
  gap: clamp(10px, 2vw, 32px);
}
nav :is(button, a) {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  position: relative;
  color: #d3e1d8;
  padding: 0 3px;
  font-weight: 550;
}
nav :is(button, a)[aria-current="page"] {
  color: #fff5dd;
}
nav :is(button, a)[aria-current="page"]:after {
  content: "";
  position: absolute;
  bottom: 10px;
  height: 2px;
  left: 3px;
  right: 3px;
  background: #d7b87a;
}
.search {
  display: flex;
  align-items: center;
  background: #fffdf7;
  border: 1px solid var(--line);
  padding-left: 15px;
  border-radius: 5px;
}
.search-icon {
  display: block;
  width: 13px;
  height: 13px;
  border: 1.8px solid var(--green);
  border-radius: 50%;
  position: relative;
}
.search-icon:after {
  content: "";
  position: absolute;
  width: 7px;
  height: 1.8px;
  background: var(--green);
  right: -5px;
  bottom: -2px;
  transform: rotate(48deg);
}
select {
  min-height: 41px;
  background-color: #fffdf8;
  border: 1px solid var(--line);
  border-radius: 4px;
  padding: 6px 30px 6px 11px;
  cursor: pointer;
  max-width: 100%;
}
.search select {
  border: 0;
  background-color: transparent;
  min-width: 165px;
}
.atlas-layout {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
  align-items: start;
}
.atlas-hero {
  --map-height: clamp(390px, min(44vw, 64vh), 680px);
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  grid-column: 1 / -1;
  align-items: start;
  gap: 8px;
}
.layers { grid-column: 1 / -1; }
.map-surface {
  position: relative;
  container-type: inline-size;
}
.map-frame {
  width: 100%;
  position: relative;
  isolation: isolate;
  background: #467c81;
  overflow: hidden;
  border: 1px solid #506755;
  border-radius: 8px;
  height: var(--map-height);
  flex: none;
}
.map-frame canvas {
  position: absolute;
  width: 100%;
  height: 100%;
  display: block;
  touch-action: none;
  cursor: grab;
}
.map-frame canvas:active {
  cursor: grabbing;
}
.map-legend,
.map-controls,
.compass,
#tooltip {
  position: absolute;
}
.compass {
  right: 17px;
  top: 13px;
  display: grid;
  justify-items: center;
  color: #183e3b;
  pointer-events: none;
  text-shadow: 0 0 4px #faf3d8;
}
.compass b {
  font: 600 12px var(--typeface);
}
.compass span {
  font: 43px/0.82 Georgia;
}
.map-controls {
  right: 12px;
  bottom: 12px;
  display: flex;
  border-radius: 4px;
  overflow: hidden;
  border: 1px solid #9ca793;
  background: #faf8edee;
}
.map-controls button {
  width: 36px;
  height: 36px;
  padding: 0;
  font-size: 23px;
  line-height: 1;
}
.map-controls button + button {
  border-left: 1px solid #d0d3c5;
}
.map-controls button:hover,
.layer:hover {
  background: #e6ebda;
}
.map-legend {
  bottom: 12px;
  left: 14px;
  background: #f8f6e9f0;
  border-radius: 3px;
  padding: 6px 10px;
  font-size: 13px;
  color: #304435;
  pointer-events: none;
  max-width: calc(100% - 145px);
}
.swatch {
  display: inline-block;
  width: 13px;
  height: 9px;
  margin: 0 1px;
}
.legend-scale {
  display: flex;
  align-items: center;
  gap: 5px;
  flex-wrap: wrap;
}
.legend-scale b {
  font-weight: 600;
}
.layers {
  padding: 17px 0 0;
}
.layers h2,
.card h2,
.dialog-heading h2 {
  font: 500 1.45rem var(--typeface);
  letter-spacing: -0.035em;
  margin: 0 0 10px;
}
#layer-list {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 6px;
}
.layer {
  padding: 3px 3px 6px;
  background: #fcfbf3;
  border: 1px solid var(--line);
  border-radius: 5px;
  font-size: 0.875rem;
  font-weight: 580;
  line-height: 1.15;
}
.layer canvas {
  width: 100%;
  height: auto;
  aspect-ratio: 2.08;
  display: block;
  border-radius: 2px;
  margin-bottom: 5px;
}
.layer[aria-pressed="true"] {
  background: var(--green);
  border-color: var(--green);
  color: white;
}
#profile,
.card {
  background: #fffdf6;
  border: 1px solid var(--line);
  border-radius: 7px;
  padding: clamp(15px, 1.5vw, 27px);
}
#profile {
  border-top: 4px solid #96875b;
  min-width: 0;
}
.profile-top {
  display: flex;
  gap: 12px;
  align-items: center;
}
.plate {
  font: 440 .875em / 1 "Source Sans", sans-serif;
  color: #777;
  letter-spacing: -.035em;
  white-space: nowrap;
}
.profile-title {
  font: 500 clamp(2rem, 2.9vw, 3rem) / 1.1 var(--typeface);
  letter-spacing: -0.055em;
  margin: 9px 0 16px;
}
.section-line {
  border-top: 1px solid var(--line);
  margin-top: 16px;
  padding-top: 14px;
}
.metrics {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px 8px;
}
.metrics small,
.data-row small {
  color: var(--muted);
  display: block;
}
.metrics b {
  font: 500 clamp(1.16rem, 1.55vw, 1.6rem) var(--typeface);
  white-space: nowrap;
  letter-spacing: -0.04em;
}
.metrics .unit {
  font-size: 0.86em;
}
.profile-sub {
  font: 500 1.19rem var(--typeface);
  margin: 0 0 7px;
  letter-spacing: -0.025em;
}
.data-row {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  font-size: 0.94rem;
}
.bar {
  height: 5px;
  border-radius: 3px;
  background: #e9eadf;
  margin: 4px 0 7px;
  overflow: hidden;
}
.bar span {
  display: block;
  background: #74896a;
  height: 100%;
}
.bar.ind span {
  background: #bc8e52;
}
.small {
  color: var(--muted);
  font-size: 0.875rem;
  line-height: 1.35;
  margin: 6px 0;
}
.action {
  border: 1px solid #92a393;
  border-radius: 4px;
  padding: 7px 11px;
  color: var(--green);
  font-weight: 600;
}
.action:hover {
  background: #e7ecdf;
}
.full {
  width: 100%;
  margin-top: 15px;
}
.herit-link {
  display: block;
  text-align: left;
  color: var(--green);
  text-decoration: underline;
  text-decoration-color: #a5b5a0;
  text-underline-offset: 3px;
  padding: 3px 0;
}
.civil {
  color: var(--rust);
  font-size: 1.1em;
}
#tooltip {
  background: #fffbed;
  border: 1px solid #a8ab92;
  border-radius: 4px;
  box-shadow: 0 3px 10px #283b3626;
  padding: 5px 8px;
  pointer-events: none;
  font-size: 14px;
}
.compare-grid {
  display: grid;
  align-items: start;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}
.compare-selects {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}
label {
  font-size: 0.94rem;
  color: #475e51;
}
label select {
  display: block;
  width: 100%;
  margin: 4px 0 0;
}
.search select {
  margin: 0;
}
.table-heading {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
}
.table-card {
  margin: 16px 0;
}
table {
  width: 100%;
  border-collapse: collapse;
}
th,
td {
  text-align: right;
  border-bottom: 1px solid #dbdfd0;
  padding: 8px 6px;
  font-variant-numeric: tabular-nums;
}
th:first-child,
td:first-child {
  text-align: left;
}
th {
  font-weight: 630;
  color: var(--muted);
}
td button {
  color: var(--green);
  text-decoration: underline;
}
.ranking-viewport {
  position: relative;
  margin-top: 14px;
}
.ranking-viewport.has-more-right::after {
  content: "";
  position: absolute;
  inset: 0 0 0 auto;
  width: 12px;
  background: linear-gradient(to right, transparent, rgb(38 60 48 / 18%));
  pointer-events: none;
}
.table-wrap {
  overflow: auto;
  max-height: 420px;
}
.table-wrap thead {
  position: sticky;
  top: 0;
  background: #fffdf6;
}

.compare-selects label {
  min-width: 0;
}
.pair-heading,
.scatter-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  min-height: 42px;
  margin-bottom: 14px;
}
.pair-heading select {
  max-width: 48%;
}
.pair-heading h2,
.scatter-heading h2 {
  margin: 0;
}
.pair-heading select,
.scatter-heading button {
  font-size: 0.88rem;
  min-height: 34px;
}
.pair-metric {
  display: grid;
  grid-template-columns: max-content minmax(22px, 1fr) max-content;
  column-gap: 8px;
  border-top: 1px solid var(--line);
  padding: 12px 0 1px;
  margin-top: 12px;
}
.pair-metric h3 {
  grid-column: 1 / -1;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: baseline;
  font: 600 1.05rem var(--typeface);
  margin: 0 0 5px;
}
.pair-metric h3 small {
  font: 400 0.83rem var(--typeface);
  color: var(--muted);
}
.pair-row {
  --bar: #a4572d;
  display: grid;
  grid-column: 1 / -1;
  grid-template-columns: subgrid;
  align-items: center;
  font-size: 0.92rem;
  padding: 2px 0;
}
.pair-row + .pair-row {
  --bar: #225f6c;
}
.pair-city {
  line-height: 1.1;
  white-space: nowrap;
}
.pair-row strong {
  white-space: nowrap;
  text-align: right;
  font-weight: 580;
  font-variant-numeric: tabular-nums;
}
.pair-track {
  height: 9px;
  background: #edece3;
  position: relative;
}
.pair-track:not(.missing)::after {
  content: "";
  position: absolute;
  top: -2px;
  bottom: -2px;
  left: clamp(0px, var(--origin), calc(100% - 1px));
  width: 1px;
  background: #78877c;
}
.pair-track.missing {
  height: 1px;
  background: none;
  border-top: 1px dashed var(--line);
}
.pair-bar {
  position: absolute;
  height: 100%;
  background: var(--bar);
}
@media (prefers-reduced-motion: no-preference) {
  .pair-bar.enters {
    animation: grow-bar 0.36s ease-out;
  }
  @keyframes grow-bar {
    from {
      transform: scaleX(0);
    }
  }
}
#chart {
  display: block;
  width: 100%;
  height: clamp(270px, 28vw, 380px);
  margin-top: 16px;
  cursor: crosshair;
}
@media (min-width: 721px) {
  .compare-grid { align-items: stretch; }
  .compare-grid #scatter-card {
    display: flex;
    flex-direction: column;
  }
  .compare-grid #chart {
    height: clamp(216px, 22.4vw, 304px);
    flex: 1 0 auto;
  }
  .compare-grid #compare-card {
    display: grid;
    grid-template-rows: auto auto 1fr;
  }
  .compare-grid #comparison {
    display: flex;
    flex-direction: column;
  }
  #comparison > * { flex: none; }
  #comparison:has(> .pair-metric:nth-child(2)) > .pair-metric {
    flex-grow: 1;
    align-content: space-evenly;
  }
}
#chart-detail {
  display: grid;
  grid-template-columns: minmax(0, .9fr) minmax(0, 2fr);
  align-items: center;
  gap: 12px;
  border-top: 1px solid var(--line);
  padding-top: 10px;
  flex: none;
}
.detail-province {
  display: flex;
  align-items: center;
  gap: 7px;
}
.detail-province h3 {
  font: 600 1.1rem / 1.15 var(--typeface);
  overflow-wrap: anywhere;
  margin: 0;
}
.detail-province canvas { width: 40px; height: 27px; flex: none; }
.detail-metrics {
  display: grid;
  grid-auto-columns: minmax(0, 1fr);
  grid-auto-flow: column;
  align-items: start;
  gap: 12px;
  margin: 0;
}
.detail-metrics > div { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.detail-metrics dt { color: var(--muted); font-size: .85rem; line-height: 1.2; }
.detail-metrics dd { order: -1; margin: 0; line-height: 1.2; overflow-wrap: anywhere; }
.detail-metrics strong { font-weight: 620; font-variant-numeric: tabular-nums; }
.topic-stat b, #ranking td:nth-last-child(-n+2) { white-space: nowrap; }
@media (max-width: 720px) {
  #chart-detail { grid-template-columns: minmax(0, 1fr); gap: 8px; }
}
.height-key {
  width: min(136px, 100%);
  font-variant-numeric: tabular-nums;
}
.height-key b {
  font-weight: 500;
}
.height-key i {
  display: block;
  height: 7px;
  border-radius: 2px;
  margin: 2px 0;
  width: 136px;
  max-width: 100%;
  background: linear-gradient(
    90deg,
    #5a9768,
    #86aa67 6.25%,
    #bbba6f 15%,
    #e0c175 25%,
    #d49d60 37.5%,
    #b77956 55%,
    #966553 75%,
    #e2d8c3
  );
}
.height-key > div {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  font-size: 0.76rem;
}
.height-key > div :last-child {
  text-align: right;
}
#expanded-chart {
  width: 100%;
  max-width: none;
  height: 100%;
  max-height: none;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: #fffdf6;
}
#expanded-chart .card {
  display: grid;
  grid-template-rows: auto auto minmax(270px, 1fr) 6rem;
  align-content: start;
  width: 100%;
  height: 100%;
  border: 0;
  padding: clamp(12px, 3vw, 40px);
  border-radius: 0;
}
#expanded-chart #chart {
  height: 100%;
  min-height: 0;
  margin: 0;
}
#expanded-chart #chart-detail {
  align-self: start;
}
#expanded-chart .detail-province h3 {
  font-size: clamp(1.3rem, 2vw, 1.65rem);
}
#expanded-chart .detail-metrics > div {
  font-size: clamp(1.05rem, 1.55vw, 1.3rem);
}
body:has(#expanded-chart[open]) {
  overflow: hidden;
}
#comparison { container-type: inline-size; }
@container (max-width: 360px) {
  .pair-metric { grid-template-columns: 1fr auto; }
  .pair-row { row-gap: 5px; padding-block: 5px; }
  .pair-city { grid-column: 1; grid-row: 1; }
  .pair-row strong { grid-column: 2; grid-row: 1; }
  .pair-track { grid-column: 1 / -1; grid-row: 2; }
}
dialog {
  width: min(610px, 94vw);
  max-height: 84vh;
  border: 1px solid #aeb5a0;
  border-radius: 8px;
  color: var(--ink);
  background: var(--paper);
  padding: 22px;
}
dialog::backdrop {
  background: #122a23a6;
}
.dialog-heading {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.dialog-heading h2 {
  font-size: 1.8rem;
  margin: 0;
}
.dialog-heading button {
  font-size: 1.7rem;
}
.sources-section {
  border-top: 1px solid var(--line);
  margin-top: 15px;
  padding-top: 12px;
}
.sources-section summary {
  cursor: pointer;
  font: 500 1.2rem var(--typeface);
  margin: 0;
}
.sources-section p {
  margin: 4px 0;
}
.atlas-footer { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: .35rem 1.25rem; text-align: center; padding: 0 1rem 1.5rem; }
.atlas-footer a, .atlas-footer button { color: var(--muted); text-decoration: underline; text-underline-offset: 3px; }
.sources-section[open] summary { margin-bottom: .55rem; }
.sources-section .source-citation { background: #f1f2e8; padding: .6rem .75rem; border-radius: 5px; }
.copy-citation { color: var(--green); text-decoration: underline; text-underline-offset: 3px; }
.source-links { display: flex; flex-wrap: wrap; gap: .3rem .75rem; margin-top: .45rem; }
.sources-section a {
  font-weight: 600;
}
#loading {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: grid;
  place-items: center;
  background: #153b35;
  color: #fff7df;
  text-align: center;
  padding: 24px;
}
.loading-map {
  display: block;
  position: relative;
  width: min(58vw, 330px);
  background: #699186;
}
.loading-map::after {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  /* Ten columns of the 54-column dot grid form the moving beam. */
  width: calc(100% * 10 / 54);
  background: linear-gradient(
    90deg,
    #8da774 0 30%,
    #dfaa4f 30% 60%,
    #ffd373 60% 80%,
    #ffffe8 80% 100%
  );
  transform: translateX(220%);
}
@media (prefers-reduced-motion: no-preference) {
  .loading-map::after {
    animation: atlas-load 1150ms steps(30, end) -192ms infinite;
  }
}
@keyframes atlas-load {
  from {
    transform: translateX(-60%);
  }
  to {
    transform: translateX(540%);
  }
}
@media (max-width: 410px) {
  .header-inner {
    flex-wrap: wrap;
    row-gap: 0;
    padding-block: 4px;
  }
  .header-inner nav {
    min-height: 38px;
  }
}

@media (max-width: 900px) {
  .atlas-layout { gap: 12px; }

  .metrics {
    grid-template-columns: 1fr 1fr;
  }
  .layer {
    font-size: 0.79rem;
  }
}
@media (max-width: 720px) {
  .header-inner {
    min-height: 59px;
  }
  .brand {
    font-size: 1.34rem;
    gap: 9px;
  }
  .brand-mark {
    width: 49px;
  }
  .header-inner nav {
    gap: 8px;
  }
  .header-inner nav :is(button, a) {
    font-size: 0.9rem;
  }
  .atlas-layout,
  .compare-grid {
    grid-template-columns: 1fr;
  }
  .search {
    width: 100%;
  }
  .search select {
    width: 100%;
  }
  .map-frame {
    min-height: 0;
    aspect-ratio: 1.48;
  }
  .layers {
    padding-top: 12px;
  }
  .layers h2 {
    font-size: 1.2rem;
  }
  #layer-list {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
  .layer {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 3px;
    font-size: 0.85rem;
  }
  .atlas-layout {
    gap: 16px;
  }
  .map-legend {
    left: 7px;
    bottom: 7px;
    max-width: calc(100% - 108px);
    padding: 4px 6px;
    font-size: 12px;
  }
  .map-controls {
    right: 7px;
    bottom: 7px;
  }
  .map-controls button {
    width: 28px;
    height: 30px;
  }
  .compass {
    right: 10px;
    top: 8px;
  }
  .compass span {
    font-size: 29px;
  }
  .table-heading {
    align-items: flex-start;
  }
  .profile-title {
    margin-bottom: 12px;
  }
  .metrics {
    gap: 10px;
  }
  .metrics b {
    font-size: 1.45rem;
  }
}
@media (prefers-reduced-motion: no-preference) {
  button {
    transition:
      background-color 0.15s,
      color 0.15s;
  }
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}
main {
  padding-bottom: 24px;
}
#explore, #compare {
  padding-top: clamp(12px, 2vw, 30px);
}
.map-toolbar {
  position: absolute;
  top: 12px;
  left: 12px;
  display: flex;
  align-items: flex-start;
  gap: 6px;
  max-width: calc(100% - 62px);
  flex-wrap: wrap;
}
.map-toolbar .search,
.map-toolbar #pop-period {
  width: auto;
  background: #faf8edee;
  border: 1px solid #a4b19b;
  border-radius: 4px;
  box-shadow: 0 1px 4px #243f311a;
}
.map-toolbar .search {
  padding-left: 10px;
}
.map-toolbar select {
  min-width: 118px;
  max-width: 160px;
  min-height: 32px;
  padding: 3px 8px;
  font-size: 14px;
}
.map-toolbar #pop-period {
  display: flex;
  overflow: hidden;
}
#pop-period button {
  font-weight: 600;
  font-size: 14px;
  line-height: 1.2;
  padding: 7px 8px;
}
#pop-period button[aria-pressed="true"] {
  background: var(--green);
  color: #fff8e5;
}
.map-legend {
  display: grid;
  gap: 2px;
}
.map-legend > b {
  font-weight: 650;
}
.profile-top {
  container-type: inline-size;
  justify-content: space-between;
  gap: 5px;
}
.province-shape {
  width: min(30%, 109px);
  min-width: 0;
  height: auto;
  flex-shrink: 1;
}
.profile-title {
  margin: 9px 0 4px;
  font-size: clamp(1.2rem, 8.2cqi, 3rem);
  white-space: nowrap;
}
.specialties {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin-top: 9px;
}
.specialty {
  border-radius: 5px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  gap: 4px;
  padding: 10px 6px 8px;
  background: #f4eee0;
  color: #483e2d;
  text-align: center;
  text-decoration: none;
}
.specialty:nth-child(2) {
  background: #eaf0e4;
  color: #354a37;
}
.specialty:hover,
.specialty:focus-visible {
  text-decoration: underline;
  text-underline-offset: 3px;
}
.specialty-icon {
  font:
    31px/1.15 "Apple Color Emoji",
    "Segoe UI Emoji",
    "Noto Color Emoji",
    sans-serif;
}
.specialty-name {
  font-size: 0.94rem;
  font-weight: 600;
  line-height: 1.15;
}
.gdp-value {
  display: block;
  font: 500 1.35rem var(--typeface);
  margin: -4px 0 8px;
}
.rank {
  color: var(--muted);
  font-size: 0.86rem;
}
@media (max-width: 720px) {
  #explore, #compare {
    padding-top: 10px;
  }
  .map-toolbar {
    left: 6px;
    top: 6px;
  }
  .map-toolbar select {
    max-width: 130px;
    min-width: 0;
    min-height: 27px;
  }
  #pop-period button {
    font-size: 12px;
    padding: 6px;
  }
  .specialty {
    flex-direction: column;
    justify-content: center;
    min-height: 50px;
  }
}
.layers { container-type: inline-size; }
#layer-list {
  grid-template-columns: repeat(5, minmax(0, 1fr));
}
@container (max-width: 525px) {
  #layer-list { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}
.specialty-icon {
  width: 64px;
  height: 64px;
  object-fit: contain;
  display: block;
}
.specialty {
  background: linear-gradient(155deg, #f9f2e3, #eee2c7);
  border: 1px solid #dfd4ba;
}
.specialty:nth-child(2) {
  background: linear-gradient(155deg, #f0f4e8, #e2e9d5);
  border-color: #d4ddc5;
}
.theme-picker {
  background: #fff9edee;
  border-color: #a4b19b;
  font-size: 14px;
  min-height: 34px;
  padding: 4px 24px 4px 9px;
  max-width: 150px;
}
.topic-stat {
  padding: 5px 0;
  border-bottom: 1px solid #eeeade;
}
.airport-field { display: block; }
.airport-field select { min-height: 44px; }
.airport-sum { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; margin: 18px 0 12px; }
.airport-sum strong { font-size: 1.5rem; font-variant-numeric: tabular-nums; }
.airport-bar { height: 10px; border-radius: 4px; overflow: hidden; background: #c87b45; }
.airport-bar i { display: block; height: 100%; background: #347a7d; }
.airport-breakdown { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 10px; margin: 10px 0; }
.airport-breakdown dd { margin: 2px 0 0; font-weight: 600; font-variant-numeric: tabular-nums; }
.airport-breakdown small { color: var(--muted); white-space: nowrap; }
#legend:empty { display: none; }
.topic-scale { display: grid; gap: 4px; }
.topic-caption, .migration-unit { color: var(--muted); }
.topic-steps { display: flex; flex-wrap: wrap; align-items: center; gap: 3px 8px; }
@container (max-width: 560px) {
  .map-legend {
    position: static;
    display: grid;
    align-content: safe center;
    height: 6.875rem;
    overflow: auto;
    pointer-events: auto;
    max-width: none;
    padding: 6px 10px;
    background: #fffdf6;
    border: 1px solid var(--line);
    border-top: 0;
    border-radius: 0 0 7px 7px;
    font-size: .8rem;
  }
  .map-frame { border-radius: 8px 8px 0 0; }
  @media (max-width: 760px) {
    .map-legend {
      height: auto;
      min-height: 4.75rem;
      overflow: visible;
    }
  }
}
.migration-unit { grid-column: 1 / -1; }
.scale-step {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  white-space: nowrap;
}
.scale-step:before,
.air-key:before {
  content: "";
  display: inline-block;
  width: 10px;
  height: 10px;
  background: var(--tone);
  border: 1px solid #42544a55;
  border-radius: 2px;
}
.air-key {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin-right: 8px;
  --tone: #347a7d;
}
.air-key.international {
  --tone: #c87b45;
}
@media (max-width: 720px) {
  #layer-list {
    grid-template-columns: repeat(auto-fit, minmax(132px, 1fr));
  }
  .specialty-icon {
    width: 47px;
    height: 47px;
  }
  .theme-picker {
    min-height: 28px;
  }
}

.migration-key {
  display: grid;
  grid-template-columns: repeat(2, auto);
  column-gap: 14px;
  row-gap: 5px;
  padding-top: 3px;
  line-height: 1.2;
}
.migration-key-group {
  display: grid;
  gap: 4px;
}
.migration-key-group b {
  font-weight: 650;
}
.migration-key-group + .migration-key-group {
  padding-left: 10px;
  border-left: 1px solid #c6cbbc;
}
@container (max-width: 560px) {
  .migration-key { grid-template-columns: max-content 1fr 1fr; gap: 2px 8px; }
  .migration-key-group { display: contents; }
}

.migration-key .scale-step {
  gap: 5px;
}

#expand-chart {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  padding: 0;
  margin-left: auto;
}
#expand-chart[aria-expanded="false"] .collapse-icon,
#expand-chart[aria-expanded="true"] .expand-icon {
  display: none;
}

.sort-heading {
  display: inline-flex;
  align-items: center;
  justify-content: inherit;
  gap: 0.35em;
  padding: 3px 0;
  text-align: inherit;
  font: inherit;
}
.sort-arrow {
  color: var(--muted);
  font-size: 1em;
}
th[aria-sort] .sort-arrow,
.sort-heading:hover {
  color: var(--green);
}

#ranking tr[data-place="1"] { background: #d4e7d7; }
#ranking tr[data-place="2"] { background: #e1eee1; }
#ranking tr[data-place="3"] { background: #edf4e9; }
#ranking tr[data-place] td:first-child { font-weight: 750; color: #28583c; }

#profile .profile-title {
  margin: 0;
  font-size: clamp(1.45rem, 2.2vw, 2rem);
  line-height: 1.08;
  white-space: normal;
}
#profile {
  position: relative;
  padding: 15px 17px;
  border-top: 3px solid #8f865e;
  overflow: auto;
  scrollbar-gutter: stable;
}
#profile .profile-top { padding-right: 27px; min-height: 42px; }
#profile .province-shape { width: 54px; max-height: 40px; object-fit: contain; }
.dismiss-city {
  position: absolute;
  top: 6px;
  right: 6px;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  color: var(--muted);
  font-size: 1.35rem;
}
.dismiss-city:hover { background: #eceee1; }
#profile .section-line { margin-top: 10px; padding-top: 8px; }
#profile .metrics b { font-size: 1.1rem; }
#profile .metrics small { font-size: .8rem; }
#compare-this { width: auto; margin: 10px 0 0; padding: 5px 10px; }
.atlas-layout .layers { padding: 0; }
@media (min-width: 761px) {
  .atlas-hero:has(#profile:not([hidden])) {
    grid-template-columns: minmax(0, 1fr) clamp(295px, 29%, 390px);
    gap: 12px;
  }
  #profile { max-height: var(--map-height); }
}
.fact-card, #feedback-board { align-self: stretch; }
@media (min-width: 761px) {
  #layer-list { gap: 8px; }
  .layer { padding: 5px 5px 8px; }
  .layer canvas { margin-bottom: 7px; }
}
.fact-card {
  touch-action: pan-y pinch-zoom;
  --fact-inset: clamp(16px, 1.6vw, 25px);
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  align-items: center;
  gap: 14px;
  min-width: 0;
  padding: var(--fact-inset) 32px;
  border: 1px solid #d4cbb5;
  border-radius: 8px;
  background: #f8f2e4;
  color: #193e35;
}
@media (min-width: 1001px) {
  .fact-card { grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr); }
}
.fact-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 30px;
  height: 44px;
  display: grid;
  place-items: center;
  padding: 0;
  border: 0;
  background: transparent;
  color: #747a69;
}
.fact-prev { left: 0; }
.fact-next { right: 0; }
.fact-arrow::before {
  content: "";
  width: 7px;
  height: 7px;
  border: solid currentColor;
  border-width: 0 1.5px 1.5px 0;
  transform: rotate(-45deg);
}
.fact-prev::before { transform: rotate(135deg); }
.fact-arrow:hover, .fact-arrow:focus-visible { color: var(--green); }
.fact-copy { min-width: 0; }
.fact-copy h2 {
  display: flex;
  align-items: center;
  gap: .65em;
  color: #79572c;
  font-size: 1rem;
  margin: 0 0 15px;
}
.fact-copy h2::before {
  content: "";
  width: 1.6em;
  height: 2px;
  background: #a7783b;
}
.fact-sentence {
  font-weight: 590;
  letter-spacing: -.045em;
  font-size: clamp(1.45rem, 2.1vw, 2.2rem);
  line-height: 1.12;
  text-wrap: pretty;
  margin: 0;
}
.fact-source {
  display: inline-block;
  color: #53604c;
  font-size: .85rem;
  text-underline-offset: 3px;
}
.fact-figure {
  display: grid;
  justify-items: center;
  gap: 6px;
  padding: 12px 8px 8px;
  margin: 0;
}
@media (max-width: 760px) {
  .atlas-layout { grid-template-columns: minmax(0, 1fr); gap: 12px; }
  .atlas-hero .map-frame { height: auto; aspect-ratio: 1.48; min-height: 0; }
  #profile { height: auto; max-height: none; overflow: visible; scrollbar-gutter: auto; }
  #scatter-card .compare-selects { grid-template-columns: minmax(0, 1fr); }
  #layer-list { display: flex; overflow-x: auto; padding-bottom: 3px; }
  .layer { display: grid; flex: 0 0 10rem; align-content: start; gap: 5px; padding: 4px 4px 6px; }
  .layer canvas { margin: 0; }
  #feedback-board { grid-row: 3; }
}
.fact-map {
  display: block;
  width: min(100%, 21rem);
  height: auto;
  aspect-ratio: 2.36;
}
.fact-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 1px 7px;
  justify-content: center;
  align-items: center;
  color: #45554b;
  font-size: 0.74rem;
}
.fact-legend > span {
  position: relative;
  max-width: 100%;
  padding-inline-start: calc(.58em + 3px);
}
.fact-legend > span > span {
  display: inline-block;
  max-width: 100%;
}
.fact-legend > span::before {
  content: "";
  position: absolute;
  inset-inline-start: 0;
  top: calc(.5lh - .29em);
  width: 0.58em;
  height: 0.58em;
  border-radius: 50%;
  background: #215d51;
}
.fact-legend > span + span::before {
  background: #bc813f;
}
.fact-legend.same-tone > span + span::before {
  background: #215d51;
}

#layer-toggle { display: none; }
.fact-actions {
  margin-inline: calc(var(--fact-inset) - 32px);
  grid-column: 1 / -1;
  align-self: end;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  align-items: center;
  column-gap: clamp(.35rem, 1vw, .85rem);
  padding-top: .45rem;
  border-top: 1px solid #d8ceba;
}
.fact-source { justify-self: start; overflow-wrap: anywhere; }
.fact-explore, .fact-share, .point-action { font: 580 .88rem/1.2 var(--typeface); color: var(--green); }
.fact-explore, .fact-share {
  display: inline-flex;
  align-items: center;
  gap: .35em;
  padding: 0;
  min-height: 40px;
  white-space: nowrap;
  text-decoration: none;
}
.fact-actions svg { width: 1.15em; height: 1.15em; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.fact-share::before { content: ""; height: 1em; border-left: 1px solid #c8c1af; margin-right: .35em; }
.fact-explore:hover, .fact-share:hover { text-decoration: underline; text-underline-offset: 3px; }
.point-action { border: 1px solid #a8b6a5; border-radius: .4rem; padding: .45rem .7rem; width: fit-content; }
.point-action:hover { background: #e8eedf; }
.detail-province:has(.point-action) { display: grid; grid-template-columns: auto minmax(0,1fr); }
.point-action { grid-column: 1 / -1; }
@media (max-width: 760px) {
  .atlas-hero > .layers { position: relative; z-index: 5; min-width: 0; width: 100%; }
  .map-surface { display: flex; flex-direction: column; }
  .map-surface .map-legend {
    position: static; order: -1; min-height: 0; max-width: none; padding: 7px 10px;
    border: 1px solid var(--line); border-bottom: 0; border-radius: 8px 8px 0 0;
  }
  .map-surface .map-frame { border-radius: 0 0 8px 8px; }
  #layer-toggle {
    width: 100%; display: flex; align-items: center; gap: .7rem; text-align: left;
    background: #fffdf5; border: 1px solid #bec9b8; border-radius: 7px;
    min-height: 44px; padding: .4rem .85rem; color: var(--green); font-weight: 620;
  }
  #layer-toggle::after { content: ""; margin-left: auto; width: .45em; height: .45em; border: solid currentColor; border-width: 0 1.5px 1.5px 0; transform: rotate(45deg); }
  #layer-toggle[aria-expanded="true"]::after { transform: rotate(225deg); }
  #layer-list {
    position: absolute; inset: calc(100% + 4px) 0 auto; display: block; margin: 0;
    max-height: min(46dvh, 22rem); overflow: auto; overscroll-behavior: contain;
    padding: 4px; border: 1px solid #bbc7b6; border-radius: 8px;
    background: #fffdf6; box-shadow: 0 7px 24px #19382830;
  }
  #layer-list .layer {
    display: flex; align-items: center; justify-content: space-between; width: 100%;
    min-height: 44px; padding: 8px 10px; background: transparent; color: var(--ink);
    border: 0; text-align: left; font-size: 1rem; font-weight: 510;
  }
  #layer-list .layer[aria-pressed="true"] { background: #dfebdc; color: var(--green); font-weight: 650; }
  #layer-list .layer[aria-pressed="true"]::after {
    content: ""; width: 6px; height: 11px; border: solid currentColor;
    border-width: 0 2px 2px 0; transform: translateY(-2px) rotate(45deg);
  }
  #layer-list canvas { display: none; }
}

.table-card { scroll-margin-top: 12px; }
#ranking .rank-target { box-shadow: inset 4px 0 #276352; background: #e0ecdc; }
.crop-share-note { color: var(--muted); font-size: .9rem; margin: .4rem 0 .6rem; }

.axis-control { display: block; position: relative; }
.axis-caption { display: none; }
@media (max-width: 760px) {
  .axis-control { margin-top: 4px; }
  .axis-caption {
    display: flex; align-items: center; min-height: 41px; box-sizing: border-box;
    padding: 6px 30px 6px 11px; border: 1px solid var(--line); border-radius: 4px;
    background: #fffdf8; line-height: 1.25; overflow-wrap: anywhere;
  }
  .axis-control::after {
    content: ""; position: absolute; top: 50%; right: 13px; width: 7px; height: 7px;
    border: solid currentColor; border-width: 0 1.5px 1.5px 0;
    transform: translateY(-70%) rotate(45deg); pointer-events: none;
  }
  .axis-control select { position: absolute; inset: 0; height: 100%; margin: 0; opacity: 0; }
  .axis-control:has(select:focus-visible) { outline: 3px solid #ca8138; outline-offset: 2px; }
}

.compare-views, .pair-topic-label { display: none; }
@media (max-width: 720px) {
  .compare-views {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 4px;
    padding: 4px;
    margin-bottom: 14px;
    border-radius: 9px;
    background: #eaeade;
  }
  .compare-views button {
    min-height: 44px;
    padding: 4px 6px;
    border-radius: 6px;
    font-size: .93rem;
    font-weight: 600;
    line-height: 1.15;
  }
  .compare-views button[aria-pressed="true"] { background: #204d41; color: #fffdf5; }
  #compare:not([data-view="kiyas"]) #compare-card,
  #compare:not([data-view="grafik"]) #scatter-card,
  #compare:not([data-view="siralama"]) #ranking-card,
  #compare[data-view="siralama"] .compare-grid { display: none; }
  #compare .table-card { margin: 0; }
  #compare .pair-heading h2, #compare .table-heading h2, #chart-title { display: none; }
  #compare .pair-heading { display: grid; gap: 4px; }
  .pair-topic-label { display: block; }
  #compare .pair-heading select, #compare .table-heading label { max-width: none; width: 100%; }
  #compare #scatter-card {
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: start;
    column-gap: 8px;
  }
  #compare[data-view="grafik"] #scatter-card { display: grid; }
  #compare #scatter-card .compare-selects { grid-row: 1; grid-column: 1; }
  #compare .scatter-heading { grid-row: 1; grid-column: 2; margin: 0; }
  #compare #chart, #compare #chart-detail { grid-column: 1 / -1; }
  #expanded-chart .card {
    grid-template-columns: minmax(0, 1fr) auto;
    grid-template-rows: auto minmax(270px, 1fr) 7.5rem;
    gap: 8px;
  }
  #expanded-chart .scatter-heading { grid-area: 1 / 2; align-self: start; margin: 0; }
  #expanded-chart .compare-selects { grid-area: 1 / 1; }
  #expanded-chart #chart, #expanded-chart #chart-detail { grid-column: 1 / -1; }
  #scatter-card .detail-province {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    min-height: 44px;
  }
  #scatter-card .point-action { grid-column: 3; min-height: 44px; }
}
@media (pointer: coarse) and (orientation: landscape) and (min-width: 721px) {
  .compare-grid #chart { flex: none; }
}

@media (max-width:720px) {
  #forest-picker { width: 155px; max-width: 100%; }
}
@media (min-width:365px) and (max-width:720px) {
  .map-toolbar:has(#forest-picker:not([hidden])) { max-width:calc(100% - 40px); }
  .map-toolbar:has(#forest-picker:not([hidden])) .search select { max-width:108px; }
}

.atlas-arrow {
  display: inline-block;
  width: 1em;
  height: 1em;
  flex: none;
  vertical-align: -.12em;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
}

@media (orientation: landscape) and (min-width: 520px) and (max-height: 500px) {
  #expanded-chart .card {
    grid-template-columns: minmax(0, 1fr) clamp(210px, 32vw, 300px);
    grid-template-rows: auto auto minmax(0, 1fr);
    padding: 10px;
    gap: 6px 12px;
  }
  #expanded-chart #chart { grid-area: 1 / 1 / -1 / 2; }
  #expanded-chart .scatter-heading { grid-area: 1 / 2; margin: 0; justify-content: flex-end; }
  #expanded-chart .compare-selects { grid-area: 2 / 2; grid-template-columns: 1fr; gap: 4px; }
  #expanded-chart #chart-detail {
    grid-area: 3 / 2;
    grid-template-columns: 1fr;
    gap: 4px;
    align-self: stretch;
    align-content: start;
    overflow-y: auto;
  }
  #expanded-chart .detail-province { min-height: 44px; display: flex; flex-wrap: wrap; gap: 4px; }
  #expanded-chart .point-action { margin-left: auto; }
}
