/* ==========================================================================
   Esig — the marketing site in the drafting-sheet world.

   Persuade surface, same identity as the product: cool vellum, graphite rules,
   one ultramarine signal, condensed uppercase micro-labels. The pages already
   speak one class vocabulary (.container, .section, .feature-card, .page-hero…)
   so this file re-renders that vocabulary rather than rewriting twelve views.
   Loaded after esign.css and deliberately overrides it.
   ========================================================================== */

body {
  background: var(--sheet-1);
  color: var(--graphite-7);
  font-family: var(--font-ui);
  font-size: 16px;
  line-height: 1.6;
}

.container {
  width: min(1200px, 100% - var(--u8));
  margin-inline: auto;
}

.section { padding: var(--u8) 0; border-top: var(--rule-faint); }
.section:first-of-type { border-top: 0; }

/* esign.css points headings at Fraunces (--es-display), which this world no
   longer loads — without this they fall back to a generic serif. */
h1, h2, h3, h4, h5, h6,
.hero h1, .page-hero h1, .gradient-heading {
  font-family: var(--font-ui);
  color: var(--graphite-9);
  letter-spacing: -0.02em;
  text-wrap: balance;
}
h1 { font-size: clamp(2.1rem, 1.5rem + 2.6vw, 3.6rem); line-height: 1.06; font-weight: 680; }
h2 { font-size: clamp(1.5rem, 1.2rem + 1.3vw, 2.1rem); line-height: 1.15; font-weight: 660; }
h3 { font-size: 1.0625rem; font-weight: 620; }

p { max-width: 68ch; }
.lead, .section-lead { font-size: clamp(1.02rem, 0.98rem + 0.35vw, 1.2rem); color: var(--graphite-5); }

/* Gradient text is a habit, not a decision — weight carries emphasis here. */
.gradient-heading { background: none; -webkit-text-fill-color: currentColor; color: var(--graphite-9); }

/* ==========================================================================
   Announcement bar — the sheet's revision stamp
   ========================================================================== */

/* The whole utility bar is graphite; links on it stay light, never the signal
   blue, which only reaches 2:1 on a dark ground. */
.topbar {
  background: var(--graphite-9);
  color: var(--sheet-2);
  font-size: 13px;
  border-bottom: 0;
}
/* One row, never two: the promo takes the slack and truncates. */
.topbar-inner {
  display: flex;
  align-items: center;
  gap: var(--u4);
  flex-wrap: nowrap;
  min-height: 40px;
}
.topbar-links {
  display: flex;
  align-items: center;
  gap: var(--u4);
  margin-left: auto;
  flex: none;
  white-space: nowrap;
}
.topbar-links a { white-space: nowrap; }

body .topbar a,
body .topbar-links a:not(.btn) { color: var(--sheet-2); text-decoration: none; }
body .topbar a:hover, body .topbar-links a:not(.btn):hover { color: #fff; text-decoration: underline; }

.topbar-promo {
  display: flex;
  align-items: center;
  gap: var(--u3);
  min-width: 0;          /* lets the label truncate instead of wrapping the bar */
  padding: 0;
  background: none;
  color: var(--sheet-2);
  font-size: 13px;
  text-decoration: none;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.topbar-promo:hover { color: #fff; }

/* Was white on the legacy green at 3.8:1 — below the floor for small text. */
.topbar-promo .badge {
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  background: var(--sheet-1);
  color: var(--graphite-9);
  border: 0;
  border-radius: var(--edge);
  font-family: var(--font-block);
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}
.topbar-promo .badge::before { content: none; }

/* ==========================================================================
   Header — the sheet's top rule
   ========================================================================== */

.site-header, header.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  background: color-mix(in srgb, var(--sheet-1) 88%, transparent);
  backdrop-filter: saturate(140%) blur(8px);
  border-bottom: var(--rule);
}

.site-header .container,
.nav-wrap { display: flex; align-items: center; gap: var(--u5); min-height: 62px; }

.site-header .logo, .brand {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  font-size: 17px;
  font-weight: 650;
  letter-spacing: -0.02em;
  color: var(--graphite-9);
  text-decoration: none;
}

.nav-main { display: flex; align-items: center; gap: var(--u2); margin-left: auto; }

.nav-main a, .nav-item > button, .nav-item > a {
  padding: 7px var(--u3);
  border-radius: var(--edge);
  font-size: 14px;
  font-weight: 500;
  color: var(--graphite-7);
  text-decoration: none;
  background: none;
  border: 0;
  cursor: pointer;
  font-family: inherit;
}
.nav-main a:hover, .nav-item > button:hover { background: var(--sheet-2); color: var(--graphite-9); }

.nav-sub, .dropdown {
  background: var(--sheet-1);
  border: var(--rule);
  border-radius: var(--edge);
  box-shadow: var(--lift-3);
}

/* ==========================================================================
   Hero — a sheet on the drafting desk, ruled and titled
   ========================================================================== */

.hero {
  position: relative;
  padding: clamp(var(--u7), 5vw, 88px) 0 clamp(var(--u7), 5vw, 88px);
  /* Light-to-deep accent ramp. The deep variant is used because the hero
     carries body-size white text. */
  background: var(--accent-ramp-deep);
  border-bottom: 0;
  min-height: 0;
  color: #fff;
}

.hero h1 { color: #fff; }
.hero .lead { color: rgba(255, 255, 255, 0.94); }
.hero .region-select,
.hero .region-select .locale-label,
.hero .locale-label { color: rgba(255, 255, 255, 0.9); }

/* esign.css layers a teal radial wash over the hero via ::before. */
.hero::before, .hero::after { content: none; background: none; }

.hero-inner {
  width: min(1200px, 100% - var(--u8));
  margin-inline: auto;
  max-width: 44rem;
  text-align: center;
}

.hero h1 { margin: 0 0 var(--u4); }
.hero .lead { margin: 0 auto var(--u6); max-width: 46ch; }

/* The sign-up sheet: a title block, not a floating card. */
.hero-form {
  display: flex;
  flex-direction: column;
  gap: 0;
  padding: 0;
  background: var(--sheet-1);
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: var(--edge);
  box-shadow: var(--lift-3);
  max-width: 30rem;
  margin-inline: auto;
  overflow: hidden;
  text-align: left;
}

/* Header strip names the action, the way a title block names a drawing. */
.hero-form::before {
  content: "Start free";
  order: 0;
  padding: 8px var(--u4);
  background: var(--sheet-2);
  border-bottom: var(--rule);
  font-family: var(--font-block);
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--graphite-5);
}

/* Markup puts consent first; the field is what the visitor came for. */
.hero-form-row { order: 1; display: flex; gap: var(--u2); padding: var(--u4) var(--u4) var(--u3); flex-wrap: wrap; }
.hero-consent  { order: 2; padding: 0 var(--u4) var(--u3); }
.hero-terms    { order: 3; padding: var(--u3) var(--u4); margin: 0; border-top: var(--rule-faint); background: var(--sheet-2); }

body .hero-form-row input[type="email"] {
  flex: 1 1 14rem;
  min-height: 46px;
  padding: 11px var(--u3);
  background: var(--sheet-1);
  border: 1px solid var(--graphite-2);
  border-radius: var(--edge);
  font-size: 15px;
  color: var(--graphite-9);
}
body .hero-form-row input[type="email"]:focus {
  border-color: var(--signal);
  box-shadow: 0 0 0 3px var(--signal-wash);
  outline: none;
}
.hero-form-row .btn, .hero-form-row button { min-height: 46px; padding-inline: var(--u5); flex: 0 0 auto; }

.hero-consent, .hero-terms { font-size: 12px; line-height: 1.45; color: var(--graphite-5); }
.hero-consent { display: flex; gap: var(--u2); align-items: flex-start; }
.hero-consent input {
  width: 15px; height: 15px; min-height: 0;
  margin: 2px 0 0;
  accent-color: var(--signal);
  flex: none;
}

.region-select { margin-top: var(--u6); }

/* ==========================================================================
   Buttons — same vocabulary as the product
   ========================================================================== */

.btn, .btn-primary, .btn-outline, .btn-dark, .btn-accept {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--u2);
  padding: 11px var(--u5);
  min-height: 44px;
  border-radius: var(--edge);
  font-family: var(--font-ui);
  font-size: 14.5px;
  font-weight: 550;
  line-height: 1;
  text-decoration: none;
  cursor: pointer;
  white-space: nowrap;
  transition: background 140ms var(--ease), border-color 140ms var(--ease),
              color 140ms var(--ease), transform 90ms var(--ease);
}

.btn, .btn-outline {
  background: var(--sheet-1);
  color: var(--graphite-9);
  border: 1px solid var(--graphite-2);
}
.btn:hover, .btn-outline:hover { background: var(--sheet-2); border-color: var(--graphite-3); color: var(--graphite-9); }

.btn-primary, .btn-dark, .btn-accept {
  background: var(--signal);
  color: #fff;
  border: 1px solid var(--signal-ink);
  box-shadow: var(--lift-1);
}
.btn-primary:hover, .btn-dark:hover, .btn-accept:hover {
  background: var(--signal-ink);
  border-color: var(--signal-ink);
  color: #fff;
}

.btn:active, .btn-primary:active, .btn-dark:active { transform: translateY(1px); }
.btn-sm { min-height: 34px; padding: 7px var(--u4); font-size: 13px; }

/* One link colour in content. Scoped to main/auth rather than `body a` so the
   graphite topbar and footer keep their own treatment — a global rule with a
   stack of :not() outranks every specific one and starts a specificity war. */
/* :where() keeps this at zero specificity — stacked :not() would otherwise make
   the default link colour outrank every contextual rule (inverted cards, the
   graphite topbar) and start a specificity war. */
main :where(a:not(.btn):not(.btn-primary):not(.btn-outline):not(.btn-dark):not(.feature-card):not(.story-card):not(.blog-card):not(.link-caps)),
.auth-page :where(a:not(.btn):not(.btn-primary):not(.btn-outline):not(.logo)) {
  color: var(--signal);
}
main :where(a:not(.btn):hover), .auth-page :where(a:not(.btn):not(.logo):hover) { color: var(--signal-ink); }

.link-arrow {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--signal);
  font-weight: 550;
  text-decoration: none;
}
.link-arrow::after { content: "→"; transition: transform 160ms var(--ease); }
.link-arrow:hover::after { transform: translateX(3px); }

.link-caps {
  font-family: var(--font-block);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--graphite-5);
}

/* ==========================================================================
   Cards — specification panels, not floating pills
   ========================================================================== */

.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 17rem), 1fr));
  gap: var(--u4);
  margin-top: var(--u6);
}

.feature-card, .story-card, .blog-card, .form-card {
  display: flex;
  flex-direction: column;
  gap: var(--u2);
  padding: var(--u5);
  background: var(--sheet-1);
  border: var(--rule);
  border-radius: var(--edge);
  box-shadow: var(--lift-1);
  transition: border-color 160ms var(--ease), box-shadow 160ms var(--ease), transform 160ms var(--ease);
}

a.feature-card:hover, a.story-card:hover, a.blog-card:hover,
.feature-card:hover, .story-card:hover, .blog-card:hover {
  border-color: var(--graphite-3);
  box-shadow: var(--lift-2);
  transform: translateY(-2px);
}

.feature-card h3, .story-card h3, .blog-card h3 { margin: 0; }
.feature-card p, .blog-body p { margin: 0; color: var(--graphite-5); font-size: 14.5px; }

.card-visual, .blog-thumb {
  border-radius: var(--edge);
  border: var(--rule);
  overflow: hidden;
  background: var(--sheet-2);
}
.card-visual img, .blog-thumb img { display: block; width: 100%; height: auto; }

.blog-body { display: flex; flex-direction: column; gap: var(--u2); padding-top: var(--u3); }

.meta, .tag {
  font-family: var(--font-block);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--graphite-4);
}

.tag,
body main .story-card .tag,
body main .blog-card .tag {
  display: inline-flex;
  padding: 3px 8px;
  border: var(--rule);
  border-radius: var(--edge);
  background: var(--sheet-2);
  color: var(--graphite-5);
}
/* On an inverted card the tag inverts with it. */
body main .story-card.featured .tag,
body main .feature-card.dark .tag {
  background: var(--signal-ink);
  border-color: rgba(255, 255, 255, 0.45);
  color: #fff;
}

/* ==========================================================================
   Page heroes, stats, pills, tables
   ========================================================================== */

.page-hero {
  padding: var(--u8) 0 var(--u7);
  background: var(--sheet-0);
  border-bottom: var(--rule);
}
.page-hero h1 { margin: 0 0 var(--u3); }
.page-hero p { color: var(--graphite-5); font-size: 1.05rem; }
.page-content { padding: var(--u7) 0; }

.stat, .trust-stats > * { display: flex; flex-direction: column; gap: 2px; }
.stat strong {
  font-size: clamp(1.8rem, 1.4rem + 1.6vw, 2.6rem);
  font-weight: 680;
  color: var(--graphite-9);
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.03em;
}
.stat span {
  font-family: var(--font-block);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--graphite-5);
}

.pill {
  padding: 7px var(--u4);
  background: var(--sheet-1);
  border: var(--rule);
  border-radius: var(--edge);
  font: inherit;
  font-size: 13.5px;
  font-weight: 550;
  color: var(--graphite-7);
  cursor: pointer;
}
.pill:hover { background: var(--sheet-2); }
.pill.active {
  background: var(--signal-wash);
  border-color: var(--signal-edge);
  color: var(--signal-ink);
}

.solutions-bar { display: flex; flex-wrap: wrap; gap: var(--u2); align-items: center; }
.solutions-bar .label {
  font-family: var(--font-block);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--graphite-4);
  margin-right: var(--u2);
}

/* Industry ribbon: a continuous marquee, paused on hover and for anyone who
   asked for reduced motion. */
.logo-ribbon {
  padding: var(--u4) 0;
  background: var(--sheet-2);
  border-block: var(--rule);
  overflow: hidden;
  /* Fade the ends so labels enter and leave instead of being cut off. */
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 6%, #000 94%, transparent);
  mask-image: linear-gradient(90deg, transparent, #000 6%, #000 94%, transparent);
}

.logo-ribbon .logo-track {
  display: flex;
  width: max-content;
  max-width: none;
  margin: 0;
  animation: ribbon-scroll 42s linear infinite;
}
.logo-ribbon:hover .logo-track,
.logo-ribbon:focus-within .logo-track { animation-play-state: paused; }

.logo-run { display: flex; align-items: center; gap: clamp(var(--u5), 4vw, var(--u7)); padding-right: clamp(var(--u5), 4vw, var(--u7)); }

.logo-track span {
  font-family: var(--font-block);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  /* Was --graphite-4 on this ground and read as barely-there. */
  color: var(--graphite-7);
  white-space: nowrap;
}

@keyframes ribbon-scroll {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}

@media (prefers-reduced-motion: reduce) {
  .logo-ribbon { -webkit-mask-image: none; mask-image: none; }
  .logo-ribbon .logo-track { animation: none; width: auto; flex-wrap: wrap; justify-content: center; }
  .logo-run:last-child { display: none; }
  .logo-run { flex-wrap: wrap; justify-content: center; padding-right: 0; }
}

table.data, .data { width: 100%; border-collapse: collapse; font-size: 14.5px; font-variant-numeric: tabular-nums; }
.data th {
  font-family: var(--font-block);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--graphite-5);
  text-align: left;
  padding: var(--u3) var(--u4);
  background: var(--sheet-2);
  border-bottom: var(--rule);
}
.data td { padding: var(--u4); border-bottom: var(--rule-faint); }

/* Pricing */
/* Pricing only — .featured is also used by story cards, where an injected
   "Recommended" label is nonsense. */
.plan.recommended, .pricing .recommended { border-color: var(--signal); box-shadow: var(--lift-2); }
.plan.recommended::before, .pricing .recommended::before {
  content: "Recommended";
  font-family: var(--font-block);
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--signal-ink);
  background: var(--signal-wash);
  border: 1px solid var(--signal-edge);
  border-radius: var(--edge);
  padding: 3px 8px;
  align-self: flex-start;
}
.checked { display: flex; gap: var(--u2); align-items: flex-start; font-size: 14.5px; }

.int-logo {
  display: grid;
  place-items: center;
  padding: var(--u4);
  background: var(--sheet-1);
  border: var(--rule);
  border-radius: var(--edge);
  font-family: var(--font-block);
  font-size: 12px;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--graphite-5);
}

/* ==========================================================================
   Forms
   ========================================================================== */

.form-card { max-width: 34rem; gap: var(--u4); }

/* Contact: form beside the company panel. esign.css centres .form-card with
   `margin: 0 auto` for the standalone auth pages — as a grid item those auto
   margins cancel the default stretch and the card shrink-wraps its content,
   so reset them here (login/try-free still want the centring). */
.contact-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, .85fr);
  gap: var(--u6);
  align-items: start;
}
.contact-grid > .form-card {
  margin-inline: 0;
  max-width: none;
  width: 100%;
}
.contact-grid > .form-card textarea { min-height: 9.5rem; resize: vertical; }
.contact-grid .contact-panel { min-height: 0; gap: var(--u3); }
.contact-grid .contact-panel p { margin: 0; }
.contact-grid .contact-panel .contact-address { color: var(--graphite-5); white-space: pre-line; }
.contact-grid .contact-panel .contact-fineprint { margin-top: var(--u2); font-size: 13px; }
.contact-grid .contact-panel a { font-weight: 600; }
.contact-grid .contact-panel strong { color: var(--graphite-9); }

@media (max-width: 860px) {
  .contact-grid { grid-template-columns: minmax(0, 1fr); gap: var(--u5); }
}

/* Forms must never push the page wider than the viewport. */
input, select, textarea { max-width: 100%; }
.form-grid, .contact-grid, .form-row-2 { min-width: 0; }
.form-group { display: flex; flex-direction: column; gap: 6px; }
.form-group > label {
  font-family: var(--font-block);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--graphite-5);
}

/* ==========================================================================
   Footer — the title block of the site
   ========================================================================== */

.site-footer, footer.site-footer {
  padding: var(--u8) 0 var(--u5);
  background: var(--sheet-0);
  border-top: var(--rule-heavy);
  color: var(--graphite-5);
  font-size: 14px;
}

.footer-col h4, .footer-col strong {
  font-family: var(--font-block);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--graphite-9);
  margin: 0 0 var(--u3);
  display: block;
}
.footer-col a { display: block; padding: 3px 0; color: var(--graphite-5); text-decoration: none; font-weight: 400; }
.footer-col a:hover { color: var(--signal); }

/* Legacy footer/locale copy was white for a dark footer; this one is light. */
.site-footer span,
.site-footer p,
.site-footer li,
.footer-bottom,
.footer-legal,
.footer-legal span,
.footer-social a { color: var(--graphite-5); }
.footer-legal a, .footer-bottom a { color: var(--graphite-5); }
.footer-legal a:hover, .footer-bottom a:hover { color: var(--signal); }

.locale-switcher .locale-label,
.locale-label { color: var(--graphite-5); }

/* --- footer bottom row: one baseline for links, contact and language ------ */

.footer-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--u4);
  flex-wrap: wrap;
  padding-top: var(--u5);
  margin-top: var(--u5);
  border-top: var(--rule-faint);
}

.footer-legal {
  display: flex;
  align-items: center;      /* was baseline-less, so the select sat off-row */
  gap: var(--u4);
  flex-wrap: wrap;
  font-size: 13.5px;
}

/* esign.css strips this select bare for the old dark footer; give it back a
   control shape so it lines up with the links beside it. */
.footer-legal .locale-switcher--footer { display: inline-flex; align-items: center; margin: 0; }
body .locale-switcher--footer select {
  min-height: 32px;
  padding: 4px var(--u2);
  background: var(--sheet-1);
  color: var(--graphite-7);
  border: 1px solid var(--graphite-2);
  border-radius: var(--edge);
  font-size: 13px;
  font-weight: 500;
  line-height: 1.2;
}
body .locale-switcher--footer select:focus {
  border-color: var(--signal);
  box-shadow: 0 0 0 3px var(--signal-wash);
  outline: none;
}

/* --- social icons: were white for the old dark footer --------------------- */

.footer-social { display: flex; align-items: center; gap: var(--u2); }

body .footer-social .social-icon {
  width: 34px;
  height: 34px;
  border-radius: var(--edge);
  background: var(--sheet-1);
  border: 1px solid var(--graphite-2);
  color: var(--graphite-7);
  transition: background 140ms var(--ease), border-color 140ms var(--ease),
              color 140ms var(--ease), transform 90ms var(--ease);
}
body .footer-social .social-icon:hover {
  background: var(--signal-wash);
  border-color: var(--signal-edge);
  color: var(--signal-ink);
  transform: translateY(-1px);
}
body .footer-social .social-icon svg { width: 17px; height: 17px; fill: currentColor; }
.site-footer .locale-label, .hero .locale-label { color: var(--graphite-5); }

/* Descendant rules in esign.css (.page-content a) outrank a bare .btn, which
   left buttons wearing the old link green. */
main a.btn, main a.btn-outline, .page-content a.btn { color: var(--graphite-9); }
main a.btn-primary, main a.btn-dark, main a.btn-accept,
.page-content a.btn-primary { color: #fff; }

/* ==========================================================================
   Floating chrome
   ========================================================================== */

.promo-float, .cookie-bar {
  background: var(--sheet-1);
  border: var(--rule);
  border-radius: var(--edge);
  box-shadow: var(--lift-3);
  color: var(--graphite-7);
  opacity: 1;
  z-index: 50;
}
.promo-float { padding: var(--u4); max-width: 21rem; }
.promo-float h4 { margin: 0 0 var(--u2); font-size: 14.5px; color: var(--graphite-9); }
.promo-float p { margin: 0 0 var(--u3); font-size: 13.5px; color: var(--graphite-5); }
.promo-float .close {
  background: none; border: 0; cursor: pointer;
  color: var(--graphite-4); font-size: 18px; line-height: 1;
}

.cookie-bar { padding: var(--u4); }
.cookie-bar p { margin: 0; font-size: 13.5px; }
.cookie-actions { display: flex; gap: var(--u2); flex-wrap: wrap; }

/* "Manage" was white for the old dark bar and vanished on this one. */
body .cookie-bar .btn-outline,
body .cookie-actions .btn-outline {
  background: var(--sheet-1);
  color: var(--graphite-9);
  border: 1px solid var(--graphite-2);
}
body .cookie-bar .btn-outline:hover { background: var(--sheet-2); color: var(--graphite-9); }

/* ==========================================================================
   Legacy overrides — esign.css sets these from the previous world with
   descendant selectors that outrank single-class rules. Scoped, not blanket.
   ========================================================================== */

/* ==========================================================================
   No gradients anywhere. This world is flat ink on ruled paper; every band is
   a solid ground so type sits on a known, measurable colour.
   ========================================================================== */

/* The one surface that carries the accent ramp: the closing call to action. */
.bottom-cta {
  background: var(--accent-ramp);
  color: #fff;
  text-align: center;
  border-block: 0;
  padding: clamp(var(--u7), 5vw, 76px) 0;
}
.bottom-cta h2, .bottom-cta h3 { color: #fff; }
body .bottom-cta p { color: rgba(255, 255, 255, 0.92); margin-inline: auto; }

body .bottom-cta .btn,
body .bottom-cta .btn-primary,
body .bottom-cta .btn-outline { min-height: 46px; padding-inline: var(--u6); }

/* Secondary first: the primary rule must come last so it wins on an element
   carrying both .btn and .btn-primary. */
body .bottom-cta .btn,
body .bottom-cta .btn-outline {
  background: rgba(255, 255, 255, 0.16);
  color: #fff;
  border-color: rgba(255, 255, 255, 0.4);
  font-weight: 600;
}
body .bottom-cta .btn:hover, body .bottom-cta .btn-outline:hover {
  background: rgba(255, 255, 255, 0.26);
  border-color: rgba(255, 255, 255, 0.7);
  color: #fff;
}

/* Solid white primary, translucent secondary — the reference pairing.
   The markup uses .btn-white / .btn-outline-light here, not .btn-primary. */
body .bottom-cta .btn.btn-white,
body .bottom-cta a.btn-white,
body .bottom-cta .btn.btn-primary,
body .bottom-cta a.btn-primary,
body .bottom-cta .btn-primary {
  background: #fff;
  color: var(--accent-b);
  border-color: #fff;
  font-weight: 650;
  box-shadow: var(--lift-1);
}
body .bottom-cta .btn.btn-white:hover,
body .bottom-cta a.btn-white:hover,
body .bottom-cta .btn.btn-primary:hover,
body .bottom-cta a.btn-primary:hover {
  background: #fff;
  color: var(--accent-b);
  filter: brightness(0.95);
}

/* The trust band was mint; make it the recessed sheet tone. */
.trust, .section.trust, .trust-stats {
  background: var(--sheet-2);
  background-image: none;
}

/* Inner-page heroes carried a green gradient over a photo. */
.page-hero { background-image: none; }

/* Any remaining gradient text renders as flat ink. */
.gradient-heading {
  background: none;
  background-image: none;
  -webkit-background-clip: border-box;
  background-clip: border-box;
  -webkit-text-fill-color: currentColor;
  color: var(--graphite-9);
}

/* Integration tiles are name plates; the tick badge only collided with them. */
.int-logo.checked::before,
.int-logo.checked::after { content: none; }
.int-logo.checked { display: grid; }

/* Inverted bands: graphite, matching the utility bar, instead of the previous
   world's green gradient. */
.integrations, .section.integrations {
  background: var(--graphite-9);
  background-image: none;
  color: var(--sheet-2);
  border-block: 0;
}
.integrations h2, .integrations h3 { color: #fff; }
body .integrations p { color: rgba(255, 255, 255, 0.82); }
body .integrations .int-logo {
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(255, 255, 255, 0.18);
  color: rgba(255, 255, 255, 0.86);
}
body .integrations a:not(.btn) { color: #fff; }

/* Variants that were white-on-dark in the previous world. They keep their
   emphasis here through a signal ground rather than inverted type. */
.feature-card.dark, .story-card.featured, .section.dark, .cta-band, .hero-cta {
  background: var(--signal);
  border-color: var(--signal-ink);
  color: #fff;
}
.feature-card.dark h3, .story-card.featured h3,
.section.dark h2, .cta-band h2 { color: #fff; }
body .feature-card.dark p, body .story-card.featured p,
body .section.dark p, body .cta-band p { color: rgba(255, 255, 255, 0.88); }
body .story-card.featured .link-arrow,
body .feature-card.dark .link-arrow,
body .section.dark a, body .cta-band a { color: #fff; }

/* A card inside an inverted band keeps its own sheet — inverting the band and
   the card both leaves body copy stranded on a saturated ground. */
body .section.dark .feature-card:not(.dark),
body .cta-band .feature-card:not(.dark),
body .hero-cta .feature-card:not(.dark) {
  background: var(--sheet-1);
  border-color: var(--signal-ink);
  color: var(--graphite-7);
}
body .section.dark .feature-card:not(.dark) h3 { color: var(--graphite-9); }
body .section.dark .feature-card:not(.dark) p { color: var(--graphite-5); }

body main .feature-card p,
body main .feature-card span,
body main .story-card p,
body main .blog-card p,
body .section .feature-card p { color: var(--graphite-5); }

body main .feature-card h3,
body main .story-card h3 { color: var(--graphite-9); }

body main a.btn,
body main a.btn-outline,
body main .page-hero a.btn { color: var(--graphite-9); }

body main a.btn-primary,
body main a.btn-dark,
body main .page-hero a.btn-primary { color: #fff; }

body main p a:not(.btn):not(.btn-primary):not(.btn-outline),
body main li a:not(.btn) { color: var(--signal); }

/* Inverted cards last: the generic card rules above are more specific than a
   plain .dark selector and would otherwise strand grey text on the signal. */
body main .feature-card.dark p,
body main .feature-card.dark span,
body main .story-card.featured p { color: rgba(255, 255, 255, 0.9); }
body main .feature-card.dark h3,
body main .story-card.featured h3 { color: #fff; }
body main .feature-card.dark a,
body main .feature-card.dark a.link-arrow,
body main .story-card.featured a.link-arrow { color: #fff; }

.hidden { display: none !important; }

/* ==========================================================================
   Auth pages (layouts/auth) — the same sheet, one column
   ========================================================================== */

.auth-page {
  display: grid;
  grid-template-columns: 1fr;
  min-height: 100vh;
  background: var(--sheet-0);
}

.auth-brand {
  display: none;
  flex-direction: column;
  justify-content: space-between;
  gap: var(--u6);
  padding: var(--u7);
  background: var(--accent-ramp-deep);
  border-right: 0;
  color: #fff;
}
.auth-brand .logo, .auth-brand a.logo { color: #fff !important; }
.auth-brand h1, .auth-brand h2, .auth-brand h3 { color: #fff; }
/* Qualified with .auth-page so these beat the generic .auth-page p rule below,
   which sets graphite for the light column. */
.auth-page .auth-brand p,
.auth-page .auth-brand li,
.auth-page .auth-brand .help { color: rgba(255, 255, 255, 0.92); }
.auth-page .auth-brand a:not(.btn):not(.logo) { color: #fff; text-decoration: underline; }
.auth-page .auth-brand a.logo { color: #fff; text-decoration: none; }

/* The mark reads as plain white squares on the ramp. */
.auth-brand .logo-mark span { background: rgba(255, 255, 255, 0.55); }
.auth-brand .logo-mark span:first-child { background: #fff; }
.auth-brand .logo-mark span:last-child { background: rgba(255, 255, 255, 0.85); }

.auth-card, .auth-main, .auth-form-wrap {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: var(--u4);
  padding: var(--u7) var(--u5);
  background: var(--sheet-1);
}

/* Secondary copy and links on auth pages were set too light to read. */
.auth-page p, .auth-card p, .auth-main p { color: var(--graphite-5); }
.auth-page .help, .auth-card .help { color: var(--graphite-5); }
/* The legacy green (#059669) is only 3.6:1 on the sheet — too low for links. */
.auth-page a:not(.btn):not(.btn-primary):not(.btn-outline),
body .auth-page a:not(.btn) { color: var(--signal); font-weight: 550; }
.auth-page a:not(.btn):hover { color: var(--signal-ink); }

@media (min-width: 900px) {
  .auth-page { grid-template-columns: 1fr 1fr; }
  .auth-brand { display: flex; }
}

/* ==========================================================================
   Wide content must scroll inside itself, never the page
   ========================================================================== */

.table-scroll, .data-wrap { overflow-x: auto; }

@media (max-width: 899px) {
  /* API reference tables are genuinely wide; give them their own scroll. */
  .page-content .data,
  .section .data {
    display: block;
    overflow-x: auto;
    white-space: nowrap;
    -webkit-overflow-scrolling: touch;
  }
  pre, code { max-width: 100%; overflow-x: auto; }
}

/* ==========================================================================
   Responsive
   ========================================================================== */

@media (max-width: 899px) {
  /* On phones the utility bar drops its promo and lets the links scroll inside
     the bar — nowrap without this pushes the whole page wider than the screen. */
  .topbar { overflow: hidden; }
  .topbar-promo { display: none; }
  .topbar-links {
    margin-left: 0;
    flex: 1 1 auto;
    min-width: 0;
    flex-wrap: nowrap;
    gap: var(--u3);
    overflow-x: auto;
    scrollbar-width: none;
  }
  .topbar-links > * { flex: none; }
  .topbar-links::-webkit-scrollbar { display: none; }

  /* Structural grids inherited from the old stylesheet keep fixed column
     counts; collapse anything grid-shaped to one column on phones. */
  body main [class*="grid"],
  body .footer-grid,
  body main .card-grid { grid-template-columns: 1fr; }
  body main aside, body main article { min-width: 0; }

  /* The phone number uses non-breaking hyphens and cannot wrap on its own. */
  body main p, body main a, body main li { overflow-wrap: anywhere; }
}

@media (max-width: 900px) {
  .container, .hero-inner { width: min(1200px, 100% - var(--u5)); }
  .section, .page-hero { padding: var(--u7) 0; }
  .hero { padding: var(--u7) 0; }
  .hero::before, .hero::after { display: none; }
  .nav-main { display: none; }
  .nav-main.open {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    position: absolute;
    top: 100%; left: 0; right: 0;
    padding: var(--u3);
    background: var(--sheet-1);
    border-bottom: var(--rule);
    box-shadow: var(--lift-2);
  }
  .site-header .container { position: relative; }
}

/* --- referral band --------------------------------------------------------
   The same statement the product shows on /app/referrals, rendered as a
   promise: the rate as a struck figure in a ruled cell, the terms beside it.
   No gradient, no new colour - the number is doing the work. */

.referral-band { padding: var(--u8) 0; border-top: var(--rule-faint); }

.referral-band__inner {
  display: grid;
  grid-template-columns: minmax(0, 20rem) minmax(0, 1fr);
  border: var(--rule);
  border-top: var(--rule-heavy);
  background: var(--sheet-1);
  box-shadow: var(--lift-1);
}

.referral-band__rate {
  padding: var(--u6);
  background: var(--sheet-2);
  border-right: var(--rule-faint);
  display: grid;
  align-content: center;
  min-width: 0;
}

.referral-band__figure {
  margin: var(--u2) 0 0;
  font-family: var(--font-block);
  font-size: clamp(3rem, 7vw, 4.5rem);
  font-weight: 700;
  line-height: 0.95;
  letter-spacing: -0.03em;
  color: var(--graphite-9);
  font-variant-numeric: tabular-nums;
}

.referral-band__figure sup {
  font-size: 0.38em;
  vertical-align: 0.9em;
  margin-left: 0.06em;
  color: var(--signal);
}

.referral-band__body { padding: var(--u6); min-width: 0; }
.referral-band__body h2 { margin: 0 0 var(--u3); font-size: clamp(1.25rem, 2.4vw, 1.75rem); }
.referral-band__body p { margin: 0 0 var(--u5); max-width: 62ch; color: var(--graphite-7); }

@media (max-width: 860px) {
  .referral-band__inner { grid-template-columns: minmax(0, 1fr); }
  .referral-band__rate {
    border-right: 0;
    border-bottom: var(--rule-faint);
    padding: var(--u5);
  }
  .referral-band__body { padding: var(--u5); }
}
