:root {
  --paper: #f7f5ef;
  --sheet: #fffdf8;
  --ink: #24272d;
  --muted: #60646e;
  --accent: #4b43a6;
  --deep: #342d82;
  --wash: #ece9f8;
  --line: #dcd8cc;
  --edge: #cfcab9;
  --radius: 18px;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  min-width: 320px;
}

body {
  margin: 0;
  color: var(--ink);
  background-color: var(--paper);
  background-image:
    radial-gradient(circle at 12% 8%, rgba(75, 67, 166, 0.06), transparent 34%),
    radial-gradient(circle at 88% 2%, rgba(75, 67, 166, 0.05), transparent 30%);
  font-family: system-ui, -apple-system, "Segoe UI", sans-serif;
  line-height: 1.62;
  -webkit-font-smoothing: antialiased;
  overflow-wrap: anywhere;
}

a {
  color: var(--accent);
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

a:hover,
a:focus-visible {
  color: var(--deep);
}

:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 3px;
}

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

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

h1,
h2,
h3 {
  line-height: 1.18;
  letter-spacing: -0.025em;
}

h1 {
  font-size: clamp(2.35rem, 5vw, 4.35rem);
}

h2 {
  font-size: clamp(1.7rem, 3vw, 2.45rem);
}

h3 {
  font-size: 1.14rem;
}

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

.site-header {
  border-bottom: 1px solid var(--line);
  background: rgba(247, 245, 239, 0.94);
}

.head-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  min-height: 82px;
}

.brand {
  display: inline-flex;
  flex: 0 0 auto;
  color: var(--ink);
  text-decoration: none;
}

.brand img {
  width: 188px;
  height: auto;
}

.site-nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 6px 22px;
  font-size: 0.91rem;
  font-weight: 650;
}

.site-nav a {
  color: var(--muted);
  text-decoration: none;
  padding-block: 6px;
}

.site-nav a:hover,
.site-nav a:focus-visible,
.site-nav a[aria-current="page"] {
  color: var(--accent);
}

.site-main {
  display: block;
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(260px, 0.85fr);
  align-items: center;
  gap: clamp(28px, 5vw, 76px);
  padding: clamp(56px, 9vw, 118px) 0 64px;
}

.eyebrow {
  display: inline-block;
  margin-bottom: 18px;
  color: var(--accent);
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.lede {
  max-width: 38rem;
  color: var(--muted);
  font-size: clamp(1.05rem, 1.7vw, 1.26rem);
}

.text-link {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  margin-top: 12px;
  font-weight: 750;
  text-decoration: none;
}

.text-link::after {
  content: "→";
  transition: transform 160ms ease;
}

.text-link:hover::after,
.text-link:focus-visible::after {
  transform: translateX(4px);
}

.sheet-stack {
  position: relative;
  min-height: 330px;
  border: 1px solid var(--edge);
  border-radius: var(--radius);
  background: var(--sheet);
  box-shadow: 16px 16px 0 rgba(75, 67, 166, 0.08);
  padding: 28px;
  overflow: hidden;
}

.sheet-stack::before,
.sheet-stack::after {
  content: "";
  position: absolute;
  left: 24px;
  right: 24px;
  height: 86px;
  border: 1px solid var(--edge);
  border-radius: 12px;
  background: var(--paper);
  pointer-events: none;
}

.sheet-stack::before {
  top: 16px;
  transform: rotate(-4deg);
}

.sheet-stack::after {
  top: 28px;
  transform: rotate(3deg);
}

.stack-label {
  position: relative;
  z-index: 1;
  display: inline-block;
  margin: 74px 0 0 12px;
  padding: 8px 13px;
  border-radius: 999px;
  background: var(--wash);
  color: var(--deep);
  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.stack-lines {
  position: relative;
  z-index: 1;
  margin-top: 24px;
}

.stack-lines span {
  display: block;
  height: 10px;
  margin-bottom: 13px;
  border-radius: 999px;
  background: var(--line);
}

.stack-lines span:nth-child(1) { width: 76%; }
.stack-lines span:nth-child(2) { width: 92%; background: var(--wash); }
.stack-lines span:nth-child(3) { width: 61%; }
.stack-lines span:nth-child(4) { width: 84%; background: var(--wash); }

.stack-wave {
  position: relative;
  z-index: 1;
  width: 128px;
  height: 42px;
  margin-top: 30px;
  border-bottom: 5px solid var(--accent);
  border-radius: 0 0 50% 50%;
  transform: rotate(-5deg);
}

.section {
  padding: clamp(48px, 7vw, 86px) 0;
}

.section-tint {
  border-block: 1px solid var(--line);
  background: rgba(255, 253, 248, 0.72);
}

.section-head {
  max-width: 47rem;
  margin-bottom: 32px;
}

.section-head p {
  color: var(--muted);
}

.ledger-panel {
  border: 1px solid var(--edge);
  border-radius: var(--radius);
  background: var(--sheet);
  padding: clamp(18px, 3vw, 30px);
  box-shadow: 0 14px 32px rgba(36, 39, 45, 0.05);
}

.ledger-top {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 20px;
}

.ledger-top h3 {
  margin-bottom: 0;
}

.ledger-top span {
  color: var(--muted);
  font-size: 0.82rem;
}

.batch-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.93rem;
}

.batch-table caption {
  margin-bottom: 14px;
  color: var(--muted);
  font-size: 0.82rem;
  text-align: left;
}

.batch-table th,
.batch-table td {
  padding: 14px 12px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: middle;
}

.batch-table th {
  color: var(--muted);
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.batch-table tr:last-child td {
  border-bottom: 0;
}

.batch-id {
  color: var(--deep);
  font-weight: 800;
  white-space: nowrap;
}

.fiber-name {
  display: block;
  font-weight: 650;
}

.fiber-detail {
  display: block;
  color: var(--muted);
  font-size: 0.8rem;
}

.number {
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.measured {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 138px;
}

.bar {
  flex: 1 1 68px;
  height: 8px;
  border-radius: 999px;
  background: #e4e0f1;
  overflow: hidden;
}

.bar-fill {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: var(--accent);
}

.bar-49 { width: 49%; }
.bar-59 { width: 59%; }
.bar-64 { width: 64%; }
.bar-66 { width: 66%; }
.bar-72 { width: 72%; }
.bar-81 { width: 81%; }
.bar-88 { width: 88%; }
.bar-90 { width: 90%; }

.state {
  display: inline-block;
  padding: 5px 10px;
  border-radius: 999px;
  background: var(--wash);
  color: var(--deep);
  font-size: 0.78rem;
  font-weight: 750;
  white-space: nowrap;
}

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

.grid-two {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--sheet);
  padding: 26px;
}

.card-number {
  display: block;
  margin-bottom: 20px;
  color: var(--accent);
  font-size: 0.77rem;
  font-weight: 800;
  letter-spacing: 0.13em;
}

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

.page-hero {
  padding: clamp(50px, 8vw, 96px) 0 clamp(34px, 5vw, 58px);
  border-bottom: 1px solid var(--line);
}

.page-hero h1 {
  max-width: 15ch;
  margin-bottom: 22px;
}

.page-hero .lede {
  margin-bottom: 0;
}

.split {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  gap: clamp(28px, 5vw, 66px);
  align-items: start;
}

.stack-list {
  display: grid;
  gap: 14px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.stack-list li {
  border-left: 3px solid var(--accent);
  padding: 4px 0 4px 16px;
}

.stack-list strong {
  display: block;
}

.stack-list span {
  color: var(--muted);
  font-size: 0.92rem;
}

.steps {
  counter-reset: step;
  margin: 0;
  padding: 0;
  list-style: none;
}

.steps li {
  position: relative;
  counter-increment: step;
  padding: 0 0 28px 62px;
}

.steps li::before {
  content: counter(step, decimal-leading-zero);
  position: absolute;
  inset-inline-start: 0;
  top: -4px;
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  background: var(--wash);
  color: var(--deep);
  font-size: 0.78rem;
  font-weight: 800;
}

.steps li:not(:last-child)::after {
  content: "";
  position: absolute;
  inset-inline-start: 20px;
  top: 46px;
  bottom: 6px;
  width: 1px;
  background: var(--line);
}

.steps h3,
.steps p {
  margin-bottom: 6px;
}

.doc-layout {
  display: grid;
  grid-template-columns: 218px minmax(0, 1fr);
  gap: clamp(26px, 4vw, 56px);
  align-items: start;
  padding-top: clamp(34px, 5vw, 60px);
}

.doc-nav {
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--sheet);
  padding: 18px;
}

.doc-nav h2 {
  margin-bottom: 12px;
  font-size: 0.78rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.doc-nav ul {
  display: grid;
  gap: 4px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.doc-nav a {
  display: block;
  padding: 8px 10px;
  border-radius: 8px;
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 650;
  text-decoration: none;
}

.doc-nav a:hover,
.doc-nav a[aria-current="page"] {
  background: var(--wash);
  color: var(--deep);
}

.doc-body {
  min-width: 0;
}

.doc-body h2 {
  margin-top: 36px;
}

.doc-body h3 {
  margin-top: 26px;
}

.doc-body > h2:first-child {
  margin-top: 0;
}

.doc-body p,
.doc-body li {
  color: var(--muted);
}

.doc-body ul,
.doc-body ol {
  padding-inline-start: 22px;
}

.doc-body li + li {
  margin-top: 8px;
}

.note {
  margin: 26px 0;
  border-left: 4px solid var(--accent);
  border-radius: 0 12px 12px 0;
  background: var(--wash);
  padding: 16px 20px;
}

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

.recipe-table {
  width: 100%;
  border-collapse: collapse;
  margin: 18px 0 24px;
  font-size: 0.9rem;
}

.recipe-table th,
.recipe-table td {
  padding: 11px 10px;
  border-bottom: 1px solid var(--line);
  text-align: left;
}

.recipe-table th {
  color: var(--muted);
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.recipe-table td:last-child {
  font-weight: 750;
}

.quote {
  margin: 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  padding: 30px 0;
  font-size: clamp(1.3rem, 2.6vw, 1.9rem);
  font-weight: 650;
  letter-spacing: -0.02em;
}

.site-footer {
  border-top: 1px solid var(--line);
  background: rgba(255, 253, 248, 0.7);
}

.footer-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px 30px;
  padding-block: 30px;
  color: var(--muted);
  font-size: 0.86rem;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 20px;
}

.footer-links a {
  color: var(--muted);
}

@media (max-width: 900px) {
  .hero,
  .split,
  .doc-layout {
    grid-template-columns: 1fr;
  }

  .grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .doc-nav {
    order: -1;
  }

  .sheet-stack {
    min-height: 280px;
  }
}

@media (max-width: 680px) {
  .wrap {
    width: calc(100% - 28px);
  }

  .head-inner {
    align-items: flex-start;
    flex-direction: column;
    gap: 8px;
    padding-block: 16px;
  }

  .brand img {
    width: 168px;
  }

  .site-nav {
    justify-content: flex-start;
    gap: 4px 16px;
    font-size: 0.84rem;
  }

  .hero {
    padding-block: 44px 42px;
  }

  .grid,
  .grid-two {
    grid-template-columns: 1fr;
  }

  .ledger-top {
    display: block;
  }

  .ledger-top span {
    display: block;
    margin-top: 4px;
  }

  .batch-table,
  .batch-table tbody,
  .batch-table tr,
  .batch-table td {
    display: block;
    width: 100%;
  }

  .batch-table thead {
    display: none;
  }

  .batch-table tr {
    padding-block: 12px;
    border-bottom: 1px solid var(--line);
  }

  .batch-table tr:last-child {
    border-bottom: 0;
  }

  .batch-table td {
    display: grid;
    grid-template-columns: 112px minmax(0, 1fr);
    gap: 10px;
    padding: 4px 0;
    border-bottom: 0;
  }

  .batch-table td::before {
    content: attr(data-label);
    color: var(--muted);
    font-size: 0.68rem;
    font-weight: 800;
    letter-spacing: 0.09em;
    text-transform: uppercase;
  }

  .measured {
    min-width: 0;
  }

  .bar {
    flex-basis: 42px;
  }

  .steps li {
    padding-inline-start: 54px;
  }

  .recipe-table,
  .recipe-table tbody,
  .recipe-table tr,
  .recipe-table td {
    display: block;
    width: 100%;
  }

  .recipe-table thead {
    display: none;
  }

  .recipe-table tr {
    padding-block: 10px;
    border-bottom: 1px solid var(--line);
  }

  .recipe-table tr:last-child {
    border-bottom: 0;
  }

  .recipe-table td {
    display: grid;
    grid-template-columns: 112px minmax(0, 1fr);
    gap: 10px;
    padding: 3px 0;
    border-bottom: 0;
  }

  .recipe-table td::before {
    content: attr(data-label);
    color: var(--muted);
    font-size: 0.68rem;
    font-weight: 800;
    letter-spacing: 0.09em;
    text-transform: uppercase;
  }
}

@media (max-width: 400px) {
  .wrap {
    width: calc(100% - 22px);
  }

  .brand img {
    width: 152px;
  }

  .site-nav {
    gap: 3px 12px;
  }

  .batch-table td {
    grid-template-columns: 98px minmax(0, 1fr);
  }

  .footer-inner {
    display: block;
  }

  .footer-links {
    margin-top: 10px;
  }
}
