/* ==========================================================================
   FortiTag · Sales Agreements
   Stripe-inspired design system — presentation only.
   All class hooks match public/app.js and the server-rendered preview.
   ========================================================================== */

:root {
  color-scheme: light;

  /* Stripe slate palette */
  --ink: #0a2540;
  --ink-2: #425466;
  --ink-3: #8898aa;

  /* Brand (FortiTag logo blue, applied with Stripe discipline) */
  --brand: #1c40c9;
  --brand-hover: #1633a5;
  --brand-soft: #eef2fe;
  --brand-line: #c9d6f8;

  /* Status hues */
  --green: #0e6245;
  --green-soft: #e3f4ec;
  --amber: #8f5806;
  --amber-soft: #fcf0dc;
  --red: #c0123c;
  --red-soft: #fdeef1;
  --slate-soft: #eef1f6;

  /* Surfaces */
  --bg: #f6f9fc;
  --surface: #ffffff;
  --surface-sunken: #f6f9fc;
  --line: #e6ebf1;
  --line-strong: #cfd7e0;

  /* Shape & depth (Stripe: small radii, layered soft shadows) */
  --radius: 8px;
  --radius-small: 6px;
  --shadow-card: 0 1px 2px rgba(10, 37, 64, 0.06);
  --shadow-raised:
    0 6px 16px -4px rgba(10, 37, 64, 0.12),
    0 2px 4px rgba(10, 37, 64, 0.06);

  font-family:
    Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI",
    sans-serif;
  font-synthesis: none;
  text-rendering: optimizeLegibility;
}

* {
  box-sizing: border-box;
}

html {
  min-width: 320px;
  min-height: 100%;
  background: var(--bg);
}

body {
  min-height: 100vh;
  margin: 0;
  color: var(--ink-2);
  background: var(--bg);
  font-size: 14px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

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

button,
a {
  -webkit-tap-highlight-color: transparent;
}

a {
  color: var(--brand);
}

button {
  border: 0;
}

img {
  max-width: 100%;
}

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

::selection {
  background: var(--brand-soft);
}

:focus-visible {
  outline: 2px solid var(--brand);
  outline-offset: 2px;
}

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

.spacer-18 {
  height: 18px;
}

.spacer-20 {
  height: 20px;
}

.spacer-22 {
  height: 22px;
}

/* --------------------------------------------------------------------------
   Launch / loading
   -------------------------------------------------------------------------- */

.launch-screen {
  display: grid;
  min-height: 100vh;
  place-items: center;
  align-content: center;
  gap: 18px;
  color: var(--ink-3);
  font-size: 13px;
}

.launch-logo {
  width: min(240px, 60vw);
  height: auto;
}

.spinner {
  width: 24px;
  height: 24px;
  border: 2.5px solid var(--line);
  border-top-color: var(--brand);
  border-radius: 50%;
  animation: spin 0.75s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

.noscript-message {
  position: fixed;
  inset: 16px;
  z-index: 100;
  display: grid;
  place-items: center;
  padding: 24px;
  color: #fff;
  background: var(--ink);
  border-radius: var(--radius);
}

/* --------------------------------------------------------------------------
   Buttons (Stripe: compact, 6px radius, weight 600)
   -------------------------------------------------------------------------- */

.btn {
  display: inline-flex;
  min-height: 36px;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 7px 14px;
  color: var(--ink);
  font-size: 13.5px;
  font-weight: 600;
  line-height: 1.35;
  text-align: center;
  text-decoration: none;
  background: var(--surface);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-small);
  box-shadow: 0 1px 1px rgba(10, 37, 64, 0.05);
  cursor: pointer;
  transition:
    background-color 0.15s ease,
    border-color 0.15s ease,
    color 0.15s ease,
    box-shadow 0.15s ease;
}

.btn:hover {
  background: var(--surface-sunken);
  border-color: var(--ink-3);
}

.btn:disabled {
  cursor: not-allowed;
  opacity: 0.55;
}

.btn-primary {
  color: #fff;
  background: var(--brand);
  border-color: var(--brand);
  box-shadow: 0 1px 2px rgba(28, 64, 201, 0.35);
}

.btn-primary:hover {
  background: var(--brand-hover);
  border-color: var(--brand-hover);
}

.btn-quiet {
  color: var(--ink-2);
  background: transparent;
  border-color: transparent;
  box-shadow: none;
}

.btn-quiet:hover {
  color: var(--ink);
  background: var(--slate-soft);
  border-color: transparent;
}

.btn-dark {
  color: #fff;
  background: var(--ink);
  border-color: var(--ink);
}

.btn-dark:hover {
  background: #06182c;
  border-color: #06182c;
}

.btn-danger {
  color: var(--red);
  background: var(--surface);
  border-color: var(--red);
}

.btn-danger:hover {
  background: var(--red-soft);
}

.btn-large {
  min-height: 42px;
  padding: 10px 20px;
  font-size: 14px;
}

.btn-small {
  min-height: 32px;
  padding: 5px 10px;
  font-size: 11.5px;
}

.button-arrow {
  font-weight: 400;
}

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

.button-row--center {
  justify-content: center;
}

/* --------------------------------------------------------------------------
   Cards & generic surfaces
   -------------------------------------------------------------------------- */

.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-card);
}

.loading-card {
  display: grid;
  max-width: 440px;
  margin: 88px auto;
  padding: 40px 30px;
  place-items: center;
  gap: 14px;
  color: var(--ink-3);
  font-size: 13px;
  text-align: center;
}

.loading-card p {
  margin: 0;
}

.fatal-card {
  max-width: 460px;
  margin: 88px auto;
  padding: 40px 34px;
  text-align: center;
}

.fatal-card .notice-icon {
  margin: 0 auto 14px;
}

.fatal-card h1 {
  margin-bottom: 8px;
  color: var(--ink);
  font-size: 20px;
  letter-spacing: -0.01em;
}

.fatal-card p {
  margin-bottom: 22px;
  font-size: 13.5px;
}

/* --------------------------------------------------------------------------
   Notices
   -------------------------------------------------------------------------- */

.notice {
  display: flex;
  align-items: flex-start;
  gap: 11px;
  padding: 12px 15px;
  color: var(--ink-2);
  font-size: 13px;
  line-height: 1.5;
  background: var(--surface-sunken);
  border: 1px solid var(--line);
  border-radius: var(--radius-small);
}

.notice-icon {
  display: inline-grid;
  width: 18px;
  height: 18px;
  flex: none;
  place-items: center;
  color: var(--ink-3);
  font-size: 11px;
  font-weight: 700;
  border: 1.5px solid currentColor;
  border-radius: 50%;
}

.notice--info {
  color: var(--brand-hover);
  background: var(--brand-soft);
  border-color: var(--brand-line);
}

.notice--info .notice-icon {
  color: var(--brand);
}

.notice--success {
  color: var(--green);
  background: var(--green-soft);
  border-color: #bde3d0;
}

.notice--warning {
  color: var(--amber);
  background: var(--amber-soft);
  border-color: #edd49e;
}

.notice--danger {
  color: var(--red);
  background: var(--red-soft);
  border-color: #f2c3cd;
}

.error-box {
  margin-bottom: 16px;
}

/* --------------------------------------------------------------------------
   App shell / topbar (Stripe: white, hairline, compact)
   -------------------------------------------------------------------------- */

.app-shell {
  min-height: 100vh;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  min-height: 58px;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 8px clamp(16px, 3.5vw, 40px);
  background: rgba(255, 255, 255, 0.96);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(8px);
}

.brand-link {
  display: inline-flex;
  align-items: center;
  gap: 13px;
  color: inherit;
  text-decoration: none;
}

.brand-logo {
  width: 126px;
  height: 31px;
  object-fit: contain;
  object-position: left center;
}

.brand-division {
  padding-left: 13px;
  color: var(--ink-2);
  border-left: 1px solid var(--line);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.01em;
  white-space: nowrap;
}

.topbar-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-left: auto;
}

.account-menu {
  position: relative;
}

.account-menu-trigger {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 42px;
  padding: 5px 10px 5px 6px;
  color: var(--ink);
  background: var(--surface);
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  box-shadow: 0 1px 1px rgba(10, 37, 64, 0.05);
  cursor: pointer;
}

.account-menu-trigger:hover,
.account-menu-trigger[aria-expanded="true"] {
  background: var(--surface-sunken);
  border-color: var(--ink-3);
}

.account-menu-avatar {
  display: grid;
  width: 30px;
  height: 30px;
  flex: 0 0 auto;
  place-items: center;
  color: #fff;
  background: var(--ink);
  border-radius: 50%;
  font-size: 12px;
  font-weight: 700;
  line-height: 1;
}

.account-menu-identity {
  display: grid;
  line-height: 1.3;
  text-align: left;
}

.account-menu-identity strong {
  max-width: 200px;
  overflow: hidden;
  color: var(--ink);
  font-size: 12.5px;
  font-weight: 600;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.account-menu-identity span {
  max-width: 200px;
  overflow: hidden;
  color: var(--ink-3);
  font-size: 11px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.account-menu-chevron {
  width: 14px;
  height: 14px;
  flex: 0 0 auto;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.75;
  transition: transform 0.15s ease;
}

.account-menu-trigger[aria-expanded="true"] .account-menu-chevron {
  transform: rotate(180deg);
}

.account-menu-panel {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  z-index: 30;
  display: grid;
  width: 220px;
  padding: 6px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-raised);
}

.account-menu-panel[hidden] {
  display: none;
}

.account-menu-navigation {
  display: grid;
}

.account-menu-link,
.account-menu-action {
  display: flex;
  width: 100%;
  align-items: center;
  min-height: 38px;
  padding: 8px 10px;
  color: var(--ink-2);
  background: transparent;
  border-radius: var(--radius-small);
  font-size: 13px;
  font-weight: 600;
  line-height: 1.35;
  text-align: left;
  text-decoration: none;
  cursor: pointer;
}

.account-menu-link:hover,
.account-menu-link.is-active,
.account-menu-action:hover {
  color: var(--ink);
  background: var(--surface-sunken);
}

.account-menu-link.is-active::after {
  width: 6px;
  height: 6px;
  margin-left: auto;
  background: var(--brand);
  border-radius: 50%;
  content: "";
}

.account-menu-divider {
  height: 1px;
  margin: 5px 4px;
  background: var(--line);
}

.main-content {
  width: min(1080px, calc(100% - 32px));
  margin: 0 auto;
  padding: 32px 0 76px;
}

.main-content.main-content--wide {
  width: min(1280px, calc(100% - 28px));
}

/* --------------------------------------------------------------------------
   Page headings (Stripe: uppercase micro label, strong slate title)
   -------------------------------------------------------------------------- */

.page-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 22px;
}

.page-heading h1 {
  margin: 0 0 5px;
  color: var(--ink);
  font-size: 23px;
  font-weight: 700;
  letter-spacing: -0.015em;
  line-height: 1.2;
}

.page-heading p {
  max-width: 620px;
  margin: 0;
  font-size: 13.5px;
}

.page-heading--compact {
  align-items: center;
  margin-bottom: 16px;
}

.page-heading--compact h1,
.heading-compact {
  font-size: 18px;
}

.eyebrow {
  margin: 0 0 7px;
  color: var(--ink-3);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

/* --------------------------------------------------------------------------
   Status badges (Stripe soft pills)
   -------------------------------------------------------------------------- */

.status {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 10px;
  font-size: 11.5px;
  font-weight: 600;
  line-height: 1.5;
  white-space: nowrap;
  background: var(--slate-soft);
  border-radius: 999px;
}

.status::before {
  width: 6px;
  height: 6px;
  background: currentColor;
  border-radius: 50%;
  content: "";
}

.status--draft {
  color: var(--ink-2);
}

.status--signed {
  color: var(--brand-hover);
  background: var(--brand-soft);
}

.status--payment_pending {
  color: var(--amber);
  background: var(--amber-soft);
}

.status--active {
  color: var(--green);
  background: var(--green-soft);
}

.status--simulated_active {
  color: #5b4bc4;
  background: #efedfb;
}

.status--payment_failed {
  color: var(--red);
  background: var(--red-soft);
}

.status--cancelled {
  color: var(--ink-3);
  background: var(--slate-soft);
}

/* --------------------------------------------------------------------------
   FortiTag-owned sales login
   -------------------------------------------------------------------------- */

.login-page {
  display: grid;
  min-height: 100vh;
  place-items: center;
  padding: 32px 20px;
  background:
    radial-gradient(
      circle at 50% 18%,
      rgba(28, 64, 201, 0.07),
      rgba(28, 64, 201, 0) 36%
    ),
    var(--bg);
}

.login-access-card {
  width: min(430px, 100%);
  padding: 42px 38px 36px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 12px;
  box-shadow:
    0 18px 45px -24px rgba(10, 37, 64, 0.28),
    0 2px 6px rgba(10, 37, 64, 0.05);
}

.login-card-logo {
  display: block;
  width: 184px;
  height: auto;
  margin: 0 auto 30px;
}

.login-access-card h1 {
  margin: 0;
  color: var(--ink);
  font-size: 25px;
  font-weight: 700;
  letter-spacing: -0.025em;
  line-height: 1.25;
  text-align: center;
}

.login-form {
  margin-top: 30px;
}

.login-form .field {
  margin-bottom: 18px;
}

.login-form .field label {
  font-size: 13px;
}

.login-form .field input {
  min-height: 54px;
  font-size: 15px;
}

.login-form .btn {
  width: 100%;
  min-height: 54px;
  justify-content: center;
}

.login-code-note {
  margin: -4px 0 24px;
  color: var(--ink-2);
  font-size: 13px;
  line-height: 1.55;
  text-align: center;
}

.login-code-note strong {
  display: block;
  color: var(--ink);
  font-weight: 600;
}

.login-secondary-action {
  display: block;
  margin: 20px auto 0;
  padding: 4px;
  color: var(--brand);
  background: transparent;
  font-size: 12.5px;
  font-weight: 600;
  cursor: pointer;
}

.login-secondary-action:hover {
  color: var(--brand-hover);
  text-decoration: underline;
}

.login-unavailable {
  margin-top: 28px;
  padding: 14px 16px;
  color: var(--red);
  background: var(--red-soft);
  border-radius: var(--radius-small);
  font-size: 13px;
  text-align: center;
}

/* --------------------------------------------------------------------------
   Forms (Stripe: compact fields, slate labels, hairline inputs)
   -------------------------------------------------------------------------- */

.field {
  display: grid;
  gap: 6px;
  margin-bottom: 15px;
}

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

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

.required {
  margin-left: 2px;
  color: var(--red);
}

.optional {
  color: var(--ink-3);
  font-size: 11px;
  font-weight: 500;
}

.field input,
.field select,
.field textarea {
  width: 100%;
  padding: 8px 11px;
  color: var(--ink);
  font-size: 13.5px;
  background: var(--surface);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-small);
  box-shadow: 0 1px 1px rgba(10, 37, 64, 0.04);
  transition:
    border-color 0.15s ease,
    box-shadow 0.15s ease;
}

.field input:hover,
.field select:hover,
.field textarea:hover {
  border-color: var(--ink-3);
}

.field input:focus,
.field select:focus,
.field textarea:focus {
  border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(28, 64, 201, 0.15);
  outline: none;
}

.field input::placeholder,
.field textarea::placeholder {
  color: var(--ink-3);
}

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

.field select {
  appearance: none;
  padding-right: 32px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1.5 6 6.5 11 1.5' fill='none' stroke='%23425466' stroke-width='1.8' stroke-linecap='round'/%3E%3C/svg%3E");
  background-position: right 11px center;
  background-repeat: no-repeat;
}

.field small {
  color: var(--ink-3);
  font-size: 11.5px;
}

.field-help {
  color: var(--ink-3);
  font-size: 11.5px;
  font-weight: 500;
}

.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  column-gap: 16px;
}

.form-grid-field {
  min-width: 0;
}

.field--full {
  grid-column: 1 / -1;
}

.form-section {
  padding: 20px 0;
  border-top: 1px solid var(--line);
}

.form-section:first-child {
  padding-top: 2px;
  border-top: 0;
}

.form-section-heading {
  margin-bottom: 14px;
}

.form-section-heading h2 {
  margin: 0 0 3px;
  color: var(--ink);
  font-size: 14px;
  font-weight: 700;
}

.form-section-heading p {
  margin: 0;
  font-size: 12.5px;
}

/* --------------------------------------------------------------------------
   Dashboard
   -------------------------------------------------------------------------- */

.dashboard-summary {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
  margin-bottom: 18px;
}

.summary-card {
  display: grid;
  gap: 2px;
  padding: 16px 18px;
}

.summary-card span {
  color: var(--ink-3);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.summary-card strong {
  color: var(--ink);
  font-size: 24px;
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.2;
}

.record-list {
  overflow: hidden;
}

.record-list-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 18px;
  border-bottom: 1px solid var(--line);
}

.record-list-head h2 {
  margin: 0;
  color: var(--ink);
  font-size: 14px;
  font-weight: 700;
}

.record-list-head span {
  color: var(--ink-3);
  font-size: 12px;
}

.record-table-wrap {
  overflow-x: auto;
}

.record-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13.5px;
}

.record-table th {
  padding: 8px 18px;
  color: var(--ink-3);
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.07em;
  text-align: left;
  text-transform: uppercase;
  background: var(--surface-sunken);
  border-bottom: 1px solid var(--line);
}

.record-table td {
  padding: 12px 18px;
  color: var(--ink-2);
  vertical-align: middle;
  border-bottom: 1px solid var(--line);
}

.record-table tbody tr {
  transition: background-color 0.12s ease;
}

.record-table tbody tr:hover {
  background: var(--surface-sunken);
}

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

.record-company strong {
  display: block;
  color: var(--ink);
  font-weight: 600;
}

.record-company span {
  color: var(--ink-3);
  font-size: 12px;
}

.record-table td strong {
  color: var(--ink);
}

.record-action {
  text-align: right;
}

.empty-state {
  display: grid;
  padding: 54px 24px 58px;
  place-items: center;
  gap: 5px;
  text-align: center;
}

.empty-state-mark {
  display: grid;
  width: 40px;
  height: 40px;
  margin-bottom: 10px;
  place-items: center;
  color: var(--brand);
  font-size: 22px;
  font-weight: 300;
  background: var(--brand-soft);
  border-radius: 50%;
}

.empty-state h2 {
  margin: 0;
  color: var(--ink);
  font-size: 16px;
  font-weight: 700;
}

.empty-state p {
  max-width: 360px;
  margin: 0 0 15px;
  font-size: 13px;
}

.empty-state--compact {
  padding: 28px 20px;
}

.history-summary {
  margin-top: 0;
}

.history-record-head {
  align-items: center;
}

.history-record-head > div:first-child {
  display: grid;
  gap: 2px;
}

.history-filters {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.history-filters input,
.history-filters select {
  min-height: 34px;
  padding: 6px 10px;
  color: var(--ink);
  font-size: 12.5px;
  background: #fff;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-small);
}

.history-filters input {
  width: 180px;
}

.history-filters select {
  min-width: 142px;
}

.history-filters input:focus,
.history-filters select:focus {
  border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(28, 64, 201, 0.15);
  outline: none;
}

.table-empty-row td {
  padding: 34px 18px;
  color: var(--ink-3);
  text-align: center;
}

.team-add-card {
  overflow: hidden;
}

.team-add-form {
  padding: 18px;
}

.team-form-grid {
  display: grid;
  grid-template-columns: minmax(180px, 0.8fr) minmax(240px, 1.2fr) auto;
  align-items: end;
  gap: 12px;
}

.team-form-grid .field {
  margin: 0;
}

.team-add-button {
  min-height: 39px;
}

.role-badge,
.staff-status {
  display: inline-flex;
  align-items: center;
  min-height: 22px;
  padding: 2px 8px;
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  border-radius: 999px;
}

.role-badge {
  color: var(--ink-2);
  background: var(--slate-soft);
}

.role-badge--owner {
  color: var(--brand-hover);
  background: var(--brand-soft);
}

.staff-status--active {
  color: var(--green);
  background: var(--green-soft);
}

.staff-status--inactive {
  color: var(--ink-3);
  background: var(--slate-soft);
}

.protected-label {
  color: var(--ink-3);
  font-size: 11.5px;
}

.person-stack {
  display: inline-grid;
  gap: 1px;
}

.person-stack span {
  color: var(--ink-3);
  font-size: 11.5px;
  font-weight: 500;
}

/* --------------------------------------------------------------------------
   Wizard (plan / client / service steps)
   -------------------------------------------------------------------------- */

.wizard-layout {
  display: grid;
  grid-template-columns: 264px minmax(0, 1fr);
  gap: 18px;
  align-items: start;
}

.wizard-sidebar {
  position: sticky;
  top: 76px;
  padding: 20px;
}

.wizard-sidebar > h2 {
  margin: 0 0 3px;
  color: var(--ink);
  font-size: 14px;
  font-weight: 700;
}

.wizard-sidebar > p {
  margin: 0 0 16px;
  font-size: 12px;
}

.step-list {
  display: grid;
  gap: 2px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.step-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 9px;
  color: var(--ink-3);
  font-size: 13px;
  font-weight: 600;
  border-radius: var(--radius-small);
}

.step-number {
  display: grid;
  width: 22px;
  height: 22px;
  flex: none;
  place-items: center;
  color: var(--ink-3);
  font-size: 11px;
  font-weight: 700;
  background: var(--slate-soft);
  border-radius: 50%;
}

.step-item.is-active {
  color: var(--brand-hover);
  background: var(--brand-soft);
}

.step-item.is-active .step-number {
  color: #fff;
  background: var(--brand);
}

.step-item.is-complete {
  color: var(--ink-2);
}

.step-item.is-complete .step-number {
  color: var(--green);
  background: var(--green-soft);
}

.selected-plan-mini {
  display: grid;
  gap: 2px;
  margin-top: 16px;
  padding: 12px 13px;
  background: var(--surface-sunken);
  border: 1px solid var(--line);
  border-radius: var(--radius-small);
}

.selected-plan-mini span {
  color: var(--ink-3);
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.selected-plan-mini strong {
  color: var(--ink);
  font-size: 17px;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.wizard-card {
  overflow: hidden;
}

.wizard-card-head {
  padding: 20px 24px 16px;
  border-bottom: 1px solid var(--line);
}

.wizard-card-head h1 {
  margin: 0 0 3px;
  color: var(--ink);
  font-size: 17px;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.wizard-card-head p {
  margin: 0;
  font-size: 13px;
}

.wizard-card-body {
  padding: 20px 24px 6px;
}

.wizard-card-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 24px;
  background: var(--surface-sunken);
  border-top: 1px solid var(--line);
}

/* --------------------------------------------------------------------------
   Plan selection (Stripe pricing-card discipline)
   -------------------------------------------------------------------------- */

.plan-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 12px;
}

.plan-option {
  position: relative;
  display: grid;
  align-content: start;
  gap: 6px;
  padding: 16px 15px;
  background: var(--surface);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  box-shadow: var(--shadow-card);
  cursor: pointer;
  transition:
    border-color 0.15s ease,
    box-shadow 0.15s ease,
    background-color 0.15s ease;
}

.plan-option:hover {
  border-color: var(--ink-3);
}

.plan-option:has(input:focus-visible) {
  outline: 2px solid var(--brand);
  outline-offset: 2px;
}

.plan-option:has(input:checked) {
  background: var(--brand-soft);
  border-color: var(--brand);
  box-shadow: 0 0 0 1px var(--brand);
}

.plan-option input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
}

.plan-radio {
  position: absolute;
  top: 13px;
  right: 13px;
  display: grid;
  width: 17px;
  height: 17px;
  place-items: center;
  background: var(--surface);
  border: 1.5px solid var(--line-strong);
  border-radius: 50%;
}

.plan-radio::after {
  width: 7px;
  height: 7px;
  background: #fff;
  border-radius: 50%;
  content: "";
  opacity: 0;
}

.plan-option:has(input:checked) .plan-radio {
  background: var(--brand);
  border-color: var(--brand);
}

.plan-option:has(input:checked) .plan-radio::after {
  opacity: 1;
}

.plan-price {
  display: block;
  color: var(--ink);
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.15;
}

.plan-price small {
  color: var(--ink-3);
  font-size: 12px;
  font-weight: 600;
}

.plan-description {
  display: block;
  font-size: 12px;
  line-height: 1.45;
}

.plan-currency {
  display: block;
  margin-top: 4px;
  color: var(--ink-3);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}

/* --------------------------------------------------------------------------
   Radio cards (domain arrangement)
   -------------------------------------------------------------------------- */

.radio-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.radio-card {
  position: relative;
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 14px 15px;
  background: var(--surface);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  cursor: pointer;
  transition:
    border-color 0.15s ease,
    box-shadow 0.15s ease,
    background-color 0.15s ease;
}

.radio-card:hover {
  border-color: var(--ink-3);
}

.radio-card:has(input:checked) {
  background: var(--brand-soft);
  border-color: var(--brand);
  box-shadow: 0 0 0 1px var(--brand);
}

.radio-card input {
  width: 15px;
  height: 15px;
  margin: 2px 0 0;
  accent-color: var(--brand);
  flex: none;
}

.radio-card strong {
  display: block;
  color: var(--ink);
  font-size: 13px;
  font-weight: 600;
}

.radio-card small {
  display: block;
  margin-top: 2px;
  font-size: 12px;
  line-height: 1.45;
}

/* --------------------------------------------------------------------------
   Review page
   -------------------------------------------------------------------------- */

.review-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 16px;
  padding: 12px 16px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-card);
}

.review-toolbar-summary {
  display: flex;
  align-items: center;
  gap: 13px;
  min-width: 0;
}

.review-toolbar-summary strong {
  display: block;
  color: var(--ink);
  font-size: 13.5px;
  font-weight: 600;
}

.review-toolbar-summary span:not(.status) {
  color: var(--ink-3);
  font-size: 12px;
}

.agreement-review-panel {
  overflow: hidden;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-card);
}

.agreement-review-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 48px;
  padding: 11px 16px;
  border-bottom: 1px solid var(--line);
}

.agreement-review-header h2 {
  margin: 0;
  color: var(--ink);
  font-size: 13px;
  font-weight: 650;
}

.agreement-review-header span {
  color: var(--ink-3);
  font-size: 11.5px;
}

.agreement-review-viewport {
  height: clamp(320px, 42vh, 440px);
  min-height: 0;
  max-height: 440px;
  padding: clamp(14px, 3vw, 32px);
  overflow-y: scroll;
  overscroll-behavior: contain;
  scrollbar-gutter: stable;
  background: var(--slate-soft);
}

.agreement-review-viewport:focus-visible {
  outline: 2px solid var(--brand);
  outline-offset: -3px;
}

.agreement-review-viewport::-webkit-scrollbar {
  width: 10px;
}

.agreement-review-viewport::-webkit-scrollbar-track {
  background: var(--surface-sunken);
}

.agreement-review-viewport::-webkit-scrollbar-thumb {
  background: var(--line-strong);
  background-clip: padding-box;
  border: 2px solid transparent;
  border-radius: 999px;
}

/* --------------------------------------------------------------------------
   Agreement document (server-rendered preview markup)
   -------------------------------------------------------------------------- */

.agreement-document {
  width: 100%;
  max-width: none;
  margin: 0;
  padding: clamp(28px, 5vw, 54px) clamp(22px, 5.5vw, 60px);
  color: #1a2b42;
  font-size: 13.5px;
  line-height: 1.6;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 3px;
  box-shadow: var(--shadow-raised);
}

.agreement-title-block {
  padding-bottom: 24px;
  border-bottom: 2px solid var(--ink);
}

.agreement-brand {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 22px;
  margin-bottom: 18px;
}

.agreement-logo {
  display: block;
  width: 190px;
  max-width: 48%;
  height: auto;
}

.agreement-kicker {
  color: var(--brand);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-align: right;
}

.agreement-title-block h1 {
  margin: 9px 0 7px;
  color: var(--ink);
  font-size: clamp(23px, 3.2vw, 30px);
  font-weight: 800;
  letter-spacing: 0.01em;
  line-height: 1.12;
  text-transform: uppercase;
}

.agreement-title-block > p {
  margin: 0;
  color: var(--ink-2);
  font-size: 14px;
}

.agreement-reference {
  margin-top: 14px;
  color: var(--ink-3);
  font-size: 10.5px;
}

.agreement-document h2 {
  margin: 26px 0 9px;
  color: var(--ink);
  font-size: 15.5px;
  font-weight: 700;
  line-height: 1.3;
}

.agreement-document h3 {
  margin: 0 0 16px;
  color: var(--ink);
  font-size: 13px;
  font-weight: 700;
}

.agreement-document p {
  margin: 0 0 11px;
}

.agreement-document ul {
  margin: 7px 0 15px;
  padding-left: 21px;
}

.agreement-document li {
  margin-bottom: 4px;
}

.agreement-service-details dl {
  margin: 0;
  border-top: 1px solid var(--line-strong);
}

.agreement-detail-row {
  display: grid;
  grid-template-columns: 195px 1fr;
  border-bottom: 1px solid var(--line);
}

.agreement-detail-row dt,
.agreement-detail-row dd {
  margin: 0;
  padding: 9px 11px;
}

.agreement-detail-row dt {
  color: var(--ink-2);
  font-size: 12.5px;
  font-weight: 600;
  background: var(--surface-sunken);
}

.agreement-detail-row dd {
  color: var(--ink);
  font-weight: 600;
}

.agreement-key-terms,
.agreement-payment-authorization {
  margin: 22px 0;
  padding: 15px 18px;
  background: var(--brand-soft);
  border: 1px solid var(--brand-line);
  border-radius: var(--radius-small);
}

.agreement-key-terms h2,
.agreement-payment-authorization h2 {
  margin-top: 0;
}

.agreement-electronic-acceptance {
  margin-top: 24px;
  padding: 16px 18px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-small);
}

.agreement-electronic-acceptance h2 {
  margin-top: 0;
}

.agreement-electronic-acceptance-grid {
  display: grid;
  grid-template-columns: minmax(200px, 0.8fr) 1.2fr;
  align-items: start;
  gap: 20px;
  margin-top: 15px;
}

.agreement-electronic-signature {
  padding: 12px;
  background: var(--surface-sunken);
  border: 1px solid var(--line);
  border-radius: var(--radius-small);
}

.agreement-electronic-signature > span {
  display: block;
  margin-top: 5px;
  color: var(--ink-3);
  font-size: 9.5px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.agreement-signature-image {
  display: block;
  width: 100%;
  max-width: 240px;
  height: 72px;
  object-fit: contain;
  object-position: left center;
}

.agreement-electronic-acceptance dl {
  margin: 0;
}

.agreement-electronic-acceptance dl > div {
  display: grid;
  grid-template-columns: 100px 1fr;
  gap: 10px;
  padding: 6px 0;
  border-bottom: 1px solid var(--line);
}

.agreement-electronic-acceptance dl > div:last-child {
  border-bottom: 0;
}

.agreement-electronic-acceptance dt {
  color: var(--ink-2);
  font-weight: 600;
}

.agreement-electronic-acceptance dd {
  margin: 0;
  color: var(--ink);
  font-weight: 600;
}

/* --------------------------------------------------------------------------
   Review-page signature form
   -------------------------------------------------------------------------- */

.signature-card {
  margin-top: 16px;
  padding: 24px 26px 26px;
}

.signature-card > h2 {
  margin: 0 0 5px;
  color: var(--ink);
  font-size: 17px;
  font-weight: 700;
}

.signature-card > p {
  max-width: 620px;
  margin: 0 0 18px;
  font-size: 13px;
}

.signature-pad-wrap {
  margin: 4px 0 18px;
}

.signature-pad-label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 9px;
}

.signature-pad-label strong {
  color: var(--ink);
  font-size: 12.5px;
  font-weight: 600;
}

.signature-pad-actions {
  display: flex;
  gap: 8px;
}

.signature-pad-actions .btn {
  min-height: 30px;
  padding: 4px 10px;
  font-size: 12px;
}

.signature-canvas {
  display: block;
  width: 100%;
  height: 180px;
  background:
    linear-gradient(to bottom, transparent calc(100% - 55px), var(--line-strong) calc(100% - 54px), transparent 0),
    var(--surface-sunken);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-small);
  cursor: crosshair;
  touch-action: none;
}

.signature-pad-wrap .field-help {
  display: block;
  margin-top: 7px;
}

.check-list {
  display: grid;
  gap: 9px;
  margin: 2px 0 20px;
}

.check-row {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 11px 13px;
  font-size: 13px;
  line-height: 1.5;
  background: var(--surface-sunken);
  border: 1px solid var(--line);
  border-radius: var(--radius-small);
  cursor: pointer;
  transition: border-color 0.15s ease;
}

.check-row:hover {
  border-color: var(--line-strong);
}

.check-row:has(input:checked) {
  background: var(--green-soft);
  border-color: #bde3d0;
}

.check-row input {
  width: 15px;
  height: 15px;
  margin: 2px 0 0;
  accent-color: var(--green);
  flex: none;
}

.signature-submit-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
}

.signature-submit-row small {
  max-width: 460px;
  color: var(--ink-3);
  font-size: 11.5px;
  line-height: 1.5;
}

/* --------------------------------------------------------------------------
   Payment page
   -------------------------------------------------------------------------- */

.payment-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 350px;
  gap: 18px;
  align-items: start;
}

.payment-card {
  padding: 30px 30px;
}

.payment-step-mark {
  display: grid;
  width: 40px;
  height: 40px;
  margin-bottom: 16px;
  place-items: center;
  color: #fff;
  font-size: 18px;
  font-weight: 700;
  background: var(--green);
  border-radius: 50%;
}

.payment-card > h1 {
  margin: 0 0 7px;
  color: var(--ink);
  font-size: 20px;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.payment-card > p {
  max-width: 500px;
  margin: 0 0 20px;
  font-size: 13.5px;
}

.checkout-summary {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 11px;
  margin-bottom: 18px;
}

.checkout-summary > div {
  display: grid;
  gap: 2px;
  padding: 12px 14px;
  background: var(--surface-sunken);
  border: 1px solid var(--line);
  border-radius: var(--radius-small);
}

.checkout-summary span {
  color: var(--ink-3);
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.checkout-summary strong {
  color: var(--ink);
  font-size: 14px;
  font-weight: 700;
}

.checkout-action {
  display: grid;
  justify-items: start;
  gap: 12px;
  margin-top: 20px;
}

.checkout-action > small {
  color: var(--ink-3);
  font-size: 11.5px;
  line-height: 1.5;
}

.simulator-box {
  width: 100%;
  padding: 16px 18px;
  background: var(--amber-soft);
  border: 1px dashed #d9a94e;
  border-radius: var(--radius);
}

.simulator-box h2 {
  margin: 0 0 5px;
  color: var(--amber);
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.simulator-box p {
  margin: 0 0 13px;
  color: var(--amber);
  font-size: 12.5px;
  line-height: 1.5;
}

.payment-sidebar {
  display: grid;
  gap: 18px;
}

.side-card {
  padding: 18px 20px;
}

.side-card h2 {
  margin: 0 0 12px;
  color: var(--ink-3);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}

.detail-list {
  display: grid;
  gap: 0;
  margin: 0;
}

.detail-list > div {
  display: grid;
  grid-template-columns: 104px 1fr;
  gap: 12px;
  padding: 8px 0;
  border-bottom: 1px solid var(--line);
}

.detail-list > div:last-child {
  border-bottom: 0;
}

.detail-list dt {
  color: var(--ink-3);
  font-size: 11.5px;
  font-weight: 600;
}

.detail-list dd {
  margin: 0;
  color: var(--ink);
  font-size: 12.5px;
  font-weight: 600;
  line-height: 1.5;
  overflow-wrap: anywhere;
}

.email-delivery-note {
  display: block;
  width: fit-content;
  margin-top: 4px;
  padding: 2px 7px;
  color: var(--amber);
  font-size: 10.5px;
  font-weight: 700;
  background: var(--amber-soft);
  border-radius: 999px;
}

/* --------------------------------------------------------------------------
   Timeline
   -------------------------------------------------------------------------- */

.timeline {
  display: grid;
  gap: 0;
  margin: 0;
  padding: 0;
  list-style: none;
}

.timeline li {
  position: relative;
  padding: 0 0 15px 20px;
  border-left: 1px solid var(--line-strong);
}

.timeline li:last-child {
  padding-bottom: 0;
  border-left-color: transparent;
}

.timeline li::before {
  position: absolute;
  top: 5px;
  left: -4.5px;
  width: 8px;
  height: 8px;
  background: var(--surface);
  border: 2px solid var(--brand);
  border-radius: 50%;
  content: "";
}

.timeline strong {
  display: block;
  color: var(--ink);
  font-size: 12.5px;
  font-weight: 600;
}

.timeline span {
  color: var(--ink-3);
  font-size: 11.5px;
  line-height: 1.5;
}

/* --------------------------------------------------------------------------
   Completion page
   -------------------------------------------------------------------------- */

.completion-card {
  display: grid;
  padding: 40px 30px;
  place-items: center;
  text-align: center;
}

.completion-mark {
  display: grid;
  width: 48px;
  height: 48px;
  margin-bottom: 16px;
  place-items: center;
  color: #fff;
  font-size: 22px;
  font-weight: 700;
  background: var(--green);
  border-radius: 50%;
}

.completion-card h1 {
  max-width: 540px;
  margin: 0 0 8px;
  color: var(--ink);
  font-size: 21px;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.completion-card > p:not(.eyebrow) {
  max-width: 600px;
  margin: 0 0 22px;
  font-size: 13.5px;
}

.record-detail-card {
  padding: 22px 24px;
}

/* --------------------------------------------------------------------------
   Responsive
   -------------------------------------------------------------------------- */

@media (max-width: 1020px) {
  .wizard-layout {
    grid-template-columns: 1fr;
  }

  .wizard-sidebar {
    position: static;
  }

  .step-list {
    grid-template-columns: repeat(3, 1fr);
  }

  .payment-layout {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 760px) {
  .main-content {
    padding-top: 24px;
  }

  .brand-division {
    display: none;
  }

  .account-menu-identity span {
    display: none;
  }

  .page-heading {
    align-items: flex-start;
    flex-direction: column;
    gap: 14px;
  }

  .page-heading h1 {
    font-size: 20px;
  }

  .dashboard-summary {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .history-record-head {
    align-items: stretch;
    flex-direction: column;
  }

  .history-filters {
    display: grid;
    grid-template-columns: 1fr 1fr;
  }

  .history-filters label:first-child {
    grid-column: 1 / -1;
  }

  .history-filters input,
  .history-filters select {
    width: 100%;
  }

  .team-form-grid {
    grid-template-columns: 1fr;
    align-items: stretch;
  }

  .summary-card {
    grid-template-columns: 1fr auto;
    align-items: center;
    padding: 13px 16px;
  }

  .record-table thead {
    display: none;
  }

  .record-table,
  .record-table tbody,
  .record-table tr,
  .record-table td {
    display: block;
    width: 100%;
  }

  .record-table tbody tr {
    padding: 11px 15px 13px;
    border-bottom: 1px solid var(--line);
  }

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

  .record-table td {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    padding: 4px 0;
    border-bottom: 0;
  }

  .record-table td[data-label]::before {
    color: var(--ink-3);
    font-size: 10.5px;
    font-weight: 600;
    letter-spacing: 0.07em;
    text-transform: uppercase;
    content: attr(data-label);
  }

  .record-company {
    display: block !important;
    margin-bottom: 5px;
  }

  .record-action {
    justify-content: flex-end;
    margin-top: 5px;
    text-align: left;
  }

  .form-grid {
    grid-template-columns: 1fr;
  }

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

  .review-toolbar {
    align-items: stretch;
    flex-direction: column;
  }

  .review-toolbar .button-row {
    justify-content: flex-end;
  }

  .agreement-review-viewport {
    height: clamp(280px, 42vh, 340px);
    min-height: 0;
    max-height: 340px;
    padding: 10px;
    scrollbar-gutter: auto;
  }

  .agreement-brand {
    align-items: flex-start;
    flex-direction: column;
    gap: 10px;
  }

  .agreement-logo {
    width: 170px;
    max-width: 70%;
  }

  .agreement-kicker {
    text-align: left;
  }

  .signature-card {
    padding: 20px;
  }

  .signature-submit-row {
    align-items: stretch;
    flex-direction: column;
  }

  .signature-submit-row .btn {
    width: 100%;
  }

  .checkout-summary {
    grid-template-columns: 1fr;
  }

  .payment-card {
    padding: 24px 20px;
  }

  .completion-card {
    padding: 32px 20px;
  }

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

  .agreement-detail-row dd {
    padding-top: 4px;
  }

  .agreement-electronic-acceptance-grid {
    grid-template-columns: 1fr;
  }

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

  .wizard-card-head,
  .wizard-card-body,
  .wizard-card-foot {
    padding-right: 16px;
    padding-left: 16px;
  }
}

@media (max-width: 460px) {
  .topbar {
    gap: 10px;
  }

  .brand-logo {
    width: 104px;
  }

  .account-menu-trigger {
    gap: 8px;
  }

  .account-menu-identity strong {
    max-width: 96px;
  }

  .account-menu-panel {
    width: min(220px, calc(100vw - 32px));
  }

  .plan-grid {
    grid-template-columns: 1fr;
  }

  .history-filters {
    grid-template-columns: 1fr;
  }

  .history-filters label:first-child {
    grid-column: auto;
  }

  .login-access-card {
    padding: 34px 22px 30px;
  }

  .login-card-logo {
    width: 164px;
    margin-bottom: 26px;
  }

  .wizard-card-foot {
    align-items: stretch;
    flex-direction: column-reverse;
  }

  .wizard-card-foot .btn {
    width: 100%;
  }
}

/* --------------------------------------------------------------------------
   Print
   -------------------------------------------------------------------------- */

@media print {
  .topbar,
  .review-toolbar,
  .agreement-review-header,
  .signature-card,
  .notice,
  .button-row {
    display: none !important;
  }

  body {
    background: #fff;
  }

  .agreement-review-panel,
  .agreement-review-viewport {
    height: auto;
    min-height: 0;
    max-height: none;
    overflow: visible;
    padding: 0;
    background: #fff;
    border: 0;
    box-shadow: none;
  }

  .agreement-document {
    max-width: none;
    border: 0;
    box-shadow: none;
  }

  .agreement-logo {
    width: 165px;
  }
}

.spacer-16 {
  height: 16px;
}

/* ==========================================================================
   Staff project workflow
   ========================================================================== */

.project-stage-strip {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  margin-bottom: 16px;
  overflow: hidden;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-card);
}

.project-stage-strip > div {
  position: relative;
  display: grid;
  grid-template-columns: 30px minmax(0, 1fr);
  gap: 0 9px;
  min-height: 72px;
  align-content: center;
  padding: 12px 14px;
  border-right: 1px solid var(--line);
}

.project-stage-strip > div:last-child {
  border-right: 0;
}

.project-stage-strip span {
  display: grid;
  width: 28px;
  height: 28px;
  grid-row: 1 / 3;
  place-items: center;
  color: var(--ink-3);
  font-size: 11px;
  font-weight: 700;
  background: var(--slate-soft);
  border-radius: 50%;
}

.project-stage-strip strong {
  align-self: end;
  color: var(--ink-2);
  font-size: 12px;
}

.project-stage-strip small {
  color: var(--ink-3);
  font-size: 10.5px;
}

.project-stage-strip .is-active {
  background: var(--brand-soft);
}

.project-stage-strip .is-active span {
  color: #fff;
  background: var(--brand);
}

.project-stage-strip .is-active strong {
  color: var(--brand-hover);
}

.project-stage-strip .is-complete span {
  color: #fff;
  background: var(--green);
}

.project-stage-strip .is-complete span::before {
  content: "✓";
}

.project-stage-strip .is-complete span {
  font-size: 0;
}

.project-stage-strip .is-complete span::before {
  font-size: 12px;
}

.project-commercial-strip {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr)) auto;
  gap: 0;
  align-items: center;
  margin-bottom: 20px;
  padding: 11px 14px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-card);
}

.project-commercial-strip > div {
  display: grid;
  gap: 1px;
  padding: 3px 14px;
  border-right: 1px solid var(--line);
}

.project-commercial-strip > div:first-child {
  padding-left: 2px;
}

.project-commercial-strip span,
.project-version-meta span,
.project-hash-row > span {
  color: var(--ink-3);
  font-size: 9.5px;
  font-weight: 650;
  letter-spacing: 0.055em;
  text-transform: uppercase;
}

.project-commercial-strip strong {
  color: var(--ink);
  font-size: 12.5px;
}

.project-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 310px;
  gap: 18px;
  align-items: start;
}

.project-main-column {
  min-width: 0;
}

.project-sidebar {
  position: sticky;
  top: 84px;
  display: grid;
  gap: 14px;
}

.project-empty-version {
  display: grid;
  padding: 30px;
  justify-items: center;
  text-align: center;
}

.project-empty-version h2 {
  margin: 12px 0 5px;
  color: var(--ink);
  font-size: 18px;
}

.project-empty-version p {
  max-width: 520px;
  margin: 0;
}

.project-version-card {
  overflow: hidden;
  border-color: var(--line);
}

.project-version-card.is-current {
  border-color: var(--brand-line);
  box-shadow:
    0 0 0 1px rgba(28, 64, 201, 0.06),
    var(--shadow-card);
}

.project-version-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 17px 20px;
  border-bottom: 1px solid var(--line);
}

.project-version-title {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 12px;
}

.project-version-number {
  display: grid;
  width: 38px;
  height: 38px;
  flex: 0 0 auto;
  place-items: center;
  color: #fff;
  font-size: 12px;
  font-weight: 750;
  background: var(--brand);
  border-radius: 50%;
}

.project-version-title h3 {
  margin: 0;
  color: var(--ink);
  font-size: 15px;
}

.project-version-title p {
  margin: 1px 0 0;
  color: var(--ink-3);
  font-size: 11px;
}

.project-version-meta {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  background: var(--surface-sunken);
  border-bottom: 1px solid var(--line);
}

.project-version-meta > div {
  display: grid;
  gap: 2px;
  padding: 11px 14px;
  border-right: 1px solid var(--line);
}

.project-version-meta > div:last-child {
  border-right: 0;
}

.project-version-meta strong,
.project-version-meta code {
  color: var(--ink);
  font-size: 11.5px;
  font-weight: 650;
}

.project-version-summary {
  margin: 0;
  padding: 16px 20px;
  color: var(--ink-2);
  border-bottom: 1px solid var(--line);
}

.project-page-gallery {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
  padding: 18px;
  background: #edf2f7;
  border-bottom: 1px solid var(--line);
}

.project-page-card {
  min-width: 0;
  overflow: hidden;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-small);
}

.project-page-card-head {
  display: flex;
  min-height: 48px;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 10px 14px;
  border-bottom: 1px solid var(--line);
}

.project-page-card-head strong {
  overflow: hidden;
  color: var(--ink);
  font-size: 13px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.project-page-card-head span {
  color: var(--ink-3);
  font-size: 10.5px;
  text-transform: capitalize;
}

.project-page-evidence-viewer {
  background: var(--surface-sunken);
}

.project-evidence-toolbar {
  display: flex;
  min-height: 74px;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 11px 14px;
  background: var(--surface);
  border-bottom: 1px solid var(--line);
}

.project-evidence-switch {
  display: inline-grid;
  grid-template-columns: repeat(2, minmax(112px, 1fr));
  gap: 4px;
  padding: 4px;
  background: var(--surface-sunken);
  border: 1px solid var(--line);
  border-radius: 10px;
}

.project-evidence-toggle {
  display: grid;
  min-height: 46px;
  padding: 6px 18px;
  color: var(--ink-2);
  font: inherit;
  text-align: left;
  background: transparent;
  border: 1px solid transparent;
  border-radius: 7px;
  cursor: pointer;
}

.project-evidence-toggle:hover {
  color: var(--ink);
  background: rgba(255, 255, 255, 0.72);
}

.project-evidence-toggle.is-active {
  color: var(--brand-hover);
  background: var(--surface);
  border-color: var(--brand-line);
  box-shadow: 0 2px 8px rgba(10, 37, 64, 0.08);
}

.project-evidence-toggle span {
  font-size: 12.5px;
  font-weight: 750;
}

.project-evidence-toggle small {
  color: var(--ink-3);
  font-size: 9.5px;
}

.project-evidence-toolbar-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
}

.project-evidence-toolbar-actions > span {
  color: var(--ink-3);
  font-size: 10px;
}

.project-evidence-open {
  min-height: 40px;
  padding-inline: 14px;
}

.project-page-preview {
  display: block;
  height: clamp(420px, 58vh, 660px);
  min-height: 420px;
  overflow: auto;
  overscroll-behavior: contain;
  background:
    linear-gradient(45deg, #f3f6f9 25%, transparent 25%),
    linear-gradient(-45deg, #f3f6f9 25%, transparent 25%),
    linear-gradient(45deg, transparent 75%, #f3f6f9 75%),
    linear-gradient(-45deg, transparent 75%, #f3f6f9 75%);
  background-position:
    0 0,
    0 8px,
    8px -8px,
    -8px 0;
  background-size: 16px 16px;
  scrollbar-width: thin;
}

.project-page-preview img {
  display: block;
  width: 100%;
  height: auto;
  background: #fff;
}

.project-page-preview.is-mobile img {
  width: min(100%, 390px);
  margin: 0 auto;
  box-shadow: 0 0 0 1px rgba(13, 35, 57, 0.08);
}

.project-evidence-scroll-hint {
  margin: 0;
  padding: 9px 14px 10px;
  color: var(--ink-3);
  font-size: 10px;
  text-align: center;
  background: var(--surface);
  border-top: 1px solid var(--line);
}

.project-page-pending {
  display: grid;
  height: 147px;
  padding: 16px;
  place-items: center;
  color: var(--ink-3);
  font-size: 11px;
  text-align: center;
  background: var(--surface-sunken);
}

.project-hash-row {
  display: grid;
  grid-template-columns: 180px minmax(0, 1fr);
  gap: 12px;
  align-items: start;
  padding: 11px 20px;
  border-bottom: 1px solid var(--line);
}

.project-hash-row code {
  color: var(--ink-2);
  font-size: 9.5px;
  overflow-wrap: anywhere;
}

.project-feedback-list {
  padding: 14px 20px;
  background: var(--amber-soft);
  border-bottom: 1px solid #f0d7ae;
}

.project-feedback-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.project-feedback-list strong {
  color: var(--amber);
  font-size: 11.5px;
}

.project-feedback-list span {
  color: var(--ink-3);
  font-size: 10.5px;
}

.project-feedback-list p {
  margin: 7px 0 0;
  color: var(--ink);
  font-size: 12.5px;
}

.project-feedback-change-list {
  display: grid;
  gap: 9px;
  margin-top: 11px;
}

.project-feedback-change-list section {
  padding: 10px 12px;
  background: rgba(255, 255, 255, 0.68);
  border: 1px solid rgba(174, 103, 7, 0.17);
  border-radius: var(--radius-small);
}

.project-feedback-change-list section > span,
.project-feedback-change-list section > strong {
  display: block;
}

.project-feedback-change-list section > span {
  margin-bottom: 2px;
  color: var(--ink-3);
  font-size: 9.5px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.project-feedback-change-list section > strong {
  color: var(--amber);
  font-size: 11.5px;
}

.project-feedback-general-note {
  background: rgba(255, 255, 255, 0.45) !important;
}

.project-version-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 13px 20px;
}

.project-capture-progress {
  margin: 0 20px 16px;
}

.project-version-form {
  padding: 25px 26px;
}

.project-version-form > header h2 {
  margin: 0 0 5px;
  color: var(--ink);
  font-size: 20px;
}

.project-version-form > header p:last-child {
  margin-bottom: 22px;
}

.project-draft-owner-note {
  display: flex;
  gap: 8px 14px;
  align-items: baseline;
  margin-bottom: 18px;
  padding: 11px 13px;
  color: var(--ink-2);
  font-size: 11.5px;
  background: var(--surface-sunken);
  border: 1px solid var(--line);
  border-radius: var(--radius-small);
}

.project-draft-owner-note strong {
  color: var(--ink);
  white-space: nowrap;
}

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

.project-published-site .field {
  margin-bottom: 0;
}

.project-published-site > .btn {
  min-height: 37px;
  margin-bottom: 21px;
}

.project-discovery-note {
  margin: 12px 0 0;
}

.project-page-picker {
  margin: 18px 0 20px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
}

.project-page-picker-head {
  display: flex;
  gap: 16px;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px;
  background: var(--surface-sunken);
  border-bottom: 1px solid var(--line);
}

.project-page-picker-head h3,
.project-page-picker-head p {
  margin: 0;
}

.project-page-picker-head h3 {
  color: var(--ink);
  font-size: 13px;
}

.project-page-picker-head p {
  margin-top: 2px;
  color: var(--ink-3);
  font-size: 10.5px;
}

.project-page-list {
  display: grid;
}

.project-page-empty {
  padding: 24px 16px;
  color: var(--ink-3);
  font-size: 11.5px;
  text-align: center;
}

.project-page-choice {
  display: grid;
  grid-template-columns: auto minmax(120px, 0.45fr) minmax(240px, 1fr) auto;
  gap: 12px;
  align-items: end;
  padding: 12px 16px;
  border-top: 1px solid var(--line);
}

.project-page-choice:first-child {
  border-top: 0;
}

.project-page-choice .field {
  margin-bottom: 0;
}

.project-page-check {
  display: grid;
  width: 28px;
  min-height: 37px;
  place-items: center;
}

.project-page-check input {
  width: 16px;
  height: 16px;
  accent-color: var(--brand);
}

.project-page-remove {
  min-height: 37px;
}

.project-source-details {
  margin: 4px 0 20px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.project-source-details summary {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 13px 15px;
  color: var(--ink);
  font-size: 12px;
  font-weight: 650;
  cursor: pointer;
}

.project-source-details summary span {
  color: var(--ink-3);
  font-size: 10.5px;
  font-weight: 500;
}

.project-source-details > p {
  margin: 0;
  padding: 0 15px 10px;
  color: var(--ink-3);
  font-size: 10.5px;
}

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

.project-review-mode {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin: 4px 0 20px;
  padding: 0;
  border: 0;
}

.project-review-mode legend {
  grid-column: 1 / -1;
  margin-bottom: 7px;
  color: var(--ink);
  font-weight: 650;
}

.project-review-mode label {
  display: flex;
  gap: 10px;
  padding: 14px;
  background: var(--surface);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  cursor: pointer;
}

.project-review-mode label:has(input:checked) {
  background: var(--brand-soft);
  border-color: var(--brand);
}

.project-review-mode input {
  margin-top: 3px;
}

.project-review-mode span {
  display: grid;
  gap: 2px;
}

.project-review-mode strong {
  color: var(--ink);
  font-size: 12.5px;
}

.project-review-mode small {
  color: var(--ink-3);
  font-size: 10.5px;
}

.project-form-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-top: 20px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
}

.project-form-actions > span,
.project-form-actions > code {
  max-width: 620px;
  color: var(--ink-3);
  font-size: 10.5px;
  overflow-wrap: anywhere;
}

.project-review-link-card {
  margin: 0 20px 18px;
  padding: 16px 18px;
  background: linear-gradient(135deg, #fff, var(--brand-soft));
  border: 1px solid var(--brand-line);
  border-radius: var(--radius);
}

.project-review-link-card h4 {
  margin: 0 0 4px;
  color: var(--ink);
  font-size: 15px;
}

.project-review-link-card p {
  margin: 0 0 12px;
}

.project-review-link-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
}

.project-review-link-row input {
  width: 100%;
  min-width: 0;
  padding: 9px 11px;
  color: var(--ink);
  background: #fff;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-small);
}

.project-review-link-card > small {
  display: block;
  margin-top: 8px;
  color: var(--ink-3);
  font-size: 10.5px;
}

.project-waiting-note {
  margin-top: 18px;
}

.project-launch-card {
  margin-top: 18px;
  padding: 25px 26px;
}

.project-launch-card h2 {
  margin: 0 0 6px;
  color: var(--ink);
  font-size: 20px;
}

.project-launch-card code {
  color: var(--ink-2);
  font-size: 10px;
  overflow-wrap: anywhere;
}

@media (max-width: 1120px) {
  .project-stage-strip {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .project-stage-strip > div:nth-child(3) {
    border-right: 0;
  }

  .project-stage-strip > div:nth-child(n + 4) {
    border-top: 1px solid var(--line);
  }

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

  .project-commercial-strip > .btn {
    grid-column: 1 / -1;
    margin-top: 10px;
  }
}

@media (max-width: 980px) {
  .project-layout {
    grid-template-columns: 1fr;
  }

  .project-sidebar {
    position: static;
  }
}

@media (max-width: 700px) {
  .project-stage-strip {
    grid-template-columns: 1fr;
  }

  .project-stage-strip > div {
    min-height: 62px;
    border-top: 1px solid var(--line);
    border-right: 0;
  }

  .project-stage-strip > div:first-child {
    border-top: 0;
  }

  .project-commercial-strip,
  .project-version-meta {
    grid-template-columns: 1fr;
  }

  .project-commercial-strip > div,
  .project-version-meta > div {
    padding: 9px 4px;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .project-commercial-strip > div:first-child {
    padding-left: 4px;
  }

  .project-version-head {
    align-items: flex-start;
    flex-direction: column;
  }

  .project-page-gallery {
    padding: 10px;
  }

  .project-evidence-toolbar {
    align-items: stretch;
    flex-direction: column;
    gap: 10px;
  }

  .project-evidence-switch {
    width: 100%;
  }

  .project-evidence-toggle {
    min-width: 0;
    text-align: center;
  }

  .project-evidence-toolbar-actions {
    justify-content: space-between;
  }

  .project-evidence-toolbar-actions > span {
    display: none;
  }

  .project-evidence-open {
    width: 100%;
  }

  .project-page-preview {
    height: min(55vh, 520px);
    min-height: 340px;
  }

  .project-review-mode {
    grid-template-columns: 1fr;
  }

  .project-published-site,
  .project-source-grid {
    grid-template-columns: 1fr;
  }

  .project-published-site > .btn {
    width: 100%;
    margin-bottom: 0;
  }

  .project-page-choice {
    grid-template-columns: auto minmax(0, 1fr);
  }

  .project-page-choice .field:nth-of-type(2),
  .project-page-remove {
    grid-column: 2;
  }

  .project-page-remove {
    justify-self: start;
  }

  .project-form-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .project-form-actions .btn {
    width: 100%;
  }

  .project-review-link-row {
    grid-template-columns: 1fr;
  }

  .project-review-link-card {
    margin: 0 14px 14px;
    padding: 14px;
  }

  .project-review-link-row .btn {
    width: 100%;
  }

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

/* ==========================================================================
   Customer project review
   ========================================================================== */

.client-review-shell {
  min-height: 100vh;
  background:
    radial-gradient(circle at 8% 0%, rgba(28, 64, 201, 0.07), transparent 28rem),
    var(--bg);
}

.client-review-header {
  display: flex;
  min-height: 68px;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 0 max(24px, calc((100vw - 1280px) / 2));
  background: rgba(255, 255, 255, 0.96);
  border-bottom: 1px solid var(--line);
}

.client-review-header img {
  display: block;
  width: 132px;
  height: auto;
}

.client-review-header span {
  color: var(--ink-3);
  font-size: 12px;
  font-weight: 650;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.client-review-main {
  width: min(1280px, calc(100% - 40px));
  margin: 0 auto;
  padding: 40px 0 64px;
}

.client-review-footer {
  padding: 24px 20px 34px;
  color: var(--ink-3);
  font-size: 11.5px;
  text-align: center;
}

.client-review-loading,
.client-review-message {
  display: grid;
  width: min(680px, 100%);
  margin: 8vh auto 0;
  padding: 46px 38px;
  justify-items: center;
  text-align: center;
}

.client-review-loading {
  gap: 14px;
}

.client-review-loading p {
  margin: 0;
}

.client-review-message h1 {
  margin-bottom: 9px;
  color: var(--ink);
  font-size: 24px;
  letter-spacing: -0.02em;
}

.client-review-message > p:last-child {
  max-width: 540px;
  margin-bottom: 0;
}

.completion-mark--neutral {
  background: var(--ink-2);
}

.client-review-title {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 20px;
}

.client-review-title h1 {
  margin: 0 0 4px;
  color: var(--ink);
  font-size: clamp(25px, 3vw, 34px);
  line-height: 1.15;
  letter-spacing: -0.025em;
}

.client-review-title p:last-child {
  margin: 0;
  color: var(--ink-3);
}

.client-version-summary {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-bottom: 18px;
  overflow: hidden;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-card);
}

.client-version-summary > div {
  display: grid;
  gap: 3px;
  padding: 14px 18px;
  border-right: 1px solid var(--line);
}

.client-version-summary > div:last-child {
  border-right: 0;
}

.client-version-summary span {
  color: var(--ink-3);
  font-size: 10.5px;
  font-weight: 650;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.client-version-summary strong,
.client-version-summary code {
  color: var(--ink);
  font-size: 13px;
  font-weight: 650;
}

.client-evidence-card {
  overflow: hidden;
}

.client-evidence-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 28px;
  padding: 22px 24px;
  border-bottom: 1px solid var(--line);
}

.client-evidence-head h2 {
  margin: 0 0 4px;
  color: var(--ink);
  font-size: 20px;
}

.client-evidence-head p:last-child {
  max-width: 620px;
  margin-bottom: 0;
}

.client-evidence-links {
  display: flex;
  flex: 0 0 auto;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.client-page-tabs {
  display: flex;
  gap: 6px;
  padding: 12px 16px;
  overflow-x: auto;
  background: var(--surface-sunken);
  border-bottom: 1px solid var(--line);
  scrollbar-width: thin;
}

.client-page-tab {
  flex: 0 0 auto;
  min-height: 34px;
  padding: 6px 12px;
  color: var(--ink-2);
  font-size: 12.5px;
  font-weight: 650;
  background: transparent;
  border: 1px solid transparent;
  border-radius: var(--radius-small);
  cursor: pointer;
}

.client-page-tab:hover {
  color: var(--ink);
  background: var(--surface);
}

.client-page-tab.is-active {
  color: var(--brand-hover);
  background: var(--surface);
  border-color: var(--brand-line);
  box-shadow: 0 1px 2px rgba(10, 37, 64, 0.06);
}

.client-capture-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  gap: 18px;
  padding: 18px;
  background: #e9eef5;
}

.client-capture {
  min-width: 0;
  margin: 0;
  overflow: hidden;
  background: var(--surface);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  box-shadow: var(--shadow-card);
}

.client-capture figcaption {
  display: flex;
  min-height: 42px;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 9px 13px;
  border-bottom: 1px solid var(--line);
}

.client-capture figcaption strong {
  color: var(--ink);
  font-size: 12.5px;
}

.client-capture figcaption span {
  color: var(--ink-3);
  font-size: 10.5px;
}

.client-capture-viewport {
  height: min(62vh, 650px);
  overflow: auto;
  overscroll-behavior: contain;
  background:
    linear-gradient(45deg, #f3f6f9 25%, transparent 25%),
    linear-gradient(-45deg, #f3f6f9 25%, transparent 25%),
    linear-gradient(45deg, transparent 75%, #f3f6f9 75%),
    linear-gradient(-45deg, transparent 75%, #f3f6f9 75%);
  background-position:
    0 0,
    0 8px,
    8px -8px,
    -8px 0;
  background-size: 16px 16px;
  scrollbar-width: thin;
}

.client-capture-viewport img {
  display: block;
  width: 100%;
  height: auto;
  background: #fff;
}

.client-capture-viewport--mobile {
  width: min(100%, 390px);
  margin: 0 auto;
}

.client-action-card,
.client-payment-card {
  padding: 28px 30px;
}

.client-action-card > h2,
.client-payment-card > h2 {
  margin: 0 0 6px;
  color: var(--ink);
  font-size: 21px;
  letter-spacing: -0.015em;
}

.client-action-card > p:not(.eyebrow),
.client-payment-card > p:not(.eyebrow) {
  max-width: 760px;
  margin-bottom: 22px;
}

.client-decision-card {
  padding: 30px;
}

.client-decision-card > h2 {
  margin: 0 0 7px;
  color: var(--ink);
  font-size: 23px;
  letter-spacing: -0.018em;
}

.client-decision-card > p:not(.eyebrow) {
  max-width: 780px;
  margin-bottom: 22px;
}

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

.client-decision-option {
  display: grid;
  min-height: 118px;
  grid-template-columns: 42px minmax(0, 1fr) 24px;
  gap: 14px;
  align-items: center;
  padding: 20px;
  color: var(--ink);
  text-align: left;
  background: var(--surface);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  cursor: pointer;
  transition:
    border-color 150ms ease,
    box-shadow 150ms ease,
    transform 150ms ease;
}

.client-decision-option:hover {
  border-color: var(--brand);
  box-shadow: 0 12px 26px rgba(20, 59, 151, 0.1);
  transform: translateY(-1px);
}

.client-decision-option:focus-visible {
  outline: 3px solid rgba(28, 64, 201, 0.2);
  outline-offset: 2px;
}

.client-decision-option:disabled {
  cursor: wait;
  opacity: 0.68;
  transform: none;
}

.client-decision-option--approve {
  background: linear-gradient(145deg, #f5fbf8, #ffffff);
  border-color: #9dcdb9;
}

.client-decision-option > span:nth-child(2) {
  display: grid;
  gap: 5px;
}

.client-decision-option strong {
  font-size: 15px;
  line-height: 1.35;
}

.client-decision-option small {
  color: var(--ink-3);
  font-size: 12px;
  line-height: 1.5;
}

.client-decision-icon {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  color: var(--brand);
  font-size: 20px;
  font-weight: 800;
  background: var(--brand-soft);
  border-radius: 50%;
}

.client-decision-option--approve .client-decision-icon {
  color: #13694f;
  background: #e2f4ed;
}

.client-decision-arrow {
  color: var(--ink-3);
  font-size: 20px;
  text-align: right;
}

#review-decision-panel:not(:empty) {
  margin-top: 26px;
  padding-top: 26px;
  border-top: 1px solid var(--line);
}

.client-decision-feedback-form > h2 {
  margin: 0 0 6px;
  color: var(--ink);
  font-size: 21px;
}

.client-decision-feedback-form > p:not(.eyebrow) {
  max-width: 800px;
  margin-bottom: 22px;
}

.client-feedback-builder {
  margin-top: 22px;
}

.client-feedback-builder-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 12px;
}

.client-feedback-builder-head h3 {
  margin: 0 0 3px;
  color: var(--ink);
  font-size: 16px;
}

.client-feedback-builder-head p {
  margin: 0;
  color: var(--ink-3);
  font-size: 12px;
}

.client-feedback-items {
  display: grid;
  gap: 12px;
}

.client-feedback-item {
  padding: 18px;
  background: var(--surface-sunken);
  border: 1px solid var(--line);
  border-radius: var(--radius-small);
}

.client-feedback-item > header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 16px;
}

.client-feedback-item > header > div {
  display: grid;
  gap: 2px;
}

.client-feedback-item > header span {
  color: var(--brand);
  font-size: 10.5px;
  font-weight: 750;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}

.client-feedback-item > header strong {
  color: var(--ink);
  font-size: 13px;
}

.client-feedback-remove:disabled {
  visibility: hidden;
}

.client-feedback-item-grid {
  display: grid;
  grid-template-columns: minmax(160px, 0.8fr) minmax(170px, 0.8fr) minmax(240px, 1.4fr);
  gap: 14px;
  align-items: start;
}

.client-feedback-item-grid > .field,
.client-feedback-item > .field:last-child {
  align-content: start;
  margin-bottom: 0;
}

.optional-label {
  color: var(--ink-3);
  font-size: 0.88em;
  font-weight: 500;
}

.client-action-submit {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-top: 24px;
  padding-top: 20px;
  border-top: 1px solid var(--line);
}

.client-action-submit small {
  max-width: 620px;
  color: var(--ink-3);
  font-size: 11.5px;
}

.client-change-request {
  overflow: hidden;
}

.client-change-request > summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 20px 24px;
  color: var(--ink);
  cursor: pointer;
  list-style: none;
}

.client-change-request > summary::-webkit-details-marker {
  display: none;
}

.client-change-request > summary span:first-child {
  display: grid;
  gap: 2px;
}

.client-change-request > summary small {
  color: var(--ink-3);
  font-size: 12px;
  font-weight: 500;
}

.client-change-request > summary span:last-child {
  display: grid;
  width: 28px;
  height: 28px;
  flex: none;
  place-items: center;
  color: var(--brand);
  font-size: 20px;
  border: 1px solid var(--brand-line);
  border-radius: 50%;
}

.client-change-request[open] > summary {
  border-bottom: 1px solid var(--line);
}

.client-change-request[open] > summary span:last-child {
  transform: rotate(45deg);
}

.client-change-request-form {
  padding: 24px;
}

.client-change-request-form > h2 {
  margin: 0 0 6px;
  color: var(--ink);
  font-size: 20px;
}

.client-change-request-form > p:not(.eyebrow) {
  margin-bottom: 20px;
}

.client-change-request-form .client-feedback-builder {
  margin-top: 20px;
}

.inline-hash {
  color: var(--ink);
  font-size: 11.5px;
  overflow-wrap: anywhere;
}

.client-payment-card .payment-step-mark {
  margin-bottom: 14px;
}

@media (max-width: 900px) {
  .client-capture-grid {
    grid-template-columns: 1fr;
  }

  .client-capture--mobile {
    width: min(100%, 470px);
    margin: 0 auto;
  }

  .client-evidence-head {
    flex-direction: column;
  }

  .client-evidence-links {
    justify-content: flex-start;
  }

  .client-decision-grid,
  .client-feedback-item-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .client-review-header {
    min-height: 60px;
    padding: 0 18px;
  }

  .client-review-header img {
    width: 112px;
  }

  .client-review-header span {
    font-size: 9.5px;
  }

  .client-review-main {
    width: min(100% - 24px, 1280px);
    padding-top: 24px;
  }

  .client-review-title {
    align-items: flex-start;
    flex-direction: column;
    gap: 12px;
  }

  .client-version-summary {
    grid-template-columns: 1fr;
  }

  .client-version-summary > div {
    grid-template-columns: 110px 1fr;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .client-version-summary > div:last-child {
    border-bottom: 0;
  }

  .client-evidence-head,
  .client-action-card,
  .client-payment-card,
  .client-decision-card {
    padding: 20px;
  }

  .client-evidence-links {
    width: 100%;
  }

  .client-evidence-links .btn {
    width: 100%;
  }

  .client-capture-grid {
    padding: 10px;
  }

  .client-capture-viewport {
    height: 440px;
  }

  .client-action-submit {
    align-items: stretch;
    flex-direction: column;
  }

  .client-action-submit .btn {
    width: 100%;
  }

  .client-decision-option {
    min-height: 0;
    grid-template-columns: 38px minmax(0, 1fr);
    padding: 16px;
  }

  .client-decision-icon {
    width: 38px;
    height: 38px;
  }

  .client-decision-arrow {
    display: none;
  }

  .client-feedback-builder-head,
  .client-feedback-item > header {
    align-items: stretch;
    flex-direction: column;
  }

  .client-feedback-builder-head .btn,
  .client-feedback-item > header .btn {
    width: 100%;
  }
}
