:root {
  --ink: #0b0f14;
  --muted: #3a4452;
  --line: #cfd7e3;
  --soft-line: #e4e9f0;
  --surface: #ffffff;
  --sunken: #f2f4f7;
  --primary: #0b5fff;
  --primary-dark: #0844b9;
  --field-dark: #003b35;
  --field-deep: #062b27;
  --success: #0a7d33;
  --warning: #9a5b00;
  --danger: #b3261e;
  --owner: #3d2e8c;
  --before: #9a5b00;
  --after: #0a7d33;
  --shadow: 0 12px 32px rgba(11, 15, 20, 0.08);
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
  max-width: 100%;
  overflow-x: hidden;
  color: var(--ink);
  background: #eef2f5;
  font: 18px/1.45 system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

button,
input,
select,
textarea {
  font: inherit;
}

input[type="number"] {
  appearance: textfield;
  -moz-appearance: textfield;
}

input[type="number"]::-webkit-outer-spin-button,
input[type="number"]::-webkit-inner-spin-button {
  margin: 0;
  -webkit-appearance: none;
}

button {
  border: 0;
  cursor: pointer;
}

button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 3px solid var(--primary);
  outline-offset: 2px;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.app-shell {
  display: grid;
  grid-template-columns: 236px 1fr;
  min-height: 100vh;
}

.rail {
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 22px 14px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.06), transparent 28%),
    var(--field-deep);
  color: #fff;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  padding-bottom: 16px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.16);
}

.brand span,
.rail small {
  display: block;
  color: rgba(255, 255, 255, 0.74);
  font-size: 14px;
}

.mark {
  display: grid;
  width: 46px;
  height: 46px;
  place-items: center;
  border: 2px solid rgba(255, 255, 255, 0.5);
  border-radius: 8px;
  font-weight: 800;
}

.nav {
  display: grid;
  gap: 6px;
}

.nav button {
  min-height: 44px;
  padding: 9px 12px;
  border-radius: 8px;
  background: transparent;
  color: rgba(255, 255, 255, 0.76);
  text-align: left;
}

.nav button.active,
.nav button:hover {
  background: rgba(255, 255, 255, 0.13);
  color: #fff;
}

.rail-card {
  margin-top: auto;
  padding: 14px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.08);
}

.status-dot {
  display: inline-block;
  width: 12px;
  height: 12px;
  margin-right: 8px;
  border-radius: 999px;
  background: var(--success);
}

.workspace {
  min-width: 0;
  padding: 24px;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  margin: 0 auto 22px;
  max-width: 1220px;
}

.topbar h1 {
  margin: 0;
  font-size: 34px;
  line-height: 1.08;
  letter-spacing: 0;
}

.eyebrow {
  margin: 0 0 6px;
  color: var(--muted);
  font-size: 14px;
  font-weight: 800;
  text-transform: uppercase;
}

.top-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}

.topbar-brand {
  display: none;
  align-items: center;
  padding: 0;
  background: transparent;
}

.topbar-mark {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border: 0;
  border-radius: 8px;
  background: var(--field-deep);
  color: #fff;
  font-size: 14px;
  font-weight: 800;
  letter-spacing: 0.5px;
}

.sync-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 42px;
  max-width: 320px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
  color: var(--ink);
  font-size: 14px;
  font-weight: 800;
}

.sync-chip .status-dot {
  margin-right: 0;
}

.sync-chip.pending .status-dot {
  background: var(--warning);
}

.sync-chip.attention .status-dot {
  background: var(--danger);
}

.sync-chip-text {
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.tabbar {
  display: none;
}

.screen {
  max-width: 1360px;
  margin: 0 auto;
}

.grid {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 16px;
}

.span-3 { grid-column: span 3; }
.span-4 { grid-column: span 4; }
.span-5 { grid-column: span 5; }
.span-6 { grid-column: span 6; }
.span-7 { grid-column: span 7; }
.span-8 { grid-column: span 8; }
.span-9 { grid-column: span 9; }
.span-12 { grid-column: span 12; }

.card,
.panel {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.card {
  padding: 18px;
}

.panel {
  overflow: hidden;
}

.panel-head,
.panel-body,
.panel-foot {
  min-width: 0;
  padding: 18px;
}

.panel-head {
  border-bottom: 1px solid var(--soft-line);
}

.panel-foot {
  border-top: 1px solid var(--soft-line);
  background: var(--sunken);
}

h2,
h3,
p {
  margin-top: 0;
}

h2 {
  margin-bottom: 12px;
  font-size: 22px;
  letter-spacing: 0;
}

h3 {
  margin-bottom: 8px;
  font-size: 18px;
  letter-spacing: 0;
}

p {
  color: var(--muted);
}

p,
li,
label,
.panel,
.card,
.list-row,
.sync-queue-row,
.notice-card {
  overflow-wrap: break-word;
  word-break: normal;
}

.primary,
.secondary,
.ghost,
.danger {
  min-height: 48px;
  padding: 0 18px;
  border-radius: 8px;
  font-weight: 800;
}

.primary {
  background: var(--primary);
  color: #fff;
}

.primary:hover {
  background: var(--primary-dark);
}

.secondary {
  border: 1px solid var(--line);
  background: #fff;
  color: var(--ink);
}

.ghost {
  border: 1px solid transparent;
  background: transparent;
  color: var(--primary-dark);
}

.danger {
  background: var(--danger);
  color: #fff;
}

button:disabled {
  cursor: not-allowed;
  opacity: 0.56;
}

.compact {
  min-height: 42px;
  padding-inline: 14px;
  font-size: 15px;
}

.row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.stack {
  display: grid;
  gap: 12px;
}

.button-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.compact-row {
  align-items: center;
  justify-content: flex-end;
}

.list {
  display: grid;
  gap: 10px;
}

.list-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 12px;
  align-items: center;
  min-height: 64px;
  padding: 12px;
  border: 1px solid var(--soft-line);
  border-radius: 8px;
  background: #fff;
}

.list-row.active {
  border-color: var(--primary);
  background: #f3f7ff;
}

.visit-stamp-row {
  align-items: start;
}

.visit-stamp-row .module-actions {
  max-width: 330px;
}

.visit-stamp-row .chip {
  max-width: 100%;
  height: auto;
  min-height: 32px;
  border-radius: 8px;
  white-space: normal;
  text-align: left;
}

.notice-card {
  padding: 12px;
  border: 1px solid #b7dec4;
  border-radius: 8px;
  background: #f5fbf7;
}

.notice-card p {
  margin: 4px 0 0;
  color: var(--muted);
}

/* Single shared validation-error pattern: amber/red card attached directly
   under the offending input, plus an error outline on the input itself. */
.field-error-card {
  margin-top: 8px;
  padding: 10px 12px;
  border: 1px solid #e3b96f;
  border-left: 4px solid var(--danger);
  border-radius: 8px;
  background: #fdf6ec;
}

.field-error-card p {
  margin: 0;
  color: #7a3b00;
  font-weight: 600;
}

input.input-error,
textarea.input-error {
  border-color: var(--danger);
  outline: 2px solid var(--danger);
  outline-offset: 1px;
}

.engine-locked-run {
  display: grid;
  gap: 6px;
}

.engine-lock-context {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
}

.demo-pro-preview {
  margin: 0 0 10px;
}

.sync-row-details summary {
  cursor: pointer;
  color: var(--muted);
  font-size: 13px;
}

.sync-row-details small {
  display: block;
  overflow-wrap: anywhere;
  color: var(--muted);
}

.onboarding-shell {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 360px);
  gap: 16px;
  align-items: start;
  max-width: 1060px;
  margin: 0 auto;
}

.onboarding-shell.cold-open,
.onboarding-shell.done {
  grid-template-columns: minmax(0, 720px) minmax(260px, 340px);
  align-items: stretch;
  min-height: min(660px, calc(100vh - 130px));
}

.onboarding-panel,
.onboarding-hero,
.onboarding-proof,
.onboarding-side {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.onboarding-panel,
.onboarding-hero {
  display: grid;
  gap: 18px;
  padding: 24px;
}

.onboarding-hero {
  overflow: hidden;
  align-content: center;
  background: var(--surface);
}

.onboarding-hero > * {
  max-width: 620px;
}

.onboarding-hero h2,
.onboarding-panel h2 {
  max-width: 760px;
  margin-bottom: 0;
  font-size: 34px;
  line-height: 1.08;
}

.onboarding-hero p,
.onboarding-question p,
.onboarding-proof p {
  max-width: 680px;
  margin-bottom: 0;
}

.onboarding-entry-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.onboarding-entry-actions .primary {
  width: min(260px, 100%);
}

.onboarding-demo-option {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 14px;
  align-items: center;
  width: min(100%, 650px);
  padding: 14px;
  border: 1px solid var(--soft-line);
  border-radius: 8px;
  background: rgba(242, 244, 247, 0.94);
}

.onboarding-demo-option strong,
.onboarding-demo-option small {
  display: block;
}

.onboarding-demo-option small {
  margin-top: 3px;
  color: var(--muted);
  font-size: 14px;
}

.onboarding-proof,
.onboarding-side {
  padding: 18px;
}

.onboarding-proof {
  display: grid;
  align-content: start;
  gap: 10px;
}

.onboarding-proof strong {
  font-size: 22px;
  line-height: 1.18;
}

.onboarding-topline,
.onboarding-foot,
.language-choice-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
  justify-content: space-between;
}

.onboarding-topline > span,
.language-choice-row > span {
  color: var(--muted);
  font-size: 14px;
  font-weight: 800;
}

.onboarding-dots {
  display: inline-flex;
  gap: 8px;
  align-items: center;
  min-height: 20px;
}

.onboarding-dots span {
  width: 10px;
  height: 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
}

.onboarding-dots span.active {
  border-color: var(--primary);
  background: var(--primary);
}

.onboarding-chip-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.onboarding-chip-grid .chip {
  justify-content: center;
  min-height: 52px;
  width: 100%;
  padding: 9px 12px;
  border-radius: 8px;
  white-space: normal;
  text-align: center;
}

.onboarding-chip-grid.goal-grid,
.onboarding-chip-grid.role-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.onboarding-and-also {
  justify-self: start;
}

.onboarding-summary {
  display: grid;
  gap: 10px;
}

.onboarding-summary article {
  min-width: 0;
  padding: 11px 12px;
  border: 1px solid var(--soft-line);
  border-radius: 8px;
  background: #fff;
}

.onboarding-summary strong,
.onboarding-summary span {
  display: block;
}

.onboarding-summary span {
  margin-top: 3px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.account-service-panel .field input {
  width: 100%;
}

.auth-status-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.turnstile-box {
  min-height: 70px;
  display: grid;
  align-items: center;
  overflow: hidden;
}

.turnstile-invisible {
  position: fixed;
  right: 0;
  bottom: 0;
  width: 1px;
  height: 1px;
  min-height: 0;
  opacity: 0;
  pointer-events: none;
}

.property-map {
  display: grid;
  width: min(220px, 100%);
  min-height: 88px;
  place-items: center;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--muted);
  text-align: center;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.86), rgba(255, 255, 255, 0.72)),
    repeating-linear-gradient(45deg, #dde4ec 0 12px, #ccd6e2 12px 24px);
}

.property-map span {
  color: var(--danger);
  font-weight: 900;
  text-transform: uppercase;
}

.property-map small {
  font-size: 12px;
  font-weight: 800;
}

.property-detail-screen {
  padding-bottom: 124px;
}

.property-duplicate-card,
.property-access-boundary,
.property-conflict-card,
.property-empty-card,
.property-timeline-pager {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 13px;
  border: 1px solid var(--soft-line);
  border-radius: 8px;
  background: #fff;
}

.property-duplicate-card,
.property-access-boundary {
  border-color: #e7c78b;
  background: #fff9ec;
}

.property-conflict-card {
  display: grid;
  gap: 10px;
  border-color: #cfd8dd;
  background: #f8faf9;
}

.property-conflict-card > button {
  display: grid;
  gap: 4px;
  width: 100%;
  min-height: 0;
  padding: 0;
  border: 0;
  color: inherit;
  text-align: left;
  background: transparent;
}

.property-conflict-card span,
.property-timeline-pager span {
  color: var(--muted);
  font-size: 14px;
  font-weight: 800;
}

.property-conflict-versions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr)) auto auto;
  gap: 10px;
  align-items: start;
  padding-top: 10px;
  border-top: 1px solid var(--soft-line);
}

.property-conflict-versions p,
.property-duplicate-card p,
.property-access-boundary p,
.property-empty-card p {
  margin: 3px 0 0;
  color: var(--muted);
  font-size: 14px;
  font-weight: 800;
}

.property-empty-card {
  border-color: #b7dec4;
  background: #f5fbf7;
}

.arrival-hint {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  padding: 14px;
  border: 1px solid #b7dec4;
  border-radius: 8px;
  background: #f5fbf7;
}

.arrival-hint p {
  margin: 3px 0 0;
}

.last-time-card {
  display: grid;
  gap: 12px;
  padding: 13px;
  border: 1px solid var(--soft-line);
  border-radius: 8px;
  background: #fff;
  box-shadow: inset 4px 0 0 var(--primary);
}

.last-time-card h3,
.last-time-card p {
  margin: 0;
}

.last-time-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.last-time-grid div {
  min-width: 0;
  padding: 9px;
  border: 1px solid var(--soft-line);
  border-radius: 8px;
  background: var(--sunken);
}

.last-time-grid span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.property-memory-row {
  display: grid;
  grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr);
  gap: 12px;
  align-items: start;
  padding: 12px;
  border: 1px solid var(--soft-line);
  border-radius: 8px;
  background: #fff;
}

.property-memory-row span {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.property-memory-row textarea {
  width: 100%;
  min-height: 76px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  resize: vertical;
}

.property-memory-editor {
  display: grid;
  gap: 10px;
  min-width: 0;
}

.property-memory-edit {
  min-height: 56px;
  justify-self: start;
}

.property-bottom-bar {
  position: fixed;
  right: 24px;
  bottom: 16px;
  left: 260px;
  z-index: 8;
  width: min(calc(100vw - 284px), 1360px);
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(242, 244, 247, 0.96);
  box-shadow: 0 18px 38px rgba(11, 15, 20, 0.16);
  backdrop-filter: blur(8px);
}

.similar-bottom-bar {
  position: fixed;
  right: 24px;
  bottom: 16px;
  left: 260px;
  z-index: 20;
  width: min(calc(100vw - 284px), 1360px);
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(242, 244, 247, 0.96);
  box-shadow: 0 18px 38px rgba(11, 15, 20, 0.16);
  backdrop-filter: blur(8px);
}

.parking-memory-row {
  grid-template-columns: minmax(0, 0.75fr) minmax(0, 1.25fr);
}

.parking-pin-status {
  color: var(--primary-dark);
}

.parking-pin-toolbar,
.manual-pin-nudges,
.manual-pin-fields {
  display: grid;
  gap: 8px;
  min-width: 0;
}

.parking-pin-toolbar {
  grid-template-columns: repeat(3, minmax(0, auto));
  justify-content: start;
}

.parking-pin-fallback {
  display: grid;
  gap: 10px;
  padding: 12px;
  border: 1px solid #d8b35d;
  border-radius: 8px;
  background: #fff8e6;
}

.parking-pin-fallback p {
  margin: 3px 0 0;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.manual-pin-map {
  position: relative;
  display: grid;
  place-items: center;
  min-height: 132px;
  border: 1px solid #d6c390;
  border-radius: 8px;
  overflow: hidden;
  color: var(--ink);
  text-align: center;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.72), rgba(255, 255, 255, 0.82)),
    linear-gradient(90deg, rgba(61, 77, 94, 0.12) 1px, transparent 1px),
    linear-gradient(0deg, rgba(61, 77, 94, 0.12) 1px, transparent 1px),
    #eef4ef;
  background-size: auto, 28px 28px, 28px 28px, auto;
}

.manual-pin-crosshair {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border: 2px solid var(--danger);
  border-radius: 50%;
  color: var(--danger);
  font-size: 22px;
  font-weight: 900;
  background: #fff;
  box-shadow: 0 10px 24px rgba(11, 15, 20, 0.12);
}

.manual-pin-map small {
  position: absolute;
  left: 10px;
  right: 10px;
  bottom: 8px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
}

.manual-pin-fields {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.manual-pin-nudges {
  grid-template-columns: repeat(4, minmax(44px, 54px));
  justify-content: start;
}

.history-card-row {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.history-card {
  display: grid;
  gap: 8px;
  padding: 10px;
  border: 1px solid var(--soft-line);
  border-radius: 8px;
  background: #fff;
}

.history-thumbs {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px;
}

.history-thumbs span {
  display: grid;
  min-height: 58px;
  place-items: center;
  border-radius: 8px;
  color: #fff;
  font-size: 12px;
  font-weight: 900;
  background: linear-gradient(135deg, #8b5a12, #2f2111);
}

.history-thumbs span:last-child {
  background: linear-gradient(135deg, #0a7d33, #12301e);
}

.timeline {
  display: grid;
  gap: 8px;
}

.timeline-row {
  display: grid;
  gap: 4px;
  padding: 10px 12px;
  border-left: 4px solid var(--primary);
  border-radius: 8px;
  background: #fff;
}

.timeline-row span,
.source-list span {
  color: var(--muted);
  font-size: 14px;
  font-weight: 700;
}

.source-list {
  display: grid;
  gap: 8px;
  margin-top: 10px;
}

.source-list div {
  display: grid;
  gap: 3px;
  padding: 10px;
  border: 1px solid var(--soft-line);
  border-radius: 8px;
  background: #fff;
}

.module-group {
  display: grid;
  gap: 10px;
}

.module-preview-card {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(220px, 1.1fr);
  gap: 12px;
  padding: 14px;
  border: 1px solid #cfe0ff;
  border-radius: 8px;
  background: #f7faff;
}

.module-pending-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 14px;
  align-items: center;
  padding: 14px;
  border: 1px solid #e7c78b;
  border-radius: 8px;
  background: #fffaf0;
}

.module-preview-card h3,
.module-preview-card p,
.module-pending-card h3,
.module-pending-card p {
  margin: 4px 0;
}

.module-preview-output {
  display: grid;
  gap: 5px;
  padding: 12px;
  border: 1px solid var(--soft-line);
  border-radius: 8px;
  background: #fff;
}

.module-group h3 {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  letter-spacing: 0;
  text-transform: uppercase;
}

.module-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 14px;
  align-items: center;
  min-height: 72px;
  padding: 13px;
  border: 1px solid var(--soft-line);
  border-radius: 8px;
  background: #fff;
}

.module-row.enabled {
  border-color: #b7dec4;
  background: #fbfefc;
}

.module-row p {
  margin: 3px 0;
  color: var(--text);
}

.module-row span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.module-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.module-grant-control {
  display: grid;
  grid-template-columns: repeat(4, minmax(72px, 1fr));
  gap: 6px;
  width: min(100%, 430px);
}

.module-grant-control button {
  min-height: 38px;
  padding: 7px 9px;
  border: 1px solid var(--soft-line);
  border-radius: 8px;
  background: #fff;
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
}

.module-grant-control button.active {
  border-color: #b7dec4;
  color: var(--success);
  background: #edf8f0;
}

.module-footer-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
  padding-top: 2px;
}

.module-engine-toggles {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(92px, 1fr));
  gap: 6px;
  margin-top: 10px;
}

.module-engine-toggles button {
  display: grid;
  gap: 2px;
  min-height: 52px;
  padding: 7px;
  border: 1px solid var(--soft-line);
  border-radius: 8px;
  background: #fff;
  color: var(--muted);
  text-align: left;
}

.module-engine-toggles button span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 11px;
}

.module-engine-toggles button.active {
  border-color: #b7dec4;
  color: var(--success);
  background: #edf8f0;
}

.calendar-export-card .row {
  align-items: flex-start;
  gap: 12px;
}

.calendar-export-card .segmented {
  max-width: 440px;
}

.surface-pack-ledger,
.surface-spec-grid,
.surface-vocab-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.surface-pack-ledger article,
.surface-spec-grid div,
.surface-vocab-grid article,
.surface-spec-card,
.surface-vocab-panel {
  border: 1px solid var(--soft-line);
  border-radius: 8px;
  background: #fff;
}

.surface-pack-ledger article,
.surface-spec-grid div,
.surface-vocab-grid article {
  min-width: 0;
  padding: 12px;
}

.surface-pack-ledger span,
.surface-spec-grid span,
.surface-vocab-grid span,
.surface-vocab-grid small {
  display: block;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.surface-pack-ledger strong,
.surface-spec-grid strong,
.surface-vocab-grid strong {
  display: block;
  margin-top: 4px;
  overflow-wrap: anywhere;
  line-height: 1.25;
}

.surface-spec-card,
.surface-vocab-panel {
  display: grid;
  gap: 12px;
  padding: 14px;
}

.surface-spec-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: start;
}

.surface-spec-head p,
.surface-vocab-panel p {
  margin: 4px 0 0;
  color: var(--muted);
}

.surface-vocab-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.compact-module {
  min-height: 58px;
}

.checklist-item {
  display: grid;
  gap: 10px;
  padding: 13px;
  border: 1px solid var(--soft-line);
  border-radius: 10px;
  background: #fff;
}

.checklist-item.done {
  border-color: #b7dec4;
  box-shadow: inset 4px 0 0 var(--success);
  background: #f8fcf9;
}

.checklist-item.skipped {
  border-color: #e7c78b;
  box-shadow: inset 4px 0 0 var(--warning);
  background: #fff9ec;
}

.checklist-item-main {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 10px;
  align-items: start;
}

.checklist-state-icon {
  display: grid;
  place-items: center;
  width: 26px;
  height: 26px;
  margin-top: 2px;
  border: 2px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: #fff;
  font-size: 15px;
  font-weight: 900;
}

.checklist-item.done .checklist-state-icon {
  border-color: var(--success);
  background: var(--success);
}

.checklist-item.skipped .checklist-state-icon {
  border-color: var(--warning);
  background: var(--warning);
}

.checklist-item-copy strong {
  display: block;
  line-height: 1.3;
}

.checklist-pair-line {
  display: block;
  margin-top: 3px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.checklist-item-state {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.checklist-item-cta {
  display: grid;
  gap: 6px;
  justify-items: stretch;
  min-width: 108px;
}

.checklist-item-cta .chip {
  justify-content: center;
}

.checklist-more-toggle[aria-expanded="true"] {
  border-color: var(--line);
  background: var(--sunken);
}

.checklist-proof-row {
  display: flex;
  align-items: center;
  gap: 10px;
}

.proof-slot {
  display: grid;
  gap: 6px;
  justify-items: center;
  align-content: center;
  min-width: 124px;
  min-height: 84px;
  padding: 10px 8px;
  border: 2px dashed var(--line);
  border-radius: 10px;
  background: #fbfcfe;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  text-align: center;
}

.proof-slot:hover {
  border-color: var(--primary);
  color: var(--primary-dark);
}

.proof-slot .camera-glyph {
  width: 22px;
  height: 17px;
}

.checklist-more-panel {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding-top: 10px;
  border-top: 1px solid var(--soft-line);
}

.checklist-skip-group {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  width: 100%;
}

.checklist-skip-group > span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.template-list-row,
.template-item-row,
.template-suggestion {
  display: grid;
  gap: 10px;
  padding: 12px;
  border: 1px solid var(--soft-line);
  border-radius: 8px;
  background: #fff;
}

.template-list-row {
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
}

.template-list-row.active {
  border-color: #b7dec4;
  box-shadow: inset 4px 0 0 var(--success);
  background: #f8fcf9;
}

.template-list-row p,
.template-suggestion p {
  margin: 3px 0 0;
  font-size: 14px;
}

.template-fields {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.template-item-row {
  grid-template-columns: minmax(0, 1fr) 152px;
  align-items: start;
}

.template-item-main {
  display: grid;
  gap: 10px;
}

.template-item-main .field {
  min-width: 0;
}

.template-item-actions {
  display: grid;
  gap: 8px;
}

.compact-metrics {
  grid-template-columns: repeat(auto-fit, minmax(112px, 1fr));
  min-width: 0;
}

.compact-metrics div {
  min-width: 0;
}

.lesson-row,
.behavior-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  min-height: 76px;
  padding: 12px;
  border: 1px solid var(--soft-line);
  border-radius: 8px;
  background: #fff;
}

.lesson-row.active,
.behavior-row.done {
  border-color: #b7dec4;
  box-shadow: inset 4px 0 0 var(--success);
  background: #f8fcf9;
}

.lesson-row p,
.behavior-row p {
  margin: 3px 0;
}

.lesson-row span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.photo-standard-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.photo-standard-card {
  display: grid;
  gap: 8px;
  padding: 12px;
  border: 1px solid var(--soft-line);
  border-radius: 8px;
  background: #fff;
}

.owner-flag-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.owner-week-header-line,
.owner-evidence-line {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
  color: var(--muted);
  font-size: 14px;
  font-weight: 800;
}

.owner-week-source-link {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 0 2px;
  border: 0;
  background: transparent;
  color: var(--primary-dark);
  font: inherit;
  font-weight: 900;
  text-align: left;
  text-decoration: underline;
  text-underline-offset: 3px;
  cursor: pointer;
}

.owner-week-source-link:hover,
.owner-week-source-link:focus-visible {
  color: var(--primary);
}

.owner-insight-headline {
  display: block;
  line-height: 1.35;
}

.owner-inline-number {
  display: inline;
  min-height: 0;
  vertical-align: baseline;
}

.owner-source-strip,
.owner-number-sources {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.owner-source-button {
  display: grid;
  gap: 2px;
  align-content: center;
  justify-items: start;
  min-width: 136px;
  height: auto;
  min-height: 54px;
  white-space: normal;
  text-align: left;
}

.owner-source-button span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.owner-insight-card,
.review-queue-row,
.owner-receipts {
  display: grid;
  gap: 12px;
  padding: 13px;
  border: 1px solid var(--soft-line);
  border-radius: 8px;
  background: #fff;
}

.owner-insight-card {
  align-content: start;
}

.owner-insight-card.acted {
  border-color: #b7dec4;
  background: #f8fcf9;
}

.owner-closed-line {
  color: var(--success);
  font-weight: 900;
}

.owner-closed-meta {
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.owner-queue-line {
  width: fit-content;
  padding: 6px 9px;
  border: 1px solid #d8cab2;
  border-radius: 999px;
  background: #fffaf0;
  color: #7a5417;
  font-size: 12px;
  font-weight: 900;
}

.owner-insight-card p,
.review-queue-row p,
.owner-receipts p {
  margin: 4px 0 8px;
}

.owner-card-actions {
  display: grid;
  gap: 8px;
}

.review-queue-row {
  grid-template-columns: minmax(0, 1fr) 170px;
  align-items: start;
}

.owner-receipts {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  border-color: #cfe0ff;
  background: #f7faff;
}

.share-recipient,
.report-block {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(220px, 0.8fr);
  gap: 12px;
  align-items: stretch;
}

.packet-thumb,
.report-block > div {
  display: grid;
  gap: 4px;
  align-content: center;
  padding: 13px;
  border: 1px solid var(--soft-line);
  border-radius: 8px;
  background: #fff;
}

.packet-thumb span,
.report-block span {
  color: var(--muted);
  font-size: 14px;
  font-weight: 700;
}

.recipient-actions {
  margin-top: 8px;
}

.share-recipient small {
  color: var(--muted);
  font-weight: 700;
}

.share-paths {
  display: grid;
  gap: 10px;
}

.share-error-card,
.share-large-zip-card {
  box-shadow: none;
}

.recipient-report .report-preview {
  box-shadow: none;
}

.recipient-document {
  display: grid;
  gap: 18px;
  padding: 24px;
  background: #fff;
}

.recipient-document.recipient-unavailable {
  min-height: 360px;
  align-content: start;
}

.recipient-report-head,
.recipient-job-block,
.recipient-pair,
.recipient-footer {
  display: grid;
  gap: 12px;
}

.recipient-report-head {
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: start;
  padding-bottom: 14px;
  border-bottom: 2px solid var(--packet-accent, var(--ink));
}

.recipient-report-head h2 {
  margin-bottom: 6px;
}

.recipient-brand-copy,
.recipient-brand-lockup {
  display: grid;
  gap: 6px;
  min-width: 0;
}

.recipient-brand-lockup,
.packet-brand-lockup {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  min-width: 0;
}

.recipient-brand-lockup strong,
.packet-brand-name {
  min-width: 0;
  color: var(--ink);
  font-size: 14px;
  font-weight: 950;
}

.recipient-logo-badge,
.packet-logo-badge {
  display: inline-grid;
  place-items: center;
  min-width: 34px;
  height: 34px;
  padding: 0 8px;
  border-radius: 7px;
  color: #fff;
  font-size: 12px;
  font-weight: 950;
  letter-spacing: 0;
  background: var(--packet-accent, var(--ink));
}

.recipient-logo-badge.logo-image,
.packet-logo-badge.logo-image {
  width: 54px;
  min-width: 54px;
  padding: 3px;
  border: 1px solid var(--soft-line);
  color: var(--ink);
  background: #fff;
}

.recipient-logo-badge.logo-image img,
.packet-logo-badge.logo-image img {
  display: block;
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}

.recipient-brand-contact {
  max-width: 64ch;
}

.recipient-report-head p,
.recipient-job-block span,
.recipient-footer,
.recipient-photo-card span {
  color: var(--muted);
  font-size: 14px;
  font-weight: 800;
}

.recipient-job-block {
  grid-template-columns: minmax(0, 1.2fr) minmax(220px, 0.8fr);
}

.recipient-job-block div {
  padding: 13px;
  border: 1px solid var(--soft-line);
  border-radius: 8px;
  background: var(--sunken);
}

.recipient-pairs {
  display: grid;
  gap: 14px;
}

.recipient-pair {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.recipient-photo-card {
  display: grid;
  align-content: end;
  min-height: 180px;
  padding: 13px;
  overflow: hidden;
  border-radius: 8px;
  color: #fff;
  text-decoration: none;
  background:
    linear-gradient(180deg, transparent 34%, rgba(0, 0, 0, 0.52)),
    linear-gradient(135deg, #8b5a12, #2f2111);
}

.recipient-photo-card.after {
  background:
    linear-gradient(180deg, transparent 34%, rgba(0, 0, 0, 0.48)),
    linear-gradient(135deg, #0a7d33, #12301e);
}

.recipient-photo-card img {
  width: 100%;
  height: 160px;
  object-fit: cover;
  border-radius: 6px;
}

.recipient-photo-card strong,
.recipient-photo-card span,
.recipient-image-state {
  position: relative;
  z-index: 1;
}

.recipient-photo-card span {
  color: rgba(255, 255, 255, 0.84);
}

.recipient-image-state {
  align-self: start;
  width: max-content;
  max-width: 100%;
  padding: 5px 8px;
  border-radius: 8px;
  color: #fff;
  font-size: 13px;
  font-weight: 900;
  background: rgba(11, 15, 20, 0.42);
}

.recipient-lightbox {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 120;
  padding: 24px;
  background: rgba(11, 15, 20, 0.82);
}

.recipient-lightbox:target {
  display: grid;
  place-items: center;
}

.recipient-lightbox-card {
  width: min(92vw, 860px);
  min-height: 70vh;
}

.recipient-lightbox-card img {
  height: min(62vh, 560px);
}

.recipient-lightbox-close {
  position: fixed;
  top: 18px;
  right: 18px;
  z-index: 121;
  padding: 9px 12px;
  border-radius: 8px;
  color: var(--ink);
  font-weight: 900;
  text-decoration: none;
  background: #fff;
}

.recipient-section,
.recipient-section-grid {
  padding-top: 4px;
}

.recipient-footer {
  padding-top: 14px;
  border-top: 1px solid var(--line);
}

.recipient-abuse-link {
  width: max-content;
  max-width: 100%;
  padding: 6px 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--ink);
  font-size: 13px;
  font-weight: 900;
  text-decoration: none;
  background: var(--sunken);
}

.legal-link-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.legal-link {
  text-align: center;
  text-decoration: none;
}

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.similar-filter-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.chip,
.tier {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  padding: 5px 9px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  font-size: 14px;
  font-weight: 700;
  background: #fff;
}

.chip.active {
  border-color: var(--primary);
  color: var(--primary-dark);
  background: #eaf1ff;
}

.tier.nominal,
.chip.saved {
  border-color: #b7dec4;
  color: var(--success);
  background: #edf8f0;
}

.chip.advisory {
  border-color: #e7c78b;
  color: var(--warning);
  background: #fff7e6;
}

.chip.alert {
  border-color: #ebb8b4;
  color: var(--danger);
  background: #fff0ef;
}

.tier.advisory {
  border-color: #e7c78b;
  color: var(--warning);
  background: #fff7e6;
}

.similar-summary {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  gap: 12px;
  align-items: center;
  padding: 16px;
  border: 1px solid #b7dec4;
  border-radius: 8px;
  background: #f5fbf7;
}

.similar-summary span:first-child {
  display: block;
  color: var(--muted);
  font-size: 14px;
  font-weight: 800;
  text-transform: uppercase;
}

.similar-summary strong {
  display: block;
  margin-top: 4px;
  font-size: 22px;
}

.similar-summary p,
.not-counted p {
  margin-bottom: 0;
}

.similar-table-wrap {
  overflow-x: auto;
  border-radius: 8px;
}

.similar-table-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  min-width: 260px;
}

.similar-exclude-label {
  align-self: center;
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0;
  text-transform: uppercase;
}

.not-counted {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.not-counted summary {
  min-height: 56px;
  padding: 16px;
  color: var(--ink);
  cursor: pointer;
  font-size: 18px;
  font-weight: 900;
}

.not-counted .list {
  padding: 0 16px 16px;
}

.tier.alert {
  border-color: #ebb8b4;
  color: var(--danger);
  background: #fff0ef;
}

.field {
  display: grid;
  gap: 6px;
  min-width: 0;
}

.field label {
  color: var(--ink);
  font-size: 14px;
  font-weight: 800;
}

.field small {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.field input,
.field select,
.field textarea {
  width: 100%;
  min-width: 0;
  min-height: 48px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
}

.field input {
  overflow: hidden;
  text-overflow: ellipsis;
}

.field textarea {
  min-height: 92px;
  resize: vertical;
}

.brand-color-field input[type="color"] {
  width: 76px;
  padding: 4px;
}

.brand-settings-preview,
.artifact-brand-preview {
  display: grid;
  gap: 6px;
  padding: 12px;
  border: 1px solid var(--soft-line);
  border-left: 5px solid var(--packet-accent, var(--ink));
  border-radius: 8px;
  background: #fff;
}

.brand-settings-preview span,
.artifact-brand-preview span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.brand-settings-preview .packet-brand-name,
.artifact-brand-preview .packet-brand-name {
  color: var(--ink);
}

.field-voice-control {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  align-items: stretch;
  width: 100%;
  min-width: 0;
}

.field-voice-control.textarea-control {
  grid-template-columns: 1fr;
}

.field-voice-control > input,
.field-voice-control > textarea {
  min-width: 0;
}

.field-voice-button {
  align-self: stretch;
  min-width: 48px;
  min-height: 48px;
  white-space: normal;
}

.field-voice-button.listening {
  border-color: #efb8b3;
  background: #fff0ef;
  color: var(--danger);
}

.field-voice-status {
  grid-column: 1 / -1;
  min-height: 18px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.field-voice-status.saved {
  color: var(--success);
}

.field-voice-status.advisory,
.field-voice-status.recording {
  color: var(--warning);
}

.engine-input-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 10px;
}

.engine-input-field {
  min-width: 0;
}

.engine-input-field.wide {
  grid-column: 1 / -1;
}

.engine-input-field textarea {
  min-height: 76px;
}

.unit-input {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  min-width: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.unit-input input {
  width: 100%;
  min-width: 0;
  min-height: 52px;
  border: 0;
  padding: 10px 12px;
  background: transparent;
}

.unit-input span {
  min-width: 42px;
  padding: 0 12px;
  color: var(--muted);
  white-space: nowrap;
  font-weight: 800;
}

.engine-row-list {
  display: grid;
  gap: 8px;
}

.engine-assumption-list {
  display: grid;
  gap: 8px;
}

.engine-assumption-row {
  display: grid;
  gap: 4px;
}

.engine-assumption-row span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
}

.engine-assumption-row textarea {
  min-height: 58px;
  padding: 9px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  resize: vertical;
}

.engine-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(108px, 0.42fr) max-content;
  gap: 8px;
  align-items: center;
  min-width: 0;
  min-height: 58px;
  padding: 10px;
  border: 1px solid var(--soft-line);
  border-radius: 8px;
  background: #fff;
}

.engine-row > input {
  width: 100%;
  min-width: 0;
  min-height: 52px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.engine-result-card {
  display: grid;
  gap: 12px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.engine-run-shell {
  align-items: start;
}

.engine-run-shell .panel-head,
.engine-run-shell .panel-body,
.engine-run-shell .panel-foot,
.engine-run-shell .card {
  padding: 16px;
}

.engine-run-shell .panel-head p,
.engine-run-shell .card p,
.engine-run-shell .notice-card p {
  margin-bottom: 0;
}

.engine-run-shell .list {
  gap: 8px;
}

.engine-run-shell .list-row {
  grid-template-columns: minmax(0, 1fr) max-content;
  gap: 8px;
  min-width: 0;
  min-height: 56px;
  padding: 10px;
  text-align: left;
}

.engine-run-shell .list-row.locked {
  background: #fff8ef;
  border-color: #f1d2a6;
}

.engine-run-shell .list-row strong {
  display: block;
  line-height: 1.15;
}

.engine-run-shell .list-row p {
  margin: 2px 0 0;
  font-size: 14px;
  line-height: 1.25;
}

.engine-run-shell .tier,
.engine-run-shell .chip {
  white-space: nowrap;
}

.engine-list-status {
  display: grid;
  gap: 6px;
  justify-items: end;
}

.engine-group-title {
  margin: 12px 0 2px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 900;
  letter-spacing: 0.4px;
  text-transform: uppercase;
}

.engine-group-list .engine-group-title:first-child {
  margin-top: 0;
}

.engine-list-item {
  display: flex;
  gap: 10px;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  min-height: 56px;
  padding: 10px 12px;
  border: 1px solid var(--soft-line);
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  text-align: left;
}

.engine-list-item.active {
  border-color: var(--primary);
  background: #eaf1ff;
}

.engine-list-item.locked .engine-list-main {
  opacity: 0.72;
}

.engine-list-main {
  min-width: 0;
}

.engine-list-main strong {
  display: block;
  font-size: 15px;
  line-height: 1.25;
}

.engine-list-main small {
  display: block;
  margin-top: 2px;
  color: var(--muted);
  font-size: 12.5px;
  line-height: 1.3;
}

.engine-list-meta {
  display: grid;
  flex: 0 0 auto;
  gap: 4px;
  justify-items: end;
}

.engine-id-chip {
  display: inline-block;
  padding: 1px 7px;
  border: 1px solid var(--soft-line);
  border-radius: 6px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.3px;
}

.engine-list-meta .chip {
  min-height: 24px;
  padding: 2px 7px;
  font-size: 11px;
}

.engine-access-card {
  border-color: #f1d2a6;
  background: #fff8ef;
}

.engine-access-card .button-row {
  margin-top: 10px;
}

.engine-detail-list {
  display: grid;
  gap: 6px;
  padding: 12px;
  border: 1px solid var(--soft-line);
  border-radius: 8px;
  background: #fafafa;
}

.engine-detail-list p {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
  font-weight: 750;
  line-height: 1.45;
}

.engine-refusal-note {
  display: grid;
  gap: 6px;
  margin-top: 4px;
}

.engine-required-actions,
.engine-secondary-actions {
  justify-content: flex-start;
}

.engine-required-actions > button {
  min-height: 56px;
}

.engine-secondary-actions {
  padding-top: 4px;
  border-top: 1px solid var(--soft-line);
}

.engine-clock-panel {
  display: grid;
  gap: 12px;
}

.engine-clock-list {
  display: grid;
  gap: 10px;
}

.engine-clock-card {
  display: grid;
  gap: 10px;
  min-width: 0;
}

.engine-clock-card .button-row {
  justify-content: flex-start;
}

.engine-math {
  display: grid;
  gap: 10px;
}

.trust-strip {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  padding: 12px;
  border: 1px solid #b7dec4;
  border-radius: 8px;
  background: #edf8f0;
  color: var(--success);
  font-weight: 800;
}

.sync-summary-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.sync-summary-grid > div {
  display: grid;
  gap: 2px;
  min-height: 74px;
  padding: 12px;
  border: 1px solid var(--soft-line);
  border-radius: 8px;
  background: #fff;
}

.sync-summary-grid strong {
  font-size: 24px;
  line-height: 1;
}

.sync-summary-grid span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.sync-section {
  display: grid;
  gap: 10px;
}

.sync-queue-list {
  display: grid;
  gap: 10px;
}

.sync-queue-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  padding: 12px;
  border: 1px solid var(--soft-line);
  border-radius: 8px;
  background: #fff;
}

.sync-queue-row.error {
  border-color: #e7c78b;
  background: #fffaf0;
}

.sync-queue-row.inflight {
  border-color: #a9c5f7;
  background: #f3f7ff;
}

.sync-queue-row.done {
  border-color: #b7dec4;
  background: #f5fbf7;
}

.sync-queue-row p,
.sync-queue-row small {
  display: block;
  margin-top: 4px;
  color: var(--muted);
}

.sync-queue-row small {
  font-size: 13px;
  font-weight: 700;
}

.sync-queue-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.sync-storage-meter {
  overflow: hidden;
  height: 10px;
  border-radius: 999px;
  background: #eef0f3;
}

.sync-storage-meter span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: var(--primary);
}

.phone-row {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.phone {
  min-height: 540px;
  border: 10px solid #141923;
  border-radius: 28px;
  background: #fff;
  overflow: hidden;
}

.phone-screen {
  display: flex;
  flex-direction: column;
  min-height: 520px;
  padding: 14px;
  gap: 12px;
  background: var(--sunken);
}

.phone .bottom-action {
  margin-top: auto;
}

.launchpad-panel .panel-foot {
  position: sticky;
  bottom: 0;
  z-index: 2;
}

.launchpad-panel .panel-foot .primary {
  flex: 1 1 260px;
}

.launchpad-identity,
.launchpad-fields {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
}

.launchpad-fields {
  grid-template-columns: minmax(180px, 0.7fr) minmax(0, 1.3fr);
  align-items: stretch;
}

.launchpad-checklist {
  display: grid;
  gap: 12px;
  padding: 14px;
  border: 1px solid var(--soft-line);
  border-radius: 8px;
  background: #f8fafc;
}

.launchpad-checklist p {
  margin-bottom: 0;
}

.launchpad-items {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.launchpad-item {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 36px;
  padding: 6px 10px;
  border: 1px solid var(--soft-line);
  border-radius: 8px;
  background: #fff;
  color: var(--muted);
  font-size: 14px;
  font-weight: 800;
}

.launchpad-item.photo-gated {
  border-color: #b7dec4;
  color: var(--ink);
}

.camera-glyph,
.tap-glyph {
  position: relative;
  display: inline-block;
  flex: 0 0 auto;
  width: 18px;
  height: 14px;
  border: 2px solid currentColor;
  border-radius: 4px;
}

.camera-glyph::before {
  content: "";
  position: absolute;
  top: -5px;
  left: 3px;
  width: 8px;
  height: 5px;
  border: 2px solid currentColor;
  border-bottom: 0;
  border-radius: 4px 4px 0 0;
}

.camera-glyph::after {
  content: "";
  position: absolute;
  top: 3px;
  left: 5px;
  width: 4px;
  height: 4px;
  border: 2px solid currentColor;
  border-radius: 999px;
}

.tap-glyph {
  width: 13px;
  height: 13px;
  border-radius: 999px;
  background: currentColor;
}

.capture-launch-card .launchpad-checklist {
  padding: 12px;
  background: #fff;
}

.capture-label-rail {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.task-close-camera-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px;
  border: 1px solid #d8b35d;
  border-radius: 8px;
  background: #fff8e6;
}

.task-close-camera-card p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 14px;
  font-weight: 800;
}

.camera-view {
  position: relative;
  display: grid;
  min-height: 340px;
  place-items: center;
  overflow: hidden;
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(8, 68, 185, 0.28), rgba(0, 59, 53, 0.34)),
    repeating-linear-gradient(45deg, #17212b 0 18px, #111922 18px 36px);
}

.camera-view.blocked {
  box-shadow: inset 0 0 0 3px rgba(179, 38, 30, 0.55);
}

.camera-video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  background: #0b0f14;
}

.camera-ghost-frame {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  opacity: 0.3;
}

.camera-ghost-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: saturate(0.82) contrast(1.08);
}

.camera-stamp {
  position: absolute;
  z-index: 2;
  top: 12px;
  left: 12px;
  padding: 7px 10px;
  border-radius: 8px;
  background: rgba(11, 15, 20, 0.86);
  color: #fff;
  font-size: 14px;
  font-weight: 800;
}

.camera-section-pill {
  position: absolute;
  z-index: 2;
  right: 12px;
  top: 12px;
  padding: 7px 10px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.9);
  color: var(--ink);
  font-size: 12px;
  font-weight: 900;
}

.capture-mode {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.capture-entry-banner {
  display: grid;
  gap: 4px;
  padding: 12px;
  border: 1px solid #b7dec4;
  border-radius: 8px;
  background: #edf8f0;
  color: var(--primary-dark);
  font-weight: 850;
}

.capture-entry-banner span {
  color: var(--ink);
  font-size: 14px;
  font-weight: 800;
}

.standard-chip {
  border-style: dashed;
}

.shutter {
  position: relative;
  z-index: 2;
  display: grid;
  width: 94px;
  height: 94px;
  place-items: center;
  border: 6px solid #fff;
  border-radius: 999px;
  background: var(--primary);
  box-shadow: 0 0 0 4px rgba(11, 15, 20, 0.18);
  color: #fff;
  font-size: 13px;
  font-weight: 900;
  letter-spacing: 0;
  text-transform: uppercase;
}

.capture-empty-hint {
  min-width: 280px;
  margin: 0;
  padding: 12px;
  border: 1px solid var(--soft-line);
  border-radius: 8px;
  color: var(--muted);
  background: #fff;
  font-weight: 800;
}

.filmstrip {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(190px, 100%), 1fr));
  gap: 8px;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  overflow-x: hidden;
}

.thumb-card {
  display: grid;
  gap: 7px;
  min-width: 0;
  width: 100%;
  overflow: hidden;
  padding: 9px;
  border: 1px solid var(--soft-line);
  border-radius: 8px;
  background: #fff;
}

.thumb-card.active {
  border-color: #b7dec4;
  background: #f8fcf9;
}

.thumb-card.latest-saved {
  animation: thumb-slide-in 260ms ease-out;
  box-shadow: inset 0 0 0 2px rgba(10, 125, 51, 0.22);
}

.thumb-card.failed {
  border-color: #efb8b3;
  background: #fff7f6;
}

@keyframes thumb-slide-in {
  from {
    opacity: 0.25;
    transform: translateX(-14px);
  }

  to {
    opacity: 1;
    transform: translateX(0);
  }
}

.thumb-card strong,
.thumb-card span {
  display: block;
}

.thumb-card span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.thumb-card .photo-location-chip {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  max-width: 100%;
  min-height: 24px;
  padding: 4px 8px;
  border: 1px solid var(--soft-line);
  border-radius: 999px;
  color: var(--muted);
  background: var(--sunken);
}

.thumb-card .photo-location-chip.saved {
  border-color: #b7dec4;
  color: var(--primary-dark);
  background: #f5fbf7;
}

.video-strip {
  display: grid;
  gap: 10px;
  padding: 12px;
  border: 1px solid var(--soft-line);
  border-radius: 8px;
  background: #f8fafc;
}

.video-strip .row {
  min-width: 0;
}

.video-strip p {
  margin: 3px 0 0;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.tow-scene-sidecar {
  gap: 12px;
}

.tow-scene-list {
  display: grid;
  gap: 8px;
}

.tow-scene-row {
  display: grid;
  gap: 8px;
  padding: 10px;
  border: 1px solid var(--soft-line);
  border-radius: 8px;
  background: #fff;
}

.tow-scene-row.needs-manual {
  border-color: #d8b35d;
  background: #fff8e6;
}

.tow-scene-row span {
  display: block;
  margin-top: 3px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.tow-scene-manual {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  align-items: end;
}

.video-card {
  display: grid;
  grid-template-columns: 96px minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  padding: 10px;
  border: 1px solid var(--soft-line);
  border-radius: 8px;
  background: #fff;
}

.video-card.empty {
  grid-template-columns: 1fr;
}

.video-card.backed-up {
  border-color: #b7dec4;
  background: #f8fcf9;
}

.video-card.inflight {
  border-color: #f2cd7a;
  background: #fffaf0;
}

.video-card strong,
.video-card span {
  display: block;
  min-width: 0;
  overflow-wrap: anywhere;
}

.video-card span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.video-poster {
  display: grid;
  width: 96px;
  aspect-ratio: 16 / 9;
  place-items: center;
  overflow: hidden;
  border-radius: 6px;
  background:
    linear-gradient(135deg, rgba(3, 88, 120, 0.4), rgba(0, 59, 53, 0.4)),
    repeating-linear-gradient(45deg, #101820 0 10px, #17212b 10px 20px);
  color: #fff;
  font-size: 12px;
  font-weight: 900;
}

.video-poster img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.photo-standard {
  display: grid;
  gap: 8px;
  padding: 12px;
  border: 1px solid #e7c78b;
  border-radius: 8px;
  background: #fff9ec;
}

.camera-standard-sheet {
  position: absolute;
  right: 12px;
  bottom: 12px;
  left: 12px;
  z-index: 3;
  max-height: 46%;
  overflow: auto;
  background: rgba(255, 249, 236, 0.96);
  box-shadow: 0 16px 34px rgba(11, 15, 20, 0.2);
  backdrop-filter: blur(8px);
}

.thumb {
  position: relative;
  min-width: 76px;
  height: 58px;
  border-radius: 8px;
  background: linear-gradient(135deg, #a7b4c5, #eef3f8);
  overflow: hidden;
}

/* A photo record without displayable bytes on this device gets a designed
   placeholder instead of a blank gray gradient. */
.thumb:not(.has-media) {
  display: grid;
  place-items: center;
  border: 2px dashed var(--line);
  background: #fbfcfe;
}

.thumb:not(.has-media)::before {
  content: "Saved · no preview";
  padding: 0 8px;
  color: var(--muted);
  font-size: 10px;
  font-weight: 800;
  line-height: 1.25;
  text-align: center;
}

.thumb.has-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.thumb::after {
  content: "";
  position: absolute;
  right: 6px;
  bottom: 6px;
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: var(--success);
}

.thumb.failed::after {
  background: var(--danger);
}

.capture-dot {
  display: inline-block;
  width: 10px;
  height: 10px;
  margin-right: 7px;
  border-radius: 999px;
  vertical-align: middle;
}

.capture-dot.saved {
  background: var(--success);
}

.capture-dot.failed {
  background: var(--danger);
}

.capture-recovery-stack {
  display: grid;
  gap: 12px;
  align-content: start;
}

.capture-recovery-card {
  display: grid;
  gap: 9px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  box-shadow: var(--shadow);
}

.capture-recovery-card h3,
.capture-recovery-card p {
  margin: 0;
}

.capture-recovery-card.ready {
  border-color: #b7dec4;
}

.capture-recovery-card.advisory {
  border-color: #e7c78b;
  background: #fff9ec;
}

.capture-recovery-card.alert {
  border-color: #efb8b3;
  background: #fff7f6;
}

.quick-target-row,
.quick-proof-toggle {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}

.quick-proof-toggle span {
  color: var(--muted);
  font-size: 14px;
  font-weight: 700;
}

.quick-task-list,
.finish-review-list {
  display: grid;
  gap: 10px;
}

.quick-task-row,
.finish-review-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  gap: 12px;
  align-items: center;
  min-height: 72px;
  padding: 12px;
  border: 1px solid var(--soft-line);
  border-radius: 8px;
  background: #fff;
}

.quick-task-row.done,
.finish-review-row.ready {
  border-color: #b7dec4;
  background: #f8fcf9;
}

.finish-review-row.advisory,
.quick-task-row.open {
  border-color: #e7c78b;
  background: #fff9ec;
}

.quick-task-row p,
.finish-review-row p {
  margin: 3px 0 0;
}

.material-entry,
.material-row-list,
.duration-chip-row {
  display: grid;
  gap: 10px;
}

.material-field-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(128px, 1fr));
  gap: 10px;
}

.material-reading-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(128px, 1fr));
  gap: 10px;
}

.material-sds-photo-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) max-content;
  gap: 10px;
  align-items: end;
  padding: 12px;
  border: 1px solid var(--soft-line);
  border-radius: 8px;
  background: #fff;
}

.material-note {
  grid-column: span 2;
}

.material-memory-line {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border: 1px solid var(--soft-line);
  border-radius: 8px;
  background: #f7faf9;
}

.material-memory-line span {
  min-width: 0;
}

.material-loadout,
.time-summary,
.time-entry-card,
.time-variance-card,
.crew-chip-card {
  display: grid;
  gap: 12px;
  align-items: center;
  padding: 14px;
  border: 1px solid var(--soft-line);
  border-radius: 8px;
  background: #fff;
}

.material-loadout,
.time-summary {
  grid-template-columns: minmax(0, 1fr) auto;
}

.material-loadout.ready,
.time-summary.saved,
.time-variance-card.saved {
  border-color: #b7dec4;
  background: #f8fcf9;
}

.material-loadout.advisory,
.time-summary.advisory,
.time-variance-card.advisory {
  border-color: #e7c78b;
  background: #fff9ec;
}

.material-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  gap: 12px;
  align-items: center;
  padding: 12px;
  border: 1px solid var(--soft-line);
  border-radius: 8px;
  background: #fff;
}

.material-row.saved {
  border-color: #b7dec4;
  background: #f8fcf9;
}

.material-row.advisory {
  border-color: #e7c78b;
  background: #fff9ec;
}

.material-row p,
.material-row span,
.material-memory-line,
.material-loadout p,
.time-summary p,
.time-entry-card p,
.time-variance-card p,
.crew-chip-card p {
  margin: 3px 0 0;
}

.time-summary strong {
  display: block;
  font-size: 34px;
  line-height: 1;
}

.scope-entry,
.scope-order-list {
  display: grid;
  gap: 12px;
}

.scope-add-grid,
.scope-ack-grid {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) minmax(120px, 0.42fr) minmax(120px, 0.42fr);
  gap: 10px;
  align-items: end;
}

.scope-description textarea {
  min-height: 90px;
}

.scope-reason-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: end;
}

.scope-ack-state,
.scope-order-row {
  display: grid;
  gap: 8px;
  padding: 12px;
  border: 1px solid var(--soft-line);
  border-radius: 8px;
  background: #fff;
}

.scope-ack-state.saved,
.scope-order-row.saved {
  border-color: #b7dec4;
  background: #f8fcf9;
}

.scope-ack-state.advisory,
.scope-order-row.advisory {
  border-color: #e7c78b;
  background: #fff9ec;
}

.scope-ack-state span,
.scope-order-row p {
  color: var(--muted);
  font-size: 14px;
}

.scope-order-row {
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: start;
}

.scope-order-row .button-row {
  grid-column: 1 / -1;
  justify-content: flex-start;
}

.search-box {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto auto;
  gap: 10px;
  align-items: end;
}

.search-scope-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.search-summary {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  color: var(--muted);
}

.search-summary strong {
  color: var(--ink);
}

.search-results-card {
  display: grid;
  gap: 10px;
  min-width: 0;
  overflow: hidden;
  border: 1px solid var(--soft-line);
  border-radius: 8px;
  background: #fff;
}

.search-results-card > .row,
.search-results-card > .ghost {
  margin: 0;
}

.search-results-card > .row {
  padding: 12px 12px 0;
}

.search-results-card > .ghost {
  justify-self: stretch;
  width: auto;
  margin: 0 12px 12px;
}

.search-result-list {
  display: grid;
  min-width: 0;
}

.search-result-row {
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr) auto auto;
  gap: 12px;
  align-items: center;
  min-height: 76px;
  padding: 12px;
  border-top: 1px solid var(--soft-line);
}

.search-result-row:first-child {
  border-top: 0;
}

.search-result-row p,
.search-result-row span {
  margin: 3px 0 0;
  color: var(--muted);
}

.search-result-icon {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border-radius: 8px;
  color: #fff;
  font-size: 13px;
  font-weight: 900;
  background: linear-gradient(135deg, var(--primary), #0f8a45);
}

.search-result-row.close .search-result-icon {
  color: #7c4b00;
  background: #fff1c7;
  border: 1px solid #e7c78b;
}

.search-status-list {
  display: grid;
  gap: 10px;
}

.search-status-list div {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 10px;
  align-items: center;
}

.search-status-list p {
  margin: 0;
  color: var(--muted);
}

.customer-profile-grid,
.customer-contact-draft {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.customer-block,
.customer-preference-list,
.customer-contact-list,
.customer-property-list {
  display: grid;
  gap: 10px;
}

.customer-mini-row,
.customer-contact-row,
.customer-property-row {
  display: grid;
  gap: 12px;
  align-items: center;
  padding: 12px;
  border: 1px solid var(--soft-line);
  border-radius: 8px;
  background: #fff;
}

.customer-mini-row {
  grid-template-columns: minmax(0, 1fr) auto auto;
}

.customer-shell .route-readiness {
  align-items: flex-start;
  flex-direction: column;
}

.customer-shell .route-readiness button {
  width: 100%;
}

.customer-contact-row {
  grid-template-columns: minmax(0, 1.4fr) minmax(180px, 0.8fr) minmax(180px, 0.8fr);
}

.customer-property-row {
  grid-template-columns: minmax(0, 1.2fr) minmax(120px, 0.55fr) auto minmax(220px, 0.8fr);
}

.customer-add-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: end;
}

.customer-mini-row p,
.customer-contact-row p,
.customer-property-row p {
  margin: 3px 0 0;
  color: var(--muted);
}

.team-seat-summary,
.role-boundary-strip,
.role-boundary-actions,
.team-member-row,
.team-invite-grid,
.team-share-grid,
.team-invite-row,
.team-remove-card,
.team-join-preview {
  display: grid;
  gap: 12px;
  align-items: center;
}

.team-seat-summary {
  grid-template-columns: minmax(190px, 0.55fr) minmax(0, 1fr) auto;
  padding: 14px;
  border: 1px solid var(--soft-line);
  border-radius: 8px;
  background: #fff;
}

.role-boundary-strip {
  grid-template-columns: minmax(0, 1fr) auto;
  padding: 14px;
  border: 1px solid #cfd8dd;
  border-radius: 8px;
  background: #f4f8f6;
}

.role-boundary-strip p,
.role-boundary-panel .footer-note {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.role-boundary-actions {
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
}

.team-seat-count {
  display: flex;
  align-items: center;
  gap: 12px;
}

.team-seat-count strong {
  display: block;
  font-size: 30px;
  line-height: 1;
}

.team-seat-count p,
.team-progress-block p,
.team-member-row p,
.team-member-row span,
.team-invite-row p,
.team-code-card p,
.team-join-preview p {
  margin: 3px 0 0;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.team-avatar {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  flex: 0 0 auto;
  border: 1px solid #b7dec4;
  border-radius: 50%;
  color: var(--primary-dark);
  font-weight: 900;
  background: #dff0e4;
}

.team-avatar.large {
  width: 56px;
  height: 56px;
  border-color: var(--line);
  color: var(--ink);
  background: var(--sunken);
}

.team-progress-block {
  display: grid;
  gap: 7px;
}

.team-progress {
  height: 10px;
  overflow: hidden;
  border-radius: 999px;
  background: #e8ece8;
}

.team-progress span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--success), #77b96f);
}

.team-block,
.team-member-list,
.team-invite-list {
  display: grid;
  gap: 10px;
}

.team-shell .panel-body.stack {
  display: flex;
  flex-direction: column;
}

.team-member-row {
  grid-template-columns: minmax(200px, 1fr) minmax(130px, 0.45fr) minmax(150px, 0.52fr);
  min-height: 86px;
  padding: 12px;
  border: 1px solid var(--soft-line);
  border-radius: 8px;
  background: #fff;
}

.team-member-row.invited {
  border-color: #e7c78b;
  background: #fff9ec;
}

.team-member-row.removed {
  opacity: 0.72;
  background: var(--sunken);
}

.team-member-id {
  display: flex;
  gap: 10px;
  align-items: center;
  min-width: 0;
}

.compact-field {
  gap: 4px;
}

.team-status-block,
.team-row-actions {
  grid-column: 1 / -1;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
}

.team-invite-grid {
  grid-template-columns: minmax(220px, 1fr) minmax(130px, 0.44fr) minmax(150px, 0.5fr) auto;
  align-items: end;
}

.team-share-grid {
  grid-template-columns: minmax(0, 0.8fr) minmax(0, 1fr);
  align-items: stretch;
}

.team-code-card,
.team-qr-card {
  display: grid;
  gap: 10px;
  padding: 12px;
  border: 1px solid var(--soft-line);
  border-radius: 8px;
  background: #fff;
}

.team-code-card div {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
}

.team-code-card span {
  display: inline-flex;
  align-items: center;
  min-height: 38px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  font-size: 20px;
  font-weight: 900;
  letter-spacing: 0;
  background: var(--sunken);
}

.team-qr {
  display: inline-grid;
  width: min(100%, 164px);
  aspect-ratio: 1;
  place-items: center;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--ink);
  background: #fff;
}

.team-qr-svg {
  display: block;
  width: 100%;
  height: 100%;
  image-rendering: pixelated;
}

.team-invite-row {
  grid-template-columns: minmax(0, 1fr) auto auto minmax(220px, 0.72fr);
  min-height: 68px;
  padding: 12px;
  border: 1px solid var(--soft-line);
  border-radius: 8px;
  background: #fff;
}

.team-remove-card {
  grid-template-columns: 1fr;
  align-items: start;
  border: 1px solid #ebb8b4;
  border-radius: 8px;
  padding: 14px;
  background: #fff7f6;
}

.team-remove-card.role-limited {
  grid-template-columns: minmax(0, 1fr) auto;
  border-color: var(--soft-line);
  background: #fff;
}

.account-switcher,
.account-switch-list {
  display: grid;
  gap: 10px;
}

.account-switch-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  padding: 12px;
  border: 1px solid var(--soft-line);
  border-radius: 8px;
  background: #fff;
}

.account-switch-row.active {
  border-color: #b7dec4;
  background: #f4faf5;
}

.account-switch-row p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.team-remove-card p {
  margin: 4px 0 0;
  color: var(--muted);
}

.team-timeline .timeline-row {
  border-left-color: var(--success);
}

.team-join-preview {
  grid-template-columns: auto minmax(0, 1fr);
}

.billing-current-card,
.billing-cycle-row,
.billing-plan-grid,
.billing-math-grid,
.billing-addon-grid,
.billing-checkout-card,
.billing-invoice-row {
  display: grid;
  gap: 12px;
  align-items: center;
}

.billing-current-card {
  width: 100%;
  min-width: 0;
  grid-template-columns: minmax(0, 1fr) minmax(160px, auto);
  padding: 14px;
  border: 1px solid #b7dec4;
  border-radius: 8px;
  background: #f8fcf9;
}

.billing-current-card > * {
  min-width: 0;
}

.billing-current-card button {
  grid-column: 1 / -1;
  justify-self: start;
}

.billing-current-card h3 {
  margin: 4px 0;
}

.billing-current-card p,
.billing-current-math span,
.billing-plan-card p,
.billing-math-card p,
.billing-checkout-card p,
.billing-invoice-row p,
.billing-cycle-row span {
  margin: 3px 0 0;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.billing-current-math strong {
  display: block;
  font-size: 28px;
  line-height: 1;
}

.billing-cycle-row {
  grid-template-columns: auto auto minmax(0, 1fr);
  padding: 12px;
  border: 1px solid var(--soft-line);
  border-radius: 8px;
  background: #fff;
}

.billing-plan-grid {
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  align-items: stretch;
}

.billing-sku-section {
  display: grid;
  gap: 12px;
}

.billing-collapse {
  border: 1px solid var(--soft-line);
  border-radius: 10px;
  background: #fff;
}

.billing-collapse-toggle {
  display: flex;
  gap: 12px;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  min-height: 56px;
  padding: 12px 14px;
  border-radius: 10px;
  background: transparent;
  text-align: left;
}

.billing-collapse-toggle strong {
  display: block;
}

.billing-collapse-toggle small {
  display: block;
  margin-top: 2px;
  color: var(--muted);
  font-size: 13px;
}

.billing-collapse-chevron {
  flex: 0 0 auto;
  color: var(--muted);
  font-size: 14px;
}

.billing-collapse-body {
  padding: 2px 14px 14px;
}

.billing-cancel-link {
  width: auto;
  font-weight: 700;
}

.reset-local-card {
  border-color: #ebb8b4;
  box-shadow: inset 4px 0 0 var(--danger);
  background: #fff6f5;
}

.billing-sku-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 10px;
}

.billing-plan-card,
.billing-sku-card,
.billing-math-card,
.billing-checkout-card,
.billing-invoice-row {
  padding: 12px;
  border: 1px solid var(--soft-line);
  border-radius: 8px;
  background: #fff;
}

.billing-plan-card {
  align-content: start;
  min-width: 0;
}

.billing-sku-card {
  min-width: 0;
  display: grid;
  align-content: start;
  gap: 10px;
}

.billing-sku-card p {
  margin-bottom: 0;
}

.billing-sku-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.billing-plan-card .row {
  align-items: flex-start;
  flex-direction: column;
  gap: 4px;
}

.billing-plan-card.selected {
  border-color: #e7c78b;
  background: #fff9ec;
}

.billing-plan-card.current {
  border-color: #b7dec4;
  background: #f8fcf9;
}

.billing-price {
  display: flex;
  align-items: baseline;
  gap: 6px;
}

.billing-price strong {
  font-size: 32px;
  line-height: 1;
}

.billing-price span {
  color: var(--muted);
  font-weight: 900;
}

.billing-math-grid {
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  align-items: stretch;
}

.billing-math-card {
  align-content: start;
}

.billing-stepper {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
  padding: 10px;
  border: 1px solid var(--soft-line);
  border-radius: 8px;
  background: var(--sunken);
}

.billing-stepper strong {
  text-align: center;
}

.billing-addon-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.billing-addon {
  display: grid;
  gap: 4px;
  min-height: 92px;
  padding: 10px;
  border: 1px solid var(--soft-line);
  border-radius: 8px;
  color: var(--ink);
  text-align: left;
  background: #fff;
}

.billing-addon.selected {
  border-color: #b7dec4;
  background: #f8fcf9;
}

.billing-addon span,
.billing-addon small {
  color: var(--muted);
  font-weight: 800;
}

.billing-checkout-card {
  grid-template-columns: minmax(0, 1fr) auto;
  border-color: #b7dec4;
  background: #f8fcf9;
}

.billing-checkout-card strong {
  display: block;
  margin-top: 5px;
}

.billing-invoice-list {
  display: grid;
  gap: 8px;
}

.billing-invoice-row {
  grid-template-columns: minmax(0, 1fr) auto auto;
}

.duration-chip-row {
  display: flex;
  flex-wrap: wrap;
}

.packet-report-canvas {
  max-height: calc(100vh - 238px);
  overflow: auto;
  padding: 22px 22px 118px;
  background: #dfe5ec;
}

.packet-bottom-bar {
  position: fixed;
  right: 24px;
  bottom: 16px;
  left: 260px;
  z-index: 8;
  width: min(calc(100vw - 284px), 1360px);
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(242, 244, 247, 0.96);
  box-shadow: 0 18px 38px rgba(11, 15, 20, 0.16);
  backdrop-filter: blur(8px);
}

.packet-preview {
  position: relative;
  display: grid;
  gap: 16px;
  width: min(100%, 840px);
  min-width: 0;
  min-height: 860px;
  margin: 0 auto;
  padding: 30px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 20px 46px rgba(11, 15, 20, 0.16);
}

.packet-preview > * {
  min-width: 0;
}

.photo-block,
.recipient-photo-card {
  position: relative;
  overflow: hidden;
}

.photo-redaction-overlay {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.photo-redaction-box {
  position: absolute;
  display: grid;
  place-items: center;
  min-width: 78px;
  min-height: 34px;
  padding: 6px 10px;
  border: 2px solid rgba(17, 24, 39, 0.8);
  border-radius: 6px;
  color: #fff;
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
  background: rgba(17, 24, 39, 0.72);
  backdrop-filter: blur(8px);
}

.photo-redaction-box.r0 { top: 18%; left: 14%; }
.photo-redaction-box.r1 { top: 28%; right: 12%; }
.photo-redaction-box.r2 { bottom: 22%; left: 20%; }
.photo-redaction-box.r3 { bottom: 18%; right: 16%; }

.packet-report-header,
.packet-cover,
.packet-summary-grid,
.packet-control-row,
.packet-photo-order-list,
.packet-photo-order-row,
.packet-note-list,
.packet-note-row,
.cover-photo-grid,
.section-toggle-list {
  display: grid;
  gap: 12px;
}

.packet-report-header {
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: start;
  padding-bottom: 16px;
  border-bottom: 2px solid var(--packet-accent, var(--ink));
}

.packet-brand-block {
  display: grid;
  gap: 6px;
  min-width: 0;
}

.packet-report-header span,
.packet-report-header p,
.packet-report-meta {
  color: var(--muted);
  font-size: 14px;
  font-weight: 800;
}

.packet-report-header h2 {
  margin: 4px 0 6px;
  font-size: 26px;
}

.packet-report-header .packet-logo-badge,
.packet-report-header .packet-brand-name {
  color: #fff;
}

.packet-report-header .packet-brand-name {
  color: var(--ink);
}

.packet-brand-contact {
  margin: 0;
  max-width: 62ch;
}

.packet-report-meta {
  display: grid;
  justify-items: end;
  gap: 8px;
}

.packet-watermark {
  position: absolute;
  top: 118px;
  right: 28px;
  width: 190px;
  padding: 8px;
  transform: rotate(18deg);
  border: 1px solid #ccd5df;
  color: #667283;
  font-size: 13px;
  font-weight: 900;
  text-align: center;
  text-transform: uppercase;
  background: rgba(242, 244, 247, 0.88);
}

.packet-cover {
  grid-template-columns: minmax(220px, 0.9fr) minmax(0, 1.1fr);
  align-items: stretch;
}

.packet-summary-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin-top: 12px;
}

.packet-summary-grid div {
  padding: 10px;
  border: 1px solid var(--soft-line);
  border-radius: 8px;
  background: var(--sunken);
}

.packet-summary-grid strong,
.packet-summary-grid span,
.cover-choice span,
.cover-choice strong,
.cover-choice small,
.section-toggle strong,
.section-toggle small,
.packet-success strong,
.packet-success span,
.packet-control-row strong,
.packet-control-row span,
.packet-photo-order-row strong,
.packet-photo-order-row span,
.packet-note-row strong,
.packet-note-row span {
  display: block;
}

.packet-summary-grid strong {
  font-size: 22px;
}

.packet-summary-grid span,
.cover-choice span,
.cover-choice small,
.section-toggle small,
.packet-control-row span,
.packet-photo-order-row span,
.packet-note-row span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.packet-section {
  padding-top: 6px;
}

.packet-section h3 {
  padding-bottom: 6px;
  border-bottom: 1px solid var(--soft-line);
}

.packet-page-footer {
  position: sticky;
  bottom: -30px;
  padding-top: 14px;
  border-top: 1px solid var(--packet-accent, var(--line));
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
  background: #fff;
}

.photo-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.photo-block {
  display: grid;
  align-content: end;
  min-height: 148px;
  padding: 12px;
  border-radius: 8px;
  color: #fff;
  font-weight: 800;
  background:
    linear-gradient(180deg, transparent 36%, rgba(0, 0, 0, 0.5)),
    linear-gradient(135deg, #6b7280, #111827);
}

.photo-block img {
  position: absolute;
  inset: 0;
  z-index: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.photo-block.has-media::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.08) 24%, rgba(0, 0, 0, 0.64) 100%);
}

.photo-block-caption {
  position: relative;
  z-index: 2;
  display: grid;
  gap: 2px;
}

.photo-block-caption em {
  display: inline-flex;
  width: fit-content;
  max-width: 100%;
  padding: 4px 6px;
  border-radius: 6px;
  color: #fff;
  font-size: 11px;
  font-style: normal;
  font-weight: 900;
  background: rgba(17, 24, 39, 0.72);
}

.packet-cover .photo-block {
  min-height: 250px;
}

.photo-block span {
  font-size: 13px;
  text-transform: uppercase;
}

.photo-block strong {
  display: block;
  font-size: 22px;
}

.photo-block small {
  color: rgba(255, 255, 255, 0.82);
}

.photo-block.before {
  background:
    linear-gradient(180deg, transparent 36%, rgba(0, 0, 0, 0.52)),
    repeating-linear-gradient(125deg, rgba(255, 255, 255, 0.1) 0 9px, transparent 9px 24px),
    linear-gradient(135deg, #8b5a12, #2f2111);
}

.photo-block.after {
  background:
    linear-gradient(180deg, transparent 36%, rgba(0, 0, 0, 0.48)),
    repeating-linear-gradient(125deg, rgba(255, 255, 255, 0.12) 0 9px, transparent 9px 24px),
    linear-gradient(135deg, #0a7d33, #12301e);
}

.packet-status-card.ready {
  border-color: #b7dec4;
  background: #f8fcf9;
}

.packet-status-card.blocked,
.missing-proof-card,
.packet-error-card {
  border-color: #e7c78b;
  background: #fff9ec;
}

.packet-success {
  display: grid;
  gap: 8px;
  margin-top: 12px;
  padding: 12px;
  border: 1px solid #b7dec4;
  border-radius: 8px;
  background: #fff;
}

.packet-control-row {
  grid-template-columns: minmax(0, 1fr);
  padding: 12px;
  border: 1px solid #e7c78b;
  border-radius: 8px;
  background: #fff;
}

.packet-tier-note {
  margin: 10px 0 0;
  color: var(--muted);
  font-size: 13px;
  font-weight: 850;
}

.packet-preview-pagination {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
  padding: 10px 12px;
  border: 1px solid var(--soft-line);
  border-radius: 8px;
  background: #fff;
}

.packet-preview-pagination span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 900;
}

.packet-photo-order-row,
.packet-note-row {
  grid-template-columns: minmax(0, 1fr);
  padding: 10px;
  border: 1px solid var(--soft-line);
  border-radius: 8px;
  background: #fff;
}

.packet-photo-order-row {
  cursor: grab;
}

.packet-photo-order-row.dragging {
  border-color: #1f8a4c;
  box-shadow: 0 0 0 3px rgba(31, 138, 76, 0.14);
  opacity: 0.74;
}

.packet-note-row p {
  margin: 6px 0 0;
  color: var(--ink);
  font-size: 13px;
  font-weight: 700;
}

.packet-note-row.removed {
  opacity: 0.72;
  background: #f6f7f9;
}

.artifact-catalog,
.artifact-review,
.artifact-picker,
.artifact-preview-lines {
  display: grid;
  gap: 12px;
}

.artifact-picker {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  max-height: 360px;
  overflow: auto;
  padding-right: 4px;
}

.artifact-choice {
  min-height: 84px;
  padding: 10px;
  border: 1px solid var(--soft-line);
  border-radius: 8px;
  color: var(--ink);
  text-align: left;
  background: #fff;
}

.artifact-choice.active {
  border-color: #b7dec4;
  box-shadow: inset 4px 0 0 var(--success);
  background: #f8fcf9;
}

.artifact-choice strong,
.artifact-choice span,
.artifact-preview-lines > div {
  display: block;
}

.artifact-choice span {
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.artifact-review {
  padding: 12px;
  border: 1px solid var(--soft-line);
  border-radius: 8px;
  background: #fff;
}

.artifact-preview-lines {
  max-height: 300px;
  overflow: auto;
}

.artifact-preview-lines .artifact-brand-preview {
  padding: 12px;
  border-radius: 8px;
  background: #fff;
}

.artifact-preview-lines > div {
  padding: 9px 10px;
  border: 1px solid var(--soft-line);
  border-radius: 6px;
  color: var(--ink);
  font-size: 13px;
  font-weight: 750;
  background: var(--sunken);
}

.artifact-qr {
  justify-self: start;
  width: min(220px, 100%);
}

.cover-photo-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.cover-choice,
.section-toggle {
  min-height: 74px;
  padding: 10px;
  border: 1px solid var(--soft-line);
  border-radius: 8px;
  color: var(--ink);
  text-align: left;
  background: #fff;
}

.cover-choice.active,
.section-toggle.active {
  border-color: #b7dec4;
  box-shadow: inset 4px 0 0 var(--success);
  background: #f8fcf9;
}

.packet-photo-privacy-list {
  display: grid;
  gap: 10px;
}

.packet-photo-privacy-row {
  display: grid;
  gap: 10px;
  padding: 10px;
  border: 1px solid var(--soft-line);
  border-radius: 8px;
  background: #fff;
}

.packet-photo-privacy-row.removed {
  opacity: 0.72;
  background: #f6f7f9;
}

.packet-photo-privacy-row span {
  display: block;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.section-toggle {
  position: relative;
  padding-left: 42px;
}

.section-toggle::before {
  content: "";
  position: absolute;
  top: 18px;
  left: 12px;
  width: 18px;
  height: 18px;
  border: 2px solid var(--line);
  border-radius: 5px;
  background: #fff;
}

.section-toggle.active::before {
  border-color: var(--success);
  background:
    linear-gradient(135deg, transparent 48%, #fff 48% 55%, transparent 55%),
    var(--success);
}

.hint-card {
  display: grid;
  gap: 12px;
  padding: 16px;
  border: 1px solid var(--line);
  border-left: 6px solid var(--primary);
  border-radius: 8px;
  background: #fff;
}

.hint-card h3 {
  margin: 0;
  font-size: 24px;
}

.hint-card .button-row > button {
  min-height: 56px;
}

.math {
  display: none;
  padding: 12px;
  border-radius: 8px;
  background: #101820;
  color: #f3f7fb;
  font: 16px/1.5 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  white-space: pre-wrap;
}

.math.open {
  display: block;
}

.footer-note,
.liability {
  color: var(--muted);
  font-size: 14px;
}

.ops-masthead {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  box-shadow: var(--shadow);
}

.ops-masthead h2 {
  margin-bottom: 8px;
  font-size: 34px;
}

.metric-strip {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(112px, 1fr));
  gap: 10px;
  min-width: 0;
}

.metric-strip div {
  min-width: 0;
  padding: 11px;
  border: 1px solid var(--soft-line);
  border-radius: 8px;
  background: var(--sunken);
}

.metric-strip strong,
.metric-strip span {
  display: block;
}

.metric-strip strong {
  font-size: 21px;
}

.metric-strip span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
  text-transform: uppercase;
}

.route-board .panel-head {
  padding-bottom: 12px;
}

.tabs {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  padding: 0 18px;
  border-bottom: 1px solid var(--soft-line);
  background: #fff;
}

.tabs span {
  padding: 12px 8px;
  border-bottom: 3px solid transparent;
  color: var(--muted);
  font-weight: 800;
  text-align: center;
}

.tabs span.active {
  border-color: var(--success);
  color: var(--ink);
}

.stop-row {
  display: grid;
  grid-template-columns: 76px minmax(0, 1fr) 74px;
  gap: 12px;
  align-items: center;
  min-height: 84px;
  padding: 12px;
  border: 1px solid var(--soft-line);
  border-radius: 8px;
  background: #fff;
}

.stop-row.active {
  border-color: #b7dec4;
  box-shadow: inset 4px 0 0 var(--success);
  background: #f8fcf9;
}

.stop-row .button-row {
  grid-column: 2 / -1;
}

.compact-stop {
  min-height: 72px;
}

.compact-stop .chip {
  min-height: 24px;
  padding: 2px 7px;
  font-size: 12px;
}

.stop-time {
  color: var(--ink);
  font-size: 14px;
  font-weight: 900;
}

.stop-price {
  justify-self: end;
  color: var(--success);
  font-weight: 900;
}

.route-readiness,
.route-suggestion {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px;
  border: 1px solid var(--soft-line);
  border-radius: 8px;
  background: #fff;
}

.route-readiness strong,
.route-suggestion span {
  font-weight: 900;
}

.route-readiness span {
  color: var(--muted);
  font-size: 14px;
  font-weight: 800;
}

.routes-screen {
  padding-bottom: 124px;
}

.route-readiness-main {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.route-readiness-chip-row {
  flex: 1 1 auto;
  min-width: 0;
}

.route-readiness-chip {
  height: auto;
  min-height: 32px;
  white-space: normal;
  text-align: left;
}

.route-preflight-block,
.route-virtual-note {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px;
  border: 1px solid #e7c78b;
  border-radius: 8px;
  background: #fff9ec;
}

.route-preflight-block strong,
.route-virtual-note span {
  font-weight: 900;
}

.route-preflight-block p {
  margin: 3px 0 0;
  color: var(--muted);
  font-size: 14px;
  font-weight: 800;
}

.route-virtual-note {
  position: sticky;
  top: 0;
  z-index: 2;
  border-color: var(--soft-line);
  background: #fff;
  box-shadow: 0 8px 18px rgba(11, 15, 20, 0.06);
}

.route-virtual-note span {
  color: var(--muted);
  font-size: 14px;
}

.today-screen {
  padding-bottom: 124px;
}

.today-status-strip,
.today-header,
.today-pickup,
.today-error-row,
.today-success-card,
.today-toast,
.property-proximity-card,
.role-home-band,
.today-stop-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  box-shadow: var(--shadow);
}

.today-status-strip {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 54px;
  padding: 12px 16px;
  color: var(--ink);
  text-align: left;
}

.today-status-strip span,
.today-status-strip strong {
  font-weight: 900;
}

.today-status-strip strong {
  color: var(--primary-dark);
}

.today-header,
.today-pickup,
.today-error-row,
.today-success-card,
.today-toast {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 16px;
}

.today-header h2 {
  margin-bottom: 0;
  font-size: 32px;
}

.today-pickup {
  border-color: #b7dec4;
  background: #f8fcf9;
}

.today-pickup p {
  margin: 3px 0 0;
  color: var(--muted);
  font-weight: 800;
}

.today-error-row strong,
.today-success-card h3,
.today-toast span {
  font-weight: 900;
}

.today-error-row p,
.today-success-card p {
  margin: 3px 0 0;
  color: var(--muted);
  font-weight: 800;
}

.today-error-row.advisory {
  border-color: #e7c78b;
  background: #fff9ec;
}

.today-error-row.alert {
  border-color: #ebb8b4;
  background: #fff5f4;
}

.today-success-card,
.today-toast {
  border-color: #b7dec4;
  background: #f7fcf8;
}

.today-success-card > div:first-child {
  min-width: 0;
}

.today-success-card h3 {
  margin: 6px 0 3px;
  font-size: 20px;
}

.property-proximity-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 14px;
  align-items: center;
  padding: 14px;
  border-color: #b7dec4;
  background: #f7fcf8;
}

.property-proximity-main {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  min-width: 0;
}

.property-proximity-main h3,
.property-proximity-main p {
  margin: 0;
}

.property-proximity-main p {
  margin-top: 3px;
  color: var(--muted);
  font-size: 14px;
  font-weight: 800;
}

.property-proximity-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
}

.role-home-band {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(260px, 0.7fr) auto;
  gap: 14px;
  align-items: center;
  padding: 14px 16px;
  box-shadow: none;
}

.role-home-band.owner {
  border-color: #b7dec4;
  background: #f7fbf8;
}

.role-home-band.lead,
.role-home-band.worker {
  border-color: #cfd8dd;
  background: #f8faf9;
}

.role-home-band.office,
.role-home-band.estimator {
  border-color: #d8cab2;
  background: #fffaf0;
}

.role-home-band.recipient {
  border-color: #bfd3dc;
  background: #f7fbfc;
}

.mode-switch {
  margin-top: 8px;
}

.role-home-copy h3 {
  margin: 7px 0 3px;
  font-size: 20px;
}

.role-home-copy p {
  margin: 0;
  color: var(--muted);
  font-weight: 800;
}

.role-home-metrics {
  display: grid;
  grid-template-columns: repeat(3, minmax(70px, 1fr));
  gap: 8px;
}

.role-home-metrics article {
  display: grid;
  gap: 3px;
  min-height: 58px;
  padding: 9px;
  border: 1px solid var(--soft-line);
  border-radius: 8px;
  background: #fff;
}

.role-home-metrics span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.role-home-metrics strong {
  font-size: 24px;
  line-height: 1;
}

.role-home-actions {
  display: grid;
  grid-template-columns: minmax(128px, 1fr);
  gap: 8px;
  min-width: 148px;
}

.today-route-hint,
.today-readiness {
  box-shadow: var(--shadow);
}

.today-readiness-chips {
  flex: 1 1 auto;
  min-width: 0;
}

.today-first-week {
  align-items: flex-start;
  box-shadow: var(--shadow);
}

.today-first-week-copy {
  display: grid;
  gap: 7px;
  min-width: 0;
}

.today-first-week-copy p {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
  font-weight: 800;
}

.today-first-week-behaviors {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  min-width: 0;
}

.today-first-week-behaviors .chip {
  height: auto;
  max-width: 100%;
  white-space: normal;
}

.today-stop-panel {
  overflow: visible;
}

.today-stop-list {
  display: grid;
  gap: 10px;
  max-height: min(62vh, 720px);
  overflow: auto;
}

.today-virtual-note {
  position: sticky;
  top: 0;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 12px;
  border: 1px solid var(--soft-line);
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 8px 18px rgba(11, 15, 20, 0.06);
}

.today-virtual-note span {
  color: var(--muted);
  font-size: 14px;
  font-weight: 900;
}

.today-stop-card {
  display: grid;
  grid-template-columns: 82px minmax(0, 1fr) minmax(164px, auto);
  gap: 12px;
  align-items: start;
  min-height: 116px;
  padding: 13px;
  box-shadow: none;
}

.today-stop-card.active {
  border-color: #b7dec4;
  box-shadow: inset 4px 0 0 var(--success);
  background: #f8fcf9;
}

.today-stop-order {
  display: grid;
  gap: 3px;
  justify-items: center;
  padding: 10px 6px;
  border: 1px solid var(--soft-line);
  border-radius: 8px;
  background: var(--sunken);
}

.today-stop-order strong {
  font-size: 14px;
}

.today-stop-order span,
.today-stop-main p {
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.today-stop-main {
  display: grid;
  gap: 9px;
  min-width: 0;
}

.today-stop-main h3 {
  margin-bottom: 3px;
}

.today-stop-main p {
  margin-bottom: 0;
}

.today-stop-actions {
  display: grid;
  gap: 8px;
  min-width: 164px;
}

.today-bottom-bar {
  position: fixed;
  right: 24px;
  bottom: 16px;
  left: 260px;
  z-index: 8;
  width: min(calc(100vw - 284px), 1360px);
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(242, 244, 247, 0.96);
  box-shadow: 0 18px 38px rgba(11, 15, 20, 0.16);
  backdrop-filter: blur(8px);
}

.route-readiness.ready {
  border-color: #b7dec4;
  background: #f5fbf7;
}

.route-readiness.advisory {
  border-color: #e7c78b;
  background: #fff9ec;
}

.route-readiness.alert {
  border-color: #ebb8b4;
  background: #fff5f4;
}

.storm-route-panel {
  display: grid;
  gap: 12px;
  padding: 14px;
  border: 1px solid #b7dec4;
  border-radius: 8px;
  background: #f8fcf9;
}

.storm-route-panel.paused {
  border-color: #e7c78b;
  background: #fff9ec;
}

.storm-route-panel h3 {
  margin: 0 0 4px;
}

.storm-route-panel p {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
  font-weight: 800;
}

.storm-pass-proof {
  display: grid;
  gap: 10px;
  margin-top: 10px;
  padding: 10px;
  border: 1px solid #b7dec4;
  border-radius: 8px;
  background: #f8fcf9;
}

.storm-pass-proof.needs-manual {
  border-color: #d8b35d;
  background: #fff8e6;
}

.storm-pass-proof strong,
.storm-pass-proof span {
  display: block;
}

.storm-pass-proof span {
  margin-top: 3px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.storm-pass-manual {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  align-items: end;
}

.route-stop-card {
  display: grid;
  grid-template-columns: 72px minmax(0, 1fr) auto;
  gap: 12px;
  align-items: start;
  padding: 13px;
  border: 1px solid var(--soft-line);
  border-radius: 8px;
  background: #fff;
}

.route-stop-card.active {
  border-color: #b7dec4;
  box-shadow: inset 4px 0 0 var(--success);
  background: #f8fcf9;
}

.route-stop-card.dragging {
  opacity: 0.72;
  border-color: var(--primary);
}

.route-stop-main {
  display: grid;
  gap: 7px;
  min-width: 0;
}

.route-stop-main p {
  margin-bottom: 0;
}

.route-stop-duration {
  color: var(--ink);
  font-weight: 900;
}

.route-stop-memory,
.route-no-access-stamp {
  color: var(--muted);
  font-size: 14px;
  font-weight: 800;
}

.route-no-access-stamp {
  padding: 8px 10px;
  border: 1px solid #e7c78b;
  border-radius: 8px;
  background: #fff9ec;
}

.route-stop-order {
  display: grid;
  gap: 6px;
  justify-items: center;
  min-width: 0;
}

.route-drag-handle {
  display: inline-grid;
  place-items: center;
  width: 34px;
  min-width: 34px;
  height: 34px;
  border: 1px solid var(--soft-line);
  border-radius: 8px;
  background: var(--sunken);
  color: var(--muted);
  cursor: grab;
  font-weight: 900;
  letter-spacing: 0;
  line-height: 1;
}

.route-drag-handle:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
}

.route-actions {
  grid-column: 2 / -1;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.route-bottom-bar {
  position: fixed;
  right: 24px;
  bottom: 16px;
  left: 260px;
  z-index: 8;
  width: min(calc(100vw - 284px), 1360px);
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(242, 244, 247, 0.96);
  box-shadow: 0 18px 38px rgba(11, 15, 20, 0.16);
  backdrop-filter: blur(8px);
}

.route-exception-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.active-workbench {
  background: #fff;
}

.stepper {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  padding: 14px 18px;
  border-bottom: 1px solid var(--soft-line);
}

.stepper span {
  min-height: 38px;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--muted);
  font-size: 14px;
  font-weight: 800;
  text-align: center;
}

.stepper span.done {
  border-color: #b7dec4;
  color: var(--success);
  background: #edf8f0;
}

.stepper span.active {
  border-color: var(--primary);
  color: var(--primary-dark);
  background: #eaf1ff;
}

.workbench-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  padding: 18px;
}

.work-card {
  display: grid;
  gap: 12px;
  min-width: 0;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.capture-card {
  grid-row: span 2;
}

.capture-pair {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.capture-shot {
  position: relative;
  display: grid;
  align-content: end;
  min-height: 220px;
  padding: 14px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: #fff;
  text-align: left;
}

.capture-shot::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, transparent 36%, rgba(0, 0, 0, 0.46)),
    repeating-linear-gradient(120deg, rgba(255, 255, 255, 0.16) 0 11px, transparent 11px 28px),
    linear-gradient(135deg, #496b37, #abc57b 48%, #395f36);
}

.capture-shot.after::before {
  background:
    linear-gradient(180deg, transparent 36%, rgba(0, 0, 0, 0.42)),
    repeating-linear-gradient(120deg, rgba(255, 255, 255, 0.18) 0 11px, transparent 11px 30px),
    linear-gradient(135deg, #245f32, #82bf55 48%, #174b27);
}

.capture-shot span,
.capture-shot strong {
  position: relative;
  z-index: 1;
}

.capture-shot span {
  font-weight: 900;
}

.capture-shot strong {
  font-size: 34px;
}

.packet-tiles {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(72px, 1fr));
  gap: 8px;
}

.packet-tiles div {
  display: grid;
  min-height: 78px;
  place-items: end center;
  padding: 8px;
  border: 1px solid var(--soft-line);
  border-radius: 8px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
  background:
    linear-gradient(180deg, transparent 42%, rgba(255, 255, 255, 0.82)),
    linear-gradient(135deg, #dce7d0, #98b57d);
}

.packet-tiles div:nth-child(3) {
  background:
    linear-gradient(180deg, transparent 42%, rgba(255, 255, 255, 0.82)),
    repeating-linear-gradient(45deg, #e4eadf 0 10px, #c8d8c3 10px 20px);
}

.packet-tiles div:nth-child(4) {
  background:
    linear-gradient(180deg, transparent 42%, rgba(255, 255, 255, 0.92)),
    linear-gradient(135deg, #f7f8fa, #d7dee7);
}

.mini-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 15px;
}

.mini-table th,
.mini-table td {
  padding: 8px 4px;
  border-bottom: 1px solid var(--soft-line);
  text-align: left;
}

.mini-table th:last-child,
.mini-table td:last-child {
  text-align: right;
}

.calc-summary {
  border-color: #b7dec4;
  background: #f8fcf9;
}

.bottom-route {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  box-shadow: var(--shadow);
}

.bottom-route span {
  font-weight: 800;
}

.table {
  width: 100%;
  max-width: 100%;
  border-collapse: collapse;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.table th,
.table td {
  padding: 10px;
  border-bottom: 1px solid var(--soft-line);
  text-align: left;
  vertical-align: top;
}

.table th {
  color: var(--muted);
  font-size: 14px;
  text-transform: uppercase;
}

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

.trust-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  box-shadow: var(--shadow);
}

.segmented {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.trust-tabs button,
.segmented button {
  min-height: 44px;
  padding: 8px 12px;
  border: 1px solid var(--soft-line);
  border-radius: 8px;
  background: #fff;
  color: var(--muted);
  font-weight: 800;
}

.trust-tabs button.active,
.segmented button.active {
  border-color: #b7dec4;
  color: var(--success);
  background: #edf8f0;
}

.trust-toggle-row,
.privacy-scope-row,
.help-topic-row,
.recovery-row,
.trust-activity-row,
.account-closure-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  padding: 12px;
  border: 1px solid var(--soft-line);
  border-radius: 8px;
  background: #fff;
}

.trust-toggle-row.enabled,
.help-topic-row.active {
  border-color: #b7dec4;
  box-shadow: inset 4px 0 0 var(--success);
  background: #f8fcf9;
}

.trust-toggle-row p,
.privacy-scope-row p,
.help-topic-row p,
.recovery-row p,
.trust-activity-row p,
.account-closure-row p,
.permission-card p,
.custody-card p,
.help-primary-card p {
  margin: 4px 0 0;
}

.compact-segmented {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 6px;
}

.permission-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 10px;
}

.permission-card,
.custody-card,
.help-primary-card,
.security-section {
  display: grid;
  gap: 10px;
  padding: 12px;
  border: 1px solid var(--soft-line);
  border-radius: 8px;
  background: #fff;
}

.permission-card .button-row {
  gap: 7px;
}

.security-custody-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.security-screen .span-4 .list-row {
  grid-template-columns: minmax(0, 1fr);
  align-items: start;
}

.security-screen .span-4 .list-row > .chip,
.security-screen .span-4 .list-row > button {
  justify-self: start;
  max-width: 100%;
  white-space: normal;
}

.custody-card strong {
  display: block;
  font-size: 20px;
}

.trust-metrics {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.trust-stepper {
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
}

.settings-screen .settings-support-grid {
  display: grid;
  /* Cap at two readable columns; 280px columns crammed five panels of dense
     text side by side on desktop. */
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 400px), 1fr));
  gap: 16px;
  align-items: start;
}

.settings-screen .trust-toggle-row,
.settings-screen .privacy-scope-row,
.settings-screen .account-closure-row,
.settings-screen .billing-stepper {
  grid-template-columns: minmax(0, 1fr);
  align-items: start;
}

.settings-screen .trust-toggle-row > button,
.settings-screen .privacy-scope-row > button,
.settings-screen .account-closure-row > .button-row,
.settings-screen .billing-stepper > .button-row,
.settings-screen .compact-segmented {
  justify-self: start;
}

.settings-screen .compact-segmented {
  justify-content: flex-start;
}

.settings-screen .compact-segmented button {
  flex: 0 1 auto;
}

.settings-screen .field input,
.settings-screen .field textarea {
  width: 100%;
}

.help-playbook {
  display: grid;
  gap: 10px;
}

.compact-table th,
.compact-table td {
  font-size: 15px;
}

.account-closure-row.export_first,
.account-closure-row.delete_queued {
  border-color: #e7c78b;
  box-shadow: inset 4px 0 0 var(--warning);
  background: #fff9ec;
}

.voice-recorder-card,
.voice-clip-row,
.voice-output-card,
.voice-note-row,
.voice-cloud-sheet,
.voice-ocr-card,
.voice-term-list,
.ai-access-card {
  display: grid;
  gap: 12px;
  padding: 13px;
  border: 1px solid var(--soft-line);
  border-radius: 8px;
  background: #fff;
}

.ai-access-strip {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(180px, 100%), 1fr));
  gap: 10px;
}

.ai-access-card {
  align-content: start;
  min-width: 0;
}

.ai-access-card strong {
  display: block;
}

.ai-access-card p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.voice-recorder-card.recording {
  border-color: #ebb8b4;
  box-shadow: inset 4px 0 0 var(--danger);
  background: #fff7f6;
}

.voice-state-band {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  min-height: 46px;
  padding: 9px 11px;
  border-radius: 8px;
  background: var(--ink);
  color: #fff;
}

.voice-recorder-card.recording .voice-state-band {
  background: var(--danger);
}

.voice-state-band span {
  font-weight: 900;
}

.voice-wave {
  display: grid;
  grid-template-columns: repeat(18, 1fr);
  gap: 4px;
  align-items: center;
  min-height: 62px;
  padding: 10px;
  border: 1px solid var(--soft-line);
  border-radius: 8px;
  background: var(--sunken);
}

.voice-wave span {
  display: block;
  height: calc(var(--bar) * 8px);
  min-height: 10px;
  border-radius: 999px;
  background: var(--primary);
}

.voice-recorder-card.recording .voice-wave span {
  background: var(--danger);
}

.voice-soft-cap {
  margin: 0;
  padding: 8px 10px;
  border: 1px solid #ebb8b4;
  border-radius: 8px;
  background: #fff;
  color: var(--danger);
  font-weight: 900;
  animation: voicePulse 1.35s ease-in-out infinite;
}

@keyframes voicePulse {
  0%,
  100% {
    opacity: 1;
  }

  50% {
    opacity: .58;
  }
}

.voice-primary-control {
  min-height: 64px;
  min-width: 156px;
  font-size: 18px;
}

.voice-control-row,
.voice-output-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
}

.voice-transcript-field textarea {
  min-height: 176px;
}

.voice-output-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.voice-note-row {
  grid-template-columns: minmax(0, 1fr);
  align-items: start;
}

.voice-note-row > div {
  min-width: 0;
}

.voice-note-row strong,
.voice-note-row p {
  overflow-wrap: anywhere;
}

.voice-note-row .button-row {
  width: 100%;
}

.voice-cloud-sheet pre {
  max-height: 160px;
  overflow: auto;
  padding: 10px;
  border: 1px solid var(--soft-line);
  border-radius: 8px;
  background: var(--sunken);
  white-space: pre-wrap;
}

.voice-clip-row {
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
}

.voice-term-list {
  background: #f8fcf9;
  border-color: #b7dec4;
}

.voice-term-list p {
  margin: 2px 0 0;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.voice-term-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.voice-term-grid article {
  display: grid;
  gap: 3px;
  min-width: 0;
  padding: 9px;
  border: 1px solid var(--soft-line);
  border-radius: 8px;
  background: #fff;
}

.voice-term-grid strong,
.voice-term-grid span,
.voice-term-grid small {
  min-width: 0;
  overflow-wrap: anywhere;
}

.voice-term-grid span {
  color: var(--primary-dark);
  font-weight: 900;
}

.voice-term-grid small {
  color: var(--muted);
  font-weight: 800;
}

.ocr-guess-line {
  padding: 10px;
  border: 1px solid var(--soft-line);
  border-radius: 8px;
  background: var(--sunken);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 18px;
  font-weight: 900;
  letter-spacing: 0;
  overflow-wrap: anywhere;
}

.ocr-guess-line mark {
  padding: 1px 2px;
  border-radius: 4px;
  background: #fff0bf;
  color: var(--ink);
}

.voice-save-failure {
  box-shadow: inset 4px 0 0 var(--danger);
}

.automation-meter {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.automation-meter div {
  padding: 10px;
  border: 1px solid var(--soft-line);
  border-radius: 8px;
  background: var(--sunken);
}

.automation-meter strong {
  display: block;
  font-size: 1.3rem;
}

.automation-meter span,
.automation-run-row small {
  color: var(--muted);
}

.automation-recipe,
.automation-run-row,
.automation-boundary {
  display: grid;
  gap: 10px;
  padding: 12px;
  border: 1px solid var(--soft-line);
  border-radius: 8px;
  background: #fff;
}

.automation-recipe {
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: start;
}

.automation-recipe > div,
.automation-recipe .row {
  min-width: 0;
}

.automation-recipe .row strong {
  min-width: 0;
  overflow-wrap: anywhere;
}

.automation-recipe.selected {
  border-color: var(--primary);
  background: #f3f7ff;
}

.automation-flow {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.automation-flow div {
  padding: 12px;
  border: 1px solid var(--soft-line);
  border-radius: 8px;
  background: var(--sunken);
}

.automation-flow span {
  display: inline-grid;
  width: 26px;
  height: 26px;
  margin-bottom: 8px;
  place-items: center;
  border-radius: 50%;
  background: var(--primary);
  color: #fff;
  font-weight: 800;
}

.automation-payload {
  padding: 12px;
  border: 1px solid var(--soft-line);
  border-radius: 8px;
  background: #fff;
}

.automation-payload dl {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px 12px;
  margin: 0;
}

.automation-payload div {
  min-width: 0;
}

.automation-payload dt {
  color: var(--muted);
  font-size: 0.78rem;
  text-transform: uppercase;
}

.automation-payload dd {
  margin: 2px 0 0;
  overflow-wrap: anywhere;
  font-weight: 700;
}

.automation-run-list {
  display: grid;
  gap: 10px;
  max-height: 480px;
  overflow: auto;
}

.automation-run-row {
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: start;
}

.automation-boundary {
  background: #fff8eb;
  border-color: #f0d3a0;
}

.webhook-meter {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.webhook-meter div,
.webhook-builder,
.webhook-endpoint-row,
.webhook-delivery-row {
  display: grid;
  gap: 10px;
  padding: 12px;
  border: 1px solid var(--soft-line);
  border-radius: 8px;
  background: #fff;
}

.webhook-meter div {
  background: var(--sunken);
}

.webhook-meter strong {
  display: block;
  font-size: 1.2rem;
}

.webhook-meter span,
.webhook-event-toggle small,
.webhook-endpoint-row small,
.webhook-delivery-row small {
  color: var(--muted);
}

.webhook-builder {
  background: var(--sunken);
}

.webhook-event-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.webhook-event-toggle,
.privacy-inline-toggle {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 8px;
  align-items: start;
  min-width: 0;
}

.webhook-event-toggle {
  padding: 10px;
  border: 1px solid var(--soft-line);
  border-radius: 8px;
  background: #fff;
}

.webhook-event-toggle span,
.privacy-inline-toggle span {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.webhook-event-toggle strong,
.webhook-endpoint-row strong,
.webhook-delivery-row strong {
  overflow-wrap: anywhere;
}

.webhook-endpoint-list,
.webhook-delivery-list {
  display: grid;
  gap: 10px;
}

.webhook-endpoint-row {
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: start;
}

.webhook-endpoint-row p,
.webhook-delivery-row p {
  margin: 2px 0;
  overflow-wrap: anywhere;
}

.webhook-row-actions {
  display: grid;
  gap: 8px;
  min-width: 132px;
}

.webhook-delivery-row {
  grid-template-columns: minmax(0, 1fr);
}

.webhook-delivery-row .button-row {
  justify-content: flex-start;
}

.webhook-signature-strip,
.webhook-docs-grid {
  display: grid;
  gap: 10px;
}

.webhook-signature-strip {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.webhook-signature-strip div,
.webhook-doc-card {
  min-width: 0;
  padding: 12px;
  border: 1px solid var(--soft-line);
  border-radius: 8px;
  background: #fff;
}

.webhook-signature-strip div {
  display: grid;
  gap: 4px;
}

.webhook-signature-strip span,
.webhook-doc-card p {
  color: var(--muted);
}

.webhook-docs-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.webhook-doc-card {
  display: grid;
  gap: 10px;
  align-content: start;
}

.webhook-doc-card pre {
  margin: 0;
  max-height: 360px;
  overflow: auto;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  word-break: break-word;
  padding: 12px;
  border: 1px solid var(--soft-line);
  border-radius: 8px;
  background: var(--ink);
  color: #f8fafc;
  font-size: 0.78rem;
  line-height: 1.45;
}

.integration-adapter-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.integration-adapter-card,
.integration-ledger-row,
.integration-match-row {
  min-width: 0;
  padding: 12px;
  border: 1px solid var(--soft-line);
  border-radius: 8px;
  background: #fff;
}

.integration-adapter-card {
  display: grid;
  align-content: start;
  gap: 12px;
}

.integration-adapter-card p,
.integration-ledger-row p,
.integration-match-row p {
  margin-bottom: 0;
  color: var(--muted);
  overflow-wrap: anywhere;
}

.integration-match-list,
.integration-ledger-list {
  display: grid;
  gap: 10px;
}

.integration-match-row,
.integration-ledger-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
}

.integration-ledger-row {
  background: var(--sunken);
}

.fsm-control-grid,
.fsm-mapping-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.fsm-control-grid {
  grid-template-columns: minmax(180px, 0.8fr) minmax(220px, 1.2fr);
}

.fsm-walkthrough-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.fsm-walkthrough-card {
  min-width: 0;
  display: grid;
  gap: 8px;
  padding: 10px;
  border: 1px solid var(--soft-line);
  border-radius: 8px;
  background: var(--sunken);
}

.fsm-walkthrough-card > span {
  width: 28px;
  height: 28px;
  display: inline-grid;
  place-items: center;
  border-radius: 999px;
  background: #101828;
  color: #fff;
  font-weight: 900;
  font-size: 0.8rem;
}

.fsm-screen-frame {
  min-height: 54px;
  display: grid;
  place-items: center;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--muted);
  font-weight: 900;
  text-align: center;
}

.fsm-walkthrough-card p {
  margin-bottom: 0;
}

.fsm-duplicate-row {
  grid-template-columns: minmax(0, 1fr) minmax(220px, auto);
}

.fsm-preview-table {
  overflow-x: auto;
  border: 1px solid var(--soft-line);
  border-radius: 8px;
  background: #fff;
}

.fsm-preview-table table {
  width: 100%;
  min-width: 620px;
  border-collapse: collapse;
  font-size: 0.92rem;
}

.fsm-preview-table th,
.fsm-preview-table td {
  padding: 10px 12px;
  border-bottom: 1px solid var(--soft-line);
  text-align: left;
  vertical-align: top;
}

.fsm-preview-table th {
  color: var(--muted);
  font-size: 0.76rem;
  text-transform: uppercase;
  letter-spacing: 0;
  background: #f8fafc;
}

.fsm-preview-table td {
  overflow-wrap: anywhere;
}

.fsm-preview-table tr:last-child td {
  border-bottom: 0;
}

.code-table-toolbar {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
}

.code-table-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.code-table-card {
  display: grid;
  align-content: start;
  gap: 12px;
  min-width: 0;
  padding: 12px;
  border: 1px solid var(--soft-line);
  border-radius: 8px;
  background: #fff;
}

.code-table-card p {
  margin-bottom: 0;
  color: var(--muted);
}

.code-table-card h3 {
  margin-bottom: 4px;
}

.code-table-meta {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin: 0;
}

.code-table-meta div {
  min-width: 0;
  padding: 8px;
  border: 1px solid var(--soft-line);
  border-radius: 8px;
  background: var(--sunken);
}

.code-table-meta dt {
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 800;
  text-transform: uppercase;
}

.code-table-meta dd {
  margin: 3px 0 0;
  overflow-wrap: anywhere;
  font-weight: 800;
}

body.high-contrast {
  --line: #0b0f14;
  --soft-line: #4b5563;
  --muted: #111827;
  --surface: #fff;
  --sunken: #f8fafc;
  background: #fff;
}

body.high-contrast .card,
body.high-contrast .panel,
body.high-contrast .list-row,
body.high-contrast .trust-toggle-row,
body.high-contrast .privacy-scope-row,
body.high-contrast .permission-card,
body.high-contrast .custody-card,
body.high-contrast .help-topic-row,
body.high-contrast .recovery-row,
body.high-contrast .trust-activity-row,
body.high-contrast .voice-recorder-card,
body.high-contrast .voice-clip-row,
body.high-contrast .voice-output-card,
body.high-contrast .voice-note-row,
body.high-contrast .voice-cloud-sheet,
body.high-contrast .voice-ocr-card,
body.high-contrast .voice-term-list,
body.high-contrast .ai-access-card,
body.high-contrast .field-voice-control,
body.high-contrast .field-voice-button,
body.high-contrast .hint-card,
body.high-contrast .automation-recipe,
body.high-contrast .automation-run-row,
body.high-contrast .automation-boundary,
body.high-contrast .automation-payload,
body.high-contrast .automation-flow div,
body.high-contrast .automation-meter div,
body.high-contrast .webhook-meter div,
body.high-contrast .webhook-builder,
body.high-contrast .webhook-event-toggle,
body.high-contrast .webhook-endpoint-row,
body.high-contrast .webhook-delivery-row,
body.high-contrast .webhook-signature-strip div,
body.high-contrast .webhook-doc-card,
body.high-contrast .webhook-doc-card pre,
body.high-contrast .integration-adapter-card,
body.high-contrast .integration-ledger-row,
body.high-contrast .integration-match-row,
body.high-contrast .fsm-preview-table,
body.high-contrast .code-table-card,
body.high-contrast .code-table-meta div {
  border-width: 2px;
  box-shadow: none;
}

body.large-targets .compact {
  min-height: 50px;
}

body.large-targets .field-voice-button {
  min-height: 56px;
}

body.large-targets .chip,
body.large-targets .tier {
  min-height: 36px;
}

body.text-scale-130 {
  font-size: 23px;
}

body.text-scale-130 .compact,
body.text-scale-130 .chip,
body.text-scale-130 .tier,
body.text-scale-130 .field label,
body.text-scale-130 .field small,
body.text-scale-130 .footer-note,
body.text-scale-130 .liability {
  font-size: 18px;
}

body.text-scale-130 h2 {
  font-size: 28px;
}

body.text-scale-130 h3,
body.text-scale-130 .hint-card h3 {
  font-size: 24px;
}

body.text-scale-200 {
  font-size: 36px;
}

body.text-scale-200 h2 {
  font-size: 42px;
}

body.text-scale-200 h3,
body.text-scale-200 .hint-card h3 {
  font-size: 36px;
}

body.text-scale-200 .compact,
body.text-scale-200 .chip,
body.text-scale-200 .tier,
body.text-scale-200 .field label,
body.text-scale-200 .field small,
body.text-scale-200 .footer-note,
body.text-scale-200 .liability {
  font-size: 30px;
}

body.text-scale-200 .primary,
body.text-scale-200 .secondary,
body.text-scale-200 .ghost,
body.text-scale-200 .danger,
body.text-scale-200 .compact {
  min-height: 64px;
  white-space: normal;
}

body.text-scale-200 .grid,
body.text-scale-200 .engine-input-grid,
body.text-scale-200 .code-table-grid,
body.text-scale-200 .billing-plan-grid,
body.text-scale-200 .permission-grid {
  grid-template-columns: 1fr;
}

body.text-scale-200 .span-3,
body.text-scale-200 .span-4,
body.text-scale-200 .span-5,
body.text-scale-200 .span-6,
body.text-scale-200 .span-7,
body.text-scale-200 .span-8,
body.text-scale-200 .span-9,
body.text-scale-200 .span-12 {
  grid-column: 1 / -1;
}

body.text-scale-200 .row,
body.text-scale-200 .button-row,
body.text-scale-200 .top-actions,
body.text-scale-200 .trust-toggle-row,
body.text-scale-200 .privacy-scope-row,
body.text-scale-200 .help-topic-row,
body.text-scale-200 .recovery-row,
body.text-scale-200 .list-row,
body.text-scale-200 .engine-row,
body.text-scale-200 .engine-required-actions,
body.text-scale-200 .capture-mode,
body.text-scale-200 .capture-entry-banner,
body.text-scale-200 .field-voice-control {
  align-items: stretch;
  flex-direction: column;
  grid-template-columns: 1fr;
}

body.text-scale-200 .button-row > *,
body.text-scale-200 .compact-segmented > *,
body.text-scale-200 .engine-required-actions > button {
  width: 100%;
}

body.text-scale-200 .mark {
  width: auto;
  height: auto;
  min-width: 46px;
  min-height: 46px;
  padding: 2px 8px;
  font-size: 24px;
}

body.text-scale-200 .topbar-mark {
  min-width: 32px;
  min-height: 32px;
  padding: 0 6px;
  font-size: 16px;
}

body.text-scale-200 .math,
body.text-scale-200 pre {
  overflow-wrap: anywhere;
  white-space: pre-wrap;
}

body.text-scale-200 .table,
body.text-scale-200 .table tbody,
body.text-scale-200 .table tr,
body.text-scale-200 .table th,
body.text-scale-200 .table td {
  display: block;
  width: 100%;
}

body.text-scale-200 .table th,
body.text-scale-200 .table td {
  border-bottom: 1px solid var(--soft-line);
}

body.reduce-motion *,
body.reduce-motion *::before,
body.reduce-motion *::after {
  scroll-behavior: auto !important;
  transition-duration: 0.001ms !important;
  animation-duration: 0.001ms !important;
}

@media (max-width: 980px) {
  .grid,
  .phone-row,
  .security-custody-grid,
  .permission-grid,
  .onboarding-shell,
  .onboarding-shell.cold-open,
  .onboarding-shell.done {
    grid-template-columns: 1fr;
  }

  [class*="span-"] {
    grid-column: auto;
  }

  .engine-run-shell .engine-workbench {
    order: -1;
  }

  .panel-head.row {
    align-items: flex-start;
    flex-direction: column;
  }

  .panel-head.row > .chip,
  .panel-head.row > .tier {
    width: max-content;
    max-width: 100%;
  }

  .similar-summary,
  .team-seat-summary,
  .team-member-row,
  .team-invite-grid,
  .material-sds-photo-row,
  .code-table-toolbar,
  .code-table-meta {
    grid-template-columns: 1fr;
    align-items: stretch;
  }

  .similar-table-wrap .table {
    display: block;
    overflow-x: auto;
    scrollbar-width: thin;
  }

  .similar-table-wrap .table th,
  .similar-table-wrap .table td {
    white-space: normal;
    overflow-wrap: anywhere;
  }

  .similar-table-actions {
    min-width: 0;
  }

  .material-field-grid,
  .material-reading-grid {
    grid-template-columns: repeat(auto-fit, minmax(min(180px, 100%), 1fr));
  }

  .quick-target-row > *,
  .team-member-row > *,
  .team-invite-grid > *,
  .material-field-grid > *,
  .material-reading-grid > * {
    min-width: 0;
  }

  .quick-target-row .secondary,
  .quick-target-row .primary,
  .quick-target-row .ghost {
    white-space: normal;
  }

  .team-member-id {
    flex-wrap: wrap;
  }

  .team-member-row select,
  .team-invite-grid select,
  .team-invite-grid input {
    width: 100%;
    min-width: 0;
  }

  .code-table-card .row {
    align-items: flex-start;
    flex-wrap: wrap;
  }
}

@media (max-width: 1180px) {
  .onboarding-demo-option {
    grid-template-columns: 1fr;
  }

  .onboarding-demo-option button {
    width: 100%;
  }
}

@media (max-width: 620px) {
  html,
  body {
    width: 100%;
    overflow-x: hidden;
  }

  .workspace {
    width: 100%;
    min-width: 0;
  }

  .panel-head,
  .panel-body,
  .panel-foot,
  .card {
    padding: 14px;
  }

  .button-row,
  .onboarding-foot,
  .language-choice-row,
  .module-actions,
  .field-voice-control,
  .route-readiness,
  .route-suggestion,
  .route-preflight-block,
  .route-virtual-note,
  .property-proximity-card,
  .property-duplicate-card,
  .property-access-boundary,
  .property-empty-card,
  .property-timeline-pager,
  .row,
  .task-close-camera-card,
  .today-header,
  .today-pickup,
  .today-error-row,
  .today-success-card,
  .today-toast,
  .today-virtual-note,
  .today-status-strip,
  .packet-preview-pagination,
  .role-home-band {
    align-items: stretch;
    flex-direction: column;
  }

  .role-home-band {
    grid-template-columns: 1fr;
  }

  .module-preview-card {
    grid-template-columns: 1fr;
  }

  .module-pending-card {
    grid-template-columns: 1fr;
  }

  .role-home-actions {
    grid-template-columns: 1fr;
    min-width: 0;
  }

  .role-home-metrics {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    min-width: 0;
  }

  .role-home-metrics strong {
    font-size: 20px;
  }

  .role-home-metrics span {
    font-size: 11px;
  }

  .owner-source-button {
    width: 100%;
  }

  .route-readiness .button-row,
  .route-suggestion .button-row,
  .route-preflight-block .button-row,
  .route-virtual-note .button-row,
  .property-proximity-actions,
  .property-duplicate-card .button-row,
  .property-access-boundary .button-row,
  .property-empty-card .button-row,
  .property-timeline-pager .button-row,
  .today-error-row .button-row,
  .today-success-card .button-row,
  .today-virtual-note .button-row {
    width: 100%;
  }

  .property-proximity-main,
  .property-conflict-versions,
  .parking-memory-row,
  .manual-pin-fields {
    grid-template-columns: 1fr;
  }

  .parking-pin-toolbar {
    grid-template-columns: 1fr;
  }

  .module-row {
    grid-template-columns: 1fr;
  }

  .module-grant-control {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    width: 100%;
  }

  .template-fields,
  .template-list-row,
  .template-item-row,
  .lesson-row,
  .behavior-row,
  .photo-standard-grid,
  .owner-flag-grid,
  .review-queue-row,
  .owner-receipts,
  .similar-summary,
  .engine-input-grid,
  .engine-row,
  .arrival-hint,
  .last-time-grid,
  .property-memory-row,
  .history-card-row,
  .launchpad-identity,
  .launchpad-fields,
  .quick-task-row,
  .visit-stamp-row,
  .finish-review-row,
  .material-field-grid,
  .material-reading-grid,
  .material-sds-photo-row,
  .material-memory-line,
  .material-loadout,
  .material-row,
  .sync-summary-grid,
  .sync-queue-row,
  .sync-group-row,
  .time-summary,
  .time-entry-card,
  .time-variance-card,
  .crew-chip-card,
  .scope-add-grid,
  .scope-ack-grid,
  .scope-reason-row,
  .scope-order-row,
  .search-box,
  .search-summary,
  .search-result-row,
  .search-status-list div,
  .customer-profile-grid,
  .customer-contact-draft,
  .customer-mini-row,
  .customer-contact-row,
  .customer-property-row,
  .customer-add-row,
  .team-seat-summary,
  .role-boundary-strip,
  .role-boundary-actions,
  .team-member-row,
  .team-invite-grid,
  .team-share-grid,
  .team-invite-row,
  .team-remove-card,
  .team-code-card div,
  .account-switch-row,
  .billing-current-card,
  .billing-cycle-row,
  .billing-plan-grid,
  .billing-sku-grid,
  .billing-math-grid,
  .billing-addon-grid,
  .billing-checkout-card,
  .billing-invoice-row,
  .billing-stepper,
  .trust-toggle-row,
  .privacy-scope-row,
  .help-topic-row,
  .recovery-row,
  .trust-activity-row,
  .account-closure-row,
  .trust-metrics,
  .ai-access-strip,
  .voice-control-row,
  .voice-output-grid,
  .voice-note-row,
  .voice-clip-row,
  .voice-term-grid,
  .automation-recipe,
  .automation-run-row,
  .automation-flow,
  .automation-payload dl,
  .automation-meter,
  .webhook-meter,
  .webhook-event-grid,
  .webhook-endpoint-row,
  .webhook-signature-strip,
  .webhook-docs-grid,
  .integration-adapter-grid,
  .integration-match-row,
  .integration-ledger-row,
  .fsm-control-grid,
  .fsm-mapping-grid,
  .fsm-walkthrough-grid,
  .fsm-duplicate-row,
  .code-table-toolbar,
  .code-table-grid,
  .code-table-meta,
  .surface-pack-ledger,
  .surface-spec-grid,
  .surface-vocab-grid,
	  .surface-spec-head {
	    grid-template-columns: 1fr;
	  }

  .onboarding-panel,
  .onboarding-hero,
  .onboarding-proof,
  .onboarding-side {
    padding: 14px;
  }

  .onboarding-shell.cold-open,
  .onboarding-shell.done {
    min-height: auto;
  }

  .onboarding-hero h2,
  .onboarding-panel h2 {
    font-size: 28px;
  }

  .onboarding-entry-actions .primary,
  .onboarding-demo-option button {
    width: 100%;
  }

  .onboarding-demo-option {
    grid-template-columns: 1fr;
  }

  .onboarding-chip-grid,
  .onboarding-chip-grid.goal-grid,
  .onboarding-chip-grid.role-grid {
    grid-template-columns: 1fr;
  }

  .onboarding-chip-grid .chip {
    justify-content: flex-start;
    text-align: left;
  }

  .webhook-row-actions {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    width: 100%;
  }

  .visit-stamp-row .module-actions {
    max-width: none;
    width: 100%;
  }

  .material-memory-line {
    flex-direction: column;
    align-items: stretch;
  }

  .compact-segmented {
    justify-content: stretch;
  }

  .compact-segmented button,
  .trust-tabs button {
    flex: 1 1 140px;
  }

  .sync-queue-actions {
    justify-content: stretch;
  }

  .sync-queue-actions .chip,
  .sync-queue-actions button {
    width: 100%;
    justify-content: center;
  }

  .engine-run-shell {
    gap: 12px;
  }

  .engine-run-shell .panel-head,
  .engine-run-shell .panel-body,
  .engine-run-shell .panel-foot,
  .engine-run-shell .card {
    padding: 14px;
  }

  .engine-run-shell .list-row {
    grid-template-columns: minmax(0, 1fr);
    justify-items: stretch;
  }

  .engine-run-shell .list-row .tier,
  .engine-run-shell .list-row .chip {
    justify-self: start;
  }

  .engine-list-status {
    justify-items: start;
  }

  .engine-input-grid {
    grid-template-columns: 1fr;
  }

  .engine-row {
    gap: 8px;
    align-items: stretch;
  }

  .engine-row .ghost,
  .engine-row .secondary,
  .engine-row button {
    justify-self: stretch;
  }

  .table {
    display: block;
    overflow-x: auto;
    scrollbar-width: thin;
  }

  .table th,
  .table td {
    white-space: normal;
    overflow-wrap: anywhere;
  }

  .packet-watermark {
    display: none;
  }

  .material-note {
    grid-column: span 1;
  }

  .similar-table-actions {
    min-width: 0;
  }

  .today-stop-list {
    max-height: none;
  }

  .today-bottom-bar,
  .route-bottom-bar,
  .property-bottom-bar,
  .similar-bottom-bar,
  .packet-bottom-bar {
    right: 16px;
    bottom: max(12px, env(safe-area-inset-bottom));
    left: 16px;
    width: auto;
  }

  .today-stop-card {
    grid-template-columns: 1fr;
  }

  .route-stop-card {
    grid-template-columns: 1fr;
  }

  .route-stop-order {
    grid-template-columns: auto minmax(0, 1fr);
    justify-items: start;
    align-items: center;
  }

  .route-actions {
    grid-column: 1 / -1;
  }

  .storm-pass-manual {
    grid-template-columns: 1fr;
  }

  .tow-scene-manual {
    grid-template-columns: 1fr;
  }

  .today-stop-order {
    justify-items: start;
  }

  .today-stop-actions {
    min-width: 0;
  }

  .template-item-actions {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .checklist-item-cta {
    min-width: 96px;
  }

  .checklist-item-cta .compact {
    padding-inline: 10px;
  }

  .checklist-proof-row {
    align-items: flex-start;
    flex-direction: column;
  }

  .video-card {
    grid-template-columns: 84px minmax(0, 1fr);
  }

  .video-card .button-row {
    grid-column: 1 / -1;
  }

  .video-poster {
    width: 84px;
  }

  .share-recipient,
  .report-block {
    grid-template-columns: 1fr;
  }

  .packet-report-canvas {
    max-height: none;
    padding: 14px;
  }

  .packet-preview {
    min-height: 0;
    padding: 18px;
  }

  .packet-report-header,
  .packet-cover,
  .packet-summary-grid,
  .packet-photo-pairs,
  .cover-photo-grid,
  .artifact-picker,
  .recipient-report-head,
  .recipient-job-block,
  .recipient-pair {
    grid-template-columns: 1fr;
  }

  .packet-report-meta {
    justify-items: start;
  }

  .primary,
  .secondary,
  .ghost,
  .danger {
    width: 100%;
  }

  /* In stacked full-width groups, keep one obvious primary and let the
     supporting actions read quieter instead of equal-weight walls. */
  .button-row .secondary,
  .panel-foot .secondary,
  .route-actions .secondary {
    border-color: var(--soft-line);
    background: var(--sunken);
    font-weight: 700;
  }

  .button-row .ghost {
    min-height: 44px;
    font-weight: 700;
  }
}

/* Mobile shell: one compact sticky header plus a bottom tab bar. The desktop
   sidebar layout above 768px stays as-is. */
@media (max-width: 768px) {
  .app-shell {
    grid-template-columns: 1fr;
  }

  .rail {
    display: none;
  }

  .workspace {
    padding: 12px 16px 24px;
  }

  body.has-tabbar .workspace {
    padding-bottom: calc(78px + env(safe-area-inset-bottom));
  }

  .topbar {
    position: sticky;
    top: 0;
    z-index: 40;
    flex-wrap: nowrap;
    gap: 10px;
    margin: -12px -16px 16px;
    min-height: 56px;
    padding: 8px 12px;
    padding-top: max(8px, env(safe-area-inset-top));
    background: var(--field-deep);
    color: #fff;
    box-shadow: 0 8px 22px rgba(6, 43, 39, 0.22);
  }

  .topbar h1 {
    flex: 1;
    min-width: 0;
    overflow: hidden;
    color: #fff;
    font-size: 17px;
    line-height: 1.2;
    white-space: nowrap;
    text-overflow: ellipsis;
  }

  body.text-scale-200 .topbar h1 {
    font-size: 24px;
  }

  .topbar-brand {
    display: inline-flex;
  }

  .topbar-mark {
    width: 32px;
    height: 32px;
    border: 1px solid rgba(255, 255, 255, 0.45);
    background: transparent;
  }

  .top-actions {
    flex: 0 0 auto;
    flex-wrap: nowrap;
  }

  .top-actions #quickStart {
    display: none;
  }

  .sync-chip {
    width: auto;
    max-width: 160px;
    min-height: 38px;
    padding: 0 11px;
    border-color: rgba(255, 255, 255, 0.32);
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
    font-size: 12px;
  }

  .tabbar {
    display: block;
    position: fixed;
    right: 0;
    bottom: 0;
    left: 0;
    z-index: 60;
  }

  .tabbar-row {
    position: relative;
    z-index: 3;
    display: grid;
    grid-auto-flow: column;
    grid-auto-columns: 1fr;
    gap: 4px;
    padding: 6px 10px calc(6px + env(safe-area-inset-bottom));
    border-top: 1px solid var(--line);
    background: #fff;
    box-shadow: 0 -10px 24px rgba(11, 15, 20, 0.08);
  }

  .tabbar .tab {
    display: grid;
    gap: 2px;
    justify-items: center;
    align-content: center;
    min-height: 52px;
    padding: 5px 4px;
    border-radius: 10px;
    background: transparent;
    color: var(--muted);
    font-size: 11px;
    font-weight: 800;
  }

  .tabbar .tab.active {
    color: var(--primary-dark);
    background: #eaf1ff;
  }

  .tab-sheet-backdrop {
    position: fixed;
    inset: 0;
    z-index: 1;
    border: 0;
    background: rgba(11, 15, 20, 0.45);
  }

  .tab-sheet {
    position: fixed;
    right: 0;
    bottom: calc(64px + env(safe-area-inset-bottom));
    left: 0;
    z-index: 2;
    max-height: 68vh;
    overflow: auto;
    padding: 14px 16px 18px;
    border-radius: 16px 16px 0 0;
    background: #fff;
    box-shadow: 0 -14px 36px rgba(11, 15, 20, 0.22);
  }

  .tab-sheet-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 10px;
  }

  .tab-sheet-head .ghost {
    width: auto;
  }

  .tab-sheet-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
  }

  .tab-sheet-grid button {
    min-height: 48px;
    padding: 0 12px;
    border: 1px solid var(--soft-line);
    border-radius: 8px;
    background: #fff;
    color: var(--ink);
    font-weight: 700;
    text-align: left;
  }

  .tab-sheet-grid button.active {
    border-color: var(--primary);
    background: #eaf1ff;
    color: var(--primary-dark);
  }

  .today-bottom-bar,
  .route-bottom-bar,
  .property-bottom-bar,
  .similar-bottom-bar,
  .packet-bottom-bar {
    right: 12px;
    bottom: calc(72px + env(safe-area-inset-bottom));
    left: 12px;
    width: auto;
  }
}

@media print {
  .recipient-lightbox {
    display: none;
  }
}

/* Recipient hash links render a standalone document: app chrome is hidden
   and long hash/headline lines wrap instead of clipping at 360px. */
body.recipient-standalone .rail,
body.recipient-standalone .topbar {
  display: none;
}

body.recipient-standalone .app-shell {
  display: block;
  padding: 0;
}

body.recipient-standalone .workspace {
  max-width: 820px;
  margin: 0 auto;
  padding: 12px;
}

.recipient-standalone-footer {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  color: var(--muted);
  font-size: 14px;
  padding: 8px 2px 16px;
}

.recipient-report .integrity-check p,
.recipient-report .recipient-footer span,
.recipient-report h2,
.recipient-report h3,
.recipient-report .chip,
.recipient-report strong {
  overflow-wrap: anywhere;
  max-width: 100%;
}
