:root {
  color-scheme: light;
  --ink: #17262a;
  --muted: #4c5e5b;
  --soft: #5f706c;
  --paper: #f2f3ec;
  --paper-2: #f8f9f4;
  --panel: #ffffff;
  --line: #c9d2c6;
  --line-2: #dfe5dc;
  --dark: #102123;
  --dark-2: #172d2f;
  --dark-line: #3a5658;
  --on-dark: #f4f7ec;
  --on-dark-muted: #c0d0cb;
  --lime: #def57a;
  --lime-2: #ecfda8;
  --teal: #0d5551;
  --teal-2: #0a6b60;
  --focus: #0a6b60;
  --radius: 10px;
  --gutter: max(5vw, 20px);
  --header-h: 68px;
  --font: Inter, Pretendard, "Noto Sans KR", "Apple SD Gothic Neo", "Malgun Gothic", system-ui, -apple-system, "Segoe UI", Arial, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.6;
  text-rendering: optimizeLegibility;
}
html[lang="ko"] body { word-break: keep-all; overflow-wrap: break-word; }
img { max-width: 100%; }
button, a { font: inherit; }
a { color: inherit; }
button { cursor: pointer; }
h1, h2, h3, p { overflow-wrap: break-word; }
/* Headings: even line lengths; body: avoid a lone word on the last line (progressive enhancement) */
h1, h2, h3, .fig-title, .preview-head > span:first-child { text-wrap: balance; }
p, li, dd, figcaption, .fig-desc { text-wrap: pretty; }
[hidden] { display: none !important; }

:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; border-radius: 3px; }
.hero :focus-visible, .viewer :focus-visible { --focus: var(--lime); }
main:focus { outline: none; }
#capabilities, #example, #scope, #method, #status, #contact, #top { scroll-margin-top: calc(var(--header-offset, var(--header-h)) + 12px); }

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

.skip {
  position: absolute; left: 12px; top: -100px; z-index: 100;
  background: var(--lime); color: #142025; padding: 12px 16px;
  font-weight: 700; border-radius: 6px; text-decoration: none;
}
.skip:focus { top: 12px; }

/* Header */
.site-header {
  position: sticky; top: 0; z-index: 20;
  height: auto; min-height: var(--header-h);
  padding: 0 var(--gutter);
  display: flex; flex-wrap: wrap; align-items: center; gap: 8px 24px;
  background: rgba(247, 248, 242, .96);
  border-bottom: 1px solid var(--line);
}
@supports (backdrop-filter: blur(8px)) {
  .site-header { background: rgba(247, 248, 242, .86); backdrop-filter: blur(8px); }
}
.wordmark {
  display: inline-flex; align-items: center; gap: 9px; min-height: 44px;
  font-size: 21px; font-weight: 750; letter-spacing: -.04em; white-space: nowrap; text-decoration: none;
}
.mark {
  display: inline-flex; align-items: center; justify-content: center;
  width: 28px; height: 28px; border: 2px solid var(--teal); border-radius: 50%;
  font-size: 24px; line-height: 1; color: var(--teal);
}
.dot { font-weight: 400; color: var(--soft); }
.site-nav { display: flex; flex-wrap: wrap; gap: 4px; margin-left: auto; }
.site-nav a {
  display: inline-flex; align-items: center; min-height: 44px; padding: 0 12px;
  font-size: 15px; font-weight: 600; color: #344845; text-decoration: none; border-radius: 6px; white-space: nowrap;
}
.site-nav a:hover { color: var(--teal-2); text-decoration: underline; text-underline-offset: 5px; }
.header-tools { display: flex; align-items: center; gap: 8px; }

.lang-switch { display: inline-flex; border: 1px solid #9daea4; border-radius: 999px; padding: 2px; background: var(--paper-2); }
.lang-option {
  min-width: 44px; min-height: 44px; padding: 0 12px; border: 0; border-radius: 999px;
  background: none; color: var(--muted); font-size: 14px; font-weight: 700; white-space: nowrap;
}
.lang-option[aria-pressed="true"] { background: var(--teal); color: #fff; }
.lang-option:not([aria-pressed="true"]):hover { background: #dcead8; color: var(--ink); }

.menu-toggle {
  display: inline-flex; align-items: center; gap: 8px;
  min-height: 44px; min-width: 44px; padding: 0 12px;
  border: 1px solid #9daea4; border-radius: 8px; background: var(--paper-2);
  color: var(--ink); font-size: 14px; font-weight: 700;
}
.menu-icon { display: inline-grid; gap: 4px; width: 18px; }
.menu-icon i { display: block; height: 2px; background: currentColor; border-radius: 2px; transition: transform .2s, opacity .2s; }
.menu-toggle[aria-expanded="true"] .menu-icon i:nth-child(1) { transform: translateY(6px) rotate(45deg); }
.menu-toggle[aria-expanded="true"] .menu-icon i:nth-child(2) { opacity: 0; }
.menu-toggle[aria-expanded="true"] .menu-icon i:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }

/* Buttons */
.button {
  display: inline-flex; align-items: center; justify-content: center; text-align: center;
  min-height: 48px; padding: 12px 20px; border-radius: 6px;
  font-size: 15px; font-weight: 750; text-decoration: none; line-height: 1.3;
}
.button-primary { background: var(--lime); color: #142025; border: 1px solid #b9d24c; }
.button-primary:hover { background: var(--lime-2); }
.button-ghost { border: 1px solid #8eaba1; color: inherit; }
.button-ghost:hover { background: rgba(142, 171, 161, .18); }

/* Hero */
.hero {
  position: relative;
  background: var(--dark);
  background-image:
    linear-gradient(90deg, rgba(16,33,35,1) 0%, rgba(16,33,35,.92) 45%, rgba(16,33,35,.75) 100%),
    linear-gradient(#2c4648 1px, transparent 1px),
    linear-gradient(90deg, #2c4648 1px, transparent 1px);
  background-size: auto, 40px 40px, 40px 40px;
  color: var(--on-dark);
  padding: 64px var(--gutter) 72px;
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  column-gap: clamp(32px, 5vw, 80px); row-gap: 40px; align-items: center;
}
.hero-copy { max-width: 640px; min-width: 0; }
.eyebrow {
  display: flex; gap: 10px; align-items: center; margin: 0 0 20px;
  color: var(--lime); font-size: 13px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase;
}
html[lang="ko"] .eyebrow { letter-spacing: .02em; }
.live-dot { width: 8px; height: 8px; flex: none; border-radius: 50%; background: var(--lime); box-shadow: 0 0 0 4px rgba(222,245,122,.18); }
.hero h1 {
  font-size: clamp(34px, 4.4vw, 62px); line-height: 1.1; letter-spacing: -.035em;
  margin: 0 0 20px; font-weight: 720; text-wrap: balance;
}
html[lang="ko"] .hero h1 { letter-spacing: -.02em; line-height: 1.22; }
.hero-lede { max-width: 580px; font-size: clamp(16px, 1.35vw, 19px); line-height: 1.65; color: var(--on-dark-muted); margin: 0 0 28px; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-bottom: 18px; }
.hero .button-ghost { color: var(--on-dark); }
.hero-note { margin: 0; font-size: 14px; color: #a9bdb7; }

.hero-preview {
  margin: 0; min-width: 0; width: 100%; max-width: 620px; justify-self: end;
  background: var(--dark-2); border: 1px solid var(--dark-line); border-radius: var(--radius);
  overflow: hidden; box-shadow: 16px 18px 0 rgba(4, 16, 18, .45);
}
.preview-head {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 12px 16px; border-bottom: 1px solid var(--dark-line);
  font-size: 14px; font-weight: 650; color: var(--on-dark);
}
.preview-badge { flex: none; padding: 3px 10px; border-radius: 999px; border: 1px solid #6f8f88; color: var(--on-dark-muted); font-size: 13px; font-weight: 600; }
.preview-row { display: grid; grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr); border-top: 1px solid var(--dark-line); }
.preview-pcb { position: relative; display: block; background: #000; aspect-ratio: 1202 / 1002; border-right: 1px solid var(--dark-line); }
.preview-pcb img { display: block; width: 100%; height: 100%; object-fit: contain; }
.check-list { list-style: none; margin: 0; padding: 10px 16px; display: flex; flex-direction: column; justify-content: center; }
.check-list li {
  display: flex; justify-content: space-between; align-items: baseline; gap: 12px;
  padding: 8px 0; border-bottom: 1px solid rgba(117, 149, 144, .35);
  font-size: 14px; color: var(--on-dark-muted);
}
.check-list li:last-child { border-bottom: 0; }
.check-list strong { font-size: 18px; color: var(--lime); font-variant-numeric: tabular-nums; }
.preview-foot { padding: 11px 16px; border-top: 1px solid var(--dark-line); font-size: 13px; color: #b3c5bf; }
.preview-foot::before { content: "!"; display: inline-flex; align-items: center; justify-content: center; width: 18px; height: 18px; margin-right: 8px; border-radius: 50%; border: 1px solid #b3c5bf; font-size: 11px; font-weight: 800; vertical-align: 1px; }

/* Sections */
.section { padding: 88px var(--gutter); }
.section-head { max-width: 760px; margin-bottom: 40px; }
.section-label {
  display: flex; gap: 10px; margin: 0 0 14px;
  color: var(--teal); font-size: 13px; font-weight: 750; letter-spacing: .1em; text-transform: uppercase;
}
html[lang="ko"] .section-label { letter-spacing: .03em; }
.section-label span:first-child { color: var(--soft); }
.section h2 {
  font-size: clamp(28px, 3.2vw, 44px); line-height: 1.15; letter-spacing: -.03em;
  margin: 0 0 18px; font-weight: 720; text-wrap: balance;
}
html[lang="ko"] .section h2 { letter-spacing: -.015em; line-height: 1.3; }
.section-head p { font-size: 17px; line-height: 1.7; color: var(--muted); margin: 0; }

/* Scope cards */
.capability-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
.capability-card h3 { margin: 16px 0 10px; font-size: 23px; line-height: 1.35; }
.capability-card p { margin: 0; color: var(--muted); font-size: 16px; }
.capability-card .capability-scope { margin-top: 14px; font-size: 13px; color: var(--soft); overflow-wrap: anywhere; }
.capabilities-section { padding-bottom: 64px; }
.example-section { background: var(--paper-2); }
.scope-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; margin-top: 28px; }
.scope-card { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; min-width: 0; }
.limits-card { background: var(--paper-2); border-style: dashed; border-color: #a7b5a8; }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; padding-bottom: 14px; border-bottom: 1px solid var(--line-2); }
.card-head h3 { margin: 0; font-size: 20px; letter-spacing: -.01em; }
.tag { padding: 3px 10px; border-radius: 999px; font-size: 13px; font-weight: 700; }
.tag-ok { background: #e3efd3; color: #2f4f17; border: 1px solid #a8c47f; }
.tag-open { background: #f4ecd8; color: #5c4710; border: 1px solid #cdb67a; }
.result-list { margin: 0; }
.result-list > div { display: flex; justify-content: space-between; gap: 16px; padding: 11px 0; border-bottom: 1px solid var(--line-2); }
.result-list dt { color: var(--muted); font-size: 15px; }
.result-list dd { margin: 0; font-size: 15px; font-weight: 650; text-align: right; }
.result-list .is-zero dd { color: var(--teal); font-size: 17px; font-variant-numeric: tabular-nums; }
.limit-list { list-style: none; margin: 0; padding: 0; }
.limit-list li { position: relative; padding: 11px 0 11px 28px; border-bottom: 1px solid var(--line-2); font-size: 16px; line-height: 1.6; }
.limit-list li::before { content: ""; position: absolute; left: 2px; top: 17px; width: 12px; height: 12px; border: 2px solid #9b7f2e; border-radius: 50%; }
.card-note { margin: 16px 0 0; font-size: 14px; line-height: 1.6; color: var(--soft); }

/* Method */
.method-section { background: #e7ede3; }
.steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
.steps li { background: var(--paper-2); border: 1px solid #c3cfbf; border-radius: var(--radius); padding: 24px; min-width: 0; }
.step-no {
  display: inline-flex; align-items: center; justify-content: center;
  width: 36px; height: 36px; border: 1px solid #68847a; border-radius: 50%;
  font-size: 13px; font-weight: 700; color: var(--teal);
}
.steps h3 { font-size: 20px; letter-spacing: -.01em; margin: 16px 0 8px; }
.steps p { margin: 0; font-size: 16px; line-height: 1.65; color: var(--muted); }
.steps .gate { display: flex; gap: 8px; align-items: center; margin-top: 14px; padding-top: 12px; border-top: 1px dashed #b5c3b2; font-size: 14px; font-weight: 650; color: var(--teal); }
.gate-mark { width: 10px; height: 10px; flex: none; transform: rotate(45deg); background: var(--teal); }
/* Status */
.status-section { background: var(--dark); color: var(--on-dark); }
.status-section .section-label { color: var(--lime); }
.status-section .section-label span:first-child { color: #9db2ab; }
.status-section .section-head .status-date { font-size: 14px; color: var(--on-dark-muted); }
.status-section :focus-visible { --focus: var(--lime); }
.status-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.status-item { border: 1px solid var(--dark-line); border-top-width: 4px; border-radius: 8px; padding: 20px 22px; background: var(--dark-2); min-width: 0; }
.status-item h3 { margin: 0 0 8px; font-size: 18px; }
.status-item p { margin: 0; font-size: 16px; line-height: 1.65; color: var(--on-dark-muted); }
.status-done { border-top-color: var(--lime); }
.status-plan { border-top-color: #7fb8ab; }
.status-none { border-top-color: #6c7f7b; }
.status-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 32px; }
.status-section .button-ghost { color: var(--on-dark); }

.site-footer {
  display: flex; justify-content: space-between; flex-wrap: wrap; gap: 8px 24px;
  padding: 22px var(--gutter); font-size: 14px; color: #4f625d; background: #e6eae1;
}

/* Responsive */
@media (max-width: 1080px) {
  .hero { grid-template-columns: minmax(0, 1fr); padding-top: 48px; }
  .hero-copy { max-width: 720px; }
  .hero-preview { justify-self: start; max-width: 680px; }
  .site-nav a { padding: 0 9px; font-size: 14px; }
}
@media (max-width: 860px) {
  .capability-grid, .scope-grid, .steps, .status-grid { grid-template-columns: minmax(0, 1fr); }
  .section { padding-top: 64px; padding-bottom: 64px; }
}
/* Collapse only after navigation initialization; failed or absent JS keeps ordinary links visible. */
@media (max-width: 900px) {
  .site-header {
    position: relative; gap: 8px 12px; height: auto; flex-wrap: wrap;
    padding-top: 8px; padding-bottom: 8px;
  }
  .header-tools { margin-left: auto; }
  .site-nav { order: 3; width: 100%; margin-left: 0; flex-wrap: wrap; }
  .site-nav a { flex: 1 1 auto; min-width: 0; white-space: normal; }
  .nav-ready .site-header {
    position: sticky; height: auto; min-height: calc(var(--header-h) + env(safe-area-inset-top));
    flex-wrap: wrap; padding-top: env(safe-area-inset-top); padding-bottom: 0;
  }
  .nav-ready .site-nav {
    position: absolute; left: 0; right: 0; top: 100%;
    width: auto; flex-direction: column; flex-wrap: nowrap; gap: 0;
    padding: 8px var(--gutter) max(16px, env(safe-area-inset-bottom));
    max-height: calc(100vh - 100%);
    max-height: calc(100dvh - 100%);
    overflow-y: auto; overscroll-behavior: contain;
    background: var(--paper-2); border-bottom: 1px solid var(--line);
    box-shadow: 0 12px 24px rgba(16, 33, 35, .12);
    display: flex;
  }
  .nav-ready .site-nav.is-open { display: flex; }
  .nav-ready .site-nav a { flex: 0 0 auto; min-height: 48px; padding: 8px 4px; font-size: 16px; border-bottom: 1px solid var(--line-2); border-radius: 0; }
  .nav-ready .site-nav a:last-child { border-bottom: 0; }
  .hero { padding-top: 40px; padding-bottom: 56px; }
  .hero-preview { box-shadow: 8px 10px 0 rgba(4, 16, 18, .45); }
  .button { flex: 1 1 auto; }
}
@media (max-width: 480px) {
  :root { --header-h: 60px; }
  .wordmark { font-size: 18px; gap: 7px; }
  .mark { width: 24px; height: 24px; font-size: 20px; }
  .menu-label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
  .menu-toggle { padding: 0; justify-content: center; }
  .lang-option { padding: 0 9px; }
  .preview-row { grid-template-columns: minmax(0, 1fr); }
  .preview-pcb { display: none; } /* The complete PCB remains available in the example section. */
  .scope-card, .steps li { padding: 20px 18px; }
  .result-list > div { flex-wrap: wrap; gap: 2px 12px; }
  .result-list dd { text-align: left; }
}
@media (max-width: 370px) {
  .dot { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition-duration: .01ms !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; }
}

@media (forced-colors: active) {
  .lang-option[aria-pressed="true"] { outline: 2px solid CanvasText; }
  .button { border: 1px solid ButtonText; }
}

/* 2026-10 review: neutral scope tags, contact actions, footer link */
.tag-scope { background: #e8eeea; color: #2c4a45; border: 1px solid #b4c4bd; }
.contact-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; }
.contact-actions .button { min-width: 0; max-width: 100%; overflow-wrap: anywhere; }
.contact-section .button-ghost { color: var(--ink); }
.copy-status { font-size: 14px; color: var(--teal); min-height: 1.4em; }
.footer-link { display: inline-block; padding: 4px 0; color: inherit; text-decoration: underline; text-underline-offset: 3px; }
