:root {
  --bg: #f6f5ef;
  --ink: #171717;
  --muted: #6e6a60;
  --line: #ded9ce;
  --panel: #fffdf8;
  --panel-strong: #f0eadf;
  --accent: #0f766e;
  --accent-dark: #0b4f4a;
  --accent-soft: #d9eee9;
  --signal: #c85032;
  --shadow: 0 18px 45px rgba(49, 44, 35, 0.12);
  --radius: 8px;
  --font-main: "Pretendard", "Apple SD Gothic Neo", "Malgun Gothic", system-ui, sans-serif;
  --font-serif: Georgia, "Times New Roman", serif;
}

* {
  box-sizing: border-box;
}

html {
  min-width: 320px;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-main);
}

body {
  min-height: 100vh;
  margin: 0;
}

a {
  color: inherit;
  text-decoration: none;
}

button,
input {
  font: inherit;
}

.app-shell {
  display: grid;
  grid-template-columns: 300px minmax(0, 1fr);
  min-height: 100vh;
}

.sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  border-right: 1px solid var(--line);
  background:
    linear-gradient(180deg, rgba(255, 253, 248, 0.96), rgba(241, 236, 226, 0.96)),
    radial-gradient(circle at 20% 0%, rgba(15, 118, 110, 0.14), transparent 34%);
  padding: 24px 18px;
  overflow-y: auto;
}

.brand {
  display: grid;
  grid-template-columns: 42px 1fr;
  gap: 12px;
  align-items: center;
  margin-bottom: 24px;
}

.brand-mark {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border: 1px solid rgba(15, 118, 110, 0.28);
  border-radius: var(--radius);
  background: var(--accent);
  color: white;
  font-family: var(--font-serif);
  font-size: 22px;
  line-height: 1;
}

.brand strong,
.brand small {
  display: block;
}

.brand strong {
  font-size: 18px;
}

.brand small {
  margin-top: 3px;
  color: var(--muted);
  font-size: 12px;
}

.search-box {
  display: block;
  margin-bottom: 18px;
}

.search-box input {
  width: 100%;
  min-height: 42px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 253, 248, 0.78);
  color: var(--ink);
  outline: none;
  padding: 10px 12px;
}

.search-box input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(15, 118, 110, 0.14);
}

.project-nav {
  display: grid;
  gap: 8px;
}

.project-link {
  display: grid;
  gap: 4px;
  border: 1px solid transparent;
  border-radius: var(--radius);
  padding: 12px;
  color: var(--muted);
}

.project-link.has-icon {
  grid-template-columns: 34px minmax(0, 1fr);
  align-items: center;
  column-gap: 10px;
}

.project-link-icon,
.project-card-icon,
.project-head-icon,
.policy-icon {
  display: block;
  width: 100%;
  aspect-ratio: 1;
  border: 1px solid rgba(15, 118, 110, 0.18);
  border-radius: var(--radius);
  background: var(--panel);
  object-fit: cover;
}

.project-link-icon {
  width: 34px;
  height: 34px;
}

.project-link-copy {
  display: grid;
  min-width: 0;
  gap: 4px;
}

.project-link strong {
  color: var(--ink);
  font-size: 14px;
}

.project-link span {
  overflow: hidden;
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.project-link:hover,
.project-link.is-active {
  border-color: rgba(15, 118, 110, 0.28);
  background: var(--accent-soft);
  color: var(--accent-dark);
}

.content {
  min-width: 0;
}

.topbar {
  position: sticky;
  z-index: 10;
  top: 0;
  display: flex;
  min-height: 68px;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  border-bottom: 1px solid var(--line);
  background: rgba(246, 245, 239, 0.88);
  padding: 0 36px;
  backdrop-filter: blur(18px);
}

.home-link {
  color: var(--muted);
  font-size: 14px;
  font-weight: 700;
}

.home-link:hover {
  color: var(--accent-dark);
}

.doc-tabs {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.doc-tab {
  display: inline-flex;
  min-height: 36px;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
  color: var(--muted);
  padding: 7px 11px;
  font-size: 13px;
  font-weight: 700;
}

.doc-tab:hover,
.doc-tab.is-active {
  border-color: var(--accent);
  background: var(--accent);
  color: white;
}

.view {
  width: min(1120px, calc(100% - 72px));
  margin: 0 auto;
  padding: 54px 0 72px;
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.12fr) minmax(280px, 0.88fr);
  gap: 38px;
  align-items: end;
  min-height: 320px;
  margin-bottom: 38px;
}

.eyebrow {
  margin: 0 0 14px;
  color: var(--signal);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  max-width: 760px;
  margin-bottom: 18px;
  font-family: var(--font-serif);
  font-size: clamp(42px, 7vw, 84px);
  font-weight: 500;
  line-height: 0.95;
}

.lead {
  max-width: 690px;
  margin-bottom: 0;
  color: #47433b;
  font-size: 18px;
  line-height: 1.75;
}

.status-panel {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
  box-shadow: var(--shadow);
  padding: 22px;
}

.status-panel h2 {
  margin-bottom: 16px;
  font-size: 16px;
}

.metric-list {
  display: grid;
  gap: 12px;
  margin: 0;
}

.metric {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  border-bottom: 1px solid var(--line);
  padding-bottom: 12px;
}

.metric:last-child {
  border-bottom: 0;
  padding-bottom: 0;
}

.metric dt {
  color: var(--muted);
  font-size: 13px;
}

.metric dd {
  margin: 0;
  font-weight: 800;
}

.project-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.project-card {
  display: grid;
  min-height: 220px;
  align-content: space-between;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
  padding: 20px;
  transition:
    transform 180ms ease,
    box-shadow 180ms ease,
    border-color 180ms ease;
}

.project-card:hover {
  border-color: rgba(15, 118, 110, 0.38);
  box-shadow: var(--shadow);
  transform: translateY(-3px);
}

.project-card-main {
  display: grid;
  gap: 16px;
}

.project-card-icon {
  width: 54px;
  height: 54px;
}

.project-card h2 {
  margin-bottom: 10px;
  font-size: 22px;
}

.project-card p {
  margin-bottom: 22px;
  color: var(--muted);
  line-height: 1.6;
}

.badge-row {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.badge {
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--panel-strong);
  color: #4c463d;
  padding: 5px 9px;
  font-size: 12px;
  font-weight: 800;
}

.project-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 24px;
  align-items: end;
  margin-bottom: 28px;
  border-bottom: 1px solid var(--line);
  padding-bottom: 28px;
}

.project-head h1 {
  margin-bottom: 14px;
  font-size: clamp(38px, 6vw, 72px);
}

.project-title-row,
.policy-title-row {
  display: grid;
  grid-template-columns: 72px minmax(0, 1fr);
  gap: 18px;
  align-items: start;
}

.project-head-icon {
  width: 72px;
  height: 72px;
  margin-top: 2px;
}

.policy-icon {
  width: 58px;
  height: 58px;
  margin-top: 3px;
}

.project-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 10px;
}

.action-button {
  display: inline-flex;
  min-height: 42px;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--accent);
  border-radius: var(--radius);
  background: var(--accent);
  color: white;
  padding: 10px 14px;
  font-size: 14px;
  font-weight: 800;
}

.action-button.secondary {
  border-color: var(--line);
  background: var(--panel);
  color: var(--accent-dark);
}

.document-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.document-link {
  display: grid;
  gap: 14px;
  min-height: 180px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
  padding: 22px;
}

.document-link:hover {
  border-color: rgba(15, 118, 110, 0.42);
  box-shadow: var(--shadow);
}

.document-link strong {
  font-size: 22px;
}

.document-link span {
  color: var(--muted);
  line-height: 1.65;
}

.doc-page {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 240px;
  gap: 34px;
  align-items: start;
}

.policy-document {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
  box-shadow: var(--shadow);
  padding: clamp(24px, 5vw, 52px);
}

.policy-document header {
  margin-bottom: 34px;
  border-bottom: 1px solid var(--line);
  padding-bottom: 24px;
}

.policy-document h1 {
  margin-bottom: 12px;
  font-size: clamp(34px, 5vw, 58px);
}

.policy-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  color: var(--muted);
  font-size: 13px;
}

.policy-section {
  margin-bottom: 30px;
}

.policy-section h2 {
  margin-bottom: 12px;
  font-size: 22px;
}

.policy-section p,
.policy-section li {
  color: #413d35;
  font-size: 16px;
  line-height: 1.85;
}

.policy-section ul {
  margin: 0;
  padding-left: 20px;
}

.toc {
  position: sticky;
  top: 94px;
  border-left: 2px solid var(--line);
  padding-left: 16px;
}

.toc strong {
  display: block;
  margin-bottom: 12px;
  font-size: 13px;
}

.toc-link {
  display: block;
  width: 100%;
  border: 0;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  font-size: 13px;
  line-height: 1.5;
  padding: 6px 0;
  text-align: left;
}

.toc-link:hover,
.toc-link:focus {
  color: var(--accent-dark);
}

.empty-state {
  border: 1px dashed var(--line);
  border-radius: var(--radius);
  background: rgba(255, 253, 248, 0.64);
  padding: 28px;
  color: var(--muted);
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
}

@media (max-width: 980px) {
  .app-shell {
    grid-template-columns: 1fr;
  }

  .sidebar {
    position: static;
    height: auto;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .project-nav {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .topbar {
    padding: 12px 20px;
  }

  .hero,
  .doc-page,
  .project-head {
    grid-template-columns: 1fr;
  }

  .project-title-row,
  .policy-title-row {
    grid-template-columns: 58px minmax(0, 1fr);
  }

  .project-head-icon,
  .policy-icon {
    width: 58px;
    height: 58px;
  }

  .project-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .project-actions {
    justify-content: flex-start;
  }

  .toc {
    position: static;
  }
}

@media (max-width: 640px) {
  .sidebar {
    padding: 18px 14px;
  }

  .project-nav,
  .project-grid,
  .document-grid {
    grid-template-columns: 1fr;
  }

  .topbar {
    align-items: flex-start;
    flex-direction: column;
    min-height: 0;
  }

  .project-title-row,
  .policy-title-row {
    grid-template-columns: 48px minmax(0, 1fr);
    gap: 12px;
  }

  .project-head-icon,
  .policy-icon {
    width: 48px;
    height: 48px;
  }

  .doc-tabs {
    justify-content: flex-start;
  }

  .view {
    width: min(100% - 32px, 1120px);
    padding: 34px 0 52px;
  }

  .hero {
    min-height: 0;
  }

  h1 {
    font-size: 42px;
  }

  .policy-document {
    padding: 22px;
  }
}
