:root {
  --bg: #f7f5ef;
  --surface: #ffffff;
  --ink: #17201f;
  --muted: #63706d;
  --line: #d8d3c8;
  --teal: #174f51;
  --teal-2: #2f7770;
  --saffron: #bd7a22;
  --rose: #a85f55;
  --paper: #fffdf8;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: Arial, "Hiragino Sans", "Yu Gothic", sans-serif;
  overflow-x: clip;
}

a {
  color: inherit;
  text-decoration: none;
}

.text-link {
  overflow-wrap: anywhere;
  text-decoration: underline;
  text-underline-offset: 3px;
}

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

.hero {
  min-height: 92vh;
  padding: 24px clamp(20px, 5vw, 72px) 56px;
  background:
    linear-gradient(90deg, rgba(23, 79, 81, 0.08) 1px, transparent 1px),
    linear-gradient(rgba(23, 79, 81, 0.07) 1px, transparent 1px),
    linear-gradient(145deg, rgba(23, 79, 81, 0.12), transparent 46%),
    var(--bg);
  background-size: 44px 44px, 44px 44px, auto, auto;
}

.nav {
  align-items: center;
  display: flex;
  justify-content: space-between;
  margin: 0 auto;
  max-width: 1160px;
}

.brand,
.nav-links,
.hero-actions {
  align-items: center;
  display: flex;
}

.brand {
  gap: 12px;
  font-weight: 700;
}

.brand-mark {
  align-items: center;
  background: var(--teal);
  border-radius: 6px;
  color: white;
  display: inline-flex;
  font-size: 13px;
  height: 36px;
  justify-content: center;
  width: 48px;
}

.nav-links {
  color: var(--muted);
  font-size: 14px;
  gap: 24px;
}

.hero-grid {
  align-items: center;
  display: grid;
  gap: clamp(32px, 6vw, 72px);
  grid-template-columns: minmax(0, 1.02fr) minmax(360px, 0.78fr);
  margin: 76px auto 0;
  max-width: 1160px;
}

.eyebrow {
  color: var(--saffron);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0;
  margin-bottom: 16px;
  text-transform: uppercase;
}

h1 {
  font-size: clamp(44px, 7vw, 88px);
  line-height: 1.02;
  letter-spacing: 0;
  margin-bottom: 24px;
  max-width: 850px;
}

h2 {
  font-size: clamp(28px, 4vw, 50px);
  line-height: 1.12;
  letter-spacing: 0;
  margin-bottom: 0;
}

h3 {
  font-size: 20px;
  line-height: 1.35;
  margin-bottom: 12px;
}

.lead {
  font-size: clamp(22px, 3vw, 34px);
  line-height: 1.45;
  margin-bottom: 8px;
}

.sublead {
  color: var(--teal-2);
  font-size: clamp(18px, 2.1vw, 25px);
  font-weight: 700;
  margin-bottom: 34px;
}

.hero-usage {
  color: var(--muted);
  line-height: 1.75;
  margin-bottom: 28px;
}

.hero-intro {
  margin-bottom: 16px;
}

.hero-key {
  color: var(--ink);
  font-weight: 700;
  line-height: 1.65;
  margin-bottom: 20px;
}

.hero-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 24px;
}

.hero-chip {
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 999px;
  display: inline-flex;
  font-size: 13px;
  line-height: 1.3;
  padding: 7px 12px;
  white-space: nowrap;
}

.hero-actions {
  flex-wrap: wrap;
  gap: 12px;
}

.button {
  align-items: center;
  border: 1px solid var(--teal);
  border-radius: 8px;
  display: inline-flex;
  font-weight: 700;
  justify-content: center;
  min-height: 50px;
  padding: 0 22px;
}

.button.primary {
  background: var(--teal);
  color: white;
}

.button.secondary {
  background: rgba(255, 255, 255, 0.64);
  color: var(--teal);
}

.trace-panel {
  background: rgba(255, 253, 248, 0.88);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 28px 70px rgba(23, 32, 31, 0.16);
  overflow: hidden;
}

.trace-toolbar {
  align-items: center;
  border-bottom: 1px solid var(--line);
  display: flex;
  gap: 8px;
  height: 46px;
  padding: 0 18px;
}

.trace-toolbar span {
  background: var(--rose);
  border-radius: 999px;
  height: 10px;
  width: 10px;
}

.trace-toolbar span:nth-child(2) {
  background: var(--saffron);
}

.trace-toolbar span:nth-child(3) {
  background: var(--teal-2);
}

.trace-row {
  display: grid;
  gap: 16px;
  grid-template-columns: 48px 1fr;
  padding: 22px;
}

.trace-row + .trace-row {
  border-top: 1px solid var(--line);
}

.trace-row.active {
  background: rgba(23, 79, 81, 0.08);
}

.trace-row p,
.audit-grid p,
.boundary-list p,
.problem p,
.cta p {
  color: var(--muted);
  line-height: 1.75;
  margin-bottom: 0;
}

.step {
  align-items: center;
  background: var(--ink);
  border-radius: 6px;
  color: white;
  display: inline-flex;
  font-size: 13px;
  font-weight: 700;
  height: 36px;
  justify-content: center;
}

.trace-footer {
  align-items: center;
  background: var(--ink);
  color: white;
  display: flex;
  font-size: 13px;
  justify-content: space-between;
  padding: 16px 22px;
}

.section {
  margin: 0 auto;
  max-width: 1160px;
  padding: 86px clamp(20px, 5vw, 72px);
}

.section-heading {
  max-width: 820px;
}

.problem {
  display: grid;
  gap: 34px;
  grid-template-columns: minmax(0, 0.9fr) minmax(280px, 0.55fr);
}

.problem p {
  font-size: 18px;
  padding-top: 38px;
}

.audit,
.boundary,
.before-use {
  border-top: 1px solid var(--line);
}

.audit-grid,
.boundary-list {
  display: grid;
  gap: 16px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.audit-grid article,
.boundary-list div {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  min-height: 220px;
  padding: 28px;
}

.audit-grid span {
  color: var(--teal-2);
  display: block;
  font-size: 13px;
  font-weight: 700;
  margin-bottom: 36px;
  text-transform: uppercase;
}

.boundary-list {
  margin-top: 34px;
}

.usage-notes {
  margin-top: 34px;
  max-width: 820px;
}

.usage-notes p {
  color: var(--muted);
  line-height: 1.75;
  margin-bottom: 16px;
}

.usage-notes p:last-child {
  margin-bottom: 0;
}

.cta {
  align-items: center;
  background: var(--ink);
  color: white;
  display: flex;
  gap: 32px;
  justify-content: space-between;
  margin: 0 auto 36px;
  max-width: 1160px;
  padding: 54px clamp(24px, 5vw, 64px);
}

.cta h2 {
  font-size: clamp(28px, 4vw, 44px);
  margin-bottom: 16px;
}

.cta p {
  color: rgba(255, 255, 255, 0.72);
  max-width: 660px;
}

.cta .button.primary {
  background: white;
  border-color: white;
  color: var(--ink);
  flex: 0 0 auto;
}

.cta-actions {
  align-items: center;
  display: flex;
  flex: 0 0 auto;
  flex-direction: column;
  gap: 16px;
}

footer {
  align-items: flex-start;
  color: var(--muted);
  display: flex;
  font-size: 13px;
  gap: 24px;
  justify-content: space-between;
  margin: 0 auto;
  max-width: 1160px;
  padding: 0 clamp(20px, 5vw, 72px) 34px;
}

.footer-identity {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.footer-contact p {
  line-height: 1.75;
  margin-bottom: 8px;
}

@media (max-width: 860px) {
  .hero {
    min-height: auto;
  }

  .nav-links {
    display: none;
  }

  .hero-grid,
  .problem,
  .audit-grid,
  .boundary-list {
    grid-template-columns: 1fr;
  }

  .trace-panel {
    max-width: 560px;
  }

  .problem p {
    padding-top: 0;
  }

  .cta,
  footer {
    align-items: flex-start;
    flex-direction: column;
  }

  .cta-actions {
    align-items: flex-start;
  }
}

@media (max-width: 520px) {
  .hero {
    padding-top: 18px;
  }

  .brand {
    font-size: 14px;
  }

  .hero-grid {
    margin-top: 52px;
  }

  .button {
    width: 100%;
  }

  .cta-actions {
    width: 100%;
  }

  .trace-row {
    grid-template-columns: 42px 1fr;
    padding: 18px;
  }

  .trace-footer {
    align-items: flex-start;
    flex-direction: column;
    gap: 8px;
  }

  .section {
    padding-bottom: 66px;
    padding-top: 66px;
  }
}
