/* Layout: quiet Google-style product page. One loud thing: the live before/after tool in the hero.
   Everything else is left-aligned text on white, hairline structure, pill buttons, no decorative cards. */
:root {
  --bg: #ffffff;
  --surface: #f5f7fa;
  --surface-2: #eceff4;
  --line: #dde2e9;
  --ink: #1c2128;
  --muted: #5b6574;
  --primary: #1a5fd6;
  --primary-hover: #154fb5;
  --primary-soft: #e8effc;
  --on-primary: #ffffff;
  --ok: #1d7a4c;
  --ok-soft: #e2f3ea;
  --stage: #e6eaf0;
  --shadow: 0 1px 2px rgba(28, 33, 40, .08), 0 4px 16px rgba(28, 33, 40, .06);

  --font: "Figtree", system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --t-xs: .8125rem;   /* 13 */
  --t-sm: .9375rem;   /* 15 */
  --t-md: 1.0625rem;  /* 17 */
  --t-lg: 1.25rem;    /* 20 */
  --t-xl: 1.625rem;   /* 26 */
  --t-2xl: 2.125rem;  /* 34 */
  --t-3xl: clamp(2.25rem, 1.4rem + 3.2vw, 3.5rem); /* 36 → 56 */

  --r-sm: 8px;
  --r-md: 14px;
  --r-lg: 22px;
  --wrap: 1180px;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #131519; --surface: #1a1d22; --surface-2: #23272d; --line: #2f343b;
    --ink: #e8eaed; --muted: #a1a8b2; --primary: #8ab4f8; --primary-hover: #a8c7fa;
    --primary-soft: #1d2840; --on-primary: #0d1d38; --ok: #81c995; --ok-soft: #1b2e23;
    --stage: #0e1013; --shadow: 0 1px 2px rgba(0,0,0,.4), 0 4px 16px rgba(0,0,0,.3);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #131519; --surface: #1a1d22; --surface-2: #23272d; --line: #2f343b;
  --ink: #e8eaed; --muted: #a1a8b2; --primary: #8ab4f8; --primary-hover: #a8c7fa;
  --primary-soft: #1d2840; --on-primary: #0d1d38; --ok: #81c995; --ok-soft: #1b2e23;
  --stage: #0e1013; --shadow: 0 1px 2px rgba(0,0,0,.4), 0 4px 16px rgba(0,0,0,.3);
  color-scheme: dark;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font);
  font-size: var(--t-md);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
body::before {
  content: ""; position: fixed; inset: 0 0 auto; height: env(safe-area-inset-top, 0px);
  z-index: 60; background: var(--bg);
}
h1, h2, h3 { margin: 0; line-height: 1.15; text-wrap: balance; font-weight: 600; letter-spacing: -.02em; }
p { margin: 0; }
a { color: var(--primary); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 3px; }
:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; border-radius: 4px; }
img, canvas { max-width: 100%; display: block; }
.wrap {
  width: 100%; max-width: calc(var(--wrap) + 2 * 32px); margin-inline: auto;
  padding-left: max(16px, env(safe-area-inset-left, 0px), min(32px, 4vw));
  padding-right: max(16px, env(safe-area-inset-right, 0px), min(32px, 4vw));
}
.skip { position: absolute; left: -999px; top: 8px; background: var(--ink); color: var(--bg); padding: 8px 14px; border-radius: 999px; z-index: 100; }
.skip:focus { left: 16px; }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 44px; padding: 0 22px; border-radius: 999px; border: 1px solid transparent;
  font: 500 var(--t-sm)/1 var(--font); cursor: pointer; white-space: nowrap;
  transition: background-color .15s, border-color .15s, color .15s;
}
.btn:hover { text-decoration: none; }
.btn-primary { background: var(--primary); color: var(--on-primary); }
.btn-primary:hover { background: var(--primary-hover); }
.btn-outline { background: transparent; color: var(--primary); border-color: var(--line); }
.btn-outline:hover { background: var(--primary-soft); border-color: var(--primary-soft); }
.btn-text { background: transparent; color: var(--primary); padding: 0 12px; }
.btn-text:hover { background: var(--primary-soft); }
.btn-sm { height: 36px; padding: 0 16px; }
.btn svg { width: 18px; height: 18px; flex: none; }

/* Header */
.site-header {
  position: sticky; top: env(safe-area-inset-top, 0px); z-index: 50;
  background: var(--bg); border-bottom: 1px solid transparent; transition: border-color .2s;
}
.site-header.scrolled { border-bottom-color: var(--line); }
.nav { display: flex; align-items: center; gap: 28px; height: 64px; }
.logo { display: inline-flex; align-items: center; gap: 10px; color: var(--ink); font-weight: 600; font-size: 1.125rem; letter-spacing: -.01em; }
.logo:hover { text-decoration: none; }
.logo svg { width: 28px; height: 28px; }
.nav-links { display: flex; gap: 4px; margin: 0; padding: 0; list-style: none; }
.nav-links a { display: block; padding: 8px 12px; border-radius: 999px; color: var(--muted); font-size: var(--t-sm); font-weight: 500; }
.nav-links a:hover { background: var(--surface); color: var(--ink); text-decoration: none; }
.nav-actions { margin-left: auto; display: flex; align-items: center; gap: 6px; }
.menu-btn { display: none; width: 44px; height: 44px; border-radius: 999px; border: 0; background: transparent; color: var(--ink); cursor: pointer; }
.menu-btn:hover { background: var(--surface); }
.menu-btn svg { width: 24px; height: 24px; margin: auto; }
.mobile-menu { border-top: 1px solid var(--line); padding-block: 8px 16px; }
.mobile-menu a { display: block; padding: 12px 4px; color: var(--ink); font-weight: 500; border-bottom: 1px solid var(--line); }
.mobile-menu .btn { margin-top: 16px; width: 100%; }
@media (max-width: 820px) {
  .nav-links, .nav-actions .hide-sm { display: none; }
  .menu-btn { display: inline-flex; }
}

/* Hero */
.hero { padding-block: clamp(32px, 6vw, 72px) 24px; }
.hero-head { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); gap: 24px 56px; align-items: end; }
.hero h1 { font-size: var(--t-3xl); font-weight: 600; letter-spacing: -.035em; line-height: 1.04; max-width: 13ch; }
.hero-lede { color: var(--muted); font-size: var(--t-md); max-width: 46ch; }
.hero-cta { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 16px; margin-top: 20px; }
.hero-cta small { color: var(--muted); font-size: var(--t-xs); }
kbd { font: 500 .75rem/1 var(--font); border: 1px solid var(--line); border-bottom-width: 2px; border-radius: 5px; padding: 2px 5px; color: var(--ink); background: var(--bg); }
@media (max-width: 860px) {
  .hero-head { grid-template-columns: minmax(0, 1fr); }
  .hero h1 { max-width: 16ch; }
}

/* Tool */
.tool {
  margin-top: clamp(28px, 4vw, 44px);
  display: grid; grid-template-columns: minmax(0, 1fr) 300px;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg);
  overflow: hidden; position: relative;
}
.stage-wrap { background: var(--stage); display: grid; place-items: center; padding: clamp(10px, 2vw, 24px); min-width: 0; position: relative; }
.stage {
  position: relative; width: min(100%, calc(64vh * var(--ar, 1.3333))); max-width: 100%; aspect-ratio: 4 / 3;
  border-radius: var(--r-sm); overflow: hidden; background: var(--surface-2);
  touch-action: pan-y; user-select: none; -webkit-user-select: none;
}
.stage canvas { position: absolute; inset: 0; width: 100%; height: 100%; }
.stage .after { clip-path: inset(0 0 0 var(--pos, 50%)); }
.stage .divider {
  position: absolute; top: 0; bottom: 0; left: var(--pos, 50%); width: 2px; margin-left: -1px;
  background: #ffffff; box-shadow: 0 0 0 1px rgba(0,0,0,.12); pointer-events: none;
}
.stage .knob {
  position: absolute; top: 50%; left: 50%; width: 40px; height: 40px; margin: -20px 0 0 -20px;
  border-radius: 50%; background: #ffffff; color: #1c2128; display: grid; place-items: center;
  box-shadow: 0 1px 3px rgba(0,0,0,.25), 0 4px 12px rgba(0,0,0,.15);
}
.stage .knob svg { width: 22px; height: 22px; }
.stage input[type="range"] {
  position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: ew-resize;
  -webkit-appearance: none; appearance: none; background: transparent;
}
.stage input[type="range"]::-webkit-slider-thumb { -webkit-appearance: none; width: 44px; height: 100%; }
.stage input[type="range"]::-moz-range-thumb { width: 44px; height: 9999px; border: 0; }
.stage:has(input:focus-visible) .knob { outline: 3px solid var(--primary); outline-offset: 2px; }
.tag {
  position: absolute; top: 12px; padding: 4px 10px; border-radius: 999px; font-size: var(--t-xs); font-weight: 600;
  background: rgba(20, 22, 26, .66); color: #ffffff; pointer-events: none; backdrop-filter: blur(6px);
}
.tag-before { left: 12px; }
.tag-after { right: 12px; }
.busy {
  position: absolute; inset: 0; display: grid; place-items: center; background: rgba(230, 234, 240, .55);
  font-size: var(--t-sm); font-weight: 500; color: #1c2128;
}
.busy span { background: #ffffff; padding: 8px 16px; border-radius: 999px; box-shadow: var(--shadow); }
.drop-hint {
  position: absolute; inset: 10px; border: 2px dashed var(--primary); border-radius: var(--r-md);
  background: color-mix(in srgb, var(--primary-soft) 88%, transparent); display: grid; place-items: center;
  color: var(--primary); font-weight: 600; z-index: 5;
}

.rail { padding: 22px; display: flex; flex-direction: column; gap: 22px; border-left: 1px solid var(--line); min-width: 0; background: var(--bg); }
.rail h2 { font-size: var(--t-xs); font-weight: 600; color: var(--muted); letter-spacing: 0; margin-bottom: 8px; }
.seg { display: flex; border: 1px solid var(--line); border-radius: 999px; padding: 3px; gap: 2px; }
.seg button {
  flex: 1; height: 34px; border: 0; border-radius: 999px; background: transparent; color: var(--muted);
  font: 500 var(--t-xs)/1 var(--font); cursor: pointer;
}
.seg button:hover { color: var(--ink); }
.seg button[aria-pressed="true"] { background: var(--primary-soft); color: var(--primary); font-weight: 600; }
.seg-note { font-size: var(--t-xs); color: var(--muted); margin-top: 8px; }
.file { display: flex; align-items: center; gap: 10px; font-size: var(--t-sm); min-width: 0; }
.file svg { width: 20px; height: 20px; flex: none; color: var(--muted); }
.file span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.stats { margin: 0; display: grid; gap: 10px; }
.stats div { display: flex; justify-content: space-between; gap: 12px; font-size: var(--t-sm); }
.stats dt { color: var(--muted); }
.stats dd { margin: 0; font-weight: 600; font-variant-numeric: tabular-nums; text-align: right; }
.stats .up { color: var(--ok); }
.rail-actions { margin-top: auto; display: grid; gap: 8px; }
.rail-actions .btn { width: 100%; }
.rail-note { font-size: var(--t-xs); color: var(--muted); display: flex; gap: 8px; align-items: flex-start; }
.rail-note svg { width: 16px; height: 16px; flex: none; margin-top: 2px; }
.inline-msg { font-size: var(--t-xs); padding: 10px 12px; border-radius: var(--r-sm); background: var(--primary-soft); color: var(--ink); }
.inline-msg.err { background: color-mix(in srgb, #d93025 14%, var(--bg)); }
@media (max-width: 900px) {
  .tool { grid-template-columns: minmax(0, 1fr); }
  .rail { border-left: 0; border-top: 1px solid var(--line); }
  .rail-actions { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 420px) { .rail-actions { grid-template-columns: 1fr; } }

.quick { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 20px; }
.quick > span { font-size: var(--t-sm); color: var(--muted); margin-right: 4px; }
.chip {
  display: inline-flex; align-items: center; height: 34px; padding: 0 14px; border: 1px solid var(--line);
  border-radius: 999px; color: var(--ink); font-size: var(--t-sm); background: var(--bg);
}
.chip:hover { background: var(--surface); text-decoration: none; }

/* Sections */
.section { padding-block: clamp(56px, 8vw, 104px); }
.section + .section { border-top: 1px solid var(--line); }
.section-head { max-width: 640px; margin-bottom: clamp(28px, 4vw, 48px); }
.section-head h2 { font-size: var(--t-2xl); }
.section-head p { color: var(--muted); margin-top: 12px; max-width: 58ch; }

/* How-to */
.howto { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: 48px 72px; }
.steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 28px; counter-reset: s; }
.steps li { display: grid; grid-template-columns: 40px minmax(0, 1fr); gap: 16px; counter-increment: s; }
.steps li::before {
  content: counter(s); width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center;
  background: var(--primary-soft); color: var(--primary); font-weight: 600;
}
.steps h3 { font-size: var(--t-lg); margin-bottom: 6px; letter-spacing: -.01em; }
.steps p { color: var(--muted); max-width: 52ch; }
.tips { background: var(--surface); border-radius: var(--r-md); padding: 28px; align-self: start; }
.tips h3 { font-size: var(--t-lg); letter-spacing: -.01em; }
.tips > p { color: var(--muted); margin-top: 6px; font-size: var(--t-sm); }
.tips ul { margin: 18px 0 0; padding: 0; list-style: none; display: grid; gap: 14px; }
.tips li { display: grid; grid-template-columns: 20px minmax(0, 1fr); gap: 12px; font-size: var(--t-sm); }
.tips li svg { width: 20px; height: 20px; color: var(--primary); margin-top: 2px; }
.tips strong { font-weight: 600; }
@media (max-width: 860px) { .howto { grid-template-columns: minmax(0, 1fr); } }

/* Tool directory */
.tools { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; margin: 0; padding: 0; list-style: none; }
.tools a {
  display: grid; gap: 10px; padding: 20px; border-radius: var(--r-md); color: var(--ink); height: 100%;
  transition: background-color .15s;
}
.tools a:hover { background: var(--surface); text-decoration: none; }
.tools .ico { width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; background: var(--primary-soft); color: var(--primary); }
.tools .ico svg { width: 24px; height: 24px; }
.tools h3 { font-size: var(--t-md); letter-spacing: -.005em; }
.tools p { color: var(--muted); font-size: var(--t-sm); line-height: 1.5; }
@media (max-width: 1000px) { .tools { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 560px) { .tools { grid-template-columns: minmax(0, 1fr); } .tools a { padding: 16px 4px; } }

/* Business tabs */
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); overflow-x: auto; scrollbar-width: none; }
.tabs button {
  height: 48px; padding: 0 18px; border: 0; background: transparent; color: var(--muted); cursor: pointer;
  font: 500 var(--t-sm)/1 var(--font); border-bottom: 3px solid transparent; margin-bottom: -1px; white-space: nowrap;
  border-radius: 8px 8px 0 0;
}
.tabs button:hover { color: var(--ink); background: var(--surface); }
.tabs button[aria-selected="true"] { color: var(--primary); border-bottom-color: var(--primary); font-weight: 600; }
.panel { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 40px 72px; padding-top: 40px; }
.panel h3 { font-size: var(--t-xl); }
.panel > div > p { color: var(--muted); margin-top: 12px; max-width: 52ch; }
.checks { list-style: none; padding: 0; margin: 22px 0 0; display: grid; gap: 12px; }
.checks li { display: grid; grid-template-columns: 20px minmax(0, 1fr); gap: 12px; font-size: var(--t-sm); }
.checks svg { width: 20px; height: 20px; color: var(--ok); margin-top: 1px; }
.panel-links { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 26px; }
.queue { border: 1px solid var(--line); border-radius: var(--r-md); background: var(--bg); box-shadow: var(--shadow); overflow: hidden; align-self: start; }
.queue-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 14px 18px; border-bottom: 1px solid var(--line); font-size: var(--t-sm); font-weight: 600; }
.queue-head span { color: var(--muted); font-weight: 400; font-size: var(--t-xs); }
.queue ul { list-style: none; margin: 0; padding: 0; }
.queue li { display: grid; grid-template-columns: 40px minmax(0, 1fr) auto; gap: 12px; align-items: center; padding: 12px 18px; border-bottom: 1px solid var(--line); }
.queue li:last-child { border-bottom: 0; }
.thumb { width: 40px; height: 40px; border-radius: 8px; background: var(--surface-2); display: grid; place-items: center; color: var(--muted); }
.thumb svg { width: 20px; height: 20px; }
.qname { font-size: var(--t-sm); font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.qop { font-size: var(--t-xs); color: var(--muted); }
.pill { font-size: var(--t-xs); font-weight: 600; padding: 3px 10px; border-radius: 999px; white-space: nowrap; }
.pill-done { background: var(--ok-soft); color: var(--ok); }
.pill-run { background: var(--primary-soft); color: var(--primary); }
.pill-wait { background: var(--surface-2); color: var(--muted); }
.queue-foot { padding: 10px 18px; font-size: var(--t-xs); color: var(--muted); background: var(--surface); }
@media (max-width: 860px) { .panel { grid-template-columns: minmax(0, 1fr); } }

/* Pricing */
.plans { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.plan { border: 1px solid var(--line); border-radius: var(--r-md); padding: 28px; display: flex; flex-direction: column; gap: 18px; background: var(--bg); }
.plan.featured { border: 2px solid var(--primary); padding: 27px; }
.plan h3 { font-size: var(--t-lg); letter-spacing: -.01em; display: flex; align-items: center; gap: 10px; }
.plan h3 .pill { font-size: .75rem; }
.plan > p { color: var(--muted); font-size: var(--t-sm); }
.price { display: flex; align-items: baseline; gap: 6px; }
.price strong { font-size: 2.5rem; font-weight: 600; letter-spacing: -.03em; line-height: 1; font-variant-numeric: tabular-nums; }
.price span { color: var(--muted); font-size: var(--t-sm); }
.plan .checks { margin: 0; }
.plan .btn { margin-top: auto; }
@media (max-width: 900px) { .plans { grid-template-columns: minmax(0, 1fr); max-width: 520px; } }

/* Guides */
.guides { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.guide { display: grid; grid-template-columns: 56px minmax(0, 1fr); gap: 18px; padding: 24px; border-radius: var(--r-md); background: var(--surface); color: var(--ink); }
.guide:hover { text-decoration: none; background: var(--surface-2); }
.guide .ico { width: 56px; height: 56px; border-radius: 14px; background: var(--bg); display: grid; place-items: center; color: var(--primary); }
.guide .ico svg { width: 26px; height: 26px; }
.guide small { color: var(--muted); font-size: var(--t-xs); }
.guide h3 { font-size: var(--t-lg); letter-spacing: -.01em; margin: 4px 0 6px; }
.guide p { color: var(--muted); font-size: var(--t-sm); }
@media (max-width: 760px) { .guides { grid-template-columns: minmax(0, 1fr); } }

/* FAQ */
.faq { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.6fr); gap: 32px 72px; }
.faq .section-head { margin: 0; }
.qa { border-top: 1px solid var(--line); }
.qa details { border-bottom: 1px solid var(--line); }
.qa summary {
  list-style: none; cursor: pointer; display: flex; justify-content: space-between; align-items: center; gap: 16px;
  padding: 20px 0; font-weight: 600; font-size: var(--t-md);
}
.qa summary::-webkit-details-marker { display: none; }
.qa summary svg { width: 22px; height: 22px; flex: none; color: var(--muted); transition: transform .2s; }
.qa details[open] summary svg { transform: rotate(180deg); }
.qa details p { padding: 0 0 22px; color: var(--muted); max-width: 64ch; }
@media (max-width: 860px) { .faq { grid-template-columns: minmax(0, 1fr); } }

/* CTA band */
.band { background: var(--primary-soft); }
.band .wrap { padding-block: clamp(48px, 7vw, 80px); display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 24px; }
.band h2 { font-size: var(--t-2xl); max-width: 20ch; }
.band p { color: var(--muted); margin-top: 8px; }

/* Footer */
.site-footer { border-top: 1px solid var(--line); padding-block: 56px 40px; font-size: var(--t-sm); }
.foot-grid { display: grid; grid-template-columns: minmax(0, 1.4fr) repeat(4, minmax(0, 1fr)); gap: 32px; }
.foot-grid h2 { font-size: var(--t-sm); font-weight: 600; letter-spacing: 0; margin-bottom: 12px; }
.foot-grid ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.foot-grid a { color: var(--muted); }
.foot-grid a:hover { color: var(--ink); }
.foot-grid > div:first-child p { color: var(--muted); margin-top: 12px; max-width: 30ch; }
.foot-bottom { margin-top: 48px; padding-top: 20px; border-top: 1px solid var(--line); display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; color: var(--muted); font-size: var(--t-xs); }
@media (max-width: 900px) { .foot-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } .foot-grid > div:first-child { grid-column: 1 / -1; } }

/* Preview-only toast */
.toast {
  position: fixed; left: 50%; bottom: calc(24px + env(safe-area-inset-bottom, 0px)); transform: translateX(-50%);
  background: var(--ink); color: var(--bg); padding: 12px 18px; border-radius: 12px; font-size: var(--t-sm);
  box-shadow: var(--shadow); z-index: 90; max-width: calc(100% - 32px);
}

.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------- Site-wide additions: menus, tool variants, page templates ---------- */

/* Self-hosted font (production). Preview pages load the same family from Google Fonts. */
@font-face { font-family: "Figtree"; font-style: normal; font-weight: 400; font-display: swap; src: url("fonts/figtree-400.woff2") format("woff2"); }
@font-face { font-family: "Figtree"; font-style: normal; font-weight: 500; font-display: swap; src: url("fonts/figtree-500.woff2") format("woff2"); }
@font-face { font-family: "Figtree"; font-style: normal; font-weight: 600; font-display: swap; src: url("fonts/figtree-600.woff2") format("woff2"); }
@font-face { font-family: "Figtree"; font-style: normal; font-weight: 700; font-display: swap; src: url("fonts/figtree-700.woff2") format("woff2"); }

/* Dropdown menus in the header */
.nav-links > li { position: relative; }
.menu > summary {
  list-style: none; cursor: pointer; display: flex; align-items: center; gap: 4px;
  padding: 8px 10px 8px 12px; border-radius: 999px; color: var(--muted); font-size: var(--t-sm); font-weight: 500;
}
.menu > summary::-webkit-details-marker { display: none; }
.menu > summary:hover, .menu[open] > summary { background: var(--surface); color: var(--ink); }
.menu > summary svg { width: 16px; height: 16px; transition: transform .15s; }
.menu[open] > summary svg { transform: rotate(180deg); }
.menu-panel {
  position: absolute; top: calc(100% + 8px); left: 0; z-index: 60; min-width: 300px;
  background: var(--bg); border: 1px solid var(--line); border-radius: var(--r-md); box-shadow: var(--shadow);
  padding: 8px; display: grid; gap: 2px;
}
.menu-panel.cols-2 { grid-template-columns: repeat(2, minmax(220px, 1fr)); min-width: 520px; }
.nav-links .menu-panel a { display: grid; grid-template-columns: 32px minmax(0, 1fr); gap: 10px; align-items: start; padding: 10px; border-radius: 10px; color: var(--ink); }
.nav-links .menu-panel a:hover { background: var(--surface); }
.menu-panel .mi { width: 32px; height: 32px; border-radius: 9px; background: var(--primary-soft); color: var(--primary); display: grid; place-items: center; }
.menu-panel .mi svg { width: 18px; height: 18px; }
.menu-panel strong { display: block; font-size: var(--t-sm); font-weight: 600; line-height: 1.3; }
.menu-panel small { display: block; color: var(--muted); font-size: var(--t-xs); line-height: 1.4; margin-top: 2px; }
.mobile-menu h2 { font-size: var(--t-xs); color: var(--muted); font-weight: 600; letter-spacing: 0; margin: 16px 0 4px; }

/* Tool stage: image before, canvas after */
.stage img.before, .stage .after, .stage .after canvas, .stage .mask { position: absolute; inset: 0; width: 100%; height: 100%; }
.stage img.before { object-fit: fill; }
.stage .after {
  clip-path: inset(0 0 0 var(--pos, 50%));
  background-color: #ffffff;
  background-image: conic-gradient(#e3e6ea 25%, transparent 0 50%, #e3e6ea 0 75%, transparent 0);
  background-size: 18px 18px;
}
.stage .mask { z-index: 3; cursor: crosshair; touch-action: none; }
.stage.painting .after { clip-path: none; }
.stage.painting .divider, .stage.painting input[type="range"], .stage.painting .tag-before { display: none; }
.stage.is-empty > :not(.empty) { display: none; }
.empty { position: absolute; inset: 0; display: grid; place-items: center; text-align: center; padding: 24px; background: var(--surface); }
.empty > div { display: grid; justify-items: center; gap: 12px; max-width: 34ch; }
.empty .ico { width: 56px; height: 56px; border-radius: 16px; background: var(--primary-soft); color: var(--primary); display: grid; place-items: center; }
.empty .ico svg { width: 28px; height: 28px; }
.empty h2 { font-size: var(--t-lg); color: var(--ink); letter-spacing: -.01em; }
.empty p { color: var(--muted); font-size: var(--t-sm); }

/* Rail controls */
.ctl { display: grid; gap: 8px; }
.ctl-row { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
.ctl-row label, .ctl-row span { font-size: var(--t-xs); font-weight: 600; color: var(--muted); }
.ctl-row output { font-size: var(--t-xs); font-weight: 600; font-variant-numeric: tabular-nums; color: var(--ink); }
.rail input[type="range"] { width: 100%; accent-color: var(--primary); margin: 0; height: 24px; }
.swatches { display: flex; flex-wrap: wrap; gap: 8px; }
.swatches button {
  width: 32px; height: 32px; border-radius: 50%; border: 1px solid var(--line); cursor: pointer; padding: 0;
  background: var(--c, var(--surface)); position: relative;
}
.swatches button[aria-pressed="true"] { box-shadow: 0 0 0 2px var(--bg), 0 0 0 4px var(--primary); }
.swatches button.none { background: linear-gradient(135deg, transparent 46%, #d93025 46% 54%, transparent 54%), var(--bg); }
.swatches button.checker { background-color: #fff; background-image: conic-gradient(#d5d9de 25%, transparent 0 50%, #d5d9de 0 75%, transparent 0); background-size: 10px 10px; }
.sw { display: inline-block; width: 12px; height: 12px; border-radius: 3px; margin-right: 6px; vertical-align: -1px; box-shadow: inset 0 0 0 1px rgba(0,0,0,.15); }
.rail .btn[disabled] { opacity: .45; cursor: not-allowed; }
.btn-link { background: none; border: 0; padding: 0; color: var(--primary); font: 500 var(--t-xs)/1.4 var(--font); cursor: pointer; justify-self: start; }
.btn-link:hover { text-decoration: underline; }

/* Breadcrumbs */
.crumbs { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; list-style: none; margin: 0 0 20px; padding: 0; font-size: var(--t-xs); color: var(--muted); }
.crumbs a { color: var(--muted); }
.crumbs a:hover { color: var(--ink); }
.crumbs li + li::before { content: "/"; margin-right: 6px; color: var(--line); }

/* Sub-page heroes */
.page-hero { padding-block: clamp(28px, 5vw, 56px) 24px; }
.page-hero h1 { font-size: clamp(2rem, 1.3rem + 2.6vw, 3rem); letter-spacing: -.03em; line-height: 1.08; max-width: 20ch; }
.page-hero .hero-head { align-items: end; }
.page-hero .hero-lede { margin-top: 0; }
.svc-hero { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: 40px 72px; align-items: center; }
.svc-hero .hero-lede { margin-top: 16px; }
.svc-hero .hero-cta { margin-top: 24px; }
.svc-facts { display: flex; flex-wrap: wrap; gap: 8px 24px; margin-top: 28px; padding: 0; list-style: none; font-size: var(--t-sm); color: var(--muted); }
.svc-facts li { display: flex; align-items: center; gap: 8px; }
.svc-facts svg { width: 18px; height: 18px; color: var(--ok); }
@media (max-width: 900px) { .svc-hero { grid-template-columns: minmax(0, 1fr); } }

/* Feature list (non-link) */
.features { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 32px 40px; margin: 0; padding: 0; list-style: none; }
.features li { display: grid; gap: 10px; align-content: start; }
.features .ico { width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; background: var(--primary-soft); color: var(--primary); }
.features .ico svg { width: 24px; height: 24px; }
.features h3 { font-size: var(--t-md); letter-spacing: -.005em; }
.features p { color: var(--muted); font-size: var(--t-sm); line-height: 1.55; }
@media (max-width: 900px) { .features { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 560px) { .features { grid-template-columns: minmax(0, 1fr); } }

/* Two-column text block */
.split { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr); gap: 32px 72px; }
.split .section-head { margin: 0; }
@media (max-width: 860px) { .split { grid-template-columns: minmax(0, 1fr); } }

/* Long-form text */
.prose { max-width: 68ch; font-size: var(--t-md); line-height: 1.7; }
.prose > * + * { margin-top: 1em; }
.prose h2 { font-size: var(--t-xl); margin-top: 2.2em; letter-spacing: -.02em; scroll-margin-top: 88px; }
.prose h3 { font-size: var(--t-lg); margin-top: 1.8em; letter-spacing: -.01em; scroll-margin-top: 88px; }
.prose h2 + *, .prose h3 + * { margin-top: .6em; }
.prose ul, .prose ol { padding-left: 1.3em; }
.prose li + li { margin-top: .4em; }
.prose li::marker { color: var(--muted); }
.prose strong { font-weight: 600; }
.prose blockquote { margin-left: 0; padding: 14px 18px; border-radius: var(--r-sm); background: var(--surface); color: var(--ink); }
.prose .callout { padding: 16px 18px; border-radius: var(--r-sm); background: var(--primary-soft); font-size: var(--t-sm); }
.prose .callout a { font-weight: 600; }
.prose figure { margin-inline: 0; }
.prose figcaption { font-size: var(--t-xs); color: var(--muted); margin-top: 8px; }

/* Tables */
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--r-md); }
.prose .table-wrap { margin-top: 1.4em; }
table.data { width: 100%; border-collapse: collapse; font-size: var(--t-sm); min-width: 520px; }
table.data th, table.data td { text-align: left; padding: 12px 16px; border-bottom: 1px solid var(--line); vertical-align: top; }
table.data thead th { background: var(--surface); font-weight: 600; font-size: var(--t-xs); color: var(--muted); }
table.data tbody tr:last-child > * { border-bottom: 0; }
table.data th[scope="row"] { font-weight: 600; width: 34%; }
table.data td.num { font-variant-numeric: tabular-nums; white-space: nowrap; font-weight: 600; }

/* Article layout */
.article { display: grid; grid-template-columns: minmax(0, 1fr) 260px; gap: 48px 80px; align-items: start; }
.article-head { max-width: 760px; }
.article-head h1 { font-size: clamp(2rem, 1.3rem + 2.4vw, 2.875rem); letter-spacing: -.03em; line-height: 1.1; }
.article-head .lede { color: var(--muted); font-size: var(--t-lg); line-height: 1.55; margin-top: 16px; max-width: 60ch; }
.byline { display: flex; flex-wrap: wrap; gap: 6px 18px; margin-top: 20px; color: var(--muted); font-size: var(--t-xs); }
.toc { position: sticky; top: calc(88px + env(safe-area-inset-top, 0px)); font-size: var(--t-sm); }
.toc h2 { font-size: var(--t-xs); color: var(--muted); font-weight: 600; letter-spacing: 0; margin-bottom: 10px; }
.toc ol { list-style: none; margin: 0; padding: 0 0 0 12px; border-left: 1px solid var(--line); display: grid; gap: 8px; }
.toc a { color: var(--muted); }
.toc a:hover { color: var(--ink); }
@media (max-width: 980px) { .article { grid-template-columns: minmax(0, 1fr); } .toc { position: static; order: -1; } }

/* Blog index */
.posts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.post { display: grid; gap: 10px; padding: 28px; border-radius: var(--r-md); border: 1px solid var(--line); color: var(--ink); align-content: start; }
.post:hover { text-decoration: none; background: var(--surface); }
.post small { color: var(--muted); font-size: var(--t-xs); }
.post h2 { font-size: var(--t-xl); }
.post p { color: var(--muted); font-size: var(--t-sm); }
@media (max-width: 760px) { .posts { grid-template-columns: minmax(0, 1fr); } }

/* Forms */
.form { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.form .full { grid-column: 1 / -1; }
.field { display: grid; gap: 6px; }
.field label { font-size: var(--t-sm); font-weight: 600; }
.field label span { color: var(--muted); font-weight: 400; }
.field input, .field select, .field textarea {
  width: 100%; min-height: 46px; padding: 10px 14px; border-radius: 10px; border: 1px solid var(--line);
  background: var(--bg); color: var(--ink); font: 400 var(--t-md)/1.4 var(--font);
}
.field textarea { min-height: 120px; resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus { outline: 2px solid var(--primary); outline-offset: 0; border-color: transparent; }
.form-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 16px; }
.form-actions small { color: var(--muted); font-size: var(--t-xs); }
.form-msg { grid-column: 1 / -1; font-size: var(--t-sm); padding: 12px 14px; border-radius: 10px; background: var(--ok-soft); color: var(--ink); }
.form-msg.err { background: color-mix(in srgb, #d93025 14%, var(--bg)); }
@media (max-width: 600px) { .form { grid-template-columns: minmax(0, 1fr); } }
.quote { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr); gap: 32px 72px; }
.quote-card { background: var(--surface); border-radius: var(--r-lg); padding: clamp(20px, 3vw, 36px); }
@media (max-width: 900px) { .quote { grid-template-columns: minmax(0, 1fr); } }

.contact-line { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-top: 16px; font-size: var(--t-md); }
.contact-line strong { font-weight: 600; user-select: all; }

.notfound { padding-block: clamp(64px, 12vw, 140px); }
.notfound h1 { font-size: var(--t-3xl); letter-spacing: -.03em; }
.notfound p { color: var(--muted); margin-top: 12px; max-width: 50ch; }
.notfound .hero-cta { margin-top: 28px; }

.legal { padding-block: clamp(32px, 6vw, 64px); }
.legal h1 { font-size: var(--t-2xl); }
.legal .updated { color: var(--muted); font-size: var(--t-sm); margin-top: 8px; }

.seg button { display: inline-flex; align-items: center; justify-content: center; gap: 6px; }
.seg button svg { width: 15px; height: 15px; flex: none; }
.stage .mask { opacity: .45; }
