/* Layout: a green cutting-mat header with a yellow ruler edge, a row of tool tabs,
   then inputs beside a "cutting slip" that reads like the notes you take to the cutting table. */
:root {
  --paper: #f3f6f3;
  --card: #ffffff;
  --ink: #16231e;
  --muted: #53635c;
  --line: #d3dcd7;
  --chip: #e6ede9;
  --mat: #1f5b4c;
  --mat-grid: rgba(255, 255, 255, 0.13);
  --mat-fine: rgba(255, 255, 255, 0.05);
  --mat-ink: #f1f6f2;
  --ruler: #f2c62b;
  --ruler-ink: #2b2405;
  --accent: #1f5b4c;
  --accent-ink: #ffffff;
  --focus: #c98200;
  --warn: #9a3d12;
  --warn-bg: #fbeee6;
  --f-display: "Bricolage Grotesque", "Atkinson Hyperlegible Next", "Atkinson Hyperlegible", system-ui, sans-serif;
  --f-body: "Atkinson Hyperlegible Next", "Atkinson Hyperlegible", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --f-num: "Atkinson Hyperlegible Mono", ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  --r: 10px;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --paper: #0e1714; --card: #15221d; --ink: #e5ede8; --muted: #9db1a8; --line: #2a3c35; --chip: #1c2d27;
    --mat: #163f35; --mat-grid: rgba(255, 255, 255, 0.09); --mat-fine: rgba(255, 255, 255, 0.035); --mat-ink: #eef4f0;
    --accent: #f2c62b; --accent-ink: #231d05; --focus: #f2c62b; --warn: #f2a37e; --warn-bg: #2e1b12;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --paper: #0e1714; --card: #15221d; --ink: #e5ede8; --muted: #9db1a8; --line: #2a3c35; --chip: #1c2d27;
  --mat: #163f35; --mat-grid: rgba(255, 255, 255, 0.09); --mat-fine: rgba(255, 255, 255, 0.035); --mat-ink: #eef4f0;
  --accent: #f2c62b; --accent-ink: #231d05; --focus: #f2c62b; --warn: #f2a37e; --warn-bg: #2e1b12;
  color-scheme: dark;
}

:root { padding-top: env(safe-area-inset-top, 0px); padding-bottom: env(safe-area-inset-bottom, 0px); }
* { box-sizing: border-box; }
[hidden] { display: none !important; }
body {
  margin: 0; background: var(--paper); color: var(--ink);
  font-family: var(--f-body); font-size: 1.125rem; line-height: 1.55;
  -webkit-text-size-adjust: 100%;
}
.wrap {
  width: 100%; max-width: 1080px; margin: 0 auto;
  padding-left: max(16px, env(safe-area-inset-left, 0px));
  padding-right: max(16px, env(safe-area-inset-right, 0px));
}
h1, h2, h3 { font-family: var(--f-display); line-height: 1.12; text-wrap: balance; margin: 0; }
a { color: inherit; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }

/* Cutting-mat header */
.mat {
  background-color: var(--mat); color: var(--mat-ink);
  background-image:
    linear-gradient(135deg, transparent calc(50% - 1px), rgba(242, 198, 43, 0.28) 50%, transparent calc(50% + 1px)),
    linear-gradient(var(--mat-grid) 1px, transparent 1px),
    linear-gradient(90deg, var(--mat-grid) 1px, transparent 1px),
    linear-gradient(var(--mat-fine) 1px, transparent 1px),
    linear-gradient(90deg, var(--mat-fine) 1px, transparent 1px);
  background-size: 100% 100%, 48px 48px, 48px 48px, 12px 12px, 12px 12px;
}
.mat .wrap { padding-block: 28px 30px; display: grid; gap: 10px; }
.brand { font-family: var(--f-num); font-size: 0.85rem; letter-spacing: 0.12em; text-transform: uppercase; opacity: 0.85; }
.brand b { color: var(--ruler); font-weight: 600; }
.mat h1 { font-size: clamp(2rem, 5.5vw, 3.3rem); font-weight: 800; max-width: 22ch; letter-spacing: -0.01em; }
.lede { margin: 0; max-width: 60ch; font-size: 1.15rem; opacity: 0.92; }
.ruler {
  height: 26px; border-top: 1px solid rgba(0, 0, 0, 0.25);
  background:
    repeating-linear-gradient(90deg, var(--ruler-ink) 0 1.5px, transparent 1.5px 48px) 0 0 / 100% 70% no-repeat,
    repeating-linear-gradient(90deg, var(--ruler-ink) 0 1px, transparent 1px 24px) 0 0 / 100% 46% no-repeat,
    repeating-linear-gradient(90deg, var(--ruler-ink) 0 1px, transparent 1px 12px) 0 0 / 100% 30% no-repeat,
    repeating-linear-gradient(90deg, var(--ruler-ink) 0 1px, transparent 1px 6px) 0 0 / 100% 17% no-repeat,
    var(--ruler);
}

/* Toolbar: tabs + units */
.bar { display: flex; flex-wrap: wrap; gap: 12px 20px; align-items: center; justify-content: space-between; padding-block: 18px 6px; }
.tabs { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 4px; min-width: 0; max-width: 100%; scrollbar-width: thin; }
.tab {
  flex: none; font: 700 1rem var(--f-body); color: var(--ink); background: var(--chip);
  border: 1px solid transparent; border-radius: 999px; padding: 10px 16px; cursor: pointer; min-height: 44px;
}
.tab:hover { border-color: var(--line); }
.tab[aria-selected="true"] { background: var(--accent); color: var(--accent-ink); }
.settings { display: flex; flex-wrap: wrap; gap: 10px 16px; align-items: center; }
.seg { display: inline-flex; border: 1px solid var(--line); border-radius: 999px; overflow: hidden; background: var(--card); }
.seg button { font: 700 0.95rem var(--f-body); border: 0; background: transparent; color: var(--muted); padding: 9px 14px; cursor: pointer; min-height: 42px; }
.seg button[aria-pressed="true"] { background: var(--ink); color: var(--paper); }
.wofset { display: flex; align-items: center; gap: 8px; font-size: 0.95rem; color: var(--muted); }
.wofset input { width: 5.5em; }

/* Tool layout */
.tool { padding-block: 14px 8px; display: grid; gap: 18px; }
.tool-head { display: grid; gap: 6px; }
.tool-head h2 { font-size: clamp(1.6rem, 3.6vw, 2.2rem); font-weight: 800; }
.tool-head p { margin: 0; color: var(--muted); max-width: 65ch; }
.grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); gap: 20px; align-items: start; }
@media (max-width: 820px) { .grid { grid-template-columns: minmax(0, 1fr); } }

.inputs { background: var(--card); border: 1px solid var(--line); border-radius: var(--r); padding: 20px; display: grid; gap: 16px; }
.row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
@media (max-width: 420px) { .row { grid-template-columns: minmax(0, 1fr); } }
.field { display: grid; gap: 6px; min-width: 0; }
.field > label, .field > .lbl { font-weight: 700; font-size: 1rem; }
.hint { font-size: 0.92rem; color: var(--muted); margin: 0; }
.with-unit { position: relative; display: flex; align-items: center; }
input[type="text"], input[type="email"], select {
  width: 100%; font: 400 1.15rem var(--f-num); color: var(--ink); background: var(--paper);
  border: 1.5px solid var(--line); border-radius: 8px; padding: 11px 12px; min-height: 50px;
}
select { font-family: var(--f-body); font-size: 1.05rem; }
.with-unit input { padding-right: 3.2em; }
.u { position: absolute; right: 12px; color: var(--muted); font-family: var(--f-num); font-size: 0.95rem; pointer-events: none; }
input[aria-invalid="true"] { border-color: var(--warn); background: var(--warn-bg); }
.check { display: flex; gap: 10px; align-items: center; font-weight: 700; font-size: 1rem; }
.check input { width: 22px; height: 22px; accent-color: var(--mat); }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chips button { font: 600 0.92rem var(--f-num); border: 1px solid var(--line); background: var(--paper); color: var(--ink); border-radius: 6px; padding: 6px 10px; cursor: pointer; min-height: 36px; }
.chips button:hover { border-color: var(--accent); }

/* Cutting slip */
.slip { background: var(--card); border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; }
.slip-edge {
  height: 12px;
  background:
    repeating-linear-gradient(90deg, var(--ruler-ink) 0 1px, transparent 1px 24px) 0 0 / 100% 70% no-repeat,
    repeating-linear-gradient(90deg, var(--ruler-ink) 0 1px, transparent 1px 6px) 0 0 / 100% 35% no-repeat,
    var(--ruler);
}
.slip-body { padding: 20px; display: grid; gap: 16px; }
.big { display: grid; gap: 2px; }
.big .k { font-family: var(--f-num); font-size: 0.8rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); }
.big .v { font-family: var(--f-display); font-weight: 800; font-size: clamp(2.2rem, 6vw, 3rem); line-height: 1.05; font-variant-numeric: tabular-nums; }
.big .s { color: var(--muted); font-size: 1rem; }
.facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; margin: 0; }
.facts div { background: var(--chip); border-radius: 8px; padding: 10px 12px; min-width: 0; }
.facts dt { font-size: 0.85rem; color: var(--muted); }
.facts dd { margin: 0; font-family: var(--f-num); font-weight: 600; font-size: 1.1rem; font-variant-numeric: tabular-nums; }
.steps { margin: 0; padding-left: 1.3em; display: grid; gap: 8px; }
.steps li::marker { font-family: var(--f-num); font-weight: 600; }
.steps strong { font-family: var(--f-num); }
.compare { width: 100%; border-collapse: collapse; font-size: 1rem; }
.compare th, .compare td { text-align: left; padding: 8px 6px; border-bottom: 1px solid var(--line); vertical-align: top; }
.compare td.n { font-family: var(--f-num); font-variant-numeric: tabular-nums; white-space: nowrap; }
.compare th { font-size: 0.85rem; color: var(--muted); font-weight: 700; }
.pill { display: inline-block; font: 700 0.75rem var(--f-body); letter-spacing: 0.05em; text-transform: uppercase; background: var(--ruler); color: var(--ruler-ink); border-radius: 999px; padding: 2px 8px; margin-left: 6px; vertical-align: 2px; }
.note { margin: 0; font-size: 0.95rem; color: var(--muted); }
.err { margin: 0; color: var(--warn); font-weight: 700; }
.actions { display: flex; flex-wrap: wrap; gap: 10px; }
.btn { font: 700 1rem var(--f-body); border-radius: 8px; padding: 11px 16px; min-height: 46px; cursor: pointer; border: 1.5px solid var(--accent); background: var(--accent); color: var(--accent-ink); }
.btn.ghost { background: transparent; color: var(--ink); border-color: var(--line); }
.btn:disabled { opacity: 0.6; cursor: default; }
.copied { font-size: 0.95rem; color: var(--muted); align-self: center; }

.how { border-top: 1px dashed var(--line); padding-top: 14px; display: grid; gap: 8px; max-width: 75ch; }
.how h3 { font-size: 1.15rem; font-weight: 700; font-family: var(--f-body); }
.how p { margin: 0; color: var(--muted); }

/* Waitlist */
.waitlist { margin-top: 36px; background: var(--mat); color: var(--mat-ink); }
.waitlist .wrap { padding-block: 34px; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); gap: 28px; }
@media (max-width: 820px) { .waitlist .wrap { grid-template-columns: minmax(0, 1fr); } }
.waitlist h2 { font-size: clamp(1.7rem, 4vw, 2.4rem); font-weight: 800; }
.waitlist p { margin: 0; }
.waitlist ul { margin: 0; padding-left: 1.2em; display: grid; gap: 6px; }
.wl-copy { display: grid; gap: 14px; align-content: start; }
.wl-form { background: var(--card); color: var(--ink); border-radius: var(--r); padding: 20px; display: grid; gap: 16px; }
.wl-form fieldset { border: 0; margin: 0; padding: 0; display: grid; gap: 8px; }
.wl-form legend { font-weight: 700; margin-bottom: 4px; }
.radio { display: flex; gap: 10px; align-items: center; font-size: 1rem; }
.radio input { width: 20px; height: 20px; accent-color: var(--mat); }
.wl-msg { margin: 0; font-weight: 700; }

.gloss { display: flex; flex-wrap: wrap; gap: 6px 18px; }
.gloss b { font-family: var(--f-num); color: var(--ink); }

/* ==== Site chrome (every page) ==== */
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.skip { position: absolute; left: -9999px; top: 8px; background: var(--card); color: var(--ink); padding: 8px 12px; border-radius: 6px; z-index: 60; }
.skip:focus { left: 8px; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
body { display: flex; flex-direction: column; min-height: 100vh; min-height: 100dvh; }
body > main, body > #main { flex: 1 0 auto; }
a.btn, .btn { text-decoration: none; display: inline-flex; align-items: center; justify-content: center; gap: 8px; transition: transform .15s ease, box-shadow .15s ease, background-color .15s; }
.btn:hover { transform: translateY(-1px); box-shadow: 0 6px 16px -8px rgba(0, 0, 0, .45); }
.btn:active { transform: translateY(0); }
.btn.small { min-height: 40px; padding: 8px 14px; font-size: 0.95rem; }
.btn.ghost { background: transparent; color: var(--ink); border-color: var(--line); }
.btn.big { min-height: 54px; padding: 14px 22px; font-size: 1.08rem; border-radius: 10px; }
.btn.sun { background: var(--ruler); color: var(--ruler-ink); border-color: var(--ruler); }
.btn.on-dark.ghost { color: var(--mat-ink); border-color: rgba(255, 255, 255, .45); }

.site-top { position: sticky; top: 0; z-index: 40; background: color-mix(in srgb, var(--paper) 88%, transparent); backdrop-filter: saturate(1.4) blur(10px); -webkit-backdrop-filter: saturate(1.4) blur(10px); border-bottom: 1px solid transparent; transition: border-color .2s, box-shadow .2s; }
.site-top.scrolled { border-bottom-color: var(--line); box-shadow: 0 6px 20px -16px rgba(0, 0, 0, .5); }
.site-top-in { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 64px; }
.logo { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; font: 800 1.35rem var(--f-display); letter-spacing: -0.01em; color: var(--ink); flex: none; }
.logo img { display: block; border-radius: 8px; transition: transform .4s cubic-bezier(.3, 1.6, .5, 1); }
.logo:hover img { transform: rotate(90deg); }
.site-nav { display: flex; align-items: center; gap: 4px 22px; }
.site-nav > a { text-decoration: none; font-weight: 700; font-size: 1rem; padding: 6px 0; position: relative; }
.site-nav > a::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 2px; background: var(--ruler); transform: scaleX(0); transform-origin: left; transition: transform .25s ease; }
.site-nav > a:hover::after, .site-nav > a[aria-current="page"]::after { transform: scaleX(1); }
.nav-cta { display: inline-flex; gap: 8px; }
.nav-toggle { display: none; width: 46px; height: 46px; border-radius: 10px; border: 1px solid var(--line); background: var(--card); cursor: pointer; place-items: center; }
.bars { display: grid; gap: 5px; width: 20px; }
.bars i { display: block; height: 2px; background: var(--ink); border-radius: 2px; transition: transform .25s, opacity .2s; }
.open .bars i:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.open .bars i:nth-child(2) { opacity: 0; }
.open .bars i:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
@media (min-width: 861px) { .hide-wide { display: none; } }
@media (max-width: 860px) {
  .nav-toggle { display: inline-grid; }
  .site-nav { position: absolute; left: 0; right: 0; top: 100%; flex-direction: column; align-items: stretch; gap: 0;
    background: var(--card); border-bottom: 1px solid var(--line); box-shadow: 0 18px 30px -20px rgba(0, 0, 0, .5);
    padding: 6px 16px 18px; visibility: hidden; opacity: 0; transform: translateY(-8px); transition: opacity .2s, transform .2s, visibility .2s; }
  .open .site-nav { visibility: visible; opacity: 1; transform: none; }
  .site-nav > a { padding: 14px 4px; font-size: 1.15rem; border-bottom: 1px solid var(--line); }
  .site-nav > a::after { display: none; }
  .site-nav > a[aria-current="page"] { color: var(--accent); }
  .nav-cta { padding-top: 14px; display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
  .nav-cta .btn { min-height: 48px; }
  .nav-cta .btn:only-child { grid-column: 1 / -1; }
  body.nav-open { overflow: hidden; }
}

.site-foot { margin-top: 0; background: var(--mat); color: var(--mat-ink); }
.site-foot .ruler { height: 18px; }
.foot-grid { display: grid; grid-template-columns: 1.5fr repeat(3, minmax(0, 1fr)); gap: 28px; padding-block: 40px 26px; }
.foot-grid a { display: block; color: var(--mat-ink); opacity: .86; text-decoration: none; padding: 4px 0; }
.foot-grid a:hover { opacity: 1; text-decoration: underline; }
.foot-grid .logo { color: var(--mat-ink); opacity: 1; padding: 0; }
.foot-brand { display: grid; gap: 12px; align-content: start; }
.foot-brand p { margin: 0; opacity: .9; max-width: 40ch; }
.foot-h { margin: 0 0 6px; font: 700 .8rem var(--f-num); letter-spacing: .12em; text-transform: uppercase; color: var(--ruler); }
.foot-fine { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 18px; padding-block: 16px 28px; border-top: 1px solid rgba(255, 255, 255, .15); font-size: .92rem; opacity: .85; }
.foot-fine a { color: inherit; }
.fine { font-size: .9rem; }
@media (max-width: 860px) { .foot-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } .foot-brand { grid-column: 1 / -1; } }

.page { padding-block: 32px 56px; display: grid; gap: 16px; }
.page h1 { font-size: clamp(1.9rem, 4.5vw, 2.7rem); font-weight: 800; }
.prose { max-width: 70ch; }
.prose h2 { font-size: 1.35rem; margin-top: 12px; }
.prose p { margin: 0; }
.eyebrow { font: 700 .8rem var(--f-num); letter-spacing: .14em; text-transform: uppercase; color: var(--accent); }
.section { padding-block: clamp(48px, 8vw, 92px); }
.section-head { display: grid; gap: 10px; max-width: 62ch; margin-bottom: 28px; }
.section-head h2 { font-size: clamp(1.8rem, 4.4vw, 2.7rem); font-weight: 800; letter-spacing: -0.015em; }
.section-head p { margin: 0; color: var(--muted); font-size: 1.15rem; }
.section-head.center { margin-inline: auto; text-align: center; justify-items: center; }
.tint { background: var(--card); border-block: 1px solid var(--line); }

/* ==== Motion ==== */
.js [data-reveal] { opacity: 0; transform: translateY(18px); transition: opacity .7s ease, transform .7s cubic-bezier(.2, .7, .2, 1); transition-delay: var(--d, 0s); }
.js [data-reveal].in { opacity: 1; transform: none; }
.lift { transition: transform .25s ease, box-shadow .25s ease, border-color .25s; }
.lift:hover { transform: translateY(-4px); box-shadow: 0 18px 30px -22px rgba(0, 0, 0, .55); border-color: var(--accent); }
@keyframes pop { 0% { transform: scale(.6); opacity: 0; } 70% { transform: scale(1.06); } 100% { transform: scale(1); opacity: 1; } }
@keyframes floaty { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-8px); } }
@keyframes stitch { to { stroke-dashoffset: -24; } }
@keyframes shimmer { from { background-position: -200% 0; } to { background-position: 200% 0; } }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; }
  .js [data-reveal] { opacity: 1; transform: none; }
}

/* ==== Toasts + confetti ==== */
.toasts { position: fixed; right: 16px; bottom: 16px; z-index: 80; display: grid; gap: 10px; max-width: min(380px, calc(100vw - 32px)); }
.toast { background: var(--ink); color: var(--paper); border-radius: 12px; padding: 12px 16px; box-shadow: 0 18px 40px -18px rgba(0, 0, 0, .6);
  transform: translateY(16px) scale(.98); opacity: 0; transition: transform .35s cubic-bezier(.2, .9, .3, 1.3), opacity .3s; display: flex; gap: 12px; align-items: center; font-size: .98rem; }
.toast.show { transform: none; opacity: 1; }
.toast small { display: block; opacity: .8; font-size: .85rem; }
.badge-toast { background: var(--mat); color: var(--mat-ink); border: 2px solid var(--ruler); }
.medal { flex: none; width: 40px; height: 40px; border-radius: 50%; background: var(--ruler); color: var(--ruler-ink); display: grid; place-items: center; font-size: 1.3rem; animation: pop .6s ease both; }
.confetti { position: fixed; inset: 0; width: 100vw; height: 100vh; pointer-events: none; z-index: 90; }

/* ==== Home ==== */
.hero { position: relative; overflow: hidden; background-color: var(--mat); color: var(--mat-ink);
  background-image: linear-gradient(var(--mat-grid) 1px, transparent 1px), linear-gradient(90deg, var(--mat-grid) 1px, transparent 1px),
    linear-gradient(var(--mat-fine) 1px, transparent 1px), linear-gradient(90deg, var(--mat-fine) 1px, transparent 1px);
  background-size: 48px 48px, 48px 48px, 12px 12px, 12px 12px; }
.hero::before { content: ""; position: absolute; inset: 0; background: linear-gradient(135deg, transparent calc(50% - 1px), rgba(242, 198, 43, .22) 50%, transparent calc(50% + 1px)); pointer-events: none; }
.hero-in { position: relative; display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); gap: clamp(24px, 4vw, 56px); align-items: center; padding-block: clamp(40px, 7vw, 88px) clamp(48px, 7vw, 96px); }
.hero h1 { font-size: clamp(2.5rem, 7vw, 4.6rem); font-weight: 800; letter-spacing: -0.03em; line-height: 1.02; }
.hero h1 em { font-style: normal; color: var(--ruler); display: inline-block; }
.hero .lede { font-size: clamp(1.1rem, 2.2vw, 1.3rem); max-width: 48ch; opacity: .95; margin: 0; }
.hero-copy { display: grid; gap: 22px; }
.pill-line { display: inline-flex; align-items: center; gap: 8px; width: fit-content; background: rgba(255, 255, 255, .1); border: 1px solid rgba(255, 255, 255, .22); border-radius: 999px; padding: 6px 14px 6px 8px; font-weight: 700; font-size: .92rem; }
.pill-line .dot { width: 10px; height: 10px; border-radius: 50%; background: var(--ruler); box-shadow: 0 0 0 0 rgba(242, 198, 43, .7); animation: pulse 2s infinite; }
@keyframes pulse { 70% { box-shadow: 0 0 0 10px rgba(242, 198, 43, 0); } 100% { box-shadow: 0 0 0 0 rgba(242, 198, 43, 0); } }
.ticks { display: flex; flex-wrap: wrap; gap: 8px 18px; margin: 0; padding: 0; list-style: none; font-size: .98rem; opacity: .92; }
.ticks li::before { content: "✓"; color: var(--ruler); font-weight: 800; margin-right: 6px; }
.hero-stage { position: relative; }
.hero-quilt { background: var(--card); border-radius: 16px; padding: clamp(12px, 2vw, 20px); box-shadow: 0 30px 60px -30px rgba(0, 0, 0, .7); transform: rotate(-2deg); }
.hero-quilt svg { display: block; width: 100%; height: auto; }
.js .hero-quilt polygon, .js .hero-quilt rect { animation: pop .5s cubic-bezier(.2, .9, .3, 1.2) both; animation-delay: var(--d, 0s); transform-box: fill-box; transform-origin: center; }
.slip-float { position: absolute; background: var(--card); color: var(--ink); border-radius: 12px; padding: 12px 14px; box-shadow: 0 18px 40px -20px rgba(0, 0, 0, .7); display: grid; gap: 2px; animation: floaty 5s ease-in-out infinite; }
.slip-float .k { font: 700 .72rem var(--f-num); letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.slip-float .v { font: 800 1.5rem var(--f-display); }
.slip-a { left: -18px; bottom: 26px; }
.slip-b { right: -12px; top: 18px; animation-delay: -2.5s; display: flex; gap: 8px; align-items: center; font-weight: 700; }
.slip-b .ok { width: 26px; height: 26px; border-radius: 50%; background: var(--mat); color: #fff; display: grid; place-items: center; font-size: .9rem; }
@media (max-width: 860px) { .hero-in { grid-template-columns: minmax(0, 1fr); } .hero-stage { max-width: 520px; margin: 8px auto 0; width: 100%; } .slip-a { left: 0; } .slip-b { right: 0; } }

.stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; padding-block: 28px; }
.stat { text-align: center; display: grid; gap: 2px; }
.stat b { font: 800 clamp(2rem, 5vw, 2.8rem) var(--f-display); color: var(--accent); line-height: 1; }
.stat span { color: var(--muted); font-size: .98rem; }
@media (max-width: 640px) { .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); row-gap: 22px; } }

.steps-row { position: relative; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 18px; }
.steps-row svg.thread { position: absolute; left: 6%; right: 6%; top: 46px; width: 88%; height: 4px; overflow: visible; }
.steps-row svg.thread line { stroke: var(--ruler); stroke-width: 3; stroke-dasharray: 8 4; animation: stitch 1.2s linear infinite; }
.step-card { position: relative; background: var(--card); border: 1px solid var(--line); border-radius: 16px; padding: 22px 18px; display: grid; gap: 10px; align-content: start; }
.step-ic { width: 76px; height: 76px; border-radius: 18px; background: var(--paper); border: 1px solid var(--line); display: grid; place-items: center; }
.step-ic svg { width: 46px; height: 46px; }
.step-n { position: absolute; top: 14px; right: 16px; font: 800 1.9rem var(--f-display); color: var(--line); }
.step-card h3 { font-size: 1.2rem; font-weight: 800; }
.step-card p { margin: 0; color: var(--muted); }
@media (max-width: 960px) { .steps-row { grid-template-columns: repeat(2, minmax(0, 1fr)); } .steps-row svg.thread { display: none; } }
@media (max-width: 520px) { .steps-row { grid-template-columns: minmax(0, 1fr); } }

.demo { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 28px; align-items: center; }
.demo-quilt { background: var(--card); border: 1px solid var(--line); border-radius: 16px; padding: 18px; display: grid; place-items: center; min-height: 320px; }
.demo-quilt svg { width: 100%; height: auto; max-height: 460px; transition: opacity .25s, transform .35s cubic-bezier(.2, .9, .3, 1.2); }
.demo-quilt svg.swap { opacity: 0; transform: scale(.94); }
.demo-slip { background: var(--card); border: 1px solid var(--line); border-radius: 16px; overflow: hidden; }
.demo-slip .slip-edge { height: 12px; background: repeating-linear-gradient(90deg, var(--ruler-ink) 0 1px, transparent 1px 24px) 0 0 / 100% 70% no-repeat, repeating-linear-gradient(90deg, var(--ruler-ink) 0 1px, transparent 1px 6px) 0 0 / 100% 35% no-repeat, var(--ruler); }
.demo-body { padding: 20px; display: grid; gap: 14px; }
.demo-body .total { font: 800 clamp(2.2rem, 6vw, 3rem) var(--f-display); line-height: 1; }
.demo-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.demo-list li { display: flex; align-items: center; gap: 10px; padding-bottom: 8px; border-bottom: 1px dashed var(--line); animation: slidein .45s ease both; animation-delay: var(--d, 0s); }
.demo-list .amt { margin-left: auto; font: 700 1.05rem var(--f-num); }
.demo-list .sw { width: 22px; height: 22px; border-radius: 6px; border: 1px solid rgba(0, 0, 0, .15); flex: none; }
@keyframes slidein { from { opacity: 0; transform: translateX(-10px); } to { opacity: 1; transform: none; } }
.seg.sizes button { min-width: 74px; }
@media (max-width: 860px) { .demo { grid-template-columns: minmax(0, 1fr); } }

.fgrid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
@media (max-width: 960px) { .fgrid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 600px) { .fgrid { grid-template-columns: minmax(0, 1fr); } }
.feat { background: var(--card); border: 1px solid var(--line); border-radius: 16px; overflow: hidden; display: grid; align-content: start; }
.feat-art { height: 150px; background: var(--paper); border-bottom: 1px solid var(--line); position: relative; overflow: hidden; display: grid; place-items: center; }
.feat-body { padding: 18px; display: grid; gap: 8px; }
.feat h3 { font-size: 1.2rem; font-weight: 800; }
.feat p { margin: 0; color: var(--muted); }
.tag { font: 700 .74rem var(--f-num); letter-spacing: .12em; text-transform: uppercase; color: var(--accent); }

/* feature illustrations */
.art-scale { width: 210px; height: 110px; border-radius: 8px; background: repeating-linear-gradient(45deg, #a8322d 0 10px, #c96f3b 10px 20px, #f1e8d2 20px 30px); position: relative; box-shadow: 0 10px 20px -14px rgba(0, 0, 0, .6); }
.art-scale::after { content: ""; position: absolute; left: 0; right: 0; top: -14px; height: 12px; background: repeating-linear-gradient(90deg, var(--ruler-ink) 0 1px, transparent 1px 21px) 0 0/100% 80% no-repeat, var(--ruler); border-radius: 3px; }
.art-scale i { position: absolute; width: 16px; height: 16px; border-radius: 50%; background: var(--ruler); border: 2px solid var(--ink); top: 40px; animation: tap 2.4s ease-in-out infinite; }
.art-scale i:nth-child(1) { left: 30px; } .art-scale i:nth-child(2) { left: 160px; animation-delay: .6s; }
@keyframes tap { 0%, 100% { transform: scale(1); } 15% { transform: scale(1.5); } 30% { transform: scale(1); } }
.art-stash { display: flex; align-items: flex-end; gap: 6px; }
.art-stash span { width: 34px; border-radius: 4px 4px 2px 2px; box-shadow: 0 6px 12px -8px rgba(0, 0, 0, .6); animation: rise 3s ease-in-out infinite; animation-delay: var(--d); }
@keyframes rise { 0%, 100% { transform: translateY(0); } 40% { transform: translateY(-10px); } }
.art-strip { width: 230px; display: grid; gap: 6px; }
.art-strip div { height: 22px; border-radius: 3px; background: #e8dfc8; display: flex; gap: 3px; padding: 3px; overflow: hidden; }
.art-strip b { width: 30px; flex: none; border-radius: 2px; background: var(--accent); animation: cutin 3.2s ease-in-out infinite; animation-delay: var(--d); }
@keyframes cutin { 0% { opacity: 0; transform: translateX(-12px); } 20%, 80% { opacity: 1; transform: none; } 100% { opacity: 0; } }
.art-phone { width: 120px; height: 150px; margin-top: 30px; border-radius: 18px; background: var(--ink); padding: 12px 9px; display: grid; gap: 7px; align-content: start; }
.art-phone span { height: 18px; border-radius: 5px; background: #2b3a34; display: flex; align-items: center; gap: 6px; padding: 0 6px; }
.art-phone span::before { content: ""; width: 10px; height: 10px; border-radius: 3px; border: 2px solid #6e857b; flex: none; animation: tick 4s steps(1) infinite; animation-delay: var(--d); }
.art-phone span::after { content: ""; height: 4px; flex: 1; border-radius: 2px; background: #4b5f57; }
@keyframes tick { 0% { background: transparent; border-color: #6e857b; } 50%, 100% { background: var(--ruler); border-color: var(--ruler); } }
.art-contrast { width: 140px; height: 110px; position: relative; border-radius: 6px; overflow: hidden; }
.art-contrast svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.art-contrast .grey { filter: grayscale(1); clip-path: inset(0 0 0 50%); animation: wipe 4s ease-in-out infinite alternate; }
@keyframes wipe { from { clip-path: inset(0 0 0 85%); } to { clip-path: inset(0 0 0 15%); } }
.art-why { font: 600 .9rem var(--f-num); background: var(--card); border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; width: 230px; display: grid; gap: 4px; }
.art-why span { opacity: 0; animation: fadeline 5s ease infinite; animation-delay: var(--d); white-space: nowrap; }
.art-why b { color: var(--accent); }
@keyframes fadeline { 0%, 10% { opacity: 0; transform: translateY(4px); } 20%, 85% { opacity: 1; transform: none; } 100% { opacity: 0; } }

.play { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 28px; align-items: center; }
.badges-row { display: flex; flex-wrap: wrap; gap: 12px; }
.badge { width: 92px; display: grid; justify-items: center; gap: 6px; text-align: center; font: 700 .8rem var(--f-body); }
.badge .disc { width: 74px; height: 74px; border-radius: 50%; background: var(--ruler); padding: 12px; box-shadow: inset 0 0 0 4px var(--card), 0 0 0 3px var(--ruler), 0 10px 18px -12px rgba(0, 0, 0, .6); display: grid; place-items: center; }
.badge .disc svg { width: 100%; height: 100%; border-radius: 6px; }
.badge.locked .disc { background: var(--chip); box-shadow: inset 0 0 0 4px var(--card), 0 0 0 3px var(--line); filter: grayscale(1); opacity: .65; }
.js .badges-row .badge { animation: pop .6s cubic-bezier(.2, .9, .3, 1.3) both; animation-delay: var(--d, 0s); animation-play-state: paused; }
.badges-row.in .badge { animation-play-state: running; }
.meter { display: grid; gap: 6px; }
.meter .track { height: 14px; background: var(--chip); border-radius: 999px; overflow: hidden; }
.meter .track i { display: block; height: 100%; width: 0; border-radius: 999px; background: linear-gradient(90deg, var(--accent), var(--ruler)); transition: width 1.4s cubic-bezier(.2, .8, .2, 1); }
.in .meter .track i, .meter.in .track i { width: var(--w); }
.meter .lbl { display: flex; justify-content: space-between; font-weight: 700; font-size: .95rem; }
.play-card { background: var(--card); border: 1px solid var(--line); border-radius: 16px; padding: 20px; display: grid; gap: 16px; }
.levels { display: flex; gap: 6px; flex-wrap: wrap; }
.levels span { font: 700 .78rem var(--f-num); padding: 4px 10px; border-radius: 999px; background: var(--chip); color: var(--muted); }
.levels span.on { background: var(--mat); color: #fff; }
@media (max-width: 860px) { .play { grid-template-columns: minmax(0, 1fr); } }

.pcards { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 16px; }
.pcard { background: var(--card); border: 1px solid var(--line); border-radius: 16px; padding: 14px; display: grid; gap: 10px; align-content: start; text-decoration: none; color: inherit; }
.pcard .pic { aspect-ratio: 1; background: var(--paper); border-radius: 10px; display: grid; place-items: center; padding: 14px; overflow: hidden; }
.pcard .pic svg { width: 100%; height: 100%; transition: transform .5s cubic-bezier(.2, .8, .2, 1); filter: drop-shadow(0 8px 12px rgba(0, 0, 0, .18)); }
.pcard:hover .pic svg { transform: scale(1.05) rotate(-1.5deg); }
.pcard h3 { font-size: 1.12rem; font-weight: 800; }
.pcard p { margin: 0; color: var(--muted); font-size: .95rem; }
.pmeta { display: flex; flex-wrap: wrap; gap: 6px; }
.chip-s { font: 700 .76rem var(--f-num); padding: 3px 9px; border-radius: 999px; background: var(--chip); color: var(--ink); white-space: nowrap; }
.chip-s.lv0 { background: #dcefe4; color: #1f5b4c; } .chip-s.lv1 { background: #fbefc8; color: #6b5306; } .chip-s.lv2 { background: #f5dcd6; color: #7a2a1d; }
:root[data-theme="dark"] .chip-s.lv0, :root[data-theme="dark"] .chip-s.lv1, :root[data-theme="dark"] .chip-s.lv2 { background: var(--chip); color: var(--ink); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .chip-s.lv0, :root:not([data-theme="light"]) .chip-s.lv1, :root:not([data-theme="light"]) .chip-s.lv2 { background: var(--chip); color: var(--ink); } }
.filters { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 18px; }
.filters button, .filters a { font: 700 .95rem var(--f-body); border: 1.5px solid var(--line); background: var(--card); color: var(--ink); border-radius: 999px; padding: 8px 16px; cursor: pointer; text-decoration: none; min-height: 42px; display: inline-flex; align-items: center; }
.filters [aria-pressed="true"], .filters [aria-current="page"] { background: var(--ink); color: var(--paper); border-color: var(--ink); }

.calc-cards { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.calc-card { background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 16px; display: grid; gap: 6px; text-decoration: none; color: inherit; }
.calc-card b { font-size: 1.08rem; }
.calc-card span { color: var(--muted); font-size: .94rem; }
@media (max-width: 860px) { .calc-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 480px) { .calc-cards { grid-template-columns: minmax(0, 1fr); } }

.compare-wrap { overflow-x: auto; border-radius: 16px; border: 1px solid var(--line); }
.compare-t { width: 100%; border-collapse: collapse; background: var(--card); font-size: 1rem; min-width: 560px; }
.compare-t th, .compare-t td { padding: 12px 14px; border-bottom: 1px solid var(--line); text-align: left; }
.compare-t thead th { font: 700 .82rem var(--f-num); letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.compare-t td.y { color: var(--accent); font-weight: 700; }
.compare-t td.n { color: var(--muted); }

.posts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
@media (max-width: 960px) { .posts { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 600px) { .posts { grid-template-columns: minmax(0, 1fr); } }
.post-card { background: var(--card); border: 1px solid var(--line); border-radius: 16px; overflow: hidden; display: grid; align-content: start; text-decoration: none; color: inherit; }
.post-card .cover { height: 170px; background: var(--mat); display: grid; place-items: center; overflow: hidden; }
.post-card .cover svg { width: 120%; height: auto; transform: rotate(-6deg); opacity: .95; transition: transform .6s ease; }
.post-card:hover .cover svg { transform: rotate(-3deg) scale(1.05); }
.post-card .cover.none { background: repeating-linear-gradient(45deg, var(--mat) 0 18px, #24685a 18px 36px); }
.post-card .txt { padding: 16px 18px 20px; display: grid; gap: 8px; }
.post-card h3 { font-size: 1.18rem; font-weight: 800; line-height: 1.25; }
.post-card p { margin: 0; color: var(--muted); font-size: .96rem; }
.meta-line { font: 600 .82rem var(--f-num); color: var(--muted); letter-spacing: .04em; }

details.faq { background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 0 18px; }
details.faq + details.faq { margin-top: 10px; }
details.faq summary { cursor: pointer; list-style: none; font-weight: 700; font-size: 1.08rem; padding: 16px 30px 16px 0; position: relative; }
details.faq summary::-webkit-details-marker { display: none; }
details.faq summary::after { content: "+"; position: absolute; right: 0; top: 12px; font: 700 1.5rem var(--f-num); color: var(--accent); transition: transform .25s; }
details.faq[open] summary::after { transform: rotate(45deg); }
details.faq p { margin: 0 0 16px; color: var(--muted); }
details.faq.opened p { animation: slidein .35s ease both; }
.faq-list { max-width: 820px; margin-inline: auto; }

.cta-band { background: var(--ruler); color: var(--ruler-ink); border-radius: 20px; padding: clamp(24px, 4vw, 40px); display: flex; flex-wrap: wrap; gap: 18px; align-items: center; justify-content: space-between; }
.cta-band h2 { font-size: clamp(1.6rem, 4vw, 2.3rem); font-weight: 800; }
.cta-band p { margin: 6px 0 0; max-width: 52ch; }
.cta-band .btn { background: var(--ruler-ink); border-color: var(--ruler-ink); color: var(--ruler); }

/* ==== Patterns ==== */
.p-hero { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 28px; align-items: start; }
.p-hero .pic { background: var(--card); border: 1px solid var(--line); border-radius: 16px; padding: 18px; position: sticky; top: 84px; }
.p-hero .pic svg { width: 100%; height: auto; display: block; }
.p-info { display: grid; gap: 16px; }
.p-info h1 { font-size: clamp(2rem, 5vw, 2.8rem); font-weight: 800; }
.shop-t { width: 100%; border-collapse: collapse; background: var(--card); border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
.shop-t th, .shop-t td { padding: 10px 12px; border-bottom: 1px solid var(--line); text-align: left; }
.shop-t td.n { font: 700 1rem var(--f-num); white-space: nowrap; text-align: right; }
.shop-t .sw { display: inline-block; width: 22px; height: 22px; border-radius: 6px; border: 1px solid rgba(0, 0, 0, .15); vertical-align: -5px; margin-right: 8px; }
.crumbs { font-size: .95rem; color: var(--muted); display: flex; flex-wrap: wrap; gap: 6px; }
.crumbs a { color: var(--muted); }
@media (max-width: 860px) { .p-hero { grid-template-columns: minmax(0, 1fr); } .p-hero .pic { position: static; } }

/* ==== Blog post ==== */
.article { max-width: 760px; margin-inline: auto; padding-block: 36px 60px; display: grid; gap: 18px; }
.article h1 { font-size: clamp(2rem, 5vw, 2.9rem); font-weight: 800; letter-spacing: -0.02em; }
.article .summary { font-size: 1.2rem; color: var(--muted); margin: 0; }
.md { font-size: 1.12rem; line-height: 1.7; }
.md > * + * { margin-top: 1em; }
.md h2 { font-size: 1.6rem; margin-top: 1.6em; }
.md h3 { font-size: 1.25rem; margin-top: 1.3em; }
.md p, .md ul, .md ol { margin-bottom: 0; }
.md li + li { margin-top: .35em; }
.md a { color: var(--accent); font-weight: 700; }
.md table { width: 100%; border-collapse: collapse; font-size: 1rem; display: block; overflow-x: auto; }
.md th, .md td { border-bottom: 1px solid var(--line); padding: 8px 10px; text-align: left; white-space: nowrap; }
.md th { background: var(--chip); }
.md blockquote { margin: 1em 0; padding: 12px 16px; border-left: 4px solid var(--ruler); background: var(--card); border-radius: 0 10px 10px 0; }
.md code { font-family: var(--f-num); background: var(--chip); padding: 1px 5px; border-radius: 4px; }
.post-cta { background: var(--mat); color: var(--mat-ink); border-radius: 16px; padding: 22px; display: grid; gap: 10px; }
.post-cta h2 { font-size: 1.4rem; }
.post-cta p { margin: 0; opacity: .92; }

/* ==== Contact ==== */
.contact-grid { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, .8fr); gap: 28px; align-items: start; }
@media (max-width: 860px) { .contact-grid { grid-template-columns: minmax(0, 1fr); } }
.formcard { background: var(--card); border: 1px solid var(--line); border-radius: 16px; padding: clamp(18px, 3vw, 26px); display: grid; gap: 16px; }
.formcard textarea { width: 100%; font: 400 1.08rem var(--f-body); color: var(--ink); background: var(--paper); border: 1.5px solid var(--line); border-radius: 8px; padding: 11px 12px; resize: vertical; min-height: 150px; }
.formcard input[type="text"], .formcard input[type="email"], .formcard select { font-family: var(--f-body); }
.field .count { font: 600 .85rem var(--f-num); color: var(--muted); justify-self: end; }
.field .count.bad { color: var(--warn); }
.field.has-error input, .field.has-error textarea, .field.has-error select { border-color: var(--warn); background: var(--warn-bg); }
.errorlist { list-style: none; margin: 0; padding: 0; color: var(--warn); font-weight: 700; font-size: .95rem; }
.side-card { background: var(--card); border: 1px solid var(--line); border-radius: 16px; padding: 20px; display: grid; gap: 12px; }
.side-card h2 { font-size: 1.25rem; }
.side-card p { margin: 0; color: var(--muted); }
.success { background: var(--card); border: 2px solid var(--accent); border-radius: 16px; padding: 28px; display: grid; gap: 10px; justify-items: start; animation: pop .5s ease both; }
.success .medal { width: 56px; height: 56px; font-size: 1.6rem; }

.calc-notes { padding-block: 10px 30px; display: grid; gap: 12px; color: var(--muted); font-size: .98rem; }
.calc-notes p { margin: 0; max-width: 75ch; }
.calc-more { margin-top: 18px; background: var(--card); color: var(--ink); border: 1px solid var(--line); border-radius: 16px; padding: 20px; display: flex; flex-wrap: wrap; gap: 14px; align-items: center; justify-content: space-between; }
.calc-more h2 { font-size: 1.35rem; }
.calc-more p { color: var(--muted); }

.err-page { text-align: center; justify-items: center; padding-block: 70px; }
.err-page svg { width: 180px; height: 180px; }
.row2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
@media (max-width: 520px) { .row2 { grid-template-columns: minmax(0, 1fr); } }
.notice { background: var(--chip); border-radius: 12px; padding: 12px 14px; margin: 0; }
.warn-box { background: var(--warn-bg); color: var(--ink); border-radius: 10px; padding: 10px 14px; font-weight: 700; }
.warn-box ul { margin: 0; padding: 0; list-style: none; }
@media (prefers-reduced-motion: reduce) { .art-why span, .art-strip b, .art-stash span { opacity: 1 !important; animation: none !important; transform: none !important; } }
.article > *, .md, .contact-grid > *, .p-hero > *, .demo > *, .play > * { min-width: 0; }
@media (max-width: 600px) { .compare-t { min-width: 0; font-size: .9rem; } .compare-t th, .compare-t td { padding: 10px 8px; } }
.art-why { width: auto; max-width: calc(100% - 24px); font-size: .8rem; }

/* ---- share buttons ---- */
.share { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.share-label { font: 700 .78rem var(--f-num); letter-spacing: .12em; text-transform: uppercase; color: var(--muted); margin-right: 2px; }
.sh { display: inline-flex; align-items: center; gap: 7px; min-height: 40px; padding: 7px 13px; border-radius: 999px; border: 1.5px solid var(--line); background: var(--card); color: var(--ink); font: 700 .92rem var(--f-body); text-decoration: none; cursor: pointer; transition: transform .15s, border-color .15s, background .15s; }
.sh svg { width: 19px; height: 19px; flex: none; }
.sh:hover { transform: translateY(-1px); border-color: currentColor; }
.sh-wa { background: #25d366; border-color: #25d366; color: #06301a; }
.sh-wa:hover { border-color: #1aa851; background: #2ee070; }
.sh-pin { color: #bd081c; }
.sh-fb { color: #1877f2; }
.sh-native { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.sh.done { border-color: var(--accent); }
@media (max-width: 520px) { .sh span { font-size: .88rem; } .sh { padding: 7px 11px; } }

/* ---- pattern page: sizes and bundles ---- */
.bundle-note { margin: 0; padding: 12px 14px; border-radius: 12px; background: #e6f0ea; color: #173f35; font-size: .97rem; }
.resize { background: var(--card); border: 1px solid var(--line); border-radius: 18px; padding: clamp(18px, 3vw, 28px); display: grid; gap: 16px; margin-top: 8px; }
.resize-head h2 { font-size: 1.5rem; font-weight: 800; }
.resize-head p { margin: 4px 0 0; color: var(--muted); }
.size-chips { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 8px; }
.size-chip { display: grid; gap: 2px; padding: 10px 12px; border-radius: 12px; border: 1.5px solid var(--line); text-decoration: none; color: var(--ink); background: var(--paper); transition: transform .15s, border-color .15s; }
.size-chip b { font-size: 1rem; }
.size-chip span { font: 600 .82rem var(--f-num); color: var(--muted); }
.size-chip:hover { transform: translateY(-2px); border-color: var(--accent); }
.size-chip.on { border-color: var(--accent); background: var(--accent); color: var(--accent-ink); }
.size-chip.on span { color: inherit; opacity: .85; }
.resize-forms { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr)); gap: 14px; }
.resize-form { display: grid; gap: 12px; align-content: start; padding: 16px; border-radius: 14px; background: var(--paper); min-width: 0; }
.resize-form h3 { font-size: 1.08rem; font-weight: 800; }
.row3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.row3 label, .finder-form label { display: grid; gap: 4px; font-weight: 700; font-size: .9rem; min-width: 0; }
.row3 input, .row3 select, .finder-form input, .finder-form select { width: 100%; min-height: 44px; padding: 8px 10px; border-radius: 8px; border: 1.5px solid var(--line); background: var(--card); color: var(--ink); font: 600 1rem var(--f-body); }
.resize-form .btn { justify-self: start; }

/* ---- finder ---- */
.finder-form { display: grid; grid-template-columns: 110px minmax(150px, 1.2fr) minmax(140px, 1fr) minmax(150px, 1fr) auto; gap: 12px; align-items: end; background: var(--card); border: 1px solid var(--line); border-radius: 18px; padding: 18px; }
.preset-row { margin: 0; color: var(--muted); font-size: .95rem; }
.preset-row a { font-weight: 700; color: var(--accent); }
.preset-row a[aria-current] { color: var(--ink); text-decoration: none; }
.finder-sum h2 { font-size: clamp(1.4rem, 3.4vw, 2rem); font-weight: 800; }
.finder-sum .hint { margin-top: 6px; max-width: 70ch; }
.fcards { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 330px), 1fr)); gap: 16px; }
.fcard { background: var(--card); border: 1px solid var(--line); border-radius: 18px; overflow: hidden; display: grid; grid-template-rows: auto 1fr; min-width: 0; }
.fcard .pic { display: grid; place-items: center; background: var(--paper); padding: 18px; aspect-ratio: 4 / 3; }
.fcard .pic svg { width: 100%; height: 100%; filter: drop-shadow(0 8px 12px rgba(0, 0, 0, .18)); transition: transform .5s cubic-bezier(.2, .8, .2, 1); }
.fcard:hover .pic svg { transform: scale(1.04) rotate(-1deg); }
.fbody { padding: 16px; display: grid; gap: 10px; align-content: start; }
.fbody h3 { font-size: 1.2rem; font-weight: 800; }
.fbody h3 a { color: inherit; text-decoration: none; }
.fshare { margin: 0; font-size: .93rem; color: var(--muted); }
.fbuy { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; font-size: .93rem; }
.fbuy li { display: grid; grid-template-columns: 18px 1fr auto; gap: 8px; align-items: center; }
.fbuy .sw { width: 16px; height: 16px; border-radius: 4px; border: 1px solid rgba(0, 0, 0, .15); }
.fbuy b { font-family: var(--f-num); }
.fbody .actions form { display: contents; }
.misses { background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 12px 16px; }
.misses summary { cursor: pointer; font-weight: 700; }
.misses ul { margin: 10px 0 0; padding-left: 1.2em; display: grid; gap: 4px; color: var(--muted); }
.finder-how { display: grid; gap: 10px; max-width: 75ch; }
.finder-how h2 { font-size: 1.5rem; font-weight: 800; }
.finder-how ol { margin: 0; padding-left: 1.3em; display: grid; gap: 8px; }
@media (max-width: 860px) {
  .finder-form { grid-template-columns: 1fr 1fr; }
  .finder-form .ff-n { grid-column: 1; } .finder-form .ff-kind { grid-column: 2; }
  .finder-form .btn { grid-column: 1 / -1; }
}
@media (max-width: 420px) { .row3 { grid-template-columns: 1fr 1fr; } .row3 label:last-child { grid-column: 1 / -1; } }

/* ---- share dialog (studio) ---- */
.share-dlg { width: min(860px, calc(100vw - 24px)); max-height: calc(100dvh - 24px); border: 0; border-radius: 20px; padding: 0; background: var(--card); color: var(--ink); box-shadow: 0 30px 80px -20px rgba(0, 0, 0, .55); overflow: auto; }
.share-dlg::backdrop { background: rgba(10, 22, 18, .55); backdrop-filter: blur(3px); }
.share-dlg[open] { animation: dlg-in .28s cubic-bezier(.2, .8, .2, 1); }
@keyframes dlg-in { from { opacity: 0; transform: translateY(14px) scale(.98); } }
.share-dlg h2 { font-size: 1.45rem; font-weight: 800; padding: 22px 56px 4px 24px; }
.sd-x { position: absolute; right: 12px; top: 12px; margin: 0; }
.sd-x button { width: 40px; height: 40px; border-radius: 50%; border: 0; background: var(--chip); color: var(--ink); font-size: 1.5rem; line-height: 1; cursor: pointer; }
.share-dlg { position: fixed; }
.sd-body { display: grid; grid-template-columns: minmax(0, 300px) minmax(0, 1fr); gap: 22px; padding: 14px 24px 24px; align-items: start; }
.sd-pic { position: relative; border-radius: 14px; overflow: hidden; background: var(--paper); aspect-ratio: 4 / 5; }
.sd-pic img { width: 100%; height: 100%; object-fit: cover; display: block; transition: opacity .3s; }
.sd-wait { position: absolute; inset: 0; display: grid; place-items: center; color: var(--muted); font-weight: 700; font-size: .95rem; padding: 12px; text-align: center; }
.sd-side { display: grid; gap: 12px; align-content: start; min-width: 0; }
.sd-note { margin: 0; color: var(--muted); font-size: .93rem; }
.sd-wa, .sd-photo { display: flex; align-items: center; gap: 14px; padding: 14px 16px; border-radius: 14px; text-decoration: none; border: 0; cursor: pointer; text-align: left; font: inherit; transition: transform .15s, box-shadow .15s; }
.sd-wa { background: #25d366; color: #06301a; box-shadow: 0 10px 22px -14px #128c4b; }
.sd-photo { background: var(--accent); color: var(--accent-ink); }
.sd-wa:hover, .sd-photo:hover { transform: translateY(-2px); }
.sd-wa svg, .sd-photo svg { width: 32px; height: 32px; flex: none; }
.sd-wa b, .sd-photo b { display: block; font-size: 1.08rem; }
.sd-wa small, .sd-photo small { display: block; opacity: .85; font-size: .88rem; }
.sd-more { margin: 4px 0 0; display: flex; flex-wrap: wrap; gap: 6px 18px; font-size: .93rem; }
.sd-more a, .sd-more button { color: var(--accent); font-weight: 700; background: none; border: 0; padding: 0; font: inherit; font-weight: 700; cursor: pointer; text-decoration: underline; text-underline-offset: 3px; }
.sd-more button { color: var(--warn); }
@media (max-width: 640px) {
  .sd-body { grid-template-columns: 1fr; }
  .sd-pic { max-width: 240px; justify-self: center; width: 100%; }
}
.toast-share { display: inline-block; margin-top: 8px; padding: 6px 12px; border-radius: 999px; background: #25d366; color: #06301a; font-weight: 700; font-size: .88rem; text-decoration: none; }
.toast { pointer-events: auto; }
.linkish { background: none; border: 0; padding: 0; color: var(--accent); font: 700 .92rem var(--f-body); text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
.wa-btn { background: #25d366; border-color: #25d366; color: #06301a; }
.finish-card { display: grid; grid-template-columns: 150px 1fr; gap: 20px; align-items: center; background: linear-gradient(120deg, #fdf3cf, #e6f0ea); color: #16231e; border-radius: 20px; padding: 20px; border: 2px solid var(--ruler); }
.finish-card .thumb { display: block; background: #fff; border-radius: 12px; padding: 10px; }
.finish-card .thumb svg { width: 100%; height: auto; display: block; }
.finish-card h2 { font-size: 1.6rem; font-weight: 800; }
.finish-card p { margin: 6px 0 14px; }
.finish-card .eyebrow { color: #1f5b4c; }
@media (max-width: 560px) { .finish-card { grid-template-columns: 1fr; } .finish-card .thumb { max-width: 180px; } }

/* ---- public share pages ---- */
.shared-grid { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: clamp(20px, 4vw, 48px); align-items: start; }
.shared-pic { position: relative; margin: 0; background: var(--card); border: 1px solid var(--line); border-radius: 20px; padding: clamp(14px, 3vw, 28px); box-shadow: 0 30px 60px -40px rgba(0, 0, 0, .5); }
.shared-pic img { width: 100%; height: auto; display: block; border-radius: 4px; }
.shared-pic .ribbon { position: absolute; top: 18px; left: -8px; background: var(--ruler); color: var(--ruler-ink); font: 800 1rem var(--f-display); padding: 8px 16px; border-radius: 4px 10px 10px 4px; box-shadow: 0 8px 16px -10px rgba(0, 0, 0, .6); transform: rotate(-3deg); }
.shared-info { display: grid; gap: 16px; align-content: start; min-width: 0; }
.shared-info h1 { font-size: clamp(2rem, 5vw, 3rem); font-weight: 800; line-height: 1.05; }
.small-h { font-size: .8rem; font: 700 .8rem var(--f-num); letter-spacing: .12em; text-transform: uppercase; color: var(--muted); margin-bottom: 8px; }
.fab-list { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.fab-list li { display: flex; align-items: center; gap: 8px; padding: 6px 12px 6px 6px; border-radius: 999px; background: var(--card); border: 1px solid var(--line); font-weight: 700; font-size: .92rem; }
.fab-list .sw { width: 22px; height: 22px; border-radius: 50%; border: 1px solid rgba(0, 0, 0, .15); }
.mini-badges { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.mini-badges li { display: flex; gap: 12px; align-items: center; }
.mini-badges .disc { width: 52px; height: 52px; border-radius: 50%; background: var(--ruler); padding: 9px; flex: none; display: grid; box-shadow: inset 0 0 0 3px var(--card); }
.mini-badges .disc svg { width: 100%; height: 100%; }
.mini-badges small { display: block; color: var(--muted); }
.chip-s.stage-finished { background: var(--ruler); color: var(--ruler-ink); }
.badge-hero { display: grid; justify-items: center; text-align: center; gap: 14px; padding: 20px 0 30px; }
.badge-hero h1 { font-size: clamp(2.4rem, 7vw, 4rem); font-weight: 800; }
.badge-hero .lede-dark { margin: 0; max-width: 46ch; color: var(--muted); font-size: 1.2rem; }
.badge.big { width: auto; }
.badge.big .disc { width: 190px; height: 190px; padding: 30px; box-shadow: inset 0 0 0 8px var(--card), 0 0 0 6px var(--ruler), 0 24px 40px -20px rgba(0, 0, 0, .6); animation: badge-pop .9s cubic-bezier(.2, 1.4, .3, 1) both; }
@keyframes badge-pop { from { transform: scale(.4) rotate(-20deg); opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .badge.big .disc, .share-dlg[open] { animation: none; } }
.badge-hero .share { justify-content: center; }
@media (max-width: 760px) { .shared-grid { grid-template-columns: 1fr; } }
.cta-band .btn.ghost { background: transparent; color: var(--ruler-ink); border-color: var(--ruler-ink); }

/* ---- block of the month ---- */
.bom-hero { display: grid; grid-template-columns: minmax(0, 360px) minmax(0, 1fr); gap: clamp(20px, 4vw, 48px); align-items: center; }
.bom-block { background: var(--card); border: 1px solid var(--line); border-radius: 24px; padding: 34px; aspect-ratio: 1; display: grid; box-shadow: 0 30px 60px -40px rgba(0, 0, 0, .5); }
.bom-block svg { width: 100%; height: 100%; animation: bom-spin 1.2s cubic-bezier(.2, .9, .2, 1) both; }
@keyframes bom-spin { from { transform: rotate(-90deg) scale(.6); opacity: 0; } }
.bom-info { display: grid; gap: 14px; }
.bom-info h1 { font-size: clamp(2.2rem, 6vw, 3.4rem); font-weight: 800; line-height: 1.02; }
.lede-dark { margin: 0; color: var(--muted); font-size: 1.15rem; max-width: 52ch; }
.bom-chart h2, .bom-quilt h2, .bom-join h2 { font-size: 1.5rem; font-weight: 800; }
.bom-sizes { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 250px), 1fr)); gap: 14px; margin-top: 12px; }
.bom-size { background: var(--card); border: 1px solid var(--line); border-radius: 16px; padding: 16px 18px; min-width: 0; }
.bom-size h3 { font-size: 1.2rem; font-weight: 800; margin-bottom: 6px; }
.bom-size p { margin: 10px 0 2px; display: flex; gap: 8px; align-items: center; }
.bom-size .sw { width: 16px; height: 16px; border-radius: 4px; border: 1px solid rgba(0, 0, 0, .15); flex: none; }
.bom-size ul { margin: 0; padding-left: 1.2em; font-size: .95rem; }
.bom-body { max-width: 72ch; }
.bom-quilt { display: grid; grid-template-columns: minmax(0, 280px) minmax(0, 1fr); gap: 24px; align-items: center; background: var(--card); border: 1px solid var(--line); border-radius: 20px; padding: clamp(16px, 3vw, 28px); }
.bom-quilt .pic svg { width: 100%; height: auto; display: block; filter: drop-shadow(0 10px 14px rgba(0, 0, 0, .2)); }
.bom-quilt p { color: var(--muted); }
.bom-join { background: var(--mat); color: var(--mat-ink); border-radius: 20px; padding: clamp(20px, 4vw, 34px); display: grid; gap: 14px; }
.bom-join p { margin: 6px 0 0; opacity: .9; max-width: 56ch; }
.bom-form { display: flex; flex-wrap: wrap; gap: 10px; }
.bom-form input[type=email] { flex: 1 1 240px; min-height: 48px; border-radius: 8px; border: 0; padding: 10px 14px; font: 600 1rem var(--f-body); }
.bom-join .ok-note { margin: 0; font-weight: 700; color: var(--ruler); }
.bom-archive { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; }
.bom-archive a { display: grid; gap: 4px; background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 12px; text-decoration: none; color: inherit; }
.bom-archive svg { width: 100%; aspect-ratio: 1; }
.bom-archive span { color: var(--muted); font-size: .88rem; }
.hp { position: absolute !important; left: -9999px !important; width: 1px; height: 1px; overflow: hidden; }
@media (max-width: 760px) { .bom-hero, .bom-quilt { grid-template-columns: 1fr; } .bom-block { max-width: 300px; } }
@media (prefers-reduced-motion: reduce) { .bom-block svg { animation: none; } }

/* ---- blog: quick answer, embeds, FAQ ---- */
.md > blockquote:first-child { border-left: 0; border-radius: 14px; background: #e6f0ea; color: #173f35; padding: 16px 20px; font-size: 1.08rem; }
.md > blockquote:first-child p:first-child strong:first-child { display: block; font: 700 .78rem var(--f-num); letter-spacing: .12em; text-transform: uppercase; color: #1f5b4c; margin-bottom: 4px; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .md > blockquote:first-child { background: #183229; color: var(--ink); } }
.md td:last-child { white-space: normal; }

.embed { margin: 1.4em 0; display: grid; gap: 8px; }
.embed figcaption { font-size: .92rem; color: var(--muted); line-height: 1.5; }
.embed-pattern .embed-art { display: block; background: var(--card); border: 1px solid var(--line); border-radius: 16px; padding: 22px; }
.embed-pattern svg { width: 100%; max-height: 460px; display: block; filter: drop-shadow(0 10px 14px rgba(0, 0, 0, .18)); }
.embed-gray .pair { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.embed-gray .pair > div { background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 14px; display: grid; gap: 6px; justify-items: center; }
.embed-gray svg { width: 100%; height: auto; }
.embed-gray .gray svg { filter: grayscale(1); }
.embed-gray span { font: 700 .78rem var(--f-num); letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.embed-diagram { background: var(--card); border: 1px solid var(--line); border-radius: 16px; padding: 16px; color: var(--ink); }
.embed-diagram svg.dg { width: 100%; height: auto; display: block; }
.mini-fits { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.mini-fit { display: grid; gap: 4px; background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 10px; text-decoration: none; color: inherit; font-size: .9rem; line-height: 1.35; transition: transform .15s; }
.mini-fit:hover { transform: translateY(-2px); }
.mini-fit svg { width: 100%; aspect-ratio: 1; }
.mini-fit span { color: var(--muted); font-size: .84rem; }
.md .mini-fit b { color: var(--ink); }
.embed-more { margin: 4px 0 0; font-size: 1rem; }
.table-wrap { overflow-x: auto; }
.embed-sizes table { display: table; }
.calc-embed { margin: 1.6em 0; border: 2px solid var(--accent); border-radius: 18px; overflow: hidden; background: var(--paper); font-size: 1rem; line-height: 1.5; }
.calc-embed-head { margin: 0; display: flex; flex-wrap: wrap; gap: 6px 12px; align-items: baseline; padding: 14px 18px; background: var(--card); border-bottom: 1px solid var(--line); }
.calc-embed-head b { font-size: 1.1rem; }
.calc-embed-head a { margin-left: auto; font-size: .92rem; }
.calc-embed .embedded .tabs { display: none; }
.calc-embed .embedded .wrap { padding-inline: 16px; max-width: none; }
.calc-embed .embedded .bar { padding-top: 12px; }
.calc-embed .tool-head h2 { font-size: 1.25rem; margin-top: 0; }
.calc-embed .tool { padding-bottom: 18px; }
.md h2#frequently-asked-questions ~ h3 { font-size: 1.12rem; margin-top: 1.2em; }
.article .share { margin-top: 6px; }

/* ---- studio feedback ---- */
.fb-pill { position: fixed; left: 16px; bottom: calc(16px + env(safe-area-inset-bottom, 0px)); z-index: 70; display: inline-flex; align-items: center; gap: 8px; padding: 9px 14px 9px 12px; border-radius: 999px; border: 1.5px solid var(--line); background: var(--card); color: var(--ink); font: 700 .92rem var(--f-body); cursor: pointer; box-shadow: 0 10px 24px -14px rgba(0, 0, 0, .55); transition: transform .15s, box-shadow .15s; }
.fb-pill:hover { transform: translateY(-2px); box-shadow: 0 14px 28px -14px rgba(0, 0, 0, .6); }
.fb-pill svg { width: 18px; height: 18px; flex: none; }
.fb-dlg { position: fixed; width: min(520px, calc(100vw - 24px)); max-height: calc(100dvh - 24px); border: 0; border-radius: 20px; padding: 22px 24px 24px; background: var(--card); color: var(--ink); box-shadow: 0 30px 80px -20px rgba(0, 0, 0, .55); overflow: auto; }
.fb-dlg::backdrop { background: rgba(10, 22, 18, .55); backdrop-filter: blur(3px); }
.fb-dlg[open] { animation: dlg-in .28s cubic-bezier(.2, .8, .2, 1); }
.fb-dlg h2 { font-size: 1.45rem; font-weight: 800; padding-right: 44px; }
.fb-form, .fb-done { display: grid; gap: 14px; }
.fb-sub, .fb-done p { margin: 0; color: var(--muted); }
.fb-moods { border: 0; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.fb-moods label { position: relative; }
.fb-moods input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.fb-moods span { display: inline-block; padding: 9px 14px; border-radius: 999px; background: var(--chip); font-weight: 700; font-size: .95rem; border: 1.5px solid transparent; }
.fb-moods input:checked + span { background: var(--accent); color: var(--accent-ink); }
.fb-moods input:focus-visible + span { outline: 3px solid var(--focus); outline-offset: 2px; }
.fb-msg textarea { width: 100%; box-sizing: border-box; min-height: 120px; border-radius: 10px; border: 1.5px solid var(--line); background: var(--paper); color: var(--ink); padding: 12px 14px; font: 1rem/1.45 var(--f-body); resize: vertical; }
.fb-err { margin: 0; color: var(--warn); font-weight: 700; }
.fb-actions { display: flex; flex-wrap: wrap; gap: 10px 14px; align-items: center; }
.fb-actions span { color: var(--muted); font-size: .9rem; overflow-wrap: anywhere; }
.fb-done .btn { justify-self: start; }
@media (prefers-reduced-motion: reduce) { .fb-dlg[open] { animation: none; } }
@media print { .fb-pill { display: none; } }
body:has(.fb-pill) main { padding-bottom: 72px; }

/* Links to a spot on the page (#join, blog headings) land below the sticky header, not under it. */
html { scroll-padding-top: 84px; }
@media (prefers-reduced-motion: no-preference) { html { scroll-behavior: smooth; } }
