/*
 * Layout for the reference pages.
 *
 * The landing page is a sales surface; these are documents an engineer reads
 * while working, so they get a single measured column, a visible structure and
 * room to breathe. Everything here draws on the variables in styles.css, which
 * is loaded first — no colours are redefined.
 */

.doc {
  max-width: 780px;
  margin: 0 auto;
  padding: 140px 22px 90px;
}

.doc-eyebrow {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--green);
  margin: 0 0 18px;
}

.doc h1 {
  font-size: clamp(32px, 5vw, 46px);
  line-height: 1.1;
  letter-spacing: -.02em;
  text-wrap: balance;
  margin: 0 0 20px;
}

.doc-standfirst {
  font-size: 18px;
  line-height: 1.62;
  color: var(--muted);
  margin: 0 0 30px;
  max-width: 62ch;
}

.doc-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 22px;
  padding: 16px 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  font-size: 11px;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--muted-2);
  margin-bottom: 44px;
}

.doc h2 {
  font-size: 25px;
  line-height: 1.25;
  letter-spacing: -.01em;
  text-wrap: balance;
  margin: 52px 0 16px;
}

.doc h3 {
  font-size: 17px;
  line-height: 1.35;
  margin: 34px 0 12px;
}

.doc p,
.doc li {
  font-size: 16px;
  line-height: 1.72;
  color: var(--muted);
}

.doc p { margin: 0 0 18px; max-width: 68ch; }
.doc ul, .doc ol { margin: 0 0 20px; padding-left: 22px; max-width: 68ch; }
.doc li { margin-bottom: 9px; }
.doc li::marker { color: var(--green); }

.doc strong { color: var(--text); font-weight: 600; }
.doc em { color: var(--text); font-style: italic; }

.doc a { color: var(--green); text-decoration-thickness: 1px; text-underline-offset: 3px; }
.doc a:focus-visible { outline: 2px solid var(--green); outline-offset: 3px; border-radius: 3px; }

/* A worked number the reader can check, not a pull quote. */
.doc-figures {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
  border-radius: 14px;
  overflow: hidden;
  margin: 28px 0 30px;
}
.doc-figures div { background: var(--panel); padding: 18px 20px; }
.doc-figures b {
  display: block;
  font-size: 23px;
  letter-spacing: -.02em;
  color: var(--text);
  font-variant-numeric: tabular-nums;
}
.doc-figures span {
  display: block;
  margin-top: 5px;
  font-size: 11.5px;
  line-height: 1.5;
  color: var(--muted-2);
}
.doc-figures div.bad b { color: var(--red); }
.doc-figures div.warn b { color: var(--amber); }
.doc-figures div.good b { color: var(--green); }

/* The point the whole section turns on. */
.doc-callout {
  border-left: 3px solid var(--green);
  background: rgba(0, 208, 138, .07);
  border-radius: 0 12px 12px 0;
  padding: 18px 22px;
  margin: 28px 0;
}
.doc-callout p:last-child { margin-bottom: 0; }

.doc-warn {
  border-left-color: var(--amber);
  background: rgba(255, 176, 0, .07);
}

.doc-table-wrap { overflow-x: auto; margin: 24px 0 30px; }
.doc table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14.5px;
  min-width: 480px;
}
.doc th {
  text-align: left;
  padding: 12px 14px;
  font-size: 10.5px;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--muted-2);
  border-bottom: 1px solid var(--line-strong);
  white-space: nowrap;
}
.doc td {
  padding: 13px 14px;
  border-bottom: 1px solid var(--line);
  color: var(--muted);
  vertical-align: top;
}
.doc td:first-child { color: var(--text); font-weight: 500; }
.doc tr:last-child td { border-bottom: none; }

/* Closing block that points at the product, once, at the end. */
.doc-cta {
  margin: 60px 0 0;
  padding: 30px 32px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: linear-gradient(160deg, var(--panel), var(--bg-2));
}
.doc-cta h2 { margin-top: 0; font-size: 21px; }
.doc-cta p { margin-bottom: 20px; }
.doc-cta .button { margin-right: 10px; }

.doc-more {
  margin-top: 54px;
  padding-top: 26px;
  border-top: 1px solid var(--line);
}
.doc-more span {
  display: block;
  font-size: 10.5px;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--muted-2);
  margin-bottom: 14px;
}
.doc-more a { display: block; margin-bottom: 9px; font-size: 15px; }

.doc-back {
  display: inline-block;
  margin-bottom: 26px;
  font-size: 13px;
  color: var(--muted-2);
}

@media (max-width: 640px) {
  .doc { padding: 108px 18px 70px; }
  .doc h2 { font-size: 22px; }
}

@media print {
  .site-header, .site-footer, .doc-cta, .doc-more, .doc-back, #networkCanvas, .scroll-progress { display: none !important; }
  .doc { max-width: none; padding: 0; }
  .doc h2, .doc h3 { break-after: avoid; }
  .doc-table-wrap, .doc-figures, .doc-callout { break-inside: avoid; }
}
