:root {
  --canvas: #ffffff;
  --ink: #000000;
  --divider: #e5e5e5;
  --signal: #0052cc;
  --signal-light: #f0f4ff;
  --error: #d32f2f;
  --warning: #a15c00;
  --success: #388e3c;
  --muted: #f7f7f7;
  --font: "Pretendard", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --mono: "Courier New", monospace;
  --radius: 4px;
  --section: 64px;
  --max: 1180px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--canvas);
  color: var(--ink);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.6;
}

img {
  display: block;
  max-width: 100%;
}

button,
input,
select,
textarea {
  font: inherit;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

.skip-link {
  position: absolute;
  left: 16px;
  top: -60px;
  z-index: 10;
  background: var(--signal);
  color: #ffffff;
  padding: 12px 20px;
  border-radius: var(--radius);
  transition: top 160ms ease;
}

.skip-link:focus {
  top: 16px;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 5;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  min-height: 64px;
  padding: 0 24px;
  background: rgba(255, 255, 255, 0.94);
  border-bottom: 1px solid var(--divider);
  backdrop-filter: blur(10px);
}

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

.brand-mark {
  display: grid;
  width: 32px;
  height: 32px;
  place-items: center;
  border: 1px solid var(--ink);
  border-radius: var(--radius);
  font-family: var(--mono);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 20px;
}

.nav-links a,
.site-footer a {
  color: var(--ink);
  text-decoration: none;
  border-bottom: 1px solid transparent;
}

.nav-links a:hover,
.site-footer a:hover {
  border-color: var(--ink);
}

.nav-links a:focus-visible,
.site-footer a:focus-visible,
.button:focus-visible,
select:focus-visible,
textarea:focus-visible,
input:focus-visible {
  outline: 2px solid var(--signal);
  outline-offset: 4px;
}

.section-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(320px, 0.9fr);
  gap: 48px;
  align-items: center;
  max-width: var(--max);
  margin: 0 auto;
  padding: var(--section) 24px;
}

.section-grid.reverse {
  grid-template-columns: minmax(320px, 0.82fr) minmax(0, 1.18fr);
}

.hero {
  min-height: calc(100vh - 64px);
}

.eyebrow {
  margin: 0 0 12px;
  color: var(--signal);
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

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

h1 {
  max-width: 760px;
  margin-bottom: 24px;
  font-size: clamp(44px, 7vw, 84px);
  font-weight: 700;
  line-height: 0.98;
  letter-spacing: -0.07em;
}

h2 {
  margin-bottom: 20px;
  font-size: clamp(32px, 4vw, 56px);
  font-weight: 700;
  line-height: 1.05;
  letter-spacing: -0.05em;
}

h3 {
  margin-bottom: 8px;
  font-size: 24px;
  font-weight: 700;
  line-height: 1.2;
}

h4 {
  margin-bottom: 8px;
  font-size: 18px;
  font-weight: 700;
}

.hero-lead,
.tool-heading p,
.feature-copy > p {
  max-width: 680px;
  font-size: 18px;
}

.hero-actions,
.form-actions,
.report-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
  margin-top: 28px;
}

.button {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  justify-content: center;
  padding: 12px 20px;
  border: 1px solid var(--signal);
  border-radius: var(--radius);
  color: var(--signal);
  background: transparent;
  font-size: 14px;
  font-weight: 400;
  line-height: 1.4;
  text-decoration: none;
  cursor: pointer;
  transition: transform 140ms ease, background-color 140ms ease, color 140ms ease, filter 140ms ease;
}

.button.primary {
  color: #ffffff;
  background: var(--signal);
}

.button.secondary:hover,
.button.ghost:hover {
  background: var(--signal-light);
}

.button.primary:hover {
  filter: brightness(0.92);
}

.button:active {
  transform: translateY(1px) scale(0.99);
}

.hero-metrics {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0;
  max-width: 520px;
  margin: 40px 0 0;
  border: 1px solid var(--divider);
}

.hero-metrics div {
  padding: 16px;
  border-right: 1px solid var(--divider);
}

.hero-metrics div:last-child {
  border-right: 0;
}

.hero-metrics dt {
  font-size: 14px;
}

.hero-metrics dd {
  margin: 4px 0 0;
  font-family: var(--mono);
  font-size: 24px;
  text-align: right;
}

.hero-visual,
.feature-image {
  margin: 0;
  border: 1px solid var(--divider);
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--canvas);
}

.hero-visual {
  transform: translateY(36px);
}

.hero-visual img,
.feature-image img {
  width: 100%;
  height: 520px;
  object-fit: cover;
  filter: grayscale(100%) contrast(1.1);
}

.feature-image img {
  height: 440px;
}

figcaption {
  padding: 8px 12px;
  border-top: 1px solid var(--divider);
  font-size: 12px;
}

.trust-strip {
  border-top: 1px solid var(--divider);
  border-bottom: 1px solid var(--divider);
  background: var(--signal-light);
}

.trust-strip p {
  max-width: var(--max);
  margin: 0 auto;
  padding: 20px 24px;
}

.feature-section {
  border-bottom: 1px solid var(--divider);
}

.feature-list {
  display: grid;
  gap: 12px;
  margin-top: 28px;
}

.feature-list article {
  display: grid;
  grid-template-columns: 72px 1fr;
  gap: 16px;
  padding: 16px;
  border: 1px solid var(--divider);
  border-radius: var(--radius);
}

.step-number {
  font-family: var(--mono);
  font-size: 20px;
  text-align: right;
}

.tool-section {
  max-width: var(--max);
  margin: 0 auto;
  padding: var(--section) 24px;
}

.tool-heading {
  max-width: 760px;
  margin-bottom: 32px;
}

.tool-layout {
  display: grid;
  grid-template-columns: minmax(0, 0.95fr) minmax(360px, 1.05fr);
  gap: 28px;
  align-items: start;
}

.input-panel,
.result-panel {
  border: 1px solid var(--divider);
  border-radius: var(--radius);
  background: var(--canvas);
}

.input-panel {
  padding: 20px;
}

.field-group {
  display: grid;
  gap: 8px;
  margin-bottom: 16px;
}

label,
legend {
  font-weight: 700;
}

select,
textarea {
  width: 100%;
  min-height: 44px;
  border: 1px solid var(--divider);
  border-radius: var(--radius);
  background: #ffffff;
  color: var(--ink);
}

select {
  padding: 0 12px;
}

textarea {
  resize: vertical;
  padding: 12px;
  font-family: var(--mono);
  font-size: 14px;
  line-height: 1.5;
}

.checklist {
  display: grid;
  gap: 10px;
  margin: 0;
  padding: 16px;
  border: 1px solid var(--divider);
  border-radius: var(--radius);
}

.checklist label {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  font-weight: 400;
}

.checklist input {
  width: 18px;
  height: 18px;
  margin-top: 3px;
  accent-color: var(--signal);
}

.result-panel {
  position: sticky;
  top: 88px;
  min-height: 520px;
  padding: 20px;
}

.result-head {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--divider);
}

.score-ring {
  display: grid;
  width: 84px;
  height: 84px;
  flex: 0 0 auto;
  place-items: center;
  border: 2px solid var(--divider);
  border-radius: 50%;
  font-family: var(--mono);
  font-size: 24px;
  transition: border-color 180ms ease, color 180ms ease;
}

.score-ring.high {
  color: var(--error);
  border-color: var(--error);
}

.score-ring.medium {
  color: var(--warning);
  border-color: var(--warning);
}

.score-ring.low {
  color: var(--success);
  border-color: var(--success);
}

.result-empty {
  padding: 40px 0;
}

.hidden {
  display: none;
}

.risk-banner {
  margin: 16px 0;
  padding: 12px;
  border: 1px solid var(--divider);
  border-radius: var(--radius);
  font-weight: 700;
}

.risk-banner.high {
  border-color: var(--error);
  color: var(--error);
}

.risk-banner.medium {
  border-color: var(--warning);
  color: var(--warning);
}

.risk-banner.low {
  border-color: var(--success);
  color: var(--success);
}

.result-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  border: 1px solid var(--divider);
}

.result-grid div {
  padding: 12px;
  border-right: 1px solid var(--divider);
}

.result-grid div:last-child {
  border-right: 0;
}

.result-grid span {
  display: block;
  font-size: 12px;
}

.result-grid strong {
  display: block;
  margin-top: 4px;
  font-family: var(--mono);
  font-size: 18px;
  text-align: right;
}

.report-section {
  margin-top: 20px;
}

.report-section ul,
.report-section ol,
.limit-list {
  padding-left: 22px;
}

.report-section li,
.limit-list li {
  margin-bottom: 8px;
}

.limit-section {
  display: grid;
  grid-template-columns: 0.8fr 1.2fr;
  gap: 48px;
  max-width: var(--max);
  margin: 0 auto;
  padding: var(--section) 24px;
  border-top: 1px solid var(--divider);
}

.limit-list {
  margin: 0;
}

.site-footer {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  padding: 24px;
  border-top: 1px solid var(--divider);
}

.site-footer p {
  margin: 0;
}

.animate-in {
  animation: rise 520ms ease both;
}

.delay-1 {
  animation-delay: 120ms;
}

.delay-2 {
  animation-delay: 220ms;
}

@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(18px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

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

  .animate-in,
  .delay-1,
  .delay-2 {
    animation-delay: 0ms;
    animation-duration: 1ms;
  }

  .skip-link,
  .button,
  .score-ring {
    transition-duration: 1ms;
  }
}

@media (max-width: 920px) {
  .site-header {
    position: static;
    align-items: flex-start;
    flex-direction: column;
    padding: 16px;
  }

  .nav-links {
    flex-wrap: wrap;
  }

  .section-grid,
  .section-grid.reverse,
  .tool-layout,
  .limit-section {
    grid-template-columns: 1fr;
  }

  .hero {
    min-height: auto;
  }

  .hero-visual {
    transform: none;
  }

  .result-panel {
    position: static;
  }
}

@media (max-width: 620px) {
  .hero-metrics,
  .result-grid {
    grid-template-columns: 1fr;
  }

  .hero-metrics div,
  .result-grid div {
    border-right: 0;
    border-bottom: 1px solid var(--divider);
  }

  .hero-metrics div:last-child,
  .result-grid div:last-child {
    border-bottom: 0;
  }

  .feature-list article {
    grid-template-columns: 1fr;
  }

  .step-number {
    text-align: left;
  }

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