/* Benchline: "repair tag" direction. See projects/saas/PROJECT_RECORD.md. */
:root {
  --paper: #F3EEE3;
  --card: #FBF8F1;
  --ink: #17181C;
  --muted: #55524A;
  --rule: #D8D0BF;
  --orange: #D9481C;
  --orange-text: #A8370F;
  --lane-in: #E9E1CF;
  --lane-bench: #F6D7A8;
  --lane-ready: #CFE3C9;
  --display: "Bricolage Grotesque", "Arial Narrow", system-ui, sans-serif;
  --body: "Instrument Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  --radius: 6px;
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }

html { scroll-behavior: smooth; scroll-padding-top: 80px; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--body);
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}
@media (min-width: 768px) { body { font-size: 17px; } }

body.modal-open { overflow: hidden; }

h1, h2, h3 {
  font-family: var(--display);
  font-weight: 700;
  line-height: 1.08;
  letter-spacing: -0.02em;
  margin: 0;
}
h2 { font-size: clamp(30px, 5vw, 46px); }
h3 { font-size: 22px; letter-spacing: -0.01em; }
p { margin: 0; }

a { color: inherit; }
:focus-visible { outline: 3px solid var(--orange); outline-offset: 3px; }

.wrap { max-width: 1200px; margin: 0 auto; padding: 0 20px; }
@media (min-width: 768px) { .wrap { padding: 0 32px; } }

.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }
.visually-hidden {
  position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.skip {
  position: absolute; left: 12px; top: -60px; z-index: 50;
  background: var(--ink); color: var(--paper); padding: 10px 16px; border-radius: var(--radius);
}
.skip:focus { top: 12px; }

.eyebrow {
  font-size: 14px;
  font-weight: 600;
  color: var(--orange-text);
  margin-bottom: 16px;
}
.section-sub { color: var(--muted); max-width: 60ch; margin-top: 14px; }

/* Buttons */
.button {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 48px; padding: 0 22px;
  background: var(--ink); color: var(--paper);
  border: 1.5px solid var(--ink); border-radius: var(--radius);
  font: 600 16px/1 var(--body); text-decoration: none; cursor: pointer;
  transition: background-color .15s, color .15s;
}
.button:hover { background: #2C2D33; }
.button-small { min-height: 40px; padding: 0 16px; font-size: 15px; }
.button-outline { background: transparent; color: var(--ink); }
.button-outline:hover { background: var(--ink); color: var(--paper); }
.button-orange { background: #E8653B; border-color: #E8653B; color: var(--ink); }
.button-orange:hover { background: #F07A52; }
.button-outline-light { background: transparent; color: var(--paper); border-color: var(--paper); }
.button-outline-light:hover { background: var(--paper); color: var(--ink); }
.text-link { font-weight: 600; text-underline-offset: 4px; }

/* Header */
.site-header {
  position: sticky; top: 0; z-index: 20;
  background: rgba(243, 238, 227, .94);
  border-bottom: 1.5px solid var(--ink);
}
@supports (backdrop-filter: blur(1px)) { .site-header { backdrop-filter: blur(6px); } }
.header-row { display: flex; align-items: center; gap: 24px; height: 64px; }
.wordmark {
  display: inline-flex; align-items: center; gap: 8px;
  font: 800 22px/1 var(--display); letter-spacing: -0.03em; text-decoration: none; margin: 0;
}
.wordmark-tag { width: 28px; height: 20px; }
.main-nav { display: none; gap: 26px; margin-left: auto; font-size: 15px; font-weight: 500; }
.main-nav a { text-decoration: none; }
.main-nav a:hover { text-decoration: underline; text-underline-offset: 5px; }
.header-cta { display: none; }
.menu-button {
  margin-left: auto; width: 44px; height: 44px; display: inline-grid; place-items: center;
  background: transparent; border: 1.5px solid var(--ink); border-radius: var(--radius); color: var(--ink); cursor: pointer;
}
.menu-button svg { width: 22px; height: 22px; }
@media (min-width: 900px) {
  .main-nav, .header-cta { display: flex; }
  .header-row > .menu-button { display: none; }
}

.mobile-menu {
  margin: 0; width: 100%; max-width: none; height: 100%; max-height: none;
  border: 0; padding: 0 20px 32px; background: var(--paper); color: var(--ink);
}
.mobile-menu::backdrop { background: rgba(23, 24, 28, .4); }
.mobile-menu-top { display: flex; align-items: center; height: 64px; border-bottom: 1.5px solid var(--ink); }
.mobile-menu nav { display: grid; gap: 4px; padding-top: 16px; }
.mobile-menu nav a:not(.button) {
  font: 700 28px/1.2 var(--display); text-decoration: none; padding: 12px 0; border-bottom: 1px solid var(--rule);
}
.mobile-menu nav .button { margin-top: 24px; }

/* Hero */
.hero { padding: 48px 0 72px; }
.hero-grid { display: grid; gap: 48px; }
.hero h1 { font-size: clamp(40px, 9vw, 72px); font-weight: 800; letter-spacing: -0.035em; max-width: 13ch; }
.lede { margin-top: 22px; font-size: 18px; max-width: 54ch; color: #33322D; }
.hero-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 14px 24px; margin-top: 28px; }
.hero-note { margin-top: 18px; font-size: 14px; color: var(--muted); }
@media (min-width: 1024px) {
  .hero { padding: 72px 0 112px; }
  .hero-grid { grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); align-items: center; gap: 56px; }
  .lede { font-size: 19px; }
}

/* Mini app: ticket board */
.app-frame {
  background: var(--card);
  border: 1.5px solid var(--ink);
  border-radius: 10px;
  box-shadow: 6px 6px 0 var(--ink);
  overflow: hidden;
}
.app-bar {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 10px 14px; border-bottom: 1.5px solid var(--ink); background: var(--paper);
}
.app-title { font-weight: 600; font-size: 14px; }
.app-reset {
  font: 500 14px/1 var(--body); color: var(--ink); background: transparent; cursor: pointer;
  border: 1px solid #8B867A; border-radius: 4px; padding: 8px 10px;
}
.app-reset:hover { border-color: var(--ink); }
.board { display: grid; gap: 1px; background: var(--rule); }
@media (min-width: 640px) { .board { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.lane { background: var(--card); padding: 12px; min-height: 120px; }
.lane-title {
  display: flex; align-items: center; justify-content: space-between;
  font: 600 14px/1.2 var(--body); margin-bottom: 10px;
}
.lane-count {
  min-width: 26px; padding: 3px 7px; border-radius: 99px; text-align: center;
  font-size: 14px; font-variant-numeric: tabular-nums; background: var(--paper); border: 1px solid var(--rule);
}
.lane-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }

.ticket {
  position: relative;
  display: grid; gap: 2px;
  padding: 10px 12px 12px 26px;
  border: 1.5px solid var(--ink); border-radius: 4px;
  background: var(--lane-in);
}
/* Punched hole and perforation, like a paper repair tag */
.ticket::before {
  content: ""; position: absolute; left: 8px; top: 14px;
  width: 9px; height: 9px; border-radius: 50%; background: var(--card); border: 1.5px solid var(--ink);
}
.ticket::after {
  content: ""; position: absolute; left: 21px; top: 6px; bottom: 6px;
  border-left: 1.5px dashed rgba(23, 24, 28, .35);
}
[data-lane="bench"] .ticket { background: var(--lane-bench); }
[data-lane="ready"] .ticket { background: var(--lane-ready); }
.ticket:focus-visible { outline-offset: 2px; }
.ticket-no { font: 700 14px/1.2 var(--display); font-variant-numeric: tabular-nums; }
.ticket-item { font-weight: 600; font-size: 15px; }
.ticket-fault, .ticket-meta { font-size: 14px; color: #3D3B35; line-height: 1.35; }
.ticket-action {
  justify-self: start; margin-top: 8px; min-height: 36px; padding: 0 12px;
  font: 600 14px/1 var(--body); color: var(--paper); background: var(--ink);
  border: 0; border-radius: 4px; cursor: pointer;
}
.ticket-action:hover { background: #2C2D33; }
.ticket-sent { margin-top: 6px; font-size: 14px; font-weight: 600; color: #24512A; }
.ticket.just-moved { animation: drop .35s ease-out; }
@keyframes drop { from { transform: translateY(-8px); opacity: .4; } to { transform: none; opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .ticket.just-moved { animation: none; } }

.sms { border-top: 1.5px solid var(--ink); padding: 14px; background: var(--paper); min-height: 76px; }
.sms-empty { font-size: 14px; color: var(--muted); }
.sms-label { font-size: 14px; color: var(--muted); margin-bottom: 6px; }
.sms-bubble {
  display: inline-block; max-width: 46ch; padding: 10px 14px; font-size: 15px; line-height: 1.4;
  background: var(--ink); color: var(--paper); border-radius: 14px 14px 14px 4px;
}
.board-hint { margin-top: 18px; font-size: 14px; color: var(--muted); }

/* Feature tour */
.tour { padding: 80px 0; border-top: 1.5px solid var(--ink); background: var(--card); }
@media (min-width: 1024px) { .tour { padding: 120px 0; } }
.tabs {
  display: flex; gap: 0; margin-top: 36px; overflow-x: auto;
  border-bottom: 1.5px solid var(--ink); scrollbar-width: none;
}
.tab {
  flex: 0 0 auto; min-height: 48px; padding: 0 14px;
  font: 600 16px/1 var(--body); color: var(--muted); background: transparent; cursor: pointer;
  border: 0; border-bottom: 4px solid transparent; margin-bottom: -1.5px;
}
.tab:hover { color: var(--ink); }
.tab[aria-selected="true"] { color: var(--ink); border-bottom-color: var(--orange); }
.tab:focus-visible { outline-offset: -3px; }
.panel { display: grid; gap: 36px; padding-top: 40px; }
.panel[hidden] { display: none; }
.panel:focus-visible { outline-offset: 8px; }
.panel-copy p { margin-top: 14px; max-width: 58ch; }
@media (min-width: 900px) {
  .panel { grid-template-columns: minmax(0, 6fr) minmax(0, 5fr); gap: 64px; align-items: center; }
  .panel-copy h3 { font-size: 30px; }
}

.ticks { list-style: none; padding: 0; margin: 22px 0 0; display: grid; gap: 10px; }
.ticks li { position: relative; padding-left: 26px; }
.ticks li::before {
  content: ""; position: absolute; left: 2px; top: .5em; width: 12px; height: 7px;
  border-left: 2px solid var(--orange); border-bottom: 2px solid var(--orange); transform: rotate(-45deg);
}

.panel-visual { display: flex; justify-content: center; }
.paper-tag, .thread, .invoice, .parts {
  width: 100%; max-width: 400px; border: 1.5px solid var(--ink); border-radius: 6px;
  background: var(--paper); box-shadow: 5px 5px 0 var(--ink);
}
.paper-tag {
  position: relative; display: grid; gap: 8px; padding: 22px 22px 22px 58px;
  clip-path: polygon(30px 0, 100% 0, 100% 100%, 30px 100%, 0 50%);
  box-shadow: none; border: 0; background: var(--lane-bench);
}
.paper-tag::before {
  content: ""; position: absolute; left: 28px; top: calc(50% - 8px);
  width: 16px; height: 16px; border-radius: 50%; background: var(--card); border: 1.5px solid var(--ink);
}
.paper-tag-no { font: 800 34px/1 var(--display); font-variant-numeric: tabular-nums; }
.paper-tag-line { font-size: 15px; border-top: 1px dashed rgba(23, 24, 28, .4); padding-top: 8px; }
.paper-tag-line b { display: inline-block; width: 52px; font-weight: 600; }
.thread { display: grid; gap: 10px; padding: 18px; }
.bubble { max-width: 85%; padding: 10px 14px; font-size: 15px; line-height: 1.4; border-radius: 14px; }
.bubble.out { background: var(--ink); color: var(--paper); border-bottom-left-radius: 4px; }
.bubble.in { justify-self: end; background: var(--lane-ready); border: 1px solid var(--rule); border-bottom-right-radius: 4px; }
.invoice, .parts { padding: 8px 18px; }
.invoice p, .parts-row {
  display: flex; justify-content: space-between; gap: 16px;
  padding: 10px 0; font-size: 15px; border-bottom: 1px solid var(--rule); font-variant-numeric: tabular-nums;
}
.invoice-head, .parts-head { font-weight: 600; }
.invoice-total { font-weight: 600; font-size: 17px !important; border-bottom: 0 !important; border-top: 1.5px solid var(--ink); }
.parts-row:last-child { border-bottom: 0; }
.parts-row.low span:last-child { color: var(--orange-text); font-weight: 600; }

/* Integrations strip */
.integrations { padding: 40px 0; border-top: 1.5px solid var(--ink); border-bottom: 1.5px solid var(--ink); }
.strip-title { font-size: 20px; letter-spacing: -0.01em; }
.integration-list {
  list-style: none; margin: 20px 0 0; padding: 0;
  display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
}
.integration-list li {
  display: flex; align-items: center; gap: 12px; padding: 12px 0; font-size: 15px; font-weight: 500;
  border-top: 1px solid var(--rule);
}
.integration-list svg { width: 24px; height: 24px; flex: none; color: var(--orange-text); }
@media (min-width: 1024px) {
  .integrations .wrap { display: grid; grid-template-columns: 3fr 9fr; gap: 40px; align-items: start; }
  .integration-list { margin: 0; grid-template-columns: repeat(3, 1fr); column-gap: 32px; }
  .integration-list li:nth-child(-n+3) { border-top: 0; padding-top: 0; }
}

/* Case study */
.case { padding: 88px 0; }
.case-grid { display: grid; gap: 40px; }
.case h2 { max-width: 20ch; }
.case blockquote { margin: 32px 0 0; padding-left: 20px; border-left: 4px solid var(--orange); }
.case blockquote p { font: 600 clamp(21px, 2.6vw, 27px)/1.35 var(--display); letter-spacing: -0.01em; max-width: 40ch; }
.case blockquote footer { margin-top: 16px; font-size: 15px; color: var(--muted); }
.case-figures { margin: 0; display: grid; gap: 0; border-top: 1.5px solid var(--ink); }
.case-figures div { padding: 18px 0; border-bottom: 1px solid var(--rule); }
.case-figures dt { font-size: 15px; color: var(--muted); }
.case-figures dd { margin: 4px 0 0; font: 800 clamp(30px, 4vw, 40px)/1.1 var(--display); font-variant-numeric: tabular-nums; }
.case-note { font-size: 14px; color: var(--muted); }
@media (min-width: 1024px) {
  .case { padding: 128px 0; }
  .case-grid { grid-template-columns: 7fr 5fr; column-gap: 80px; align-items: end; }
  .case-note { grid-column: 1 / -1; }
}

/* Pricing */
.pricing { padding: 88px 0; background: var(--card); border-top: 1.5px solid var(--ink); }
@media (min-width: 1024px) { .pricing { padding: 120px 0; } }
.pricing-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: end; gap: 24px; }
.billing-toggle {
  display: inline-flex; margin: 0; padding: 4px; border: 1.5px solid var(--ink); border-radius: 99px; background: var(--paper);
}
.billing-toggle input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.billing-toggle label {
  display: inline-flex; align-items: center; gap: 8px; min-height: 42px; padding: 0 18px;
  border-radius: 99px; font-weight: 600; font-size: 15px; cursor: pointer;
}
.billing-toggle input:checked + label { background: var(--ink); color: var(--paper); }
.billing-toggle input:focus-visible + label { outline: 3px solid var(--orange); outline-offset: 2px; }
.save { font-size: 14px; font-weight: 600; color: var(--orange-text); }
.billing-toggle input:checked + label .save { color: #FFB394; }

.tiers { display: grid; gap: 20px; margin-top: 40px; }
@media (min-width: 900px) { .tiers { grid-template-columns: repeat(3, minmax(0, 1fr)); align-items: stretch; } }
.tier {
  position: relative; display: flex; flex-direction: column;
  padding: 28px 24px 24px; background: var(--paper); border: 1.5px solid var(--ink); border-radius: 8px;
}
.tier::before {
  content: ""; position: absolute; top: 14px; right: 16px;
  width: 12px; height: 12px; border-radius: 50%; background: var(--card); border: 1.5px solid var(--ink);
}
.tier-featured { background: var(--lane-bench); box-shadow: 6px 6px 0 var(--ink); }
.tier-flag { font-size: 14px; font-weight: 600; margin-bottom: 8px; }
.tier h3 { font-size: 26px; }
.tier-for { margin-top: 6px; color: var(--muted); font-size: 15px; }
.tier-featured .tier-for { color: #3D3B35; }
.price { display: flex; align-items: baseline; gap: 8px; margin-top: 22px; }
.price-amount { font: 800 52px/1 var(--display); letter-spacing: -0.03em; font-variant-numeric: tabular-nums; }
.price-unit { font-size: 15px; color: var(--muted); }
.tier-featured .price-unit { color: #3D3B35; }
.price-note { margin-top: 6px; font-size: 14px; color: var(--muted); min-height: 1.5em; }
.tier-featured .price-note { color: #3D3B35; }
.tier .ticks { margin-bottom: 28px; font-size: 15px; }
.tier .button { margin-top: auto; }

.compare-title { margin-top: 72px; font-size: 26px; }
.table-scroll { position: relative; margin-top: 20px; overflow-x: auto; border: 1.5px solid var(--ink); border-radius: 8px; background: var(--paper); }
.compare { width: 100%; min-width: 560px; border-collapse: collapse; font-size: 15px; }
.compare th, .compare td { padding: 12px 16px; text-align: left; border-bottom: 1px solid var(--rule); }
.compare thead th { font-weight: 600; border-bottom: 1.5px solid var(--ink); background: var(--card); }
.compare tbody th { font-weight: 500; }
.compare tbody tr:last-child > * { border-bottom: 0; }
.compare td { font-variant-numeric: tabular-nums; }
.compare svg { width: 20px; height: 20px; vertical-align: middle; }
.compare .yes { color: #24512A; }
.compare .no { color: #8B867A; }

/* FAQ */
.faq { padding: 88px 0; border-top: 1.5px solid var(--ink); }
.faq-grid { display: grid; gap: 32px; }
@media (min-width: 1024px) { .faq-grid { grid-template-columns: 4fr 8fr; gap: 64px; } }
.faq-list { border-top: 1.5px solid var(--ink); }
.faq details { border-bottom: 1px solid var(--rule); }
.faq summary {
  display: flex; justify-content: space-between; align-items: center; gap: 16px;
  padding: 18px 0; font-weight: 600; cursor: pointer; list-style: none;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: ""; flex: none; width: 12px; height: 12px;
  border-right: 2px solid var(--ink); border-bottom: 2px solid var(--ink); transform: rotate(45deg) translateY(-3px);
}
.faq details[open] summary::after { transform: rotate(225deg) translateY(-3px); }
.faq details p { padding: 0 0 20px; max-width: 64ch; color: #33322D; }

/* Changelog */
.changelog { padding: 88px 0; background: var(--card); border-top: 1.5px solid var(--ink); }
.log { list-style: none; margin: 36px 0 0; padding: 0; border-top: 1.5px solid var(--ink); }
.log li { display: grid; gap: 6px; padding: 20px 0; border-bottom: 1px solid var(--rule); }
.log time { font-size: 14px; font-weight: 600; color: var(--orange-text); font-variant-numeric: tabular-nums; }
.log h3 { font-size: 20px; }
.log p { margin-top: 6px; color: #33322D; max-width: 64ch; }
@media (min-width: 768px) { .log li { grid-template-columns: 160px 1fr; gap: 24px; } .log time { padding-top: 3px; } }

/* Waitlist */
.waitlist { padding: 88px 0 96px; background: var(--ink); color: var(--paper); }
.waitlist-grid { display: grid; gap: 36px; }
@media (min-width: 1024px) { .waitlist { padding: 120px 0; } .waitlist-grid { grid-template-columns: 5fr 6fr; gap: 80px; } }
.waitlist h2 { max-width: 14ch; }
.waitlist-sub { margin-top: 16px; color: #D9D3C6; max-width: 46ch; }
.waitlist-form { display: grid; gap: 18px; }
@media (min-width: 640px) { .waitlist-form { grid-template-columns: 1fr 1fr; } .waitlist-form .button { grid-column: 1 / -1; justify-self: start; } }
.field label { display: block; font-weight: 600; font-size: 15px; margin-bottom: 6px; }
.field input, .field select {
  width: 100%; min-height: 48px; padding: 0 14px;
  font: 400 16px/1 var(--body); color: var(--ink); background: var(--paper);
  border: 1.5px solid var(--paper); border-radius: var(--radius);
}
.field select { appearance: none; background-image: linear-gradient(45deg, transparent 50%, var(--ink) 50%), linear-gradient(135deg, var(--ink) 50%, transparent 50%);
  background-position: calc(100% - 20px) 21px, calc(100% - 14px) 21px; background-size: 6px 6px; background-repeat: no-repeat; padding-right: 36px; }
.field input:focus-visible, .field select:focus-visible { outline: 3px solid var(--orange); outline-offset: 2px; }
.field [aria-invalid="true"] { border-color: #FF8A63; box-shadow: 0 0 0 2px #FF8A63; }
.error { min-height: 1.4em; margin-top: 6px; font-size: 14px; color: #FFB394; }
.error:empty { min-height: 0; margin: 0; }

.confirmation { padding: 28px; border: 1.5px solid var(--paper); border-radius: 8px; }
.confirmation-icon { width: 40px; height: 40px; padding: 8px; border-radius: 50%; background: var(--orange); color: var(--ink); }
.confirmation h3 { margin-top: 16px; font-size: 28px; }
.confirmation h3:focus { outline: none; }
.confirmation h3:focus-visible { outline: 3px solid var(--orange); outline-offset: 4px; }
.confirmation p { margin-top: 10px; color: #D9D3C6; }
.confirmation .demo-note { font-size: 14px; }
.confirmation .button { margin-top: 22px; }

/* Footer */
.site-footer { padding: 48px 0 28px; border-top: 1.5px solid var(--ink); }
.footer-grid { display: grid; gap: 24px; font-size: 15px; color: var(--muted); }
.footer-grid .wordmark { color: var(--ink); margin-bottom: 8px; }
.footer-grid p + p { margin-top: 8px; }
.footer-grid a { color: var(--ink); font-weight: 600; text-underline-offset: 4px; }
@media (min-width: 768px) { .footer-grid { grid-template-columns: 1fr 1fr; gap: 48px; } }
.copyright { margin-top: 32px; font-size: 14px; color: var(--muted); }
