/* Landing responsive polish: keep the desktop product preview wide, but make mobile intentional instead of cropped. */
html,
body {
  max-width: 100%;
  overflow-x: hidden;
}

.marketing-main,
.hero,
.hero-copy,
.hero-visual,
.app-preview-shell {
  min-width: 0;
}

/* Marketing header nav links. core/layout.css has a global `nav a` rule for
   the dark app topbar (near-white text, white on hover). The marketing header
   is light, so that rule makes Features / US + Canada / Pricing / FAQ and the
   Sign in link unreadable. Pin them to dark text with a light-blue hover pill
   that keeps the text black. Selectors are scoped to .marketing-nav so they
   outrank the global `nav a` / `nav a:hover` / `nav a:focus-visible` rules. */
.marketing-nav .marketing-nav-link,
.marketing-nav .marketing-nav-link:link,
.marketing-nav .marketing-nav-link:visited {
  color: #0f172a;
}

.marketing-nav .marketing-nav-cta,
.marketing-nav .marketing-nav-cta:link,
.marketing-nav .marketing-nav-cta:visited {
  color: #ffffff;
}

.marketing-nav .marketing-nav-link:hover,
.marketing-nav .marketing-nav-link:focus,
.marketing-nav .marketing-nav-link:focus-visible,
.marketing-nav .marketing-nav-link:active {
  color: #0f172a;
  background: #eaf3ff;
}

.marketing-nav .marketing-nav-link:focus-visible {
  outline: 2px solid #0f5bd7;
  outline-offset: 2px;
}

.marketing-nav .marketing-nav-cta:hover,
.marketing-nav .marketing-nav-cta:focus,
.marketing-nav .marketing-nav-cta:focus-visible,
.marketing-nav .marketing-nav-cta:active {
  color: #ffffff;
  background: linear-gradient(135deg, #0c4fbf, #216ad6);
  text-decoration: none;
}

.marketing-nav .marketing-nav-cta:focus-visible {
  outline: 2px solid #0f5bd7;
  outline-offset: 2px;
}

.button.button-secondary,
.button.button-secondary:link,
.button.button-secondary:visited {
  color: #0f172a;
}

.button.button-secondary:hover,
.button.button-secondary:focus,
.button.button-secondary:focus-visible,
.button.button-secondary:active {
  color: #0f172a;
  background: #eef4fb;
  border-color: rgba(15, 91, 215, 0.18);
}

.region-card-active h3 {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.region-card-flag {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.5em;
  min-width: 1.5em;
  font-size: 0;
  line-height: 1;
}

.region-card-flag::before {
  content: "\1F1FA\1F1F8";
  font-size: 1.15em;
}

html[data-region="CA"] .region-card-flag::before {
  content: "\1F1E8\1F1E6";
}

/* "Coming soon" pill — the Business tier (invoices, customers, vendors,
   projects, bills, AR/AP) is not available yet, so flag it on the pricing
   tier card instead of implying it can be purchased today. */
.coming-soon-pill {
  display: inline-flex;
  align-items: center;
  min-height: 22px;
  margin-left: 8px;
  padding: 0 10px;
  border-radius: 999px;
  background: #fef3c7;
  color: #92400e;
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  vertical-align: middle;
  white-space: nowrap;
}

/* Updated hero product preview: visually closer to the real Transactions page,
   clearly framed, and non-interactive so it does not compete with real CTAs. */
.hero-visual {
  isolation: isolate;
}

.app-preview-shell {
  border: 1px solid rgba(15, 23, 42, 0.16) !important;
  outline: 1px solid rgba(255, 255, 255, 0.88);
  background: #f8fafc !important;
  box-shadow:
    0 0 0 10px rgba(15, 23, 42, 0.035),
    0 28px 78px rgba(15, 23, 42, 0.18) !important;
}

.app-preview-topbar {
  min-height: 52px !important;
  background: linear-gradient(135deg, #153a5f, #1e4f7c) !important;
  border-bottom: 1px solid rgba(255, 255, 255, 0.12) !important;
  color: #fff !important;
}

.preview-brand strong,
.preview-search,
.preview-search input {
  color: rgba(255, 255, 255, 0.9) !important;
}

.preview-brand-mark {
  background: rgba(255, 255, 255, 0.14) !important;
  box-shadow: inset 0 0 0 6px rgba(255, 255, 255, 0.16) !important;
}

.preview-search {
  border-color: rgba(255, 255, 255, 0.14) !important;
  background: rgba(255, 255, 255, 0.08) !important;
}

.preview-user-pill {
  background: #eef6ff !important;
  color: #153a5f !important;
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.12);
}

.preview-sidebar {
  background: #ffffff !important;
}

.preview-content {
  background: #f6f8fb !important;
}

.preview-quick-header button,
.preview-actions button,
.preview-toolbar button {
  pointer-events: none !important;
  cursor: default !important;
  box-shadow: none !important;
}

.preview-quick-header button,
.preview-actions button,
.preview-toolbar button,
.preview-toolbar span {
  border-color: rgba(15, 23, 42, 0.10) !important;
  background: #ffffff !important;
  color: #475569 !important;
}

.preview-actions button:first-child,
.preview-actions button:last-child,
.preview-toolbar button:last-child {
  background: #eef4fb !important;
  color: #1e4f7c !important;
  border-color: rgba(30, 79, 124, 0.14) !important;
}

.preview-stats {
  align-items: stretch;
}

.preview-stats article {
  position: relative;
  min-width: 0 !important;
  overflow: hidden !important;
  border-color: rgba(15, 23, 42, 0.10) !important;
  box-shadow: 0 12px 24px rgba(15, 23, 42, 0.06);
}

.preview-stats strong {
  display: block;
  max-width: 100%;
  min-width: 0;
  overflow-wrap: anywhere;
  word-break: break-word;
  line-height: 1.05;
  letter-spacing: -0.055em;
  font-size: clamp(15px, 1.55vw, 23px) !important;
}

.preview-stats::after {
  content: "Estimated tax owed  $153.38   ·   Suggested monthly set-aside  $153.38";
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  min-height: 62px;
  padding: 0 18px;
  border-radius: 16px;
  background: linear-gradient(135deg, #14395d, #1d4f7d);
  color: #ffffff;
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.03em;
  box-shadow: 0 14px 28px rgba(15, 23, 42, 0.14);
}

.preview-table {
  border-color: rgba(15, 23, 42, 0.10) !important;
  box-shadow: 0 12px 30px rgba(15, 23, 42, 0.05);
}

.preview-row span {
  min-width: 0;
  overflow-wrap: anywhere;
}

@media (min-width: 1181px) {
  .marketing-main {
    width: min(96vw, 1820px) !important;
    max-width: none !important;
  }

  .hero {
    display: grid !important;
    grid-template-columns: minmax(380px, 0.42fr) minmax(0, 0.58fr) !important;
    gap: clamp(28px, 3vw, 54px) !important;
    align-items: center !important;
    width: 100% !important;
    min-height: auto !important;
    padding: clamp(30px, 3vw, 58px) !important;
    border: 1px solid rgba(15, 23, 42, 0.10) !important;
    border-radius: 28px !important;
    background:
      radial-gradient(circle at 0% 0%, rgba(59, 130, 246, 0.07), transparent 34%),
      rgba(255, 255, 255, 0.92) !important;
    box-shadow: 0 22px 60px rgba(15, 23, 42, 0.08) !important;
    overflow: hidden !important;
  }

  .hero-copy {
    padding-left: 0 !important;
  }

  .hero h1 {
    font-size: clamp(3.4rem, 4.4vw, 5.4rem) !important;
  }

  .hero-lede,
  .hero-proof-list {
    max-width: 620px !important;
  }

  .hero-visual {
    width: 100% !important;
    max-width: 100% !important;
    overflow: visible !important;
    padding: 10px !important;
  }

  .app-preview-shell {
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    margin: 0 !important;
    transform: none !important;
    border-radius: 24px !important;
  }

  .app-preview-topbar {
    grid-template-columns: 170px minmax(180px, 1fr) auto !important;
    min-height: 54px !important;
    padding: 0 18px !important;
  }

  .app-preview-body {
    grid-template-columns: 150px minmax(0, 1fr) !important;
    min-height: 500px !important;
  }

  .preview-sidebar {
    padding: 16px 12px !important;
  }

  .preview-content {
    min-width: 0 !important;
    padding: 18px !important;
  }

  .preview-page-header h2 {
    font-size: 24px !important;
  }

  .preview-actions button,
  .preview-toolbar button {
    min-height: 30px !important;
    padding: 0 10px !important;
    font-size: 10px !important;
  }

  .preview-stats {
    grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
    gap: 10px !important;
  }

  .preview-stats article {
    min-height: 86px !important;
    padding: 14px !important;
  }

  .preview-toolbar {
    grid-template-columns: minmax(130px, 1fr) auto auto auto auto !important;
    gap: 8px !important;
    margin-top: 14px !important;
  }

  .preview-row {
    grid-template-columns: .9fr 1.35fr 1.15fr 1.25fr 1fr .78fr !important;
    gap: 8px !important;
    min-height: 40px !important;
    padding: 0 10px !important;
    font-size: 10.5px !important;
  }
}

@media (min-width: 1500px) {
  .marketing-main {
    width: min(94vw, 1900px) !important;
  }

  .hero {
    grid-template-columns: minmax(430px, 0.4fr) minmax(0, 0.6fr) !important;
  }

  .app-preview-body {
    grid-template-columns: 166px minmax(0, 1fr) !important;
    min-height: 540px !important;
  }
}

@media (max-width: 1180px) {
  .marketing-main {
    width: min(1000px, calc(100vw - 28px));
  }

  .hero {
    min-height: auto;
    gap: 28px;
  }
}

@media (max-width: 1024px) {
  .marketing-header {
    overflow: hidden;
  }

  .marketing-nav-sections {
    display: none;
  }

  .marketing-nav {
    width: auto;
    margin-left: auto;
    justify-content: flex-end;
  }

  .marketing-nav-signin,
  .marketing-nav-cta {
    width: auto;
    min-height: 42px;
    padding-inline: 16px;
    font-size: 13px;
    white-space: nowrap;
  }

  .marketing-main {
    width: min(100%, calc(100vw - 20px));
    padding-top: 22px;
  }

  .hero {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    width: 100%;
    overflow: hidden;
  }

  .hero-copy {
    width: 100%;
    padding: 0 4px;
  }

  .hero h1,
  .hero-lede,
  .hero-proof-list,
  .hero-actions,
  .hero-cta-note {
    max-width: 100%;
  }

  .hero-visual {
    width: 100%;
    overflow: visible;
    padding: 8px;
  }

  .app-preview-shell {
    width: 100%;
    max-width: 100%;
    border-radius: 24px;
  }

  .app-preview-topbar {
    grid-template-columns: 1fr auto;
    min-height: 58px;
    padding: 0 14px;
  }

  .preview-brand strong {
    font-size: 13px;
  }

  .preview-search,
  .preview-sidebar,
  .preview-toolbar {
    display: none;
  }

  .app-preview-body {
    display: block;
    min-height: auto;
  }

  .preview-content {
    padding: 14px;
  }

  .preview-page-header {
    display: grid;
    gap: 14px;
  }

  .preview-page-header h2 {
    font-size: 24px;
  }

  .preview-page-header p {
    font-size: 12px;
  }

  .preview-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    justify-content: stretch;
  }

  .preview-actions button:last-child {
    grid-column: 1 / -1;
  }

  .preview-stats {
    grid-template-columns: 1fr 1fr;
    gap: 10px;
  }

  .preview-stats article {
    min-height: 92px;
    padding: 14px;
  }

  .preview-stats strong {
    font-size: clamp(16px, 3.6vw, 20px) !important;
  }

  .preview-stats::after {
    min-height: auto;
    padding: 14px;
    font-size: 11px;
    line-height: 1.45;
  }

  .preview-table {
    display: grid;
    gap: 10px;
    margin-top: 14px;
    border: 0;
    background: transparent;
    overflow: visible;
    box-shadow: none;
  }

  .preview-head {
    display: none;
  }

  .preview-row {
    min-width: 0 !important;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    grid-template-areas:
      "date type"
      "description amount"
      "meta meta";
    gap: 6px 10px;
    min-height: auto;
    padding: 12px;
    border: 1px solid rgba(15, 23, 42, 0.08);
    border-radius: 14px;
    background: #fff;
    font-size: 12px;
  }

  .preview-row span:nth-child(1) {
    grid-area: date;
    color: #64748b;
    font-size: 10px;
    font-weight: 900;
  }

  .preview-row span:nth-child(2) {
    grid-area: description;
    color: #0f172a;
    font-size: 13px;
    font-weight: 900;
  }

  .preview-row span:nth-child(3),
  .preview-row span:nth-child(4) {
    color: #64748b;
    font-size: 11px;
    font-weight: 800;
  }

  .preview-row span:nth-child(3) {
    grid-area: meta;
  }

  .preview-row span:nth-child(4) {
    grid-area: meta;
    justify-self: end;
  }

  .preview-row span:nth-child(5) {
    grid-area: amount;
    justify-self: end;
    color: #0f172a;
    font-size: 13px;
    font-weight: 900;
  }

  .preview-row span:nth-child(6) {
    grid-area: type;
    justify-self: end;
  }
}

@media (max-width: 560px) {
  .marketing-header {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 10px;
    padding: 12px 14px;
  }

  .brand-mark,
  .brand-text-dark,
  .marketing-nav-sections {
    display: none;
  }

  .marketing-nav {
    grid-column: 1 / -1;
    width: 100%;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin: 0;
  }

  .marketing-nav-signin,
  .marketing-nav-cta {
    width: 100%;
    min-height: 46px;
  }

  .marketing-main {
    width: calc(100vw - 16px);
    padding-top: 18px;
  }

  .hero {
    gap: 20px;
  }

  .hero-copy {
    padding: 0;
  }

  .hero h1 {
    font-size: clamp(2.7rem, 11vw, 3.8rem);
  }

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

  .hero-actions {
    display: grid;
    grid-template-columns: 1fr;
  }

  .hero-cta-note span + span::before {
    content: none;
    margin: 0;
  }

  .app-preview-shell {
    border-radius: 22px;
    box-shadow:
      0 0 0 7px rgba(15, 23, 42, 0.04),
      0 18px 48px rgba(15, 23, 42, 0.14) !important;
  }

  .trust-strip,
  .feature-section,
  .region-section,
  .pricing-section,
  .faq-section,
  .final-cta {
    border-radius: 22px;
  }
}
