/* Anchor & Wave — shared typography profile.
 * Load after layout/component CSS on every page. Add new text to a role here;
 * do not introduce component-specific sizes. Brand artwork and decorative
 * numerals/icons retain their existing treatments. All sizes respect rem scaling.
 */
:root {
  --type-family: var(--font-geist-sans), Arial, Helvetica, sans-serif;
  --type-display: clamp(3.3rem, 5vw, 5.85rem);
  --type-page: clamp(2.25rem, 3.65vw, 3.25rem);
  --type-section: clamp(2rem, 3vw, 2.75rem);
  --type-primary: 1.5rem;
  --type-support: 1.25rem;
  --type-lead: 1.125rem;
  --type-body: 1rem;
  --type-caption: .875rem;
  --type-portrait-name: 1.046rem;
  --type-nav: .9375rem;
  --type-tier: clamp(1.5rem, 2.5vw, 2rem);
  --type-price: clamp(1.28rem, 1.92vw, 2rem);
  --type-regular: 400;
  --type-emphasis: 600;
  --type-heading: 670;
  --type-title: 710;
  --type-leading-body: 1.6;
  --type-leading-heading: 1.25;
  --type-leading-section: 1.1;
  --type-tracking-body: normal;
  --type-tracking-heading: -.025em;
  --type-tracking-title: -.045em;

  /* Shared spacing between paragraphs, independent of font-size roles. */
  --space-paragraph: 1.375rem;
  --space-paragraph-compact: .75rem;

  /* Heading-to-content spacing follows the heading's role. */
  --space-heading-section: 1.5rem;
  --space-heading-item: 1rem;
  --space-heading-note: .5rem;

  /* Compatibility names for the original layout stylesheet. */
  --fs-display: var(--type-display);
  --fs-title: var(--type-section);
  --fs-heading: var(--type-primary);
  --fs-subheading: var(--type-support);
  --fs-heading-sm: var(--type-primary);
  --fs-numeral: clamp(3.5rem, 5.2vw, 5.9rem);
  --fs-price: var(--type-price);
  --fs-lead: var(--type-lead);
  --fs-body: var(--type-body);
  --fs-body-sm: var(--type-body);
  --fs-fine: var(--type-caption);
  --fs-label: var(--type-caption);
}

body {
  font-family: var(--type-family);
  font-size: var(--type-body);
  font-weight: var(--type-regular);
  line-height: var(--type-leading-body);
  letter-spacing: var(--type-tracking-body);
}

/* The homepage keeps its established display treatment. */
body.page-home .hero h1 {
  font-family: var(--type-family);
  font-size: var(--type-display);
  font-weight: var(--type-title);
  line-height: .88;
  letter-spacing: -.065em;
}

body .services-hero .page-hero-copy h1,
body .privacy-hero h1,
body .thanks-inner h1 {
  font-family: var(--type-family);
  font-size: var(--type-page);
  font-weight: var(--type-title);
  line-height: 1.04;
  letter-spacing: -.065em;
}

/* Sibling section titles share a complete role, including the tax section. */
body .section-heading h2,
body .about-copy h2,
body .about-reference h2,
body .contact-section h2,
body #filings .section-heading h2 {
  font-family: var(--type-family);
  font-size: var(--type-section);
  font-weight: var(--type-title);
  line-height: var(--type-leading-section);
  letter-spacing: var(--type-tracking-title);
}

/* Primary service/item titles, including headings within the privacy document. */
body #services-connect .service-overview-card h3,
body .project-ledger h3,
body .project-hourly-list h3,
body .privacy-content h2,
body #filings .tax-filing-title,
body .contact-form-panel .form-thanks h3 {
  font-family: var(--type-family);
  font-size: var(--type-primary);
  font-weight: var(--type-heading);
  line-height: var(--type-leading-heading);
  letter-spacing: var(--type-tracking-heading);
}

/* Supporting titles: notes, onboarding, additions and the filing reassurance. */
body .recurring-information-column h3,
body .onboarding-step h3,
body #filings .tax-filing-addon .tax-filing-title,
body #filings .tax-filing-review .tax-filing-title {
  font-family: var(--type-family);
  font-size: var(--type-support);
  font-weight: var(--type-heading);
  line-height: var(--type-leading-heading);
  letter-spacing: var(--type-tracking-heading);
}

/* Ordinary descriptions, lists and commercial terms remain equally readable. */
body .service-card-desc,
body .tier-description,
body .tier-support-note,
body:has(.services-hero) .tier-card li,
body .project-ledger p,
body .project-hourly-list p,
body .recurring-information-column p,
body .recurring-information-column li,
body .onboarding-step p,
body #filings .tax-filing-description,
body .privacy-content p,
body .privacy-content li,
body .privacy-content address,
body .refh-full blockquote p,
body .contact-form-panel .form-thanks p {
  font-family: var(--type-family);
  font-size: var(--type-body);
  font-weight: var(--type-regular);
  line-height: var(--type-leading-body);
  letter-spacing: var(--type-tracking-body);
}

/* Introductions use the same lead size on desktop and mobile. */
body .hero-intro,
body.page-services .services-hero-description,
body .services-hero .page-hero-copy > p,
body.page-home .service-overview-heading-row > p,
body .about-copy .about-lead,
body .section-heading > p,
body #recurring-service-levels .section-heading > p,
body #filings .section-heading > p,
body #project-options .section-heading > p,
body .heading-aside p,
body .contact-description,
body .about-reference-note,
body .contact-section > .shell > div:first-child > p:last-child,
body .privacy-intro p:last-child,
body .thanks-inner > p {
  font-family: var(--type-family);
  font-size: var(--type-lead);
  font-weight: var(--type-regular);
  line-height: var(--type-leading-body);
  letter-spacing: var(--type-tracking-body);
}

/* Compact UI and captions are explicit roles, not reduced body copy. */
body .trust-item p,
body .portrait-caption-inline span,
body .services-portrait-caption span,
body .privacy-intro p:first-child,
body .privacy-nav > span,
body #main-content .form-row label small,
body :is(#contact-home-form,#contact-services-form) > fieldset > legend small,
body .contact-required-note,
body .contact-form-panel .form-privacy-note p,
body .contact-form-panel .form-noscript,
body .footer-arranged .footer-fine {
  font-family: var(--type-family);
  font-size: var(--type-caption);
  font-weight: var(--type-regular);
  line-height: var(--type-leading-body);
  letter-spacing: var(--type-tracking-body);
}

/* Preserve the compact, bold attribution labels used in the references. */
body .reference-role {
  font-family: var(--type-family);
  font-size: .6875rem;
  font-weight: 720;
  line-height: 1.5;
  letter-spacing: .12em;
  text-transform: uppercase;
}

body .desktop-nav a,
body .privacy-nav a {
  font-family: var(--type-family);
  font-size: var(--type-nav);
  font-weight: var(--type-emphasis);
  line-height: var(--type-leading-body);
  letter-spacing: var(--type-tracking-body);
}

/* Footer navigation uses the navigation size with regular weight. */
body .footer-arranged .footer-primary-nav a {
  font-family: var(--type-family);
  font-size: var(--type-nav);
  font-weight: var(--type-regular);
  line-height: var(--type-leading-body);
  letter-spacing: var(--type-tracking-body);
}

/* Compact supporting notes beneath the service tiers use existing text roles. */
body .recurring-pricing-group h3 {
  font-family: var(--type-family);
  font-size: var(--type-body);
  font-weight: var(--type-emphasis);
  line-height: var(--type-leading-heading);
  letter-spacing: var(--type-tracking-heading);
}
body .recurring-pricing-group p,
body .recurring-pricing-group li {
  font-family: var(--type-family);
  font-size: var(--type-caption);
  font-weight: var(--type-regular);
  line-height: var(--type-leading-body);
  letter-spacing: var(--type-tracking-body);
}

body .mobile-menu nav a,
body .services-hero-links a,
body .trust-item h2,
body .reference-name,
body .portrait-caption-inline strong,
body .services-portrait-caption strong,
body .tier-includes,
body .tier-includes-label,
body .tier-inherit,
body #main-content .form-row label,
body :is(#contact-home-form,#contact-services-form) > fieldset > legend,
body .form-submit button,
body .button,
body .skip-link,
body #filings .tax-additions-label,
body #filings .tax-filing-contact {
  font-family: var(--type-family);
  font-size: var(--type-body);
  font-weight: var(--type-emphasis);
  line-height: var(--type-leading-body);
  letter-spacing: var(--type-tracking-body);
}

body #main-content form input[type="text"],
body #main-content form input[type="email"],
body #main-content form textarea,
body #filings .tax-form-code {
  font-family: var(--type-family);
  font-size: var(--type-body);
  font-weight: var(--type-regular);
  line-height: var(--type-leading-body);
  letter-spacing: var(--type-tracking-body);
}

/* Named component roles preserve the tier and price hierarchy. */
body .tier-card h3 {
  font-family: var(--type-family);
  font-size: var(--type-tier);
  font-weight: var(--type-title);
  line-height: var(--type-leading-heading);
  letter-spacing: var(--type-tracking-title);
}
body .project-price,
body #project-options .project-price,
body #project-options .project-hourly-rate,
body #filings .tax-filing-price {
  font-family: var(--type-family);
  font-size: var(--type-body);
  font-weight: var(--type-regular);
  line-height: 1.4;
  letter-spacing: var(--type-tracking-body);
}
body .tier-price,
body .project-price strong,
body .project-ledger article > div:first-child strong,
body .project-hourly-heading strong {
  font-family: var(--type-family);
  font-size: var(--type-price);
  font-weight: var(--type-heading);
  line-height: var(--type-leading-heading);
  letter-spacing: var(--type-tracking-heading);
}
body .tier-price span,
body .tier-price small,
body .project-hourly-heading strong span {
  font-size: var(--type-body);
  font-weight: var(--type-regular);
  line-height: 1.4;
  letter-spacing: var(--type-tracking-body);
}
body #filings .tax-filing-price strong,
body #project-options .project-hourly-rate strong,
body #project-options .project-price strong {
  font-size: var(--type-primary);
  font-weight: var(--type-heading);
  line-height: inherit;
  letter-spacing: var(--type-tracking-heading);
}
body #filings .tax-filing-quote {
  font-size: var(--type-support);
  font-weight: var(--type-heading);
  letter-spacing: var(--type-tracking-heading);
}

@media (width <= 620px) {
  body.page-home .hero h1 { line-height: .91; }
}

/* Services portrait hero uses the same display family as the homepage. */
body.page-services .services-hero h1{
  font-family:var(--type-family);
  font-size:var(--type-display);
  font-weight:var(--type-title);
  line-height:.92;
  letter-spacing:-.055em;
}
body.page-services .services-hero-identity strong{
  font-size:var(--type-portrait-name);font-weight:var(--type-emphasis);line-height:1.4;
}
body.page-services .services-hero-identity span{
  font-size:var(--type-caption);font-weight:var(--type-regular);line-height:1.5;
}
body.page-services .services-hero-links a{font-size:var(--type-lead);font-weight:var(--type-regular)}

/* Section introductions, ordinary item copy and compact notes have distinct
   spacing roles. Hero compositions retain their existing spacing. */
/* A title without supporting content uses the shared section-heading gap.
   The content determines this state; no page-specific class is needed. */
body .section-heading:has(> h2:only-child) {
  margin-bottom: var(--space-heading-section);
}
body .section-heading > h2 + p,
body .about-copy > h2 + p,
body .about-reference-note {
  margin-top: var(--space-heading-section);
}
body .privacy-content h2 {
  margin-bottom: var(--space-heading-section);
}
body .trust-item h2 + p,
body .contact-form-panel .form-thanks h3 + p {
  margin-top: var(--space-heading-item);
}
@media(width<=900px){
  body.page-services .services-hero h1{font-size:clamp(2.5rem,6.5vw,3.5rem);line-height:1.02}
}
@media(width<=360px){
  body.page-services .services-hero h1{font-size:2.2rem}
}

/* Tax column labels and subordinate personal-return additions. */
body #filings .tax-column-label{
  font-family:var(--type-family);
  font-size:var(--type-caption);
  font-weight:var(--type-emphasis);
  line-height:var(--type-leading-body);
  letter-spacing:var(--type-tracking-body);
}
body #filings .tax-filing-addon .tax-filing-title,
body #filings .tax-filing-addon .tax-filing-price strong{
  font-size:var(--type-lead);
}
body #filings .tax-filing-footer .tax-filing-title{
  font-size:var(--type-support);
}
