:root{
  --bg:#f6f8fb;
  --card:#ffffff;
  --text:#0f172a;
  --muted:#475569;
  --line:#e2e8f0;
  --brand1:#0ea5e9;
  --brand2:#4f46e5;
  --shadow: 0 10px 30px rgba(2,8,23,.08);
  --radius: 14px;
}

*{ box-sizing:border-box; }
html,body{ height:100%; }
body{
  margin:0;
  font-family: system-ui,-apple-system,Segoe UI,Roboto,Arial,Helvetica,sans-serif;
  background:var(--bg);
  color:var(--text);
}

a{ color:inherit; text-decoration:none; }
a:hover{ text-decoration:underline; }

.container{
  width:min(1180px, calc(100% - 32px));
  margin:0 auto;
}

.skip-link{
  position:absolute; left:-999px; top:auto;
  width:1px; height:1px; overflow:hidden;
}
.skip-link:focus{
  left:16px; top:16px; width:auto; height:auto;
  padding:10px 12px; background:#fff; border:1px solid var(--line);
  border-radius:10px; z-index:9999;
}

/* ===== HEADER (match result.html style: simple + clean) ===== */
.site-header{
  background: linear-gradient(90deg, var(--brand1), var(--brand2));
  color:#fff;
  position:sticky;
  top:0;
  z-index:50;
  box-shadow: 0 8px 24px rgba(2,8,23,.12);
}

.header-row{
  display:flex;
  align-items:center;
  gap:16px;
  padding:14px 0;
}

.brand{ display:flex; align-items:center; gap:10px; min-width:0; }
.brand-logo{ width:42px; height:42px; border-radius:999px; object-fit:cover; background:#fff; }
.brand-text{ display:flex; flex-direction:column; min-width:0; }
.brand-title{ font-weight:800; font-size:20px; line-height:1.15; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.brand-subtitle{ font-size:12px; opacity:.9; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }

.desktop-nav{
  display:flex;
  align-items:center;
  gap:10px;
  margin-left:auto;
  flex-wrap:wrap;
}

.nav-link{
  padding:9px 12px;
  border-radius:10px;
  font-weight:800;
  font-size:14px;
  color:#fff;
  background: rgba(255,255,255,.12);
  border:1px solid rgba(255,255,255,.14);
}
.nav-link:hover{ background: rgba(255,255,255,.18); text-decoration:none; }

.header-cta{
  display:flex;
  gap:8px;
  flex-wrap:wrap;
  margin-left:6px;
}

.header-actions{
  display:none;
  margin-left:auto;
  gap:8px;
}

.icon-btn{
  border:none;
  background: rgba(255,255,255,.14);
  color:#fff;
  width:42px;
  height:42px;
  border-radius:12px;
  display:grid;
  place-items:center;
  cursor:pointer;
}
.icon-btn:hover{ background: rgba(255,255,255,.2); }

/* Desktop dropdown */
.nav-dd{ position:relative; }
.nav-dd-btn{
  display:flex; align-items:center; gap:8px;
  cursor:pointer; border:none;
}
.nav-dd-menu{
  position:absolute;
  top:calc(100% + 10px);
  right:0;
  min-width:260px;
  background:#fff;
  color:var(--text);
  border:1px solid var(--line);
  border-radius:14px;
  box-shadow: var(--shadow);
  padding:8px;
  display:none;
}
.nav-dd-menu.open{ display:block; }
.nav-dd-item{
  display:block;
  padding:10px 12px;
  border-radius:10px;
  font-weight:800;
  color:var(--text);
}
.nav-dd-item:hover{ background:#f1f5f9; text-decoration:none; }

/* ===== TOP SEARCH ===== */
.top-search{ padding:18px 0 0; }
.search-card{
  background:var(--card);
  border:1px solid var(--line);
  border-radius: var(--radius);
  padding:18px;
  box-shadow: var(--shadow);
}
.search-title{ margin:0; font-size:18px; font-weight:950; }
.search-sub{ margin:6px 0 0; color:var(--muted); font-size:13px; }
.search-row{
  margin-top:12px;
  display:flex;
  gap:10px;
  align-items:center;
}
.search-row input{
  flex:1;
  height:44px;
  border-radius:12px;
  border:1px solid var(--line);
  padding:0 12px;
  font-size:14px;
  outline:none;
}
.search-row input:focus{
  border-color: rgba(14,165,233,.65);
  box-shadow: 0 0 0 4px rgba(14,165,233,.15);
}
.btn-primary{
  height:44px;
  padding:0 14px;
  border-radius:12px;
  border:1px solid rgba(2,132,199,.4);
  background: linear-gradient(90deg, #0284c7, #4f46e5);
  color:#fff;
  font-weight:950;
  cursor:pointer;
}
.btn-primary:hover{ filter: brightness(1.03); }

.search-results{
  margin-top:12px;
  display:none;
  border-top:1px solid var(--line);
  padding-top:12px;
}
.search-results.open{ display:block; }

.result-item{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:12px;
  padding:10px 12px;
  border:1px solid var(--line);
  border-radius:12px;
  margin-bottom:10px;
  background:#fff;
}
.result-item:hover{ background:#f8fafc; text-decoration:none; }
.result-title{ font-weight:950; }
.result-meta{ color:var(--muted); font-size:12px; margin-top:3px; }
mark{ background: rgba(250, 204, 21, .35); padding:0 2px; border-radius:4px; }

/* ===== PAGE ===== */
.page{ padding:18px 0 30px; }

/* Big sections: 2 columns on desktop, 1 on mobile */
.duo-grid{
  display:grid;
  grid-template-columns: 1fr;
  gap:14px;
  margin-top:14px;
}
@media (min-width: 900px){
  .duo-grid{ grid-template-columns: 1fr 1fr; }
}

/* Generic card blocks */
.section-card{
  background:var(--card);
  border:1px solid var(--line);
  border-radius: var(--radius);
  overflow:hidden;
  box-shadow: var(--shadow);
}
.section-head{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  padding:12px 14px;
  color:#fff;
  font-weight:950;
}
.section-head .left{
  display:flex;
  align-items:center;
  gap:10px;
}
.section-body{ padding:12px 14px; }
.section-list{
  display:flex;
  flex-direction:column;
  gap:10px;
}
.section-link{
  display:block;
  padding:10px 10px;
  border:1px solid var(--line);
  border-radius:12px;
  background:#fff;
}
.section-link:hover{ background:#f8fafc; text-decoration:none; }
.section-link .t{ font-weight:900; }
.section-link .d{ font-size:12px; color:var(--muted); margin-top:3px; }

.view-all{
  display:inline-flex;
  align-items:center;
  gap:8px;
  font-weight:950;
  margin-top:12px;
  padding:10px 12px;
  border-radius:12px;
  background:#0f172a;
  color:#fff;
}
.view-all:hover{ filter:brightness(1.05); text-decoration:none; }

/* ===== CATEGORY GRID: 3 columns desktop (requested) ===== */
.cat-grid{
  display:grid;
  grid-template-columns:1fr;
  gap:14px;
  margin-top:14px;
}
@media (min-width: 740px){
  .cat-grid{ grid-template-columns:1fr 1fr; }
}
@media (min-width: 1100px){
  .cat-grid{ grid-template-columns:1fr 1fr 1fr; }
}

/* ===== SEO blocks ===== */
.seo-block{
  margin-top:18px;
  background:#fff;
  border:1px solid var(--line);
  border-radius: var(--radius);
  padding:16px;
  box-shadow: var(--shadow);
}
.seo-block h2{ margin:0 0 10px; font-size:18px; font-weight:950; }
.seo-block p{ margin:8px 0; color:var(--muted); line-height:1.6; }
.seo-grid{
  display:grid;
  grid-template-columns:1fr;
  gap:12px;
  margin-top:12px;
}
@media (min-width: 900px){
  .seo-grid{ grid-template-columns:1fr 1fr; }
}
.seo-card{
  border:1px solid var(--line);
  border-radius: var(--radius);
  padding:14px;
  background:#fff;
}
.seo-card h3{ margin:0 0 8px; font-size:16px; font-weight:950; }
.seo-card ul, .seo-card ol{ margin:0 0 6px 18px; color:var(--muted); line-height:1.7; }
.mini-links{ font-size:13px; }
.mini-links a{ color:#0369a1; font-weight:900; text-decoration:underline; }

/* ===== FAQ (simple accordion) ===== */
.faq-wrap{ margin-top:18px; }
.faq-card{
  background:#fff;
  border:1px solid var(--line);
  border-radius: var(--radius);
  padding:16px;
  box-shadow: var(--shadow);
}
.faq-card h2{ margin:0; font-size:18px; font-weight:950; }
.faq-sub{ margin:6px 0 0; color:var(--muted); }
.faq-item{
  margin-top:12px;
  border:1px solid var(--line);
  border-radius:14px;
  overflow:hidden;
}
.faq-btn{
  width:100%;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  padding:14px;
  background:#fff;
  border:none;
  cursor:pointer;
  font-weight:950;
}
.faq-btn:hover{ background:#f8fafc; }
.faq-btn i{ transition: transform .18s ease; }
.faq-btn[aria-expanded="true"] i{ transform: rotate(180deg); }
.faq-panel{
  padding:0 14px 14px;
  color:var(--muted);
  line-height:1.6;
}

/* ===== FOOTER (match result.html style) ===== */
.site-footer{
  margin-top:18px;
  background:#fff;
  border-top:1px solid var(--line);
}
.footer-row{
  padding:18px 0;
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:14px;
  flex-wrap:wrap;
}
.footer-title{ font-weight:950; font-size:16px; }
.footer-sub{ color:var(--muted); margin-top:4px; font-size:13px; }
.footer-links{ display:flex; gap:12px; flex-wrap:wrap; margin-top:10px; }
.footer-links a{ color:#0369a1; font-weight:900; text-decoration:underline; }
.footer-social{ display:flex; gap:10px; flex-wrap:wrap; }
.footer-bottom{
  padding:12px 0 18px;
  border-top:1px solid var(--line);
  color:var(--muted);
  font-size:13px;
}

/* ===== OFFCANVAS MENU (fix stuck + overlap) ===== */
.overlay{
  position:fixed;
  inset:0;
  background: rgba(2,8,23,.55);
  z-index:80;
}
.offcanvas{
  position:fixed;
  top:0;
  right:0;
  height:100%;
  width:min(360px, 92vw);
  background:#fff;
  z-index:90;
  box-shadow: -14px 0 36px rgba(2,8,23,.18);
  display:flex;
  flex-direction:column;
}
.offcanvas-head{
  padding:14px;
  display:flex;
  align-items:center;
  justify-content:space-between;
  border-bottom:1px solid var(--line);
}
.offcanvas-title{ font-weight:950; font-size:16px; color:var(--text); }
.offcanvas-head .icon-btn{
  background:#0f172a;
  color:#fff;
}
.offcanvas-nav{
  padding:12px;
  overflow:auto;
  display:flex;
  flex-direction:column;
  gap:10px;
}
.offcanvas-nav a{
  width:100%;
  padding:12px 12px;
  border-radius:12px;
  border:1px solid var(--line);
  font-weight:950;
  color:var(--text);
  display:block;
}
.offcanvas-nav a:hover{ background:#f8fafc; text-decoration:none; }
.offcanvas-group{
  margin-top:6px;
  padding-top:6px;
  border-top:1px dashed var(--line);
}
.offcanvas-group-title{
  font-weight:950;
  color:var(--muted);
  margin:8px 0 6px;
  font-size:13px;
}
.offcanvas-cta{
  margin-top:10px;
  display:flex;
  flex-direction:column;
  gap:10px;
}

/* responsive */
@media (max-width: 980px){
  .desktop-nav{ display:none; }
  .header-actions{ display:flex; }
  .brand-subtitle{ display:none; }
  .search-row{ flex-direction:column; align-items:stretch; }
  .btn-primary{ width:100%; }
}
