/* Layout and components for the web console. Semantic variables from theme.css only. See web/DESIGN.md. */
*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  color-scheme: light dark;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--c-paper);
  color: var(--c-ink);
  font: 17px/1.4 var(--font-ui);
}

h1,
h2,
p,
ul,
dl,
dd {
  margin: 0;
}

[hidden] {
  display: none !important;
}

a {
  color: var(--c-mark);
  font-weight: 600;
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

:focus-visible {
  outline: 2px solid var(--c-mark);
  outline-offset: 3px;
}

/* ---------- shell ---------- */
.shell {
  min-height: 100vh;
  min-height: 100dvh;
}

.main {
  min-width: 0;
}

.top {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  min-height: 56px;
  padding: var(--space-sm) var(--space-lg);
  background: var(--c-paper);
  border-bottom: 1px solid var(--c-separator);
  position: sticky;
  top: 0;
  z-index: 20;
}

.brand {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  color: var(--c-ink);
  min-height: 44px;
}

.brand:hover {
  text-decoration: none;
}

.brand span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-family: var(--font-address);
  font-size: 20px;
  font-weight: 600;
  letter-spacing: -0.02em;
}

.menu {
  display: none;
  width: 44px;
  min-height: 44px;
  padding: 0;
  background: transparent;
  border: 1px solid var(--c-border);
}

.menu span,
.menu span::before,
.menu span::after {
  display: block;
  width: 18px;
  height: 2px;
  margin: 0 auto;
  background: var(--c-ink);
  content: "";
  position: relative;
}

.menu span::before {
  position: absolute;
  top: -6px;
  left: 0;
}

.menu span::after {
  position: absolute;
  top: 6px;
  left: 0;
}

.shell[data-auth="in"] .menu {
  display: block;
}

.rail {
  position: fixed;
  inset: 0 auto 0 0;
  z-index: 40;
  width: min(300px, 86vw);
  display: none;
  flex-direction: column;
  gap: var(--space-lg);
  padding: var(--space-xl) var(--space-lg);
  background: var(--c-card-background);
  border-right: 1px solid var(--c-card-border);
  overflow-y: auto;
}

.shell.nav-open .rail {
  display: flex;
}

.scrim {
  display: none;
}

.shell.nav-open .scrim {
  display: block;
  position: fixed;
  inset: 0;
  z-index: 30;
  background: color-mix(in srgb, var(--c-ink) 45%, transparent);
}

.rail-firm {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  font-family: var(--font-address);
  font-size: 20px;
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.15;
}

.rail-mark {
  flex: none;
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 12px;
  background: var(--c-mark);
  color: var(--c-on-brand);
  font-size: 20px;
}

.rail nav {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.rail nav a,
.rail-foot a {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  min-height: 44px;
  padding: 0 var(--space-md);
  color: var(--c-text-secondary);
  border-radius: var(--radius-control);
}

.rail nav a:hover,
.rail-foot a:hover {
  color: var(--c-ink);
  background: var(--c-field-fill);
  text-decoration: none;
}

.rail nav a[aria-current="page"] {
  color: var(--c-mark);
  background: color-mix(in srgb, var(--c-mark) 12%, transparent);
}

.rail-foot {
  margin-top: auto;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.rail-foot .muted {
  padding: 0 var(--space-md);
}

.rail-foot button {
  align-self: flex-start;
  padding: 0 var(--space-md);
}

#app {
  width: 100%;
  margin: 0 auto;
  padding: var(--space-xl) var(--space-lg) 64px;
  max-width: 1120px;
}

#app > * {
  max-width: 720px;
  margin-left: auto;
  margin-right: auto;
}

#app > .wide {
  max-width: none;
}

#app > * + * {
  margin-top: var(--space-lg);
}

@media (min-width: 700px) {
  #app {
    padding: var(--space-xxl) var(--space-xxl) 80px;
  }
}

@media (min-width: 900px) {
  .shell[data-auth="in"] {
    display: grid;
    grid-template-columns: 248px minmax(0, 1fr);
  }

  .shell[data-auth="in"] .rail {
    display: flex;
    position: sticky;
    top: 0;
    height: 100vh;
    width: auto;
    z-index: 10;
  }

  .shell[data-auth="in"] .menu,
  .shell[data-auth="in"] .brand span {
    display: none;
  }

  .shell[data-auth="in"] .top {
    display: none;
  }

  .shell.nav-open .scrim {
    display: none;
  }
}

/* ---------- type ---------- */
.page-title {
  font-family: var(--font-address);
  font-size: 28px;
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.1;
}

.firm-name,
.sign-in h1,
#create_firm h1,
#firm_owner_only h1,
#firm_picker h1 {
  font-family: var(--font-address);
  font-size: 40px;
  font-weight: 600;
  letter-spacing: -0.03em;
  line-height: 1.05;
}

h2 {
  font-family: var(--font-address);
  font-size: 22px;
  font-weight: 600;
  letter-spacing: -0.01em;
}

.address {
  font-family: var(--font-address);
  font-size: 22px;
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.15;
  color: var(--c-ink);
}

.lede {
  color: var(--c-text-secondary);
  max-width: 60ch;
}

.muted {
  color: var(--c-text-secondary);
  font-size: 15px;
}

.cite {
  color: var(--c-text-secondary);
  font-size: 13px;
}

.fact {
  font-family: var(--font-address);
  font-size: 20px;
}

.crumb {
  font-size: 15px;
}

.job-head {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.job-head .address {
  font-size: 28px;
}

/* ---------- stacks ---------- */
.stack {
  display: flex;
  flex-direction: column;
  gap: var(--space-lg);
}

.block {
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
  padding: var(--space-xl);
  border: 1px solid var(--c-card-border);
  border-radius: var(--radius-card);
  background: var(--c-card-background);
  box-shadow: var(--shadow-card);
}

.row {
  display: flex;
  gap: var(--space-md);
  align-items: flex-end;
}

.row > * {
  flex: 1 1 0;
  min-width: 0;
}

.row.wrap {
  flex-wrap: wrap;
}

.foot {
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
  padding-top: var(--space-lg);
}

/* ---------- fields ---------- */
fieldset {
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
  margin: 0;
  padding: var(--space-sm) 0 0;
  min-width: 0;
  border: 0;
}

legend {
  padding: 0;
  font-family: var(--font-address);
  font-size: 22px;
  font-weight: 600;
  margin-bottom: var(--space-sm);
}

label {
  display: flex;
  flex-direction: column;
  gap: 4px;
  color: var(--c-text-secondary);
  font-size: 15px;
}

input,
select,
textarea {
  width: 100%;
  min-height: var(--control-height);
  padding: 8px 14px;
  border: 1px solid var(--c-border);
  border-bottom: 2px solid var(--c-input-border);
  border-radius: var(--radius-control);
  background: var(--c-field-fill);
  color: var(--c-ink);
  font: 19px/1.3 var(--font-address);
}

select {
  appearance: none;
  padding-right: 36px;
  background-image: linear-gradient(45deg, transparent 50%, currentColor 50%), linear-gradient(135deg, currentColor 50%, transparent 50%);
  background-position: calc(100% - 19px) 55%, calc(100% - 14px) 55%;
  background-size: 5px 5px;
  background-repeat: no-repeat;
}

input:focus,
select:focus,
textarea:focus {
  border-color: var(--c-mark);
  outline: 2px solid var(--c-mark);
  outline-offset: 1px;
}

input:disabled,
select:disabled {
  opacity: 0.6;
}

input[type="file"] {
  font: 15px var(--font-ui);
  min-height: 44px;
  padding: 10px 0;
}

input[type="checkbox"],
input[type="radio"] {
  width: 24px;
  min-height: 24px;
  padding: 0;
  accent-color: var(--c-mark);
  flex: none;
}

input[type="color"] {
  width: 64px;
  padding: 4px;
}

label:has(> input[type="checkbox"]),
label:has(> input[type="radio"]) {
  flex-direction: row;
  align-items: center;
  gap: var(--space-md);
  min-height: 44px;
  color: var(--c-ink);
  font-size: 17px;
}

label.inline {
  flex-direction: row;
  align-items: center;
  gap: var(--space-sm);
}

label.inline select,
label.inline input {
  min-height: 44px;
  font-size: 17px;
}

.room-row {
  display: grid;
  grid-template-columns: 1fr 96px;
  gap: var(--space-md);
}

/* ---------- buttons ---------- */
button,
.primary-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-sm);
  min-height: var(--control-height);
  padding: 0 var(--space-xl);
  border: 1px solid var(--c-mark);
  border-radius: var(--radius-control);
  background: var(--c-mark);
  color: var(--c-on-brand);
  font: 600 17px/1 var(--font-ui);
  text-align: center;
  text-decoration: none;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

.primary-link:hover {
  text-decoration: none;
}

button:active,
.primary-link:active {
  opacity: 0.8;
}

button:disabled,
button[disabled] {
  opacity: 0.45;
  cursor: not-allowed;
}

button.secondary {
  background: transparent;
  color: var(--c-mark);
}

button.quiet,
button.link {
  min-height: 44px;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--c-mark);
}

button.link {
  justify-content: flex-start;
  font-size: 15px;
}

button.danger,
button.link.danger {
  color: var(--c-danger);
}

button.positive {
  background: var(--c-danger);
  border-color: var(--c-danger);
  color: var(--c-on-brand);
}

button.negative {
  background: var(--c-success);
  border-color: var(--c-success);
  color: var(--c-on-brand);
}

.results {
  align-items: stretch;
}

.row-link {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
}

/* ---------- notices ---------- */
.notice {
  padding: var(--space-md) var(--space-lg);
  border-left: 3px solid var(--c-mark);
  background: color-mix(in srgb, var(--c-mark) 8%, transparent);
  color: var(--c-ink);
  animation: settle 150ms ease-out;
}

.notice-error {
  border-left-color: var(--c-danger);
  background: var(--c-danger-tint);
}

.notice-warn {
  display: block;
  border-left-color: var(--c-warning);
  background: var(--c-warning-tint);
}

.notice-ok {
  border-left-color: var(--c-success);
  background: var(--c-success-tint);
}

@keyframes settle {
  from {
    opacity: 0;
  }
}

.loading {
  color: var(--c-text-secondary);
  padding: var(--space-xxl) 0;
}

.loading::after {
  content: "";
  display: block;
  height: 3px;
  width: 96px;
  margin-top: var(--space-md);
  background: linear-gradient(90deg, var(--c-mark), transparent);
  animation: sweep 1.1s ease-in-out infinite alternate;
}

@keyframes sweep {
  from {
    transform: scaleX(0.2);
    transform-origin: left;
  }
  to {
    transform: scaleX(1);
    transform-origin: left;
  }
}

.empty {
  padding: var(--space-xl) 0;
  color: var(--c-text-secondary);
  font-family: var(--font-address);
  font-size: 20px;
}

.practice {
  padding: var(--space-md) var(--space-lg);
  border-left: 3px solid var(--c-warning);
  background: var(--c-warning-tint);
  font-weight: 600;
}

.card {
  padding: var(--space-lg) var(--space-lg) var(--space-lg) 17px;
  border: 1px solid var(--c-card-border);
  border-left: 4px solid var(--c-mark);
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-card);
  background: var(--c-card-background);
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
}

.upgrade {
  border-left-color: var(--c-danger);
  background: var(--c-danger-tint);
}

.upgrade button {
  align-self: flex-start;
}

.guide-card dl {
  display: grid;
  gap: 2px;
}

.guide-card dt {
  color: var(--c-text-secondary);
  font-size: 13px;
  margin-top: var(--space-sm);
}

.claim {
  padding-top: var(--space-sm);
  border-top: 1px solid var(--c-separator);
  font-style: italic;
}

/* ---------- rows ---------- */
.rows {
  display: flex;
  flex-direction: column;
  padding: 0;
  list-style: none;
}

.rows > li {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-md);
  min-height: 64px;
  padding: var(--space-md) 0 var(--space-md) 14px;
  border-bottom: 1px solid var(--c-separator);
  box-shadow: inset 3px 0 0 var(--c-mark);
}

.rows > li.pin-lead {
  box-shadow: inset 3px 0 0 var(--c-danger);
}

.rows > li.pin-clear {
  box-shadow: inset 3px 0 0 var(--c-success);
}

.rows > li.pin-unfinished,
.rows > li.pin-none {
  box-shadow: inset 3px 0 0 var(--c-border);
}

.row-main {
  display: flex;
  flex-direction: column;
  gap: 2px;
  flex: 1;
  min-width: 0;
  color: var(--c-ink);
  text-align: left;
}

.row-main:hover {
  text-decoration: none;
}

button.row-button,
.row-button {
  min-height: 44px;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--c-ink);
  align-items: flex-start;
  justify-content: flex-start;
  font-weight: 400;
}

.miss {
  flex-wrap: wrap;
}

.status,
.chip {
  flex: none;
  padding: 3px 10px;
  line-height: 1.3;
  border: 1px solid var(--c-border);
  border-radius: 999px;
  font-size: 13px;
  font-weight: 600;
  color: var(--c-text-secondary);
  white-space: nowrap;
}

.status-complete,
.chip-clear {
  color: var(--c-success);
  border-color: var(--c-success);
  background: var(--c-success-tint);
}

.chip-lead {
  color: var(--c-danger);
  border-color: var(--c-danger);
  background: var(--c-danger-tint);
}

.chip-warn {
  color: var(--c-warning);
  border-color: var(--c-warning);
  background: var(--c-warning-tint);
}

.chip-unfinished,
.chip-none {
  background: transparent;
}

.chip-button {
  min-height: 44px;
  padding: 0 var(--space-lg);
  border: 1px solid var(--c-border);
  border-radius: 999px;
  background: transparent;
  color: var(--c-ink);
  font-size: 15px;
  font-weight: 600;
}

.chip-button[aria-pressed="true"] {
  background: var(--c-mark);
  border-color: var(--c-mark);
  color: var(--c-on-brand);
}

.chips {
  display: flex;
  gap: var(--space-sm);
  flex-wrap: wrap;
}

.check-row.is-done span:first-child {
  color: var(--c-text-secondary);
}

.file-act {
  flex-direction: row;
  align-items: center;
  min-height: 44px;
  padding: 0 var(--space-lg);
  border: 1px solid var(--c-mark);
  border-radius: var(--radius-control);
  color: var(--c-mark);
  font-weight: 600;
  position: relative;
  cursor: pointer;
  width: auto;
}

.file-act input {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
  width: 100%;
  min-height: 44px;
}

.file-act:focus-within {
  outline: 2px solid var(--c-mark);
  outline-offset: 3px;
}

/* ---------- grid ---------- */
.faces {
  display: flex;
  flex-direction: column;
  padding: 0;
  list-style: none;
}

.face {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 2px var(--space-md);
  padding: var(--space-md) 0;
  border-top: 1px solid var(--c-separator);
  align-items: center;
}

.face-name {
  font-weight: 600;
}

.face-state {
  color: var(--c-text-secondary);
  text-align: right;
}

.face-positive .face-state,
.face-presumed .face-state {
  color: var(--c-danger);
  font-weight: 600;
}

.face-negative .face-state {
  color: var(--c-success);
  font-weight: 600;
}

.acts {
  grid-column: 1 / -1;
  display: flex;
  gap: var(--space-lg);
  flex-wrap: wrap;
}

.acts:empty {
  display: none;
}

.act {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 var(--space-lg);
  border: 1px solid var(--c-mark);
  border-radius: var(--radius-control);
}

.component .row {
  align-items: center;
}

#capture_preview {
  display: block;
  width: 100%;
  max-height: 320px;
  object-fit: contain;
  background: var(--c-field-fill);
}

.sig canvas {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 10 / 3;
  border: 1px dashed var(--c-input-border);
  background: var(--c-card-background);
  touch-action: none;
}

.sig {
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
}

.dev {
  border: 1px dashed var(--c-warning);
  padding: var(--space-md);
}

/* ---------- sign-in ---------- */
.sign-in {
  display: flex;
  flex-direction: column;
  gap: var(--space-lg);
  max-width: 360px;
  margin: var(--space-xl) auto 0;
}

.stack .stack,
.sign-in .stack {
  gap: var(--space-md);
}

.legend {
  display: flex;
  gap: var(--space-lg);
  flex-wrap: wrap;
  padding: 0;
  list-style: none;
  font-size: 15px;
}

.legend li {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
}

/* ---------- map ---------- */
.map-wrap {
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
  position: relative;
}

.map-tools {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-md);
  align-items: center;
  justify-content: space-between;
}

.segment {
  display: inline-flex;
  border: 1px solid var(--c-mark);
  border-radius: var(--radius-control);
  overflow: hidden;
}

.segment button {
  border: 0;
  border-radius: 0;
  min-height: 44px;
  background: transparent;
  color: var(--c-mark);
}

.segment button[aria-pressed="true"] {
  background: var(--c-mark);
  color: var(--c-on-brand);
}

.map-body {
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
}

.map-canvas {
  width: 100%;
  height: 56vh;
  min-height: 320px;
  background: var(--c-field-fill);
  border: 1px solid var(--c-card-border);
  position: relative;
}

.map-pane {
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
  position: relative;
}

.where {
  align-self: flex-start;
  min-height: 44px;
  background: transparent;
  color: var(--c-mark);
}

.seg-map .map-list,
.seg-list .map-pane {
  display: none;
}

.dot {
  display: inline-block;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  border: 2px solid var(--c-card-background);
  vertical-align: middle;
}

.dot-lead {
  background: var(--c-danger);
}

.dot-clear {
  background: var(--c-success);
}

.dot-unfinished {
  background: transparent;
  border: 2px solid var(--c-text-secondary);
}

.dot-hit {
  display: grid;
  place-items: center;
  width: 44px;
  min-height: 44px;
  padding: 0;
  border: 0;
  background: transparent;
}

.cluster {
  position: relative;
  width: 36px;
  min-height: 36px;
  padding: 0;
  border: 1px solid var(--c-card-border);
  border-radius: 50%;
  background: var(--c-card-background);
  color: var(--c-ink);
  font-size: 17px;
}

.badge {
  position: absolute;
  top: -2px;
  right: -2px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
}

.badge-lead {
  background: var(--c-danger);
}

.badge-clear {
  background: var(--c-success);
}

.sheet {
  position: fixed;
  inset: 0;
  z-index: 60;
  display: flex;
  align-items: flex-end;
  background: color-mix(in srgb, var(--c-ink) 40%, transparent);
  animation: settle 150ms ease-out;
}

.sheet-card {
  width: 100%;
  max-height: 86vh;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
  padding: var(--space-xl) var(--space-lg) var(--space-xxl);
  border-radius: 16px 16px 0 0;
  background: var(--c-card-background);
  border-top: 3px solid var(--c-mark);
}

.sheet-address {
  font-size: 28px;
}

.sheet-close {
  align-self: flex-end;
}

.sheet-inline {
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
}

.lines {
  padding-left: var(--space-lg);
}

@media (min-width: 900px) {
  .map-wrap {
    display: grid;
    grid-template-columns: minmax(300px, 380px) minmax(0, 1fr);
    grid-template-rows: auto auto;
    gap: var(--space-md) var(--space-xl);
  }

  .map-tools,
  #banner_truncated,
  #banner_location,
  #map_failed {
    grid-column: 1 / -1;
  }

  .map-body {
    grid-column: 1 / -1;
    display: grid;
    grid-template-columns: minmax(300px, 380px) minmax(0, 1fr);
    gap: var(--space-xl);
    align-items: start;
  }

  .seg-map .map-list,
  .seg-list .map-pane {
    display: block;
  }

  .segment {
    display: none;
  }

  .map-canvas {
    height: calc(100vh - 220px);
  }

  .sheet {
    inset: 0 0 0 auto;
    width: 392px;
    background: transparent;
    align-items: stretch;
    pointer-events: none;
  }

  .sheet-card {
    pointer-events: auto;
    max-height: none;
    border-radius: 0;
    border-top: 0;
    border-left: 3px solid var(--c-mark);
    box-shadow: none;
    padding-top: var(--space-xxl);
  }
}

/* ---------- firm home, wide ---------- */
.aside {
  display: none;
}

@media (min-width: 900px) {
  #firm_home.split {
    display: grid;
    grid-template-columns: minmax(320px, 420px) minmax(0, 1fr);
    column-gap: var(--space-xxl);
    align-items: start;
  }

  #firm_home.split > .head,
  #firm_home.split > .notice,
  #firm_home.split > p {
    grid-column: 1 / -1;
  }

  .aside {
    display: flex;
    flex-direction: column;
    gap: var(--space-lg);
    position: sticky;
    top: var(--space-xxl);
  }
}

.counts {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-md);
  padding: 0;
  list-style: none;
}

.counts li {
  display: flex;
  flex-direction: column;
  padding: var(--space-md) 0 0;
  border-top: 3px solid var(--c-mark);
}

.counts strong {
  font-family: var(--font-address);
  font-size: 40px;
  line-height: 1;
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
  }
}

/* ---------- refinements after the first screenshot pass ---------- */
.primary-link.outline {
  background: transparent;
  color: var(--c-mark);
}

@media (max-width: 899px) {
  .firm-name {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip-path: inset(50%);
  }
}

@media (min-width: 900px) {
  #new_job,
  #new_job_upgrade {
    max-width: 320px;
  }
}

@media (min-width: 1000px) {
  #app:has(.cols) > * {
    max-width: 1040px;
  }

  .cols {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-xl) var(--space-xxl);
    align-items: start;
  }

  .cols > h1,
  .cols > .lede,
  .cols > #notice,
  .cols > .foot,
  .cols > .notice {
    grid-column: 1 / -1;
  }

  }

/* ---------- design system, second pass: cards, sections, capture, stepper, tiles ---------- */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

.ico {
  flex: none;
}

.span-all {
  grid-column: 1 / -1;
}

#app:has(.intake) > *,
#app:has(.home) > * {
  max-width: 1120px;
}

.panel {
  display: flex;
  flex-direction: column;
  border: 1px solid var(--c-card-border);
  border-radius: var(--radius-card);
  background: var(--c-card-background);
  box-shadow: var(--shadow-card);
  min-width: 0;
}

.panel-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: var(--space-md);
  padding: var(--space-lg) var(--space-lg) 0;
}

.panel-head h2 {
  font-size: 20px;
}

.panel-head .muted {
  margin-top: 2px;
}

.panel-body {
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
  padding: var(--space-lg);
  min-width: 0;
}

.panel-quiet {
  padding: var(--space-md) var(--space-lg);
  background: transparent;
  border-style: dashed;
  box-shadow: none;
}

.panel .rows > li:last-child {
  border-bottom: 0;
}

@media (min-width: 700px) {
  .panel-head {
    padding: var(--space-xl) var(--space-xl) 0;
  }

  .panel-body {
    padding: var(--space-xl);
    gap: var(--space-lg);
  }
}

/* collapsible sections */
.sect {
  border: 1px solid var(--c-card-border);
  border-radius: var(--radius-card);
  background: var(--c-card-background);
  box-shadow: var(--shadow-card);
  min-width: 0;
}

.sect.is-changed {
  border-color: var(--c-mark);
}

.sect summary {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  min-height: 64px;
  padding: 10px var(--space-lg);
  cursor: pointer;
  list-style: none;
  border-radius: var(--radius-card);
}

.sect summary::-webkit-details-marker {
  display: none;
}

.sect-tick {
  flex: none;
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border: 2px solid var(--c-input-border);
  border-radius: 50%;
  color: var(--c-on-brand);
}

.is-done > summary .sect-tick {
  background: var(--c-success);
  border-color: var(--c-success);
}

.sect-title {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
}

.sect-name {
  font-family: var(--font-address);
  font-size: 20px;
  font-weight: 600;
  letter-spacing: -0.01em;
}

.sect-hint {
  color: var(--c-text-secondary);
  font-size: 14px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.sect-chev {
  color: var(--c-text-secondary);
  transition: transform 150ms ease;
}

.sect[open] > summary .sect-chev {
  transform: rotate(180deg);
}

.sect-body {
  padding: 0 var(--space-lg) var(--space-lg);
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
}

.sect-body form,
.sect-body fieldset {
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
  min-width: 0;
}

.intake-grid,
.intake-col {
  display: grid;
  gap: var(--space-lg);
  min-width: 0;
}

.intake-col {
  align-content: start;
}

@media (min-width: 1000px) {
  .intake-grid {
    grid-template-columns: 1fr 1fr;
    align-items: start;
    gap: var(--space-xl);
  }
}

.progress-line {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  color: var(--c-text-secondary);
  font-size: 15px;
}

.progress-line .meter {
  flex: 1 1 120px;
  max-width: 220px;
}

.progress-line span:last-child {
  white-space: nowrap;
}

.meter {
  display: block;
  height: 6px;
  min-width: 72px;
  border-radius: 99px;
  background: var(--c-separator);
  overflow: hidden;
}

.meter-fill {
  display: block;
  height: 100%;
  border-radius: 99px;
  background: var(--c-success);
}

.pills {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-sm);
}

label.pill:has(> input[type="checkbox"]) {
  position: relative;
  padding: 0 var(--space-lg);
  border: 1px solid var(--c-input-border);
  border-radius: 99px;
  background: var(--c-card-background);
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
}

.pill input {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  min-height: 0;
  opacity: 0;
  cursor: pointer;
}

label.pill:has(> input:checked) {
  border-color: var(--c-mark);
  background: color-mix(in srgb, var(--c-mark) 12%, transparent);
  color: var(--c-mark);
}

label.pill:has(> input:focus-visible) {
  outline: 2px solid var(--c-mark);
  outline-offset: 2px;
}

/* sticky bars */
.savebar {
  position: sticky;
  bottom: 0;
  z-index: 15;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-md);
  margin: 0 calc(var(--space-lg) * -1);
  padding: var(--space-md) var(--space-lg) calc(var(--space-md) + env(safe-area-inset-bottom));
  border-top: 1px solid var(--c-separator);
  background: color-mix(in srgb, var(--c-paper) 92%, transparent);
  backdrop-filter: blur(10px);
}

.savebar p {
  color: var(--c-text-secondary);
  font-size: 15px;
}

.savebar.is-dirty p {
  color: var(--c-ink);
  font-weight: 600;
}

.savebar button {
  flex: 0 0 auto;
  min-width: 160px;
}

.results-bar button {
  flex: 1 1 0;
}

.results-bar {
  gap: var(--space-md);
}

@media (min-width: 700px) {
  .savebar {
    margin: 0;
    border: 1px solid var(--c-card-border);
    border-radius: var(--radius-card);
    box-shadow: 0 6px 24px rgb(23 33 27 / 14%);
    bottom: var(--space-lg);
    background: var(--c-card-background);
  }
}

/* capture tile */
.capture {
  position: relative;
}

.capture-input {
  position: absolute;
  width: 1px;
  height: 1px;
  min-height: 0;
  padding: 0;
  opacity: 0;
}

.capture-tile {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 200px;
  padding: var(--space-xl);
  border: 2px dashed var(--c-input-border);
  border-radius: var(--radius-card);
  background: var(--c-field-fill);
  color: var(--c-mark);
  text-align: center;
  cursor: pointer;
  overflow: hidden;
}

.capture-tile:hover {
  border-color: var(--c-mark);
}

.capture-input:focus-visible + .capture-tile {
  outline: 3px solid var(--c-mark);
  outline-offset: 3px;
}

.capture-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-sm);
}

.capture-label {
  color: var(--c-ink);
  font-size: 17px;
  font-weight: 600;
}

.capture-hint {
  color: var(--c-text-secondary);
  font-size: 14px;
}

.capture-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.capture.has-photo .capture-tile {
  min-height: 260px;
  border-style: solid;
  border-color: var(--c-mark);
  padding: 0;
}

.capture.has-photo .capture-empty {
  display: none;
}

.capture-retake {
  position: absolute;
  right: var(--space-md);
  bottom: var(--space-md);
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 40px;
  padding: 0 var(--space-lg);
  border-radius: 99px;
  background: rgb(10 18 14 / 78%);
  color: #fff;
  font-size: 15px;
  font-weight: 600;
}

.capture-compact .capture-tile {
  min-height: 72px;
  padding: var(--space-md) var(--space-lg);
}

.capture-compact .capture-empty {
  flex-direction: row;
  gap: var(--space-md);
}

.capture-compact .capture-hint {
  display: none;
}

.capture-compact.has-photo .capture-tile {
  min-height: 150px;
}

.check-row {
  flex-wrap: wrap;
}

.check-row .capture {
  flex: 0 1 220px;
  min-width: 160px;
}

.check-name {
  flex: 1 1 160px;
}

/* stepper */
.stepper {
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
}

.stepper-count {
  display: flex;
  align-items: baseline;
  gap: var(--space-sm);
  color: var(--c-text-secondary);
  font-size: 15px;
}

.stepper-count strong {
  color: var(--c-ink);
}

.stepper-scroll {
  --fl: 0px;
  --fr: 0px;
  margin: 0 calc(var(--space-lg) * -1);
  padding: 0 var(--space-lg);
  overflow-x: auto;
  scrollbar-width: none;
  -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 var(--fl), #000 calc(100% - var(--fr)), transparent 100%);
  mask-image: linear-gradient(90deg, transparent 0, #000 var(--fl), #000 calc(100% - var(--fr)), transparent 100%);
}

.stepper-scroll::-webkit-scrollbar {
  display: none;
}

.stepper-scroll[data-fade-left="true"] {
  --fl: 36px;
}

.stepper-scroll[data-fade-right="true"] {
  --fr: 36px;
}

.steps {
  display: flex;
  min-width: max-content;
  width: 100%;
  margin: 0;
  padding: 0;
  list-style: none;
}

.step-item {
  position: relative;
  flex: 1 0 66px;
}

.step-item + .step-item::before {
  content: "";
  position: absolute;
  top: 24px;
  right: 50%;
  width: 100%;
  height: 2px;
  background: var(--c-border);
}

.step-item.is-done + .step-item::before {
  background: var(--c-success);
}

.step {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  min-height: 64px;
  padding: var(--space-sm) 2px;
  color: var(--c-text-secondary);
  font-size: 13px;
  font-weight: 600;
  text-align: center;
}

a.step:hover {
  color: var(--c-ink);
  text-decoration: none;
}

.step-dot {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border: 2px solid var(--c-input-border);
  border-radius: 50%;
  background: var(--c-paper);
  font-size: 14px;
  font-variant-numeric: tabular-nums;
}

.is-done .step-dot {
  border-color: var(--c-success);
  background: var(--c-success);
  color: var(--c-on-brand);
}

.step-current {
  color: var(--c-ink);
}

.step-current .step-dot {
  border-color: var(--c-mark);
  background: var(--c-mark);
  color: var(--c-on-brand);
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--c-mark) 20%, transparent);
}

@media (min-width: 700px) {
  .stepper-scroll {
    margin: 0;
    padding: 0;
  }

  .step {
    font-size: 15px;
  }
}

.job-meta {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  margin-top: var(--space-sm);
}

.status-draft {
  border-style: dashed;
}

.status-testing {
  color: var(--c-warning);
  border-color: var(--c-warning);
  background: var(--c-warning-tint);
}

.progress-line + .intake-grid {
  margin-top: 0;
}

/* openings */
.component-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-md);
}

.title-input {
  flex: 1;
  min-height: 44px;
  padding: 4px 10px;
  margin-left: -10px;
  border-color: transparent;
  border-bottom-color: transparent;
  background: transparent;
  font: 600 21px/1.2 var(--font-address);
  letter-spacing: -0.01em;
}

.title-input:hover {
  border-color: var(--c-border);
}

.component-count {
  flex: none;
}

.chip-state {
  padding: 3px 10px;
  border: 1px solid var(--c-border);
  border-radius: 99px;
  font-size: 13px;
  font-weight: 600;
  text-align: center;
}

.face-state.state-positive,
.face-state.state-presumed {
  color: var(--c-danger);
  border-color: var(--c-danger);
  background: var(--c-danger-tint);
}

.face-state.state-negative {
  color: var(--c-success);
  border-color: var(--c-success);
  background: var(--c-success-tint);
}

.face-state.state-unsent {
  color: var(--c-warning);
  border-color: var(--c-warning);
  background: var(--c-warning-tint);
}

.act {
  background: color-mix(in srgb, var(--c-mark) 8%, transparent);
}

/* firm home */
.home-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-lg);
}

@media (max-width: 899px) {
  .home-head {
    justify-content: stretch;
  }

  .home-actions,
  .home-actions button {
    width: 100%;
  }
}

#new_job,
#new_job_upgrade {
  max-width: none;
  min-height: 48px;
  white-space: nowrap;
}

.notice-warn {
  display: flex;
  align-items: center;
  gap: var(--space-md);
}

.tiles {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--space-md);
  padding: 0;
  list-style: none;
}

@media (min-width: 700px) {
  .tiles {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: var(--space-lg);
  }
}

.tile {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: var(--space-lg) var(--space-lg) var(--space-lg) 20px;
  border: 1px solid var(--c-card-border);
  border-radius: var(--radius-card);
  background: var(--c-card-background);
  box-shadow: var(--shadow-card);
  overflow: hidden;
}

.tile::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 5px;
  background: var(--tile, var(--c-mark));
}

.tile-lead {
  --tile: var(--c-danger);
}

.tile-clear {
  --tile: var(--c-success);
}

.tile-waiting {
  --tile: var(--c-warning);
}

.tile-count {
  font-family: var(--font-address);
  font-size: 40px;
  font-weight: 600;
  line-height: 1;
  letter-spacing: -0.03em;
}

.tile-label {
  font-weight: 600;
}

.tile-note {
  color: var(--c-text-secondary);
  font-size: 13px;
}

.home-body {
  display: grid;
  gap: var(--space-xl);
}

@media (min-width: 900px) {
  .home-body.has-aside {
    grid-template-columns: minmax(0, 1fr) 340px;
    align-items: start;
  }
}

.rows.rich {
  border: 1px solid var(--c-card-border);
  border-radius: var(--radius-card);
  background: var(--c-card-background);
  box-shadow: var(--shadow-card);
  overflow: hidden;
}

.rows.rich > li:last-child,
.map-list .rows > li:last-child {
  border-bottom: 0;
}

.rich .job-row,
.map-list .job-row {
  min-height: 84px;
  padding: var(--space-md) var(--space-lg) var(--space-md) 17px;
  align-items: flex-start;
}

.rich .job-row:hover {
  background: color-mix(in srgb, var(--c-mark) 5%, transparent);
}

.row-chips {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: var(--space-sm);
}

.row-progress {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  max-width: 280px;
  margin-top: 4px;
  font-size: 13px;
}

.row-progress .meter {
  flex: 1;
}

.row-main .address {
  font-size: 20px;
}

.address-sm {
  font-family: var(--font-address);
  font-size: 17px;
  font-weight: 600;
  color: var(--c-ink);
}

.plain {
  display: flex;
  flex-direction: column;
  padding: 0;
  list-style: none;
}

.plain a {
  display: flex;
  flex-direction: column;
  min-height: 52px;
  justify-content: center;
  border-bottom: 1px solid var(--c-separator);
}

.plain li:last-child a {
  border-bottom: 0;
}

.empty-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-sm);
  padding: var(--space-xxl) var(--space-lg);
  border: 2px dashed var(--c-border);
  border-radius: var(--radius-card);
  color: var(--c-mark);
  text-align: center;
}

.empty-card .empty {
  padding: 0;
  color: var(--c-ink);
}

/* map panel and its stand-in */
.map-stage {
  position: relative;
}

.map-canvas {
  border-radius: var(--radius-card);
  overflow: hidden;
}

.plot {
  position: relative;
  height: 56vh;
  min-height: 380px;
  border: 1px solid var(--c-card-border);
  border-radius: var(--radius-card);
  background:
    radial-gradient(circle at 20% 25%, color-mix(in srgb, var(--c-mark) 7%, transparent), transparent 45%),
    radial-gradient(circle at 80% 70%, color-mix(in srgb, var(--c-mark) 9%, transparent), transparent 50%),
    var(--c-field-fill);
  overflow: hidden;
}

.plot-grid {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.plot-grid path {
  fill: none;
  stroke: var(--c-border);
  stroke-width: 1;
  vector-effect: non-scaling-stroke;
}

.plot-grid .plot-river {
  stroke: color-mix(in srgb, var(--c-mark) 22%, transparent);
  stroke-width: 16;
  stroke-linecap: round;
}

.plot-pin {
  position: absolute;
  transform: translate(-22px, -50%);
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  min-height: 44px;
  padding: 0 6px;
  border: 0;
  background: transparent;
  color: var(--c-ink);
}

.plot-pin .dot {
  width: 20px;
  height: 20px;
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--c-card-background) 70%, transparent);
}

.plot-tag {
  padding: 2px 10px;
  border: 1px solid var(--c-card-border);
  border-radius: 99px;
  background: var(--c-card-background);
  box-shadow: var(--shadow-card);
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
}

.plot-note {
  position: absolute;
  inset: auto var(--space-md) var(--space-md) var(--space-md);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-md);
  padding: var(--space-md) var(--space-lg);
  border: 1px solid var(--c-card-border);
  border-radius: var(--radius-control);
  background: var(--c-card-background);
  box-shadow: var(--shadow-card);
  color: var(--c-mark);
}

.plot-note div {
  display: flex;
  flex: 1 1 200px;
  flex-direction: column;
  color: var(--c-ink);
}

.plot-note button {
  min-height: 44px;
}

@media (min-width: 900px) {
  .plot,
  .map-canvas {
    height: calc(100vh - 300px);
    min-height: 460px;
  }

  .map-wrap {
    grid-template-columns: minmax(340px, 420px) minmax(0, 1fr);
  }

  .map-body {
    grid-template-columns: minmax(340px, 420px) minmax(0, 1fr);
  }

  .map-pane {
    position: sticky;
    top: var(--space-xl);
  }
}

.map-list .rows {
  border: 1px solid var(--c-card-border);
  border-radius: var(--radius-card);
  background: var(--c-card-background);
  box-shadow: var(--shadow-card);
  overflow: hidden;
}

.map-list .rows:empty {
  display: none;
}

.where {
  gap: var(--space-sm);
}

/* tables */
.table {
  width: 100%;
  border-collapse: collapse;
}

.table th,
.table td {
  padding: var(--space-md) var(--space-sm);
  border-bottom: 1px solid var(--c-separator);
  text-align: left;
  vertical-align: middle;
}

.table thead th {
  color: var(--c-text-secondary);
  font-size: 13px;
  font-weight: 600;
}

.table tbody tr:last-child th,
.table tbody tr:last-child td {
  border-bottom: 0;
}

.table tbody th {
  font-weight: 600;
}

.table .who,
.table th .muted {
  display: block;
}

.card-cell .chip {
  margin-right: var(--space-sm);
}

.card-cell .muted {
  font-size: 13px;
}

.chip-seat {
  background: var(--c-field-fill);
  color: var(--c-ink);
}

.chip-seat-owner {
  border-color: var(--c-mark);
  background: color-mix(in srgb, var(--c-mark) 12%, transparent);
  color: var(--c-mark);
}

.seat-pick select {
  min-height: 44px;
  font: 600 15px var(--font-ui);
  width: auto;
  min-width: 140px;
}

@media (max-width: 699px) {
  .table thead {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip-path: inset(50%);
  }

  .table,
  .table tbody,
  .table tr,
  .table th,
  .table td {
    display: block;
  }

  .table tr {
    padding: var(--space-md) 0;
    border-bottom: 1px solid var(--c-separator);
  }

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

  .table th,
  .table td {
    padding: 2px 0;
    border: 0;
  }

  .table td[data-label]::before {
    content: attr(data-label);
    display: inline-block;
    min-width: 56px;
    margin-right: var(--space-sm);
    color: var(--c-text-secondary);
    font-size: 13px;
  }
}

/* kits */
.kit-row {
  gap: var(--space-md);
}

.kit-row.is-expired {
  box-shadow: inset 3px 0 0 var(--c-danger);
}

.kit-icon {
  flex: none;
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: color-mix(in srgb, var(--c-mark) 10%, transparent);
  color: var(--c-mark);
}

.kit-name {
  font-weight: 600;
}

/* settings */
.brand-preview {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: var(--space-lg) var(--space-lg) var(--space-md);
  border: 1px solid var(--c-card-border);
  border-radius: var(--radius-control);
  background: #fff;
  overflow: hidden;
}

.brand-preview-bar {
  position: absolute;
  inset: 0 0 auto 0;
  height: 8px;
  background: var(--accent);
}

.brand-preview-name {
  margin-top: var(--space-sm);
  color: #111;
  font-family: var(--font-address);
  font-size: 20px;
  font-weight: 600;
}

.brand-preview-line {
  color: #555;
  font-size: 13px;
}

/* sign-in */
.sign-in {
  max-width: 400px;
  margin-top: var(--space-xl);
  padding: var(--space-xl);
  border: 1px solid var(--c-card-border);
  border-radius: 20px;
  background: var(--c-card-background);
  box-shadow: var(--shadow-card);
}

.sign-in .mark-sign-in {
  border-radius: 20px;
}

.sign-in fieldset {
  padding-top: var(--space-lg);
  border-top: 1px solid var(--c-separator);
}

.sign-in legend {
  font-size: 18px;
}

.empty-card + .empty-card {
  margin-top: var(--space-md);
}

@media (min-width: 1000px) {
  #app:has(.cols) > * {
    max-width: 1120px;
  }
}

.guide-card {
  border-radius: var(--radius-card);
}

#capture .panel-body label:has(> input[type="checkbox"]) {
  min-height: 48px;
}

.capture-screen {
  padding-bottom: var(--space-lg);
}

.table th .who .muted {
  display: inline;
}

#capture_state {
  color: var(--c-text-secondary);
  font: 600 15px var(--font-ui);
}

@media (max-width: 699px) {
  .kit-row {
    flex-wrap: wrap;
  }

  .kit-row .row-chips {
    flex-basis: 100%;
    justify-content: flex-start;
    padding-left: 52px;
  }

  .plot {
    min-height: 520px;
  }
}

.col {
  display: flex;
  flex-direction: column;
  gap: var(--space-lg);
  min-width: 0;
}

html {
  scroll-padding-bottom: 110px;
}

@media (min-width: 700px) {
  .foot {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
  }

  .foot .primary-link {
    min-width: 260px;
  }
}

.skip {
  position: absolute;
  left: var(--space-lg);
  top: -80px;
  z-index: 100;
  padding: var(--space-md) var(--space-lg);
  border-radius: var(--radius-control);
  background: var(--c-mark);
  color: var(--c-on-brand);
}

.skip:focus {
  top: var(--space-sm);
}

#app:focus {
  outline: none;
}

.plot-pin-left {
  flex-direction: row-reverse;
  transform: translate(calc(-100% + 22px), -50%);
}

.openings {
  display: grid;
  gap: var(--space-lg);
}

@media (min-width: 1000px) {
  #app:has(.openings) > * {
    max-width: 1040px;
  }

  .openings {
    display: block;
    columns: 2;
    column-gap: var(--space-lg);
  }

  .openings > .card {
    break-inside: avoid;
    margin-bottom: var(--space-lg);
  }
}

/* ---------- plan chooser (paywall) ---------- */
.plans {
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
  margin-top: var(--space-sm);
}

.plans-head {
  margin: 0;
  font-size: 18px;
}

.plan-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: var(--space-md);
}

.plan {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: var(--space-sm);
  padding: var(--space-lg);
  border: 1px solid var(--c-card-border);
  border-radius: var(--radius-card);
  background: var(--c-card-background);
  color: var(--c-text-primary);
}

.plan h3,
.plan p {
  margin: 0;
}

.plan button {
  margin-top: auto;
  align-self: stretch;
}

.plan-price {
  font-size: 26px;
  font-weight: 700;
}

.plan-save {
  color: var(--c-success);
  font-weight: 600;
}

.plan-mtp {
  border-left: 4px solid var(--c-mark);
}

.seg-group {
  display: inline-flex;
  border: 1px solid var(--c-input-border);
  border-radius: var(--radius-control);
  overflow: hidden;
}

button.seg {
  min-height: 44px;
  padding: 0 var(--space-lg);
  border: 0;
  border-radius: 0;
  background: var(--c-field-fill);
  color: var(--c-text-primary);
  font-size: 15px;
}

button.seg.is-on {
  background: var(--c-mark);
  color: var(--c-on-brand);
}

/* billing return: public pages Stripe lands on */
.primary-link.secondary {
  background: transparent;
  color: var(--c-mark);
}

.billing-return h1 {
  font-family: var(--font-address);
}

/* ---------- legal pages and footer ---------- */
.site-foot-wrap {
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 var(--space-lg) var(--space-xxl);
}

.site-foot {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-xs, 4px) var(--space-xl);
  border-top: 1px solid var(--c-separator);
  padding-top: var(--space-sm);
}

.site-foot a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  color: var(--c-text-secondary);
  font-size: 15px;
}

.legal h2 {
  margin-top: var(--space-md);
}

.legal h3 {
  font-size: 17px;
  font-weight: 600;
}

.legal p,
.legal li {
  max-width: 68ch;
  line-height: 1.55;
}

.legal ul {
  padding-left: 1.25em;
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
}

.legal a {
  text-decoration: underline;
  text-underline-offset: 2px;
}

.legal-toc ul {
  list-style: none;
  padding: 0;
  flex-direction: row;
  flex-wrap: wrap;
  gap: 0 var(--space-xl);
}

.legal-toc a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
}

.legal .faq {
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
  padding-bottom: var(--space-md);
  border-bottom: 1px solid var(--c-separator);
}
