:root {
  color-scheme: light dark;
  --ink: #15222c;
  --muted: #5c6b76;
  --paper: #f4f7f9;
  --surface: #fbfcfd;
  --surface-soft: #edf5f5;
  --line: #d7e1e8;
  --accent: #1b8f9c;
  --accent-strong: #0d6673;
  --navy: #0b2535;
  --hero-text: #f7fbfc;
  --hero-muted: rgba(247, 251, 252, 0.86);
  --shadow: 0 22px 54px rgba(20, 38, 56, 0.15);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Noto Sans TC", "PingFang TC", "Segoe UI", sans-serif;
  color: var(--ink);
  background: var(--paper);
  line-height: 1.65;
  letter-spacing: 0;
}

a {
  color: inherit;
}

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

h1 {
  margin-bottom: 16px;
  font-size: clamp(3.4rem, 8vw, 5.6rem);
  line-height: 0.98;
  font-weight: 900;
  text-wrap: balance;
}

h2 {
  margin-bottom: 16px;
  font-size: clamp(2rem, 4vw, 2.7rem);
  line-height: 1.14;
  font-weight: 870;
  text-wrap: balance;
}

h3 {
  margin-bottom: 10px;
  font-size: 1.14rem;
  line-height: 1.3;
}

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  min-height: 68px;
  padding: 12px clamp(18px, 4vw, 56px);
  border-bottom: 1px solid color-mix(in srgb, var(--line) 78%, transparent);
  background: color-mix(in srgb, var(--paper) 90%, transparent);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  color: var(--ink);
  text-decoration: none;
  font-weight: 850;
  font-size: 1.06rem;
}

.brand img {
  border-radius: 10px;
  box-shadow: 0 8px 18px rgba(12, 34, 58, 0.18);
}

.site-nav,
.site-footer nav {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: nowrap;
}

.site-nav a,
.site-footer a {
  min-height: 36px;
  padding: 7px 11px;
  border-radius: 8px;
  color: var(--muted);
  text-decoration: none;
  font-weight: 760;
  white-space: nowrap;
}

.site-nav a:hover,
.site-nav a[aria-current="page"],
.site-footer a:hover {
  color: var(--accent-strong);
  background: color-mix(in srgb, var(--accent) 10%, transparent);
}

.hero {
  position: relative;
  display: grid;
  min-height: min(760px, calc(100dvh - 68px));
  padding: clamp(48px, 8vw, 88px) clamp(20px, 6vw, 76px);
  overflow: hidden;
  isolation: isolate;
}

.marketing-hero {
  align-items: center;
  color: var(--hero-text);
  background:
    linear-gradient(90deg, rgba(8, 28, 44, 0.93), rgba(8, 28, 44, 0.68) 58%, rgba(8, 28, 44, 0.22)),
    url("images/quick-entry.jpg");
  background-size: cover;
  background-position: center;
}

.hero-copy {
  position: relative;
  z-index: 2;
  width: min(690px, 100%);
  padding-bottom: 32px;
}

.eyebrow {
  margin: 0 0 12px;
  color: var(--accent-strong);
  font-size: 0.86rem;
  font-weight: 850;
  text-transform: uppercase;
}

.marketing-hero .eyebrow {
  color: #8ce8de;
}

.hero-detail {
  width: min(630px, 100%);
  margin-bottom: 28px;
  color: var(--hero-muted);
  font-size: clamp(1.02rem, 2vw, 1.16rem);
}

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

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 10px 16px;
  border-radius: 8px;
  text-decoration: none;
  font-weight: 830;
  white-space: nowrap;
  transition: color 180ms ease, background-color 180ms ease, border-color 180ms ease, transform 180ms ease;
}

.button:hover {
  transform: translateY(-1px);
}

.button:active {
  transform: translateY(1px);
}

.button.primary {
  color: #082631;
  background: #9eece3;
}

.button.secondary {
  color: var(--hero-text);
  border: 1px solid rgba(247, 251, 252, 0.42);
  background: rgba(247, 251, 252, 0.08);
}

.hero-visual {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
}

.phone {
  position: absolute;
  width: min(31vw, 280px);
  max-height: 72vh;
  object-fit: cover;
  border: 1px solid rgba(247, 251, 252, 0.34);
  border-radius: 34px;
  box-shadow: var(--shadow);
}

.phone-main {
  right: clamp(28px, 7vw, 112px);
  top: 88px;
}

.phone-back {
  right: clamp(172px, 22vw, 360px);
  bottom: -52px;
  opacity: 0.78;
  transform: rotate(-5deg);
}

.section,
.band {
  padding: clamp(54px, 8vw, 96px) clamp(20px, 6vw, 76px);
}

.band {
  background: var(--surface);
}

.section-inner {
  width: min(1120px, 100%);
  margin: 0 auto;
}

.intro-grid,
.release-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.95fr) minmax(0, 1.05fr);
  gap: clamp(26px, 6vw, 72px);
  align-items: start;
}

.intro-grid p,
.image-band p,
.release-grid p {
  font-size: 1.05rem;
}

.feature-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
  margin-top: 28px;
}

.feature-card {
  min-height: 230px;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
}

.feature-card-large {
  grid-column: span 2;
  background: linear-gradient(135deg, var(--surface-soft), var(--surface));
}

.feature-card-toned {
  grid-column: span 2;
  color: var(--hero-text);
  border-color: transparent;
  background: linear-gradient(135deg, #0e3543, #176f78);
}

.feature-card-toned p {
  color: rgba(247, 251, 252, 0.82);
}

.split-proof {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(260px, 360px);
  gap: clamp(28px, 8vw, 88px);
  align-items: center;
}

.report-shot {
  width: min(360px, 100%);
  justify-self: center;
  border: 1px solid rgba(13, 35, 51, 0.12);
  border-radius: 34px;
  box-shadow: var(--shadow);
}

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

.proof-list span {
  padding: 7px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--accent-strong);
  background: var(--surface);
  font-weight: 820;
}

.principle-list {
  display: grid;
  gap: 12px;
  margin-top: 24px;
}

.principle-list div {
  display: grid;
  grid-template-columns: 180px minmax(0, 1fr);
  gap: 18px;
  padding: 18px 0;
  border-top: 1px solid var(--line);
}

.principle-list strong {
  color: var(--navy);
}

.principle-list span {
  color: var(--muted);
}

.release-band {
  background: linear-gradient(135deg, var(--surface), var(--surface-soft));
}

.release-notes {
  display: grid;
  gap: 10px;
}

.release-notes p {
  margin-bottom: 0;
  padding: 16px 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
}

.page-hero {
  padding: clamp(58px, 9vw, 108px) clamp(20px, 6vw, 76px);
  color: var(--hero-text);
  background: var(--navy);
}

.support-hero {
  background:
    linear-gradient(90deg, rgba(11, 37, 53, 0.94), rgba(11, 37, 53, 0.72)),
    url("images/reports-overview.jpg") center / cover;
}

.privacy-hero {
  background:
    linear-gradient(90deg, rgba(11, 37, 53, 0.94), rgba(20, 68, 74, 0.72)),
    url("images/cashflow-report.jpg") center / cover;
}

.page-hero-inner {
  width: min(860px, 100%);
}

.page-hero h1 {
  font-size: clamp(2.8rem, 6vw, 3.8rem);
}

.page-hero p {
  max-width: 760px;
  color: var(--hero-muted);
  font-size: 1.06rem;
}

.support-layout {
  display: grid;
  grid-template-columns: minmax(230px, 320px) minmax(0, 1fr);
  gap: clamp(24px, 5vw, 64px);
  align-items: start;
}

.support-summary {
  position: sticky;
  top: 92px;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
}

.support-summary h2 {
  margin-bottom: 14px;
  font-size: 1.25rem;
}

.status-list {
  display: grid;
  gap: 13px;
  margin-bottom: 16px;
}

.status-list div {
  display: grid;
  gap: 3px;
}

.status-list dt {
  color: var(--ink);
  font-weight: 820;
}

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

.text-link {
  color: var(--accent-strong);
  font-weight: 820;
}

.faq-list {
  display: grid;
  gap: 16px;
}

.faq-list article,
.legal-copy article {
  padding: 24px 0;
  border-top: 1px solid var(--line);
}

.faq-list article:first-child,
.legal-copy article:first-child {
  padding-top: 0;
  border-top: 0;
}

.faq-list h2,
.legal-copy h2 {
  margin-bottom: 8px;
  font-size: 1.35rem;
}

.legal-section {
  background: var(--surface);
}

.legal-copy {
  width: min(900px, 100%);
}

.site-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 28px clamp(18px, 4vw, 56px);
  border-top: 1px solid var(--line);
  background: var(--surface);
  color: var(--muted);
}

.site-footer div {
  display: grid;
  gap: 2px;
}

.site-footer strong {
  color: var(--ink);
}

@media (prefers-color-scheme: dark) {
  :root {
    --ink: #edf5f7;
    --muted: #a9bac4;
    --paper: #101820;
    --surface: #15222c;
    --surface-soft: #18333a;
    --line: #28424e;
    --accent: #61cfc7;
    --accent-strong: #8ce8de;
    --navy: #101820;
    --shadow: 0 22px 54px rgba(2, 8, 12, 0.34);
  }

  .marketing-hero {
    background:
      linear-gradient(90deg, rgba(8, 22, 29, 0.94), rgba(8, 22, 29, 0.72) 58%, rgba(8, 22, 29, 0.28)),
      url("images/quick-entry.jpg");
    background-size: cover;
    background-position: center;
  }

  .button.primary {
    color: #082631;
    background: #8ce8de;
  }

  .feature-card-toned {
    background: linear-gradient(135deg, #123944, #1d7b82);
  }

  .principle-list strong {
    color: var(--ink);
  }

  .report-shot,
  .phone {
    border-color: rgba(247, 251, 252, 0.18);
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    transition-duration: 0.001ms !important;
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
  }
}

@media (max-width: 920px) {
  .hero {
    min-height: auto;
    padding-bottom: 280px;
  }

  .phone {
    width: 190px;
  }

  .phone-main {
    right: 28px;
    top: auto;
    bottom: -16px;
  }

  .phone-back {
    right: 160px;
    bottom: -34px;
  }

  .intro-grid,
  .release-grid,
  .split-proof,
  .support-layout {
    grid-template-columns: 1fr;
  }

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

  .feature-card-large,
  .feature-card-toned {
    grid-column: auto;
  }

  .support-summary {
    position: static;
  }
}

@media (max-width: 620px) {
  .site-header,
  .site-footer {
    align-items: flex-start;
    flex-direction: column;
  }

  .site-nav {
    width: 100%;
  }

  .site-nav a {
    flex: 1 1 auto;
    text-align: center;
  }

  .hero {
    padding-top: 42px;
    padding-bottom: 230px;
  }

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

  .feature-card {
    min-height: auto;
  }

  .phone {
    width: 150px;
    border-radius: 24px;
  }

  .phone-main {
    right: 20px;
  }

  .phone-back {
    right: 126px;
  }

  .principle-list div {
    grid-template-columns: 1fr;
    gap: 4px;
  }
}

/* AI billing FAQ: scoped additions preserve the existing public pages. */
[hidden] { display: none !important; }
.pricing-section { background: var(--surface); }
.pricing-section [id] { scroll-margin-top: 100px; }
.pricing-intro { max-width: 760px; font-size: 1.12rem; }
.pricing-date, .pricing-caption { font-size: .9rem; }
.pricing-jumps { display: flex; flex-wrap: wrap; gap: 12px 24px; margin: 24px 0 32px; }
.pricing-jumps a, .pricing-section a { color: var(--accent-strong); text-underline-offset: 3px; }
.pricing-explainer { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 28px; border-block: 1px solid var(--line); padding: 28px 0; margin-bottom: 40px; }
.pricing-explainer p { margin-bottom: 0; }
.pricing-table-wrap { max-width: 100%; overflow-x: auto; margin-bottom: 20px; border: 1px solid var(--line); border-radius: 8px; }
.pricing-table { border-collapse: collapse; width: 100%; min-width: 850px; text-align: left; font-size: .93rem; }
.pricing-table caption { text-align: left; padding: 12px 16px; font-weight: 700; background: var(--surface-soft); }
.pricing-table th, .pricing-table td { padding: 15px 16px; vertical-align: top; border-bottom: 1px solid var(--line); }
.pricing-table thead { background: var(--surface-soft); }
.pricing-table tr:last-child > * { border-bottom: 0; }
.pricing-table tbody th { min-width: 210px; font-weight: 700; }
.pricing-table th span, .pricing-table th code { display: block; font-weight: 400; }
.pricing-table code { font-size: .78rem; overflow-wrap: anywhere; }
.pricing-table td:nth-child(2), .pricing-table td:nth-child(3), .pricing-table td:nth-child(4) { font-variant-numeric: tabular-nums; }
.pricing-table td:last-child { min-width: 265px; color: var(--muted); }
.pricing-note { padding: 20px 24px; border-left: 3px solid var(--accent); background: var(--surface-soft); margin: 28px 0 40px; }
.pricing-note p:last-child { margin-bottom: 0; }
.pricing-note code { overflow-wrap: anywhere; }
.pricing-formula { color: var(--ink); font-weight: 650; }
.cost-calculator { border-block: 1px solid var(--line); padding: 32px 0; margin: 36px 0; }
.cost-fields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; margin-bottom: 16px; }
.cost-calculator label { display: grid; gap: 6px; font-size: .95rem; font-weight: 650; }
.cost-calculator input, .cost-calculator select { min-width: 0; width: 100%; min-height: 44px; border: 1px solid var(--line); border-radius: 6px; padding: 10px 12px; font: inherit; color: var(--ink); background: var(--paper); }
.cost-calculator small { font-weight: 400; color: var(--muted); }
.cost-calculator .cost-checkbox { display: flex; flex-direction: row; align-items: center; grid-column: 1 / -1; }
.cost-checkbox input { width: 20px; height: 20px; min-height: 20px; }
.cost-scenarios { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; margin: 28px 0; }
.cost-scenario { min-width: 0; margin: 0; border: 1px solid var(--line); padding: 16px 20px 20px; border-radius: 8px; }
.cost-scenario legend { font-weight: 700; padding: 0 6px; }
.scenario-cost { font-size: .92rem; margin: 12px 0; }
.cost-scenario summary { min-height: 44px; padding: 10px 0; cursor: pointer; color: var(--accent-strong); }
.cost-scenario .cost-fields { grid-template-columns: 1fr; }
.cost-multiplier { max-width: 550px; }
.cost-result { margin: 24px 0; padding: 24px; background: var(--surface-soft); border-radius: 8px; }
#cost-total { font-size: clamp(1.2rem, 3vw, 1.7rem); color: var(--ink); font-weight: 750; font-variant-numeric: tabular-nums; }
#cost-detail { font-size: .92rem; }
.cost-result p:last-child { margin-bottom: 0; }
.cost-reset { padding: 10px 16px; min-height: 44px; font: inherit; color: var(--ink); background: var(--paper); border: 1px solid var(--line); border-radius: 6px; cursor: pointer; }
.billing-faq details { border-bottom: 1px solid var(--line); padding: 16px 0; }
.billing-faq summary { font-weight: 700; cursor: pointer; min-height: 44px; padding: 8px 0; }
.billing-faq details p { margin: 8px 0; }
.pricing-section :focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; }
@media (max-width: 700px) {
  .pricing-explainer, .cost-fields, .cost-scenarios { grid-template-columns: 1fr; }
  .pricing-explainer { gap: 24px; }
  .cost-result, .pricing-note { padding: 18px; }
  .pricing-section [id] { scroll-margin-top: 140px; }
}

/* Provider catalogs stay collapsed until expanded or searched. */
.catalog-controls label { display: grid; gap: 6px; font-weight: 650; }
.catalog-controls input, .catalog-controls select { min-width: 0; width: 100%; min-height: 44px; border: 1px solid var(--line); border-radius: 6px; padding: 10px 12px; font: inherit; color: var(--ink); background: var(--paper); }
.catalog-provider { border-top: 1px solid var(--line); padding: 4px 0; }
.catalog-provider > summary { padding: 17px 4px; font-size: 1.05rem; font-weight: 700; cursor: pointer; }
.catalog-provider > summary span { display: inline-block; margin-left: 12px; color: var(--muted); font-size: .85rem; font-weight: 400; }
.catalog-provider .pricing-table { table-layout: fixed; min-width: 900px; }
.catalog-provider .pricing-table th:first-child { width: 25%; overflow-wrap: anywhere; }
.catalog-provider .pricing-table th:nth-child(2), .catalog-provider .pricing-table th:nth-child(3) { width: 11%; }
.catalog-provider .pricing-table th:nth-child(4) { width: 12%; }
.catalog-provider .pricing-table td { overflow-wrap: anywhere; }
.catalog-use { display: block; margin-top: 10px; min-height: 44px; padding: 8px 12px; border: 1px solid var(--line); border-radius: 6px; background: var(--paper); color: var(--accent); font: inherit; cursor: pointer; }
.catalog-status { display: block; margin: 8px 0; font-size: .85rem; color: var(--ink); }
.rate-tiers { margin: 10px 0; font-size: .84rem; }
.rate-tiers summary { cursor: pointer; }
.rate-tiers p { font-size: inherit; }
#ai-calculator { scroll-margin-top: 140px; }
#selected-rate { overflow-wrap: anywhere; }
.catalog-provider[hidden], .catalog-provider tr[hidden], .catalog-use[hidden] { display: none; }

.fx-field { display: grid; align-content: start; gap: 8px; min-width: 0; }
.fx-field .catalog-use { justify-self: start; margin-top: 0; }
.fx-field small { line-height: 1.6; }
.fx-field button:disabled { opacity: .6; cursor: wait; }
