/* Makerfern design system.
   Paper and ink, with a cutting-mat green for the work surface. The warm red
   (--blade) is reserved for problems the cut report finds; it is never a button. */

/* Self-hosted fonts (SIL Open Font License), latin subset. Nothing loads from third parties. */
@font-face { font-family: 'Familjen Grotesk'; src: url('/assets/fonts/familjen-grotesk.woff2') format('woff2'); font-weight: 400 700; font-display: swap; }
@font-face { font-family: 'Public Sans'; src: url('/assets/fonts/public-sans.woff2') format('woff2'); font-weight: 100 900; font-display: swap; }
@font-face { font-family: 'IBM Plex Mono'; src: url('/assets/fonts/plex-mono-400.woff2') format('woff2'); font-weight: 400; font-display: swap; }
@font-face { font-family: 'IBM Plex Mono'; src: url('/assets/fonts/plex-mono-500.woff2') format('woff2'); font-weight: 500; font-display: swap; }

:root {
  --paper: #f4f1e8;
  --paper-2: #ebe6d8;
  --card: #fbfaf5;
  --ink: #1b1d1a;
  --ink-2: #4b4f48;
  --ink-3: #74786f;
  --line: #d8d1bf;
  --line-2: #c6bea9;
  --mat: #235843;
  --mat-deep: #173d2f;
  --mat-line: rgba(236, 242, 230, 0.13);
  --mat-line-major: rgba(236, 242, 230, 0.26);
  --mat-ink: #eef1e6;
  --blade: #d9502a;
  --blade-soft: #f6dccf;
  --ok: #2d7a4c;
  --ok-soft: #d8eadc;
  --focus: #1f6fd1;

  --display: 'Familjen Grotesk', 'Arial Narrow', system-ui, sans-serif;
  --body: 'Public Sans', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --mono: 'IBM Plex Mono', ui-monospace, 'Cascadia Mono', Consolas, monospace;

  --r-sm: 6px;
  --r: 10px;
  --r-lg: 16px;
  --wrap: 1180px;
  --shadow: 0 1px 0 rgba(27, 29, 26, 0.04), 0 8px 24px -12px rgba(27, 29, 26, 0.18);
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme='light']) {
    --paper: #141612;
    --paper-2: #1b1e19;
    --card: #1e211c;
    --ink: #ece8dc;
    --ink-2: #bdb9ad;
    --ink-3: #8f8c82;
    --line: #2f332c;
    --line-2: #3d4239;
    --mat: #1d4a38;
    --mat-deep: #123126;
    --blade: #f0754e;
    --blade-soft: #3a2119;
    --ok: #62b485;
    --ok-soft: #1b3325;
    --focus: #6aa7ff;
    --shadow: 0 1px 0 rgba(0, 0, 0, 0.3), 0 10px 30px -14px rgba(0, 0, 0, 0.6);
    color-scheme: dark;
  }
}
:root[data-theme='dark'] {
  --paper: #141612;
  --paper-2: #1b1e19;
  --card: #1e211c;
  --ink: #ece8dc;
  --ink-2: #bdb9ad;
  --ink-3: #8f8c82;
  --line: #2f332c;
  --line-2: #3d4239;
  --mat: #1d4a38;
  --mat-deep: #123126;
  --blade: #f0754e;
  --blade-soft: #3a2119;
  --ok: #62b485;
  --ok-soft: #1b3325;
  --focus: #6aa7ff;
  --shadow: 0 1px 0 rgba(0, 0, 0, 0.3), 0 10px 30px -14px rgba(0, 0, 0, 0.6);
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 84px; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 400 16px/1.6 var(--body);
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}
img, svg, canvas { max-width: 100%; }
a { color: inherit; text-decoration-color: var(--line-2); text-underline-offset: 3px; }
a:hover { text-decoration-color: currentColor; }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; border-radius: 3px; }
h1, h2, h3, h4 { font-family: var(--display); letter-spacing: -0.02em; line-height: 1.08; margin: 0; text-wrap: balance; }
h1 { font-weight: 700; font-size: clamp(38px, 5.6vw, 66px); }
h2 { font-weight: 700; font-size: clamp(28px, 3.4vw, 40px); }
h3 { font-weight: 600; font-size: 20px; letter-spacing: -0.01em; line-height: 1.25; }
p { margin: 0 0 1em; }
.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 20px; }
.narrow { max-width: 760px; }
.skip { position: absolute; left: -9999px; }
.skip:focus { left: 16px; top: 12px; z-index: 50; background: var(--card); padding: 8px 12px; border-radius: var(--r-sm); }
.eyebrow { font: 500 12px/1.4 var(--mono); letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink-3); }
.lede { font-size: clamp(17px, 1.6vw, 19px); color: var(--ink-2); max-width: 64ch; }
.muted { color: var(--ink-3); }
.mono { font-family: var(--mono); }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------- Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 42px; padding: 0 18px; border-radius: 999px;
  font: 600 15px/1 var(--body); text-decoration: none; cursor: pointer;
  border: 1.5px solid var(--ink); background: var(--ink); color: var(--paper);
  transition: transform 0.12s ease, background 0.12s ease;
}
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(0); }
.btn.ghost { background: transparent; color: var(--ink); border-color: var(--line-2); }
.btn.ghost:hover { border-color: var(--ink); }
.btn.small { min-height: 34px; padding: 0 13px; font-size: 14px; }
.btn[disabled], .btn[aria-disabled='true'] { opacity: 0.5; cursor: not-allowed; transform: none; }
.btn .tag { font: 500 11px/1 var(--mono); padding: 3px 6px; border-radius: 999px; background: var(--paper-2); color: var(--ink-2); }

/* ---------- Header */
.site-header {
  position: sticky; top: 0; z-index: 30;
  background: color-mix(in srgb, var(--paper) 92%, transparent);
  backdrop-filter: saturate(1.2) blur(8px);
  border-bottom: 1px solid var(--line);
}
.site-header .wrap { display: flex; align-items: center; gap: 24px; min-height: 64px; }
.logo { display: inline-flex; align-items: center; gap: 9px; text-decoration: none; font: 700 22px/1 var(--display); letter-spacing: -0.03em; }
.logo svg { width: 26px; height: 26px; flex: none; }
.nav { display: flex; align-items: center; gap: 4px; margin-left: auto; }
.nav > a, .nav summary {
  font-weight: 500; font-size: 15px; text-decoration: none; padding: 8px 12px; border-radius: 999px; cursor: pointer; color: var(--ink-2);
}
.nav > a:hover, .nav summary:hover, .nav > a[aria-current='page'] { color: var(--ink); background: var(--paper-2); }
.nav details { position: relative; }
.nav summary { list-style: none; display: inline-flex; gap: 6px; align-items: center; }
.nav summary::-webkit-details-marker { display: none; }
.nav summary::after { content: ''; width: 7px; height: 7px; border-right: 1.5px solid currentColor; border-bottom: 1.5px solid currentColor; transform: rotate(45deg) translateY(-2px); }
.menu {
  position: absolute; top: calc(100% + 8px); left: -12px; width: 560px; padding: 10px;
  display: grid; grid-template-columns: 1fr 1fr; gap: 2px;
  background: var(--card); border: 1px solid var(--line); border-radius: var(--r-lg); box-shadow: var(--shadow);
}
.menu a { display: block; padding: 10px 12px; border-radius: var(--r); text-decoration: none; }
.menu a:hover { background: var(--paper-2); }
.menu strong { display: block; font-weight: 600; font-size: 15px; }
.menu span { display: block; color: var(--ink-3); font-size: 13px; line-height: 1.4; }
.header-cta { margin-left: 8px; }
.theme-toggle { width: 38px; height: 38px; border-radius: 999px; border: 1px solid var(--line); background: transparent; color: var(--ink-2); cursor: pointer; display: grid; place-items: center; }
.theme-toggle:hover { color: var(--ink); border-color: var(--line-2); }
.menu-toggle { display: none; }

@media (max-width: 900px) {
  .site-header .wrap { gap: 10px; }
  .menu-toggle { display: inline-flex; margin-left: auto; }
  .nav { display: none; position: absolute; top: 64px; left: 0; right: 0; flex-direction: column; align-items: stretch; background: var(--card); border-bottom: 1px solid var(--line); padding: 10px 16px 18px; margin: 0; }
  .nav.open { display: flex; }
  .nav details[open] .menu, .menu { position: static; width: auto; grid-template-columns: 1fr; box-shadow: none; border: 0; padding: 0 0 0 8px; }
  .header-cta { margin: 8px 0 0; }
}

/* ---------- Hero + tool */
.hero { padding: 48px 0 28px; text-align: center; }
.hero h1 { max-width: 16ch; margin: 14px auto 16px; }
.hero h1 em { font-style: normal; color: var(--mat); }
:root[data-theme='dark'] .hero h1 em { color: #7cc59c; }
@media (prefers-color-scheme: dark) { :root:not([data-theme='light']) .hero h1 em { color: #7cc59c; } }
.hero .lede { margin: 0 auto 18px; }
.proof { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px 18px; font: 500 13px/1.4 var(--mono); color: var(--ink-2); margin: 0 0 28px; padding: 0; list-style: none; }
.proof li::before { content: '/ '; color: var(--line-2); }
.proof li:first-child::before { content: ''; }

.page-hero { padding: 44px 0 24px; }
.page-hero h1 { font-size: clamp(34px, 4.6vw, 54px); max-width: 20ch; margin: 12px 0 14px; }
.page-hero.center { text-align: center; }
.page-hero.center h1, .page-hero.center .lede { margin-left: auto; margin-right: auto; }

.tool { text-align: left; }
.presets { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 6px; margin: 0 0 12px; }
.presets .label { font: 500 12px/1 var(--mono); text-transform: uppercase; letter-spacing: 0.08em; color: var(--ink-3); margin-right: 6px; }
.chip {
  font: 500 14px/1 var(--body); padding: 9px 14px; border-radius: 999px; cursor: pointer;
  border: 1px solid var(--line); background: var(--card); color: var(--ink-2);
}
.chip:hover { border-color: var(--line-2); color: var(--ink); }
.chip[aria-pressed='true'] { background: var(--ink); border-color: var(--ink); color: var(--paper); }

.mat {
  position: relative; border-radius: var(--r-lg); overflow: hidden; overflow: clip;
  background-color: var(--mat);
  background-image:
    linear-gradient(var(--mat-line-major) 1px, transparent 1px),
    linear-gradient(90deg, var(--mat-line-major) 1px, transparent 1px),
    linear-gradient(var(--mat-line) 1px, transparent 1px),
    linear-gradient(90deg, var(--mat-line) 1px, transparent 1px);
  background-size: 120px 120px, 120px 120px, 24px 24px, 24px 24px;
  background-position: 27px 27px;
  color: var(--mat-ink);
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.12), var(--shadow);
}
.ruler { position: absolute; font: 500 10px/1 var(--mono); color: rgba(238, 241, 230, 0.7); pointer-events: none; }
.ruler-x { top: 0; left: 27px; right: 0; height: 22px; display: flex; overflow: hidden; }
.ruler-x span { flex: 0 0 120px; padding: 6px 0 0 4px; border-left: 1px solid var(--mat-line-major); }
.ruler-y { left: 0; top: 27px; bottom: 0; width: 22px; }
.ruler-y span { display: block; height: 120px; padding: 4px 0 0 6px; border-top: 1px solid var(--mat-line-major); }

.drop {
  display: grid; place-items: center; text-align: center; gap: 10px;
  min-height: 340px; margin: 40px 28px 28px 40px; padding: 28px 20px;
  border: 2px dashed rgba(238, 241, 230, 0.55); border-radius: var(--r-lg);
  cursor: pointer; transition: background 0.15s ease, border-color 0.15s ease;
}
.drop:hover, .drop.dragging { background: rgba(0, 0, 0, 0.14); border-color: #fff; }
.drop input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.drop:focus-within { outline: 2px solid #fff; outline-offset: 3px; }
.drop h2 { font-size: clamp(24px, 3vw, 32px); color: #fff; }
.drop p { margin: 0; color: rgba(238, 241, 230, 0.82); }
.drop .fine { font: 400 13px/1.5 var(--mono); color: rgba(238, 241, 230, 0.7); }
.drop .blade { width: 54px; height: 54px; color: #fff; }
.drop-actions { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; margin-top: 6px; }
.btn.on-mat { background: var(--mat-ink); color: var(--mat-deep); border-color: var(--mat-ink); }
.btn.on-mat.ghost { background: transparent; color: var(--mat-ink); border-color: rgba(238, 241, 230, 0.5); }

/* workspace after an image is loaded */
.workspace { display: none; grid-template-columns: minmax(0, 1fr) 340px; gap: 16px; align-items: start; }
.tool.loaded .mat-empty { display: none; }
.tool.loaded .workspace { display: grid; }
@media (max-width: 960px) { .workspace, .tool.loaded .workspace { grid-template-columns: 1fr; } }

.stage { position: relative; min-height: 420px; }
.stage-bar { position: relative; z-index: 2; display: flex; flex-wrap: wrap; align-items: center; gap: 6px; padding: 10px 12px 0 36px; }
.seg { display: inline-flex; background: rgba(0, 0, 0, 0.25); border-radius: 999px; padding: 3px; }
.seg button { font: 500 13px/1 var(--body); color: var(--mat-ink); background: transparent; border: 0; padding: 7px 11px; border-radius: 999px; cursor: pointer; }
.seg button[aria-pressed='true'] { background: var(--mat-ink); color: var(--mat-deep); }
.stage-bar .spacer { flex: 1; }
.stage-bar label { font: 500 12px/1 var(--mono); color: rgba(238, 241, 230, 0.85); display: inline-flex; align-items: center; gap: 6px; cursor: pointer; }
.stage-scroll { position: relative; overflow: auto; max-height: 72vh; padding: 16px 20px 24px 36px; }
.canvas-wrap { position: relative; margin: 0 auto; transform-origin: top center; }
.canvas-wrap > svg, .canvas-wrap > img { display: block; width: 100%; height: auto; }
.canvas-wrap .original { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; image-rendering: auto; }
.canvas-wrap .result { position: relative; }
.split-control { position: absolute; inset: 0; z-index: 2; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: ew-resize; }
.split-handle { position: absolute; top: 0; bottom: 0; width: 2px; background: #fff; box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.3); pointer-events: none; }
.split-handle::after { content: '⟷'; position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); width: 30px; height: 30px; border-radius: 99px; background: #fff; color: var(--mat-deep); display: grid; place-items: center; font-size: 15px; }
.split-control:focus-visible + .split-handle::after { outline: 3px solid var(--focus); outline-offset: 3px; }
.stage-status { padding: 0 20px 14px 36px; font: 400 12px/1.5 var(--mono); color: rgba(238, 241, 230, 0.78); min-height: 32px; }
.stage-status strong { color: #fff; font-weight: 500; }
.busy { position: absolute; inset: 0; display: none; place-items: center; background: rgba(23, 61, 47, 0.35); z-index: 3; font: 500 14px/1 var(--mono); color: #fff; }
.tool.working .busy { display: grid; }
.size-note { position: absolute; font: 500 11px/1 var(--mono); color: rgba(238, 241, 230, 0.8); }

.panel { color: var(--ink); background: var(--card); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 6px 16px 16px; box-shadow: var(--shadow); }
.panel h3 { font: 600 12px/1 var(--mono); text-transform: uppercase; letter-spacing: 0.08em; color: var(--ink-3); margin: 16px 0 10px; }
.field { display: grid; gap: 6px; margin: 0 0 12px; }
.field > span, .field legend { font-size: 14px; font-weight: 600; display: flex; justify-content: space-between; gap: 8px; }
.field output, .field .hint { font: 400 12px/1.4 var(--mono); color: var(--ink-3); font-weight: 400; }
fieldset.field, .field fieldset { border: 0; padding: 0; margin: 0 0 12px; min-width: 0; }
fieldset.field legend { padding: 0; margin-bottom: 6px; }
.row { display: flex; gap: 8px; }
.row > * { flex: 1; min-width: 0; }
input[type='number'], select, input[type='text'], input[type='email'] {
  width: 100%; min-height: 40px; padding: 0 10px; border-radius: var(--r-sm);
  border: 1px solid var(--line-2); background: var(--paper); color: var(--ink); font: 400 15px/1 var(--body);
}
input[type='range'] { width: 100%; accent-color: var(--mat); }
.opts { display: flex; flex-wrap: wrap; gap: 6px; }
.opts label { flex: 1 1 auto; }
.opts input { position: absolute; opacity: 0; }
.opts span { display: block; text-align: center; font-size: 13px; padding: 8px 8px; border-radius: var(--r-sm); border: 1px solid var(--line-2); cursor: pointer; white-space: nowrap; }
.opts input:checked + span { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.opts input:focus-visible + span { outline: 2px solid var(--focus); outline-offset: 2px; }
details.more summary { cursor: pointer; font-size: 14px; font-weight: 600; margin: 4px 0 10px; }
.defaults-note { font-size: 12px; color: var(--ink-3); margin: -2px 0 10px; }

.report { display: grid; grid-template-columns: repeat(2, 1fr); gap: 6px; margin: 0 0 10px; }
.stat { border: 1px solid var(--line); border-radius: var(--r); padding: 8px 10px; }
.stat b { display: block; font: 600 20px/1.1 var(--display); }
.stat small { font-size: 12px; color: var(--ink-3); }
.stat.warn { border-color: color-mix(in srgb, var(--blade) 55%, var(--line)); background: var(--blade-soft); }
.stat.warn b { color: var(--blade); }
.stat.good b { color: var(--ok); }
.layers { list-style: none; margin: 0 0 6px; padding: 0; display: grid; gap: 4px; }
.layer { display: grid; grid-template-columns: 26px 28px minmax(0, 1fr) auto; align-items: center; gap: 6px; padding: 6px 6px; border-radius: var(--r-sm); }
.layer:hover { background: var(--paper-2); }
.layer input[type='color'] { width: 26px; height: 26px; border: 1px solid var(--line-2); border-radius: 6px; padding: 0; background: none; cursor: pointer; }
.layer .eye { width: 26px; height: 26px; border: 0; background: transparent; cursor: pointer; color: var(--ink-2); display: grid; place-items: center; border-radius: 6px; }
.layer .eye[aria-pressed='false'] { color: var(--ink-3); opacity: 0.5; }
.layer .name { font-size: 14px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.layer .meta { font: 400 11px/1.3 var(--mono); color: var(--ink-3); text-align: right; }
.layer .meta .bad { color: var(--blade); }
.downloads { display: grid; gap: 6px; }
.downloads .btn { width: 100%; justify-content: space-between; }
.pro-note { font-size: 13px; color: var(--ink-3); margin: 8px 0 0; }
.privacy-note { display: flex; gap: 8px; align-items: flex-start; font-size: 13px; color: var(--ink-2); border-top: 1px solid var(--line); margin-top: 14px; padding-top: 12px; }
.privacy-note svg { flex: none; margin-top: 2px; color: var(--ok); }
.notice { font-size: 14px; border-radius: var(--r); padding: 10px 12px; background: var(--paper-2); color: var(--ink-2); margin: 10px 0 0; }
.notice.error { background: var(--blade-soft); color: var(--ink); }

/* ---------- Sections */
section.block { padding: 72px 0; }
section.block.tint { background: var(--paper-2); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.section-head { max-width: 720px; margin: 0 0 32px; }
.section-head.center { text-align: center; margin-left: auto; margin-right: auto; }
.section-head h2 { margin: 10px 0 12px; }
.section-head p { color: var(--ink-2); font-size: 17px; margin: 0; }
.grid { display: grid; gap: 16px; }
.grid.two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid.three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid.four { grid-template-columns: repeat(4, minmax(0, 1fr)); }
@media (max-width: 900px) { .grid.three, .grid.four { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 620px) { .grid.two, .grid.three, .grid.four { grid-template-columns: 1fr; } }

.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 22px; }
a.card { display: block; text-decoration: none; transition: border-color 0.15s ease, transform 0.15s ease; }
a.card:hover { border-color: var(--ink-3); transform: translateY(-2px); }
.card h3 { margin: 12px 0 8px; }
.card p { color: var(--ink-2); font-size: 15px; margin: 0; }
.card .more { display: inline-block; margin-top: 14px; font: 500 13px/1 var(--mono); color: var(--ink); }
.card .fig { height: 92px; border-radius: var(--r); background: var(--paper-2); display: grid; place-items: center; color: var(--ink); }
.card .fig svg { height: 70px; width: auto; }

.feature { padding: 4px 0; }
.feature .num { font: 500 12px/1 var(--mono); color: var(--ink-3); }
.feature h3 { font-size: 22px; margin: 12px 0 10px; }
.feature p { color: var(--ink-2); margin: 0; }
.rule-top { border-top: 1.5px solid var(--ink); padding-top: 18px; }

/* before / after */
.compare { position: relative; border-radius: var(--r-lg); overflow: hidden; border: 1px solid var(--line); background: #fff; aspect-ratio: 1 / 1; max-width: 520px; margin: 0 auto; user-select: none; touch-action: pan-y; }
.compare > img, .compare > .after { position: absolute; inset: 0; width: 100%; height: 100%; }
.compare > img { image-rendering: pixelated; }
.compare .after { clip-path: inset(0 0 0 var(--split, 50%)); background: #fff; }
.compare .after svg { width: 100%; height: 100%; }
.compare .handle { position: absolute; top: 0; bottom: 0; left: var(--split, 50%); width: 2px; background: var(--ink); }
.compare .handle::after { content: ''; position: absolute; top: 50%; left: 50%; width: 34px; height: 34px; transform: translate(-50%, -50%); border-radius: 99px; background: var(--ink); box-shadow: 0 0 0 4px #fff; }
.compare input { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; cursor: ew-resize; margin: 0; }
.compare .tag { position: absolute; top: 12px; font: 500 11px/1 var(--mono); background: var(--ink); color: #fff; padding: 6px 8px; border-radius: 99px; }
.compare .tag.l { left: 12px; } .compare .tag.r { right: 12px; }
.split-facts { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.facts { list-style: none; margin: 0; padding: 0; }
.facts li { display: flex; justify-content: space-between; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--line); font-size: 15px; }
.facts li b { font-family: var(--mono); font-weight: 500; }
.facts li b.bad { color: var(--blade); }
.facts li b.good { color: var(--ok); }

/* checks list */
.check { display: grid; grid-template-columns: 88px 1fr; gap: 18px; align-items: start; padding: 20px 0; border-top: 1px solid var(--line); }
.check:last-child { border-bottom: 1px solid var(--line); }
.check svg { width: 88px; height: 64px; }
.check h3 { margin: 2px 0 6px; }
.check p { margin: 0; color: var(--ink-2); }

/* pricing */
.plans { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; align-items: stretch; }
@media (max-width: 900px) { .plans { grid-template-columns: 1fr; } }
.plan { display: flex; flex-direction: column; background: var(--card); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 24px; }
.plan.featured { border: 1.5px solid var(--ink); }
.plan h3 { font-size: 18px; margin: 0; }
.plan .price { font: 700 44px/1 var(--display); letter-spacing: -0.03em; margin: 16px 0 4px; }
.plan .price small { font: 400 15px/1 var(--body); color: var(--ink-3); letter-spacing: 0; }
.plan .sub { color: var(--ink-3); font-size: 14px; min-height: 42px; }
.plan ul { list-style: none; padding: 0; margin: 18px 0 22px; display: grid; gap: 9px; font-size: 15px; }
.plan li { display: grid; grid-template-columns: 18px 1fr; gap: 8px; }
.plan li::before { content: ''; width: 12px; height: 7px; margin-top: 7px; border-left: 2px solid var(--ok); border-bottom: 2px solid var(--ok); transform: rotate(-45deg); }
.plan .btn { margin-top: auto; }
.plan-toggle { display: inline-flex; background: var(--paper-2); border: 1px solid var(--line); border-radius: 999px; padding: 3px; margin: 0 auto 24px; }
.plan-toggle button { border: 0; background: transparent; font: 500 14px/1 var(--body); padding: 9px 14px; border-radius: 999px; cursor: pointer; color: var(--ink-2); }
.plan-toggle button[aria-pressed='true'] { background: var(--ink); color: var(--paper); }

/* tables */
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--r-lg); background: var(--card); }
table { width: 100%; border-collapse: collapse; font-size: 15px; }
th, td { text-align: left; padding: 12px 14px; border-bottom: 1px solid var(--line); vertical-align: top; }
th { font: 600 12px/1.3 var(--mono); text-transform: uppercase; letter-spacing: 0.06em; color: var(--ink-3); background: var(--paper-2); }
tr:last-child td { border-bottom: 0; }
td.yes { color: var(--ok); font-weight: 600; }
td.no { color: var(--blade); font-weight: 600; }

/* converters grid */
.converters { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 8px; }
.converters a { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border: 1px solid var(--line); border-radius: var(--r); background: var(--card); text-decoration: none; font-weight: 500; }
.converters a:hover { border-color: var(--ink-3); }
.converters .pair { font: 500 11px/1 var(--mono); color: var(--ink-3); white-space: nowrap; }
.converters .pair b { color: var(--ink); font-weight: 600; }

/* FAQ */
.faq { border-top: 1px solid var(--line); }
.faq details { border-bottom: 1px solid var(--line); }
.faq summary { cursor: pointer; list-style: none; padding: 18px 36px 18px 0; position: relative; font: 600 18px/1.35 var(--display); letter-spacing: -0.01em; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: '+'; position: absolute; right: 4px; top: 14px; font: 400 26px/1 var(--body); color: var(--ink-3); }
.faq details[open] summary::after { content: '–'; }
.faq .answer { padding: 0 0 18px; color: var(--ink-2); max-width: 70ch; }

/* long-form article */
.prose { font-size: 17px; line-height: 1.72; }
.prose h2 { font-size: clamp(26px, 3vw, 32px); margin: 48px 0 14px; }
.prose h3 { font-size: 21px; margin: 32px 0 10px; }
.prose p, .prose ul, .prose ol { margin: 0 0 18px; color: var(--ink-2); }
.prose li { margin: 0 0 8px; }
.prose strong { color: var(--ink); }
.prose code { font: 400 0.9em var(--mono); background: var(--paper-2); padding: 1px 5px; border-radius: 4px; }
.prose .callout { border-left: 3px solid var(--mat); background: var(--card); padding: 14px 18px; border-radius: 0 var(--r) var(--r) 0; margin: 0 0 22px; }
.prose .callout p:last-child { margin: 0; }
.prose figure { margin: 24px 0; }
.prose figcaption { font-size: 14px; color: var(--ink-3); margin-top: 8px; }
.byline { display: flex; flex-wrap: wrap; gap: 6px 16px; font: 400 13px/1.4 var(--mono); color: var(--ink-3); margin: 0 0 8px; }
.sources { font-size: 14px; color: var(--ink-3); border-top: 1px solid var(--line); margin-top: 40px; padding-top: 16px; }
.sources ol { padding-left: 18px; }
.crumbs { font: 400 13px/1.4 var(--mono); color: var(--ink-3); }
.crumbs a { color: var(--ink-3); }
.two-col { display: grid; grid-template-columns: minmax(0, 1fr) 280px; gap: 48px; align-items: start; }
.aside { position: sticky; top: 90px; }
.aside .card { padding: 18px; }
@media (max-width: 900px) { .two-col { grid-template-columns: 1fr; } .aside { position: static; } }

.cta-band { background: var(--mat); color: var(--mat-ink); border-radius: var(--r-lg); padding: 40px; display: flex; flex-wrap: wrap; gap: 20px; align-items: center; justify-content: space-between; }
.cta-band h2 { color: #fff; font-size: clamp(26px, 3vw, 34px); max-width: 22ch; }
.cta-band p { margin: 8px 0 0; color: rgba(238, 241, 230, 0.8); }

/* ---------- Footer */
.site-footer { border-top: 1px solid var(--line); margin-top: 72px; padding: 56px 0 32px; font-size: 15px; }
.footer-grid { display: grid; grid-template-columns: 1.4fr repeat(4, 1fr); gap: 28px; }
@media (max-width: 900px) { .footer-grid { grid-template-columns: 1fr 1fr; } }
.site-footer h4 { font: 600 12px/1 var(--mono); text-transform: uppercase; letter-spacing: 0.08em; color: var(--ink-3); margin: 0 0 14px; }
.site-footer ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.site-footer a { text-decoration: none; color: var(--ink-2); }
.site-footer a:hover { color: var(--ink); text-decoration: underline; }
.footer-base { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; border-top: 1px solid var(--line); margin-top: 40px; padding-top: 20px; font: 400 13px/1.5 var(--mono); color: var(--ink-3); }

@media (max-width: 620px) {
  .hero { padding-top: 32px; }
  .drop { margin: 30px 12px 14px 30px; min-height: 300px; }
  .stage-scroll { padding: 12px 10px 16px 30px; }
  .stage-bar { padding-left: 30px; }
  section.block { padding: 52px 0; }
  .cta-band { padding: 28px 22px; }
  .split-facts { grid-template-columns: 1fr; }
  .check { grid-template-columns: 64px 1fr; }
  .check svg { width: 64px; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }

/* Account and license */
[hidden] { display: none !important; }
.callout { border-left: 3px solid var(--mat); background: var(--card); padding: 14px 18px; border-radius: 0 var(--r) var(--r) 0; margin: 0 0 18px; }
.callout p:last-child { margin: 0; }
.card code { font: 400 0.92em var(--mono); background: var(--paper-2); padding: 1px 5px; border-radius: 4px; }
.card code.license-key { display: inline-block; font-size: 17px; padding: 8px 12px; user-select: all; word-break: break-all; }

/* Sticker sheet maker */
.sheet .stage-bar .page-count { font: 500 13px/1 var(--mono); color: var(--mat-ink); padding: 0 10px; align-self: center; }
.sheet .seg button[disabled] { opacity: .4; cursor: default; }
.sheet-page { box-shadow: 0 6px 24px rgba(0, 0, 0, .28); border-radius: 2px; }
.sheet-items { gap: 2px; }
.sheet-item { grid-template-columns: 34px minmax(0, 1fr) auto auto 26px 26px; gap: 8px; }
.sheet-item .thumb { width: 34px; height: 34px; object-fit: contain; background: var(--paper-2); border-radius: 6px; }
.sheet-item .mini { font: 400 12px/1 var(--mono); color: var(--ink-3); display: inline-flex; align-items: center; gap: 4px; white-space: nowrap; }
.sheet-item .mini input { width: 58px; min-height: 30px; padding: 0 6px; font-size: 13px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.check { display: flex; gap: 8px; align-items: flex-start; font-size: 14px; margin: 0 0 12px; cursor: pointer; }
.check input { margin-top: 2px; accent-color: var(--mat); }

/* Background remover and print size checker */
.swatch { width: 22px; height: 22px; border-radius: 6px; border: 1px solid var(--line-2); display: inline-block; flex: 0 0 auto; }
.checker { background-image: linear-gradient(45deg, #d7d3c8 25%, transparent 25%), linear-gradient(-45deg, #d7d3c8 25%, transparent 25%), linear-gradient(45deg, transparent 75%, #d7d3c8 75%), linear-gradient(-45deg, transparent 75%, #d7d3c8 75%); background-size: 18px 18px; background-position: 0 0, 0 9px, 9px -9px, -9px 0; background-color: #fff; border-radius: 4px; }
.print-preview { margin: 0; display: grid; place-items: center; padding: 8px 26px 26px 8px; position: relative; }
.print-preview img { max-width: 100%; max-height: 60vh; display: block; background: #fff; border-radius: 3px; box-shadow: 0 6px 20px rgba(0, 0, 0, .28); }
.print-preview figcaption { position: absolute; inset: 0; pointer-events: none; }
.print-preview .dim-w, .print-preview .dim-h { position: absolute; font: 500 12px/1 var(--mono); color: var(--mat-ink); background: rgba(0, 0, 0, .3); padding: 4px 7px; border-radius: 99px; }
.print-preview .dim-w { bottom: 4px; left: 50%; transform: translateX(-50%); }
.print-preview .dim-h { right: 0; top: 50%; transform: translateY(-50%); }
.size-table { width: 100%; border-collapse: collapse; font-size: 13px; margin: 10px 0 0; }
.size-table th { text-align: left; font: 600 11px/1 var(--mono); text-transform: uppercase; letter-spacing: .06em; color: var(--ink-3); padding: 0 6px 6px 0; }
.size-table td { padding: 5px 6px 5px 0; border-top: 1px solid var(--line); }
.size-table tr.is-current td { font-weight: 600; background: var(--paper-2); }
.size-table .q-sharp, .size-table .q-good { color: var(--ok); }
.size-table .q-fair { color: var(--ink-2); }
.size-table .q-soft { color: var(--blade); }

/* Colour palette */
.swatch-list { gap: 4px; }
.swatch-row { grid-template-columns: 26px minmax(0, 1.2fr) minmax(40px, 1fr) auto 26px; align-items: center; }
.swatch-row .swatch { width: 26px; height: 26px; }
.swatch-row .name { font-size: 13px; line-height: 1.3; white-space: normal; }
.swatch-row .bar { height: 10px; border-radius: 99px; background: var(--paper-2); overflow: hidden; }
.swatch-row .bar > span { display: block; height: 100%; }
.swatch-row .meta { text-align: right; line-height: 1.4; }
