:root{
  --bg:#ffffff;
  --card:#ffffff;
  --text:#0f172a;
  --muted:#475569;
  --line:#e5e7eb;
  --accent:#2563eb;
  --accent-soft:#eff6ff;
}

*{box-sizing:border-box}
html,body{height:100%}

body{
  margin:0;
  font-family: system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
}

/* Links */
a{color:inherit; text-decoration:none}
a:hover{color:var(--accent)}

/* Layout */
.container{width:min(1040px, 92vw); margin:0 auto}

/* Header */
.header{
  position:sticky;
  top:0;
  background:#ffffff;
  border-bottom:1px solid var(--line);
  z-index:10;
}
.header__inner{
  display:flex;
  align-items:center;
  justify-content:space-between;
  padding:14px 0;
}
.brand{
  display:flex;
  gap:10px;
  align-items:center;
}

.brand__logo{
  height:36px;
  width:auto;
  display:block;
}

.brand__mark{
  width:34px;
  height:34px;
  border-radius:8px;
  background: var(--accent);
}
.brand__name{
  font-weight:800;
}
.brand__tag{
  display:block;
  font-size:12px;
  color:var(--muted);
  margin-top:2px;
}

/* Nav */
.nav{
  display:flex;
  gap:8px;
  flex-wrap:wrap;
}
.pill{
  padding:8px 12px;
  border-radius:999px;
  border:1px solid var(--line);
  font-size:14px;
}
.pill:hover{
  background: var(--accent-soft);
  border-color: var(--accent);
}

/* Main */
main{padding:28px 0 60px}

/* Hero */
.hero{
  margin-bottom:22px;
}
.h1{
  font-size: clamp(28px, 4vw, 42px);
  margin:0 0 6px;
}
.lede{
  margin:0;
  color:var(--muted);
  line-height:1.5;
}

/* Grid */
.grid{
  display:grid;
  grid-template-columns: repeat(12, 1fr);
  gap:16px;
}

/* Cards */
.card{
  grid-column: span 6;
  background: var(--card);
  border:1px solid var(--line);
  border-radius:14px;
  padding:18px;
}
.card h2{
  margin:0 0 6px;
  font-size:18px;
}
.card p{
  margin:0 0 12px;
  color:var(--muted);
  line-height:1.45;
}
.actions{
  display:flex;
  gap:10px;
}

/* Buttons */
.btn{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  padding:10px 14px;
  border-radius:10px;
  border:1px solid var(--line);
  background:#fff;
  font-weight:600;
}
.btn--primary{
  background: var(--accent);
  color:#fff;
  border-color: var(--accent);
}
.btn--primary:hover{
  background:#1e40af;
}

/* Forms */
.form{display:grid; gap:14px}
.field{display:grid; gap:6px}
label{font-size:13px; color:var(--muted)}

input, select{
  width:100%;
  padding:12px;
  border-radius:10px;
  border:1px solid var(--line);
  background:#fff;
  font-size:15px;
}
input:focus, select:focus{
  outline:none;
  border-color:var(--accent);
}

.row{
  display:grid;
  grid-template-columns: 1fr 1fr;
  gap:12px;
}

/* Results */
.result{
  margin-top:12px;
  padding:14px;
  border-radius:12px;
  background:#f8fafc;
  border:1px solid var(--line);
}
.result strong{
  font-size:20px;
  display:block;
  margin-bottom:4px;
}
.small{
  font-size:13px;
  color:var(--muted);
  line-height:1.45;
}
.error{
  color:#dc2626;
  font-size:13px;
}

/* Footer */
.footer{
  border-top:1px solid var(--line);
  padding:18px 0;
  font-size:13px;
  color:var(--muted);
}
.footer a{
  color:var(--accent);
  font-weight:600;
}

/* Mobile */
@media (max-width: 760px){
  .card{grid-column: span 12}
  .row{grid-template-columns: 1fr}
  .nav{display:none}
}
/* ---------- Theme overrides ---------- */
.theme-green{
  --accent:#80bf37;
  --accent-soft:#f2fae9; /* light green hover */
}

/* ===== Universal Category Header Nav ===== */
.navcat{
  display:flex;
  align-items:center;
  gap:10px;
  flex-wrap:wrap;
}

.cat > summary{ list-style:none; }
.cat > summary::-webkit-details-marker{ display:none; }

.cat__pill{
  cursor:pointer;
  padding:8px 12px;
  border-radius:999px;
  border:1px solid var(--line);
  font-size:14px;
  user-select:none;
  display:inline-flex;
  align-items:center;
}

.cat--basic .cat__pill{
  border-color:#80bf37;
  color:#166534;
  background:#f2fae9;
}
.cat--adv .cat__pill{
  border-color:#2563eb;
  color:#1e40af;
  background:#eff6ff;
}

.cat{ position:relative; }

.cat__tray{
  display:none;
  position:absolute;
  left:0;
  top:calc(100% + 10px);
  min-width:min(76vw, 820px);
  background:#fff;
  border:1px solid var(--line);
  border-radius:14px;
  padding:10px;
  box-shadow:0 10px 30px rgba(2,6,23,0.12);
  z-index:9999;

  display:grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap:8px;
}

.cat[open] .cat__tray{ display:grid; }

.cat__link{
  padding:10px;
  border-radius:12px;
  border:1px solid var(--line);
  font-size:14px;
}

.cat__link.is-basic{
  border-color: rgba(128,191,55,0.35);
  background: rgba(128,191,55,0.08);
}
.cat__link.is-basic:hover{
  border-color:#80bf37;
  background: rgba(128,191,55,0.14);
}

.cat__link.is-adv{
  border-color: rgba(37,99,235,0.30);
  background: rgba(37,99,235,0.08);
}
.cat__link.is-adv:hover{
  border-color:#2563eb;
  background: rgba(37,99,235,0.14);
}

@media (max-width: 760px){
  .cat{ position:static; }
  .cat__tray{
    position:static;
    min-width:unset;
    width:100%;
    margin-top:10px;
  }
}

/* ===== Slide-in tray animation (right -> left) ===== */
.cat{
  position:relative;
}

/* Start hidden: off to the right */
.cat__tray{
  display:grid;                 /* keep grid; we will animate visibility */
  opacity:0;
  transform: translateX(24px);
  pointer-events:none;

  position:absolute;
  right:0;                      /* anchor to the right side */
  left:auto;
  top:calc(100% + 10px);

  min-width:min(76vw, 820px);
  background:#fff;
  border:1px solid var(--line);
  border-radius:14px;
  padding:10px;
  box-shadow:0 10px 30px rgba(2,6,23,0.12);
  z-index:9999;

  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap:8px;

  transition:
    transform 220ms ease,
    opacity 220ms ease;
}

/* When open: slide into place */
.cat[open] .cat__tray{
  opacity:1;
  transform: translateX(0);
  pointer-events:auto;
}

/* Mobile: trays become in-flow so they don't get cut off */
@media (max-width: 760px){
  .cat{ position:static; }
  .cat__tray{
    position:static;
    min-width:unset;
    width:100%;
    margin-top:10px;
    transform:none;
    opacity:1;
    pointer-events:auto;
    transition:none;
  }
}
/* ===== Home hero upgrade ===== */
.hero--home{
  position:relative;
  overflow:hidden;
  border:1px solid var(--line);
  border-radius:18px;
  background: linear-gradient(180deg, #ffffff, #fbfdff);
  padding:26px;
  margin-bottom:22px;
}

.hero__content{
  position:relative;
  z-index:2;
  max-width:720px;
}

.kicker{
  display:inline-flex;
  align-items:center;
  gap:8px;
  font-size:13px;
  font-weight:700;
  letter-spacing:0.02em;
  color:var(--muted);
  background: #fff;
  border:1px solid var(--line);
  border-radius:999px;
  padding:6px 10px;
  margin:0 0 12px;
}

.accent{
  color: var(--accent);
}

.hero__cta{
  display:flex;
  gap:10px;
  flex-wrap:wrap;
  margin-top:14px;
}

.trust{
  display:flex;
  flex-wrap:wrap;
  gap:10px;
  margin-top:14px;
}
.trust__item{
  font-size:13px;
  color:var(--muted);
  background:#fff;
  border:1px solid var(--line);
  border-radius:999px;
  padding:8px 10px;
}

/* Background blobs + splotch photos */
.hero__bg{
  position:absolute;
  inset:0;
  z-index:1;
  pointer-events:none;
}

.blob{
  position:absolute;
  filter: blur(18px);
  opacity:0.55;
  border-radius: 999px;
}
.blob--a{
  width:340px; height:220px;
  top:-70px; left:-80px;
  background: rgba(37,99,235,0.22);
}
.blob--b{
  width:420px; height:260px;
  bottom:-120px; right:-120px;
  background: rgba(37,99,235,0.18);
}
.blob--c{
  width:260px; height:200px;
  top:40px; right:140px;
  background: rgba(128,191,55,0.16);
}

/* “Splotch bubble” image chips */
.splotch{
  position:absolute;
  width:140px;
  height:140px;
  border-radius: 38% 62% 58% 42% / 44% 35% 65% 56%;
  overflow:hidden;
  border:1px solid rgba(15,23,42,0.08);
  box-shadow: 0 14px 30px rgba(2,6,23,0.10);
  background:#fff;
  opacity:0.95;
}

.splotch img{
  width:100%;
  height:100%;
  object-fit:cover;
  display:block;
}

.splotch--1{ top:18px; right:22px; transform: rotate(8deg); }
.splotch--2{ top:150px; right:170px; transform: rotate(-10deg); width:120px; height:120px; }
.splotch--3{ bottom:18px; right:34px; transform: rotate(12deg); width:110px; height:110px; }

/* Make the hero text stand out over the art */
.hero--home .h1{
  margin:0 0 10px;
}
.hero--home .lede{
  max-width:680px;
}

/* Mobile tuning */
@media (max-width: 760px){
  .hero--home{ padding:18px; }
  .splotch{ display:none; } /* keep it clean on small screens */
  .blob{ opacity:0.45; }
}
.home-head{
  margin:18px 0 10px;
}
.home-head__title{
  margin:0 0 4px;
  font-size:18px;
}
.home-head__sub{
  margin:0;
  color:var(--muted);
  font-size:14px;
}
/* ===== Mobile polish (keep visuals) ===== */
@media (max-width: 760px){

  /* Hero spacing */
  .hero--home{
    padding:18px;
    border-radius:16px;
  }

  /* Make the hero content breathe */
  .hero__content{
    max-width: 100%;
  }

  .kicker{
    font-size:12px;
    padding:6px 10px;
  }

  .hero--home .h1{
    font-size: 30px;
    line-height: 1.12;
  }

  .hero--home .lede{
    font-size: 15px;
    line-height: 1.5;
  }

  /* Keep blobs subtle */
  .blob{
    filter: blur(20px);
    opacity: 0.40;
  }
  .blob--a{ top:-90px; left:-120px; }
  .blob--b{ bottom:-140px; right:-160px; }
  .blob--c{ top:120px; right:-80px; }

  /* KEEP splotches on mobile, but arrange them clean */
  .splotch{
    display:block;
    position:static;
    width:92px;
    height:92px;
    border-radius: 40% 60% 52% 48% / 44% 35% 65% 56%;
    box-shadow: 0 10px 22px rgba(2,6,23,0.10);
  }

  /* Turn the background layer into a top “gallery strip” */
  .hero__bg{
    position:relative;
    inset:auto;
    pointer-events:none;
    margin-bottom:14px;
  }

  /* Make the 3 splotches sit in a row and scroll if needed */
  .hero__bg{
    display:flex;
    gap:10px;
    align-items:center;
    overflow-x:auto;
    padding-bottom:6px;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }
  .hero__bg::-webkit-scrollbar{ display:none; }

  /* Hide the blobs from taking layout space when we switch to flex */
  .blob{
    position:absolute;
  }

  /* Remove old absolute positioning */
  .splotch--1, .splotch--2, .splotch--3{
    transform:none;
  }

  /* Buttons full-width-ish */
  .hero__cta .btn{
    width:100%;
    justify-content:center;
  }

  /* Trust chips wrap nicely */
  .trust{
    gap:8px;
  }
  .trust__item{
    font-size:12px;
    padding:7px 10px;
  }

  /* Cards */
  .card{
    border-radius:14px;
    padding:16px;
  }

  /* Grid already goes 1-column in your CSS — keep it */
}
