:root {
  color-scheme: dark;
  --bg: #080b12;
  --bg-2: #0d121c;
  --panel: #101722;
  --panel-2: #141d2a;
  --panel-3: #182333;
  --ink: #f3f7fb;
  --muted: #9aa8b8;
  --faint: #6f7d8e;
  --line: #243142;
  --line-strong: #33465c;
  --cyan: #5ad7ff;
  --blue: #6aa6ff;
  --green: #63d99b;
  --coral: #ff8f70;
  --amber: #f4b95f;
  --violet: #b49cff;
  --shadow: 0 26px 70px rgba(0, 0, 0, 0.34);
  --radius: 8px;
  --max: 1180px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  background: var(--bg);
}

body {
  margin: 0;
  background:
    linear-gradient(180deg, #0a0f18 0%, #080b12 42%, #0b1018 100%);
  color: var(--ink);
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Apple SD Gothic Neo", "Pretendard", "Noto Sans KR", "Segoe UI", sans-serif;
  font-size: 16px;
  line-height: 1.62;
  letter-spacing: 0;
}

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

button,
input {
  font: inherit;
  letter-spacing: 0;
}

button {
  cursor: pointer;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  min-height: 64px;
  padding: 0 28px;
  background: rgba(8, 11, 18, 0.86);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(18px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 780;
  white-space: nowrap;
}

.brand-mark {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  color: var(--cyan);
  background: #101a27;
  border: 1px solid #294a61;
  border-radius: var(--radius);
}

.brand-mark svg {
  width: 22px;
  height: 22px;
}

.top-nav {
  display: flex;
  align-items: center;
  gap: 4px;
}

.top-nav a {
  padding: 8px 11px;
  color: var(--muted);
  border-radius: 6px;
  font-size: 14px;
  font-weight: 720;
}

.top-nav a:hover,
.top-nav a:focus-visible {
  color: var(--ink);
  background: #141d2a;
  outline: none;
}

.section {
  width: min(var(--max), calc(100% - 40px));
  margin: 0 auto;
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 0.86fr) minmax(480px, 1.14fr);
  gap: 52px;
  align-items: center;
  min-height: calc(100vh - 64px);
  padding: 72px 0 48px;
}

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

h1 {
  max-width: 9em;
  margin-bottom: 22px;
  font-size: clamp(48px, 7vw, 88px);
  line-height: 0.98;
  font-weight: 850;
}

.hero-lede {
  max-width: 650px;
  margin-bottom: 28px;
  color: var(--muted);
  font-size: 19px;
  line-height: 1.76;
}

.hero-lede strong {
  color: var(--ink);
  font-weight: 760;
}

.hero-actions,
.browser-toolbar,
.export-panel {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 18px;
  border: 1px solid transparent;
  border-radius: 7px;
  font-size: 15px;
  font-weight: 790;
}

.button.primary {
  color: #04111b;
  background: var(--cyan);
  box-shadow: 0 16px 36px rgba(90, 215, 255, 0.18);
}

.button.primary:hover,
.button.primary:focus-visible {
  background: #8ae5ff;
  outline: none;
}

.button.secondary {
  color: var(--ink);
  background: #111927;
  border-color: var(--line-strong);
}

.button.secondary:hover,
.button.secondary:focus-visible {
  border-color: var(--cyan);
  outline: none;
}

.hero-meta {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  max-width: 650px;
  margin: 28px 0 0;
}

.hero-meta div {
  min-width: 0;
  padding: 14px;
  background: rgba(16, 23, 34, 0.74);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.hero-meta dt {
  margin-bottom: 4px;
  color: var(--faint);
  font-size: 12px;
  font-weight: 780;
  text-transform: uppercase;
}

.hero-meta dd {
  margin: 0;
  overflow-wrap: anywhere;
  color: var(--ink);
  font-size: 13px;
  font-weight: 700;
}

.graph-panel {
  position: relative;
  min-height: 460px;
  overflow: hidden;
  background: linear-gradient(180deg, rgba(16, 23, 34, 0.96), rgba(11, 16, 24, 0.96));
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.graph-lines,
.major-map svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  color: #3c5872;
  pointer-events: none;
}

.graph-lines path,
.major-map path {
  fill: none;
  stroke: currentColor;
  stroke-width: 1.6;
  stroke-dasharray: 4 9;
}

.graph-node {
  position: absolute;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  min-width: 132px;
  padding: 14px 16px;
  color: var(--ink);
  background: #121b29;
  border: 1px solid var(--line-strong);
  border-left: 5px solid var(--blue);
  border-radius: var(--radius);
  box-shadow: 0 18px 42px rgba(0, 0, 0, 0.28);
  text-align: left;
}

.graph-node:hover,
.graph-node:focus-visible,
.map-node:hover,
.map-node:focus-visible {
  transform: translateY(-2px);
  border-color: var(--cyan);
  outline: none;
}

.graph-node strong,
.map-node strong {
  font-size: 15px;
  line-height: 1.35;
}

.graph-node span,
.map-node span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.graph-node.root {
  top: 188px;
  left: 50%;
  min-width: 178px;
  transform: translateX(-50%);
  border-left-color: var(--cyan);
  background: #0e2030;
}

.graph-node.root:hover,
.graph-node.root:focus-visible {
  transform: translateX(-50%) translateY(-2px);
}

.graph-node.national { top: 48px; left: 38px; border-left-color: var(--blue); }
.graph-node.local { top: 176px; left: 28px; border-left-color: var(--green); }
.graph-node.support { bottom: 46px; left: 44px; border-left-color: var(--coral); }
.graph-node.customs { top: 50px; right: 38px; border-left-color: var(--violet); }
.graph-node.relief { top: 174px; right: 30px; border-left-color: var(--green); }
.graph-node.business { right: 52px; bottom: 98px; border-left-color: var(--cyan); }
.graph-node.filing { right: 38px; bottom: 36px; border-left-color: var(--amber); }

.metrics {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 1px;
  overflow: hidden;
  margin-top: -8px;
  background: var(--line);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.metrics div {
  display: flex;
  min-height: 116px;
  flex-direction: column;
  justify-content: center;
  padding: 22px;
  background: #0f1621;
}

.metrics strong {
  color: var(--ink);
  font-size: 39px;
  line-height: 1;
  font-weight: 850;
}

.metrics span {
  margin-top: 8px;
  color: var(--muted);
  font-size: 14px;
  font-weight: 730;
}

.section-heading {
  max-width: 780px;
  margin-bottom: 28px;
}

.section-heading h2 {
  margin-bottom: 10px;
  font-size: clamp(30px, 4vw, 50px);
  line-height: 1.08;
  font-weight: 850;
}

.section-heading p {
  color: var(--muted);
  font-size: 17px;
  line-height: 1.72;
}

.split-section,
.graph-section,
.intro-grid,
.flow,
.roadmap,
.browser,
.sources,
.export {
  padding: 96px 0 0;
}

.comparison-grid,
.feature-grid,
.roadmap-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.feature-grid,
.roadmap-grid {
  grid-template-columns: repeat(3, 1fr);
}

.comparison-grid article,
.feature-card,
.roadmap-grid article {
  padding: 22px;
  background: #101722;
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.comparison-grid h3,
.feature-card h3,
.roadmap-grid h3 {
  margin-bottom: 12px;
  font-size: 20px;
  line-height: 1.28;
}

.comparison-grid ul {
  display: grid;
  gap: 10px;
  margin: 0;
  padding-left: 18px;
  color: var(--muted);
}

.feature-card {
  min-height: 238px;
}

.feature-icon {
  display: inline-flex;
  margin-bottom: 28px;
  color: var(--cyan);
  font-size: 13px;
  font-weight: 850;
}

.feature-card p,
.roadmap-grid p {
  color: var(--muted);
  font-size: 15px;
}

.roadmap-grid span {
  display: block;
  margin-top: 14px;
  color: var(--green);
  font-size: 13px;
  font-weight: 730;
  line-height: 1.55;
}

.major-map {
  position: relative;
  min-height: 460px;
  overflow: hidden;
  background: #101722;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.map-core,
.map-node {
  position: absolute;
  z-index: 2;
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-height: 72px;
  padding: 15px 17px;
  background: #121b29;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  color: var(--ink);
  text-align: left;
}

.map-core {
  top: 184px;
  left: 50%;
  width: 230px;
  min-height: 92px;
  transform: translateX(-50%);
  background: #0d2233;
  border-color: #326079;
}

.map-node {
  width: 170px;
}

.map-node.national { top: 48px; left: 74px; border-left: 5px solid var(--blue); }
.map-node.local { top: 44px; left: 50%; transform: translateX(-50%); border-left: 5px solid var(--green); }
.map-node.local:hover { transform: translateX(-50%) translateY(-2px); }
.map-node.customs { top: 48px; right: 74px; border-left: 5px solid var(--violet); }
.map-node.relief { bottom: 46px; left: 66px; border-left: 5px solid var(--green); }
.map-node.support { bottom: 42px; left: 36%; border-left: 5px solid var(--coral); }
.map-node.business { bottom: 42px; right: 30%; border-left: 5px solid var(--cyan); }
.map-node.filing { bottom: 50px; right: 60px; border-left: 5px solid var(--amber); }

.pipeline {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1px;
  overflow: hidden;
  margin-bottom: 20px;
  background: var(--line);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.pipeline div {
  display: flex;
  min-height: 116px;
  flex-direction: column;
  justify-content: center;
  padding: 18px;
  background: #101722;
}

.pipeline strong {
  font-size: 17px;
}

.pipeline span {
  color: var(--muted);
  font-size: 14px;
}

.type-table-wrap,
.browser-shell,
.source-list,
.export-panel {
  background: #101722;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: 0 18px 48px rgba(0, 0, 0, 0.22);
}

.type-table-wrap {
  overflow-x: auto;
}

table {
  width: 100%;
  border-collapse: collapse;
}

th,
td {
  padding: 15px 18px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
}

th {
  color: var(--muted);
  background: #0d141f;
  font-size: 13px;
  font-weight: 820;
}

td {
  font-size: 14px;
}

td span {
  color: var(--faint);
}

tr:last-child td {
  border-bottom: 0;
}

.browser-shell {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(360px, 0.95fr);
  overflow: hidden;
  min-height: 700px;
}

.browser-list {
  border-right: 1px solid var(--line);
}

.browser-toolbar {
  padding: 18px;
  border-bottom: 1px solid var(--line);
}

.search-field {
  display: flex;
  align-items: center;
  flex: 1 1 300px;
  min-width: 260px;
  height: 46px;
  gap: 10px;
  padding: 0 13px;
  color: var(--muted);
  background: #0c121b;
  border: 1px solid var(--line-strong);
  border-radius: 7px;
}

.search-field svg {
  width: 18px;
  height: 18px;
  flex: 0 0 auto;
}

.search-field input {
  width: 100%;
  min-width: 0;
  color: var(--ink);
  background: transparent;
  border: 0;
  outline: 0;
  font-size: 15px;
}

.search-field input::placeholder {
  color: #6e7c8d;
}

.result-count {
  color: var(--muted);
  font-size: 14px;
  font-weight: 740;
  white-space: nowrap;
}

.tabs {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding: 14px 18px;
  border-bottom: 1px solid var(--line);
}

.tab-button {
  flex: 0 0 auto;
  min-height: 34px;
  padding: 0 12px;
  color: var(--muted);
  background: #111927;
  border: 1px solid var(--line-strong);
  border-radius: 6px;
  font-size: 13px;
  font-weight: 780;
}

.tab-button[aria-selected="true"] {
  color: #04111b;
  background: var(--cyan);
  border-color: var(--cyan);
}

.item-list {
  max-height: 608px;
  overflow: auto;
}

.item-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  width: 100%;
  padding: 17px 18px;
  color: var(--ink);
  background: #101722;
  border: 0;
  border-bottom: 1px solid var(--line);
  text-align: left;
}

.item-row:hover,
.item-row:focus-visible {
  background: #141d2a;
  outline: none;
}

.item-row.active {
  background: #102538;
}

.item-row strong {
  display: block;
  overflow-wrap: anywhere;
  font-size: 15px;
  line-height: 1.35;
}

.item-row p {
  display: -webkit-box;
  overflow: hidden;
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.type-chip {
  align-self: start;
  padding: 4px 8px;
  color: var(--cyan);
  background: #0c2030;
  border: 1px solid #274d63;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 790;
  white-space: nowrap;
}

.empty-state {
  padding: 28px 18px;
  color: var(--muted);
  font-size: 14px;
  font-weight: 720;
}

.detail-panel {
  padding: 24px;
  background: #0d141f;
}

.detail-kicker {
  margin-bottom: 8px;
  color: var(--cyan);
  font-size: 13px;
  font-weight: 840;
}

.detail-panel h3 {
  margin-bottom: 12px;
  font-size: 28px;
  line-height: 1.18;
}

.detail-panel p {
  color: var(--muted);
}

.meta-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin: 20px 0;
}

.meta-grid div,
.criteria-block,
.relation-group,
.source-card {
  padding: 14px;
  background: #101722;
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.meta-grid span {
  display: block;
  color: var(--muted);
  font-size: 12px;
  font-weight: 780;
}

.meta-grid strong {
  display: block;
  margin-top: 4px;
  overflow-wrap: anywhere;
  font-size: 14px;
}

.relations {
  display: grid;
  gap: 10px;
}

.criteria-block {
  margin: 0 0 16px;
}

.criteria-block h4,
.relation-group h4 {
  margin: 0 0 10px;
  color: var(--muted);
  font-size: 13px;
}

.criteria-block ul {
  display: grid;
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.criteria-block li {
  display: grid;
  gap: 6px;
  padding: 10px;
  background: #0c121b;
  border: 1px solid var(--line);
  border-radius: 7px;
}

.criteria-block li > strong {
  font-size: 14px;
}

.criteria-block li div {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.criteria-block li div span {
  padding: 4px 7px;
  color: var(--muted);
  background: #121b29;
  border: 1px solid var(--line);
  border-radius: 6px;
  font-size: 12px;
}

.criteria-block li div span strong {
  color: var(--ink);
}

.criteria-block li p {
  margin: 0;
}

.relation-links {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.relation-link {
  max-width: 100%;
  padding: 5px 8px;
  color: var(--ink);
  background: #121b29;
  border: 1px solid var(--line-strong);
  border-radius: 6px;
  font-size: 12px;
  font-weight: 720;
  overflow-wrap: anywhere;
}

.relation-link:hover,
.relation-link:focus-visible {
  color: var(--cyan);
  border-color: var(--cyan);
  outline: none;
}

.source-list {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  overflow: hidden;
  background: var(--line);
}

.source-card {
  min-height: 184px;
  border: 0;
  border-radius: 0;
}

.source-card span {
  display: block;
  color: var(--muted);
  font-size: 12px;
  font-weight: 780;
}

.source-card strong {
  display: block;
  margin: 8px 0 10px;
  font-size: 16px;
  line-height: 1.35;
}

.source-card p {
  margin-bottom: 12px;
  color: var(--muted);
  font-size: 13px;
}

.source-card a {
  color: var(--cyan);
  font-size: 13px;
  font-weight: 780;
  overflow-wrap: anywhere;
}

.export-panel {
  justify-content: space-between;
  padding: 22px;
}

.export-panel strong,
.export-panel span {
  display: block;
  overflow-wrap: anywhere;
}

.export-panel span {
  margin-top: 5px;
  color: var(--muted);
  font-size: 14px;
}

.site-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  width: min(var(--max), calc(100% - 40px));
  margin: 92px auto 0;
  padding: 28px 0 34px;
  color: var(--muted);
  border-top: 1px solid var(--line);
  font-size: 13px;
  font-weight: 680;
}

.site-footer nav {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
}

.site-footer a {
  color: var(--ink);
}

.site-footer a:hover,
.site-footer a:focus-visible {
  color: var(--cyan);
  outline: none;
}

.legal-page {
  width: min(860px, calc(100% - 40px));
  margin: 0 auto;
  padding: 72px 0 40px;
}

.legal-page h1 {
  max-width: none;
  margin-bottom: 18px;
  font-size: 44px;
  line-height: 1.08;
}

.legal-page h2 {
  margin: 42px 0 12px;
  font-size: 24px;
}

.legal-page p,
.legal-page li {
  color: var(--muted);
}

.legal-page a {
  color: var(--cyan);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.legal-meta {
  color: var(--faint);
  font-size: 14px;
  font-weight: 680;
}

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

@media (max-width: 980px) {
  .site-header {
    padding: 0 18px;
  }

  .top-nav {
    display: none;
  }

  .hero {
    grid-template-columns: 1fr;
    gap: 28px;
    min-height: 0;
    padding-top: 54px;
  }

  .graph-panel,
  .major-map {
    min-height: 430px;
  }

  .metrics,
  .feature-grid,
  .roadmap-grid,
  .pipeline,
  .source-list {
    grid-template-columns: repeat(2, 1fr);
  }

  .browser-shell {
    grid-template-columns: 1fr;
  }

  .browser-list {
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .item-list {
    max-height: 420px;
  }
}

@media (max-width: 760px) {
  .section {
    width: min(100% - 28px, var(--max));
  }

  h1 {
    font-size: 44px;
  }

  .hero-lede {
    font-size: 17px;
  }

  .button,
  .hero-meta {
    width: 100%;
  }

  .hero-meta,
  .comparison-grid,
  .metrics,
  .feature-grid,
  .roadmap-grid,
  .pipeline,
  .source-list,
  .meta-grid {
    grid-template-columns: 1fr;
  }

  .graph-panel,
  .major-map {
    display: grid;
    grid-template-columns: 1fr;
    gap: 10px;
    min-height: 0;
    padding: 14px;
  }

  .graph-lines,
  .major-map svg {
    display: none;
  }

  .graph-node,
  .graph-node.root,
  .graph-node.root:hover,
  .graph-node.root:focus-visible,
  .map-core,
  .map-node,
  .map-node.local,
  .map-node.local:hover {
    position: static;
    width: 100%;
    min-width: 0;
    transform: none;
  }

  .metrics {
    margin-top: 0;
  }

  .split-section,
  .graph-section,
  .intro-grid,
  .flow,
  .roadmap,
  .browser,
  .sources,
  .export {
    padding-top: 68px;
  }

  .browser-toolbar {
    align-items: stretch;
  }

  .search-field {
    min-width: 100%;
  }

  .item-row {
    grid-template-columns: 1fr;
  }

  .type-chip {
    justify-self: start;
  }

  .site-footer {
    flex-direction: column;
    align-items: flex-start;
  }
}
