@media (max-width: 1080px) {
  .marketing-nav { gap: 1rem; }
  .app-nav { gap: 0; }
  .app-nav a { padding: 0 0.55rem; font-size: 0.8rem; }
  .account-menu { gap: 0.6rem; }
  .account-copy { display: none; }
  .landing-hero { grid-template-columns: minmax(0, 1fr) minmax(350px, 0.8fr); gap: 3rem; }
  .landing-hero__copy h1 { font-size: clamp(3rem, 5.6vw, 3.8rem); }
  .dashboard-grid { grid-template-columns: 1fr; }
  .document-card__body { grid-template-columns: 1fr; }
  .document-actions { justify-content: flex-start; }
  .document-data { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .compact-form { grid-template-columns: 1fr 1.5fr 90px; }
  .compact-form > div:first-child { grid-column: 1 / -1; }
  .setup-steps { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .setup-connect-form { grid-template-columns: 1fr 1fr; }
  .setup-connect-form > div:first-child, .setup-connect-form .form-callout { grid-column: 1 / -1; }
}

@media (max-width: 860px) {
  .header-inner { gap: 1rem; }
  .brand-copy small { display: none; }
  .marketing-nav { gap: 0.8rem; }
  .marketing-nav > a:not(.button) { font-size: 0.82rem; }
  .landing-hero { min-height: auto; padding: 76px 0; grid-template-columns: 1fr; }
  .hero-summary { width: min(100%, 640px); }
  .trust-strip ul { grid-template-columns: repeat(2, 1fr); gap: 0.9rem; }
  .workflow-section, .security-section { grid-template-columns: 1fr; gap: 2.5rem; }
  .workflow-section .section-note { grid-column: 1; }
  .integration-flow { grid-template-columns: 1fr; }
  .integration-flow__card { min-height: 0; }
  .bank-list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .feature-grid--three, .pricing-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .pricing-card:last-child { grid-column: 1 / -1; }
  .pricing-calculator { grid-template-columns: 1fr 260px; }
  .stat-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .stat-card:nth-child(2) { border-right: 0; }
  .stat-card:nth-child(-n+2) { border-bottom: 1px solid var(--border); }
  .stat-card:first-child { border-radius: 7px 0 0; }
  .stat-card:nth-child(2) { border-radius: 0 7px 0 0; }
  .stat-card:nth-child(3) { border-radius: 0 0 0 7px; }
  .stat-card:last-child { border-radius: 0 0 7px; }
  .integration-grid, .settings-forms { grid-template-columns: 1fr; }
  .upload-box--compact { grid-template-columns: 1fr; }
  .setup-overview { grid-template-columns: 1fr; gap: 1rem; }
  .dashboard-setup-card { grid-template-columns: 1fr; gap: 1rem; }
  .setup-facts { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .setup-facts > div:nth-child(2) { border-right: 0; }
  .setup-facts > div:nth-child(-n+2) { border-bottom: 1px solid var(--border); }
  .setup-connect-form { grid-template-columns: 1fr; }
  .setup-connect-form > * { grid-column: 1 !important; }
  .summary-bar, .documents-summary { grid-template-columns: repeat(3, 1fr); }
  .summary-guidance { grid-column: 1 / -1; border-top: 1px solid var(--border); }
  .summary-bar > div:nth-child(3) { border-right: 0; }
  .statement-summary { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .statement-summary > div:nth-child(2) { border-right: 0; }
  .statement-summary > div:nth-child(-n+2) { border-bottom: 1px solid var(--border); }
  .login-layout { grid-template-columns: 1fr; }
  .login-card { min-height: 560px; grid-column: 1; grid-row: 1; }
  .login-intro { min-height: auto; padding: 3.5rem 2rem; grid-column: 1; grid-row: 2; }
  .login-intro h2 { font-size: 2.4rem; }
}

@media (max-width: 680px) {
  html { scroll-padding-top: 70px; }
  body { font-size: 14px; }
  .header-inner { min-height: 62px; padding: 0 16px; }
  .brand-mark { width: 34px; height: 34px; }
  .brand-copy strong { font-size: 1rem; }
  .nav-toggle {
    display: inline-flex;
    min-height: 42px;
    margin-left: auto;
    padding: 0.45rem 0.75rem;
    align-items: center;
    border: 1px solid var(--border);
    border-radius: 7px;
    background: var(--surface);
    color: var(--ink-900);
    font-size: 0.8rem;
    font-weight: 680;
  }
  .marketing-nav {
    display: none;
    position: absolute;
    top: 62px;
    right: 0;
    left: 0;
    padding: 0.8rem 16px 1rem;
    align-items: stretch;
    flex-direction: column;
    gap: 0;
    border-bottom: 1px solid var(--border);
    background: var(--surface);
    box-shadow: var(--shadow-md);
  }
  .marketing-nav.is-open { display: flex; }
  .marketing-nav > a:not(.button) { padding: 0.72rem 0; border-bottom: 1px solid #e7ecea; }
  .marketing-nav .language-switch { align-self: flex-start; margin-top: 0.7rem; }
  .marketing-nav .button { margin-top: 0.7rem; }
  .app-nav { display: none; }
  .account-copy { display: none; }
  .account-menu { margin-left: auto; gap: 0.5rem; }
  .container { padding: 24px 16px 56px; }
  .breadcrumbs { margin-bottom: 1rem; }
  .page-header, .section-title-row { align-items: flex-start; flex-direction: column; gap: 1rem; }
  .page-header .button { width: 100%; }
  .header-actions { width: 100%; }
  .header-actions .button { width: 100%; }
  .dashboard-setup-card { padding: 1.1rem; }
  .dashboard-setup-card__status > .button { width: 100%; justify-self: stretch; }
  .setup-steps { display: flex; margin-right: -16px; margin-left: -16px; padding: 2px 16px 8px; overflow-x: auto; scroll-snap-type: x proximity; }
  .setup-step { min-width: 245px; scroll-snap-align: start; }
  .setup-panel__header { padding: 1.1rem; flex-direction: column; gap: 0.8rem; }
  .setup-panel__header > .status { align-self: flex-start; }
  .setup-facts { grid-template-columns: 1fr; }
  .setup-facts > div { min-height: 74px; border-right: 0; border-bottom: 1px solid var(--border); }
  .setup-facts > div:last-child { border-bottom: 0; }
  .bank-coverage { grid-template-columns: 1fr; }
  .bank-coverage > div { min-height: 90px; border-right: 0; border-bottom: 1px solid var(--border); }
  .bank-coverage > div:last-child { border-bottom: 0; }
  .setup-connect-form { margin: 1rem; }
  .setup-connect-form .button, .setup-panel__actions .button, .setup-panel__actions form { width: 100%; }
  .setup-panel__actions form .button { width: 100%; }
  .popover-panel { width: 100%; }
  .popover-panel[open] > form { right: 0; left: 0; width: 100%; max-height: calc(100vh - 104px); }
  .client-tabs { margin-right: -16px; margin-left: -16px; padding: 0 8px; }
  .panel-card { margin-right: -1px; margin-left: -1px; }
  .panel-card__header { padding: 1rem; align-items: flex-start; flex-direction: column; gap: 0.75rem; }
  .panel-card__header--actions form, .panel-card__header--actions button { width: 100%; }
  .summary-bar, .documents-summary { grid-template-columns: repeat(2, 1fr); }
  .summary-bar > div { min-height: 70px; padding: 0.8rem; }
  .summary-bar > div:nth-child(2) { border-right: 0; }
  .summary-bar > div:nth-child(3) { border-right: 1px solid var(--border); border-top: 1px solid var(--border); }
  .documents-summary > div:nth-child(3) { border-right: 0; }
  .summary-guidance { grid-column: 1 / -1; border-right: 0 !important; }
  .stat-grid { grid-template-columns: 1fr; }
  .stat-card, .stat-card:nth-child(n) { min-height: 92px; border-right: 0; border-bottom: 1px solid var(--border); border-radius: 0; }
  .stat-card:first-child { border-radius: 7px 7px 0 0; }
  .stat-card:last-child { border-bottom: 0; border-radius: 0 0 7px 7px; }
  .completion-score { text-align: left; }
  .filter-form { align-items: stretch; flex-direction: column; }
  .filter-form .field, .filter-form--compact .field { width: 100%; min-width: 0; }
  .filter-form .button { width: 100%; }
  .form-grid--two, .form-grid--three { grid-template-columns: 1fr; }
  .form-grid__full { grid-column: auto; }
  .compact-form { grid-template-columns: 1fr; }
  .compact-form > div:first-child { grid-column: auto; }
  .bank-coverage-summary { grid-template-columns: 1fr; }
  .bank-coverage-summary > div { border-right: 0; border-bottom: 1px solid var(--border); }
  .bank-coverage-summary > div:last-child { border-bottom: 0; }
  .core-integration-form__actions, .core-integration-form__actions .button { width: 100%; }
  .key-value-table th, .key-value-table td { display: block; width: 100%; }
  .key-value-table th { padding-bottom: 0.15rem; border-bottom: 0; }
  .key-value-table td { padding-top: 0.15rem; }
  .document-card__header { align-items: flex-start; }
  .document-data { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .document-actions, .document-actions > form, .document-actions > form > button, .document-actions > details > summary { width: 100%; }
  .reject-form { align-items: stretch; flex-direction: column; }
  .statement-summary { grid-template-columns: 1fr; }
  .statement-summary > div:nth-child(n) { border-right: 0; border-bottom: 1px solid var(--border); }
  .statement-summary > div:last-child { border-bottom: 0; }
  .pager { grid-template-columns: 1fr 1fr; gap: 0.8rem; }
  .pager > span:nth-child(2) { grid-row: 1; grid-column: 1 / -1; text-align: center; }
  .landing > section { width: min(calc(100% - 32px), var(--content)); }
  .landing-hero { padding: 54px 0 58px; gap: 2.5rem; }
  .landing-hero::before { top: 26%; right: -70%; width: 620px; height: 620px; }
  .landing-hero__copy h1 { font-size: clamp(2.65rem, 11.5vw, 3.45rem); line-height: 1.01; }
  .landing-actions { align-items: stretch; flex-direction: column; }
  .landing-actions .button { width: 100%; }
  .hero-summary { padding: 1.15rem; border-radius: 18px; }
  .hero-summary::before { margin: -1.15rem -1.15rem 1.15rem; }
  .hero-summary__header { align-items: flex-start; flex-direction: column; }
  .trust-strip ul { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.9rem 1.2rem; }
  .landing-section { padding-top: 72px; padding-bottom: 72px; }
  .section-heading { margin-bottom: 2rem; }
  .feature-grid--three, .pricing-grid, .faq-list { grid-template-columns: 1fr; }
  .pricing-calculator { grid-template-columns: 1fr; }
  .pricing-calculator__result { border-top: 1px solid var(--border); border-left: 0; }
  .range-row { grid-template-columns: 1fr; }
  .pricing-card:last-child { grid-column: auto; }
  .feature-card { min-height: 0; }
  .feature-card__number { margin-bottom: 1.5rem; }
  .workflow-section { gap: 1.5rem; }
  .workflow-section .section-note { margin: -1rem 0 0; }
  .cockpit__header { align-items: flex-start; flex-direction: column; }
  .cockpit__metrics { grid-template-columns: 1fr; }
  .cockpit__metrics article { min-height: 90px; border-right: 0; border-bottom: 1px solid var(--border); }
  .cockpit__metrics article:last-child { border-bottom: 0; }
  .security-section { gap: 1.5rem; }
  .automation-goal { grid-template-columns: 1fr; gap: 1rem; }
  .bank-listing { margin-top: 3rem; padding-top: 3rem; }
  .bank-list { grid-template-columns: 1fr; }
  .final-cta { width: 100% !important; margin-bottom: 0; padding: 64px 20px !important; border-radius: 0; }
  .footer-inner { grid-template-columns: 1fr; }
  .footer-inner nav { grid-template-columns: 1fr; }
  .footer-meta { grid-column: 1; }
  .legal-page { width: min(calc(100% - 32px), 1120px); padding: 50px 0 70px; }
  .legal-layout { grid-template-columns: 1fr; gap: 1.5rem; }
  .legal-toc { position: static; }
  .legal-toc nav { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.15rem 1rem; }
  .legal-document { padding: 1.5rem; }
  .login-intro { padding: 3rem 1.25rem; }
  .login-intro h2 { font-size: 2rem; }
  .login-card { min-height: auto; padding: 3.5rem 1.25rem; }
  .button-small { min-height: 40px; }
  .error-state { margin: 3rem 0; padding: 2rem 1.2rem; }
}

@media (max-width: 420px) {
  .landing-hero__copy h1 { font-size: clamp(2.4rem, 12vw, 2.9rem); }
  .hero-price { grid-template-columns: 1fr; }
  .hero-price p + p { border-top: 1px solid rgba(255, 255, 255, 0.12); border-left: 0; }
  .trust-strip ul { grid-template-columns: 1fr; }
  .legal-toc nav { grid-template-columns: 1fr; }
}

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

@media print {
  .site-header, .site-footer, .button, button, .client-tabs, .filter-bar, .breadcrumbs { display: none !important; }
  body { background: white; color: black; }
  .container { width: 100%; max-width: none; padding: 0; }
  .panel-card, .period-overview, .statement-summary { break-inside: avoid; border-color: #bbb; box-shadow: none; }
  .table-shell { overflow: visible; }
}
