:root{--ink:#192235;--muted:#4a4f5c;--orange:#f36c08;--orange-dark:#d95500;--green:#087a21;--green-soft:#e1f4e4;--paper:#f8fafc;--border:#d8dee7;--warm:#fff3db;--footer:#202d45;--focus:#165bb6;font-family:Arial,"Noto Sans",sans-serif;color:var(--ink);background:var(--paper)}
*{box-sizing:border-box}
img{object-fit:contain}
html{scroll-behavior:smooth}
body{margin:0;min-width:0;background:linear-gradient(#f8fafc,#fff 45%,#f8fafc)}
button,input,select{font:inherit}
button,select{cursor:pointer}
button:disabled{cursor:not-allowed;opacity:.65}
:focus-visible{outline:3px solid var(--focus);outline-offset:2px}
.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}
.skip-link{position:absolute;z-index:50;top:-60px;left:10px;background:#fff;padding:9px}
.skip-link:focus{top:7px}
[hidden]{display:none!important}
.site-header{height:47px;background:rgba(255,255,255,.97);border-bottom:1px solid #e2e6eb;position:relative;z-index:10}
.header-inner{max-width:1024px;height:100%;margin:auto;padding:0 22px;display:flex;align-items:center;gap:16px;min-width:0}
.brand,.footer-brand{display:inline-flex;align-items:center;gap:8px;text-decoration:none;color:var(--ink);white-space:nowrap;flex:none}
.brand strong{font-family:"Arial Narrow",Arial,sans-serif;font-weight:900;font-size:26px;letter-spacing:-1.2px}
.brand-divider{height:25px;border-left:1px solid #aeb7c4;flex:none}
.brand-tagline{font-size:13px;white-space:nowrap;flex:none}
.primary-nav{display:flex;align-items:center;justify-content:center;gap:28px;flex:1;min-width:0;height:100%}
.primary-nav a{height:100%;display:inline-flex;align-items:center;position:relative;color:#111;text-decoration:none;font-size:14px;white-space:nowrap}
.primary-nav a:hover,.primary-nav a.active{color:#0f1827}
.primary-nav a.active:after{content:"";position:absolute;bottom:4px;left:0;right:0;height:3px;background:var(--orange)}
.language-wrap{position:relative;border:1px solid #aeb6c3;border-radius:6px;height:30px;flex:none;background:#fff}
.language-wrap summary{display:flex;align-items:center;gap:5px;height:100%;padding:0 7px;cursor:pointer;list-style:none;font-size:13px;color:#111;white-space:nowrap}
.language-wrap summary::-webkit-details-marker{display:none}
.language-wrap summary:hover,.language-wrap[open] summary{background:#f1f5fa}
.language-wrap .language-flag,.language-option img{display:block;flex:none;object-fit:cover;border:1px solid #d2d8df;border-radius:1px}
.language-wrap .language-chevron{font-size:12px;margin-inline-start:2px}
.language-options{position:absolute;top:calc(100% + 4px);inset-inline-end:0;z-index:60;width:284px;max-width:calc(100vw - 24px);max-height:min(486px,calc(100vh - 60px));overflow-y:auto;scrollbar-width:none;overscroll-behavior:contain;background:#fff;border:1px solid #aeb6c3;border-radius:7px;box-shadow:0 10px 24px #19223533;padding:4px 20px 4px 4px}
.language-options::-webkit-scrollbar{display:none}
.language-scrollbar{display:none;position:fixed;z-index:61;width:12px;background:#fff;touch-action:none;cursor:pointer}
.language-wrap[open] .language-scrollbar{display:block}
.language-scrollbar-thumb{display:block;position:absolute;top:0;left:1px;width:10px;background:#929292;border-radius:8px}
.language-option{display:flex;align-items:center;gap:11px;min-height:48px;padding:10px;color:#172033;text-decoration:none;font-size:14px;white-space:normal;overflow-wrap:anywhere;border-radius:4px}
.language-option img{width:28px;height:18px}
.language-option:hover,.language-option:focus-visible{background:#edf7f0}
.language-option[aria-current="page"]{background:#eaf8ef;color:#087447;font-weight:500}
.menu-toggle{display:none;border:1px solid var(--border);border-radius:6px;background:white;width:38px;height:34px;padding:7px}
.menu-toggle span{display:block;height:2px;background:var(--ink);margin:4px 0}
.hero{height:123px;position:relative;overflow:hidden;background:#f6f8fb}
.hero-photo{position:absolute;top:0;right:0;height:100%;width:auto;max-width:none;-webkit-mask-image:linear-gradient(90deg,transparent,#000 16%);mask-image:linear-gradient(90deg,transparent,#000 16%)}
.hero:after{content:"";position:absolute;inset:0;background:linear-gradient(90deg,#f8fafc 0%,#f8fafc 45%,rgba(248,250,252,.9) 55%,transparent 79%)}
@media(min-width:1200px){.hero:after{background:linear-gradient(90deg,#f8fafc 0%,#f8fafc 64%,rgba(248,250,252,.55) 71%,rgba(248,250,252,.08) 80%,transparent 84%)}}
.hero-inner{position:relative;z-index:1;max-width:1024px;margin:auto;padding:27px 22px}
.hero h1{font-family:Bahnschrift,"Arial Narrow",Arial,sans-serif;font-size:37px;line-height:1.05;letter-spacing:0;margin:4px 0 4px 32px;font-weight:900}
.hero p{font-size:14px;color:var(--muted);margin:0 0 0 34px}
@media(min-width:1024px){
  [lang=de] .hero h1,[lang=pl] .hero h1{font-size:33px}
  [lang=es] .hero h1{font-size:27px}
  [lang=fr] .hero h1{font-size:28px}
  [lang=pt-BR] .hero h1{font-size:24px}
  [lang=it] .hero h1{font-size:26px}
  [lang=id] .hero h1{font-size:31px}
  [lang=de] .hero p{font-size:12px}
}
.section-mark{position:relative}
.section-mark:before{content:"";position:absolute;left:-30px;top:1px;width:11px;height:31px;background:var(--orange);transform:skewX(-21deg)}
.calculator-shell{position:relative;max-width:994px;min-height:390px;margin:-1px auto 12px;padding:15px;display:grid;grid-template-columns:302px minmax(0,1fr) 267px;border:1px solid #dce3eb;border-radius:14px;background:rgba(255,255,255,.83);box-shadow:0 7px 25px rgba(30,50,80,.09);scroll-margin-top:58px}
.input-column{position:relative;z-index:2;min-width:0;padding-right:9px}
.tool-heading{display:flex;gap:9px;align-items:flex-start;margin:3px 0 14px}
.tool-heading>div{min-width:0}
.tool-heading h2{font-family:"Arial Narrow",Arial,sans-serif;font-size:20px;line-height:1.1;letter-spacing:-.6px;margin:3px 0 5px;font-weight:900;overflow-wrap:anywhere}
.tool-heading p{font-size:12px;color:var(--muted);margin:0;line-height:1.35}
.mode-tabs{min-height:52px;display:grid;grid-template-columns:repeat(3,minmax(0,1fr));margin-bottom:15px}
.mode{border:1px solid #848e9d;background:linear-gradient(#f5f6f8,#e7ebf2);color:#1f2937;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:2px;font-size:12px;line-height:1.1;padding:3px 2px;min-width:0;min-height:52px;overflow-wrap:anywhere}
.mode:first-child{border-radius:6px 0 0 6px}
.mode:last-child{border-radius:0 6px 6px 0}
.mode+.mode{border-left:0}
.mode.active{position:relative;border:1px solid #d56510;background:linear-gradient(#fa9228,#e06000);color:#fff;box-shadow:0 2px 6px #d5651050}
.mode.active:after{content:"";position:absolute;left:calc(50% - 6px);bottom:-6px;width:12px;height:12px;background:#e06000;transform:rotate(45deg)}
.mode[data-mode=length]:not(.active) img{filter:brightness(0)}
.mode[data-mode=rise].active img{filter:brightness(0) invert(1)}
.mode img{height:20px;width:30px;object-fit:contain}
.mode[data-mode=rise] img{width:14px}
.mode-percent{font-size:21px;line-height:20px}
.field{min-height:81px;min-width:0}
@media(min-width:1024px){#field-slope{min-height:73px}}
.field-line{display:grid;grid-template-columns:minmax(0,1fr) 145px;align-items:center;gap:4px}
#field-slope .field-line{grid-template-columns:minmax(0,1fr) 125px}
#field-slope .field-control input{width:70px}
#field-slope .unit-static{width:55px}
#field-slope label{gap:7px;font-size:12px;white-space:nowrap}
.field label{display:flex;align-items:center;gap:10px;font-size:13px;font-weight:700;min-width:0;line-height:1.2}
.field label img{flex:none}
.field-control{display:flex;height:33px;min-width:0}
.field-control input{height:33px;width:88px;min-width:0;border:1px solid #848e9d;border-radius:5px 0 0 5px;background:white;padding:3px 8px;font-size:17px;font-weight:700;color:var(--ink)}
.field-control select,.unit-static{height:33px;width:58px;border:1px solid #848e9d;border-left:0;border-radius:0 5px 5px 0;background:#f4f6fa;padding:3px 7px;font-size:14px;color:var(--ink);display:flex;align-items:center}
.field-help{font-size:11px;line-height:1.35;margin:4px 0 0 31px;color:#333b4a}
#rise-help{max-width:240px}
.field-error{font-size:11px;color:#b72d00;margin:3px 0 0 31px;min-height:0}
.field input[aria-invalid=true]{border-color:#b72d00;box-shadow:0 0 0 1px #b72d00}
.calculate-button{width:100%;min-height:46px;padding:8px;border:0;border-radius:6px;background:linear-gradient(#da5f08,#d15604);color:white;font-size:19px;font-weight:700;display:flex;align-items:center;justify-content:center;gap:13px;margin-top:1px;box-shadow:0 3px 8px #d45b0030}
.calculate-button span{min-width:0;overflow-wrap:anywhere}
.calculate-button:hover{background:var(--orange-dark)}
.calculate-button img{filter:brightness(0) invert(1)}
.visualization-column{grid-column:2;grid-row:1;min-width:0;margin:0;position:relative;padding:0 7px 0 0;display:flex;flex-direction:column}
.visual-stage{position:relative;height:329px;min-width:0;overflow:hidden;border-radius:6px;background:#edf1f1}
.visual-stage .scene{width:100%;height:100%;display:block;object-fit:cover;object-position:center}
.visual-stage:after{content:"";position:absolute;inset:0;background:linear-gradient(90deg,#fff9,transparent 23%,transparent 83%,#fff9);pointer-events:none}
.visual-stage.is-reference:after{display:none}
.visual-stage.is-reference #ramp-svg{opacity:0}
#ramp-svg{position:absolute;z-index:1;inset:0;width:100%;height:100%;overflow:visible}
#ramp-svg.is-dirty{opacity:0}
.line-halo{fill:none;stroke:#fff;stroke-width:5;stroke-linecap:round;stroke-linejoin:round}
.measure-line{fill:none;stroke:var(--orange);stroke-width:2.6;stroke-linecap:round;stroke-linejoin:round}
.measure-label rect{fill:#fff9ed;stroke:var(--orange);stroke-width:1.2}
.measure-label text{fill:#111;font-size:12px;font-weight:700}
.measure-label text:last-child{font-size:18px;font-weight:900}
#svg-run-value,#svg-rise-value,#svg-slope-value{direction:ltr;unicode-bidi:isolate}
[dir=rtl] #primary-value,[dir=rtl] #summary-rise,[dir=rtl] #summary-slope,[dir=rtl] #summary-run{direction:ltr;unicode-bidi:isolate}
.visual-caption{min-height:30px;display:flex;align-items:center;gap:5px;font-size:9px;color:#172337;line-height:1.2;background:#eff4f8;border-radius:6px;padding:4px 6px}
.visual-caption strong{white-space:nowrap}
.results-column{grid-column:3;grid-row:1;position:relative;border:1px solid #d3e5d7;border-radius:10px;background:linear-gradient(#e7f7e9,#fff 40%);padding:7px;min-width:0;display:flex;flex-direction:column}
.results-column.is-dirty{border-color:#d4dbe4;background:linear-gradient(#f1f4f8,#fff 40%)}
.results-column.is-dirty .result-highlight{background:#edf1f5}
.results-column.is-dirty .result-highlight output{color:#4a5260}
.results-column.is-dirty h2 img,.results-column.is-dirty .result-highlight img{filter:grayscale(1)}
.results-column h2{margin:0 0 6px;padding:2px 0 4px;display:flex;align-items:center;gap:7px;font-family:"Arial Narrow",Arial,sans-serif;font-size:21px;font-weight:900;letter-spacing:-.4px;border-bottom:1px solid #d4dfd8;color:#111}
.result-highlight{min-height:74px;background:linear-gradient(135deg,#e4f5e7,#cfefd3);border-radius:8px;display:flex;align-items:center;gap:10px;padding:9px}
.result-highlight img{flex:none}
.result-highlight div{flex:1;min-width:0;text-align:center}
.result-highlight strong{display:block;font-size:13px;color:#111;line-height:1.1}
.result-highlight output{display:block;color:var(--green);font-family:"Arial Narrow",Arial,sans-serif;font-weight:900;font-size:38px;line-height:1.05;white-space:normal;overflow-wrap:anywhere}
.result-description{font-size:13px;line-height:1.28;margin:9px 5px 3px;color:#212735}
.result-status{font-size:12px;color:#a44500;margin:0 5px 4px;min-height:0}
.result-breakdown{border:1px solid #cbd5de;border-radius:6px;background:#f7f9fb;padding:2px 6px;margin:0 2px 8px}
.result-breakdown div{min-height:25px;display:grid;grid-template-columns:22px minmax(0,1fr) auto;align-items:center;gap:4px;font-size:11px}
.result-breakdown div+div{border-top:1px solid #dbe1e7}
.result-breakdown strong{font-size:12px;text-align:end;overflow-wrap:anywhere}
.share-actions{margin-top:auto;display:flex;gap:8px}
.share-actions button{flex:1;min-height:38px;border:1px solid #848e9d;border-radius:6px;background:linear-gradient(#fff,#f1f4f8);display:flex;align-items:center;justify-content:center;gap:6px;font-size:13px;font-weight:700;white-space:normal;min-width:0}
.share-actions button:hover{background:#eaf0f6}
#share-feedback{font-size:11px;min-height:18px;margin:5px 2px 0;color:#245487}
#manual-copy-wrap{font-size:11px;display:grid;gap:3px}
#manual-copy{width:100%;font-size:12px;padding:4px}
.content-section{max-width:1024px;margin:0 auto;padding:20px 18px 18px;border-top:1px solid #e3e7ec;scroll-margin-top:58px}
.section-heading{display:flex;align-items:baseline;gap:20px;margin-bottom:13px}
.section-heading h2{font-family:"Arial Narrow",Arial,sans-serif;font-size:24px;line-height:1.1;letter-spacing:-.8px;font-weight:900;margin:0 0 0 27px;overflow-wrap:anywhere}
.section-heading .section-mark:before{left:-24px;top:1px;width:8px;height:25px}
.section-heading p{font-size:12px;color:var(--muted);margin:0}
.how-section{display:grid;grid-template-columns:195px minmax(0,1fr);gap:12px;min-height:135px;padding-top:18px;padding-bottom:16px}
.how-section .section-heading{display:block;margin:0}
.how-section .section-heading h2{margin-bottom:8px}
.how-section .section-heading p{font-size:13px;line-height:1.25;margin-left:27px}
.step-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:22px}
.step-card{min-height:100px;background:linear-gradient(135deg,#fff,#f1f3f7);border:1px solid #dfe3e9;border-radius:10px;display:grid;grid-template-columns:31px 27px minmax(0,1fr);grid-template-rows:auto 1fr;column-gap:10px;row-gap:6px;padding:9px 12px 8px 17px;position:relative;min-width:0}
.step-card:not(:last-child):after{content:"›";position:absolute;right:-17px;top:32px;color:#5c6573;font-size:26px}
[dir=rtl] .step-card{padding-left:12px;padding-right:17px}
[dir=rtl] .step-card:not(:last-child):after{content:"‹";right:auto;left:-17px}
.step-number{grid-column:1;grid-row:1/3;align-self:start;background:linear-gradient(#ff9b21,#cc4900);color:white;width:29px;height:29px;border-radius:50%;font-size:18px;font-weight:800;display:grid;place-items:center}
.step-card img{grid-column:2;grid-row:1;align-self:start;max-width:none}
.step-card h3{grid-column:3;grid-row:1;align-self:center;font-family:"Arial Narrow",Arial,sans-serif;font-size:16px;line-height:1.1;margin:0;color:#111;min-width:0}
.step-card p{grid-column:2/4;grid-row:2;font-size:12px;line-height:1.28;margin:0;color:#313744;min-width:0}
.guide-section{min-height:218px;padding-top:17px;padding-bottom:15px}
.guide-grid{display:grid;grid-template-columns:1.08fr 1fr .94fr;gap:16px}
.guide-card{min-height:150px;border:1px solid var(--border);border-radius:8px;background:#fff;overflow:hidden;position:relative}
.guide-card h3{background:linear-gradient(#f7f8fa,#e9edf2);margin:0;min-height:32px;padding:5px 9px;display:flex;align-items:center;gap:9px;font-family:"Arial Narrow",Arial,sans-serif;font-size:16px;font-weight:800;color:#111}
.formula-body{display:grid;grid-template-columns:minmax(0,1fr) 107px;gap:3px;padding:7px 5px 7px 15px}
.formula-list{list-style:none;padding:4px 0;margin:0;display:flex;flex-direction:column;justify-content:space-around;gap:5px;font-family:"Arial Narrow",Arial,sans-serif;font-size:11.5px;line-height:1.2;letter-spacing:-.25px;min-width:0}
.formula-list li{min-width:0;overflow-wrap:anywhere;direction:ltr;text-align:left}
.formula-list li:before{content:"●";color:var(--orange);font-size:10px;margin-right:5px}
.formula-example{display:flex;flex-direction:column;align-items:flex-start;justify-content:space-between;gap:4px;min-width:0;min-height:94px;background:#fff4df;padding:6px;border-radius:5px;font-family:"Arial Narrow",Arial,sans-serif;font-size:9px;line-height:1.2}
.formula-example-context,.formula-example-calc{overflow-wrap:anywhere}
.formula-example-context{font-size:8.5px;letter-spacing:-.2px}
.formula-example-calc{direction:ltr;unicode-bidi:isolate}
.formula-example-title{display:inline-block;background:#ffdfba;color:#a74400;border-radius:3px;padding:1px 4px;font-weight:700;margin-bottom:3px}
.formula-example strong{color:#a74400;font-size:14px;align-self:flex-end;direction:ltr}
.guide-card table{border-collapse:collapse;table-layout:fixed;width:calc(100% - 12px);margin:6px;font-size:11px}
.guide-card th,.guide-card td{border:1px solid #d8dee7;padding:2px 3px;text-align:center;overflow-wrap:anywhere}
.guide-card th{background:#f2f4f7}
.guide-card tbody th{background:#fff;text-align:left;font-weight:400}
.guide-card th:first-child{width:48%}
.guide-card th:nth-child(2){width:22%}
.guide-card th:nth-child(3){width:30%}
.notes-card{background:#fffcf5;border-color:#f6e8cb}
.notes-card h3{background:#fff4dc}
.notes-list{list-style:none;margin:0;padding:7px 10px 8px;display:grid;gap:5px}
.notes-list li{display:grid;grid-template-columns:16px minmax(0,1fr);gap:5px;font-size:11px;line-height:1.24;color:#242934}
.notes-list li:before{content:"✓";color:var(--orange);font-size:17px;font-weight:700;line-height:1}
.examples-section{min-height:288px;padding-top:16px;padding-bottom:14px}
@media(min-width:1024px){.examples-section{padding-bottom:9px}}
.examples-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px}
.example-card{background:#fff;border:1px solid #dfe4ea;border-radius:10px;padding:5px;min-width:0}
.example-card>img{display:block;width:100%;height:103px;object-fit:cover;border-radius:7px}
.example-body{padding:7px 7px 3px}
.example-title{display:flex;align-items:center;gap:9px;min-height:30px}
.example-badge{background:#ffe0c2;color:#a73f00;border-radius:6px;padding:4px 9px;font-size:10px;white-space:nowrap}
.example-title h3{font-family:"Arial Narrow",Arial,sans-serif;font-size:13px;line-height:1.1;margin:0;color:#111}
.example-details{display:grid;grid-template-columns:minmax(0,1fr) 95px;gap:6px}
.example-details dl{margin:0;min-width:0}
.example-details dl div{display:grid;grid-template-columns:minmax(0,1fr) auto;align-items:center;gap:3px;min-height:22px;border-top:1px solid #e1e5e9;padding:1px 0;font-size:10px}
.example-details dt{display:flex;align-items:center;gap:4px;min-width:0;white-space:nowrap;letter-spacing:-.25px}
.example-details dt img{flex:none}
.example-run-icon{display:inline-flex;align-items:center;justify-content:center;flex:none;width:16px;font-size:18px;line-height:1}
.example-details dd{margin:0;white-space:nowrap;text-align:end}
.example-result{font-size:13px;color:#c64a00;font-weight:800;background:#fff0d2;border-radius:4px;padding:3px 5px}
.example-details p{font-size:10px;line-height:1.23;background:#fff6e5;border:1px solid #f9e8c8;border-radius:5px;padding:6px;margin:0}
.faq-section{min-height:236px}
.faq-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:0 26px;align-items:start}
.faq-column{display:flex;flex-direction:column;min-width:0}
.faq-item{border:1px solid #dbe1e8;background:#fff;min-width:0}
.faq-column .faq-item:first-child{border-radius:9px 9px 0 0}
.faq-column .faq-item:last-child{border-radius:0 0 9px 9px}
.faq-column .faq-item+.faq-item{border-top:0}
.faq-item h3{margin:0}
.faq-item button{width:100%;min-height:37px;background:transparent;border:0;padding:7px 10px;display:flex;align-items:center;gap:8px;text-align:start;font-size:13px;font-weight:700;line-height:1.15;color:#111}
.faq-item.open button{background:#fff0e7;color:#a74800}
.faq-prefix{font-weight:800;font-size:15px}
.faq-item button img{margin-inline-start:auto;flex:none;transition:transform .15s}
.faq-item.open button img{transform:rotate(180deg)}
.faq-item [role=region]{padding:8px 32px 10px;font-size:12px;line-height:1.25}
.faq-item [role=region] p{margin:0}
.site-footer{min-height:76px;background:linear-gradient(110deg,#222c40 0%,#222b41 55%,#1d263a 100%);color:white}
.ad-slot{max-width:960px;margin:20px auto;padding:12px;min-height:100px;overflow:hidden;text-align:center}
.footer-inner{max-width:1024px;margin:auto;padding:18px 24px;display:flex;align-items:center;gap:10px;min-width:0}
.footer-brand{color:white}
.footer-brand strong{font-family:"Arial Narrow",Arial,sans-serif;font-size:23px}
.footer-inner p{font-size:11px;line-height:1.2;width:200px;border-left:1px solid #a4adbb;padding-left:20px;margin:0}
.footer-inner nav{display:flex;align-items:center;gap:8px;flex:1;justify-content:center;flex-wrap:wrap}
.footer-inner a{color:white;text-decoration:none;font-size:12px}
.footer-ramp{flex:none}
.legal-main{max-width:850px;min-height:65vh;margin:0 auto;padding:55px 24px}
.legal-main h1{font-family:"Arial Narrow",Arial,sans-serif;font-size:34px;margin-left:30px}
.legal-main h1:before{left:-28px}
.legal-main p{line-height:1.7;max-width:760px}
.legal-main section{margin-top:30px}
.legal-main section h2{font-size:20px;line-height:1.35;margin:0 0 8px}
.legal-main section p{margin:0}
.legal-main a{color:#145b9d}
.legal-nav{display:flex;flex-wrap:wrap;gap:12px 20px;margin-top:35px}
.legal-main ul{line-height:2.2}
[dir=rtl] .section-mark:before{left:auto;right:-30px;transform:skewX(21deg)}
[dir=rtl] .section-heading h2,[dir=rtl] .hero h1,[dir=rtl] .hero p,[dir=rtl] .legal-main h1{margin-left:0;margin-right:30px}
[dir=rtl] .section-heading .section-mark:before{left:auto;right:-24px}
[dir=rtl] .field-help,[dir=rtl] .field-error{margin-left:0;margin-right:31px}
[dir=rtl] .hero:after{background:linear-gradient(270deg,#f8fafc 0%,#f8fafc 45%,rgba(248,250,252,.9) 55%,transparent 79%)}
[dir=rtl] .hero-photo{left:0;right:auto;-webkit-mask-image:linear-gradient(270deg,transparent,#000 16%);mask-image:linear-gradient(270deg,transparent,#000 16%)}
@media(min-width:1200px){[dir=rtl] .hero:after{background:linear-gradient(270deg,#f8fafc 0%,#f8fafc 64%,rgba(248,250,252,.55) 71%,rgba(248,250,252,.08) 80%,transparent 84%)}}
[dir=rtl] .footer-inner p{border-left:0;border-right:1px solid #a4adbb;padding-left:0;padding-right:20px}
@media(max-width:1023px){
  .header-inner{gap:10px}
  .brand-tagline{display:none}
  .brand-divider{display:none}
  .primary-nav{gap:18px}
  .calculator-shell{margin-left:12px;margin-right:12px;grid-template-columns:minmax(275px,1fr) minmax(250px,1fr);gap:12px}
  .visualization-column{grid-column:1 / -1;grid-row:2;padding:0;width:min(100%,400px);justify-self:center;margin-inline:auto}
  .visual-stage{height:330px}
  .results-column{grid-column:2;grid-row:1}
  .how-section{grid-template-columns:1fr}
  .how-section .section-heading{display:flex}
  .how-section .section-heading p{margin:0}
  .footer-ramp{display:none}
}
@media(min-width:768px) and (max-width:1023px){
  .hero{height:auto;min-height:123px}
  .hero:after{background:linear-gradient(90deg,#f8fafc 0%,#f8fafc 54%,rgba(248,250,252,.72) 72%,rgba(248,250,252,.1) 94%,transparent 100%)}
  [dir=rtl] .hero:after{background:linear-gradient(270deg,#f8fafc 0%,#f8fafc 54%,rgba(248,250,252,.72) 72%,rgba(248,250,252,.1) 94%,transparent 100%)}
}
@media(min-width:768px) and (max-width:899px){
  .guide-grid,.examples-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
  .guide-grid .notes-card{grid-column:1/-1;min-height:100px}
  .examples-grid .example-card:last-child{grid-column:1/-1;width:calc((100% - 12px)/2);justify-self:center}
  .faq-grid{grid-template-columns:1fr}
  .faq-column+.faq-column .faq-item:first-child{border-top:0;border-radius:0}
}
@media(max-width:767px){
  .site-header{height:auto;min-height:55px}
  .header-inner{min-height:55px;padding:5px 14px;flex-wrap:wrap}
  .brand strong{font-size:23px}
  .language-wrap{margin-inline-start:auto}
  .menu-toggle{display:block}
  .primary-nav{display:none;flex-basis:100%;order:5;height:auto;justify-content:flex-start;flex-wrap:wrap;gap:0;border-top:1px solid #e4e8ed;padding:5px 0}
  .primary-nav.open{display:flex}
  .primary-nav a{height:40px;padding:0 12px}
  .hero{height:auto;min-height:130px}
  .hero:after{background:linear-gradient(90deg,#f8fafc 0%,#f8fafc 30%,rgba(248,250,252,.8) 65%,rgba(248,250,252,.12) 90%,transparent 100%)}
  [dir=rtl] .hero:after{background:linear-gradient(270deg,#f8fafc 0%,#f8fafc 30%,rgba(248,250,252,.8) 65%,rgba(248,250,252,.12) 90%,transparent 100%)}
  .hero-inner{padding:24px 16px}
  .hero h1{font-size:clamp(25px,6vw,36px);letter-spacing:-1px;margin-left:25px}
  .hero p{font-size:13px;line-height:1.4;margin-left:27px}
  .hero .section-mark:before{left:-24px;height:25px}
  .calculator-shell{display:flex;flex-direction:column;gap:12px;margin:0 10px 12px;padding:12px}
  .input-column{padding:0}
  .tool-heading{margin-bottom:12px}
  .field-line{grid-template-columns:minmax(0,1fr) minmax(125px,145px)}
  .results-column{order:2;min-height:320px}
  .visualization-column{order:3;width:100%}
  .visual-stage{height:260px}
  .share-actions button{min-height:44px}
  .content-section{padding:18px 14px}
  .section-heading{display:block}
  .section-heading h2{margin-bottom:6px}
  .section-heading p{margin-left:27px}
  .how-section .section-heading{display:block}
  .how-section .section-heading p{margin-left:27px}
  .step-grid,.guide-grid,.examples-grid,.faq-grid{grid-template-columns:1fr}
  .step-grid{gap:9px}
  .step-card{min-height:75px}
  .step-card:not(:last-child):after{display:none}
  .guide-grid{gap:10px}
  .guide-card{min-height:unset}
  .formula-body{grid-template-columns:minmax(0,1fr) 130px}
  .formula-list{font-size:11px}
  .notes-list li{font-size:12px}
  .examples-grid{gap:12px}
  .example-card>img{height:auto;aspect-ratio:3/1}
  .example-details{grid-template-columns:minmax(0,1fr) minmax(100px,28%)}
  .example-badge{font-size:11px}
  .example-title h3{font-size:15px}
  .example-details dl div,.example-details p{font-size:11px;line-height:1.35}
  .example-result{font-size:14px}
  .faq-column+.faq-column .faq-item:first-child{border-top:0;border-radius:0}
  .faq-column:first-child .faq-item:last-child{border-radius:0}
  .footer-inner{flex-wrap:wrap;padding:18px 16px}
  .footer-inner p{width:auto;flex:1}
  .footer-inner nav{width:100%;flex:none;justify-content:flex-start;gap:12px 20px}
}
@media(max-width:479px){
  .formula-body{grid-template-columns:minmax(0,1fr)}
  .formula-example{width:min(100%,160px);min-height:90px;justify-self:end}
  .brand img{width:35px}
  .brand strong{font-size:21px}
  .language-wrap{height:40px}
  .language-wrap summary{font-size:12px}
  .language-options{position:fixed;top:55px;inset-inline-start:4px;inset-inline-end:auto;width:296px;max-width:calc(100% - 10px);max-height:min(486px,calc(100vh - 60px))}
  .hero{min-height:142px}
  .hero h1{font-size:26px;line-height:1.08}
  .hero p{font-size:12px}
  .mode{font-size:11px}
  .field-line{grid-template-columns:minmax(0,1fr) 130px}
  .field label{font-size:12px;gap:5px}
  .field label img{width:17px}
  .field-control input{width:78px;font-size:16px}
  .field-control select,.unit-static{width:52px}
  .visual-stage{height:240px}
  .visual-caption{flex-wrap:wrap}
  .result-highlight output{font-size:34px}
  .faq-item button{font-size:12px}
}
@media(max-width:360px){
  #field-slope label{white-space:normal;line-height:1.1}
  .hero-photo,.hero:after{display:none}
  .example-details{grid-template-columns:minmax(0,1fr)}
  .hero h1{max-width:225px}
  .header-inner{gap:6px}
  .brand{gap:4px}
  .brand strong{font-size:19px}
  .language-wrap summary{padding:0 4px;gap:4px}
  .language-globe{display:none}
  .field-line{grid-template-columns:1fr;gap:4px}
  .field-control input{flex:1;width:auto}
  .field-control select,.unit-static{width:64px}
  .field-help,.field-error{margin-left:0}
  .field{min-height:91px}
}
@media(prefers-reduced-motion:reduce){html{scroll-behavior:auto}.faq-item button img{transition:none}}
