:root {
  --ink: #0c0c0c;
  --mute: #5a5a5a;
  --line: #e8e8e8;
  --paper: #ffffff;
  --soft: #f4f4f4;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html, body {
  background: var(--paper);
  color: var(--ink);
  font-family: "Inter Tight", Inter, Helvetica, Arial, sans-serif;
  font-size: 18px;
  font-weight: 500;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

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

.wrap {
  width: min(1120px, calc(100% - 48px));
  margin: 0 auto;
}

.top {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 24px;
  padding: 26px 0;
}

.mark {
  font-size: 20px;
  font-weight: 700;
  letter-spacing: -0.04em;
  text-decoration: none;
}

.menu {
  display: flex;
  gap: 28px;
  list-style: none;
}

.menu a {
  text-decoration: none;
  color: var(--mute);
  font-size: 16px;
  font-weight: 600;
}

.menu a:hover,
.menu a.is-on { color: var(--ink); }

.hero {
  padding: 72px 0 56px;
  max-width: 920px;
}

.hero h1 {
  font-size: clamp(48px, 8vw, 88px);
  font-weight: 700;
  letter-spacing: -0.055em;
  line-height: 0.98;
}

.hero p {
  margin-top: 24px;
  max-width: 560px;
  color: var(--mute);
  font-size: 22px;
  font-weight: 500;
  line-height: 1.45;
}

.row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 36px;
}

.btn {
  display: inline-flex;
  align-items: center;
  height: 48px;
  padding: 0 18px;
  border: 1px solid var(--ink);
  background: var(--ink);
  color: #fff;
  text-decoration: none;
  font-size: 15px;
  font-weight: 650;
}

.btn.ghost {
  background: #fff;
  color: var(--ink);
}

.block { padding: 72px 0; }
.block h2 {
  max-width: 720px;
  font-size: clamp(32px, 4.5vw, 48px);
  font-weight: 700;
  letter-spacing: -0.045em;
  line-height: 1.08;
}
.block > p.lead {
  margin-top: 16px;
  max-width: 640px;
  color: var(--mute);
  font-size: 20px;
}

/* chain animation */
.chain {
  display: flex;
  align-items: center;
  gap: 0;
  margin: 40px 0 8px;
  min-height: 88px;
}
.bead {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  border: 2px solid var(--ink);
  background: #fff;
  transform: scale(0.6);
  opacity: 0;
  animation: pop 0.55s cubic-bezier(.2,.8,.2,1) forwards;
}
.bead:nth-child(1) { animation-delay: 0.05s; }
.bead:nth-child(3) { animation-delay: 0.18s; }
.bead:nth-child(5) { animation-delay: 0.31s; }
.bead:nth-child(7) { animation-delay: 0.44s; }
.bead:nth-child(9) { animation-delay: 0.57s; }
.link {
  width: 28px;
  height: 2px;
  background: var(--ink);
  transform: scaleX(0);
  transform-origin: left;
  animation: draw 0.35s ease forwards;
}
.link:nth-child(2) { animation-delay: 0.14s; }
.link:nth-child(4) { animation-delay: 0.27s; }
.link:nth-child(6) { animation-delay: 0.40s; }
.link:nth-child(8) { animation-delay: 0.53s; }
@keyframes pop {
  to { transform: scale(1); opacity: 1; }
}
@keyframes draw {
  to { transform: scaleX(1); }
}

.steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px;
  margin-top: 40px;
}
.steps h3 {
  font-size: 20px;
  font-weight: 700;
  letter-spacing: -0.03em;
}
.steps p {
  margin-top: 8px;
  color: var(--mute);
  font-size: 16px;
}

/* tabs */
.tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 36px 0 24px;
}
.tab {
  height: 40px;
  padding: 0 14px;
  border: 1px solid var(--line);
  background: #fff;
  font: inherit;
  font-size: 15px;
  font-weight: 650;
  cursor: pointer;
}
.tab.is-on {
  background: var(--ink);
  color: #fff;
  border-color: var(--ink);
}

.cards { display: grid; gap: 18px; }
.card {
  display: none;
  padding: 28px 0;
  border-top: 1px solid var(--line);
}
.card.is-on { display: block; }
.card h3 {
  font-size: 28px;
  font-weight: 700;
  letter-spacing: -0.04em;
}
.also {
  margin: 6px 0 14px;
  color: var(--mute);
  font-size: 14px;
  font-weight: 600;
}
.card p { max-width: 640px; }
.hits {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 16px;
}
.hit {
  padding: 6px 10px;
  border: 1px solid var(--line);
  font-size: 13px;
  font-weight: 650;
}

.tools {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0;
  border-top: 1px solid var(--line);
}
.tools a {
  padding: 32px 28px 32px 0;
  text-decoration: none;
  border-right: 1px solid var(--line);
}
.tools a:last-child { border-right: 0; }
.tools strong {
  display: block;
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -0.03em;
}
.tools span {
  display: block;
  margin-top: 8px;
  color: var(--mute);
  font-size: 16px;
}

.foot {
  padding: 28px 0 56px;
  color: var(--mute);
  font-size: 14px;
  font-weight: 500;
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 16px;
  flex-wrap: wrap;
}
.foot a { color: var(--mute); }
.foot nav {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
}

/* inner pages */
.page { padding: 40px 0 80px; max-width: 740px; }
.page h1 {
  font-size: clamp(40px, 6vw, 64px);
  font-weight: 700;
  letter-spacing: -0.05em;
  line-height: 1;
}
.page h2 {
  margin: 44px 0 12px;
  font-size: 26px;
  font-weight: 700;
  letter-spacing: -0.03em;
  scroll-margin-top: 24px;
}
.page h3 {
  margin: 24px 0 8px;
  font-size: 18px;
  font-weight: 700;
  letter-spacing: -0.02em;
}
.page p, .page li { font-size: 18px; }
.page p + p { margin-top: 14px; }
.page ul { margin: 12px 0 0 18px; }
.page li { margin: 8px 0; }
.tiny { margin-top: 12px; color: var(--mute); font-size: 14px; font-weight: 500; }

.calc { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; margin-top: 40px; }
label { display: block; margin-bottom: 20px; }
label span { display: block; margin-bottom: 6px; color: var(--mute); font-size: 14px; font-weight: 600; }
input[type="number"] {
  width: 100%;
  height: 52px;
  border: 0;
  border-bottom: 1.5px solid var(--ink);
  background: transparent;
  color: var(--ink);
  font: inherit;
  font-size: 30px;
  font-weight: 650;
  letter-spacing: -0.04em;
  outline: none;
}
.out { display: grid; gap: 22px; padding-top: 26px; }
.out b { display: block; font-size: 34px; font-weight: 700; letter-spacing: -0.04em; }
.out i { display: block; margin-top: 2px; color: var(--mute); font-style: normal; font-size: 14px; font-weight: 600; }
.sheet { width: 100%; margin-top: 16px; border-collapse: collapse; font-size: 16px; }
.sheet th, .sheet td { padding: 12px 10px 12px 0; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
.sheet th { color: var(--mute); font-size: 13px; font-weight: 650; }

.burger {
  display: none;
  border: 0;
  background: none;
  font: inherit;
  font-size: 15px;
  font-weight: 650;
  cursor: pointer;
}

.top { position: relative; }

.era {
  margin: 28px 0 0;
  padding: 0;
  list-style: none;
  max-width: 680px;
}
.era li {
  display: grid;
  grid-template-columns: 108px 1fr;
  gap: 16px;
  padding: 14px 0;
  border-top: 1px solid var(--line);
  color: var(--mute);
  font-size: 17px;
}
.era b {
  color: var(--ink);
  font-weight: 700;
}

.types {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0;
  margin-top: 36px;
  border-top: 1px solid var(--line);
}
.types a {
  padding: 28px 24px 28px 0;
  text-decoration: none;
  border-bottom: 1px solid var(--line);
}
.types strong {
  display: block;
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -0.03em;
}
.types span {
  display: block;
  margin-top: 8px;
  color: var(--mute);
  font-size: 16px;
}

.gloss {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 20px;
  margin: 28px 0 8px;
}
.gloss h3 {
  font-size: 16px;
  font-weight: 700;
  letter-spacing: -0.02em;
}
.gloss p {
  margin-top: 6px;
  color: var(--mute);
  font-size: 14px;
}

.coa-fig figcaption {
  padding: 10px 12px;
  color: var(--mute);
  font-size: 13px;
}

@media (max-width: 900px) {
  .tools { grid-template-columns: 1fr 1fr; }
  .gloss { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 760px) {
  .menu { display: none; }
  .menu.open {
    display: flex;
    flex-direction: column;
    position: absolute;
    top: 64px;
    right: 24px;
    z-index: 5;
    padding: 16px;
    background: #fff;
    border: 1px solid var(--line);
  }
  .burger { display: block; }
  .steps, .tools, .calc, .types { grid-template-columns: 1fr; }
  .tools a { border-right: 0; border-bottom: 1px solid var(--line); }
  .era li { grid-template-columns: 1fr; gap: 4px; }
  .hero { padding: 40px 0 36px; }
  .block { padding: 48px 0; }
}

@media (prefers-reduced-motion: reduce) {
  .bead, .link { animation: none; opacity: 1; transform: none; }
}

.unit {
  display: flex;
  gap: 8px;
  margin: 8px 0 20px;
}
.unit label {
  display: flex;
  align-items: center;
  gap: 6px;
  margin: 0;
  font-size: 14px;
  font-weight: 650;
}

.how {
  display: grid;
  gap: 36px;
  margin: 40px 0 56px;
}
.how figure {
  margin: 0;
}
.how img {
  width: auto;
  height: auto;
  max-width: min(280px, 80%);
  max-height: 240px;
  object-fit: contain;
  margin-bottom: 12px;
}
.how h3 {
  margin: 0 0 12px;
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -0.03em;
}
.how p { max-width: 640px; color: #2b2b2b; }

.coa-fig {
  margin: 20px 0 12px;
  border: 1px solid var(--line);
}
.coa-fig img { width: 100%; }
.flags { display: grid; gap: 20px; margin-top: 24px; }
.flags h3 { font-size: 20px; font-weight: 700; }

@media (max-width: 760px) {
  .how img { max-width: 80%; max-height: 220px; }
}
