/* =========================================================
   KOFIH Tanzania Office portal
   Tailwind 유틸리티 + 이 파일(컴포넌트, Container Queries, WebGL 히어로)
   ========================================================= */
:root {
  --forest: #0A4A27;      /* 기관 대표색 (기존 시안 유지) */
  --forest-deep: #06301A;
  --gold: #E3B23C;        /* 탄자니아 국기의 노랑을 톤다운 — 강조/포커스에만 사용 */
  --lake: #1C7FA8;        /* 탄자니아 국기의 파랑 — 데이터 허브 */
  --lake-deep: #125A78;
  --snow: #F3F5F1;        /* 킬리만자로 설원 */
  --ink: #14201A;
  --muted: #55615A;
  --line: #D7DDD6;
  --header-h: 4rem;
}
@media (min-width: 768px) { :root { --header-h: 5rem; } }

html { scroll-behavior: smooth; scroll-padding-top: var(--header-h); }
body { word-break: keep-all; line-height: 1.7; }

:focus-visible { outline: 3px solid var(--gold); outline-offset: 3px; border-radius: 2px; }

.skip-link {
  position: absolute; left: 1rem; top: -4rem; z-index: 100;
  background: var(--gold); color: var(--ink); padding: .6rem 1rem; font-weight: 600;
}
.skip-link:focus { top: 1rem; }

/* ---------- Header ---------- */
.site-header {
  position: fixed; inset: 0 0 auto; z-index: 50; color: #fff;
  transition: background-color .3s, color .3s, box-shadow .3s;
}
.site-header::before {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(to bottom, rgba(6, 48, 26, .6), rgba(6, 48, 26, 0));
  transition: opacity .3s;
}
.site-header[data-state="solid"],
.site-header.menu-open {
  background: rgba(243, 245, 241, .94);
  -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px);
  color: var(--forest);
  box-shadow: 0 1px 0 var(--line);
}
.site-header[data-state="solid"]::before,
.site-header.menu-open::before { opacity: 0; }
/* 휴대폰 메뉴는 화면 전체를 덮음 (아래 화면이 비쳐 보이지 않게) */
.site-header.menu-open { bottom: 0; overflow-y: auto; background: rgb(243, 245, 241); }
.header-inner { position: relative; height: var(--header-h); }

.brand { display: flex; align-items: baseline; gap: .6rem; line-height: 1; }
.brand-mark {
  font-family: Archivo, sans-serif; font-stretch: 80%; font-weight: 800;
  font-size: 1.65rem; letter-spacing: .01em;
}
.brand-sub { font-size: .875rem; font-weight: 500; opacity: .85; }

.nav-link { position: relative; padding: .5rem 0; }
.nav-link::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: .15rem; height: 2px;
  background: currentColor; transform: scaleX(0); transform-origin: left; transition: transform .25s;
}
.nav-link:hover::after, .nav-link[aria-current="true"]::after { transform: scaleX(1); }

.btn-login {
  align-items: center; border: 1.5px solid currentColor; border-radius: 999px;
  padding: .45rem 1.05rem; font-size: .875rem; font-weight: 600; transition: background-color .2s, color .2s, border-color .2s;
}
.btn-login:hover { background: var(--gold); border-color: var(--gold); color: var(--ink); }

.menu-btn { width: 2.75rem; height: 2.75rem; display: grid; place-items: center; }
.menu-icon-close { display: none; }
.menu-btn[aria-expanded="true"] .menu-icon-open { display: none; }
.menu-btn[aria-expanded="true"] .menu-icon-close { display: inline; }

.mobile-nav { position: relative; border-top: 1px solid var(--line); padding: .5rem 1.25rem 1.5rem; }
.mobile-nav a { display: block; padding: .85rem 0; font-size: 1.125rem; font-weight: 600; border-bottom: 1px solid var(--line); }
.mobile-nav .mobile-login { border-bottom: 0; color: var(--lake-deep); }

/* ---------- Hero ---------- */
.hero {
  position: relative; isolation: isolate; overflow: hidden;
  min-height: 100vh; min-height: 100svh;
  display: flex; flex-direction: column; justify-content: flex-end;
  color: #fff;
  /* WebGL을 쓸 수 없을 때 보이는 정적 배경 */
  background: #3c4b3e url("../img/hero-school.jpg") 50% 45% / cover no-repeat;
}
.hero-canvas {
  position: absolute; inset: 0; width: 100%; height: 100%; z-index: -2;
  opacity: 0; transition: opacity .8s ease;
}
.hero-canvas.is-ready { opacity: 1; }
.hero-shade {
  position: absolute; inset: 0; z-index: -1;
  background: linear-gradient(to top, rgba(6, 48, 26, .9) 0%, rgba(6, 48, 26, .55) 32%, rgba(6, 48, 26, 0) 64%);
}
.hero-inner { width: 100%; padding-top: calc(var(--header-h) + 2rem); padding-bottom: clamp(2rem, 5vw, 3.5rem); }

.hero-title {
  font-family: Archivo, "IBM Plex Sans KR", sans-serif;
  font-stretch: 72%; font-weight: 800;
  font-size: clamp(4.25rem, 15vw, 13.5rem);
  line-height: .84; letter-spacing: -.015em; margin: 0;
  text-wrap: balance;
}
.hero-title .line { display: block; overflow: hidden; padding-bottom: .05em; }
.hero-title .line > span { display: inline-block; will-change: transform; }
.js-intro .hero-title .line > span { transform: translateY(110%); }

.hero-gloss {
  margin-top: 1.5rem; max-width: 34rem;
  font-size: clamp(1rem, 1.5vw, 1.2rem); line-height: 1.65; color: rgba(255, 255, 255, .92);
}
.hero-gloss [lang="en"] {
  display: block; margin-bottom: .3rem;
  font-family: Archivo, sans-serif; font-stretch: 90%; font-weight: 600; color: var(--gold);
}

.hero-quick {
  border-top: 1px solid rgba(255, 255, 255, .25);
  background: rgba(6, 48, 26, .4);
  -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
}
.hero-quick ul { display: grid; grid-template-columns: 1fr; }
.hero-quick li + li { border-top: 1px solid rgba(255, 255, 255, .15); }
@media (min-width: 640px) {
  .hero-quick ul { grid-template-columns: repeat(3, 1fr); }
  .hero-quick li + li { border-top: 0; border-left: 1px solid rgba(255, 255, 255, .15); }
}
.quick-link {
  display: flex; align-items: center; gap: .9rem; height: 100%;
  padding: 1rem 1.25rem; transition: background-color .25s;
}
@media (min-width: 768px) { .quick-link { padding: 1.35rem 2rem; } }
.quick-link:hover { background: rgba(255, 255, 255, .1); }
.quick-icon { width: 1.6rem; height: 1.6rem; flex: none; fill: none; stroke: var(--gold); stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.quick-title { display: block; font-weight: 600; font-size: 1.05rem; line-height: 1.3; }
.quick-desc { display: block; font-size: .85rem; opacity: .78; }

.photo-credit {
  position: absolute; right: 1.25rem; top: calc(var(--header-h) + 1rem);
  font-size: .75rem; color: rgba(255, 255, 255, .7); display: none;
}
@media (min-width: 768px) { .photo-credit { display: block; right: 2rem; } }

/* ---------- Sections ---------- */
.section { padding-block: clamp(4.5rem, 10vw, 8rem); }
.section-title {
  font-size: clamp(1.85rem, 3.6vw, 2.75rem); line-height: 1.25;
  font-weight: 700; letter-spacing: -.02em; color: var(--forest);
}
.sub-title { font-size: 1.25rem; font-weight: 700; color: var(--forest); }
.lede { color: var(--muted); max-width: 38rem; }
.prose-ko p { max-width: 38rem; margin-bottom: 1.1rem; font-size: 1.0625rem; }
.text-link {
  font-weight: 600; color: var(--forest);
  text-decoration: underline; text-decoration-thickness: 1.5px; text-underline-offset: .25em;
}
.text-link:hover { color: var(--lake-deep); }
.empty { padding: 2rem 0; color: var(--muted); }

.focus-list {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(14rem, 1fr));
  column-gap: 2rem; margin-top: 2.25rem; border-top: 1px solid var(--line);
}
.focus-list > div { padding: 1.1rem 0; border-bottom: 1px solid var(--line); }
.focus-list dt { font-weight: 700; color: var(--forest); }
.focus-list dd { color: var(--muted); font-size: .95rem; margin-top: .2rem; }
.focus-link { display: block; color: inherit; text-decoration: none; }
.focus-link + .focus-link { margin-top: .35rem; }
.focus-link:hover, .focus-link:focus-visible { color: var(--forest); text-decoration: underline; text-underline-offset: 3px; }

.team-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(13rem, 1fr)); gap: 1.25rem 2rem; }
.team-card { display: flex; gap: .9rem; align-items: center; }
.avatar {
  width: 3.25rem; height: 3.25rem; flex: none; border-radius: 50%; overflow: hidden;
  background: var(--forest); color: #fff; display: grid; place-items: center; font-weight: 700;
}
.avatar img { width: 100%; height: 100%; object-fit: cover; }
.team-name { font-weight: 600; line-height: 1.35; }
.team-role { font-size: .875rem; color: var(--muted); }

/* ---------- Projects: timeline + Container Queries ---------- */
.filters { display: flex; flex-wrap: wrap; gap: .5rem; }
.chip {
  border: 1.5px solid var(--line); border-radius: 999px; background: #fff;
  padding: .4rem 1rem; font-size: .9rem; font-weight: 500; color: var(--ink);
  transition: background-color .2s, color .2s, border-color .2s;
}
.chip:hover { border-color: var(--forest); }
.chip[aria-pressed="true"] { background: var(--forest); border-color: var(--forest); color: #fff; }

.timeline { position: relative; margin-top: 3rem; padding-left: 1.75rem; }
.timeline::before,
.timeline-progress {
  content: ""; position: absolute; left: .35rem; top: 2.1rem; bottom: 1rem; width: 2px;
}
.timeline::before { background: var(--line); }
.timeline-progress { display: block; background: var(--forest); transform-origin: top; }

.project {
  position: relative; padding-block: 1.6rem; border-bottom: 1px solid var(--line);
  container-type: inline-size; container-name: project;
}
.project::before {
  content: ""; position: absolute; left: calc(-1.75rem + .35rem - 6px); top: 2.1rem;
  width: 14px; height: 14px; border-radius: 50%; background: #fff; border: 2px solid var(--forest);
}
.project[data-status="ongoing"]::before { background: var(--gold); border-color: var(--gold); }
.project[data-status="planned"]::before { border-style: dashed; border-color: var(--lake); }

.project-card { display: grid; gap: .35rem; }
.project-period {
  font-family: Archivo, sans-serif; font-stretch: 85%; font-weight: 600;
  font-size: .95rem; color: var(--muted); font-variant-numeric: tabular-nums;
}
.project-title { font-size: 1.2rem; font-weight: 700; line-height: 1.4; color: var(--ink); }
.project-title-en { font-size: .9rem; color: var(--muted); line-height: 1.4; }
.project-summary { margin-top: .5rem; max-width: 44rem; }
.project-meta { font-size: .875rem; color: var(--forest); margin-top: .35rem; }
.status {
  justify-self: start; align-self: start; white-space: nowrap;
  font-size: .8rem; font-weight: 600; padding: .2rem .65rem; border-radius: 4px;
  background: var(--snow); color: var(--muted);
}
.status-ongoing { background: #FBF0D2; color: #6B4E07; }
.status-planned { background: #E2EFF5; color: var(--lake-deep); }

/* 카드가 놓인 '컨테이너' 폭에 따라 레이아웃 전환 (뷰포트가 아니라 카드 자신 기준) */
@container project (min-width: 44rem) {
  .project-card { grid-template-columns: 10.5rem minmax(0, 1fr) auto; column-gap: 2.5rem; }
  .project-title { font-size: 1.35rem; }
}

/* ---------- Gallery: CSS Grid + Container Queries ---------- */
.gallery-grid {
  display: grid; grid-template-columns: repeat(2, 1fr);
  grid-auto-rows: clamp(9rem, 30vw, 15rem); grid-auto-flow: dense; gap: .5rem;
}
@media (min-width: 768px) { .gallery-grid { grid-template-columns: repeat(4, 1fr); gap: .75rem; } }
.tile { position: relative; overflow: hidden; border-radius: 6px; container-type: inline-size; background: #cfd6cd; }
.tile-wide { grid-column: span 2; }
.tile-tall { grid-row: span 2; }
.tile-big { grid-column: span 2; grid-row: span 2; }
.tile-btn { position: relative; display: block; width: 100%; height: 100%; cursor: zoom-in; }
.tile img { width: 100%; height: 100%; object-fit: cover; transition: transform .7s cubic-bezier(.2, .7, .2, 1); }
.tile-btn:hover img { transform: scale(1.04); }
.tile-caption {
  position: absolute; left: 0; right: 0; bottom: 0; text-align: left;
  padding: 2rem .85rem .7rem; color: #fff; font-size: .85rem; font-weight: 500; line-height: 1.4;
  background: linear-gradient(to top, rgba(0, 0, 0, .62), transparent);
}
@container (max-width: 10rem) { .tile-caption { display: none; } }
@container (min-width: 26rem) { .tile-caption { font-size: 1.05rem; padding: 3.5rem 1.2rem 1.1rem; } }

.gallery-dialog {
  width: min(64rem, calc(100vw - 9rem)); max-width: none; padding: 0; border: 0;
  background: transparent; color: #fff; overflow: visible;
}
@media (max-width: 639px) { .gallery-dialog { width: 94vw; } }
.gallery-dialog::backdrop { background: rgba(4, 18, 10, .9); }
.dlg-figure img {
  width: 100%; max-height: 72vh; object-fit: contain; border-radius: 4px; background: #050c08;
}
.dlg-caption { display: flex; justify-content: space-between; gap: 1rem; padding-top: 1rem; }
.dlg-title { font-weight: 700; font-size: 1.1rem; }
.dlg-text { color: rgba(255, 255, 255, .78); font-size: .95rem; max-width: 40rem; }
.dlg-count { font-family: Archivo, sans-serif; font-variant-numeric: tabular-nums; color: rgba(255, 255, 255, .7); white-space: nowrap; }
/* 이전·다음·닫기 버튼은 사진 크기와 상관없이 화면 기준 같은 자리에 고정 */
.dlg-btn {
  position: fixed; z-index: 1;
  width: 2.75rem; height: 2.75rem; display: grid; place-items: center; border-radius: 50%;
  border: 1.5px solid rgba(255, 255, 255, .4); color: #fff; background: rgba(4, 18, 10, .55);
  transition: background-color .2s;
}
.dlg-btn:hover { background: rgba(255, 255, 255, .18); }
.dlg-btn[data-dlg="prev"] { top: 50%; left: max(1rem, env(safe-area-inset-left)); transform: translateY(-50%); }
.dlg-btn[data-dlg="next"] { top: 50%; right: max(1rem, env(safe-area-inset-right)); transform: translateY(-50%); }
.dlg-close { top: max(1rem, env(safe-area-inset-top)); right: max(1rem, env(safe-area-inset-right)); }
@media (max-width: 639px) {
  .dlg-btn[data-dlg="prev"] { left: .5rem; }
  .dlg-btn[data-dlg="next"] { right: .5rem; }
}
.dlg-btn svg { width: 1.25rem; height: 1.25rem; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

/* ---------- News & partners ---------- */
.news-item { display: grid; grid-template-columns: 6.5rem 1fr; gap: 1rem; padding: 1.15rem 0; border-bottom: 1px solid var(--line); }
.news-list li:first-child .news-item { border-top: 1px solid var(--line); }
.news-date { font-family: Archivo, sans-serif; font-stretch: 85%; font-weight: 600; color: var(--muted); font-variant-numeric: tabular-nums; }
.news-cat { display: block; font-size: .8rem; font-weight: 600; color: var(--forest); }
.news-title { font-weight: 600; line-height: 1.5; }
a.news-item:hover .news-title { color: var(--lake-deep); text-decoration: underline; text-underline-offset: .2em; }

.partner-list li { padding: .9rem 0; border-bottom: 1px solid var(--line); }
.partner-list li:first-child { border-top: 1px solid var(--line); }
.partner-list a { font-weight: 600; }
.partner-list a:hover { color: var(--lake-deep); text-decoration: underline; text-underline-offset: .2em; }
.partner-note { display: block; font-size: .85rem; color: var(--muted); font-weight: 400; }

/* ---------- Data hub band ---------- */
.hub-band { background: var(--lake-deep); color: #fff; }
.ecg { width: 100%; max-width: 30rem; aspect-ratio: 10 / 3; }
.btn-primary {
  display: inline-flex; align-items: center; gap: .5rem;
  background: var(--gold); color: var(--ink); font-weight: 700;
  padding: .85rem 1.5rem; border-radius: 999px; transition: background-color .2s;
}
.btn-primary:hover { background: #F0C55A; }

/* ---------- Contact ---------- */
.contact-list > div { display: grid; grid-template-columns: 6.5rem 1fr; gap: 1rem; padding: 1rem 0; border-bottom: 1px solid var(--line); }
.contact-list > div:first-child { border-top: 1px solid var(--line); }
.contact-list dt { font-weight: 600; color: var(--forest); }
.map-frame { aspect-ratio: 4 / 3; border-radius: 6px; overflow: hidden; background: #dfe5dd; }
.map-frame iframe { width: 100%; height: 100%; border: 0; filter: saturate(.75); }

/* ---------- Footer & notices ---------- */
.site-footer { background: var(--forest-deep); color: #fff; }

.sample-note {
  position: fixed; left: 1rem; bottom: 1rem; z-index: 60; max-width: min(26rem, calc(100vw - 2rem));
  display: flex; gap: .75rem; align-items: flex-start;
  background: var(--gold); color: var(--ink); font-size: .85rem; line-height: 1.5;
  padding: .75rem 1rem; border-radius: 6px; box-shadow: 0 6px 24px rgba(0, 0, 0, .18);
}
.sample-note code { font-size: .8rem; background: rgba(255, 255, 255, .45); padding: 0 .25rem; border-radius: 3px; }
.sample-note button { font-weight: 700; line-height: 1; padding: .2rem; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition-duration: .01ms !important; animation-duration: .01ms !important; }
  .js-intro .hero-title .line > span { transform: none; }
}

/* =========================================================
   v2: 사업 상세, 데이터 포털, 공통 표
   ========================================================= */
.project-kind { display: block; margin-top: .2rem; font-family: "IBM Plex Sans KR", sans-serif; font-stretch: normal; font-size: .8rem; font-weight: 500; color: var(--muted); }
.project-body { container-type: inline-size; container-name: pbody; min-width: 0; }
.project-budget { margin-top: .35rem; font-size: .9rem; font-weight: 600; color: var(--ink); }

.project-more { margin-top: 1rem; }
.project-more > summary {
  display: inline-flex; align-items: center; gap: .4rem; cursor: pointer; list-style: none;
  font-size: .9rem; font-weight: 600; color: var(--forest);
  padding: .35rem .85rem; border: 1.5px solid var(--line); border-radius: 999px; transition: border-color .2s, background-color .2s;
}
.project-more > summary::-webkit-details-marker { display: none; }
.project-more > summary::after { content: ""; width: .45rem; height: .45rem; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: rotate(45deg) translateY(-2px); transition: transform .2s; }
.project-more[open] > summary::after { transform: rotate(-135deg) translateY(-1px); }
.project-more > summary:hover { border-color: var(--forest); }
.project-more[open] > summary { background: var(--forest); border-color: var(--forest); color: #fff; }

.more-grid { display: grid; gap: 1.5rem; margin-top: 1.25rem; padding: 1.25rem; background: var(--snow); border-radius: 6px; }
.more-grid h4 { font-size: .95rem; font-weight: 700; color: var(--forest); margin-bottom: .4rem; }
.more-grid p { font-size: .95rem; }
.more-list { display: grid; gap: .3rem; font-size: .95rem; }
.more-list li { position: relative; padding-left: 1rem; }
.more-list li::before { content: ""; position: absolute; left: 0; top: .7em; width: .4rem; height: 2px; background: var(--forest); }
.milestones li { display: grid; grid-template-columns: 4.5rem 1fr; gap: .5rem; font-size: .95rem; padding: .2rem 0; }
.milestones time { font-family: Archivo, sans-serif; font-stretch: 85%; font-weight: 600; color: var(--muted); font-variant-numeric: tabular-nums; }
.more-foot { margin-top: .85rem; font-size: .9rem; }
@container pbody (min-width: 38rem) {
  .more-grid { grid-template-columns: 1fr 1fr; column-gap: 2rem; }
  .more-wide { grid-column: 1 / -1; }
}

.table-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.plan-table, .data-table { width: 100%; border-collapse: collapse; font-size: .9rem; }
.plan-table th, .plan-table td, .data-table th, .data-table td { text-align: left; vertical-align: top; padding: .55rem .75rem .55rem 0; border-bottom: 1px solid var(--line); }
.plan-table thead th, .data-table thead th { font-size: .8rem; font-weight: 600; color: var(--muted); border-bottom: 1.5px solid var(--ink); white-space: nowrap; }
.plan-table tbody th { font-family: Archivo, sans-serif; font-weight: 700; white-space: nowrap; font-variant-numeric: tabular-nums; }
.plan-table .num, .data-table .num { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; padding-right: 1.25rem; }
.plan-table tr.is-now { background: #FBF0D2; }
.plan-table tr.is-now th, .plan-table tr.is-now td { padding-left: .5rem; }
.now-tag { margin-left: .4rem; font-family: "IBM Plex Sans KR", sans-serif; font-size: .7rem; font-weight: 600; color: #6B4E07; }

/* ---------- 데이터 포털 ---------- */
.page-head { background: var(--forest-deep); color: #fff; padding: calc(var(--header-h) + 3.5rem) 0 3rem; }
.page-title { font-family: Archivo, "IBM Plex Sans KR", sans-serif; font-stretch: 78%; font-weight: 800; font-size: clamp(2.75rem, 7vw, 5.5rem); line-height: .95; letter-spacing: -.01em; }
.page-lede { margin-top: 1rem; max-width: 40rem; color: rgba(255, 255, 255, .85); }
.summary-strip { display: grid; grid-template-columns: repeat(auto-fit, minmax(12rem, 1fr)); margin-top: 2.5rem; border-top: 1px solid rgba(255, 255, 255, .25); }
.summary-strip > div { padding: 1rem 1.5rem 0 0; }
.summary-strip dt { font-size: .85rem; color: rgba(255, 255, 255, .75); }
.summary-strip dd { font-family: Archivo, "IBM Plex Sans KR", sans-serif; font-stretch: 85%; font-weight: 700; font-size: 1.6rem; line-height: 1.3; }

.chart-box { margin-top: 1.75rem; }
.chart-box svg { display: block; width: 100%; height: auto; overflow: visible; }
.chart-legend { display: flex; flex-wrap: wrap; gap: .5rem 1.5rem; margin-top: 1rem; font-size: .875rem; }
.chart-legend span { display: inline-flex; align-items: center; gap: .45rem; }
.chart-legend i { width: .9rem; height: .9rem; border-radius: 2px; display: inline-block; }
.chart-legend i.line { height: 3px; border-radius: 0; }
.chart-legend i.dash { height: 0; border-top: 2px dashed var(--muted); background: none; }
.chart-note { margin-top: .75rem; font-size: .85rem; color: var(--muted); }
.ind-grid { display: grid; gap: 2.5rem 3rem; margin-top: 1.75rem; }
@media (min-width: 900px) { .ind-grid { grid-template-columns: 1fr 1fr; } }
.ind-title { font-weight: 700; font-size: 1.05rem; }
.ind-sub { font-size: .85rem; color: var(--muted); }
.data-table td.name { font-weight: 600; min-width: 12rem; }
.data-table a { color: var(--forest); font-weight: 600; text-decoration: underline; text-underline-offset: .2em; }
.source-note { margin-top: 1rem; font-size: .85rem; color: var(--muted); }
.project-anchor { scroll-margin-top: calc(var(--header-h) + 1rem); }
.ind-block + .ind-block { margin-top: 3rem; }
.more-list, .milestones { list-style: none; margin: 0; padding: 0; }

/* ---------- 언어 전환 ---------- */
.lang-switch { display: inline-flex; align-items: stretch; border: 1.5px solid currentColor; border-radius: 999px; overflow: hidden; font-size: .8rem; font-weight: 600; line-height: 1; }
.lang-switch button { padding: .42rem .75rem; color: inherit; transition: background-color .2s, color .2s; }
.lang-switch button + button { border-left: 1.5px solid currentColor; }
.lang-switch button:hover { background: rgba(255, 255, 255, .15); }
.lang-switch button[aria-pressed="true"] { background: var(--gold); color: var(--ink); }
.mobile-nav .lang-switch { color: var(--forest); font-size: .9rem; }
.mobile-nav .lang-switch button { padding: .6rem 1.1rem; }
html[lang="en"] body { word-break: normal; overflow-wrap: break-word; }

/* =========================================================
   v5: SNS 아이콘, 소식 페이지
   ========================================================= */
.social-links { gap: .15rem; list-style: none; margin: 0; padding: 0; }
.social-link {
  display: grid; place-items: center; width: 2.25rem; height: 2.25rem; border-radius: 50%;
  color: inherit; transition: background-color .2s, color .2s, transform .2s;
}
.social-link svg { width: 1.05rem; height: 1.05rem; }
.social-link.social-instagram svg { width: 1.2rem; height: 1.2rem; }
.social-link:hover { background: var(--gold); color: var(--ink); transform: translateY(-1px); }
.mobile-nav .social-links { color: var(--forest); gap: .5rem; }
.mobile-nav .social-link { width: 2.75rem; height: 2.75rem; border: 1.5px solid var(--line); }
.site-footer .social-link { border: 1px solid rgba(255, 255, 255, .3); margin-left: .35rem; }
.site-footer .social-links li:first-child .social-link { margin-left: 0; }

/* 소식 목록 */
.news-cats { display: flex; flex-wrap: wrap; gap: .5rem; }
.news-grid { display: grid; gap: 2.5rem 2rem; margin-top: 2.5rem; }
@media (min-width: 700px) { .news-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1060px) { .news-grid { grid-template-columns: repeat(3, 1fr); } }
.news-card { container-type: inline-size; }
.news-card a { display: grid; gap: .6rem; }
.news-thumb { aspect-ratio: 16 / 10; border-radius: 6px; overflow: hidden; background: var(--forest); display: grid; place-items: center; }
.news-thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s cubic-bezier(.2, .7, .2, 1); }
.news-thumb .brand-mark { color: rgba(255, 255, 255, .22); font-size: 2.6rem; }
.news-card a:hover .news-thumb img { transform: scale(1.04); }
.news-card a:hover .news-card-title { color: var(--lake-deep); text-decoration: underline; text-underline-offset: .2em; }
.news-card-meta { display: flex; gap: .75rem; align-items: baseline; font-size: .85rem; }
.news-card-meta time { font-family: Archivo, sans-serif; font-stretch: 85%; font-weight: 600; color: var(--muted); font-variant-numeric: tabular-nums; }
.news-card-title { font-size: 1.15rem; font-weight: 700; line-height: 1.45; }
.news-card-excerpt { color: var(--muted); font-size: .95rem; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.news-feature { grid-column: 1 / -1; }
@media (min-width: 700px) {
  .news-feature a { grid-template-columns: 1.35fr 1fr; gap: 2rem; align-items: center; }
  .news-feature .news-card-title { font-size: clamp(1.4rem, 2.4vw, 2rem); }
}

/* 소식 본문 */
.article { max-width: 46rem; }
.article-back { display: inline-flex; gap: .4rem; align-items: center; font-weight: 600; color: rgba(255, 255, 255, .85); }
.article-back:hover { color: #fff; text-decoration: underline; text-underline-offset: .2em; }
.article-title { font-size: clamp(1.9rem, 4vw, 3rem); font-weight: 700; line-height: 1.25; letter-spacing: -.015em; margin-top: 1rem; }
.article-cover { margin-top: -4rem; border-radius: 8px; overflow: hidden; box-shadow: 0 12px 40px rgba(0, 0, 0, .18); background: #cfd6cd; }
.article-cover img { width: 100%; max-height: 34rem; object-fit: cover; }
.article-body { font-size: 1.0625rem; line-height: 1.85; }
.article-body p { margin-bottom: 1.25rem; }
.article-body a { color: var(--forest); font-weight: 600; text-decoration: underline; text-underline-offset: .2em; overflow-wrap: anywhere; }
.share-row { display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; margin-top: 2.5rem; padding-top: 1.5rem; border-top: 1px solid var(--line); }
.share-row .social-link { border: 1.5px solid var(--line); color: var(--forest); }
.btn-login { white-space: nowrap; }
/* 1024~1279px: 메뉴, SNS, 언어, 로그인이 한 줄에 들어가도록 */
@media (min-width: 1024px) and (max-width: 1279px) {
  .header-inner .brand-sub { display: none; }
  .header-inner .social-link { width: 2rem; height: 2rem; }
}

/* hidden 속성이 Tailwind 의 display 클래스(grid, flex)보다 우선하도록 */
[hidden] { display: none !important; }

/* ---------- SNS 아이콘: 각 서비스 고유 색 (v5.1) ---------- */
.social-links { gap: .5rem; }
.social-link.social-x, .social-link.social-instagram, .social-link.social-facebook, .social-link.social-youtube {
  width: 2.5rem; height: 2.5rem; border-radius: .7rem; border: 0; color: #fff;
  box-shadow: 0 0 0 1.5px rgba(255, 255, 255, .55), 0 2px 8px rgba(0, 0, 0, .18);
  transition: transform .2s, box-shadow .2s, filter .2s;
}
.social-link.social-x svg { width: 1.2rem; height: 1.2rem; }
.social-link.social-instagram svg { width: 1.45rem; height: 1.45rem; }
.social-x { background: #000; }
.social-instagram { background: radial-gradient(circle at 30% 107%, #fdf497 0%, #fdf497 5%, #fd5949 45%, #d6249f 60%, #285aeb 90%); }
.social-facebook { background: #1877f2; }
.social-youtube { background: #ff0000; }
.social-link.social-x:hover, .social-link.social-instagram:hover, .social-link.social-facebook:hover, .social-link.social-youtube:hover {
  color: #fff; transform: translateY(-2px); filter: brightness(1.08);
  box-shadow: 0 0 0 1.5px rgba(255, 255, 255, .8), 0 6px 16px rgba(0, 0, 0, .28);
}
.social-x:hover { background: #000; }
.social-instagram:hover { background: radial-gradient(circle at 30% 107%, #fdf497 0%, #fdf497 5%, #fd5949 45%, #d6249f 60%, #285aeb 90%); }
.mobile-nav .social-link.social-x, .mobile-nav .social-link.social-instagram,
.site-footer .social-link.social-x, .site-footer .social-link.social-instagram { width: 2.75rem; height: 2.75rem; }
.site-footer .social-link { margin-left: 0; }
@media (min-width: 1024px) and (max-width: 1279px) {
  .header-inner .social-link.social-x, .header-inner .social-link.social-instagram { width: 2.25rem; height: 2.25rem; }
}

/* 회원가입 버튼 (머리글) */
.btn-signup {
  align-items: center; white-space: nowrap; border-radius: 999px; padding: .45rem 1.05rem; font-size: .875rem; font-weight: 700;
  background: var(--gold); color: var(--ink); border: 1.5px solid var(--gold); transition: background-color .2s, border-color .2s;
}
.btn-signup:hover { background: #F0C55A; border-color: #F0C55A; }
@media (min-width: 1024px) and (max-width: 1279px) {
  .header-inner .btn-signup, .header-inner .btn-login { padding: .4rem .8rem; }
}

/* ---------- 데이터 포털: 사업별 성과지표 ---------- */
.ind-tabs { display: flex; flex-wrap: wrap; gap: .5rem; }
.ind-tab { display: grid; grid-template-columns: auto 1fr; column-gap: .55rem; align-items: center; text-align: left;
  padding: .6rem .95rem; border: 1.5px solid var(--line); border-radius: 10px; background: #fff; transition: border-color .2s, box-shadow .2s; }
.ind-tab i { width: .7rem; height: .7rem; border-radius: 3px; grid-row: span 2; }
.ind-tab span { font-weight: 700; font-size: .95rem; line-height: 1.3; }
.ind-tab small { font-size: .75rem; color: var(--muted); }
.ind-tab:hover { border-color: var(--forest); }
.ind-tab[aria-selected="true"] { border-color: var(--forest); box-shadow: inset 0 0 0 1px var(--forest), 0 4px 14px rgba(6, 48, 26, .1); }
.ind-head { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 1rem; align-items: flex-start;
  padding: 1.25rem 1.25rem 1.25rem 1.5rem; background: #fff; border-radius: 10px; border-left: 5px solid var(--c, var(--forest)); }
.ind-head > div { max-width: 52rem; }
.ind-goal { margin-top: .6rem; font-size: .95rem; color: var(--ink); }
.ind-block .ind-grid { margin-top: 2rem; }
.kpi-grid { display: grid; gap: 1rem; margin-top: 2rem; grid-template-columns: repeat(auto-fill, minmax(16rem, 1fr)); }
.kpi-card { background: #fff; border-radius: 10px; padding: 1.1rem 1.2rem; box-shadow: inset 0 0 0 1px var(--line); }
.kpi-name { font-weight: 700; line-height: 1.45; min-height: 2.9em; }
.kpi-card dl { display: grid; gap: .45rem; margin-top: .9rem; font-size: .88rem; }
.kpi-card dl div { display: grid; grid-template-columns: 6.5rem 1fr; gap: .5rem; }
.kpi-card dt { color: var(--muted); }
.kpi-target { font-weight: 700; color: var(--forest); }
.data-table td.name .dot { display: inline-block; width: .6rem; height: .6rem; border-radius: 2px; margin-right: .5rem; vertical-align: .05em; }

/* ---------- 직원 소개 (KOFIH ODA TEAM) ---------- */
.team-band {
  position: relative; isolation: isolate; color: #fff; padding-block: clamp(4.5rem, 9vw, 7.5rem);
  background: #0d1712 url("../img/bg-image.jpg") 50% 35% / cover no-repeat;
}
.team-band::before { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(180deg, rgba(8, 18, 13, .86), rgba(8, 18, 13, .78) 45%, rgba(8, 18, 13, .9)); }
.team-title { font-family: Archivo, "IBM Plex Sans KR", sans-serif; font-weight: 800; font-size: clamp(1.6rem, 3vw, 2.2rem); letter-spacing: .01em; }
.team-lede { margin-top: .4rem; color: rgba(255, 255, 255, .72); }
.team-row { display: flex; flex-wrap: wrap; justify-content: center; gap: 2.25rem 2.5rem; margin: 3rem 0 0; padding: 0; list-style: none; }
.team-row.is-lead { margin-top: 3.5rem; }
.team-member { display: flex; flex-direction: column; align-items: center; text-align: center; width: 11rem; }
.team-photo {
  width: 9.5rem; height: 9.5rem; border-radius: 50%; overflow: hidden; display: grid; place-items: center;
  background: rgba(255, 255, 255, .1); box-shadow: 0 0 0 3px rgba(255, 255, 255, .14), 0 12px 30px rgba(0, 0, 0, .35);
  font: 300 2.6rem/1 Archivo, sans-serif; color: rgba(255, 255, 255, .85); transition: transform .35s cubic-bezier(.2, .7, .2, 1);
}
.team-row.is-lead .team-photo { width: 11rem; height: 11rem; }
.team-photo img { width: 100%; height: 100%; object-fit: cover; }
.team-member:hover .team-photo { transform: translateY(-4px) scale(1.02); }
.team-name { margin-top: 1.4rem; font-family: "Roboto", Archivo, "IBM Plex Sans KR", sans-serif; font-weight: 300; font-size: 1.45rem; line-height: 1.15; }
.team-role { margin-top: .9rem; font-family: Archivo, "IBM Plex Sans KR", sans-serif; font-weight: 800; font-size: .72rem; letter-spacing: .14em; text-transform: uppercase; line-height: 1.35; color: rgba(255, 255, 255, .92); }
html[lang="ko"] .team-role { letter-spacing: .04em; }
@media (max-width: 640px) {
  .team-row { gap: 1.75rem 1rem; }
  .team-member { width: 8.5rem; }
  .team-photo, .team-row.is-lead .team-photo { width: 7.5rem; height: 7.5rem; font-size: 2rem; }
  .team-name { font-size: 1.15rem; }
}

/* ---------- 갤러리 게시판 ---------- */
.gal-bar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 1rem; margin-bottom: 2rem; }
.gal-views { display: inline-flex; border: 1.5px solid var(--line); border-radius: 999px; overflow: hidden; background: #fff; }
.gal-views button { padding: .5rem 1.1rem; font-weight: 600; font-size: .9rem; color: var(--muted); }
.gal-views button[aria-selected="true"] { background: var(--forest); color: #fff; }
.album-grid { display: grid; gap: 2rem 1.5rem; grid-template-columns: repeat(auto-fill, minmax(17rem, 1fr)); list-style: none; margin: 0; padding: 0; }
.album-card { display: grid; gap: .45rem; }
.album-cover { position: relative; aspect-ratio: 4 / 3; border-radius: 10px; overflow: hidden; background: var(--forest); }
.album-cover img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s cubic-bezier(.2, .7, .2, 1); }
.album-card:hover .album-cover img { transform: scale(1.04); }
.album-count { position: absolute; right: .6rem; bottom: .6rem; background: rgba(6, 30, 18, .75); color: #fff; font-size: .78rem; font-weight: 600; padding: .2rem .6rem; border-radius: 999px; }
.album-meta { font-size: .82rem; color: var(--muted); font-family: Archivo, "IBM Plex Sans KR", sans-serif; }
.album-title { font-weight: 700; font-size: 1.1rem; line-height: 1.4; }
.album-card:hover .album-title { color: var(--lake-deep); text-decoration: underline; text-underline-offset: .2em; }
.photo-grid { columns: 3 18rem; column-gap: .9rem; list-style: none; margin: 0; padding: 0; }
.photo-grid li { break-inside: avoid; margin-bottom: .9rem; }
.photo-tile { position: relative; display: block; width: 100%; border-radius: 8px; overflow: hidden; cursor: zoom-in; background: #cfd6cd; }
.photo-tile img { display: block; width: 100%; height: auto; transition: transform .6s cubic-bezier(.2, .7, .2, 1); }
.photo-tile:hover img { transform: scale(1.03); }
.photo-cap { position: absolute; inset: auto 0 0 0; padding: 2.2rem .8rem .65rem; text-align: left; color: #fff; font-size: .88rem; font-weight: 600; line-height: 1.35;
  background: linear-gradient(to top, rgba(0, 0, 0, .65), transparent); opacity: 0; transition: opacity .25s; }
.photo-cap small { display: block; font-weight: 400; opacity: .8; }
.photo-tile:hover .photo-cap, .photo-tile:focus-visible .photo-cap { opacity: 1; }
@media (hover: none) { .photo-cap { opacity: 1; } }
#album-meta { margin-top: .75rem; }
.team-contact { margin-top: .35rem; font-size: .8rem; color: rgba(255, 255, 255, .78); overflow-wrap: anywhere; }
.team-contact + .team-contact { margin-top: .1rem; }
.team-contact:hover { color: #fff; text-decoration: underline; text-underline-offset: .2em; }

/* 바닥글 정책 링크 — 개인정보 처리방침은 눈에 띄게(굵게·색) */
.footer-links { font-size: .8rem; color: rgba(255, 255, 255, .7); }
.footer-links a { color: rgba(255, 255, 255, .85); text-decoration: underline; text-underline-offset: .2em; }
.footer-links a[href="privacy.html"] { color: var(--gold); font-weight: 700; }
.footer-links a:hover { color: #fff; }

/* 정책 문서 */
.policy h2 { margin-top: 2.75rem; margin-bottom: .9rem; font-size: 1.35rem; font-weight: 700; color: var(--forest); scroll-margin-top: calc(var(--header-h) + 1rem); }
.policy p { margin-bottom: 1rem; line-height: 1.8; }
.policy .data-table { margin: .5rem 0 1.25rem; }
.policy .data-table th[scope="row"] { width: 11rem; white-space: nowrap; color: var(--forest); }
.policy .more-list { margin-bottom: 1rem; }
.policy a { color: var(--forest); font-weight: 600; text-decoration: underline; text-underline-offset: .2em; }
.policy-toc { margin: 1.5rem 0 1rem; padding: 1rem 1.25rem; background: #fff; border-radius: 10px; box-shadow: inset 0 0 0 1px var(--line); }
.policy-toc ol { columns: 2 14rem; margin: 0; padding-left: 1.2rem; font-size: .92rem; line-height: 1.9; }
.policy-en { margin-top: 3rem; padding: 1.25rem 1.5rem; background: #fff; border-radius: 10px; box-shadow: inset 0 0 0 1px var(--line); }
.policy-en h2 { margin-top: 0; }

/* 데이터 포털 지표: 연도별/분기별 전환, 지역 범례, 빈 그래프 */
.view-toggle { display: inline-flex; margin-top: 1.5rem; border: 1.5px solid var(--line); border-radius: 999px; overflow: hidden; }
.view-toggle button { padding: .4rem 1rem; font-size: .875rem; font-weight: 600; color: var(--forest); background: #fff; }
.view-toggle button + button { border-left: 1.5px solid var(--line); }
.view-toggle button[aria-pressed="true"] { background: var(--forest); color: #fff; }
.chart-regions { display: flex; flex-wrap: wrap; gap: .25rem 1rem; margin-top: .4rem; font-size: .8rem; color: var(--muted); }
.chart-regions span { display: inline-flex; align-items: center; gap: .35rem; }
.chart-regions i { width: .9rem; height: 3px; display: inline-block; }
.chart-empty { display: grid; place-items: center; min-height: 9rem; border: 1px dashed var(--line); border-radius: 8px; color: var(--muted); font-size: .875rem; text-align: center; padding: 1rem; }
