:root {
  --paper: #f4f1e7;
  --field: #eef1eb;
  --ink: #07110d;
  --green: #00c805;
  --cyan: #15bee5;
  --steel: #5d6c63;
  --rule: #ccd4cc;
  --white: #fffdf4;
  --display: "Archivo", "Arial Narrow", sans-serif;
  --body: "Inter", Arial, sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, monospace;
  --rail: min(1460px, calc(100vw - 56px));
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  color: var(--ink);
  background-color: var(--paper);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='40' height='40' viewBox='0 0 40 40'%3E%3Cpath d='M40 0H0V40' fill='none' stroke='%23ccd4cc' stroke-width='.55' stroke-dasharray='1.5 4' opacity='.58'/%3E%3C/svg%3E");
  font-family: var(--body);
  font-size: 16px;
  line-height: 1.5;
  min-width: 320px;
}
button, input, select { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
a { color: inherit; }
img { max-width: 100%; height: auto; }
::selection { color: var(--ink); background: var(--green); }

.skip-link {
  position: fixed;
  left: 16px;
  top: 12px;
  z-index: 20;
  transform: translateY(-140%);
  background: var(--ink);
  color: var(--white);
  padding: 8px 12px;
}
.skip-link:focus { transform: translateY(0); }

.site-header {
  width: var(--rail);
  height: 82px;
  margin: 0 auto;
  border-bottom: 1px solid var(--ink);
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 32px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 9px;
  text-decoration: none;
  font-family: var(--display);
  font-weight: 800;
  letter-spacing: -.04em;
}
.brand img { width: 36px; height: 36px; object-fit: contain; }
.brand small {
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: .04em;
  border: 1px solid var(--rule);
  padding: 1px 4px;
}
.primary-nav {
  display: flex;
  justify-content: center;
  gap: 0;
  width: max-content;
  justify-self: center;
  border: 1px solid var(--ink);
  background: var(--white);
  position: relative;
}
.primary-nav::before {
  content: "";
  position: absolute;
  left: 7px;
  right: 7px;
  top: -7px;
  height: 6px;
  border-left: 1px solid var(--ink);
  border-right: 1px solid var(--ink);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='6'%3E%3Cpath d='M.5 6V2.5M6.5 6V4' stroke='%2307110d' stroke-width='.7'/%3E%3C/svg%3E");
}
.primary-nav a {
  min-width: 78px;
  min-height: 42px;
  padding: 5px 11px 6px;
  text-decoration: none;
  font-family: var(--mono);
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: .02em;
  border-right: 1px solid var(--rule);
  display: grid;
  grid-template-columns: 18px 1fr;
  align-items: center;
  position: relative;
}
.primary-nav a:last-child { border-right: 0; }
.primary-nav a::before {
  content: attr(data-index);
  color: var(--steel);
  font-size: 7px;
  align-self: start;
  padding-top: 5px;
}
.primary-nav a:hover { background: var(--field); }
.primary-nav a[aria-current="page"] {
  color: var(--white);
  background: var(--ink);
  box-shadow: inset 0 -5px 0 var(--green);
}
.primary-nav a[aria-current="page"]::before { color: var(--green); }
.primary-nav a[aria-current="page"]::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: -9px;
  width: 0;
  height: 0;
  border-left: 6px solid transparent;
  border-right: 6px solid transparent;
  border-top: 8px solid var(--green);
  transform: translateX(-50%);
}
.social-nav a, .social-nav span {
  padding: 7px 10px;
  text-decoration: none;
  font-family: var(--mono);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: .02em;
  border: 1px solid transparent;
}
.social-nav a:hover { border-color: var(--ink); background: var(--white); }
.social-nav a[aria-current="page"] { border-color: var(--ink); background: var(--green); color: var(--ink); }
.social-nav { display: flex; align-items: center; gap: 2px; }
.social-nav span { color: var(--steel); border-color: var(--rule); cursor: not-allowed; }
.nav-toggle { display: none; }
.mobile-menu { border-bottom: 1px solid var(--ink); background: var(--paper); padding: 12px 20px; }
.mobile-menu a { display: block; padding: 10px 8px; font-family: var(--mono); text-decoration: none; border-bottom: 1px solid var(--rule); }
.mobile-menu a[aria-current="page"] { background: var(--ink); color: var(--white); box-shadow: inset 5px 0 0 var(--green); }

#app { min-height: 62vh; }
.page { width: var(--rail); margin: 0 auto; }
.eyebrow, .route-index, .mono {
  font-family: var(--mono);
  font-size: 11px;
  line-height: 1.35;
  letter-spacing: .045em;
  text-transform: uppercase;
}
.eyebrow { display: flex; align-items: center; gap: 10px; color: var(--steel); }
.eyebrow::before { content: ""; width: 30px; height: 3px; background: var(--green); border-left: 5px solid var(--cyan); }
h1, h2, h3 { font-family: var(--display); margin: 0; line-height: .98; letter-spacing: -.055em; }
h1 { font-size: clamp(58px, 7.3vw, 118px); font-weight: 800; }
h2 { font-size: clamp(38px, 4.4vw, 72px); font-weight: 800; }
h3 { font-size: clamp(22px, 2vw, 31px); font-weight: 650; }
p { margin: 0; }
.lede { color: var(--steel); font-size: clamp(16px, 1.35vw, 20px); max-width: 690px; line-height: 1.55; }
.route-head {
  min-height: 245px;
  padding: 52px 0 34px;
  border-bottom: 1px solid var(--ink);
  display: grid;
  grid-template-columns: 92px minmax(0, 1fr) minmax(280px, 500px);
  gap: 32px;
  align-items: end;
}
.route-head .route-index { align-self: start; padding-top: 4px; }
.route-head .lede { justify-self: end; }

.button, button.button {
  appearance: none;
  border: 1px solid var(--ink);
  background: var(--ink);
  color: var(--white);
  min-height: 46px;
  padding: 12px 17px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  text-decoration: none;
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  cursor: pointer;
}
.button:hover, button.button:hover { background: var(--green); color: var(--ink); }
.button.secondary { background: transparent; color: var(--ink); }
.button.secondary:hover { background: var(--white); }
.button:focus-visible, input:focus-visible, select:focus-visible, a:focus-visible {
  outline: 3px solid var(--cyan);
  outline-offset: 3px;
}
.actions { display: flex; flex-wrap: wrap; gap: 10px; }

.hero {
  min-height: calc(100svh - 82px);
  display: grid;
  grid-template-columns: minmax(380px, .86fr) minmax(540px, 1.14fr);
  gap: 2.5vw;
  align-items: center;
  padding: 48px 0 28px;
  border-bottom: 1px solid var(--ink);
}
.hero-copy { display: grid; gap: 24px; align-content: center; position: relative; z-index: 1; }
.hero-copy h1 span { display: block; color: var(--green); -webkit-text-stroke: 1.5px var(--ink); }
.hero-copy .lede { max-width: 620px; }
.command-bar {
  border: 1px solid var(--ink);
  background: var(--white);
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: stretch;
  max-width: 660px;
}
.command-label { writing-mode: vertical-rl; transform: rotate(180deg); border-left: 1px solid var(--ink); padding: 8px 6px; color: var(--steel); }
.command-bar code { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; padding: 14px 12px; font-family: var(--mono); font-size: 11px; }
.copy-button {
  width: 48px;
  border: 0;
  border-left: 1px solid var(--ink);
  background: var(--green);
  color: var(--ink);
  font-family: var(--mono);
  cursor: pointer;
}
.copy-button:hover { background: var(--cyan); }
.hero-visual { position: relative; min-width: 0; align-self: stretch; display: grid; align-items: center; }
.hero-art { width: 100%; display: block; object-fit: contain; max-height: 70svh; filter: saturate(.96); }
.hero-stamp {
  position: absolute;
  right: 2.6%;
  bottom: 8%;
  width: min(280px, 39%);
  background: var(--white);
  border: 1px solid var(--ink);
  padding: 13px 18px 13px 13px;
  box-shadow: 8px 8px 0 var(--green);
}
.hero-stamp::after {
  content: "$PLUMB · CA DROPS AT LAUNCH";
  position: absolute;
  right: 2px;
  inset-block: 8px;
  writing-mode: vertical-rl;
  font: 9px var(--mono);
  color: var(--steel);
}
.stamp-row { display: grid; grid-template-columns: 75px 1fr; gap: 8px; padding: 5px 0; border-bottom: 1px solid var(--rule); font: 9px var(--mono); }
.stamp-row span:first-child { color: var(--steel); }
.stamp-row strong { min-width: 0; overflow: hidden; text-overflow: ellipsis; }

.measurement-band {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  border: 1px solid var(--ink);
  border-top: 0;
  background: color-mix(in srgb, var(--paper) 86%, transparent);
}
.measurement-cell { min-height: 148px; padding: 20px; border-right: 1px solid var(--ink); display: grid; gap: 16px; align-content: space-between; }
.measurement-cell:last-child { border-right: 0; }
.measure-icon { width: 34px; height: 34px; border: 1px solid var(--ink); position: relative; background: var(--white); }
.measure-icon::before { content: ""; position: absolute; inset: 8px; background: var(--green); border: 1px solid var(--ink); }
.measurement-cell:nth-child(2) .measure-icon::before { inset: 15px 5px 5px 15px; border-top: 0; border-right: 0; background: transparent; }
.measurement-cell:nth-child(3) .measure-icon { border-radius: 50% 50% 0 0; }
.measurement-cell:nth-child(4) .measure-icon { border-radius: 50%; }
.measurement-cell b { font-family: var(--display); font-size: 21px; }
.measurement-cell p { color: var(--steel); font-size: 13px; }

.section { padding: 90px 0; border-bottom: 1px solid var(--ink); }
.section-grid { display: grid; grid-template-columns: minmax(320px, .8fr) minmax(460px, 1.2fr); gap: 7vw; align-items: center; }
.section-copy { display: grid; gap: 22px; }
.art-frame {
  min-height: 430px;
  display: grid;
  place-items: center;
  position: relative;
  border: 1px solid var(--rule);
  background-color: color-mix(in srgb, var(--field) 88%, transparent);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24'%3E%3Cpath d='M24 0H0V24' fill='none' stroke='%235d6c63' stroke-width='.35' opacity='.5'/%3E%3C/svg%3E");
  overflow: hidden;
}
.art-frame::before, .art-frame::after { content: "+"; position: absolute; font: 18px var(--mono); color: var(--steel); }
.art-frame::before { top: 10px; left: 12px; }
.art-frame::after { right: 12px; bottom: 10px; }
.art-frame img { width: 92%; max-height: 650px; object-fit: contain; }
.art-frame.portrait img { width: min(74%, 520px); }
.art-frame.compact { min-height: 340px; }

.steps { display: grid; gap: 0; border-top: 1px solid var(--ink); }
.step { display: grid; grid-template-columns: 42px 110px 1fr; gap: 16px; padding: 17px 0; border-bottom: 1px solid var(--rule); align-items: start; }
.step .num { color: var(--green); font: 600 11px var(--mono); }
.step b { font-family: var(--mono); font-size: 12px; text-transform: uppercase; }
.step p { color: var(--steel); font-size: 13px; }

.tool-layout { display: grid; grid-template-columns: minmax(0, 1fr) minmax(380px, .8fr); gap: 28px; padding: 42px 0 92px; align-items: start; }
.tool-panel, .result-panel, .spec-block { border: 1px solid var(--ink); background: var(--white); }
.panel-head { padding: 13px 16px; border-bottom: 1px solid var(--ink); display: flex; justify-content: space-between; align-items: center; gap: 16px; }
.panel-head b { font: 600 11px var(--mono); text-transform: uppercase; }
.panel-head span { color: var(--steel); font: 10px var(--mono); }
.panel-body { padding: 22px; }
.form-grid { display: grid; gap: 18px; }
.field { display: grid; gap: 7px; }
.field label { font: 500 11px var(--mono); text-transform: uppercase; color: var(--steel); }
.field input, .field select, .search-row input, .search-row select {
  width: 100%;
  min-height: 48px;
  border: 1px solid var(--ink);
  border-radius: 0;
  background: var(--paper);
  color: var(--ink);
  padding: 11px 12px;
  font-family: var(--mono);
  font-size: 13px;
}
.field-note { color: var(--steel); font-size: 12px; }
.result-grid { display: grid; grid-template-columns: repeat(2, 1fr); }
.result-item { min-height: 94px; padding: 14px 16px; border-right: 1px solid var(--rule); border-bottom: 1px solid var(--rule); min-width: 0; }
.result-item:nth-child(2n) { border-right: 0; }
.result-item small { display: block; color: var(--steel); font: 10px var(--mono); text-transform: uppercase; margin-bottom: 8px; }
.result-item strong { display: block; font: 600 14px var(--mono); overflow-wrap: anywhere; }
.result-item.wide { grid-column: 1 / -1; border-right: 0; }
.status-dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--green); border: 1px solid var(--ink); margin-right: 7px; }
.status-dot.unknown { background: var(--paper); }
.source-line { padding: 14px 16px; color: var(--steel); font: 10px var(--mono); border-top: 1px solid var(--ink); overflow-wrap: anywhere; }
.needle-pulse { animation: needle-snap 380ms ease-out; }
@keyframes needle-snap { 0% { transform: translateY(-5px); } 55% { transform: translateY(4px); } 100% { transform: translateY(0); } }

.route-art { border: 1px solid var(--ink); background: var(--field); min-height: 380px; display: grid; place-items: center; overflow: hidden; }
.route-art img { width: 92%; max-height: 540px; object-fit: contain; }
.route-art.tall img { width: min(80%, 500px); }
.route-art.narrow { min-height: 560px; }

.list-layout { padding: 42px 0 92px; }
.search-row { display: grid; grid-template-columns: minmax(240px, 1fr) 220px auto; gap: 10px; margin-bottom: 14px; }
.count-chip { min-height: 48px; border: 1px solid var(--ink); display: grid; place-items: center; padding: 0 14px; font: 11px var(--mono); background: var(--green); white-space: nowrap; }
.table-wrap { overflow-x: auto; border: 1px solid var(--ink); background: var(--white); }
table { width: 100%; border-collapse: collapse; }
th { text-align: left; color: var(--steel); font: 500 10px var(--mono); text-transform: uppercase; background: var(--field); }
th, td { padding: 13px 14px; border-bottom: 1px solid var(--rule); vertical-align: top; }
td { font-size: 13px; }
td.mono { text-transform: none; font-size: 11px; }
tbody tr:hover { background: color-mix(in srgb, var(--green) 8%, var(--white)); }
.table-symbol { font-family: var(--display); font-size: 17px; font-weight: 800; }
.table-meta { margin-top: 12px; color: var(--steel); font: 10px var(--mono); overflow-wrap: anywhere; }
.copy-address { appearance: none; border: 0; padding: 0; background: transparent; color: inherit; font: inherit; cursor: pointer; }
.copy-address:hover { color: var(--green); }

.formula { padding: 18px; border: 1px solid var(--ink); background: var(--ink); color: var(--white); font: 13px/1.7 var(--mono); overflow-x: auto; }
.formula em { color: var(--green); font-style: normal; }
.output-number { font: 800 clamp(42px, 6vw, 86px)/1 var(--display); letter-spacing: -.06em; overflow-wrap: anywhere; }
.output-label { margin-top: 8px; color: var(--steel); font: 11px var(--mono); }

.code-stack { display: grid; gap: 12px; }
.code-block { border: 1px solid var(--ink); background: var(--ink); color: var(--white); display: grid; grid-template-columns: 1fr 48px; min-width: 0; }
.code-block pre { margin: 0; padding: 18px; overflow-x: auto; color: var(--green); font: 12px/1.7 var(--mono); }
.code-block button { border: 0; border-left: 1px solid var(--steel); background: transparent; color: var(--white); font: 10px var(--mono); cursor: pointer; }
.phase-chip { display: inline-flex; border: 1px solid var(--ink); background: var(--cyan); padding: 5px 8px; font: 600 10px var(--mono); text-transform: uppercase; }

.rules-grid { display: grid; grid-template-columns: repeat(2, 1fr); border-top: 1px solid var(--ink); border-left: 1px solid var(--ink); }
.rule-card { padding: 28px; min-height: 220px; border-right: 1px solid var(--ink); border-bottom: 1px solid var(--ink); display: grid; align-content: space-between; gap: 28px; }
.rule-card .num { font: 600 11px var(--mono); color: var(--green); }
.rule-card p { color: var(--steel); }
.ca-ticket { border: 1px solid var(--ink); background: var(--white); display: grid; grid-template-columns: 1fr 54px; }
.ca-body { padding: 24px; display: grid; gap: 20px; }
.ca-edge { writing-mode: vertical-rl; transform: rotate(180deg); border-left: 1px dashed var(--ink); display: grid; place-items: center; font: 10px var(--mono); }
.social-row { display: flex; flex-wrap: wrap; gap: 8px; }
.social-pill { border: 1px solid var(--rule); padding: 8px 10px; font: 10px var(--mono); color: var(--steel); }
a.social-pill-live { color: var(--ink); border-color: var(--ink); text-decoration: none; }
a.social-pill-live:hover { background: var(--ink); color: var(--white); }

.join-shell { padding: 60px 0 110px; display: grid; grid-template-columns: minmax(320px, .8fr) minmax(420px, 1.2fr); gap: 5vw; align-items: center; }
.receipt { background: var(--white); border: 1px solid var(--ink); position: relative; padding: 26px; }
.receipt::before, .receipt::after { content: ""; position: absolute; top: -1px; bottom: -1px; width: 8px; background-size: 8px 16px; }
.receipt::before { left: -5px; border-left: 1px dashed var(--ink); }
.receipt::after { right: -5px; border-right: 1px dashed var(--ink); }
.form-status { min-height: 24px; color: var(--steel); font: 12px var(--mono); }

.empty-state { padding: 44px 22px; text-align: center; color: var(--steel); }
.toast { position: fixed; right: 20px; bottom: 20px; z-index: 30; border: 1px solid var(--ink); background: var(--green); padding: 12px 16px; font: 11px var(--mono); box-shadow: 5px 5px 0 var(--ink); }

.site-footer { width: var(--rail); margin: 0 auto; padding: 38px 0 26px; display: grid; grid-template-columns: 270px 1fr; gap: 18px 42px; border-top: 1px solid var(--ink); }
.footer-brand { grid-row: span 2; display: flex; gap: 12px; align-items: center; }
.footer-brand div { display: grid; }
.footer-brand strong { font: 800 24px var(--display); letter-spacing: -.04em; }
.footer-brand span { color: var(--steel); font-size: 11px; }
.site-footer p { font-size: 11px; color: var(--steel); max-width: 850px; }
.footer-meta a.footer-link { color: var(--ink); text-decoration: none; border-bottom: 1px solid var(--rule); }
.footer-meta a.footer-link:hover { border-bottom-color: var(--ink); }
.footer-meta { grid-column: 1 / -1; border-top: 1px solid var(--rule); padding-top: 14px; display: flex; flex-wrap: wrap; gap: 8px 22px; color: var(--steel); }

@media (max-width: 1100px) {
  :root { --rail: calc(100vw - 36px); }
  .site-header { gap: 14px; }
  .primary-nav { display: none; }
  .site-header { grid-template-columns: 1fr auto auto; }
  .nav-toggle { display: block; border: 1px solid var(--ink); background: var(--paper); padding: 8px 10px; font: 11px var(--mono); }
  .hero { grid-template-columns: .9fr 1.1fr; }
  .tool-layout { grid-template-columns: 1fr; }
  .route-art.narrow { min-height: 420px; }
}

@media (max-width: 760px) {
  :root { --rail: calc(100vw - 28px); }
  body { font-size: 15px; }
  .site-header { height: 62px; }
  .brand small, .social-nav { display: none; }
  .hero { min-height: calc(100svh - 62px); grid-template-columns: 1fr; padding: 32px 0 18px; gap: 28px; align-content: start; }
  .hero-copy { gap: 17px; }
  .hero-copy h1 { font-size: clamp(47px, 15vw, 68px); max-width: 360px; }
  .hero-copy .lede { font-size: 14px; max-width: 360px; }
  .hero-copy .actions .secondary { display: none; }
  .hero-visual { min-height: 245px; }
  .hero-art { max-height: 290px; }
  .hero-stamp { width: 190px; right: 0; bottom: 0; padding: 8px 15px 8px 8px; }
  .stamp-row { grid-template-columns: 56px 1fr; padding: 3px 0; font-size: 7px; }
  .command-bar code { font-size: 9px; padding-inline: 8px; }
  .measurement-band { grid-template-columns: 1fr; border-top: 1px solid var(--ink); }
  .measurement-cell { min-height: 112px; border-right: 0; border-bottom: 1px solid var(--ink); grid-template-columns: 44px 1fr; align-items: center; align-content: center; }
  .measurement-cell:last-child { border-bottom: 0; }
  .route-head { min-height: 0; padding: 34px 0 26px; grid-template-columns: 54px 1fr; gap: 14px; }
  .route-head .lede { grid-column: 2; justify-self: start; }
  .section { padding: 58px 0; }
  .section-grid, .join-shell { grid-template-columns: 1fr; gap: 34px; }
  .art-frame { min-height: 300px; }
  .step { grid-template-columns: 30px 84px 1fr; gap: 8px; }
  .tool-layout, .list-layout { padding: 26px 0 64px; }
  .search-row { grid-template-columns: 1fr; }
  .result-grid, .rules-grid { grid-template-columns: 1fr; }
  .result-item, .result-item:nth-child(2n) { border-right: 0; }
  .rule-card { min-height: 180px; }
  .route-art { min-height: 300px; }
  .route-art.narrow { min-height: 360px; }
  .site-footer { grid-template-columns: 1fr; padding-top: 28px; }
  .footer-brand { grid-row: auto; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; }
}
