/* ==========================================================================
   TextInvoice • Warm Editorial Neo-Brutalist Design System
   Warm Cream Paper (#f7f0e6) / Deep Forest Ink (#1d2b1f) / Electric Lime (#bfea4b)
   Fraunces Editorial Serif + Inter UI Grotesque + Zero-Blur Hard Shadows
   ========================================================================== */

@import url("/static/tokens.css");

:root {
  /* Radii & Architectural 2px Borders (from tokens.css & DESIGN.md) */
  --radius-xs: var(--ds-radius-detail);        /* 6px */
  --radius-sm: var(--ds-radius-control);       /* 12px */
  --radius-md: var(--ds-radius-container);     /* 14px */
  --radius-lg: var(--ds-radius-container);     /* 14px */
  --radius-xl: var(--ds-radius-overlay);       /* 16px */
  --radius-pill: var(--ds-radius-full);        /* 9999px */

  --border-width: var(--ds-border-width-default);        /* 2px */
  --border-width-thick: var(--ds-border-width-selected); /* 2px */

  --ease: cubic-bezier(0.2, 0.8, 0.2, 1);
  --ease-clay: cubic-bezier(0.2, 0.8, 0.2, 1);
  --duration-clay: 150ms;

  --font-display: var(--ds-font-family-display);
  --font-sans: var(--ds-font-family-text);
  --font-mono: var(--ds-font-family-mono);

  /* Fixed Chapter Surfaces (Alternating Editorial Bands) */
  --ch-paper: #f7f0e6;
  --ch-surface: #f3ebdd;
  --ch-card: #fbf7f1;
  --ch-ink: #1d2b1f;
  --ch-ink-deep: #141e16;
  --ch-ink-raised: #243527;
  --ch-ink-text: #f7f0e6;
  --ch-ink-muted: #d6cfc1;
  --ch-ink-border: rgb(247 240 230 / 0.24);
  --ch-lime: #bfea4b;
  --ch-lime-hover: #b0de36;
  --ch-lime-pressed: #9fce26;
  --ch-on-lime: #1d2b1f;
  --ch-terracotta: #c53a20;
  --ch-terracotta-hover: #a83019;
  --ch-on-terracotta: #ffffff;
  --ch-focus: #1e5bff;

  /* Printable WYSIWYG Invoice Sheet Tokens */
  --paper-bg: #ffffff;
  --paper-text: #1d2b1f;
  --paper-sub: #3d4f40;
  --paper-hairline: #d5ccbd;
  --paper-border: #1d2b1f;
  --paper-callout-bg: #f7f0e6;
  --paper-surface: #ffffff;
  --paper-inverse-text: #f7f0e6;
  --paper-due: #c53a20;
  --logo-plate-bg: #ffffff;

  /* Official Third-Party Payment Provider Brand Tokens */
  --brand-stripe: #635bff;
  --brand-paypal: #003087;
  --brand-venmo: #008cff;
  --brand-zelle: #6d1ed4;
  --brand-cashapp: #008a2e;
  --brand-square: #1d2b1f;
  --brand-bank: #273729;
}

:root,
[data-theme="light"] {
  /* Warm Cream & Oatmeal Canvas */
  --bg-canvas: var(--ds-color-neutral-light-2);        /* #f7f0e6 */
  --bg-surface: var(--ds-color-neutral-light-1);       /* #fbf7f1 */
  --bg-surface-subtle: var(--ds-color-neutral-light-3);/* #f3ebdd */
  --bg-surface-elevated: var(--ds-color-white);        /* #ffffff */
  --bg-surface-hover: var(--ds-color-neutral-light-4); /* #ebe0ce */
  --bg-header: var(--ds-color-neutral-light-2);        /* #f7f0e6 */

  /* Architectural Forest Pine Borders */
  --border-subtle: var(--ds-color-neutral-light-12);   /* #1d2b1f */
  --border-hairline: rgb(29 43 31 / 0.18);
  --border-medium: var(--ds-color-neutral-light-12);   /* #1d2b1f */
  --border-input: var(--ds-color-neutral-light-8);     /* #5d6e60 (>= 4.5:1 UI contrast) */
  --border-strong: var(--ds-color-neutral-light-12);   /* #1d2b1f */
  --focus-outline: var(--ds-color-border-focus);       /* #1e5bff */

  /* High-Contrast Forest Ink Typography */
  --text-primary: var(--ds-color-neutral-light-12);    /* #1d2b1f (13.09:1) */
  --text-secondary: var(--ds-color-neutral-light-11);  /* #273729 (11.4:1) */
  --text-tertiary: var(--ds-color-neutral-light-10);   /* #3d4f40 (7.9:1) */
  --text-on-light: #1d2b1f;

  /* Primary Electric Lime & Secondary Actions */
  --accent-contrast: var(--ds-color-accent-light-9);               /* #bfea4b */
  --accent-contrast-hover: var(--ds-color-accent-light-10);        /* #b0de36 */
  --accent-contrast-pressed: var(--ds-color-accent-light-solid-pressed); /* #9fce26 */
  --accent-contrast-text: var(--ds-color-neutral-light-12);        /* #1d2b1f (10.64:1) */

  --action-sms-bg: #1d2b1f;
  --action-sms-bg-hover: #273729;
  --action-sms-border: #1d2b1f;
  --action-sms-text: #f7f0e6;

  /* Semantic Status Pills */
  --status-due: #b42f17;
  --status-idle: #5d6e60;
  --status-online: #1d6333;
  --status-success-bg: #e1efe3;
  --status-success-border: #1d6333;
  --status-success-text: #1c3a23;
  --status-info-bg: #e7f6af;
  --status-info-border: #1d2b1f;
  --status-info-text: #1d2b1f;
  --status-link-text: #1d2b1f;
  --status-warning-bg: #f3eadd;
  --status-warning-border: #845d03;
  --status-warning-text: #43310f;
  --status-danger-bg: #fbe7e5;
  --status-danger-border: #8d4039;
  --status-danger-text: #4f2925;

  /* Zero-Blur Neo-Brutalist Hard Offset Shadows */
  --shadow-ink: var(--ds-color-shadow-ambient);        /* #1d2b1f */
  --shadow-card: 6px 6px 0 0 var(--shadow-ink);
  --shadow-card-hover: 8px 8px 0 0 var(--shadow-ink);
  --shadow-sm: 2px 2px 0 0 var(--shadow-ink);
  --shadow-inset: none;
  --shadow-btn: 4px 4px 0 0 var(--shadow-ink);
  --shadow-btn-hover: 2px 2px 0 0 var(--shadow-ink);
  --shadow-btn-active: 1px 1px 0 0 var(--shadow-ink);
  --shadow-neutral-btn: 3px 3px 0 0 var(--shadow-ink);
  --shadow-neutral-btn-hover: 1px 1px 0 0 var(--shadow-ink);
  --shadow-neutral-btn-active: 0 0 0 0 var(--shadow-ink);
  --shadow-modal: 8px 8px 0 0 var(--shadow-ink);
  --shadow-sheet: 0 -4px 0 0 var(--shadow-ink);
  --shadow-paper: 6px 6px 0 0 var(--shadow-ink);
  --scrim-bg: var(--ds-color-overlay-scrim);
  --focus-ring-shadow: 0 0 0 3px rgb(30 91 255 / 0.24);

  /* Shorthand Semantic Aliases for Dashboard, Ledger & Plan Cards */
  --bg: var(--bg-surface);
  --surface: var(--bg-surface-subtle);
  --border: var(--border-subtle);
  --text: var(--text-primary);
  --muted: var(--text-tertiary);
  --primary: var(--accent-contrast);
  --on-primary: var(--accent-contrast-text);
  --accent: var(--ch-terracotta);
  --on-accent: var(--ch-on-terracotta);
  --radius-card: var(--radius-lg);
  --shadow-hard-sm: var(--shadow-btn);
  --shadow-hard: var(--shadow-card);
}

[data-theme="dark"] {
  --bg-canvas: var(--ds-color-neutral-dark-1);         /* #141e16 */
  --bg-surface: var(--ds-color-neutral-dark-3);        /* #1d2b1f */
  --bg-surface-subtle: var(--ds-color-neutral-dark-2); /* #19261b */
  --bg-surface-elevated: var(--ds-color-neutral-dark-4);/* #253628 */
  --bg-surface-hover: var(--ds-color-neutral-dark-5);  /* #2e4331 */
  --bg-header: var(--ds-color-neutral-dark-1);         /* #141e16 */

  --border-subtle: var(--ds-color-neutral-dark-8);     /* #7d9680 */
  --border-hairline: rgb(247 240 230 / 0.16);
  --border-medium: var(--ds-color-neutral-dark-9);     /* #96ad98 */
  --border-input: var(--ds-color-neutral-dark-8);      /* #7d9680 */
  --border-strong: var(--ds-color-accent-dark-9);      /* #bfea4b */
  --focus-outline: var(--ds-color-border-focus);       /* #bfea4b */

  --text-primary: var(--ds-color-neutral-dark-12);     /* #f7f0e6 */
  --text-secondary: var(--ds-color-neutral-dark-11);   /* #e4ded3 */
  --text-tertiary: var(--ds-color-neutral-dark-10);    /* #c1ccbf */
  --text-on-light: #1d2b1f;

  --accent-contrast: var(--ds-color-accent-dark-9);    /* #bfea4b */
  --accent-contrast-hover: var(--ds-color-accent-dark-10); /* #cef06d */
  --accent-contrast-pressed: var(--ds-color-accent-dark-solid-pressed);
  --accent-contrast-text: #141e16;

  --action-sms-bg: #f7f0e6;
  --action-sms-bg-hover: #e4ded3;
  --action-sms-border: #f7f0e6;
  --action-sms-text: #141e16;

  --status-due: #f8a599;
  --status-idle: #96ad98;
  --status-online: #8ce09a;
  --status-success-bg: #1f3323;
  --status-success-border: #578d63;
  --status-success-text: #c6dbc9;
  --status-info-bg: #2d401e;
  --status-info-border: #a7d930;
  --status-info-text: #f2fad1;
  --status-link-text: #bfea4b;
  --status-warning-bg: #382e1c;
  --status-warning-border: #dfb772;
  --status-warning-text: #f8d191;
  --status-danger-bg: #402a27;
  --status-danger-border: #e6988f;
  --status-danger-text: #edcfcb;

  --shadow-ink: var(--ds-color-shadow-ambient);        /* #0a100b */
  --shadow-card: 6px 6px 0 0 var(--shadow-ink);
  --shadow-card-hover: 8px 8px 0 0 var(--shadow-ink);
  --shadow-sm: 2px 2px 0 0 var(--shadow-ink);
  --shadow-inset: none;
  --shadow-btn: 4px 4px 0 0 var(--shadow-ink);
  --shadow-btn-hover: 2px 2px 0 0 var(--shadow-ink);
  --shadow-btn-active: 1px 1px 0 0 var(--shadow-ink);
  --shadow-neutral-btn: 3px 3px 0 0 var(--shadow-ink);
  --shadow-neutral-btn-hover: 1px 1px 0 0 var(--shadow-ink);
  --shadow-neutral-btn-active: 0 0 0 0 var(--shadow-ink);
  --shadow-modal: 8px 8px 0 0 var(--shadow-ink);
  --shadow-sheet: 0 -4px 0 0 var(--shadow-ink);
  --shadow-paper: 6px 6px 0 0 var(--shadow-ink);
  --scrim-bg: var(--ds-color-overlay-scrim);
  --focus-ring-shadow: 0 0 0 3px rgb(191 234 75 / 0.30);

  --bg: var(--bg-surface);
  --surface: var(--bg-surface-subtle);
  --border: var(--border-subtle);
  --text: var(--text-primary);
  --muted: var(--text-tertiary);
  --primary: var(--accent-contrast);
  --on-primary: var(--accent-contrast-text);
  --accent: var(--ch-terracotta);
  --on-accent: var(--ch-on-terracotta);
  --radius-card: var(--radius-lg);
  --shadow-hard-sm: var(--shadow-btn);
  --shadow-hard: var(--shadow-card);
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 88px;
}

/* Reset & Micro Foundations */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
}

button, a, input, select, textarea, .chip, .preset-item, .client-row {
  touch-action: manipulation;
}

*:focus-visible {
  outline: var(--ds-focus-ring-width) solid var(--focus-outline);
  outline-offset: var(--ds-focus-ring-offset);
}

body {
  font-family: var(--font-sans);
  background-color: var(--bg-canvas);
  color: var(--text-primary);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  line-height: 1.55;
  letter-spacing: -0.008em;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Tabular Numbers for all financial and metric displays */
.num-col, .client-rate, .client-invoices, .total-due-amount, .inv-num, .inv-date-val, .dev-otp-code, .otp-box {
  font-variant-numeric: tabular-nums;
}

/* Screen reader utility */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}

/* ==========================================================================
   Editorial Typography, Shells, Eyebrows & Chapter Bands
   ========================================================================== */
.section-shell {
  width: min(1200px, 92vw);
  margin-inline: auto;
}

.chapter-paper {
  background-color: var(--bg-canvas);
  color: var(--text-primary);
  border-bottom: var(--border-width) solid var(--border-subtle);
}

.chapter-surface {
  background-color: var(--bg-surface-subtle);
  color: var(--text-primary);
  border-bottom: var(--border-width) solid var(--border-subtle);
}

.chapter-ink {
  background-color: var(--ch-ink);
  color: var(--ch-ink-text);
  border-bottom: var(--border-width) solid var(--ch-ink-deep);
}

.chapter-lime {
  background-color: var(--ch-lime);
  color: var(--ch-on-lime);
  border-bottom: var(--border-width) solid var(--ch-on-lime);
}

.chapter-pad {
  padding-block: clamp(52px, 6.5vw, 88px);
}

.chapter-pad-tight {
  padding-block: clamp(36px, 4.5vw, 56px);
}

/* Editorial Fraunces Scale */
.ch-display {
  font-family: var(--font-display);
  font-size: clamp(2.65rem, 1.9rem + 3.6vw, 4.65rem);
  font-weight: 700;
  line-height: 0.94;
  letter-spacing: -0.025em;
  text-wrap: balance;
}

/* Signature Stroked Electric-Lime Display Highlight Word */
.ch-display-highlight {
  display: inline-block;
  color: var(--ch-lime);
  padding-inline: 0.04em;
  text-shadow:
    0 -1.5px 0 var(--ch-ink),
    0 1.5px 0 var(--ch-ink),
    -1.5px 0 0 var(--ch-ink),
    1.5px 0 0 var(--ch-ink),
    -1.5px -1.5px 0 var(--ch-ink),
    1.5px -1.5px 0 var(--ch-ink),
    -1.5px 1.5px 0 var(--ch-ink),
    1.5px 1.5px 0 var(--ch-ink),
    4px 4px 0 var(--ch-ink);
}

.ch-h1 {
  font-family: var(--font-display);
  font-size: clamp(2.1rem, 1.55rem + 2.2vw, 3.35rem);
  font-weight: 700;
  line-height: 0.98;
  letter-spacing: -0.024em;
  text-wrap: balance;
}

.ch-h2 {
  font-family: var(--font-display);
  font-size: clamp(1.75rem, 1.35rem + 1.6vw, 2.65rem);
  font-weight: 700;
  line-height: 1.04;
  letter-spacing: -0.02em;
  text-wrap: balance;
}

.ch-h3 {
  font-family: var(--font-display);
  font-size: clamp(1.25rem, 1.08rem + 0.6vw, 1.6rem);
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.015em;
}

.ch-lead {
  font-size: clamp(1rem, 0.94rem + 0.28vw, 1.15rem);
  line-height: 1.6;
  color: var(--text-secondary);
  max-width: 56ch;
}

.text-label {
  font-family: var(--font-sans);
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  line-height: 1.2;
}

/* Eyebrow Pills */
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-sans);
  font-size: 0.72rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  line-height: 1.1;
  padding: 6px 14px;
  border-radius: var(--radius-pill);
  border: 1.5px solid var(--border-subtle);
}

.eyebrow-lime {
  background: var(--ch-lime);
  color: var(--ch-on-lime);
  border-color: var(--ch-on-lime);
  box-shadow: 2px 2px 0 0 var(--ch-on-lime);
}

.eyebrow-ink {
  background: var(--ch-ink);
  color: var(--ch-ink-text);
  border-color: var(--ch-ink);
}

.eyebrow-outline {
  background: var(--bg-surface);
  color: var(--text-primary);
  border-color: var(--border-subtle);
}

.eyebrow-outline-paper {
  background: rgb(247 240 230 / 0.08);
  color: var(--ch-ink-text);
  border-color: var(--ch-ink-border);
}

.eyebrow-terracotta {
  background: var(--ch-terracotta);
  color: var(--ch-on-terracotta);
  border-color: var(--ch-ink);
  box-shadow: 2px 2px 0 0 var(--ch-ink);
}

/* Pill CTA Buttons */
.btn-ch {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 46px;
  padding: 11px 22px;
  border-radius: var(--radius-pill);
  border: var(--border-width) solid var(--border-subtle);
  font-family: var(--font-sans);
  font-size: 0.78rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  text-decoration: none;
  cursor: pointer;
  transition: transform 120ms var(--ease), box-shadow 120ms var(--ease), background-color 120ms var(--ease), color 120ms var(--ease);
}

.btn-ghost-paper {
  background: var(--bg-surface);
  color: var(--text-primary);
  border-color: var(--border-subtle);
  box-shadow: var(--shadow-btn);
}

.btn-ghost-paper:hover {
  background: var(--bg-surface-hover);
  transform: translate(2px, 2px);
  box-shadow: var(--shadow-btn-hover);
}

.btn-ghost-paper:active {
  transform: translate(3px, 3px);
  box-shadow: var(--shadow-btn-active);
}

.btn-ink {
  background: var(--ch-ink);
  color: var(--ch-ink-text);
  border-color: var(--ch-ink);
  box-shadow: 4px 4px 0 0 rgb(29 43 31 / 0.32);
}

.btn-ink:hover {
  background: var(--ch-ink-raised);
  transform: translate(2px, 2px);
  box-shadow: 2px 2px 0 0 rgb(29 43 31 / 0.32);
}

.btn-ink:active {
  transform: translate(3px, 3px);
  box-shadow: 1px 1px 0 0 rgb(29 43 31 / 0.32);
}

.btn-outline-paper {
  background: transparent;
  color: var(--ch-ink-text);
  border-color: var(--ch-ink-text);
  box-shadow: 4px 4px 0 0 rgb(247 240 230 / 0.24);
}

.btn-outline-paper:hover {
  background: var(--ch-lime);
  color: var(--ch-on-lime);
  border-color: var(--ch-lime);
  transform: translate(2px, 2px);
  box-shadow: 2px 2px 0 0 rgb(247 240 230 / 0.24);
}

.card-hard {
  background: var(--bg-surface);
  border: var(--border-width) solid var(--border-subtle);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card);
}

/* ==========================================================================
   80px Bordered Sticky Header (Top Navigation Architecture)
   ========================================================================== */
.app-header {
  background: var(--bg-header);
  border-bottom: var(--border-width) solid var(--border-subtle);
  position: sticky;
  top: 0;
  z-index: 50;
  min-height: 78px;
  display: flex;
  align-items: center;
  padding: env(safe-area-inset-top) max(16px, env(safe-area-inset-right)) 0 max(16px, env(safe-area-inset-left));
}

.header-container {
  width: min(1200px, 100%);
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
}

.logo-lockup {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--text-primary);
  border-radius: var(--radius-xs);
  flex-shrink: 0;
}

.brand-mark-box {
  width: 36px;
  height: 36px;
  border-radius: 9px;
  background: var(--ch-lime);
  border: var(--border-width) solid var(--border-subtle);
  box-shadow: 2px 2px 0 0 var(--shadow-ink);
  color: var(--ch-on-lime);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: transform 120ms var(--ease), box-shadow 120ms var(--ease);
}

.logo-lockup:hover .brand-mark-box {
  transform: translate(1px, 1px);
  box-shadow: 1px 1px 0 0 var(--shadow-ink);
}

.brand-glyph {
  color: currentColor;
}

.logo-text {
  font-family: var(--font-display);
  font-size: 1.3rem;
  font-weight: 700;
  letter-spacing: -0.025em;
  color: var(--text-primary);
  line-height: 1;
}

.logo-text span {
  font-style: italic;
  font-weight: 600;
}

/* Center Desktop Chapter Nav Links */
.header-nav {
  display: flex;
  align-items: center;
  gap: 24px;
}

.header-nav-link {
  position: relative;
  color: var(--text-primary);
  text-decoration: none;
  font-size: 0.74rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding-block: 6px;
}

.header-nav-link::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 3px;
  background: var(--border-subtle);
  transform: scaleX(0);
  transform-origin: left center;
  transition: transform 160ms var(--ease);
}

.header-nav-link:hover::after,
.header-nav-link:focus-visible::after,
.header-nav-link.active::after {
  transform: scaleX(1);
}

@media (max-width: 980px) {
  .header-nav {
    display: none;
  }
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

/* User Auth Pill in Header */
.user-auth-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--bg-surface);
  border: var(--border-width) solid var(--border-subtle);
  box-shadow: var(--shadow-neutral-btn);
  padding: 6px 13px;
  min-height: 38px;
  border-radius: var(--radius-pill);
  font-size: 12px;
  font-weight: 700;
  color: var(--text-secondary);
}

.user-phone-num {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text-primary);
}

.auth-logout-btn {
  color: var(--text-primary);
  font-weight: 700;
  text-decoration: none;
  margin-left: 4px;
  padding-left: 8px;
  border-left: var(--border-width) solid var(--border-hairline);
}

.auth-logout-btn:hover {
  text-decoration: underline;
}

/* Sign-in Pill CTA */
.nav-signin-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--accent-contrast);
  border: var(--border-width) solid var(--border-subtle);
  box-shadow: var(--shadow-neutral-btn);
  color: var(--accent-contrast-text);
  text-decoration: none;
  font-size: 11.5px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 7px 15px;
  min-height: 38px;
  border-radius: var(--radius-pill);
  transition: transform 120ms var(--ease), box-shadow 120ms var(--ease), background-color 120ms var(--ease);
}

.nav-signin-link:hover {
  background: var(--accent-contrast-hover);
  transform: translate(1.5px, 1.5px);
  box-shadow: var(--shadow-neutral-btn-hover);
}

.nav-signin-link:active {
  transform: translate(3px, 3px);
  box-shadow: var(--shadow-neutral-btn-active);
}

/* Usage Pill */
.usage-pill {
  background: var(--bg-surface);
  border: var(--border-width) solid var(--border-subtle);
  box-shadow: var(--shadow-neutral-btn);
  color: var(--text-primary);
  padding: 7px 14px;
  min-height: 38px;
  border-radius: var(--radius-pill);
  font-size: 11.5px;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  cursor: pointer;
  transition: transform 120ms var(--ease), box-shadow 120ms var(--ease), background-color 120ms var(--ease);
}

.usage-pill:hover {
  background: var(--bg-surface-hover);
  transform: translate(1.5px, 1.5px);
  box-shadow: var(--shadow-neutral-btn-hover);
}

.usage-pill:active {
  transform: translate(3px, 3px);
  box-shadow: var(--shadow-neutral-btn-active);
}

.usage-pill.pro {
  color: var(--ch-on-lime);
  background: var(--ch-lime);
  border-color: var(--border-subtle);
}

.icon-btn {
  background: var(--bg-surface);
  border: var(--border-width) solid var(--border-subtle);
  box-shadow: var(--shadow-neutral-btn);
  color: var(--text-primary);
  width: 38px;
  height: 38px;
  border-radius: var(--radius-pill);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: transform 120ms var(--ease), box-shadow 120ms var(--ease), background-color 120ms var(--ease);
}

.icon-btn:hover {
  background: var(--bg-surface-hover);
  transform: translate(1.5px, 1.5px);
  box-shadow: var(--shadow-neutral-btn-hover);
}

.icon-btn:active {
  transform: translate(3px, 3px);
  box-shadow: var(--shadow-neutral-btn-active);
}

/* ==========================================================================
   Chapter 1: Editorial Hero Placement + Live Conversational Studio
   ========================================================================== */
.hero-chapter {
  padding-top: clamp(36px, 4.5vw, 60px);
  padding-bottom: clamp(52px, 6vw, 84px);
}

.hero-intro-grid {
  display: grid;
  grid-template-columns: 1.18fr 0.82fr;
  gap: clamp(24px, 3.5vw, 48px);
  align-items: end;
  padding-bottom: clamp(28px, 3.8vw, 44px);
  margin-bottom: clamp(28px, 3.8vw, 44px);
  border-bottom: var(--border-width) solid var(--border-subtle);
}

.hero-copy-col {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 18px;
}

.hero-cta-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  margin-top: 4px;
}

/* Right-Side Architectural Spec Ledger Cards in Hero */
.hero-spec-stack {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

.hero-spec-card {
  background: var(--bg-surface);
  border: var(--border-width) solid var(--border-subtle);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-btn);
  padding: 16px 18px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.hero-spec-card.wide {
  grid-column: 1 / -1;
  background: var(--ch-ink);
  color: var(--ch-ink-text);
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.hero-spec-kicker {
  font-family: var(--font-mono);
  font-size: 10.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-tertiary);
}

.hero-spec-card.wide .hero-spec-kicker {
  color: var(--ch-lime);
}

.hero-spec-stat {
  font-family: var(--font-display);
  font-size: 1.55rem;
  font-weight: 700;
  line-height: 1.05;
  letter-spacing: -0.02em;
}

.hero-spec-desc {
  font-size: 12.5px;
  color: var(--text-secondary);
  line-height: 1.4;
}

.hero-spec-card.wide .hero-spec-desc {
  color: var(--ch-ink-muted);
}

/* Studio Section Header Bar */
.studio-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-bottom: 18px;
  flex-wrap: wrap;
}

.studio-bar-title {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 0.78rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.studio-live-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--ch-lime);
  border: 1.5px solid var(--border-subtle);
}

.main-content {
  flex: 1;
  width: 100%;
}

.app-grid {
  display: grid;
  grid-template-columns: minmax(380px, 0.9fr) minmax(0, 1.1fr);
  gap: 28px;
  align-items: start;
}

@media (max-width: 1040px) {
  .hero-intro-grid {
    grid-template-columns: 1fr;
  }
  .app-grid {
    grid-template-columns: 1fr;
  }
}

/* Studio Left Composer Card */
.input-panel {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.panel-card {
  background: var(--bg-surface);
  border: var(--border-width) solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 22px;
  box-shadow: var(--shadow-card);
}

.panel-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 14px;
}

.panel-heading {
  font-size: 11.5px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-primary);
}

.panel-hint {
  font-size: 11px;
  color: var(--text-tertiary);
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.kbd-pill {
  background: var(--bg-surface);
  border: 1.5px solid var(--border-subtle);
  border-radius: var(--radius-xs);
  box-shadow: 1.5px 1.5px 0 0 var(--shadow-ink);
  padding: 1px 6px;
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 700;
  color: var(--text-primary);
}

.panel-tag {
  font-size: 10.5px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--ch-on-lime);
  background: var(--ch-lime);
  border: 1.5px solid var(--border-subtle);
  padding: 3px 10px;
  border-radius: var(--radius-pill);
}

/* Stateful Invoice Context Header & Thread */
.context-header-bar {
  gap: 8px;
  flex-wrap: wrap;
}

.context-title-group,
.context-actions-group {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.context-id-pill {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 700;
  color: var(--text-primary);
  background: var(--bg-surface-subtle);
  border: 1.5px solid var(--border-subtle);
  padding: 3px 10px;
  border-radius: var(--radius-pill);
}

.engine-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--bg-surface-elevated);
  border: 1.5px solid var(--border-subtle);
  box-shadow: 2px 2px 0 0 var(--shadow-ink);
  color: var(--text-secondary);
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 700;
  padding: 4px 11px;
  min-height: 30px;
  border-radius: var(--radius-pill);
  cursor: pointer;
  transition: transform 120ms var(--ease), box-shadow 120ms var(--ease), background-color 120ms var(--ease);
}

.engine-pill:hover {
  background: var(--bg-surface-hover);
  color: var(--text-primary);
  transform: translate(1px, 1px);
  box-shadow: 1px 1px 0 0 var(--shadow-ink);
}

.engine-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--status-idle);
}

.engine-pill.active {
  color: var(--text-primary);
  background: var(--status-info-bg);
}

.engine-pill.active .engine-dot {
  background: var(--status-online);
}

.btn-new-context {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: var(--bg-surface-elevated);
  border: 1.5px solid var(--border-subtle);
  box-shadow: 2px 2px 0 0 var(--shadow-ink);
  color: var(--text-primary);
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 4px 11px;
  min-height: 30px;
  border-radius: var(--radius-pill);
  cursor: pointer;
  transition: transform 120ms var(--ease), box-shadow 120ms var(--ease), background-color 120ms var(--ease);
}

.btn-new-context:hover {
  background: var(--bg-surface-hover);
  transform: translate(1px, 1px);
  box-shadow: 1px 1px 0 0 var(--shadow-ink);
}

.context-thread {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 14px;
  max-height: 170px;
  overflow-y: auto;
  padding: 12px 14px;
  background: var(--bg-surface-subtle);
  border: var(--border-width) solid var(--border-subtle);
  border-radius: var(--radius-sm);
}

.context-turn {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding-bottom: 6px;
  border-bottom: 1px dashed var(--border-input);
}

.context-turn:last-child {
  padding-bottom: 0;
  border-bottom: none;
}

.context-user-line {
  font-size: 12px;
  color: var(--text-primary);
  line-height: 1.4;
}

.context-assistant-line {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-tertiary);
  line-height: 1.4;
}

.ai-settings-box {
  background: var(--bg-surface-subtle);
  border: var(--border-width) solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: 14px;
  margin-bottom: 16px;
}

@media (max-width: 640px) {
  .hide-mobile {
    display: none;
  }
}

.panel-desc {
  font-size: 13px;
  color: var(--text-secondary);
  margin-bottom: 14px;
  line-height: 1.5;
}

/* Prompt Box (Architectural Framed Input) */
.prompt-box-wrapper {
  background: var(--bg-surface-elevated);
  border: var(--border-width) solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  transition: box-shadow 120ms var(--ease), border-color 120ms var(--ease);
}

.prompt-box-wrapper:focus-within {
  border-color: var(--focus-outline);
  box-shadow: var(--focus-ring-shadow);
}

.prompt-textarea {
  width: 100%;
  height: 104px;
  background: transparent;
  border: none;
  color: var(--text-primary);
  font-family: var(--font-sans);
  font-size: 14.5px;
  line-height: 1.55;
  resize: vertical;
}

/* Focus outline handled by .prompt-box-wrapper:focus-within */
.prompt-textarea:focus {
  outline: none;
}

.prompt-textarea::placeholder {
  color: var(--text-tertiary);
}

.prompt-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 12px;
  border-top: var(--border-width) solid var(--border-hairline);
  gap: 8px;
}

.btn-subtle {
  background: var(--bg-surface-subtle);
  border: var(--border-width) solid var(--border-subtle);
  box-shadow: var(--shadow-neutral-btn);
  color: var(--text-primary);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 7px 14px;
  min-height: 38px;
  border-radius: var(--radius-pill);
  display: inline-flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  transition: transform 120ms var(--ease), box-shadow 120ms var(--ease), background-color 120ms var(--ease);
}

.btn-subtle:hover {
  background: var(--bg-surface-hover);
  transform: translate(1.5px, 1.5px);
  box-shadow: var(--shadow-neutral-btn-hover);
}

.btn-subtle:active {
  transform: translate(3px, 3px);
  box-shadow: var(--shadow-neutral-btn-active);
}

.btn-subtle.recording {
  color: var(--ch-on-terracotta);
  background: var(--ch-terracotta);
  border-color: var(--border-subtle);
}

.btn-compile {
  background: var(--accent-contrast);
  color: var(--accent-contrast-text);
  border: var(--border-width) solid var(--border-subtle);
  box-shadow: var(--shadow-btn);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 8px 18px;
  min-height: 40px;
  border-radius: var(--radius-pill);
  display: inline-flex;
  align-items: center;
  gap: 7px;
  cursor: pointer;
  transition: transform 120ms var(--ease), box-shadow 120ms var(--ease), background-color 120ms var(--ease), opacity 0.15s ease;
}

.btn-compile:hover:not(:disabled) {
  background: var(--accent-contrast-hover);
  transform: translate(2px, 2px);
  box-shadow: var(--shadow-btn-hover);
}

.btn-compile:active:not(:disabled) {
  background: var(--accent-contrast-pressed);
  transform: translate(3px, 3px);
  box-shadow: var(--shadow-btn-active);
}

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

/* Inline Bilingual Payment Link Card (Milestone 2) */
.workspace-paylink-card {
  margin-top: 14px;
  background: var(--bg-surface-subtle);
  border: var(--border-width) solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: 11px 13px;
  box-shadow: 2px 2px 0 0 var(--shadow-ink);
  transition: border-color 120ms var(--ease), box-shadow 120ms var(--ease);
}

.workspace-paylink-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 7px;
}

.workspace-paylink-title-group {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--text-primary);
}

.workspace-paylink-label {
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-primary);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.workspace-paylink-label .label-lang-sep {
  color: var(--text-tertiary);
  font-weight: 400;
}

.workspace-paylink-label .label-es {
  color: var(--text-secondary);
}

.workspace-paylink-actions {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.wpl-btn-subtle {
  background: transparent;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-pill);
  color: var(--text-secondary);
  font-family: inherit;
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.03em;
  padding: 3px 8px;
  cursor: pointer;
  transition: all 120ms var(--ease);
}

.wpl-btn-subtle:hover {
  background: var(--bg-surface-hover);
  color: var(--text-primary);
  border-color: var(--border);
}

.wpl-btn-pill {
  background: var(--ch-lime);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-pill);
  color: var(--ch-on-lime);
  font-family: inherit;
  font-size: 10.5px;
  font-weight: 800;
  letter-spacing: 0.03em;
  padding: 3px 10px;
  cursor: pointer;
  box-shadow: 1px 1px 0 0 var(--shadow-ink);
  transition: all 120ms var(--ease);
}

.wpl-btn-pill:hover:not(:disabled) {
  background: var(--ch-lime-hover);
  transform: translate(1px, 1px);
  box-shadow: none;
}

.wpl-btn-pill:disabled {
  opacity: 0.7;
  cursor: default;
}

.workspace-paylink-input-row {
  margin-top: 2px;
}

.workspace-paylink-input {
  font-size: 12.5px;
  padding: 8px 10px;
  border-radius: var(--radius-xs);
  font-family: var(--font-mono);
  background: var(--bg-surface-elevated);
}

.workspace-paylink-hint {
  font-size: 11px;
  color: var(--text-tertiary);
  margin-top: 6px;
  line-height: 1.35;
}

/* Quick Presets / Bilingual Templates */
.presets-section {
  margin-top: 18px;
  padding-top: 16px;
  border-top: var(--border-width) solid var(--border-subtle);
}

.presets-label {
  font-size: 10.5px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-tertiary);
  margin-bottom: 10px;
}

.preset-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.preset-item {
  width: 100%;
  background: var(--bg-surface-subtle);
  border: 1.5px solid var(--border-subtle);
  box-shadow: 2px 2px 0 0 var(--shadow-ink);
  border-radius: var(--radius-sm);
  padding: 9px 12px;
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  text-align: left;
  transition: transform 120ms var(--ease), box-shadow 120ms var(--ease), background-color 120ms var(--ease);
}

.preset-item:hover {
  background: var(--bg-surface-hover);
  transform: translate(1.5px, 1.5px);
  box-shadow: 1px 1px 0 0 var(--shadow-ink);
}

.preset-item:active {
  transform: translate(2px, 2px);
  box-shadow: none;
}

.preset-tag {
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 800;
  padding: 2px 8px;
  border-radius: var(--radius-pill);
  letter-spacing: 0.05em;
  background: var(--bg-surface-elevated);
  color: var(--text-primary);
  border: 1.5px solid var(--border-subtle);
  flex-shrink: 0;
}

.preset-tag.tag-sms {
  background: var(--ch-lime);
  color: var(--ch-on-lime);
  border-color: var(--ch-on-lime);
}

.preset-text {
  font-size: 12.5px;
  font-weight: 500;
  color: var(--text-secondary);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.preset-item:hover .preset-text {
  color: var(--text-primary);
}

/* ==========================================================================
   Action Bar Toolbar & WYSIWYG Printable Invoice Sheet
   ========================================================================== */
.preview-panel {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.action-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: var(--bg-surface);
  border: var(--border-width) solid var(--border-subtle);
  box-shadow: var(--shadow-card);
  border-radius: var(--radius-lg);
  padding: 10px 12px;
  gap: 8px;
  flex-wrap: wrap;
}

.action-group {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.btn-action {
  background: var(--bg-surface-elevated);
  border: var(--border-width) solid var(--border-subtle);
  box-shadow: var(--shadow-neutral-btn);
  color: var(--text-primary);
  font-size: 12px;
  font-weight: 700;
  padding: 7px 13px;
  min-height: 38px;
  border-radius: var(--radius-pill);
  display: inline-flex;
  align-items: center;
  gap: 7px;
  cursor: pointer;
  text-decoration: none;
  transition: transform 120ms var(--ease), box-shadow 120ms var(--ease), background-color 120ms var(--ease);
}

.btn-action:hover {
  background: var(--bg-surface-hover);
  transform: translate(1.5px, 1.5px);
  box-shadow: var(--shadow-neutral-btn-hover);
}

.btn-action:active {
  transform: translate(3px, 3px);
  box-shadow: var(--shadow-neutral-btn-active);
}

.btn-action svg {
  color: currentColor;
}

.btn-action.action-sms {
  background: var(--action-sms-bg);
  border-color: var(--action-sms-border);
  color: var(--action-sms-text);
  font-weight: 800;
}

.btn-action.action-sms:hover {
  background: var(--action-sms-bg-hover);
}

.btn-action.action-primary {
  background: var(--accent-contrast);
  color: var(--accent-contrast-text);
  border-color: var(--border-subtle);
  box-shadow: var(--shadow-btn);
  font-weight: 800;
}

.btn-action.action-primary:hover {
  background: var(--accent-contrast-hover);
  transform: translate(2px, 2px);
  box-shadow: var(--shadow-btn-hover);
}

.btn-action.action-primary:active {
  background: var(--accent-contrast-pressed);
  transform: translate(3px, 3px);
  box-shadow: var(--shadow-btn-active);
}

/* Editorial WYSIWYG Invoice Sheet */
.invoice-paper {
  background: var(--paper-bg);
  color: var(--paper-text);
  border-radius: var(--radius-lg);
  padding: 38px;
  border: var(--border-width) solid var(--paper-border);
  box-shadow: var(--shadow-paper);
  font-size: 13.5px;
  line-height: 1.5;
}

@media (max-width: 600px) {
  .invoice-paper {
    padding: 20px 16px;
  }
}

.invoice-header-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 20px;
}

.inv-brand-lockup {
  display: flex;
  align-items: center;
  gap: 12px;
}

.inv-company-logo-slot {
  flex-shrink: 0;
}

.inv-company-logo-img {
  width: 46px;
  height: 46px;
  object-fit: contain;
  border-radius: var(--radius-xs);
  border: var(--border-width) solid var(--paper-border);
  background: var(--logo-plate-bg);
  padding: 3px;
  display: block;
}

.inv-company-monogram {
  width: 46px;
  height: 46px;
  border-radius: var(--radius-xs);
  background: var(--paper-text);
  color: var(--paper-inverse-text);
  font-family: var(--font-display);
  font-size: 16px;
  font-weight: 700;
  letter-spacing: 0.02em;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.inv-biz-name {
  font-family: var(--font-display);
  font-size: 21px;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--paper-text);
  line-height: 1.1;
}

.inv-biz-sub {
  font-size: 12.5px;
  color: var(--paper-sub);
  margin-top: 2px;
}

.inv-meta-block {
  text-align: right;
}

.inv-title {
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: var(--paper-text);
}

.inv-num {
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 700;
  color: var(--paper-sub);
  margin-top: 2px;
}

.inv-dates-row {
  font-size: 12px;
  color: var(--paper-sub);
  margin-top: 2px;
}

.inv-dates-row.due {
  color: var(--paper-due);
  font-weight: 700;
}

.inv-date-label {
  color: var(--paper-sub);
  margin-right: 4px;
}

.inv-hairline {
  height: 2px;
  background: var(--paper-border);
  margin: 22px 0;
}

.inv-billed-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 24px;
  gap: 12px;
}

.billed-label {
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--paper-sub);
  margin-bottom: 4px;
}

.client-name-display {
  font-family: var(--font-display);
  font-size: 17px;
  font-weight: 700;
  color: var(--paper-text);
}

.client-contact-display {
  font-size: 12.5px;
  color: var(--paper-sub);
  margin-top: 2px;
}

.status-badge {
  display: inline-block;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 5px 12px;
  border-radius: var(--radius-pill);
  border: 1.5px solid var(--paper-border);
  background: var(--ch-lime);
  color: var(--ch-on-lime);
}

/* Items Table */
.table-container {
  width: 100%;
  overflow-x: auto;
  margin-bottom: 24px;
}

.items-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

.items-table th {
  text-align: left;
  font-size: 10.5px;
  font-weight: 800;
  letter-spacing: 0.08em;
  color: var(--paper-sub);
  padding: 8px 10px;
  border-bottom: 2px solid var(--paper-border);
}

.items-table td {
  padding: 12px 10px;
  border-bottom: 1px solid var(--paper-hairline);
  color: var(--paper-text);
}

.items-table .num-col {
  text-align: right;
}

/* Totals */
.totals-row {
  display: flex;
  justify-content: flex-end;
  margin-bottom: 24px;
}

.totals-card {
  width: 270px;
}

.totals-breakdown-rows {
  display: flex;
  flex-direction: column;
  gap: 5px;
  padding: 6px 0 8px;
  border-top: 1px solid var(--paper-hairline);
}

.totals-sub-line {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  font-size: 12px;
  color: var(--paper-sub);
  font-variant-numeric: tabular-nums;
}

.totals-sub-line span:last-child {
  font-family: var(--font-mono);
  font-weight: 600;
  color: var(--paper-text);
}

.total-due-line {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  padding: 10px 0;
  border-top: 1.5px solid var(--paper-border);
  border-bottom: 3px solid var(--paper-border);
}

.total-label {
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.08em;
  color: var(--paper-text);
}

.total-due-amount {
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--paper-text);
}

/* Payment & Links Box */
.payment-box {
  background: var(--paper-callout-bg);
  border: var(--border-width) solid var(--paper-border);
  border-radius: var(--radius-sm);
  padding: 14px 16px;
  margin-bottom: 16px;
}

.payment-box-header-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding-bottom: 10px;
  margin-bottom: 10px;
  border-bottom: 1.5px solid var(--paper-hairline);
  flex-wrap: wrap;
}

.payment-company-brand {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  min-width: 0;
}

.pay-company-logo-img {
  width: 28px;
  height: 28px;
  object-fit: contain;
  border-radius: var(--radius-xs);
  border: 1.5px solid var(--paper-border);
  background: var(--logo-plate-bg);
  padding: 2px;
  flex-shrink: 0;
}

.pay-company-monogram {
  width: 28px;
  height: 28px;
  border-radius: var(--radius-xs);
  background: var(--paper-text);
  color: var(--paper-inverse-text);
  font-family: var(--font-mono);
  font-size: 10.5px;
  font-weight: 800;
  letter-spacing: 0.04em;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.payment-company-meta {
  display: flex;
  flex-direction: column;
  line-height: 1.2;
}

.payment-box-title {
  font-size: 9.5px;
  font-weight: 800;
  letter-spacing: 0.08em;
  color: var(--paper-sub);
  margin-bottom: 1px;
}

.payment-company-name {
  font-size: 12.5px;
  font-weight: 700;
  color: var(--paper-text);
}

.invoice-pay-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: var(--ch-lime);
  color: var(--ch-on-lime);
  border: 1.5px solid var(--paper-border);
  box-shadow: 2px 2px 0 0 var(--paper-border);
  text-decoration: none;
  font-size: 11.5px;
  font-weight: 800;
  padding: 6px 14px;
  border-radius: var(--radius-pill);
  transition: transform 120ms var(--ease), box-shadow 120ms var(--ease);
  font-variant-numeric: tabular-nums;
  flex-shrink: 0;
}

.invoice-pay-pill:hover {
  transform: translate(1px, 1px);
  box-shadow: 1px 1px 0 0 var(--paper-border);
}

.payment-methods-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.payment-method-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  background: var(--paper-surface);
  border: 1.5px solid var(--paper-border);
  border-radius: var(--radius-xs);
  padding: 8px 12px;
  flex-wrap: wrap;
}

.pm-brand-cell {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.pm-logo-badge {
  width: 26px;
  height: 26px;
  border-radius: var(--radius-xs);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--paper-inverse-text);
  background: var(--paper-text);
  flex-shrink: 0;
}

.pm-logo-badge.pm-stripe  { background: var(--brand-stripe); }
.pm-logo-badge.pm-paypal  { background: var(--brand-paypal); }
.pm-logo-badge.pm-venmo   { background: var(--brand-venmo); }
.pm-logo-badge.pm-zelle   { background: var(--brand-zelle); }
.pm-logo-badge.pm-cashapp { background: var(--brand-cashapp); }
.pm-logo-badge.pm-square  { background: var(--brand-square); }
.pm-logo-badge.pm-bank    { background: var(--brand-bank); }
.pm-logo-badge.pm-link    { background: var(--paper-text); }

.pm-provider-name {
  font-size: 12px;
  font-weight: 700;
  color: var(--paper-text);
  letter-spacing: -0.01em;
}

.pm-link-cell {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
}

.pm-pay-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
  color: var(--paper-text);
  font-family: var(--font-mono);
  font-size: 11.5px;
  font-weight: 600;
  word-break: break-all;
}

.pm-pay-link:hover .pm-link-url {
  text-decoration: underline;
}

.pm-pay-cta {
  display: inline-flex;
  align-items: center;
  background: var(--paper-text);
  color: var(--paper-inverse-text);
  font-family: var(--font-sans);
  font-size: 10.5px;
  font-weight: 800;
  padding: 3px 9px;
  border-radius: var(--radius-pill);
  flex-shrink: 0;
}

.pm-handle-text {
  font-family: var(--font-mono);
  font-size: 11.5px;
  color: var(--paper-sub);
  word-break: break-all;
}

.invoice-notes {
  font-size: 12px;
  color: var(--paper-sub);
  font-style: italic;
  line-height: 1.45;
  white-space: pre-line;
}

/* ==========================================================================
   Chapter 2: Deep Forest Ink Infrastructure Band & Payment Rail Strip
   ========================================================================== */
.ink-callout-frame {
  border: 1.5px solid var(--ch-ink-border);
  border-radius: var(--radius-lg);
  padding: clamp(18px, 2.5vw, 26px) clamp(20px, 3vw, 32px);
  background: rgb(247 240 230 / 0.04);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  flex-wrap: wrap;
  margin-bottom: clamp(32px, 4.5vw, 52px);
}

.ink-callout-quote {
  font-family: var(--font-display);
  font-size: clamp(1.15rem, 1rem + 0.65vw, 1.5rem);
  font-weight: 600;
  color: var(--ch-ink-text);
  line-height: 1.3;
  max-width: 54ch;
}

.ink-infra-grid {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: clamp(28px, 4vw, 56px);
  align-items: start;
}

.ink-left-col {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 18px;
}

.ink-lead {
  font-size: 1.04rem;
  line-height: 1.6;
  color: var(--ch-ink-muted);
  max-width: 48ch;
}

.ink-pillars-stack {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.ink-pillar-card {
  background: var(--ch-ink-raised);
  border: 1.5px solid var(--ch-ink-border);
  border-radius: var(--radius-lg);
  padding: 20px 22px;
  display: grid;
  grid-template-columns: 40px 1fr;
  gap: 14px;
  align-items: start;
}

.ink-pillar-num {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-pill);
  background: var(--ch-lime);
  color: var(--ch-on-lime);
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 800;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.ink-pillar-title {
  font-family: var(--font-display);
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--ch-ink-text);
  margin-bottom: 4px;
}

.ink-pillar-desc {
  font-size: 13.5px;
  line-height: 1.5;
  color: var(--ch-ink-muted);
}

.rail-strip {
  margin-top: clamp(32px, 4vw, 48px);
  padding-top: 24px;
  border-top: 1.5px solid var(--ch-ink-border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.rail-strip-label {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--ch-ink-muted);
}

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

.rail-pill {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 6px 14px;
  border-radius: var(--radius-pill);
  border: 1.5px solid var(--ch-ink-border);
  background: rgb(247 240 230 / 0.06);
  color: var(--ch-ink-text);
  font-size: 12px;
  font-weight: 700;
}

.rail-pill-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--ch-lime);
}

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

/* ==========================================================================
   Chapter 3: Warm Oatmeal Smart Client Memory Section & Hard-Shadow Card Grid
   ========================================================================== */
.section-head-split {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 24px;
  align-items: end;
  margin-bottom: 32px;
}

.section-head-left {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 12px;
}

.section-head-right {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 10px;
}

@media (max-width: 840px) {
  .section-head-split {
    grid-template-columns: 1fr;
  }
}

.clients-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(290px, 1fr));
  gap: 16px;
}

.client-row {
  width: 100%;
  background: var(--bg-surface);
  border: var(--border-width) solid var(--border-subtle);
  box-shadow: var(--shadow-card);
  border-radius: var(--radius-lg);
  padding: 16px 18px;
  display: flex;
  align-items: center;
  gap: 14px;
  cursor: pointer;
  text-align: left;
  transition: transform 140ms var(--ease), box-shadow 140ms var(--ease), background-color 140ms var(--ease);
}

.client-row:hover {
  background: var(--bg-surface-elevated);
  transform: translate(-2px, -2px);
  box-shadow: var(--shadow-card-hover);
}

.client-row:active {
  transform: translate(2px, 2px);
  box-shadow: var(--shadow-sm);
}

.client-avatar {
  width: 42px;
  height: 42px;
  border-radius: var(--radius-pill);
  background: var(--ch-lime);
  border: var(--border-width) solid var(--border-subtle);
  color: var(--ch-on-lime);
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.client-info {
  flex: 1;
  min-width: 0;
}

.client-name {
  font-family: var(--font-display);
  font-size: 15.5px;
  font-weight: 700;
  color: var(--text-primary);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.client-contact {
  font-size: 12px;
  color: var(--text-tertiary);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  margin-top: 2px;
}

.client-meta {
  text-align: right;
  flex-shrink: 0;
}

.client-rate {
  font-size: 13px;
  font-weight: 800;
  color: var(--text-primary);
}

.client-invoices {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-tertiary);
  margin-top: 2px;
}

.clients-empty {
  grid-column: 1 / -1;
  font-size: 13.5px;
  color: var(--text-secondary);
  padding: 28px 20px;
  text-align: center;
  background: var(--bg-surface);
  border: var(--border-width) dashed var(--border-subtle);
  border-radius: var(--radius-lg);
}

/* ==========================================================================
   Chapter 4: Joined 4-Column Architectural Process Grid
   ========================================================================== */
.steps-joined-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  background: var(--bg-surface);
  border: var(--border-width) solid var(--border-subtle);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-card);
  overflow: hidden;
}

.step-cell {
  padding: 28px 24px;
  border-right: var(--border-width) solid var(--border-subtle);
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.step-cell:last-child {
  border-right: none;
}

.step-num-badge {
  width: 38px;
  height: 38px;
  border-radius: var(--radius-pill);
  background: var(--ch-lime);
  color: var(--ch-on-lime);
  border: var(--border-width) solid var(--border-subtle);
  box-shadow: 2px 2px 0 0 var(--shadow-ink);
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 800;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.step-title {
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 700;
  line-height: 1.15;
  color: var(--text-primary);
}

.step-desc {
  font-size: 13.5px;
  line-height: 1.55;
  color: var(--text-secondary);
}

@media (max-width: 960px) {
  .steps-joined-grid {
    grid-template-columns: 1fr 1fr;
  }
  .step-cell:nth-child(2) {
    border-right: none;
  }
  .step-cell:nth-child(1),
  .step-cell:nth-child(2) {
    border-bottom: var(--border-width) solid var(--border-subtle);
  }
}

@media (max-width: 580px) {
  .steps-joined-grid {
    grid-template-columns: 1fr;
  }
  .step-cell {
    border-right: none !important;
    border-bottom: var(--border-width) solid var(--border-subtle);
  }
  .step-cell:last-child {
    border-bottom: none;
  }
}

/* ==========================================================================
   Chapter 5: Transparent Membership Split Section
   ========================================================================== */
.pricing-split-grid {
  display: grid;
  grid-template-columns: 0.92fr 1.28fr;
  gap: clamp(28px, 4vw, 48px);
  align-items: start;
}

.pricing-pitch-col {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 16px;
}

.pricing-guarantee-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 6px;
}

.pricing-guarantee-list li {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 14px;
  font-weight: 600;
  color: var(--text-primary);
}

.guarantee-check {
  width: 24px;
  height: 24px;
  border-radius: var(--radius-pill);
  background: var(--ch-lime);
  border: 1.5px solid var(--border-subtle);
  color: var(--ch-on-lime);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.pricing-cards-pair {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

@media (max-width: 1024px) {
  .pricing-split-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 680px) {
  .pricing-cards-pair {
    grid-template-columns: 1fr;
  }
}

/* ==========================================================================
   Chapter 6: Full-Bleed Electric Lime CTA Banner
   ========================================================================== */
.lime-cta-grid {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
  flex-wrap: wrap;
}

.lime-cta-copy {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 14px;
  max-width: 640px;
}

/* ==========================================================================
   Chapter 7: Deep Forest Ink Editorial Footer
   ========================================================================== */
.site-footer {
  padding-block: clamp(48px, 6vw, 76px) 36px;
}

.site-footer-grid {
  display: grid;
  grid-template-columns: 1.35fr 2.15fr;
  gap: clamp(32px, 5vw, 64px);
  padding-bottom: 36px;
  border-bottom: 1.5px solid var(--ch-ink-border);
}

.footer-brand-col {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 16px;
}

.footer-logo-text {
  font-family: var(--font-display);
  font-size: 1.45rem;
  font-weight: 700;
  color: var(--ch-ink-text);
  letter-spacing: -0.025em;
}

.footer-logo-text span {
  font-style: italic;
  color: var(--ch-lime);
}

.footer-summary {
  font-size: 14px;
  line-height: 1.6;
  color: var(--ch-ink-muted);
  max-width: 40ch;
}

.footer-tags-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.footer-tag {
  font-family: var(--font-mono);
  font-size: 11px;
  padding: 4px 10px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--ch-ink-border);
  color: var(--ch-ink-muted);
}

.footer-nav-cols {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.footer-col-heading {
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--ch-lime);
  margin-bottom: 14px;
}

.footer-link-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.footer-link-list a,
.footer-link-btn {
  background: none;
  border: none;
  padding: 0;
  font-family: inherit;
  color: var(--ch-ink-text);
  text-decoration: none;
  font-size: 13.5px;
  font-weight: 500;
  cursor: pointer;
  text-align: left;
}

.footer-link-list a:hover,
.footer-link-btn:hover {
  color: var(--ch-lime);
  text-decoration: underline;
}

.footer-bottom-row {
  padding-top: 22px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  font-size: 12px;
  color: var(--ch-ink-muted);
}

@media (max-width: 860px) {
  .site-footer-grid {
    grid-template-columns: 1fr;
  }
  .footer-nav-cols {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 520px) {
  .footer-nav-cols {
    grid-template-columns: 1fr;
  }
}

/* ==========================================================================
   Modals & Forms (Architectural Hard-Shadow Overlays)
   ========================================================================== */
.modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: var(--scrim-bg);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  z-index: 100;
  align-items: center;
  justify-content: center;
  padding: 16px;
}

.modal-overlay.active {
  display: flex;
}

.modal-dialog {
  background: var(--bg-surface);
  border: var(--border-width) solid var(--border-subtle);
  border-radius: var(--radius-xl);
  max-width: 480px;
  width: 100%;
  max-height: 92vh;
  overflow-y: auto;
  padding: 26px;
  box-shadow: var(--shadow-modal);
  position: relative;
}

.logo-upload-row {
  display: flex;
  align-items: center;
  gap: 12px;
}

.logo-preview-tile {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-sm);
  background: var(--bg-surface-subtle);
  border: var(--border-width) solid var(--border-subtle);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  flex-shrink: 0;
  font-family: var(--font-mono);
  font-size: 14px;
  font-weight: 800;
  color: var(--text-primary);
}

.logo-preview-tile img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: var(--logo-plate-bg);
  padding: 3px;
}

.logo-upload-controls {
  flex: 1;
  min-width: 0;
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
  gap: 12px;
}

.modal-title {
  font-family: var(--font-display);
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: -0.02em;
}

.close-btn {
  background: var(--bg-surface-elevated);
  border: var(--border-width) solid var(--border-subtle);
  box-shadow: 2px 2px 0 0 var(--shadow-ink);
  color: var(--text-primary);
  cursor: pointer;
  width: 34px;
  height: 34px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-pill);
  flex-shrink: 0;
  transition: transform 120ms var(--ease), box-shadow 120ms var(--ease), background-color 120ms var(--ease);
}

.close-btn:hover {
  background: var(--bg-surface-hover);
  transform: translate(1px, 1px);
  box-shadow: 1px 1px 0 0 var(--shadow-ink);
}

.modal-recipient-sub {
  font-size: 13px;
  color: var(--text-secondary);
  margin-bottom: 14px;
}

.modal-recipient-sub strong {
  color: var(--text-primary);
  font-family: var(--font-mono);
}

.modal-btn-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 16px;
}

/* Form Inputs */
.form-group {
  margin-bottom: 14px;
}

.form-label {
  display: block;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-secondary);
  margin-bottom: 6px;
}

.form-input {
  width: 100%;
  background: var(--bg-surface-elevated);
  border: var(--border-width) solid var(--border-input);
  border-radius: var(--radius-sm);
  padding: 10px 13px;
  color: var(--text-primary);
  font-family: inherit;
  font-size: 13.5px;
  transition: border-color 120ms var(--ease), box-shadow 120ms var(--ease);
}

.form-input:focus,
.form-input:focus-visible {
  outline: none;
  border-color: var(--focus-outline);
  box-shadow: var(--focus-ring-shadow);
}

.field-hint {
  font-size: 11.5px;
  color: var(--text-tertiary);
  margin-top: 5px;
  display: block;
  line-height: 1.45;
}

/* Primary Electric Lime Pill Button */
.btn-primary {
  background: var(--accent-contrast);
  color: var(--accent-contrast-text);
  border: var(--border-width) solid var(--border-subtle);
  box-shadow: var(--shadow-btn);
  font-size: 12.5px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 11px 20px;
  min-height: 44px;
  border-radius: var(--radius-pill);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  cursor: pointer;
  text-decoration: none;
  transition: transform 120ms var(--ease), box-shadow 120ms var(--ease), background-color 120ms var(--ease), opacity 0.15s ease;
}

.btn-primary:hover:not(:disabled) {
  background: var(--accent-contrast-hover);
  transform: translate(2px, 2px);
  box-shadow: var(--shadow-btn-hover);
}

.btn-primary:active:not(:disabled) {
  background: var(--accent-contrast-pressed);
  transform: translate(3px, 3px);
  box-shadow: var(--shadow-btn-active);
}

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

/* Membership Pricing Cards (Used in Section & Modal) */
.modal-dialog.modal-pricing {
  max-width: 680px;
}

.pricing-modal-sub {
  font-size: 12.5px;
  color: var(--text-tertiary);
  margin-top: 3px;
}

.pricing-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
  margin-top: 8px;
}

.plan-card {
  background: var(--bg-surface);
  border: var(--border-width) solid var(--border-subtle);
  box-shadow: var(--shadow-card);
  border-radius: var(--radius-lg);
  padding: 22px 20px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transition: transform 140ms var(--ease), box-shadow 140ms var(--ease);
}

.plan-card.featured {
  background: var(--bg-surface-elevated);
}

.plan-card.active-plan {
  outline: 3px solid var(--focus-outline);
  outline-offset: 2px;
}

.plan-tier-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
}

.plan-tier-label {
  font-family: var(--font-mono);
  font-size: 10.5px;
  font-weight: 800;
  letter-spacing: 0.08em;
  color: var(--text-tertiary);
}

.plan-badge {
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.06em;
  padding: 3px 10px;
  border-radius: var(--radius-pill);
  background: var(--ch-terracotta);
  color: var(--ch-on-terracotta);
  border: 1.5px solid var(--border-subtle);
}

.pro-title {
  font-family: var(--font-display);
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--text-primary);
}

.pro-price {
  font-family: var(--font-display);
  font-size: 2.1rem;
  font-weight: 700;
  letter-spacing: -0.03em;
  font-variant-numeric: tabular-nums;
  color: var(--text-primary);
  margin: 6px 0;
  line-height: 1;
}

.pro-cadence {
  font-family: var(--font-sans);
  font-size: 13px;
  font-weight: 600;
  color: var(--text-tertiary);
}

.pro-sub {
  font-size: 12.5px;
  color: var(--text-secondary);
  line-height: 1.45;
  margin-bottom: 16px;
}

.pro-features {
  list-style: none;
  margin-bottom: 20px;
  display: flex;
  flex-direction: column;
  gap: 9px;
}

.pro-features li {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--text-secondary);
}

.pro-features li strong {
  color: var(--text-primary);
  font-weight: 700;
}

.pro-features svg {
  color: var(--status-online);
  flex-shrink: 0;
}

.plan-cta-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.plan-cta {
  min-height: 44px;
  text-decoration: none;
}

.plan-copy-link-btn {
  background: var(--bg-surface-subtle);
  border: 1.5px dashed var(--border-subtle);
  color: var(--text-secondary);
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 700;
  padding: 7px 10px;
  border-radius: var(--radius-pill);
  cursor: pointer;
  transition: background-color 120ms var(--ease), color 120ms var(--ease);
}

.plan-copy-link-btn:hover {
  color: var(--text-primary);
  background: var(--bg-surface-hover);
}

@media (max-width: 640px) {
  .pricing-grid {
    grid-template-columns: 1fr;
    gap: 14px;
  }
}

/* ==========================================================================
   Editorial 2-Column Mobile OTP Authentication Screen (login.html)
   ========================================================================== */
.auth-body {
  background-color: var(--bg-canvas);
  color: var(--text-primary);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.auth-main {
  flex: 1;
  display: flex;
  align-items: center;
  padding-block: clamp(32px, 5vw, 68px);
}

.auth-split-grid {
  display: grid;
  grid-template-columns: 1.08fr 0.92fr;
  gap: clamp(28px, 5vw, 64px);
  align-items: center;
}

.auth-pitch-col {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 18px;
}

.auth-benefit-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  width: 100%;
  margin-top: 6px;
}

.auth-benefit-item {
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--bg-surface);
  border: var(--border-width) solid var(--border-subtle);
  border-radius: var(--radius-sm);
  box-shadow: 3px 3px 0 0 var(--shadow-ink);
  padding: 12px 15px;
  font-size: 13.5px;
  font-weight: 600;
  color: var(--text-primary);
}

.auth-wrapper {
  max-width: 440px;
  width: 100%;
  justify-self: end;
}

@media (max-width: 900px) {
  .auth-split-grid {
    grid-template-columns: 1fr;
  }
  .auth-wrapper {
    justify-self: center;
    max-width: 460px;
  }
}

.auth-card {
  background: var(--bg-surface);
  border: var(--border-width) solid var(--border-subtle);
  border-radius: var(--radius-xl);
  padding: 32px 28px;
  box-shadow: var(--shadow-modal);
}

.auth-brand {
  margin-bottom: 20px;
}

.auth-logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--text-primary);
}

.auth-logo-text {
  font-family: var(--font-display);
  font-size: 1.2rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.auth-logo-text span {
  font-style: italic;
}

.auth-header {
  margin-bottom: 20px;
}

.auth-title {
  font-family: var(--font-display);
  font-size: 1.65rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--text-primary);
  margin-bottom: 6px;
  line-height: 1.1;
}

.auth-subtitle {
  font-size: 13.5px;
  color: var(--text-secondary);
  line-height: 1.5;
}

.phone-input-group {
  display: flex;
  align-items: center;
  background: var(--bg-surface-elevated);
  border: var(--border-width) solid var(--border-subtle);
  border-radius: var(--radius-sm);
  overflow: hidden;
  transition: border-color 120ms var(--ease), box-shadow 120ms var(--ease);
}

.phone-input-group:focus-within {
  border-color: var(--focus-outline);
  box-shadow: var(--focus-ring-shadow);
}

.phone-prefix {
  padding: 11px 13px;
  font-family: var(--font-mono);
  font-size: 13.5px;
  font-weight: 800;
  color: var(--text-primary);
  background: var(--bg-surface-subtle);
  border-right: var(--border-width) solid var(--border-subtle);
}

.phone-input {
  border: none !important;
  box-shadow: none !important;
  background: transparent !important;
  padding: 11px 13px;
  font-family: var(--font-mono);
  font-size: 14.5px;
  font-weight: 600;
}

/* Focus outline handled by .phone-input-group:focus-within */
.phone-input:focus {
  outline: none;
}

.auth-submit-btn {
  width: 100%;
  margin-top: 14px;
}

.phone-highlight {
  font-family: var(--font-mono);
  color: var(--text-primary);
  font-weight: 700;
}

.btn-text-link {
  background: none;
  border: none;
  color: var(--status-link-text);
  font-size: 12.5px;
  font-weight: 800;
  cursor: pointer;
  text-decoration: underline;
  margin-left: 6px;
  border-radius: 4px;
}

/* 6-Digit OTP Box Grid */
.otp-inputs {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 8px;
  margin: 12px 0;
}

.otp-box {
  width: 100%;
  height: 50px;
  text-align: center;
  font-size: 20px;
  font-weight: 800;
  font-family: var(--font-mono);
  background: var(--bg-surface-elevated);
  border: var(--border-width) solid var(--border-subtle);
  box-shadow: 2px 2px 0 0 var(--shadow-ink);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  transition: border-color 120ms var(--ease), box-shadow 120ms var(--ease);
}

.otp-box:focus,
.otp-box:focus-visible {
  outline: none;
  border-color: var(--focus-outline);
  box-shadow: var(--focus-ring-shadow);
}

/* Dev OTP Banner */
.dev-otp-banner {
  background: var(--ch-lime);
  border: var(--border-width) solid var(--ch-on-lime);
  box-shadow: 3px 3px 0 0 var(--ch-on-lime);
  border-radius: var(--radius-sm);
  padding: 10px 14px;
  margin-bottom: 16px;
}

.dev-otp-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 4px;
}

.dev-otp-tag {
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--ch-on-lime);
}

.dev-otp-note {
  font-size: 11px;
  font-weight: 600;
  color: var(--ch-on-lime);
}

.dev-otp-btn {
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 0;
  width: 100%;
  text-align: left;
  border-radius: var(--radius-xs);
}

.dev-otp-code {
  font-family: var(--font-mono);
  font-size: 19px;
  font-weight: 800;
  letter-spacing: 4px;
  color: var(--ch-on-lime);
}

.auth-error-msg {
  font-size: 12px;
  font-weight: 700;
  color: var(--status-due);
  min-height: 18px;
  margin-top: 6px;
}

.auth-resend-row {
  text-align: center;
  font-size: 12px;
  color: var(--text-tertiary);
  margin-top: 16px;
}

.auth-footer {
  margin-top: 22px;
  padding-top: 16px;
  border-top: 1.5px solid var(--border-hairline);
  text-align: center;
}

.auth-back-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12.5px;
  font-weight: 700;
  color: var(--text-secondary);
  text-decoration: none;
  border-radius: var(--radius-xs);
}

.auth-back-link:hover {
  color: var(--text-primary);
  text-decoration: underline;
}

/* ==========================================================================
   Comprehensive Mobile Ergonomics & Reduced Motion
   ========================================================================== */
@media (max-width: 768px) {
  .prompt-textarea,
  .form-input,
  .phone-input,
  select {
    font-size: 16px !important;
  }

  .hero-spec-stack {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .app-header {
    min-height: 68px;
    padding-inline: 12px;
  }

  .header-actions {
    gap: 6px;
  }

  .logo-text {
    font-size: 1.1rem;
  }

  .brand-mark-box {
    width: 32px;
    height: 32px;
  }

  .usage-pill {
    padding: 5px 10px;
    font-size: 10.5px;
    max-width: 122px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .user-auth-pill {
    padding: 5px 10px;
    font-size: 11px;
  }

  .user-phone-num {
    display: none;
  }

  .auth-logout-btn {
    padding-left: 0;
    border-left: none;
    margin-left: 0;
  }

  .panel-card {
    padding: 16px 14px;
  }

  .prompt-toolbar {
    flex-wrap: wrap;
  }

  .btn-subtle, .btn-compile {
    min-height: 42px;
  }

  .preset-text {
    font-size: 12px;
    white-space: normal;
    line-height: 1.4;
  }

  /* Action Bar on Mobile */
  .action-bar {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    padding: 10px;
  }

  .action-bar .action-group {
    display: contents;
  }

  .btn-action {
    width: 100%;
    min-height: 44px;
    justify-content: center;
    font-size: 12.5px;
    padding: 0 10px;
  }

  .btn-action.action-sms,
  .btn-action.action-primary {
    grid-column: 1 / -1;
    min-height: 46px;
  }

  /* Invoice Paper on Mobile */
  .invoice-paper {
    padding: 20px 14px;
  }

  .invoice-header-row {
    flex-direction: column;
    gap: 12px;
  }

  .inv-meta-block {
    text-align: left;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4px 12px;
    width: 100%;
    padding-top: 10px;
    border-top: 1.5px dashed var(--paper-hairline);
  }

  .inv-title {
    grid-column: 1 / -1;
  }

  .inv-billed-row {
    flex-direction: column;
    gap: 8px;
  }

  .items-table {
    min-width: 440px;
  }

  .totals-row {
    justify-content: stretch;
  }

  .totals-card {
    width: 100%;
  }

  /* Bottom-Sheet Ergonomics for Modals */
  .modal-overlay {
    align-items: flex-end;
    padding: 0;
  }

  .modal-dialog {
    width: 100%;
    max-width: 100%;
    margin: 0;
    border-bottom-left-radius: 0;
    border-bottom-right-radius: 0;
    border-left: none;
    border-right: none;
    border-bottom: none;
    padding: 22px 16px max(24px, env(safe-area-inset-bottom));
    max-height: 86vh;
    box-shadow: var(--shadow-sheet);
  }

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

@media (max-width: 440px) {
  .auth-card {
    padding: 24px 16px;
  }

  .otp-inputs {
    gap: 5px;
  }

  .otp-box {
    height: 44px;
    font-size: 18px;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* ==========================================================================
   Milestone 3: Language Picker, 4-Step Process Animation,
   Grouped Invoices Dashboard & Subscriptions Usage Meter
   Styled with Warm Editorial Neo-Brutalism & Pure Semantic Tokens
   ========================================================================== */

/* 1. Language Picker in .app-header */
.lang-picker-wrap {
  display: inline-flex;
  align-items: center;
  position: relative;
}

.lang-select {
  appearance: none;
  -webkit-appearance: none;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: 6px 24px 6px 10px;
  border: 2px solid var(--border);
  border-radius: var(--radius-pill);
  cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg width='10' height='6' viewBox='0 0 10 6' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M1 1L5 5L9 1' stroke='%231D2B1F' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 8px center;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.lang-select:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 2px;
}

/* 2. Decluttered Hero & 4-Step Animated Process Strip */
.hero-intro-decluttered {
  margin-bottom: 24px;
}

.hero-intro-decluttered .hero-copy-col {
  max-width: 820px;
}

.hero-intro-decluttered .ch-display {
  font-size: clamp(2.25rem, 1.8rem + 2.5vw, 3.75rem);
  line-height: 1.05;
  letter-spacing: -0.025em;
  margin: 12px 0 10px 0;
}

.hero-intro-decluttered .ch-lead {
  font-size: clamp(1rem, 0.95rem + 0.3vw, 1.15rem);
  line-height: 1.5;
  color: var(--muted);
  margin-bottom: 20px;
}

.process-loop-strip {
  margin-bottom: 36px;
  width: 100%;
}

.process-loop-track {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
}

.process-step-pill {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  background: var(--bg);
  border: 2px solid var(--border);
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-hard-sm);
  cursor: pointer;
  transition: transform 0.2s cubic-bezier(0.2, 0.8, 0.2, 1), box-shadow 0.2s cubic-bezier(0.2, 0.8, 0.2, 1), background-color 0.25s ease;
  user-select: none;
}

.process-step-pill:hover {
  transform: translate(-1px, -1px);
  box-shadow: var(--shadow-hard);
}

.process-step-pill.active {
  background: var(--primary);
  color: var(--on-primary);
  border-color: var(--border);
  box-shadow: var(--shadow-hard);
  transform: translate(-2px, -2px);
}

.process-step-pill .step-num {
  width: 28px;
  height: 28px;
  border-radius: var(--radius-pill);
  border: 2px solid var(--border);
  background: var(--surface);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  font-weight: 800;
  flex-shrink: 0;
}

.process-step-pill.active .step-num {
  background: var(--bg);
  color: var(--text);
}

.process-step-pill .step-body {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.process-step-pill .step-title {
  font-family: var(--font-sans);
  font-size: 0.85rem;
  font-weight: 800;
  letter-spacing: -0.01em;
  white-space: nowrap;
}

.process-step-pill .step-detail {
  font-size: 0.72rem;
  opacity: 0.85;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-top: 2px;
}

@media (max-width: 900px) {
  .process-loop-track {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 540px) {
  .process-loop-track {
    grid-template-columns: 1fr;
  }
}

/* 3. Invoices Dashboard & Ledger Table */
.dashboard-page, .subscriptions-page {
  background: var(--bg-canvas);
  min-height: 100vh;
}

.dashboard-shell, .subscriptions-shell {
  padding-top: 40px;
  padding-bottom: 80px;
}

.dashboard-header-row {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 20px;
  margin-bottom: 28px;
}

.dashboard-heading {
  margin: 8px 0 0 0;
}

.dashboard-actions-group {
  display: flex;
  align-items: center;
  gap: 12px;
}

.dashboard-export-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

/* 5 Summary Cards Grid */
.summary-cards-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 12px;
  margin-bottom: 24px;
}

.summary-card {
  display: block;
  text-decoration: none;
  background: var(--bg);
  border: 2px solid var(--border);
  border-radius: var(--radius-card);
  padding: 16px 18px;
  box-shadow: var(--shadow-hard-sm);
  color: var(--text);
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}

.summary-card:hover {
  transform: translate(-1px, -1px);
  box-shadow: var(--shadow-hard);
}

.summary-card.active {
  background: var(--surface);
  box-shadow: var(--shadow-hard);
  transform: translate(-2px, -2px);
  border-width: var(--border-width-thick);
}

.summary-card-paid.active {
  background: var(--surface);
  border-color: var(--border);
}

.summary-card-kicker {
  font-family: var(--font-sans);
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
  margin-bottom: 6px;
}

.summary-card-sum {
  font-family: var(--font-mono);
  font-size: 1.35rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
  margin-bottom: 4px;
}

.summary-card-count {
  font-size: 0.8rem;
  color: var(--muted);
}

@media (max-width: 960px) {
  .summary-cards-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (max-width: 600px) {
  .summary-cards-grid {
    grid-template-columns: 1fr 1fr;
  }
}

/* Ledger Toolbar */
.ledger-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 16px;
}

.ledger-search-box {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--bg);
  border: 2px solid var(--border);
  border-radius: var(--radius-pill);
  padding: 8px 16px;
  min-width: 280px;
  max-width: 440px;
  flex: 1;
}

.ledger-search-input {
  border: none;
  background: transparent;
  color: var(--text);
  font-family: var(--font-sans);
  font-size: 0.88rem;
  width: 100%;
  outline: none;
}

.ledger-search-input::placeholder {
  color: var(--muted);
  opacity: 0.7;
}

.ledger-status-summary {
  font-size: 0.85rem;
  color: var(--muted);
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
}

/* Ledger Table */
.ledger-card {
  padding: 0;
  overflow: hidden;
}

.ledger-table-wrap {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.ledger-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
}

.ledger-table thead th {
  background: var(--surface);
  padding: 14px 16px;
  font-family: var(--font-sans);
  font-size: 0.72rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text);
  border-bottom: 2px solid var(--border);
  white-space: nowrap;
}

.ledger-table tbody td {
  padding: 14px 16px;
  border-bottom: 1px solid var(--border-hairline);
  font-size: 0.88rem;
  vertical-align: middle;
}

.ledger-table tbody tr:last-child td {
  border-bottom: none;
}

.ledger-row:hover td {
  background: var(--surface);
}

.cell-total {
  font-family: var(--font-mono);
  font-size: 1.05rem;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
}

.cell-currency {
  font-size: 0.75rem;
  color: var(--muted);
  margin-left: 4px;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  border-radius: var(--radius-pill);
  font-family: var(--font-sans);
  font-size: 0.72rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  border: 1.5px solid var(--border);
}

.status-pill-paid {
  background: var(--primary);
  color: var(--on-primary);
}

.status-pill-draft {
  background: var(--surface);
  color: var(--text);
}

.status-pill-open {
  background: var(--bg);
  color: var(--text);
}

.status-pill-pastdue {
  background: var(--accent);
  color: var(--on-accent);
}

.cell-remaining {
  font-family: var(--font-mono);
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.cell-remaining.paid {
  color: var(--muted);
  opacity: 0.7;
}

.invoice-num-link {
  font-family: var(--font-mono);
  font-weight: 700;
  color: var(--text);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.customer-name {
  font-weight: 700;
}

.customer-meta {
  font-size: 0.78rem;
  color: var(--muted);
  margin-top: 2px;
}

.cell-due {
  font-size: 0.85rem;
  font-family: var(--font-mono);
}

.past-due-text {
  color: var(--accent);
  font-weight: 700;
}

.cell-created {
  font-size: 0.85rem;
  font-family: var(--font-mono);
  color: var(--muted);
}

.row-actions-group {
  display: flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
}

.action-btn-subtle {
  display: inline-flex;
  align-items: center;
  padding: 5px 11px;
  font-family: var(--font-sans);
  font-size: 0.76rem;
  font-weight: 700;
  line-height: 1.2;
  text-decoration: none;
  background: var(--bg);
  color: var(--text);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-pill);
  cursor: pointer;
  transition: transform 0.1s ease, background 0.1s ease;
}

.action-btn-subtle:hover {
  background: var(--surface);
  transform: translate(-1px, -1px);
}

.action-btn-mark-paid {
  display: inline-flex;
  align-items: center;
  padding: 5px 11px;
  font-family: var(--font-sans);
  font-size: 0.76rem;
  font-weight: 800;
  line-height: 1.2;
  text-decoration: none;
  background: var(--primary);
  color: var(--on-primary);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-pill);
  cursor: pointer;
  transition: transform 0.1s ease, background 0.1s ease;
}

.action-btn-mark-paid:hover {
  transform: translate(-1px, -1px);
}

.empty-cell {
  text-align: center;
  padding: 48px 16px !important;
}

.empty-state-title {
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--muted);
}

/* 4. Subscriptions Page & Usage Meter */
.active-plan-card {
  padding: 28px;
  margin-bottom: 40px;
}

.active-plan-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
  margin-bottom: 24px;
  padding-bottom: 20px;
  border-bottom: 2px solid var(--border);
}

.active-plan-info {
  display: flex;
  align-items: center;
  gap: 12px;
}

.active-plan-tier-badge {
  font-family: var(--font-display);
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--text);
}

.active-plan-status-pill {
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  background: var(--primary);
  color: var(--on-primary);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-pill);
  font-family: var(--font-sans);
  font-size: 0.72rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.active-plan-reset-meta {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  color: var(--muted);
}

.usage-meter-label-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 12px;
}

.usage-meter-title {
  font-family: var(--font-sans);
  font-size: 0.75rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
}

.usage-meter-count {
  font-family: var(--font-mono);
  font-size: 0.95rem;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  color: var(--text);
}

.usage-meter-track {
  width: 100%;
  height: 16px;
  background: var(--surface);
  border: 2px solid var(--border);
  border-radius: var(--radius-pill);
  overflow: hidden;
  position: relative;
  margin-bottom: 10px;
}

.usage-meter-fill {
  height: 100%;
  background: var(--primary);
  border-radius: var(--radius-pill);
  transition: width 0.3s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.usage-meter-fill.unlimited {
  background: repeating-linear-gradient(
    45deg,
    var(--primary),
    var(--primary) 10px,
    var(--bg) 10px,
    var(--bg) 20px
  );
}

.usage-meter-footer {
  font-size: 0.82rem;
  color: var(--muted);
}

/* Plan Comparison Grid */
.plan-compare-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  margin-bottom: 40px;
}

.plan-card {
  padding: 28px;
  display: flex;
  flex-direction: column;
}

.plan-card.current-plan {
  background: var(--surface);
  border-width: var(--border-width-thick);
}

.plan-card-header {
  margin-bottom: 16px;
}

.plan-title {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 700;
  margin: 8px 0 6px 0;
}

.plan-price-lockup {
  display: flex;
  align-items: baseline;
  gap: 4px;
}

.plan-price-num {
  font-family: var(--font-mono);
  font-size: 2.2rem;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
}

.plan-price-cycle {
  font-size: 0.85rem;
  color: var(--muted);
}

.plan-desc {
  font-size: 0.88rem;
  color: var(--muted);
  margin-bottom: 20px;
  min-height: 40px;
}

.plan-features-list {
  list-style: none;
  padding: 0;
  margin: 0 0 28px 0;
  flex: 1;
}

.plan-features-list li {
  position: relative;
  padding-left: 20px;
  font-size: 0.86rem;
  margin-bottom: 10px;
  color: var(--text);
}

.plan-features-list li::before {
  content: "✓";
  position: absolute;
  left: 0;
  font-weight: 800;
  color: var(--text);
}

.plan-card-footer {
  margin-top: auto;
}

.current-plan-indicator {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 12px;
  background: var(--bg);
  border: 2px solid var(--border);
  border-radius: var(--radius-pill);
  font-family: var(--font-sans);
  font-size: 0.8rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text);
}

/* Quick Links Card */
.sub-quick-links-card {
  padding: 24px 28px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 20px;
}

.sub-quick-links-card .quick-links-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

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

/* Per-Provider Payment Method Toggles, Business Wire Grid & Invoice Extras */
.pm-config-section {
  margin-top: 12px;
  padding-top: 10px;
  border-top: 1px dashed var(--border-subtle);
}

.pm-config-subtitle {
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-tertiary);
  margin-bottom: 8px;
}

.pm-config-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.pm-config-item {
  background: var(--bg-surface);
  border: 1.5px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: 8px 10px;
  transition: opacity 140ms var(--ease), background-color 140ms var(--ease);
}

.pm-config-item.is-disabled {
  background: var(--bg-surface-subtle);
}

.pm-config-item.is-disabled .pm-config-body {
  opacity: 0.58;
}

.pm-config-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 6px;
}

.pm-toggle-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  min-height: 28px;
  border-radius: var(--radius-pill);
  border: 1.5px solid var(--border-subtle);
  background: var(--bg-surface-subtle);
  color: var(--text-secondary);
  font-family: var(--font-sans);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.03em;
  cursor: pointer;
  transition: background-color 120ms var(--ease), color 120ms var(--ease), transform 120ms var(--ease);
}

.pm-toggle-btn .pm-toggle-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--text-tertiary);
}

.pm-toggle-btn.is-on {
  background: var(--ch-lime);
  color: var(--ch-on-lime);
}

.pm-toggle-btn.is-on .pm-toggle-dot {
  background: var(--ch-on-lime);
}

.pm-provider-input {
  padding: 7px 10px;
  font-size: 12.5px;
}

.pm-wire-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
}

.pm-wire-span-2 {
  grid-column: 1 / -1;
}

.workspace-extras-card {
  margin-top: 12px;
}

.extras-grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-top: 8px;
}

.extras-grid-4 {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr 0.9fr 1fr;
  gap: 8px;
  margin-top: 8px;
}

.extras-field {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.extras-mini-label {
  font-size: 10.5px;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--text-secondary);
}

.extras-input {
  padding: 7px 9px;
  font-size: 12.5px;
}

.extras-textarea {
  padding: 8px 10px;
  font-size: 12.5px;
  line-height: 1.4;
  resize: vertical;
}

/* Quick Provider Pills & Collapsible Drawer in Studio */
.pm-quick-pills-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 8px;
}

.pm-quick-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 9px;
  min-height: 26px;
  border-radius: var(--radius-pill);
  border: 1.5px solid var(--border-subtle);
  background: var(--bg-surface-subtle);
  color: var(--text-tertiary);
  font-family: var(--font-sans);
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
  transition: background-color 120ms var(--ease), color 120ms var(--ease);
}

.pm-quick-pill .pm-quick-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--text-tertiary);
}

.pm-quick-pill.is-on {
  background: var(--ch-lime);
  color: var(--ch-on-lime);
  border-color: var(--border-subtle);
}

.pm-quick-pill.is-on .pm-quick-dot {
  background: var(--ch-on-lime);
}

.pm-manage-drawer {
  border: 1.5px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  background: var(--bg-surface-subtle);
  padding: 6px 10px;
}

.pm-manage-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  cursor: pointer;
  list-style: none;
  font-size: 11.5px;
  font-weight: 800;
  color: var(--text-primary);
  padding: 4px 2px;
}

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

.pm-manage-drawer[open] .pm-config-list {
  margin-top: 8px;
}

.pm-manage-drawer[open] .pm-drawer-caret {
  transform: rotate(180deg);
}

/* Totals Breakdown Rows (Subtotal, Discount, Sales Tax, Deposit Paid) */
.totals-breakdown-rows {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding-bottom: 10px;
  margin-bottom: 10px;
  border-bottom: 1.5px dashed var(--border-subtle);
}

.totals-sub-line {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 13px;
  color: var(--text-secondary);
  font-variant-numeric: tabular-nums;
}

.totals-sub-line strong {
  color: var(--text-primary);
  font-family: var(--font-mono);
  font-weight: 700;
}

/* Onboarding Banner */
.onboarding-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
  padding: 16px 20px;
  margin-bottom: 20px;
  background: var(--bg-surface);
  border: var(--border-width) solid var(--border-subtle);
  border-radius: var(--radius-md);
  box-shadow: 4px 4px 0 0 var(--shadow-ink);
}

.onboarding-banner-copy {
  display: flex;
  flex-direction: column;
  gap: 4px;
  max-width: 680px;
}

.onboarding-banner-text {
  margin: 0;
  font-size: 13.5px;
  color: var(--text-secondary);
  line-height: 1.45;
}

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

/* Full Business Settings Workspace (/settings) */
.settings-cards-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 22px;
  align-items: start;
}

.settings-section-card {
  padding: 24px 26px;
}

.settings-card-head {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding-bottom: 14px;
  margin-bottom: 18px;
  border-bottom: 1.5px solid var(--border-subtle);
}

.settings-step-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 30px;
  height: 30px;
  border-radius: var(--radius-sm);
  background: var(--ch-lime);
  color: var(--ch-on-lime);
  border: 1.5px solid var(--border-subtle);
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 800;
  flex-shrink: 0;
}

.settings-card-title {
  font-family: var(--font-display);
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--text-primary);
  margin: 0 0 3px 0;
  line-height: 1.2;
}

.settings-card-sub {
  margin: 0;
  font-size: 12.5px;
  color: var(--text-tertiary);
  line-height: 1.4;
}

.settings-two-col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.settings-three-col {
  display: grid;
  grid-template-columns: 0.9fr 0.9fr 1.2fr;
  gap: 12px;
}

.settings-preview-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  background: var(--bg-surface-subtle);
  border: 1.5px dashed var(--border-subtle);
  font-size: 12.5px;
  color: var(--text-secondary);
}

.settings-preview-banner strong {
  font-family: var(--font-mono);
  font-weight: 800;
  color: var(--text-primary);
}

.settings-save-bar {
  margin-top: 24px;
  padding: 18px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
}

.settings-save-copy {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.settings-save-status {
  font-size: 12.5px;
  color: var(--text-tertiary);
}

.modal-fullpage-link {
  display: inline-block;
  margin-top: 2px;
  font-size: 12px;
  font-weight: 700;
  color: var(--status-link-text);
  text-decoration: underline;
}

/* Customers Directory & Smart Memory (/customers) */
.customers-kpi-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
  margin-bottom: 22px;
}

.customer-name-cell {
  display: flex;
  align-items: center;
  gap: 12px;
}

.customer-mini-avatar {
  width: 36px;
  height: 36px;
  font-size: 12px;
  flex-shrink: 0;
}

.client-memory-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin-top: 4px;
}

.memory-pill {
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  border-radius: var(--radius-pill);
  border: 1.5px solid var(--border-subtle);
  background: var(--bg-surface-subtle);
  color: var(--text-primary);
  font-family: var(--font-mono);
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.memory-pill.muted {
  color: var(--text-tertiary);
  border-style: dashed;
}

.customer-inv-memory {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
}

.customer-rate-notes {
  display: flex;
  flex-direction: column;
  gap: 3px;
  max-width: 220px;
}

.customer-rate-strong {
  font-family: var(--font-mono);
  font-size: 12.5px;
  font-weight: 700;
  color: var(--text-primary);
}

.customer-notes-snippet {
  font-size: 11.5px;
  color: var(--text-tertiary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 190px;
}

.customers-search-box {
  max-width: 540px;
}

.customers-search-box svg,
.ledger-search-box svg {
  flex-shrink: 0;
  color: var(--text-tertiary);
}

.customers-table thead th,
.customers-table tbody td {
  padding: 13px 12px;
}

.customers-table .num-col {
  text-align: right;
  white-space: nowrap;
}

.customers-table .actions-col,
.customers-table .td-actions {
  text-align: right;
  white-space: nowrap;
}

.customers-table .td-actions .row-actions-group {
  justify-content: flex-end;
}

.cell-amount {
  font-family: var(--font-mono);
  font-size: 0.98rem;
  font-weight: 800;
  color: var(--text-primary);
  font-variant-numeric: tabular-nums;
}

.cell-inv-num {
  font-family: var(--font-mono);
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--text-primary);
}

.btn-delete-customer:hover {
  background: var(--status-danger-bg);
  color: var(--status-danger-text);
  border-color: var(--status-danger-border);
}

#customerMemoryModal .modal-dialog {
  max-width: 560px;
}

/* Dashboard & Workspace Compact Dark Footer (.app-footer) */
.app-footer {
  margin-top: auto;
  border-top: var(--border-width) solid var(--border-subtle);
  border-bottom: none;
  padding: 20px 0;
}

.footer-bottom-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px 24px;
  padding-right: 68px;
}

.footer-copy {
  margin: 0;
  font-size: 0.84rem;
  color: var(--ch-ink-muted);
}

.footer-links {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px 18px;
}

.footer-links a {
  color: var(--ch-ink-text);
  text-decoration: none;
  font-size: 0.82rem;
  font-weight: 600;
  transition: color 120ms var(--ease);
}

.footer-links a:hover {
  color: var(--ch-lime);
  text-decoration: underline;
  text-underline-offset: 4px;
}

/* Legal & Carrier Compliance Pages (/privacy, /terms) */
.legal-shell {
  max-width: 900px;
}

.legal-doc-card {
  padding: clamp(24px, 4vw, 44px);
}

.legal-section + .legal-section {
  margin-top: 26px;
  padding-top: 24px;
  border-top: 1px solid var(--border-hairline);
}

.legal-section h2 {
  font-family: var(--font-display);
  font-size: 1.28rem;
  font-weight: 700;
  color: var(--text-primary);
  margin: 0 0 10px 0;
}

.legal-section p,
.legal-section li {
  font-size: 0.94rem;
  line-height: 1.65;
  color: var(--text-secondary);
}

.legal-section ul {
  margin: 10px 0 0 20px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.legal-section a {
  color: var(--text-primary);
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.legal-highlight-box {
  background: var(--bg-surface-subtle);
  border: 2px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 20px 22px !important;
}

.sms-consent-note {
  margin-top: 14px;
  font-size: 11.5px;
  line-height: 1.5;
  color: var(--text-tertiary);
}

.sms-consent-note a {
  color: var(--text-primary);
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 2px;
}

@media (max-width: 980px) {
  .settings-cards-grid {
    grid-template-columns: 1fr;
  }
  .customers-kpi-grid {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 640px) {
  .pm-wire-grid,
  .extras-grid-2,
  .extras-grid-4,
  .settings-two-col,
  .settings-three-col,
  .customers-kpi-grid {
    grid-template-columns: 1fr;
  }
}

/* ==========================================================================
   Milestone 5: Floating Customer Feedback Widget (Pure Semantic Tokens)
   Zero hardcoded hex colors; strictly WCAG AA compliant and responsive.
   ========================================================================== */

.feedback-trigger {
  position: fixed;
  bottom: var(--ds-space-24, 24px);
  right: var(--ds-space-24, 24px);
  z-index: 9999;
  width: var(--ds-size-target-touch, 44px);
  height: var(--ds-size-target-touch, 44px);
  min-width: 44px;
  min-height: 44px;
  border-radius: var(--ds-radius-full, 9999px);
  background: var(--ds-color-bg-action-primary, var(--ds-color-accent-light-9));
  color: var(--ds-color-neutral-light-12);
  border: var(--ds-border-width-default, 2px) solid var(--ds-color-neutral-light-12);
  box-shadow: var(--ds-elevation-floating, 4px 4px 0 0 var(--ds-color-neutral-light-12));
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: transform var(--ds-motion-duration-short, 150ms) ease, box-shadow var(--ds-motion-duration-short, 150ms) ease;
}

.feedback-trigger:hover {
  transform: translate(2px, 2px);
  box-shadow: var(--ds-elevation-button-pressed, 2px 2px 0 0 var(--ds-color-neutral-light-12));
  background: var(--ds-color-bg-action-primary-hover, var(--ds-color-accent-light-10));
}

.feedback-trigger:focus-visible {
  outline: var(--ds-focus-ring-width, 3px) solid var(--ds-color-border-focus, var(--ds-color-accent-light-11));
  outline-offset: var(--ds-focus-ring-offset, 3px);
}

.feedback-trigger .feedback-icon {
  width: 22px;
  height: 22px;
  color: var(--ds-color-neutral-light-12);
  pointer-events: none;
}

.feedback-popover {
  position: fixed;
  bottom: calc(var(--ds-space-24, 24px) + 54px);
  right: var(--ds-space-24, 24px);
  z-index: 10000;
  width: min(380px, calc(100vw - 32px));
  background: var(--ds-color-surface-raised, var(--ds-color-white));
  color: var(--ds-color-text-primary, var(--ds-color-neutral-light-12));
  border: var(--ds-border-width-default, 2px) solid var(--ds-color-neutral-light-12);
  border-radius: var(--ds-radius-container, 14px);
  box-shadow: var(--ds-elevation-overlay, 6px 6px 0 0 var(--ds-color-neutral-light-12));
  padding: var(--ds-space-20, 20px);
  box-sizing: border-box;
}

.feedback-popover[hidden] {
  display: none !important;
}

.feedback-popover-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}

.feedback-header-copy {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.feedback-eyebrow {
  font-family: var(--font-sans, var(--ds-font-family-text));
  font-size: 0.6875rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ds-color-text-tertiary, var(--ds-color-neutral-light-10));
}

.feedback-title {
  font-family: var(--font-display, var(--ds-font-family-display));
  font-size: 1.05rem;
  font-weight: 700;
  line-height: 1.3;
  color: var(--ds-color-text-primary, var(--ds-color-neutral-light-12));
  margin: 0;
}

.feedback-close-btn {
  background: transparent;
  border: none;
  cursor: pointer;
  color: var(--ds-color-text-tertiary, var(--ds-color-neutral-light-10));
  padding: 6px;
  border-radius: var(--ds-radius-detail, 6px);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: background var(--ds-motion-duration-short, 150ms) ease, color var(--ds-motion-duration-short, 150ms) ease;
}

.feedback-close-btn:hover {
  background: var(--ds-color-bg-neutral-subtle, var(--ds-color-neutral-light-3));
  color: var(--ds-color-text-primary, var(--ds-color-neutral-light-12));
}

.feedback-close-btn:focus-visible {
  outline: var(--ds-focus-ring-width, 3px) solid var(--ds-color-border-focus, var(--ds-color-accent-light-11));
  outline-offset: 2px;
}

.feedback-form {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.feedback-form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.feedback-label {
  font-family: var(--font-sans, var(--ds-font-family-text));
  font-size: 0.8125rem;
  font-weight: 700;
  color: var(--ds-color-text-secondary, var(--ds-color-neutral-light-11));
}

.feedback-required {
  color: var(--ds-color-text-danger, var(--ds-color-danger-light-11));
}

.feedback-optional {
  font-weight: 400;
  font-size: 0.75rem;
  color: var(--ds-color-text-tertiary, var(--ds-color-neutral-light-10));
}

.feedback-select,
.feedback-textarea,
.feedback-input {
  width: 100%;
  box-sizing: border-box;
  font-family: var(--font-sans, var(--ds-font-family-text));
  font-size: 0.875rem;
  padding: 9px 12px;
  background: var(--ds-color-bg-field, var(--ds-color-white));
  color: var(--ds-color-text-primary, var(--ds-color-neutral-light-12));
  border: var(--ds-border-width-default, 2px) solid var(--ds-color-border-input, var(--ds-color-neutral-light-6));
  border-radius: var(--ds-radius-control, 10px);
  outline: none;
  transition: border-color var(--ds-motion-duration-short, 150ms) ease, box-shadow var(--ds-motion-duration-short, 150ms) ease;
}

.feedback-select:focus,
.feedback-textarea:focus,
.feedback-input:focus {
  border-color: var(--ds-color-border-focus, var(--ds-color-accent-light-11));
  box-shadow: 0 0 0 1px var(--ds-color-border-focus, var(--ds-color-accent-light-11));
}

.feedback-textarea {
  resize: vertical;
  min-height: 80px;
  line-height: 1.45;
}

.feedback-footer {
  margin-top: 4px;
}

.feedback-submit-btn {
  width: 100%;
  min-height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-sans, var(--ds-font-family-text));
  font-size: 0.875rem;
  font-weight: 700;
  background: var(--ds-color-bg-action-primary, var(--ds-color-accent-light-9));
  color: var(--ds-color-neutral-light-12);
  border: var(--ds-border-width-default, 2px) solid var(--ds-color-neutral-light-12);
  border-radius: var(--ds-radius-control, 10px);
  box-shadow: 2px 2px 0 0 var(--ds-color-neutral-light-12);
  cursor: pointer;
  transition: transform var(--ds-motion-duration-short, 150ms) ease, box-shadow var(--ds-motion-duration-short, 150ms) ease, background var(--ds-motion-duration-short, 150ms) ease;
}

.feedback-submit-btn:hover:not(:disabled) {
  transform: translate(1px, 1px);
  box-shadow: 1px 1px 0 0 var(--ds-color-neutral-light-12);
  background: var(--ds-color-bg-action-primary-hover, var(--ds-color-accent-light-10));
}

.feedback-submit-btn:focus-visible {
  outline: var(--ds-focus-ring-width, 3px) solid var(--ds-color-border-focus, var(--ds-color-accent-light-11));
  outline-offset: 2px;
}

.feedback-submit-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

.feedback-status {
  min-height: 20px;
  font-family: var(--font-sans, var(--ds-font-family-text));
  font-size: 0.8125rem;
  font-weight: 600;
  text-align: center;
  line-height: 1.4;
  margin-top: 4px;
}

.feedback-status.is-success {
  color: var(--ds-color-text-success, var(--ds-color-success-light-11));
}

.feedback-status.is-error {
  color: var(--ds-color-text-danger, var(--ds-color-danger-light-11));
}


