/* JFA shared surfaces. Loaded last on all six pages.
   Explicit component themes, not a universal recolour. The repeated body class
   matches the legacy bilingual !important rules; nested surfaces reset tokens. */
:root {
  --jfa-navy: #22303f;
  --jfa-paper: #ffffff;
  --jfa-near-white: #f6f7f8;
  --jfa-edge: #dce2e7;
  --jfa-card-shadow: 0 4px 18px rgba(34,48,63,.065);
  --bg-warm: var(--jfa-near-white);
  --bg-white: var(--jfa-paper);
  --radius: 12px;
  --radius-lg: 12px;
}
html body.jfa-read { background-color: var(--jfa-near-white); }

/* Shared geometry; images, overlay layers, layouts and interaction states stay intact. */
html body.jfa-read :is(.service-card,.team-card,.st-card,.est-card,.est-plan,.est-ord-card,
.est-sheet,.est-view-sheet,.est-qa-item,.est-mini,.hiw-card,.hiw-out-card,.hiw-lane,
.hiw-money,.hiw-panel,.hiw-doc,.dz-card,.dz-strip-inner,.dz-hero-plan,.dz-sketch,
.sks-get-card,.sks-next-card,.sks-next,.sks-final,.sks-how article,.sks-send,.sks-qa,
.sks-thumb,.sks-cmp-inner,.sks-c-stage,.pv-frame,.contact-form,.dz-steps-grid article) {
  border-radius: 12px;
  border: 1px solid var(--jfa-edge);
  box-shadow: var(--jfa-card-shadow);
}

/* Light cards are explicit theme boundaries, even when nested in navy sections. */
html body.jfa-read :is(.service-card,.team-card,.st-grid > .st-card,.est-card,.est-plan,
.est-ord-card,.est-sheet,.est-view-sheet,.est-qa-item,.est-mini,.hiw-card,.hiw-out-card,
.hiw-lane,.hiw-money,.hiw-doc,.dz-card,.dz-strip-inner,.dz-hero-plan,.sks-get-card,
.dz-steps-grid article) {
  --jfa-ink: #26323d;
  --jfa-muted: #4f5a65;
  background-color: var(--jfa-paper);
  color: var(--jfa-ink);
}

/* Navy modules retain their image/gradient backgrounds. */
html body.jfa-read :is(.hero,.stats,.contact,.est-hero,.hiw-hero,.dz-hero,
.est-final,.hiw-final,.hiw-section.is-dark,.sks-next,.sks-final,
.est-plan.is-featured,.est-ord-card.is-featured,.st-shell .st-card,
.est-sheet-bar,.est-sheet-kit,.est-view-head) {
  --jfa-ink: #f3f5f7;
  --jfa-muted: #dce4eb;
  color: var(--jfa-ink);
}
html body.jfa-read :is(.est-plan.is-featured,.est-ord-card.is-featured,.st-shell .st-card,
.sks-next,.sks-final) { background-color: var(--jfa-navy); border-color: #536170; }
html body.jfa-read :is(.sks-next-card,.hiw-panel,.contact-form,.est-final .est-plan:not(.is-featured)) {
  --jfa-ink: #f3f5f7;
  --jfa-muted: #dce4eb;
  background-color: rgba(255,255,255,.045);
  border-color: #536170;
}

/* Nested light/gold surfaces reset their own theme instead of inheriting white text. */
html body.jfa-read :is(.est-final .est-plan.is-featured,.est-plan-cta,.est-badge,
.est-final h2 .est-hl,.hiw-hl,.dz-hl,.hiw-chip,.hiw-tabs button.is-on,
.btn-primary,.form-submit,.st-btn:not(.is-ghost),.hiw-btn:not(.is-ghost),
.dz-btn:not(.is-ghost),.sks-btn:not(.is-ghost)) {
  --jfa-ink: #22303f;
  --jfa-muted: #22303f;
  color: var(--jfa-ink);
}
html body.jfa-read .est-final .est-plan.is-featured { background-color: var(--accent); }
html body.jfa-read .est-final .est-badge { --jfa-ink: #f3f5f7; --jfa-muted: #dce4eb; }
html body.jfa-read .dz-hero-plan { --jfa-ink: #26323d; --jfa-muted: #4f5a65; }

/* Only text in named components participates; no wildcard or SVG/image recolouring.
   Variables resolve at each element, so a white document inside a dark panel stays dark-on-light. */
html body.jfa-read.jfa-read.jfa-read :is(.hero,.stats,.contact,.est-hero,.hiw-hero,.dz-hero,
.est-final,.hiw-final,.hiw-section.is-dark,.sks-next,.sks-final,.est-plan,.est-ord-card,
.st-shell .st-card,.hiw-doc,.dz-hero-plan,.est-sheet-bar,.est-sheet-kit,.est-view-head)
:is(p,li,label,h1,h2,h3,h4,.lang-en,.lang-zh,figcaption) {
  color: var(--jfa-ink) !important;
}
html body.jfa-read.jfa-read.jfa-read :is(.hero,.stats,.contact,.est-hero,.hiw-hero,.dz-hero,
.est-final,.hiw-final,.hiw-section.is-dark,.sks-next,.sks-final,.est-plan,.est-ord-card,
.st-shell .st-card,.hiw-doc,.dz-hero-plan,.est-sheet-bar,.est-sheet-kit,.est-view-head) .lang-zh {
  color: var(--jfa-muted) !important;
}
html body.jfa-read.jfa-read.jfa-read :is(.est-plan-cta,.btn-primary,.form-submit,
.st-btn:not(.is-ghost),.hiw-btn:not(.is-ghost),.dz-btn:not(.is-ghost),.sks-btn:not(.is-ghost))
:is(.lang-zh,.lang-en) { color: #22303f !important; }
html body.jfa-read.jfa-read.jfa-read .dz-hero .dz-btn.is-ghost { color: #f3f5f7; }
html body.jfa-read.jfa-read.jfa-read .st-shell .st-field :is(input,select,textarea) { color: #f3f5f7; }

/* Start uses the shared near-white page, with a separate navy form card. */
html body.jfa-read.jfa-read.jfa-read :is(.st-hero,.st-legal) :is(h1,p,a,.lang-en,.lang-zh) { color: #26323d !important; }
html body.jfa-read.jfa-read.jfa-read .st-hero .st-eyebrow { color: #6e4b29; }
html body.jfa-read.jfa-read.jfa-read .st-field :is(input,textarea)::placeholder { color: #b8c4ce; opacity: 1; }
html body.jfa-read.jfa-read.jfa-read .dz-filter.is-on .lang-zh { color: #f3f5f7 !important; }
html body.jfa-read.jfa-read.jfa-read :is(.pv-chrome,.pv-tabs button.is-on) :is(.lang-zh,.lang-en) { color: #dce4eb !important; }
html body.jfa-read.jfa-read.jfa-read .sks-cmp-tag .lang-zh { color: #f3f5f7 !important; }

/* ===== Centred titles, subtitles and intro blocks — every page =====
   Layout rule requested by the owner: page and section titles plus their
   subtitles sit centred. Body copy, forms, lists and tables keep their own
   alignment. Sections that were already centred are listed only where a
   narrower legacy rule (is-left, sks-send, etc.) pulled them back. */

/* Home — welcome hero */
html body.jfa-read .hero-text,
html body.jfa-read .hero-brand,
html body.jfa-read .hero-title,
html body.jfa-read .hero-desc { text-align: center !important; }
html body.jfa-read .hero-brand { justify-content: center !important; }
html body.jfa-read .hero-desc { margin-left: auto !important; margin-right: auto !important; }
html body.jfa-read .hero-actions { justify-content: center !important; }

/* Estimate — hero, section heads, final head, FAQ rail title */
html body.jfa-read .est-hero .container,
html body.jfa-read .est-hero h1,
html body.jfa-read .est-eyebrow,
html body.jfa-read .est-lede,
html body.jfa-read .est-fineprint { text-align: center !important; }
html body.jfa-read .est-lede,
html body.jfa-read .est-fineprint { margin-left: auto !important; margin-right: auto !important; }
html body.jfa-read .est-price-strip { justify-content: center !important; align-items: center; text-align: center !important; }
html body.jfa-read .est-price-chip { text-align: center !important; }
html body.jfa-read .est-section-head,
html body.jfa-read .est-section-head h2,
html body.jfa-read .est-section-head p { text-align: center !important; }
html body.jfa-read .est-section-head { margin-left: auto !important; margin-right: auto !important; }
html body.jfa-read .est-final-head,
html body.jfa-read .est-final-head h2,
html body.jfa-read .est-final-head p { text-align: center !important; }
html body.jfa-read .est-final-head { margin-left: auto !important; margin-right: auto !important; }
html body.jfa-read .est-faq2 .rail h2 { text-align: center !important; }

/* Start a project — hero */
html body.jfa-read .st-hero .container,
html body.jfa-read .st-hero h1,
html body.jfa-read .st-hero p { text-align: center !important; }
html body.jfa-read .st-hero p { margin-left: auto !important; margin-right: auto !important; }

/* Process — hero and any head marked is-left */
html body.jfa-read .hiw-hero .container,
html body.jfa-read .hiw-hero h1,
html body.jfa-read .hiw-lede { text-align: center !important; }
html body.jfa-read .hiw-lede { margin-left: auto !important; margin-right: auto !important; }
html body.jfa-read .hiw-head.is-left { text-align: center !important; margin-left: auto !important; margin-right: auto !important; }

/* Designs — hero copy and eyebrow */
html body.jfa-read .dz-hero-copy,
html body.jfa-read .dz-hero-copy h1,
html body.jfa-read .dz-eyebrow,
html body.jfa-read .dz-lede { text-align: center !important; }
html body.jfa-read .dz-lede { margin-left: auto !important; margin-right: auto !important; }
html body.jfa-read .dz-hero-copy .dz-eyebrow { display: inline-block; }

/* Sketch — hero copy plus the two blocks that were pinned left */
html body.jfa-read .sks-copy,
html body.jfa-read .sks-copy h1,
html body.jfa-read .sks-sub { text-align: center !important; }
html body.jfa-read .sks-copy .sks-lede,
html body.jfa-read .sks-send .sks-lede { text-align: center !important; margin-left: auto !important; margin-right: auto !important; }

/* Content page — every section title and subtitle */
html body.jfa-read .section-title,
html body.jfa-read .section-subtitle,
html body.jfa-read .section-head { text-align: center !important; margin-left: auto !important; margin-right: auto !important; }

/* Content page #about: the heading block spans both columns so it centres on
   the page, not inside the left text column. Rows are explicit, so the photo
   keeps its own column and cannot overlap the heading. */
html body.jfa-read.content-page #about .container { grid-template-rows: auto auto auto !important; }
html body.jfa-read.content-page #about .section-title {
  grid-column: 1 / -1 !important; grid-row: 1 !important;
  text-align: center !important; margin-left: auto !important; margin-right: auto !important;
}
html body.jfa-read.content-page #about .section-title::after { margin-inline: auto !important; }
html body.jfa-read.content-page #about .section-subtitle {
  grid-column: 1 / -1 !important; grid-row: 2 !important;
  text-align: center !important; margin-left: auto !important; margin-right: auto !important;
  max-width: 78ch !important;
}
html body.jfa-read.content-page #about .about-text { grid-column: 1 !important; grid-row: 3 !important; }
html body.jfa-read.content-page #about .about-image { grid-column: 2 !important; grid-row: 3 !important; }

/* Estimate FAQ rail: the note under the rail title follows the centred title. */
html body.jfa-read .est-faq2 .rail p { text-align: center !important; margin-left: auto !important; margin-right: auto !important; }

/* Sketch: the send block heading was pinned left by a later rule. */
html body.jfa-read .sks-send h2.sks-h2,
html body.jfa-read .sks-send .sks-h2 { text-align: center !important; }

/* Hero action rows follow the centred headings, and tick lists keep their
   ticks on the left while the list block itself is centred. */
html body.jfa-read .hiw-cta-row,
html body.jfa-read .hiw-cta-row.is-left,
html body.jfa-read .dz-cta-row,
html body.jfa-read .dz-cta-row.is-left,
html body.jfa-read .sks-cta,
html body.jfa-read .est-plan-cta { justify-content: center !important; text-align: center !important; }

html body.jfa-read .sks-ticks { text-align: left !important; width: fit-content !important; max-width: 100% !important; margin-left: auto !important; margin-right: auto !important; }
html body.jfa-read .sks-ticks li { text-align: left !important; }

html body.jfa-read .dz-fine,
html body.jfa-read .dz-sketch,
html body.jfa-read .dz-sketch-q,
html body.jfa-read .dz-sketch-a,
html body.jfa-read .dz-sketch-note { text-align: center !important; }
html body.jfa-read .dz-sketch { margin-left: auto !important; margin-right: auto !important; }

/* ===== Navigation state: one indicator, not two =====
   Older rules marked the current page with a text underline while also drawing
   a gold hover bar at a different vertical offset, so two lines appeared side by
   side and looked like they collided. The current page is now gold text only,
   and the gold bar belongs to hover / keyboard focus alone. */
html body.jfa-read .nav-links a[aria-current="page"],
html body.jfa-read .nav-links a.is-current {
  text-decoration: none !important;
  color: var(--accent) !important;
  font-weight: 600 !important;
}
html body.jfa-read .nav-links a[aria-current="page"]::after,
html body.jfa-read .nav-links a.is-current::after { width: 0 !important; }
html body.jfa-read .nav-links a:hover::after,
html body.jfa-read .nav-links a:focus-visible::after { width: 100% !important; }
html body.jfa-read .nav-links a:focus-visible { outline: 2px solid var(--accent); outline-offset: 4px; }

/* ===== Content page: the two calls to action are one matched pair =====
   "Learn more" and the chat toggle sat side by side at different heights,
   fonts and corner offsets. They now share one geometry so they read as a
   pair instead of two unrelated controls. */
html body.jfa-read.content-page #about .btn,
html body.jfa-read.content-page #jfa-chat-toggle {
  box-sizing: border-box;
  width: 176px;
  min-height: 52px;
  height: 52px;
  padding: 0 20px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-family: inherit;
  font-size: 15px;
  font-weight: 600;
  line-height: 1.2;
  border-radius: 6px;
  vertical-align: top;
  margin-top: 4px;
}
html body.jfa-read.content-page #jfa-chat-toggle { margin-left: 12px; margin-right: 0; max-width: none; }
@media (max-width: 480px) {
  html body.jfa-read.content-page #about .btn,
  html body.jfa-read.content-page #jfa-chat-toggle {
    width: 100%;
    min-height: 50px;
    height: 50px;
    padding: 0 12px;
    font-size: 14.5px;
    display: flex;
  }
  html body.jfa-read.content-page #jfa-chat-toggle { margin-left: 0; margin-top: 10px; max-width: none; }
}

/* ===== Contact list: the label and value sit level with the icon box =====
   The rows were aligned to the top of the icon, so the two lines of text hung
   below the square. The text block is now centred on the icon box, which puts
   the label and the value level with the frame on the left. */
html body.jfa-read #contact .contact-item {
  align-items: center !important;
}
html body.jfa-read #contact .contact-item > div {
  display: flex;
  flex-direction: column;
  justify-content: center;
}
html body.jfa-read #contact .contact-item h4 { margin: 0 0 4px; }
html body.jfa-read #contact .contact-item p { margin: 0; }

/* ===== Estimate pricing cards: same content, much less air =====
   The two plan cards ran to 1302px because every block carried 20px of padding
   plus 20px of margin and the bullet lines were set at 1.65 leading. Spacing is
   tightened here; no sentence, price or exclusion is removed or reworded. */
html body.jfa-read .est-pricing .est-plan { padding: 24px 28px 22px !important; }
html body.jfa-read .est-pricing .est-plan-head { padding-bottom: 14px !important; }
html body.jfa-read .est-pricing .est-plan-tax { margin-top: 6px !important; }
html body.jfa-read .est-pricing .est-plan-desc { margin: 14px 0 0 !important; line-height: 1.6 !important; }
html body.jfa-read .est-pricing .est-plan-eyebrow { margin-bottom: 12px !important; padding-bottom: 6px !important; }
html body.jfa-read .est-pricing .est-callout { margin-top: 14px !important; padding: 12px 16px !important; line-height: 1.55 !important; }
html body.jfa-read .est-pricing .est-spec { padding-top: 12px !important; margin-top: 12px !important; }
html body.jfa-read .est-pricing .est-spec-label { margin-bottom: 5px !important; }
html body.jfa-read .est-pricing .est-spec-body { line-height: 1.55 !important; }
html body.jfa-read .est-pricing .est-spec-body ul.est-ticks,
html body.jfa-read .est-pricing .est-spec ul.est-ticks { margin: 0 !important; padding: 0 !important; }
html body.jfa-read .est-pricing ul.est-ticks li {
  font-size: 16px !important;
  line-height: 1.5 !important;
  margin-bottom: 4px !important;
}
html body.jfa-read .est-pricing ul.est-ticks li:last-child { margin-bottom: 0 !important; }
html body.jfa-read .est-pricing .est-spec:last-of-type { margin-bottom: 16px !important; }
html body.jfa-read .est-pricing .est-plan-cta { padding: 14px 20px !important; }
html body.jfa-read .est-pricing .est-plan-note { margin-top: 9px !important; }

/* ===== Highlight marks: rounded, and the box fits the letters =====
   The gold mark was a square rectangle whose height came from the inherited
   line box, so it stood well above the capitals and below the baseline. It is
   now a rounded block whose height is driven by the glyphs themselves. */
html body.jfa-read :is(.est-hl, .hiw-hl, .dz-hl, .sks-hl, .pv-hl) {
  display: inline-block;
  box-sizing: border-box;
  line-height: 0.9;
  padding: 0.02em 0.22em 0.17em;
  border-radius: 0.24em;
  vertical-align: baseline;
  -webkit-box-decoration-break: clone;
  box-decoration-break: clone;
}

/* ===== Lede text sits as compact as the heading above it =====
   Every paragraph that introduces a section ran at 1.8 leading, which left a
   loose band between the line pairs and clashed with the tight headings. These
   are set to 1.3; body copy inside cards keeps its own rhythm. */
html body.jfa-read :is(.est-lede, .est-final-head p, .est-section-head p,
  .hiw-lede, .dz-lede, .sks-lede, .sks-sub, .sks-body, .section-subtitle,
  .st-hero p, .est-plan-desc, .est-quiet, .hiw-head p, .pv-head p, .dz-head p) {
  line-height: 1.3 !important;
}

/* The content page pins its own leading with higher specificity. */
html body.jfa-read.content-page #about .section-subtitle { line-height: 1.3 !important; }

/* ===== Highlighted phrases get their own centred line =====
   The heading broke wherever the browser decided to, so a plain word shared the
   line with the gold mark. The mark and its full stop now form one detached,
   centred line, and the plain words keep the line above. */
html body.jfa-read .hl-line {
  display: block;
  text-align: center;
  margin-top: 0.06em;
}
html body.jfa-read .hl-line .est-hl,
html body.jfa-read .hl-line .hiw-hl,
html body.jfa-read .hl-line .dz-hl,
html body.jfa-read .hl-line .sks-hl,
html body.jfa-read .hl-line .pv-hl { margin: 0; }

/* The full stop hangs past the mark so the mark itself is what sits centred. */
html body.jfa-read .hl-line .hl-dot { margin-right: -0.264em; }

/* ===== Content page: less air above each section =====
   Every block on the content page opened with 100px of padding, so a heading
   sat 104px below the band before it. The rhythm is now 56px, which keeps the
   sections distinct without the empty band. */
html body.jfa-read.content-page #services,
html body.jfa-read.content-page #projects,
html body.jfa-read.content-page #process,
html body.jfa-read.content-page #contact,
html body.jfa-read.content-page #stats { padding-top: 56px !important; }
html body.jfa-read.content-page #services,
html body.jfa-read.content-page #projects,
html body.jfa-read.content-page #process,
html body.jfa-read.content-page #contact,
html body.jfa-read.content-page #stats { padding-bottom: 56px !important; }

/* Projects and Process read as one block: the 113px band between the last card
   row and the "Our Process" heading is pulled in to the card edge. */
html body.jfa-read.content-page #projects { padding-bottom: 16px !important; }
html body.jfa-read.content-page #process { padding-top: 16px !important; }

/* ===== Process page pills: bigger type inside the same frame =====
   Both the CTA buttons and the seven phase pills carried small type in a box
   that had room for more. The box height is pinned, the horizontal padding is
   traded for font size, and the text stays on one line so nothing spills. */
html body.jfa-read .hiw-cta-row .hiw-btn {
  box-sizing: border-box;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 50px;
  padding: 0 20px;
  font-size: 17.5px;
  line-height: 1;
  white-space: nowrap;
}
html body.jfa-read .hiw-tabs { gap: 5px; }
html body.jfa-read .hiw-tabs button {
  box-sizing: border-box;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 44px;
  padding: 0 10px;
  font-size: 15px;
  line-height: 1;
  white-space: nowrap;
}
html body.jfa-read .hiw-tabs button .n { margin-right: 6px; }
@media (max-width: 1080px) {
  html body.jfa-read .hiw-tabs button { padding: 0 9px; font-size: 14px; }
}

/* ===== Site-wide: the type inside every frame fills the frame =====
   Each pill, badge, chip and button kept its old height while carrying type
   that only used 30-45% of it. The frame height is pinned to the value it
   already had, the horizontal padding gives way, and every label is kept on a
   single line, so the type grows without the frame moving or the text spilling. */

/* small labels and badges */
html body.jfa-read .proj-tag,
html body.jfa-read .dz-tag,
html body.jfa-read .stamp,
html body.jfa-read .est-tag2,
html body.jfa-read .est-badge,
html body.jfa-read .hiw-chip,
html body.jfa-read .lang-toggle {
  box-sizing: border-box;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
  white-space: nowrap;
}
html body.jfa-read .proj-tag { height: 26px; padding: 0 7px; font-size: 13.5px; }
html body.jfa-read .dz-tag { height: 27px; padding: 0 8px; font-size: 13.5px; }
html body.jfa-read .stamp { height: 25px; padding: 0 7px; font-size: 12.5px; }
html body.jfa-read .est-tag2 { height: 25px; padding: 0 6px; font-size: 14.5px; }
html body.jfa-read .est-badge { height: 27px; padding: 0 9px; font-size: 13px; }
html body.jfa-read .hiw-chip { height: 37px; padding: 0 12px; font-size: 17px; }
html body.jfa-read .lang-toggle { height: 29px; padding: 0 12px; font-size: 14.5px; }

/* section eyebrows */
html body.jfa-read :is(.est-eyebrow, .st-eyebrow, .hiw-eyebrow, .dz-eyebrow) {
  box-sizing: border-box;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 34px;
  padding: 0 12px;
  font-size: 13.5px;
  line-height: 1;
  white-space: nowrap;
}

/* filter pills */
html body.jfa-read .dz-filter,
html body.jfa-read .filter-btn {
  box-sizing: border-box;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
  white-space: nowrap;
}
html body.jfa-read .dz-filter { height: 42px; padding: 0 12px; font-size: 16.5px; }
html body.jfa-read .filter-btn { height: 44px; padding: 0 20px; font-size: 17px; }

/* numbered circles */
html body.jfa-read :is(.hiw-cat-n, .ds-n, .dz-step-n, .sks-n, .est-q-badge) {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
}
html body.jfa-read .hiw-cat-n { font-size: 19px; }
html body.jfa-read .ds-n,
html body.jfa-read .dz-step-n { font-size: 17px; }
html body.jfa-read .sks-n { font-size: 16.5px; }
html body.jfa-read .est-q-badge { font-size: 18px; }
html body.jfa-read .step-number { font-size: 30px; }

/* primary buttons keep their box, gain a step of size */
html body.jfa-read :is(.dz-btn, .sks-btn, .st-btn, .project-enlarge, .hero-rotation) {
  box-sizing: border-box;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
  white-space: nowrap;
}
html body.jfa-read .dz-btn,
html body.jfa-read .sks-btn { min-height: 50px; padding: 12px 20px; font-size: 18px; }
html body.jfa-read .st-btn { min-height: 48px; padding: 12px 20px; font-size: 18px; }
html body.jfa-read .project-enlarge { height: 44px; padding: 0 8px; font-size: 15.5px; }
html body.jfa-read .hero-rotation { height: 44px; padding: 0 8px; font-size: 16px; }
html body.jfa-read .est-plan-cta { font-size: 18px; white-space: nowrap; }

/* Narrow screens: the same frames, one step down in type so nothing spills. */
@media (max-width: 480px) {
  html body.jfa-read .est-plan-cta { font-size: 15.5px; padding-left: 10px; padding-right: 10px; }
  html body.jfa-read .dz-btn,
  html body.jfa-read .sks-btn,
  html body.jfa-read .st-btn { font-size: 16px; padding-left: 12px; padding-right: 12px; }
  html body.jfa-read .hiw-chip { font-size: 15px; padding: 0 9px; }
  html body.jfa-read .filter-btn { font-size: 15px; padding: 0 14px; }
  html body.jfa-read .dz-filter { font-size: 15px; padding: 0 10px; }
}

/* The estimate buttons carry the longest label; on a phone they take a second
   line rather than squeezing the type or spilling out of the button. */
@media (max-width: 430px) {
  html body.jfa-read .est-plan-cta { white-space: normal; height: auto; line-height: 1.25; padding: 12px 12px; }
}

/* ===== Second pass: the frames that page-level rules were still winning =====
   A few components carry their own button rules; these declarations win them
   without changing any height that was already set. */
html body.jfa-read :is(.dz-btn, .sks-btn, .st-btn) { font-size: 18px !important; }
html body.jfa-read :is(.btn.btn-primary, .btn-white-outline) { font-size: 18px !important; }
html body.jfa-read .form-submit { font-size: 18px !important; }
html body.jfa-read .proj-slider-btn { font-size: 18px !important; }
html body.jfa-read .st-btn { min-height: 48px; }
html body.jfa-read .pv-toggle button {
  font-size: 17px !important;
  white-space: nowrap;
  height: 48px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
html body.jfa-read .est-view-list button,
html body.jfa-read .est-view-nav button {
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
html body.jfa-read .est-view-list button { font-size: 17px !important; height: 50px; }
html body.jfa-read .est-view-nav button { font-size: 18px !important; height: 44px; }
html body.jfa-read .sks-c-bar button { font-size: 14.5px !important; height: 30px; }
html body.jfa-read .est-plan-cta { height: 54px; font-size: 18px !important; }
html body.jfa-read #jfa-chat-toggle { font-size: 15.5px !important; }
html body.jfa-read.content-page #about .btn,
html body.jfa-read.content-page #jfa-chat-toggle { font-size: 17px !important; }

/* Home hero buttons keep the height they had before the type grew. */
html body.jfa-read .hero-actions .btn {
  box-sizing: border-box;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 57px;
  padding: 0 26px;
  line-height: 1;
  white-space: nowrap;
}

/* Pin the primary button heights so the type grows inside the original box. */
html body.jfa-read .dz-btn,
html body.jfa-read .sks-btn {
  box-sizing: border-box;
  height: 50px;
  min-height: 50px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
  white-space: nowrap;
}
html body.jfa-read .st-btn {
  box-sizing: border-box;
  height: 48px;
  min-height: 48px;
  line-height: 1;
  white-space: nowrap;
}


/* ------------------------------------------------------------------ *
 * Sketch page CTA pair: both buttons share one width.
 * A shared flex basis keeps them equal on desktop (where they sit in
 * one row) and makes them full width when they wrap on a phone.
 * ------------------------------------------------------------------ */
html body.jfa-read .sks-cta > .sks-btn {
  flex: 1 1 264px;
  max-width: 100%;
  box-sizing: border-box;
}
html body.jfa-read .sks-cta {
  justify-content: center;
  align-items: stretch;
}

/* ===== Navigation: the links sit on the bar's own axis =====
   A language pill used to sit at the right end of the bar, so justify-content:
   space-between parked the links left of it. With the pill gone the same rule
   pushed them onto the right edge and left a ~300px hole in the middle, which
   reads as a layout shift. From tablet width up the bar is a three-column grid
   so the links are centred again.
   Phones keep the original flex layout on purpose: the open menu is positioned
   absolutely against this element, and a grid item would shrink it to its cell. */
@media (min-width: 769px) {
  html body .nav-inner { display: grid; grid-template-columns: 1fr auto 1fr; }
  html body .nav-logo { grid-column: 1; justify-self: start; }
  html body .nav-links { grid-column: 2; justify-self: center; }
  html body .nav-toggle { grid-column: 3; justify-self: end; }
}
