/* ==========================================================================
   AdaLab Design System v2 — "Local Lab"
   Warm paper surfaces · ink typography · one tinted hue per tool family.
   ========================================================================== */

:root {
  /* Neutrals (warm paper + ink) */
  --paper: hsl(40 20% 97%);
  --paper-2: hsl(40 16% 94%);
  --card: #ffffff;
  --ink: hsl(225 12% 10%);
  --ink-2: hsl(225 8% 28%);
  --muted: hsl(225 6% 46%);
  --faint: hsl(225 6% 62%);
  --line: hsl(35 12% 88%);
  --line-strong: hsl(35 10% 80%);

  /* Brand + semantic */
  --brand: hsl(156 72% 30%);
  --brand-soft: hsl(150 50% 94%);
  --brand-ink: hsl(158 70% 20%);
  --warn: hsl(32 92% 40%);
  --warn-soft: hsl(40 95% 93%);
  --danger: hsl(0 70% 46%);

  /* Tool family hues */
  --c-compress: hsl(222 76% 50%);
  --c-compress-soft: hsl(222 90% 96%);
  --c-privacy: hsl(156 72% 30%);
  --c-privacy-soft: hsl(150 50% 94%);
  --c-convert: hsl(28 88% 44%);
  --c-convert-soft: hsl(36 95% 93%);
  --c-devices: hsl(346 68% 48%);
  --c-devices-soft: hsl(350 90% 96%);

  /* Code surfaces */
  --code-bg: hsl(225 14% 11%);
  --code-ink: hsl(220 14% 88%);

  /* Shape + depth */
  --r-sm: 8px;
  --r-md: 12px;
  --r-lg: 18px;
  --shadow-1: 0 1px 0 hsl(35 20% 100% / 0.8) inset, 0 1px 2px hsl(225 20% 20% / 0.06);
  --shadow-2: 0 1px 2px hsl(225 20% 20% / 0.05), 0 8px 24px -8px hsl(225 25% 20% / 0.12);
  --shadow-3: 0 2px 4px hsl(225 20% 20% / 0.04), 0 24px 60px -18px hsl(225 30% 18% / 0.22);

  --font-sans: "Geist", "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --font-mono: "Geist Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  --ease: cubic-bezier(0.2, 0.7, 0.2, 1);
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  font-family: var(--font-sans);
  font-size: 15px;
  line-height: 1.6;
  color: var(--ink);
  background-color: var(--paper);
  /* subtle paper grain for surface depth */
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 0.3 0 0 0 0 0.25 0 0 0 0 0.2 0 0 0 0.035 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
a { color: inherit; text-decoration: none; }
img, svg, canvas, video { display: block; }
button, input, select, textarea { font: inherit; color: inherit; }
.hidden { display: none !important; }
.icon { flex-shrink: 0; }
.container { max-width: 1160px; margin: 0 auto; padding: 0 24px; }
.mono { font-family: var(--font-mono); font-feature-settings: "zero" 1; }
:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; border-radius: 6px; }

kbd {
  font-family: var(--font-mono);
  font-size: 11.5px;
  font-weight: 500;
  padding: 2px 6px;
  border-radius: 5px;
  background: var(--card);
  border: 1px solid var(--line-strong);
  box-shadow: 0 1px 0 var(--line-strong);
  color: var(--ink-2);
  white-space: nowrap;
}
code { font-family: var(--font-mono); font-size: 0.92em; }

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: hsl(40 20% 97% / 0.82);
  backdrop-filter: saturate(1.4) blur(14px);
  -webkit-backdrop-filter: saturate(1.4) blur(14px);
  border-bottom: 1px solid var(--line);
}
.nav-row { display: flex; align-items: center; gap: 28px; height: 62px; }
.brand { display: inline-flex; align-items: center; gap: 10px; font-weight: 650; font-size: 17px; letter-spacing: -0.02em; }
.brand-domain { color: var(--faint); font-weight: 450; }
.nav-links { display: flex; gap: 4px; flex: 1; }
.nav-links a {
  font-size: 14px;
  color: var(--ink-2);
  padding: 6px 12px;
  border-radius: 8px;
  transition: background-color 160ms var(--ease), color 160ms var(--ease);
}
.nav-links a:hover { background: var(--paper-2); color: var(--ink); }
.nav-local {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 12.5px;
  color: var(--brand-ink);
  font-weight: 550;
}
.nav-local .icon { color: var(--brand); }
.nav-cta {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 13.5px;
  font-weight: 600;
  padding: 7px 14px;
  border-radius: 9px;
  background: var(--ink);
  color: #fff;
  transition: transform 160ms var(--ease), background-color 160ms var(--ease);
}
.nav-cta:hover { background: hsl(225 12% 20%); transform: translateY(-1px); }

/* ---------- Buttons ---------- */
.btn {
  appearance: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 40px;
  padding: 0 16px;
  border-radius: 10px;
  border: 1px solid transparent;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: -0.005em;
  cursor: pointer;
  white-space: nowrap;
  transition: transform 140ms var(--ease), background-color 160ms var(--ease), box-shadow 160ms var(--ease), opacity 160ms;
}
.btn:active:not(:disabled) { transform: translateY(1px) scale(0.99); }
.btn:disabled { opacity: 0.4; cursor: not-allowed; }
.btn-primary {
  background: var(--ink);
  color: #fff;
  box-shadow: 0 1px 0 hsl(0 0% 100% / 0.12) inset, 0 2px 6px -1px hsl(225 30% 10% / 0.35);
}
.btn-primary:hover:not(:disabled) { background: hsl(225 12% 22%); }
.btn-outline {
  background: var(--card);
  color: var(--ink);
  border-color: var(--line-strong);
  box-shadow: var(--shadow-1);
}
.btn-outline:hover:not(:disabled) { background: var(--paper); border-color: var(--faint); }
.btn-sm { height: 34px; padding: 0 12px; font-size: 13px; border-radius: 9px; gap: 6px; }
.btn-lg { height: 48px; padding: 0 22px; font-size: 15px; border-radius: 12px; }

/* ---------- Home hero ---------- */
.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(0, 0.92fr);
  gap: 56px;
  align-items: center;
  padding: 72px 0 56px;
}
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 18px;
}
.eyebrow .icon { color: var(--brand); }
.hero h1 {
  font-size: clamp(36px, 5vw, 58px);
  line-height: 1.04;
  letter-spacing: -0.045em;
  font-weight: 650;
  margin-bottom: 20px;
  text-wrap: balance;
}
.hero h1 em { font-style: normal; color: var(--brand); }
.hero-lead { font-size: 17.5px; color: var(--ink-2); max-width: 540px; line-height: 1.6; text-wrap: pretty; }

.search-box {
  position: relative;
  margin-top: 30px;
  max-width: 540px;
}
.search-box .icon { position: absolute; left: 16px; top: 50%; transform: translateY(-50%); color: var(--faint); pointer-events: none; }
.search-box input {
  width: 100%;
  height: 54px;
  padding: 0 64px 0 46px;
  border-radius: 14px;
  border: 1px solid var(--line-strong);
  background: var(--card);
  font-size: 16px;
  box-shadow: var(--shadow-2);
  transition: border-color 160ms var(--ease), box-shadow 160ms var(--ease);
}
.search-box input::placeholder { color: var(--faint); }
.search-box input:focus { outline: none; border-color: var(--ink-2); box-shadow: 0 0 0 4px hsl(225 12% 10% / 0.07), var(--shadow-2); }
.search-box kbd { position: absolute; right: 14px; top: 50%; transform: translateY(-50%); }

.quick-sizes { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; margin-top: 16px; font-size: 13px; color: var(--muted); }
.size-chip {
  font-family: var(--font-mono);
  font-size: 12.5px;
  font-weight: 500;
  padding: 5px 10px;
  border-radius: 8px;
  background: var(--card);
  border: 1px solid var(--line);
  color: var(--ink-2);
  transition: border-color 160ms var(--ease), color 160ms var(--ease), transform 160ms var(--ease);
}
.size-chip:hover { border-color: var(--c-compress); color: var(--c-compress); transform: translateY(-1px); }

/* Hero proof panel: a "receipt" of what happens on-device */
.proof {
  position: relative;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-3);
  overflow: hidden;
}
.proof-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  border-bottom: 1px solid var(--line);
  background: var(--paper);
  font-family: var(--font-mono);
  font-size: 11.5px;
  color: var(--muted);
}
.proof-dots { display: flex; gap: 6px; }
.proof-dots i { width: 9px; height: 9px; border-radius: 50%; background: var(--line-strong); display: block; }
.proof-body { padding: 20px; display: grid; gap: 14px; }
.proof-file {
  display: grid;
  grid-template-columns: 40px 1fr auto;
  align-items: center;
  gap: 12px;
  padding: 12px;
  border-radius: var(--r-md);
  background: var(--paper);
  border: 1px solid var(--line);
}
.proof-thumb {
  width: 40px;
  height: 40px;
  border-radius: 9px;
  display: grid;
  place-items: center;
  background: var(--c-compress-soft);
  color: var(--c-compress);
}
.proof-thumb.out { background: var(--brand-soft); color: var(--brand); }
.proof-name { font-size: 13.5px; font-weight: 600; letter-spacing: -0.01em; }
.proof-meta { font-family: var(--font-mono); font-size: 11.5px; color: var(--muted); }
.proof-size { font-family: var(--font-mono); font-size: 13px; font-weight: 600; }
.proof-size.ok { color: var(--brand); }
.proof-flow { display: flex; align-items: center; gap: 10px; padding: 0 6px; font-family: var(--font-mono); font-size: 11.5px; color: var(--muted); }
.proof-bar { flex: 1; height: 6px; border-radius: 99px; background: var(--paper-2); overflow: hidden; }
.proof-bar span { display: block; height: 100%; width: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--c-compress), var(--brand)); transform-origin: left; animation: proofFill 2.6s var(--ease) 0.3s both; }
@keyframes proofFill { from { transform: scaleX(0); } to { transform: scaleX(1); } }
.proof-code {
  font-family: var(--font-mono);
  font-size: 12px;
  line-height: 1.7;
  padding: 12px 14px;
  border-radius: var(--r-md);
  background: var(--code-bg);
  color: var(--code-ink);
  overflow: hidden;
  white-space: nowrap;
}
.proof-code .k { color: hsl(205 80% 72%); }
.proof-code .r { color: hsl(150 60% 62%); background: hsl(150 60% 50% / 0.14); border-radius: 4px; padding: 0 4px; }
.proof-foot {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  border-top: 1px solid var(--line);
}
.proof-stat { padding: 14px 16px; border-right: 1px solid var(--line); }
.proof-stat:last-child { border-right: 0; }
.proof-stat b { display: block; font-family: var(--font-mono); font-size: 18px; font-weight: 600; letter-spacing: -0.02em; }
.proof-stat span { font-size: 11.5px; color: var(--muted); }
.proof-stat.zero b { color: var(--brand); }

/* ---------- Tool directory ---------- */
.directory { padding: 24px 0 24px; }
.dir-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; flex-wrap: wrap; margin-bottom: 22px; }
.section-title { font-size: 26px; letter-spacing: -0.03em; font-weight: 650; line-height: 1.2; }
.section-sub { color: var(--muted); font-size: 15px; margin-top: 4px; }
.tabs { display: inline-flex; gap: 2px; padding: 4px; border-radius: 12px; background: var(--paper-2); border: 1px solid var(--line); }
.tab {
  appearance: none;
  border: 0;
  background: transparent;
  padding: 7px 14px;
  border-radius: 9px;
  font-size: 13.5px;
  font-weight: 550;
  color: var(--muted);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  transition: background-color 160ms var(--ease), color 160ms var(--ease), box-shadow 160ms var(--ease);
}
.tab:hover { color: var(--ink); }
.tab.active { background: var(--card); color: var(--ink); box-shadow: 0 1px 3px hsl(225 20% 20% / 0.12); }
.tab .count { font-family: var(--font-mono); font-size: 11px; color: var(--faint); }

.tool-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(258px, 1fr)); gap: 14px; }
.tool-card {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 18px;
  border-radius: var(--r-lg);
  background: var(--card);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-1);
  transition: transform 200ms var(--ease), box-shadow 200ms var(--ease), border-color 200ms var(--ease);
}
.tool-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-2); border-color: var(--line-strong); }
.tool-card-top { display: flex; align-items: center; justify-content: space-between; }
.tool-card h3 { font-size: 16px; font-weight: 620; letter-spacing: -0.02em; line-height: 1.3; }
.tool-card p {
  font-size: 13.5px;
  color: var(--muted);
  line-height: 1.55;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.tool-card-foot { display: flex; align-items: center; justify-content: space-between; margin-top: auto; padding-top: 4px; }
.formats { display: flex; gap: 4px; flex-wrap: wrap; }
.formats span {
  font-family: var(--font-mono);
  font-size: 10.5px;
  font-weight: 500;
  letter-spacing: 0.02em;
  padding: 2px 6px;
  border-radius: 5px;
  background: var(--paper);
  border: 1px solid var(--line);
  color: var(--muted);
}
.tool-card .go { color: var(--faint); transition: transform 200ms var(--ease), color 200ms var(--ease); }
.tool-card:hover .go { color: var(--ink); transform: translateX(3px); }
.badge-hot {
  font-family: var(--font-mono);
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--warn);
}
.empty-state { display: none; text-align: center; padding: 40px; color: var(--muted); border: 1px dashed var(--line-strong); border-radius: var(--r-lg); }
.empty-state.show { display: block; }

/* Family tiles */
.tile {
  width: 42px;
  height: 42px;
  border-radius: 11px;
  display: grid;
  place-items: center;
  flex-shrink: 0;
  box-shadow: 0 1px 0 hsl(0 0% 100% / 0.7) inset;
}
.tile-lg { width: 56px; height: 56px; border-radius: 15px; }
.tile .kb { font-family: var(--font-mono); font-size: 12px; font-weight: 650; letter-spacing: -0.03em; line-height: 1; }
.tile-lg .kb { font-size: 15px; }
.fam-compress .tile { background: var(--c-compress-soft); color: var(--c-compress); }
.fam-privacy .tile { background: var(--c-privacy-soft); color: var(--c-privacy); }
.fam-convert .tile { background: var(--c-convert-soft); color: var(--c-convert); }
.fam-devices .tile { background: var(--c-devices-soft); color: var(--c-devices); }
.fam-label { font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.05em; text-transform: uppercase; font-weight: 550; }
.fam-compress .fam-label { color: var(--c-compress); }
.fam-privacy .fam-label { color: var(--c-privacy); }
.fam-convert .fam-label { color: var(--c-convert); }
.fam-devices .fam-label { color: var(--c-devices); }

/* ---------- How it works / comparison ---------- */
.band { padding: 72px 0; }
.steps-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0; margin-top: 28px; border: 1px solid var(--line); border-radius: var(--r-lg); background: var(--card); box-shadow: var(--shadow-1); overflow: hidden; }
.step-cell { padding: 26px 24px; border-right: 1px solid var(--line); }
.step-cell:last-child { border-right: 0; }
.step-num { font-family: var(--font-mono); font-size: 12px; color: var(--faint); margin-bottom: 18px; display: flex; align-items: center; justify-content: space-between; }
.step-num .icon { color: var(--ink-2); }
.step-cell h3 { font-size: 16.5px; letter-spacing: -0.02em; margin-bottom: 6px; font-weight: 620; }
.step-cell p { font-size: 14px; color: var(--muted); }

.compare { width: 100%; margin-top: 28px; border-collapse: separate; border-spacing: 0; background: var(--card); border: 1px solid var(--line); border-radius: var(--r-lg); overflow: hidden; box-shadow: var(--shadow-1); font-size: 14.5px; }
.compare th, .compare td { padding: 14px 20px; text-align: left; border-bottom: 1px solid var(--line); }
.compare tr:last-child td { border-bottom: 0; }
.compare thead th { font-size: 12px; font-family: var(--font-mono); text-transform: uppercase; letter-spacing: 0.05em; color: var(--muted); font-weight: 500; background: var(--paper); }
.compare td:first-child { color: var(--ink-2); font-weight: 500; }
.compare .yes { color: var(--brand-ink); font-weight: 600; display: inline-flex; align-items: center; gap: 6px; }
.compare .yes .icon { color: var(--brand); }
.compare .no { color: var(--muted); display: inline-flex; align-items: center; gap: 6px; }
.compare .col-us { background: hsl(150 50% 97%); }

/* ---------- CloakShot promo ---------- */
.promo {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr);
  gap: 0;
  align-items: stretch;
  background: var(--ink);
  color: #fff;
  border-radius: 22px;
  overflow: hidden;
  box-shadow: var(--shadow-3);
  margin: 48px 0;
}
.promo-copy { padding: 40px 40px; display: flex; flex-direction: column; justify-content: center; }
.promo-kicker { display: inline-flex; align-items: center; gap: 10px; font-family: var(--font-mono); font-size: 11.5px; letter-spacing: 0.06em; text-transform: uppercase; color: hsl(150 50% 70%); margin-bottom: 16px; }
.promo-kicker img { width: 26px; height: 26px; border-radius: 7px; }
.promo h2, .promo h3 { font-size: clamp(22px, 2.6vw, 30px); line-height: 1.15; letter-spacing: -0.035em; font-weight: 620; margin-bottom: 12px; text-wrap: balance; }
.promo p { color: hsl(220 10% 72%); font-size: 15px; max-width: 460px; }
.promo-list { list-style: none; display: grid; gap: 8px; margin: 18px 0 24px; font-size: 14px; color: hsl(220 10% 82%); }
.promo-list li { display: flex; gap: 10px; align-items: center; }
.promo-list .icon { color: hsl(150 60% 60%); }
.promo .btn-light { background: #fff; color: var(--ink); align-self: flex-start; }
.promo .btn-light:hover { background: hsl(40 20% 92%); }
.promo-visual { position: relative; background: hsl(225 14% 16%); min-height: 280px; }
.promo-visual img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: left top; }
.promo-compact { grid-template-columns: 1fr; }
.promo-compact .promo-copy { padding: 26px 26px; }
.promo-compact h3 { font-size: 19px; }
.promo-compact p { font-size: 13.5px; }

/* ---------- Tool page layout ---------- */
.crumbs { display: flex; align-items: center; gap: 6px; font-size: 13px; color: var(--muted); padding: 22px 0 0; }
.crumbs a:hover { color: var(--ink); }
.crumbs .icon { color: var(--faint); }
.tool-hero { display: flex; gap: 20px; align-items: flex-start; padding: 22px 0 26px; }
.tool-hero h1 { font-size: clamp(28px, 3.6vw, 40px); line-height: 1.1; letter-spacing: -0.04em; font-weight: 650; margin: 4px 0 10px; text-wrap: balance; }
.tool-hero .lead { font-size: 16px; color: var(--ink-2); max-width: 720px; text-wrap: pretty; }
.trust-row { display: flex; flex-wrap: wrap; gap: 18px; margin-top: 14px; font-size: 13px; color: var(--ink-2); }
.trust-row span { display: inline-flex; align-items: center; gap: 6px; }
.trust-row .icon { color: var(--brand); }

.tool-layout { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 32px; align-items: start; }
.rail { position: sticky; top: 86px; display: grid; gap: 16px; }
.rail-card { background: var(--card); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 16px; box-shadow: var(--shadow-1); }
.rail-title { font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); margin-bottom: 10px; }
.rail-link { display: flex; align-items: center; gap: 10px; padding: 8px; margin: 0 -8px; border-radius: 10px; font-size: 14px; font-weight: 500; transition: background-color 160ms var(--ease); }
.rail-link:hover { background: var(--paper); }
.rail-link .tile { width: 30px; height: 30px; border-radius: 8px; }
.rail-link .tile .kb { font-size: 9.5px; }
.rail-link .tile .icon { width: 15px; height: 15px; }

/* ---------- Workbench ---------- */
.workbench {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 20px;
  box-shadow: var(--shadow-3);
  overflow: hidden;
}
.wb-steps {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--line);
  background: var(--paper);
  overflow-x: auto;
}
.wb-step { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 550; color: var(--faint); white-space: nowrap; transition: color 220ms var(--ease); }
.wb-step i {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-style: normal;
  font-family: var(--font-mono);
  font-size: 11px;
  border: 1px solid var(--line-strong);
  background: var(--card);
  transition: background-color 220ms var(--ease), color 220ms var(--ease), border-color 220ms var(--ease);
}
.wb-step.active { color: var(--ink); }
.wb-step.active i { background: var(--ink); border-color: var(--ink); color: #fff; }
.wb-step.done { color: var(--brand-ink); }
.wb-step.done i { background: var(--brand); border-color: var(--brand); color: #fff; }
.wb-sep { width: 28px; height: 1px; background: var(--line-strong); flex-shrink: 0; }
.wb-local { margin-left: auto; display: inline-flex; align-items: center; gap: 6px; font-family: var(--font-mono); font-size: 11.5px; color: var(--brand-ink); white-space: nowrap; }
.wb-local .icon { color: var(--brand); }
.wb-body { padding: 22px; }

.controls-bar { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 14px 18px; margin-bottom: 18px; }
.controls-bar .spacer { flex: 1; }
.control-group { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.control-group.grow { flex: 1; min-width: 220px; }
.control-group label, .pane-label { font-size: 12px; font-weight: 600; color: var(--muted); letter-spacing: 0.01em; }
input[type="number"], input[type="text"], select {
  height: 40px;
  padding: 0 12px;
  border-radius: 10px;
  border: 1px solid var(--line-strong);
  background: var(--card);
  font-size: 14px;
  color: var(--ink);
  box-shadow: var(--shadow-1);
  transition: border-color 160ms var(--ease), box-shadow 160ms var(--ease);
}
input[type="number"] { width: 110px; font-family: var(--font-mono); }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--ink-2); box-shadow: 0 0 0 3px hsl(225 12% 10% / 0.08); }
select { padding-right: 32px; appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23666' stroke-width='2.4' stroke-linecap='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 12px center; }

.chip-row { display: flex; flex-wrap: wrap; gap: 6px; }
.segmented { display: inline-flex; padding: 3px; border-radius: 11px; background: var(--paper-2); border: 1px solid var(--line); gap: 2px; }
.chip-btn {
  appearance: none;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 32px;
  padding: 0 11px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  font-size: 13px;
  font-weight: 550;
  color: var(--muted);
  cursor: pointer;
  transition: background-color 160ms var(--ease), color 160ms var(--ease), box-shadow 160ms var(--ease);
}
.chip-btn.mono { font-family: var(--font-mono); font-size: 12.5px; }
.chip-btn:hover { color: var(--ink); }
.chip-btn.active { background: var(--card); color: var(--ink); box-shadow: 0 1px 3px hsl(225 20% 20% / 0.14); }

.dropzone {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 6px;
  padding: 44px 24px;
  border-radius: 16px;
  border: 1.5px dashed var(--line-strong);
  background: var(--paper);
  cursor: pointer;
  transition: border-color 180ms var(--ease), background-color 180ms var(--ease), transform 180ms var(--ease);
}
.dropzone.compact { padding: 26px 20px; }
.dropzone:hover { border-color: var(--faint); background: hsl(40 18% 95.5%); }
.dropzone.drag { border-color: var(--brand); background: var(--brand-soft); transform: scale(1.005); }
.drop-icon {
  width: 52px;
  height: 52px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  background: var(--card);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-2);
  color: var(--ink-2);
  margin-bottom: 8px;
  transition: transform 220ms var(--ease);
}
.dropzone:hover .drop-icon, .dropzone.drag .drop-icon { transform: translateY(-3px); }
.drop-title { font-size: 16px; font-weight: 600; letter-spacing: -0.015em; }
.drop-title u { text-decoration: none; border-bottom: 1.5px solid var(--ink); }
.drop-sub { font-size: 13px; color: var(--muted); }
.drop-formats { display: flex; gap: 4px; flex-wrap: wrap; justify-content: center; margin-top: 10px; }
.drop-formats span { font-family: var(--font-mono); font-size: 11px; padding: 2px 7px; border-radius: 6px; background: var(--card); border: 1px solid var(--line); color: var(--muted); }

.result-panel { margin-top: 16px; padding: 18px; border-radius: 14px; background: var(--paper); border: 1px solid var(--line); animation: rise 320ms var(--ease) both; }
@keyframes rise { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
.result-grid, .file-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.file-row { padding: 12px 0; border-bottom: 1px solid var(--line); font-size: 14px; }
.file-row:first-child { padding-top: 0; }
.file-row:last-child { border-bottom: 0; padding-bottom: 0; }
.res-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 8px;
  margin-bottom: 8px;
}
.res-badge.ok, .tag-ok { background: var(--brand-soft); color: var(--brand-ink); }
.res-badge.warn, .tag-warn { background: var(--warn-soft); color: hsl(28 80% 30%); }
.tag-ok, .tag-warn { display: inline-flex; font-size: 12px; font-weight: 550; padding: 3px 8px; border-radius: 6px; margin: 0 4px 4px 0; }
.res-meta { font-size: 13.5px; color: var(--ink-2); }
.res-meta strong { font-family: var(--font-mono); font-weight: 600; color: var(--ink); }
.size-meter { margin-top: 12px; display: grid; gap: 6px; max-width: 460px; }
.size-meter-row { display: grid; grid-template-columns: 82px 1fr 74px; align-items: center; gap: 10px; font-size: 12px; color: var(--muted); }
.size-meter-row b { font-family: var(--font-mono); font-weight: 600; color: var(--ink); text-align: right; }
.size-track { height: 8px; border-radius: 99px; background: var(--paper-2); overflow: hidden; }
.size-track span { display: block; height: 100%; border-radius: inherit; background: var(--line-strong); }
.size-track span.after { background: var(--brand); animation: grow 700ms var(--ease) both; transform-origin: left; }
@keyframes grow { from { transform: scaleX(0); } to { transform: scaleX(1); } }
.status-msg { font-size: 14px; color: var(--ink-2); display: flex; align-items: center; gap: 10px; }
.status-msg::before { content: ""; width: 14px; height: 14px; border-radius: 50%; border: 2px solid var(--line-strong); border-top-color: var(--ink); animation: spin 700ms linear infinite; }
.status-msg.error::before { display: none; }
@keyframes spin { to { transform: rotate(360deg); } }
.error { color: var(--danger); }

.canvas-stage {
  margin-top: 16px;
  padding: 14px;
  border-radius: 14px;
  border: 1px solid var(--line);
  overflow: auto;
  background-color: hsl(40 12% 96%);
  background-image: linear-gradient(45deg, hsl(40 10% 92%) 25%, transparent 25%), linear-gradient(-45deg, hsl(40 10% 92%) 25%, transparent 25%), linear-gradient(45deg, transparent 75%, hsl(40 10% 92%) 75%), linear-gradient(-45deg, transparent 75%, hsl(40 10% 92%) 75%);
  background-size: 16px 16px;
  background-position: 0 0, 0 8px, 8px -8px, -8px 0;
}
.canvas-stage canvas { margin: 0 auto; }
.canvas-stage.dark { background: var(--code-bg); border-color: var(--code-bg); }
#redact-canvas { max-width: 100%; height: auto; cursor: crosshair; border-radius: 8px; box-shadow: var(--shadow-2); }
#mic-canvas { width: 100%; height: auto; border-radius: 10px; }
.video-stage { min-height: 340px; display: flex; align-items: center; justify-content: center; }
#cam-video { max-width: 100%; max-height: 480px; border-radius: 10px; transform: scaleX(-1); }

.dual-pane { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 14px; }
.pane-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 6px; }
.code-box {
  width: 100%;
  min-height: 240px;
  resize: vertical;
  padding: 14px 16px;
  border-radius: 12px;
  border: 1px solid var(--code-bg);
  background: var(--code-bg);
  color: var(--code-ink);
  font-family: var(--font-mono);
  font-size: 12.5px;
  line-height: 1.65;
  box-shadow: 0 1px 0 hsl(0 0% 100% / 0.04) inset;
}
.code-box::placeholder { color: hsl(220 8% 50%); }
.code-box:focus { border-color: hsl(225 10% 35%); box-shadow: 0 0 0 3px hsl(225 12% 10% / 0.1); }
.code-box.single { margin-top: 14px; }
.action-footer { margin-top: 16px; display: flex; gap: 10px; flex-wrap: wrap; }
.small-stat { font-family: var(--font-mono); font-size: 12px; color: var(--brand-ink); font-weight: 500; }
.status-banner { margin: 14px 0 0; padding: 10px 14px; border-radius: 10px; background: var(--brand-soft); color: var(--brand-ink); font-size: 13.5px; font-weight: 500; }

/* ---------- Content sections on tool pages ---------- */
.content-block { margin-top: 48px; }
.content-block h2 { font-size: 22px; letter-spacing: -0.03em; font-weight: 650; margin-bottom: 14px; }
.usecases { list-style: none; display: grid; gap: 10px; }
.usecases li { display: flex; gap: 12px; align-items: flex-start; font-size: 15px; color: var(--ink-2); padding: 14px 16px; background: var(--card); border: 1px solid var(--line); border-radius: var(--r-md); }
.usecases .icon { color: var(--brand); margin-top: 3px; }
.why-local { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.why-item { padding: 18px; border-radius: var(--r-md); background: var(--card); border: 1px solid var(--line); }
.why-item .icon { color: var(--ink-2); margin-bottom: 12px; }
.why-item h3 { font-size: 15px; font-weight: 620; letter-spacing: -0.015em; margin-bottom: 4px; }
.why-item p { font-size: 13.5px; color: var(--muted); }
.faq { border: 1px solid var(--line); border-radius: var(--r-lg); background: var(--card); overflow: hidden; }
.faq details { border-bottom: 1px solid var(--line); }
.faq details:last-child { border-bottom: 0; }
.faq summary { list-style: none; cursor: pointer; padding: 18px 20px; display: flex; justify-content: space-between; align-items: center; gap: 16px; font-size: 15px; font-weight: 600; letter-spacing: -0.01em; transition: background-color 160ms var(--ease); }
.faq summary::-webkit-details-marker { display: none; }
.faq summary:hover { background: var(--paper); }
.faq summary .icon { color: var(--faint); transition: transform 220ms var(--ease); }
.faq details[open] summary .icon { transform: rotate(180deg); }
.faq details p { padding: 0 20px 18px; font-size: 14.5px; color: var(--ink-2); max-width: 760px; }
.related-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 12px; }
.related-grid .tool-card { padding: 16px; gap: 10px; }
.related-grid .tool-card p { -webkit-line-clamp: 2; }

/* ---------- Legal / flagship ---------- */
.prose { max-width: 720px; padding: 56px 0 24px; }
.prose h1 { font-size: 38px; letter-spacing: -0.04em; line-height: 1.1; margin-bottom: 20px; font-weight: 650; }
.prose p { font-size: 15.5px; color: var(--ink-2); margin-top: 14px; }
.flag-hero { text-align: center; max-width: 780px; margin: 0 auto; padding: 72px 0 36px; }
.flag-hero .kicker-icon { width: 64px; height: 64px; border-radius: 16px; margin: 0 auto 22px; box-shadow: var(--shadow-3); }
.flag-hero h1 { font-size: clamp(34px, 4.6vw, 54px); letter-spacing: -0.045em; line-height: 1.06; font-weight: 650; margin-bottom: 18px; text-wrap: balance; }
.flag-hero p { font-size: 17.5px; color: var(--ink-2); max-width: 620px; margin: 0 auto; }
.flag-cta { display: flex; justify-content: center; gap: 12px; flex-wrap: wrap; margin-top: 28px; }
.flag-shot { border-radius: 20px; overflow: hidden; border: 1px solid var(--line); box-shadow: var(--shadow-3); background: var(--card); }
.flag-shot img { width: 100%; }
.feature-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin-top: 28px; }

/* ---------- Footer ---------- */
.site-footer { margin-top: 80px; border-top: 1px solid var(--line); background: var(--paper-2); }
.footer-grid { display: grid; grid-template-columns: 1.4fr repeat(3, 1fr); gap: 32px; padding: 44px 0 28px; }
.footer-grid h4 { font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); font-weight: 500; margin-bottom: 12px; }
.footer-grid ul { list-style: none; display: grid; gap: 8px; font-size: 14px; color: var(--ink-2); }
.footer-grid a:hover { color: var(--ink); text-decoration: underline; text-underline-offset: 3px; }
.footer-about p { font-size: 14px; color: var(--muted); margin-top: 12px; max-width: 320px; }
.footer-bottom { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; padding: 18px 0 32px; border-top: 1px solid var(--line); font-size: 12.5px; color: var(--muted); }

/* ---------- Responsive ---------- */
@media (max-width: 980px) {
  .hero { grid-template-columns: 1fr; gap: 40px; padding: 48px 0 32px; }
  .tool-layout { grid-template-columns: 1fr; }
  .rail { position: static; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }
  .promo { grid-template-columns: 1fr; }
  .promo-visual { min-height: 220px; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 760px) {
  .container { padding: 0 18px; }
  .nav-links, .nav-local { display: none; }
  .nav-row { justify-content: space-between; }
  .steps-row, .why-local, .feature-grid { grid-template-columns: 1fr; }
  .step-cell { border-right: 0; border-bottom: 1px solid var(--line); }
  .step-cell:last-child { border-bottom: 0; }
  .tabs { width: 100%; overflow-x: auto; }
  .tool-hero { flex-direction: column; gap: 14px; }
  .wb-body { padding: 16px; }
  .wb-local { display: none; }
  .promo-copy { padding: 28px 24px; }
  .compare th, .compare td { padding: 12px 12px; font-size: 13px; }
  .proof-foot { grid-template-columns: 1fr 1fr 1fr; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
.tag-row { margin: 2px 0 10px; }
.rail .promo { margin: 0; }
.lead code { font-size: 0.88em; padding: 1px 5px; border-radius: 5px; background: var(--paper-2); border: 1px solid var(--line); }
/* Once a file is loaded, the dropzone collapses to a slim "replace file" bar so results sit above the fold */
.workbench.has-result .dropzone { padding: 12px 16px; flex-direction: row; justify-content: center; gap: 10px; }
.workbench.has-result .dropzone .drop-icon,
.workbench.has-result .dropzone .drop-sub,
.workbench.has-result .dropzone .drop-formats { display: none; }
.workbench.has-result .dropzone .drop-title { font-size: 14px; font-weight: 550; color: var(--ink-2); }
@media (max-width: 760px) {
  .search-box kbd { display: none; }
  .search-box input { padding-right: 16px; }
  .proof-code { display: none; }
}
