/* =========================================================
   AirDoc AI v4 — visual stabilisation and viewport-fit hero
   Loaded after styles.css so this file is the final authority.
   ========================================================= */

:root {
  --v4-container: min(1320px, calc(100% - 48px));
  --v4-page-pad: clamp(78px, 8vw, 118px);
  --v4-heading-track: -.008em;
  --v4-display-track: -.014em;
  --v4-ease: cubic-bezier(.2, .78, .2, 1);
  --v4-border: rgba(11, 60, 93, .105);
  --v4-shadow: 0 20px 55px rgba(11, 60, 93, .095);
  --v4-shadow-lg: 0 34px 90px rgba(11, 60, 93, .15);
}

html {
  scroll-padding-top: 104px
}

body {
  font-size: 16px;
  line-height: 1.62;
  letter-spacing: 0;
  font-synthesis: none;
  font-feature-settings: "kern" 1, "liga" 1, "calt" 1;
  text-rendering: optimizeLegibility;
}

.container {
  width: var(--v4-container)
}

main {
  min-width: 0
}

main>* {
  min-width: 0
}

h1,
h2,
h3,
h4,
h5,
h6 {
  letter-spacing: var(--v4-heading-track) !important;
  line-height: 1.08;
  text-wrap: balance;
  overflow-wrap: normal;
  word-break: normal;
  font-kerning: normal;
}

h1,
.section-title,
.inner-hero h1,
.article-header h1,
.document-tool-head h1,
.cta-panel h2 {
  letter-spacing: var(--v4-display-track) !important;
}

p {
  line-height: 1.68;
  text-wrap: pretty
}

.section {
  padding: var(--v4-page-pad) 0
}

.section-sm {
  padding: clamp(54px, 6vw, 78px) 0
}

.section-title {
  font-size: clamp(2.55rem, 4.65vw, 4.75rem);
  line-height: 1.045;
  margin-bottom: 20px
}

.section-copy {
  font-size: clamp(1rem, 1.25vw, 1.16rem);
  line-height: 1.72
}

.kicker {
  letter-spacing: .13em;
  line-height: 1.3
}

.card,
.library-card,
.pricing-card,
.tool-side,
.tool-main,
.compare-panel,
.faq-item {
  border-color: var(--v4-border)
}

.card {
  padding: clamp(24px, 2.5vw, 32px)
}

.card h2,
.card h3,
.library-card h2,
.library-card h3 {
  line-height: 1.2;
  letter-spacing: -.014em !important
}

/* Focus and interaction consistency */
a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
summary:focus-visible {
  outline: 3px solid rgba(34, 211, 238, .62);
  outline-offset: 3px;
}

.btn {
  border-radius: 13px;
  min-height: 48px;
  padding: 11px 20px;
  white-space: nowrap
}

.btn .icon {
  width: 18px;
  height: 18px
}

.btn-ghost {
  padding-inline: 12px
}

.icon-box {
  flex: 0 0 auto
}

/* Header: more stable at all viewport widths */
.site-header {
  padding: 12px 0
}

.nav-shell {
  width: min(1360px, calc(100% - 32px));
  min-height: 64px;
  padding: 8px 10px 8px 18px;
  border-radius: 18px;
  gap: 20px
}

.brand {
  min-width: 154px
}

.brand img {
  width: 154px;
  height: 38px
}

.site-nav {
  gap: 2px
}

.nav-link,
.nav-drop-btn {
  padding: 9px 11px;
  font-size: .92rem;
  border-radius: 10px
}

.nav-actions {
  gap: 8px
}

.nav-login {
  font-size: .9rem
}

.nav-dropdown-menu {
  max-height: min(70vh, 640px);
  overflow: auto;
  overscroll-behavior: contain
}

.dropdown-link {
  padding: 11px
}

.dropdown-link>span:last-child {
  line-height: 1.3
}

.dropdown-link>span:last-child>span {
  line-height: 1.4
}

/* =========================================================
   Viewport-fit hero
   ========================================================= */
.home-hero.home-hero-v4 {
  position: relative;
  min-height: 100svh;
  padding: 104px 0 24px;
  display: flex;
  align-items: center;
  overflow: hidden;
  isolation: isolate;
  background:
    radial-gradient(circle at 78% 28%, rgba(34, 211, 238, .17), transparent 28%),
    radial-gradient(circle at 58% 88%, rgba(29, 161, 242, .10), transparent 31%),
    linear-gradient(180deg, #fff 0%, #f6fbff 73%, #eef9ff 100%);
}

.home-hero-v4::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -3;
  background-image:
    linear-gradient(rgba(11, 60, 93, .023) 1px, transparent 1px),
    linear-gradient(90deg, rgba(11, 60, 93, .023) 1px, transparent 1px);
  background-size: 52px 52px;
  mask-image: linear-gradient(to bottom, black 12%, black 78%, transparent 100%);
}

.hero-grid-lines {
  position: absolute;
  z-index: -2;
  width: min(62vw, 900px);
  height: min(62vw, 900px);
  right: -15%;
  top: -18%;
  border-radius: 50%;
  border: 1px solid rgba(29, 161, 242, .12);
  box-shadow: 0 0 0 75px rgba(29, 161, 242, .028), 0 0 0 150px rgba(34, 211, 238, .018);
  transform: rotate(-12deg);
}

.home-hero-v4 .home-hero-glow {
  width: min(58vw, 780px);
  height: min(58vw, 780px);
  top: 5%;
  right: -12%;
  opacity: .75;
  z-index: -1;
}

.home-hero-v4 .home-hero-grid {
  width: var(--v4-container);
  min-height: calc(100svh - 128px);
  max-height: 850px;
  display: grid;
  grid-template-columns: minmax(0, .88fr) minmax(540px, 1.12fr);
  gap: clamp(34px, 4vw, 64px);
  align-items: center;
}

.home-hero-v4 .home-hero-copy {
  padding: 18px 0 46px;
  min-width: 0
}

.home-hero-v4 .integration-pill {
  font-size: .76rem;
  padding: 7px 12px;
  box-shadow: none;
  background: rgba(255, 255, 255, .76)
}

.home-hero-v4 h1 {
  margin: 18px 0 22px;
  max-width: 760px;
  font-size: clamp(3.35rem, 6vw, 6.25rem);
  line-height: .97;
  letter-spacing: -.032em !important;
}

.home-hero-v4 h1 span {
  display: block
}

.home-hero-v4 .hero-question {
  color: var(--deep)
}

.home-hero-v4 .hero-highlight {
  color: var(--blue)
}

.home-hero-v4 .hero-lead {
  max-width: 670px;
  margin: 0 0 24px;
  font-size: clamp(1rem, 1.25vw, 1.18rem);
  line-height: 1.66;
  color: #557184;
}

.home-hero-v4 .hero-actions {
  display: flex;
  align-items: center;
  gap: 10px 12px;
  flex-wrap: wrap
}

.hero-text-link {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 10px 4px;
  color: var(--blue);
  font-weight: 740;
  transition: gap .2s var(--v4-ease), color .2s
}

.hero-text-link:hover {
  gap: 11px;
  color: var(--deep)
}

.hero-text-link .icon {
  width: 17px;
  height: 17px
}

.home-hero-v4 .trial-note {
  margin-top: 18px;
  font-size: .82rem;
  line-height: 1.5
}

.home-hero-v4 .trial-note strong {
  color: var(--deep)
}

.hero-trust-row {
  display: flex;
  flex-wrap: wrap;
  gap: 9px 18px;
  margin-top: 20px;
  color: #607b8d;
  font-size: .77rem;
  flex-direction: row;
}

.hero-trust-row span {
  display: inline-flex;
  align-items: center;
  gap: 6px
}

.hero-trust-row .icon {
  width: 15px;
  height: 15px;
  color: var(--blue)
}

.hero-scroll-cue {
  position: absolute;
  left: 50%;
  bottom: 13px;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: 7px;
  color: #668092;
  font-size: .7rem;
  letter-spacing: .09em;
  text-transform: uppercase;
  font-weight: 700;
  z-index: 5;
}

.hero-scroll-cue .icon {
  width: 16px;
  height: 16px;
  animation: v4Cue 1.8s ease-in-out infinite
}

@keyframes v4Cue {
  50% {
    transform: translateY(4px)
  }
}

/* Hero pipeline artwork */
.hero-pipeline {
  position: relative;
  min-height: 0;
  height: min(65vh, 590px);
  max-height: 590px;
  min-width: 0;
  perspective: 1500px;
  transform-style: preserve-3d;
  transition: transform .2s linear;
}

.pipeline-window {
  position: absolute;
  inset: 4% 1% 6%;
  display: grid;
  grid-template-rows: 42px 1fr 42px;
  overflow: hidden;
  border: 1px solid rgba(29, 161, 242, .16);
  border-radius: 30px;
  background: rgba(255, 255, 255, .82);
  box-shadow: var(--v4-shadow-lg);
  backdrop-filter: blur(22px);
  transform: rotateY(-2deg) rotateX(1deg);
}

.pipeline-toolbar,
.pipeline-footer {
  display: flex;
  align-items: center;
  padding: 0 18px;
  background: rgba(249, 253, 255, .86);
  color: #597386;
  font-size: .72rem
}

.pipeline-toolbar {
  justify-content: space-between;
  border-bottom: 1px solid var(--v4-border)
}

.pipeline-footer {
  justify-content: center;
  gap: clamp(15px, 3vw, 34px);
  border-top: 1px solid var(--v4-border)
}

.pipeline-footer span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap
}

.pipeline-footer .icon {
  width: 14px;
  height: 14px;
  color: var(--blue)
}

.pipeline-dots {
  display: flex;
  gap: 5px
}

.pipeline-dots i {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #bdd3e0
}

.pipeline-dots i:nth-child(1) {
  background: #ff8d84
}

.pipeline-dots i:nth-child(2) {
  background: #ffc85d
}

.pipeline-dots i:nth-child(3) {
  background: #5dd7a8
}

.pipeline-live {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: #1c7f62;
  font-weight: 720
}

.pipeline-live i {
  position: relative;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #22b982;
}

.pipeline-live i::after {
  content: "";
  position: absolute;
  inset: -5px;
  border-radius: 50%;
  background: rgba(34, 185, 130, 0.4);
  animation: v4Live 1.6s ease-in-out infinite;
  z-index: -1;
}

@keyframes v4Live {
  0% {
    transform: scale(0.6);
    opacity: 1;
  }
  100% {
    transform: scale(1.6);
    opacity: 0;
  }
}

.pipeline-canvas {
  position: relative;
  display: grid;
  grid-template-columns: minmax(150px, .9fr) minmax(180px, .9fr) minmax(160px, 1fr);
  gap: clamp(16px, 2vw, 26px);
  align-items: center;
  padding: clamp(22px, 3vw, 36px);
  overflow: hidden;
  background: radial-gradient(circle at 50% 50%, rgba(215, 242, 255, .75), transparent 46%)
}

.pipeline-route {
  position: absolute;
  left: 13%;
  right: 13%;
  top: 50%;
  height: 2px;
  transform: translateY(-50%);
  background: linear-gradient(90deg, rgba(29, 161, 242, .08), var(--blue), var(--cyan), var(--blue), rgba(29, 161, 242, .08));
  box-shadow: 0 0 18px rgba(34, 211, 238, .42)
}

.pipeline-route::before,
.pipeline-route::after {
  content: "";
  position: absolute;
  top: 50%;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: #fff;
  border: 2px solid var(--blue);
  transform: translateY(-50%)
}

.pipeline-route::before {
  left: 30%
}

.pipeline-route::after {
  right: 30%
}

.pipeline-route span {
  position: absolute;
  inset: -18px 0;
  background: linear-gradient(90deg, transparent 0%, rgba(34, 211, 238, .12) 50%, transparent 100%);
  filter: blur(9px);
  animation: v4Route 3.8s ease-in-out infinite
}

@keyframes v4Route {

  0%,
  100% {
    opacity: .35;
    transform: scaleX(.78)
  }

  50% {
    opacity: 1;
    transform: scaleX(1)
  }
}

.pipeline-packet {
  position: absolute;
  z-index: 5;
  left: 17%;
  top: 50%;
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  background: #fff;
  color: var(--blue);
  box-shadow: 0 10px 24px rgba(29, 161, 242, .24);
  transform: translate(-50%, -50%);
  animation: v4Packet 7.5s var(--v4-ease) infinite
}

.pipeline-packet .icon {
  width: 19px;
  height: 19px
}

@keyframes v4Packet {

  0%,
  7% {
    left: 17%;
    opacity: 0;
    transform: translate(-50%, -50%) scale(.72)
  }

  12% {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1)
  }

  45% {
    left: 49%;
    opacity: 1
  }

  54% {
    left: 49%;
    transform: translate(-50%, -50%) scale(.86) rotate(8deg)
  }

  79% {
    left: 82%;
    opacity: 1;
    transform: translate(-50%, -50%) scale(1)
  }

  88%,
  100% {
    left: 82%;
    opacity: 0;
    transform: translate(-50%, -50%) scale(.75)
  }
}

.pipeline-stage {
  position: relative;
  z-index: 3;
  min-width: 0
}

.pipeline-stage-head {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 10px;
  color: #5a7689;
  font-size: .68rem;
  font-weight: 750;
  text-transform: uppercase;
  letter-spacing: .08em
}

.stage-number {
  width: 24px;
  height: 24px;
  border-radius: 8px;
  display: grid;
  place-items: center;
  background: #e9f7ff;
  color: #0b669d;
  font-size: .64rem
}

.inbox-mini,
.xero-mini,
.airdoc-state {
  border: 1px solid var(--v4-border);
  border-radius: 18px;
  background: rgba(255, 255, 255, .94);
  box-shadow: 0 16px 35px rgba(11, 60, 93, .1)
}

.inbox-mini {
  padding: 10px
}

.mini-app-row,
.mini-email {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 9px;
  align-items: center
}

.mini-app-row {
  padding: 7px 7px 12px;
  border-bottom: 1px solid var(--line)
}

.mini-app-icon,
.mini-file-icon {
  display: grid;
  place-items: center;
  color: var(--blue);
  background: #eaf7ff;
  border-radius: 9px
}

.mini-app-icon {
  width: 34px;
  height: 34px
}

.mini-file-icon {
  width: 29px;
  height: 29px
}

.mini-app-icon .icon,
.mini-file-icon .icon {
  width: 16px;
  height: 16px
}

.mini-app-row strong,
.mini-email strong {
  display: block;
  font-size: .69rem;
  line-height: 1.25;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis
}

.mini-app-row small,
.mini-email small {
  display: block;
  color: var(--muted);
  font-size: .58rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis
}

.mini-count {
  min-width: 23px;
  height: 23px;
  border-radius: 8px;
  display: grid;
  place-items: center;
  background: var(--blue);
  color: #fff;
  font-size: .64rem;
  font-weight: 800
}

.mini-email {
  padding: 9px 7px;
  border-radius: 11px;
  margin-top: 4px;
  transition: .25s
}

.mini-email.active {
  background: #eaf7ff;
  box-shadow: inset 3px 0 0 var(--blue)
}

.mini-email time {
  font-size: .56rem;
  color: #7f93a1
}

.stage-airdoc {
  display: grid;
  place-items: center;
  align-self: stretch
}

.airdoc-core-ring {
  position: absolute;
  width: 205px;
  height: 205px;
  border-radius: 50%;
  border: 1px solid rgba(29, 161, 242, .25);
  box-shadow: 0 0 0 18px rgba(29, 161, 242, .045), 0 0 55px rgba(34, 211, 238, .24);
  animation: v4Core 5s ease-in-out infinite
}

.airdoc-core-ring::before,
.airdoc-core-ring::after {
  content: "";
  position: absolute;
  border-radius: 50%;
  background: var(--cyan);
  box-shadow: 0 0 12px var(--cyan)
}

.airdoc-core-ring::before {
  width: 8px;
  height: 8px;
  top: 12px;
  left: 48%
}

.airdoc-core-ring::after {
  width: 6px;
  height: 6px;
  right: 22px;
  bottom: 24px
}

@keyframes v4Core {
  50% {
    transform: rotate(180deg) scale(1.04)
  }
}

.stage-airdoc img {
  position: absolute;
  z-index: 2;
  width: min(45%, 175px);
  top: 3%;
  filter: drop-shadow(0 18px 18px rgba(11, 60, 93, .18));
  animation: v4Mascot 5.6s ease-in-out infinite
}

@keyframes v4Mascot {
  50% {
    transform: translateY(-7px)
  }
}

.airdoc-state {
  position: absolute;
  z-index: 3;
  left: 50%;
  bottom: 2%;
  width: min(100%, 210px);
  padding: 13px 14px;
  transform: translateX(-50%)
}

.state-kicker {
  display: block;
  color: var(--blue);
  font-size: .58rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .12em
}

.airdoc-state>strong {
  display: block;
  font-size: .77rem;
  margin: 2px 0 8px
}

.scan-progress {
  height: 5px;
  border-radius: 999px;
  overflow: hidden;
  background: #e8f0f5
}

.scan-progress i {
  display: block;
  width: 36%;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--blue), var(--cyan));
  animation: v4Scan 2.6s ease-in-out infinite
}

@keyframes v4Scan {
  0% {
    transform: translateX(-100%)
  }

  70%,
  100% {
    transform: translateX(280%)
  }
}

.airdoc-state ul {
  list-style: none;
  padding: 0;
  margin: 8px 0 0;
  display: grid;
  gap: 3px
}

.airdoc-state li {
  display: flex;
  align-items: center;
  gap: 5px;
  color: #5a7486;
  font-size: .58rem
}

.airdoc-state li .icon {
  width: 11px;
  height: 11px;
  color: var(--success)
}

.xero-mini {
  padding: 13px;
  position: relative
}

.xero-mark {
  width: 39px;
  height: 39px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: #13b5ea;
  color: #fff;
  font-size: .69rem;
  font-weight: 700;
  letter-spacing: -.04em
}

.xero-mini>.status-badge {
  position: absolute;
  right: 12px;
  top: 14px;
  padding: 4px 7px
}

.xero-mini>.status-badge .icon {
  width: 12px;
  height: 12px
}

.xero-invoice-head {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: end;
  margin: 14px 0 10px
}

.xero-invoice-head small {
  display: block;
  color: var(--muted);
  font-size: .56rem
}

.xero-invoice-head strong {
  font-size: .74rem
}

.xero-invoice-head>strong {
  color: var(--blue)
}

.xero-mini dl {
  margin: 0
}

.xero-mini dl div {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  padding: 5px 0;
  border-top: 1px solid #edf2f5;
  font-size: .61rem
}

.xero-mini dt {
  color: var(--muted)
}

.xero-mini dd {
  margin: 0;
  font-weight: 720
}

.xero-ready {
  display: flex;
  gap: 8px;
  align-items: center;
  margin-top: 10px;
  padding: 8px;
  border-radius: 10px;
  background: #eafaf4;
  color: #197257
}

.xero-ready>.icon {
  width: 16px;
  height: 16px
}

.xero-ready strong,
.xero-ready small {
  display: block;
  line-height: 1.25
}

.xero-ready strong {
  font-size: .64rem
}

.xero-ready small {
  font-size: .53rem;
  color: #4a7d6c
}

.pipeline-float {
  position: absolute;
  z-index: 8;
  border: 1px solid rgba(29, 161, 242, .16);
  background: rgba(255, 255, 255, .92);
  box-shadow: 0 15px 34px rgba(11, 60, 93, .12);
  backdrop-filter: blur(13px);
  border-radius: 14px;
  color: #587286;
  font-size: .66rem;
  animation: v4Float 5s ease-in-out infinite
}

@keyframes v4Float {
  50% {
    transform: translateY(-7px)
  }
}

.float-confidence {
  right: -1%;
  top: 0;
  padding: 10px 13px
}

.float-confidence span,
.float-confidence strong {
  display: block
}

.float-confidence strong {
  font-size: 1rem;
  color: var(--deep)
}

.float-time {
  left: -1%;
  bottom: 0%;
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 9px 11px;
  animation-delay: -2.1s
}

.float-time .icon {
  width: 16px;
  height: 16px;
  color: var(--blue)
}

/* Intro video section */
.video-section-grid {
  gap: clamp(42px, 6vw, 78px)
}

.video-copy {
  gap: 18px
}

.video-copy .section-title {
  font-size: clamp(2.65rem, 4.7vw, 4.9rem)
}

.video-poster {
  border-radius: 28px
}

.video-poster img {
  aspect-ratio: 16/9
}

.video-points span {
  line-height: 1.45
}

/* Shared content spacing */
.problem-solution,
.security-grid,
.scroll-workflow,
.faq-layout {
  gap: clamp(34px, 5vw, 72px)
}

.problem-panel,
.solution-panel {
  border-radius: 28px
}

.solution-flow {
  gap: 12px
}

.workflow-heading,
.section-split-heading,
.pricing-heading {
  margin-bottom: clamp(34px, 5vw, 58px)
}

.workflow-step h3 {
  line-height: 1.12
}

.case-card {
  min-height: 330px
}

.case-card h3 {
  letter-spacing: -.012em !important;
  line-height: 1.18
}

.cta-panel {
  border-radius: 32px;
  gap: 32px
}

.cta-panel h2 {
  line-height: 1.04
}

/* Pricing: prevent cramped cards and maintain readable copy */
.pricing-grid {
  grid-template-columns: repeat(5, minmax(205px, 1fr));
  gap: 16px;
  align-items: stretch;
}

.pricing-card {
  padding: 26px 22px;
  border-radius: 23px
}

.pricing-card>p {
  min-height: 72px;
  line-height: 1.55
}

.pricing-price strong {
  letter-spacing: -.022em !important
}

.pricing-volume {
  align-items: flex-end
}

.pricing-features li {
  line-height: 1.45
}

.pricing-table th,
.pricing-table td {
  white-space: normal
}

/* Blogs: reliable image crops and card rhythm */
.blog-grid {
  gap: 22px
}

.blog-card {
  height: 100%
}

.blog-cover {
  overflow: hidden;
  background: #eaf7ff
}

.blog-cover img {
  width: 100%;
  aspect-ratio: 16/10;
  object-fit: cover
}

.blog-body {
  display: flex;
  flex-direction: column;
  min-height: 245px
}

.blog-body h2,
.blog-body h3 {
  line-height: 1.18;
  letter-spacing: -.015em !important
}

.blog-body .blog-link,
.blog-body>a:last-child {
  margin-top: auto
}

.featured-blog {
  align-items: stretch
}

.featured-blog img {
  height: 100%;
  object-fit: cover
}

.article-header h1 {
  line-height: 1.03
}

.article-body h2 {
  letter-spacing: -.017em !important;
  line-height: 1.12
}

.article-body h3 {
  letter-spacing: -.012em !important;
  line-height: 1.2
}

/* Tool pages: fix overflow, spacing and table behaviour */
.document-tool-page {
  padding: 142px 0 86px
}

.document-tool-head {
  align-items: end;
  margin-bottom: 34px
}

.document-tool-head h1 {
  font-size: clamp(2.65rem, 5vw, 5rem);
  line-height: 1.04;
  margin: 10px 0 14px
}

.document-tool-head .section-copy {
  max-width: 760px
}

.tool-workspace {
  gap: 24px;
  grid-template-columns: minmax(320px, .72fr) minmax(0, 1.28fr)
}

.tool-workspace>* {
  min-width: 0
}

.tool-side,
.tool-main {
  padding: 26px;
  border-radius: 26px
}

.tool-main {
  overflow: hidden
}

.tool-main-header {
  align-items: flex-start;
  flex-wrap: wrap
}

.drop-area {
  padding: 30px 20px
}

.data-table-wrap {
  max-width: 100%;
  overflow: auto;
  scrollbar-gutter: stable
}

.data-table {
  font-variant-numeric: tabular-nums
}

.data-table th {
  line-height: 1.3
}

.data-table td {
  vertical-align: middle
}

.data-table input,
.data-table select {
  min-width: 90px
}

.form-grid,
.review-grid,
.compact-grid {
  min-width: 0
}

.field {
  min-width: 0
}

.field input,
.field select,
.field textarea {
  width: 100%;
  min-width: 0
}

.empty-state {
  min-height: 470px
}

.ocr-split {
  min-width: 0
}

.source-frame {
  min-width: 0
}

.source-frame img,
.source-frame canvas {
  height: auto
}

.summary-grid {
  grid-template-columns: repeat(auto-fit, minmax(130px, 1fr))
}

.tool-library-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px
}

.library-card {
  min-height: 310px
}

.library-card h2,
.library-card h3 {
  font-size: 1.22rem
}

/* About, contact and legal pages */
.inner-hero {
  padding: 150px 0 92px
}

.inner-hero h1 {
  line-height: 1.03;
  font-size: clamp(3.1rem, 6.5vw, 6.5rem)
}

.inner-hero-grid {
  align-items: center
}

.contact-layout {
  gap: clamp(28px, 5vw, 62px)
}

.contact-card,
.contact-aside {
  border-radius: 26px
}

.legal-content {
  line-height: 1.72
}

.legal-content h2,
.legal-content h3 {
  line-height: 1.18
}

/* Footer */
.footer-grid {
  gap: clamp(28px, 4vw, 52px)
}

.footer-col {
  min-width: 0
}

.footer-col a {
  line-height: 1.45;
  padding-block: 3px
}

.footer-bottom {
  gap: 16px
}

/* Responsive adjustments */
@media(max-width:1280px) {
  .home-hero-v4 .home-hero-grid {
    grid-template-columns: minmax(0, .92fr) minmax(500px, 1.08fr);
    gap: 32px
  }

  .home-hero-v4 h1 {
    font-size: clamp(3.25rem, 5.5vw, 5.5rem)
  }

  .pricing-grid {
    grid-template-columns: repeat(3, minmax(220px, 1fr))
  }

  .pricing-card.featured {
    transform: none
  }

  .pricing-card.featured:hover {
    transform: translateY(-7px)
  }
}

@media(max-width:1080px) {
  :root {
    --v4-container: min(100% - 36px, 1120px)
  }

  .home-hero.home-hero-v4 {
    padding-top: 110px;
    display: block;
    min-height: auto
  }

  .home-hero-v4 .home-hero-grid {
    min-height: 0;
    max-height: none;
    grid-template-columns: 1fr;
    gap: 18px
  }

  .home-hero-v4 .home-hero-copy {
    padding: 30px 0 6px;
    max-width: 900px
  }

  .home-hero-v4 h1 {
    max-width: 900px;
    font-size: clamp(3.7rem, 8.5vw, 6.2rem)
  }

  .hero-pipeline {
    height: min(68vw, 610px);
    min-height: 500px;
    max-width: 920px;
    width: 100%;
    margin: 0 auto 28px
  }

  .hero-scroll-cue {
    display: none
  }

  .pipeline-window {
    inset: 2% 0 5%
  }

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

  .tool-workspace {
    grid-template-columns: 1fr
  }

  .tool-side {
    position: relative;
    top: auto
  }

  .pricing-grid {
    grid-template-columns: repeat(2, minmax(220px, 1fr))
  }
}

@media(max-width:760px) {
  :root {
    --v4-container: min(100% - 28px, 1240px);
    --v4-page-pad: 74px
  }

  .section-title {
    font-size: clamp(2.35rem, 11vw, 3.85rem)
  }

  .site-header {
    padding: 8px 0
  }

  .nav-shell {
    width: calc(100% - 20px);
    min-height: 58px;
    padding: 7px 8px 7px 13px;
    border-radius: 15px
  }

  .brand img {
    width: 135px;
    height: 34px
  }

  .mobile-toggle {
    width: 42px;
    height: 42px
  }

  .mobile-panel {
    padding-top: 90px
  }

  .mobile-panel a {
    font-size: 1.18rem;
    padding: 13px
  }

  .home-hero.home-hero-v4 {
    padding: 92px 0 12px;
    background: linear-gradient(180deg, #fff 0%, #f4fbff 80%, #fff 100%);
    align-items: flex-start
  }

  .home-hero-v4 .home-hero-copy {
    padding: 22px 0 8px
  }

  .home-hero-v4 .integration-pill {
    max-width: 100%;
    font-size: .69rem
  }

  .home-hero-v4 h1 {
    font-size: clamp(3rem, 14vw, 4.75rem);
    line-height: .98;
    margin: 16px 0 18px
  }

  .home-hero-v4 .hero-lead {
    font-size: 1rem;
    line-height: 1.62;
    margin-bottom: 20px
  }

  .home-hero-v4 .hero-actions {
    align-items: stretch
  }

  .home-hero-v4 .hero-actions .btn {
    flex: 1 1 calc(50% - 6px)
  }

  .hero-text-link {
    flex-basis: 100%;
    justify-content: flex-start;
    padding-left: 2px
  }

  .hero-trust-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px 12px
  }

  .hero-trust-row span:last-child {
    grid-column: 1/-1
  }

  .hero-pipeline {
    height: 560px;
    min-height: 560px;
    width: calc(100% + 16px);
    margin: 8px -8px 8px
  }

  .pipeline-window {
    inset: 2% 0 4%;
    grid-template-rows: 40px 1fr 38px;
    border-radius: 24px
  }

  .pipeline-canvas {
    grid-template-columns: 1fr;
    grid-template-rows: 1fr 1fr 1fr;
    gap: 8px;
    padding: 16px 20px
  }

  .pipeline-route {
    left: 50%;
    right: auto;
    top: 11%;
    bottom: 11%;
    width: 2px;
    height: auto;
    transform: translateX(-50%);
    background: linear-gradient(180deg, rgba(29, 161, 242, .08), var(--blue), var(--cyan), var(--blue), rgba(29, 161, 242, .08))
  }

  .pipeline-route::before,
  .pipeline-route::after {
    left: 50%;
    top: auto;
    transform: translateX(-50%)
  }

  .pipeline-route::before {
    top: 30%
  }

  .pipeline-route::after {
    bottom: 30%
  }

  .pipeline-packet {
    left: 50%;
    top: 17%;
    animation: v4PacketMobile 7.5s var(--v4-ease) infinite
  }

  @keyframes v4PacketMobile {

    0%,
    7% {
      top: 17%;
      opacity: 0;
      transform: translate(-50%, -50%) scale(.72)
    }

    12% {
      opacity: 1;
      transform: translate(-50%, -50%) scale(1)
    }

    45% {
      top: 50%;
      opacity: 1
    }

    54% {
      top: 50%;
      transform: translate(-50%, -50%) scale(.86) rotate(8deg)
    }

    79% {
      top: 83%;
      opacity: 1;
      transform: translate(-50%, -50%) scale(1)
    }

    88%,
    100% {
      top: 83%;
      opacity: 0;
      transform: translate(-50%, -50%) scale(.75)
    }
  }

  .pipeline-stage {
    width: min(76%, 300px);
    justify-self: start
  }

  .stage-inbox {
    align-self: start
  }

  .stage-airdoc {
    justify-self: end;
    width: min(76%, 300px)
  }

  .stage-xero {
    justify-self: start;
    align-self: end
  }

  .stage-airdoc img {
    width: 105px;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    animation: none
  }

  .airdoc-core-ring {
    width: 126px;
    height: 126px;
    left: 0;
    top: 50%;
    transform: translateY(-50%)
  }

  .airdoc-state {
    position: relative;
    left: auto;
    bottom: auto;
    transform: none;
    width: 100%;
    padding-left: 105px;
    min-height: 112px;
    display: flex;
    flex-direction: column;
    justify-content: center
  }

  .mini-email:nth-child(n+3) {
    display: none
  }

  .inbox-mini,
  .xero-mini {
    padding: 9px
  }

  .xero-mini dl div:nth-child(2) {
    display: none
  }

  .pipeline-stage-head {
    margin-bottom: 5px
  }

  .pipeline-footer {
    gap: 10px;
    padding: 0 10px
  }

  .pipeline-footer span {
    font-size: .6rem
  }

  .pipeline-footer span:nth-child(2) {
    display: none
  }

  .float-confidence {
    right: 0;
    top: 0
  }

  .float-time {
    display: none
  }

  .video-poster {
    border-radius: 21px
  }

  .video-play {
    width: 66px;
    height: 66px
  }

  .problem-panel,
  .solution-panel {
    padding: 28px
  }

  .pricing-grid,
  .tool-library-grid {
    grid-template-columns: 1fr
  }

  .pricing-card>p {
    min-height: 0
  }

  .document-tool-page {
    padding-top: 118px
  }

  .document-tool-head {
    display: block
  }

  .document-tool-head h1 {
    font-size: clamp(2.55rem, 12vw, 4rem)
  }

  .tool-side,
  .tool-main {
    padding: 19px;
    border-radius: 22px
  }

  .tool-main-header {
    display: grid
  }

  .ocr-split {
    grid-template-columns: 1fr
  }

  .review-grid {
    grid-template-columns: 1fr
  }

  .review-grid .full {
    grid-column: auto
  }

  .summary-grid {
    grid-template-columns: 1fr 1fr
  }

  .cta-panel {
    padding: 30px 24px
  }

  .inner-hero {
    padding: 125px 0 72px
  }

  .inner-hero h1 {
    font-size: clamp(2.9rem, 13vw, 4.8rem)
  }
}

@media(max-width:480px) {
  .home-hero-v4 .hero-actions .btn {
    flex-basis: 100%;
    width: 100%
  }

  .home-hero-v4 h1 {
    font-size: clamp(2.85rem, 14vw, 4.15rem)
  }

  .hero-trust-row {
    grid-template-columns: 1fr
  }

  .hero-trust-row span:last-child {
    grid-column: auto
  }

  .hero-pipeline {
    height: 545px;
    min-height: 545px
  }

  .pipeline-stage {
    width: 82%
  }

  .stage-airdoc {
    width: 82%
  }

  .pipeline-toolbar>span:nth-child(2) {
    display: none
  }

  .pipeline-footer span:nth-child(3) {
    display: none
  }

  .pipeline-footer {
    justify-content: flex-start
  }

  .summary-grid {
    grid-template-columns: 1fr
  }

  .mapping-grid {
    grid-template-columns: 1fr
  }

  .mapping-arrow {
    transform: rotate(90deg)
  }
}

@media(max-height:760px) and (min-width:1081px) {
  .home-hero.home-hero-v4 {
    padding-top: 88px;
    padding-bottom: 12px
  }

  .home-hero-v4 .home-hero-grid {
    min-height: calc(100svh - 100px)
  }

  .home-hero-v4 h1 {
    font-size: clamp(3rem, 5.2vw, 5.1rem);
    margin: 14px 0 18px
  }

  .home-hero-v4 .hero-lead {
    font-size: 1rem;
    margin-bottom: 18px
  }

  .home-hero-v4 .trial-note {
    margin-top: 13px
  }

  .hero-trust-row {
    margin-top: 13px
  }

  .hero-pipeline {
    height: min(67vh, 520px)
  }

  .pipeline-window {
    inset: 2% 1% 4%
  }
}

@media(prefers-reduced-motion:reduce) {

  .hero-scroll-cue .icon,
  .pipeline-live i,
  .pipeline-route span,
  .pipeline-packet,
  .airdoc-core-ring,
  .stage-airdoc img,
  .scan-progress i,
  .pipeline-float {
    animation: none !important
  }

  .pipeline-packet {
    left: 82%;
    opacity: 1
  }

  .scan-progress i {
    width: 100%;
    transform: none
  }

  .hero-pipeline {
    transform: none !important
  }
}

/* Final desktop hero fit pass */
@media(min-width:1081px) {
  .home-hero.home-hero-v4 {
    height: 100svh;
    min-height: 680px;
    max-height: 980px;
    padding-top: 96px;
    padding-bottom: 18px
  }

  .home-hero-v4 .home-hero-grid {
    height: calc(100svh - 114px);
    min-height: 566px;
    max-height: 820px
  }

  .home-hero-v4 .home-hero-copy {
    padding: 8px 0 28px
  }

  .home-hero-v4 h1 {
    font-size: clamp(3.35rem, 5.3vw, 5.45rem);
    margin: 16px 0 20px
  }

  /* .home-hero-v4 .hero-question {
    white-space: nowrap
  } */

  .hero-pipeline {
    height: min(60vh, 540px);
    max-height: 540px
  }

  .pipeline-window {
    background: rgba(255, 255, 255, .92)
  }
}

/* Tablet landscape keeps the full story inside the first viewport. */
@media(min-width:901px) and (max-width:1080px) {
  .home-hero.home-hero-v4 {
    height: 100svh;
    min-height: 680px;
    max-height: 900px;
    padding: 86px 0 14px;
    display: flex
  }

  .home-hero-v4 .home-hero-grid {
    height: calc(100svh - 100px);
    min-height: 580px;
    max-height: 790px;
    grid-template-columns: minmax(0, .9fr) minmax(440px, 1.1fr);
    gap: 22px;
    align-items: center
  }

  .home-hero-v4 .home-hero-copy {
    padding: 0 0 14px
  }

  .home-hero-v4 h1 {
    font-size: clamp(3rem, 6.4vw, 4.35rem);
    margin: 13px 0 16px
  }

  .home-hero-v4 .hero-lead {
    font-size: .96rem;
    line-height: 1.58;
    margin-bottom: 17px
  }

  .home-hero-v4 .hero-actions {
    gap: 8px
  }

  .home-hero-v4 .hero-actions .btn {
    min-height: 44px;
    padding: 9px 15px;
    font-size: .88rem
  }

  .home-hero-v4 .trial-note {
    margin-top: 12px;
    font-size: .75rem
  }

  .hero-trust-row {
    display: none
  }

  .hero-pipeline {
    height: min(62vh, 470px);
    min-height: 430px;
    margin: 0
  }

  .pipeline-window {
    inset: 3% 0 4%;
    grid-template-rows: 38px 1fr 38px
  }

  .pipeline-canvas {
    grid-template-columns: minmax(125px, .9fr) minmax(155px, .9fr) minmax(140px, 1fr);
    gap: 12px;
    padding: 18px
  }

  .stage-airdoc img {
    width: min(42%, 142px)
  }

  .airdoc-core-ring {
    width: 170px;
    height: 170px
  }

  .pipeline-footer {
    gap: 14px
  }

  .pipeline-footer span {
    font-size: .61rem
  }

  .float-confidence {
    right: -2%;
    top: 1%
  }
}

/* Compact mobile hero artwork so the primary story remains visible quickly. */
@media(max-width:600px) {
  .home-hero.home-hero-v4 {
    min-height: 100svh;
    padding-top: 84px;
    padding-bottom: 14px
  }

  .home-hero-v4 .home-hero-copy {
    padding-top: 14px
  }

  .home-hero-v4 h1 {
    font-size: clamp(2.72rem, 13.3vw, 3.7rem);
    margin: 13px 0 15px
  }

  .home-hero-v4 .hero-lead {
    font-size: .94rem;
    line-height: 1.55;
    margin-bottom: 17px
  }

  .home-hero-v4 .trial-note {
    font-size: .73rem;
    margin-top: 12px
  }

  .hero-trust-row {
    display: none
  }

  .hero-pipeline {
    height: 238px;
    min-height: 238px;
    width: 100%;
    margin: 8px 0 2px
  }

  .pipeline-window {
    inset: 0;
    grid-template-rows: 34px 1fr;
    border-radius: 20px
  }

  .pipeline-toolbar {
    padding: 0 12px;
    font-size: .62rem
  }

  .pipeline-toolbar>span:nth-child(2) {
    display: block
  }

  .pipeline-live {
    font-size: 0
  }

  .pipeline-live i {
    margin: 0
  }

  .pipeline-canvas {
    display: grid;
    grid-template-columns: 1fr .92fr 1fr;
    grid-template-rows: 1fr;
    gap: 7px;
    padding: 12px 10px;
    align-items: center
  }

  .pipeline-route {
    left: 10%;
    right: 10%;
    top: 50%;
    bottom: auto;
    width: auto;
    height: 2px;
    transform: translateY(-50%);
    background: linear-gradient(90deg, rgba(29, 161, 242, .08), var(--blue), var(--cyan), var(--blue), rgba(29, 161, 242, .08))
  }

  .pipeline-route::before,
  .pipeline-route::after {
    top: 50%;
    bottom: auto;
    left: auto;
    transform: translateY(-50%)
  }

  .pipeline-route::before {
    left: 30%
  }

  .pipeline-route::after {
    right: 30%
  }

  .pipeline-packet {
    left: 16%;
    top: 50%;
    animation: v4Packet 7.5s var(--v4-ease) infinite;
    width: 30px;
    height: 30px;
    border-radius: 9px
  }

  .pipeline-stage,
  .stage-airdoc {
    width: auto;
    justify-self: stretch;
    align-self: center
  }

  .pipeline-stage-head {
    display: none
  }

  .inbox-mini,
  .xero-mini {
    padding: 7px;
    border-radius: 13px
  }

  .mini-app-row {
    display: none
  }

  .mini-email {
    display: none !important
  }

  .mini-email.active {
    display: grid !important;
    padding: 7px 5px;
    margin: 0;
    grid-template-columns: auto minmax(0, 1fr)
  }

  .mini-email.active time {
    display: none
  }

  .mini-file-icon {
    width: 25px;
    height: 25px
  }

  .mini-file-icon .icon {
    width: 13px;
    height: 13px
  }

  .mini-email strong {
    font-size: .58rem
  }

  .mini-email small {
    font-size: .48rem
  }

  .stage-airdoc {
    height: 100%;
    display: grid;
    place-items: center
  }

  .stage-airdoc img {
    position: relative;
    left: auto;
    top: auto;
    transform: none;
    width: 82px;
    z-index: 3;
    animation: v4Mascot 5.6s ease-in-out infinite
  }

  .airdoc-core-ring {
    width: 110px;
    height: 110px;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%)
  }

  .airdoc-state {
    display: none
  }

  .xero-mini>.status-badge {
    position: relative;
    right: auto;
    top: auto;
    display: inline-flex;
    margin-left: auto;
    padding: 3px 5px;
    font-size: .5rem
  }

  .xero-mark {
    width: 30px;
    height: 30px;
    font-size: .53rem;
    float: left
  }

  .xero-invoice-head {
    clear: both;
    margin: 8px 0 4px;
    display: block
  }

  .xero-invoice-head>strong {
    display: block;
    margin-top: 3px;
    font-size: .64rem
  }

  .xero-invoice-head div strong {
    font-size: .6rem
  }

  .xero-mini dl,
  .xero-ready {
    display: none
  }

  .pipeline-footer {
    display: none
  }

  .pipeline-float {
    display: none
  }

  .hero-scroll-cue {
    display: none
  }
}

@media(min-width:901px) and (max-width:1080px) {
  .float-confidence {
    right: 4px
  }
}

@media(max-width:760px) {

  /* Horizontal reveal transforms can create phantom overflow on narrow screens. */
  .reveal-left,
  .reveal-right {
    transform: translateY(22px)
  }

  .reveal-left.is-visible,
  .reveal-right.is-visible {
    transform: none
  }
}

@media(max-width:600px) {
  .home-hero.home-hero-v4 {
    height: 100svh;
    min-height: 700px;
    max-height: 900px;
    overflow: hidden;
    align-items: flex-start
  }

  .home-hero-v4 .home-hero-grid {
    height: calc(100svh);
    min-height: 600px;
    max-height: 800px;
    display: grid;
    grid-template-rows: auto 180px;
    gap: 4px;
    align-content: start
  }

  .home-hero-v4 .home-hero-copy {
    padding-top: 8px
  }

  .home-hero-v4 .integration-pill {
    padding: 6px 10px;
    font-size: .64rem
  }

  .home-hero-v4 h1 {
    font-size: clamp(2.48rem, 11.8vw, 3.3rem);
    line-height: .98;
    margin: 11px 0 12px
  }

  .home-hero-v4 .hero-lead {
    font-size: .86rem;
    line-height: 1.48;
    margin-bottom: 13px
  }

  .home-hero-v4 .hero-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px
  }

  .home-hero-v4 .hero-actions .btn {
    width: auto !important;
    min-width: 0;
    min-height: 43px;
    padding: 8px 9px;
    font-size: .78rem
  }

  .home-hero-v4 .hero-actions .btn .icon {
    display: none
  }

  .home-hero-v4 .hero-text-link {
    grid-column: 1/-1;
    padding: 4px 2px;
    font-size: .82rem
  }

  .home-hero-v4 .trial-note {
    margin-top: 8px;
    font-size: .66rem;
    line-height: 1.35
  }

  .home-hero-v4 .trial-note .icon {
    width: 14px;
    height: 14px
  }

  .hero-pipeline {
    height: 180px;
    min-height: 180px;
    margin: 30px 0 0
  }

  .pipeline-window {
    grid-template-rows: 30px 1fr;
    border-radius: 18px
  }

  .pipeline-toolbar {
    font-size: .55rem;
    padding: 0 9px
  }

  .pipeline-canvas {
    padding: 8px 7px;
    gap: 5px
  }

  .stage-airdoc img {
    width: 65px
  }

  .airdoc-core-ring {
    width: 88px;
    height: 88px
  }

  .inbox-mini,
  .xero-mini {
    padding: 5px;
    border-radius: 11px
  }

  .mini-email.active {
    padding: 5px 4px
  }

  .mini-file-icon {
    width: 21px;
    height: 21px;
    border-radius: 7px
  }

  .mini-email strong {
    font-size: .49rem
  }

  .mini-email small {
    font-size: .41rem
  }

  .xero-mark {
    width: 25px;
    height: 25px;
    font-size: .44rem
  }

  .xero-mini>.status-badge {
    padding: 2px 4px;
    font-size: .42rem
  }

  .xero-invoice-head {
    margin: 5px 0 2px
  }

  .xero-invoice-head>strong,
  .xero-invoice-head div strong {
    font-size: .5rem
  }

  .pipeline-packet {
    width: 25px;
    height: 25px
  }

  .pipeline-packet .icon {
    width: 13px;
    height: 13px
  }
}

/* Global overflow containment: decorative layers and reveal transforms never create a sideways page. */
html {
  overflow-x: visible
}

body {
  max-width: 100%;
  overflow-x: clip
}

/* Invoice generator layout containment */
.invoice-app,
.editor-panel,
.preview-panel,
.editor-section,
.template-grid,
.line-items,
.line-row,
.line-row>* {
  min-width: 0;
  max-width: 100%
}

.editor-panel {
  width: 100%
}

.preview-panel {
  width: 100%;
  overflow: hidden
}

.template-option {
  min-width: 0
}

.template-option .thumb {
  min-width: 0
}

.invoice-paper {
  max-width: 100%
}

@media(max-width:600px) {
  .hero-grid-lines {
    right: -16px;
    width: 220px;
    height: 220px;
    top: -55px
  }

  .home-hero-v4 .home-hero-glow {
    right: -8px;
    width: 180px;
    height: 180px;
    top: 70px
  }

  .invoice-app {
    width: 100%;
    min-width: 0
  }

  .editor-panel,
  .preview-panel {
    width: 100%;
    max-width: 100%;
    overflow: hidden;
    padding: 15px;
    border-radius: 18px
  }

  .editor-section {
    width: 100%
  }

  .template-grid {
    grid-template-columns: 1fr 1fr;
    gap: 8px
  }

  .template-option {
    width: 100%;
    padding: 7px
  }

  .template-option .thumb {
    height: 55px
  }

  .compact-grid,
  .compact-grid.three {
    grid-template-columns: 1fr
  }

  .line-row {
    grid-template-columns: 60px minmax(88px, 1fr) 64px 36px;
    gap: 6px;
    padding: 9px
  }

  .line-row>div:first-child {
    grid-column: 1/-1
  }

  .line-row>div:nth-child(2) {
    grid-column: 1
  }

  .line-row .price-field {
    grid-column: 2
  }

  .line-row>div:nth-child(4) {
    grid-column: 3
  }

  .line-row .line-remove {
    grid-column: 4;
    align-self: end
  }

  .line-row .line-total {
    grid-column: 1/-1;
    padding-top: 4px
  }

  .line-row input {
    min-width: 0;
    padding: 7px 6px
  }

  .tool-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px
  }

  .tool-actions .btn {
    width: 100%;
    min-width: 0;
    padding-inline: 10px
  }

  .tool-actions .btn:last-child {
    grid-column: 1/-1
  }

  .preview-panel {
    overflow: auto
  }

  .invoice-paper,
  .invoice-paper.template-air {
    width: 100% !important;
    min-width: 0;
    transform: none !important;
    margin: 0 !important;
    padding: 18px !important;
    min-height: 600px
  }

  .invoice-top {
    gap: 14px
  }

  .invoice-brand-logo {
    max-width: 120px;
    max-height: 58px
  }

  .invoice-title h2 {
    font-size: 1.45rem;
    letter-spacing: .05em !important
  }

  .invoice-parties {
    gap: 18px;
    margin: 26px 0
  }

  .invoice-table {
    table-layout: fixed
  }

  .invoice-table th,
  .invoice-table td {
    padding: 8px 5px;
    font-size: .65rem;
    overflow-wrap: anywhere
  }

  .invoice-table th:nth-child(3),
  .invoice-table td:nth-child(3) {
    display: none
  }

  .invoice-summary {
    width: 100%;
    max-width: 270px
  }
}


/* Final v4 typography and page-specific polish */
.blog-archive-hero {
  padding: clamp(132px, 13vh, 156px) 0 clamp(58px, 7vh, 82px);
  min-height: min(66svh, 650px);
  display: flex;
  align-items: center;
  background:
    radial-gradient(circle at 82% 18%, rgba(34, 211, 238, .13), transparent 27%),
    linear-gradient(180deg, #fff 0%, #f3fbff 100%);
}

.blog-archive-hero h1 {
  font-size: clamp(3.1rem, 6.2vw, 6rem);
  max-width: 1030px
}

.blog-archive-hero .section-copy {
  max-width: 770px
}

.table-scroll-hint {
  display: none;
  color: var(--muted);
  font-size: .83rem;
  margin: 0 0 10px
}

.data-table-wrap:focus-visible {
  outline: 3px solid rgba(34, 211, 238, .62);
  outline-offset: 4px;
  border-radius: 18px
}

@media(max-width:900px) {
  .mobile-toggle {
    position: relative
  }

  .mobile-toggle .icon {
    display: none
  }

  .mobile-toggle::before,
  .mobile-toggle::after {
    content: "";
    position: absolute;
    left: 50%;
    top: 50%;
    width: 18px;
    height: 2px;
    border-radius: 999px;
    background: var(--deep);
    transition: transform .26s var(--v4-ease), box-shadow .26s var(--v4-ease), opacity .2s ease;
  }

  .mobile-toggle::before {
    transform: translate(-50%, -50%);
    box-shadow: 0 -6px 0 var(--deep), 0 6px 0 var(--deep)
  }

  .mobile-toggle::after {
    transform: translate(-50%, -50%) rotate(-45deg);
    opacity: 0
  }

  .mobile-toggle[aria-expanded="true"]::before {
    transform: translate(-50%, -50%) rotate(45deg);
    box-shadow: none
  }

  .mobile-toggle[aria-expanded="true"]::after {
    opacity: 1
  }

  .blog-archive-hero {
    min-height: auto;
    padding: 122px 0 62px
  }

  .blog-archive-hero h1 {
    font-size: clamp(2.9rem, 12vw, 4.6rem)
  }
}

@media(max-width:760px) {
  .table-scroll-hint {
    display: block
  }

  .data-table-wrap {
    overscroll-behavior-inline: contain;
    scrollbar-width: thin
  }
}

@media(max-width:600px) and (min-height:761px) {
  .home-hero-v4 .home-hero-grid {
    grid-template-rows: auto 230px
  }

  .hero-pipeline {
    height: 230px;
    min-height: 230px;
    margin-top: 10px
  }

  .stage-airdoc img {
    width: 78px
  }

  .airdoc-core-ring {
    width: 104px;
    height: 104px
  }
}

@media(max-width:600px) and (max-height:760px) {
  .home-hero-v4 .home-hero-grid {
    grid-template-rows: auto 180px
  }

  .hero-pipeline {
    height: 158px;
    min-height: 158px
  }

  .home-hero-v4 h1 {
    font-size: clamp(2.2rem, 10.8vw, 3rem)
  }

  .home-hero-v4 .hero-lead {
    font-size: .8rem;
    line-height: 1.42
  }
}