/* ===== ErrorAway — design system ===== */
:root{
  --bg:#F6F8FA; --surface:#FFFFFF;
  --ink:#161A22; --ink-soft:#3A424F; --muted:#6B7585;
  --line:#E5E9EF; --line-soft:#EEF1F5;
  --accent:#0E9F6E; --accent-deep:#0A7D56; --accent-wash:#E7F6EF;
  --warn:#B45309; --warn-wash:#FEF4E4; --warn-line:#F6D9A8;
  --radius:14px; --radius-sm:9px;
  --maxw:1080px; --readw:730px;
  --shadow:0 1px 2px rgba(16,24,40,.04), 0 6px 22px rgba(16,24,40,.06);
  --shadow-sm:0 1px 2px rgba(16,24,40,.05);
  --font-head:"Plus Jakarta Sans", system-ui, sans-serif;
  --font-body:system-ui,-apple-system,Segoe UI,Roboto,Helvetica,Arial,sans-serif;
}
*{box-sizing:border-box}
html{scroll-behavior:smooth}
body{
  margin:0; background:var(--bg); color:var(--ink);
  font-family:var(--font-body); font-size:17px; line-height:1.65;
  -webkit-font-smoothing:antialiased;
}
h1,h2,h3,h4{font-family:var(--font-head); line-height:1.2; margin:0 0 .5em; letter-spacing:-.02em; color:var(--ink)}
a{color:var(--accent-deep); text-decoration:none}
a:hover{text-decoration:underline}
img{max-width:100%}
.wrap{max-width:var(--maxw); margin:0 auto; padding:0 20px}

/* ===== Header ===== */
.site-head{
  position:sticky; top:0; z-index:50; background:rgba(255,255,255,.88);
  backdrop-filter:saturate(180%) blur(10px);
  border-bottom:1px solid var(--line);
}
.head-inner{display:flex; align-items:center; justify-content:space-between; height:64px}
.brand{display:flex; align-items:center; gap:10px; font-family:var(--font-head); font-weight:800; font-size:19px; color:var(--ink); letter-spacing:-.02em}
.brand:hover{text-decoration:none}
.brand .mark{
  width:30px; height:30px; border-radius:9px; display:grid; place-items:center;
  background:linear-gradient(150deg,var(--accent),var(--accent-deep)); color:#fff; box-shadow:var(--shadow-sm);
}
.brand .mark svg{width:17px; height:17px}
.nav{display:flex; align-items:center; gap:6px}
.nav a{
  color:var(--ink-soft); font-weight:600; font-size:15px; padding:8px 12px; border-radius:8px;
}
.nav a:hover{background:var(--line-soft); color:var(--ink); text-decoration:none}

/* ===== Hero ===== */
.hero{padding:64px 0 38px; text-align:center}
.eyebrow{
  display:inline-flex; align-items:center; gap:7px; font-family:var(--font-head); font-weight:700;
  font-size:13px; letter-spacing:.02em; color:var(--accent-deep);
  background:var(--accent-wash); padding:6px 13px; border-radius:999px; margin-bottom:18px;
}
.eyebrow .dot{width:7px; height:7px; border-radius:50%; background:var(--accent)}
.hero h1{font-size:clamp(30px,5vw,46px); font-weight:800; max-width:14ch; margin:0 auto .35em}
.hero h1 .hl{color:var(--accent-deep)}
.hero p.sub{font-size:clamp(16px,2.2vw,19px); color:var(--muted); max-width:54ch; margin:0 auto 28px}

.search{position:relative; max-width:560px; margin:0 auto}
.search svg{position:absolute; left:18px; top:50%; transform:translateY(-50%); width:20px; height:20px; color:var(--muted)}
.search input{
  width:100%; height:58px; padding:0 20px 0 50px; font-size:16px; font-family:var(--font-body);
  border:1.5px solid var(--line); background:var(--surface); border-radius:14px; color:var(--ink);
  box-shadow:var(--shadow); transition:border-color .15s, box-shadow .15s;
}
.search input::placeholder{color:#9aa3b1}
.search input:focus{outline:none; border-color:var(--accent); box-shadow:0 0 0 4px var(--accent-wash)}

.chips{display:flex; flex-wrap:wrap; gap:9px; justify-content:center; margin:20px auto 0; max-width:600px}
.chip{
  font-size:14px; font-weight:600; color:var(--ink-soft); background:var(--surface);
  border:1px solid var(--line); padding:7px 15px; border-radius:999px; cursor:pointer;
  transition:.15s;
}
.chip:hover{border-color:var(--accent); color:var(--accent-deep); background:var(--accent-wash)}

/* ===== Section ===== */
.section{padding:30px 0 64px}
.section-head{display:flex; align-items:baseline; justify-content:space-between; margin-bottom:22px; gap:16px}
.section-head h2{font-size:24px; font-weight:800; margin:0}
.section-head .count{color:var(--muted); font-size:14px; font-weight:600}

/* ===== Cards ===== */
.grid{display:grid; grid-template-columns:repeat(auto-fill,minmax(290px,1fr)); gap:18px}
.card{
  display:flex; flex-direction:column; background:var(--surface); border:1px solid var(--line);
  border-radius:var(--radius); padding:22px; box-shadow:var(--shadow-sm);
  transition:transform .15s, box-shadow .15s, border-color .15s; height:100%;
}
.card:hover{transform:translateY(-3px); box-shadow:var(--shadow); border-color:#d8dee7; text-decoration:none}
.card .tag{font-family:var(--font-head); font-weight:700; font-size:12px; letter-spacing:.03em; text-transform:uppercase; color:var(--accent-deep); margin-bottom:11px}
.card h3{font-size:18px; font-weight:700; margin:0 0 9px; color:var(--ink)}
.card p{margin:0 0 16px; color:var(--muted); font-size:15px; flex:1}
.card .meta{display:flex; align-items:center; gap:8px; font-size:13px; color:var(--muted); font-weight:600}
.card .meta .read{color:var(--accent-deep); margin-left:auto; display:inline-flex; align-items:center; gap:4px}
.empty{color:var(--muted); text-align:center; padding:40px 0; display:none}

/* ===== Article ===== */
.article{background:var(--surface); border-top:1px solid var(--line)}
.article-inner{max-width:var(--readw); margin:0 auto; padding:48px 20px 64px}
.breadcrumb{font-size:14px; color:var(--muted); margin-bottom:22px; font-weight:600}
.breadcrumb a{color:var(--muted)}
.article h1{font-size:clamp(27px,4.5vw,38px); font-weight:800; margin-bottom:.4em}
.article .updated{display:inline-flex; align-items:center; gap:7px; font-size:13px; font-weight:700; color:var(--accent-deep); background:var(--accent-wash); padding:5px 12px; border-radius:999px; margin-bottom:26px}
.prose{font-size:17.5px; color:var(--ink-soft)}
.prose p{margin:0 0 1.15em}
.prose h2{font-size:25px; font-weight:800; color:var(--ink); margin:1.7em 0 .55em; scroll-margin-top:80px}
.prose h3{font-size:20px; font-weight:700; color:var(--ink); margin:1.4em 0 .45em}
.prose strong{color:var(--ink); font-weight:700}
.prose ul,.prose ol{margin:0 0 1.2em; padding-left:1.3em}
.prose li{margin:.4em 0}
.prose code{background:var(--line-soft); border:1px solid var(--line); padding:2px 7px; border-radius:6px; font-size:.9em; font-family:ui-monospace,SFMono-Regular,Menlo,monospace; color:var(--ink)}

.callout{display:flex; gap:14px; background:var(--warn-wash); border:1px solid var(--warn-line); border-radius:var(--radius-sm); padding:18px 20px; margin:0 0 1.6em}
.callout .ico{flex-shrink:0; width:24px; height:24px; color:var(--warn)}
.callout p{margin:0; color:#7c4710; font-size:16px}
.callout strong{color:#7c4710}

.tldr{background:var(--accent-wash); border:1px solid #bfe7d4; border-radius:var(--radius-sm); padding:20px 22px; margin:0 0 1.8em}
.tldr h3{margin:0 0 .5em; color:var(--accent-deep); font-size:16px; font-family:var(--font-head); letter-spacing:.01em; text-transform:uppercase; font-weight:700}
.tldr ol{margin:0; padding-left:1.25em; color:var(--ink-soft)}

.fix{border:1px solid var(--line); border-radius:var(--radius); padding:4px 24px 8px; margin:0 0 1.4em; background:#fcfdfe}
.fix .fix-h{display:flex; align-items:center; gap:13px; margin:18px 0 6px}
.fix .num{flex-shrink:0; width:34px; height:34px; border-radius:10px; background:var(--accent); color:#fff; display:grid; place-items:center; font-family:var(--font-head); font-weight:800; font-size:16px}
.fix h3{margin:0; font-size:19px}

.faq{margin-top:2em}
.faq details{border:1px solid var(--line); border-radius:var(--radius-sm); padding:2px 20px; margin-bottom:12px; background:#fcfdfe}
.faq summary{cursor:pointer; font-family:var(--font-head); font-weight:700; padding:16px 0; list-style:none; color:var(--ink); display:flex; justify-content:space-between; align-items:center}
.faq summary::-webkit-details-marker{display:none}
.faq summary::after{content:"+"; color:var(--accent-deep); font-size:22px; font-weight:700}
.faq details[open] summary::after{content:"–"}
.faq details[open] summary{border-bottom:1px solid var(--line-soft)}
.faq p{padding:14px 0 4px; margin:0; color:var(--ink-soft)}

.endbox{margin-top:2.4em; padding:24px; border:1px dashed var(--line); border-radius:var(--radius); text-align:center; background:var(--bg)}
.endbox p{margin:0 0 14px; color:var(--ink-soft)}

/* ===== Buttons ===== */
.btn{display:inline-flex; align-items:center; gap:8px; font-family:var(--font-head); font-weight:700; font-size:15px; padding:12px 22px; border-radius:11px; cursor:pointer; border:1px solid transparent; transition:.15s}
.btn-primary{background:var(--accent); color:#fff}
.btn-primary:hover{background:var(--accent-deep); text-decoration:none}
.btn-ghost{background:var(--surface); color:var(--ink); border-color:var(--line)}
.btn-ghost:hover{border-color:var(--accent); color:var(--accent-deep); text-decoration:none}

/* ===== Generic page (legal/about/contact) ===== */
.page{background:var(--surface); border-top:1px solid var(--line)}
.page-inner{max-width:var(--readw); margin:0 auto; padding:48px 20px 64px}
.page h1{font-size:clamp(27px,4vw,36px); font-weight:800; margin-bottom:.5em}
.page .lead{font-size:18px; color:var(--muted); margin-bottom:1.6em}
.page h2{font-size:22px; font-weight:700; margin:1.6em 0 .5em}
.page p,.page li{color:var(--ink-soft)}
.page ul{padding-left:1.3em}
.page li{margin:.4em 0}

/* ===== Contact form ===== */
.field{margin-bottom:18px}
.field label{display:block; font-weight:600; font-size:15px; margin-bottom:7px; color:var(--ink)}
.field input,.field textarea{
  width:100%; padding:13px 15px; font-size:16px; font-family:var(--font-body);
  border:1.5px solid var(--line); border-radius:10px; background:#fff; color:var(--ink);
}
.field input:focus,.field textarea:focus{outline:none; border-color:var(--accent); box-shadow:0 0 0 4px var(--accent-wash)}
.field textarea{min-height:140px; resize:vertical}

/* ===== Footer ===== */
.site-foot{border-top:1px solid var(--line); background:var(--surface); margin-top:auto}
.foot-inner{padding:42px 20px 30px; display:grid; grid-template-columns:1.4fr 1fr 1fr; gap:34px}
.foot-brand .brand{margin-bottom:12px}
.foot-brand p{color:var(--muted); font-size:14.5px; max-width:34ch; margin:0}
.foot-col h4{font-family:var(--font-head); font-size:13px; text-transform:uppercase; letter-spacing:.04em; color:var(--muted); margin:0 0 14px}
.foot-col a{display:block; color:var(--ink-soft); font-size:15px; margin-bottom:10px; font-weight:500}
.foot-col a:hover{color:var(--accent-deep)}
.foot-bottom{border-top:1px solid var(--line-soft); padding:18px 20px; text-align:center; color:var(--muted); font-size:13.5px}

/* ===== Ad slot ===== */
.ad-slot{max-width:var(--readw); margin:30px auto; min-height:90px; display:grid; place-items:center;
  border:1px dashed var(--line); border-radius:10px; color:#aeb6c2; font-size:13px; background:#fafbfc}

/* ===== Layout helper ===== */
body{display:flex; flex-direction:column; min-height:100vh}
.flex-main{flex:1}

/* ===== Responsive ===== */
@media(max-width:720px){
  body{font-size:16px}
  .nav a{padding:8px 9px; font-size:14px}
  .hero{padding:44px 0 30px}
  .foot-inner{grid-template-columns:1fr 1fr; gap:26px}
  .foot-brand{grid-column:1 / -1}
}
@media(max-width:430px){
  .brand span{font-size:17px}
  .nav{gap:0}
}

/* ===== A11y ===== */
:focus-visible{outline:2px solid var(--accent-deep); outline-offset:2px}
@media(prefers-reduced-motion:reduce){*{transition:none!important; scroll-behavior:auto}}
