:root{
    --chalkboard:#24372C;
    --chalkboard-deep:#1A281F;
    --chalk:#EFEBDF;
    --manila:#E9DFC5;
    --manila-deep:#DDCFAC;
    --paper:#FBF9F3;
    --ink:#1C231D;
    --marker:#F2BE14;
    --marker-deep:#C99500;
    --red-pen:#9A3220;
    --line:rgba(28,35,29,0.12);
    --shadow:0 12px 30px rgba(28,35,29,0.14);
    --font-display:'Fraunces', serif;
    --font-body:'Inter', sans-serif;
    --font-mono:'IBM Plex Mono', monospace;
  }

  *{box-sizing:border-box;}
  html{scroll-behavior:smooth;}
  body{
    margin:0;
    background:var(--paper);
    color:var(--ink);
    font-family:var(--font-body);
    line-height:1.55;
    -webkit-font-smoothing:antialiased;
    position:relative;
  }
  body::before{
    content:"";
    position:fixed; inset:0; z-index:999; pointer-events:none;
    opacity:0.035; mix-blend-mode:multiply;
    background-image:url('data:image/svg+xml,%3Csvg%20xmlns=%22http://www.w3.org/2000/svg%22%20width=%22200%22%20height=%22200%22%3E%3Cfilter%20id=%22n%22%3E%3CfeTurbulence%20type=%22fractalNoise%22%20baseFrequency=%220.9%22%20numOctaves=%222%22%20stitchTiles=%22stitch%22/%3E%3C/filter%3E%3Crect%20width=%22100%25%22%20height=%22100%25%22%20filter=%22url(%23n)%22/%3E%3C/svg%3E');
  }
  img{max-width:100%;display:block;}
  a{color:inherit;}
  .wrap{max-width:1160px;margin:0 auto;padding:0 24px;}

  h1,h2,h3{
    font-family:var(--font-display);
    font-weight:600;
    line-height:1.08;
    margin:0;
    letter-spacing:-0.01em;
  }
  .eyebrow{
    font-family:var(--font-mono);
    font-size:12.5px;
    font-weight:600;
    letter-spacing:0.08em;
    text-transform:uppercase;
  }

  a:focus-visible, button:focus-visible{
    outline:3px solid var(--marker);
    outline-offset:3px;
  }

  /* ---------- Header ---------- */
  .site-header{
    position:sticky; top:0; z-index:50;
    background:rgba(251,249,243,0.92);
    backdrop-filter:blur(8px);
    border-bottom:1px solid var(--line);
  }
  .header-inner{
    display:flex; align-items:center; justify-content:space-between;
    padding:16px 24px;
  }
  .logo{
    display:flex; align-items:center; gap:10px;
    font-family:var(--font-display); font-weight:700; font-size:19px;
    text-decoration:none;
  }
  .logo-mark{
    width:34px; height:34px; border-radius:8px;
    background:var(--chalkboard);
    display:flex; align-items:center; justify-content:center;
    color:var(--chalk); font-family:var(--font-mono); font-size:14px; font-weight:600;
    transform:rotate(-4deg);
    flex-shrink:0;
  }
  .main-nav{display:flex; gap:28px; list-style:none; margin:0; padding:0;}
  .main-nav a{
    text-decoration:none; font-weight:500; font-size:14.5px;
    padding:6px 2px; border-bottom:2px solid transparent;
    transition:border-color .15s ease;
  }
  .main-nav a:hover{border-color:var(--marker-deep);}
  .nav-toggle{
    display:none; align-items:center; justify-content:center;
    width:40px; height:40px; border-radius:8px; border:1px solid var(--line);
    background:transparent; cursor:pointer;
  }
  .nav-toggle::before, .nav-toggle::after, .nav-toggle .bar{
    content:""; display:block; width:18px; height:2px; background:var(--ink);
  }
  .nav-toggle::before{margin-bottom:5px;}
  .nav-toggle::after{margin-top:5px;}
  @media (max-width:820px){
    .nav-toggle{display:flex; flex-direction:column;}
    .main-nav{
      display:none;
      position:absolute; top:100%; left:0; right:0;
      background:var(--paper); border-bottom:1px solid var(--line);
      flex-direction:column; gap:0; padding:8px 24px 16px;
    }
    .main-nav.is-open{display:flex;}
    .main-nav a{display:block; padding:12px 2px; border-bottom:1px solid var(--line);}
    .header-inner{position:relative; flex-wrap:wrap;}
  }

  /* ---------- Hero ---------- */
  .hero{
    background:var(--chalkboard);
    color:var(--chalk);
    position:relative;
    overflow:hidden;
    padding:76px 0 96px;
  }
  .hero::before{
    content:"";
    position:absolute; inset:0;
    background-image:
      linear-gradient(rgba(239,235,223,0.05) 1px, transparent 1px),
      linear-gradient(90deg, rgba(239,235,223,0.05) 1px, transparent 1px);
    background-size:42px 42px;
    pointer-events:none;
  }
  .hero-grid{
    position:relative;
    display:grid;
    grid-template-columns:1.15fr 0.85fr;
    gap:56px;
    align-items:center;
  }
  @media (max-width:900px){
    .hero-grid{grid-template-columns:1fr; gap:40px;}
  }
  .hero-eyebrow{color:var(--marker); margin-bottom:18px; display:inline-block;}
  .hero h1{font-size:clamp(34px,4.6vw,54px); color:var(--chalk); max-width:640px;}
  .hero h1 em{
    font-style:normal; color:var(--marker);
    background:linear-gradient(180deg, transparent 62%, rgba(242,190,20,0.28) 62%);
  }
  .hero p.lede{
    font-size:17.5px; max-width:520px; margin:22px 0 32px;
    color:rgba(239,235,223,0.86);
  }
  .hero-ctas{display:flex; gap:14px; flex-wrap:wrap;}
  .btn{
    display:inline-flex; align-items:center; gap:8px;
    padding:13px 24px; border-radius:8px;
    font-weight:600; font-size:15px; text-decoration:none;
    border:2px solid transparent; cursor:pointer;
    transition:transform .15s ease, box-shadow .15s ease;
  }
  .btn:hover{transform:translateY(-2px);}
  .btn-primary{background:var(--marker); color:var(--ink); box-shadow:0 6px 0 var(--marker-deep);}
  .btn-primary:hover{box-shadow:0 8px 0 var(--marker-deep);}
  .btn-ghost{border-color:rgba(239,235,223,0.35); color:var(--chalk);}
  .btn-ghost:hover{border-color:var(--chalk);}

  /* ---------- Stamp badges (signature element) ---------- */
  .stamp-cluster{position:relative; height:280px;}
  .stamp{
    position:absolute;
    width:150px; height:150px;
    border-radius:50%;
    border:3px solid var(--stamp-color, var(--red-pen));
    color:var(--stamp-color, var(--red-pen));
    background:rgba(239,235,223,0.03);
    display:flex; align-items:center; justify-content:center; text-align:center;
    font-family:var(--font-mono); font-weight:600; font-size:12.5px;
    letter-spacing:0.03em; line-height:1.3;
    padding:14px;
    filter:url(#stampTexture);
    opacity:0;
    transform:scale(0.6) rotate(var(--stamp-rot,0deg));
    animation:stampDown .6s cubic-bezier(.2,1.4,.4,1) forwards;
  }
  .stamp span{transform:rotate(var(--stamp-rot,0deg));}
  .stamp--1{--stamp-rot:-9deg; --stamp-color:#E7DCC3; top:6%; left:8%; animation-delay:.15s; border-color:var(--marker);}
  .stamp--2{--stamp-rot:6deg; --stamp-color:#EFEBDF; top:32%; left:44%; animation-delay:.4s;}
  .stamp--3{--stamp-rot:-4deg; --stamp-color:#EFEBDF; top:60%; left:6%; animation-delay:.65s;}
  @keyframes stampDown{
    0%{opacity:0; transform:scale(0.5) rotate(var(--stamp-rot,0deg));}
    60%{opacity:1;}
    100%{opacity:1; transform:scale(1) rotate(var(--stamp-rot,0deg));}
  }
  @media (max-width:900px){ .stamp-cluster{height:240px;} .stamp{width:110px;height:110px;font-size:10.5px;} }

  /* ---------- Torn-paper divider (signature transition) ---------- */
  .torn-divider{
    height:18px;
    background-color:var(--manila);
    background-image:
      linear-gradient(135deg, var(--chalkboard) 25%, transparent 25%),
      linear-gradient(225deg, var(--chalkboard) 25%, transparent 25%);
    background-position:top left;
    background-size:22px 22px;
    background-repeat:repeat-x;
  }

  /* ---------- Trust bar ---------- */
  .trust-bar{
    background:var(--manila);
    border-bottom:1px solid var(--line);
  }
  .trust-row{
    display:flex; flex-wrap:wrap; gap:28px; justify-content:center;
    padding:22px 0; font-family:var(--font-mono); font-size:13px; font-weight:600;
    letter-spacing:0.02em;
  }
  .trust-row li{list-style:none; display:flex; align-items:center; gap:8px;}
  .trust-row svg{flex-shrink:0;}

  /* ---------- Section basics ---------- */
  section{padding:88px 0;}
  .section-head{max-width:640px; margin-bottom:44px;}
  .section-head .eyebrow{color:var(--red-pen);}
  .section-head h2{font-size:clamp(26px,3.2vw,36px); margin-top:12px;}
  .section-head p{font-size:16px; color:#4B5548; margin-top:14px;}

  /* ---------- Category hub cards ---------- */
  .hub-grid{display:grid; grid-template-columns:repeat(3,1fr); gap:24px;}
  @media (max-width:860px){.hub-grid{grid-template-columns:1fr;}}
  .hub-card{
    background:var(--manila);
    border-radius:14px;
    padding:32px 28px;
    text-decoration:none; color:var(--ink);
    border:1px solid var(--line);
    transition:transform .18s ease, box-shadow .18s ease, background .18s ease;
    display:flex; flex-direction:column; gap:14px;
  }
  .hub-card:hover{transform:translateY(-4px); box-shadow:var(--shadow); background:var(--manila-deep);}
  .hub-card .icon{
    width:46px; height:46px; border-radius:50%;
    background:var(--paper); border:1px solid var(--line);
    display:flex; align-items:center; justify-content:center;
  }
  .hub-card .icon svg{width:22px; height:22px; stroke:var(--chalkboard);}
  .hub-card h3{font-size:21px;}
  .hub-card p{font-size:14.5px; color:#4B5548; margin:0; flex-grow:1;}
  .hub-card .go{font-family:var(--font-mono); font-size:13px; font-weight:600; color:var(--ink);}

  /* ---------- Process (how we test) ---------- */
  .process{background:var(--chalkboard); color:var(--chalk);}
  .process .section-head .eyebrow{color:var(--marker);}
  .process .section-head p{color:rgba(239,235,223,0.78);}
  .process-grid{display:grid; grid-template-columns:repeat(4,1fr); gap:20px;}
  @media (max-width:860px){.process-grid{grid-template-columns:1fr 1fr;}}
  @media (max-width:560px){.process-grid{grid-template-columns:1fr;}}
  .process-step{border-top:2px solid var(--marker); padding-top:16px;}
  .process-step .step-num{font-family:var(--font-mono); font-size:13px; color:var(--marker); font-weight:600;}
  .process-step h4{font-family:var(--font-display); font-size:18px; font-weight:600; margin:8px 0 8px;}
  .process-step p{font-size:14px; color:rgba(239,235,223,0.75); margin:0;}

  /* ---------- Latest guides ---------- */
  .guides-grid{display:grid; grid-template-columns:repeat(3,1fr); gap:22px;}
  @media (max-width:900px){.guides-grid{grid-template-columns:1fr 1fr;}}
  @media (max-width:600px){.guides-grid{grid-template-columns:1fr;}}
  .guide-card{
    background:var(--paper); border:1px solid var(--line); border-radius:12px;
    padding:24px; text-decoration:none; color:var(--ink);
    display:flex; flex-direction:column; gap:12px; height:100%;
    transition:box-shadow .18s ease, transform .18s ease;
  }
  .guide-card:hover{box-shadow:var(--shadow); transform:translateY(-3px);}
  .guide-tag{
    font-family:var(--font-mono); font-size:11px; font-weight:600; letter-spacing:0.04em;
    color:var(--red-pen); text-transform:uppercase;
  }
  .guide-card h3{font-size:18px; line-height:1.3;}
  .guide-card .read{font-family:var(--font-mono); font-size:12.5px; font-weight:600; margin-top:auto;}

  /* ---------- Editorial / E-E-A-T ---------- */
  .editorial{background:var(--manila);}
  .editorial-inner{
    display:grid; grid-template-columns:auto 1fr; gap:28px; align-items:start;
    background:var(--paper); border:1px solid var(--line); border-radius:16px; padding:36px;
  }
  @media (max-width:640px){.editorial-inner{grid-template-columns:1fr;}}
  .editorial-badge{
    width:64px; height:64px; border-radius:14px;
    flex-shrink:0;
  }
  .editorial h3{font-size:20px; margin-bottom:8px;}
  .editorial p{font-size:15px; color:#4B5548; margin:0 0 10px;}
  .editorial ul{margin:0; padding-left:18px; font-size:14.5px; color:#4B5548;}

  /* ---------- Newsletter ---------- */
  .newsletter{background:var(--chalkboard); color:var(--chalk);}
  .newsletter-inner{
    display:flex; justify-content:space-between; align-items:center; gap:40px;
    flex-wrap:wrap;
  }
  .newsletter h2{font-size:clamp(24px,3vw,32px); max-width:420px;}
  .newsletter p{color:rgba(239,235,223,0.78); margin-top:10px; max-width:420px;}
  .newsletter-form{display:flex; gap:10px; flex-wrap:wrap;}
  .newsletter-form input{
    padding:13px 16px; border-radius:8px; border:2px solid rgba(239,235,223,0.25);
    background:transparent; color:var(--chalk); font-size:15px; min-width:220px;
    font-family:var(--font-body);
  }
  .newsletter-form input::placeholder{color:rgba(239,235,223,0.55);}

  /* ---------- Footer ---------- */
  footer{background:var(--chalkboard-deep); color:rgba(239,235,223,0.6); font-size:13.5px;}
  .footer-inner{
    display:flex; justify-content:space-between; align-items:center; flex-wrap:wrap; gap:16px;
    padding:28px 0;
  }
  .footer-links{display:flex; gap:20px; list-style:none; padding:0; margin:0; flex-wrap:wrap;}
  .footer-links a{text-decoration:none; color:inherit;}
  .footer-links a:hover{color:var(--chalk);}

  /* ---------- Reveal on scroll ---------- */
  .reveal{opacity:0; transform:translateY(18px); transition:opacity .55s ease, transform .55s ease;}
  .reveal.is-visible{opacity:1; transform:translateY(0);}

  @media (prefers-reduced-motion:reduce){
    html{scroll-behavior:auto;}
    .stamp{animation:none; opacity:1; transform:scale(1) rotate(var(--stamp-rot,0deg));}
    .reveal{opacity:1; transform:none; transition:none;}
    .btn:hover{transform:none;}
  }
