@font-face {
  font-family: "Bricolage";
  src: url("/fonts/bricolage-latin-wght.woff2") format("woff2-variations"), url("/fonts/bricolage-latin-wght.woff2") format("woff2");
  font-weight: 200 800; font-display: swap;
}
:root {
  --ink: #14213d;
  --muted: #535d72;
  --paper: #f5f6f8;
  --white: #ffffff;
  --cobalt: #2643e9;
  --cobalt-deep: #1a30b8;
  --ant: #ffc21a;
  --check: #e3e6ec;
  --line: #d5d9e1;
  --radius-lg: 22px;
  --radius-sm: 10px;
  --display: "Bricolage", "Avenir Next", "Segoe UI", system-ui, sans-serif;
  --body: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --step-0: clamp(1rem, .96rem + .2vw, 1.0625rem);
  --step-1: clamp(1.2rem, 1.1rem + .5vw, 1.4rem);
  --step-2: clamp(1.5rem, 1.3rem + 1vw, 2rem);
  --step-3: clamp(2.2rem, 1.6rem + 3vw, 3.9rem);
  color-scheme: light;
}
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font: 400 var(--step-0)/1.6 var(--body); color: var(--ink); background: var(--paper); }
img, canvas { max-width: 100%; }
a { color: var(--cobalt); text-underline-offset: .18em; }
a:hover { color: var(--cobalt-deep); }
:focus-visible { outline: 3px solid var(--cobalt); outline-offset: 3px; border-radius: 6px; }
.sr-only { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: 1rem; top: -4rem; background: var(--ink); color: #fff; padding: .6rem 1rem; border-radius: var(--radius-sm); z-index: 10; }
.skip:focus { top: 1rem; }
.wrap { width: min(1160px, 100% - 2.5rem); margin-inline: auto; }

/* header */
.top { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding-block: 1.1rem; }
.brand { display: inline-flex; align-items: center; gap: .55rem; font: 700 1.15rem/1 var(--display); color: var(--ink); text-decoration: none; letter-spacing: -.01em; }
.brand svg { width: 28px; height: 28px; }
.top nav { display: flex; gap: 1.25rem; flex-wrap: wrap; }
.top nav a { color: var(--ink); text-decoration: none; font-weight: 500; }
.top nav a:hover, .top nav a[aria-current] { text-decoration: underline; }

/* hero */
.hero { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: clamp(1.5rem, 4vw, 3.5rem); align-items: center; padding-block: clamp(1.5rem, 4vw, 3.5rem) clamp(2.5rem, 6vw, 5rem); }
.hero h1 { font: 760 var(--step-3)/1.02 var(--display); letter-spacing: -.035em; margin: 0 0 1.1rem; max-width: 15ch; font-variation-settings: "wdth" 90; }
.hero .lede { font-size: var(--step-1); line-height: 1.45; color: var(--muted); max-width: 34ch; margin: 0 0 1.5rem; }
.facts { list-style: none; margin: 0; padding: 0; display: grid; gap: .55rem; }
.facts li { display: flex; gap: .6rem; align-items: baseline; }
.facts li::before { content: ""; flex: none; width: 1.1rem; height: 3px; background: repeating-linear-gradient(90deg, var(--ink) 0 5px, var(--ant) 5px 9px); transform: translateY(-.25rem); }

/* the tool */
.tool { position: relative; }
.stage {
  position: relative; border-radius: var(--radius-lg); min-height: clamp(300px, 46vw, 470px);
  background-color: #fff;
  background-image: linear-gradient(45deg, var(--check) 25%, transparent 25%), linear-gradient(-45deg, var(--check) 25%, transparent 25%), linear-gradient(45deg, transparent 75%, var(--check) 75%), linear-gradient(-45deg, transparent 75%, var(--check) 75%);
  background-size: 22px 22px; background-position: 0 0, 0 11px, 11px -11px, -11px 0;
  display: grid; place-items: center; overflow: hidden;
  box-shadow: 0 1px 0 var(--line), 0 24px 48px -28px rgba(20, 33, 61, .45);
}
/* marching ants: the selection marquee around the stage */
.ants { position: absolute; inset: 10px; pointer-events: none; width: calc(100% - 20px); height: calc(100% - 20px); overflow: visible; }
.ants rect { fill: none; stroke-width: 2.5; stroke-dasharray: 10 8; vector-effect: non-scaling-stroke; }
.ants .a1 { stroke: var(--ink); }
.ants .a2 { stroke: var(--ant); stroke-dashoffset: 9; }
@media (prefers-reduced-motion: no-preference) {
  .ants rect { animation: march 1.1s linear infinite; }
  .ants .a2 { animation-name: march2; }
  .is-over .ants rect, [data-state="working"] .ants rect { animation-duration: .45s; }
}
@keyframes march { to { stroke-dashoffset: -18; } }
@keyframes march2 { from { stroke-dashoffset: 9; } to { stroke-dashoffset: -9; } }
.is-over .stage { background-color: #fff8e1; }

.drop { position: relative; z-index: 1; text-align: center; padding: 2rem 1.5rem; display: grid; justify-items: center; gap: .6rem; border-radius: var(--radius-sm); }
.drop .hint { margin: 0; font-weight: 500; }
.drop .private { margin: .3rem 0 0; font-size: .9rem; color: var(--muted); background: rgba(255,255,255,.88); padding: .25rem .6rem; border-radius: 999px; }
kbd { font: inherit; font-size: .85em; border: 1px solid var(--line); border-bottom-width: 2px; border-radius: 5px; padding: 0 .3em; background: #fff; }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: .5rem; min-height: 44px; padding: .65rem 1.2rem; border-radius: 999px; border: 2px solid var(--ink); background: #fff; color: var(--ink); font: 600 1rem/1.1 var(--body); cursor: pointer; text-decoration: none; }
.btn:hover { background: var(--paper); color: var(--ink); }
.btn.primary { background: var(--cobalt); border-color: var(--cobalt); color: #fff; }
.btn.primary:hover { background: var(--cobalt-deep); border-color: var(--cobalt-deep); color: #fff; }
.btn.big { font-size: 1.1rem; padding: .85rem 1.6rem; }
.btn[disabled], .btn[aria-disabled="true"] { opacity: .5; cursor: not-allowed; }

#view { display: none; position: relative; z-index: 1; max-height: min(70vh, 600px); width: auto; height: auto; max-width: calc(100% - 3rem); }
.tool[data-state="done"] #view { display: block; }
.tool[data-state="done"] .drop { display: none; }
.tool[data-state="batch"] .stage { min-height: 200px; }
.working { display: none; z-index: 1; text-align: center; }
.tool[data-state="working"] .working { display: block; }
.tool[data-state="working"] .drop { display: none; }
.spinner { width: 46px; height: 46px; margin: 0 auto .8rem; border-radius: 6px; background: conic-gradient(var(--ink) 0 25%, var(--ant) 0 50%, var(--ink) 0 75%, var(--ant) 0); }
@media (prefers-reduced-motion: no-preference) { .spinner { animation: spin 1.2s steps(4) infinite; } }
@keyframes spin { to { transform: rotate(360deg); } }

.statusline { display: flex; flex-wrap: wrap; align-items: center; gap: .75rem; min-height: 2.2rem; margin: .8rem .25rem 0; color: var(--muted); font-size: .95rem; }
progress { width: 160px; height: 8px; accent-color: var(--cobalt); }

.controls { display: none; margin-top: .9rem; gap: 1rem; }
.tool[data-state="done"] .controls { display: grid; }
.swatches { border: 0; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: .55rem; align-items: center; }
.swatches legend { font-weight: 600; margin-bottom: .45rem; padding: 0; }
.sw { position: relative; }
.sw input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.sw span { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; border: 2px solid var(--line); background: var(--c, #fff); font-size: .7rem; font-weight: 700; }
.sw.t span { background: conic-gradient(var(--check) 0 25%, #fff 0 50%, var(--check) 0 75%, #fff 0) 0 0/14px 14px; }
.sw.img span { background: #fff; }
.sw input:checked + span { border-color: var(--ink); box-shadow: 0 0 0 3px var(--ant); }
.sw input:focus-visible + span { outline: 3px solid var(--cobalt); outline-offset: 3px; }
.sw.pick-color { display: inline-flex; align-items: center; gap: .35rem; }
.sw.pick-color input[type=color] { position: static; opacity: 1; width: 40px; height: 40px; border: 2px solid var(--line); border-radius: 50%; padding: 0; background: none; }
.actions { display: flex; flex-wrap: wrap; gap: .6rem; }
.tier-note { margin: 0; font-size: .92rem; color: var(--muted); }

.batch { margin-top: 1rem; background: #fff; border-radius: var(--radius-sm); padding: 1rem; border: 1px solid var(--line); }
.batch ol { list-style: none; padding: 0; margin: 0 0 1rem; display: grid; gap: .4rem; max-height: 320px; overflow: auto; }
.batch li { display: grid; grid-template-columns: 64px 1fr auto; gap: .75rem; align-items: center; }
.batch canvas { background: conic-gradient(var(--check) 0 25%, #fff 0 50%, var(--check) 0 75%, #fff 0) 0 0/10px 10px; border-radius: 6px; }
.batch .n { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.batch .s { color: var(--muted); font-size: .9rem; }

/* content */
main section { padding-block: clamp(2rem, 5vw, 4rem); }
h2 { font: 720 var(--step-2)/1.15 var(--display); letter-spacing: -.02em; margin: 0 0 1rem; }
h3 { font: 680 var(--step-1)/1.25 var(--display); margin: 1.6rem 0 .5rem; }
.prose { max-width: 68ch; }
.prose p, .prose li { color: #26324d; }
.steps { list-style: none; counter-reset: s; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.5rem; }
.steps li { counter-increment: s; padding-top: 1rem; border-top: 3px solid var(--ink); }
.steps li::before { content: counter(s); font: 760 2rem/1 var(--display); display: block; margin-bottom: .4rem; }
.steps b { display: block; font-size: 1.05rem; }
.band { background: var(--ink); color: #e9ecf3; }
.band h2 { color: #fff; }
.band p { color: #c9cfdb; max-width: 62ch; }
.band a { color: var(--ant); }
.split { display: grid; grid-template-columns: 1fr 1fr; gap: 2rem 3rem; }
.compare { width: 100%; border-collapse: collapse; margin: 1rem 0; background: #fff; border-radius: var(--radius-sm); overflow: hidden; }
.compare th, .compare td { text-align: left; padding: .7rem .9rem; border-bottom: 1px solid var(--line); vertical-align: top; }
.compare thead th { background: var(--ink); color: #fff; }
.faq details { border-bottom: 1px solid var(--line); padding: .9rem 0; max-width: 72ch; }
.faq summary { cursor: pointer; font-weight: 650; font-size: 1.05rem; }
.faq details p { margin: .6rem 0 0; color: #26324d; }

/* pro */
.pro { display: grid; grid-template-columns: 1.1fr .9fr; gap: 2rem; align-items: start; }
.plan { background: #fff; border: 2px solid var(--ink); border-radius: var(--radius-lg); padding: 1.5rem; }
.plan .price { font: 760 2.4rem/1 var(--display); margin: .2rem 0 .8rem; }
.plan ul { padding-left: 1.2rem; margin: 0 0 1.2rem; }
.license { display: flex; gap: .5rem; flex-wrap: wrap; margin-top: 1rem; }
.license label { width: 100%; font-weight: 600; }
.license input { flex: 1 1 220px; min-height: 44px; border: 2px solid var(--line); border-radius: var(--radius-sm); padding: .5rem .75rem; font: inherit; }
.license-msg { min-height: 1.5em; font-size: .92rem; margin: .5rem 0 0; }
html[data-plan="pro"] .free-only { display: none; }
html:not([data-plan="pro"]) .pro-only { display: none; }

dialog { border: 2px solid var(--ink); border-radius: var(--radius-lg); max-width: 26rem; padding: 1.5rem; }
dialog::backdrop { background: rgba(20, 33, 61, .45); }

.foot { border-top: 1px solid var(--line); padding-block: 2rem 3rem; color: var(--muted); font-size: .92rem; }
.foot nav { display: flex; gap: 1.2rem; flex-wrap: wrap; margin-bottom: .8rem; }
.foot a { color: var(--ink); }
.crumbs { font-size: .9rem; color: var(--muted); margin: .5rem 0 0; }
.crumbs a { color: var(--muted); }

@media (max-width: 860px) {
  .hero, .pro, .split { grid-template-columns: 1fr; }
  .steps { grid-template-columns: 1fr; }
  .hero h1 { max-width: 16ch; }
  .hero .facts { display: none; }
  .hero .lede { margin-bottom: .5rem; }
  .stage { min-height: 280px; }
  .top nav { gap: .9rem; font-size: .95rem; }
}
@media (max-width: 480px) {
  .wrap { width: calc(100% - 1.5rem); }
  .top nav .hide-sm { display: none; }
}
@media (pointer: coarse) { .drop .hint { display: none; } }
