:root{
    color-scheme:dark;
    --bg:#070c18;
    --bg-soft:#0c1223;
    --panel:#0f1729;
    --panel-2:#121c31;
    --panel-3:#161f36;
    --text:#f5f7fb;
    --muted:#a8b2c5;
    --line:rgba(255,255,255,.08);
    --line-strong:rgba(255,255,255,.13);
    --accent:#f2c14e;
    --accent-2:#ffd978;
    --green:#52d88f;
    --red:#ff7e88;
    --shadow:0 24px 60px rgba(0,0,0,.26);
    --radius:24px;
    --max:1180px;
    font-family:"IBM Plex Sans","Segoe UI",Arial,sans-serif;
}
*{box-sizing:border-box}
html{scroll-behavior:smooth}
body{
    margin:0;
    color:var(--text);
    background:
        radial-gradient(circle at 10% 0%,rgba(242,193,78,.08),transparent 30rem),
        radial-gradient(circle at 90% 20%,rgba(84,123,255,.07),transparent 25rem),
        linear-gradient(180deg,#060a15 0%,#091020 100%);
    line-height:1.6;
}
a{color:inherit;text-decoration:none}
button,input{font:inherit}
svg{display:block;max-width:100%}
.container{width:min(var(--max),calc(100% - 40px));margin-inline:auto}

.devbar{
    padding:8px 16px;
    text-align:center;
    background:linear-gradient(90deg,#5e4510,#7c5d16);
    color:#fff0bf;
    font-size:12px;
    font-weight:800;
}

/* HEADER */
.site-header{
    position:sticky;
    top:0;
    z-index:50;
    background:rgba(7,12,24,.88);
    border-bottom:1px solid var(--line);
    backdrop-filter:blur(18px);
}
.header-inner{
    width:min(var(--max),calc(100% - 40px));
    min-height:76px;
    margin:auto;
    display:flex;
    align-items:center;
    gap:28px;
}
.brand{
    display:inline-flex;
    align-items:center;
    gap:12px;
    font-weight:700;
    font-size:20px;
    letter-spacing:-.02em;
}
.brand-mark{
    display:grid;
    place-items:center;
    width:38px;
    height:38px;
    flex:0 0 38px;
    border-radius:12px;
    background:linear-gradient(180deg,var(--accent),#eeb93b);
    color:#17130a;
    box-shadow:0 12px 24px rgba(242,193,78,.18);
}
.brand-mark svg{width:19px;height:19px;fill:#17130a}

.main-nav{display:flex;gap:5px;margin-left:auto;align-items:center}
.main-nav a{
    display:inline-flex;
    align-items:center;
    gap:7px;
    padding:9px 11px;
    border-radius:11px;
    color:var(--muted);
    font-size:14px;
    font-weight:700;
}
.main-nav a:hover,.main-nav a.active{color:var(--text);background:rgba(255,255,255,.055)}
.nav-icon{width:16px!important;height:16px!important;fill:currentColor!important;flex:0 0 16px}
.nav-toggle{
    display:none;
    margin-left:auto;
    width:42px;
    height:42px;
    padding:0;
    border:1px solid var(--line);
    border-radius:12px;
    background:rgba(255,255,255,.03);
    color:#fff;
}
.nav-toggle svg{width:20px;height:20px;fill:currentColor;margin:auto}

/* GLOBAL ICON SIZING */
.inline-icon{width:15px!important;height:15px!important;fill:currentColor!important;flex:0 0 15px}
.category-icon svg,.feature-icon svg,.tool-card-icon svg,.page-hero-icon svg,
.step-icon svg,.source-card svg,.principle-card>svg,.result-icon svg{
    width:22px!important;
    height:22px!important;
    fill:currentColor!important;
}

/* HERO */
.home-hero{
    display:grid;
    grid-template-columns:minmax(0,1.12fr) minmax(330px,.88fr);
    gap:38px;
    padding:84px 0 58px;
    align-items:center;
}
.eyebrow,.section-kicker{
    display:block;
    color:var(--accent);
    font-size:12px;
    font-weight:700;
    letter-spacing:.075em;
    text-transform:uppercase;
}
.home-hero h1,.tool-hero h1,.page-top h1{
    margin:14px 0 20px;
    font-size:clamp(46px,7vw,82px);
    font-weight:700;
    line-height:1.03;
    letter-spacing:-.035em;
}
.home-hero h1 span{color:var(--accent)}
.hero-copy,.lead{
    max-width:780px;
    color:var(--muted);
    font-size:clamp(18px,2.1vw,22px);
    line-height:1.65;
}
.hero-actions{display:flex;gap:12px;margin-top:30px}
.btn{
    display:inline-flex;
    align-items:center;
    justify-content:center;
    min-height:50px;
    padding:0 18px;
    border:1px solid var(--line);
    border-radius:14px;
    font-weight:800;
}
.btn.primary{background:linear-gradient(180deg,var(--accent),#eeb93b);border-color:transparent;color:#17130a}
.btn.ghost{background:rgba(255,255,255,.03)}
.trust-row{display:flex;flex-wrap:wrap;gap:18px;margin-top:26px;color:#d9dfeb;font-size:14px}
.trust-row span,.hero-pill,.footer-mail,.info-chip,.mini-label{
    display:inline-flex;
    align-items:center;
    gap:8px;
}
.hero-stat-row{display:grid;grid-template-columns:repeat(3,1fr);gap:12px;margin-top:32px}
.hero-stat{
    padding:18px;
    border:1px solid var(--line);
    border-radius:18px;
    background:linear-gradient(180deg,rgba(255,255,255,.05),rgba(255,255,255,.025));
}
.hero-stat strong{display:block;font-size:26px;letter-spacing:-.04em}
.hero-stat span{display:block;margin-top:5px;color:var(--muted);font-size:13px}

.hero-visual{display:grid;gap:16px}
.hero-card-row{display:grid;grid-template-columns:1fr 1fr;gap:16px}
.hero-panel{
    position:relative;
    overflow:hidden;
    padding:22px;
    border:1px solid var(--line-strong);
    border-radius:24px;
    background:linear-gradient(180deg,rgba(17,24,42,.96),rgba(12,18,34,.96));
    box-shadow:var(--shadow);
}
.hero-panel:before{
    content:"";
    position:absolute;
    right:-45px;
    bottom:-45px;
    width:130px;
    height:130px;
    border-radius:50%;
    background:radial-gradient(circle,rgba(242,193,78,.15),transparent 65%);
}
.hero-panel.big{min-height:280px;display:flex;flex-direction:column;gap:8px}
.hero-panel.small{min-height:176px}
.mini-label{color:var(--accent-2);font-size:12px;font-weight:800;letter-spacing:.08em;text-transform:uppercase}
.hero-panel strong{display:block;font-size:25px;line-height:1.18;letter-spacing:-.04em}
.hero-panel p{margin:4px 0 0;color:var(--muted);font-size:14px;max-width:38ch}
.hero-bars{display:flex;align-items:flex-end;gap:12px;margin-top:auto;min-height:88px}
.hero-bars span{
    width:16px;
    min-height:8px;
    border-radius:999px 999px 2px 2px;
    background:linear-gradient(180deg,var(--accent),#e9a600);
    box-shadow:0 8px 18px rgba(242,193,78,.18);
}

/* SECTIONS */
.section{padding:70px 0}
.section-space-tight{padding-top:24px}
.section-head{display:flex;align-items:end;justify-content:space-between;gap:24px;margin-bottom:25px}
.section-head h2,.split-section h2,.related-section h2,.trust-intro h2{
    margin:8px 0 5px 0;
    font-size:clamp(30px,4vw,48px);
    font-weight:700;
    line-height:1.12;
    letter-spacing:-.025em;
}

/* CATEGORIES */
.category-grid{display:grid;grid-template-columns:repeat(5,1fr);gap:14px}
.category-card{
    min-height:190px;
    padding:22px;
    border:1px solid var(--line);
    border-radius:22px;
    background:linear-gradient(160deg,rgba(255,255,255,.05),rgba(255,255,255,.015));
    display:flex;
    flex-direction:column;
    gap:10px;
    transition:.18s ease;
}
.category-card:hover,.tool-card:hover,.feature-card:hover,.source-card:hover{
    border-color:rgba(242,193,78,.35);
    transform:translateY(-2px);
}
.category-icon,.feature-icon,.tool-card-icon,.page-hero-icon,.step-icon,.result-icon{
    display:grid;
    place-items:center;
    width:46px;
    height:46px;
    flex:0 0 46px;
    border-radius:14px;
    background:rgba(242,193,78,.11);
    color:var(--accent);
}
.category-card strong{font-size:19px;letter-spacing:-.02em}
.category-card small{color:var(--muted);font-size:14px;line-height:1.5}
.category-link{margin-top:auto;color:var(--accent-2);font-weight:800;font-size:13px}

/* FEATURED */
.featured-grid{display:grid;grid-template-columns:repeat(2,1fr);gap:16px}
.feature-card{
    min-height:180px;
    padding:22px;
    border:1px solid var(--line);
    border-radius:22px;
    background:linear-gradient(155deg,var(--panel),var(--panel-2));
    display:grid;
    grid-template-columns:auto 1fr;
    gap:16px;
    align-items:start;
    transition:.18s ease;
}
.feature-card .tool-link{grid-column:2}
.feature-card h3,.tool-card h3,.tool-card h2{
    margin:9px 0 8px;
    font-size:21px;
    line-height:1.24;
    letter-spacing:-.03em;
}
.feature-card p,.tool-card p{margin:0;color:var(--muted);font-size:14px}
.tool-category{color:var(--accent);font-size:11px;font-weight:900;text-transform:uppercase;letter-spacing:.08em}
.tool-link{margin-top:auto;padding-top:18px;color:var(--accent-2);font-weight:800;font-size:14px}

/* STEPS */
.split-section{
    width:min(var(--max),calc(100% - 40px));
    margin:10px auto 54px;
    padding:34px;
    border:1px solid var(--line);
    border-radius:28px;
    background:linear-gradient(160deg,var(--panel-2),var(--panel));
    display:grid;
    grid-template-columns:.72fr 1.28fr;
    gap:34px;
}
.steps-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:14px}
.step-card{
    padding:20px;
    border:1px solid var(--line);
    border-radius:20px;
    background:rgba(255,255,255,.03);
}
.step-icon{margin-bottom:14px}
.step-card strong{display:block;font-size:17px;letter-spacing:-.03em}
.step-card p,.trust-intro p,.principle-card p,.legal-content p,.article-content p,.article-content li{
    color:var(--muted);
    font-size:15px;
}

/* SEARCH / TOOL CARDS */
.search-box{
    display:flex;
    align-items:center;
    gap:8px;
    width:min(360px,100%);
    padding:0 14px;
    border:1px solid var(--line);
    border-radius:14px;
    background:rgba(255,255,255,.03);
}
.search-box input{width:100%;height:48px;background:transparent;border:0;outline:0;color:#fff}
.page-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:16px}
.tool-card{
    min-height:225px;
    padding:22px;
    border:1px solid var(--line);
    border-radius:20px;
    background:linear-gradient(160deg,var(--panel),var(--panel-2));
    transition:.18s ease;
    display:flex;
    flex-direction:column;
}
.tool-card[hidden]{display:none}
.tool-card-icon{margin-bottom:12px}

/* TRUST PANEL */
.trust-panel-wrap{padding-top:24px;padding-bottom:88px}
.trust-panel{
    padding:34px;
    border:1px solid var(--line);
    border-radius:28px;
    background:linear-gradient(160deg,rgba(255,255,255,.03),rgba(255,255,255,.015));
}
.principles-grid{display:grid;grid-template-columns:repeat(4,1fr);gap:14px;margin-top:24px}
.principle-card{
    padding:20px;
    border:1px solid var(--line);
    border-radius:20px;
    background:rgba(11,17,31,.7);
}
.principle-card>svg{color:var(--accent);margin-bottom:14px}
.principle-card strong{display:block;font-size:17px;letter-spacing:-.03em}

/* CATEGORY / LEGAL HERO */
.page-top{padding-top:68px}
.page-hero-card{
    display:grid;
    grid-template-columns:auto 1fr;
    gap:20px;
    align-items:center;
    padding:28px;
    border:1px solid var(--line);
    border-radius:24px;
    background:linear-gradient(160deg,var(--panel),var(--panel-2));
}
.page-hero-card h1{margin:8px 0 8px}
.legal-hero{margin-bottom:28px}
.backlink{display:inline-block;margin-bottom:20px;color:var(--muted);font-size:14px}

/* TOOL PAGE */
.tool-hero{padding:58px 0 28px}
.tool-hero-grid{display:grid;grid-template-columns:1.1fr .9fr;gap:22px;align-items:start}
.hero-pill-row{display:flex;flex-wrap:wrap;gap:10px;margin-top:24px}
.hero-pill{
    padding:9px 12px;
    border:1px solid var(--line);
    border-radius:999px;
    background:rgba(255,255,255,.03);
    color:#d6ddea;
    font-size:13px;
    font-weight:700;
}
.tool-hero-note{
    padding:22px;
    border:1px solid var(--line);
    border-radius:24px;
    background:linear-gradient(160deg,var(--panel),rgba(255,255,255,.025));
    display:flex;
    flex-direction:column;
    gap:12px;
}
.tool-hero-note strong{font-size:23px;letter-spacing:-.04em}
.tool-hero-note p{margin:0;color:var(--muted)}

.calculator-layout{
    display:grid;
    grid-template-columns:minmax(0,1.35fr) minmax(330px,.65fr);
    gap:18px;
    align-items:start;
    padding-bottom:46px;
}
.calculator-card,.result-card,.info-card{
    border:1px solid var(--line);
    border-radius:var(--radius);
    background:linear-gradient(160deg,var(--panel),var(--panel-2));
}
.calculator-card,.result-card{padding:28px;box-shadow:var(--shadow)}
.result-card{position:sticky;top:98px;background:linear-gradient(160deg,var(--panel-3),#101827)}
.result-top{display:flex;gap:14px;align-items:flex-start;margin-bottom:16px}

.calc-head{display:flex;align-items:start;justify-content:space-between;gap:20px}
.calc-head h2{margin:7px 0 0;font-size:30px;font-weight:700;line-height:1.18;letter-spacing:-.02em}
.calc-badge{padding:5px 9px;border-radius:999px;background:rgba(82,216,143,.1);color:var(--green);font-size:11px;font-weight:900}
.calc-note{color:var(--muted);font-size:14px;max-width:760px}
.calc-form{display:grid;grid-template-columns:1fr 1fr;gap:16px;margin-top:24px}
.calc-field{display:block}
.field-label{display:block;margin-bottom:8px;color:#dce2ed;font-size:13px;font-weight:800}
.input-wrap{
    display:flex;
    align-items:center;
    height:50px;
    border:1px solid var(--line);
    border-radius:13px;
    background:#0a1120;
    overflow:hidden;
}
.input-wrap:focus-within{border-color:rgba(242,193,78,.55);box-shadow:0 0 0 3px rgba(242,193,78,.08)}
.input-wrap input{min-width:0;flex:1;height:100%;padding:0 13px;border:0;outline:0;background:transparent;color:#fff;font-weight:800}
.unit{padding-right:12px;color:#8490a4;font-size:12px}
.calc-field small{display:block;margin-top:5px;color:#728096;font-size:11px}

.verdict{margin:4px 0 0;font-size:22px;font-weight:700;line-height:1.25;letter-spacing:-.02em}
.verdict.good{color:var(--green)}
.verdict.bad{color:var(--red)}
.verdict.warn{color:var(--accent-2)}
.result-metrics{display:grid;gap:6px}
.metric{display:flex;justify-content:space-between;gap:18px;padding:12px 0;border-bottom:1px solid var(--line)}
.metric span{color:var(--muted);font-size:13px}
.metric strong{text-align:right}
.result-explain{margin:20px 0 0;color:var(--muted);font-size:13px}

/* ARTICLE */
.content-grid{display:grid;grid-template-columns:minmax(0,1fr) 260px;gap:44px;padding:10px 0 64px}
.article-content{max-width:790px}
.article-content h2,.legal-content h2{margin:40px 0 12px;font-size:30px;font-weight:700;line-height:1.2;letter-spacing:-.02em}
.check-list{padding-left:0;list-style:none}
.check-list li{position:relative;padding:8px 0 8px 28px}
.check-list li:before{content:"✓";position:absolute;left:0;color:var(--accent);font-weight:900}
.method-box,.notice{margin-top:30px;padding:20px;border:1px solid var(--line);border-radius:18px;background:rgba(255,255,255,.025)}
.method-box strong{display:flex;align-items:center;gap:8px}
.method-box p{margin-bottom:0}
.method-box a,.legal-content a{color:var(--accent-2);text-decoration:underline;text-underline-offset:3px}
.side-info{display:grid;gap:12px;align-content:start}
.info-card{padding:18px}
.info-card strong{display:flex;align-items:center;gap:8px;font-size:15px}
.info-card span{display:block;margin-top:8px;color:var(--muted);font-size:13px}
.related-section{padding-bottom:84px}
.compact-grid .tool-card{min-height:195px}

/* LEGAL */
.legal-page{max-width:920px}
.legal-content{max-width:760px}
.info-strip{display:flex;flex-wrap:wrap;gap:10px;margin-bottom:18px}
.info-chip{
    padding:9px 12px;
    border:1px solid var(--line);
    border-radius:999px;
    background:rgba(255,255,255,.03);
    color:#d9dfeb;
    font-size:13px;
    font-weight:700;
}
.source-list{display:grid;grid-template-columns:1fr 1fr;gap:14px;margin:20px 0 26px}
.source-card{
    padding:18px;
    border:1px solid var(--line);
    border-radius:18px;
    background:linear-gradient(160deg,var(--panel),var(--panel-2));
    display:flex;
    gap:12px;
    align-items:flex-start;
}
.source-card svg{color:var(--accent);flex:0 0 22px}
.notice.warning{border-color:rgba(242,193,78,.25);color:#e8d6a5}

/* FOOTER */
.site-footer{border-top:1px solid var(--line);background:#060a14}
.footer-grid{
    width:min(var(--max),calc(100% - 40px));
    margin:auto;
    padding:52px 0 38px;
    display:grid;
    grid-template-columns:1.3fr 1fr 1fr .8fr;
    gap:36px;
}
.footer-grid>div{display:flex;flex-direction:column;gap:9px}
.footer-grid strong{font-size:12px;text-transform:uppercase;letter-spacing:.08em;color:#768396}
.footer-grid a:not(.brand),.footer-grid p{color:var(--muted);font-size:14px}
.footer-mail{margin-top:8px;color:#d6ddea;font-weight:700}
.footer-bottom{
    width:min(var(--max),calc(100% - 40px));
    margin:auto;
    padding:18px 0 28px;
    border-top:1px solid var(--line);
    color:#667286;
    font-size:12px;
}



/* GLOBAL SEARCH */
body.search-open{overflow:hidden}

.global-search-trigger{
    display:inline-flex;
    align-items:center;
    gap:8px;
    flex:0 0 auto;
    min-height:40px;
    padding:0 10px;
    border:1px solid var(--line);
    border-radius:11px;
    background:rgba(255,255,255,.035);
    color:var(--muted);
    cursor:pointer;
    transition:.18s ease;
}
.global-search-trigger:hover{
    color:var(--text);
    border-color:rgba(242,193,78,.3);
    background:rgba(255,255,255,.06);
}
.global-search-trigger-icon{
    width:16px!important;
    height:16px!important;
    fill:currentColor!important;
}
.global-search-trigger-label{
    font-size:13px;
    font-weight:800;
}
.global-search-trigger kbd,
.global-search-key{
    padding:2px 6px;
    border:1px solid var(--line-strong);
    border-bottom-color:rgba(255,255,255,.2);
    border-radius:6px;
    background:rgba(255,255,255,.04);
    color:#79869b;
    font:700 10px/1.5 ui-monospace,SFMono-Regular,Consolas,monospace;
}

.global-search-layer[hidden]{display:none!important}
.global-search-layer{
    position:fixed;
    inset:0;
    z-index:200;
    display:grid;
    place-items:start center;
    padding:92px 18px 28px;
}
.global-search-backdrop{
    position:absolute;
    inset:0;
    width:100%;
    height:100%;
    border:0;
    padding:0;
    background:rgba(2,6,15,.78);
    backdrop-filter:blur(8px);
    cursor:default;
}
.global-search-panel{
    position:relative;
    z-index:1;
    width:min(760px,100%);
    max-height:min(700px,calc(100vh - 120px));
    overflow:hidden;
    border:1px solid var(--line-strong);
    border-radius:24px;
    background:linear-gradient(180deg,#111a2d,#0c1425);
    box-shadow:0 38px 100px rgba(0,0,0,.55);
}
.global-search-top{
    display:flex;
    gap:10px;
    align-items:center;
    padding:16px;
    border-bottom:1px solid var(--line);
}
.global-search-input-wrap{
    min-width:0;
    flex:1;
    display:flex;
    align-items:center;
    gap:11px;
    height:52px;
    padding:0 14px;
    border:1px solid var(--line);
    border-radius:15px;
    background:#09111f;
}
.global-search-input-icon{
    width:20px!important;
    height:20px!important;
    fill:var(--accent)!important;
    flex:0 0 20px;
}
.global-search-input-wrap input{
    min-width:0;
    width:100%;
    border:0;
    outline:0;
    background:transparent;
    color:var(--text);
    font-size:16px;
}
.global-search-input-wrap input::placeholder{color:#708097}
.global-search-close{
    display:grid;
    place-items:center;
    width:46px;
    height:46px;
    flex:0 0 46px;
    padding:0;
    border:1px solid var(--line);
    border-radius:13px;
    background:rgba(255,255,255,.03);
    color:var(--muted);
    cursor:pointer;
}
.global-search-close:hover{color:var(--text);background:rgba(255,255,255,.06)}
.global-search-close svg{width:18px;height:18px;fill:currentColor}
.global-search-caption{
    padding:14px 18px 2px;
    color:#dbe3ef;
    font-size:13px;
    font-weight:900;
}
.global-search-status{
    min-height:28px;
    padding:3px 18px 8px;
    color:#77859b;
    font-size:12px;
}
.global-search-results{
    max-height:min(480px,calc(100vh - 300px));
    overflow:auto;
    padding:0 10px 10px;
}
.global-search-result{
    display:grid;
    grid-template-columns:42px minmax(0,1fr) auto;
    gap:12px;
    align-items:center;
    padding:12px;
    border:1px solid transparent;
    border-radius:15px;
}
.global-search-result:hover,
.global-search-result.active{
    border-color:rgba(242,193,78,.24);
    background:rgba(242,193,78,.07);
}
.global-search-result-icon{
    display:grid;
    place-items:center;
    width:42px;
    height:42px;
    border-radius:12px;
    background:rgba(242,193,78,.11);
    color:var(--accent);
    font-size:18px;
    font-weight:900;
}
.global-search-result-copy{
    min-width:0;
    display:flex;
    flex-direction:column;
    gap:2px;
}
.global-search-result-copy strong{
    overflow:hidden;
    color:#f4f7fb;
    font-size:15px;
    text-overflow:ellipsis;
    white-space:nowrap;
}
.global-search-result-copy span{
    overflow:hidden;
    color:#8f9bb0;
    font-size:12px;
    text-overflow:ellipsis;
    white-space:nowrap;
}
.global-search-result-arrow{
    color:#68758a;
    font-weight:900;
}
.global-search-result:hover .global-search-result-arrow,
.global-search-result.active .global-search-result-arrow{color:var(--accent)}
.global-search-empty{
    margin:4px;
    padding:24px;
    border:1px dashed var(--line-strong);
    border-radius:16px;
    color:var(--muted);
    text-align:center;
}
.global-search-footer{
    display:flex;
    gap:16px;
    flex-wrap:wrap;
    padding:11px 18px 13px;
    border-top:1px solid var(--line);
    color:#657287;
    font-size:11px;
}



@media(max-width:1180px){
    .global-search-trigger{margin-left:auto}
    .nav-toggle{margin-left:0;display:grid;place-items:center}
    .main-nav{
        display:none;
        position:absolute;
        top:76px;
        left:20px;
        right:20px;
        z-index:80;
        padding:10px;
        background:#0d1525;
        border:1px solid var(--line);
        border-radius:16px;
        flex-direction:column;
        box-shadow:0 24px 60px rgba(0,0,0,.36);
    }
    .main-nav.open{display:flex}
    .main-nav a{width:100%}
}

/* RESPONSIVE */
@media(max-width:1080px){
    .global-search-trigger kbd{display:none}
    .category-grid{grid-template-columns:repeat(3,1fr)}
    .page-grid{grid-template-columns:repeat(2,1fr)}
    .featured-grid{grid-template-columns:1fr}
    .principles-grid{grid-template-columns:repeat(2,1fr)}
    .footer-grid{grid-template-columns:1.4fr 1fr 1fr}
}
@media(max-width:980px){
    .global-search-trigger{margin-left:auto}
    .nav-toggle{margin-left:0}
    .main-nav{
        display:none;
        position:absolute;
        top:76px;
        left:20px;
        right:20px;
        padding:10px;
        background:#0d1525;
        border:1px solid var(--line);
        border-radius:16px;
        flex-direction:column;
    }
    .main-nav.open{display:flex}
    .nav-toggle{display:grid;place-items:center}
    .home-hero,.tool-hero-grid,.split-section,.calculator-layout,.content-grid{grid-template-columns:1fr}
    .result-card{position:relative;top:auto}
    .steps-grid{grid-template-columns:1fr}
    .source-list{grid-template-columns:1fr}
    .footer-grid{grid-template-columns:1fr 1fr}
}
@media(max-width:720px){
    .global-search-trigger{width:42px;height:42px;padding:0;justify-content:center}
    .global-search-trigger-label{display:none}
    .global-search-layer{padding:72px 10px 10px}
    .global-search-panel{max-height:calc(100vh - 82px);border-radius:20px}
    .global-search-results{max-height:calc(100vh - 270px)}
    .global-search-key{display:none}
    .global-search-footer{display:none}
    .container,.header-inner,.split-section,.footer-grid,.footer-bottom{width:min(100% - 24px,var(--max))}
    .home-hero{padding:56px 0 42px}
    .home-hero h1,.tool-hero h1,.page-top h1{font-size:44px}
    .hero-actions{flex-direction:column;align-items:flex-start}
    .hero-stat-row,.category-grid,.page-grid,.calc-form,.featured-grid,.hero-card-row,.principles-grid{grid-template-columns:1fr}
    .section{padding:52px 0}
    .section-head{flex-direction:column;align-items:stretch}
    .search-box{width:100%}
    .split-section{margin-top:10px;padding:26px 22px}
    .trust-panel{padding:26px}
    .calculator-card,.result-card{padding:20px}
    .page-hero-card{padding:22px;grid-template-columns:1fr}
    .side-info{grid-template-columns:1fr 1fr}
    .footer-grid{grid-template-columns:1fr}
}


/* Category page spacing */
.category-page-grid{margin-top:22px}


/* Human input system */
.calc-group-title{
    grid-column:1/-1;
    margin:10px 0 -4px;
    padding-top:8px;
    border-top:1px solid rgba(255,255,255,.07);
    color:#f4c95d;
    font-size:12px;
    font-weight:900;
    letter-spacing:.08em;
    text-transform:uppercase;
}
.calc-group-title:first-child{margin-top:0;padding-top:0;border-top:0}
.calc-field[hidden]{display:none!important}
.input-wrap select{
    width:100%;
    height:100%;
    padding:0 42px 0 13px;
    border:0;
    outline:0;
    appearance:none;
    background:transparent;
    color:#fff;
    font:inherit;
    font-weight:800;
    cursor:pointer;
}
.select-wrap{position:relative}
.select-wrap::after{
    content:"";
    position:absolute;
    right:15px;
    top:50%;
    width:8px;
    height:8px;
    border-right:2px solid #8f9bb0;
    border-bottom:2px solid #8f9bb0;
    transform:translateY(-70%) rotate(45deg);
    pointer-events:none;
}
.input-wrap select option{background:#111a2b;color:#fff}
.calc-field-checkbox{grid-column:1/-1}
.checkbox-wrap{
    display:flex;
    align-items:flex-start;
    gap:12px;
    min-height:54px;
    padding:13px 15px;
    border:1px solid var(--line);
    border-radius:14px;
    background:#0b1322;
    cursor:pointer;
}
.checkbox-wrap input{
    position:absolute;
    opacity:0;
    pointer-events:none;
}
.checkbox-ui{
    width:20px;
    height:20px;
    margin-top:1px;
    flex:0 0 auto;
    border:1px solid #4b5a72;
    border-radius:6px;
    background:#0a101c;
    position:relative;
}
.checkbox-wrap input:checked + .checkbox-ui{
    border-color:#e8bb4e;
    background:#e8bb4e;
}
.checkbox-wrap input:checked + .checkbox-ui::after{
    content:"";
    position:absolute;
    left:6px;
    top:2px;
    width:5px;
    height:10px;
    border-right:2px solid #111827;
    border-bottom:2px solid #111827;
    transform:rotate(45deg);
}
.checkbox-copy{display:flex;flex-direction:column;gap:3px;color:#dce3ee}
.checkbox-copy strong{font-size:13px}
.checkbox-copy small{margin:0;color:#7d8aa0;font-size:11px}
.calc-advanced{
    grid-column:1/-1;
    margin-top:4px;
    border:1px solid rgba(255,255,255,.08);
    border-radius:15px;
    background:rgba(7,12,22,.45);
    overflow:hidden;
}
.calc-advanced summary{
    list-style:none;
    display:flex;
    align-items:center;
    justify-content:space-between;
    gap:15px;
    padding:15px 16px;
    cursor:pointer;
    color:#dce3ee;
    font-size:13px;
    font-weight:850;
}
.calc-advanced summary::-webkit-details-marker{display:none}
.calc-advanced summary::after{
    content:"+";
    width:24px;
    height:24px;
    display:grid;
    place-items:center;
    border-radius:50%;
    background:rgba(255,255,255,.06);
    color:#f4c95d;
    font-size:18px;
    line-height:1;
}
.calc-advanced[open] summary::after{content:"−"}
.calc-advanced summary small{
    margin-left:auto;
    color:#708097;
    font-size:11px;
    font-weight:600;
}
.calc-advanced-grid{
    display:grid;
    grid-template-columns:1fr 1fr;
    gap:16px;
    padding:4px 16px 16px;
    border-top:1px solid rgba(255,255,255,.06);
}
@media(max-width:780px){
    .calc-advanced summary small{display:none}
    .calc-advanced-grid{grid-template-columns:1fr}
}


/* Human UX Phase 2 */
.calc-field > small{
    display:block;
    margin-top:6px;
    color:#7f8da3;
    font-size:11px;
    line-height:1.45;
}
.calc-group-title + .calc-field{margin-top:0}


/* SHARE */
.result-share{
    position:relative;
    display:flex;
    justify-content:flex-end;
    align-items:center;
    gap:10px;
    margin-top:18px;
    padding-top:16px;
    border-top:1px solid var(--line);
}
.share-calculator{
    display:inline-flex;
    align-items:center;
    gap:8px;
    min-height:40px;
    padding:9px 14px;
    border:1px solid rgba(242,193,78,.30);
    border-radius:10px;
    background:var(--accent);
    color:#111722;
    cursor:pointer;
    font-size:13px;
    font-weight:700;
    box-shadow:0 10px 28px rgba(0,0,0,.18);
}
.share-calculator:hover{
    filter:brightness(1.04);
}
.share-calculator svg{color:#111722}
.share-status{
    position:absolute;
    right:0;
    bottom:-24px;
    color:var(--muted);
    font-size:12px;
}
.share-popover{
    position:absolute;
    right:0;
    bottom:calc(100% + 10px);
    z-index:60;
    width:268px;
    padding:12px;
    border:1px solid var(--line-strong);
    border-radius:16px;
    background:#f8fafc;
    color:#1c2b40;
    box-shadow:0 24px 60px rgba(0,0,0,.28);
}
.share-popover[hidden]{display:none!important}
.share-popover-title{
    padding:4px 5px 10px;
    color:#24354d;
    font-size:11px;
    font-weight:800;
    letter-spacing:.06em;
}
.share-option{
    width:100%;
    display:flex;
    align-items:center;
    gap:11px;
    min-height:42px;
    padding:7px 8px;
    border:0;
    border-radius:9px;
    background:transparent;
    color:#344b67;
    cursor:pointer;
    text-align:left;
    font:inherit;
    font-size:13px;
    font-weight:600;
}
.share-option:hover{
    background:#edf3f8;
}
.share-option-icon{
    width:26px;
    height:26px;
    flex:0 0 auto;
    display:grid;
    place-items:center;
    border:1px solid #d9e4ee;
    border-radius:50%;
    background:#f4f8fb;
    color:#2878c8;
    font-size:13px;
    font-weight:800;
    line-height:1;
}
.share-facebook{font-family:Arial,sans-serif;font-size:17px}
.share-x{font-family:Arial,sans-serif;font-size:12px}
.share-telegram{font-size:12px;transform:none}
.share-whatsapp{font-size:15px}
.share-email{font-size:13px}
.share-copy{font-size:13px}
@media(max-width:680px){
    .result-share{
        justify-content:flex-end;
    }
    .share-popover{
        right:0;
        width:min(280px,calc(100vw - 42px));
    }
}

/* DESKTOP BACK TO TOP */
.back-to-top{
    position:fixed;
    right:24px;
    bottom:24px;
    z-index:45;
    width:44px;
    height:44px;
    display:none;
    place-items:center;
    padding:0;
    border:1px solid var(--line-strong);
    border-radius:12px;
    background:rgba(11,16,32,.92);
    color:var(--text);
    box-shadow:0 12px 32px rgba(0,0,0,.25);
    cursor:pointer;
    font-size:22px;
    line-height:1;
    opacity:0;
    transform:translateY(8px);
    transition:opacity .18s ease,transform .18s ease,background .18s ease;
}
.back-to-top.is-visible{
    opacity:1;
    transform:translateY(0);
}
.back-to-top:hover{
    background:#141d31;
    border-color:rgba(242,193,78,.4);
}
@media(min-width:981px){
    .back-to-top{display:grid}
}
@media(max-width:980px){
    .back-to-top{display:none!important}
}
