/* SolveNook refinement layer: navigation, shared Nook heroes, homepage discovery, and libraries. */

/* Primary navigation action */
.site-nav__links > li:first-child > a,
.site-nav__links > a:first-child {
  min-height: 42px;
  display: inline-flex;
  align-items: center;
  padding: 9px 16px;
  border: 1px solid #111a3a;
  border-radius: 12px;
  color: #fff;
  background: #111a3a;
  box-shadow: 0 9px 22px rgba(17, 26, 58, .18);
  transition: color .2s ease, background-color .2s ease, transform .2s ease, box-shadow .2s ease;
}

.site-nav__links > li:first-child > a:hover,
.site-nav__links > a:first-child:hover {
  color: #0d263c;
  background: #6fe0d3;
  border-color: #6fe0d3;
  box-shadow: 0 12px 28px rgba(0, 124, 114, .2);
  transform: translateY(-2px);
}

.site-nav__links > li:first-child > a:focus-visible,
.site-nav__links > a:first-child:focus-visible {
  outline: 3px solid #ffb648;
  outline-offset: 3px;
}

/* Shared compact mascot treatment for every editorial hero */
.hero-nook {
  position: relative;
  isolation: isolate;
  width: min(220px, 100%);
  min-height: 190px;
  display: grid;
  place-items: center;
  margin: 0;
}

.hero-nook__halo {
  position: absolute;
  z-index: -1;
  width: 82%;
  aspect-ratio: 1;
  border-radius: 36% 64% 55% 45%;
  background: linear-gradient(145deg, #fff0bd, #dff8f3 54%, #e9e5ff);
  box-shadow: inset 0 0 0 1px rgba(17, 26, 58, .07);
  transform: rotate(-8deg);
}

.hero-nook img {
  position: relative;
  z-index: 2;
  width: 88%;
  filter: drop-shadow(0 18px 18px rgba(17, 26, 58, .16));
}

.hero-nook__chip {
  position: absolute;
  z-index: 3;
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  color: #fff;
  background: #e9675b;
  box-shadow: 0 12px 24px rgba(17, 26, 58, .14);
  font-weight: 900;
}

.hero-nook__chip--top { top: 8%; right: 1%; transform: rotate(8deg); }
.hero-nook__chip--bottom { bottom: 10%; left: 0; color: #111a3a; background: #ffca61; transform: rotate(-7deg); }

@media (prefers-reduced-motion: no-preference) {
  .hero-nook img { animation: refined-nook-float 5s ease-in-out infinite; }
  .hero-nook__chip--top { animation: refined-chip-top 4.2s ease-in-out infinite; }
  .hero-nook__chip--bottom { animation: refined-chip-bottom 4.6s ease-in-out infinite; }
}

@keyframes refined-nook-float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-8px); } }
@keyframes refined-chip-top { 0%, 100% { transform: translateY(0) rotate(8deg); } 50% { transform: translateY(-6px) rotate(13deg); } }
@keyframes refined-chip-bottom { 0%, 100% { transform: translateY(0) rotate(-7deg); } 50% { transform: translateY(6px) rotate(-11deg); } }

.page-hero__grid {
  min-height: 390px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(180px, 240px);
  align-items: center;
  gap: clamp(32px, 7vw, 90px);
  padding-block: 58px;
}

.page-hero__grid .hero-nook { justify-self: end; }

.calculator-library-hero__panel,
.platform-library-note,
.platform-decision-panel,
.payments-route-map,
.academy-guide-hero__aside,
.freelance-template-hero__aside,
.updates-hero__note {
  overflow: hidden;
}

.calculator-library-hero__panel .hero-nook,
.platform-library-note .hero-nook,
.platform-decision-panel .hero-nook,
.payments-route-map .hero-nook,
.academy-guide-hero__aside .hero-nook,
.freelance-template-hero__aside .hero-nook,
.updates-hero__note .hero-nook {
  width: 150px;
  min-height: 132px;
  margin: -18px auto 12px;
}

.calculator-library-hero__panel .hero-nook__chip,
.platform-library-note .hero-nook__chip,
.platform-decision-panel .hero-nook__chip,
.payments-route-map .hero-nook__chip,
.academy-guide-hero__aside .hero-nook__chip,
.freelance-template-hero__aside .hero-nook__chip,
.updates-hero__note .hero-nook__chip { width: 30px; height: 30px; border-radius: 9px; font-size: .8rem; }

/* Homepage platform switchboard */
.home-platform-section {
  padding-block: clamp(72px, 8vw, 112px);
  background:
    radial-gradient(circle at 12% 18%, rgba(24, 201, 181, .17), transparent 24%),
    radial-gradient(circle at 88% 86%, rgba(255, 111, 97, .12), transparent 25%),
    #eef4fb;
}

.home-platform-shell {
  position: relative;
  padding: clamp(24px, 4vw, 48px);
  border: 1px solid rgba(122, 151, 179, .34);
  border-radius: 34px;
  background: rgba(255, 255, 255, .68);
  box-shadow: 0 28px 80px rgba(17, 26, 58, .1);
  backdrop-filter: blur(14px);
}

.home-platform-heading {
  margin-bottom: 30px;
  padding: 0 4px;
}

.home-platform-heading h2 {
  max-width: 780px;
  font-size: clamp(2.25rem, 4.7vw, 4.35rem);
  line-height: .98;
}

.home-platform-heading p { max-width: 620px; font-size: 1rem; }

.home-platform-heading .platform-text-link {
  display: inline-flex;
  min-height: 46px;
  align-items: center;
  padding: 10px 16px;
  border-radius: 12px;
  color: #fff;
  background: #111a3a;
  text-decoration: none;
}

.home-platform-grid {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: 16px;
}

.home-platform-card {
  position: relative;
  grid-column: span 6;
  min-height: 245px;
  display: grid;
  align-content: start;
  gap: 22px;
  padding: 26px;
  overflow: hidden;
  border: 1px solid rgba(17, 26, 58, .12);
  border-radius: 22px;
  background: rgba(255, 255, 255, .88);
  box-shadow: 0 12px 30px rgba(17, 26, 58, .06);
  transition: transform .24s cubic-bezier(.16, 1, .3, 1), box-shadow .24s ease, border-color .24s ease;
}

.home-platform-card::before {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 5px;
  background: var(--home-platform-mark);
  content: "";
}

.home-platform-card--featured {
  grid-column: 1 / -1;
  min-height: 300px;
  grid-template-columns: minmax(260px, .75fr) minmax(0, 1.25fr);
  align-items: center;
  color: #fff;
  background:
    radial-gradient(circle at 13% 20%, rgba(24, 201, 181, .26), transparent 28%),
    linear-gradient(135deg, #101936, #18345c);
  border-color: rgba(255, 255, 255, .12);
  box-shadow: 0 24px 52px rgba(17, 26, 58, .18);
}

.home-platform-card--featured::after {
  position: absolute;
  left: -70px;
  bottom: -110px;
  width: 250px;
  height: 250px;
  border: 1px solid rgba(118, 234, 220, .22);
  border-radius: 50%;
  content: "";
}

.home-platform-card--featured .home-platform-card__copy { position: relative; z-index: 2; }
.home-platform-card--featured .home-platform-card__top h3 { color: #fff; }
.home-platform-card--featured p { color: rgba(255, 255, 255, .7); }
.home-platform-card--featured .home-platform-card__top span { color: #0c263c; background: #76eadc; }

.home-platform-card[data-platform="upwork"] { background: linear-gradient(145deg, #f0ffe8, #fff 72%); }
.home-platform-card[data-platform="freelancer"] { background: linear-gradient(145deg, #e9f7ff, #fff 72%); }
.home-platform-card[data-platform="peopleperhour"] { grid-column: span 7; background: linear-gradient(145deg, #fff3df, #fff 72%); }
.home-platform-card[data-platform="contra"] { grid-column: span 5; background: linear-gradient(145deg, #f5edff, #fff 72%); }

.home-platform-card__top span {
  width: 48px;
  height: 48px;
  border-radius: 14px;
  box-shadow: inset 0 0 0 1px rgba(17, 26, 58, .08);
}

.home-platform-card__top h3 { font-size: 1.35rem; }
.home-platform-card p { max-width: 54ch; margin-top: 13px; }

.home-platform-card__paths { position: relative; z-index: 2; gap: 12px; }
.home-platform-path { padding: 18px; border: 1px solid rgba(255, 255, 255, .14); border-radius: 16px; background: rgba(255, 255, 255, .07); }
.home-platform-path > strong { color: #76eadc; }

.home-platform-card__links a,
.home-platform-path a {
  min-height: 44px;
  border-radius: 11px;
  background: rgba(255, 255, 255, .82);
  box-shadow: 0 5px 14px rgba(17, 26, 58, .04);
}

.home-platform-card--featured .home-platform-path a { color: #101936; border-color: rgba(255, 255, 255, .25); background: #fff; }

@media (hover: hover) and (pointer: fine) {
  .home-platform-card:not(.home-platform-card--featured):hover { transform: translateY(-5px); border-color: var(--home-platform-mark); box-shadow: 0 22px 44px rgba(17, 26, 58, .12); }
  .home-platform-card__links a:hover,
  .home-platform-path a:hover { transform: translateX(3px); }
}

/* Homepage calculator showcase */
.home-calculator-section {
  padding-block: clamp(78px, 9vw, 122px);
  background:
    linear-gradient(rgba(17, 26, 58, .035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(17, 26, 58, .035) 1px, transparent 1px),
    #f8fafc;
  background-size: 48px 48px;
}

.home-calculator-shell { position: relative; }

.home-calculator-heading,
.home-workbench__heading {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
  gap: 32px;
  margin-bottom: 36px;
}

.home-calculator-heading > div > span {
  display: block;
  margin-bottom: 12px;
  color: #087f76;
  font-size: .75rem;
  font-weight: 850;
  letter-spacing: .12em;
  text-transform: uppercase;
}

.home-calculator-heading h2,
.home-workbench__heading h2 {
  max-width: 780px;
  margin: 0;
  font-size: clamp(2.3rem, 4.5vw, 4rem);
  line-height: 1;
  letter-spacing: -.055em;
}

.home-calculator-heading p,
.home-workbench__heading p { max-width: 620px; margin: 15px 0 0; color: #526078; }

.home-calculator-heading > a {
  display: inline-flex;
  min-height: 48px;
  align-items: center;
  gap: 10px;
  padding: 10px 17px;
  border: 1px solid #cdd8e5;
  border-radius: 12px;
  color: #111a3a;
  background: #fff;
  font-weight: 850;
  text-decoration: none;
}

.home-calculator-grid { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 16px; }

.home-calculator-card {
  --home-tool-accent: #0aaea0;
  position: relative;
  grid-column: span 4;
  min-height: 245px;
  display: flex;
  flex-direction: column;
  padding: 24px;
  overflow: hidden;
  border: 1px solid #dce5ed;
  border-radius: 20px;
  color: #111a3a;
  background: rgba(255, 255, 255, .92);
  box-shadow: 0 12px 30px rgba(17, 26, 58, .055);
  text-decoration: none;
  transition: transform .24s cubic-bezier(.16, 1, .3, 1), box-shadow .24s ease, border-color .24s ease;
}

.home-calculator-card::before {
  position: absolute;
  inset: 0 auto 0 0;
  width: 5px;
  background: var(--home-tool-accent);
  content: "";
}

.home-calculator-card--featured { grid-column: span 6; min-height: 325px; padding: 30px; }
.home-calculator-card--featured:first-child { color: #fff; background: linear-gradient(145deg, #101936, #174562); border-color: #173c58; }
.home-calculator-card--featured:first-child p { color: rgba(255, 255, 255, .7); }
.home-calculator-card--featured:first-child .home-calculator-card__category { color: #76eadc; }
.home-calculator-card--featured:first-child .home-calculator-card__icon { color: #10243a; background: #76eadc; }
.home-calculator-card--featured:nth-child(2) { background: linear-gradient(145deg, #fff1ed, #fff 76%); }

.home-calculator-card--coral { --home-tool-accent: #e9675b; }
.home-calculator-card--gold { --home-tool-accent: #d89c00; }
.home-calculator-card--blue { --home-tool-accent: #3d76e8; }
.home-calculator-card--violet { --home-tool-accent: #7968e8; }
.home-calculator-card--indigo { --home-tool-accent: #4d5bc5; }
.home-calculator-card--rose { --home-tool-accent: #d85b83; }
.home-calculator-card--aqua { --home-tool-accent: #008f9a; }
.home-calculator-card--lime { --home-tool-accent: #659321; }
.home-calculator-card--orange { --home-tool-accent: #df672d; }
.home-calculator-card--purple { --home-tool-accent: #874dc5; }

.home-calculator-card__icon {
  width: 50px;
  height: 50px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  color: #fff;
  background: var(--home-tool-accent);
  box-shadow: 0 12px 24px color-mix(in srgb, var(--home-tool-accent) 24%, transparent);
  font-weight: 900;
}

.home-calculator-card__category { margin-top: 26px; color: var(--home-tool-accent); font-size: .7rem; font-weight: 850; letter-spacing: .1em; text-transform: uppercase; }
.home-calculator-card h3 { margin: 8px 0 9px; font-size: 1.28rem; line-height: 1.15; letter-spacing: -.035em; }
.home-calculator-card--featured h3 { max-width: 15ch; font-size: clamp(1.75rem, 3vw, 2.65rem); }
.home-calculator-card p { margin: 0; color: #526078; font-size: .9rem; line-height: 1.55; }
.home-calculator-card__action { margin-top: auto; padding-top: 20px; color: inherit; font-size: .84rem; font-weight: 850; }
.home-calculator-card__action b { display: inline-block; margin-left: 4px; transition: transform .2s ease; }

@media (hover: hover) and (pointer: fine) {
  .home-calculator-card:hover { transform: translateY(-6px); border-color: var(--home-tool-accent); box-shadow: 0 24px 48px rgba(17, 26, 58, .13); }
  .home-calculator-card:hover .home-calculator-card__action b { transform: translateX(5px); }
}

/* Homepage invoice and updates */
.home-workbench { padding-block: clamp(78px, 8vw, 112px); background: #fff; }
.home-workbench__heading { grid-template-columns: 1fr; max-width: 820px; }
.home-workbench__grid { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(320px, .75fr); gap: 18px; }

.home-invoice-feature,
.home-updates-feature {
  position: relative;
  min-height: 390px;
  padding: clamp(28px, 4vw, 44px);
  overflow: hidden;
  border-radius: 24px;
  text-decoration: none;
  transition: transform .24s cubic-bezier(.16, 1, .3, 1), box-shadow .24s ease;
}

.home-invoice-feature { display: grid; grid-template-columns: minmax(0, 1fr) minmax(240px, .72fr); align-items: center; gap: 24px; color: #fff; background: linear-gradient(135deg, #101936, #1b4764); box-shadow: 0 24px 60px rgba(17, 26, 58, .18); }
.home-invoice-feature__copy { position: relative; z-index: 3; }
.home-invoice-feature__copy > span,
.home-updates-feature > span { color: #76eadc; font-size: .72rem; font-weight: 850; letter-spacing: .1em; text-transform: uppercase; }
.home-invoice-feature h3,
.home-updates-feature h3 { margin: 12px 0; font-size: clamp(2rem, 3.8vw, 3.35rem); line-height: 1; letter-spacing: -.05em; }
.home-invoice-feature p { color: rgba(255, 255, 255, .7); }
.home-invoice-feature strong,
.home-updates-feature strong { display: inline-block; margin-top: 20px; font-size: .9rem; }
.home-invoice-feature strong b,
.home-updates-feature strong b { display: inline-block; margin-left: 4px; transition: transform .2s ease; }

.home-invoice-feature__visual { position: relative; min-height: 270px; display: grid; place-items: center; }
.home-invoice-feature__visual img { position: absolute; right: -18px; bottom: -32px; z-index: 3; width: 170px; filter: drop-shadow(0 18px 20px rgba(5, 16, 36, .28)); }
.home-invoice-sheet { width: 190px; min-height: 245px; padding: 35px 24px; border-radius: 16px; background: #fff; box-shadow: 0 24px 42px rgba(5, 16, 36, .28); transform: rotate(5deg); }
.home-invoice-sheet strong { display: block; margin: 0 0 28px; color: #111a3a; font-size: 1.15rem; }
.home-invoice-sheet i { display: block; height: 8px; margin-top: 14px; border-radius: 4px; background: #dce8f0; }
.home-invoice-sheet i:nth-child(2) { width: 74%; }
.home-invoice-sheet i:nth-child(3) { width: 52%; background: #76eadc; }

.home-updates-feature { color: #111a3a; background: linear-gradient(145deg, #fff0c9, #fff8e8 54%, #e8faf5); border: 1px solid #ead59c; box-shadow: 0 18px 45px rgba(17, 26, 58, .09); }
.home-updates-feature::after { position: absolute; right: -78px; top: -78px; width: 210px; height: 210px; border: 42px solid rgba(233, 103, 91, .13); border-radius: 50%; content: ""; }
.home-updates-feature > span { color: #a35c00; }
.home-updates-feature p { max-width: 43ch; color: #526078; }
.home-updates-feature__topics { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 36px; }
.home-updates-feature__topics i { padding: 7px 10px; border: 1px solid rgba(17, 26, 58, .12); border-radius: 9px; background: rgba(255, 255, 255, .65); font-size: .72rem; font-style: normal; font-weight: 750; }

@media (hover: hover) and (pointer: fine) {
  .home-invoice-feature:hover,
  .home-updates-feature:hover { transform: translateY(-6px); box-shadow: 0 28px 62px rgba(17, 26, 58, .17); }
  .home-invoice-feature:hover strong b,
  .home-updates-feature:hover strong b { transform: translateX(5px); }
}

/* Calculator library: mixed-priority catalog instead of repeated equal cards */
.calculator-library-hero__panel::before { display: none; }
.calculator-library-hero__panel { display: grid; grid-template-columns: minmax(130px, .7fr) minmax(0, 1fr); align-items: center; gap: 8px 22px; }
.calculator-library-hero__panel .hero-nook { grid-row: 1 / 5; align-self: center; }
.calculator-library-hero__panel ul { grid-column: 2; margin-top: 12px; padding-top: 12px; }
.calculator-library-hero__count { font-size: clamp(3.4rem, 6vw, 5.8rem); }

.calculator-library-directory { background: linear-gradient(180deg, #f6fbfc, #fff); }
.calculator-library-directory .section-heading--split { align-items: center; padding: 26px; border: 1px solid #dce5ed; border-radius: 22px; background: #fff; box-shadow: 0 16px 36px rgba(17, 26, 58, .06); }
.calculator-library-directory .tool-search { min-width: 310px; }
.calculator-library-directory .tool-search input { min-height: 52px; background: #f5f8fb; }
.calculator-library-directory .tool-filters { margin-block: 24px 30px; padding-bottom: 4px; overflow-x: auto; flex-wrap: nowrap; scrollbar-width: thin; }
.calculator-library-directory .tool-filter { flex: 0 0 auto; border-radius: 11px; }

.calculator-library-directory .tool-grid { grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 16px; }
.calculator-library-directory .tool-card { grid-column: span 4; min-height: 255px; padding: 24px; border-radius: 20px; background: #fff; box-shadow: 0 10px 28px rgba(17, 26, 58, .055); }
.calculator-library-directory .tool-card:nth-child(1),
.calculator-library-directory .tool-card:nth-child(2) { grid-column: span 6; min-height: 320px; padding: 30px; }
.calculator-library-directory .tool-card:nth-child(1) { color: #fff; background: linear-gradient(145deg, #101936, #174562); border-color: #173c58; }
.calculator-library-directory .tool-card:nth-child(1) p { color: rgba(255, 255, 255, .7); }
.calculator-library-directory .tool-card:nth-child(1) .tool-status { color: #10243a; background: #76eadc; }
.calculator-library-directory .tool-card:nth-child(1) .tool-category,
.calculator-library-directory .tool-card:nth-child(1) .tool-link { color: #76eadc; }
.calculator-library-directory .tool-card:nth-child(1)::after { opacity: .16; }
.calculator-library-directory .tool-card:nth-child(2) { background: linear-gradient(145deg, #fff0ed, #fff 76%); }
.calculator-library-directory .tool-card:nth-child(-n+2) h3 { max-width: 18ch; font-size: clamp(1.75rem, 3vw, 2.55rem); }
.calculator-library-directory .tool-card .tool-category { margin-top: 24px; }
.calculator-library-directory .tool-card h3 { font-size: 1.23rem; }
.calculator-library-directory .tool-card p { display: -webkit-box; overflow: hidden; -webkit-box-orient: vertical; -webkit-line-clamp: 3; }

/* Platform-library mascot balance */
.platform-library-note { padding-top: 20px; }
.platform-library-note .hero-nook { float: right; margin: -8px -12px 8px 16px; }
.platform-library-note > strong { display: block; padding-top: 16px; }
.platform-decision-panel .hero-nook { float: right; margin: -12px -14px 8px 16px; }
.payments-route-map .hero-nook { float: right; margin: -28px -10px 4px 16px; }
.academy-guide-hero__aside .hero-nook,
.freelance-template-hero__aside .hero-nook,
.updates-hero__note .hero-nook { float: right; margin: -14px -12px 8px 16px; }

/* Template library: one horizontal feature followed by a clean two-column set */
.template-bento { grid-template-columns: repeat(12, minmax(0, 1fr)); grid-template-rows: auto; gap: 18px; }
.template-card:nth-child(1) { grid-column: 1 / -1; grid-row: auto; min-height: 360px; }
.template-card:nth-child(2),
.template-card:nth-child(3),
.template-card:nth-child(4),
.template-card:nth-child(5) { grid-column: span 6; grid-row: auto; min-height: 235px; }
.template-card--featured { grid-template-columns: auto minmax(0, 1fr) minmax(240px, 320px); grid-template-rows: 1fr; align-items: center; gap: clamp(24px, 4vw, 48px); padding: clamp(30px, 5vw, 52px); }
.template-card--featured .template-card__mark { align-self: start; }
.template-card--featured .template-card__paper { grid-column: 3; grid-row: 1; width: 100%; min-height: 220px; justify-self: stretch; }
.template-card--featured .template-card__body { grid-column: 2; grid-row: 1; align-self: center; }
.template-card--featured h3 { font-size: clamp(2rem, 4vw, 3.5rem); }
.template-card:not(.template-card--featured) .template-card__body { align-self: center; }

/* Footer discovery */
.footer-grid { grid-template-columns: minmax(250px, 1.25fr) repeat(3, minmax(150px, .75fr)); gap: clamp(32px, 5vw, 64px); }
.footer-grid > div:not(:first-child) { align-content: start; }
.footer-updates-link { display: flex !important; align-items: center; justify-content: space-between; gap: 10px; }
.footer-updates-link > span { padding: 3px 7px; border-radius: 7px; color: #10243a; background: #ffca61; font-size: .62rem; font-weight: 850; text-transform: uppercase; }
.footer-invoice-link { display: grid !important; gap: 3px; margin: 1px 0 8px; padding: 13px 14px; border: 1px solid rgba(118, 234, 220, .24); border-radius: 12px; background: rgba(118, 234, 220, .08); }
.footer-invoice-link strong { color: #fff; font-size: .9rem; }
.footer-invoice-link span { color: rgba(255, 255, 255, .56); font-size: .7rem; line-height: 1.35; }

@media (max-width: 1050px) {
  .home-calculator-card { grid-column: span 6; }
  .home-platform-card[data-platform="peopleperhour"],
  .home-platform-card[data-platform="contra"] { grid-column: span 6; }
  .calculator-library-directory .tool-card { grid-column: span 6; }
  .footer-grid { grid-template-columns: 1fr 1fr 1fr; }
  .footer-grid > div:first-child { grid-column: 1 / -1; }
}

@media (max-width: 760px) {
  .site-nav__links > li:first-child > a,
  .site-nav__links > a:first-child { width: 100%; justify-content: center; margin-bottom: 5px; }
  .page-hero__grid { min-height: 0; grid-template-columns: 1fr; padding-block: 42px; }
  .page-hero__grid .hero-nook { width: 160px; min-height: 145px; justify-self: center; }
  .home-platform-shell { padding: 18px; border-radius: 24px; }
  .home-platform-heading,
  .home-calculator-heading { grid-template-columns: 1fr; align-items: start; }
  .home-platform-heading .platform-text-link,
  .home-calculator-heading > a { justify-self: start; }
  .home-platform-grid { grid-template-columns: 1fr; }
  .home-platform-card,
  .home-platform-card[data-platform="peopleperhour"],
  .home-platform-card[data-platform="contra"] { grid-column: auto; min-height: 0; }
  .home-platform-card--featured { grid-template-columns: 1fr; }
  .home-platform-card__paths { grid-template-columns: 1fr; }
  .home-calculator-grid { grid-template-columns: 1fr; }
  .home-calculator-card,
  .home-calculator-card--featured { grid-column: auto; min-height: 260px; }
  .home-calculator-card--featured { min-height: 300px; }
  .home-workbench__grid { grid-template-columns: 1fr; }
  .home-invoice-feature { grid-template-columns: 1fr; }
  .home-invoice-feature__visual { min-height: 230px; }
  .calculator-library-hero__panel { grid-template-columns: 1fr; text-align: center; }
  .calculator-library-hero__panel .hero-nook { grid-row: auto; justify-self: center; }
  .calculator-library-hero__panel ul { grid-column: auto; text-align: left; }
  .calculator-library-directory .section-heading--split { padding: 20px; }
  .calculator-library-directory .tool-search { min-width: 0; }
  .calculator-library-directory .tool-grid { grid-template-columns: 1fr; }
  .calculator-library-directory .tool-card,
  .calculator-library-directory .tool-card:nth-child(1),
  .calculator-library-directory .tool-card:nth-child(2) { grid-column: auto; min-height: 260px; padding: 24px; }
  .template-card:nth-child(n) { grid-column: 1 / -1; min-height: 230px; }
  .template-card--featured { grid-template-columns: 1fr; grid-template-rows: auto; }
  .template-card--featured .template-card__mark,
  .template-card--featured .template-card__paper,
  .template-card--featured .template-card__body { grid-column: 1; grid-row: auto; }
  .template-card--featured .template-card__paper { width: min(100%, 310px); justify-self: center; order: 2; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .footer-grid > div:first-child { grid-column: 1 / -1; }
}

@media (max-width: 500px) {
  .home-platform-section,
  .home-calculator-section,
  .home-workbench { padding-block: 64px; }
  .home-platform-heading h2,
  .home-calculator-heading h2,
  .home-workbench__heading h2 { font-size: 2.45rem; }
  .home-invoice-feature,
  .home-updates-feature { min-height: 0; padding: 26px 22px; }
  .home-invoice-feature h3,
  .home-updates-feature h3 { font-size: 2.15rem; }
  .footer-grid { grid-template-columns: 1fr; }
  .footer-grid > div:first-child { grid-column: auto; }
}

@media (prefers-reduced-motion: reduce) {
  .hero-nook img,
  .hero-nook__chip,
  .home-platform-card,
  .home-calculator-card,
  .home-invoice-feature,
  .home-updates-feature { animation: none; transition: none; }
}

/* 1.13.1: repair the four library compositions after the shared Nook rollout. */

/* Academy: one purposeful feature row followed by two balanced guides. */
.academy-guide-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: start;
}

.academy-guide-grid__stack { display: contents; }
.academy-guide-grid .academy-card:not(.academy-card--featured) { height: 100%; }

.academy-card--featured {
  grid-column: 1 / -1;
  min-height: 310px;
  grid-template-columns: 64px minmax(290px, .8fr) minmax(0, 1.2fr);
  grid-template-rows: auto;
  align-items: center;
  align-content: normal;
  gap: clamp(24px, 3.5vw, 44px);
}

.academy-card--featured .academy-card__mark,
.academy-card--featured .academy-card__formula,
.academy-card--featured .academy-card__content { align-self: center; }

.academy-card--featured .academy-card__formula { justify-content: center; }
.academy-card--featured .academy-card__content { max-width: 580px; }

/* Payments: reserve a clear mascot zone and retire the decorative step number. */
.payments-route-map { isolation: isolate; }
.payments-route-map__step { display: none; }

.payments-route-map .hero-nook {
  position: absolute;
  top: 16px;
  right: 16px;
  float: none;
  width: 132px;
  min-height: 118px;
  margin: 0;
}

.payments-route-map h2 {
  min-height: 108px;
  display: flex;
  align-items: center;
  margin-bottom: 12px;
  padding-right: 138px;
}

/* Tool library: feature the brief horizontally, then keep both companion tools equal. */
.tools-library-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  grid-template-rows: auto;
  align-items: stretch;
}

.tools-library-card { min-height: 305px; }

.tools-library-card--featured {
  grid-column: 1 / -1;
  grid-row: auto;
  min-height: 365px;
  grid-template-columns: 92px minmax(0, 1fr) minmax(230px, 310px);
  align-items: center;
  align-content: normal;
  gap: clamp(28px, 4vw, 54px);
}

.tools-library-card--featured .tools-library-card__content { max-width: 620px; }

.tools-library-card__visual {
  position: relative;
  min-height: 260px;
  display: grid;
  place-items: center;
  margin: 0;
}

.tools-library-card__visual span {
  position: absolute;
  width: 220px;
  aspect-ratio: 1;
  border: 1px solid rgba(0, 124, 114, .18);
  border-radius: 44% 56% 62% 38%;
  background: rgba(255, 255, 255, .58);
  transform: rotate(-9deg);
}

.tools-library-card__visual img {
  position: relative;
  z-index: 1;
  width: 235px;
  filter: drop-shadow(0 20px 20px rgba(17, 26, 58, .16));
}

/* Calculator hero: give both the summary and Nook enough width to breathe. */
@media (min-width: 760px) {
  .calculator-library-hero__grid {
    grid-template-columns: minmax(0, 1.28fr) minmax(370px, .72fr);
    gap: clamp(44px, 5vw, 66px);
  }
}

.calculator-library-hero__panel {
  grid-template-columns: minmax(0, 1fr) 142px;
  align-items: center;
  gap: 20px 22px;
  padding: 32px;
}

.calculator-library-hero__panel .hero-nook {
  grid-column: 2;
  grid-row: 1;
  width: 142px;
  min-height: 128px;
  margin: 0;
}

.calculator-library-hero__summary {
  grid-column: 1;
  grid-row: 1;
  min-width: 0;
}

.calculator-library-hero__summary > strong {
  display: block;
  max-width: 13ch;
  margin-top: 10px;
  font-size: 1.08rem;
  line-height: 1.35;
}

.calculator-library-hero__panel ul {
  grid-column: 1 / -1;
  margin-top: 0;
}

@media (max-width: 960px) {
  .academy-guide-grid { grid-template-columns: 1fr; }
  .academy-guide-grid__stack { display: grid; }
  .academy-card--featured {
    grid-column: auto;
    min-height: 0;
    grid-template-columns: 64px minmax(0, 1fr);
  }
  .academy-card--featured .academy-card__content { grid-column: 1 / -1; }

  .tools-library-card--featured {
    grid-template-columns: 82px minmax(0, 1fr) 220px;
    gap: 26px;
  }
  .tools-library-card__visual img { width: 205px; }
  .tools-library-card__visual span { width: 190px; }
}

@media (max-width: 760px) {
  .academy-card--featured { grid-template-columns: 1fr; }
  .academy-card--featured .academy-card__content { grid-column: auto; }
  .academy-card--featured .academy-card__formula { justify-content: flex-start; }

  .tools-library-grid { grid-template-columns: 1fr; }
  .tools-library-card,
  .tools-library-card--featured { min-height: 0; }
  .tools-library-card--featured { grid-column: auto; grid-template-columns: 1fr; }
  .tools-library-card__visual { min-height: 215px; }

  .calculator-library-hero__panel {
    grid-template-columns: minmax(0, 1fr) 132px;
    text-align: left;
  }
  .calculator-library-hero__panel .hero-nook {
    grid-column: 2;
    grid-row: 1;
    width: 132px;
  }
  .calculator-library-hero__panel ul { grid-column: 1 / -1; }
}

@media (max-width: 500px) {
  .payments-route-map .hero-nook { width: 108px; min-height: 100px; }
  .payments-route-map h2 { min-height: 92px; padding-right: 112px; font-size: 1.45rem; }

  .calculator-library-hero__panel {
    grid-template-columns: minmax(0, 1fr) 104px;
    gap: 16px;
    padding: 24px 20px;
  }
  .calculator-library-hero__panel .hero-nook { width: 104px; min-height: 100px; }
  .calculator-library-hero__summary > strong { font-size: .98rem; }
  .tools-library-card__visual { display: none; }
}

/* Payment cards: keep reference links together and place the recommended guide under Check first. */
.payment-provider-card__footer {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 16px;
}

.payment-provider-card__footer > a {
  white-space: nowrap;
}

.payment-provider-card__guide {
  grid-column: 2;
  justify-self: start;
  min-height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: fit-content;
  margin: 4px 0 1px;
  padding: 10px 15px;
  border: 1px solid #087f76;
  border-radius: 10px;
  color: #fff;
  background: #087f76;
  box-shadow: 0 8px 20px rgba(8, 127, 118, .16);
  font-size: .78rem;
  font-weight: 820;
  line-height: 1.2;
  text-decoration: none;
  white-space: nowrap;
}

.payment-provider-card__guide:hover {
  border-color: #65ddcf;
  color: #111a3a;
  background: #65ddcf;
  transform: translateY(-1px);
}

.payment-provider-card__guide--pending {
  border-color: rgba(17, 26, 58, .18);
  color: #52617f;
  background: rgba(255, 255, 255, .68);
  box-shadow: none;
}

@media (max-width: 900px) {
  .payments-provider-grid .payment-provider-card { grid-column: 1 / -1; }
}

@media (max-width: 620px) {
  .payment-provider-card__guide {
    grid-column: 1;
    justify-self: stretch;
    width: 100%;
  }
}

/* Editorial articles */
.article-hero {
  position: relative;
  overflow: hidden;
  padding-block: clamp(74px, 9vw, 128px);
  background:
    radial-gradient(circle at 86% 12%, rgba(74, 109, 255, .14), transparent 28%),
    linear-gradient(135deg, #e8faf5 0%, #f7fbff 54%, #fff3d6 100%);
}

.article-hero::after {
  position: absolute;
  right: -90px;
  bottom: -130px;
  width: 360px;
  height: 360px;
  border: 1px solid rgba(17, 26, 58, .10);
  border-radius: 50%;
  box-shadow: 0 0 0 52px rgba(255, 255, 255, .24), 0 0 0 104px rgba(255, 255, 255, .15);
  content: "";
}

.article-hero__grid { position: relative; z-index: 1; display: grid; gap: clamp(36px, 7vw, 90px); align-items: center; }
.article-hero__grid > div:first-child { max-width: 880px; }
.article-back { display: inline-flex; margin-bottom: 34px; color: #087f76; font-size: .82rem; font-weight: 800; text-decoration: none; }
.article-hero h1 { max-width: 900px; margin: 12px 0 0; font-size: clamp(3rem, 6.3vw, 6rem); line-height: .95; letter-spacing: -.065em; }
.article-hero__excerpt { max-width: 760px; margin: 28px 0 0; color: #43516e; font-size: clamp(1.05rem, 1.8vw, 1.25rem); line-height: 1.7; }
.article-meta { display: flex; flex-wrap: wrap; gap: 9px 22px; margin-top: 30px; color: #52617f; font-size: .78rem; font-weight: 700; }
.article-meta span { display: inline-flex; align-items: center; gap: 8px; }
.article-meta span + span::before { width: 4px; height: 4px; border-radius: 50%; background: #ef6a59; content: ""; }
.article-hero__nook { position: relative; display: grid; min-height: 350px; place-items: center; padding: 34px; border: 1px solid rgba(17, 26, 58, .12); border-radius: 34px; background: rgba(255, 255, 255, .58); box-shadow: 0 24px 64px rgba(17, 26, 58, .10); backdrop-filter: blur(12px); }
.article-hero__nook .hero-nook { width: min(260px, 100%); }
.article-hero__nook > span { max-width: 210px; padding: 10px 14px; border-radius: 999px; color: #10243a; background: #fff; box-shadow: 0 8px 24px rgba(17, 26, 58, .10); font-size: .75rem; font-weight: 800; text-align: center; }

@media (min-width: 940px) { .article-hero__grid { grid-template-columns: minmax(0, 1.55fr) minmax(300px, .45fr); } }

.article-layout-section { padding-block: clamp(70px, 9vw, 120px); background: #fff; }
.article-layout { display: grid; gap: clamp(42px, 7vw, 92px); align-items: start; }
.article-content { min-width: 0; color: #273552; font-size: 1.04rem; line-height: 1.82; }
.article-content > * { max-width: 760px; }
.article-content > :first-child { margin-top: 0; }
.article-content h2 { margin: 64px 0 18px; color: #111a3a; font-size: clamp(1.85rem, 3vw, 2.65rem); line-height: 1.08; letter-spacing: -.045em; }
.article-content h3 { margin: 34px 0 10px; color: #111a3a; font-size: 1.28rem; line-height: 1.25; }
.article-content p { margin: 0 0 21px; }
.article-content ul, .article-content ol { margin: 18px 0 28px; padding-left: 1.3em; }
.article-content li { margin: 9px 0; padding-left: 5px; }
.article-content a { color: #087f76; text-underline-offset: 3px; }
.article-content .article-lede { color: #263755; font-size: clamp(1.18rem, 2vw, 1.42rem); line-height: 1.65; letter-spacing: -.012em; }
.article-answer, .article-note { margin: 38px 0; padding: clamp(24px, 4vw, 36px); border-radius: 24px; }
.article-answer { border: 1px solid #8bdcd2; background: linear-gradient(135deg, #ddf8f1, #f6fffc); box-shadow: 0 16px 38px rgba(8, 127, 118, .08); }
.article-answer > strong, .article-note > strong { display: block; margin-bottom: 10px; color: #087f76; font-size: .72rem; font-weight: 900; letter-spacing: .12em; text-transform: uppercase; }
.article-answer p:last-child, .article-note p:last-child { margin-bottom: 0; }
.article-note { border: 1px solid #ead59c; background: #fff3d6; }
.article-note > strong { color: #9a6100; }
.article-toc { display: grid; margin: 44px 0 54px; padding: 26px 28px; border: 1px solid #d7e1f0; border-radius: 22px; background: #f7f9fd; }
.article-toc strong { margin-bottom: 12px; color: #111a3a; font-size: .78rem; letter-spacing: .1em; text-transform: uppercase; }
.article-toc a { padding: 7px 0; border-bottom: 1px solid #e2e8f2; text-decoration: none; }
.article-toc a:last-child { border-bottom: 0; }
.article-inline-cta { display: inline-flex; padding: 10px 14px; border: 1px solid #abd9d3; border-radius: 10px; background: #edfaf7; font-size: .86rem; font-weight: 800; text-decoration: none; }
.article-table-wrap { max-width: 100%; overflow-x: auto; margin: 26px 0 36px; border: 1px solid #d7e1f0; border-radius: 20px; }
.article-table-wrap table { width: 100%; min-width: 690px; border-collapse: collapse; color: #273552; font-size: .9rem; line-height: 1.55; }
.article-table-wrap th, .article-table-wrap td { padding: 17px 18px; border-bottom: 1px solid #dfe6f0; text-align: left; vertical-align: top; }
.article-table-wrap th { color: #111a3a; background: #eaf1ff; font-size: .73rem; letter-spacing: .06em; text-transform: uppercase; }
.article-table-wrap tr:last-child td { border-bottom: 0; }
.article-resource-grid { display: grid; max-width: 100% !important; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; margin: 44px 0; }
.article-resource-grid a { display: flex; min-height: 210px; flex-direction: column; padding: 25px; border: 1px solid #c9d7ea; border-radius: 21px; color: #111a3a; background: linear-gradient(145deg, #f7fbff, #edf4ff); text-decoration: none; transition: transform .2s ease, box-shadow .2s ease; }
.article-resource-grid a:nth-child(2) { background: linear-gradient(145deg, #fff7e2, #fffdf7); }
.article-resource-grid span { color: #087f76; font-size: .68rem; font-weight: 900; letter-spacing: .1em; text-transform: uppercase; }
.article-resource-grid strong { margin-top: 18px; font-size: 1.2rem; line-height: 1.25; }
.article-resource-grid em { margin-top: auto; padding-top: 24px; color: #087f76; font-size: .78rem; font-style: normal; font-weight: 850; }
.article-sources { max-width: 100% !important; margin-top: 68px; padding-top: 34px; border-top: 1px solid #d7e1f0; color: #52617f; font-size: .86rem; }
.article-sources h2 { margin-top: 0; font-size: 1.45rem; }

.article-rail { display: grid; gap: 18px; }
.article-rail__card, .article-rail__note { padding: 28px; border-radius: 24px; }
.article-rail__card { border: 1px solid #cbd8ea; background: linear-gradient(145deg, #edf4ff, #e9faf5 78%); box-shadow: 0 18px 48px rgba(17, 26, 58, .08); }
.article-rail__card > span { color: #087f76; font-size: .68rem; font-weight: 900; letter-spacing: .1em; text-transform: uppercase; }
.article-rail__card h2 { margin: 14px 0 24px; font-size: 1.55rem; line-height: 1.12; letter-spacing: -.04em; }
.article-rail__card .button { width: 100%; padding-inline: 15px; text-align: center; }
.article-rail__secondary { display: block; margin-top: 18px; color: #087f76; font-size: .8rem; font-weight: 800; text-align: center; text-decoration: none; }
.article-rail__note { border: 1px solid #ead59c; background: #fff8e7; }
.article-rail__note strong { font-size: .9rem; }
.article-rail__note p { color: #52617f; font-size: .86rem; line-height: 1.65; }
.article-rail__note a { color: #087f76; font-size: .78rem; font-weight: 800; text-decoration: none; }

@media (min-width: 1020px) {
  .article-layout { grid-template-columns: minmax(0, 1fr) 300px; }
  .article-rail { position: sticky; top: 104px; }
}

.article-next { padding-block: clamp(64px, 8vw, 96px); color: #fff; background: linear-gradient(135deg, #111a3a, #24387f); }
.article-next .shell { display: grid; gap: 20px; }
.article-next h2 { max-width: 700px; margin: 0; color: #fff; font-size: clamp(2.4rem, 5vw, 4.5rem); line-height: 1; letter-spacing: -.055em; }
.article-next .eyebrow { color: #76eadc; }
.article-next .button--quiet { border-color: rgba(255, 255, 255, .38); color: #fff; background: transparent; }
.article-next .shell > div { display: flex; flex-wrap: wrap; gap: 12px; }

.post-card__meta, .post-card__footer { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.post-card__meta > span:last-child, .post-card__footer time { color: #6a7690; font-size: .7rem; font-weight: 700; }
.post-card__footer { margin-top: auto; padding-top: 24px; border-top: 1px solid #e1e7f0; }
.post-card__footer .tool-link { margin-top: 0; }

@media (hover: hover) {
  .article-resource-grid a:hover { box-shadow: 0 18px 38px rgba(17, 26, 58, .10); transform: translateY(-4px); }
}

@media (max-width: 720px) {
  .article-hero { padding-block: 54px 68px; }
  .article-hero h1 { font-size: clamp(2.65rem, 13vw, 4.4rem); }
  .article-hero__nook { min-height: 260px; }
  .article-meta { align-items: flex-start; flex-direction: column; }
  .article-meta span + span::before { display: none; }
  .article-resource-grid { grid-template-columns: 1fr; }
  .article-content { font-size: 1rem; }
  .article-toc { padding: 22px; }
}

@media (prefers-reduced-motion: reduce) {
  .article-resource-grid a { transition: none; }
}
