:root{
  --bg:#f6f8fb;
  --card:#fff;
  --text:#101827;
  --muted:#627086;
  --brand:#1d4ed8;
  --brand-dark:#153e9f;
  --accent:#0f766e;
  --line:#dce5f1;
  --soft:#eef5ff;
  --soft2:#f0fdfa;
  --shadow:0 18px 45px rgba(15,23,42,.08);
  --radius:24px;
}
*{box-sizing:border-box}
html{scroll-behavior:smooth}
body{
  margin:0;
  font-family:Arial,Helvetica,sans-serif;
  background:var(--bg);
  color:var(--text);
  line-height:1.65;
  overflow-x:hidden;
}
a{color:var(--brand);text-decoration:none}
a:hover{text-decoration:underline}
img{max-width:100%;height:auto}
.container{width:min(1140px,calc(100% - 36px));margin:0 auto}

/* Header */
.site-header{
  position:sticky;
  top:0;
  z-index:50;
  background:rgba(255,255,255,.96);
  border-bottom:1px solid var(--line);
  backdrop-filter:blur(12px);
}
.nav{
  min-height:74px;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:22px;
  position:relative;
}
.logo{
  color:var(--text);
  font-weight:900;
  font-size:18px;
  letter-spacing:-.4px;
  white-space:nowrap;
}
.logo span{color:var(--brand)}
.site-nav{
  display:flex;
  align-items:center;
  gap:18px;
}
.site-nav a{
  color:#334155;
  font-size:14px;
  font-weight:900;
}
.site-nav a:hover{color:var(--brand);text-decoration:none}
.menu-toggle{
  display:none;
  width:44px;
  height:44px;
  border:1px solid var(--line);
  border-radius:14px;
  background:#fff;
  cursor:pointer;
  align-items:center;
  justify-content:center;
  flex-direction:column;
}
.menu-toggle span{
  display:block;
  width:20px;
  height:2px;
  background:#111827;
  border-radius:99px;
  margin:3px 0;
}

/* Typography */
.eyebrow{
  margin:0 0 10px;
  color:var(--brand-dark);
  font-size:13px;
  font-weight:900;
  text-transform:uppercase;
  letter-spacing:.13em;
}
h1,h2,h3{color:var(--text)}
h1{
  font-size:clamp(38px,6vw,68px);
  line-height:1.02;
  letter-spacing:-2.2px;
  margin:10px 0 18px;
}
h2{
  font-size:clamp(28px,4vw,40px);
  line-height:1.15;
  letter-spacing:-1px;
  margin:0 0 10px;
}
h3{
  font-size:21px;
  line-height:1.28;
  letter-spacing:-.45px;
}
.lead{
  max-width:780px;
  color:var(--muted);
  font-size:20px;
  margin:0 0 24px;
}

/* Hero */
.hero{
  background:
    radial-gradient(circle at top right,rgba(29,78,216,.15),transparent 34%),
    linear-gradient(180deg,#fff,var(--soft));
  border-bottom:1px solid var(--line);
}
.hero .container{padding:76px 0}
.hero-grid{
  display:grid;
  grid-template-columns:minmax(0,1.35fr) minmax(300px,.65fr);
  gap:34px;
  align-items:center;
}
.hero-actions{
  display:flex;
  gap:12px;
  flex-wrap:wrap;
  margin:28px 0 22px;
}
.btn{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  border-radius:999px;
  padding:13px 18px;
  min-height:46px;
  font-size:14px;
  font-weight:900;
  border:1px solid transparent;
}
.btn:hover{text-decoration:none}
.btn-primary{background:var(--brand);color:#fff;box-shadow:0 12px 24px rgba(29,78,216,.18)}
.btn-primary:hover{background:var(--brand-dark)}
.btn-secondary{background:#fff;color:var(--text);border-color:var(--line)}
.trust-row{
  display:flex;
  gap:10px;
  flex-wrap:wrap;
}
.trust-row span{
  background:#fff;
  border:1px solid var(--line);
  color:#43536b;
  border-radius:999px;
  padding:8px 11px;
  font-size:13px;
  font-weight:900;
}
.hero-panel{
  background:rgba(255,255,255,.9);
  border:1px solid var(--line);
  border-radius:28px;
  padding:26px;
  box-shadow:var(--shadow);
}
.panel-label{
  margin:0 0 8px;
  color:var(--accent);
  font-size:13px;
  font-weight:900;
  text-transform:uppercase;
  letter-spacing:.12em;
}
.hero-panel h2{font-size:28px}
.check-list{
  padding:0;
  margin:18px 0;
  list-style:none;
}
.check-list li{
  position:relative;
  padding:10px 0 10px 30px;
  border-bottom:1px solid var(--line);
  color:#334155;
  font-weight:800;
}
.check-list li:before{
  content:"✓";
  position:absolute;
  left:0;
  color:var(--accent);
  font-weight:900;
}

/* Sections */
.section{padding:56px 0}
.section-head{max-width:760px;margin-bottom:24px}
.section-head p{color:var(--muted);margin:0}
.grid,.guide-grid{
  display:grid;
  grid-template-columns:repeat(3,minmax(0,1fr));
  gap:18px;
}
.card,.guide-card{
  background:#fff;
  border:1px solid var(--line);
  border-radius:var(--radius);
  padding:24px;
  box-shadow:0 12px 30px rgba(15,23,42,.045);
}
.card h3,.guide-card h3{margin:8px 0 10px}
.card h3 a,.guide-card h3 a{color:var(--text)}
.card p,.guide-card p{color:var(--muted);margin:0 0 14px}
.cat{
  color:var(--brand-dark)!important;
  font-size:12px;
  font-weight:900;
  text-transform:uppercase;
  letter-spacing:.09em;
}
.card-link,.text-link{font-weight:900;color:var(--brand-dark)}
.featured-grid{
  display:grid;
  grid-template-columns:1.15fr .85fr;
  gap:18px;
}
.guide-card-large{
  grid-row:span 2;
  padding:30px;
  background:linear-gradient(180deg,rgba(238,245,255,.85),#fff);
}
.guide-card-large h3{font-size:30px}
.topic-band{
  background:#fff;
  border-block:1px solid var(--line);
}
.topic-grid{
  display:grid;
  grid-template-columns:repeat(5,minmax(0,1fr));
  gap:14px;
}
.topic-card{
  display:block;
  min-height:170px;
  background:linear-gradient(180deg,#fff,var(--soft));
  border:1px solid var(--line);
  border-radius:22px;
  padding:20px;
  color:var(--text);
}
.topic-card:hover{text-decoration:none;border-color:#b9c9dd}
.topic-card strong{
  display:block;
  font-size:18px;
  line-height:1.2;
  margin-bottom:10px;
}
.topic-card span{
  display:block;
  color:var(--muted);
  font-size:14px;
}
.start-box,.newsletter-box{
  background:
    radial-gradient(circle at top right,rgba(15,118,110,.13),transparent 34%),
    linear-gradient(135deg,#fff,#eef5ff);
  border:1px solid var(--line);
  border-radius:28px;
  padding:30px;
  box-shadow:var(--shadow);
}
.start-box{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:24px;
}
.start-box p,.newsletter-box p{color:var(--muted);margin:0}
.newsletter-box{text-align:left}
.newsletter-placeholder{
  width:min(520px,100%);
  margin:22px 0 0;
  border:1px dashed #9fb0c7;
  background:#fff;
  border-radius:18px;
  padding:18px;
  color:var(--muted);
  font-weight:900;
  text-align:center;
}

/* Article */
.article-shell{background:var(--bg)}
.article-hero{
  background:linear-gradient(180deg,#fff,#f6f8fb);
  border-bottom:1px solid var(--line);
}
.article-hero-inner{padding:48px 0 34px}
.breadcrumb,.article-meta{color:var(--muted);font-size:14px}
.article-cat{margin-top:20px}
.article-deck{font-size:19px;margin-bottom:16px}
.article-meta-row{
  display:flex;
  gap:10px;
  flex-wrap:wrap;
  color:var(--muted);
  font-size:13px;
  font-weight:900;
}
.article-meta-row span{
  background:#fff;
  border:1px solid var(--line);
  border-radius:999px;
  padding:8px 11px;
}
.article-layout{
  display:grid;
  grid-template-columns:minmax(0,1fr) 310px;
  gap:28px;
  padding-top:34px;
  padding-bottom:64px;
}
.featured{
  width:100%;
  border-radius:24px;
  margin:0 0 24px;
  border:1px solid var(--line);
}
.content{
  background:#fff;
  border:1px solid var(--line);
  border-radius:24px;
  padding:30px;
  box-shadow:0 12px 30px rgba(15,23,42,.04);
}
.content h2{margin-top:34px;scroll-margin-top:96px}
.content p,.content li{color:#334155}
.premium-content{font-size:18px}
.toc,.share-box,.helpful-box,.comments-box{
  background:#fff;
  border:1px solid var(--line);
  border-radius:22px;
  padding:22px;
  margin:22px 0;
  box-shadow:0 12px 30px rgba(15,23,42,.04);
}
.toc strong{display:block;margin-bottom:8px}
.toc ol{margin:0;padding-left:20px}
.toc a{font-weight:900}
.ad-slot{
  border:1px dashed #9fb0c7;
  background:#fff;
  color:#6b7890;
  border-radius:18px;
  padding:18px;
  text-align:center;
  font-size:13px;
  font-weight:900;
  margin:22px 0;
}
.article-sidebar{display:flex;flex-direction:column;gap:16px}
.sidebar-card{
  background:#fff;
  border:1px solid var(--line);
  border-radius:22px;
  padding:20px;
  box-shadow:0 12px 30px rgba(15,23,42,.04);
}
.sidebar-card a{
  display:block;
  padding:9px 0;
  border-bottom:1px solid var(--line);
  font-weight:900;
}
.share-buttons{
  display:flex;
  gap:10px;
  flex-wrap:wrap;
}
.share-buttons a,.share-buttons button{
  border:1px solid var(--line);
  background:#f8fafc;
  color:var(--text);
  border-radius:999px;
  padding:10px 13px;
  font:inherit;
  font-size:13px;
  font-weight:900;
  cursor:pointer;
}
.faq{margin-top:32px}
details{
  background:#fff;
  border:1px solid var(--line);
  border-radius:16px;
  padding:16px 18px;
  margin-bottom:12px;
}
summary{cursor:pointer;font-weight:900}

/* Comments */
.comment-notice{
  border:1px solid #bbf7d0;
  background:#f0fdf4;
  color:#166534;
  border-radius:14px;
  padding:12px 14px;
  font-weight:900;
  margin:12px 0;
}
.comment-list{display:grid;gap:12px;margin:16px 0 22px}
.comment-item{
  border:1px solid var(--line);
  border-radius:18px;
  padding:16px;
  background:#f8fafc;
}
.comment-item time{display:block;color:var(--muted);font-size:13px;font-weight:900}
.comment-form{display:grid;gap:14px}
.comment-form label{display:grid;gap:6px;font-weight:900}
.comment-form input,.comment-form textarea{
  width:100%;
  border:1px solid var(--line);
  border-radius:14px;
  padding:12px 13px;
  font:inherit;
}
.hp-field{position:absolute;left:-9999px;width:1px;height:1px;overflow:hidden}
.muted{color:var(--muted)}

/* Category */
.category-hero{
  background:linear-gradient(180deg,#fff,var(--soft));
  border-bottom:1px solid var(--line);
}
.category-hero .container{padding:56px 0}
.category-stats{
  display:flex;
  gap:10px;
  flex-wrap:wrap;
  margin-top:20px;
}
.category-stats span{
  background:#fff;
  border:1px solid var(--line);
  border-radius:999px;
  padding:8px 12px;
  color:#43536b;
  font-size:13px;
  font-weight:900;
}
.seo-intro{
  background:#fff;
  border:1px solid var(--line);
  border-radius:24px;
  padding:24px;
  margin-bottom:24px;
}
.seo-intro p{color:var(--muted);margin:0}
.pagination{
  margin-top:28px;
  display:flex;
  gap:12px;
  align-items:center;
  justify-content:center;
  flex-wrap:wrap;
}
.pagination a,.pagination span{
  background:#fff;
  border:1px solid var(--line);
  border-radius:999px;
  padding:10px 14px;
  font-weight:900;
}
.related-cats{margin-top:44px}
.topic-grid.compact{grid-template-columns:repeat(3,minmax(0,1fr))}
.topic-grid.compact .topic-card{min-height:130px}

/* Footer */
.site-footer{
  border-top:1px solid var(--line);
  background:#fff;
  padding:34px 0;
  color:var(--muted);
  font-size:14px;
}
.site-footer p{margin:6px 0}

/* Mobile */
@media(max-width:980px){
  .hero-grid,.featured-grid,.article-layout{grid-template-columns:1fr}
  .topic-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
  .guide-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
}
@media(max-width:760px){
  .container{width:min(100% - 28px,1140px)}
  .nav{min-height:66px;padding:10px 0}
  .logo{font-size:16px;max-width:240px;overflow:hidden;text-overflow:ellipsis}
  .menu-toggle{display:flex}
  .site-nav{
    display:none;
    position:absolute;
    top:62px;
    left:0;
    right:0;
    background:#fff;
    border:1px solid var(--line);
    border-radius:18px;
    padding:8px;
    box-shadow:0 18px 45px rgba(15,23,42,.16);
  }
  body.nav-open .site-nav{display:grid;gap:4px}
  .site-nav a{
    display:block;
    padding:13px 14px;
    border-radius:13px;
    font-size:15px;
  }
  .site-nav a:hover{background:var(--soft)}

  .hero .container{padding:38px 0}
  h1{font-size:36px;line-height:1.07;letter-spacing:-1.2px}
  h2{font-size:30px}
  .lead{font-size:18px;line-height:1.65}
  .hero-actions{display:grid;grid-template-columns:1fr;gap:10px;margin:24px 0 18px}
  .btn{width:100%}
  .trust-row{display:grid;grid-template-columns:1fr 1fr;gap:8px}
  .trust-row span{text-align:center;font-size:12px;padding:10px 8px}
  .hero-panel{padding:20px;border-radius:22px}
  .section{padding:38px 0}
  .grid,.guide-grid,.topic-grid,.topic-grid.compact{grid-template-columns:1fr}
  .topic-card{min-height:auto}
  .start-box{display:grid;padding:24px}
  .newsletter-box{padding:22px}
  .newsletter-box h2{font-size:30px}
  .content{padding:22px}
  .premium-content{font-size:17px}
  .article-hero-inner{padding:36px 0 28px}
}
@media(max-width:420px){
  h1{font-size:34px}
  .logo{max-width:220px}
}
@media print{
  .site-header,.site-footer,.article-sidebar,.share-box,.ad-slot{display:none!important}
  body{background:#fff}
  .article-layout{display:block;padding:0}
  .content{box-shadow:none;border:0;padding:0}
}

.hide-ad-placeholders .ad-slot{
  display:none!important;
}

.ad-unit{
  width:100%;
  min-height:280px;
  margin:28px 0;
  padding:10px 0;
  background:#fff;
  border:1px solid var(--line);
  border-radius:22px;
  overflow:hidden;
  text-align:center;
}
.ad-unit .ad-label{
  display:block;
  margin:8px 0 10px;
  color:var(--muted);
  font-size:12px;
  font-weight:800;
  text-transform:uppercase;
  letter-spacing:.08em;
}
.article-sidebar .ad-unit{
  min-height:250px;
  margin:0;
}
@media(max-width:760px){
  .ad-unit{
    min-height:250px;
    margin:24px 0;
    border-radius:18px;
  }
}

.home-ad-wrap{
  margin-top:28px;
}
.home-ad-wrap .ad-unit{
  max-width:970px;
  margin-left:auto;
  margin-right:auto;
}

/* Tools */
.tool-shell{
  background:var(--soft);
}
.tool-hero{
  background:linear-gradient(180deg,#fff,var(--soft));
  border-bottom:1px solid var(--line);
}
.tool-hero .container{
  padding:52px 0 34px;
}
.tool-layout{
  display:grid;
  grid-template-columns:minmax(0,1fr) 320px;
  gap:28px;
  padding:34px 0 54px;
}
.tool-main{
  min-width:0;
}
.tool-card{
  background:#fff;
  border:1px solid var(--line);
  border-radius:28px;
  padding:26px;
  box-shadow:0 18px 50px rgba(15,23,42,.08);
}
.tool-note{
  color:var(--muted);
  margin-top:0;
}
.checker-form{
  display:grid;
  gap:12px;
  margin-top:18px;
}
.check-row{
  display:flex;
  gap:12px;
  align-items:flex-start;
  border:1px solid var(--line);
  border-radius:16px;
  background:#f8fafc;
  padding:14px;
  font-weight:800;
  line-height:1.45;
}
.check-row input{
  width:20px;
  height:20px;
  margin-top:2px;
  flex:0 0 auto;
}
.tool-submit{
  margin-top:8px;
}
.tool-result{
  margin-top:22px;
  border:1px dashed var(--line);
  border-radius:20px;
  padding:18px;
  background:#f8fafc;
}
.tool-result.is-ready{
  border-style:solid;
  background:#f0fdf4;
  border-color:#bbf7d0;
}
.score-line{
  font-size:18px;
}
.tool-disclaimer{
  color:var(--muted);
  font-size:14px;
  font-weight:800;
}
.tool-content{
  margin-top:26px;
}
.answer-box{
  border:1px solid #bfdbfe;
  background:#eff6ff;
  border-radius:22px;
  padding:20px;
  margin:24px 0;
}
.answer-box h2{
  margin-top:0;
}
.related-grid{
  display:grid;
  grid-template-columns:repeat(3,minmax(0,1fr));
  gap:14px;
  margin:18px 0 26px;
}
.related-card{
  display:grid;
  gap:8px;
  border:1px solid var(--line);
  border-radius:18px;
  padding:16px;
  background:#fff;
  color:var(--text);
}
.related-card span{
  color:var(--muted);
  font-size:14px;
  line-height:1.5;
}
@media(max-width:980px){
  .tool-layout{
    grid-template-columns:1fr;
  }
  .related-grid{
    grid-template-columns:1fr;
  }
}
@media(max-width:760px){
  .tool-hero .container{
    padding:36px 0 26px;
  }
  .tool-layout{
    padding:24px 0 42px;
  }
  .tool-card{
    padding:20px;
    border-radius:22px;
  }
  .check-row{
    padding:13px;
  }
}

/* Tools hub */
.tool-grid{
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:18px;
  margin:24px 0 34px;
}
.tool-list-card{
  background:#fff;
  border:1px solid var(--line);
  border-radius:24px;
  padding:22px;
  box-shadow:0 14px 35px rgba(15,23,42,.06);
}
.tool-list-card h2{
  font-size:24px;
  margin:8px 0 10px;
}
.tool-list-card p{
  color:var(--muted);
}
.tool-list-card.is-coming{
  background:#f8fafc;
}
.coming-soon{
  display:inline-flex;
  border:1px solid var(--line);
  border-radius:999px;
  padding:8px 11px;
  font-size:13px;
  font-weight:900;
  color:var(--muted);
  background:#fff;
}
@media(max-width:760px){
  .tool-grid{
    grid-template-columns:1fr;
  }
  .tool-list-card{
    border-radius:20px;
    padding:18px;
  }
  .tool-list-card h2{
    font-size:22px;
  }
}

/* Calculator form */
.calculator-form{
  display:grid;
  gap:16px;
  margin-top:18px;
}
.calculator-form label{
  display:grid;
  gap:7px;
  font-weight:900;
}
.calculator-form input{
  width:100%;
  border:1px solid var(--line);
  border-radius:14px;
  padding:12px 13px;
  font:inherit;
  background:#fff;
}
.calc-grid{
  display:grid;
  grid-template-columns:repeat(3,minmax(0,1fr));
  gap:12px;
}
.mini-fieldset{
  border:0;
  padding:0;
  margin:4px 0 0;
  display:grid;
  gap:10px;
}
.mini-fieldset legend{
  font-weight:900;
  margin-bottom:8px;
}
@media(max-width:760px){
  .calc-grid{
    grid-template-columns:1fr;
  }
}

/* Risk checker */
.danger-fieldset{
  margin-top:12px;
}
.danger-row{
  background:#fff7ed;
  border-color:#fed7aa;
}

/* Homepage tools */
.home-tools-section{
  padding-top:46px;
}
.home-tool-grid{
  display:grid;
  grid-template-columns:repeat(3,minmax(0,1fr));
  gap:18px;
}
.home-tool-card{
  display:grid;
  gap:10px;
  background:#fff;
  border:1px solid var(--line);
  border-radius:24px;
  padding:22px;
  box-shadow:0 16px 38px rgba(15,23,42,.07);
  color:var(--text);
}
.home-tool-card span{
  color:var(--accent);
  font-size:13px;
  font-weight:900;
  text-transform:uppercase;
  letter-spacing:.08em;
}
.home-tool-card strong{
  font-size:22px;
  line-height:1.2;
}
.home-tool-card p{
  margin:0;
  color:var(--muted);
  line-height:1.6;
}
.home-tools-more{
  margin-top:20px;
  text-align:center;
}
.hero-panel .check-list a{
  color:inherit;
  text-decoration:underline;
  text-underline-offset:3px;
}
@media(max-width:980px){
  .home-tool-grid{
    grid-template-columns:1fr;
  }
}

/* Category hubs */
.electrical-hub-tools{
  margin:0 0 30px;
}
.electrical-hub-tools h2{
  margin-bottom:16px;
}
