/* First Street type and spacing system (Oct 21, 2026).
   Loaded last on every page. One scale for every role, one section rhythm.
   Selectors start with :root body:is(...) so they win over older page styles. */
:root {
  --t-display: clamp(44px, 6.2vw, 88px);
  --t-h2: clamp(30px, 3.4vw, 46px);
  --t-title: clamp(24px, 2.2vw, 30px);   /* serif card and step titles */
  --t-h3: clamp(19px, 1.5vw, 21px);      /* sans subheads */
  --t-lede: clamp(18px, 1.4vw, 20px);
  --t-body: 17px;
  --t-support: 16px;                     /* text under card and step titles */
  --t-small: 14px;
  --c-body: #333;
  --c-muted: #5f5f5f;
  --sec: clamp(72px, 8.5vw, 128px);      /* section top and bottom */
  --sec-head: clamp(36px, 4vw, 56px);    /* heading block to content */
  --measure: 65ch;
}
:root body:is(.editorial-home, .editorial-page) { font-size: var(--t-body); color: var(--c-body); -webkit-font-smoothing: antialiased; }

/* Headings */
:root body:is(.editorial-home, .editorial-page) main :is(h1, h2, h3) { color: #111; }
:root body:is(.editorial-home, .editorial-page) main :is(.ed-packages, .cta-band, .ed-feature, .addon) :is(h1, h2, h3) { color: #fff; }
:root body:is(.editorial-home, .editorial-page) main h1 { font-size: var(--t-display); line-height: 1.02; letter-spacing: -0.03em; }
:root body:is(.editorial-home, .editorial-page) main h2 { font-size: var(--t-h2); line-height: 1.1; letter-spacing: -0.025em; margin-bottom: 24px; }
:root body:is(.editorial-home, .editorial-page) main h3 { font-family: inherit; font-size: var(--t-h3); line-height: 1.3; font-weight: 500; letter-spacing: -0.01em; margin-bottom: 10px; }
:root body:is(.editorial-home, .editorial-page) main :is(.ed-process-steps h3, .guide-card h3, .project-card h2) { font-family: 'Cormorant Garamond', Georgia, serif; font-size: var(--t-title); font-weight: 400; line-height: 1.12; letter-spacing: -0.02em; margin-bottom: 14px; }
:root body:is(.editorial-home, .editorial-page) main .ed-feature-caption h2 { font-size: clamp(34px, 5vw, 72px); margin-bottom: 0; }
:root body:is(.editorial-home, .editorial-page) main :is(.teaser-plan h3, .plan-name) { font-size: clamp(24px, 2.2vw, 30px); }

/* Body copy */
:root body:is(.editorial-home, .editorial-page) main :is(p, li):not([class]) { font-size: var(--t-body); line-height: 1.65; }
:root body:is(.editorial-home, .editorial-page) main p:not([class]) { max-width: var(--measure); }
:root body:is(.editorial-home, .editorial-page) main p:not([class]) + p:not([class]) { margin-top: 1em; }
:root body:is(.editorial-home, .editorial-page) main :is(.lede, .ed-intro-note p, .ed-statement-copy p, .ed-features-intro, .ed-process-intro) { font-size: var(--t-lede); line-height: 1.55; color: var(--c-body); max-width: 54ch; }
:root body:is(.editorial-home, .editorial-page) main :is(.card, .ed-feature-item, .ed-process-steps li, .guide-card, .project-card, .teaser-plan, .switch-steps li, .faq-item) p:not([class]) { font-size: var(--t-support); line-height: 1.6; color: var(--c-muted); }
:root body:is(.editorial-home, .editorial-page) .ed-packages .teaser-plan p:not([class]) { color: #cfcfcf; }

/* Small text: nothing under 14px */
:root body:is(.editorial-home, .editorial-page) main :is(.section-label, .ed-label, .ed-eyebrow, .ed-title-foot, .ed-step-number, .ed-process-caption, .guide-byline, .guide-source, .audit-small, .teaser-for, .teaser-build, .plan-for, .plan-build, .project-meta, .ed-project p, .ph-note, figcaption) { font-size: var(--t-small); line-height: 1.5; }
:root body:is(.editorial-home, .editorial-page) main .ph-tag { font-size: 13px; }
:root body:is(.editorial-home, .editorial-page) main summary { font-size: 18px; }
:root body:is(.editorial-home, .editorial-page) main .plans-table { font-size: 15px; }
@media (max-width: 767px) {
  :root body:is(.editorial-home, .editorial-page) main .plans-table { font-size: 14px; }
  :root body:is(.editorial-home, .editorial-page) main .plans-table :is(th, td) { padding: 14px 6px; }
}

/* Section rhythm */
:root body:is(.editorial-home, .editorial-page) main :is(.section, .ed-restored, .ed-statement, .ed-work, .ed-process, .ed-switch, .ed-close, .cta-band) { padding-block: var(--sec); }
:root body:is(.editorial-home, .editorial-page) main .page-header { padding-block: clamp(56px, 7vw, 104px) clamp(48px, 5.5vw, 80px); }
:root body:is(.editorial-home, .editorial-page) main .page-header h1 { margin: 0 0 28px; }
:root body:is(.editorial-home, .editorial-page) main :is(.section-head, .ed-section-heading) { margin-bottom: var(--sec-head); }
:root body:is(.editorial-home, .editorial-page) main :is(.section-head, .ed-section-heading) h2 { margin-bottom: 16px; }
:root body:is(.editorial-home, .editorial-page) main .project-showcase { padding-block: 48px 0; }
:root body:is(.editorial-home, .editorial-page) main :is(.hero-actions, .ed-intro-note .ed-link) { margin-top: 28px; }

/* Home specifics */
:root body.editorial-home main .ed-intro-note { max-width:340px; }
:root body.editorial-home main .ed-intro-note p { font-size:18px; }
@media (min-width:768px) {
  :root body.editorial-home main .ed-intro-grid { grid-template-columns:1fr 340px; column-gap:6vw; }
  :root body.editorial-home main .ed-process-steps li { min-height:44vh; }
}
:root body.editorial-page main .plans-table th[scope="row"] small { font-size:14px; font-weight:400; line-height:1.45; margin-top:2px; }
@media (max-width: 767px) {
  :root body.editorial-page main .plans-table { table-layout: fixed; width: 100%; }
  :root body.editorial-page main .plans-table :is(thead th:first-child, th[scope="row"]) { width: 40%; }
  :root body.editorial-page main .plans-table .plan-name { font-size: 20px; word-break: normal; overflow-wrap: normal; hyphens: none; }
  :root body.editorial-page main .plans-table th[scope="row"] small { font-size: 13px; }
}
