/* Bee My Guest editorial v80: Field Notes hubs and articles, Tools hub and calculators.
   Owner: web-editorial lane (CONTRACT §9). Linked last, after system-v80.ddc518b19c.css. Cookbook: WS/DESIGN.md.

   Field Notes (body.bmg-library-page, body.bmg-note-page) load no legacy stylesheet and no aliases layer:
   this file is their whole page styling on top of the design system. Reading experience: one 640px
   measure for the header and the prose, wide (980px) related notes and call to action, a sticky contents
   rail from 1280px, Inter throughout (Fraunces stays the wordmark only).

   Tools pages keep their calculator stylesheets (assets/tools/*) and aliases-v80.3a3fd80f30.css; they are restyled
   here through the page scope body:has(>header.hero) (only the tools pages carry header.hero). Calculator
   logic, ids and the state classes the scripts toggle (.active, .hidden, .open, .winner, .benchmark-active)
   are untouched. Tokens only, no !important: a legacy !important declaration is left to win. */

/* =====================================================================================================
   Field Notes: shared
   ===================================================================================================== */
.bmg-editorial-v75{background:var(--color-canvas);color:var(--text-primary)}
.bmg-editorial-v75 main{display:block}
.bmg-editorial-v75 main :focus-visible{outline:2px solid var(--focus-ring);outline-offset:3px;border-radius:var(--r-xs)}

/* Small separator dot between inline meta items (no glyph, nothing announced). */
.bmg-note-page :is(.editorial-label+.editorial-label,.editorial-dates>span+span)::before{content:"";display:inline-block;width:.1875rem;height:.1875rem;margin:0 .5rem 0 0;border-radius:50%;background:currentColor;vertical-align:.22em;opacity:.7}

/* =====================================================================================================
   Field Notes: article (notes/*.html, fr/notes/*.html)
   ===================================================================================================== */
.bmg-note-page main.wrap{
  --ed-measure:var(--w-text);
  --ed-wide:var(--w-content);
  --ed-body:1.0625rem;
  --ed-columns:[full-start] minmax(var(--gutter),1fr) [wide-start] minmax(0,calc((var(--ed-wide) - var(--ed-measure)) / 2)) [text-start] min(var(--ed-measure),100% - 2 * var(--gutter)) [text-end] minmax(0,calc((var(--ed-wide) - var(--ed-measure)) / 2)) [wide-end] minmax(var(--gutter),1fr) [full-end];
  display:grid;grid-template-columns:var(--ed-columns);align-content:start;
  max-width:none;margin:0;padding:clamp(1.5rem,1rem + 2.2vw,3.25rem) 0 var(--space-block);
  color:var(--text-body);font-size:var(--fs-body);line-height:var(--lh-body)}
@media (min-width:734px){.bmg-note-page main.wrap{--ed-body:1.125rem}}
/* Zero specificity, so the wide and full-width blocks below place themselves without a fight. */
:where(.bmg-note-page main.wrap)>*{grid-column:text;min-width:0}

/* Breadcrumb */
.bmg-note-page .editorial-breadcrumb{display:flex;align-items:center;gap:.375rem;min-width:0;margin:0 0 var(--space-7);color:var(--text-secondary);font-size:var(--fs-footnote);line-height:1.3;letter-spacing:var(--ls-footnote)}
.bmg-note-page .editorial-breadcrumb a{flex:none;color:var(--text-secondary);text-decoration:none;border-radius:var(--r-xs)}
.bmg-note-page .editorial-breadcrumb [aria-current="page"]{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;color:var(--text-body)}
.bmg-note-page .editorial-breadcrumb>span[aria-hidden]{flex:none;opacity:.6}
@media (hover:hover){.bmg-note-page .editorial-breadcrumb a:hover{color:var(--text-primary);text-decoration:underline;text-underline-offset:.2em}}

/* Header: eyebrow, headline, dek, byline */
.bmg-note-page .editorial-labels{display:flex;flex-wrap:wrap;align-items:center;gap:var(--space-1) .5rem;margin:0 0 var(--space-4);font-size:var(--fs-callout);line-height:1.3}
.bmg-note-page .editorial-label{color:var(--accent-text);font-weight:var(--fw-semibold)}
.bmg-note-page .editorial-label--quiet{color:var(--text-secondary);font-weight:var(--fw-medium)}
.bmg-note-page main.wrap>h1{margin:0;color:var(--text-primary);font-family:var(--font-display);font-size:clamp(2rem,1.45rem + 2.35vw,3.25rem);font-weight:var(--fw-semibold);line-height:1.08;letter-spacing:-.028em;text-wrap:balance}
.bmg-note-page .dek{margin:var(--space-5) 0 0;color:var(--text-body);font-size:var(--fs-lead);line-height:var(--lh-lead);letter-spacing:var(--ls-lead);text-wrap:pretty}
.bmg-note-page .editorial-byline{display:grid;gap:var(--space-1);margin:var(--space-7) 0 0;padding:var(--space-5) 0 0;border-top:1px solid var(--separator)}
.bmg-note-page .editorial-author{margin:0;color:var(--text-body);font-size:var(--fs-callout);line-height:var(--lh-callout)}
.bmg-note-page .editorial-author a{color:var(--text-primary);font-weight:var(--fw-semibold);text-decoration:underline;text-decoration-color:var(--separator-strong);text-underline-offset:.2em}
@media (hover:hover){.bmg-note-page .editorial-author a:hover{text-decoration-color:currentColor}}
.bmg-note-page .editorial-dates{display:flex;flex-wrap:wrap;align-items:center;gap:var(--space-1) .5rem;margin:0;color:var(--text-secondary);font-size:var(--fs-footnote);line-height:1.4}
/* Reading time already leads the eyebrow above the headline: the byline keeps the two dates. */
.bmg-note-page .editorial-dates>span:nth-child(3):last-child{display:none}

/* "In brief" answer box */
.bmg-note-page .answer{margin:var(--space-8) 0 0;padding:var(--space-5) var(--space-6) var(--space-6);border-radius:var(--r-lg);background:var(--color-canvas-alt);color:var(--text-primary);font-size:var(--ed-body);line-height:var(--lh-prose)}
.bmg-note-page .answer .ms{display:block;margin:0 0 var(--space-2);color:var(--accent-text);font-size:var(--fs-footnote);font-weight:var(--fw-semibold);line-height:1.3;letter-spacing:0;text-transform:none}
.bmg-note-page .answer p{margin:0}

/* Editorial note + "Sources, method and corrections" disclosure, read as one card */
.bmg-note-page .bmg-reading-note{display:grid;grid-template-columns:auto minmax(0,1fr);gap:var(--space-3);margin:var(--space-6) 0 0;padding:var(--space-4) var(--space-5);border-radius:var(--r-md) var(--r-md) 0 0;background:var(--color-surface);box-shadow:inset 0 0 0 1px var(--separator);color:var(--text-body);font-size:var(--fs-footnote);line-height:var(--lh-footnote)}
.bmg-note-page .bmg-reading-note::before{content:"";width:1.125rem;height:1.125rem;margin-top:.05em;background:var(--text-secondary);-webkit-mask:var(--icon-info) center/contain no-repeat;mask:var(--icon-info) center/contain no-repeat}
.bmg-note-page .bmg-reading-note p{margin:0}
.bmg-note-page .bmg-reading-note strong{color:var(--text-primary)}
.bmg-note-page .bmg-method-note{margin:-1px 0 0;border-radius:0 0 var(--r-md) var(--r-md);background:var(--color-surface);box-shadow:inset 0 0 0 1px var(--separator);font-size:var(--fs-footnote);line-height:var(--lh-footnote)}
.bmg-note-page .bmg-method-note>summary{display:flex;align-items:center;justify-content:space-between;gap:var(--space-3);min-height:var(--tap-min);padding:0 var(--space-5);border-radius:0 0 var(--r-md) var(--r-md);color:var(--text-primary);font-weight:var(--fw-semibold);list-style:none;cursor:pointer}
.bmg-note-page .bmg-method-note>summary::-webkit-details-marker{display:none}
.bmg-note-page .bmg-method-note>summary::after{content:"";flex:none;width:.75rem;height:.75rem;background:var(--text-secondary);-webkit-mask:var(--icon-chevron) center/contain no-repeat;mask:var(--icon-chevron) center/contain no-repeat;transform:rotate(90deg);transition:transform var(--dur-2) var(--ease-standard)}
.bmg-note-page .bmg-method-note[open]>summary::after{transform:rotate(-90deg)}
.bmg-note-page .bmg-method-note>summary:focus-visible{outline-offset:-2px}
.bmg-note-page .bmg-method-note p{margin:0;padding:0 var(--space-5) var(--space-4);color:var(--text-body)}
.bmg-note-page .bmg-method-note a{color:var(--text-link);font-weight:var(--fw-medium)}

/* Contents + article: same column template as main, so the prose stays on the 640px measure */
.bmg-note-page .editorial-content-grid{grid-column:full;display:grid;grid-template-columns:var(--ed-columns);margin:var(--space-9) 0 0}
:where(.bmg-note-page .editorial-content-grid)>*{grid-column:text;min-width:0}
.bmg-note-page .editorial-toc{margin:0 0 var(--space-9);padding:var(--space-5) var(--space-5) var(--space-3);border-radius:var(--r-lg);background:var(--color-canvas-alt)}
.bmg-note-page .editorial-toc[hidden]{display:none}
.bmg-note-page .editorial-toc-title{margin:0 0 var(--space-2);color:var(--text-primary);font-size:var(--fs-footnote);font-weight:var(--fw-semibold);line-height:1.3}
.bmg-note-page .editorial-toc ol{display:grid;margin:0;padding:0;list-style:none}
.bmg-note-page .editorial-toc li{margin:0;border-top:1px solid var(--separator)}
.bmg-note-page .editorial-toc li:first-child{border-top:0}
.bmg-note-page .editorial-toc a{display:block;padding:.5625rem 0;color:var(--text-body);font-size:var(--fs-callout);line-height:1.35;text-decoration:none;text-wrap:pretty}
.bmg-note-page .editorial-toc li.toc-sub a{padding-left:var(--space-4);color:var(--text-secondary);font-size:var(--fs-footnote)}
@media (hover:hover){.bmg-note-page .editorial-toc a:hover{color:var(--text-primary);text-decoration:underline;text-underline-offset:.2em}}
@media (min-width:1280px){
  .bmg-note-page .editorial-toc{grid-column:text-end / full-end;grid-row:1;justify-self:start;align-self:start;position:sticky;top:calc(var(--nav-h) + var(--space-7));width:min(15rem,100% - var(--space-10) - var(--gutter));max-height:calc(100vh - var(--nav-h) - var(--space-10));margin:0 0 0 var(--space-10);padding:0 0 0 var(--space-4);overflow-y:auto;overscroll-behavior:contain;border-left:1px solid var(--separator);border-radius:0;background:none}
  .bmg-note-page .editorial-toc li{border-top:0}
  .bmg-note-page .editorial-toc a{padding:.3125rem 0;color:var(--text-secondary);font-size:var(--fs-footnote)}
  .bmg-note-page .editorial-toc li.toc-sub a{padding-left:var(--space-3)}
  .bmg-note-page .editorial-content-grid>article{grid-row:1}
}

/* Prose */
.bmg-note-page article{color:var(--text-body);font-size:var(--ed-body);line-height:var(--lh-prose);letter-spacing:-.011em}
.bmg-note-page article>:first-child{margin-top:0}
.bmg-note-page article>:last-child{margin-bottom:0}
.bmg-note-page article p{margin:0 0 1.1em;text-wrap:pretty}
.bmg-note-page article :is(h2,h3){color:var(--text-primary);font-family:var(--font-display);font-weight:var(--fw-semibold);text-wrap:balance;scroll-margin-top:calc(var(--nav-h) + var(--space-6))}
.bmg-note-page article h2{margin:2.1em 0 .55em;font-size:var(--fs-title-2);line-height:var(--lh-title-2);letter-spacing:var(--ls-title-2)}
.bmg-note-page article h3{margin:1.8em 0 .45em;font-size:var(--fs-title-3);line-height:var(--lh-title-3);letter-spacing:var(--ls-title-3)}
.bmg-note-page article h2+h3{margin-top:.9em}
.bmg-note-page article strong{color:var(--text-primary);font-weight:var(--fw-semibold)}
.bmg-note-page article em{font-style:italic}
.bmg-note-page article a{color:var(--text-link);text-decoration:underline;text-decoration-color:color-mix(in srgb,currentColor 38%,transparent);text-decoration-thickness:.07em;text-underline-offset:.2em;overflow-wrap:anywhere}
@media (hover:hover){.bmg-note-page article a:hover{color:var(--text-link-hover);text-decoration-color:currentColor}}
.bmg-note-page article :is(ul,ol){margin:0 0 1.1em;padding-left:1.375em}
.bmg-note-page article li{margin:0 0 .45em;padding-left:.25em}
.bmg-note-page article li>:is(ul,ol){margin:.45em 0 0}
.bmg-note-page article ul>li::marker{color:var(--color-accent)}
.bmg-note-page article ol>li::marker{color:var(--text-secondary);font-weight:var(--fw-semibold);font-variant-numeric:tabular-nums}

/* Pull quote: Inter, never Fraunces; honey is the rule, not the text */
.bmg-note-page article blockquote{margin:var(--space-8) 0;padding:.125em 0 .125em var(--space-6);border-left:3px solid var(--color-accent);color:var(--text-primary);font-size:clamp(1.1875rem,1.1rem + .4vw,1.4375rem);font-weight:var(--fw-medium);line-height:1.45;letter-spacing:-.017em;text-wrap:pretty}
.bmg-note-page article blockquote p{margin:0 0 .6em}
.bmg-note-page article blockquote>:last-child{margin-bottom:0}
.bmg-note-page article>blockquote:first-child{margin-bottom:var(--space-9)}

/* Code and diagrams */
.bmg-note-page article code{padding:.1em .35em;border-radius:var(--r-xs);background:var(--fill-secondary);color:var(--text-primary);font-family:var(--font-mono);font-size:.86em;letter-spacing:0}
.bmg-note-page article pre{margin:var(--space-7) 0;padding:var(--space-5) var(--space-6);overflow-x:auto;border-radius:var(--r-lg);background:var(--color-canvas-alt);color:var(--text-primary);font-family:var(--font-mono);font-size:.8125rem;line-height:1.6;letter-spacing:0;tab-size:2;white-space:pre}
.bmg-note-page article pre code{padding:0;border-radius:0;background:none;font-size:inherit}

/* Tables: rounded hairline frame, scrolls sideways on phones */
.bmg-note-page .table-scroll{margin:var(--space-7) 0;overflow-x:auto;overscroll-behavior-x:contain;border:1px solid var(--separator);border-radius:var(--r-lg);background:var(--color-surface)}
.bmg-note-page article table{width:100%;min-width:34rem;margin:0;border-collapse:collapse;color:var(--text-body);font-size:var(--fs-callout);line-height:var(--lh-callout);letter-spacing:var(--ls-callout);font-variant-numeric:tabular-nums}
.bmg-note-page article :is(th,td){padding:.8125rem 1rem;border-bottom:1px solid var(--separator);text-align:left;vertical-align:top}
.bmg-note-page article thead th{background:var(--color-canvas-alt);color:var(--text-primary);font-size:var(--fs-footnote);font-weight:var(--fw-semibold);line-height:1.3}
.bmg-note-page article tbody tr:last-child>*{border-bottom:0}
.bmg-note-page article caption{caption-side:bottom;padding:var(--space-3) 1rem;color:var(--text-secondary);font-size:var(--fs-footnote);text-align:left}

/* Figures (none in the v76 notes yet; ready for photography) */
.bmg-note-page article figure{margin:var(--space-8) 0}
.bmg-note-page article figure img{display:block;width:100%;height:auto;border-radius:var(--r-lg);background:var(--color-canvas-alt)}
.bmg-note-page article figcaption{margin-top:var(--space-3);color:var(--text-secondary);font-size:var(--fs-footnote);line-height:var(--lh-footnote)}
.bmg-note-page article hr{height:1px;margin:var(--space-9) 0;border:0;background:var(--separator)}

/* Key figures */
.bmg-note-page .stats{display:grid;grid-template-columns:repeat(auto-fit,minmax(min(100%,10rem),1fr));gap:var(--space-6) var(--space-5);margin:0 0 var(--space-9)}
.bmg-note-page .stats:has(>.stat:nth-child(4)){grid-template-columns:repeat(2,minmax(0,1fr))}
.bmg-note-page .stat{display:grid;align-content:start;gap:var(--space-2);padding-top:var(--space-4);border-top:1px solid var(--separator-strong)}
.bmg-note-page .stat b{color:var(--text-primary);font-family:var(--font-display);font-size:var(--fs-title-1);font-weight:var(--fw-semibold);line-height:1.05;letter-spacing:-.026em;font-variant-numeric:tabular-nums lining-nums}
.bmg-note-page .stat span{color:var(--text-secondary);font-size:var(--fs-footnote);line-height:var(--lh-footnote);letter-spacing:var(--ls-footnote)}

/* Official source register */
.bmg-note-page .source-register{margin:var(--space-9) 0 0;padding:var(--space-6);border-radius:var(--r-lg);background:var(--color-canvas-alt);font-size:var(--fs-callout);line-height:var(--lh-callout)}
.bmg-note-page article .source-register h2{margin:0 0 var(--space-2);font-size:var(--fs-title-3);line-height:var(--lh-title-3);letter-spacing:var(--ls-title-3)}
.bmg-note-page .source-register p{margin:0 0 var(--space-4);color:var(--text-secondary);font-size:var(--fs-footnote);line-height:var(--lh-footnote)}
.bmg-note-page .source-register ul{margin:0}
.bmg-note-page .source-register li{margin-bottom:var(--space-2)}

/* Related notes: light tiles on the wide column */
.bmg-note-page .editorial-related{grid-column:wide;margin:var(--space-section) 0 0;padding:var(--space-9) 0 0;border-top:1px solid var(--separator)}
.bmg-note-page .editorial-section-label{margin:0 0 var(--space-2);color:var(--accent-text);font-size:var(--fs-eyebrow);font-weight:var(--fw-semibold);line-height:1.3;letter-spacing:-.01em}
.bmg-note-page .editorial-related h2{margin:0 0 var(--space-7);color:var(--text-primary);font-size:var(--fs-title-1);line-height:var(--lh-title-1);letter-spacing:var(--ls-title-1)}
.bmg-note-page .editorial-related-grid{display:grid;grid-template-columns:minmax(0,1fr);gap:var(--grid-gap)}
@media (min-width:734px){.bmg-note-page .editorial-related-grid{grid-template-columns:repeat(3,minmax(0,1fr))}}
.bmg-note-page .editorial-related-card{display:flex;flex-direction:column;gap:var(--space-3);min-height:12rem;padding:var(--space-6);border-radius:var(--r-tile);background:var(--color-canvas-alt);color:var(--text-primary);text-decoration:none;transition:background-color var(--dur-2) var(--ease-standard),box-shadow var(--dur-2) var(--ease-standard),transform var(--dur-2) var(--ease-standard)}
.bmg-note-page .editorial-related-card span{color:var(--text-secondary);font-size:var(--fs-footnote);font-weight:var(--fw-semibold);line-height:1.3}
.bmg-note-page .editorial-related-card strong{font-family:var(--font-display);font-size:var(--fs-title-3);font-weight:var(--fw-semibold);line-height:1.25;letter-spacing:var(--ls-title-3);text-wrap:balance}
.bmg-note-page .editorial-related-card::after{content:"";flex:none;align-self:flex-end;width:1.125rem;height:1.125rem;margin-top:auto;background:var(--text-secondary);-webkit-mask:var(--icon-arrow-right) center/contain no-repeat;mask:var(--icon-arrow-right) center/contain no-repeat;transition:transform var(--dur-2) var(--ease-standard)}
.bmg-note-page .editorial-related-card:focus-visible{outline:2px solid var(--focus-ring);outline-offset:3px;border-radius:var(--r-tile)}
@media (hover:hover){
  .bmg-note-page .editorial-related-card:hover{background:var(--color-surface);box-shadow:var(--elevation-2)}
  .bmg-note-page .editorial-related-card:hover::after{background:var(--text-primary)}
}
@media (hover:hover) and (prefers-reduced-motion:no-preference){
  .bmg-note-page .editorial-related-card:hover{transform:translateY(-2px)}
  .bmg-note-page .editorial-related-card:hover::after{transform:translateX(3px)}
}

/* Call to action: the page's one dark tile */
.bmg-note-page .editorial-cta{grid-column:wide;display:grid;gap:var(--space-7);margin:var(--space-block) 0 0;padding:var(--tile-pad);border-radius:var(--r-tile);background:var(--c-charcoal);color:var(--c-linen)}
@media (min-width:734px){.bmg-note-page .editorial-cta{grid-template-columns:minmax(0,1fr) auto;align-items:end;column-gap:var(--space-10)}}
.bmg-note-page .editorial-cta h2{margin:0 0 var(--space-3);color:var(--c-linen);font-size:var(--fs-title-1);line-height:var(--lh-title-1);letter-spacing:var(--ls-title-1)}
.bmg-note-page .editorial-cta p{max-width:34rem;margin:0;color:var(--c-sand);font-size:var(--fs-body);line-height:var(--lh-body)}
.bmg-note-page .editorial-cta-actions{display:flex;flex-direction:column;align-items:flex-start;gap:var(--space-2)}
.bmg-note-page .editorial-cta-actions a{display:inline-flex;align-items:center;gap:.25em;min-height:var(--tap-min);font-size:1rem;font-weight:var(--fw-medium);line-height:1.25;letter-spacing:-.011em;text-decoration:none}
.bmg-note-page .editorial-cta-actions a:first-child{justify-content:center;min-height:var(--btn-h);padding:.75rem 1.375rem;border-radius:var(--r-button);background:var(--c-linen);color:var(--c-charcoal);transition:background-color var(--dur-2) var(--ease-standard)}
.bmg-note-page .editorial-cta-actions a:not(:first-child){color:var(--c-honey-bright)}
.bmg-note-page .editorial-cta-actions a:not(:first-child)::after{content:"";flex:none;width:.72em;height:.72em;background:currentColor;-webkit-mask:var(--icon-chevron) center/contain no-repeat;mask:var(--icon-chevron) center/contain no-repeat}
.bmg-note-page .editorial-cta-actions a:focus-visible{outline:2px solid var(--c-honey-bright);outline-offset:3px;border-radius:var(--r-button)}
@media (hover:hover){
  .bmg-note-page .editorial-cta-actions a:first-child:hover{background:var(--c-paper)}
  .bmg-note-page .editorial-cta-actions a:not(:first-child):hover{text-decoration:underline;text-underline-offset:.2em}
}
.bmg-note-page .editorial-boundary{grid-column:wide;margin:var(--space-5) 0 0;color:var(--text-secondary);font-size:var(--fs-footnote);line-height:var(--lh-footnote)}
.bmg-note-page .editorial-boundary a{color:var(--text-link);font-weight:var(--fw-medium)}

/* =====================================================================================================
   Field Notes: library hub (notes/index.html, fr/notes/index.html)
   ===================================================================================================== */
.bmg-library-page main{overflow:clip}

/* Hero */
.bmg-library-page .library-hero{padding:clamp(2.5rem,1.6rem + 3.8vw,5rem) 0 var(--space-block)}
.bmg-library-page .library-hero-inner{display:grid;gap:var(--space-8);width:min(var(--w-wide),100% - 2 * var(--gutter));margin-inline:auto}
@media (min-width:1068px){.bmg-library-page .library-hero-inner{grid-template-columns:minmax(0,1.7fr) minmax(17rem,.8fr);align-items:end;column-gap:var(--space-11)}}
.bmg-library-page .library-kicker{display:block;margin:0 0 var(--space-3);color:var(--accent-text);font-size:var(--fs-eyebrow);font-weight:var(--fw-semibold);line-height:1.3;letter-spacing:-.01em}
.bmg-library-page .library-hero h1{max-width:14ch;margin:0;color:var(--text-primary);font-family:var(--font-display);font-size:clamp(2.5rem,1.55rem + 4vw,4.75rem);font-weight:var(--fw-semibold);line-height:1.03;letter-spacing:-.034em;text-wrap:balance}
.bmg-library-page .library-hero-copy p{max-width:36rem;margin:var(--space-5) 0 0;color:var(--text-body);font-size:var(--fs-lead);line-height:var(--lh-lead);letter-spacing:var(--ls-lead);text-wrap:pretty}
.bmg-library-page .library-boundary{max-width:36rem;margin:var(--space-5) 0 0;color:var(--text-secondary);font-size:var(--fs-footnote);line-height:var(--lh-footnote)}
.bmg-library-page .library-boundary a{color:var(--text-link);font-weight:var(--fw-medium)}
.bmg-library-page .library-standard{padding:var(--space-6);border-radius:var(--r-tile);background:var(--color-canvas-alt)}
.bmg-library-page .library-standard-label{margin:0 0 var(--space-4);color:var(--text-primary);font-size:var(--fs-callout);font-weight:var(--fw-semibold);line-height:1.3}
.bmg-library-page .library-standard ul{display:grid;gap:var(--space-3);margin:0;padding:0;list-style:none}
.bmg-library-page .library-standard li{display:grid;grid-template-columns:1.125rem minmax(0,1fr);gap:var(--space-3);color:var(--text-body);font-size:var(--fs-callout);line-height:var(--lh-callout)}
.bmg-library-page .library-standard li::before{content:"";width:1.125rem;height:1.125rem;margin-top:.1em;background:var(--accent-text);-webkit-mask:var(--icon-check-circle) center/contain no-repeat;mask:var(--icon-check-circle) center/contain no-repeat}

/* Library: bone band with paper tiles */
.bmg-library-page .library-shell{padding:var(--space-block) max(var(--gutter),(100% - var(--w-wide)) / 2) var(--space-section);background:var(--color-canvas-alt)}
.bmg-library-page .library-toolbar{display:flex;flex-wrap:wrap;align-items:flex-end;justify-content:space-between;gap:var(--space-5) var(--space-8);margin:0 0 var(--space-4)}
.bmg-library-page .library-toolbar h2{margin:0;color:var(--text-primary);font-size:var(--fs-title-1);line-height:var(--lh-title-1);letter-spacing:var(--ls-title-1)}
.bmg-library-page .cluster-filters{display:flex;gap:2px;max-width:100%;padding:3px;overflow-x:auto;overscroll-behavior-x:contain;scrollbar-width:none;border-radius:calc(var(--r-control) + 3px);background:var(--fill-secondary)}
.bmg-library-page .cluster-filters::-webkit-scrollbar{display:none}
.bmg-library-page .cluster-filter{flex:none;min-height:2.375rem;margin:0;padding:0 1rem;border:0;border-radius:var(--r-control);background:transparent;color:var(--text-body);font-family:var(--font-text);font-size:var(--fs-footnote);font-weight:var(--fw-semibold);line-height:1.2;letter-spacing:-.003em;white-space:nowrap;cursor:pointer;transition:background-color var(--dur-2) var(--ease-standard),color var(--dur-2) var(--ease-standard),box-shadow var(--dur-2) var(--ease-standard)}
.bmg-library-page .cluster-filter[aria-pressed="true"]{background:var(--color-surface);color:var(--text-primary);box-shadow:var(--elevation-2)}
.bmg-library-page .cluster-filter:focus-visible{outline:2px solid var(--focus-ring);outline-offset:-2px}
@media (hover:hover){.bmg-library-page .cluster-filter:hover{color:var(--text-primary)}}
@media (pointer:coarse){.bmg-library-page .cluster-filter{min-height:var(--tap-min)}}
.bmg-library-page .library-count{margin:0 0 var(--space-6);color:var(--text-secondary);font-size:var(--fs-footnote);line-height:1.3}

/* Tiles: image, category and reading time, title, summary. The first visible tile is the lead story. */
.bmg-library-page .library-grid{display:grid;grid-template-columns:minmax(0,1fr);gap:var(--grid-gap)}
@media (min-width:734px){.bmg-library-page .library-grid{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media (min-width:1068px){.bmg-library-page .library-grid{grid-template-columns:repeat(3,minmax(0,1fr))}}
.bmg-library-page .library-card{display:flex;flex-direction:column;min-width:0;overflow:hidden;border-radius:var(--r-tile);background:var(--color-surface);color:var(--text-primary);box-shadow:var(--elevation-1);text-decoration:none;transition:box-shadow var(--dur-3) var(--ease-standard),transform var(--dur-3) var(--ease-standard)}
.bmg-library-page .library-card[hidden]{display:none}
.bmg-library-page .library-card:focus-visible{outline:2px solid var(--focus-ring);outline-offset:4px;border-radius:var(--r-tile)}
.bmg-library-page .library-card-media{position:relative;margin:0;aspect-ratio:16 / 10;overflow:hidden;background:var(--fill-tertiary)}
.bmg-library-page .library-card-media img{display:block;width:100%;height:100%;object-fit:cover;transition:transform var(--dur-4) var(--ease-out)}
.bmg-library-page .library-card-body{display:flex;flex:1;flex-direction:column;gap:var(--space-2);padding:var(--space-5) var(--space-6) var(--space-6)}
.bmg-library-page .library-card-meta{display:flex;flex-wrap:wrap;justify-content:space-between;gap:var(--space-1) var(--space-3);margin:0 0 var(--space-1);font-size:var(--fs-footnote);line-height:1.3}
.bmg-library-page .library-card-meta span:first-child{color:var(--accent-text);font-weight:var(--fw-semibold)}
.bmg-library-page .library-card-meta span:last-child{color:var(--text-secondary)}
.bmg-library-page .library-card h3{margin:0;color:var(--text-primary);font-family:var(--font-display);font-size:var(--fs-title-3);font-weight:var(--fw-semibold);line-height:1.25;letter-spacing:var(--ls-title-3);text-wrap:balance}
.bmg-library-page .library-card p{display:-webkit-box;margin:0;overflow:hidden;color:var(--text-body);font-size:var(--fs-callout);line-height:var(--lh-callout);-webkit-box-orient:vertical;-webkit-line-clamp:3;line-clamp:3}
/* The whole tile is the link: the "Read the note" line repeats it (and carries a glyph arrow). */
.bmg-library-page .library-card-arrow{display:none}
@media (hover:hover){
  .bmg-library-page .library-card:hover{box-shadow:var(--elevation-3)}
  .bmg-library-page .library-card:hover h3{text-decoration:underline;text-decoration-thickness:.06em;text-underline-offset:.16em}
}
@media (hover:hover) and (prefers-reduced-motion:no-preference){
  .bmg-library-page .library-card:hover{transform:translateY(-3px)}
  .bmg-library-page .library-card:hover .library-card-media img{transform:scale(1.03)}
}
/* Lead story: the first tile that the cluster filter leaves visible. */
.bmg-library-page .library-card:not([hidden]):not(.library-card:not([hidden])~.library-card) h3{font-size:var(--fs-title-2);line-height:var(--lh-title-2);letter-spacing:var(--ls-title-2)}
@media (min-width:734px){
  .bmg-library-page .library-card:not([hidden]):not(.library-card:not([hidden])~.library-card){grid-column:1 / -1}
}
@media (min-width:1068px){
  .bmg-library-page .library-card:not([hidden]):not(.library-card:not([hidden])~.library-card){flex-direction:row;min-height:25rem}
  .bmg-library-page .library-card:not([hidden]):not(.library-card:not([hidden])~.library-card) .library-card-media{flex:0 0 60%;aspect-ratio:auto}
  .bmg-library-page .library-card:not([hidden]):not(.library-card:not([hidden])~.library-card) .library-card-body{justify-content:center;gap:var(--space-3);padding:var(--tile-pad)}
  .bmg-library-page .library-card:not([hidden]):not(.library-card:not([hidden])~.library-card) h3{font-size:var(--fs-title-1);line-height:var(--lh-title-1);letter-spacing:var(--ls-title-1)}
  .bmg-library-page .library-card:not([hidden]):not(.library-card:not([hidden])~.library-card) p{font-size:var(--fs-body);line-height:var(--lh-body);-webkit-line-clamp:5;line-clamp:5}
}

/* Library call to action: the page's one dark tile */
.bmg-library-page .library-cta{display:grid;gap:var(--space-6);margin:var(--space-block) 0 0;padding:var(--tile-pad);border-radius:var(--r-tile);background:var(--c-charcoal);color:var(--c-linen)}
@media (min-width:734px){.bmg-library-page .library-cta{grid-template-columns:minmax(0,1fr) auto;align-items:end;column-gap:var(--space-10)}}
.bmg-library-page .library-cta h2{max-width:22ch;margin:0 0 var(--space-3);color:var(--c-linen);font-size:var(--fs-title-1);line-height:var(--lh-title-1);letter-spacing:var(--ls-title-1);text-wrap:balance}
.bmg-library-page .library-cta p{max-width:34rem;margin:0;color:var(--c-sand);font-size:var(--fs-body);line-height:var(--lh-body)}
.bmg-library-page .library-cta a{display:inline-flex;align-items:center;justify-content:center;justify-self:start;min-height:var(--btn-h);padding:.75rem 1.375rem;border-radius:var(--r-button);background:var(--c-linen);color:var(--c-charcoal);font-size:1rem;font-weight:var(--fw-medium);line-height:1.25;letter-spacing:-.011em;text-align:center;text-decoration:none;transition:background-color var(--dur-2) var(--ease-standard)}
.bmg-library-page .library-cta a:focus-visible{outline:2px solid var(--c-honey-bright);outline-offset:3px;border-radius:var(--r-button)}
@media (hover:hover){.bmg-library-page .library-cta a:hover{background:var(--c-paper)}}

/* =====================================================================================================
   Tools: shared (tools/, fr/outils/; hub, tax and company cash calculator, rental strategy comparator)
   Scope: body:has(>header.hero). Legacy tool CSS is unlayered too; these selectors are deliberately one
   step more specific than the tool rules they replace.
   ===================================================================================================== */
body:has(>header.hero){--tl-pad:clamp(1.25rem,.85rem + 1.7vw,2.25rem);background:var(--color-canvas);color:var(--text-primary);font-family:var(--font-text);font-size:var(--fs-body);line-height:var(--lh-body);letter-spacing:var(--ls-body)}
body:has(>header.hero) main :is(h1,h2,h3,h4){font-family:var(--font-display);font-style:normal;font-weight:var(--fw-semibold);text-wrap:balance}
/* Headings the tool stylesheets set in a light display weight */
body:has(>header.hero) :is(.hero h1,.suite-intro h2,.suite-card h2,.tool-head h2,.panel-head h2,.step-title h3,.currency-copy h3,.guided-mode h3,.asset-profile-copy h3,.break-even h3,.compare-bars h3,.sensitivity h2,.explainer h2,.explainer h3,.faq h2,.faq h3,.sources h2,.cta-panel h3,.result-header h3,.full-result h4){font-family:var(--font-display);font-style:normal;font-weight:var(--fw-semibold)}
body:has(>header.hero) main :focus-visible{outline:2px solid var(--focus-ring);outline-offset:3px}
/* The table caption the accessibility script adds is for screen readers only. */
body:has(>header.hero) caption.sr-only{position:absolute;width:1px;height:1px;margin:-1px;padding:0;overflow:hidden;clip-path:inset(50%);white-space:nowrap;border:0}
/* Lower-case labels in the tool copy read in sentence case. */
body:has(>header.hero) :is(.hero .kicker,.hero-meta>span,.explainer>.kicker,.sensitivity>.kicker,.currency-copy .kicker,.guided-mode .kicker,.asset-profile-copy .kicker,.adr-suggestion .ms,.faq>.step,.sources>.step,.suite-card .num)::first-letter{text-transform:uppercase}

/* Header band: centred, Apple product-page head */
body:has(>header.hero) header.hero{margin:0;padding:clamp(2.25rem,1.5rem + 3.2vw,4.5rem) var(--gutter) var(--space-block);border:0;background:var(--color-canvas);color:var(--text-primary);text-align:center}
body:has(>header.hero) .hero-inner{max-width:var(--w-content);margin:0 auto}
body:has(>header.hero) .hero-inner>a.ms{display:inline-flex;align-items:center;min-height:var(--tap-min);font-family:var(--font-text);font-size:var(--fs-footnote);font-weight:var(--fw-medium);letter-spacing:var(--ls-footnote);text-transform:none}
body:has(>header.hero) .hero .kicker{display:block;margin:var(--space-4) 0 var(--space-3);color:var(--accent-text);font-family:var(--font-text);font-size:var(--fs-eyebrow);font-weight:var(--fw-semibold);line-height:1.3;letter-spacing:-.01em;text-transform:none}
body:has(>header.hero) .hero h1{max-width:18ch;margin:0 auto;color:var(--text-primary);font-family:var(--font-display);font-size:clamp(2.375rem,1.55rem + 3.6vw,4.5rem);font-style:normal;font-weight:var(--fw-semibold);line-height:1.04;letter-spacing:-.032em;text-wrap:balance}
body:has(>header.hero) .hero .dek{max-width:40rem;margin:var(--space-5) auto 0;color:var(--text-body);font-size:var(--fs-lead);line-height:var(--lh-lead);letter-spacing:var(--ls-lead);text-wrap:pretty}
body:has(>header.hero) .hero-meta{display:flex;flex-wrap:wrap;justify-content:center;gap:var(--space-2);margin:var(--space-6) 0 0;color:var(--text-body);font-family:var(--font-text);font-size:var(--fs-caption);letter-spacing:0;text-transform:none}
body:has(>header.hero) .hero-meta>span{display:inline-block;padding:.375rem .75rem;border:1px solid var(--separator-strong);border-radius:var(--r-badge);font-weight:var(--fw-medium);line-height:1.25}
body:has(>header.hero) .hero .gate-badge{display:inline-flex;align-items:center;gap:.5rem;max-width:100%;margin:var(--space-3) auto 0;padding:.4375rem .875rem;border:0;border-radius:var(--r-control);background:var(--accent-tint);color:var(--accent-text);font-size:var(--fs-caption);font-weight:var(--fw-medium);line-height:1.35;text-align:left}
body:has(>header.hero) .hero .gate-badge i{flex:none;width:.4375rem;height:.4375rem;border-radius:50%;background:var(--accent-text)}
body:has(>header.hero) .hero .scope-note{max-width:38rem;margin:var(--space-5) auto 0;padding:var(--space-3) var(--space-4);border:0;border-radius:var(--r-md);background:var(--status-warning-tint);color:var(--status-warning-text);font-size:var(--fs-footnote);line-height:var(--lh-footnote);text-align:left}
/* Tool switcher: two pills (the current tool filled) and a text link to the hub */
body:has(>header.hero) .hero .tool-switcher{display:flex;flex-wrap:wrap;align-items:center;justify-content:center;gap:var(--space-2);margin:var(--space-7) 0 0}
body:has(>header.hero) .hero .tool-switcher a{display:inline-flex;align-items:center;justify-content:center;width:auto;min-height:var(--tap-min);padding:0 1.125rem;border:0;border-radius:var(--r-control);background:var(--fill-secondary);color:var(--text-primary);font-family:var(--font-text);font-size:var(--fs-callout);font-weight:var(--fw-medium);line-height:1.2;letter-spacing:-.006em;text-decoration:none;text-transform:none;transition:background-color var(--dur-2) var(--ease-standard)}
body:has(>header.hero) .hero .tool-switcher a.active{background:var(--color-ink);color:var(--color-on-ink)}
body:has(>header.hero) .hero .tool-switcher a.quiet{gap:.2em;padding:0 .5rem;background:none;color:var(--text-link)}
body:has(>header.hero) .hero .tool-switcher a.quiet::after{content:"";flex:none;width:.72em;height:.72em;background:currentColor;-webkit-mask:var(--icon-chevron) center/contain no-repeat;mask:var(--icon-chevron) center/contain no-repeat}
body:has(>header.hero) .hero .tool-switcher a:focus-visible{outline:2px solid var(--focus-ring);outline-offset:2px;border-radius:var(--r-control)}
@media (hover:hover){
  body:has(>header.hero) .hero-inner>a.ms:hover{text-decoration:underline;text-underline-offset:.2em}
  body:has(>header.hero) .hero .tool-switcher a:not(.active,.quiet):hover{background:var(--fill-primary)}
  body:has(>header.hero) .hero .tool-switcher a.active:hover{background:var(--color-ink-hover)}
  body:has(>header.hero) .hero .tool-switcher a.quiet:hover{text-decoration:underline;text-underline-offset:.2em}
}

/* Reading sections below the tools: one bone band, 640px measure, body-size copy */
body:has(>header.hero) .explainer{max-width:none;margin:0;padding:var(--space-section) max(var(--gutter),(100% - var(--w-text)) / 2);background:var(--color-canvas-alt);color:var(--text-body)}
body:has(>header.hero) :is(.explainer,.sensitivity)>.kicker{display:block;margin:0 0 var(--space-3);color:var(--accent-text);font-family:var(--font-text);font-size:var(--fs-eyebrow);font-weight:var(--fw-semibold);line-height:1.3;letter-spacing:-.01em;text-transform:none}
body:has(>header.hero) .explainer>h2{max-width:none;margin:0 0 var(--space-5);color:var(--text-primary);font-size:var(--fs-title-1);line-height:var(--lh-title-1);letter-spacing:var(--ls-title-1)}
body:has(>header.hero) .explainer h3{margin:var(--space-8) 0 var(--space-2);color:var(--text-primary);font-size:var(--fs-title-3);line-height:var(--lh-title-3);letter-spacing:var(--ls-title-3)}
body:has(>header.hero) .explainer :is(p,li){color:var(--text-body);font-size:var(--fs-body);line-height:var(--lh-prose)}
body:has(>header.hero) .explainer>p{margin:0 0 var(--space-4)}
body:has(>header.hero) .explainer a{color:var(--text-link);font-weight:var(--fw-medium);text-decoration:underline;text-decoration-color:color-mix(in srgb,currentColor 38%,transparent);text-underline-offset:.2em}
body:has(>header.hero) .profile-grid{display:grid;grid-template-columns:minmax(0,1fr);gap:var(--grid-gap);margin:var(--space-7) 0 0}
@media (min-width:734px){body:has(>header.hero) .profile-grid{grid-template-columns:repeat(2,minmax(0,1fr))}}
body:has(>header.hero) .profile{padding:var(--space-6);border:0;border-radius:var(--r-lg);background:var(--color-surface)}
body:has(>header.hero) .explainer .profile h3{margin:0 0 var(--space-4)}
body:has(>header.hero) .profile ul{display:grid;gap:var(--space-2);margin:0;padding:0;list-style:none}
body:has(>header.hero) .explainer .profile li{display:grid;grid-template-columns:1.125rem minmax(0,1fr);gap:var(--space-3);margin:0;font-size:var(--fs-callout);line-height:var(--lh-callout)}
body:has(>header.hero) .profile li::before{content:"";width:1.125rem;height:1.125rem;margin-top:.1em;background:var(--accent-text);-webkit-mask:var(--icon-check) center/contain no-repeat;mask:var(--icon-check) center/contain no-repeat}
body:has(>header.hero) .explainer .cta{margin:var(--space-9) 0 0;padding:var(--space-6);border-radius:var(--r-lg);background:var(--color-surface);color:var(--text-body)}
body:has(>header.hero) .explainer .cta h3{margin:0 0 var(--space-2);color:var(--text-primary)}
body:has(>header.hero) .explainer .cta p{margin:0 0 var(--space-3);color:var(--text-body)}
body:has(>header.hero) .explainer .cta>a{display:inline-flex;align-items:center;min-height:var(--btn-h);margin:var(--space-2) 0 0;padding:.75rem 1.375rem;border-radius:var(--r-button);background:var(--color-ink);color:var(--color-on-ink);font-size:1rem;font-weight:var(--fw-medium);line-height:1.25;text-decoration:none}
body:has(>header.hero) .explainer .cta>a:focus-visible{border-radius:var(--r-button)}
body:has(>header.hero) .explainer .cta p a{display:inline;margin:0;padding:0;border-radius:0;background:none;color:var(--text-link);font-size:inherit}
@media (hover:hover){body:has(>header.hero) .explainer .cta>a:hover{background:var(--color-ink-hover)}}
body:has(>header.hero) .explainer .sources{margin:var(--space-10) 0 0;padding:var(--space-7) 0 0;border-top:1px solid var(--separator-strong)}
body:has(>header.hero) .sources-sub{margin:var(--space-6) 0 var(--space-2);color:var(--text-primary);font-family:var(--font-text);font-size:var(--fs-callout);font-weight:var(--fw-semibold);letter-spacing:var(--ls-callout);text-transform:none}
body:has(>header.hero) .explainer .sources ul{margin:0;padding-left:1.25rem}
body:has(>header.hero) .explainer .sources li{margin:0 0 var(--space-2);font-size:var(--fs-callout);line-height:var(--lh-callout)}
body:has(>header.hero) :is(.explainer,.sources,.faq) p.hint{margin:var(--space-4) 0 0;color:var(--text-secondary);font-size:var(--fs-footnote);line-height:var(--lh-footnote)}

/* =====================================================================================================
   Tools hub (tools/index.html, fr/outils/index.html): two product tiles with drawn charts
   ===================================================================================================== */
body:has(>header.hero) .suite-shell{max-width:none;width:min(var(--w-wide),100% - 2 * var(--gutter));margin:0 auto;padding:0 0 var(--space-block)}
body:has(>header.hero) .suite-intro{max-width:42rem;margin:0 auto var(--space-block);text-align:center}
body:has(>header.hero) .suite-intro h2{margin:0;color:var(--text-primary);font-size:var(--fs-title-1);line-height:var(--lh-title-1);letter-spacing:var(--ls-title-1)}
body:has(>header.hero) .suite-intro p{margin:var(--space-4) 0 0;color:var(--text-body);font-size:var(--fs-body);line-height:var(--lh-body)}
body:has(>header.hero) .suite-grid{display:grid;grid-template-columns:minmax(0,1fr);gap:var(--grid-gap)}
@media (min-width:734px){body:has(>header.hero) .suite-grid{grid-template-columns:repeat(2,minmax(0,1fr))}}
body:has(>header.hero) .suite-card{position:relative;display:flex;flex-direction:column;align-items:center;min-height:0;padding:var(--tile-pad) var(--tile-pad) 0;overflow:hidden;border:0;border-radius:var(--r-tile);background:var(--color-surface);color:var(--text-primary);box-shadow:var(--elevation-1);text-align:center;text-decoration:none;transition:box-shadow var(--dur-3) var(--ease-standard),transform var(--dur-3) var(--ease-standard)}
body:has(>header.hero) .suite-card.dark{background:var(--c-charcoal);color:var(--c-linen)}
body:has(>header.hero) .suite-card .num{display:block;color:var(--accent-text);font-family:var(--font-text);font-size:var(--fs-footnote);font-weight:var(--fw-semibold);line-height:1.3;letter-spacing:0;text-transform:none}
body:has(>header.hero) .suite-card.dark .num{color:var(--c-honey-bright)}
body:has(>header.hero) .suite-card h2{max-width:16ch;margin:var(--space-3) 0 0;color:inherit;font-size:var(--fs-title-1);line-height:var(--lh-title-1);letter-spacing:var(--ls-title-1)}
body:has(>header.hero) .suite-card p{max-width:30rem;margin:var(--space-4) 0 0;color:var(--text-body);font-size:var(--fs-callout);line-height:var(--lh-callout)}
body:has(>header.hero) .suite-card.dark p{color:var(--c-sand)}
body:has(>header.hero) .suite-card .arrow{display:inline-flex;align-items:center;min-height:var(--btn-h);margin:var(--space-6) 0 var(--space-9);padding:.75rem 1.375rem;border-radius:var(--r-button);background:var(--color-ink);color:var(--color-on-ink);font-family:var(--font-text);font-size:var(--fs-callout);font-weight:var(--fw-medium);line-height:1.25;letter-spacing:-.006em;text-transform:none;transition:background-color var(--dur-2) var(--ease-standard)}
body:has(>header.hero) .suite-card.dark .arrow{background:var(--c-linen);color:var(--c-charcoal)}
/* Drawn "product shots" (decorative masks): a waterfall for the tax tool, two bars for the comparator. */
body:has(>header.hero) .suite-card::after{content:"";display:block;flex:none;width:min(100%,22rem);aspect-ratio:2 / 1;margin:auto 0 0;-webkit-mask:var(--tl-chart) center bottom / 100% auto no-repeat;mask:var(--tl-chart) center bottom / 100% auto no-repeat}
body:has(>header.hero) .suite-card.dark::after{--tl-chart:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 240 120'%3E%3Crect x='0' y='8' width='46' height='112' rx='7'/%3E%3Crect x='64' y='8' width='46' height='14' rx='5'/%3E%3Crect x='128' y='22' width='46' height='20' rx='5'/%3E%3Crect x='194' y='42' width='46' height='78' rx='7'/%3E%3C/svg%3E");background:linear-gradient(90deg,var(--c-sand) 0 21%,color-mix(in srgb,var(--c-sand) 45%,transparent) 21% 76%,var(--c-honey-bright) 76%)}
body:has(>header.hero) .suite-card:not(.dark)::after{--tl-chart:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 240 120'%3E%3Crect x='12' y='76' width='20' height='44' rx='5'/%3E%3Crect x='36' y='56' width='20' height='64' rx='5'/%3E%3Crect x='72' y='52' width='20' height='68' rx='5'/%3E%3Crect x='96' y='56' width='20' height='64' rx='5'/%3E%3Crect x='132' y='28' width='20' height='92' rx='5'/%3E%3Crect x='156' y='56' width='20' height='64' rx='5'/%3E%3Crect x='192' y='6' width='20' height='114' rx='5'/%3E%3Crect x='216' y='56' width='20' height='64' rx='5'/%3E%3C/svg%3E");background:repeating-linear-gradient(90deg,var(--color-accent) 0 14.17%,var(--c-stone) 14.17% 25%)}
body:has(>header.hero) .suite-card:focus-visible{outline:2px solid var(--focus-ring);outline-offset:4px;border-radius:var(--r-tile)}
@media (hover:hover){
  body:has(>header.hero) .suite-card:hover{border:0;box-shadow:var(--elevation-3);transform:none}
  body:has(>header.hero) .suite-card:hover .arrow{background:var(--color-ink-hover)}
  body:has(>header.hero) .suite-card.dark:hover .arrow{background:var(--c-paper)}
}
@media (hover:hover) and (prefers-reduced-motion:no-preference){body:has(>header.hero) .suite-card:hover{transform:translateY(-3px)}}

/* =====================================================================================================
   Calculators: shared controls (tax tool and comparator)
   ===================================================================================================== */
/* Field labels and hints */
body:has(>header.hero) main :is(.field>label,.field-label,.asset-profile-grid label){display:block;margin:0 0 var(--space-2);color:var(--text-primary);font-size:var(--fs-footnote);font-weight:var(--fw-semibold);line-height:1.3;letter-spacing:var(--ls-footnote)}
body:has(>header.hero) main :is(.hint,.subhint,.fx-meta,.asset-note){color:var(--text-secondary);font-size:var(--fs-caption);line-height:var(--lh-caption);letter-spacing:0}
body:has(>header.hero) main .subhint{margin-top:var(--space-2)}
/* Text inputs and selects of the comparator (input.control and bare selects) */
body:has(>header.hero) main :is(input.control,.panel select,.asset-profile-grid select){width:100%;height:auto;min-height:3.25rem;margin:0;padding:.75rem 1rem;border:1px solid var(--control-border);border-radius:var(--r-md);background-color:var(--color-surface);color:var(--text-primary);font-family:var(--font-text);font-size:var(--fs-input);line-height:1.4;letter-spacing:-.006em;box-shadow:none;transition:border-color var(--dur-2) var(--ease-standard),box-shadow var(--dur-2) var(--ease-standard)}
body:has(>header.hero) main :is(.panel select,.asset-profile-grid select){padding-right:2.75rem;-webkit-appearance:none;appearance:none;background:var(--color-surface) var(--icon-select) right .875rem center / 1.125rem no-repeat}
body:has(>header.hero) main :is(input.control,.panel select,.asset-profile-grid select):focus{outline:none;border-color:var(--focus-ring);box-shadow:0 0 0 4px var(--focus-halo)}
@media (hover:hover){body:has(>header.hero) main :is(input.control,.panel select,.asset-profile-grid select):not(:focus):hover{border-color:var(--text-secondary)}}
body:has(>header.hero) main .money-wrap .prefix{left:1rem;color:var(--text-secondary);font-family:var(--font-text);font-size:var(--fs-caption);font-weight:var(--fw-semibold)}
body:has(>header.hero) main .money-wrap input.control{padding-left:3.25rem}
body:has(>header.hero) main .pct-wrap::after{right:1rem;color:var(--text-secondary);font-family:var(--font-text);font-size:var(--fs-callout)}
body:has(>header.hero) main .pct-wrap input.control{padding-right:2.5rem}
/* Segmented controls: a light track with a paper thumb */
body:has(>header.hero) main :is(.currency,.mode-tabs,.guided-mode-switch,.bmg-switch){display:inline-flex;flex-wrap:nowrap;gap:2px;width:max-content;max-width:100%;margin:0;padding:3px;overflow-x:auto;scrollbar-width:none;border:0;border-radius:calc(var(--r-control) + 3px);background:var(--fill-secondary);box-shadow:none}
body:has(>header.hero) main :is(.currency,.mode-tabs,.guided-mode-switch,.bmg-switch) button{flex:none;min-height:2.5rem;margin:0;padding:0 1rem;border:0;border-radius:var(--r-control);background:transparent;color:var(--text-body);font-family:var(--font-text);font-size:var(--fs-footnote);font-weight:var(--fw-semibold);line-height:1.2;letter-spacing:-.003em;white-space:nowrap;box-shadow:none;cursor:pointer;transition:background-color var(--dur-2) var(--ease-standard),color var(--dur-2) var(--ease-standard),box-shadow var(--dur-2) var(--ease-standard)}
body:has(>header.hero) main :is(.currency,.mode-tabs,.guided-mode-switch,.bmg-switch) button.active{background:var(--color-surface);color:var(--text-primary);box-shadow:var(--elevation-2)}
body:has(>header.hero) main :is(.currency,.mode-tabs,.guided-mode-switch,.bmg-switch) button:focus-visible{outline:2px solid var(--focus-ring);outline-offset:-2px}
@media (hover:hover){body:has(>header.hero) main :is(.currency,.mode-tabs,.guided-mode-switch,.bmg-switch) button:not(.active):hover{color:var(--text-primary)}}
@media (pointer:coarse){body:has(>header.hero) main :is(.currency,.mode-tabs,.guided-mode-switch,.bmg-switch) button{min-height:var(--tap-min)}}
/* Radio segmented (comparator): rounded track; the two-option labels may wrap in French */
body:has(>header.hero) main .segmented{gap:2px;padding:3px;border-radius:var(--r-md);background:var(--fill-secondary)}
body:has(>header.hero) main .segmented.three{grid-template-columns:repeat(3,minmax(0,1fr));border-radius:calc(var(--r-control) + 3px)}
body:has(>header.hero) main .segmented label{display:grid;place-items:center;min-height:2.5rem;margin:0;padding:.375rem .75rem;border:0;border-radius:calc(var(--r-md) - 3px);background:transparent;color:var(--text-body);font-size:var(--fs-footnote);font-weight:var(--fw-semibold);line-height:1.25;text-align:center;transition:background-color var(--dur-2) var(--ease-standard),color var(--dur-2) var(--ease-standard),box-shadow var(--dur-2) var(--ease-standard)}
body:has(>header.hero) main .segmented.three label{border-radius:var(--r-control)}
body:has(>header.hero) main .segmented input:checked+label{background:var(--color-surface);color:var(--text-primary);box-shadow:var(--elevation-2)}
body:has(>header.hero) main .segmented input:focus-visible+label{outline:2px solid var(--focus-ring);outline-offset:2px}
/* Buttons: pills */
body:has(>header.hero) main :is(.button,.primary,.mini-actions button,.adr-suggestion button){display:inline-flex;align-items:center;justify-content:center;min-height:var(--tap-min);margin:0;padding:0 1.25rem;border:0;border-radius:var(--r-button);background:var(--fill-secondary);color:var(--text-primary);font-family:var(--font-text);font-size:var(--fs-callout);font-weight:var(--fw-medium);line-height:1.2;letter-spacing:-.006em;box-shadow:none;transform:none;cursor:pointer;transition:background-color var(--dur-2) var(--ease-standard)}
body:has(>header.hero) main :is(.button.primary,button.primary,.mini-actions button.dark,.adr-suggestion button){background:var(--color-ink);color:var(--color-on-ink)}
body:has(>header.hero) main :is(.button,.primary,.mini-actions button,.adr-suggestion button):focus-visible{outline:2px solid var(--focus-ring);outline-offset:3px}
@media (hover:hover){
  body:has(>header.hero) main :is(.button,.mini-actions button):not(.primary,.dark):hover{background:var(--fill-primary);transform:none}
  body:has(>header.hero) main :is(.button.primary,button.primary,.mini-actions button.dark,.adr-suggestion button):hover{background:var(--color-ink-hover);transform:none}
}
@media (prefers-reduced-motion:no-preference){body:has(>header.hero) main :is(.button,.primary,.mini-actions button,.adr-suggestion button):active{transform:scale(.98)}}
/* Disclosures: a chevron instead of a typed plus sign */
body:has(>header.hero) main :is(.input-details,.compare-details,.sensitivity-details)>summary{display:flex;align-items:center;justify-content:space-between;gap:var(--space-4);min-height:3.25rem;padding:0 var(--space-5);color:var(--text-primary);font-family:var(--font-text);font-size:var(--fs-callout);font-weight:var(--fw-semibold);line-height:1.3}
body:has(>header.hero) main :is(.input-details,.compare-details,.sensitivity-details)>summary::after{content:"";flex:none;width:.75rem;height:.75rem;background:var(--text-secondary);-webkit-mask:var(--icon-chevron) center/contain no-repeat;mask:var(--icon-chevron) center/contain no-repeat;transform:rotate(90deg);transition:transform var(--dur-2) var(--ease-standard)}
body:has(>header.hero) main :is(.input-details,.compare-details,.sensitivity-details)[open]>summary::after{content:"";transform:rotate(-90deg)}
body:has(>header.hero) main :is(.input-details,.compare-details,.sensitivity-details,.full-net)>summary:focus-visible{outline-offset:-2px}
/* Two-option switches with long (French) labels share the width instead of scrolling: the benchmark switch
   always, the detail-level switch on phones */
body:has(>header.hero) main .bmg-switch{display:flex;flex-direction:row;width:100%;border-radius:calc(var(--r-control) + 3px)}
body:has(>header.hero) main .bmg-switch button{flex:1 1 0;padding:.5rem .75rem;border-radius:var(--r-control);white-space:normal;text-align:center}
@media (max-width:733.98px){
  body:has(>header.hero) main .guided-mode-switch{display:flex;width:100%;border-radius:calc(var(--r-control) + 3px)}
  body:has(>header.hero) main .guided-mode-switch button{flex:1 1 0;padding:.5rem .75rem;border-radius:var(--r-control);white-space:normal;text-align:center}
}

/* =====================================================================================================
   Tax and company cash calculator (tools/bali-villa-tax-calculator.html, fr/outils/simulateur-fiscal-...)
   ===================================================================================================== */
body:has(>header.hero) main.wrap{width:min(var(--w-wide),100% - 2 * var(--gutter));max-width:none;margin:0 auto;padding:0 0 var(--space-section)}
body:has(>header.hero) .tool{overflow:hidden;border:0;border-radius:var(--r-2xl);background:var(--color-surface);box-shadow:0 0 0 1px var(--separator),var(--elevation-2)}
body:has(>header.hero) .tool-head{gap:var(--space-6);padding:var(--tl-pad);border-bottom:1px solid var(--separator)}
body:has(>header.hero) :is(.tool-head,.faq,.sources) .step{display:block;margin:0 0 var(--space-2);padding:0;border:0;color:var(--accent-text);font-family:var(--font-text);font-size:var(--fs-footnote);font-weight:var(--fw-semibold);line-height:1.3;letter-spacing:0;text-transform:none}
body:has(>header.hero) .tool-head h2{margin:0 0 var(--space-3);color:var(--text-primary);font-size:var(--fs-title-1);line-height:var(--lh-title-1);letter-spacing:var(--ls-title-1)}
body:has(>header.hero) .tool-head p{max-width:40rem;margin:0;color:var(--text-body);font-size:var(--fs-callout);line-height:var(--lh-callout)}
body:has(>header.hero) .fx-editor{gap:var(--space-2) var(--space-3);margin:var(--space-5) var(--tl-pad) 0;padding:var(--space-3) var(--space-4);border:0;border-radius:var(--r-md);background:var(--fill-tertiary);color:var(--text-body);font-size:var(--fs-footnote);line-height:var(--lh-footnote)}
body:has(>header.hero) .fx-editor b{color:var(--text-primary);font-weight:var(--fw-semibold)}
body:has(>header.hero) .fx-editor input{width:7.5rem;min-height:2.5rem;padding:.375rem .75rem;border:1px solid var(--control-border);border-radius:var(--r-sm);background:var(--color-surface);color:var(--text-primary);font-size:var(--fs-input);font-weight:var(--fw-semibold);font-variant-numeric:tabular-nums}
body:has(>header.hero) .fx-editor input:focus{outline:none;border-color:var(--focus-ring);box-shadow:0 0 0 4px var(--focus-halo)}
body:has(>header.hero) .scenario{padding:var(--tl-pad) var(--tl-pad) var(--space-5)}
body:has(>header.hero) main .mode-tabs{margin:0 0 var(--space-6)}
@media (max-width:479.98px){
  body:has(>header.hero) main .mode-tabs{display:flex;width:100%}
  body:has(>header.hero) main .mode-tabs button{flex:1 1 auto;padding:0 .625rem}
}
body:has(>header.hero) .fields{gap:var(--space-4)}
body:has(>header.hero) .mode-panel .fields>.field{gap:0;grid-template-rows:auto 3.5rem minmax(1.375rem,auto)}
/* Tax tool inputs: a framed box around the native input or select */
body:has(>header.hero) main div.control{height:3.5rem;gap:.5rem;padding:0 1rem;border:1px solid var(--control-border);border-radius:var(--r-md);background:var(--color-surface);transition:border-color var(--dur-2) var(--ease-standard),box-shadow var(--dur-2) var(--ease-standard)}
body:has(>header.hero) main div.control:focus-within{border-color:var(--focus-ring);background:var(--color-surface);box-shadow:0 0 0 4px var(--focus-halo)}
@media (hover:hover){body:has(>header.hero) main div.control:not(:focus-within):hover{border-color:var(--text-secondary)}}
body:has(>header.hero) main div.control :is(input,select){width:100%;min-width:0;height:100%;margin:0;padding:0;border:0;border-radius:0;background-color:transparent;color:var(--text-primary);font-family:var(--font-text);font-size:var(--fs-input);font-variant-numeric:tabular-nums;letter-spacing:-.006em;outline:none;box-shadow:none}
body:has(>header.hero) main div.control select{padding-right:1.75rem;-webkit-appearance:none;appearance:none;background:transparent var(--icon-select) right center / 1.125rem no-repeat;text-overflow:ellipsis;cursor:pointer}
body:has(>header.hero) main div.control.money input{font-size:1.25rem;font-weight:var(--fw-semibold);letter-spacing:-.015em}
body:has(>header.hero) main div.control>span{flex:none;color:var(--text-secondary);font-size:var(--fs-callout)}
body:has(>header.hero) .advanced-grid{gap:var(--space-5) var(--space-4)}
body:has(>header.hero) .advanced-grid div.control{height:3.25rem}
body:has(>header.hero) .advanced-grid div.control.money input{font-size:var(--fs-body)}
body:has(>header.hero) .scenario button.primary{height:3.5rem;padding:0 1.75rem;font-size:1rem}
body:has(>header.hero) .mode-panel .fields>.primary{margin-top:calc(var(--fs-footnote) * 1.3 + var(--space-2))}
@media (max-width:600px){body:has(>header.hero) .mode-panel .fields>.primary{margin-top:var(--space-1)}}
body:has(>header.hero) .scenario-summary{gap:var(--space-2);margin:var(--space-1) var(--tl-pad) 0;padding:var(--space-3) var(--space-4);border-radius:var(--r-md);background:var(--color-canvas-alt);color:var(--text-body);font-size:var(--fs-footnote);line-height:var(--lh-footnote)}
body:has(>header.hero) .scenario-summary b{color:var(--text-primary);font-weight:var(--fw-semibold)}
/* Result: the page's one dark tile */
body:has(>header.hero) .result-zone{padding:var(--space-6) var(--tl-pad) var(--tl-pad)}
body:has(>header.hero) .result-card{container-type:inline-size;padding:var(--tl-pad);border-radius:var(--r-xl);background:var(--c-charcoal);color:var(--c-linen)}
body:has(>header.hero) .result-card::after{display:none}
body:has(>header.hero) .result-header h3{color:var(--c-linen);font-size:var(--fs-title-3);line-height:var(--lh-title-3)}
body:has(>header.hero) .result-header p{margin-top:var(--space-1);color:color-mix(in srgb,var(--c-linen) 68%,transparent);font-size:var(--fs-footnote)}
body:has(>header.hero) .result-card .badge{color:var(--c-honey-bright);font-size:var(--fs-caption);font-weight:var(--fw-medium);line-height:1.4}
body:has(>header.hero) .result-card .headline{margin-top:var(--space-8)}
body:has(>header.hero) .result-card .headline span{color:color-mix(in srgb,var(--c-linen) 70%,transparent);font-size:var(--fs-footnote);font-weight:var(--fw-medium)}
/* The headline amount scales with the card (a container): a 13-digit rupiah total still fits a phone. */
body:has(>header.hero) .result-card .headline strong{margin-top:var(--space-2);overflow-wrap:anywhere;color:var(--c-linen);font-family:var(--font-display);font-size:clamp(1.75rem,12cqi,5.25rem);font-weight:var(--fw-semibold);line-height:1;letter-spacing:-.045em;font-variant-numeric:tabular-nums lining-nums}
body:has(>header.hero) .result-card .headline small{margin-top:var(--space-3);color:color-mix(in srgb,var(--c-linen) 78%,transparent);font-size:var(--fs-callout)}
body:has(>header.hero) .result-card .edit-hint{margin-top:var(--space-3);color:var(--c-honey-bright);font-size:var(--fs-footnote)}
body:has(>header.hero) .result-card .deductions{gap:1px;margin-top:var(--space-7);border-radius:var(--r-lg);background:color-mix(in srgb,var(--c-linen) 14%,transparent)}
body:has(>header.hero) .result-card .deductions div{padding:var(--space-4);background:var(--c-charcoal-2)}
body:has(>header.hero) .result-card .deductions span{color:color-mix(in srgb,var(--c-linen) 68%,transparent);font-size:var(--fs-caption);font-weight:var(--fw-medium);letter-spacing:0;text-transform:none}
body:has(>header.hero) .result-card .deductions strong{margin-top:var(--space-1);color:var(--c-linen);font-size:var(--fs-title-3);font-weight:var(--fw-semibold);font-variant-numeric:tabular-nums}
body:has(>header.hero) .result-card .waterfall{gap:var(--space-2);margin-top:var(--space-3);padding:0;border:0;background:none}
body:has(>header.hero) .result-card .waterfall .node{padding:var(--space-3) var(--space-4);border:1px solid color-mix(in srgb,var(--c-linen) 16%,transparent);border-radius:var(--r-md);background:none}
body:has(>header.hero) .result-card .waterfall .node span{color:color-mix(in srgb,var(--c-linen) 66%,transparent);font-size:var(--fs-caption);font-weight:var(--fw-medium);letter-spacing:0;text-transform:none}
body:has(>header.hero) .result-card .waterfall .node strong{margin-top:var(--space-1);color:var(--c-linen);font-size:var(--fs-callout);font-weight:var(--fw-semibold);font-variant-numeric:tabular-nums}
body:has(>header.hero) .result-card .waterfall .node.final{border-color:var(--c-honey);background:color-mix(in srgb,var(--c-honey) 16%,transparent)}
body:has(>header.hero) .result-card .waterfall .node.final strong{color:var(--c-honey-bright)}
body:has(>header.hero) .result-card .result-disclaimer{margin-top:var(--space-4);color:color-mix(in srgb,var(--c-linen) 66%,transparent);font-size:var(--fs-caption);line-height:var(--lh-caption)}
body:has(>header.hero) .result-card .breakdown{margin-top:var(--space-4);border-top:1px solid color-mix(in srgb,var(--c-linen) 14%,transparent)}
body:has(>header.hero) .result-card .breakdown button{align-items:center;min-height:var(--tap-min);padding:var(--space-3) 0 0;color:var(--c-linen);font-size:var(--fs-callout);font-weight:var(--fw-semibold)}
body:has(>header.hero) .result-card .breakdown button:focus-visible{outline-color:var(--c-honey-bright);border-radius:var(--r-xs)}
body:has(>header.hero) .result-card .flow{font-size:var(--fs-footnote);border-top-color:color-mix(in srgb,var(--c-linen) 12%,transparent)}
body:has(>header.hero) .result-card .flow span{color:color-mix(in srgb,var(--c-linen) 68%,transparent)}
body:has(>header.hero) .result-card .flow strong{color:var(--c-linen);font-variant-numeric:tabular-nums}
body:has(>header.hero) .result-card .source-inline{border-radius:var(--r-md);background:color-mix(in srgb,var(--c-linen) 7%,transparent);color:color-mix(in srgb,var(--c-linen) 74%,transparent);font-size:var(--fs-caption);line-height:var(--lh-caption)}
body:has(>header.hero) .result-zone .mini-actions{gap:var(--space-2)}
/* Full net after operations and tax */
body:has(>header.hero) .full-net{margin:0 var(--tl-pad) var(--tl-pad);border:0;border-radius:var(--r-lg);background:var(--color-canvas-alt)}
body:has(>header.hero) .full-net>summary{gap:var(--space-4);padding:var(--space-5) var(--space-6);border-radius:var(--r-lg)}
body:has(>header.hero) .full-net>summary strong{color:var(--text-primary);font-size:var(--fs-body);font-weight:var(--fw-semibold);line-height:1.3}
body:has(>header.hero) .full-net>summary small{margin-top:var(--space-1);color:var(--text-secondary);font-size:var(--fs-footnote)}
body:has(>header.hero) .full-net>summary>span{display:grid;place-items:center;flex:none;width:2rem;height:2rem;border-radius:50%;background:var(--color-surface);color:transparent;font-size:0}
body:has(>header.hero) .full-net>summary>span::before{content:"";width:.75rem;height:.75rem;background:var(--text-primary);-webkit-mask:var(--icon-chevron) center/contain no-repeat;mask:var(--icon-chevron) center/contain no-repeat;transform:rotate(90deg);transition:transform var(--dur-2) var(--ease-standard)}
body:has(>header.hero) .full-net[open]>summary>span::before{transform:rotate(-90deg)}
body:has(>header.hero) .full-body{padding:0 var(--space-6) var(--space-6);border-top:1px solid var(--separator)}
body:has(>header.hero) .full-net .notice{margin:var(--space-5) 0;padding:var(--space-3) var(--space-4);border:0;border-radius:var(--r-md);background:var(--color-surface);color:var(--text-body);font-size:var(--fs-footnote);line-height:var(--lh-footnote)}
body:has(>header.hero) main .locked{gap:.375rem;margin-top:var(--space-2);color:var(--text-secondary);font-size:var(--fs-caption)}
body:has(>header.hero) main .locked i{flex:none;width:.375rem;height:.375rem;background:var(--c-moss)}
body:has(>header.hero) .full-body .asset-note{margin:var(--space-4) 0 0}
body:has(>header.hero) .full-body .mini-actions{flex-wrap:wrap;gap:var(--space-2);margin-top:var(--space-5)}
body:has(>header.hero) .pending-result{margin-top:var(--space-5);padding:var(--space-4);border:1px dashed var(--separator-strong);border-radius:var(--r-md);color:var(--text-secondary);font-size:var(--fs-footnote);line-height:var(--lh-footnote)}
body:has(>header.hero) .full-result{margin-top:var(--space-5);padding:var(--space-5);border:0;border-radius:var(--r-lg);background:var(--color-surface);box-shadow:var(--elevation-1)}
body:has(>header.hero) .full-result h4{margin:0 0 var(--space-4);color:var(--text-primary);font-size:var(--fs-callout);line-height:1.3}
body:has(>header.hero) .full-grid{gap:1px;border-radius:var(--r-md);background:var(--separator)}
body:has(>header.hero) .full-grid div{padding:var(--space-4);background:var(--color-surface)}
body:has(>header.hero) .full-grid span{color:var(--text-secondary);font-size:var(--fs-caption);font-weight:var(--fw-medium);letter-spacing:0;text-transform:none}
body:has(>header.hero) .full-grid strong{margin-top:var(--space-1);color:var(--text-primary);font-size:var(--fs-title-3);font-weight:var(--fw-semibold);font-variant-numeric:tabular-nums}
body:has(>header.hero) .full-result .headline span{color:var(--text-secondary);font-size:var(--fs-footnote);font-weight:var(--fw-medium)}
body:has(>header.hero) .full-result .headline strong{overflow-wrap:anywhere;font-family:var(--font-display);font-weight:var(--fw-semibold);letter-spacing:-.04em;font-variant-numeric:tabular-nums}
/* Reading sections after the tool: one 640px column */
body:has(>header.hero) main.wrap>:is(.faq,.sources,.tool-links,.cta-panel){max-width:var(--w-text);margin-inline:auto}
body:has(>header.hero) main.wrap>.faq{margin-top:var(--space-section);padding:0;border:0}
body:has(>header.hero) main.wrap>.sources{margin-top:var(--space-10);padding:var(--space-8) 0 0;border-top:1px solid var(--separator)}
body:has(>header.hero) main.wrap>:is(.faq,.sources) h2{margin:0 0 var(--space-3);color:var(--text-primary);font-size:var(--fs-title-1);line-height:var(--lh-title-1);letter-spacing:var(--ls-title-1)}
body:has(>header.hero) main.wrap>.faq h3{margin:var(--space-7) 0 var(--space-2);color:var(--text-primary);font-size:var(--fs-title-3);line-height:var(--lh-title-3);letter-spacing:var(--ls-title-3)}
body:has(>header.hero) main.wrap>:is(.faq,.sources) p:not(.hint){max-width:none;margin:0 0 var(--space-3);color:var(--text-body);font-size:var(--fs-body);line-height:var(--lh-prose)}
body:has(>header.hero) main.wrap>.sources ul{margin:var(--space-4) 0 0;padding-left:1.25rem;color:var(--text-body);font-size:var(--fs-callout);line-height:var(--lh-callout)}
body:has(>header.hero) main.wrap>.sources li{margin:0 0 var(--space-2)}
body:has(>header.hero) main.wrap>.sources a{color:var(--text-link);font-weight:var(--fw-medium);text-decoration:underline;text-decoration-color:color-mix(in srgb,currentColor 38%,transparent);text-underline-offset:.2em}
body:has(>header.hero) main.wrap>.tool-links{display:flex;flex-direction:column;align-items:flex-start;gap:0;margin-top:var(--space-9);font-size:var(--fs-callout)}
body:has(>header.hero) main.wrap>.tool-links a{display:inline-flex;align-items:center;min-height:var(--tap-min);color:var(--text-link);font-weight:var(--fw-medium);text-decoration:none}
@media (hover:hover){body:has(>header.hero) main.wrap>.tool-links a:hover{color:var(--text-link-hover);text-decoration:underline;text-underline-offset:.2em}}
body:has(>header.hero) main.wrap>.cta-panel{margin-top:var(--space-9);padding:var(--tile-pad);border:0;border-radius:var(--r-tile);background:var(--color-canvas-alt);box-shadow:none}
body:has(>header.hero) .cta-panel h3{margin:0 0 var(--space-3);color:var(--text-primary);font-size:var(--fs-title-2);line-height:var(--lh-title-2);letter-spacing:var(--ls-title-2)}
body:has(>header.hero) .cta-panel p{max-width:none;margin:0 0 var(--space-5);color:var(--text-body);font-size:var(--fs-body);line-height:var(--lh-body)}
body:has(>header.hero) .cta-panel .actions{gap:var(--space-2) var(--space-3);margin:0}
body:has(>header.hero) .cta-panel .actions a{display:inline-flex;align-items:center;min-height:var(--btn-h-secondary);padding:.625rem 1.375rem;border:0;border-radius:var(--r-button);background:var(--fill-secondary);color:var(--text-primary);font-size:1rem;font-weight:var(--fw-medium);line-height:1.25;text-decoration:none;transition:background-color var(--dur-2) var(--ease-standard)}
body:has(>header.hero) .cta-panel .actions a.dark{background:var(--color-ink);color:var(--color-on-ink)}
body:has(>header.hero) .cta-panel .actions a:focus-visible{border-radius:var(--r-button)}
@media (hover:hover){
  body:has(>header.hero) .cta-panel .actions a:not(.dark):hover{background:var(--fill-primary)}
  body:has(>header.hero) .cta-panel .actions a.dark:hover{background:var(--color-ink-hover)}
}

/* =====================================================================================================
   Rental strategy comparator (tools/bali-rental-strategy-comparator.html, fr/outils/comparateur-...)
   ===================================================================================================== */
body:has(>header.hero) .compare-shell{width:min(var(--w-wide),100% - 2 * var(--gutter));max-width:none;margin:0 auto;padding:0 0 var(--space-section);gap:var(--grid-gap)}
body:has(>header.hero) .panel.inputs{border:0;border-radius:var(--r-2xl);background:var(--color-surface);box-shadow:0 0 0 1px var(--separator),var(--elevation-2)}
body:has(>header.hero) .panel.inputs .panel-head{gap:var(--space-4);padding:var(--tl-pad);border-bottom:1px solid var(--separator)}
body:has(>header.hero) .panel.inputs .panel-head h2{color:var(--text-primary);font-size:var(--fs-title-1);line-height:var(--lh-title-1);letter-spacing:var(--ls-title-1)}
body:has(>header.hero) .panel.inputs .panel-head p{margin-top:var(--space-3);color:var(--text-body);font-size:var(--fs-callout);line-height:var(--lh-callout)}
body:has(>header.hero) .panel.inputs .panel-head>.ms{flex:none;color:var(--text-secondary);font-family:var(--font-text);font-size:var(--fs-caption);font-weight:var(--fw-semibold);letter-spacing:0;text-transform:none}
body:has(>header.hero) :is(.currency-copy,.guided-mode,.asset-profile-copy) .kicker{display:block;margin:0 0 var(--space-2);color:var(--accent-text);font-family:var(--font-text);font-size:var(--fs-footnote);font-weight:var(--fw-semibold);line-height:1.3;letter-spacing:0;text-transform:none}
body:has(>header.hero) .currency-panel{gap:var(--space-5);padding:var(--space-6) var(--tl-pad);border-bottom:1px solid var(--separator);background:var(--color-surface)}
body:has(>header.hero) :is(.currency-copy,.asset-profile-copy) h3,body:has(>header.hero) .guided-mode h3{margin:0 0 var(--space-2);color:var(--text-primary);font-size:var(--fs-title-3);line-height:var(--lh-title-3);letter-spacing:var(--ls-title-3)}
body:has(>header.hero) :is(.currency-copy,.asset-profile-copy,.guided-mode) p{max-width:36rem;margin:0;color:var(--text-body);font-size:var(--fs-footnote);line-height:var(--lh-footnote)}
body:has(>header.hero) .fx-rate-wrap>label{color:var(--text-primary);font-size:var(--fs-footnote);font-weight:var(--fw-semibold)}
body:has(>header.hero) .fx-rate-input span{color:var(--text-secondary);font-family:var(--font-text);font-size:var(--fs-caption)}
body:has(>header.hero) .guided-mode{gap:var(--space-4) var(--space-6);padding:var(--space-6) var(--tl-pad);border-color:var(--separator);background:var(--color-surface)}
body:has(>header.hero) .panel.inputs .panel-body{padding:var(--space-6) var(--tl-pad) var(--tl-pad)}
body:has(>header.hero) :is(.inline-note,.currency-input-hint){margin:var(--space-4) 0 0;padding:var(--space-3) var(--space-4);border:0;border-radius:var(--r-md);background:var(--color-canvas-alt);color:var(--text-body);font-size:var(--fs-footnote);line-height:var(--lh-footnote)}
body:has(>header.hero) .currency-input-hint{margin:0 0 var(--space-2)}
body:has(>header.hero) .panel-body .step{padding:var(--space-7) 0;border-top:1px solid var(--separator)}
body:has(>header.hero) .panel-body .step:first-of-type{border-top:0}
body:has(>header.hero) .step-title{gap:var(--space-3);margin:0 0 var(--space-5)}
body:has(>header.hero) .step-no{width:1.75rem;height:1.75rem;background:var(--color-ink);color:var(--color-on-ink);font-family:var(--font-text);font-size:var(--fs-caption);font-weight:var(--fw-semibold);font-variant-numeric:tabular-nums}
body:has(>header.hero) .step-title h3{color:var(--text-primary);font-size:var(--fs-title-3);line-height:var(--lh-title-3);letter-spacing:var(--ls-title-3)}
body:has(>header.hero) .panel-body .grid{gap:var(--space-5) var(--space-4)}
/* A label carrying the "recommended default" chip wraps to two lines: reserve that height for the row */
@media (min-width:621px){
  body:has(>header.hero) .panel-body .grid:has(.recommended-default)>.field{display:grid;grid-template-rows:minmax(2.75rem,auto) auto auto;align-content:start;gap:0}
  body:has(>header.hero) .panel-body .grid:has(.recommended-default)>.field>label{align-self:end}
  body:has(>header.hero) .panel-body .grid:has(.recommended-default)>.field>.hint{margin-top:var(--space-2)}
}
body:has(>header.hero) .recommended-default{margin-left:.375rem;padding:.125rem .5rem;border-radius:var(--r-badge);background:var(--accent-tint);color:var(--accent-text);font-size:.6875rem;font-weight:var(--fw-semibold);letter-spacing:0;text-transform:none}
body:has(>header.hero) .asset-profile{margin:0 calc(var(--tl-pad) * -1);padding:var(--space-7) var(--tl-pad);border-color:var(--separator);background:var(--color-canvas-alt)}
body:has(>header.hero) .asset-profile-grid{gap:var(--space-3)}
body:has(>header.hero) .asset-profile-grid select{margin-top:var(--space-2)}
body:has(>header.hero) .adr-suggestion{gap:var(--space-4);margin-top:var(--space-4);padding:var(--space-4) var(--space-5);border:0;border-radius:var(--r-lg);background:var(--color-surface);box-shadow:0 0 0 1px var(--separator)}
body:has(>header.hero) .adr-suggestion .ms{color:var(--accent-text);font-family:var(--font-text);font-size:var(--fs-footnote);font-weight:var(--fw-semibold);letter-spacing:0;text-transform:none}
body:has(>header.hero) .adr-suggestion strong{margin-top:var(--space-1);color:var(--text-primary);font-family:var(--font-display);font-size:var(--fs-title-2);font-weight:var(--fw-semibold);line-height:var(--lh-title-2);letter-spacing:-.02em;font-variant-numeric:tabular-nums}
body:has(>header.hero) .adr-suggestion small{margin-top:var(--space-1);color:var(--text-secondary);font-size:var(--fs-caption)}
@media (min-width:801px){body:has(>header.hero) .adr-suggestion button{flex:none;white-space:nowrap}}
body:has(>header.hero) .input-details{margin-top:var(--space-5);border:0;border-radius:var(--r-lg);background:var(--color-canvas-alt)}
body:has(>header.hero) .input-details>.advanced-content{padding:var(--space-5);border-top:1px solid var(--separator);background:var(--color-surface)}
body:has(>header.hero) .check-row{gap:var(--space-2);color:var(--text-primary);font-size:var(--fs-footnote)}
body:has(>header.hero) .check-row input{width:1.125rem;height:1.125rem;accent-color:var(--c-charcoal)}
body:has(>header.hero) .panel.inputs .actions{gap:var(--space-2);margin-top:var(--space-6)}
body:has(>header.hero) main .status{color:var(--status-success-text);font-size:var(--fs-footnote)}
/* Results: the page's one dark tile */
body:has(>header.hero) .compare-results{top:calc(var(--nav-h) + var(--space-4));border:0;border-radius:var(--r-2xl);background:var(--c-charcoal);color:var(--c-linen);box-shadow:var(--elevation-3)}
body:has(>header.hero) .compare-summary{padding:var(--tl-pad)}
body:has(>header.hero) .compare-summary .eyebrow{display:block;color:var(--c-honey-bright);font-family:var(--font-text);font-size:var(--fs-footnote);font-weight:var(--fw-semibold);letter-spacing:0;text-transform:none}
body:has(>header.hero) .compare-summary .headline{margin-top:var(--space-2);color:var(--c-linen);font-family:var(--font-display);font-size:clamp(1.75rem,1.3rem + 1.9vw,2.75rem);font-weight:var(--fw-semibold);line-height:1.08;letter-spacing:-.028em}
body:has(>header.hero) .compare-summary .delta{margin-top:var(--space-3);color:var(--c-honey-bright);font-family:var(--font-text);font-size:var(--fs-callout);font-weight:var(--fw-semibold);font-variant-numeric:tabular-nums}
body:has(>header.hero) .compare-summary .currency-result-note{margin-top:var(--space-2);color:color-mix(in srgb,var(--c-linen) 66%,transparent);font-family:var(--font-text);font-size:var(--fs-caption);letter-spacing:0;text-transform:none}
body:has(>header.hero) .bmg-benchmark{margin:0 var(--space-4) var(--space-4);padding:var(--space-5);border:0;border-radius:var(--r-lg);background:var(--c-bone);color:var(--text-primary);box-shadow:none}
body:has(>header.hero) .bmg-benchmark.benchmark-active{background:var(--accent-tint);box-shadow:inset 0 0 0 1.5px var(--color-accent)}
body:has(>header.hero) .benchmark-reference-badge{margin:0 0 var(--space-3);padding:.25rem .625rem;border:0;border-radius:var(--r-badge);background:var(--color-surface);color:var(--accent-text);font-family:var(--font-text);font-size:var(--fs-caption);font-weight:var(--fw-semibold);letter-spacing:0;text-transform:none}
body:has(>header.hero) .bmg-benchmark.benchmark-active .benchmark-reference-badge{background:var(--color-ink);color:var(--c-honey-bright)}
body:has(>header.hero) .bmg-scenario-line,body:has(>header.hero) .bmg-delta{color:var(--text-body);font-size:var(--fs-footnote);line-height:var(--lh-footnote)}
body:has(>header.hero) :is(.bmg-scenario-line,.bmg-delta) b{color:var(--text-primary)}
body:has(>header.hero) main .bmg-switch{margin-top:var(--space-3)}
body:has(>header.hero) .bmg-source{color:var(--text-body);font-size:var(--fs-caption);line-height:var(--lh-caption)}
body:has(>header.hero) .bmg-source a{color:var(--text-link);font-weight:var(--fw-medium)}
body:has(>header.hero) .bmg-caveat{color:var(--text-secondary)}
body:has(>header.hero) .strategy-grid{gap:var(--space-2);padding:0 var(--space-4) var(--space-4)}
body:has(>header.hero) .strategy-card{padding:var(--space-4) var(--space-5);border-radius:var(--r-lg)}
body:has(>header.hero) .strategy-card .tag{color:color-mix(in srgb,var(--c-linen) 68%,transparent);font-family:var(--font-text);font-size:var(--fs-caption);font-weight:var(--fw-semibold);letter-spacing:0;text-transform:none}
body:has(>header.hero) .strategy-card.winner .tag{color:var(--c-honey-bright)}
body:has(>header.hero) .strategy-card .money{color:var(--c-linen);font-family:var(--font-display);font-size:clamp(1.625rem,1.2rem + 1.6vw,2.375rem);font-weight:var(--fw-semibold);line-height:1.05;letter-spacing:-.03em;font-variant-numeric:tabular-nums}
body:has(>header.hero) .strategy-card .detail{color:color-mix(in srgb,var(--c-linen) 70%,transparent);font-size:var(--fs-caption);line-height:var(--lh-caption)}
body:has(>header.hero) .strategy-card .shortfall{color:var(--status-danger-tint);font-family:var(--font-text);font-size:var(--fs-caption);font-weight:var(--fw-semibold);letter-spacing:0;text-transform:none}
body:has(>header.hero) .assumption-warning{margin:0 var(--space-4) var(--space-4);padding:var(--space-3) var(--space-4);border-radius:var(--r-md);color:color-mix(in srgb,var(--c-linen) 82%,transparent);font-size:var(--fs-footnote);line-height:var(--lh-footnote)}
body:has(>header.hero) .compare-details{margin:0 var(--space-4) var(--space-4);border-radius:var(--r-lg);background:var(--color-surface);color:var(--text-primary)}
body:has(>header.hero) .compare-details-body{border-top:1px solid var(--separator)}
body:has(>header.hero) .compare-list{padding:var(--space-2) var(--space-5) var(--space-4)}
body:has(>header.hero) .compare-row{padding:var(--space-3) 0;border-bottom-color:var(--separator)}
body:has(>header.hero) .compare-row .label{color:var(--text-primary);font-size:var(--fs-footnote);line-height:1.35}
body:has(>header.hero) .compare-row :is(.st,.lt){font-family:var(--font-text);font-size:var(--fs-footnote);font-weight:var(--fw-semibold);font-variant-numeric:tabular-nums}
body:has(>header.hero) .compare-row .st{color:var(--accent-text)}
body:has(>header.hero) .compare-row .lt{color:var(--text-primary)}
body:has(>header.hero) main :is(.fx-secondary,.fx-equivalent){font-family:var(--font-text);font-size:var(--fs-caption);font-weight:var(--fw-regular)}
body:has(>header.hero) .break-even{padding:var(--space-5);border-top:0;background:var(--color-canvas-alt)}
body:has(>header.hero) :is(.break-even,.compare-bars) h3{margin:0 0 var(--space-3);color:var(--text-primary);font-size:var(--fs-title-3);line-height:var(--lh-title-3)}
body:has(>header.hero) .break-grid{gap:var(--space-3);margin-top:0}
body:has(>header.hero) .break-card{padding:var(--space-4);border:0;border-radius:var(--r-md);background:var(--color-surface)}
body:has(>header.hero) .break-card .k{color:var(--text-secondary);font-family:var(--font-text);font-size:var(--fs-caption);font-weight:var(--fw-semibold);letter-spacing:0;text-transform:none}
body:has(>header.hero) .break-card .v{margin-top:var(--space-1);color:var(--text-primary);font-family:var(--font-display);font-size:var(--fs-title-2);font-weight:var(--fw-semibold);line-height:1.1;letter-spacing:-.02em;font-variant-numeric:tabular-nums}
body:has(>header.hero) .break-card p{margin-top:var(--space-1);color:var(--text-secondary);font-size:var(--fs-caption)}
body:has(>header.hero) .compare-bars{padding:var(--space-5);border-top:1px solid var(--separator)}
body:has(>header.hero) .barline .barlabel{color:var(--text-body);font-size:var(--fs-footnote);font-variant-numeric:tabular-nums}
body:has(>header.hero) .bartrack{height:.625rem;border-radius:var(--r-pill);background:var(--fill-secondary)}
body:has(>header.hero) .barfill{border-radius:var(--r-pill)}
body:has(>header.hero) .barfill.short{background:var(--color-accent)}
body:has(>header.hero) .barfill.long{background:var(--c-stone)}
@media (prefers-reduced-motion:reduce){body:has(>header.hero) .barfill{transition:none}}
body:has(>header.hero) .compare-details .notice{padding:var(--space-4) var(--space-5);border-top:1px solid var(--separator);background:var(--color-surface);color:var(--text-body);font-size:var(--fs-footnote);line-height:var(--lh-footnote)}
body:has(>header.hero) .compare-details .notice p{margin:0;color:inherit;font-size:inherit}
/* Sensitivity table */
body:has(>header.hero) .sensitivity{width:min(var(--w-wide),100% - 2 * var(--gutter));max-width:none;margin:0 auto;padding:0 0 var(--space-section)}
body:has(>header.hero) .sensitivity h2{max-width:26ch;margin:0;color:var(--text-primary);font-size:var(--fs-title-1);line-height:var(--lh-title-1);letter-spacing:var(--ls-title-1)}
body:has(>header.hero) .sensitivity-details{margin-top:var(--space-6);border:0;border-radius:var(--r-lg);background:var(--color-surface);box-shadow:0 0 0 1px var(--separator)}
body:has(>header.hero) .sensitivity-details .table-wrap{border-top:1px solid var(--separator);background:var(--color-surface)}
body:has(>header.hero) .sensitivity :is(th,td){padding:.75rem 1rem;border-bottom:1px solid var(--separator);color:var(--text-body);font-size:var(--fs-footnote);font-variant-numeric:tabular-nums}
body:has(>header.hero) .sensitivity th{background:var(--color-canvas-alt);color:var(--text-primary);font-family:var(--font-text);font-weight:var(--fw-semibold);letter-spacing:0;text-transform:none}
body:has(>header.hero) .sensitivity tr.highlight td{background:var(--accent-tint);color:var(--text-primary)}

/* Small screens: panels lose a little radius */
@media (max-width:733.98px){
  body:has(>header.hero) :is(.tool,.panel.inputs,.compare-results){border-radius:var(--r-xl)}
  body:has(>header.hero) .result-card{border-radius:var(--r-lg)}
}

/* =====================================================================================================
   Preferences and print (both families)
   ===================================================================================================== */
/* Hover lifts are already limited to no-preference; disclosure chevrons and image zooms stop animating too. */
@media (prefers-reduced-motion:reduce){
  .bmg-note-page .bmg-method-note>summary::after,
  .bmg-library-page .library-card-media img,
  body:has(>header.hero) main :is(.input-details,.compare-details,.sensitivity-details)>summary::after,
  body:has(>header.hero) .full-net>summary>span::before{transition:none}
}
@media (forced-colors:active){
  .bmg-note-page .bmg-reading-note::before,
  .bmg-note-page .editorial-related-card::after,
  .bmg-note-page .bmg-method-note>summary::after,
  .bmg-library-page .library-standard li::before,
  body:has(>header.hero) .profile li::before,
  body:has(>header.hero) .hero .tool-switcher a.quiet::after,
  body:has(>header.hero) main :is(.input-details,.compare-details,.sensitivity-details)>summary::after,
  body:has(>header.hero) .full-net>summary>span::before{background:CanvasText}
  .bmg-library-page .cluster-filter[aria-pressed="true"],
  body:has(>header.hero) main :is(.currency,.mode-tabs,.guided-mode-switch,.bmg-switch) button.active,
  body:has(>header.hero) main .segmented input:checked+label{border:1px solid CanvasText}
}
/* R2: roman editorial titles; controls, body copy and calculator amounts stay in Inter. */
.bmg-note-page main.wrap>h1,.bmg-library-page .library-hero h1{font-family:var(--font-editorial);font-weight:500;font-style:normal;font-size:clamp(2.125rem,1.6rem + 2.3vw,3.5rem);line-height:1.1}
body:has(>header.hero) .hero h1{font-family:var(--font-editorial);font-weight:500;font-style:normal;font-size:clamp(2.125rem,1.6rem + 2.3vw,3.5rem);line-height:1.1}
.bmg-note-page article h2,.bmg-library-page .library-cta h2{font-family:var(--font-editorial);font-weight:500;font-style:normal;line-height:1.15}
body:has(>header.hero) :is(.suite-intro,.explainer)>h2{font-family:var(--font-editorial);font-weight:500;font-style:normal;line-height:1.15}
@media print{
  .bmg-note-page main.wrap{display:block;padding:0}
  .bmg-note-page :is(.editorial-toc,.editorial-related,.editorial-cta){display:none}
  .bmg-note-page article{font-size:11pt}
  .bmg-library-page :is(.cluster-filters,.library-cta){display:none}
  .bmg-library-page .library-shell{background:none}
  /* Dark result tiles keep their ground on paper, so their light text stays legible. */
  body:has(>header.hero) :is(.result-card,.compare-results,.suite-card.dark){-webkit-print-color-adjust:exact;print-color-adjust:exact}
}
