/* tax.askewly.com — 토큰 정본은 레포 루트 DESIGN.md.
   색·치수 리터럴은 이 :root 블록에만 존재한다. 그 밖에서는 var(--…) 만 쓴다.

   섹션 구조는 어스큐리 레지스트리 자산에서 이식했다:
   - 히어로   → /r/floating-bars-hero.json
   - 문제     → /r/contrast-duo-card.json
   - 작동방식 → /r/terminal-demo-panel.json
   - 측정     → /r/stat-summary-grid.json
   원본은 React + Tailwind 토큰이라, 이 프로젝트 토큰으로 다시 입혔다(component-restyle 계약). */

:root {
  color-scheme: light;

  /* colors */
  --primary: #1D4ED8;
  --primary-hover: #1740B0;
  --on-primary: #FFFFFF;
  --canvas: #FAFBFC;
  --surface: #FFFFFF;
  --surface-alt: #F1F4F8;
  --ink: #101620;
  --on-surface: rgba(16, 22, 32, 0.92);
  --muted: rgba(16, 22, 32, 0.74);
  --faint: rgba(16, 22, 32, 0.60);
  --border: rgba(16, 22, 32, 0.10);
  --border-strong: rgba(16, 22, 32, 0.20);
  --primary-faint: rgba(29, 78, 216, 0.07);
  --on-ink: rgba(255, 255, 255, 0.92);
  --on-ink-muted: rgba(255, 255, 255, 0.72);
  --on-ink-faint: rgba(255, 255, 255, 0.55);
  --on-ink-line: rgba(255, 255, 255, 0.15);

  /* typography */
  --font-display: "Pretendard Variable", Pretendard, system-ui, sans-serif;
  --font-body: "Pretendard Variable", Pretendard, system-ui, sans-serif;
  --font-mono: ui-monospace, SFMono-Regular, Menlo, monospace;
  --size-display: 54px;
  --size-headline: 32px;
  --size-title: 19px;
  --size-body: 16px;
  --size-label: 13px;
  --size-mono: 12.5px;

  /* shape + space */
  --r-sm: 4px;
  --r-md: 8px;
  --r-lg: 12px;
  --unit: 4px;
  --gap: 16px;
  --pad: 24px;
  --section: 96px;
  --container: 1080px;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  overflow-y: scroll;
  scrollbar-gutter: stable;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--canvas);
  color: var(--on-surface);
  font-family: var(--font-body);
  font-size: var(--size-body);
  line-height: 1.7;
  word-break: keep-all;
  overflow-wrap: anywhere;
  -webkit-font-smoothing: antialiased;
}

h1,
h2,
h3 {
  font-family: var(--font-display);
  font-weight: 800;
  text-wrap: balance;
  margin: 0;
}

p {
  margin: 0;
}

a {
  color: inherit;
}

:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 3px;
  border-radius: var(--r-sm);
}

code {
  font-family: var(--font-mono);
  font-size: 0.94em;
  background: var(--surface-alt);
  border-radius: var(--r-sm);
  padding: 1px 5px;
}

.container {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: var(--pad);
}

/* ---------- header ---------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  background: var(--canvas);
  border-bottom: 1px solid var(--border);
}

.site-header__inner {
  display: flex;
  align-items: center;
  gap: var(--gap);
  height: 64px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: calc(var(--unit) * 2.5);
  text-decoration: none;
  font-weight: 600;
  letter-spacing: -0.01em;
}

.brand__mark {
  display: block;
}

.brand__sub {
  color: var(--faint);
  font-size: var(--size-label);
  font-weight: 400;
}

.site-nav {
  display: flex;
  gap: calc(var(--unit) * 6);
  margin-inline-start: auto;
  font-size: var(--size-label);
}

.site-nav a {
  color: var(--muted);
  text-decoration: none;
  padding-block: calc(var(--unit) * 2);
  transition: color 0.15s ease;
}

.site-nav a:hover {
  color: var(--on-surface);
}

.header-cta {
  margin-inline-start: calc(var(--unit) * 6);
}

/* ---------- buttons ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  gap: calc(var(--unit) * 2);
  border-radius: var(--r-sm);
  font-family: var(--font-body);
  font-size: var(--size-label);
  font-weight: 500;
  line-height: 1;
  text-decoration: none;
  cursor: pointer;
  border: 1px solid transparent;
  transition: background-color 0.15s ease, border-color 0.15s ease;
}

.btn--primary {
  background: var(--primary);
  color: var(--on-primary);
  padding: 14px 22px;
}

.btn--primary:hover {
  background: var(--primary-hover);
}

.btn--ghost {
  background: transparent;
  color: var(--on-surface);
  border-color: var(--border-strong);
  padding: 13px 20px;
}

.btn--ghost:hover {
  border-color: var(--on-surface);
}

/* ---------- hero (floating-bars-hero 이식) ---------- */

.hero {
  position: relative;
  overflow: hidden;
  padding-block: calc(var(--section) * 1.1) var(--section);
  text-align: center;
}

.hero__deco {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.hero__grid {
  position: absolute;
  inset: 0;
  opacity: 0.3;
  background-image:
    linear-gradient(color-mix(in srgb, var(--ink) 5%, transparent) 1px, transparent 1px),
    linear-gradient(90deg, color-mix(in srgb, var(--ink) 4%, transparent) 1px, transparent 1px),
    linear-gradient(color-mix(in srgb, var(--ink) 8%, transparent) 1px, transparent 1px),
    linear-gradient(90deg, color-mix(in srgb, var(--ink) 8%, transparent) 1px, transparent 1px);
  background-size: 18.6px 18.6px, 18.6px 18.6px, 112px 112px, 112px 112px;
}

.hero__bar {
  position: absolute;
  border-radius: var(--r-sm);
}

.hero__bar[data-tone="deep"] { background: color-mix(in srgb, var(--ink) 80%, transparent); }
.hero__bar[data-tone="mid"]  { background: color-mix(in srgb, var(--ink) 45%, transparent); }
.hero__bar[data-tone="soft"] { background: color-mix(in srgb, var(--ink) 20%, transparent); }
.hero__bar[data-tone="pale"] { background: color-mix(in srgb, var(--primary) 25%, transparent); }

.hero__fade {
  position: absolute;
  inset-inline: 0;
  bottom: 0;
  height: 160px;
  background: linear-gradient(to bottom, transparent, var(--canvas));
}

.hero__inner {
  position: relative;
  z-index: 1;
  max-width: 660px;
  margin-inline: auto;
  padding-inline: var(--pad);
}

.hero__mark {
  display: block;
  margin: 0 auto calc(var(--unit) * 7);
}

.hero h1 {
  font-size: var(--size-display);
  line-height: 1.18;
  letter-spacing: -0.035em;
}

.hero h1 .accent {
  color: var(--primary);
}

.hero__sub {
  margin-top: calc(var(--unit) * 4);
  color: var(--muted);
  font-size: 17px;
}

.hero__actions {
  margin-top: calc(var(--unit) * 8);
  display: flex;
  gap: calc(var(--unit) * 2.5);
  justify-content: center;
  flex-wrap: wrap;
}

/* ---------- coverage strip ---------- */

.strip {
  border-block: 1px solid var(--border);
  background: var(--surface-alt);
  padding-block: calc(var(--unit) * 7);
}

.strip__list {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: calc(var(--unit) * 3) calc(var(--unit) * 6);
  margin: 0 0 calc(var(--unit) * 4);
  padding: 0;
  list-style: none;
  font-size: var(--size-label);
  color: var(--muted);
}

.strip__caption {
  text-align: center;
  font-size: var(--size-label);
  color: var(--faint);
}

.strip__list b,
.strip__caption b {
  color: var(--on-surface);
  font-weight: 500;
}

/* ---------- sections ---------- */

.section {
  padding-block: var(--section);
}

.eyebrow {
  display: inline-block;
  border: 1px solid var(--primary);
  color: var(--primary);
  border-radius: var(--r-sm);
  padding: calc(var(--unit) * 1) calc(var(--unit) * 2.5);
  font-size: 12px;
  line-height: 1.5;
  margin-bottom: calc(var(--unit) * 5);
}

.section h2 {
  font-size: var(--size-headline);
  letter-spacing: -0.025em;
  margin-bottom: calc(var(--unit) * 3);
}

.section__lede {
  color: var(--muted);
  max-width: 62ch;
  margin-bottom: calc(var(--unit) * 12);
  text-wrap: pretty;
}

/* ---------- 문제 (contrast-duo-card 이식) ---------- */

.duo {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--gap);
}

.duo__card {
  display: flex;
  flex-direction: column;
  border-radius: var(--r-lg);
  padding: calc(var(--unit) * 8);
  background: var(--surface);
  border: 1px solid var(--border);
}

.duo__card--inverted {
  background: var(--ink);
  border-color: var(--ink);
  color: var(--on-ink);
}

.duo__label {
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.14em;
  color: var(--faint);
}

.duo__card--inverted .duo__label {
  color: var(--on-ink-faint);
}

.duo__card h3 {
  font-size: 20px;
  font-weight: 700;
  line-height: 1.45;
  letter-spacing: -0.02em;
  margin-top: calc(var(--unit) * 2);
}

.duo__body {
  margin-top: calc(var(--unit) * 2.5);
  font-size: 15px;
  color: var(--muted);
}

.duo__card--inverted .duo__body {
  color: var(--on-ink-muted);
}

.duo__band {
  margin-top: calc(var(--unit) * 5);
  border-radius: var(--r-md);
  background: var(--surface-alt);
  padding: calc(var(--unit) * 3.5) calc(var(--unit) * 4);
  font-size: 13px;
  line-height: 1.7;
  color: var(--faint);
}

.duo__card--inverted .duo__band {
  background: rgba(255, 255, 255, 0.1);
  color: var(--on-ink-muted);
}

.duo__band em {
  font-style: normal;
  opacity: 0.75;
}

/* ---------- 작동 방식 (terminal-demo-panel 이식) ---------- */

.demo {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: calc(var(--unit) * 3);
}

.demo__pane {
  height: 320px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border-radius: var(--r-lg);
  border: 1px solid var(--border);
}

.demo__terminal {
  background: var(--ink);
  border-color: var(--ink);
  color: var(--on-ink);
}

.demo__chrome {
  display: flex;
  align-items: center;
  gap: calc(var(--unit) * 1.75);
  padding: calc(var(--unit) * 2.5) calc(var(--unit) * 3);
  border-bottom: 1px solid var(--on-ink-line);
}

.demo__dot {
  width: 9px;
  height: 9px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.25);
}

.demo__name {
  margin-inline-start: calc(var(--unit) * 1);
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--on-ink-faint);
}

.demo__toggle {
  margin-inline-start: auto;
  background: none;
  border: 0;
  cursor: pointer;
  font-family: var(--font-body);
  font-size: 12px;
  color: var(--on-ink-faint);
  padding: calc(var(--unit) * 0.75) calc(var(--unit) * 1.5);
  border-radius: var(--r-sm);
  transition: color 0.15s ease;
}

.demo__toggle:hover {
  color: var(--on-ink);
}

.demo__body {
  flex: 1;
  overflow-y: auto;
  padding: calc(var(--unit) * 3.5);
  font-family: var(--font-mono);
  font-size: var(--size-mono);
  line-height: 1.8;
}

.demo__prompt {
  color: var(--on-ink-faint);
}

.demo__cursor {
  animation: demo-blink 1s steps(2, start) infinite;
}

@keyframes demo-blink {
  to { visibility: hidden; }
}

.demo__lines {
  margin-top: calc(var(--unit) * 2.5);
}

.demo__line {
  color: var(--on-ink-muted);
}

.demo__line--ok {
  color: var(--on-ink);
}

.demo__result {
  background: var(--surface-alt);
  opacity: 0.6;
  transition: opacity 0.5s ease, background-color 0.5s ease;
}

.demo__result.is-open {
  background: var(--surface);
  opacity: 1;
}

.demo__resultbar {
  display: flex;
  align-items: center;
  padding: calc(var(--unit) * 2.5) calc(var(--unit) * 3);
  border-bottom: 1px solid var(--border);
}

.demo__addr {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--faint);
  background: var(--surface-alt);
  padding: 2px 8px;
  border-radius: var(--r-sm);
}

.demo__resultbody {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: calc(var(--unit) * 2.5);
  padding: calc(var(--unit) * 6);
  text-align: center;
}

.demo__verdict {
  font-size: 17px;
  font-weight: 600;
  letter-spacing: -0.01em;
}

.demo__citation {
  font-size: 13px;
  color: var(--faint);
}

.demo__wait {
  font-size: 13px;
  color: var(--faint);
}

/* ---------- 판정 사례 탭 ---------- */

.tabs__bar {
  display: flex;
  border: 1px solid var(--border);
  border-radius: var(--r-lg) var(--r-lg) 0 0;
  background: var(--surface-alt);
  overflow-x: auto;
}

.tabs__tab {
  flex: 1 0 auto;
  appearance: none;
  background: transparent;
  border: 0;
  border-bottom: 2px solid transparent;
  color: var(--muted);
  font-family: var(--font-body);
  font-size: var(--size-label);
  text-align: start;
  padding: calc(var(--unit) * 4) calc(var(--unit) * 5);
  cursor: pointer;
  transition: color 0.15s ease, background-color 0.15s ease;
}

.tabs__tab:hover {
  color: var(--on-surface);
  background: var(--surface);
}

.tabs__tab[aria-selected="true"] {
  color: var(--primary);
  border-bottom-color: var(--primary);
  background: var(--surface);
}

.tabs__tab small {
  display: block;
  color: var(--faint);
  font-size: 12px;
  margin-top: 2px;
}

.tabs__panel {
  border: 1px solid var(--border);
  border-top: 0;
  border-radius: 0 0 var(--r-lg) var(--r-lg);
  background: var(--surface);
  padding: calc(var(--unit) * 9) var(--pad);
}

.tabs__panel[hidden] {
  display: none;
}

.log {
  list-style: none;
  margin: 0;
  padding: 0;
  counter-reset: step;
}

.log__step {
  position: relative;
  padding-inline-start: calc(var(--unit) * 11);
  padding-bottom: calc(var(--unit) * 8);
}

.log__step::before {
  counter-increment: step;
  content: counter(step);
  position: absolute;
  inset-inline-start: 0;
  top: 0;
  width: calc(var(--unit) * 6);
  height: calc(var(--unit) * 6);
  border: 1px solid var(--border-strong);
  border-radius: var(--r-sm);
  color: var(--faint);
  font-size: 12px;
  font-weight: 500;
  display: grid;
  place-items: center;
}

.log__step::after {
  content: "";
  position: absolute;
  inset-inline-start: calc(var(--unit) * 3);
  top: calc(var(--unit) * 7);
  bottom: 0;
  width: 1px;
  background: var(--border);
}

.log__step:last-child {
  padding-bottom: 0;
}

.log__step:last-child::after {
  display: none;
}

.log__label {
  font-size: 12px;
  letter-spacing: 0.06em;
  color: var(--faint);
  margin-bottom: calc(var(--unit) * 1.5);
}

.log__body {
  font-size: 15px;
}

.log__body em {
  color: var(--muted);
  font-style: normal;
}

.log__quote {
  margin-top: calc(var(--unit) * 3);
  border-radius: var(--r-md);
  background: var(--surface-alt);
  padding: calc(var(--unit) * 4) calc(var(--unit) * 5);
  font-size: 14px;
  line-height: 1.75;
  color: var(--muted);
  white-space: pre-line;
}

.log__cite {
  display: block;
  margin-top: calc(var(--unit) * 2);
  color: var(--faint);
  font-size: 12px;
}

.spectrum {
  display: flex;
  flex-wrap: wrap;
  gap: calc(var(--unit) * 2);
  margin: calc(var(--unit) * 2) 0 0;
  padding: 0;
  list-style: none;
}

.spectrum li {
  border: 1px solid var(--border-strong);
  border-radius: var(--r-sm);
  padding: calc(var(--unit) * 1) calc(var(--unit) * 3);
  font-size: 12px;
  color: var(--faint);
}

.spectrum li[data-picked] {
  border-color: var(--primary);
  background: var(--primary-faint);
  color: var(--primary);
}

.verdict {
  margin-top: calc(var(--unit) * 4);
  border-radius: var(--r-md);
  background: var(--primary-faint);
  padding: calc(var(--unit) * 4) calc(var(--unit) * 5);
  font-size: 15px;
}

.verdict b {
  font-weight: 600;
}

/* ---------- 측정 (stat-summary-grid 이식) ---------- */

.stats__head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: var(--gap);
  margin-bottom: calc(var(--unit) * 5);
}

.stats__head h3 {
  font-size: 17px;
  font-weight: 600;
  letter-spacing: -0.01em;
}

.stats__head p {
  font-size: 14px;
  color: var(--muted);
}

.stats__head a {
  font-size: 14px;
  font-weight: 500;
  color: var(--primary);
  white-space: nowrap;
}

.stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2px;
  border-radius: var(--r-lg);
  overflow: hidden;
  margin: 0 0 calc(var(--unit) * 6);
}

.stat {
  background: var(--surface);
  padding: calc(var(--unit) * 7) var(--pad);
}

.stat dt {
  font-size: 14px;
  color: var(--muted);
}

.stat dd {
  margin: calc(var(--unit) * 2) 0 0;
  font-size: 32px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.03em;
  line-height: 1.15;
}

.stat__trend {
  margin-top: calc(var(--unit) * 1);
  font-size: 13px;
  color: var(--muted);
}

.callout {
  border-radius: var(--r-lg);
  background: var(--surface-alt);
  padding: var(--pad);
  color: var(--muted);
  font-size: 15px;
}

.callout b {
  color: var(--on-surface);
  font-weight: 600;
}

.callout a {
  color: var(--primary);
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* ---------- 범위 ---------- */

.scope {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 2px;
  border-radius: var(--r-lg);
  overflow: hidden;
  margin: 0;
  padding: 0;
  list-style: none;
}

.scope li {
  background: var(--surface);
  padding: calc(var(--unit) * 6) var(--pad);
}

.scope b {
  display: block;
  font-weight: 600;
  margin-bottom: calc(var(--unit) * 1);
}

.scope span {
  color: var(--muted);
  font-size: 14px;
}

/* ---------- footer ---------- */

.site-footer {
  border-top: 1px solid var(--border);
  padding-block: calc(var(--unit) * 10);
  color: var(--faint);
  font-size: var(--size-label);
}

.site-footer__inner {
  display: flex;
  flex-wrap: wrap;
  gap: var(--gap);
  align-items: baseline;
  justify-content: space-between;
}

.site-footer a {
  color: var(--muted);
  text-decoration: none;
}

.site-footer a:hover {
  color: var(--on-surface);
  text-decoration: underline;
}

.site-footer__links {
  display: flex;
  gap: calc(var(--unit) * 5);
}

.disclaimer {
  margin-top: calc(var(--unit) * 4);
  max-width: 70ch;
  line-height: 1.6;
}

/* ---------- responsive ---------- */

@media (max-width: 900px) {
  :root {
    --size-display: 38px;
    --size-headline: 27px;
    --section: 64px;
  }

  .site-nav {
    display: none;
  }

  .header-cta {
    margin-inline-start: auto;
  }

  .duo,
  .demo,
  .stats,
  .scope {
    grid-template-columns: 1fr;
  }

  .demo__pane {
    height: 280px;
  }

  .tabs__tab {
    flex: 0 0 auto;
  }
}

@media (max-width: 600px) {
  :root {
    --size-display: 31px;
  }

  .stats__head {
    flex-direction: column;
    align-items: flex-start;
    gap: calc(var(--unit) * 2);
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
  }
}
