:root {
  color-scheme: light dark;
  --bg-desk: #f6f5f1;
  --bg-preview: #ebe9e3;
  --bg-surface: #ffffff;
  --bg-subtle: #faf9f6;
  --bg-hover: #f1efe9;
  --border: #e4e1d8;
  --border-strong: #cfc9bc;
  --ink-primary: #161614;
  --ink-secondary: #5c5a54;
  --ink-muted: #8b887f;
  --cta-bg: #0f4c45;
  --cta-hover: #135d55;
  --cta-text: #ffffff;
  --accent-soft: #e6f2f0;
  --accent-ink: #0f4c45;
  --warn-bg: #fef3c7;
  --warn-ink: #92400e;
  --paid-bg: #dcfce7;
  --paid-ink: #166534;
  --topbar-bg: rgba(255, 255, 255, 0.90);
  --rba-bg: #161614;
  --rba-fg: #f5f4ef;
  --rba-accent: #5eead4;
  --ledger-shadow: rgba(22, 22, 20, 0.9);
  --shadow-sm: 0 1px 2px rgba(22, 22, 20, 0.05), 0 0 0 1px rgba(22, 22, 20, 0.04);
  --shadow-md: 0 18px 42px rgba(22, 22, 20, 0.10), 0 2px 6px rgba(22, 22, 20, 0.05);
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg-desk: #121210;
    --bg-preview: #191916;
    --bg-surface: #1e1e1b;
    --bg-subtle: #252521;
    --bg-hover: #2d2d28;
    --border: #2e2d28;
    --border-strong: #424038;
    --ink-primary: #f5f4ef;
    --ink-secondary: #a8a498;
    --ink-muted: #757268;
    --cta-bg: #2dd4bf;
    --cta-hover: #5eead4;
    --cta-text: #0b2421;
    --accent-soft: #13312d;
    --accent-ink: #5eead4;
    --warn-bg: #451a03;
    --warn-ink: #fcd34d;
    --paid-bg: #064e3b;
    --paid-ink: #6ee7b7;
    --topbar-bg: rgba(30, 30, 27, 0.88);
    --rba-bg: #0b2421;
    --rba-fg: #e6f2f0;
    --rba-accent: #5eead4;
    --ledger-shadow: rgba(0, 0, 0, 0.65);
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.28), 0 0 0 1px rgba(255, 255, 255, 0.03);
    --shadow-md: 0 18px 44px rgba(0, 0, 0, 0.45), 0 2px 6px rgba(0, 0, 0, 0.25);
  }
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  overflow-x: clip;
}

body {
  margin: 0;
  font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  background: var(--bg-desk);
  color: var(--ink-primary);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;
}

.tabular {
  font-variant-numeric: tabular-nums;
}

a {
  color: inherit;
  text-decoration: none;
}

/* Regulatory Announcement Bar */
.rba-bar {
  background: var(--rba-bg);
  color: var(--rba-fg);
  text-align: center;
  padding: 8px 16px;
  font-size: 12.5px;
  font-weight: 500;
  letter-spacing: -0.005em;
}

.rba-bar strong {
  color: var(--rba-accent);
  font-weight: 600;
}

/* Sticky Topbar */
.topbar {
  position: sticky;
  top: 0;
  z-index: 30;
  height: 56px;
  background: var(--topbar-bg);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}

.topbar-inner {
  max-width: 1100px;
  margin: 0 auto;
  height: 100%;
  padding: 0 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  font-size: 16px;
  letter-spacing: -0.025em;
}

.brand-seal {
  width: 28px;
  height: 28px;
  border-radius: 7px;
  background: var(--cta-bg);
  color: var(--cta-text);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 14px;
  flex-shrink: 0;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 24px;
  font-size: 13.5px;
  font-weight: 500;
  color: var(--ink-secondary);
}

.nav-links a:hover {
  color: var(--ink-primary);
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 42px;
  padding: 0 18px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  border: 1px solid var(--border-strong);
  background: var(--bg-surface);
  color: var(--ink-primary);
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.14s, border-color 0.14s, transform 0.08s;
}

.btn:hover {
  background: var(--bg-hover);
  border-color: var(--border-strong);
}

.btn:active {
  transform: translateY(0.5px);
}

.btn-sm {
  min-height: 36px;
  padding: 0 14px;
  font-size: 13px;
}

.btn-primary {
  background: var(--cta-bg);
  border-color: var(--cta-bg);
  color: var(--cta-text);
  box-shadow: 0 2px 8px rgba(15, 76, 69, 0.22);
}

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

.btn-white {
  background: #ffffff;
  border-color: #ffffff;
  color: #0f4c45;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.14);
}

.btn-white:hover {
  background: #f0fdfa;
  border-color: #f0fdfa;
}

:where(.btn, .nav-links a, .seg button, .brand, footer a):focus-visible {
  outline: 2px solid var(--cta-bg);
  outline-offset: 2px;
}

.btn-primary:focus-visible {
  outline: 2px solid var(--cta-bg);
  outline-offset: 2px;
  box-shadow: 0 0 0 2px var(--bg-surface), 0 0 0 4px var(--cta-bg);
}

.btn-white:focus-visible {
  outline: 2px solid #ffffff;
  outline-offset: 3px;
}

.container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 20px;
}

.section {
  padding-block: 64px;
}

.section + .section {
  padding-top: 16px;
}

section[id] {
  scroll-margin-top: 68px;
}

/* Hero */
.hero {
  padding-block: 56px 64px;
  display: grid;
  grid-template-columns: 1.04fr 0.96fr;
  gap: 44px;
  align-items: center;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 12px;
  font-weight: 600;
  color: var(--accent-ink);
  background: var(--accent-soft);
  padding: 5px 12px;
  border-radius: 999px;
  margin-bottom: 16px;
}

.hero h1 {
  margin: 0 0 16px;
  font-size: clamp(30px, 4.3vw, 46px);
  line-height: 1.07;
  letter-spacing: -0.035em;
}

.hero p.lead {
  margin: 0 0 26px;
  font-size: 16.5px;
  color: var(--ink-secondary);
  max-width: 500px;
}

.hero-ctas {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
  margin-bottom: 18px;
}

.hero-micro {
  font-size: 12.5px;
  color: var(--ink-muted);
  display: flex;
  flex-wrap: wrap;
  gap: 12px 16px;
}

/* Hero Desk Frame: Interactive Toolbar + Always-#FFFFFF A4 Paper */
.desk-frame {
  background: var(--bg-preview);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 18px 22px 22px;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-width: 0;
}

.desk-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
}

.desk-hint {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 11.5px;
  font-weight: 600;
  color: var(--ink-secondary);
}

.live-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--cta-bg);
  flex-shrink: 0;
}

.a4-card {
  color-scheme: only light;
  background: #ffffff;
  color: #111827;
  border-radius: 6px;
  padding: 24px;
  box-shadow: var(--shadow-md);
  font-size: 12px;
  min-width: 0;
}

.a4-edit {
  font: inherit;
  color: inherit;
  background: transparent;
  border: 1px dashed transparent;
  border-radius: 4px;
  padding: 2px 4px;
  margin: -2px -4px;
  max-width: 100%;
  transition: background 0.12s, border-color 0.12s;
}

.a4-edit:hover {
  background: #f3f4f6;
  border-color: #cbd5e1;
}

.a4-edit:focus {
  outline: none;
  background: #ecfdf5;
  border-color: #0f4c45;
  border-style: solid;
}

.a4-seller-col {
  min-width: 0;
  flex: 1;
}

.a4-title-col {
  flex-shrink: 0;
  text-align: right;
}

.a4-edit-seller {
  width: 100%;
  max-width: 220px;
  font-weight: 700;
  font-size: 13.5px;
  color: #0f172a;
}

.a4-edit-desc {
  width: 100%;
  min-width: 0;
}

.a4-edit-amount {
  width: 88px;
  text-align: right;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

.a4-edit-payid {
  width: 140px;
  max-width: 100%;
  font-size: 11px;
  color: #374151;
}

.a4-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  border-bottom: 2px solid #0f172a;
  padding-bottom: 10px;
  margin-bottom: 12px;
  gap: 12px;
}

.a4-title {
  font-weight: 800;
  font-size: 17px;
  color: #0f172a;
  letter-spacing: -0.02em;
}

.a4-muted {
  color: #6b7280;
  font-size: 11px;
}

.a4-table {
  width: 100%;
  border-collapse: collapse;
  margin: 12px 0;
}

.a4-table th {
  text-align: left;
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #6b7280;
  border-bottom: 1px solid #e5e7eb;
  padding: 5px 0;
}

.a4-table td {
  padding: 9px 0;
  border-bottom: 1px solid #f3f4f6;
  vertical-align: middle;
}

.a4-table .num {
  text-align: right;
}

.a4-bottom {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 12px;
  margin-top: 14px;
}

.payid-box {
  flex: 1;
  min-width: 0;
  background: #f9fafb;
  border: 1px solid #e5e7eb;
  border-radius: 6px;
  padding: 10px 11px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.payid-details {
  min-width: 0;
  flex: 1;
}

.payid-line {
  display: flex;
  align-items: center;
  gap: 4px;
  flex-wrap: wrap;
}

.payid-qr {
  flex-shrink: 0;
}

.payid-tag {
  display: inline-block;
  font-size: 10px;
  font-weight: 700;
  color: #0f4c45;
  background: #e6f2f0;
  padding: 2px 6px;
  border-radius: 4px;
  margin-bottom: 3px;
}

.a4-total {
  text-align: right;
  min-width: 120px;
  flex-shrink: 0;
}

.a4-total-val {
  font-size: 19px;
  font-weight: 800;
  color: #0f172a;
}

/* 3-Step Workflow Band */
.steps-band {
  background: var(--bg-surface);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  padding: 44px 0;
}

.steps-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
}

.step-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 11.5px;
  font-weight: 700;
  color: var(--accent-ink);
  background: var(--accent-soft);
  border-radius: 6px;
  padding: 3px 8px;
  margin-bottom: 10px;
}

.steps-band h3 {
  margin: 0 0 6px;
  font-size: 16.5px;
  letter-spacing: -0.015em;
}

.steps-band p {
  margin: 0;
  font-size: 14px;
  color: var(--ink-secondary);
}

/* Section Headings */
.sec-head {
  max-width: 640px;
  margin-bottom: 28px;
}

.sec-head h2 {
  margin: 0 0 8px;
  font-size: 28px;
  letter-spacing: -0.03em;
}

.sec-head p {
  margin: 0;
  font-size: 15.5px;
  color: var(--ink-secondary);
}

/* Cost Ledger + Trust Pillars Split */
.ledger-split {
  display: grid;
  grid-template-columns: 1.02fr 0.98fr;
  gap: 24px;
  align-items: start;
}

.ledger-card {
  background: var(--bg-surface);
  border: 1.5px solid var(--ink-primary);
  border-radius: 14px;
  padding: 24px;
  box-shadow: 5px 5px 0 var(--ledger-shadow);
}

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

.ledger-title {
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--ink-secondary);
}

.seg {
  display: inline-flex;
  background: var(--bg-desk);
  border: 1px solid var(--border);
  border-radius: 7px;
  padding: 2px;
}

.seg button {
  border: none;
  background: transparent;
  color: var(--ink-secondary);
  font-size: 12px;
  font-weight: 600;
  padding: 5px 10px;
  border-radius: 5px;
  cursor: pointer;
  white-space: nowrap;
}

.seg button.active {
  background: var(--bg-surface);
  color: var(--ink-primary);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.08);
}

.ledger-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 14px 0;
  border-bottom: 1px solid var(--border);
}

.ledger-row:last-of-type {
  border-bottom: none;
}

.ledger-sub {
  font-size: 12.5px;
  color: var(--ink-secondary);
}

.pill-warn {
  background: var(--warn-bg);
  color: var(--warn-ink);
  font-size: 12px;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 999px;
  white-space: nowrap;
}

.pill-paid {
  background: var(--paid-bg);
  color: var(--paid-ink);
  font-size: 12px;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 999px;
  white-space: nowrap;
}

.ledger-foot {
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px dashed var(--border-strong);
  font-size: 13px;
  color: var(--ink-secondary);
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px 12px;
}

.ledger-foot strong {
  color: var(--cta-bg);
  font-size: 14px;
}

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

.pillar-card {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 18px 20px;
  box-shadow: var(--shadow-sm);
}

.pillar-card h3 {
  margin: 0 0 5px;
  font-size: 16px;
  letter-spacing: -0.015em;
}

.pillar-card p {
  margin: 0;
  font-size: 13.5px;
  color: var(--ink-secondary);
}

/* Pricing Cards + Matrix */
.pricing-top {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
  margin-bottom: 18px;
}

.tier-card {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 24px;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 18px;
}

.tier-card.pro {
  border: 2px solid var(--cta-bg);
  box-shadow: var(--shadow-md);
}

.tier-label {
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--ink-secondary);
}

.tier-label--pro {
  color: var(--cta-bg);
}

.tier-price {
  font-size: 34px;
  font-weight: 800;
  letter-spacing: -0.03em;
  margin: 6px 0 4px;
}

.tier-desc {
  font-size: 13.5px;
  color: var(--ink-secondary);
  margin: 0;
}

.matrix-wrap {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}

table.matrix {
  width: 100%;
  border-collapse: collapse;
}

table.matrix th,
table.matrix td {
  padding: 12px 18px;
  border-bottom: 1px solid var(--border);
  text-align: left;
  font-size: 13.5px;
}

table.matrix th:not(:first-child),
table.matrix td:not(:first-child) {
  text-align: center;
  white-space: nowrap;
  width: 112px;
}

table.matrix th {
  background: var(--bg-subtle);
  font-size: 11.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--ink-secondary);
}

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

.check {
  color: var(--cta-bg);
  font-weight: 700;
  font-size: 15px;
}

.dash {
  color: var(--ink-muted);
}

/* FAQ */
.faq-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
}

.faq-card {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 20px;
  box-shadow: var(--shadow-sm);
}

.faq-card h4 {
  margin: 0 0 6px;
  font-size: 15px;
}

.faq-card p {
  margin: 0;
  font-size: 13.5px;
  color: var(--ink-secondary);
}

/* Bottom CTA */
.closing-cta {
  background: #0f4c45;
  color: #ffffff;
  border-radius: 16px;
  padding: 36px 32px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 20px;
  margin-bottom: 56px;
}

.closing-cta h2 {
  margin: 0 0 6px;
  font-size: 25px;
  letter-spacing: -0.025em;
}

.closing-cta p {
  margin: 0;
  color: #ccfbf1;
  font-size: 14.5px;
}

footer {
  border-top: 1px solid var(--border);
  padding: 24px 0;
  font-size: 13px;
  color: var(--ink-muted);
}

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

.foot-inner a {
  color: var(--ink-secondary);
  font-weight: 600;
}

.foot-inner a:hover {
  color: var(--ink-primary);
}

/* Tablet (<= 960px) */
@media (max-width: 960px) {
  .hero,
  .steps-grid,
  .ledger-split,
  .pricing-top,
  .faq-grid {
    grid-template-columns: 1fr;
  }

  .nav-links {
    display: none;
  }

  .hero {
    padding-block: 36px 44px;
    gap: 28px;
  }

  .section {
    padding-block: 48px;
  }
}

/* Mobile (<= 640px): generous spacing, >= 44px touch targets, zero horizontal overflow */
@media (max-width: 640px) {
  .container,
  .topbar-inner {
    padding-inline: 20px;
  }

  .topbar {
    height: 60px;
  }

  .hero {
    padding-block: 36px 52px;
    gap: 32px;
  }

  .section {
    padding-block: 44px;
  }

  .section + .section {
    padding-top: 12px;
  }

  .steps-band {
    padding-block: 48px;
  }

  .steps-grid {
    gap: 32px;
  }

  .sec-head {
    margin-bottom: 24px;
  }

  .sec-head h2 {
    font-size: 25px;
    line-height: 1.15;
  }

  .btn {
    min-height: 46px;
  }

  .btn-sm {
    min-height: 44px;
    padding: 0 14px;
  }

  .hero-ctas {
    flex-direction: column;
    align-items: stretch;
    gap: 12px;
  }

  .desk-bar {
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
  }

  .desk-bar .seg {
    width: 100%;
  }

  .desk-bar .seg button {
    flex: 1;
  }

  .seg button {
    min-height: 44px;
    padding: 0 12px;
  }

  .desk-frame {
    padding: 16px;
    gap: 14px;
  }

  .a4-card {
    padding: 18px 16px;
  }

  .a4-head {
    flex-direction: column;
    gap: 8px;
  }

  .a4-title-col {
    text-align: left;
  }

  .a4-col-qty,
  .a4-col-gst {
    display: none;
  }

  .a4-bottom {
    flex-direction: column;
    align-items: stretch;
    gap: 12px;
  }

  .a4-total {
    text-align: left;
    padding-top: 10px;
    border-top: 1px solid #e5e7eb;
  }

  .a4-edit {
    font-size: 16px;
    min-height: 44px;
  }

  .a4-edit-amount {
    width: 100px;
  }

  .ledger-card {
    padding: 20px;
  }

  .pillar-stack,
  .pricing-top,
  .faq-grid {
    gap: 18px;
  }

  .faq-card,
  .pillar-card,
  .tier-card {
    padding: 22px 20px;
  }

  table.matrix th,
  table.matrix td {
    padding: 12px 14px;
    font-size: 13px;
  }

  table.matrix th:not(:first-child),
  table.matrix td:not(:first-child) {
    width: 72px;
  }

  .closing-cta {
    padding: 32px 22px;
    margin-bottom: 48px;
  }

  .closing-cta .btn {
    width: 100%;
  }
}

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