/* Design tokens. Every color, font and radius on the site comes from here. */
@font-face {
  font-family: 'Jost';
  src: url('/assets/fonts/jost-latin.woff2') format('woff2');
  font-weight: 400 700;
  font-style: normal;
  font-display: swap;
}

:root {
  /* Blues: the brand. 600 is the accessible action color (white text passes AA). */
  --blue-50: #f1f6fd;
  --blue-100: #e2edfa;
  --blue-200: #c6dbf3;
  --blue-300: #93bbe8;
  --blue-500: #2b7de9;
  --blue-600: #2268be;
  --blue-700: #1a559e;
  --blue-800: #213e61;
  --blue-900: #172b45;

  /* Neutrals: cool slate text on warm white paper. */
  --ink: #1b2b40;
  --text: #344456;
  --muted: #56677a;
  --line: #dfe7ef;
  --line-strong: #c9d5e1;
  --white: #ffffff;
  --paper: #fbf8f2;
  --paper-deep: #f5efe3;
  --mist: #f4f7fb;

  /* Restrained accents (from the concept: teal upholstery, plum knitwear, small yellow). */
  --teal-600: #2b7566;
  --teal-50: #ecf6f2;
  --plum-600: #75508a;
  --plum-50: #f6f1f8;
  --gold-600: #8d6a12;
  --gold-400: #e5b53a;
  --gold-50: #fdf7e6;
  --rose-600: #a8423a;
  --rose-50: #fdf1ef;

  --font-display: 'Jost', 'Futura', 'Century Gothic', 'Avenir Next', system-ui, sans-serif;
  --font-body: system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  --font-accent: Georgia, 'Times New Roman', serif;

  --radius-sm: 8px;
  --radius: 14px;
  --radius-lg: 22px;
  --shadow-sm: 0 1px 2px rgb(23 43 69 / 6%), 0 2px 8px rgb(23 43 69 / 5%);
  --shadow: 0 2px 4px rgb(23 43 69 / 5%), 0 12px 32px rgb(23 43 69 / 9%);
  --shadow-lg: 0 4px 10px rgb(23 43 69 / 6%), 0 28px 60px rgb(23 43 69 / 14%);

  --page: 1200px;
  --gutter: clamp(16px, 4vw, 40px);
  --header-h: 84px;
}

/* Names used by the imported page markup (inline styles and page CSS written for
   the Squarespace site), mapped onto the brand palette. */
:root {
  --text-muted: var(--muted);
  --border: var(--line);
  --bg: var(--white);
  --bg-light: var(--mist);
  --nest-blue: var(--blue-600);
  --nest-blue-dark: var(--blue-700);
  --nest-orange: var(--blue-600);
  --nest-orange-dark: var(--blue-700);
  --green: var(--teal-600);
  --red: var(--rose-600);
  --purple: var(--plum-600);
}

/* Base elements. Body copy is set large and dark on purpose: many readers are
   not young and read on phones. */
*, *::before, *::after { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-padding-top: calc(var(--header-h) + 16px);
}
@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
}

body {
  margin: 0;
  background: var(--white);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
@media (min-width: 760px) { body { font-size: 1.125rem; } }

h1, h2, h3, h4 {
  margin: 0 0 0.5em;
  color: var(--ink);
  font-family: var(--font-display);
  font-weight: 500;
  line-height: 1.15;
  letter-spacing: -0.01em;
  text-wrap: balance;
}
h1 { font-size: clamp(2.3rem, 5vw, 3.6rem); }
h2 { font-size: clamp(1.9rem, 3.6vw, 2.75rem); }
h3 { font-size: clamp(1.3rem, 2vw, 1.5rem); }
h4 { font-size: 1.2rem; }

/* The two-voice headline: geometric sans, then a blue italic serif line. */
h1 em, h2 em, .accent {
  display: block;
  color: var(--blue-600);
  font-family: var(--font-accent);
  font-style: italic;
  font-weight: 400;
  letter-spacing: -0.015em;
}
.accent-inline { display: inline; }

p { margin: 0 0 1em; text-wrap: pretty; }
ul, ol { margin: 0 0 1em; padding-left: 1.4em; }
li { margin-bottom: 0.35em; }
strong, b { color: var(--ink); font-weight: 650; }

a { color: var(--blue-600); text-decoration-thickness: 1px; text-underline-offset: 0.18em; }
a:hover { color: var(--blue-700); text-decoration-thickness: 2px; }

img, svg, video { max-width: 100%; height: auto; }
img { display: block; }

:focus-visible {
  outline: 3px solid var(--blue-500);
  outline-offset: 3px;
  border-radius: 4px;
}

table { border-collapse: collapse; width: 100%; }
hr { border: 0; border-top: 1px solid var(--line); margin: 2.5rem 0; }
button, input, select, textarea { font: inherit; color: inherit; }

.sr-only {
  position: absolute !important;
  width: 1px; height: 1px;
  margin: -1px; padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: absolute;
  top: 8px; left: 8px;
  z-index: 100;
  padding: 12px 18px;
  border-radius: var(--radius-sm);
  background: var(--blue-900);
  color: var(--white);
  font-weight: 600;
  transform: translateY(-160%);
}
.skip-link:focus { transform: none; color: var(--white); }

.wrap {
  width: min(var(--page), 100% - 2 * var(--gutter));
  margin-inline: auto;
}
.wrap-narrow {
  width: min(820px, 100% - 2 * var(--gutter));
  margin-inline: auto;
}

/* Gentle entrance for sections. Only applied when JS is running, and never when
   the visitor asks for reduced motion, so content is never hidden by default. */
@media (prefers-reduced-motion: no-preference) {
  .js .reveal { opacity: 0; transform: translateY(18px); transition: opacity 0.7s ease, transform 0.7s ease; }
  .js .reveal.is-visible { opacity: 1; transform: none; }
  .js .reveal-stagger > * { opacity: 0; transform: translateY(14px); transition: opacity 0.6s ease, transform 0.6s ease; }
  .js .reveal-stagger.is-visible > * { opacity: 1; transform: none; }
  .js .reveal-stagger.is-visible > *:nth-child(2) { transition-delay: 0.1s; }
  .js .reveal-stagger.is-visible > *:nth-child(3) { transition-delay: 0.2s; }
  .js .reveal-stagger.is-visible > *:nth-child(4) { transition-delay: 0.3s; }
}
@media print {
  .reveal, .reveal-stagger > * { opacity: 1 !important; transform: none !important; }
}

/* Site chrome: announcement bar, header, navigation, footer. */

.announce {
  background: var(--blue-50);
  border-bottom: 1px solid var(--blue-100);
  color: var(--blue-900);
  font-size: 0.95rem;
  font-weight: 550;
}
.announce .wrap {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  min-height: 44px;
  padding-block: 8px;
  text-align: center;
}
.announce a { color: inherit; }
.announce-close {
  flex: none;
  display: grid;
  place-items: center;
  width: 36px; height: 36px;
  margin-right: -8px;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
}
.announce-close:hover { background: var(--blue-100); color: var(--ink); }
.announce[hidden] { display: none; }

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgb(255 255 255 / 94%);
  border-bottom: 1px solid var(--line);
  backdrop-filter: saturate(1.4) blur(14px);
}
.site-header .wrap {
  display: flex;
  align-items: center;
  gap: 24px;
  min-height: var(--header-h);
}
.brand { flex: none; display: block; border-radius: 50%; }
.brand img { width: 64px; height: 64px; }

.primary-nav { margin-left: auto; }
.nav-list {
  display: flex;
  align-items: center;
  gap: 4px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.nav-list > li { position: relative; margin: 0; }
.nav-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 44px;
  padding: 8px 14px;
  border: 0;
  border-radius: var(--radius-sm);
  background: none;
  color: var(--ink);
  font-family: var(--font-display);
  font-size: 1.06rem;
  font-weight: 500;
  letter-spacing: 0.01em;
  text-decoration: none;
  cursor: pointer;
}
.nav-link:hover { background: var(--blue-50); color: var(--blue-700); }
.nav-link[aria-current="page"] { color: var(--blue-600); box-shadow: inset 0 -2px 0 var(--blue-500); border-radius: 0; }
.nav-link .icon { flex: none; width: 16px; height: 16px; transition: transform 0.2s; }
.nav-link[aria-expanded="true"] .icon { transform: rotate(180deg); }
.nav-cta { margin-left: 12px; }

/* Tools menu: two labeled columns so guides and calculators are easy to tell apart. */
.menu-panel {
  position: absolute;
  top: calc(100% + 10px);
  right: -120px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px 28px;
  width: 560px;
  padding: 22px 24px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--white);
  box-shadow: var(--shadow-lg);
}
.menu-panel[hidden] { display: none; }
.menu-group h2 {
  margin: 0 0 8px;
  color: var(--muted);
  font-family: var(--font-body);
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}
.menu-group ul { margin: 0; padding: 0; list-style: none; }
.menu-group li { margin: 0; }
.menu-group a {
  display: block;
  padding: 9px 10px;
  margin-inline: -10px;
  border-radius: var(--radius-sm);
  color: var(--ink);
  font-size: 1.02rem;
  text-decoration: none;
}
.menu-group a:hover { background: var(--blue-50); color: var(--blue-700); }
.menu-group a[aria-current="page"] { color: var(--blue-600); font-weight: 600; }

.menu-toggle {
  display: none;
  margin-left: auto;
  align-items: center;
  gap: 8px;
  min-height: 48px;
  padding: 10px 16px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  background: var(--white);
  color: var(--ink);
  font-weight: 600;
  cursor: pointer;
}
.menu-toggle svg { width: 22px; height: 22px; }

@media (max-width: 980px) {
  :root { --header-h: 72px; }
  .brand img { width: 54px; height: 54px; }
  .menu-toggle { display: inline-flex; }
  /* No blur here: backdrop-filter would make the header the containing block of
     the fixed menu below and shrink it to the header's height. */
  .site-header { background: var(--white); backdrop-filter: none; }
  .primary-nav {
    position: fixed;
    inset: var(--nav-top, var(--header-h)) 0 0 0;
    overflow-y: auto;
    padding: 16px var(--gutter) 40px;
    background: var(--white);
    border-top: 1px solid var(--line);
  }
  .primary-nav:not(.is-open) { display: none; }
  .nav-list { flex-direction: column; align-items: stretch; gap: 2px; }
  .nav-link { width: 100%; min-height: 56px; padding: 12px 8px; font-size: 1.2rem; justify-content: space-between; }
  .nav-link .icon { width: 20px; height: 20px; }
  .nav-link[aria-current="page"] { box-shadow: inset 3px 0 0 var(--blue-500); padding-left: 14px; }
  .menu-panel {
    position: static;
    grid-template-columns: 1fr;
    width: auto;
    padding: 4px 8px 16px;
    border: 0;
    box-shadow: none;
  }
  .menu-group a { padding: 12px 10px; font-size: 1.1rem; }
  .nav-cta { margin: 16px 0 0; }
  .nav-cta .button { width: 100%; }
  body.nav-open { overflow: hidden; }
}

/* Footer */
.site-footer {
  background: var(--blue-900);
  color: #c9d6e6;
  font-size: 1rem;
}
.site-footer .wrap { padding-block: 64px 32px; }
.footer-top {
  display: grid;
  grid-template-columns: 1.3fr repeat(4, 1fr);
  gap: 32px;
}
.footer-brand img { width: 84px; height: 84px; filter: brightness(0) invert(1); opacity: 0.92; }
.footer-brand p { max-width: 260px; margin: 18px 0 12px; color: #c9d6e6; }
.site-footer h2 {
  margin: 4px 0 14px;
  color: var(--white);
  font-family: var(--font-body);
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}
.site-footer ul { margin: 0; padding: 0; list-style: none; }
.site-footer li { margin: 0 0 4px; }
.site-footer a { display: inline-block; padding: 4px 0; color: #dfe8f3; text-decoration: none; }
.site-footer a:hover { color: var(--white); text-decoration: underline; }
.footer-bottom {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-top: 48px;
  padding-top: 24px;
  border-top: 1px solid rgb(255 255 255 / 14%);
  font-size: 0.92rem;
}
.footer-bottom p { margin: 0; }
.social { display: flex; gap: 6px; }
.social a { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 50%; }
.social a:hover { background: rgb(255 255 255 / 10%); }
.social svg { width: 20px; height: 20px; fill: currentColor; }

@media (max-width: 900px) {
  .footer-top { grid-template-columns: 1fr 1fr; }
  .footer-brand { grid-column: 1 / -1; }
}
@media (max-width: 480px) {
  .footer-top { grid-template-columns: 1fr; }
}

/* Reusable components shared by the homepage and interior pages. */

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 52px;
  padding: 13px 24px;
  border: 0;
  border-radius: var(--radius-sm);
  background: var(--blue-600);
  color: var(--white);
  font-family: var(--font-body);
  font-size: 1.02rem;
  font-weight: 650;
  line-height: 1.2;
  text-align: center;
  text-decoration: none;
  box-shadow: 0 2px 0 rgb(23 70 140 / 18%);
  cursor: pointer;
  transition: background 0.2s, transform 0.2s, box-shadow 0.2s;
}
.button:hover { background: var(--blue-700); color: var(--white); transform: translateY(-1px); box-shadow: 0 8px 20px rgb(34 104 190 / 22%); }
.button-small { min-height: 46px; padding: 10px 18px; font-size: 0.98rem; }
.button-quiet { background: var(--white); color: var(--blue-700); box-shadow: inset 0 0 0 1.5px var(--blue-300); }
.button-quiet:hover { background: var(--blue-50); color: var(--blue-700); box-shadow: inset 0 0 0 1.5px var(--blue-500); }
.button .arrow, .text-link .arrow { width: 18px; height: 18px; flex: none; transition: transform 0.2s; }
.button:hover .arrow, .text-link:hover .arrow { transform: translateX(3px); }

.text-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--blue-600);
  font-weight: 650;
  text-decoration: none;
}
.text-link:hover { color: var(--blue-700); text-decoration: underline; }

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 14px;
  color: var(--blue-600);
  font-family: var(--font-body);
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}
.eyebrow::before {
  content: "";
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--blue-500);
}
.eyebrow.pill {
  padding: 6px 14px;
  border-radius: 999px;
  background: var(--blue-100);
  color: var(--blue-700);
}
.eyebrow.pill::before { display: none; }

.lede { max-width: 62ch; color: var(--muted); font-size: 1.15em; }
.fine { color: var(--muted); font-size: 0.92rem; }

.new-tag {
  display: inline-block;
  margin-right: 6px;
  padding: 1px 8px;
  border-radius: 999px;
  background: var(--blue-100);
  color: var(--blue-700);
  font-size: 0.75em;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  vertical-align: 0.1em;
}

.check-list { margin: 0; padding: 0; list-style: none; }
.check-list li {
  position: relative;
  margin: 0 0 12px;
  padding-left: 36px;
}
.check-list li::before {
  content: "";
  position: absolute;
  left: 0; top: 0.18em;
  width: 24px; height: 24px;
  border-radius: 50%;
  background: var(--teal-50) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%232b7566' stroke-width='2.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 12.5 4 4 8-9'/%3E%3C/svg%3E") center / 15px no-repeat;
}

/* Section scaffolding. Backgrounds alternate so the page reads as distinct chapters. */
.section { padding-block: clamp(64px, 9vw, 112px); }
.section-tight { padding-block: clamp(48px, 6vw, 72px); }
.bg-paper { background: var(--paper); }
.bg-mist { background: var(--mist); }
.bg-blue { background: linear-gradient(180deg, var(--blue-50), #f7fafe); }
.bg-navy { background: var(--blue-800); color: #dbe6f2; }
.bg-navy h2, .bg-navy h3 { color: var(--white); }
.bg-navy h2 em { color: #a9cbf3; }
.bg-navy .eyebrow { color: #a9cbf3; }
.bg-navy .eyebrow::before { background: #a9cbf3; }
.section-head { max-width: 760px; margin-bottom: clamp(32px, 4vw, 52px); }
.section-head.center { margin-inline: auto; text-align: center; }
.section-head .lede { margin-inline: inherit; }
.section-head.center .lede { margin-inline: auto; }

.card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--white);
  box-shadow: var(--shadow-sm);
}

/* Signup: the real embedded form on nestpayroll.com, a clear preview elsewhere. */
.signup-card {
  position: relative;
  container-type: inline-size;
  color-scheme: light only;
  width: 100%;
  max-width: 440px;
  margin-inline: auto;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--white);
  box-shadow: var(--shadow-lg);
  overflow: hidden;
}
.signup-card iframe {
  display: block;
  width: 100%;
  height: 640px;
  border: 0;
  background: var(--white);
  color-scheme: light only;
}
.signup-loader { position: relative; width: 100%; max-width: 440px; padding: 24px; text-align: center; }
.signup-loader .signup-load { width: 100%; }
.signup-loader.is-active { padding: 0; }
.signup-loader [hidden] { display: none; }
.signup-loading:not([hidden]) + iframe { visibility: hidden; }

/* Reserve the homepage form's initial height while it boots. Its copy wraps
   onto extra lines in narrow cards. Later resize messages can still grow it. */
.signup-card .signup-loader { --signup-frame-height: 560px; }
@container (max-width: 295px) {
  .signup-card .signup-loader { --signup-frame-height: 604px; }
}
.signup-card .signup-loader iframe {
  height: var(--signup-frame-height);
}
.signup-card .signup-loader.is-active {
  min-height: var(--signup-frame-height);
}
@media (min-width: 801px) {
  .signup-card .signup-loader { min-height: var(--signup-frame-height); }
}

.signup-fallback { padding: 32px 28px 28px; }
.signup-fallback[hidden] { display: none; }
.signup-fallback h2 { margin-bottom: 8px; font-size: 1.75rem; text-align: center; }
.signup-fallback > p { color: var(--muted); font-size: 0.98rem; text-align: center; }
.signup-fallback .fake-field {
  margin: 14px 0 0;
  padding: 10px 14px 22px;
  border-radius: 10px;
  background: #e9edf2;
  color: #4b5a6b;
  font-size: 0.82rem;
  font-weight: 600;
}
.signup-fallback .button { width: 100%; margin-top: 20px; }
.signup-fallback .preview-note {
  margin: 14px 0 0;
  color: var(--muted);
  font-size: 0.85rem;
  text-align: center;
}

/* FAQ accordions use native <details>, which work with keyboards and screen readers. */
.faq-list { border-top: 1px solid var(--line); }
.faq-list details { border-bottom: 1px solid var(--line); }
.faq-list summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  min-height: 64px;
  padding: 16px 4px;
  color: var(--ink);
  font-family: var(--font-display);
  font-size: 1.18rem;
  font-weight: 500;
  list-style: none;
  cursor: pointer;
}
.faq-list summary::-webkit-details-marker { display: none; }
.faq-list summary::after {
  content: "";
  flex: none;
  width: 32px; height: 32px;
  border-radius: 50%;
  background: var(--blue-50) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%232268be' stroke-width='2.2' stroke-linecap='round'%3E%3Cpath d='M12 6v12M6 12h12'/%3E%3C/svg%3E") center / 16px no-repeat;
  transition: transform 0.25s, background-color 0.2s;
}
.faq-list details[open] summary::after { transform: rotate(45deg); background-color: var(--blue-100); }
.faq-list summary:hover { color: var(--blue-700); }
.faq-list details > :not(summary) { padding: 0 52px 20px 4px; margin: 0; color: var(--text); }

/* Breadcrumbs for interior pages. */
.breadcrumbs { padding-top: 22px; font-size: 0.95rem; }
.breadcrumbs ol { display: flex; flex-wrap: wrap; gap: 4px 0; margin: 0; padding: 0; list-style: none; }
.breadcrumbs li { margin: 0; color: var(--muted); }
.breadcrumbs li + li::before { content: "›"; margin: 0 10px; color: var(--line-strong); }
.breadcrumbs a { color: var(--muted); text-decoration: none; }
.breadcrumbs a:hover { color: var(--blue-700); text-decoration: underline; }

/* Closing call to action, reused across interior pages. */
.cta-band {
  position: relative;
  overflow: hidden;
  padding: clamp(40px, 6vw, 64px) clamp(24px, 5vw, 64px);
  border: 1px solid var(--blue-100);
  border-radius: var(--radius-lg);
  background:
    radial-gradient(60% 90% at 100% 100%, rgb(253 247 230 / 90%), transparent 70%),
    radial-gradient(50% 80% at 0% 0%, var(--blue-100), transparent 70%),
    linear-gradient(120deg, var(--blue-50), var(--teal-50));
  text-align: center;
}
.cta-band h2 { margin-bottom: 14px; }
.cta-band p { max-width: 560px; margin: 0 auto 26px; color: var(--muted); }
.cta-band .actions { display: flex; flex-wrap: wrap; gap: 14px 24px; align-items: center; justify-content: center; }

/* Contextual next steps on commercial decision pages. */
.decision-actions { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 14px 22px; margin: 24px 0 32px; text-align: center; }
.decision-actions p { flex-basis: 100%; margin: 0; color: var(--muted); font-size: 0.8rem; line-height: 1.5; }
@media (max-width: 600px) { .decision-actions .button { width: 100%; } }

/* Homepage sections. */

/* Hero: keep the offer and the real signup form together in the opening block. */
.home-hero {
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(55% 70% at 88% 30%, rgb(226 237 250 / 85%), transparent 70%),
    radial-gradient(40% 50% at 8% 100%, rgb(236 246 242 / 80%), transparent 70%),
    linear-gradient(120deg, var(--white) 10%, var(--paper) 70%);
  border-bottom: 1px solid var(--line);
}
.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: clamp(32px, 5vw, 72px);
  align-items: center;
  padding-block: clamp(40px, 6vw, 80px);
}
.home-hero h1 { margin-bottom: 22px; font-size: clamp(2.3rem, 3.7vw, 3.15rem); }
.home-hero h1 .eyebrow { display: flex; margin-bottom: 18px; font-size: 0.85rem; letter-spacing: 0.12em; line-height: 1.4; }
.hero-sub { max-width: 52ch; margin-bottom: 24px; color: var(--text); font-size: 1.08em; }
.hero-checks { margin-bottom: 22px; }
.hero-checks li { color: var(--ink); }
.hero-price { margin-bottom: 6px; color: var(--ink); font-weight: 600; }
.hero-fine { max-width: 52ch; margin: 0; color: var(--muted); font-size: 0.95rem; }

.hero-visual { position: relative; display: flex; justify-content: flex-end; }
.hero-visual .signup-card { position: relative; z-index: 1; margin: 0; }
/* The snapshot sits behind the signup card in the shared visual area. */
.hero-snapshot {
  position: absolute;
  z-index: 0;
  top: clamp(48px, 6vw, 84px);
  left: 10px;
  width: clamp(228px, 23.5vw, 300px);
  margin: 0;
  transform: rotate(-7deg);
}
.hero-snapshot img {
  width: 100%;
  box-shadow: -5px 3px 10px rgb(23 43 69 / 18%), var(--shadow-lg);
}
@media (prefers-reduced-motion: no-preference) {
  .js .hero-snapshot { animation: snapshot-in 1.1s 0.2s cubic-bezier(0.2, 0.7, 0.2, 1) both; }
  @keyframes snapshot-in {
    from { opacity: 0; transform: translate(70px, 6px) rotate(0deg); }
    to { opacity: 1; transform: rotate(-7deg); }
  }
}
@media (max-width: 960px) {
  .hero-grid { grid-template-columns: 1fr; }
  .hero-visual { flex-direction: column; align-items: center; }
  .hero-snapshot {
    position: relative;
    top: auto; left: auto;
    width: min(250px, 62vw);
    margin: 0 0 -48px -30%;
    transform: rotate(-5deg);
  }
  @keyframes snapshot-in {
    from { opacity: 0; transform: translateY(20px) rotate(-1deg); }
    to { opacity: 1; transform: rotate(-5deg); }
  }
}

/* Desktop reserves space for the part of the snapshot outside the card, so it
   can peek out without crossing into the copy column. */
@media (min-width: 961px) {
  .hero-grid {
    --snapshot-peek: clamp(120px, calc(29vw - 160px), 200px);
    grid-template-columns: minmax(0, 1fr) calc(clamp(340px, 34vw, 440px) + var(--snapshot-peek));
    gap: clamp(32px, 4vw, 56px);
    align-items: start;
    margin-block: 32px;
    padding: 32px;
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    background: rgb(255 255 255 / 85%);
  }
  .hero-copy { max-width: none; }
  .home-hero h1 { margin-bottom: 16px; font-size: clamp(2rem, 2.65vw, 2.45rem); }
  .home-hero h1 .eyebrow { margin-bottom: 12px; font-size: 0.8rem; letter-spacing: 0.1em; }
  .hero-sub { margin-bottom: 16px; font-size: 1rem; line-height: 1.55; }
  .hero-checks { margin-bottom: 16px; font-size: 1rem; line-height: 1.5; }
  .hero-checks li { margin-bottom: 8px; padding-left: 30px; }
  .hero-checks li::before { width: 20px; height: 20px; }
  .hero-price { font-size: 0.95rem; line-height: 1.5; }
  .hero-fine { max-width: none; font-size: 0.875rem; line-height: 1.5; }
  .hero-visual { padding-inline-start: var(--snapshot-peek); }
}

/* On phones, keep the offer and signup ahead of the longer introduction.
   The existing single signup and all desktop content remain in place. */
@media (max-width: 800px) {
  .hero-grid { gap: 0; padding-block: 24px 40px; }
  .hero-copy, .hero-visual { display: contents; }
  .home-hero h1 { order: 0; margin-bottom: 14px; }
  .hero-offer { order: 1; margin-bottom: 20px; }
  .hero-visual .signup-card { order: 2; justify-self: center; width: min(100%, 440px); }
  .hero-details { order: 3; margin-top: 24px; }
  .hero-snapshot { order: 4; justify-self: center; margin: 24px 0 0; }
}

.trust-bar { border-bottom: 1px solid var(--line); background: var(--white); }
.trust-bar ul {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-around;
  gap: 12px 32px;
  margin-block: 0;
  padding-block: 22px;
  list-style: none;
}
.trust-bar li { display: flex; align-items: center; gap: 10px; margin: 0; color: var(--ink); font-weight: 550; }
.trust-bar svg { width: 22px; height: 22px; color: var(--blue-600); }
.trust-bar li:first-child svg { color: var(--plum-600); }
.trust-bar li:nth-child(2) svg { color: var(--teal-600); }

/* Comparison table: the Nest column is lifted out as a highlighted panel. */
.compare {
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--white);
  box-shadow: var(--shadow-sm);
}
.compare table { min-width: 680px; font-size: 1rem; }
.compare th, .compare td { padding: 18px 22px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
.compare tbody tr:last-child > * { border-bottom: 0; }
.compare thead th {
  padding-block: 16px;
  background: var(--mist);
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}
.compare tbody th { width: 21%; color: var(--ink); font-weight: 650; }
.compare td { width: 39.5%; color: var(--muted); }
.compare .is-nest { background: var(--blue-50); color: var(--ink); }
.compare thead .is-nest { background: var(--blue-100); color: var(--blue-700); box-shadow: inset 0 3px 0 var(--blue-500); }
.compare td.is-nest {
  padding-left: 52px;
  background: var(--blue-50) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%232b7566' stroke-width='2.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 12.5 4 4 8-9'/%3E%3C/svg%3E") 22px 20px / 18px no-repeat;
}
.compare-note { margin-top: 14px; }
/* Phones: each task becomes its own card so both answers stay readable. */
@media (max-width: 720px) {
  .compare { overflow: visible; border: 0; background: none; box-shadow: none; }
  .compare table, .compare tbody, .compare tr, .compare th, .compare td { display: block; width: auto; min-width: 0; }
  .compare thead { display: none; }
  .compare tbody tr {
    margin-bottom: 14px;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--white);
    box-shadow: var(--shadow-sm);
  }
  .compare tbody th, .compare td { width: auto; }
  .compare tbody th { padding: 16px 18px 6px; border: 0; font-family: var(--font-display); font-size: 1.2rem; font-weight: 500; }
  .compare td { padding: 6px 18px 14px; border: 0; }
  .compare td::before {
    content: attr(data-label);
    display: block;
    margin-bottom: 2px;
    color: var(--muted);
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
  }
  .compare td.is-nest { padding: 14px 18px 16px 18px; background-image: none; }
  .compare td.is-nest::before { color: var(--blue-700); }
}

.cpa-quote {
  display: grid;
  grid-template-columns: 1.5fr 1fr;
  gap: clamp(24px, 4vw, 56px);
  align-items: center;
  margin-top: clamp(40px, 5vw, 56px);
  padding: clamp(28px, 4vw, 44px);
  border-radius: var(--radius-lg);
  background: var(--paper);
  border: 1px solid #ece4d3;
}
.cpa-quote figure { margin: 0; }
.cpa-quote blockquote { margin: 10px 0 14px; }
.cpa-quote blockquote p { margin: 0; color: var(--ink); font-family: var(--font-accent); font-size: clamp(1.2rem, 2vw, 1.45rem); line-height: 1.5; }
.cpa-quote figcaption { color: var(--muted); font-size: 0.95rem; }
.cpa-side p { color: var(--text); }
.stars { color: var(--gold-400); font-size: 1.15rem; letter-spacing: 3px; }
@media (max-width: 820px) { .cpa-quote { grid-template-columns: 1fr; } }

/* Employee app: three illustrative app screens. */
.emp-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 24px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.emp-step {
  margin: 0;
  padding: 22px 22px 28px;
  border: 1px solid var(--line);
  border-top: 4px solid var(--tone, var(--blue-500));
  border-radius: var(--radius);
  background: var(--white);
  box-shadow: var(--shadow-sm);
}
.emp-step h3 { font-size: 1.3rem; }
.emp-step > p { margin: 0; color: var(--muted); }
.tone-blue { --tone: var(--blue-500); --tone-ink: var(--blue-700); --tone-bg: var(--blue-50); }
.tone-teal { --tone: #4f9b8a; --tone-ink: var(--teal-600); --tone-bg: var(--teal-50); }
.tone-plum { --tone: #9a77ad; --tone-ink: var(--plum-600); --tone-bg: var(--plum-50); }
.tone-gold { --tone: var(--gold-400); --tone-ink: var(--gold-600); --tone-bg: var(--gold-50); }
.step-num {
  display: grid;
  place-items: center;
  width: 40px; height: 40px;
  margin: 22px 0 14px;
  border-radius: 50%;
  background: var(--tone-bg, var(--blue-50));
  color: var(--tone-ink, var(--blue-700));
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 600;
}
.mock {
  padding: 16px 18px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--tone-bg, var(--mist));
  font-size: 0.92rem;
}
.mock p { margin: 0; }
.mock-who { color: var(--text); font-size: 0.72rem; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; }
.mock-title { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin: 6px 0 8px !important; color: var(--ink); font-weight: 700; }
.mock-chip { padding: 2px 8px; border-radius: 999px; background: var(--white); color: var(--blue-700); font-size: 0.72rem; font-weight: 600; white-space: nowrap; }
.mock-row { display: flex; justify-content: space-between; gap: 12px; padding: 7px 0; border-top: 1px solid rgb(23 43 69 / 8%); }
.mock-row span { color: var(--muted); }
.mock-row strong { font-weight: 650; text-align: right; }
.mock-ok { margin: 8px 0 0 !important; padding: 7px; border-radius: 8px; background: var(--teal-50); color: var(--teal-600); font-weight: 650; text-align: center; }
.mock-btns { display: flex; gap: 8px; margin-top: 12px !important; }
.mock-btn { flex: 1; padding: 8px 6px; border: 1px solid var(--line-strong); border-radius: 7px; background: var(--white); color: var(--ink); font-size: 0.82rem; font-weight: 650; text-align: center; }
.mock-btn.primary { border-color: var(--blue-600); background: var(--blue-600); color: var(--white); }
.emp-illus { margin: 14px 0 0; }
.emp-points {
  max-width: 880px;
  margin-top: clamp(36px, 5vw, 52px);
}
.emp-points h3 { margin-bottom: 18px; }
@media (max-width: 900px) { .emp-grid { grid-template-columns: 1fr; max-width: 520px; } }

/* Reviews band */
.reviews { position: relative; overflow: hidden; }
.reviews::before {
  content: "“";
  position: absolute;
  top: -40px; left: 4%;
  color: rgb(255 255 255 / 5%);
  font-family: var(--font-accent);
  font-size: 22rem;
  line-height: 1;
  pointer-events: none;
}
.review-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; }
.review {
  display: flex;
  flex-direction: column;
  margin: 0;
  padding: 28px;
  border: 1px solid rgb(255 255 255 / 12%);
  border-radius: var(--radius);
  background: rgb(255 255 255 / 6%);
}
.review h3 { margin: 12px 0 10px; font-size: 1.25rem; }
.review blockquote { flex: 1; margin: 0 0 18px; }
.review blockquote p { margin: 0; color: #e8eff7; font-family: var(--font-accent); font-size: 1.08rem; line-height: 1.6; }
.review figcaption { color: #b7c8db; font-size: 0.92rem; }
.reviews-more { margin: 32px 0 0; text-align: center; }
.reviews .text-link { color: #bcd8fa; }
.reviews .text-link:hover { color: var(--white); }
@media (max-width: 900px) { .review-grid { grid-template-columns: 1fr; max-width: 620px; margin-inline: auto; } }

/* Three steps */
.steps { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; margin: 0; padding: 0; list-style: none; }
.step {
  margin: 0;
  padding: 6px 28px 28px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: linear-gradient(180deg, var(--tone-bg), var(--white) 140px);
}
.step h3 { font-size: 1.35rem; }
.step > p { color: var(--muted); }
.step .check-list li { color: var(--muted); font-size: 0.98rem; }
@media (max-width: 900px) { .steps { grid-template-columns: 1fr; max-width: 620px; } }

/* Pricing */
.pricing { display: grid; grid-template-columns: 1.1fr 1fr; gap: clamp(32px, 6vw, 88px); align-items: center; }
.pricing .check-list { margin: 22px 0 24px; }
.price-card {
  padding: clamp(28px, 4vw, 40px);
  border: 1px solid var(--blue-200);
  border-radius: var(--radius-lg);
  background: var(--white);
  box-shadow: var(--shadow-lg);
}
.price-card p { margin: 0; }
.price-top { display: flex; align-items: center; justify-content: space-between; color: var(--ink); font-size: 0.9rem; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; }
.chip { padding: 4px 12px; border-radius: 999px; background: var(--blue-100); color: var(--blue-700); font-size: 0.8rem; letter-spacing: 0; text-transform: none; }
.price-num { margin: 18px 0 6px !important; color: var(--ink); font-family: var(--font-display); font-size: 5.5rem; font-weight: 500; line-height: 1; }
.price-num sup { font-size: 0.38em; vertical-align: 1.3em; margin-right: 2px; }
.price-num span { margin-left: 6px; color: var(--muted); font-family: var(--font-body); font-size: 1.05rem; font-weight: 500; }
.price-incl { padding-bottom: 22px !important; border-bottom: 1px solid var(--line); color: var(--text); }
.price-card .button { width: 100%; margin: 24px 0 22px; }
.price-more { margin-bottom: 14px !important; color: var(--text); }
@media (max-width: 900px) { .pricing { grid-template-columns: 1fr; } }

/* Every kind of household employee */
.every-grid { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(32px, 6vw, 80px); align-items: center; }
.every-grid p { margin: 0; color: var(--text); font-size: 1.1em; }
.role-cloud { display: flex; flex-wrap: wrap; gap: 12px; margin: 0; padding: 0; list-style: none; }
.role-cloud li {
  margin: 0;
  padding: 10px 18px;
  border: 1px solid color-mix(in srgb, var(--tone) 45%, white);
  border-radius: 999px;
  background: var(--tone-bg);
  color: var(--tone-ink);
  font-family: var(--font-display);
  font-size: 1.1rem;
  font-weight: 500;
}
@media (max-width: 900px) { .every-grid { grid-template-columns: 1fr; } }

/* Resources */
.res-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 20px; }
.res-card {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 24px;
  border: 1px solid var(--line);
  border-top: 4px solid var(--tone);
  border-radius: var(--radius);
  background: linear-gradient(180deg, var(--tone-bg), var(--white) 70%);
  color: var(--text);
  text-decoration: none;
  transition: transform 0.25s, box-shadow 0.25s;
}
.res-card:hover { color: var(--text); transform: translateY(-3px); box-shadow: var(--shadow); }
.res-icon { display: grid; place-items: center; width: 48px; height: 48px; margin-bottom: 10px; border-radius: 12px; background: var(--white); color: var(--tone-ink); box-shadow: var(--shadow-sm); }
.res-icon svg { width: 24px; height: 24px; }
.res-tag { color: var(--tone-ink); font-size: 0.78rem; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; }
.res-card strong { color: var(--ink); font-family: var(--font-display); font-size: 1.3rem; font-weight: 500; line-height: 1.25; }
.res-text { flex: 1; color: var(--muted); font-size: 0.98rem; }
.res-go { display: inline-flex; align-items: center; gap: 6px; margin-top: 8px; color: var(--blue-600); font-weight: 650; }
.res-go svg { width: 16px; height: 16px; }
.res-more { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; margin-top: 28px; padding-top: 24px; border-top: 1px solid var(--line); color: var(--muted); }
.res-more a { display: inline-flex; align-items: center; gap: 8px; padding: 8px 14px; border: 1px solid var(--line); border-radius: 999px; color: var(--ink); text-decoration: none; }
.res-more a:hover { border-color: var(--blue-300); background: var(--blue-50); color: var(--blue-700); }
.res-more svg { width: 18px; height: 18px; color: var(--blue-600); }
@media (max-width: 1040px) { .res-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 560px) { .res-grid { grid-template-columns: 1fr; } }

/* FAQ */
.faq-layout { display: grid; grid-template-columns: 1fr 2fr; gap: clamp(28px, 5vw, 72px); align-items: start; }
.faq-intro { position: sticky; top: calc(var(--header-h) + 32px); }
.faq-list { background: transparent; }
@media (max-width: 900px) { .faq-layout { grid-template-columns: 1fr; } .faq-intro { position: static; } }

/* Disclaimers */
.disclaimers { padding-block: 8px 64px; color: var(--muted); font-size: 0.92rem; }
.disclaimers h2 { margin-bottom: 12px; font-family: var(--font-body); font-size: 1rem; font-weight: 700; }
.disclaimers p { max-width: 110ch; }

/* State guides (51 pages). The markup is each guide's own authored HTML; these
   rules style its shared vocabulary: hero, toc, quick-facts, callout, threshold-block,
   step-card, ot-table, resource-grid, decision-aid, inline-cta and signup-embed. */

/* BEGIN SHARED LEAVE TEMPLATE
   Shared sick-time and vacation template. Optional facts and details come from
   the same per-state content data; other leave programs retain their own blocks. */
.layout-state-guide .state-leave h4 { margin: 16px 0 8px; font-family: var(--font-body); font-size: 1rem; }
.layout-state-guide .leave-facts { margin: 16px 0 22px; }
.layout-state-guide .leave-facts > div { display: grid; grid-template-columns: 130px minmax(0, 1fr); gap: 16px; padding: 11px 0; border-bottom: 1px solid var(--line); }
.layout-state-guide .leave-facts dt { font-weight: 650; }
.layout-state-guide .leave-facts dd { margin: 0; }
.layout-state-guide .leave-nest h4 { margin-top: 0; }
.layout-state-guide .leave-nest h4:not(:first-child) { margin-top: 16px; }
.layout-state-guide .leave-nest p { margin: 8px 0 0; }
.layout-state-guide .leave-details { margin: 16px 0; padding-bottom: 12px; border-bottom: 1px solid var(--line); }
.layout-state-guide .leave-details summary { font-weight: 650; cursor: pointer; padding: 8px 0; }
.layout-state-guide .leave-details ul { margin: 8px 0 0; }
.layout-state-guide .leave-local, .layout-state-guide .leave-sources { font-size: .9rem; }
.layout-state-guide .leave-sources a { overflow-wrap: anywhere; }
@media (max-width: 480px) {
  .layout-state-guide .leave-facts > div { grid-template-columns: 100px minmax(0, 1fr); gap: 12px; }
  .layout-state-guide .leave-details summary { min-height: 44px; }
}
/* END SHARED LEAVE TEMPLATE */

.layout-state-guide { --guide-max: 1200px; }

/* Hero */
.layout-state-guide .hero {
  position: relative;
  overflow: hidden;
  margin: 16px 0 0;
  padding: clamp(40px, 6vw, 72px) var(--gutter) clamp(40px, 5vw, 60px);
  background:
    radial-gradient(45% 80% at 100% 0%, rgb(226 237 250 / 90%), transparent 70%),
    radial-gradient(40% 70% at 0% 100%, rgb(236 246 242 / 85%), transparent 70%),
    var(--paper);
  border-block: 1px solid var(--line);
  text-align: center;
}
.layout-state-guide .state-logo-wrap { display: flex; justify-content: center; margin-bottom: 20px; }
.layout-state-guide .state-logo {
  width: 96px; height: 96px;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: var(--white);
  box-shadow: var(--shadow);
  object-fit: contain;
}
.layout-state-guide .hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 18px;
  padding: 6px 16px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--white);
  color: var(--blue-700);
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}
.layout-state-guide .hero-badge .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--teal-600); }
.layout-state-guide .hero h1 { max-width: 860px; margin: 0 auto 16px; font-size: clamp(2.1rem, 4.4vw, 3.3rem); }
.layout-state-guide .hero p { max-width: 720px; margin: 0 auto 28px; color: var(--text); font-size: 1.08em; }
.layout-state-guide .hero-cta,
.layout-state-guide .inline-cta a,
.layout-state-guide .cta-box a,
.layout-state-guide .cta-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 52px;
  padding: 13px 26px;
  border-radius: var(--radius-sm);
  background: var(--blue-600);
  color: var(--white);
  font-weight: 650;
  text-decoration: none;
  box-shadow: 0 2px 0 rgb(23 70 140 / 18%);
  transition: background 0.2s, transform 0.2s;
}
.layout-state-guide .hero-cta:hover,
.layout-state-guide .cta-btn:hover { background: var(--blue-700); color: var(--white); transform: translateY(-1px); }

/* Two-column reading layout with a sticky table of contents */
.layout-state-guide .page-wrap {
  display: grid;
  grid-template-columns: 250px minmax(0, 1fr);
  gap: clamp(32px, 5vw, 64px);
  width: min(var(--guide-max), 100% - 2 * var(--gutter));
  margin: clamp(32px, 5vw, 56px) auto 0;
  padding-bottom: 72px;
}
.layout-state-guide .toc {
  position: sticky;
  top: calc(var(--header-h) + 24px);
  align-self: start;
  max-height: calc(100vh - var(--header-h) - 48px);
  overflow-y: auto;
  padding-right: 6px;
  font-size: 0.98rem;
}
.layout-state-guide .toc-title,
.layout-state-guide .toc h3 {
  margin: 0 0 12px;
  color: var(--muted);
  font-family: var(--font-body);
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}
.layout-state-guide .toc a {
  display: block;
  padding: 7px 0 7px 16px;
  border-left: 2px solid var(--line);
  color: var(--text);
  line-height: 1.35;
  text-decoration: none;
}
.layout-state-guide .toc a.sub { padding-left: 30px; color: var(--muted); font-size: 0.92rem; }
.layout-state-guide .toc a:hover { border-left-color: var(--blue-300); color: var(--blue-700); }
.layout-state-guide .toc a.active { border-left-color: var(--blue-600); color: var(--blue-700); font-weight: 650; }

/* Article typography */
.layout-state-guide .content { min-width: 0; max-width: 780px; }
.layout-state-guide .content h2 {
  margin: 64px 0 14px;
  padding-top: 32px;
  border-top: 1px solid var(--line);
  font-size: clamp(1.7rem, 3vw, 2.15rem);
}
.layout-state-guide .content h2:first-of-type { margin-top: 8px; padding-top: 0; border-top: 0; }
.layout-state-guide .content h3 { margin: 32px 0 10px; font-size: 1.32rem; font-weight: 500; }
.layout-state-guide .content h4 { margin: 20px 0 8px; font-size: 1.12rem; }
.layout-state-guide .content p,
.layout-state-guide .content li { line-height: 1.7; }
.layout-state-guide .content ul,
.layout-state-guide .content ol { padding-left: 1.3em; }
.layout-state-guide .content li::marker { color: var(--blue-500); }
.layout-state-guide .content p[style*="font-size: 12px"],
.layout-state-guide .content p[style*="font-size:12px"] { font-size: 0.9rem !important; color: var(--muted) !important; }

.layout-state-guide .updated-badge {
  display: inline-flex;
  align-items: flex-start;
  gap: 10px;
  margin-bottom: 24px;
  padding: 10px 16px;
  border-radius: var(--radius-sm);
  background: var(--teal-50);
  color: var(--teal-600);
  font-size: 0.92rem;
  line-height: 1.5;
}
.layout-state-guide .updated-badge .check { font-weight: 800; }

/* Quick facts: the at-a-glance numbers */
.layout-state-guide .quick-facts {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 14px;
  margin: 0 0 32px;
}
.layout-state-guide .quick-fact {
  padding: 16px 18px 18px;
  border: 1px solid var(--line);
  border-top: 4px solid var(--blue-500);
  border-radius: var(--radius);
  background: var(--white);
  box-shadow: var(--shadow-sm);
}
.layout-state-guide .quick-fact:nth-child(5n+2) { border-top-color: #4f9b8a; }
.layout-state-guide .quick-fact:nth-child(5n+3) { border-top-color: #9a77ad; }
.layout-state-guide .quick-fact:nth-child(5n+4) { border-top-color: var(--gold-400); }
.layout-state-guide .quick-fact:nth-child(5n+5) { border-top-color: var(--blue-300); }
.layout-state-guide .quick-fact strong {
  display: block;
  margin-bottom: 6px;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.layout-state-guide .quick-fact span {
  color: var(--ink);
  font-family: var(--font-display);
  font-size: 1.4rem;
  font-weight: 500;
  line-height: 1.2;
}

/* Callouts. Orange in the original pages becomes gold: same "take note" meaning,
   kept within the brand palette. */
.layout-state-guide .callout {
  margin: 18px 0;
  padding: 18px 22px;
  border: 1px solid transparent;
  border-left-width: 4px;
  border-radius: 12px;
  font-size: 1rem;
  line-height: 1.65;
}
.layout-state-guide .callout > :last-child { margin-bottom: 0; }
.layout-state-guide .callout ul { margin-top: 10px; }
.layout-state-guide .callout.blue { border-color: var(--blue-100); border-left-color: var(--blue-500); background: var(--blue-50); }
.layout-state-guide .callout.green { border-color: #d5ebe3; border-left-color: var(--teal-600); background: var(--teal-50); }
.layout-state-guide .callout.orange { border-color: #f1e3b8; border-left-color: var(--gold-400); background: var(--gold-50); }
.layout-state-guide .callout.red { border-color: #f3d8d4; border-left-color: var(--rose-600); background: var(--rose-50); }
.layout-state-guide .callout.purple { border-color: #e8ddef; border-left-color: var(--plum-600); background: var(--plum-50); }
.layout-state-guide .callout .source,
.layout-state-guide .source { display: block; margin-top: 8px; color: var(--muted); font-size: 0.86rem; }
.layout-state-guide .source a { color: inherit; }

/* Threshold tables */
.layout-state-guide .threshold-block {
  margin: 18px 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--white);
  box-shadow: var(--shadow-sm);
}
.layout-state-guide .threshold-block-header {
  padding: 14px 22px;
  border-bottom: 1px solid var(--line);
  background: var(--mist);
  color: var(--ink);
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 500;
}
.layout-state-guide .threshold-row {
  display: grid;
  grid-template-columns: 150px 1fr;
  gap: 18px;
  padding: 18px 22px;
  border-bottom: 1px solid var(--line);
}
.layout-state-guide .threshold-row:last-child { border-bottom: 0; }
.layout-state-guide .threshold-amount {
  color: var(--blue-600);
  font-family: var(--font-display);
  font-size: 1.45rem;
  font-weight: 500;
  line-height: 1.2;
  white-space: nowrap;
}
.layout-state-guide .threshold-amount-sub {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-family: var(--font-body);
  font-size: 0.76rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  white-space: normal;
}
.layout-state-guide .threshold-detail { font-size: 1rem; line-height: 1.6; }

/* Step cards hold one setup task each */
.layout-state-guide .step-card {
  margin: 14px 0 22px;
  padding: 24px 26px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: linear-gradient(180deg, var(--mist), var(--white) 160px);
}
.layout-state-guide .step-card > :first-child { margin-top: 0; }
.layout-state-guide .step-card > :last-child { margin-bottom: 0; }
.layout-state-guide .step-card h3,
.layout-state-guide .step-card h4 { margin-top: 18px; }

.layout-state-guide .decision-aid {
  margin: 18px 0;
  padding: 22px 26px;
  border: 1px solid #f1e3b8;
  border-radius: var(--radius);
  background: var(--gold-50);
}
.layout-state-guide .decision-aid h4 { margin: 0 0 10px; }
.layout-state-guide .decision-aid .arrow-row { display: flex; gap: 10px; margin: 8px 0; }
.layout-state-guide .decision-aid .arrow-row .arrow { flex: none; color: var(--gold-600); font-weight: 700; }
.layout-state-guide .big-stat { margin: 10px 0; color: var(--blue-600); font-family: var(--font-display); font-size: 2rem; font-weight: 500; }

/* Rate tables */
.layout-state-guide .ot-table,
.layout-state-guide .content table:not([class]) {
  width: 100%;
  margin: 16px 0 24px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  border-collapse: separate;
  border-spacing: 0;
  background: var(--white);
  font-size: 0.98rem;
}
.layout-state-guide .ot-table caption {
  padding: 14px 18px 12px;
  border: 1px solid var(--line);
  border-bottom: 0;
  border-radius: var(--radius) var(--radius) 0 0;
  background: var(--mist);
  color: var(--ink);
  font-weight: 700;
  text-align: left;
}
.layout-state-guide .ot-table caption + thead tr:first-child th,
.layout-state-guide .ot-table caption + tbody tr:first-child td { border-top: 0; }
.layout-state-guide .ot-table th,
.layout-state-guide .content table:not([class]) th {
  padding: 10px 18px;
  border-bottom: 1px solid var(--line);
  background: var(--white);
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-align: left;
  text-transform: uppercase;
}
.layout-state-guide .ot-table td,
.layout-state-guide .content table:not([class]) td { padding: 11px 18px; border-bottom: 1px solid var(--line); vertical-align: top; }
.layout-state-guide .ot-table tr:last-child td,
.layout-state-guide .content table:not([class]) tr:last-child td { border-bottom: 0; }
.layout-state-guide .ot-table tbody tr:nth-child(even) td { background: #fafcfe; }
.layout-state-guide .ot-table .rate { color: var(--blue-600); font-weight: 700; white-space: nowrap; }

/* Resources */
.layout-state-guide .resource-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin: 16px 0; }
.layout-state-guide .resource-link {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 60px;
  padding: 12px 16px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--white);
  color: var(--ink);
  font-weight: 550;
  line-height: 1.35;
  text-decoration: none;
  transition: border-color 0.2s, box-shadow 0.2s, transform 0.2s;
}
.layout-state-guide .resource-link:hover { border-color: var(--blue-300); color: var(--blue-700); box-shadow: var(--shadow-sm); transform: translateY(-1px); }
.layout-state-guide .resource-link .icon { display: grid; place-items: center; flex: none; width: 36px; height: 36px; border-radius: 10px; font-size: 1.05rem; }
.layout-state-guide .icon.blue-bg { background: var(--blue-50); }
.layout-state-guide .icon.green-bg { background: var(--teal-50); }
.layout-state-guide .icon.orange-bg { background: var(--gold-50); }

/* Calls to action inside the article */
.layout-state-guide .inline-cta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  margin: 40px 0;
  padding: 30px 32px;
  border-radius: var(--radius-lg);
  background: radial-gradient(70% 120% at 100% 0%, #2f5d93, transparent 60%), var(--blue-800);
  color: #dbe6f2;
}
.layout-state-guide .inline-cta h3 { margin: 0 0 6px; color: var(--white); font-size: 1.35rem; }
.layout-state-guide .inline-cta p { margin: 0; color: #dbe6f2; }
.layout-state-guide .inline-cta a { flex: none; background: var(--white); color: var(--blue-700); box-shadow: none; }
.layout-state-guide .inline-cta a:hover { background: var(--blue-50); color: var(--blue-800); }

.layout-state-guide .signup-embed {
  margin: 40px 0;
  padding: 32px clamp(16px, 4vw, 36px) 36px;
  border: 1px solid var(--blue-100);
  border-radius: var(--radius-lg);
  background: linear-gradient(180deg, var(--blue-50), var(--white) 70%);
  text-align: center;
}
.layout-state-guide .signup-embed h3 { margin: 0 0 8px; font-size: 1.5rem; }
.layout-state-guide .signup-embed > p { max-width: 56ch; margin: 0 auto 22px; color: var(--text); }
.layout-state-guide .signup-embed-frame {
  max-width: 460px;
  margin: 0 auto;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--white);
  box-shadow: var(--shadow);
  text-align: left;
}
.layout-state-guide .signup-embed-frame iframe { display: block; width: 100%; height: 640px; border: 0; }

@media (max-width: 900px) {
  .layout-state-guide .page-wrap { grid-template-columns: 1fr; gap: 8px; }
  /* On phones the table of contents becomes a compact card of the main sections. */
  .layout-state-guide .toc {
    position: static;
    max-height: none;
    padding: 18px 20px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--mist);
  }
  .layout-state-guide .toc a.sub { display: none; }
  .layout-state-guide .toc a { padding-block: 9px; }
  .layout-state-guide .resource-grid { grid-template-columns: 1fr; }
  .layout-state-guide .threshold-row { grid-template-columns: 1fr; gap: 6px; }
  .layout-state-guide .inline-cta { flex-direction: column; align-items: flex-start; }
  .layout-state-guide .ot-table { display: block; overflow-x: auto; }
}

/* Interior pages: calculators and tools, plus general page scaffolding. */

/* Tool hero: a calm band that the calculator card overlaps. */
.tool-hero {
  margin-top: 16px;
  padding: clamp(36px, 5vw, 64px) 0 clamp(96px, 10vw, 128px);
  border-top: 1px solid var(--line);
  background:
    radial-gradient(50% 90% at 100% 0%, rgb(226 237 250 / 90%), transparent 70%),
    radial-gradient(40% 80% at 0% 100%, rgb(236 246 242 / 80%), transparent 70%),
    var(--paper);
  text-align: center;
}
.tool-hero h1 { margin-bottom: 12px; }
.tool-hero .lede { margin: 0 auto; color: var(--text); }

.tool-layout {
  display: grid;
  grid-template-columns: minmax(0, 600px) minmax(0, 340px);
  justify-content: center;
  gap: 32px;
  align-items: start;
  margin-top: calc(-1 * clamp(64px, 8vw, 88px));
}
.tool-main { min-width: 0; }
.tool-main > [id] {
  border: 1px solid var(--line);
  border-radius: var(--radius-lg) !important;
  box-shadow: var(--shadow-lg) !important;
}
.tool-aside {
  position: sticky;
  top: calc(var(--header-h) + 24px);
  margin-top: clamp(64px, 8vw, 88px);
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--white);
}
.tool-aside-title {
  margin: 0 0 12px;
  color: var(--muted);
  font-family: var(--font-body);
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}
.tool-link {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  padding: 14px 10px;
  margin-inline: -10px;
  border-radius: 12px;
  color: var(--text);
  text-decoration: none;
}
.tool-link + .tool-link { border-top: 1px solid var(--line); }
.tool-link:hover { background: var(--blue-50); color: var(--text); }
.tool-link strong { display: block; color: var(--blue-600); font-weight: 650; }
.tool-link:hover strong { color: var(--blue-700); text-decoration: underline; }
.tool-link span span { display: block; margin-top: 2px; color: var(--muted); font-size: 0.95rem; line-height: 1.45; }
.tool-link-icon {
  display: grid;
  place-items: center;
  flex: none;
  width: 40px; height: 40px;
  border-radius: 10px;
  background: var(--tone-bg);
  color: var(--tone-ink);
}
.tool-link-icon svg { width: 20px; height: 20px; }

.tool-faq { padding-block: clamp(56px, 8vw, 96px); }
.tool-faq h2 { margin-bottom: 20px; }

@media (max-width: 980px) {
  .tool-layout { grid-template-columns: minmax(0, 640px); }
  .tool-aside { position: static; margin-top: 0; }
}
@media (max-width: 520px) {
  .tool-main > [id] { border-radius: var(--radius) !important; }
}

/* Calculator widgets: brand type and larger, easier-to-tap controls.
   The widgets keep their own page CSS; these rules only adjust shared traits. */
.layout-calculator .tool-main select,
.layout-calculator .tool-main input {
  min-height: 44px;
  font-size: 1.05rem !important;
}
.layout-calculator .tool-main label { font-size: 1.02rem !important; }
.layout-calculator .tool-main button { font-family: var(--font-body); }

/* 404 */
.not-found { padding-block: clamp(56px, 9vw, 112px); }
.not-found-links { display: flex; flex-wrap: wrap; gap: 10px; margin: 24px 0 0; padding: 0; list-style: none; }
.not-found-links li { margin: 0; }
.not-found-links a { display: inline-block; padding: 10px 18px; border: 1px solid var(--line); border-radius: 999px; text-decoration: none; }
.not-found-links a:hover { border-color: var(--blue-300); background: var(--blue-50); }

/* US map on /state-guides: hover names a state, clicking zooms in and opens its guide. */
.us-map {
  position: relative;
  max-width: 980px;
  margin: 8px auto 48px;
  padding: clamp(12px, 3vw, 32px);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: radial-gradient(70% 90% at 50% 0%, var(--white), var(--mist));
  overflow: hidden;
}
.us-map svg { display: block; width: 100%; height: auto; overflow: visible; }
.map-state path, .map-dc circle {
  fill: var(--blue-100);
  transition: fill 0.2s, opacity 0.45s;
  cursor: pointer;
}
.map-state:nth-child(4n+1) path { fill: #d7e6f7; }
.map-state:nth-child(4n+2) path { fill: #e4eefa; }
.map-state:nth-child(4n+3) path { fill: #dbe9f5; }
.map-state:hover path, .map-state.is-active path, .map-dc:hover circle, .map-dc.is-active circle { fill: var(--blue-600); }
.map-state:focus { outline: none; }
.map-borders { fill: none; stroke: var(--white); stroke-width: 1.2; stroke-linejoin: round; pointer-events: none; transition: opacity 0.45s; }
.map-dc circle { stroke: var(--white); stroke-width: 2; fill: var(--blue-300); }
.map-dc line { stroke: var(--muted); stroke-width: 1; }
.map-dc text { fill: var(--ink); font: 600 15px var(--font-body); cursor: pointer; }
.map-tip {
  position: absolute;
  z-index: 2;
  padding: 7px 14px;
  border-radius: 999px;
  background: var(--blue-900);
  box-shadow: var(--shadow);
  color: var(--white);
  font-family: var(--font-display);
  font-size: 1.05rem;
  font-weight: 500;
  white-space: nowrap;
  pointer-events: none;
  transform: translate(-50%, calc(-100% - 14px));
}
.map-tip[hidden] { display: none; }

/* While zooming into the chosen state */
.us-map.is-zooming .map-state:not(.is-active) path,
.us-map.is-zooming .map-state:not(.is-active) circle,
.us-map.is-zooming .map-dc:not(.is-active) { opacity: 0.12; }
.us-map.is-zooming .map-borders { opacity: 0; }
.us-map.is-zooming .map-tip {
  top: 50% !important;
  left: 50% !important;
  transform: translate(-50%, -50%);
  padding: 10px 20px;
  font-size: 1.25rem;
}

.np-sg-list-title {
  margin: 0 0 18px;
  color: var(--muted);
  font-family: var(--font-body);
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-align: center;
  text-transform: uppercase;
}

/* A soft cross-fade between pages, for browsers that support it. */
@media (prefers-reduced-motion: no-preference) {
  @view-transition { navigation: auto; }
}

/* Imported guides (.npg) and articles (.page-wrap) were built for Squarespace,
   which supplied the side margins. Give them the site gutter, keep their desktop
   width, and let the text column shrink so wide tables scroll instead of
   stretching the page. */
main.layout-page .npg-wrap,
main.layout-page .page-wrap {
  max-width: calc(1080px + 2 * var(--gutter));
  padding-inline: var(--gutter);
}
@media (max-width: 800px) {
  main.layout-page .npg-wrap,
  main.layout-page .page-wrap { grid-template-columns: minmax(0, 1fr); }
}

/* Legal pages: plain text set in a readable column. */
.legal { padding-block: 24px 72px; }
.legal h1 { margin-bottom: 12px; }
.legal p:empty { display: none; }
.legal { overflow-wrap: anywhere; }

/* Some imported pages reset every margin and padding inside .page-body; keep the
   breadcrumb trail centered in the page gutter anyway. */
main.page-body > .breadcrumbs { margin-inline: auto; padding-top: 22px; }

/* Wide tables in imported articles scroll sideways on phones rather than
   widening the whole page. */
@media (max-width: 800px) {
  main.layout-page :is(.content, .npg-content) > table {
    display: block;
    max-width: 100%;
    overflow-x: auto;
  }
}
.calculator-preview-note { padding: 16px; border: 1px solid var(--blue-200); border-radius: 8px; background: var(--blue-50); color: var(--ink); }
button[data-preview-calculator]:disabled { opacity: 0.55; cursor: not-allowed; }
