:root {
  --navy-950: #071a33;
  --navy-900: #0a2342;
  --navy-800: #10345f;
  --blue-700: #1261a6;
  --blue-600: #1479c9;
  --cyan-500: #1cb5c9;
  --ink: #172334;
  --muted: #617084;
  --line: #dce4ed;
  --soft: #f3f7fb;
  --surface: #ffffff;
  --green: #0a9b72;
  --green-soft: #e8f7f1;
  --orange: #e88619;
  --orange-soft: #fff3e2;
  --red: #dc3d4a;
  --red-soft: #fdecef;
  --gray: #8b97a7;
  --gray-soft: #f0f2f5;
  --shadow: 0 14px 40px rgba(14, 41, 72, 0.09);
  --radius: 18px;
}

:root.dark {
  --ink: #eaf1f8;
  --muted: #a8b5c5;
  --line: #2c4058;
  --soft: #0b2038;
  --surface: #102943;
  --navy-950: #04101e;
  --navy-900: #071a2e;
  --shadow: 0 14px 40px rgba(0, 0, 0, 0.22);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  min-width: 320px;
  color: var(--ink);
  background: var(--surface);
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Apple SD Gothic Neo", "Malgun Gothic", "Segoe UI", sans-serif;
  font-size: 15px;
  line-height: 1.65;
  word-break: keep-all;
}
button, input, select { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
button { color: inherit; }
a { color: inherit; text-decoration: none; }
.shell { width: min(1180px, calc(100% - 40px)); margin-inline: auto; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
.skip-link { position: fixed; top: 8px; left: 8px; z-index: 100; transform: translateY(-150%); padding: 10px 14px; background: #fff; color: #111; border-radius: 8px; }
.skip-link:focus { transform: translateY(0); }

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  color: #fff;
  background: rgba(7, 26, 51, 0.94);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(12px);
}
.header-inner { min-height: 72px; display: flex; align-items: center; justify-content: space-between; gap: 28px; }
.brand { display: inline-flex; align-items: center; gap: 12px; flex: 0 0 auto; }
.brand-mark { display: grid; place-items: center; width: 38px; height: 38px; border-radius: 11px; color: #06192e; background: linear-gradient(135deg, #e8f8ff, #47d4e2); font-weight: 900; font-size: 20px; }
.brand strong, .brand small { display: block; line-height: 1.3; }
.brand strong { font-size: 15px; }
.brand small { margin-top: 2px; color: #9eb2c8; font-size: 10px; letter-spacing: 0.03em; }
.main-nav { align-self: stretch; display: flex; align-items: stretch; gap: 22px; margin-left: auto; }
.main-nav a { position: relative; display: grid; place-items: center; padding-inline: 4px; color: #c5d2e0; font-size: 14px; font-weight: 600; }
.main-nav a:hover, .main-nav a.active { color: #fff; }
.main-nav a.active::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 3px; border-radius: 3px 3px 0 0; background: var(--cyan-500); }
.icon-button { width: 38px; height: 38px; border: 1px solid rgba(255,255,255,.2); border-radius: 50%; color: #fff; background: rgba(255,255,255,.06); cursor: pointer; }
.icon-button:hover { background: rgba(255,255,255,.14); }

.hero { position: relative; overflow: hidden; min-height: 430px; color: #fff; background: var(--navy-950); }
.hero::before, .hero::after { content: ""; position: absolute; border-radius: 50%; pointer-events: none; }
.hero::before { width: 620px; height: 620px; right: -100px; top: -270px; border: 1px solid rgba(73,207,224,.26); box-shadow: 0 0 0 70px rgba(45, 185, 205, .045), 0 0 0 150px rgba(45, 185, 205, .025); }
.hero::after { width: 340px; height: 340px; left: -150px; bottom: -270px; background: radial-gradient(circle, rgba(20,121,201,.25), transparent 68%); }
.hero-grid { position: relative; z-index: 1; min-height: 430px; display: grid; grid-template-columns: 1.4fr .6fr; align-items: center; gap: 80px; padding-block: 70px 80px; }
.eyebrow, .section-kicker { margin: 0 0 9px; color: var(--cyan-500); font-size: 11px; font-weight: 800; letter-spacing: .17em; }
.hero h1 { max-width: 760px; margin: 0; font-size: clamp(36px, 5.1vw, 63px); line-height: 1.2; letter-spacing: -.045em; }
.hero h1 span { color: #57cfdf; }
.hero-description { max-width: 640px; margin: 22px 0 0; color: #bacada; font-size: 17px; }
.hero-meta { display: flex; flex-wrap: wrap; gap: 8px 18px; margin-top: 28px; color: #92a8c0; font-size: 12px; }
.hero-meta span { display: inline-flex; align-items: center; gap: 5px; }
.hero-meta span:not(:last-child)::after { content: ""; width: 3px; height: 3px; margin-left: 13px; border-radius: 50%; background: #4e6b88; }
.hero-meta strong { color: #dce9f5; }
.hero-status { display: flex; align-items: center; justify-content: flex-end; gap: 27px; }
.ring { --progress: 58; position: relative; display: grid; place-items: center; width: 170px; height: 170px; flex: 0 0 auto; border-radius: 50%; background: conic-gradient(#40c7d8 calc(var(--progress) * 1%), rgba(255,255,255,.12) 0); box-shadow: 0 0 45px rgba(28,181,201,.12); }
.ring::before { content: ""; position: absolute; inset: 11px; border-radius: 50%; background: var(--navy-950); }
.ring div { position: relative; z-index: 1; text-align: center; }
.ring strong, .ring span { display: block; }
.ring strong { font-size: 35px; line-height: 1.1; }
.ring span { margin-top: 4px; color: #9eb2c8; font-size: 11px; }
.hero-legend { min-width: 90px; }
.hero-legend p { display: grid; grid-template-columns: 9px 24px auto; align-items: center; gap: 8px; margin: 10px 0; color: #aebed0; font-size: 12px; }
.hero-legend strong { color: #fff; font-size: 15px; }

.summary-section { position: relative; z-index: 2; margin-top: -35px; }
.section { padding-block: 86px; scroll-margin-top: 72px; }
.section-heading { display: flex; align-items: flex-end; justify-content: space-between; gap: 28px; margin-bottom: 30px; }
.section-heading.compact { margin-bottom: 18px; padding: 24px 28px 0; color: #fff; background: transparent; }
.section-heading h2, .guide-grid h2 { margin: 0; font-size: clamp(25px, 3vw, 34px); line-height: 1.25; letter-spacing: -.035em; }
.section-heading > p { max-width: 520px; margin: 0 0 3px; color: var(--muted); font-size: 13px; text-align: right; }
.section-heading.compact h2 { color: #fff; font-size: 19px; }
.section-heading.compact > p { color: #bed0e2; }
.summary-section::before { content: ""; position: absolute; inset: 0 0 auto; height: 122px; z-index: -1; border-radius: var(--radius) var(--radius) 0 0; background: linear-gradient(120deg, var(--navy-800), #154e78); }
.kpi-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; padding: 0 16px 18px; }
.kpi-card { position: relative; min-height: 138px; padding: 23px 22px 20px; border: 1px solid var(--line); border-radius: 15px; background: var(--surface); box-shadow: var(--shadow); }
.kpi-card p { margin: 0 0 11px; color: var(--muted); font-size: 12px; font-weight: 600; }
.kpi-card strong { font-size: 36px; line-height: 1; letter-spacing: -.04em; }
.kpi-card small { margin-left: 5px; color: var(--muted); }
.kpi-card .kpi-icon { position: absolute; right: 18px; bottom: 16px; display: grid; place-items: center; width: 37px; height: 37px; border-radius: 12px; color: var(--blue-600); background: #eaf4fc; font-weight: 800; }
.kpi-card.primary .kpi-icon { color: var(--green); background: var(--green-soft); }
.kpi-card.warning .kpi-icon { color: var(--orange); background: var(--orange-soft); }

.muted-section { background: var(--soft); }
.matrix-layout { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 18px; }
.panel { border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); box-shadow: 0 10px 25px rgba(14,41,72,.05); }
.matrix-panel { padding: 22px; overflow-x: auto; }
.matrix-chart { min-width: 680px; display: grid; grid-template-columns: 144px repeat(5, minmax(92px, 1fr)); border-top: 1px solid var(--line); border-left: 1px solid var(--line); }
.matrix-corner, .matrix-head, .matrix-country, .matrix-cell { min-height: 48px; display: grid; place-items: center; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.matrix-corner, .matrix-head { min-height: 52px; color: var(--muted); background: var(--soft); font-size: 11px; font-weight: 700; }
.matrix-country { place-items: center start; padding-left: 14px; font-size: 12px; font-weight: 700; }
.matrix-cell { border-top: 0; border-left: 0; background: transparent; }
button.matrix-cell { cursor: pointer; }
button.matrix-cell:hover { background: var(--soft); }
.matrix-cell.empty { color: #cad3dc; }
.matrix-bubble { display: grid; place-items: center; width: 25px; height: 25px; border-radius: 50%; color: #fff; font-size: 10px; font-weight: 800; box-shadow: 0 5px 12px rgba(0,0,0,.12); }
.matrix-bubble.size-2 { width: 31px; height: 31px; }
.matrix-bubble.size-3 { width: 37px; height: 37px; }
.matrix-bubble.green { background: var(--green); }
.matrix-bubble.orange { background: var(--orange); }
.matrix-bubble.red { background: var(--red); }
.focus-panel { padding: 25px; }
.panel-title-row { display: flex; align-items: center; justify-content: space-between; gap: 15px; margin-bottom: 15px; }
.panel-title-row h3 { margin: 0; font-size: 20px; }
.count-badge { display: grid; place-items: center; min-width: 32px; height: 32px; padding-inline: 8px; border-radius: 50%; color: #fff; background: var(--navy-800); font-size: 12px; font-weight: 800; }
.focus-list { display: grid; gap: 4px; }
.focus-item { width: 100%; display: grid; grid-template-columns: 10px 1fr 10px; align-items: center; gap: 12px; padding: 12px 4px; border: 0; border-bottom: 1px solid var(--line); text-align: left; background: transparent; cursor: pointer; }
.focus-item.static { grid-template-columns: 10px 1fr; cursor: default; }
.focus-item:hover strong { color: var(--blue-600); }
.focus-item small, .focus-item strong, .focus-item em { display: block; }
.focus-item small { color: var(--muted); font-size: 10px; }
.focus-item strong { margin: 1px 0 3px; font-size: 12px; line-height: 1.45; }
.focus-item em { color: var(--muted); font-size: 10px; font-style: normal; }

.portfolio-heading { align-items: center; }
.view-toggle { display: inline-flex; padding: 3px; border: 1px solid var(--line); border-radius: 10px; background: var(--soft); }
.view-toggle button { min-width: 62px; padding: 7px 12px; border: 0; border-radius: 7px; color: var(--muted); background: transparent; font-size: 12px; cursor: pointer; }
.view-toggle button.active { color: var(--ink); background: var(--surface); box-shadow: 0 2px 8px rgba(0,0,0,.08); font-weight: 700; }
.filter-bar { display: grid; grid-template-columns: minmax(250px, 1fr) 180px 150px auto; gap: 10px; padding: 14px; border: 1px solid var(--line); border-radius: 14px; background: var(--soft); }
.filter-bar input, .filter-bar select { width: 100%; height: 42px; border: 1px solid var(--line); border-radius: 9px; color: var(--ink); background: var(--surface); outline: none; }
.filter-bar input:focus, .filter-bar select:focus { border-color: var(--blue-600); box-shadow: 0 0 0 3px rgba(20,121,201,.11); }
.filter-bar select { padding: 0 32px 0 12px; }
.search-field { position: relative; }
.search-field > span:not(.sr-only) { position: absolute; left: 14px; top: 9px; color: var(--muted); font-size: 18px; }
.search-field input { padding: 0 14px 0 40px; }
.text-button { border: 0; color: var(--blue-600); background: transparent; font-size: 12px; font-weight: 700; cursor: pointer; }
.result-bar { display: flex; align-items: center; justify-content: space-between; gap: 15px; margin: 20px 2px 15px; color: var(--muted); font-size: 12px; }
.result-bar p { margin: 0; }
.result-bar strong { color: var(--ink); font-size: 14px; }
.excluded-toggle { display: inline-flex; align-items: center; gap: 7px; cursor: pointer; }
.mou-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.mou-card { position: relative; display: flex; flex-direction: column; min-height: 430px; padding: 22px; border: 1px solid var(--line); border-top: 3px solid var(--green); border-radius: 15px; background: var(--surface); box-shadow: 0 7px 22px rgba(14,41,72,.055); transition: transform .18s ease, box-shadow .18s ease; }
.mou-card:hover { transform: translateY(-3px); box-shadow: var(--shadow); }
.mou-card.orange { border-top-color: var(--orange); }
.mou-card.red { border-top-color: var(--red); }
.mou-card.gray { border-top-color: var(--gray); opacity: .72; }
.mou-card.minimal { min-height: 260px; }
.card-topline { display: flex; align-items: center; justify-content: space-between; gap: 10px; color: var(--muted); font-size: 9px; }
.status-badge { display: inline-flex; align-items: center; gap: 7px; width: max-content; padding: 5px 9px; border-radius: 999px; font-size: 10px; font-weight: 800; }
.status-badge.green { color: #087c5c; background: var(--green-soft); }
.status-badge.orange { color: #ac5e05; background: var(--orange-soft); }
.status-badge.red { color: #b42835; background: var(--red-soft); }
.status-badge.gray { color: #687587; background: var(--gray-soft); }
.status-dot { display: inline-block; width: 8px; height: 8px; flex: 0 0 auto; border-radius: 50%; }
.status-dot.green { background: var(--green); }
.status-dot.orange { background: var(--orange); }
.status-dot.red { background: var(--red); }
.status-dot.gray { background: var(--gray); }
.card-country-row { display: grid; grid-template-columns: 38px 1fr; align-items: start; gap: 12px; margin-top: 19px; }
.country-token { display: grid; place-items: center; width: 38px; height: 38px; border-radius: 12px; color: #fff; background: linear-gradient(135deg, var(--navy-800), var(--blue-600)); font-size: 13px; font-weight: 800; }
.card-country-row small { display: block; color: var(--blue-600); font-size: 10px; font-weight: 800; }
.card-country-row h3 { margin: 3px 0 0; font-size: 17px; line-height: 1.45; letter-spacing: -.025em; }
.card-summary { min-height: 69px; margin: 15px 0 12px; color: var(--muted); font-size: 12px; }
.tag-row { display: flex; flex-wrap: wrap; gap: 5px; }
.tag-row span { padding: 4px 8px; border-radius: 6px; color: #41617e; background: var(--soft); font-size: 9px; font-weight: 600; }
:root.dark .tag-row span { color: #bed0e2; }
.card-facts { display: grid; gap: 11px; margin: 18px 0 20px; padding: 15px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.card-facts div { display: grid; grid-template-columns: 64px 1fr; gap: 9px; }
.card-facts dt { color: var(--muted); font-size: 9px; font-weight: 700; }
.card-facts dd { margin: 0; font-size: 10px; line-height: 1.55; }
.card-facts dd strong { color: var(--blue-600); }
.card-action { display: flex; align-items: center; justify-content: space-between; width: 100%; margin-top: auto; padding: 7px 0 0; border: 0; color: var(--blue-600); background: transparent; font-size: 11px; font-weight: 800; cursor: pointer; }
.public-field { display: flex; align-items: center; justify-content: space-between; gap: 14px; margin-top: 28px; padding: 15px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.public-field span { color: var(--muted); font-size: 10px; }
.public-field strong { color: var(--blue-600); font-size: 12px; }
.limited-note { margin: auto 0 0; padding-top: 18px; color: var(--muted); font-size: 10px; }
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: 14px; }
table { width: 100%; min-width: 1040px; border-collapse: collapse; font-size: 11px; }
th, td { padding: 14px 12px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
th { color: var(--muted); background: var(--soft); font-size: 10px; white-space: nowrap; }
td:nth-child(1), td:nth-child(2), td:nth-child(4), td:nth-child(5) { white-space: nowrap; }
.table-title { padding: 0; border: 0; color: var(--ink); background: transparent; text-align: left; font-weight: 800; cursor: pointer; }
.table-title:hover { color: var(--blue-600); }
.empty-state { padding: 70px 20px; border: 1px dashed var(--line); border-radius: 14px; text-align: center; color: var(--muted); }
.empty-state strong { color: var(--ink); }
.empty-state p { margin: 5px 0 0; }

.guide-section { color: #fff; background: linear-gradient(125deg, var(--navy-950), #0c3458); }
.guide-grid { display: grid; grid-template-columns: 1fr 1.6fr; gap: 70px; align-items: center; }
.guide-intro { margin: 18px 0 0; color: #aabdd0; font-size: 13px; }
.legend-cards { display: grid; grid-template-columns: repeat(2, 1fr); gap: 11px; }
.legend-cards article { display: grid; grid-template-columns: 10px 1fr; align-items: start; gap: 12px; padding: 18px; border: 1px solid rgba(255,255,255,.1); border-radius: 13px; background: rgba(255,255,255,.055); }
.legend-cards strong { display: block; font-size: 13px; }
.legend-cards p { margin: 3px 0 0; color: #a8bdd0; font-size: 10px; }
.legend-cards .status-dot { margin-top: 6px; }
.site-footer { padding-block: 30px; color: #92a7bd; background: #051425; border-top: 1px solid rgba(255,255,255,.07); }
.footer-inner { display: flex; align-items: flex-end; justify-content: space-between; gap: 30px; }
.footer-inner strong { color: #d9e4ee; font-size: 13px; }
.footer-inner p { margin: 4px 0 0; font-size: 10px; }

.detail-dialog { width: min(720px, calc(100% - 30px)); max-height: min(860px, calc(100vh - 30px)); padding: 0; border: 0; border-radius: 20px; color: var(--ink); background: var(--surface); box-shadow: 0 30px 100px rgba(0,0,0,.35); overflow: hidden auto; }
.detail-dialog::backdrop { background: rgba(3,13,27,.72); backdrop-filter: blur(4px); }
.dialog-close { position: absolute; right: 17px; top: 15px; z-index: 2; display: grid; place-items: center; width: 36px; height: 36px; border: 1px solid rgba(255,255,255,.25); border-radius: 50%; color: #fff; background: rgba(0,0,0,.1); font-size: 22px; cursor: pointer; }
.dialog-header { padding: 34px 38px 32px; color: #fff; background: linear-gradient(130deg, var(--navy-950), var(--navy-800)); }
.dialog-header > p { margin: 12px 0 0; color: #a9bed2; font-size: 10px; }
.dialog-header h2 { max-width: 600px; margin: 8px 0 0; font-size: 28px; line-height: 1.35; }
.dialog-header .dialog-country { color: #57cfdf; font-size: 12px; font-weight: 800; }
.dialog-body { display: grid; gap: 0; padding: 12px 38px 34px; }
.dialog-body section { padding-block: 20px; border-bottom: 1px solid var(--line); }
.dialog-body section:last-child { border-bottom: 0; }
.dialog-body h3 { margin: 0 0 8px; color: var(--muted); font-size: 10px; letter-spacing: .05em; }
.dialog-body p { margin: 0; font-size: 13px; }
.dialog-body .tag-row { margin-top: 13px; }
.org-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 22px; }
.next-panel { padding-inline: 18px !important; border: 0 !important; border-radius: 12px; background: var(--soft); }
.next-panel strong { color: var(--blue-600); font-size: 15px; }
.next-panel p { margin-top: 3px; color: var(--muted); font-size: 10px; }
.dialog-metadata { display: flex; flex-wrap: wrap; gap: 8px 18px; color: var(--muted); font-size: 10px; }
.dialog-metadata strong { margin-left: 5px; color: var(--ink); }

@media (max-width: 1020px) {
  .hero-grid { grid-template-columns: 1fr auto; gap: 35px; }
  .hero-legend { display: none; }
  .kpi-grid { grid-template-columns: repeat(4, minmax(150px, 1fr)); overflow-x: auto; }
  .matrix-layout { grid-template-columns: 1fr; }
  .focus-list { grid-template-columns: repeat(2, 1fr); gap: 0 20px; }
  .filter-bar { grid-template-columns: minmax(240px, 1fr) repeat(2, 145px); }
  .filter-bar .text-button { grid-column: 1 / -1; justify-self: end; }
  .mou-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 760px) {
  .shell { width: min(100% - 28px, 1180px); }
  .header-inner { min-height: 64px; }
  .brand small, .main-nav { display: none; }
  .hero-grid { min-height: 470px; grid-template-columns: 1fr; align-content: center; gap: 36px; padding-block: 54px 65px; }
  .hero h1 { font-size: clamp(34px, 10vw, 48px); }
  .hero-status { justify-content: flex-start; }
  .ring { width: 128px; height: 128px; }
  .ring strong { font-size: 27px; }
  .summary-section { margin-top: -23px; }
  .section-heading.compact { padding-inline: 18px; }
  .section-heading.compact > p { display: none; }
  .kpi-grid { padding-inline: 9px; }
  .kpi-card { min-height: 125px; }
  .section { padding-block: 64px; }
  .section-heading { align-items: flex-start; flex-direction: column; gap: 10px; }
  .section-heading > p { text-align: left; }
  .portfolio-heading { flex-direction: row; align-items: center; }
  .filter-bar { grid-template-columns: 1fr 1fr; }
  .filter-bar .search-field { grid-column: 1 / -1; }
  .filter-bar label:nth-of-type(4) { grid-column: 1 / -1; }
  .mou-grid { grid-template-columns: 1fr; }
  .mou-card { min-height: 390px; }
  .focus-list { grid-template-columns: 1fr; }
  .guide-grid { grid-template-columns: 1fr; gap: 32px; }
  .legend-cards { grid-template-columns: 1fr; }
  .footer-inner { align-items: flex-start; flex-direction: column; }
  .dialog-header, .dialog-body { padding-left: 23px; padding-right: 23px; }
  .dialog-header h2 { font-size: 23px; }
}

@media (max-width: 480px) {
  body { word-break: normal; }
  .hero-meta { display: grid; gap: 5px; }
  .hero-meta span::after { display: none; }
  .filter-bar { grid-template-columns: 1fr; }
  .filter-bar .search-field, .filter-bar label:nth-of-type(4) { grid-column: auto; }
  .result-bar { align-items: flex-start; flex-direction: column; }
  .portfolio-heading { align-items: flex-start; flex-direction: column; }
  .org-grid { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; }
}
