/* ============================================================
   Quezlo — design system
   Canvas: soft lilac grey. Each tool owns a hue that floods
   its page. Curved sweep from color into white is the signature.
   ============================================================ */

:root{
  /* canvas */
  --canvas:#F2EFF5;
  --surface:#FFFFFF;
  --surface-2:#FAF8FC;
  --ink:#17141F;
  --ink-2:#3D3750;
  --muted:#6E6880;
  --line:#E4DFEC;
  --line-2:#D6CFE3;

  /* status */
  --ok:#0E9F6E;
  --ok-bg:#E3F7EF;
  --bad:#DC2B4A;
  --bad-bg:#FDE8EC;

  /* per-tool accents, overridden on tool pages */
  --accent:#5B4BE8;
  --accent-2:#3A2DB8;
  --accent-soft:#EDEAFD;
  --accent-ink:#3A2DB8;

  /* tool palette */
  --qr-1:#5B4BE8;      --qr-2:#3524B0;
  --word-1:#9333EA;    --word-2:#6B21A8;
  --unit-1:#F0761E;    --unit-2:#C2410C;
  --palette-1:#E8368F; --palette-2:#B01267;
  --contrast-1:#0EA5A5;--contrast-2:#0B6F72;
  --age-1:#E0A005;     --age-2:#A96A02;
  --date-1:#1FA463;    --date-2:#107346;
  --ai-1:#0B75E8;      --ai-2:#0A3F86;
  --weight-1:#DC2B7A;  --weight-2:#9E1856;
  --pass-1:#16A38A;    --pass-2:#0D6E5C;
  --pct-1:#7C5CFF;     --pct-2:#4E30C7;

  /* mascot backdrop — sampled from the portrait frames */
  --quez-orange:#C56223;

  /* type */
  --display:'Bricolage Grotesque','Segoe UI',system-ui,sans-serif;
  --body:'Plus Jakarta Sans','Segoe UI',system-ui,sans-serif;
  --mono:'JetBrains Mono','SF Mono',ui-monospace,monospace;

  /* shape */
  --r-sm:10px;
  --r-md:16px;
  --r-lg:24px;
  --sweep:64px;
  --shadow:0 1px 2px rgba(23,20,31,.04), 0 8px 24px -12px rgba(23,20,31,.14);
  --shadow-lift:0 2px 4px rgba(23,20,31,.05), 0 18px 40px -18px rgba(23,20,31,.24);
}

*,*::before,*::after{box-sizing:border-box;}
*{margin:0;padding:0;}
html{scroll-behavior:smooth; -webkit-text-size-adjust:100%;}

body{
  background:var(--canvas);
  color:var(--ink);
  font-family:var(--body);
  font-size:16px;
  line-height:1.6;
  min-height:100vh;
  overflow-x:hidden;
  -webkit-font-smoothing:antialiased;
}
::selection{background:var(--accent); color:#fff;}
img,svg{max-width:100%; display:block;}
a{color:var(--accent-ink); text-decoration:none;}
a:hover{text-decoration:underline;}

/* ---------- shell ---------- */
.wrap{width:100%; max-width:1080px; margin-inline:auto; padding-inline:18px;}
@media(min-width:700px){ .wrap{padding-inline:28px;} }

/* ---------- nav ---------- */
.nav{
  position:sticky; top:0; z-index:60;
  background:rgba(242,239,245,.88);
  backdrop-filter:blur(12px);
  border-bottom:1px solid var(--line);
}
.nav-bar{display:flex; align-items:center; justify-content:space-between; gap:12px; min-height:60px; flex-wrap:wrap;}
.brand{
  font-family:var(--display);
  font-weight:800; font-size:22px; letter-spacing:-.03em;
  color:var(--ink); display:flex; align-items:center; gap:8px;
  min-height:40px;
}
.brand:hover{text-decoration:none;}
.brand-dot{
  width:26px; height:26px; border-radius:50%;
  flex:none; object-fit:cover;
  box-shadow:0 0 0 1.5px var(--line-2);
}
.nav-toggle{
  display:flex; align-items:center; gap:7px;
  min-height:42px; padding:0 14px;
  background:var(--surface); border:1px solid var(--line-2);
  border-radius:999px; color:var(--ink);
  font-family:var(--body); font-size:14px; font-weight:600; cursor:pointer;
}
.nav-toggle svg{width:16px; height:16px;}
.nav-links{display:none;}
.nav-links.open{
  display:flex; flex-direction:column;
  flex-basis:100%; width:100%;
  padding:6px 0 16px;
  border-top:1px solid var(--line);
  max-height:calc(100vh - 90px);
  overflow-y:auto;
}
.nav-links a{
  display:flex; align-items:center; gap:11px;
  min-height:48px; padding:4px 2px;
  color:var(--ink-2); font-weight:600; font-size:15px;
}
.nav-links a:hover{color:var(--ink); text-decoration:none;}
.nav-ico{
  width:30px; height:30px; border-radius:9px; flex:none;
  display:grid; place-items:center; color:#fff;
}
.nav-ico svg{width:16px; height:16px;}
@media(min-width:940px){
  .nav-toggle{display:none;}
  .nav-links{display:flex !important; flex-direction:row; gap:4px; border:0; padding:0;}
  .nav-links a{min-height:38px; padding:0 10px; border-radius:9px; font-size:14px; gap:7px;}
  .nav-links a:hover{background:var(--surface);}
  .nav-ico{width:22px; height:22px; border-radius:7px;}
  .nav-ico svg{width:13px; height:13px;}
  .nav-links a span.lbl{display:inline;}
}

/* ---------- hero ---------- */
.hero{
  background:linear-gradient(150deg, var(--accent) 0%, var(--accent-2) 100%);
  color:#fff;
  border-radius:0 0 0 var(--sweep);
  padding:34px 0 46px;
  position:relative;
  overflow:hidden;
}
.hero::after{
  content:""; position:absolute; right:-70px; top:-70px;
  width:230px; height:230px; border-radius:50%;
  background:rgba(255,255,255,.07);
}
.hero .wrap{position:relative; z-index:1;}
.eyebrow{
  display:inline-flex; align-items:center; gap:8px;
  background:rgba(255,255,255,.16);
  border:1px solid rgba(255,255,255,.22);
  padding:6px 13px 6px 9px; border-radius:999px;
  font-family:var(--mono); font-size:11.5px; font-weight:500;
  letter-spacing:.06em; text-transform:uppercase;
  margin-bottom:16px;
}
.eyebrow svg{width:14px; height:14px;}
h1{
  font-family:var(--display);
  font-weight:800; letter-spacing:-.035em; line-height:1.06;
  font-size:clamp(31px,8.4vw,52px);
  max-width:15ch;
}
.hero .lead{
  margin-top:14px; max-width:52ch;
  font-size:16px; color:rgba(255,255,255,.82);
}
@media(min-width:700px){
  .hero{padding:52px 0 66px; --sweep:88px;}
  .hero .lead{font-size:17.5px;}
}

/* ---------- headings ---------- */
h2{font-family:var(--display); font-weight:700; letter-spacing:-.025em; font-size:clamp(21px,4.4vw,27px); line-height:1.2;}
h3{font-family:var(--display); font-weight:700; letter-spacing:-.015em; font-size:17.5px; line-height:1.3;}
h4{font-family:var(--display); font-weight:600; font-size:15px;}

/* ---------- main ---------- */
main{padding-bottom:56px;}
.stack{margin-top:-26px; position:relative; z-index:2;}

/* ---------- panel (the white tool card) ---------- */
.panel{
  background:var(--surface);
  border:1px solid var(--line);
  border-radius:var(--r-lg);
  box-shadow:var(--shadow);
  padding:20px 17px;
}
@media(min-width:700px){ .panel{padding:28px 26px;} }
.panel + .panel{margin-top:18px;}
.panel-head{margin-bottom:18px;}
.panel-head h2{font-size:20px;}
.panel-head p{color:var(--muted); font-size:14px; margin-top:5px;}

/* ---------- prose ---------- */
.prose{max-width:70ch; margin-top:40px;}
.prose h2{margin:34px 0 12px;}
.prose h2:first-child{margin-top:0;}
.prose h3{margin:22px 0 7px;}
.prose p{color:var(--ink-2); margin-bottom:13px; font-size:15.5px;}
.prose ul,.prose ol{padding-left:20px; margin-bottom:15px;}
.prose li{color:var(--ink-2); margin-bottom:7px; font-size:15.5px;}
.prose strong{color:var(--ink); font-weight:700;}
.prose code{
  font-family:var(--mono); font-size:.88em;
  background:var(--accent-soft); color:var(--accent-ink);
  padding:1px 6px; border-radius:5px;
}

/* ---------- forms ---------- */
.field{margin-bottom:15px;}
label{
  display:block; font-size:12.5px; font-weight:700;
  color:var(--muted); margin-bottom:6px;
  letter-spacing:.02em;
}
input[type=text],input[type=email],input[type=tel],input[type=number],
input[type=date],input[type=url],select,textarea{
  width:100%;
  min-height:48px;
  padding:12px 14px;
  font-family:var(--body); font-size:16px; color:var(--ink);
  background:var(--surface-2);
  border:1.5px solid var(--line-2);
  border-radius:var(--r-sm);
  transition:border-color .15s, background .15s;
}
textarea{min-height:150px; resize:vertical; line-height:1.6;}
input:focus,select:focus,textarea:focus{
  outline:none; border-color:var(--accent);
  background:var(--surface);
  box-shadow:0 0 0 3.5px var(--accent-soft);
}
input::placeholder,textarea::placeholder{color:#A39CB4;}
select{
  appearance:none;
  background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%236E6880' stroke-width='2.5' stroke-linecap='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat:no-repeat; background-position:right 13px center; background-size:17px;
  padding-right:40px;
}
input[type=color]{
  width:52px; height:48px; padding:3px; cursor:pointer;
  background:var(--surface-2); border:1.5px solid var(--line-2);
  border-radius:var(--r-sm);
}
input[type=range]{
  width:100%; height:34px; accent-color:var(--accent);
  background:transparent; cursor:pointer;
}
input[type=file]{
  width:100%; font-size:16px; padding:11px;
  background:var(--surface-2); border:1.5px dashed var(--line-2);
  border-radius:var(--r-sm); cursor:pointer; color:var(--muted);
}
input[type=file]::file-selector-button{
  font-family:var(--body); font-size:13px; font-weight:700;
  padding:8px 13px; margin-right:11px; cursor:pointer;
  background:var(--accent-soft); color:var(--accent-ink);
  border:0; border-radius:7px;
}

/* checkbox row */
.check{
  display:flex; align-items:center; gap:10px;
  min-height:44px; cursor:pointer;
  font-size:14.5px; font-weight:600; color:var(--ink-2);
}
.check input[type=checkbox]{
  width:20px; height:20px; flex:none;
  accent-color:var(--accent); cursor:pointer;
}
.check-grid{display:flex; flex-wrap:wrap; gap:6px 20px; margin-bottom:8px;}

/* ---------- buttons ---------- */
.btn{
  display:inline-flex; align-items:center; justify-content:center; gap:8px;
  min-height:50px; padding:0 22px;
  font-family:var(--body); font-size:15.5px; font-weight:700;
  color:#fff; background:var(--accent);
  border:1.5px solid var(--accent);
  border-radius:999px; cursor:pointer;
  transition:transform .12s, box-shadow .15s, background .15s;
  box-shadow:0 6px 16px -8px var(--accent);
}
.btn:hover{background:var(--accent-2); border-color:var(--accent-2); text-decoration:none;}
.btn:active{transform:translateY(1px);}
.btn:focus-visible{outline:3px solid var(--accent-soft); outline-offset:2px;}
.btn svg{width:18px; height:18px;}
.btn-ghost{
  background:var(--surface); color:var(--ink);
  border-color:var(--line-2); box-shadow:none;
}
.btn-ghost:hover{background:var(--surface-2); color:var(--ink); border-color:var(--accent);}
.btn-sm{min-height:42px; padding:0 16px; font-size:14px;}
.btn-row{display:flex; flex-wrap:wrap; gap:10px; align-items:center;}
.btn-block{width:100%;}
@media(min-width:520px){ .btn-block{width:auto;} }

/* ---------- tabs ---------- */
.tabs{
  display:flex; gap:7px; margin-bottom:20px;
  overflow-x:auto; padding-bottom:4px;
  scrollbar-width:none; -webkit-overflow-scrolling:touch;
}
.tabs::-webkit-scrollbar{display:none;}
.tab{
  flex:none;
  display:inline-flex; align-items:center; gap:7px;
  min-height:42px; padding:0 15px;
  font-family:var(--body); font-size:14px; font-weight:700;
  color:var(--ink-2); background:var(--surface-2);
  border:1.5px solid var(--line-2); border-radius:999px;
  cursor:pointer; white-space:nowrap;
  transition:background .15s, color .15s, border-color .15s;
}
.tab svg{width:15px; height:15px;}
.tab:hover{border-color:var(--accent);}
.tab[aria-selected="true"]{background:var(--accent); color:#fff; border-color:var(--accent);}
.tab-panel{display:none;}
.tab-panel.active{display:block; animation:fade .22s ease;}
@keyframes fade{from{opacity:0; transform:translateY(4px);} to{opacity:1; transform:none;}}

/* ---------- grids ---------- */
.g2{display:grid; grid-template-columns:1fr; gap:14px;}
.g2.tight{grid-template-columns:1fr 1fr; gap:12px;}
.g3{display:grid; grid-template-columns:repeat(2,1fr); gap:11px;}
.g4{display:grid; grid-template-columns:repeat(2,1fr); gap:11px;}
.g3.trio{grid-template-columns:repeat(3,1fr); gap:8px;}
.g3.trio .stat{padding:11px 9px;}
.g3.trio .v{font-size:23px;}
@media(min-width:600px){
  .g2{grid-template-columns:1fr 1fr;}
  .g3{grid-template-columns:repeat(3,1fr);}
  .g4{grid-template-columns:repeat(4,1fr);}
}

/* ---------- stat readouts ---------- */
.stat{
  background:var(--surface-2);
  border:1px solid var(--line);
  border-radius:var(--r-md);
  padding:13px 14px;
}
.stat .k{
  display:block; font-size:11.5px; font-weight:700;
  color:var(--muted); letter-spacing:.03em; text-transform:uppercase;
}
.stat .v{
  display:block; margin-top:3px;
  font-family:var(--display); font-weight:800;
  font-size:26px; letter-spacing:-.03em; color:var(--accent-ink);
  line-height:1.15;
}
.stat .v.sm{font-size:17px;}
.stat.hero-stat{background:var(--accent-soft); border-color:transparent;}

/* ---------- result strip ---------- */
.result{
  background:var(--accent-soft);
  border-radius:var(--r-md);
  padding:16px;
  text-align:center;
}
.result .v{
  font-family:var(--display); font-weight:800;
  font-size:clamp(26px,7vw,36px); letter-spacing:-.03em;
  color:var(--accent-ink); line-height:1.1;
  overflow-wrap:anywhere;
}
.result .k{font-size:12.5px; font-weight:700; color:var(--accent-ink); opacity:.72; margin-top:5px;}

/* ---------- messages ---------- */
.msg{
  display:none;
  padding:11px 14px; border-radius:var(--r-sm);
  font-size:14px; font-weight:600; margin-top:12px;
}
.msg.show{display:block;}
.msg.err{background:var(--bad-bg); color:var(--bad);}
.msg.ok{background:var(--ok-bg); color:var(--ok);}

/* ---------- note ---------- */
.note{
  display:flex; gap:10px;
  background:var(--surface-2); border:1px solid var(--line);
  border-left:3px solid var(--accent);
  border-radius:var(--r-sm); padding:12px 14px;
  font-size:14px; color:var(--ink-2); margin-top:14px;
}
.note svg{width:17px; height:17px; flex:none; margin-top:2px; color:var(--accent);}

/* ============================================================
   HOME — the spectrum
   ============================================================ */
.home-hero{
  background:var(--canvas); color:var(--ink);
  border-radius:0; padding:38px 0 26px;
}
.home-hero::after{display:none;}
.home-hero h1{max-width:14ch;}
.home-hero .lead{color:var(--muted);}
.home-hero .eyebrow{
  background:var(--surface); border-color:var(--line-2); color:var(--muted);
}
@media(min-width:700px){ .home-hero{padding:56px 0 34px;} }

/* desktop: the whole hero block reads better centred on the page,
   with the search/popular/category stack centred under it too */
@media(min-width:940px){
  .home-hero .wrap{ max-width:760px; text-align:center; }
  .home-hero .eyebrow{ margin-inline:auto; }
  .home-hero h1{ max-width:none; }
  .home-hero .lead{ max-width:52ch; margin-inline:auto; }
  .search-wrap{ margin-inline:auto; }
  .popular{ justify-content:center; }
}

.spectrum{display:grid; grid-template-columns:1fr; gap:12px; margin-top:8px;}
@media(min-width:640px){ .spectrum{grid-template-columns:1fr 1fr;} }
@media(min-width:960px){ .spectrum{grid-template-columns:repeat(3,1fr);} }

.tile{
  position:relative; overflow:hidden;
  display:block;
  border-radius:var(--r-lg);
  padding:20px 18px 22px;
  color:#fff;
  background:linear-gradient(145deg, var(--t1) 0%, var(--t2) 100%);
  min-height:150px;
  transition:transform .18s ease, box-shadow .18s ease;
  box-shadow:0 10px 26px -18px var(--t2);
}
.tile:hover{transform:translateY(-3px); box-shadow:0 18px 34px -18px var(--t2); text-decoration:none;}
.tile:focus-visible{outline:3px solid var(--ink); outline-offset:3px;}
.tile::after{
  content:""; position:absolute; right:-38px; bottom:-56px;
  width:150px; height:150px; border-radius:50%;
  background:rgba(255,255,255,.09);
}
.tile-ico{
  width:40px; height:40px; border-radius:12px;
  background:rgba(255,255,255,.19);
  display:grid; place-items:center; margin-bottom:13px;
  position:relative; z-index:1;
}
.tile-ico svg{width:21px; height:21px;}
.tile h3{font-size:19px; position:relative; z-index:1; letter-spacing:-.02em;}
.tile p{font-size:13.5px; color:rgba(255,255,255,.8); margin-top:5px; position:relative; z-index:1;}
.tile .go{
  display:inline-flex; align-items:center; gap:5px;
  margin-top:13px; font-size:13px; font-weight:700;
  position:relative; z-index:1;
}
.tile .go svg{width:15px; height:15px; transition:transform .18s;}
.tile:hover .go svg{transform:translateX(3px);}

/* ---------- FAQ ---------- */
.faq{border-top:1px solid var(--line); margin-top:8px;}
.faq details{border-bottom:1px solid var(--line);}
.faq summary{
  display:flex; align-items:center; justify-content:space-between; gap:14px;
  padding:16px 0; cursor:pointer; list-style:none;
  font-family:var(--display); font-weight:700; font-size:16px; color:var(--ink);
}
.faq summary::-webkit-details-marker{display:none;}
.faq summary::after{
  content:""; flex:none; width:19px; height:19px;
  background:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%236E6880' stroke-width='2.5' stroke-linecap='round'%3E%3Cpath d='M12 5v14M5 12h14'/%3E%3C/svg%3E") center/contain no-repeat;
  transition:transform .2s;
}
.faq details[open] summary::after{transform:rotate(45deg);}
.faq details p{color:var(--ink-2); font-size:15px; padding-bottom:16px; margin:0;}
.faq details p + p{padding-top:0; margin-top:-6px;}

/* ---------- related ---------- */
.related{display:grid; grid-template-columns:1fr 1fr; gap:9px; margin-top:14px;}
@media(min-width:700px){ .related{grid-template-columns:repeat(3,1fr);} }
.rel{
  display:flex; align-items:center; gap:9px;
  padding:12px; min-height:56px;
  background:var(--surface); border:1px solid var(--line);
  border-radius:var(--r-md);
  font-size:13.5px; font-weight:700; color:var(--ink);
  line-height:1.25;
}
.rel:hover{border-color:var(--rc); text-decoration:none; transform:translateY(-2px);}
.rel{transition:transform .15s, border-color .15s;}
.rel-ico{
  width:30px; height:30px; border-radius:9px; flex:none;
  display:grid; place-items:center; color:#fff; background:var(--rc);
}
.rel-ico svg{width:16px; height:16px;}

/* ============================================================
   TOOL-SPECIFIC
   ============================================================ */

/* QR preview */
.qr-stage{
  display:grid; place-items:center;
  background:var(--surface-2);
  border:1px solid var(--line);
  border-radius:var(--r-md);
  padding:20px; margin-top:6px;
  min-height:250px;
}
.qr-stage.empty{color:var(--muted); font-size:14px; text-align:center;}
.qr-stage:not(.empty) #qr-stage-empty{display:none;}
.qr-stage.empty #qr-canvas{display:none;}
#qr-canvas{max-width:250px; width:100%;}
#qr-canvas canvas,#qr-canvas svg{width:100% !important; height:auto !important; border-radius:8px; display:block;}
.size-out{
  font-family:var(--mono); font-size:13px; font-weight:600;
  color:var(--accent-ink); background:var(--accent-soft);
  padding:3px 9px; border-radius:6px;
}
.swatch-pair{display:flex; gap:10px; align-items:flex-end;}
.swatch-pair .field{flex:1; margin-bottom:0;}
.style-opts{display:grid; grid-template-columns:repeat(2,1fr); gap:9px;}
@media(min-width:560px){ .style-opts{grid-template-columns:repeat(4,1fr);} }
.style-opt{
  display:flex; flex-direction:column; align-items:center; gap:7px;
  padding:11px 6px; cursor:pointer;
  background:var(--surface-2); border:1.5px solid var(--line-2);
  border-radius:var(--r-sm);
  font-size:12px; font-weight:700; color:var(--ink-2);
  transition:border-color .15s, background .15s;
}
.style-opt:hover{border-color:var(--accent);}
.style-opt[aria-pressed="true"]{border-color:var(--accent); background:var(--accent-soft); color:var(--accent-ink);}
.style-opt svg{width:26px; height:26px;}

/* palette */
.palette{display:grid; grid-template-columns:repeat(5,1fr); gap:8px; margin-top:4px;}
.sw{display:flex; flex-direction:column;}
.sw-chip{
  height:118px; border-radius:var(--r-md);
  cursor:pointer; position:relative;
  border:1px solid rgba(23,20,31,.07);
  transition:transform .15s;
}
.sw-chip:active{transform:scale(.98);}
.sw-chip.locked::after{
  content:""; position:absolute; top:7px; right:7px;
  width:17px; height:17px;
  background:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='white'%3E%3Cpath d='M17 9V7a5 5 0 00-10 0v2a2 2 0 00-2 2v8a2 2 0 002 2h10a2 2 0 002-2v-8a2 2 0 00-2-2zM9 7a3 3 0 016 0v2H9V7z'/%3E%3C/svg%3E") center/contain no-repeat;
  filter:drop-shadow(0 1px 2px rgba(0,0,0,.4));
}
.sw-hex{
  font-family:var(--mono); font-size:10.5px; font-weight:600;
  text-align:center; margin-top:7px; color:var(--ink-2);
  cursor:pointer; word-break:break-all;
}
.sw-lock{
  margin-top:5px; min-height:34px; padding:0 6px;
  font-family:var(--body); font-size:11px; font-weight:700;
  background:var(--surface); color:var(--muted);
  border:1.5px solid var(--line-2); border-radius:8px; cursor:pointer;
}
.sw-lock[aria-pressed="true"]{background:var(--accent-soft); border-color:var(--accent); color:var(--accent-ink);}
@media(max-width:560px){
  .palette{grid-template-columns:repeat(5,1fr); gap:5px;}
  .sw-chip{height:88px; border-radius:11px;}
  .sw-hex{font-size:9px;}
  .sw-lock{font-size:10px; min-height:30px; padding:0 2px;}
}

/* contrast */
.cc-preview{
  border-radius:var(--r-md); padding:26px 18px;
  text-align:center; margin-top:6px;
  border:1px solid var(--line);
}
.cc-preview .big{font-family:var(--display); font-weight:800; font-size:25px; letter-spacing:-.02em;}
.cc-preview .norm{font-size:15px; margin-top:9px;}
.cc-preview .small{font-size:12.5px; margin-top:6px; opacity:.9;}
.verdicts{display:grid; grid-template-columns:1fr; gap:8px; margin-top:14px;}
@media(min-width:560px){ .verdicts{grid-template-columns:1fr 1fr;} }
.verdict{
  display:flex; align-items:center; justify-content:space-between; gap:12px;
  background:var(--surface-2); border:1px solid var(--line);
  border-radius:var(--r-sm); padding:12px 14px;
}
.verdict .lbl{font-size:13.5px; font-weight:700; color:var(--ink-2); line-height:1.3;}
.verdict .lbl small{display:block; font-weight:600; color:var(--muted); font-size:11.5px; margin-top:2px;}
.pill{
  flex:none; display:inline-flex; align-items:center; gap:5px;
  padding:5px 11px; border-radius:999px;
  font-size:12px; font-weight:800; letter-spacing:.02em;
}
.pill svg{width:13px; height:13px;}
.pill.pass{background:var(--ok-bg); color:var(--ok);}
.pill.fail{background:var(--bad-bg); color:var(--bad);}

/* keyword table */
.kw{width:100%; border-collapse:collapse; margin-top:6px; font-size:14px;}
.kw th{
  text-align:left; padding:9px 8px;
  font-size:11px; font-weight:800; letter-spacing:.05em; text-transform:uppercase;
  color:var(--muted); border-bottom:1.5px solid var(--line);
}
.kw th:not(:first-child),.kw td:not(:first-child){text-align:right;}
.kw td{padding:10px 8px; border-bottom:1px solid var(--line); color:var(--ink-2);}
.kw td:first-child{color:var(--ink); font-weight:600;}
.kw .bar{
  display:block; height:5px; border-radius:3px;
  background:var(--accent); opacity:.75; margin-top:5px;
}

/* progress */
.prog{height:9px; border-radius:5px; background:var(--line); overflow:hidden; margin:8px 0 9px;}
.prog i{display:block; height:100%; background:var(--accent); border-radius:5px; transition:width .3s ease;}

/* ---------- footer ---------- */
.foot{
  background:var(--surface);
  border-top:1px solid var(--line);
  padding:32px 0 26px;
  margin-top:auto;
}
.foot-grid{display:grid; grid-template-columns:1fr; gap:24px;}
@media(min-width:700px){ .foot-grid{grid-template-columns:1.3fr 1fr 1fr;} }
.foot-brand p{color:var(--muted); font-size:13.5px; margin-top:9px; max-width:34ch;}
.foot .foot-h{font-family:var(--display); font-weight:600; color:var(--ink); margin-bottom:10px; font-size:13px; letter-spacing:.04em; text-transform:uppercase;}
.foot ul{list-style:none; padding:0;}
.foot li{margin-bottom:2px;}
.foot li a{
  display:flex; align-items:center; min-height:40px; padding:4px 0;
  color:var(--muted); font-size:14px; font-weight:500;
}
.foot li a:hover{color:var(--ink); text-decoration:none;}
.foot-base{
  margin-top:24px; padding-top:18px; border-top:1px solid var(--line);
  color:var(--muted); font-size:12.5px;
}

/* ---------- a11y ---------- */
.skip{
  position:absolute; left:-9999px; top:0; z-index:100;
  background:var(--ink); color:#fff; padding:12px 18px; border-radius:0 0 10px 0;
}
.skip:focus{left:0;}
.sr{position:absolute; width:1px; height:1px; overflow:hidden; clip:rect(0,0,0,0); white-space:nowrap;}
.sr input{font-size:16px;}

@media (prefers-reduced-motion: reduce){
  *,*::before,*::after{animation-duration:.01ms !important; transition-duration:.01ms !important; scroll-behavior:auto !important;}
}

/* ============================================================
   SCROLL REVEAL — content slides up as it comes into view
   ============================================================ */
.js .reveal{
  opacity:0;
  transform:translateY(28px);
}
.js .reveal.in{
  opacity:1;
  transform:none;
  transition:opacity .62s cubic-bezier(.22,.68,.3,1) var(--d,0ms),
             transform .62s cubic-bezier(.22,.68,.3,1) var(--d,0ms);
}

/* above-the-fold pieces animate on load instead of on scroll */
.js .hero .eyebrow,
.js .hero h1,
.js .hero .lead{
  animation:rise-in .72s cubic-bezier(.22,.68,.3,1) both;
}
.js .hero h1{ animation-delay:.06s; }
.js .hero .lead{ animation-delay:.13s; }
@keyframes rise-in{
  from{ opacity:0; transform:translateY(24px); }
  to{ opacity:1; transform:none; }
}

@media (prefers-reduced-motion: reduce){
  .js .reveal{ opacity:1 !important; transform:none !important; }
  .js .hero .eyebrow, .js .hero h1, .js .hero .lead{ animation:none !important; opacity:1 !important; }
}

/* ---------- tool-page hero: plain, no corner ornament ---------- */
.hero .wrap{ position:relative; }
.hero h1{ max-width:min(100%, 16ch); }
.hero .lead{ max-width:38ch; }
@media(min-width:560px){ .hero h1{ max-width:15ch; } .hero .lead{ max-width:44ch; } }
@media(min-width:900px){ .hero .lead{ max-width:56ch; } }
.home-hero .lead{ max-width:46ch; }

/* ============================================================
   FEATURED TILE — the flagship tool, wider than the rest
   ============================================================ */
.tile-feature{
  min-height:auto;
  padding:22px 20px 24px;
  background:linear-gradient(140deg,var(--ai-1) 0%, var(--ai-2) 100%);
  box-shadow:0 14px 34px -20px var(--ai-2);
}
@media(min-width:640px){ .tile-feature{ grid-column:1 / -1; } }
.tile-feature .tile-top{
  display:flex; align-items:center; gap:12px; flex-wrap:wrap;
  position:relative; z-index:1; margin-bottom:12px;
}
.tile-feature .tile-ico{margin-bottom:0;}
.tile-feature h3{font-size:21px;}
.tile-feature p{font-size:14.5px; max-width:56ch;}
.badge{
  display:inline-flex; align-items:center; gap:5px;
  padding:5px 11px; border-radius:999px;
  background:rgba(255,255,255,.2);
  border:1px solid rgba(255,255,255,.32);
  font-size:11.5px; font-weight:800; letter-spacing:.05em;
  text-transform:uppercase; color:#fff;
  white-space:nowrap;
}
.badge svg{width:12px; height:12px;}
.tile-feature .feat-list{
  display:flex; flex-wrap:wrap; gap:6px;
  margin-top:14px; position:relative; z-index:1;
}
.tile-feature .feat-list span{
  padding:4px 10px; border-radius:999px;
  background:rgba(255,255,255,.15);
  font-size:12px; font-weight:600; color:rgba(255,255,255,.94);
}

/* ============================================================
   PROMPT BUILDER — the AI prompt generator's own furniture
   ============================================================ */
.pb-out{
  position:relative;
  background:#151327; border-radius:var(--r-md);
  padding:15px 15px 14px;
  margin-top:4px;
}
.pb-out pre{
  font-family:var(--mono); font-size:13px; line-height:1.62;
  color:#E7E3F5; white-space:pre-wrap; word-break:break-word;
  max-height:340px; overflow:auto; margin:0;
}
.pb-out pre::-webkit-scrollbar{width:8px;}
.pb-out pre::-webkit-scrollbar-thumb{background:#3A3556; border-radius:99px;}
.pb-empty{color:#8A83A8; font-family:var(--body); font-size:14px;}
.pb-switch{
  display:inline-flex; padding:3px; gap:2px;
  background:var(--surface-2); border:1.5px solid var(--line-2);
  border-radius:999px;
}
.pb-switch button{
  min-height:40px; padding:0 16px;
  font-family:var(--body); font-size:13px; font-weight:700;
  color:var(--muted); background:transparent;
  border:0; border-radius:999px; cursor:pointer;
  transition:background .15s, color .15s;
}
.pb-switch button[aria-pressed="true"]{background:var(--accent); color:#fff;}
.pb-bar{
  display:flex; align-items:center; justify-content:space-between;
  gap:10px; flex-wrap:wrap; margin-bottom:12px;
}
.pb-count{font-size:12.5px; color:var(--muted); font-weight:600;}
.pb-chips{display:flex; flex-wrap:wrap; gap:7px; margin-bottom:4px;}
.pb-chip{
  min-height:40px; padding:0 14px;
  font-family:var(--body); font-size:13px; font-weight:600;
  color:var(--ink-2); background:var(--surface-2);
  border:1.5px solid var(--line-2); border-radius:999px;
  cursor:pointer; transition:border-color .15s, background .15s, color .15s;
}
.pb-chip:hover{border-color:var(--accent); color:var(--accent-ink);}
.pb-hist{margin-top:8px; display:grid; gap:8px;}
.pb-hist button{
  display:block; width:100%; text-align:left;
  padding:11px 13px; cursor:pointer;
  background:var(--surface-2); border:1px solid var(--line);
  border-radius:var(--r-sm);
  font-family:var(--body); font-size:13.5px; color:var(--ink-2);
  line-height:1.45;
  overflow:hidden; text-overflow:ellipsis; white-space:nowrap;
  transition:border-color .15s, background .15s;
}
.pb-hist button:hover{border-color:var(--accent); background:var(--surface);}
.pb-hist-h{
  display:flex; align-items:center; justify-content:space-between;
  gap:10px; margin:20px 0 8px;
}
.pb-hist-h h3{font-size:15px;}

/* ============================================================
   IDEAL WEIGHT CALCULATOR
   ============================================================ */
.seg{display:flex; gap:8px; flex-wrap:wrap; margin-bottom:4px;}
.seg label{
  display:inline-flex; align-items:center; gap:7px;
  min-height:42px; padding:0 15px;
  font-size:14px; font-weight:700; color:var(--ink-2);
  background:var(--surface-2); border:1.5px solid var(--line-2);
  border-radius:999px; cursor:pointer;
  transition:background .15s, border-color .15s, color .15s;
}
.seg input{position:absolute; opacity:0; width:0; height:0;}
.seg label:has(input:checked){background:var(--accent); color:#fff; border-color:var(--accent);}
.hw-row{display:grid; grid-template-columns:1fr 1fr; gap:10px;}

.iw-gauge{
  position:relative; height:10px; border-radius:999px; margin:10px 0 6px;
  background:linear-gradient(90deg,#3B82F6 0%,#3B82F6 20%,var(--ok) 20%,var(--ok) 50%,#F59E0B 50%,#F59E0B 70%,var(--bad) 70%,var(--bad) 100%);
}
.iw-gauge-mark{
  position:absolute; top:-4px; width:3px; height:18px; background:var(--ink);
  border-radius:2px; transform:translateX(-50%); transition:left .25s ease;
}
.iw-gauge-labels{display:flex; justify-content:space-between; font-size:11px; color:var(--muted); font-weight:700;}

.iw-cat{font-weight:800;}
.iw-cat.under{color:#3B82F6;} .iw-cat.ok{color:var(--ok);}
.iw-cat.over{color:#B45309;} .iw-cat.obese{color:var(--bad);}

/* ============================================================
   PASSWORD GENERATOR
   ============================================================ */
.pw-display{
  display:flex; align-items:center; gap:8px;
  background:var(--surface-2); border:1.5px solid var(--line-2);
  border-radius:var(--r-sm); padding:6px 6px 6px 16px; margin-bottom:16px;
}
.pw-display input{
  flex:1; min-width:0; border:0; background:transparent;
  font-family:var(--mono); font-size:17px; letter-spacing:.02em;
  color:var(--ink); padding:10px 0;
}
.pw-display input:focus{outline:none;}
.pw-strength{margin-bottom:18px;}
.pw-strength-track{height:7px; border-radius:999px; background:var(--line); overflow:hidden;}
.pw-strength-fill{height:100%; width:0; border-radius:999px; transition:width .25s ease, background .25s ease;}
.pw-strength-fill.weak{background:var(--bad);}
.pw-strength-fill.fair{background:#F59E0B;}
.pw-strength-fill.strong{background:var(--ok);}
.pw-strength-fill.vstrong{background:#0D9488;}
.pw-strength-label{display:block; margin-top:6px; font-size:12.5px; font-weight:700; color:var(--muted);}
.pw-len-row{display:flex; align-items:center; justify-content:space-between; margin-bottom:6px;}
.pw-len-row b{font-family:var(--display); font-size:15px;}

/* ============================================================
   PERCENTAGE CALCULATOR
   ============================================================ */
.pc-eq{
  display:flex; align-items:center; gap:10px; flex-wrap:wrap;
  font-size:15px; color:var(--ink-2); margin-top:4px;
}
.pc-eq input{width:100px; text-align:center;}
.pc-eq .pc-out{
  font-family:var(--display); font-weight:800; font-size:22px;
  color:var(--accent-ink); min-width:2ch;
}

/* ============================================================
   DARK THEME
   Only the canvas, surfaces and text invert. Every tool keeps
   its own colour, so the site still reads as the same place.
   ============================================================ */
:root[data-theme="dark"]{
  --canvas:#141220;
  --surface:#1D1A2B;
  --surface-2:#232032;
  --ink:#F2EFF7;
  --ink-2:#C9C3DA;
  --muted:#9A93AE;
  --line:#2E2A40;
  --line-2:#3D3853;

  --ok:#34D399;   --ok-bg:#123227;
  --bad:#F87171;  --bad-bg:#3A1C24;

  --shadow:0 1px 2px rgba(0,0,0,.3), 0 8px 24px -12px rgba(0,0,0,.55);
  --shadow-lift:0 2px 4px rgba(0,0,0,.35), 0 18px 40px -18px rgba(0,0,0,.7);
}
:root[data-theme="dark"] .nav{ background:rgba(20,18,32,.9); }
:root[data-theme="dark"] .pb-out{ background:#0F0D18; }
:root[data-theme="dark"] .foot{ background:var(--surface); }
/* accent-soft on tool pages is a light tint; darken it so text stays readable */
:root[data-theme="dark"] .stat.hero-stat,
:root[data-theme="dark"] .result,
:root[data-theme="dark"] .prose code{
  background:color-mix(in srgb, var(--accent) 22%, #14121F);
}
:root[data-theme="dark"] .stat.hero-stat .v,
:root[data-theme="dark"] .result .v,
:root[data-theme="dark"] .result .k,
:root[data-theme="dark"] .prose code,
:root[data-theme="dark"] .stat .v{ color:color-mix(in srgb, var(--accent) 65%, #FFFFFF); }
:root[data-theme="dark"] input:focus,
:root[data-theme="dark"] select:focus,
:root[data-theme="dark"] textarea:focus{
  box-shadow:0 0 0 3.5px color-mix(in srgb, var(--accent) 32%, transparent);
}
:root[data-theme="dark"] .pb-switch button[aria-pressed="true"],
:root[data-theme="dark"] .seg label:has(input:checked){ color:#fff; }
:root[data-theme="dark"] input[type=file]::file-selector-button{
  background:color-mix(in srgb, var(--accent) 26%, #14121F);
  color:color-mix(in srgb, var(--accent) 70%, #fff);
}

/* ============================================================
   NAV — icon buttons for search and theme
   ============================================================ */
.nav-actions{display:flex; align-items:center; gap:8px;}
.icon-btn{
  display:grid; place-items:center;
  width:42px; height:42px; flex:none;
  background:var(--surface); border:1px solid var(--line-2);
  border-radius:999px; color:var(--ink); cursor:pointer;
  transition:background .15s, border-color .15s;
}
.icon-btn:hover{border-color:var(--accent);}
.icon-btn svg{width:18px; height:18px;}
.icon-btn .ico-sun{display:none;}
:root[data-theme="dark"] .icon-btn .ico-sun{display:block;}
:root[data-theme="dark"] .icon-btn .ico-moon{display:none;}

/* ============================================================
   TOOL FINDER — search box, popular row, category pills
   ============================================================ */
.finder{margin-top:22px;}
.search-wrap{position:relative; max-width:560px;}
.search-wrap svg.search-ico{
  position:absolute; left:16px; top:50%; transform:translateY(-50%);
  width:19px; height:19px; color:var(--muted); pointer-events:none;
}
#tool-search{
  width:100%; min-height:54px;
  padding:14px 46px 14px 46px;
  font-size:16px; border-radius:999px;
  background:var(--surface); border:1.5px solid var(--line-2);
}
#tool-search:focus{border-color:var(--accent);}
.search-clear{
  position:absolute; right:8px; top:50%; transform:translateY(-50%);
  display:none; place-items:center;
  width:34px; height:34px; border-radius:50%;
  background:var(--surface-2); border:0; cursor:pointer; color:var(--muted);
}
.search-clear.on{display:grid;}
.search-clear svg{width:15px; height:15px;}

.popular{
  display:flex; align-items:center; flex-wrap:wrap; gap:6px 10px;
  margin-top:16px; font-size:14px; color:var(--muted);
}
.popular b{
  display:block; width:100%;
  font-weight:800; font-size:12.5px; letter-spacing:.05em; text-transform:uppercase;
  color:var(--ink); margin-bottom:8px;
}
.popular a{color:var(--ink-2); font-weight:600;}
.popular a:hover{color:var(--accent-ink);}
@media(min-width:940px){
  .popular{ justify-content:center; }
  .popular b{ text-align:center; }
}
@media(min-width:940px){
  .cats{ flex-wrap:wrap; overflow-x:visible; justify-content:center; }
}
.popular span.sep{color:var(--line-2);}

.cats{
  display:flex; gap:8px; margin-top:18px;
  overflow-x:auto; padding-bottom:4px;
  scrollbar-width:none; -webkit-overflow-scrolling:touch;
}
.cats::-webkit-scrollbar{display:none;}
.cat{
  flex:none; display:inline-flex; align-items:center; gap:7px;
  min-height:42px; padding:0 16px;
  font-family:var(--body); font-size:14px; font-weight:700;
  color:var(--ink-2); background:var(--surface);
  border:1.5px solid var(--line-2); border-radius:999px;
  cursor:pointer; white-space:nowrap;
  transition:background .15s, color .15s, border-color .15s;
}
.cat svg{width:15px; height:15px;}
.cat:hover{border-color:var(--accent);}
.cat[aria-pressed="true"]{background:var(--ink); color:var(--canvas); border-color:var(--ink);}
.cat .n{
  font-size:12px; font-weight:800; opacity:.65;
}

.tile.hidden{display:none;}
.no-hits{
  display:none; padding:34px 20px; text-align:center;
  background:var(--surface); border:1px solid var(--line);
  border-radius:var(--r-lg); color:var(--muted);
}
.no-hits.on{display:block;}
.no-hits b{display:block; color:var(--ink); font-family:var(--display); font-size:18px; margin-bottom:5px;}
.cat-head{
  grid-column:1 / -1;
  display:flex; align-items:baseline; gap:10px;
  margin:10px 0 -2px;
}
.cat-head h3{font-size:15px; color:var(--muted); text-transform:uppercase; letter-spacing:.06em; font-weight:800;}
.cat-head.hidden{display:none;}

/* ============================================================
   NAV MENU — tools grouped by category
   ============================================================ */
.nav-group-h{
  display:block; padding:14px 2px 4px;
  font-size:11.5px; font-weight:800; letter-spacing:.07em;
  text-transform:uppercase; color:var(--muted);
}
@media(min-width:940px){
  .nav-links{position:relative;}
  .nav-group-h{display:none;}
}

/* on desktop the order is: brand, links, then the icon buttons on the far right */
@media(min-width:940px){
  .nav-bar{flex-wrap:nowrap;}
  .brand{order:1; margin-right:auto;}
  .nav-links{order:2;}
  .nav-actions{order:3;}
}
