:root {
  color-scheme: dark;
  --bg: #07101f;
  --bg-soft: #0b1830;
  --surface: rgba(15, 29, 53, 0.82);
  --surface-strong: #13233c;
  --surface-hover: #183359;
  --text: #eef6ff;
  --muted: #aab9cc;
  --line: rgba(142, 180, 223, 0.18);
  --accent: #6bb6ff;
  --accent-strong: #9bd0ff;
  --accent-soft: rgba(107, 182, 255, 0.16);
  --shadow: 0 24px 80px rgba(0, 0, 0, 0.28);
}

body.light-theme {
  color-scheme: light;
  --bg: #edf5ff;
  --bg-soft: #f6fbff;
  --surface: rgba(255, 255, 255, 0.88);
  --surface-strong: #ffffff;
  --surface-hover: #e8f3ff;
  --text: #152235;
  --muted: #5f7085;
  --line: rgba(64, 107, 154, 0.18);
  --accent: #2f7fce;
  --accent-strong: #155b9f;
  --accent-soft: rgba(47, 127, 206, 0.13);
  --shadow: 0 24px 70px rgba(47, 89, 135, 0.14);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: Inter, Arial, sans-serif;
  background:
    radial-gradient(circle at top left, rgba(64, 137, 215, 0.24), transparent 36rem),
    linear-gradient(180deg, #07101f 0%, #09182d 52%, #07101f 100%);
  color: var(--text);
  line-height: 1.6;
}

body.light-theme {
  background:
    radial-gradient(circle at top left, rgba(132, 190, 245, 0.36), transparent 36rem),
    linear-gradient(180deg, #f8fcff 0%, #edf5ff 52%, #e5f0fb 100%);
}

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 72px;
  padding: 0 6vw;
  border-bottom: 1px solid var(--line);
  background: rgba(7, 16, 31, 0.86);
  backdrop-filter: blur(18px);
}

body.light-theme .site-header {
  background: rgba(248, 252, 255, 0.86);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-weight: 800;
}

.brand-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border-radius: 8px;
  background: linear-gradient(135deg, #76bdff, #2e6fb8);
  color: #061224;
  font-size: 13px;
  box-shadow: 0 14px 36px rgba(107, 182, 255, 0.26);
}

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

.header-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.site-nav a {
  padding: 10px 14px;
  border-radius: 8px;
  color: var(--muted);
  font-size: 14px;
  font-weight: 700;
  transition:
    background 0.2s ease,
    color 0.2s ease;
}

.site-nav a:hover,
.site-nav a:focus-visible {
  background: var(--accent-soft);
  color: var(--text);
}

.menu-toggle {
  display: none;
  width: 44px;
  height: 44px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-strong);
}

.theme-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-strong);
  color: var(--accent-strong);
  cursor: pointer;
  transition:
    background 0.2s ease,
    border-color 0.2s ease,
    transform 0.2s ease;
}

.theme-icon {
  position: relative;
  display: block;
  width: 22px;
  height: 22px;
}

.sun-icon {
  border-radius: 50%;
  background: var(--accent-strong);
  box-shadow:
    0 -12px 0 -8px var(--accent-strong),
    0 12px 0 -8px var(--accent-strong),
    12px 0 0 -8px var(--accent-strong),
    -12px 0 0 -8px var(--accent-strong),
    8px 8px 0 -8px var(--accent-strong),
    -8px 8px 0 -8px var(--accent-strong),
    8px -8px 0 -8px var(--accent-strong),
    -8px -8px 0 -8px var(--accent-strong);
}

.moon-icon {
  border-radius: 50%;
  background: var(--accent-strong);
}

.moon-icon::after {
  content: "";
  position: absolute;
  top: -2px;
  right: -4px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--surface-strong);
}

.theme-toggle:hover,
.theme-toggle:focus-visible {
  transform: translateY(-2px);
  border-color: rgba(107, 182, 255, 0.7);
  background: var(--surface-hover);
}

.menu-toggle span {
  display: block;
  height: 2px;
  margin: 5px 0;
  background: var(--text);
}

.section {
  scroll-margin-top: 88px;
  padding: 82px 6vw;
}

.contents-section {
  padding-top: 34px;
}

.hero {
  display: grid;
  grid-template-columns: minmax(300px, 1.1fr) minmax(280px, 0.8fr);
  align-items: center;
  gap: 48px;
  min-height: 72vh;
}

.hero-content {
  padding: 32px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: linear-gradient(145deg, rgba(21, 47, 83, 0.84), rgba(9, 24, 45, 0.68));
  box-shadow: var(--shadow);
}

body.light-theme .hero-content {
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.92), rgba(230, 243, 255, 0.78));
}

.eyebrow {
  margin: 0 0 12px;
  color: var(--accent-strong);
  font-size: 13px;
  font-weight: 800;
  text-transform: uppercase;
}

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

h1 {
  max-width: 820px;
  margin-bottom: 22px;
  font-size: clamp(44px, 7vw, 86px);
  line-height: 0.98;
  letter-spacing: 0;
}

h2 {
  margin-bottom: 0;
  font-size: clamp(31px, 5vw, 52px);
  line-height: 1.08;
  letter-spacing: 0;
}

h3 {
  margin-bottom: 10px;
  font-size: 22px;
  line-height: 1.25;
}

.lead {
  max-width: 700px;
  color: var(--muted);
  font-size: 19px;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 32px;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 12px 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  font-weight: 800;
}

.button.primary {
  border-color: transparent;
  background: var(--accent);
  color: #061224;
}

body.light-theme .button.primary {
  color: #ffffff;
}

.button.ghost {
  background: rgba(255, 255, 255, 0.05);
  color: var(--accent-strong);
}

.block-hover,
.hero-summary,
.toc,
.text-panel,
.highlight-card,
.research-card,
.task-block,
.method-grid article,
.chart-card,
.timeline-item,
.placeholder-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: var(--shadow);
  transition:
    transform 0.22s ease,
    border-color 0.22s ease,
    background 0.22s ease,
    box-shadow 0.22s ease;
}

.block-hover:hover,
.hero-summary:hover,
.toc:hover,
.text-panel:hover,
.highlight-card:hover,
.research-card:hover,
.task-block:hover,
.method-grid article:hover,
.chart-card:hover,
.timeline-item:hover,
.placeholder-card:hover {
  transform: translateY(-4px);
  border-color: rgba(107, 182, 255, 0.7);
  background: var(--surface-hover);
  box-shadow: 0 28px 90px rgba(25, 110, 204, 0.2);
}

.hero-summary {
  display: grid;
  gap: 14px;
  padding: 24px;
}

.hero-summary div {
  padding: 18px;
  border-radius: 8px;
  background: rgba(107, 182, 255, 0.08);
}

.visual-card {
  margin: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  background:
    radial-gradient(circle at 22% 18%, rgba(107, 182, 255, 0.2), transparent 12rem),
    rgba(107, 182, 255, 0.07);
  overflow: hidden;
}

.visual-card svg {
  display: block;
  width: 100%;
  height: auto;
}

.visual-card .node {
  animation: nodePulse 3.2s ease-in-out infinite;
}

.visual-card .node:nth-of-type(2n) {
  animation-delay: 0.5s;
}

.visual-card .link,
.visual-card .line-art {
  stroke-dasharray: 220;
  stroke-dashoffset: 220;
  animation: drawLine 2.4s ease forwards;
}

.hero-visual {
  min-height: 180px;
}

.visual-glow {
  fill: rgba(107, 182, 255, 0.16);
}

.node {
  fill: rgba(107, 182, 255, 0.22);
  stroke: var(--accent);
  stroke-width: 4;
}

.main-node {
  fill: rgba(155, 208, 255, 0.22);
}

.link,
.line-art,
.person {
  fill: none;
  stroke: var(--accent-strong);
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 6;
}

.person {
  stroke: var(--text);
}

.screen {
  fill: rgba(107, 182, 255, 0.08);
  stroke: var(--accent);
  stroke-width: 5;
}

.bar {
  fill: none;
  stroke: var(--accent);
  stroke-linecap: round;
  stroke-width: 16;
}

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

.side-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(260px, 0.75fr);
  gap: 18px;
  align-items: stretch;
}

.side-layout.reverse {
  grid-template-columns: minmax(260px, 0.75fr) minmax(0, 1.25fr);
}

.side-visual {
  min-height: 100%;
  display: grid;
  place-items: center;
  padding: 12px;
}

.side-visual svg {
  max-height: 280px;
  object-fit: contain;
}


.hero-summary span,
.highlight-card span,
.step,
.period {
  display: block;
  margin-bottom: 7px;
  color: var(--accent-strong);
  font-size: 13px;
  font-weight: 800;
  text-transform: uppercase;
}

.hero-summary strong {
  display: block;
  font-size: 20px;
  line-height: 1.3;
}

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

.toc {
  display: grid;
  gap: 8px;
  max-width: 860px;
  padding: 14px;
}

.toc-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 48px;
  gap: 16px;
  align-items: start;
  padding: 14px 16px;
  border-radius: 8px;
  color: var(--muted);
  transition:
    background 0.2s ease,
    color 0.2s ease;
}

.toc-row:hover {
  background: var(--accent-soft);
  color: var(--text);
}

.toc-row strong {
  color: var(--accent-strong);
  text-align: right;
}

.intro-flow {
  display: grid;
  gap: 18px;
}

.text-panel,
.research-card,
.task-block,
.method-grid article,
.placeholder-card {
  padding: 28px;
}

.text-panel {
  border-left: 4px solid var(--accent);
}

.text-panel p,
.highlight-card p,
.research-card p,
.task-block li,
.method-grid p,
.timeline-item p,
.placeholder-card p,
.site-footer p {
  color: var(--muted);
}

.text-panel p:last-child,
.highlight-card p,
.research-card p,
.method-grid p,
.placeholder-card p {
  margin-bottom: 0;
}

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

.highlight-card {
  min-height: 170px;
  padding: 26px;
  background: linear-gradient(180deg, rgba(24, 51, 89, 0.92), rgba(15, 29, 53, 0.84));
}

.highlight-grid.compact .highlight-card {
  min-height: 150px;
}

body.light-theme .highlight-card {
  background: linear-gradient(180deg, #ffffff 0%, #e9f4ff 100%);
}

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

.task-block ol {
  display: grid;
  gap: 10px;
  margin: 0;
  padding-left: 22px;
}

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

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

.chapter-flow {
  display: grid;
  gap: 18px;
}

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

.stat-card,
.result-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: var(--shadow);
  transition:
    transform 0.22s ease,
    border-color 0.22s ease,
    background 0.22s ease,
    box-shadow 0.22s ease;
}

.stat-card {
  min-height: 160px;
  padding: 26px;
}

.stat-card:hover,
.result-card:hover {
  transform: translateY(-4px);
  border-color: rgba(107, 182, 255, 0.7);
  background: var(--surface-hover);
  box-shadow: 0 28px 90px rgba(25, 110, 204, 0.2);
}

.stat-card span {
  display: block;
  margin-bottom: 10px;
  color: var(--accent-strong);
  font-size: 42px;
  font-weight: 800;
  line-height: 1;
}

.stat-card p {
  margin: 0;
  color: var(--muted);
}

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

.chart-card {
  padding: 22px;
  text-align: center;
}

.chart-card h3 {
  min-height: 54px;
  margin-bottom: 12px;
  font-size: 18px;
}

.pie-svg {
  display: block;
  width: min(210px, 72vw);
  margin: 0 auto 18px;
  filter: drop-shadow(0 18px 34px rgba(0, 0, 0, 0.26));
}

.pie-bg {
  fill: rgba(107, 182, 255, 0.08);
  stroke: rgba(255, 255, 255, 0.14);
  stroke-width: 2;
}

.slice {
  opacity: 0;
  transform: scale(0.04) rotate(-22deg);
  transform-origin: 100px 100px;
  stroke: rgba(255, 255, 255, 0.86);
  stroke-linejoin: round;
  stroke-width: 2.6;
  animation: sliceIn 0.78s cubic-bezier(0.18, 0.86, 0.32, 1.16) forwards;
}

.delay-1 {
  animation-delay: 0.18s;
}

.delay-2 {
  animation-delay: 0.34s;
}

.slice-blue {
  fill: #22a9e8;
}

.slice-cyan {
  fill: #2ed0c3;
}

.slice-green {
  fill: #63d834;
}

.slice-yellow {
  fill: #ffd735;
}

.pie-outline {
  fill: none;
  stroke: rgba(155, 208, 255, 0.82);
  stroke-width: 4;
  stroke-dasharray: 452;
  stroke-dashoffset: 452;
  transform: rotate(-90deg);
  transform-origin: 100px 100px;
  animation:
    ringDraw 1.1s ease forwards 0.25s,
    ringGlow 2.2s ease-in-out infinite 1.35s;
}

.chart-card:hover .pie-svg {
  animation: pieHover 1.2s ease-in-out infinite alternate;
}

.chart-legend {
  display: grid;
  gap: 8px;
  color: var(--muted);
  font-size: 13px;
  text-align: left;
}

.chart-legend span {
  display: flex;
  align-items: center;
  gap: 8px;
}

.chart-legend i {
  width: 10px;
  height: 10px;
  border-radius: 50%;
}

.chart-legend .blue {
  background: #14a6ef;
}

.chart-legend .cyan {
  background: #28d3c4;
}

.chart-legend .green {
  background: #63d834;
}

.chart-legend .yellow {
  background: #ffd735;
}

.chart-legend .gray {
  background: #8795a8;
}

.chart-legend .red {
  background: #e06969;
}

.pros-cons,
.mini-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  margin: 20px 0;
}

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

.pros-cons div,
.mini-grid article {
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(107, 182, 255, 0.08);
}

h4 {
  margin: 0 0 10px;
  color: var(--accent-strong);
  font-size: 16px;
}

ul {
  margin: 0;
  padding-left: 20px;
  color: var(--muted);
}

.text-panel strong {
  display: block;
  margin-top: 18px;
  color: var(--accent-strong);
  font-size: 17px;
}

.result-card {
  padding: 28px;
}

.task-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 18px 0;
}

.task-tab {
  min-height: 44px;
  padding: 10px 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(107, 182, 255, 0.08);
  color: var(--muted);
  font: inherit;
  font-weight: 800;
  cursor: pointer;
  transition:
    background 0.2s ease,
    color 0.2s ease,
    border-color 0.2s ease;
}

.task-tab:hover,
.task-tab.is-active {
  border-color: rgba(107, 182, 255, 0.7);
  background: var(--accent-soft);
  color: var(--accent-strong);
}

.task-panel {
  display: none;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(107, 182, 255, 0.08);
  animation: panelIn 0.25s ease;
}

.task-panel.is-active {
  display: block;
}

.task-panel p,
.task-panel li {
  color: var(--muted);
}

.task-panel ol {
  display: grid;
  gap: 8px;
  margin: 14px 0;
  padding-left: 20px;
}

.task-panel strong {
  display: block;
  color: var(--accent-strong);
}

.result-layout {
  display: grid;
  grid-template-columns: minmax(220px, 0.55fr) minmax(420px, 1fr);
  gap: 18px;
  align-items: start;
}

.result-summary {
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(107, 182, 255, 0.08);
}

.result-summary p {
  margin-bottom: 12px;
}

.table-wrap {
  width: 100%;
  margin: 0;
  overflow-x: auto;
}

table {
  width: 100%;
  min-width: 520px;
  border-collapse: collapse;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
}

th,
td {
  padding: 14px 16px;
  border-bottom: 1px solid var(--line);
  text-align: left;
}

th {
  color: var(--accent-strong);
  background: rgba(107, 182, 255, 0.12);
  font-size: 14px;
  text-transform: uppercase;
}

td {
  color: var(--muted);
}

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

.result-card p {
  color: var(--muted);
}

@keyframes sliceIn {
  to {
    opacity: 1;
    transform: scale(1) rotate(0deg);
  }
}

@keyframes ringDraw {
  to {
    stroke-dashoffset: 0;
  }
}

@keyframes pieHover {
  to {
    transform: translateY(-3px) scale(1.03);
  }
}

@keyframes ringGlow {
  0%,
  100% {
    stroke-opacity: 0.62;
    stroke-width: 4;
  }

  50% {
    stroke-opacity: 1;
    stroke-width: 6;
  }
}

@keyframes panelIn {
  from {
    opacity: 0;
    transform: translateY(8px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes nodePulse {
  0%,
  100% {
    transform: scale(1);
    transform-origin: center;
  }

  50% {
    transform: scale(1.06);
    transform-origin: center;
  }
}

@keyframes drawLine {
  to {
    stroke-dashoffset: 0;
  }
}

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

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

.timeline-item {
  position: relative;
  padding: 24px;
  overflow: hidden;
}

.timeline-item::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 4px;
  background: var(--accent);
}

.timeline-item strong {
  display: block;
  margin-top: 18px;
  color: var(--accent-strong);
  font-size: 17px;
}

.compact-timeline .timeline-item p {
  margin-bottom: 0;
}

.site-footer {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  padding: 34px 6vw;
  border-top: 1px solid var(--line);
  background: #050b16;
}

body.light-theme .site-footer {
  background: #dfeefc;
}

.site-footer h2 {
  margin-bottom: 8px;
  font-size: 26px;
}

.site-footer p {
  margin: 0;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 10px;
  max-width: 620px;
}

.footer-links a {
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(107, 182, 255, 0.08);
  color: var(--accent-strong);
  font-weight: 800;
}

.footer-links a:hover {
  background: var(--accent-soft);
}

.sources-page {
  min-height: calc(100vh - 210px);
}

.sources-card {
  max-width: 1080px;
  padding: 28px;
}

.sources-list {
  display: grid;
  gap: 8px;
  max-width: 980px;
  margin: 0;
  padding-left: 20px;
  color: var(--muted);
}

.sources-list a {
  color: var(--muted);
  text-decoration: underline;
  text-decoration-color: rgba(107, 182, 255, 0.34);
  text-underline-offset: 3px;
}

.sources-list a:hover {
  color: var(--accent-strong);
}

@media (max-width: 920px) {
  .menu-toggle {
    display: block;
  }

  .site-nav {
    position: absolute;
    top: 72px;
    right: 6vw;
    left: 6vw;
    display: none;
    flex-direction: column;
    padding: 12px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #0b1830;
    box-shadow: var(--shadow);
  }

  .site-nav.is-open {
    display: flex;
  }

  .hero,
  .highlight-grid,
  .research-layout,
  .method-grid,
  .conclusion-grid,
  .stats-grid,
  .chart-grid,
  .side-layout,
  .side-layout.reverse,
  .result-layout,
  .compact-timeline,
  .pros-cons,
  .mini-grid,
  .visual-strip {
    grid-template-columns: 1fr;
  }

  .hero {
    min-height: auto;
  }

  .contents-section {
    padding-top: 48px;
  }
}

@media (max-width: 560px) {
  .site-header,
  .section,
  .site-footer {
    padding-right: 22px;
    padding-left: 22px;
  }

  .brand span:last-child {
    max-width: 180px;
    font-size: 14px;
    line-height: 1.2;
  }

  .hero-content,
  .text-panel,
  .research-card,
  .task-block,
  .method-grid article,
  .timeline-item,
  .placeholder-card,
  .result-card {
    padding: 22px;
  }

  .lead {
    font-size: 17px;
  }

  .toc-row {
    grid-template-columns: minmax(0, 1fr) 34px;
    padding-right: 10px;
    padding-left: 10px;
    font-size: 14px;
  }

  .site-footer {
    flex-direction: column;
  }

  .footer-links {
    justify-content: flex-start;
  }
}
