:root {
  --bg: #eef3f9;
  --paper: #ffffff;
  --ink: #1f2630;
  --ink-soft: #505050;
  --brand: #1c5bbf;
  --brand-deep: #18489a;
  --accent: #ffbc4b;
  --mint: #e7f0ff;
  --line: #d8e1ef;
  --shadow: 0 10px 24px rgba(28, 56, 100, 0.09);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--ink);
  font-family: "Manrope", "Apple SD Gothic Neo", "Noto Sans KR", sans-serif;
  background:
    radial-gradient(circle at 16% 14%, #f7fbff 0, #eef3f9 46%),
    radial-gradient(circle at 85% 0%, #eaf2ff 0, transparent 42%);
  line-height: 1.7;
}

h1,
h2,
h3,
h4 {
  color: #141414;
  line-height: 1.25;
}

h1,
h2 {
  font-family: "Newsreader", "Noto Serif KR", serif;
}

a {
  color: var(--brand);
  text-decoration: none;
}

a:hover {
  color: var(--brand-deep);
}

.container {
  width: min(1100px, 92vw);
  margin: 0 auto;
}

.reading-progress {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 20;
  height: 4px;
  background: linear-gradient(90deg, var(--accent), var(--brand));
  width: 0;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  border-bottom: 1px solid rgba(13, 92, 99, 0.12);
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(8px);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  min-height: 64px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: #121212;
  font-weight: 800;
  letter-spacing: 0.01em;
}

.brand-mark {
  width: 28px;
  height: 28px;
  display: inline-grid;
  place-items: center;
  border-radius: 7px;
  color: #fff;
  background: linear-gradient(145deg, var(--brand), #178d7a);
  font-size: 0.88rem;
}

.menu-toggle {
  display: none;
  border: 1px solid #b9c8bf;
  border-radius: 999px;
  background: #fff;
  color: #1f1f1f;
  padding: 8px 12px;
  font-weight: 700;
}

.top-nav {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.top-nav a {
  border-radius: 999px;
  padding: 8px 12px;
  color: #3d4a44;
  font-weight: 600;
  font-size: 0.92rem;
}

.top-nav a.active,
.top-nav a:hover {
  color: #0d4f56;
  background: #dbefe9;
}

.page {
  padding: 20px 0 52px;
}

.hero {
  position: relative;
  overflow: hidden;
  border: 1px solid #dae8e2;
  border-radius: 14px;
  background: linear-gradient(155deg, #ffffff, #f2f7ff 58%, #eef5ff 100%);
  box-shadow: var(--shadow);
  padding: clamp(18px, 3.5vw, 30px);
}

.hero::after {
  content: "";
  position: absolute;
  right: -54px;
  top: -54px;
  width: 150px;
  height: 150px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(240, 180, 41, 0.24), transparent 70%);
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: #0a5056;
  text-transform: uppercase;
}

.eyebrow::before {
  content: "";
  width: 20px;
  height: 2px;
  background: var(--accent);
}

.lead {
  font-size: 1rem;
  color: #3a4756;
}

.hero-cta {
  margin-top: 22px;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 16px;
  border-radius: 999px;
  border: 1px solid transparent;
  font-weight: 700;
}

.btn.primary {
  color: #fff;
  background: linear-gradient(135deg, var(--brand), #138072);
}

.btn.secondary {
  color: #193733;
  border-color: #bdd6cd;
  background: #fff;
}

.page-grid {
  margin-top: 28px;
  display: grid;
  grid-template-columns: 1.35fr 1fr;
  gap: 18px;
}

.panel {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 20px;
  box-shadow: 0 10px 24px rgba(21, 38, 31, 0.04);
}

.panel h2,
.panel h3 {
  margin-top: 0;
}

.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 14px;
}

.card {
  display: block;
  border: 1px solid #d8e5de;
  border-radius: 14px;
  background: #fff;
  padding: 16px;
  transition: transform 160ms ease, border-color 160ms ease, box-shadow 160ms ease;
}

.card:hover {
  transform: translateY(-4px);
  border-color: #a7c6b8;
  box-shadow: 0 14px 28px rgba(13, 92, 99, 0.09);
}

.card .meta {
  margin: 0 0 7px;
  font-size: 0.79rem;
  color: #5b6d66;
  font-weight: 700;
}

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.chip {
  display: inline-flex;
  align-items: center;
  padding: 6px 10px;
  border-radius: 999px;
  border: 1px solid #d6e5de;
  font-size: 0.8rem;
  color: #35534d;
  background: #f6fcf8;
}

.stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 12px;
}

.stat {
  border-radius: 12px;
  border: 1px solid #dae6e1;
  background: #fdfefe;
  padding: 14px;
}

.stat strong {
  display: block;
  font-size: 1.32rem;
  color: #163f45;
}

.section {
  margin-top: 34px;
}

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

.kpi-table th,
.kpi-table td {
  border: 1px solid #d9e2de;
  padding: 10px 12px;
  text-align: left;
  vertical-align: top;
}

.kpi-table th {
  background: #f2f8f5;
  font-size: 0.9rem;
}

.notice {
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px solid #f1d894;
  background: #fff8e7;
  color: #6f4f07;
  font-size: 0.95rem;
}

.article-layout {
  display: grid;
  grid-template-columns: 250px minmax(0, 1fr);
  gap: 18px;
}

.article-toc {
  position: sticky;
  top: 96px;
  align-self: start;
  border: 1px solid #d9e3de;
  border-radius: 12px;
  background: #f9fcfa;
  padding: 14px;
}

.article-toc h3 {
  margin: 0 0 8px;
  font-size: 1rem;
}

.article-toc ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.article-toc li + li {
  margin-top: 7px;
}

.article-content {
  border: 1px solid #dae4df;
  border-radius: 16px;
  background: #fff;
  padding: clamp(20px, 3vw, 34px);
}

.article-content h1 {
  margin-top: 0;
}

.article-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 14px;
}

.article-meta span {
  display: inline-flex;
  font-size: 0.83rem;
  color: #48635b;
  background: #f2f9f5;
  border-radius: 999px;
  padding: 5px 10px;
}

.article-content blockquote {
  margin: 16px 0;
  border-left: 4px solid #9bbcaf;
  background: #f7fbf8;
  padding: 10px 14px;
}

.article-content pre {
  overflow: auto;
  border-radius: 12px;
  border: 1px solid #d4dfdb;
  background: #f7fbfd;
  padding: 14px;
  font-size: 0.9rem;
}

.article-controls {
  margin-bottom: 14px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.article-controls input {
  width: min(420px, 100%);
  border: 1px solid #ccd8d2;
  border-radius: 10px;
  padding: 10px 12px;
  font-size: 0.95rem;
}

.filter-btn {
  border-radius: 999px;
  border: 1px solid #c9d9d1;
  background: #fff;
  color: #2f4b45;
  font-weight: 700;
  font-size: 0.82rem;
  padding: 7px 11px;
  cursor: pointer;
}

.filter-btn.active {
  background: #d7efe6;
  border-color: #99bfaf;
}

.footer {
  border-top: 1px solid #d9e3de;
  background: #fbfdfb;
}

.footer-inner {
  min-height: 88px;
  display: flex;
  gap: 14px;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  color: #4a6058;
}

.footer-links {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.reveal {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 520ms ease, transform 520ms ease;
}

.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

@media (max-width: 920px) {
  .page-grid,
  .article-layout {
    grid-template-columns: 1fr;
  }

  .article-toc {
    position: static;
  }
}

@media (max-width: 760px) {
  .menu-toggle {
    display: inline-flex;
  }

  .top-nav {
    display: none;
    width: 100%;
    padding-bottom: 10px;
  }

  .top-nav.open {
    display: flex;
  }

  .header-inner {
    align-items: flex-start;
    flex-direction: column;
    padding: 10px 0;
  }

  .hero {
    border-radius: 16px;
  }
}

.tool-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.tool-box {
  border: 1px solid #d8e2dc;
  border-radius: 14px;
  background: #fff;
  padding: 16px;
}

.tool-box h3 {
  margin-top: 0;
}

.form-row {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 12px;
}

.form-row label {
  font-size: 0.9rem;
  color: #3f5952;
  font-weight: 700;
}

.form-row input,
.form-row select,
.form-row textarea {
  border: 1px solid #cad8d1;
  border-radius: 10px;
  padding: 10px 12px;
  font: inherit;
  background: #fbfffd;
}

.form-row textarea {
  resize: vertical;
  min-height: 220px;
  line-height: 1.58;
}

.mode-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-bottom: 12px;
}

.mode-tab {
  border: 1px solid #c8d7d0;
  border-radius: 12px;
  background: #f2f6f4;
  color: #314a43;
  font-weight: 800;
  padding: 9px 12px;
  cursor: pointer;
}

.mode-tab.active {
  border-color: #d4a149;
  background: #ffcc73;
  color: #22334a;
}

.mode-tab:disabled {
  opacity: 0.7;
  cursor: not-allowed;
}

.is-hidden {
  display: none !important;
}

.stopwatch-box {
  border: 1px solid #d4e0da;
  border-radius: 12px;
  background: #f8fcfa;
  padding: 10px;
  margin-bottom: 12px;
}

.stopwatch-display {
  border: 1px solid #d3ded8;
  border-radius: 10px;
  background: #fff;
  padding: 10px 14px;
  text-align: center;
  font-size: 2rem;
  font-weight: 800;
  letter-spacing: 0.03em;
  color: #2c4652;
}

.button-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-top: 9px;
}

.range-labels {
  display: flex;
  justify-content: space-between;
  font-size: 0.85rem;
  color: #577269;
}

.stats-strip {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin-bottom: 10px;
}

.stats-strip span {
  font-size: 0.86rem;
  color: #435d54;
  border: 1px solid #d8e4de;
  background: #f5f9ff;
  border-radius: 10px;
  padding: 7px 9px;
}

.result-box {
  border-radius: 12px;
  border: 1px solid #d2e1da;
  background: #f2f7ff;
  padding: 12px 14px;
  color: #203149;
}

.compact-page .hero {
  padding: 14px 18px;
}

.compact-page .hero h1 {
  margin: 6px 0;
}

.compact-page .hero .lead {
  margin: 0;
  font-size: 0.94rem;
}

.compact-hero {
  padding: 16px 20px;
}

.prompt-grid {
  display: grid;
  gap: 12px;
}

.prompt-card {
  border: 1px solid #d8e2ef;
  border-radius: 12px;
  background: #fff;
  padding: 14px;
}

.prompt-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 10px;
}

.prompt-head h3 {
  margin: 0;
  font-size: 1.05rem;
}

.prompt-code {
  margin: 10px 0;
  white-space: pre-wrap;
  border: 1px solid #d5dfed;
  border-radius: 10px;
  background: #f5f8ff;
  padding: 10px 12px;
  font-size: 0.9rem;
  line-height: 1.52;
}

.result-box p {
  margin: 6px 0;
}

.result-box ul {
  margin: 0;
  padding-left: 18px;
}

.page-highlight {
  border-left: 4px solid var(--accent);
  padding: 10px 14px;
  background: #fff8ea;
  border-radius: 10px;
  color: #654f19;
}

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

.timeline-item {
  border: 1px solid #d8e3dd;
  border-radius: 12px;
  background: #fff;
  padding: 12px 14px;
}

.timeline-item p {
  margin: 6px 0;
}

.small-note {
  font-size: 0.86rem;
  color: #567168;
}

@media (max-width: 920px) {
  .tool-grid {
    grid-template-columns: 1fr;
  }
}
