/* Unmask website. Same palette as the extension: charcoal, greys, lime/olive, red for warnings. */
:root {
  color-scheme: light;
  --bg: #f3f4f1;
  --surface: #ffffff;
  --surface-2: #eceee9;
  --border: #dfe2dc;
  --text: #222629;
  --text-2: #474b4f;
  --text-3: #6b6e70;
  --accent: #4f7425;
  --accent-hover: #61892f;
  --on-accent: #ffffff;
  --accent-soft: #eef5e4;
  --bad: #d42a2a;
  --code-bg: #eceee9;
  --max: 1080px;
  --prose: 760px;
}
:root[data-theme='dark'] {
  color-scheme: dark;
  --bg: #1c1f22;
  --surface: #222629;
  --surface-2: #2c3034;
  --border: #363b3f;
  --text: #eef0ea;
  --text-2: #b3b7b4;
  --text-3: #8a8e90;
  --accent: #86c232;
  --accent-hover: #9bd14c;
  --on-accent: #16190f;
  --accent-soft: #2a3420;
  --bad: #ff5a5a;
  --code-bg: #2c3034;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme='light']) {
    color-scheme: dark;
    --bg: #1c1f22;
    --surface: #222629;
    --surface-2: #2c3034;
    --border: #363b3f;
    --text: #eef0ea;
    --text-2: #b3b7b4;
    --text-3: #8a8e90;
    --accent: #86c232;
    --accent-hover: #9bd14c;
    --on-accent: #16190f;
    --accent-soft: #2a3420;
    --bad: #ff5a5a;
    --code-bg: #2c3034;
  }
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 76px; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 16px/1.65 ui-sans-serif, system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--accent); text-underline-offset: 3px; }
a:hover { color: var(--accent-hover); }
img { max-width: 100%; height: auto; }
.wrap { max-width: var(--max); margin: 0 auto; padding: 0 20px; }

/* Header */
.top {
  position: sticky; top: 0; z-index: 10;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}
.top .wrap { display: flex; align-items: center; gap: 20px; height: 60px; }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 700; color: var(--text); text-decoration: none; font-size: 17px; }
.brand img { width: 28px; height: 28px; }
.nav { display: flex; gap: 4px; margin-left: auto; align-items: center; flex-wrap: wrap; }
.nav a { color: var(--text-2); text-decoration: none; font-size: 14px; padding: 6px 10px; border-radius: 8px; }
.nav a:hover, .nav a[aria-current='page'] { color: var(--text); background: var(--surface-2); }
.theme-btn {
  border: 1px solid var(--border); background: var(--surface); color: var(--text-2);
  border-radius: 8px; width: 34px; height: 34px; cursor: pointer; font-size: 15px; display: grid; place-items: center;
}
.theme-btn:hover { color: var(--text); }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; gap: 8px; padding: 11px 18px; border-radius: 10px;
  font-weight: 600; font-size: 15px; text-decoration: none; border: 1px solid transparent;
}
.btn-primary { background: var(--accent); color: var(--on-accent); }
.btn-primary:hover { background: var(--accent-hover); color: var(--on-accent); }
.btn-ghost { border-color: var(--border); color: var(--text); background: var(--surface); }
.btn-ghost:hover { color: var(--text); border-color: var(--text-3); }

/* Home */
.hero { padding-top: 72px; padding-bottom: 40px; display: grid; grid-template-columns: 1.1fr 0.9fr; gap: 48px; align-items: center; }
.hero > * { min-width: 0; }
.hero h1 { font-size: clamp(34px, 5vw, 52px); line-height: 1.1; margin: 0 0 16px; letter-spacing: -0.02em; }
.hero h1 em { font-style: normal; color: var(--accent); }
.hero p.lead { font-size: 19px; color: var(--text-2); margin: 0 0 28px; max-width: 34em; }
.hero .cta { display: flex; gap: 10px; flex-wrap: wrap; }
.hero .note { color: var(--text-3); font-size: 13px; margin-top: 14px; }
.shot { border-radius: 16px; border: 1px solid var(--border); box-shadow: 0 20px 50px rgb(0 0 0 / 0.18); display: block; }
.hero .shot { max-width: min(360px, 100%); margin-left: auto; }
section { padding: 48px 0; }
section h2 { font-size: 28px; margin: 0 0 8px; letter-spacing: -0.01em; }
section .sub { color: var(--text-2); margin: 0 0 28px; }
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; counter-reset: step; }
.card { background: var(--surface); border: 1px solid var(--border); border-radius: 14px; padding: 20px; }
.steps .card::before {
  counter-increment: step; content: counter(step);
  display: grid; place-items: center; width: 30px; height: 30px; border-radius: 50%;
  background: var(--accent); color: var(--on-accent); font-weight: 700; margin-bottom: 12px;
}
.card h3 { margin: 0 0 6px; font-size: 17px; }
.card p { margin: 0; color: var(--text-2); font-size: 15px; }
.grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.feature .tag { font-size: 12px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--accent); }
.gallery { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; align-items: start; }
.gallery figure { margin: 0; }
.gallery figcaption { color: var(--text-3); font-size: 14px; margin-top: 10px; text-align: center; }
.wide { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.wide figure { margin: 0; }
.wide figcaption { color: var(--text-3); font-size: 14px; margin-top: 10px; text-align: center; }
.shot { max-width: 100%; height: auto; }
.showcase { width: 100%; max-width: 900px; margin: 0 auto; }
.callout { border-left: 3px solid var(--bad); background: var(--surface); border-radius: 10px; padding: 14px 18px; color: var(--text-2); }

/* Docs pages (rendered markdown) */
.doc { max-width: var(--prose); margin: 0 auto; padding: 40px 20px 80px; }
.doc h1 { font-size: 38px; line-height: 1.15; letter-spacing: -0.02em; margin: 0 0 20px; }
.doc h2 { font-size: 26px; margin: 48px 0 12px; padding-top: 8px; border-top: 1px solid var(--border); }
.doc h3 { font-size: 19px; margin: 32px 0 8px; }
.doc h2 a.anchor, .doc h3 a.anchor { color: var(--text-3); text-decoration: none; margin-left: 8px; opacity: 0; font-weight: 400; }
.doc h2:hover a.anchor, .doc h3:hover a.anchor { opacity: 1; }
.doc p, .doc li { color: var(--text-2); }
.doc strong { color: var(--text); }
.doc code { background: var(--code-bg); padding: 2px 6px; border-radius: 6px; font-size: 0.88em; }
.doc pre { background: var(--code-bg); padding: 14px 16px; border-radius: 10px; overflow-x: auto; }
.doc pre code { background: none; padding: 0; }
.doc table { width: 100%; border-collapse: collapse; margin: 18px 0; font-size: 14.5px; display: block; overflow-x: auto; }
.doc th, .doc td { border-bottom: 1px solid var(--border); padding: 9px 10px; text-align: left; vertical-align: top; }
.doc th { color: var(--text); background: var(--surface-2); }
.doc blockquote { margin: 18px 0; padding: 10px 16px; border-left: 3px solid var(--accent); background: var(--surface); border-radius: 0 10px 10px 0; }
.doc img { border-radius: 12px; border: 1px solid var(--border); }
.doc img[align='right'] { float: right; max-width: 42%; margin: 4px 0 16px 24px; }
.doc hr { border: 0; border-top: 1px solid var(--border); margin: 40px 0; }
.doc br[clear] { clear: both; }

footer { border-top: 1px solid var(--border); padding: 28px 0 40px; color: var(--text-3); font-size: 14px; }
footer .wrap { display: flex; gap: 20px; flex-wrap: wrap; justify-content: space-between; }
footer a { color: var(--text-2); }

@media (max-width: 860px) {
  .hero { grid-template-columns: minmax(0, 1fr); padding-top: 40px; }
  .hero .shot { margin: 0 auto; }
  .steps, .grid, .gallery, .wide { grid-template-columns: 1fr; }
  .nav a.hide-sm { display: none; }
  /* Logo on its own row, links in a single scrollable row under it, so they never overlap. */
  .top .wrap { height: auto; flex-wrap: wrap; row-gap: 6px; padding-top: 10px; padding-bottom: 8px; }
  .nav { margin-left: 0; width: 100%; flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; }
  .nav a, .nav button { flex-shrink: 0; }
  .doc img[align='right'] { float: none; max-width: 100%; margin: 12px 0; display: block; }
}
.doc hr + h2 { border-top: 0; margin-top: 0; }
/* Long URLs in inline code wrap instead of widening the page on phones. */
.doc code, .card code, .sub code { overflow-wrap: anywhere; }
