/* GlanceWise refinement layer (Nov 2026): keep the hand-drawn identity, but use it sparingly
   so the site reads as precise and credible to finance teams and CA firms.
   Loaded last in base.html; page templates' inline styles come later, hence !important.

   Rules
   1. Script + squiggle only in the page hero (h1). Section headings (h2/h3) keep the
      highlighted word in the heading face, in violet, with no squiggle or circle.
   2. No red "correction" circles anywhere.
   3. Cards, documents and stamps sit upright. Only the small handwritten section labels
      keep their tilt.
   4. Purely decorative jokes beside illustrations (.sk-aside) are hidden; section labels
      and notes that carry information stay.
   5. One brand palette: navy + violet; pink is reserved for the main call to action. */

/* 1. Section headings: calm highlight, no handwriting */
h2 .sk-mark, h2 .gwa-mark, h3 .sk-mark, h3 .gwa-mark {
  font-family: inherit !important;
  font-size: 1em !important;
  font-weight: inherit !important;
  letter-spacing: inherit !important;
  line-height: inherit !important;
  color: var(--gw-violet) !important;
  white-space: normal !important;
}
h2 .sk-squig, h2 .gwa-squig, h3 .sk-squig, h3 .gwa-squig { display: none !important; }

/* 2. No red correction circles */
.gwf-hl--circ svg { display: none !important; }
h2 .gwf-hl, h3 .gwf-hl { color: var(--gw-violet); white-space: normal; }
.gwf-hl--circ { margin-left: 0 !important; }  /* the space that framed the removed circle */

/* 3. Upright cards (the reveal animation may still tilt them briefly while sliding in) */
.ab-card, .ab-stamps li, .ca-file, .fx-stamp, .gp-doc, .gp-rv, .px-plan, .px-icard, .fx-icard, .cx-vcard {
  --r: 0deg !important;
}
.cx-letter, .pa-letter { rotate: 0deg !important; }  /* the form cards; the paper sheet behind them keeps its offset */

/* 4. Decorative asides */
.sk-aside { display: none !important; }

/* 5. Closing call-to-action band: solid navy instead of the faded pink image, pink button */
.newsletter-style-5 {
  background-image: none !important;
  background-color: var(--gw-ink) !important;
}
.newsletter-style-5 .glancewise-btn.btn-blue {
  background: var(--gw-pink-cta) !important;
  border-color: var(--gw-pink-cta) !important;
  color: var(--gw-white) !important;
}
.newsletter-style-5 .glancewise-btn.btn-blue:hover,
.newsletter-style-5 .glancewise-btn.btn-blue:focus-visible {
  background: var(--gw-white) !important;
  border-color: var(--gw-white) !important;
  color: var(--gw-ink) !important;
}

/* Desktop menu: six links on one line (Home, Features, Integrations, For CA Firms, Pricing, Contact) */
@media (min-width: 1200px) {
  .mainmenu.mainmenu--header-compact { display: flex !important; flex-wrap: nowrap !important; gap: 0; }
  .mainmenu.mainmenu--header-compact > li { margin: 0 !important; flex: none; }
  .mainmenu.mainmenu--header-compact > li > a { padding-left: 12px !important; padding-right: 12px !important; font-size: var(--gw-fs-body-lg)!important; }
}
@media (min-width: 1200px) and (max-width: 1399px) {
  .mainmenu.mainmenu--header-compact > li > a { padding-left: 9px !important; padding-right: 9px !important; font-size: var(--gw-fs-body)!important; }
}

/* Handwritten section labels: same script, no tilt (aligned with the heading's edge) */
.sk-note, .gwf-note, .gp-kick, .gp-fl, .gp-arr-n, .gc-pg, .gsx-layer, .gwx-eco-m-kicker,
.fq-label, .ab-sign b, .lg-sign, .lg-sec h2 span { rotate: 0deg !important; }

/* Header: let the flex container shrink to the screen (the 180px logo pushed it 2px wide at 390px) */
#mainNavbar > .container { min-width: 0; }

/* Mobile menu: logo in the menu header; close button the same 44px as the menu button */
.popup-mobile-menu .inner .header-top .gw-menu-logo { position: absolute; left: 20px; top: 50%; transform: translateY(-50%); display: flex; }
.popup-mobile-menu .inner .header-top .gw-menu-logo img { height: 32px; width: auto; }
.popup-mobile-menu .inner .header-top .close-menu .close-button { width: 44px !important; height: 44px !important; }

/* Sideways-scrolling rows: fade the right edge while there is more to scroll (class set by main.js) */
.gw-scrollable:not(.gw-scroll-end) {
  -webkit-mask-image: linear-gradient(to right, #000 calc(100% - 44px), transparent);
          mask-image: linear-gradient(to right, #000 calc(100% - 44px), transparent);
}

/* Forms: keep the letter's margin rule, drop the ruled lines that doubled every input underline */
.cx-letter, .pa-letter {
  background: linear-gradient(90deg, transparent 42px, var(--gw-pink-line) 42px 43px, transparent 43px 46px, var(--gw-pink-line) 46px 47px, transparent 47px), var(--gw-white) !important;
}

@media (max-width: 767px) {
  /* homepage step cards bled 1px past the 15px page gutter */
  .gb-row { margin-left: -15px !important; margin-right: -15px !important; padding-left: 15px !important; padding-right: 15px !important; }
}
@media (max-width: 575px) {
  .cx-letter, .pa-letter {
    background: linear-gradient(90deg, transparent 26px, var(--gw-pink-line) 26px 27px, transparent 27px 30px, var(--gw-pink-line) 30px 31px, transparent 31px), var(--gw-white) !important;
  }
}
@media (max-width: 480px) {
  /* hero invoice: fine print is unreadable at phone size; keep the header, lines and total */
  .gh-p-meta, .gh-p-note { display: none !important; }
  /* features receipt: keep each line on one row */
  .fx-rcpt p span { white-space: nowrap; }
  .fx-rcpt { font-size: 10px !important; }
}

/* Pricing: the coupon card's notch circles poked 4px past the screen on phones, widening the page */
.px-close { overflow-x: clip; }

/* ── Page heroes: one look on every page ─────────────────────────────────────
   .gw-hero-label  the handwritten label above the headline
   .gw-hero-h1     the headline: two lines (.gw-l), the highlighted word in pink with the
                   navy underline (same as the homepage). On tablet and desktop each headline
                   is sized so its longer line fits the column: --fit is that line's width in
                   em, set per page on the h1. On phones the lines may wrap. */
.gw-hero-label {
  margin: 0 0 18px !important;
  font-family: var(--gw-font-hand) !important;
  font-size: var(--gw-fs-hand) !important;
  font-weight: 700 !important;
  line-height: 1.05 !important;
  color: var(--gw-violet) !important;
  rotate: 0deg !important;
}
.gw-hero-h1 {
  font-family: var(--gw-font-display) !important;
  font-weight: 400 !important;
  font-size: clamp(32px, 3vw + 8px, 48px) !important;
  line-height: 1.04 !important;
  letter-spacing: -.025em !important;
  color: var(--gw-ink) !important;
}
*:has(> .gw-hero-h1) { container-type: inline-size; }
@container (min-width: 420px) {
  .gw-hero-h1 { font-size: min(52px, calc(100cqw / var(--fit, 10))) !important; }
  .gw-hero-h1 .gw-l { white-space: nowrap; }
}
.gw-hero-h1 .sk-mark {
  padding: 0;
  font-family: inherit !important;
  font-size: 1em !important;
  font-weight: inherit !important;
  letter-spacing: inherit !important;
  line-height: inherit !important;
  color: var(--gw-pink) !important;
}
.gw-hero-h1 .sk-squig { left: -3%; width: 106%; bottom: -.3em; height: .26em; }
.gw-hero-h1 .sk-squig path { stroke: var(--gw-ink); stroke-width: 6; }
@media (max-width: 575px) {
  .gw-hero-label { font-size: 21px !important; }
}

/* Header: larger logo (logo-sm.webp is 104px tall, sharp up to 52px on 2x screens); larger mobile-menu links */
.glancewise-header .glancewise-logo { max-height: 48px !important; }
@media (max-width: 1199.98px) {
  .glancewise-header .glancewise-logo { max-height: 40px !important; }
  .popup-mobile-menu .mainmenu > li:not(.header-auth-mobile) > a { font-size: var(--gw-fs-body-lg) !important; }
}

/* Hero headlines match the homepage size at every width:
   - like the homepage, text and illustration sit side by side only from 1200px, so the
     headline column is wide enough for 52px between 992 and 1199px;
   - About's second line is too long for 52px on two lines in a tablet-width column, so
     there it keeps 52px and wraps instead of shrinking. */
@media (min-width: 992px) and (max-width: 1199.98px) {
  .fx-hero-grid, .ca-grid, .px-hero-grid, .cx-grid, .pt-grid { grid-template-columns: minmax(0, 1fr) !important; }
}
@container (min-width: 420px) and (max-width: 1086px) {
  .ab-h1.gw-hero-h1 { font-size: 52px !important; }
  .ab-h1.gw-hero-h1 .gw-l { white-space: normal; }
}

/* Pink buttons carry white text: use the deeper CTA pink so the label meets 4.5:1 contrast.
   The brand pink (--gw-pink) stays for highlighted words, accents and illustrations. */
.btn-pink-primary, .btn-pink-primary:active, .sk-btn--pink { background: var(--gw-pink-cta) !important; color: var(--gw-white) !important; }
.btn-pink-primary:hover, .sk-btn--pink:hover { background: var(--gw-pink-cta-hover) !important; color: var(--gw-white) !important; }

/* About: the headline's fit is measured on the container, so let the h1 use the full width */
.ab-h1.gw-hero-h1 { max-width: none !important; }

/* Back-to-top button: brand violet instead of the theme's coral */
.rn-progress-parent { box-shadow: inset 0 0 0 2px var(--gw-violet-line) !important; }
.rn-progress-parent::after, .rn-progress-parent:hover::after { color: var(--gw-violet) !important; }
.rn-progress-parent svg.rn-back-circle path { stroke: var(--gw-violet) !important; }
