:root {
  --ink: #16181d; --muted: #5d6470; --line: #e3e6eb; --bg: #f7f8fa; --card: #fff;
  --accent: #1f4fd8; --accent-ink: #fff; --ok: #0f7a4a; --ok-bg: #e4f5ec; --warn: #8a5a00; --warn-bg: #fdf1d3;
  --danger: #b3261e; --radius: 10px;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font: 16px/1.55 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; color: var(--ink); background: var(--bg); }
a { color: var(--accent); }
h1 { font-size: 1.9rem; line-height: 1.2; margin: 0 0 .6em; }
h2 { font-size: 1.25rem; margin: 0 0 .5em; }
h3 { font-size: 1.05rem; margin: 0 0 .3em; }
p { margin: 0 0 1em; }
.wrap { max-width: 760px; margin: 0 auto; padding: 0 20px; }
main.wrap { padding-top: 32px; padding-bottom: 64px; min-height: 70vh; }
main.wide { max-width: 1120px; }
.muted { color: var(--muted); }
.small { font-size: .875rem; }
.mt { margin-top: 20px; }
[hidden] { display: none !important; }

.top { background: var(--card); border-bottom: 1px solid var(--line); }
.top .wrap { max-width: 1120px; }
.top-in { display: flex; align-items: center; justify-content: space-between; height: 58px; }
.logo { font-weight: 700; color: var(--ink); text-decoration: none; }
.top nav { display: flex; align-items: center; gap: 18px; font-size: .95rem; }
.top nav a { text-decoration: none; }
.top nav form { margin: 0; }
.foot { border-top: 1px solid var(--line); padding: 20px 0; font-size: .875rem; color: var(--muted); }
.foot .wrap { max-width: 1120px; display: flex; gap: 18px; flex-wrap: wrap; }
.foot a { color: var(--muted); }

.btn { display: inline-block; background: var(--accent); color: var(--accent-ink); border: 1px solid var(--accent);
  border-radius: 8px; padding: 9px 16px; font: inherit; font-weight: 600; text-decoration: none; cursor: pointer; text-align: center; }
.btn:hover { filter: brightness(1.08); }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn.small { padding: 5px 11px; font-size: .875rem; }
.btn.big { padding: 12px 22px; font-size: 1.05rem; }
.btn.block { display: block; width: 100%; }
.btn.ghost { background: transparent; color: var(--ink); border-color: var(--line); }
.link { background: none; border: 0; padding: 0; font: inherit; color: var(--accent); cursor: pointer; text-decoration: underline; }
.danger { color: var(--danger); }
:focus-visible { outline: 3px solid color-mix(in srgb, var(--accent) 45%, transparent); outline-offset: 2px; }

.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; margin-bottom: 18px; }
.pill { display: inline-block; font-size: .75rem; font-weight: 600; padding: 2px 9px; border-radius: 99px; background: #eceef2; color: var(--muted); white-space: nowrap; }
.pill.ok { background: var(--ok-bg); color: var(--ok); }
.pill.warn { background: var(--warn-bg); color: var(--warn); }
.flash { padding: 10px 14px; border-radius: 8px; background: #fde8e6; color: var(--danger); }
.flash.ok { background: var(--ok-bg); color: var(--ok); }
.row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.row.between { justify-content: space-between; }

label { display: block; font-weight: 600; font-size: .92rem; }
input[type=text], input[type=email], input[type=password], textarea {
  display: block; width: 100%; margin-top: 5px; padding: 9px 11px; font: inherit; color: var(--ink);
  background: #fff; border: 1px solid #c9ced6; border-radius: 8px; }
input[type=color] { display: block; margin-top: 5px; width: 64px; height: 38px; padding: 2px; border: 1px solid #c9ced6; border-radius: 8px; background: #fff; }
input[type=file] { display: block; margin-top: 6px; font: inherit; }
.hint { display: block; font-weight: 400; font-size: .82rem; color: var(--muted); margin-top: 4px; }
.stack > * + * { margin-top: 14px; }
.check { display: flex; gap: 9px; align-items: flex-start; font-weight: 400; }
.check input { margin-top: 5px; }
.narrow { max-width: 420px; margin: 24px auto; }
.logo-preview { display: block; max-height: 56px; max-width: 220px; margin: 8px 0; }

/* landing */
.hero { padding: 48px 0 40px; max-width: 800px; }
.hero h1 { font-size: clamp(2rem, 5vw, 3rem); letter-spacing: -.02em; }
.hero.end { text-align: center; margin: 0 auto; }
.eyebrow { font-weight: 700; color: var(--accent); font-size: .9rem; text-transform: uppercase; letter-spacing: .06em; margin-bottom: .6em; }
.lede { font-size: 1.2rem; color: #2e333c; }
.cta-row { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; margin-top: 1.4em; }
.hero.end .cta-row { justify-content: center; }
.grid3 { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 18px; margin: 16px 0 48px; }
.grid3 .card { margin: 0; }
.n { display: inline-grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; background: var(--accent); color: #fff; font-weight: 700; margin-bottom: 10px; }
.split { display: grid; grid-template-columns: 1.3fr 1fr; gap: 40px; align-items: start; margin-bottom: 48px; }
@media (max-width: 800px) { .split { grid-template-columns: 1fr; } }
.ticks { list-style: none; padding: 0; margin: 0 0 1.2em; }
.ticks li { padding-left: 26px; position: relative; margin-bottom: .5em; }
.ticks li::before { content: "✓"; position: absolute; left: 0; color: var(--ok); font-weight: 700; }
.price .amount { font-size: 2.6rem; font-weight: 800; margin: 0 0 .3em; }
.price .amount span { font-size: 1rem; font-weight: 500; color: var(--muted); }
.price .small { margin: 12px 0 0; }
.faq { max-width: 760px; margin-bottom: 40px; }
.faq details { border-bottom: 1px solid var(--line); padding: 14px 0; }
.faq summary { font-weight: 600; cursor: pointer; }
.faq details p { margin: .6em 0 0; color: #2e333c; }
.prose h2 { margin-top: 1.6em; }
.prose li { margin-bottom: .5em; }

/* dashboard */
.onboarding ol { margin: 0; padding-left: 22px; }
.onboarding li { margin-bottom: .4em; }
.manuals { list-style: none; padding: 0; margin: 0; }
.manuals li { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; background: var(--card);
  border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 18px; margin-bottom: 10px; }
.m-title { font-weight: 600; text-decoration: none; flex: 1 1 240px; }

/* editor */
.editor { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 28px; align-items: start; }
@media (max-width: 900px) { .editor { grid-template-columns: 1fr; } }
.editor-side { position: sticky; top: 16px; }
@media (max-width: 900px) { .editor-side { position: static; } }
.crumbs { font-size: .9rem; display: flex; justify-content: space-between; }
.crumbs a { text-decoration: none; }
.title-input { font-size: 1.6rem !important; font-weight: 700; border-color: transparent !important; background: transparent !important; padding-left: 0 !important; }
.intro-input { border-color: transparent !important; background: transparent !important; padding-left: 0 !important; resize: vertical; margin-bottom: 16px; }
.title-input:hover, .title-input:focus, .intro-input:hover, .intro-input:focus { border-color: #c9ced6 !important; background: #fff !important; padding-left: 11px !important; }
.steps { list-style: none; padding: 0; margin: 0; counter-reset: step; }
.step { counter-increment: step; }
.step-head { display: flex; gap: 12px; align-items: flex-start; }
.step .num { flex: none; width: 30px; height: 30px; border-radius: 50%; background: var(--ink); color: #fff; display: grid; place-items: center; font-weight: 700; font-size: .9rem; margin-top: 6px; }
.step .num::before { content: counter(step); }
.step-text { margin-top: 0 !important; resize: none; overflow: hidden; font-weight: 600 !important; }
.step-actions { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin: 10px 0 12px 42px; }
.step-actions .link { margin-left: auto; font-size: .875rem; }
.shot { container-type: inline-size; position: relative; margin: 0; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; line-height: 0; background: #eef0f3; }
.shot img { width: 100%; height: auto; display: block; }
.marker { position: absolute; width: clamp(14px, 4.4cqw, 36px); aspect-ratio: 1; transform: translate(-50%, -50%); border-radius: 50%;
  border: 3px solid #ff3b30; background: rgba(255, 59, 48, .10); box-shadow: 0 0 0 2px rgba(255,255,255,.85); pointer-events: none; }
.panel h2 { font-size: 1.05rem; }
.panel details { margin: 12px 0; }
.panel summary { cursor: pointer; font-size: .9rem; margin-bottom: 10px; }
.panel form { margin: 0; }

dialog#blur-dialog { border: 0; border-radius: 12px; padding: 0; width: min(1100px, 96vw); max-height: 96vh; }
dialog::backdrop { background: rgba(10, 12, 16, .6); }
.blur-box { padding: 20px; }
.canvas-wrap { max-height: 64vh; overflow: auto; border: 1px solid var(--line); border-radius: 8px; margin-bottom: 14px; line-height: 0; background: #eef0f3; }
#blur-canvas { width: 100%; height: auto; cursor: crosshair; touch-action: none; display: block; }

#connect-status[data-state=waiting] .when-done, #connect-status[data-state=done] .when-waiting { display: none; }

.btn.danger-btn { background: var(--danger); border-color: var(--danger); }
summary.danger { cursor: pointer; }

.hero-shot { display: block; max-width: 980px; margin: 0 0 48px; border: 1px solid var(--line); border-radius: 12px; overflow: hidden;
  background: #fff; box-shadow: 0 12px 40px rgba(20, 24, 32, .12); text-decoration: none; color: var(--ink); position: relative; }
.hero-shot .bar { display: flex; align-items: center; gap: 6px; padding: 9px 12px; background: #eef0f3; border-bottom: 1px solid var(--line); }
.hero-shot .bar i { width: 10px; height: 10px; border-radius: 50%; background: #c9ced6; }
.hero-shot .bar b { font-weight: 500; font-size: .78rem; color: var(--muted); margin-left: 10px; }
.hero-shot img { display: block; width: 100%; height: auto; }
.hero-shot .see { position: absolute; right: 16px; bottom: 16px; background: var(--accent); color: #fff; font-weight: 600; padding: 8px 14px; border-radius: 8px; }
.hero-shot:hover .see { filter: brightness(1.1); }
