:root {
  --ink: #18201c;
  --muted: #65706a;
  --paper: #f3f1e9;
  --white: #fffefa;
  --green: #146c43;
  --green-soft: #e5f0e9;
  --red: #a43d31;
  --red-soft: #f8e8e4;
  --line: #d7d9d2;
  --serif: Georgia, "Noto Serif KR", serif;
  --sans: Pretendard, "Apple SD Gothic Neo", "Noto Sans KR", sans-serif;
  --mono: "JetBrains Mono", "SFMono-Regular", Consolas, monospace;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--paper); color: var(--ink); font-family: var(--sans); line-height: 1.65; }
a { color: inherit; }
img { max-width: 100%; height: auto; }
button, a { -webkit-tap-highlight-color: transparent; }
.skip-link { position: fixed; top: 8px; left: 8px; z-index: 100; transform: translateY(-160%); padding: 10px 14px; background: var(--ink); color: white; }
.skip-link:focus { transform: none; }

.site-header { width: min(1180px, calc(100% - 48px)); height: 82px; margin: 0 auto; display: flex; align-items: center; justify-content: space-between; border-bottom: 1px solid rgba(24,32,28,.18); }
.brand { min-height: 44px; display: inline-flex; align-items: center; gap: 11px; font: 800 1.02rem/1 var(--sans); text-decoration: none; letter-spacing: -.025em; }
.brand img { flex: 0 0 auto; }
nav { display: flex; align-items: center; gap: 28px; font-size: .88rem; font-weight: 700; }
nav a { text-decoration: none; }
nav a:hover { color: var(--green); }
.nav-cta { min-height: 44px; display: inline-flex; align-items: center; padding: 9px 15px; border: 1px solid var(--ink); border-radius: 8px; }

.hero { width: min(1180px, calc(100% - 48px)); min-height: 690px; margin: 0 auto; padding: 96px 0 90px; display: grid; grid-template-columns: 1.03fr .97fr; gap: 78px; align-items: center; }
.kicker, .section-number { margin: 0 0 24px; color: var(--green); font: 700 .72rem/1.4 var(--mono); letter-spacing: .14em; }
h1, h2 { font-family: var(--serif); font-weight: 700; letter-spacing: -.055em; }
h1 { max-width: 650px; margin: 0; font-size: clamp(3.6rem, 7.5vw, 6.8rem); line-height: .94; }
h1 em { color: var(--green); font-style: italic; }
.lede { max-width: 610px; margin: 34px 0 0; color: #39433e; font-size: clamp(1.03rem, 1.6vw, 1.25rem); line-height: 1.75; word-break: keep-all; }
.ai-disclosure { max-width: 610px; margin: 14px 0 0; color: var(--muted); font-size: .82rem; line-height: 1.55; }
.hero-actions, .cta-links { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 34px; }
.button { min-height: 48px; display: inline-flex; align-items: center; justify-content: center; padding: 0 20px; border: 1px solid var(--ink); border-radius: 9px; font-size: .92rem; font-weight: 800; text-decoration: none; transition: transform .16s ease, background .16s ease; }
.button:hover { transform: translateY(-2px); }
.button.primary { border-color: var(--green); background: var(--green); color: white; }
.button.secondary { background: transparent; }
.trust-list { display: flex; flex-wrap: wrap; gap: 20px; margin: 22px 0 0; padding: 0; color: var(--muted); font-size: .76rem; list-style: none; }
.trust-list li::before { content: ""; display: inline-block; width: 5px; height: 5px; margin: 0 7px 2px 0; border-radius: 50%; background: var(--green); }

.proof-sheet { position: relative; transform: rotate(1.1deg); padding: 24px; border: 1px solid #cbcfc8; background: var(--white); box-shadow: 18px 22px 0 rgba(24,32,28,.08); }
.proof-sheet::before { content: ""; position: absolute; inset: 12px -13px -13px 12px; z-index: -1; border: 1px solid #c6cac3; background: #e8e6dd; }
.sheet-head, .sheet-foot { display: flex; align-items: center; justify-content: space-between; color: var(--muted); font: 700 .7rem/1.4 var(--mono); letter-spacing: .08em; }
.status-dot::before { content: ""; display: inline-block; width: 7px; height: 7px; margin-right: 7px; border-radius: 50%; background: #c57b18; }
.sentence { margin-top: 20px; padding: 20px; border: 1px solid var(--line); }
.sentence .label { display: block; margin-bottom: 10px; color: var(--muted); font: 700 .7rem var(--mono); }
.sentence p { margin: 0; font-size: 1.04rem; line-height: 1.8; }
.sentence del { padding: 2px 4px; background: var(--red-soft); color: var(--red); text-decoration-thickness: 1.5px; }
.sentence ins { padding: 2px 4px; background: var(--green-soft); color: var(--green); text-decoration: none; }
.proof-arrow { height: 20px; color: var(--muted); text-align: center; line-height: 24px; }
.sheet-foot { margin-top: 20px; }
.sheet-foot button { min-height: 44px; padding: 0 14px; border: 0; border-radius: 7px; background: var(--green); color: white; font: 700 .82rem var(--sans); cursor: pointer; }
.proof-sheet.accepted .sentence.before { opacity: .42; }
.proof-sheet.accepted .status-dot { color: var(--green); }
.proof-sheet.accepted .status-dot::before { background: var(--green); }

.principle-strip { overflow: hidden; display: grid; grid-template-columns: 1fr 1fr; background: var(--ink); color: white; }
.principle-strip p { margin: 0; padding: 32px 4vw; font: 400 clamp(1.25rem, 2.4vw, 2rem) var(--serif); }
.principle-strip p:first-child { border-right: 1px solid rgba(255,255,255,.18); color: #adb5b0; text-align: right; }
.principle-strip strong { color: #69bf91; font-style: italic; }

.section { width: min(1180px, calc(100% - 48px)); margin: 0 auto; padding: 140px 0; }
.section-intro { display: grid; grid-template-columns: 145px 1.05fr .75fr; gap: 45px; align-items: end; }
.section-intro h2, .knowledge-copy h2, .install-cta h2 { margin: 0; font-size: clamp(2.6rem, 5vw, 4.7rem); line-height: 1.06; }
.section-intro > p:last-child { margin: 0 0 8px; color: var(--muted); word-break: keep-all; }
.steps { margin: 80px 0 0 190px; padding: 0; border-top: 1px solid var(--line); list-style: none; }
.steps li { display: grid; grid-template-columns: 72px 1fr; gap: 22px; padding: 29px 0; border-bottom: 1px solid var(--line); }
.steps > li > span { color: var(--green); font: 700 .75rem var(--mono); }
.steps h3 { margin: 0 0 7px; font-size: 1.14rem; }
.steps p { max-width: 650px; margin: 0; color: var(--muted); }

.knowledge-preview { display: grid; grid-template-columns: .9fr 1.1fr; gap: 90px; align-items: center; border-top: 1px solid var(--line); }
.knowledge-copy > p:not(.section-number) { max-width: 500px; margin: 28px 0; color: var(--muted); }
.text-link { color: var(--green); font-weight: 800; text-underline-offset: 4px; }
.vault-stack { position: relative; min-height: 470px; }
.vault-stack article { position: absolute; width: min(480px, 88%); padding: 30px; border: 1px solid var(--line); background: var(--white); box-shadow: 0 12px 30px rgba(24,32,28,.08); }
.vault-stack article:nth-child(1) { top: 0; left: 0; transform: rotate(-1.5deg); }
.vault-stack article:nth-child(2) { top: 130px; right: 0; z-index: 2; transform: rotate(1.2deg); }
.vault-stack article:nth-child(3) { bottom: 0; left: 25px; transform: rotate(-.7deg); }
.vault-stack span, .mode-grid span { color: var(--green); font: 700 .68rem var(--mono); letter-spacing: .07em; }
.vault-stack h3 { margin: 10px 0; font: 700 1.35rem var(--serif); }
.vault-stack p { margin: 0; color: var(--muted); font-size: .89rem; }

.section-intro.compact { grid-template-columns: 145px 1fr; }
.mode-grid { display: grid; grid-template-columns: repeat(3, 1fr); margin-top: 70px; border: 1px solid var(--line); }
.mode-grid article { min-height: 210px; padding: 28px; border-right: 1px solid var(--line); background: rgba(255,255,255,.32); }
.mode-grid article:last-child { border-right: 0; }
.mode-grid article.selected { background: var(--green); color: white; transform: translateY(-12px); box-shadow: 0 16px 26px rgba(20,108,67,.2); }
.mode-grid article.selected span, .mode-grid article.selected p { color: #cce6d7; }
.mode-grid h3 { margin: 42px 0 8px; font: 700 1.35rem var(--serif); }
.mode-grid p { margin: 0; color: var(--muted); font-size: .86rem; }
.tone-scale { margin: 68px 4% 0; }
.scale-line { display: grid; grid-template-columns: repeat(5, 1fr); align-items: center; height: 2px; background: #b8beb9; }
.scale-line i { justify-self: center; width: 12px; height: 12px; border: 2px solid var(--paper); border-radius: 50%; background: #7f8983; box-shadow: 0 0 0 1px #7f8983; }
.scale-line i.active { width: 18px; height: 18px; background: var(--green); box-shadow: 0 0 0 2px var(--green); }
.scale-labels { display: grid; grid-template-columns: repeat(5, 1fr); margin-top: 16px; color: var(--muted); font-size: .72rem; text-align: center; }
.tone-scale[aria-label="설명률 단계"] .scale-line,.tone-scale[aria-label="설명률 단계"] .scale-labels { grid-template-columns: repeat(3, 1fr); }
.scale-labels strong { color: var(--green); }

.screenshot-section { padding: 130px max(24px, calc((100% - 1180px)/2)); background: var(--ink); color: white; }
.section-intro.light .section-number { color: #69bf91; }
.section-intro.light > p:last-child { color: #aeb6b1; }
.screenshot-section figure { margin: 65px 0 0; }
.screenshot-section img { display: block; width: 100%; border: 1px solid #48504b; box-shadow: 0 32px 70px rgba(0,0,0,.28); }
.screenshot-section figcaption { margin-top: 14px; color: #aeb6b1; font: .72rem var(--mono); }

.install-cta { display: grid; grid-template-columns: .8fr 1.2fr; gap: 70px; align-items: center; }
.terminal { overflow: hidden; border: 1px solid #2f3833; border-radius: 10px; background: #111713; color: #dfe7e2; box-shadow: 0 24px 40px rgba(24,32,28,.13); }
.terminal div { display: grid; grid-template-columns: 22px 1fr auto; gap: 10px; align-items: center; min-height: 58px; padding: 0 16px; border-bottom: 1px solid #2b332e; }
.terminal div:last-child { border-bottom: 0; }
.terminal span { color: #69bf91; font-family: var(--mono); }
.terminal code { overflow: auto; font: .75rem var(--mono); white-space: nowrap; }
.terminal button { min-width: 52px; min-height: 44px; border: 1px solid #4b5550; border-radius: 6px; background: transparent; color: #dfe7e2; cursor: pointer; }
.install-cta .cta-links { grid-column: 2; margin: -35px 0 0; }

footer { width: min(1180px, calc(100% - 48px)); margin: 0 auto; padding: 42px 0 58px; display: grid; grid-template-columns: auto 1fr auto; gap: 34px; align-items: center; border-top: 1px solid var(--line); color: var(--muted); font-size: .78rem; }
footer p { margin: 0; }
footer div:last-child { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 18px; }
footer a { min-height: 44px; display: inline-flex; align-items: center; text-underline-offset: 3px; }
#toast { position: fixed; right: 22px; bottom: 22px; z-index: 50; transform: translateY(30px); padding: 12px 16px; border-radius: 8px; background: var(--ink); color: white; font-size: .82rem; opacity: 0; pointer-events: none; transition: .2s ease; }
#toast.show { transform: none; opacity: 1; }

.subpage main { width: min(980px, calc(100% - 48px)); margin: 0 auto; padding: 85px 0 130px; }
.sub-hero { max-width: 790px; padding-bottom: 70px; }
.sub-hero h1 { font-size: clamp(3.1rem, 7vw, 5.8rem); }
.sub-hero .lede { max-width: 720px; }
.content-section { display: grid; grid-template-columns: 190px minmax(0, 1fr); gap: 48px; padding: 58px 0; border-top: 1px solid var(--line); }
.content-section > div { min-width: 0; }
.content-section > h2 { margin: 0; font: 700 1.6rem/1.2 var(--serif); letter-spacing: -.03em; }
.content-section h3 { margin: 2.2em 0 .55em; font-size: 1.08rem; }
.content-section h3:first-child { margin-top: 0; }
.content-section p, .content-section li { color: #424c47; }
.content-section code { padding: 2px 5px; border-radius: 4px; background: #e5e4dd; font: .82em var(--mono); }
.code-block { overflow-x: auto; max-width: 100%; margin: 18px 0; padding: 20px; border-radius: 9px; background: #111713; color: #dfe7e2; font: .82rem/1.8 var(--mono); white-space: pre; }
.callout { margin: 24px 0; padding: 20px 22px; border-left: 3px solid var(--green); background: var(--green-soft); }
.card-list { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; padding: 0; list-style: none; }
.card-list li { padding: 18px; border: 1px solid var(--line); background: rgba(255,255,255,.45); }
.card-list strong { display: block; margin-bottom: 4px; color: var(--ink); }

@media (max-width: 860px) {
  .site-header { width: min(100% - 30px, 1180px); height: 68px; }
  nav a:not(.nav-cta) { display: none; }
  .hero { width: min(100% - 32px, 1180px); min-height: 0; padding: 68px 0 74px; grid-template-columns: 1fr; gap: 58px; }
  h1 { font-size: clamp(3.2rem, 16vw, 5.6rem); }
  .proof-sheet { width: calc(100% - 12px); justify-self: center; transform: rotate(.4deg); }
  .principle-strip { grid-template-columns: 1fr; }
  .principle-strip p { padding: 22px 24px; text-align: left !important; }
  .principle-strip p:first-child { border-right: 0; border-bottom: 1px solid rgba(255,255,255,.18); }
  .section { width: min(100% - 32px, 1180px); padding: 90px 0; }
  .section-intro, .section-intro.compact { grid-template-columns: 1fr; gap: 16px; }
  .section-intro h2, .knowledge-copy h2, .install-cta h2 { font-size: clamp(2.5rem, 12vw, 4rem); }
  .section-number { margin-bottom: 4px; }
  .steps { margin: 48px 0 0; }
  .knowledge-preview { grid-template-columns: 1fr; gap: 52px; }
  .vault-stack { min-height: 450px; }
  .mode-grid { grid-template-columns: 1fr 1fr; }
  .mode-grid article { min-height: 180px; border-bottom: 1px solid var(--line); }
  .mode-grid article:nth-child(2) { border-right: 0; }
  .mode-grid article.selected { transform: none; }
  .scale-labels { font-size: .62rem; }
  .screenshot-section { padding: 88px 16px; }
  .install-cta { grid-template-columns: 1fr; gap: 38px; }
  .install-cta .cta-links { grid-column: 1; margin: 0; }
  footer { width: calc(100% - 32px); grid-template-columns: 1fr; gap: 14px; }
  footer div:last-child { justify-content: flex-start; }
  .content-section { grid-template-columns: 1fr; gap: 20px; }
  .content-section p a:not(.button), .text-link { min-height: 44px; display: inline-flex; align-items: center; }
}

@media (max-width: 520px) {
  .hero-actions .button, .cta-links .button { width: 100%; }
  .trust-list { display: grid; gap: 6px; }
  .proof-sheet { padding: 16px; }
  .sentence { padding: 15px; }
  .steps li { grid-template-columns: 46px 1fr; }
  .mode-grid { grid-template-columns: 1fr; }
  .mode-grid article { min-height: 150px; border-right: 0; }
  .mode-grid h3 { margin-top: 28px; }
  .tone-scale { margin-inline: 0; }
  .tone-scale[aria-label="말투 높임 단계"] .scale-labels span:nth-child(2), .tone-scale[aria-label="말투 높임 단계"] .scale-labels span:nth-child(4) { visibility: hidden; }
  .terminal div { grid-template-columns: 18px 1fr; padding: 10px 13px; }
  .terminal button { grid-column: 2; width: 58px; }
  .card-list { grid-template-columns: 1fr; }
}

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