/* =========================================================
   CheckMyError — Premium Light Theme
   Clean rebuild: no dead dark-mode variables, no patch layers
   ========================================================= */

@import url('https://fonts.googleapis.com/css2?family=DM+Sans:ital,opsz,wght@0,9..40,400;0,9..40,500;0,9..40,700;0,9..40,800;0,9..40,900;1,9..40,400&family=DM+Mono:wght@400;500&display=swap');

:root {
  /* Background */
  --bg:        #f5faf7;
  --bg-soft:   #edf6f0;
  --bg-mid:    #e5f0ea;

  /* Surface */
  --panel:       #ffffff;
  --panel-2:     #f9fdfb;
  --panel-3:     #f2f8f4;

  /* Cards */
  --card:        rgba(255,255,255,.92);
  --card-strong: rgba(255,255,255,.98);

  /* Text */
  --text:    #0f2d38;
  --muted:   #4e6b75;
  --muted-2: #6b8490;

  /* Borders */
  --line:        rgba(15,45,56,.07);
  --line-strong: rgba(15,45,56,.12);

  /* Brand accent — green */
  --accent:   #16a34a;
  --accent-h: #15803d;
  --accent-l: #bbf7d0;
  --accent-glow: rgba(22,163,74,.16);

  /* Status */
  --good:   #16a34a;
  --warn:   #d97706;
  --danger: #dc2626;

  /* Shadows */
  --shadow-xl: 0 32px 80px rgba(15,45,56,.09);
  --shadow-lg: 0 20px 48px rgba(15,45,56,.08);
  --shadow-md: 0 12px 32px rgba(15,45,56,.06);
  --shadow-sm: 0 6px 16px rgba(15,45,56,.05);
  --shadow-xs: 0 2px 8px  rgba(15,45,56,.04);

  /* Radii */
  --r-xl: 28px;
  --r-lg: 22px;
  --r-md: 16px;
  --r-sm: 12px;
  --r-xs: 8px;
  --r-pill: 999px;

  /* Layout */
  --max:   1200px;
  --nav-h: 76px;

  /* Font */
  --font-body:  'DM Sans', ui-sans-serif, system-ui, -apple-system, sans-serif;
  --font-mono:  'DM Mono', ui-monospace, 'Cascadia Code', monospace;
}

/* ── Reset ─────────────────────────────────────────────── */

*,*::before,*::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 1rem;
  color: var(--text);
  line-height: 1.68;
  background:
    radial-gradient(ellipse 80% 50% at 0% 0%,  rgba(22,163,74,.09),  transparent),
    radial-gradient(ellipse 60% 40% at 100% 5%, rgba(20,184,166,.07), transparent),
    linear-gradient(180deg, #f5faf7 0%, #edf6f0 60%, #e8f3eb 100%);
  min-height: 100vh;
}

img    { max-width: 100%; display: block; }
p      { margin: 0 0 16px; }
ul     { margin: 0; padding-left: 20px; }
li     { margin: 0 0 8px; }
strong { color: var(--text); font-weight: 700; }

a {
  color: var(--accent-h);
  text-decoration: none;
  transition: color .18s, opacity .18s, background .18s, border-color .18s, box-shadow .22s, transform .18s;
}
a:hover { color: #0f5c33; }

::selection { background: rgba(22,163,74,.18); color: var(--text); }

:focus-visible {
  outline: 2px solid rgba(22,163,74,.60);
  outline-offset: 3px;
  border-radius: var(--r-xs);
}

code, kbd {
  font-family: var(--font-mono);
  font-size: .92em;
  background: var(--bg-mid);
  border: 1px solid var(--line-strong);
  border-radius: 5px;
  padding: 2px 6px;
  color: #0f4a28;
}

/* ── Layout helpers ─────────────────────────────────────── */

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

.section { padding: 36px 0; }
.section-sm { padding: 24px 0; }

/* ── Typography ─────────────────────────────────────────── */

h1,h2,h3,h4 {
  margin: 0 0 14px;
  line-height: 1.15;
  letter-spacing: -.025em;
  color: var(--text);
}

h1 { font-size: clamp(2.1rem, 5vw, 3.8rem); max-width: 16ch; font-weight: 900; }
h2 { font-size: clamp(1.4rem, 3vw, 2.1rem); font-weight: 800; }
h3 { font-size: 1.04rem; font-weight: 700; letter-spacing: -.01em; }
h4 { font-size: .96rem; font-weight: 700; }

.kicker {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  font-size: .75rem;
  font-weight: 800;
  letter-spacing: .11em;
  text-transform: uppercase;
  color: var(--accent-h);
  margin-bottom: 10px;
}
.kicker::before {
  content: '';
  width: 22px;
  height: 2px;
  border-radius: 2px;
  background: linear-gradient(90deg, var(--accent), transparent);
  flex-shrink: 0;
}

/* ── Nav / Topbar ───────────────────────────────────────── */

.topbar {
  position: sticky;
  top: 0;
  z-index: 80;
  background: rgba(245,250,247,.90);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--line);
  box-shadow: 0 1px 0 rgba(255,255,255,.7), var(--shadow-xs);
}

.nav {
  min-height: var(--nav-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.brand {
  font-weight: 900;
  font-size: 1.08rem;
  letter-spacing: -.03em;
  color: var(--text);
  display: inline-flex;
  flex-direction: column;
  line-height: 1.05;
  flex-shrink: 0;
}
.brand small {
  margin-top: 5px;
  font-size: .72rem;
  color: var(--muted);
  font-weight: 600;
  letter-spacing: .01em;
}
.brand:hover, .brand:focus-visible { color: var(--text); }

.navlinks {
  display: flex;
  align-items: center;
  gap: 4px;
  flex-wrap: wrap;
}
.navlinks a {
  padding: 9px 13px;
  border-radius: var(--r-pill);
  color: var(--muted);
  font-size: .93rem;
  font-weight: 700;
  border: 1px solid transparent;
}
.navlinks a:hover,
.navlinks a:focus-visible {
  color: var(--text);
  border-color: var(--line-strong);
  background: rgba(255,255,255,.80);
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

/* ── Buttons ────────────────────────────────────────────── */

.btn {
  appearance: none;
  border: none;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  padding: 0 20px;
  border-radius: var(--r-pill);
  font-family: var(--font-body);
  font-weight: 800;
  font-size: .93rem;
  letter-spacing: -.01em;
  transition: transform .16s, box-shadow .22s, filter .16s, background .18s;
}
.btn:hover  { transform: translateY(-1px); }
.btn:active { transform: translateY(0); }

.btn-primary {
  color: #fff;
  background: linear-gradient(135deg, var(--accent) 0%, #22c55e 100%);
  box-shadow: 0 8px 24px var(--accent-glow);
}
.btn-primary:hover {
  box-shadow: 0 14px 34px rgba(22,163,74,.26);
  color: #fff;
}

.btn-ghost {
  color: var(--text);
  background: rgba(255,255,255,.80);
  border: 1px solid var(--line-strong);
}
.btn-ghost:hover {
  background: #fff;
  color: var(--text);
}

/* ── Mobile menu toggle ─────────────────────────────────── */

.menuToggle {
  width: 44px;
  height: 44px;
  display: none;
  align-items: center;
  justify-content: center;
  border-radius: var(--r-sm);
  border: 1px solid var(--line-strong);
  background: rgba(255,255,255,.85);
  color: var(--text);
  cursor: pointer;
}
.menuToggle svg { width: 20px; height: 20px; }

/* ── Mobile Drawer ──────────────────────────────────────── */

.mobileDrawerBackdrop {
  position: fixed;
  inset: 0;
  background: rgba(8,22,28,.22);
  backdrop-filter: blur(8px);
  opacity: 0;
  visibility: hidden;
  transition: opacity .24s, visibility .24s;
  z-index: 96;
}

.mobileDrawer {
  position: fixed;
  top: 0;
  right: 0;
  width: min(90vw, 380px);
  height: 100dvh;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding: 20px;
  background: linear-gradient(180deg, #f9fdfb 0%, #eef7f2 100%);
  border-left: 1px solid var(--line);
  box-shadow: -16px 0 40px rgba(8,22,28,.10);
  transform: translateX(102%);
  transition: transform .28s cubic-bezier(.4,0,.2,1);
  z-index: 97;
}

body.drawer-open { overflow: hidden; }
body.drawer-open .mobileDrawerBackdrop { opacity: 1; visibility: visible; }
body.drawer-open .mobileDrawer { transform: translateX(0); }

.mobileDrawerTop {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 20px;
}
.mobileDrawerTitle { font-weight: 900; font-size: 1.05rem; color: var(--text); }
.mobileDrawerTitle small { display: block; margin-top: 5px; color: var(--muted); font-size: .74rem; font-weight: 600; }
.mobileDrawerClose {
  width: 40px; height: 40px;
  border-radius: var(--r-sm);
  border: 1px solid var(--line-strong);
  background: rgba(255,255,255,.85);
  color: var(--text);
  cursor: pointer;
  font-size: 1rem;
}
.mobileDrawerSection { margin-bottom: 16px; }
.mobileDrawerLabel {
  display: block;
  font-size: .76rem;
  font-weight: 800;
  letter-spacing: .11em;
  text-transform: uppercase;
  color: var(--accent-h);
  margin-bottom: 10px;
}
.mobileDrawerNav {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.mobileDrawerNav a {
  display: block;
  padding: 12px 14px;
  border-radius: var(--r-sm);
  border: 1px solid var(--line);
  background: rgba(255,255,255,.86);
  color: var(--text);
  font-weight: 700;
  font-size: .95rem;
}
.mobileDrawerNav a:hover {
  background: rgba(22,163,74,.08);
  border-color: rgba(22,163,74,.20);
  color: var(--text);
}

/* ── Trust Bar ──────────────────────────────────────────── */

.trust-bar {
  background: linear-gradient(90deg, rgba(22,163,74,.07), rgba(22,163,74,.04));
  border-bottom: 1px solid rgba(22,163,74,.12);
  padding: 9px 0;
}

.trust-bar-inner {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 6px 20px;
  font-size: .80rem;
  font-weight: 700;
  color: var(--muted);
}

.trust-bar-inner span {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.trust-bar-inner span::before {
  content: '✓';
  color: var(--accent);
  font-weight: 900;
}

/* ── Hero ───────────────────────────────────────────────── */

.hero {
  padding: 46px 0 32px;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr;
  gap: 22px;
  align-items: start;
}

/* ── Cards (shared surface) ────────────────────────────── */

.hero-card,
.card,
.note,
.article-main,
.article-side,
.ad-slot,
.searchbox,
.contact-card {
  position: relative;
  background: var(--card);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-md);
  backdrop-filter: blur(10px);
}

.hero-card {
  border-radius: var(--r-xl);
  padding: 32px;
  overflow: hidden;
}
.hero-card::after {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  border-radius: inherit;
  background: linear-gradient(135deg, rgba(22,163,74,.05), transparent 50%);
}

.hero-card p { color: var(--muted); max-width: 58ch; }

/* Side panel */
.side-panel {
  border-radius: var(--r-xl);
  padding: 28px;
  display: flex;
  flex-direction: column;
  gap: 18px;
  overflow: hidden;
}
.side-panel h2 { font-size: 1.2rem; margin-bottom: 6px; }

.metrics {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}
.metric {
  padding: 14px 16px;
  border-radius: var(--r-md);
  border: 1px solid var(--line);
  background: var(--panel-3);
}
.metric strong { display: block; font-size: 1.35rem; color: var(--accent-h); margin-bottom: 2px; }
.metric span   { display: block; color: var(--muted); font-size: .84rem; line-height: 1.3; }

/* Searchbox */
.searchbox {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px;
  border-radius: var(--r-lg);
  margin: 22px 0 16px;
  box-shadow: var(--shadow-sm), inset 0 1px 0 rgba(255,255,255,.9);
}
.searchbox input {
  flex: 1;
  min-width: 0;
  border: none;
  outline: none;
  background: transparent;
  color: var(--text);
  font-family: var(--font-body);
  font-size: 1rem;
  padding: 10px 14px;
}
.searchbox input::placeholder { color: var(--muted-2); }

/* Quick links */
.quick-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.quick-links a {
  display: inline-flex;
  align-items: center;
  padding: 9px 14px;
  border-radius: var(--r-pill);
  border: 1px solid var(--line-strong);
  background: rgba(255,255,255,.82);
  color: var(--text);
  font-size: .88rem;
  font-weight: 700;
}
.quick-links a:hover {
  transform: translateY(-1px);
  border-color: rgba(22,163,74,.30);
  background: rgba(22,163,74,.08);
  color: var(--text);
  box-shadow: 0 6px 18px rgba(22,163,74,.10);
}

/* ── Section head ───────────────────────────────────────── */

.section-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 20px;
}
.section-head a {
  font-size: .88rem;
  font-weight: 700;
  color: var(--accent-h);
  white-space: nowrap;
}
.section-head a:hover { color: #0f5c33; }

/* ── Grids ──────────────────────────────────────────────── */

.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 18px; }

/* ── Cards ──────────────────────────────────────────────── */

.card {
  border-radius: var(--r-lg);
  padding: 22px;
  overflow: hidden;
  transition: transform .18s, box-shadow .22s, border-color .18s;
}
.card:hover {
  transform: translateY(-3px);
  border-color: rgba(22,163,74,.20);
  box-shadow: var(--shadow-lg);
}
.card p    { color: var(--muted); font-size: .93rem; }
.card h3   { color: var(--text); }
.card h3 a { color: var(--text); }
.card h3 a:hover { color: var(--accent-h); }

.card.card-link { cursor: pointer; }
.card.card-link:hover::after {
  content: 'Open guide →';
  position: absolute;
  right: 18px;
  bottom: 14px;
  font-size: .82rem;
  font-weight: 700;
  color: var(--accent-h);
}

/* ── Callout / Note ─────────────────────────────────────── */

.note {
  border-radius: var(--r-md);
  padding: 16px 20px;
  background: linear-gradient(135deg, rgba(22,163,74,.10), rgba(34,197,94,.06));
  border: 1px solid rgba(22,163,74,.16);
  color: #0f4a28;
  box-shadow: none;
  backdrop-filter: none;
  font-size: .96rem;
  margin: 20px 0 24px;
}
.note strong { color: #0a3820; }

/* ── Article layout ─────────────────────────────────────── */

.article {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) 300px;
  gap: 24px;
  align-items: start;
}

.article-main,
.article-side {
  border-radius: var(--r-xl);
  padding: 30px;
  opacity: 1;
  transform: none;
  visibility: visible;
}

.article-main p,
.article-main li { color: #2d4a53; }
.article-main ul { margin-bottom: 20px; }
.article-main h2 { margin-top: 28px; font-size: 1.3rem; }
.article-main h2:first-of-type { margin-top: 0; }

.article-side {
  position: sticky;
  top: calc(var(--nav-h) + 16px);
  padding: 22px;
}
.article-side p,
.article-side li,
.article-side a { color: var(--muted); font-size: .93rem; }
.article-side a:hover { color: var(--accent-h); }
.article-side h2 { font-size: 1rem; margin-bottom: 12px; }

/* Last reviewed badge */
.reviewed-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: .80rem;
  font-weight: 700;
  color: var(--muted);
  background: var(--panel-3);
  border: 1px solid var(--line);
  border-radius: var(--r-pill);
  padding: 5px 12px;
  margin-bottom: 18px;
}
.reviewed-badge::before { content: '✓'; color: var(--accent); }

/* ── Breadcrumbs ────────────────────────────────────────── */

.breadcrumbs {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
  color: var(--muted);
  font-size: .86rem;
  margin-bottom: 20px;
}
.breadcrumbs a { color: var(--accent-h); font-weight: 700; }
.breadcrumbs a:hover { color: #0f5c33; }
.breadcrumbs span { opacity: .6; }

/* ── List clean (guide lists) ───────────────────────────── */

.list-clean {
  list-style: none;
  padding: 0;
  margin: 0;
}
.list-clean li {
  margin: 0;
  padding: 13px 0;
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  gap: 10px;
}
.list-clean li::before {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
  flex-shrink: 0;
  opacity: .5;
}
.list-clean li:last-child { border-bottom: none; }
.list-clean a { color: var(--text); font-weight: 700; font-size: .96rem; }
.list-clean a:hover { color: var(--accent-h); }

/* ── Contact card ───────────────────────────────────────── */

.contact-card {
  border-radius: var(--r-md);
  padding: 14px 16px;
  border: 1px solid var(--line);
  background: var(--panel-3);
  box-shadow: none;
  backdrop-filter: none;
}
.contact-card p { font-size: .90rem; color: var(--muted); }

/* ── Ad slot ────────────────────────────────────────────── */

.ad-slot {
  border-radius: var(--r-lg);
  padding: 28px;
  text-align: center;
  color: var(--muted-2);
  font-size: .88rem;
  background:
    repeating-linear-gradient(-45deg,
      rgba(15,45,56,.012), rgba(15,45,56,.012) 12px,
      rgba(15,45,56,.024) 12px, rgba(15,45,56,.024) 24px),
    var(--panel-2);
  box-shadow: none;
  backdrop-filter: none;
}

/* ── Divider ────────────────────────────────────────────── */

.divider {
  border: none;
  border-top: 1px solid var(--line);
  margin: 8px 0;
}

/* ── Footer ─────────────────────────────────────────────── */

.footer {
  padding: 28px 0 40px;
  border-top: 1px solid var(--line);
  margin-top: 32px;
  background: linear-gradient(180deg, transparent, rgba(22,163,74,.03));
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.3fr .8fr .8fr;
  gap: 28px;
  margin-bottom: 24px;
}

.footer-brand { font-size: 1.02rem; font-weight: 900; letter-spacing: -.02em; color: var(--text); display: block; margin-bottom: 8px; }
.footer p      { margin: 0 0 8px; color: var(--muted); font-size: .92rem; }
.footer a      { color: var(--accent-h); font-weight: 600; font-size: .92rem; }
.footer a:hover { color: #0f5c33; }
.footer-col-label { font-size: .74rem; font-weight: 800; letter-spacing: .10em; text-transform: uppercase; color: var(--muted); margin-bottom: 12px; display: block; }

.site-network {
  border-top: 1px solid var(--line);
  padding-top: 18px;
  text-align: center;
  font-size: .84rem;
  color: var(--muted);
}
.site-network p { margin: 0; }
.site-network a { color: var(--accent-h); font-weight: 600; }
.site-network a:hover { color: #0f5c33; }

/* ── Scroll reveal ──────────────────────────────────────── */

.reveal { opacity: 0; transform: translateY(16px); transition: opacity .50s ease, transform .50s ease; }
.reveal.in { opacity: 1; transform: translateY(0); }

/* ── Responsive ─────────────────────────────────────────── */

@media (max-width: 1040px) {
  .hero-grid,
  .article,
  .footer-grid { grid-template-columns: 1fr; }

  .article-side { position: static; top: auto; }
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .grid-3 { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 820px) {
  .navlinks  { display: none; }
  .menuToggle { display: inline-flex; }
  .hero { padding-top: 26px; }

  .searchbox {
    flex-direction: column;
    align-items: stretch;
  }
  .searchbox .btn { width: 100%; justify-content: center; }
}

@media (max-width: 640px) {
  .container { width: min(calc(100% - 24px), var(--max)); }
  .section { padding: 22px 0; }

  .grid-3,
  .grid-4,
  .grid-2,
  .metrics { grid-template-columns: 1fr; }

  .hero-card { border-radius: var(--r-lg); padding: 22px; }
  .card      { padding: 18px; }
  .article-main,
  .article-side { padding: 20px; }

  .btn { min-height: 44px; }

  .quick-links a { width: 100%; justify-content: center; }

  .mobileDrawer { width: 100vw; border-left: none; }

  h1 { font-size: 2rem; }
}
