/* One compact, persistent header for all four tools. */
html{--tool-header-height:90px;scroll-padding-top:calc(var(--tool-header-height) + 12px)}
body>header,body>header.site-header,body.unit-site>header,body.calc-site>header{position:sticky;top:0;z-index:80;height:auto;min-height:78px;display:flex;align-items:center;flex-wrap:wrap;gap:8px 20px;padding:8px 24px;background:var(--cl-surface,#fff);border-bottom:1px solid var(--cl-line,#d7e4dc);box-shadow:0 2px 9px #06271c0a}
header .tool-brand-navigation{display:flex;align-items:center;gap:10px;flex:0 1 auto;min-width:0;max-width:100%}
header .tool-brand-navigation>a:first-child{display:flex;align-items:center;flex:0 1 auto;min-width:0;text-decoration:none}
header .tool-brand-navigation img.brand,header .tool-brand-navigation img.brand-wordmark,header .tool-brand-navigation img.tool-wordmark{width:200px;min-width:0;max-width:100%;height:60px;object-fit:contain;object-position:left center}
header .tool-brand-navigation .company-home-link{display:inline-flex;align-items:center;justify-content:center;flex:0 0 auto;min-height:40px;padding:7px 10px;border:1px solid var(--cl-border,var(--cl-line,#d7e4dc));border-radius:7px;background:var(--cl-input,var(--cl-surface,#fff));color:var(--cl-ink,#173f3b);font-size:11pt;font-weight:600;line-height:1.5;letter-spacing:normal;white-space:nowrap;text-decoration:none;box-sizing:border-box}
header .company-home-link span{font:inherit;letter-spacing:normal}
header .company-home-en,header .tool-label-en{display:none}
html[lang^="en"] header .company-home-ja,html[lang^="en"] header .tool-label-ja{display:none}
html[lang^="en"] header .company-home-en,html[lang^="en"] header .tool-label-en{display:inline}
.tool-shortcuts{display:flex;align-items:center;flex-wrap:wrap;gap:5px;min-width:0}
.tool-shortcuts a{display:inline-flex;align-items:center;gap:6px;min-height:40px;padding:7px 9px;border:1px solid transparent;border-radius:7px;color:var(--cl-ink,#173f3b);font-size:11pt;font-weight:600;line-height:1.5;white-space:nowrap;text-decoration:none;box-sizing:border-box}
.tool-shortcuts svg{width:19px;height:19px;flex:none;fill:none;stroke:currentColor;stroke-width:1.6;stroke-linecap:round;stroke-linejoin:round}
.tool-shortcuts .tool-label-compact{display:none}
.tool-shortcuts a[aria-current="page"],.tool-shortcuts a:hover,.company-home-link:hover{background:var(--cl-soft,#eaf3ed);border-color:var(--cl-line,#d7e4dc)}
.tool-shortcuts a:focus-visible,.tool-brand-navigation>a:focus-visible{outline:3px solid var(--cl-accent,#167a68);outline-offset:2px}
body>header .free-label,body>header>small{display:none!important}
body>header .site-preferences,body>header.site-header>nav{display:flex;align-items:center;flex-wrap:wrap;gap:8px 14px;margin-left:auto;min-width:0}
body>header .site-preferences>label,body>header.site-header>nav>label{display:flex;align-items:center;gap:7px;width:auto;flex:0 0 auto;font-size:11pt;white-space:nowrap}
body>header select{width:auto;max-width:145px;min-height:40px;font-size:11pt;box-sizing:border-box}
.tool-preferences-menu,body>header>.tool-preferences-menu{margin:0 0 0 auto;padding:0;border:0;background:transparent;position:relative}.tool-preferences-menu>summary{display:none}.tool-preferences-menu .site-preferences,.tool-preferences-menu nav{display:flex;align-items:center;gap:8px 14px}
.home-popular a,.home-calculation-group a{color:var(--cl-ink)}
header span{letter-spacing:normal}
.tool-page-links{display:flex;flex-wrap:wrap;gap:10px 20px;padding:12px 28px;border-bottom:1px solid var(--cl-line,#d7e4dc);font-size:11pt;background:var(--cl-surface,#fff)}
.calc-site .calc-shortcuts{top:calc(var(--tool-header-height) + 8px);z-index:7}
.sidebar aside,.calc-site .unit-ad-rail,.sketch-canvas-column{top:calc(var(--tool-header-height) + 14px)}
#calc-diagram-card,#calc-input-card,#calc-results-card,.calc-site #calc-diagram-card,.calc-site #calc-input-card,.calc-site #calc-results-card{scroll-margin-top:calc(var(--tool-header-height) + 70px)}
/* A single horizontal placement next to the page title, including small screens. */
.tool-title-row,.unit-site .workspace-heading.tool-title-row{display:grid;grid-template-columns:minmax(0,1fr) clamp(160px,43%,468px);align-items:center;gap:18px;min-height:0;margin:24px 0}
.tool-title-row>.heading-copy{min-width:0;grid-row:1;grid-column:1}
.unit-site:not(.calc-site) .workspace-heading.tool-title-row>.heading-copy{grid-row:1;grid-column:1}
.unit-site:not(.calc-site) .workspace-heading.tool-title-row>.heading-ads{grid-row:1;grid-column:2}
body.unit-site .sidebar aside,body.calc-site .unit-ad-rail{top:calc(var(--tool-header-height) + 14px)}
.tool-title-row h1{overflow-wrap:anywhere;line-height:1.4}
.tool-title-row h1{margin:0 0 6px}.tool-title-row .eyebrow{margin:0 0 7px}.tool-title-lead{margin:-10px 0 22px;color:var(--cl-muted);font-size:11pt;line-height:1.8}.tool-title-lead p{margin:4px 0}.tool-title-lead .calc-trial-label{display:block;font-size:11pt;margin:4px 0}
.tool-title-row>.heading-ads,.unit-site .tool-title-row>.heading-ads{display:block;grid-row:1;grid-column:2;width:100%;max-width:468px;justify-self:end;margin:0}
.tool-title-row .heading-ad.advertisement{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:5px;width:100%;height:auto;min-height:0;padding:0;margin:0;border:0;background:transparent;border-radius:0}
.tool-title-row .heading-ad>span,.tool-title-row .heading-ad>.ad-label{font-size:11pt;font-weight:400;color:var(--cl-muted);text-align:center;margin:0;line-height:1.4}
.tool-title-row .heading-ad>.ad-slot,.unit-site .tool-title-row .heading-ad>.ad-slot,.unit-site .tool-title-row .heading-ad>.ad-slot.active{display:flex;align-items:center;justify-content:center;width:100%;max-width:100%;height:90px;min-height:90px;overflow:hidden;border:1px solid var(--cl-line);border-radius:8px;background:var(--cl-ad)}
.tool-title-row .heading-ad p{margin:0;font-size:11pt;line-height:1.5}
.tool-title-row .heading-ad>.ad-slot.active{background:transparent;border-color:transparent}
/* The standard section diagram uses the same 760:500 presentation frame as other calculators. */
body[data-calculation="section"] #section-diagram-home .diagram-planar-frame{position:relative;width:100%;aspect-ratio:760/500;padding:0;min-width:0;border:1px solid var(--cl-line);border-radius:10px;background:var(--cl-soft);overflow:hidden}
body[data-calculation="section"] #section-diagram-home .diagram-planar-frame>svg{display:block;width:100%;min-width:0!important;max-width:100%;height:calc(100% - 42px);max-height:none;margin:0}
body[data-calculation="section"] #section-diagram-home .calc-planar-notes{display:flex;align-items:baseline;flex-wrap:wrap;gap:5px 14px;margin:10px 0 0;padding:0}
body[data-calculation="section"] #section-diagram-home .calc-planar-notes p{font-size:11pt;line-height:1.6;margin:0}
.calculation-home{max-width:1450px;margin:auto;padding:0 28px 40px}
body.calculation-home-site>main.calculation-home{display:block;width:100%;box-sizing:border-box}
.home-entry-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:18px;margin:20px 0 30px}.home-entry-grid .home-entry{display:flex;flex-direction:column;align-items:start;gap:10px;position:relative;padding:22px 48px 22px 22px;min-width:0;min-height:0;border:1px solid var(--cl-line);border-radius:12px;background:var(--cl-surface);color:var(--cl-ink);text-decoration:none;box-sizing:border-box}.home-entry strong{font-size:21px;line-height:1.5}.home-entry>span{font-size:16px;line-height:1.8;font-weight:400}.home-entry>b{position:absolute;right:18px;top:22px;font-size:23px;color:var(--cl-accent)}.home-entry:hover{border-color:var(--cl-accent);background:var(--cl-soft)}#calculation-list{scroll-margin-top:calc(var(--tool-header-height) + 16px)}
.tool-local-note{margin:-8px 0 20px}.tool-local-note .local-note{display:inline-block;min-width:0;max-width:100%}
.calculation-home .home-actions{display:flex;flex-wrap:wrap;align-items:end;gap:14px;margin-bottom:20px}
.calculation-home .home-actions label{display:block;flex:1 1 300px;font-size:16px;font-weight:700}
.calculation-home .home-actions input{display:block;width:100%;box-sizing:border-box;margin-top:8px;min-height:48px;font-size:17px}
.home-motion-link{display:inline-flex;align-items:center;min-height:48px;padding:8px 15px;border:1px solid var(--cl-accent);border-radius:8px;background:var(--cl-soft);color:var(--cl-ink);font-size:16px;font-weight:700;text-decoration:none;box-sizing:border-box}
.home-popular{display:flex;flex-wrap:wrap;gap:8px;margin:18px 0 26px}.home-popular a{padding:9px 12px;background:var(--cl-surface);border:1px solid var(--cl-line);border-radius:7px;font-size:11pt;text-decoration:none}
.home-calculation-groups{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:16px;align-items:start}
.home-calculation-group{padding:0;border:1px solid var(--cl-line);border-radius:10px;background:var(--cl-surface);overflow:hidden}
.home-calculation-group>summary{padding:16px;font-size:18px;font-weight:700;cursor:pointer;line-height:1.5}
.home-calculation-group>div{display:grid;gap:0;padding:0 14px 12px}
.home-calculation-group a{padding:11px 2px;border-top:1px solid var(--cl-line);font-size:16px;text-decoration:none;line-height:1.7}
.home-calculation-group a:hover{text-decoration:underline}.home-calculation-count{font-size:11pt;color:var(--cl-muted)}
@media(max-width:1100px){body>header{gap:6px 14px}.tool-shortcuts{flex:1 1 auto}.home-calculation-groups{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:700px){
 body>header,body>header.site-header,body.unit-site>header,body.calc-site>header{padding:7px 14px;gap:5px 10px;min-height:0}
 header .tool-brand-navigation img.brand,header .tool-brand-navigation img.brand-wordmark,header .tool-brand-navigation img.tool-wordmark{width:150px;height:45px;max-width:calc(100vw - 220px)}
 header .tool-brand-navigation{gap:8px}
 .tool-shortcuts{order:3;display:flex;width:100%;flex:1 1 100%;flex-wrap:nowrap;overflow:visible;gap:3px;padding:2px 0}
 .tool-shortcuts a{flex:1 1 0;justify-content:center;min-width:0;padding:6px 4px;min-height:38px;gap:4px}.tool-shortcuts svg{width:16px;height:16px}.tool-shortcuts .tool-label-full{display:none}.tool-shortcuts .tool-label-compact{display:inline}
 body>header .site-preferences,body.calc-site>header .site-preferences,body>header.site-header>nav{width:auto;max-width:100%;gap:6px 10px;margin-left:auto;justify-content:flex-start}
 body>header .site-preferences>label,body>header.site-header>nav>label{font-size:11pt;gap:5px}
 body>header select{max-width:118px}
 .tool-preferences-menu>summary{display:flex;align-items:center;justify-content:center;list-style:none;cursor:pointer;width:40px;height:40px;border:1px solid var(--cl-line);border-radius:7px;font-size:23px;line-height:1;background:var(--cl-input)}.tool-preferences-menu>summary::-webkit-details-marker{display:none}
 .tool-preferences-menu .site-preferences,.tool-preferences-menu nav{position:absolute;right:0;top:46px;z-index:90;width:260px!important;max-width:calc(100vw - 30px)!important;padding:14px;box-sizing:border-box;background:var(--cl-surface);border:1px solid var(--cl-line);border-radius:9px;box-shadow:0 7px 25px #0002;display:flex;flex-wrap:wrap}
 .tool-title-row,.unit-site .workspace-heading.tool-title-row{grid-template-columns:minmax(0,1fr) 160px;gap:12px;margin:20px 0}
 .tool-title-row h1{font-size:24px}.tool-title-row .eyebrow{font-size:11pt;letter-spacing:.06em}
 .tool-title-row .lead,.tool-title-row .heading-copy>p:not(.eyebrow){font-size:11pt;line-height:1.7}
 .tool-title-row .heading-ad>.ad-slot,.unit-site .tool-title-row .heading-ad>.ad-slot,.unit-site .tool-title-row .heading-ad>.ad-slot.active{height:70px;min-height:70px}
 .unit-site:not(.calc-site) .tool-title-row .heading-ad-single .heading-ad>.ad-slot{height:70px;min-height:70px}
 .home-calculation-groups{grid-template-columns:minmax(0,1fr)}.calculation-home{padding:0 14px 30px}.home-motion-link{width:100%;justify-content:center}
 .home-entry-grid{grid-template-columns:minmax(0,1fr);gap:12px;margin:16px 0 26px}.home-entry-grid .home-entry{padding:16px 40px 16px 16px}.home-entry strong{font-size:19px}.home-entry>span{font-size:11pt}
 .tool-page-links{padding:10px 14px;gap:10px 16px}
}
