:root {
  --ink: #173231;
  --muted: #64706f;
  --line: #d9e0dd;
  --surface: #ffffff;
  --soft: #f4f7f5;
  --paper: #fbfcfa;
  --teal: #0f766e;
  --teal-dark: #104c48;
  --mint: #d9f0e9;
  --sand: #f4dfb7;
  --gold: #bc7d12;
  --rose: #b42318;
  --rose-soft: #fee4e2;
  --blue: #255fae;
  --blue-soft: #d7e8ff;
  --success: #22845f;
  --success-soft: #e4f6ed;
  --warning: #9a6200;
  --warning-soft: #fff2ce;
  --shadow: 0 10px 24px rgba(16, 76, 72, 0.08);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.5;
}

a {
  color: var(--teal-dark);
  text-decoration: none;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  min-height: 72px;
  padding: 14px clamp(16px, 4vw, 44px);
  background: rgba(255, 255, 255, 0.94);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(10px);
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  flex: 0 1 auto;
  min-width: 0;
  max-width: min(230px, calc(100vw - 110px));
  color: var(--ink);
}

.brand-logo {
  display: block;
  width: 138px !important;
  max-width: 100%;
  height: auto;
  object-fit: contain;
}

.brand-stage {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 3px 8px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--soft);
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 800;
}

.nav {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: flex-end;
  min-width: 0;
}

.nav-primary {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.nav-menu {
  position: relative;
}

.nav-menu summary {
  list-style: none;
  cursor: pointer;
}

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

.nav-menu summary::after {
  content: "";
  display: inline-block;
  width: 7px;
  height: 7px;
  margin-left: 8px;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: translateY(-2px) rotate(45deg);
}

.nav-menu[open] summary::after {
  transform: translateY(2px) rotate(225deg);
}

.nav-menu-list {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  z-index: 20;
  display: grid;
  min-width: 210px;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  box-shadow: var(--shadow);
}

.nav-menu-list .nav-link {
  width: 100%;
  white-space: nowrap;
}

.nav-link {
  padding: 8px 10px;
  color: var(--muted);
  border-radius: 6px;
  font-weight: 650;
  font-size: 0.94rem;
}

.nav-logout-form {
  margin: 0;
}

.nav-button {
  border: 0;
  background: transparent;
  cursor: pointer;
  font-family: inherit;
}

.nav-link.is-active,
.nav-link:hover {
  background: var(--mint);
  color: var(--teal-dark);
}

.menu-button {
  display: none;
}

.page {
  width: min(1180px, calc(100% - 28px));
  margin: 0 auto;
  padding: 28px 0 42px;
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.3fr) minmax(280px, 0.7fr);
  gap: 28px;
  align-items: stretch;
  padding: clamp(30px, 7vw, 76px) 0 28px;
}

.eyebrow {
  margin: 0 0 12px;
  color: var(--teal);
  font-weight: 800;
  text-transform: uppercase;
  font-size: 0.84rem;
}

h1,
h2,
h3 {
  margin: 0 0 12px;
  line-height: 1.12;
  color: var(--ink);
}

h1 {
  font-size: clamp(2.15rem, 5vw, 4.5rem);
  max-width: 820px;
}

h2 {
  font-size: clamp(1.55rem, 3vw, 2.45rem);
}

h3 {
  font-size: 1.15rem;
}

p {
  margin: 0 0 14px;
}

.hero-copy {
  max-width: 720px;
  color: var(--muted);
  font-size: 1.18rem;
}

.hero-panel,
.panel,
.metric,
.card,
.notice,
.flash,
.empty-state {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.hero-panel {
  display: grid;
  gap: 12px;
  padding: 18px;
}

.mini-metric {
  padding: 18px;
  border-radius: 6px;
  background: var(--soft);
}

.mini-metric span,
.metric span,
.muted,
small {
  color: var(--muted);
}

.mini-metric strong,
.metric strong {
  display: block;
  margin-top: 6px;
  font-size: 1.55rem;
}

.actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 20px;
}

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

.button,
button.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 10px 16px;
  border: 0;
  border-radius: 7px;
  background: var(--teal);
  color: #fff;
  font-weight: 800;
  cursor: pointer;
  font-size: 0.98rem;
}

.button:hover {
  background: var(--teal-dark);
  color: #fff;
}

.button.button-secondary,
button.button-secondary {
  background: #eef4f2;
  color: var(--teal-dark);
}

.button.button-secondary:hover,
button.button-secondary:hover {
  background: var(--mint);
  color: var(--teal-dark);
}

.button.button-danger,
button.button-danger {
  background: var(--rose);
}

.button.button-danger:hover,
button.button-danger:hover {
  background: #8f1f17;
}

.button-disabled,
.button-disabled:hover {
  cursor: not-allowed;
  opacity: 0.72;
  background: #eef4f2;
  color: var(--muted);
}

.button-small {
  min-height: 36px;
  padding: 7px 11px;
  font-size: 0.88rem;
}

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

.grid-2 > * {
  grid-column: span 6;
}

.grid-3 > * {
  grid-column: span 4;
}

.grid-4 > * {
  grid-column: span 3;
}

.panel,
.card {
  padding: clamp(16px, 3vw, 24px);
  margin-bottom: 18px;
}

.metric {
  min-height: 118px;
  padding: 18px;
}

.metric strong {
  font-size: 1.75rem;
}

.metric.warn {
  border-color: #f3c470;
  background: #fff8e8;
}

.metric.danger {
  border-color: #fda29b;
  background: #fff5f5;
}

.metric.good {
  border-color: #91d8bd;
  background: #f0fbf6;
}

.section-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 14px;
  flex-wrap: wrap;
}

.page > .section-title h1,
.panel h1 {
  font-size: clamp(2rem, 4vw, 3.35rem);
}

.table-wrap {
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

table {
  width: 100%;
  border-collapse: collapse;
  min-width: 720px;
}

th,
td {
  padding: 13px 14px;
  text-align: left;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
}

th {
  color: var(--muted);
  font-size: 0.8rem;
  text-transform: uppercase;
}

tr:last-child td {
  border-bottom: 0;
}

.status {
  display: inline-flex;
  align-items: center;
  padding: 5px 9px;
  border-radius: 999px;
  background: #edf3f1;
  color: var(--teal-dark);
  font-size: 0.78rem;
  font-weight: 800;
  white-space: nowrap;
}

.status-late,
.status-bad_debt,
.status-rejected {
  background: var(--rose-soft);
  color: var(--rose);
}

.status-due_today,
.status-grace_period,
.status-needs_more_information,
.status-needs_clarification,
.status-submitted {
  background: #fff2ce;
  color: #8a5a00;
}

.status-paid,
.status-completed,
.status-active,
.status-accepted,
.status-verified,
.status-reviewed {
  background: var(--mint);
  color: var(--teal-dark);
}

.status-payment_submitted,
.status-approved_pending_first_payment,
.status-pending_first_payment {
  background: var(--blue-soft);
  color: var(--blue);
}

.progress {
  width: 100%;
  height: 10px;
  overflow: hidden;
  background: #e7eeee;
  border-radius: 999px;
}

.progress span {
  display: block;
  height: 100%;
  background: var(--teal);
}

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

.field {
  display: grid;
  gap: 6px;
  margin-bottom: 13px;
  color: var(--ink);
  font-weight: 750;
}

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

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

.compact-field {
  min-width: 190px;
  margin-bottom: 0;
}

.compact-field input {
  min-height: 36px;
  padding: 7px 10px;
}

.checkbox {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  min-height: 32px;
  margin: 12px 0;
  font-weight: 650;
}

.checkbox input {
  width: 28px;
  min-width: 28px;
  height: 24px;
  margin-top: 0;
}

.form-section {
  margin: 14px 0 16px;
}

.form-section h3 {
  margin-bottom: 10px;
  font-size: 1rem;
}

.form-disclosure {
  margin: 12px 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfdfc;
}

.form-disclosure summary {
  min-height: 44px;
  padding: 12px 14px;
  cursor: pointer;
  font-weight: 850;
  color: var(--teal-dark);
}

.form-disclosure summary::marker {
  color: var(--teal);
}

.form-disclosure > div {
  padding: 4px 14px 14px;
}

.danger-zone {
  border-color: #f0c4bf;
  background: #fffafa;
}

.danger-zone h2 {
  color: #7f1d1d;
}

.deletion-status-box {
  display: grid;
  gap: 10px;
  margin: 14px 0;
  padding: 16px;
  border: 1px solid #f0c4bf;
  border-radius: 8px;
  background: #fff;
}

.deletion-status-box h3 {
  margin: 0;
}

.deletion-blocked {
  background: #fff5f4;
}

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

.deletion-facts div {
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfdfc;
}

.deletion-facts dt {
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 850;
}

.deletion-facts dd {
  margin: 2px 0 0;
  color: var(--ink);
  font-weight: 800;
}

.destructive-disclosure {
  border-color: #f0c4bf;
  background: #fff;
}

.destructive-disclosure summary {
  color: #7f1d1d;
}

.deletion-confirmation {
  display: grid;
  gap: 10px;
}

.receipt-confirm-panel {
  display: grid;
  gap: 14px;
}

.agreement-tabs {
  margin-top: 18px;
}

.agreement-summary-grid .metric {
  min-height: 124px;
}

.agreement-tab-list {
  position: sticky;
  top: 72px;
  z-index: 8;
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding: 10px 0;
  background: var(--paper);
  border-bottom: 1px solid var(--line);
  scrollbar-width: thin;
}

.agreement-tab {
  flex: 0 0 auto;
  min-height: 42px;
  padding: 9px 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
  color: var(--muted);
  font: inherit;
  font-weight: 850;
  cursor: pointer;
}

.agreement-tab[aria-selected="true"] {
  border-color: var(--teal);
  background: var(--mint);
  color: var(--teal-dark);
  box-shadow: 0 8px 20px rgba(16, 76, 72, 0.08);
}

.agreement-tab:focus-visible {
  outline: 3px solid rgba(15, 118, 110, 0.28);
  outline-offset: 2px;
}

.agreement-tab-panel {
  padding-top: 16px;
}

.receipt-task-head {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  align-items: flex-start;
}

.receipt-uploader {
  display: grid;
  gap: 10px;
  margin: 12px 0;
}

.receipt-dropzone {
  position: relative;
  display: grid;
  justify-items: center;
  gap: 7px;
  min-height: 190px;
  padding: 24px;
  border: 2px dashed #9dd7c9;
  border-radius: 12px;
  background: linear-gradient(180deg, #f7fffb 0%, #ffffff 100%);
  color: var(--ink);
  text-align: center;
  cursor: pointer;
  transition: border-color 0.16s ease, background 0.16s ease, transform 0.16s ease;
}

.receipt-dropzone strong {
  font-size: 1.08rem;
}

.receipt-dropzone span {
  color: var(--muted);
  font-weight: 750;
}

.receipt-dropzone small {
  max-width: 360px;
  color: var(--muted);
}

.receipt-drop-icon {
  width: 58px;
  height: 58px;
  border: 1px solid #b8e4d7;
  border-radius: 18px;
  background:
    linear-gradient(#0f766e, #0f766e) center 19px / 20px 3px no-repeat,
    linear-gradient(#0f766e, #0f766e) center 19px / 3px 20px no-repeat,
    #e7f8f1;
}

.receipt-uploader.is-dragging .receipt-dropzone,
.receipt-dropzone:hover {
  border-color: var(--teal);
  background: #eefcf6;
  transform: translateY(-1px);
}

.receipt-file-input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.receipt-file-preview {
  display: none;
  gap: 10px;
  align-items: center;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.receipt-file-preview.has-file {
  display: flex;
}

.receipt-file-preview img {
  width: 72px;
  height: 72px;
  border-radius: 8px;
  object-fit: cover;
  border: 1px solid var(--line);
}

.receipt-file-preview strong,
.receipt-file-preview span {
  display: block;
  overflow-wrap: anywhere;
}

.receipt-file-preview span {
  color: var(--muted);
  font-size: 0.9rem;
}

.receipt-file-status {
  min-height: 20px;
  margin: 0;
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 750;
}

.receipt-file-status.is-error {
  color: var(--rose);
}

.is-auto-upload-ready .receipt-submit {
  display: none;
}

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

.receipt-readout div,
.receipt-needed {
  padding: 13px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.receipt-readout span {
  display: block;
  margin-bottom: 4px;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 800;
}

.receipt-readout strong {
  display: block;
  overflow-wrap: anywhere;
  color: var(--ink);
}

.receipt-needed {
  border-color: #f3c470;
  background: #fffaf0;
}

.receipt-needed h3 {
  font-size: 1rem;
}

.backup-entry {
  background: #fff;
}

.step-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 16px;
}

.step-strip span {
  padding: 7px 10px;
  border: 1px solid #b8e4d7;
  border-radius: 999px;
  background: #fff;
  color: var(--teal-dark);
  font-size: 0.86rem;
  font-weight: 850;
}

.is-hidden {
  display: none !important;
}

.flash-stack {
  display: grid;
  gap: 10px;
  margin-bottom: 18px;
}

.flash {
  padding: 12px 14px;
  box-shadow: none;
}

.flash-success {
  background: var(--mint);
  border-color: #9bd8c3;
}

.flash-error {
  background: var(--rose-soft);
  border-color: #fda29b;
}

.notice-list {
  display: grid;
  gap: 10px;
  margin-bottom: 18px;
}

.notice {
  padding: 13px 14px;
  box-shadow: none;
}

.empty-state {
  padding: 24px;
  text-align: left;
  box-shadow: none;
}

.split {
  display: grid;
  grid-template-columns: minmax(0, 0.68fr) minmax(280px, 0.32fr);
  gap: 18px;
}

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

.timeline-item {
  padding: 13px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 7px;
}

.inline-form {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin: 4px 0;
}

.inline-form input,
.inline-form select {
  min-height: 36px;
  border: 1px solid var(--line);
  border-radius: 7px;
  padding: 6px 8px;
}

.stacked-form {
  display: grid;
  gap: 12px;
}

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

.copy-row code {
  display: block;
  min-width: 0;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #f8faf9;
  overflow-wrap: anywhere;
}

.filter-bar {
  display: flex;
  align-items: end;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 14px;
}

.filter-bar .field {
  min-width: 220px;
  margin-bottom: 0;
}

.filter-bar .button {
  margin-bottom: 0;
}

.prewrap {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  background: #f8faf9;
  border: 1px solid var(--line);
  border-radius: 7px;
  padding: 12px;
  font-size: 0.86rem;
}

.terms-summary {
  display: grid;
  gap: 16px;
}

.terms-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1px;
  margin: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--line);
}

.terms-list div {
  padding: 13px 14px;
  background: #fff;
}

.terms-list dt {
  margin-bottom: 5px;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 800;
}

.terms-list dd {
  margin: 0;
  color: var(--ink);
  font-weight: 800;
  overflow-wrap: anywhere;
}

.terms-policy {
  padding-top: 4px;
}

.terms-policy h3 {
  margin-bottom: 6px;
  font-size: 1rem;
}

.terms-policy p {
  margin-bottom: 0;
  white-space: pre-line;
  overflow-wrap: anywhere;
}

.selected-card {
  border-color: var(--teal);
  box-shadow: 0 0 0 3px rgba(15, 118, 110, 0.12);
}

.workflow-preview {
  align-content: center;
}

.workflow-preview .mini-metric {
  position: relative;
  padding-left: 20px;
}

.workflow-preview .mini-metric::before {
  content: "";
  position: absolute;
  left: 8px;
  top: 20px;
  bottom: 20px;
  width: 4px;
  border-radius: 999px;
  background: var(--teal);
}

.marketing-page .page {
  width: min(1200px, calc(100% - 28px));
}

.story-hero {
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(340px, 0.92fr);
  gap: clamp(24px, 5vw, 56px);
  align-items: center;
  min-height: min(720px, calc(100vh - 120px));
  padding: clamp(34px, 7vw, 84px) 0 clamp(26px, 5vw, 54px);
}

.story-hero h1 {
  font-size: clamp(2.5rem, 5.4vw, 4.65rem);
  max-width: 820px;
}

.story-hero-copy {
  max-width: 760px;
}

.story-trust-line {
  display: inline-flex;
  max-width: 720px;
  margin-top: 18px;
  padding: 11px 14px;
  border: 1px solid #b8e4d7;
  border-radius: 8px;
  background: #fff;
  color: var(--teal-dark);
  font-weight: 800;
}

.story-visual {
  display: grid;
  gap: 16px;
  padding: clamp(18px, 3vw, 28px);
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  box-shadow: var(--shadow);
}

.story-visual-brand {
  display: flex;
  gap: 14px;
  align-items: center;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--line);
}

.story-visual-brand img {
  width: 58px;
  height: 58px;
  border-radius: 14px;
}

.story-visual-brand strong,
.story-visual-brand span {
  display: block;
}

.story-visual-brand span {
  color: var(--muted);
  font-weight: 700;
}

.story-flow {
  display: grid;
  gap: 10px;
  padding: 0;
  margin: 0;
  list-style: none;
}

.story-flow li,
.story-plan article,
.story-card,
.story-audience,
.story-proof-grid article,
.name-story {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  box-shadow: var(--shadow);
}

.story-flow li {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  padding: 13px;
}

.story-flow li > span,
.story-plan article > span,
.story-card > span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: 999px;
  background: var(--mint);
  color: var(--teal-dark);
  font-weight: 900;
}

.story-flow strong,
.story-flow small {
  display: block;
}

.story-flow small {
  color: var(--muted);
}

.story-section,
.story-band,
.story-audience-grid,
.story-proof-grid,
.story-cta {
  margin: clamp(30px, 6vw, 72px) 0;
}

.story-section-head {
  max-width: 820px;
  margin-bottom: 22px;
}

.story-section-head p,
.story-band p,
.story-audience p,
.story-proof-grid p,
.story-cta p {
  color: var(--muted);
}

.story-card-grid,
.story-plan,
.story-audience-grid,
.story-proof-grid {
  display: grid;
  gap: 16px;
}

.story-card-grid,
.story-plan {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.story-card,
.story-plan article,
.story-audience,
.story-proof-grid article {
  padding: clamp(16px, 3vw, 24px);
}

.story-card h3,
.story-plan h3 {
  margin-top: 14px;
}

.story-band {
  display: grid;
  grid-template-columns: minmax(0, 0.95fr) minmax(320px, 0.55fr);
  gap: 18px;
  align-items: stretch;
  padding: clamp(22px, 5vw, 40px);
  border: 1px solid #b8e4d7;
  border-radius: 8px;
  background: var(--mint);
}

.name-story {
  display: grid;
  align-content: center;
  gap: 14px;
  padding: 18px;
  box-shadow: none;
}

.name-story img {
  display: block;
  width: min(100%, 300px);
  height: auto;
}

.story-audience-grid,
.story-proof-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.story-audience {
  display: grid;
  align-content: start;
}

.check-list {
  display: grid;
  gap: 10px;
  padding: 0;
  margin: 10px 0 18px;
  list-style: none;
}

.check-list li {
  position: relative;
  padding-left: 28px;
  color: var(--ink);
}

.check-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.42em;
  width: 14px;
  height: 8px;
  border-left: 3px solid var(--teal);
  border-bottom: 3px solid var(--teal);
  transform: rotate(-45deg);
}

.story-cta {
  padding: clamp(24px, 5vw, 44px);
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  box-shadow: var(--shadow);
}

.brand-showcase {
  border-color: #b8e4d7;
  background: #f8fffc;
}

.merchant-button-showcase {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 0.72fr);
  gap: clamp(18px, 4vw, 34px);
  align-items: center;
}

.merchant-button-art {
  display: grid;
  gap: 12px;
  justify-items: start;
  padding: clamp(16px, 3vw, 22px);
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.merchant-button-art img {
  display: block;
  width: min(100%, 360px);
  height: auto;
}

.merchant-button-art small {
  color: var(--muted);
  font-weight: 800;
}

.subsection {
  margin-top: 20px;
}

.subsection h2 {
  font-size: 1.35rem;
}

.task-grid,
.template-grid,
.notification-list,
.setup-list,
.report-bars {
  display: grid;
  gap: 14px;
  margin-bottom: 18px;
}

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

.task-card,
.setup-step,
.template-card,
.notification-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  min-width: 0;
  padding: 16px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.task-card h3,
.setup-step h3,
.template-card h3 {
  margin-bottom: 6px;
}

.task-card p,
.setup-step p,
.template-card p,
.notification-card p {
  margin-bottom: 0;
  color: var(--muted);
}

.task-card.warn {
  border-color: #f3c470;
  background: #fffaf0;
}

.task-card.danger {
  border-color: #fda29b;
  background: #fff6f5;
}

.demo-login-grid,
.social-auth-grid,
.role-choice-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin: 16px 0 18px;
}

.demo-login-details {
  margin-top: 18px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
}

.demo-login-details summary {
  width: fit-content;
  cursor: pointer;
  color: var(--teal-dark);
  font-weight: 850;
}

.social-auth {
  margin: 18px 0 20px;
}

.social-auth-grid {
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  margin-bottom: 12px;
}

.social-button {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 46px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  font-weight: 850;
  text-align: center;
}

.social-button:hover {
  border-color: var(--teal);
  background: #f8fffc;
  color: var(--teal-dark);
}

.social-button > span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  border-radius: 999px;
  background: var(--soft);
  color: var(--teal-dark);
  font-weight: 950;
}

.social-google > span {
  background: #fff2ce;
  color: #9a6200;
}

.social-facebook > span {
  background: var(--blue-soft);
  color: var(--blue);
}

.social-linkedin > span {
  background: #e7f1ff;
  color: #0a66c2;
}

.social-disabled,
.social-disabled:hover {
  cursor: not-allowed;
  border-color: var(--line);
  background: #f8faf9;
  color: var(--muted);
}

.social-pending {
  font-size: 0.9rem;
}

.sign-in-method-list {
  display: grid;
  gap: 10px;
  margin: 18px 0;
}

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

.sign-in-method strong {
  display: block;
  margin-bottom: 3px;
  color: var(--ink);
}

.sign-in-method p {
  margin: 0;
  color: var(--muted);
  font-size: 0.92rem;
}

.sign-in-action {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  flex-wrap: wrap;
}

.compact-form {
  display: grid;
  gap: 12px;
}

.auth-divider {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 16px 0;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 850;
  text-transform: uppercase;
}

.auth-divider::before,
.auth-divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--line);
}

.signup-context {
  margin: 16px 0 18px;
  padding: 16px;
  border: 1px solid #91d8bd;
  border-radius: 8px;
  background: #f0fbf6;
}

.signup-context h2 {
  margin-bottom: 6px;
  font-size: 1.45rem;
}

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

.demo-login-card,
.role-choice {
  display: grid;
  gap: 5px;
  min-height: 96px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  text-align: left;
  cursor: pointer;
}

.demo-login-card span,
.role-choice span {
  color: var(--muted);
  font-size: 0.9rem;
}

.demo-login-card:hover,
.role-choice:hover,
.role-choice.is-selected {
  border-color: var(--teal);
  background: var(--mint);
  color: var(--teal-dark);
}

.plan-card {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 100%;
}

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

.plan-price strong {
  display: block;
  font-size: 1.75rem;
}

.plan-price span {
  color: var(--muted);
}

.plan-facts,
.terms-list {
  overflow-wrap: anywhere;
}

.plan-facts {
  display: grid;
  gap: 1px;
  margin: 14px 0;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
  background: var(--line);
}

.plan-facts div {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 12px;
  background: #fff;
}

.plan-facts dt {
  color: var(--muted);
  font-weight: 800;
}

.plan-facts dd {
  margin: 0;
  text-align: right;
  font-weight: 800;
}

.setup-step {
  justify-content: flex-start;
}

.setup-step > span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 36px;
  width: 36px;
  height: 36px;
  border-radius: 999px;
  background: #edf3f1;
  color: var(--teal-dark);
  font-weight: 900;
}

.setup-step.is-complete > span {
  background: var(--mint);
}

.setup-step div {
  flex: 1;
}

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

.template-card {
  display: block;
}

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

.plan-tier-card.is-current {
  border-color: var(--teal);
  background: #f8fffc;
  box-shadow: 0 0 0 3px rgba(15, 118, 110, 0.1);
}

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

.access-current,
.access-next {
  display: grid;
  gap: 6px;
  min-height: 120px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.access-current {
  border-color: #91d8bd;
  background: #f0fbf6;
}

.access-next {
  border-color: #d7e8ff;
  background: #f8fbff;
}

.access-current strong,
.access-next strong {
  font-size: 1.35rem;
}

.access-current span,
.access-next span {
  font-weight: 800;
}

.access-current small,
.access-next small {
  color: var(--muted);
}

.notification-card {
  align-items: flex-start;
}

.notification-card.is-unread {
  border-color: #f3c470;
  background: #fffaf0;
}

.compact-actions {
  margin-top: 0;
  align-items: center;
}

.destructive-zone {
  width: 100%;
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px dashed #f0b4ad;
}

.proof-card {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(280px, 0.9fr);
  gap: 18px;
}

.proof-decision {
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8faf9;
}

.decision-checklist {
  display: grid;
  gap: 7px;
  margin: 12px 0 16px;
  padding: 12px 14px 12px 28px;
  border: 1px solid #b8e4d7;
  border-radius: 8px;
  background: #f4fffb;
  color: var(--teal-dark);
  font-size: 0.94rem;
}

.decision-actions {
  align-items: stretch;
}

.proof-preview {
  display: grid;
  place-items: center;
  min-height: 148px;
  padding: 18px;
  border: 1px dashed var(--teal);
  border-radius: 8px;
  background: #f8fffc;
  text-align: center;
}

.proof-preview span {
  color: var(--muted);
  font-size: 0.9rem;
}

.proof-preview-empty {
  border-color: var(--line);
  background: #fff;
}

.document-review-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 8px;
  align-items: stretch;
  min-width: 220px;
}

.document-review-form .button {
  width: 100%;
}

.report-tabs {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 14px;
}

.report-tabs a {
  padding: 9px 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
  color: var(--muted);
  font-weight: 800;
}

.report-tabs a.is-active,
.report-tabs a:hover {
  border-color: var(--teal);
  background: var(--mint);
  color: var(--teal-dark);
}

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

.report-bar .section-title {
  margin-bottom: 0;
}

.report-bar.good .progress span {
  background: var(--teal);
}

.report-bar.danger .progress span {
  background: var(--rose);
}

.score-meter {
  display: grid;
  gap: 8px;
  margin: 16px 0 18px;
}

.score-track {
  height: 16px;
  overflow: hidden;
  border-radius: 999px;
  background: linear-gradient(90deg, #fee4e2, #fff2ce, #d7e8ff, #d9f0e9);
}

.score-track span {
  display: block;
  height: 100%;
  background: rgba(15, 118, 110, 0.65);
  border-right: 3px solid var(--teal-dark);
}

.score-labels {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 800;
}

.next-payment-hero {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 18px;
  padding: clamp(18px, 4vw, 28px);
  border: 1px solid #91d8bd;
  border-radius: 8px;
  background: linear-gradient(135deg, #ffffff 0%, #ecfbf6 100%);
  box-shadow: var(--shadow);
}

.next-payment-hero h2 {
  font-size: clamp(2rem, 5vw, 3.5rem);
}

.print-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-bottom: 14px;
}

.dir-rtl {
  direction: rtl;
}

.dir-rtl th,
.dir-rtl td,
.dir-rtl .demo-login-card,
.dir-rtl .role-choice {
  text-align: right;
}

.dir-rtl .plan-facts dd {
  text-align: left;
}

.footer {
  border-top: 1px solid var(--line);
  padding: 24px clamp(16px, 4vw, 44px);
  color: var(--muted);
  background: #fff;
}

.footer-inner {
  display: flex;
  gap: 14px;
  align-items: center;
  max-width: 1080px;
  margin: 0 auto;
}

.footer-symbol {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  flex: 0 0 auto;
}

.footer p {
  margin: 0;
}

.footer-copy {
  display: grid;
  gap: 10px;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 16px;
  font-size: 0.9rem;
  font-weight: 800;
}

.footer-links a {
  color: var(--teal-dark);
}

@media (max-width: 1180px) {
  .topbar {
    align-items: flex-start;
    flex-wrap: wrap;
  }

  .nav {
    flex: 1 1 100%;
    justify-content: flex-start;
  }
}

@media (max-width: 820px) {
  .topbar {
    align-items: center;
  }

  .menu-button {
    display: inline-flex;
    min-height: 38px;
    padding: 7px 11px;
    border: 1px solid var(--line);
    border-radius: 7px;
    background: #fff;
    color: var(--ink);
    font-weight: 800;
  }

  .nav {
    display: none;
    position: absolute;
    top: 72px;
    left: 0;
    right: 0;
    padding: 12px;
    background: #fff;
    border-bottom: 1px solid var(--line);
  }

  .nav.nav-open {
    display: grid;
  }

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

  .nav-menu {
    width: 100%;
  }

  .nav-menu-list {
    position: static;
    width: 100%;
    margin-top: 6px;
    box-shadow: none;
  }

  .hero,
  .story-hero,
  .story-band,
  .story-card-grid,
  .story-plan,
  .story-audience-grid,
  .story-proof-grid,
  .split,
  .form-grid {
    grid-template-columns: 1fr;
  }

  .grid > *,
  .grid.grid-2 > *,
  .grid.grid-3 > *,
  .grid.grid-4 > * {
    grid-column: 1 / -1;
  }

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

  .agreement-summary-grid > * {
    grid-column: auto !important;
  }

  .agreement-summary-grid .metric {
    min-height: 112px;
    padding: 15px;
  }

  .task-grid,
  .template-grid,
  .demo-login-grid,
  .social-auth-grid,
  .role-choice-grid,
  .proof-card,
  .access-schedule {
    grid-template-columns: 1fr;
  }

  .task-card,
  .setup-step,
  .notification-card,
  .next-payment-hero {
    align-items: stretch;
    flex-direction: column;
  }

  .task-card .button,
  .setup-step .button,
  .next-payment-hero .button,
  .plan-actions .button,
  .row-actions .button,
  .document-review-form .button {
    width: 100%;
  }

  .plan-actions,
  .row-actions,
  .document-review-form {
    grid-template-columns: 1fr;
  }

  .sign-in-method {
    grid-template-columns: 1fr;
  }

  .sign-in-action {
    justify-content: flex-start;
  }

  .sign-in-action .button,
  .sign-in-action form {
    width: 100%;
  }

  .row-actions,
  .document-review-form {
    display: grid;
  }

  .compact-field {
    min-width: 0;
  }

  .step-strip {
    display: grid;
  }

  .score-labels {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .table-wrap {
    overflow: visible;
    border: 0;
    border-radius: 0;
    background: transparent;
  }

  .table-wrap table {
    display: block;
    min-width: 0;
  }

  .table-wrap thead {
    display: none;
  }

  .table-wrap tbody {
    display: grid;
    gap: 12px;
  }

  .table-wrap tr {
    display: block;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fff;
  }

  .table-wrap td {
    display: grid;
    grid-template-columns: minmax(96px, 0.42fr) minmax(0, 1fr);
    gap: 12px;
    min-width: 0;
    padding: 11px 12px;
    border-bottom: 1px solid var(--line);
    overflow-wrap: anywhere;
  }

  .table-wrap td::before {
    content: attr(data-label);
    color: var(--muted);
    font-size: 0.72rem;
    font-weight: 850;
    text-transform: uppercase;
  }

  .table-wrap td:last-child {
    border-bottom: 0;
  }

  .table-wrap td .button {
    width: fit-content;
  }

  .inline-form {
    display: grid;
    align-items: stretch;
  }

  .inline-form input,
  .inline-form select,
  .inline-form .button {
    width: 100%;
  }

  .copy-row {
    grid-template-columns: 1fr;
  }

  .terms-list {
    grid-template-columns: 1fr;
  }

  .receipt-readout {
    grid-template-columns: 1fr;
  }

  .agreement-tab-list {
    top: 72px;
    margin-left: -16px;
    margin-right: -16px;
    padding-left: 16px;
    padding-right: 16px;
  }

  .receipt-dropzone {
    min-height: 170px;
    padding: 20px 14px;
  }

  .deletion-facts {
    grid-template-columns: 1fr;
  }

  h1 {
    font-size: 2.15rem;
  }

  .story-hero {
    min-height: 0;
    padding-top: 28px;
  }

  .story-hero h1 {
    font-size: clamp(2.2rem, 11vw, 3.35rem);
  }

  .story-trust-line {
    display: flex;
  }

  .story-flow li {
    grid-template-columns: 36px minmax(0, 1fr);
  }

  .story-band {
    padding: 18px;
  }

  .merchant-button-showcase {
    grid-template-columns: 1fr;
  }

  .name-story img {
    width: min(100%, 260px);
  }

  .check-list li {
    padding-left: 24px;
  }

  .footer-inner {
    align-items: flex-start;
  }

  .brand-stage {
    display: none;
  }

  .brand-logo {
    width: 124px !important;
  }
}

@media print {
  .topbar,
  .footer,
  .print-actions,
  .nav,
  .menu-button {
    display: none !important;
  }

  body {
    background: #fff;
    color: #000;
  }

  .page {
    width: 100%;
    padding: 0;
  }

  .panel,
  .card,
  .metric,
  .table-wrap {
    box-shadow: none;
    break-inside: avoid;
  }

  a {
    color: #000;
  }
}
