:root {
  color-scheme: light dark;
  --bg: #fbfcfe;
  --surface: #ffffff;
  --surface-strong: #f4f6f9;
  --ink: #202632;
  --muted: #616a78;
  --faint: #7d8592;
  --line: #e1e5eb;
  --accent: #2f5da8;
  --accent-strong: #254a86;
  --accent-soft: #f1f5fb;
  --code: #16233a;
  --code-ink: #e8edf7;
  --shadow: 0 18px 50px rgb(28 39 60 / 0.08);
  --radius: 12px;
  --font-sans: "HarmonyOS Sans SC", "MiSans", "Noto Sans CJK SC", "Microsoft YaHei", system-ui, sans-serif;
  --font-mono: "SFMono-Regular", "Cascadia Code", "Roboto Mono", Consolas, monospace;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #101722;
    --surface: #151f2d;
    --surface-strong: #1d2a3d;
    --ink: #e9edf5;
    --muted: #aab4c5;
    --faint: #8591a5;
    --line: #2d3b51;
    --accent: #7fa3ed;
    --accent-strong: #a9c1f2;
    --accent-soft: #1d3154;
    --code: #0c121d;
    --code-ink: #e7edf8;
    --shadow: 0 28px 80px rgb(0 0 0 / 0.34);
  }
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  overflow-x: hidden;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

a {
  color: inherit;
  text-decoration-thickness: 1px;
  text-underline-offset: 4px;
}

a:focus-visible,
button:focus-visible,
summary:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 4px;
}

.skip-link {
  position: fixed;
  top: 10px;
  left: 10px;
  z-index: 20;
  padding: 8px 12px;
  transform: translateY(-160%);
  border-radius: 6px;
  background: var(--accent);
  color: #f6f8fc;
}

.skip-link:focus {
  transform: translateY(0);
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  border-bottom: 1px solid color-mix(in srgb, var(--line) 80%, transparent);
  background: color-mix(in srgb, var(--surface) 94%, transparent);
  backdrop-filter: blur(18px);
}

.header-inner,
.hero,
.reading-index,
.section,
.site-footer {
  width: min(1180px, calc(100% - 48px));
  margin-inline: auto;
}

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

.site-mark {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  color: var(--ink);
  font-weight: 760;
  text-decoration: none;
}

.mark-symbol {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border-radius: 8px;
  background: var(--accent);
  color: #f8f9fc;
  font-size: 15px;
  letter-spacing: -0.04em;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 28px;
}

.site-nav a {
  color: var(--muted);
  font-size: 14px;
  font-weight: 650;
  text-decoration: none;
}

.site-nav a:hover {
  color: var(--accent);
}

.hero {
  display: grid;
  min-height: calc(100dvh - 68px);
  grid-template-columns: minmax(0, 0.86fr) minmax(480px, 1.14fr);
  align-items: center;
  gap: clamp(44px, 6vw, 92px);
  padding-block: 58px;
}

.hero-copy {
  max-width: 520px;
}

.eyebrow,
.section-kicker {
  margin: 0 0 18px;
  color: var(--accent);
  font-size: 13px;
  font-weight: 760;
  letter-spacing: 0.05em;
}

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

h1 {
  max-width: 9ch;
  margin-bottom: 24px;
  font-size: clamp(50px, 5.4vw, 78px);
  font-weight: 820;
  letter-spacing: -0.065em;
  line-height: 1.02;
}

h2 {
  margin-bottom: 24px;
  font-size: clamp(34px, 4.2vw, 58px);
  font-weight: 810;
  letter-spacing: -0.055em;
  line-height: 1.08;
}

h3 {
  margin-bottom: 10px;
  font-size: 21px;
  line-height: 1.35;
  letter-spacing: -0.025em;
}

.hero-summary {
  max-width: 22em;
  margin-bottom: 32px;
  color: var(--muted);
  font-size: clamp(18px, 1.6vw, 22px);
  line-height: 1.65;
}

.primary-link {
  display: inline-flex;
  min-height: 48px;
  align-items: center;
  justify-content: center;
  padding: 10px 20px;
  border-radius: 10px;
  background: var(--accent);
  color: #f8f9fc;
  font-weight: 720;
  text-decoration: none;
  box-shadow: 0 12px 30px rgb(49 89 166 / 0.22);
  transition: transform 160ms ease, background-color 160ms ease;
}

.primary-link:hover {
  background: var(--accent-strong);
  transform: translateY(-2px);
}

.primary-link:active {
  transform: translateY(1px);
}

.hero-visual {
  display: grid;
  height: min(72dvh, 720px);
  min-height: 520px;
  place-items: center;
  margin: 0;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: var(--surface);
  box-shadow: var(--shadow);
}

.hero-visual svg {
  width: 100%;
  height: 100%;
  color: var(--ink);
}

.map-frame {
  fill: var(--surface);
  stroke: var(--line);
  stroke-width: 1.5;
}

.map-overline,
.map-label {
  fill: var(--accent);
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
}

.map-title {
  fill: var(--ink);
  font-family: var(--font-sans);
  font-size: 30px;
  font-weight: 800;
}

.map-value {
  fill: var(--ink);
  font-family: var(--font-mono);
  font-size: 22px;
  font-weight: 700;
}

.map-value.small {
  font-size: 18px;
}

.map-language rect,
.map-stage rect,
.map-ui rect,
.map-runtime rect {
  fill: var(--bg);
  stroke: var(--line);
  stroke-width: 1.5;
}

.map-stage rect {
  fill: var(--accent-soft);
  stroke: var(--accent);
}

.map-line {
  stroke: var(--accent);
  stroke-width: 1.5;
}

.device rect {
  fill: var(--bg);
  stroke: var(--accent);
  stroke-width: 1.5;
}

.device line {
  stroke: var(--line);
  stroke-width: 2;
}

.device text {
  fill: var(--muted);
  font-family: var(--font-sans);
  font-size: 12px;
  font-weight: 650;
}

.reading-index {
  display: grid;
  grid-template-columns: 1.1fr repeat(4, 1fr);
  border-block: 1px solid var(--line);
}

.reading-index > * {
  min-width: 0;
  padding: 18px 16px;
}

.reading-index span {
  color: var(--faint);
  font-size: 13px;
  font-weight: 720;
}

.reading-index a {
  border-left: 1px solid var(--line);
  color: var(--ink);
  font-size: 14px;
  font-weight: 680;
  text-decoration: none;
}

.reading-index a:hover {
  color: var(--accent);
}

.section {
  padding-block: clamp(92px, 11vw, 154px);
  border-bottom: 1px solid var(--line);
}

.stage-grid,
.arkts-grid,
.practice-section,
.about-panel {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(380px, 0.85fr);
  gap: clamp(50px, 8vw, 110px);
  align-items: start;
}

.stage-copy .lead {
  max-width: 44em;
  margin-bottom: 44px;
  color: var(--muted);
  font-size: 19px;
}

.stage-copy > h3 {
  margin-bottom: 18px;
}

.reading-steps,
.practice-copy ol {
  margin: 0;
  padding: 0;
  list-style: none;
}

.reading-steps li,
.practice-copy li {
  display: grid;
  grid-template-columns: 118px 1fr;
  gap: 18px;
  padding: 16px 0;
  border-top: 1px solid var(--line);
}

.reading-steps strong,
.practice-copy strong {
  color: var(--accent);
  font-size: 14px;
}

.reading-steps span,
.practice-copy span {
  color: var(--muted);
}

.source-line {
  margin: 28px 0 0;
  color: var(--faint);
  font-size: 13px;
}

.source-line a {
  color: var(--accent);
}

.model-map {
  padding: 28px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: 0 14px 36px rgb(28 39 60 / 0.05);
}

.model-caption {
  margin-bottom: 20px;
  color: var(--faint);
  font-family: var(--font-mono);
  font-size: 12px;
}

.model-node {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: baseline;
  gap: 10px;
  padding: 15px 16px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: var(--bg);
}

.model-node span,
.model-node small {
  color: var(--faint);
  font-size: 11px;
}

.model-node strong {
  font-family: var(--font-mono);
  font-size: 14px;
}

.model-node small {
  grid-column: 1 / -1;
}

.model-node.emphasized {
  border-color: var(--accent);
  background: var(--accent-soft);
}

.model-connector {
  width: 1px;
  height: 22px;
  margin-inline: auto;
  background: var(--accent);
}

.model-pair {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.model-pair .model-node {
  grid-template-columns: 1fr;
}

.model-map > p {
  margin: 18px 0 0;
  color: var(--faint);
  font-size: 12px;
}

.section-heading {
  max-width: 720px;
  margin-bottom: 58px;
}

.section-heading > p:last-child,
.devices-intro > p:last-child,
.practice-copy > p,
.source-intro p,
.about-panel p {
  color: var(--muted);
  font-size: 18px;
}

.arkts-grid {
  grid-template-columns: minmax(0, 1fr) minmax(360px, 0.72fr);
}

.difference-main {
  padding: 38px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
}

.difference-label {
  display: block;
  margin-bottom: 24px;
  color: var(--accent);
  font-size: 13px;
  font-weight: 750;
}

.difference-main > p {
  color: var(--muted);
}

pre {
  max-width: 100%;
  overflow-x: auto;
  margin: 24px 0 0;
  padding: 24px;
  border-radius: 10px;
  background: var(--code);
  color: var(--code-ink);
  font-family: var(--font-mono);
  font-size: 13px;
  line-height: 1.75;
  tab-size: 2;
}

.difference-list article {
  padding: 20px 0 22px;
  border-top: 1px solid var(--line);
}

.difference-list article:first-child {
  padding-top: 0;
  border-top: 0;
}

.difference-list p {
  margin-bottom: 0;
  color: var(--muted);
}

.devices-intro {
  max-width: 760px;
  margin-bottom: 58px;
}

.device-checklist {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(0, 0.8fr);
  gap: 20px;
}

.device-checklist article {
  padding: 28px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
}

.device-checklist article > span {
  display: block;
  margin-bottom: 18px;
  color: var(--accent);
  font-size: 12px;
  font-weight: 760;
}

.device-checklist article > p {
  margin-bottom: 0;
  color: var(--muted);
}

.device-checklist .check-primary {
  grid-row: span 3;
  padding: 40px;
  background: var(--accent-soft);
}

.breakpoint-demo {
  display: flex;
  align-items: end;
  gap: 18px;
  margin-top: 42px;
  padding-top: 30px;
  border-top: 1px solid color-mix(in srgb, var(--accent) 35%, transparent);
}

.screen {
  display: grid;
  gap: 7px;
  padding: 10px;
  border: 1px solid var(--accent);
  border-radius: 8px;
}

.screen i {
  display: block;
  min-height: 22px;
  border-radius: 4px;
  background: color-mix(in srgb, var(--accent) 34%, transparent);
}

.screen.narrow {
  width: 90px;
  height: 140px;
  grid-template-columns: 1fr;
}

.screen.wide {
  width: 230px;
  height: 150px;
  grid-template-columns: 1.4fr 0.6fr;
}

.screen.wide i:first-child {
  grid-row: span 2;
}

.practice-section {
  grid-template-columns: minmax(0, 0.9fr) minmax(420px, 1.1fr);
}

.practice-copy > p {
  margin-bottom: 36px;
}

.practice-copy li {
  grid-template-columns: 90px 1fr;
}

.code-panel {
  overflow: hidden;
  border-radius: var(--radius);
  background: var(--code);
  color: var(--code-ink);
  box-shadow: var(--shadow);
}

.code-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 16px 22px;
  border-bottom: 1px solid rgb(255 255 255 / 0.12);
  font-family: var(--font-mono);
  font-size: 12px;
}

.code-title small {
  color: #a8b4c8;
}

.code-panel pre {
  margin: 0;
  padding: 28px;
  border-radius: 0;
}

.code-panel > p {
  margin: 0;
  padding: 0 28px 26px;
  color: #a8b4c8;
  font-size: 12px;
}

.sources-section {
  display: grid;
  grid-template-columns: minmax(0, 0.74fr) minmax(460px, 1.26fr);
  gap: clamp(52px, 8vw, 110px);
}

.source-links {
  border-top: 1px solid var(--line);
}

.source-links a {
  display: grid;
  grid-template-columns: 110px 1fr;
  gap: 20px;
  padding: 20px 0;
  border-bottom: 1px solid var(--line);
  text-decoration: none;
}

.source-links span {
  color: var(--faint);
  font-size: 13px;
}

.source-links strong {
  font-size: 17px;
}

.source-links a:hover strong {
  color: var(--accent);
}

.about-panel {
  padding: clamp(30px, 5vw, 58px);
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: var(--surface-strong);
}

.about-panel h2 {
  font-size: clamp(32px, 4vw, 52px);
}

.about-note {
  padding-left: 30px;
  border-left: 3px solid var(--accent);
}

.about-note p {
  font-size: 15px;
}

.site-footer {
  padding-block: 42px 54px;
}

.footer-main {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 28px;
}

.footer-main strong {
  font-size: 18px;
}

.footer-main p,
.footer-legal {
  color: var(--faint);
  font-size: 13px;
}

.footer-main p {
  margin: 3px 0 0;
}

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

.footer-legal {
  margin: 24px 0 0;
}

@media (max-width: 980px) {
  .hero {
    min-height: auto;
    grid-template-columns: 1fr;
    padding-block: 64px;
  }

  .hero-copy {
    max-width: 650px;
  }

  .hero-visual {
    height: 560px;
    min-height: 0;
  }

  .reading-index {
    grid-template-columns: repeat(2, 1fr);
  }

  .reading-index span {
    grid-column: 1 / -1;
    border-bottom: 1px solid var(--line);
  }

  .reading-index a:nth-of-type(odd) {
    border-left: 0;
  }

  .stage-grid,
  .arkts-grid,
  .practice-section,
  .sources-section,
  .about-panel {
    grid-template-columns: 1fr;
  }

  .model-map,
  .difference-main,
  .code-panel {
    max-width: 720px;
  }

  .sources-section {
    gap: 36px;
  }
}

@media (max-width: 720px) {
  .header-inner,
  .hero,
  .reading-index,
  .section,
  .site-footer {
    width: min(100% - 32px, 1180px);
  }

  .header-inner {
    min-height: 62px;
    gap: 14px;
  }

  .site-mark > span:last-child {
    display: none;
  }

  .site-nav a {
    display: none;
  }

  .site-nav a:last-child {
    display: block;
  }

  .hero {
    gap: 42px;
    padding-block: 48px;
  }

  h1 {
    max-width: 8ch;
    font-size: clamp(43px, 12vw, 56px);
  }

  h2 {
    font-size: clamp(34px, 10vw, 46px);
  }

  .hero-summary {
    font-size: 18px;
  }

  .hero-visual {
    height: 440px;
  }

  .reading-index {
    grid-template-columns: 1fr;
  }

  .reading-index a,
  .reading-index a:nth-of-type(odd) {
    border-top: 1px solid var(--line);
    border-left: 0;
  }

  .reading-index span {
    border-bottom: 0;
  }

  .section {
    padding-block: 82px;
  }

  .stage-grid,
  .arkts-grid,
  .practice-section,
  .about-panel {
    gap: 46px;
  }

  .reading-steps li,
  .practice-copy li {
    grid-template-columns: 1fr;
    gap: 6px;
  }

  .model-map,
  .difference-main,
  .device-checklist article,
  .device-checklist .check-primary,
  .about-panel {
    padding: 24px;
  }

  .model-pair {
    grid-template-columns: 1fr;
  }

  .model-connector {
    height: 16px;
  }

  .device-checklist {
    grid-template-columns: 1fr;
  }

  .device-checklist .check-primary {
    grid-row: auto;
  }

  .breakpoint-demo {
    overflow: hidden;
  }

  .screen.wide {
    width: min(210px, 62vw);
  }

  .source-links a {
    grid-template-columns: 90px 1fr;
  }

  .about-note {
    padding: 22px 0 0;
    border-top: 3px solid var(--accent);
    border-left: 0;
  }

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

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
  }
}
