/* Inverter Error Codes: mobile-first, fast, no external dependencies */
:root{
  --bg:#0b1220; --panel:#111c30; --card:#16233c; --line:#243450;
  --text:#e8eef7; --muted:#9fb0c8; --brand:#2ea3ff; --brand-2:#1170d6;
  --green:#1fbf6b; --green-bg:#0f2a1e; --yellow:#f2b531; --yellow-bg:#2c2410;
  --red:#ff5c5c; --red-bg:#2c1414; --radius:14px; --maxw:980px;
}
*{box-sizing:border-box}
html{scroll-behavior:smooth}
body{
  margin:0; background:var(--bg); color:var(--text);
  font:16px/1.6 -apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Helvetica,Arial,sans-serif;
  -webkit-text-size-adjust:100%;
}
a{color:var(--brand); text-decoration:none}
a:hover{text-decoration:underline}
.wrap{max-width:var(--maxw); margin:0 auto; padding:0 18px}
img{max-width:100%}

/* Header */
header.site{position:sticky; top:0; z-index:20; background:rgba(11,18,32,.92);
  backdrop-filter:saturate(140%) blur(8px); border-bottom:1px solid var(--line)}
.nav{display:flex; align-items:center; gap:16px; height:60px}
.logo{font-weight:800; font-size:18px; letter-spacing:.2px; color:var(--text)}
.logo span{color:var(--brand)}
.nav .links{margin-left:auto; display:flex; gap:18px; font-size:14px}
.nav .links a{color:var(--muted)}
.nav .links a:hover{color:var(--text)}

/* Hero + search */
.hero{padding:46px 0 30px; text-align:center}
.hero h1{font-size:30px; line-height:1.2; margin:0 0 10px}
.hero p{color:var(--muted); max-width:640px; margin:0 auto 22px}
.search{max-width:560px; margin:0 auto; position:relative}
.search-row{display:flex; gap:8px}
.search select,.search input{
  font-size:16px; padding:14px 14px; border-radius:12px;
  border:1px solid var(--line); background:var(--card); color:var(--text)}
.search select{flex:0 0 110px}
.search input{flex:1 1 auto}
.search input:focus,.search select:focus{outline:2px solid var(--brand); border-color:var(--brand)}
.results{position:absolute; left:0; right:0; top:60px; background:var(--panel);
  border:1px solid var(--line); border-radius:12px; overflow:hidden; text-align:left;
  box-shadow:0 16px 40px rgba(0,0,0,.45); display:none; z-index:30; max-height:330px; overflow-y:auto}
.results.open{display:block}
.results a{display:flex; align-items:center; gap:10px; padding:12px 14px;
  border-bottom:1px solid var(--line); color:var(--text)}
.results a:last-child{border-bottom:0}
.results a:hover{background:var(--card); text-decoration:none}
.results .code{font-weight:800; min-width:46px}
.results .meaning{color:var(--muted); font-size:14px}
.results .empty{padding:14px; color:var(--muted)}

/* Severity badges + dots */
.badge{display:inline-flex; align-items:center; gap:7px; font-size:13px; font-weight:700;
  padding:5px 10px; border-radius:999px; border:1px solid}
.badge .dot{width:9px; height:9px; border-radius:50%}
.sev-green{color:var(--green); background:var(--green-bg); border-color:#1c5a3c}
.sev-green .dot{background:var(--green)}
.sev-yellow{color:var(--yellow); background:var(--yellow-bg); border-color:#5c4a16}
.sev-yellow .dot{background:var(--yellow)}
.sev-red{color:var(--red); background:var(--red-bg); border-color:#5c2222}
.sev-red .dot{background:var(--red)}

/* Sections */
section{padding:26px 0}
h2{font-size:22px; margin:0 0 14px}
h3{font-size:18px; margin:26px 0 10px}
.muted{color:var(--muted)}
.center{text-align:center}

/* Brand cards on home */
.grid{display:grid; grid-template-columns:repeat(auto-fill,minmax(150px,1fr)); gap:12px}
.brand-card{display:block; padding:18px; background:var(--card); border:1px solid var(--line);
  border-radius:var(--radius); text-align:center; color:var(--text); font-weight:700}
.brand-card small{display:block; color:var(--muted); font-weight:400; margin-top:4px}
.brand-card:hover{border-color:var(--brand); text-decoration:none}
.brand-card.soon{opacity:.5}

/* Code table (brand hub) */
.table{width:100%; border-collapse:collapse; font-size:15px}
.table th,.table td{text-align:left; padding:12px 12px; border-bottom:1px solid var(--line); vertical-align:top}
.table th{color:var(--muted); font-weight:600; font-size:13px; text-transform:uppercase; letter-spacing:.4px}
.table td.code{font-weight:800; white-space:nowrap}
.table tr:hover td{background:var(--panel)}
.filter{width:100%; font-size:16px; padding:12px 14px; border-radius:12px;
  border:1px solid var(--line); background:var(--card); color:var(--text); margin-bottom:14px}
.filter:focus{outline:2px solid var(--brand); border-color:var(--brand)}

/* Article / code page */
.crumbs{font-size:13px; color:var(--muted); padding:18px 0 0}
.crumbs a{color:var(--muted)}
article{padding:8px 0 26px}
article h1{font-size:28px; line-height:1.25; margin:14px 0 12px}
.meta{display:flex; flex-wrap:wrap; gap:10px 18px; align-items:center; color:var(--muted);
  font-size:13px; margin-bottom:20px}
.card{background:var(--card); border:1px solid var(--line); border-radius:var(--radius); padding:18px 18px; margin:16px 0}
.lead{font-size:18px}
ol.steps{counter-reset:s; list-style:none; padding:0; margin:0}
ol.steps li{position:relative; padding:12px 0 12px 46px; border-bottom:1px solid var(--line)}
ol.steps li:last-child{border-bottom:0}
ol.steps li::before{counter-increment:s; content:counter(s); position:absolute; left:0; top:10px;
  width:30px; height:30px; border-radius:50%; background:var(--brand-2); color:#fff;
  display:flex; align-items:center; justify-content:center; font-weight:800; font-size:14px}
.callout{border-left:4px solid var(--yellow); background:var(--yellow-bg); padding:12px 16px; border-radius:8px; margin:16px 0}
.callout.danger{border-color:var(--red); background:var(--red-bg)}
.callout.ok{border-color:var(--green); background:var(--green-bg)}
.callout strong{display:block; margin-bottom:3px}

/* Flowchart */
.flow{display:flex; flex-direction:column; gap:8px; margin:10px 0}
.flow .node{background:var(--panel); border:1px solid var(--line); border-radius:10px; padding:12px 14px}
.flow .node.q{border-color:var(--brand)}
.flow .arrow{color:var(--muted); text-align:center; font-size:13px}
.flow .branch{display:grid; grid-template-columns:1fr 1fr; gap:8px}
.flow .branch .node{font-size:14px}

/* Related codes */
.chips{display:flex; flex-wrap:wrap; gap:8px}
.chip{display:inline-flex; align-items:center; gap:7px; padding:7px 12px; border-radius:999px;
  background:var(--card); border:1px solid var(--line); color:var(--text); font-size:14px; font-weight:600}
.chip:hover{border-color:var(--brand); text-decoration:none}

details{border:1px solid var(--line); border-radius:10px; padding:0 16px; margin:10px 0; background:var(--card)}
details summary{cursor:pointer; font-weight:600; padding:14px 0}
details[open] summary{border-bottom:1px solid var(--line); margin-bottom:10px}
details p{margin:0 0 14px}

.sources{font-size:14px; color:var(--muted)}
.sources li{margin:4px 0}

/* Footer */
footer.site{border-top:1px solid var(--line); margin-top:30px; padding:26px 0; color:var(--muted); font-size:14px}
footer.site .links{display:flex; flex-wrap:wrap; gap:16px; margin-bottom:12px}
footer.site a{color:var(--muted)}
.disclaimer{font-size:13px; background:var(--red-bg); border:1px solid #5c2222; color:#ffd7d7;
  border-radius:10px; padding:12px 14px; margin:16px 0}

@media(min-width:680px){
  .hero h1{font-size:38px}
  .hero{padding:60px 0 34px}
}
