@font-face {
  font-family: Geist;
  src: url("fonts/Geist-Regular.woff2") format("woff2");
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: Geist;
  src: url("fonts/Geist-Medium.woff2") format("woff2");
  font-weight: 500;
  font-display: swap;
}
@font-face {
  font-family: Geist;
  src: url("fonts/Geist-SemiBold.woff2") format("woff2");
  font-weight: 600 800;
  font-display: swap;
}
@font-face {
  font-family: Geist Mono;
  src: url("fonts/GeistMono-Regular.woff2") format("woff2");
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: Archivo;
  src: url("fonts/Archivo-Variable-latin.woff2") format("woff2");
  font-weight: 100 900;
  font-stretch: 62% 125%;
  font-display: swap;
}
:root {
  font-family: var(--font-sans);
  color: var(--ink);
  background: var(--paper);
  font-synthesis: none;
}
* {
  box-sizing: border-box;
}
[hidden] {
  display: none !important;
}
body {
  margin: 0;
}
button,
input,
select,
textarea {
  font: inherit;
}
button,
a,
label.upload {
  -webkit-tap-highlight-color: transparent;
}
button,
a,
input,
select,
textarea {
  outline-offset: 4px;
}
button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
.upload:focus-within {
  outline: 2px solid var(--focus);
}
header {
  min-height: 76px;
  padding: 16px 32px;
  background: var(--shell);
  color: var(--ink-inverse);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  border-bottom: 3px solid var(--red);
}
.brand {
  display: flex;
  align-items: center;
  gap: 20px;
  flex-shrink: 0;
}
.brand a {
  font-family: var(--font-display);
  font-stretch: var(--display-stretch);
  font-weight: 800;
  font-size: var(--fs-xl);
  letter-spacing: -0.01em;
  text-decoration: none;
  color: white;
}
.brand a span {
  color: var(--red);
}
.brand-divider {
  width: 1px;
  height: 30px;
  background: var(--line-shell);
}
.product-name {
  font-weight: 600;
  font-size: var(--fs-md);
  letter-spacing: -0.5px;
}
.product-name small {
  display: block;
  font-size: var(--fs-mono);
  letter-spacing: 1.4px;
  color: var(--ink-inverse-muted);
  margin-top: 3px;
  font-weight: 400;
}
.actions {
  display: flex;
  gap: 8px;
  align-items: center;
}
.header-controls {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 22px;
  flex-wrap: wrap;
}
.account-controls {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: var(--fs-mono);
}
.account-identity {
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
}
#account-email {
  max-width: 210px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--line-strong);
}
.verified-mark {
  display: grid;
  place-items: center;
  height: 16px;
  width: 16px;
  border-radius: 50%;
  color: var(--ok-mid);
  background: var(--ok);
  font-size: var(--fs-mono);
}
.auth-gate {
  display: grid;
  grid-template-columns: minmax(0, 1.12fr) minmax(340px, 0.88fr);
  align-items: center;
  gap: clamp(40px, 6vw, 88px);
  max-width: 1280px;
  margin: 0 auto;
  padding: 64px 40px;
  min-height: calc(100svh - 80px);
}
.auth-story .eyebrow {
  color: var(--red);
  font-size: var(--fs-mono);
  letter-spacing: 1.8px;
}
.auth-story h1 {
  margin: 20px 0;
  font-size: clamp(42px, 4.5vw, 64px);
  line-height: 1.07;
  letter-spacing: -2px;
  font-weight: 700;
  color: var(--navy);
}
.auth-story h1 span {
  color: var(--navy);
}
.auth-lead {
  color: var(--muted);
  font-size: var(--fs-base);
  line-height: 1.75;
  max-width: 510px;
}
.auth-preview {
  margin-top: 28px;
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  background: white;
  box-shadow: 0 12px 35px #14233c08;
  max-width: 540px;
  overflow: hidden;
}
.auth-preview-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 20px;
  border-bottom: 1px solid var(--line);
  font:
    9px "Geist Mono",
    monospace;
  letter-spacing: 1px;
  color: var(--muted);
}
.auth-preview-part {
  margin: 0 20px 0 38px;
  padding: 12px 0 12px 20px;
  border-left: 1px solid var(--line);
  display: grid;
  grid-template-columns: 24px 1fr;
  gap: 3px 7px;
}
.auth-preview-part > span {
  font:
    10px "Geist Mono",
    monospace;
  color: var(--ink-inverse-muted);
  grid-row: span 2;
  padding-top: 2px;
}
.auth-preview-part strong {
  color: var(--ink-2);
  font-size: var(--fs-xs);
  font-weight: 500;
}
.auth-preview-part small {
  font-size: var(--fs-mono);
  color: var(--faint);
}
.auth-formats {
  margin: 19px 0 0;
  color: var(--faint);
  font:
    8px/1.8 "Geist Mono",
    monospace;
  letter-spacing: 0.6px;
}
.auth-card {
  padding: 36px;
  background: white;
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  box-shadow: 0 18px 60px #162a4d0b;
}
.auth-card-label {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--muted);
  font:
    9px "Geist Mono",
    monospace;
  letter-spacing: 1px;
}
.auth-lock {
  display: grid;
  place-items: center;
  background: var(--paper);
  color: var(--red);
  width: 31px;
  height: 31px;
  border-radius: var(--r-sm);
  font-size: var(--fs-md);
}
.auth-card h2 {
  font-size: var(--fs-xl);
  line-height: 1.2;
  letter-spacing: -0.8px;
  margin: 26px 0 12px;
  color: var(--navy);
}
#auth-message {
  min-height: 45px;
  font-size: var(--fs-sm);
  line-height: 1.7;
  color: var(--muted);
  overflow-wrap: anywhere;
}
#auth-form {
  margin-top: 26px;
}
#auth-form label {
  font-size: var(--fs-mono);
  margin-bottom: 9px;
  color: var(--ink-2);
}
#auth-email {
  min-height: 46px;
  font-size: var(--fs-base);
  border-color: var(--line-strong);
  background: var(--surface-sunken);
}
#auth-submit,
#auth-retry {
  min-height: 46px;
  font-size: var(--fs-sm);
  margin-top: 16px;
}
.auth-loading {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--faint);
  font-size: var(--fs-xs);
  padding: 22px 0;
}
.auth-spinner {
  height: 22px;
  width: 22px;
  border-radius: 50%;
  border: 2px solid var(--line);
  border-top-color: var(--navy);
  animation: auth-spin 1s linear infinite;
}
@keyframes auth-spin {
  to {
    transform: rotate(360deg);
  }
}
.auth-error {
  background: var(--paper);
  border-left: 3px solid var(--red);
  padding: 12px 14px;
  color: var(--red-hover);
  font-size: var(--fs-xs);
  line-height: 1.65;
}
.auth-sent {
  padding: 14px 0 0;
}
.auth-mail-icon {
  font-size: var(--fs-xl);
  color: var(--navy);
}
.auth-sent p {
  color: var(--muted);
  font-size: var(--fs-xs);
  line-height: 1.7;
}
.auth-text-button {
  display: block;
  margin: 16px auto 0;
  color: var(--navy);
  border: 0;
  background: transparent;
  text-decoration: underline;
  text-underline-offset: 4px;
}
.auth-assurance {
  display: flex;
  gap: 10px;
  border-top: 1px solid var(--line);
  padding-top: 20px;
  margin-top: 28px;
  font-size: var(--fs-mono);
  color: var(--faint);
  line-height: 1.75;
}
.auth-assurance > span {
  color: var(--navy);
  font-size: var(--fs-sm);
}
.auth-assurance p {
  margin: 0;
}
.auth-support {
  font-size: var(--fs-mono);
  color: var(--faint);
  margin: 20px 0 0;
}
.auth-support a {
  color: var(--muted);
  text-underline-offset: 3px;
}
@media (max-width: 1000px) {
  .header-controls {
    gap: 12px;
  }
  #account-email {
    max-width: 140px;
  }
  .auth-gate {
    gap: 35px;
    padding: 44px 24px;
  }
  .auth-card {
    padding: 26px;
  }
  .auth-story h1 {
    font-size: 46px;
  }
}
@media (max-width: 700px) {
  .header-controls {
    width: 100%;
    justify-content: flex-start;
  }
  .account-controls {
    width: 100%;
    justify-content: space-between;
  }
  #account-email {
    max-width: 240px;
  }
  .auth-gate {
    display: flex;
    flex-direction: column;
    gap: 26px;
    align-items: stretch;
    padding: 30px 20px;
    min-height: auto;
  }
  .auth-story h1 {
    font-size: clamp(36px, 7.5vw, 48px);
    letter-spacing: -1.2px;
    margin: 16px 0;
  }
  .auth-lead {
    font-size: var(--fs-base);
    margin-bottom: 0;
  }
  .auth-preview {
    display: none;
  }
  .auth-formats {
    font-size: var(--fs-mono);
    margin-top: 14px;
  }
  .auth-card {
    padding: 26px 22px;
  }
  .auth-card h2 {
    margin-top: 20px;
    font-size: var(--fs-xl);
  }
  #auth-email {
    font-size: var(--fs-base);
  }
}
@media (prefers-reduced-motion: reduce) {
  .auth-spinner {
    animation: none;
  }
}
.pill {
  font:
    9px "Geist Mono",
    monospace;
  letter-spacing: 1px;
  color: var(--ink-inverse-muted);
  border: 1px solid var(--ink-2);
  border-radius: var(--r-sm);
  padding: 6px 8px;
  margin-right: 8px;
}
button,
.upload {
  border: 1px solid var(--line);
  background: white;
  border-radius: var(--r-sm);
  padding: 10px 13px;
  color: var(--line-shell);
  font-size: var(--fs-xs);
  font-weight: 500;
  cursor: pointer;
  transition:
    background 0.15s,
    border-color 0.15s;
}
button:hover,
.upload:hover {
  background: var(--paper);
  border-color: var(--ink-inverse-muted);
}
button:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}
header button {
  background: var(--ink);
  border-color: var(--ink-2);
  color: var(--line);
}
header button:hover {
  background: var(--line-shell);
  border-color: var(--muted);
}
header #csv {
  background: var(--surface);
  color: var(--ink);
  border-color: white;
}
.primary {
  background: var(--navy);
  color: white;
  border-color: var(--navy);
}
.primary:hover {
  background: var(--navy);
  border-color: var(--navy);
}
.full {
  width: 100%;
  margin-top: 12px;
}
.intro {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 32px 32px 26px;
  gap: 28px;
  max-width: 1800px;
  margin: auto;
}
.eyebrow {
  font:
    10px "Geist Mono",
    monospace;
  letter-spacing: 1.5px;
  color: var(--muted);
}
.intro .eyebrow {
  color: var(--red);
  margin: 0 0 12px;
}
h1 {
  font-family: var(--font-display);
  font-stretch: var(--display-stretch);
  font-size: clamp(30px, 3.1vw, 46px);
  line-height: 1.05;
  letter-spacing: -0.01em;
  font-weight: 650;
  margin: 0 0 12px;
}
h1 span {
  color: var(--muted);
}
p {
  font-size: var(--fs-sm);
  line-height: 1.6;
}
.intro p:last-child {
  max-width: 600px;
  color: var(--muted);
  margin: 0;
}
.demo-button {
  background: transparent;
  border-color: var(--ink-inverse-muted);
  white-space: nowrap;
  padding: 13px 18px;
}
h2 {
  font-size: var(--fs-md);
  letter-spacing: -0.4px;
  font-weight: 600;
}
.metrics {
  display: flex;
  margin: 0 32px;
  background: white;
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  overflow: hidden;
}
.metric {
  flex: 1;
  padding: 16px 22px;
  display: flex;
  align-items: center;
  gap: 12px;
  border-right: 1px solid var(--line);
}
.metric:last-child {
  border: 0;
}
.metric strong {
  font:
    25px "Geist Mono",
    monospace;
  letter-spacing: -1px;
}
.metric span {
  font-size: var(--fs-mono);
  color: var(--muted);
}
.free-strip {
  margin: 14px 32px 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  color: var(--muted);
  font-size: var(--fs-mono);
}
.free-strip strong {
  color: var(--line-shell);
}
.contact-link {
  font-size: var(--fs-xs);
  font-weight: 600;
  color: var(--navy);
  text-decoration: none;
  white-space: nowrap;
}
.contact-link:hover {
  text-decoration: underline;
}
main {
  display: grid;
  grid-template-columns: minmax(270px, 1fr) minmax(365px, 1.42fr) minmax(
      270px,
      1fr
    );
  gap: var(--gap);
  padding: 0 var(--gutter);
  max-width: calc(var(--container) + var(--gutter) * 2);
  margin-inline: auto;
}
.panel {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  overflow: hidden;
  min-width: 0;
  box-shadow: var(--shadow-card);
}
.section-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 16px;
  border-bottom: 1px solid var(--line);
  font-size: var(--fs-xs);
  font-weight: 600;
  min-height: 55px;
}
.section-title b {
  font:
    10px "Geist Mono",
    monospace;
  color: var(--faint);
  margin-right: 9px;
}
.section-title > span:last-child {
  color: var(--faint);
  font:
    10px "Geist Mono",
    monospace;
}
.body {
  padding: 18px;
}
.visual {
  height: 240px;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: var(--surface-sunken);
  background-image: var(--dot-grid);
  background-size: var(--dot-size) var(--dot-size);
  border-bottom: 1px solid var(--line);
  cursor: zoom-in;
}
.visual img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}
.placeholder {
  text-align: center;
  padding: 24px;
}
.placeholder h2 {
  margin: 12px 0 4px;
}
.placeholder p {
  font-size: var(--fs-xs);
  color: var(--muted);
  margin: 0;
}
.cross {
  color: var(--navy);
  display: inline-flex;
  border: 1px solid var(--line-strong);
  border-radius: var(--r-lg);
  background: var(--surface);
  padding: 12px;
  box-shadow: 0 6px 20px #00286808;
}
.upload {
  display: block;
  text-align: center;
  position: relative;
  margin-bottom: 8px;
}
.upload input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  overflow: hidden;
  left: 0;
  bottom: 0;
}
.upload:first-child {
  border-color: var(--line-strong);
  color: var(--navy);
  background: var(--surface-sunken);
}
label {
  display: block;
  font-size: var(--fs-mono);
  color: var(--muted);
  margin-bottom: 12px;
}
input,
select,
textarea {
  display: block;
  width: 100%;
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  padding: 9px 10px;
  margin-top: 6px;
  background: var(--surface);
  color: var(--line-shell);
  font-size: var(--fs-xs);
}
textarea {
  min-height: 74px;
  resize: vertical;
}
.muted,
.hint {
  font-size: var(--fs-mono);
  color: var(--muted);
  line-height: 1.55;
}
.hint {
  padding: 0 16px;
  margin: 12px 0 18px;
}
.toolbar {
  display: flex;
  gap: 6px;
  padding: 16px 14px 0;
  flex-wrap: wrap;
}
.toolbar button {
  font-size: var(--fs-mono);
  padding: 8px 9px;
}
.tree-head {
  display: flex;
  justify-content: space-between;
  padding: 11px 16px;
  font:
    9px "Geist Mono",
    monospace;
  letter-spacing: 0.7px;
  color: var(--muted);
  background: var(--paper);
  border-block: 1px solid var(--line);
}
.row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 15px;
  border-bottom: 1px solid var(--surface-sunken);
  cursor: pointer;
  min-height: 68px;
}
.row:hover {
  background: var(--surface-sunken);
}
.row.active {
  background: var(--paper);
  box-shadow: inset 3px 0 var(--navy);
}
.row input {
  width: 13px;
  min-width: 13px;
  margin: 0;
  accent-color: var(--navy);
}
.row .name {
  flex: 1;
  min-width: 0;
  font-size: var(--fs-xs);
}
.row strong {
  display: block;
  font-weight: 500;
  overflow-wrap: anywhere;
}
.row small {
  display: block;
  color: var(--muted);
  font-size: var(--fs-mono);
  margin-top: 6px;
}
.qty {
  font:
    12px "Geist Mono",
    monospace;
  white-space: nowrap;
}
.qty span {
  color: var(--faint);
}
.badge {
  display: inline-block;
  border: 1px solid var(--warn-tint);
  padding: 5px 8px;
  background: var(--warn-tint);
  color: var(--warn);
  font-size: var(--fs-mono);
  border-radius: var(--r-sm);
  margin-bottom: 16px;
}
.definition {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
.definition label {
  margin: 0;
}
.photos {
  display: flex;
  gap: 6px;
  overflow: auto;
  margin: 12px 0;
}
.photos:empty {
  margin: 0;
}
.photos button {
  padding: 3px;
}
.photos img {
  width: 48px;
  height: 40px;
  object-fit: cover;
}
.photos button span {
  display: block;
  font:
    9px "Geist Mono",
    monospace;
  padding: 4px;
}
.procurement {
  margin: 24px 32px 0;
  background: var(--ink);
  color: white;
  border: 1px solid var(--line-shell);
  border-radius: var(--r-md);
  padding: 26px 28px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  position: relative;
  overflow: hidden;
}
.procurement:before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 3px;
  background: var(--red);
}
.procurement h2 {
  font-family: var(--font-display);
  font-stretch: var(--display-stretch);
  font-size: var(--fs-xl);
  margin: 7px 0;
  letter-spacing: -0.01em;
}
.procurement p {
  margin: 0;
  color: var(--ink-inverse-muted);
  max-width: 670px;
  font-size: var(--fs-xs);
}
.procurement .eyebrow {
  color: var(--ink-inverse-muted);
  font-size: var(--fs-mono);
}
.procurement .contact-link {
  background: white;
  border-radius: var(--r-sm);
  padding: 12px 18px;
  color: var(--ink);
}
.bottom {
  display: grid;
  grid-template-columns: 1fr 2fr;
  gap: 28px;
  padding: 24px 32px 65px;
}
.bottom details {
  font-size: var(--fs-xs);
  padding-top: 8px;
}
.bottom summary {
  cursor: pointer;
  color: var(--muted);
}
#history {
  font:
    10px/1.9 "Geist Mono",
    monospace;
  color: var(--faint);
}
pre {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  font:
    10px/1.5 "Geist Mono",
    monospace;
  max-height: 400px;
  overflow: auto;
  background: white;
  padding: 15px;
}
#status {
  position: fixed;
  inset-inline: 0;
  bottom: 0;
  display: flex;
  align-items: center;
  gap: 9px;
  /* Content is centred on --container, so the bar's text has to be too;
     it used to sit hard against the viewport edge under centred columns. */
  padding: 10px max(var(--gutter), calc((100vw - var(--container)) / 2));
  background: rgb(255 255 255 / 92%);
  backdrop-filter: blur(12px);
  color: var(--ink-2);
  border-top: 1px solid var(--line);
  font-size: var(--fs-mono);
  z-index: 5;
}
#status:before {
  content: "";
  flex: none;
  width: 7px;
  height: 7px;
  border-radius: var(--r-full);
  background: var(--ok);
}
#proposals {
  padding: 16px;
  background: var(--warn-tint);
  border-top: 1px solid var(--line);
}
#proposals:empty {
  display: none;
}
.proposal {
  font-size: var(--fs-xs);
  margin: 12px 0;
}
.proposal input {
  display: inline;
  width: auto;
  margin-right: 8px;
}
dialog {
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  max-width: 95vw;
  max-height: 95vh;
  padding: 20px;
  background: var(--paper);
}
dialog::backdrop {
  background: #050b18cc;
}
dialog img {
  display: block;
  width: min(1200px, 85vw);
  height: auto;
}
dialog button {
  position: sticky;
  top: 0;
  float: right;
}
dialog p {
  padding-right: 80px;
}
@media (min-width: 1800px) {
  main,
  .metrics,
  .free-strip,
  .procurement,
  .bottom {
    max-width: 1736px;
    margin-left: auto;
    margin-right: auto;
  }
  main,
  .bottom {
    padding-left: 0;
    padding-right: 0;
  }
}
@media (max-width: 1100px) {
  header {
    padding: 16px 20px;
  }
  .pill {
    display: none;
  }
  .intro {
    padding: 26px 20px;
  }
  .metrics,
  .free-strip,
  .procurement {
    margin-left: 20px;
    margin-right: 20px;
  }
  main {
    padding: 0 20px;
    grid-template-columns: minmax(260px, 1fr) minmax(340px, 1.35fr);
  }
  .panel:last-child {
    grid-column: 1/-1;
  }
  .panel:last-child .body {
    display: block;
  }
  .bottom {
    padding: 24px 20px 65px;
  }
  .metric {
    padding: 15px;
    gap: 8px;
  }
  .metric strong {
    font-size: var(--fs-lg);
  }
}
@media (max-width: 700px) {
  header {
    padding: 14px 16px;
    flex-wrap: wrap;
    gap: 16px;
  }
  .brand {
    gap: 14px;
  }
  .brand a {
    font-size: var(--fs-xl);
  }
  .actions {
    width: 100%;
  }
  .actions button {
    flex: 1;
  }
  .intro {
    display: block;
    padding: 26px 16px 22px;
  }
  h1 {
    font-size: 35px;
    letter-spacing: -1.2px;
  }
  .intro p:last-child {
    font-size: var(--fs-xs);
  }
  .demo-button {
    margin-top: 18px;
    width: 100%;
  }
  .metrics {
    margin: 0 16px;
    display: grid;
    grid-template-columns: 1fr 1fr;
  }
  .metric {
    padding: 13px 14px;
    border-bottom: 1px solid var(--line);
  }
  .metric:nth-child(2n) {
    border-right: 0;
  }
  .metric strong {
    font-size: var(--fs-lg);
  }
  .metric span {
    font-size: var(--fs-mono);
  }
  .free-strip {
    margin: 14px 16px 18px;
    display: block;
    line-height: 1.6;
  }
  .free-strip .contact-link {
    display: inline-block;
    margin-top: 8px;
  }
  main {
    display: block;
    padding: 0 16px;
  }
  .panel {
    margin-bottom: 16px;
  }
  .visual {
    height: 260px;
  }
  .procurement {
    margin: 20px 16px 0;
    padding: 24px;
    display: block;
  }
  .procurement h2 {
    font-size: var(--fs-xl);
  }
  .procurement .contact-link {
    display: inline-block;
    margin-top: 18px;
  }
  .bottom {
    display: block;
    padding: 22px 16px 80px;
  }
  .bottom details {
    margin-top: 20px;
  }
  #status {
    padding: 10px 16px;
    font-size: var(--fs-mono);
  }
  .toolbar {
    gap: 5px;
  }
  .toolbar button {
    padding: 9px 8px;
  }
}
@media (prefers-reduced-motion: reduce) {
  * {
    transition: none !important;
  }
}

.key-settings {
  border-block: 1px solid var(--line);
  padding: 12px 0;
  margin: 14px 0;
  font-size: var(--fs-mono);
}
.key-settings summary {
  cursor: pointer;
  color: var(--navy);
  font-weight: 500;
}
.key-settings button {
  font-size: var(--fs-mono);
  padding: 8px;
}

.candidate-history {
  padding: 18px;
  border-top: 1px solid var(--line);
}
.candidate-history button {
  font-size: var(--fs-mono);
  margin: 3px;
}
.view-toggle {
  display: flex;
  gap: 8px;
  align-items: center;
}
.view-toggle input {
  width: auto;
  margin: 0;
}
.sourcing-actions {
  min-width: 225px;
}
.sourcing-actions .primary {
  background: var(--surface);
  color: var(--navy);
  width: 100%;
}
.sourcing-actions .contact-link {
  background: transparent;
  color: var(--line-strong);
  padding: 0;
}
.proposal small {
  display: block;
  margin-left: 24px;
  color: var(--muted);
}

main {
  align-items: start;
}
.analysis-options {
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  padding: 10px;
  margin: 12px 0;
  font-size: var(--fs-mono);
}
.analysis-options summary {
  cursor: pointer;
  color: var(--navy);
}
.analysis-options label {
  margin-top: 12px;
}
.analysis-options textarea {
  min-height: 60px;
}

/* Connected build journey */
html {
  scroll-behavior: smooth;
  scroll-padding-top: 22px;
}
.demo-actions {
  display: flex;
  flex-direction: column;
  gap: 9px;
  min-width: 210px;
}
.journey-nav {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 1px;
  margin: 0 32px 22px;
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  overflow: hidden;
  background: var(--line);
}
.journey-nav a {
  padding: 17px 20px;
  background: var(--surface);
  color: var(--navy);
  text-decoration: none;
  font-size: var(--fs-xs);
  font-weight: 600;
}
.journey-nav b {
  font-family:
    Geist Mono,
    monospace;
  color: var(--red);
  margin-right: 12px;
  font-size: var(--fs-mono);
}
.build-section {
  margin: 28px 32px;
  padding: 28px;
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  background: white;
}
.build-heading {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  margin-bottom: 22px;
}
.build-heading h2 {
  font-family: var(--font-display);
  font-stretch: var(--display-stretch);
  font-size: clamp(22px, 2.5vw, 32px);
  letter-spacing: -0.01em;
  margin: 4px 0 10px;
}
.build-heading p {
  color: var(--muted);
  font-size: var(--fs-sm);
  max-width: 720px;
}
.build-heading .eyebrow {
  color: var(--red);
  font-size: var(--fs-mono);
}
.local-badge {
  border: 1px solid var(--ok-tint);
  border-radius: var(--r-lg);
  padding: 7px 12px;
  color: var(--ok);
  font-size: var(--fs-mono);
  white-space: nowrap;
}
.review-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}
.review-card {
  background: var(--surface-sunken);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  padding: 18px;
  min-width: 0;
}
.review-card h3 {
  font-size: var(--fs-base);
  margin: 6px 0 12px;
}
.review-card p,
.review-card li {
  font-size: var(--fs-xs);
  line-height: 1.6;
  overflow-wrap: anywhere;
}
.review-card.conflict {
  border-left: 3px solid var(--red);
}
.review-card.unknown {
  border-left: 3px solid var(--warn);
}
.review-card.resolved {
  border-left: 3px solid var(--ok);
}
.review-summary {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 18px;
}
.review-summary span {
  background: var(--paper);
  border-radius: var(--r-sm);
  padding: 10px 14px;
  font-size: var(--fs-xs);
}
.review-source {
  display: block;
  text-align: left;
  width: 100%;
  margin: 8px 0;
  white-space: normal;
  overflow-wrap: anywhere;
}
.review-decision {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 12px;
}
.review-empty {
  padding: 26px;
  border: 1px dashed var(--line-strong);
  border-radius: var(--r-md);
  color: var(--muted);
  font-size: var(--fs-sm);
}
.revision-panel {
  border-top: 1px solid var(--line);
  padding-top: 18px;
  margin-top: 22px;
  font-size: var(--fs-xs);
}
.revision-panel summary {
  cursor: pointer;
  font-weight: 600;
}
.revision-change {
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
}
.evidence-question {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  background: var(--paper);
  border-radius: var(--r-sm);
  margin: 10px 0;
  padding: 13px;
}
.evidence-question p {
  margin: 0;
  font-size: var(--fs-xs);
}
.evidence-question small {
  display: block;
  color: var(--muted);
  margin-top: 5px;
}
#document-role {
  border-top: 1px solid var(--line);
  margin-top: 12px;
}
#part-evidence:empty {
  display: none;
}
#part-evidence {
  border-top: 1px solid var(--line);
}
.evidence-region {
  position: absolute;
  border: 2px solid var(--red);
  background: #bf0a301c;
  pointer-events: none;
}
.visual {
  position: relative;
}
.source-chip {
  display: block;
  width: 100%;
  text-align: left;
  margin: 7px 0;
  font-size: var(--fs-mono);
}
.open-source-note {
  margin: 24px 32px;
  padding: 18px 24px;
  display: flex;
  align-items: center;
  gap: 20px;
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  font-size: var(--fs-xs);
}
.open-source-note span {
  color: var(--muted);
  flex: 1;
}
.open-source-note a {
  color: var(--navy);
  white-space: nowrap;
}
.proposal-detail {
  margin: 0 0 12px 24px;
  font-size: var(--fs-mono);
  color: var(--muted);
}
.proposal-diff {
  padding: 10px;
  border: 1px solid var(--warn-mid);
  background: var(--warn-tint);
  border-radius: var(--r-sm);
  margin: 8px 0;
  font-size: var(--fs-xs);
}
@media (max-width: 800px) {
  .journey-nav {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    margin: 0 16px 18px;
  }
  .build-section {
    margin: 20px 16px;
    padding: 18px;
  }
  .build-heading {
    align-items: flex-start;
    flex-direction: column;
  }
  .review-grid {
    grid-template-columns: 1fr;
  }
  .open-source-note {
    margin: 20px 16px;
    flex-wrap: wrap;
    gap: 10px;
  }
  .open-source-note span {
    flex-basis: 100%;
  }
  .demo-actions {
    min-width: 0;
  }
}
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
}

.design-brief {
  padding: 18px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  margin-bottom: 20px;
}
.design-brief textarea {
  min-height: 70px;
  margin: 8px 0 12px;
}
#source-dialog {
  max-width: min(1000px, 94vw);
  width: 90vw;
  max-height: 85vh;
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  padding: 25px;
}
#source-content {
  overflow: auto;
  max-height: 60vh;
}
#source-content table {
  border-collapse: collapse;
  font-size: var(--fs-xs);
}
#source-content td,
#source-content th {
  border: 1px solid var(--line);
  padding: 10px;
  text-align: left;
  white-space: nowrap;
}
#source-content pre {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  font-size: var(--fs-xs);
  line-height: 1.7;
}
.source-highlight {
  background: var(--warn-mid);
  outline: 2px solid var(--red);
}
.evidence-chip {
  margin: 5px 0;
  display: block;
  max-width: 100%;
  white-space: normal;
  text-align: left;
  font-size: var(--fs-mono);
}
.evidence-quote {
  margin: 8px 0;
  padding-left: 10px;
  border-left: 2px solid var(--line-strong);
  font-size: var(--fs-mono);
}
.evidence-quote small {
  display: block;
  color: var(--muted);
}
.review-card-heading {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.preview-link {
  display: inline-block;
  color: var(--navy);
  font-weight: 600;
  font-size: var(--fs-sm);
  margin: 10px 12px 10px 0;
}

/* Evidence-loop answers need full-width, vertically stacked controls. */
#evidence-loop .evidence-question {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 10px;
  padding: 16px;
  margin-top: 14px;
}
#evidence-loop .evidence-question p {
  margin: 0;
}
#evidence-loop .evidence-question label {
  display: block;
}
#evidence-loop textarea {
  display: block;
  width: 100%;
  min-height: 88px;
  margin-top: 6px;
  box-sizing: border-box;
}
#evidence-loop [data-loop-save] {
  align-self: flex-start;
}
#evidence-loop h3 {
  margin-top: 0;
}

#evidence-loop input[type="checkbox"] {
  width: auto;
  display: inline-block;
  margin-right: 6px;
}

/* Product wording is a distinct, explicitly reviewed proposal. */
.product-suggestion {
  padding: 18px;
  margin-bottom: 20px;
  background: var(--paper);
  border: 1px solid var(--line-strong);
  border-radius: var(--r-md);
}
.product-suggestion h3 {
  margin: 8px 0;
  font-size: var(--fs-lg);
  letter-spacing: -0.5px;
}
.product-suggestion p {
  line-height: 1.55;
}
.product-suggestion details {
  margin: 14px 0;
}
.product-suggestion label,
.proposal-detail label {
  display: block;
  margin: 12px 0 6px;
}
.product-suggestion input[type="checkbox"] {
  width: auto;
  display: inline-block;
  margin-right: 6px;
}
.product-suggestion input:not([type="checkbox"]),
.product-suggestion textarea,
.proposal-detail input,
.proposal-detail textarea {
  box-sizing: border-box;
  width: 100%;
}
.product-suggestion textarea,
.proposal-detail textarea {
  min-height: 82px;
}
.proposal-detail {
  padding: 0 0 16px;
  margin-bottom: 12px;
  border-bottom: 1px solid var(--line);
}
.proposal-detail details {
  margin: 12px 0;
}

/* The entry screen uses a quieter canvas and a compact technical preview. */
body[data-auth="locked"] {
  background: var(--paper);
}
body[data-auth="locked"] > header {
  padding-inline: max(24px, calc((100vw - 1200px) / 2));
  border-bottom-width: 2px;
}
body[data-auth="locked"]
  .header-controls:has(> [hidden]):not(:has(> :not([hidden]))) {
  display: none;
}
.auth-story,
.auth-card {
  min-width: 0;
}
.auth-story h1 {
  text-wrap: balance;
}
.auth-demo-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px 16px;
  margin-top: 24px;
}
.auth-demo-primary {
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  min-height: 48px;
  padding: 12px 18px;
  border: 1px solid var(--line-strong);
  border-radius: var(--r-md);
  background: white;
  color: var(--navy);
  font-size: var(--fs-sm);
  font-weight: 600;
  text-decoration: none;
  transition:
    background 150ms,
    border-color 150ms;
}
.auth-demo-primary:hover {
  border-color: var(--navy);
  background: var(--paper);
}
.auth-demo-primary > span {
  font-size: var(--fs-md);
}
.auth-demo-note {
  color: var(--muted);
  font-size: var(--fs-mono);
}
.auth-preview {
  margin-top: 28px;
  border-radius: var(--r-md);
  box-shadow: 0 4px 16px #14233c04;
}
.auth-preview-top {
  padding: 13px 16px;
  font-size: var(--fs-mono);
  gap: 12px;
}
.auth-preview-top > :last-child {
  color: var(--muted);
  text-align: right;
  letter-spacing: 0.5px;
}
.auth-part-preview {
  padding: 8px 28px 0;
  background: var(--surface-sunken);
}
.auth-part-preview svg {
  display: block;
  width: 100%;
  height: auto;
  max-height: 190px;
}
.auth-preview-steps {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  border-top: 1px solid var(--line);
  padding: 16px;
  gap: 16px;
}
.auth-preview-part {
  margin: 0;
  padding: 0;
  border: 0;
  display: flex;
  flex-direction: column;
  gap: 5px;
}
.auth-preview-part > span {
  color: var(--red);
  padding: 0 0 3px;
}
.auth-preview-part strong {
  font-size: var(--fs-mono);
  line-height: 1.5;
}
.auth-preview-part small {
  color: var(--muted);
  line-height: 1.5;
}
.auth-formats {
  color: var(--muted);
  font-size: var(--fs-mono);
  line-height: 1.8;
}
.auth-assembly-link {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  min-height: 44px;
  margin-top: 8px;
  color: var(--muted);
  font-size: var(--fs-xs);
  text-underline-offset: 4px;
  text-decoration-color: var(--line-strong);
}
.auth-assembly-link:hover {
  color: var(--navy);
  text-decoration-color: currentColor;
}
.auth-card {
  padding: clamp(28px, 3vw, 40px);
  border-radius: var(--r-lg);
  box-shadow:
    0 24px 64px -32px #14233c33,
    0 2px 6px #14233c03;
}
.auth-card-label {
  font-size: var(--fs-mono);
}
.auth-card h2 {
  font-size: 30px;
}
#auth-form label {
  display: block;
  font-size: var(--fs-xs);
}
#auth-email {
  min-height: 52px;
  font-size: var(--fs-base);
  border-radius: var(--r-md);
}
#auth-submit,
#auth-retry,
#auth-resend {
  min-height: 50px;
  border-radius: var(--r-md);
}
.auth-assurance {
  font-size: var(--fs-xs);
  color: var(--muted);
}
.auth-support {
  font-size: var(--fs-mono);
}
.journey-nav a:hover {
  background: var(--paper);
}
@media (max-width: 1000px) and (min-width: 701px) {
  .auth-gate {
    grid-template-columns: minmax(0, 1fr) minmax(300px, 0.9fr);
    gap: 28px;
  }
  .auth-card {
    padding: 28px;
  }
}
@media (max-width: 700px) {
  body[data-auth="locked"] > header {
    min-height: 72px;
    padding: 16px 20px;
  }
  .auth-gate {
    padding: 36px 20px 40px;
    gap: 28px;
  }
  .auth-story .eyebrow {
    font-size: var(--fs-mono);
    letter-spacing: 1.4px;
  }
  .auth-demo-actions {
    gap: 10px;
    margin-top: 22px;
  }
  .auth-demo-primary {
    width: 100%;
  }
  .auth-card {
    padding: 26px 22px;
    border-radius: var(--r-lg);
  }
  .auth-card h2 {
    font-size: var(--fs-xl);
  }
  .auth-formats {
    font-size: var(--fs-mono);
    letter-spacing: 0.3px;
  }
}
@media (prefers-reduced-motion: reduce) {
  .auth-demo-primary {
    transition: none;
  }
}

.demo-actions > button {
  margin: 0;
  min-height: 44px;
}

.photo-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 10px 0;
}
.photo-actions button {
  font-size: var(--fs-xs);
}

/* BOMFab identity: a three-piece B and an outlined Geist wordmark. */
.brand .bomfab-home {
  display: inline-flex;
  align-items: center;
  line-height: 0;
}
.brand .bomfab-logo {
  display: block;
  width: 182px;
  height: auto;
}
.brand a.bomforge-credit {
  border-left: 1px solid var(--ink-2);
  padding-left: 18px;
  font-family: Geist, sans-serif;
  font-size: var(--fs-mono);
  line-height: 1.4;
  font-weight: 400;
  letter-spacing: 0.02em;
  color: var(--line-strong);
  white-space: nowrap;
}
@media (max-width: 650px) {
  .brand .bomfab-logo {
    width: 149px;
  }
  .brand a.bomforge-credit {
    display: none;
  }
}
body > header {
  border-bottom-color: var(--red);
}

/* The selected part's direct path from source photo to a reviewed 3D file. */
.photo-cad {
  margin: 0 18px 18px;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  background: var(--surface-sunken);
  color: var(--ink);
}
.photo-cad-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 18px;
}
.photo-cad-heading .eyebrow {
  margin: 0 0 7px;
  color: var(--muted);
  font-size: var(--fs-mono);
  letter-spacing: 1.4px;
}
.photo-cad-heading h3 {
  margin: 0;
  font-size: var(--fs-lg);
  font-weight: 600;
  letter-spacing: -0.65px;
  line-height: 1.15;
  color: var(--ink);
}
.photo-cad-formats {
  font-size: var(--fs-mono);
  letter-spacing: 0.7px;
  color: var(--muted);
  white-space: nowrap;
}
.photo-cad-part {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 19px;
  padding-bottom: 17px;
  border-bottom: 1px solid var(--line);
}
.photo-cad-part > img {
  width: 58px;
  height: 58px;
  flex: 0 0 58px;
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  object-fit: cover;
  background: var(--surface);
}
.photo-cad-part > div {
  min-width: 0;
}
.photo-cad-part strong {
  display: block;
  font-size: var(--fs-sm);
  line-height: 1.45;
  font-weight: 600;
  overflow-wrap: anywhere;
}
.photo-cad-part p {
  margin: 5px 0 0;
  color: var(--muted);
  font-size: var(--fs-mono);
  line-height: 1.55;
  overflow-wrap: anywhere;
}
.photo-cad > label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 8px;
  font-size: var(--fs-mono);
  color: var(--ink-2);
}
.photo-cad > label > span {
  font-size: var(--fs-mono);
  color: var(--faint);
  font-weight: 400;
}
.photo-cad #photo-cad-reference {
  display: block;
  width: 100%;
  min-height: 42px;
  margin: 0 0 10px;
  padding: 10px 12px;
  border: 1px solid var(--line-strong);
  border-radius: var(--r-sm);
  background: var(--surface);
  color: var(--ink);
  font: inherit;
  font-size: var(--fs-xs);
  box-sizing: border-box;
}
.photo-cad #photo-cad-reference::placeholder {
  color: var(--faint);
}
.photo-cad #photo-cad-generate {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  width: 100%;
  min-height: 43px;
  padding: 12px 15px;
  border: 1px solid var(--navy);
  border-radius: var(--r-sm);
  background: var(--navy);
  color: var(--surface);
  font-size: var(--fs-xs);
  font-weight: 600;
}
.photo-cad #photo-cad-generate:hover:not(:disabled) {
  background: var(--navy-hover);
  border-color: var(--navy-hover);
}
.photo-cad #photo-cad-generate:disabled {
  opacity: 0.5;
  cursor: default;
}
.photo-cad #photo-cad-generate > span {
  font-size: var(--fs-md);
  line-height: 1;
  font-weight: 400;
}
.photo-cad .photo-cad-note {
  margin: 11px 0 0;
  color: var(--muted);
  font-size: var(--fs-mono);
  line-height: 1.6;
}
.photo-cad #photo-cad-status {
  margin: 14px 0 0;
  padding: 11px 12px;
  border-radius: var(--r-sm);
  background: var(--surface-inset);
  color: var(--muted);
  font-size: var(--fs-mono);
  line-height: 1.6;
  overflow-wrap: anywhere;
}
.photo-cad #photo-cad-status:empty,
.photo-cad #photo-cad-summary:empty {
  display: none;
}
.photo-cad #photo-cad-summary {
  margin-top: 14px;
  font-size: var(--fs-xs);
  line-height: 1.65;
  overflow-wrap: anywhere;
}
.photo-cad-assumptions {
  margin-top: 14px;
  font-size: var(--fs-xs);
}
.photo-cad-assumptions:has(#photo-cad-summary:empty) {
  display: none;
}
.photo-cad-assumptions summary {
  cursor: pointer;
  color: var(--ink);
}
.photo-cad #photo-cad-summary h3,
.photo-cad #photo-cad-summary h4 {
  margin: 0 0 7px;
  font-size: var(--fs-base);
  line-height: 1.45;
}
.photo-cad #photo-cad-summary p {
  margin: 7px 0;
}
.photo-cad #photo-cad-summary ul {
  margin: 7px 0;
  padding-left: 18px;
}
.photo-cad #photo-cad-preview {
  margin-top: 17px;
  padding-top: 17px;
  border-top: 1px solid var(--line);
}
.photo-cad #photo-cad-preview .cad-studio {
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
}
.photo-cad #photo-cad-preview .cad-heading {
  display: block;
}
.photo-cad #photo-cad-preview .cad-heading h2 {
  font-size: var(--fs-lg);
  line-height: 1.25;
}
.photo-cad #photo-cad-preview .cad-layout {
  grid-template-columns: minmax(0, 1fr);
  gap: 19px;
}
.photo-cad #photo-cad-preview .cad-canvas {
  height: 290px;
  border-radius: var(--r-sm);
}
.photo-cad #photo-cad-preview .cad-export button {
  flex: 1 1 auto;
  font-size: var(--fs-mono);
}
.photo-cad #photo-cad-preview .cad-note,
.photo-cad #photo-cad-preview .cad-status {
  font-size: var(--fs-mono);
}
.photo-cad :focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 3px;
}
@media (max-width: 600px) {
  .photo-cad {
    margin: 0 14px 16px;
    padding: 17px;
  }
  .photo-cad-heading h3 {
    font-size: var(--fs-lg);
  }
  .photo-cad-formats {
    font-size: var(--fs-mono);
    letter-spacing: 0.3px;
  }
  .photo-cad #photo-cad-reference {
    font-size: var(--fs-xs);
  }
  .photo-cad #photo-cad-preview .cad-canvas {
    height: 250px;
  }
}

/* ---------------------------------------------------------------
   My projects (cloud-projects.js injects this after #demo-workflow).
   It shipped with no styles at all, so it rendered full-bleed at the
   document edge in the app's default font. Aligned to `main` here.
   --------------------------------------------------------------- */
.cloud-projects {
  max-width: calc(var(--container) + var(--gutter) * 2);
  margin: 24px auto 0;
  padding: 0 var(--gutter);
}
.cloud-projects > summary {
  list-style: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  background: var(--surface);
  box-shadow: var(--shadow-card);
  font-size: var(--fs-sm);
  font-weight: 600;
  color: var(--ink);
}
.cloud-projects > summary::-webkit-details-marker {
  display: none;
}
.cloud-projects > summary::before {
  content: "";
  width: 7px;
  height: 7px;
  border-right: 1.5px solid var(--muted);
  border-bottom: 1.5px solid var(--muted);
  transform: rotate(-45deg);
  transition: transform 0.18s;
}
.cloud-projects[open] > summary::before {
  transform: rotate(45deg);
}
.cloud-projects > summary:hover {
  border-color: var(--line-strong);
}
.cloud-projects[open] > summary {
  border-radius: var(--r-md) var(--r-md) 0 0;
  border-bottom-color: transparent;
}
.cloud-projects[open] > :not(summary) {
  background: var(--surface);
  border-inline: 1px solid var(--line);
}
.cloud-projects[open] > :last-child {
  border-bottom: 1px solid var(--line);
  border-radius: 0 0 var(--r-md) var(--r-md);
  padding-bottom: var(--pad);
}
.cloud-project-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: end;
  gap: 10px;
  padding: var(--pad) var(--pad) 0;
}
.cloud-project-actions button,
.cloud-projects [data-cloud="sourcing"] button {
  min-height: 40px;
  padding: 0 14px;
  border: 1px solid var(--line-strong);
  border-radius: var(--r-sm);
  background: var(--surface);
  color: var(--ink);
  font-size: var(--fs-sm);
  font-weight: 500;
  cursor: pointer;
}
.cloud-project-actions button:hover,
.cloud-projects [data-cloud="sourcing"] button:hover {
  background: var(--surface-sunken);
  border-color: var(--muted);
}
.cloud-projects [data-cloud="send"],
.cloud-projects [data-cloud="request"] button[type="submit"] {
  background: var(--red);
  border-color: var(--red);
  color: var(--ink-inverse);
}
.cloud-projects [data-cloud="send"]:hover,
.cloud-projects [data-cloud="request"] button[type="submit"]:hover {
  background: var(--red-hover);
  border-color: var(--red-hover);
}
.cloud-projects label {
  display: flex;
  flex-direction: column;
  gap: 5px;
  font-size: var(--fs-xs);
  font-weight: 500;
  color: var(--ink-2);
}
.cloud-projects select,
.cloud-projects input:not([type="checkbox"]),
.cloud-projects textarea {
  min-height: 40px;
  padding: 8px 10px;
  border: 1px solid var(--line-strong);
  border-radius: var(--r-sm);
  background: var(--surface);
  color: var(--ink);
  font-size: var(--fs-sm);
}
.cloud-projects [data-cloud="status"] {
  margin: 12px var(--pad) 0;
  font-size: var(--fs-xs);
  color: var(--muted);
}
.cloud-projects [data-cloud="sourcing"] {
  margin: 14px var(--pad) 0;
  border-top: 1px solid var(--line);
  padding-top: 14px;
}
.cloud-projects [data-cloud="sourcing"] > summary {
  cursor: pointer;
  min-height: 44px;
  display: flex;
  align-items: center;
  font-size: var(--fs-sm);
  font-weight: 600;
  color: var(--navy);
}
.cloud-projects [data-cloud="request"] {
  display: grid;
  gap: 12px;
  max-width: 560px;
  margin-top: 8px;
}
.cloud-projects [data-cloud="request"] p,
.cloud-projects [data-cloud="review"] p {
  margin: 0;
  font-size: var(--fs-xs);
  color: var(--muted);
}
.cloud-consent {
  flex-direction: row !important;
  align-items: center;
  gap: 9px !important;
}
.cloud-consent input {
  width: 18px;
  height: 18px;
  accent-color: var(--red);
}
.cloud-projects [data-cloud="review"] {
  margin-top: 14px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  background: var(--surface-sunken);
}
.cloud-projects [data-cloud="review"] h3 {
  margin: 0 0 6px;
  font-size: var(--fs-md);
}
.cloud-projects [data-cloud="preview"] {
  margin: 10px 0;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  background: var(--surface);
  font: var(--fs-mono) / 1.6 var(--font-mono);
  color: var(--ink-2);
}

/* One disclosure affordance product-wide. The default UA triangle appeared
   next to hand-built chevrons, which read as two different controls. */
details > summary {
  list-style: none;
}
details > summary::-webkit-details-marker {
  display: none;
}
details > summary::before {
  content: "";
  display: inline-block;
  width: 6px;
  height: 6px;
  margin-right: 9px;
  vertical-align: 1px;
  border-right: 1.5px solid currentColor;
  border-bottom: 1.5px solid currentColor;
  transform: rotate(-45deg);
  transition: transform 0.18s;
  opacity: 0.6;
}
details[open] > summary::before {
  transform: rotate(45deg);
}
@media (prefers-reduced-motion: reduce) {
  details > summary::before {
    transition: none;
  }
}

/* Phones: the first screen belongs to the one thing a visitor came to do. */
@media (max-width: 600px) {
  header {
    min-height: 0;
    padding: 10px 16px;
    gap: 12px;
    flex-wrap: nowrap;
  }
  .brand {
    gap: 10px;
    min-width: 0;
  }
  .brand .bomfab-logo {
    width: 124px;
    height: auto;
  }
  .header-controls {
    width: auto;
    justify-content: flex-end;
    gap: 8px;
    flex-wrap: nowrap;
  }
  body:not([data-has-parts]) #workspace-actions {
    display: none;
  }
  .actions button {
    min-height: 40px;
    padding: 8px 11px;
    font-size: var(--fs-mono);
  }
  #account-email {
    max-width: 150px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
}

/* A funded account has nothing to configure, so the key panel disappears. */
#access-panel[data-state="funded"] {
  display: none;
}

/* The key panel is the paid path. Someone without a key is not a dead end:
   the saved example shows the whole flow and still reaches a sourcing ask. */
.key-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}
.key-alternative {
  margin: 10px 0 0;
  font-size: var(--fs-xs);
  color: var(--muted);
}
#access-panel[data-state="byok"] .key-alternative {
  display: none;
}
@media (max-width: 600px) {
  .key-actions {
    flex-direction: column;
    gap: 8px;
  }
  .key-actions button {
    width: 100%;
    min-height: 48px;
  }
}

/* The BOMForge account is the way in. The email link stays underneath it for
   anyone who does not have one yet, so the gate never dead-ends. */
.auth-sso {
  margin-top: 4px;
}
.auth-sso-note {
  margin: 8px 0 0;
  color: var(--muted);
  font: var(--fs-xs) / 1.5 var(--font-sans);
  text-align: center;
}
.auth-or {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 18px 0 2px;
  color: var(--muted);
  font: var(--fs-xs) / 1 var(--font-sans);
}
.auth-or::before,
.auth-or::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--line);
}

/* The two labels that were eyebrows and are actually the heading of their
   block. Sentence case, no letter-spacing, no capitals: a label naming what
   follows, rather than a decorative strip of shouting above it. */
.section-label {
  font-family: var(--font-sans);
  font-size: var(--fs-sm);
  font-weight: 600;
  letter-spacing: 0;
  text-transform: none;
  color: var(--ink-2);
  margin: 0 0 10px;
}

/* The email comes before the key: the card sits where the key panel does. */
.signup-card {
  border-block: 1px solid var(--line);
  padding: 14px 0;
  margin: 14px 0;
  font-size: var(--fs-mono);
}
.signup-card[hidden] {
  display: none;
}
.signup-title {
  margin: 0 0 6px;
  font-weight: 600;
  color: var(--navy);
}
.signup-card form {
  display: grid;
  gap: 10px;
}
.signup-terms {
  display: flex;
  gap: 8px;
  align-items: flex-start;
  font-size: var(--fs-xs, 12px);
}
.signup-terms input {
  width: auto;
  margin: 2px 0 0;
}
.signup-terms a,
.site-legal a {
  color: var(--navy);
}
.bf-hp {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  opacity: 0;
}
.key-settings.is-waiting {
  opacity: 0.6;
}
.model-panel {
  border-block: 1px solid var(--line);
  padding: 12px 0;
  margin: 14px 0;
  font-size: var(--fs-mono);
}
.model-panel[hidden] {
  display: none;
}
.model-choice {
  display: block;
}
.site-legal {
  margin: 8px 32px 24px;
  font-size: var(--fs-xs, 12px);
  color: var(--muted);
}
