/* Signoff — app interface styles. None of this is used inside exported signatures. */

:root {
  --bg: #E8ECF3;
  --bg-deep: #DCE2EC;
  --glass: rgba(255, 255, 255, .72);
  --glass-strong: rgba(255, 255, 255, .88);
  --glass-edge: rgba(255, 255, 255, .85);
  --solid: #FFFFFF;
  --ink: #111733;
  --ink-2: #3F4762;
  --ink-3: #5F6680;
  --line: rgba(17, 23, 51, .09);
  --line-2: rgba(17, 23, 51, .16);

  --brand: #2F55E8;
  --brand-600: #2447D1;
  --brand-700: #1C38A8;
  --brand-50: #ECF1FF;
  --brand-100: #D9E3FF;

  --free: #087356;
  --free-600: #06634A;
  --free-btn: #0B8A66;
  --free-50: #E3F4EC;
  --free-200: #A6DAC4;

  --pro: #7F5800;
  --pro-gold: #D4A23C;
  --pro-gold-2: #E7BE62;
  --pro-50: #FBF2DB;
  --pro-200: #EBD196;

  --danger: #B42318;
  --danger-50: #FDEDEB;
  --warn: #7A4F00;
  --warn-50: #FFF5DD;

  --r-xl: 26px;
  --r-lg: 20px;
  --r: 14px;
  --r-sm: 10px;

  --sh-1: 0 1px 2px rgba(17, 23, 51, .05), 0 10px 30px rgba(31, 52, 125, .08);
  --sh-2: 0 2px 6px rgba(17, 23, 51, .06), 0 28px 70px rgba(31, 52, 125, .16);
  --sh-focus: 0 0 0 3px rgba(47, 85, 232, .28);

  --font: ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", Inter, Roboto, "Helvetica Neue", Arial, sans-serif;
  --ease: cubic-bezier(.2, .75, .2, 1);
  --ease-spring: cubic-bezier(.3, 1.4, .5, 1);
  --topbar-h: 64px;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: calc(var(--topbar-h) + 16px); -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.5;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img { max-width: 100%; }
button, input, select { font: inherit; color: inherit; }
a { color: var(--brand-600); }
h1, h2, h3 { line-height: 1.15; letter-spacing: -.02em; margin: 0; }
p { margin: 0; }
[hidden] { display: none !important; }

.sr-only { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.skip-link { position: absolute; left: 16px; top: -60px; z-index: 100; background: var(--ink); color: #fff; padding: 10px 16px; border-radius: 10px; text-decoration: none; transition: top .2s var(--ease); }
.skip-link:focus { top: 12px; }

.ic { width: 18px; height: 18px; flex: none; display: inline-block; vertical-align: middle; }
.ic-lg { width: 28px; height: 28px; }

:focus-visible { outline: 3px solid rgba(47, 85, 232, .55); outline-offset: 2px; border-radius: 6px; }

/* ---------- backdrop: cobalt orbs behind frosted glass (from the reference) ---------- */
.so-app { position: relative; min-height: 100vh; isolation: isolate; }
.backdrop { position: absolute; inset: 0; z-index: -1; overflow: hidden; pointer-events: none; }
.orb { position: absolute; border-radius: 50%; animation: orbIn 1.4s var(--ease) both; }
.orb-a {
  width: 620px; height: 620px; top: -250px; left: 50%; margin-left: -310px;
  background: radial-gradient(circle at 35% 30%, #4C70F4 0%, #2F55E8 45%, #2346CF 100%);
}
.orb-b {
  width: 260px; height: 260px; top: 260px; left: -150px;
  background: radial-gradient(circle at 60% 40%, #4C70F4, #2447D1);
  animation-delay: .15s;
}
.orb-ring {
  width: 300px; height: 300px; top: 540px; right: -170px;
  border: 46px solid #2F55E8; background: transparent;
  animation-delay: .3s;
}
@keyframes orbIn { from { opacity: 0; transform: scale(.82); } to { opacity: 1; transform: none; } }

.glass {
  background: var(--glass);
  -webkit-backdrop-filter: blur(22px) saturate(150%);
  backdrop-filter: blur(22px) saturate(150%);
  border: 1px solid var(--glass-edge);
  box-shadow: var(--sh-1);
}

/* ---------- entrance ---------- */
.reveal { animation: rise .8s var(--ease) both; animation-delay: var(--d, 0ms); }
@keyframes rise { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: none; } }

/* ---------- top bar ---------- */
.topbar {
  position: sticky; top: 0; z-index: 40;
  background: rgba(232, 236, 243, .72);
  -webkit-backdrop-filter: blur(16px) saturate(140%);
  backdrop-filter: blur(16px) saturate(140%);
  border-bottom: 1px solid rgba(255, 255, 255, .6);
}
.topbar-inner { max-width: 1320px; margin: 0 auto; height: var(--topbar-h); padding: 0 24px; display: flex; align-items: center; gap: 28px; }
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); font-weight: 750; font-size: 19px; letter-spacing: -.02em; }
.brand-mark { width: 34px; height: 34px; --logo-halo: #E8ECF3; }
.brand-name b { font-weight: 800; color: var(--ink); }
.brand-name i { font-style: normal; font-weight: 700; color: var(--brand-600); }
/* Header logo draws itself once per page load. */
.brand-anim .la-env { transform-origin: 20px 22px; animation: laEnv .55s var(--ease-spring) both .15s; }
.brand-anim .la-x1, .brand-anim .la-x2, .brand-anim .la-o { stroke-dasharray: 1; stroke-dashoffset: 1; }
.brand-anim .la-x1 { animation: laDraw .3s ease-out forwards .5s; }
.brand-anim .la-x2 { animation: laDraw .3s ease-out forwards .68s; }
.brand-anim .la-seal, .brand-anim .la-dot { transform-origin: 37px 35px; animation: laPop .4s var(--ease-spring) both .9s; }
.brand-anim .la-o { animation: laDraw .65s cubic-bezier(.5, 0, .3, 1) forwards 1s; }
.brand:hover .brand-anim .la-o { animation: laDraw .65s cubic-bezier(.5, 0, .3, 1) forwards, laSpin .8s var(--ease) 1; transform-origin: 37px 35px; }
@keyframes laEnv { from { transform: scale(.55) rotate(-10deg); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes laDraw { to { stroke-dashoffset: 0; } }
@keyframes laPop { from { transform: scale(0); } to { transform: none; } }
@keyframes laSpin { from { transform: rotate(-120deg); } to { transform: none; } }
.brand-sm { font-size: 16px; }
.brand-sm .brand-mark { width: 26px; height: 26px; }
.topnav { display: flex; gap: 4px; }
.topnav a { color: var(--ink-2); text-decoration: none; font-size: 14px; font-weight: 550; padding: 8px 12px; border-radius: 999px; transition: background .2s, color .2s; }
.topnav a:hover { background: rgba(255, 255, 255, .7); color: var(--ink); }
.topbar-end { margin-left: auto; display: flex; align-items: center; gap: 14px; }

.draft-status { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; color: var(--ink-3); white-space: nowrap; }
.draft-status::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; opacity: .6; }
.draft-status.ok { color: var(--free); }
.draft-status.warn { color: var(--warn); }
.draft-status.error { color: var(--danger); font-weight: 600; }
.draft-status.pulse::before { animation: pulseDot .9s var(--ease); }
@keyframes pulseDot { 0% { transform: scale(1); } 40% { transform: scale(1.8); opacity: 1; } 100% { transform: scale(1); } }

/* ---------- buttons ---------- */
.btn {
  --h: 44px;
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: var(--h); padding: 0 20px; border-radius: 999px; border: 1px solid transparent;
  font-weight: 650; font-size: 14.5px; text-decoration: none; cursor: pointer; white-space: nowrap;
  transition: transform .18s var(--ease), box-shadow .2s var(--ease), background .2s, border-color .2s, color .2s;
  -webkit-tap-highlight-color: transparent;
}
.btn:active { transform: translateY(1px) scale(.985); }
.btn-sm { --h: 36px; padding: 0 14px; font-size: 13.5px; }
.btn-sm .ic { width: 16px; height: 16px; }
.btn-lg { --h: 52px; padding: 0 26px; font-size: 15.5px; }
.btn-primary { background: var(--brand); color: #fff; box-shadow: 0 6px 18px rgba(47, 85, 232, .32); }
.btn-primary:hover { background: var(--brand-600); box-shadow: 0 10px 24px rgba(47, 85, 232, .38); transform: translateY(-1px); }
.btn-free { background: var(--free-btn); color: #fff; box-shadow: 0 6px 18px rgba(11, 138, 102, .3); }
.btn-free:hover { background: var(--free); transform: translateY(-1px); box-shadow: 0 10px 24px rgba(11, 138, 102, .34); }
.btn-pro { background: linear-gradient(180deg, var(--pro-gold-2), var(--pro-gold)); color: #2A1C00; border-color: #C9962F; box-shadow: 0 6px 18px rgba(196, 146, 40, .3); }
.btn-pro:hover { transform: translateY(-1px); box-shadow: 0 10px 26px rgba(196, 146, 40, .38); }
.btn-ghost { background: var(--solid); color: var(--ink); border-color: var(--line-2); }
.btn-ghost:hover { border-color: var(--brand); color: var(--brand-700); }
.btn-quiet { background: transparent; color: var(--ink-2); }
.btn-quiet:hover { background: rgba(255, 255, 255, .7); color: var(--ink); }
.btn-link { background: none; border: 0; color: var(--brand-600); padding: 0 6px; text-decoration: underline; text-underline-offset: 3px; }
.btn-link:hover { color: var(--brand-700); }

.btn-ico { position: relative; width: 18px; height: 18px; display: inline-grid; }
.btn-ico .ic { grid-area: 1 / 1; transition: transform .3s var(--ease), opacity .2s; }
.btn-ico .ic-done { opacity: 0; transform: scale(.3) rotate(-30deg); }
.btn.is-done .btn-ico .ic:first-child { opacity: 0; transform: scale(.3); }
.btn.is-done .btn-ico .ic-done { opacity: 1; transform: none; }
.btn.is-done { animation: doneBump .5s var(--ease-spring); }
@keyframes doneBump { 0% { transform: scale(1); } 35% { transform: scale(1.04); } 100% { transform: scale(1); } }

/* ---------- badges ---------- */
.badge { display: inline-flex; align-items: center; gap: 5px; height: 26px; padding: 0 10px 0 8px; border-radius: 999px; font-size: 12.5px; font-weight: 700; letter-spacing: .01em; border: 1px solid transparent; white-space: nowrap; }
.badge .ic { width: 14px; height: 14px; }
.badge-free { background: var(--free-50); color: var(--free); border-color: var(--free-200); }
.badge-pro { background: var(--pro-50); color: var(--pro); border-color: var(--pro-200); }
.badge-pro .ic { color: #B8872A; }
.badge-sm { height: 22px; font-size: 11.5px; padding: 0 8px 0 6px; }
.badge-sm .ic { width: 12px; height: 12px; }
.badge-owned { background: var(--free-50); color: var(--free); border-color: var(--free-200); }

.eyebrow { font-size: 12px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--brand-600); margin-bottom: 8px; }
.muted { color: var(--ink-3); }
.hint { font-size: 12.5px; color: var(--ink-3); }

/* ---------- hero ---------- */
.hero { position: relative; max-width: 1080px; margin: 36px auto 30px; padding: 0 24px; }
.hero-card { position: relative; border-radius: var(--r-xl); padding: 44px 48px 38px; text-align: center; box-shadow: var(--sh-2); }
.hero-card .eyebrow { color: var(--brand-700); }
.hero h1 { font-size: clamp(30px, 4.4vw, 50px); font-weight: 800; letter-spacing: -.035em; max-width: 780px; margin: 0 auto; }
.hero-lede { margin: 16px auto 0; max-width: 580px; font-size: 17px; color: var(--ink-2); }
.hero-actions { margin-top: 26px; display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; }
.hero-points { list-style: none; margin: 26px 0 0; padding: 0; display: flex; justify-content: center; flex-wrap: wrap; gap: 8px 22px; font-size: 13.5px; color: var(--ink-2); font-weight: 550; }
.hero-points li { display: inline-flex; align-items: center; gap: 6px; }
.hero-points .ic { width: 16px; height: 16px; color: var(--free); }

.hero-paper {
  position: absolute; right: -6px; bottom: -46px; width: 270px; padding: 18px 18px 16px;
  background: #fff; border-radius: 18px; box-shadow: 0 20px 50px rgba(31, 52, 125, .22);
  transform: rotate(-5deg); border-right: 6px solid var(--brand);
  animation: paperIn 1.1s var(--ease) both; animation-delay: .35s;
}
@keyframes paperIn { from { opacity: 0; transform: translate(40px, 30px) rotate(6deg); } to { opacity: 1; transform: rotate(-5deg); } }
.hero-paper-lines i { display: block; height: 7px; border-radius: 6px; background: #E3E8F3; margin-bottom: 7px; }
.hero-paper-lines i.short { width: 55%; margin-bottom: 14px; }
.hero-sig { transform: scale(.62); transform-origin: top left; width: 161%; height: 92px; overflow: hidden; pointer-events: none; }

/* ---------- workspace ---------- */
.workspace {
  max-width: 1320px; margin: 70px auto 0; padding: 0 24px 40px;
  display: grid; grid-template-columns: minmax(400px, 560px) minmax(0, 1fr); gap: 28px; align-items: start;
}
.workspace:focus { outline: none; }
.panel { border-radius: var(--r-xl); }
.editor { padding: 22px 28px 28px; min-width: 0; }
.preview {
  position: sticky; top: calc(var(--topbar-h) + 18px); padding: 20px 22px 18px; min-width: 0;
  max-height: calc(100vh - var(--topbar-h) - 36px); overflow-y: auto; overscroll-behavior: contain; scrollbar-width: thin;
}

/* stepper */
.stepper { position: relative; margin: 0 -6px 22px; }
.stepper ol { list-style: none; display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; margin: 0; padding: 0; position: relative; z-index: 1; }
.step-btn {
  width: 100%; display: flex; align-items: center; gap: 10px; padding: 8px 8px; border: 0; background: none;
  cursor: pointer; text-align: left; border-radius: 12px; color: var(--ink-3); transition: background .2s, color .2s;
}
.step-btn:hover { background: rgba(255, 255, 255, .6); color: var(--ink); }
.step-num {
  width: 30px; height: 30px; border-radius: 50%; flex: none; display: grid; place-items: center;
  font-weight: 750; font-size: 13.5px; background: #fff; color: var(--ink-3); border: 1.5px solid var(--line-2);
  transition: background .3s var(--ease), color .3s, border-color .3s, transform .3s var(--ease-spring), box-shadow .3s;
}
.step-label { font-size: 13.5px; font-weight: 650; line-height: 1.2; }
.step-btn[aria-current="step"] { color: var(--ink); }
.step-btn[aria-current="step"] .step-num { background: var(--brand); color: #fff; border-color: var(--brand); transform: scale(1.08); box-shadow: 0 6px 16px rgba(47, 85, 232, .35); }
.step-btn.is-done .step-num { background: var(--brand-50); color: var(--brand-700); border-color: var(--brand-100); }
.stepper-track { position: absolute; left: 6px; right: 6px; bottom: -10px; height: 3px; border-radius: 3px; background: rgba(17, 23, 51, .07); overflow: hidden; }
.stepper-fill { position: absolute; inset: 0 auto 0 0; width: 33.33%; background: linear-gradient(90deg, var(--brand), #5B7CF5); border-radius: 3px; transition: width .6s var(--ease); }

.step { animation: stepIn .45s var(--ease) both; }
@keyframes stepIn { from { opacity: 0; transform: translateX(var(--dir, 18px)); } to { opacity: 1; transform: none; } }
.step-head { margin: 8px 0 18px; }
.step-head h2 { font-size: 26px; font-weight: 780; }
.step-head h2:focus { outline: none; }
.step-lede { margin-top: 6px; color: var(--ink-2); }
.step-actions { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; margin-top: 22px; padding-top: 18px; border-top: 1px solid var(--line); }

/* form groups */
.group { border: 0; margin: 0 0 14px; padding: 18px 18px 6px; background: var(--glass-strong); border-radius: var(--r-lg); border: 1px solid rgba(255, 255, 255, .9); box-shadow: 0 1px 2px rgba(17, 23, 51, .04); }
.group legend { float: left; width: 100%; padding: 0; margin-bottom: 12px; font-weight: 720; font-size: 14.5px; display: flex; align-items: center; gap: 8px; }
.group legend + * { clear: both; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0 14px; }
.field { margin-bottom: 14px; min-width: 0; }
.field label, .label { display: flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 650; color: var(--ink); margin-bottom: 6px; }
.req, .opt { font-size: 11px; font-weight: 650; padding: 1px 7px; border-radius: 999px; letter-spacing: .02em; }
.req { background: var(--brand-50); color: var(--brand-700); }
.opt { background: rgba(17, 23, 51, .05); color: var(--ink-3); font-weight: 600; }
input[type="text"], input[type="email"], input[type="url"], input[type="tel"], select {
  width: 100%; height: 44px; padding: 0 13px; border-radius: 12px; border: 1px solid var(--line-2); background: #fff;
  font-size: 14.5px; transition: border-color .15s, box-shadow .2s;
  -webkit-appearance: none; appearance: none;
}
select { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M7 10l5 5 5-5' fill='none' stroke='%235F6680' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 10px center; background-size: 20px; padding-right: 36px; }
input::placeholder { color: #9AA0B3; }
input:hover, select:hover { border-color: rgba(17, 23, 51, .28); }
input:focus, select:focus { outline: none; border-color: var(--brand); box-shadow: var(--sh-focus); }
input[aria-invalid="true"] { border-color: var(--danger); }
input[aria-invalid="true"]:focus { box-shadow: 0 0 0 3px rgba(180, 35, 24, .18); }
.field-msg { font-size: 12.5px; min-height: 0; margin-top: 5px; color: var(--danger); display: flex; gap: 5px; align-items: flex-start; }
.field-msg:empty { display: none; }
.field-msg.is-ok { color: var(--free); }
.field-msg.is-info { color: var(--ink-3); }
.field-msg.is-warn { color: var(--warn); }

/* switches */
.switch { display: inline-flex; align-items: center; gap: 10px; cursor: pointer; font-size: 14px; font-weight: 550; color: var(--ink); margin-bottom: 14px; position: relative; }
.switch input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.switch-ui { width: 40px; height: 24px; border-radius: 999px; background: #C9CFDB; position: relative; flex: none; transition: background .25s var(--ease); }
.switch-ui::after { content: ""; position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0, 0, 0, .2); transition: transform .3s var(--ease-spring); }
.switch input:checked + .switch-ui { background: var(--brand); }
.switch input:checked + .switch-ui::after { transform: translateX(16px); }
.switch input:focus-visible + .switch-ui { box-shadow: var(--sh-focus); }
.toggles { display: flex; flex-wrap: wrap; gap: 0 24px; }

/* segmented */
.seg { display: inline-flex; padding: 3px; background: rgba(17, 23, 51, .06); border-radius: 999px; gap: 2px; max-width: 100%; }
.seg label, .seg button { position: relative; cursor: pointer; border: 0; background: none; margin: 0; padding: 0; }
.seg input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.seg label span, .seg button { display: inline-flex; align-items: center; gap: 6px; height: 34px; padding: 0 14px; border-radius: 999px; font-size: 13px; font-weight: 650; color: var(--ink-2); transition: background .25s var(--ease), color .2s, box-shadow .25s; white-space: nowrap; }
.seg input:checked + span, .seg button[aria-pressed="true"] { background: #fff; color: var(--ink); box-shadow: 0 1px 3px rgba(17, 23, 51, .12), 0 4px 10px rgba(17, 23, 51, .06); }
.seg input:focus-visible + span { box-shadow: var(--sh-focus); }
.seg-sm label span { height: 30px; font-size: 12.5px; padding: 0 12px; }
.seg-icon button .ic { width: 16px; height: 16px; }

/* photo */
.photo-row { display: flex; align-items: center; gap: 14px; margin-bottom: 14px; }
.photo-thumb { width: 64px; height: 64px; border-radius: 50%; overflow: hidden; background: #E6E9F0; flex: none; box-shadow: 0 0 0 3px #fff, 0 4px 14px rgba(17, 23, 51, .14); transition: border-radius .3s var(--ease); }
.photo-thumb.square { border-radius: 12px; }
.photo-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.photo-thumb.is-off { opacity: .4; filter: grayscale(1); }
.photo-thumb.pop { animation: thumbPop .5s var(--ease-spring); }
@keyframes thumbPop { 0% { transform: scale(.7); } 100% { transform: scale(1); } }
.photo-showing { font-size: 13.5px; font-weight: 600; margin-bottom: 6px; }
.photo-meta .switch { margin-bottom: 0; }

.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); margin-bottom: 14px; }
.tabs [role="tab"] { display: inline-flex; align-items: center; gap: 7px; padding: 10px 12px; background: none; border: 0; border-bottom: 2.5px solid transparent; margin-bottom: -1px; font-size: 13.5px; font-weight: 650; color: var(--ink-3); cursor: pointer; transition: color .2s, border-color .25s var(--ease); }
.tabs [role="tab"] .ic { width: 16px; height: 16px; }
.tabs [role="tab"]:hover { color: var(--ink); }
.tabs [role="tab"][aria-selected="true"] { color: var(--brand-700); border-bottom-color: var(--brand); }
.tab-pane { animation: fadeIn .3s var(--ease); }
@keyframes fadeIn { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }

.dropzone { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 20px 16px; border: 1.5px dashed rgba(47, 85, 232, .35); border-radius: var(--r); background: rgba(236, 241, 255, .5); cursor: pointer; text-align: center; transition: background .2s, border-color .2s, transform .2s var(--ease); color: var(--brand-700); margin-bottom: 12px; }
.dropzone:hover, .dropzone.is-over { background: var(--brand-50); border-color: var(--brand); }
.dropzone.is-over { transform: scale(1.01); }
.dropzone:focus-within { box-shadow: var(--sh-focus); }
.dropzone.is-busy { opacity: .6; pointer-events: none; }
.dz-title { font-size: 14px; color: var(--ink); }
.dz-title strong { color: var(--brand-700); }
.dz-hint { font-size: 12.5px; color: var(--ink-3); }
.shape-seg { margin-bottom: 12px; }
.photo-actions { display: flex; gap: 6px; flex-wrap: wrap; margin: 4px 0 8px -8px; }
.photo-msg { margin: 0 0 12px; }

.note { display: flex; gap: 9px; align-items: flex-start; font-size: 13px; color: var(--ink-2); background: rgba(17, 23, 51, .035); padding: 10px 12px; border-radius: 12px; margin-bottom: 12px; }
.note .ic { width: 16px; height: 16px; margin-top: 1px; color: var(--brand-600); }
.note-warn { background: var(--warn-50); color: #4D3500; }
.note-warn .ic { color: var(--warn); }

.cta-fields { transition: opacity .25s; }
.cta-fields.is-off { opacity: .5; }

/* ---------- templates gallery ---------- */
.tier { margin-bottom: 22px; padding: 16px; border-radius: var(--r-lg); }
.tier-free { background: linear-gradient(180deg, rgba(227, 244, 236, .7), rgba(255, 255, 255, .6)); border: 1px solid rgba(166, 218, 196, .6); }
.tier-pro { background: linear-gradient(180deg, rgba(251, 242, 219, .8), rgba(255, 255, 255, .6)); border: 1px solid rgba(235, 209, 150, .7); }
.tier-head { display: grid; grid-template-columns: auto 1fr; gap: 2px 10px; align-items: center; margin-bottom: 14px; }
.tier-head h3 { font-size: 17px; font-weight: 750; }
.tier-head p { grid-column: 1 / -1; font-size: 13.5px; color: var(--ink-2); margin-top: 4px; }
.tpl-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }

.tpl-card {
  position: relative; display: flex; flex-direction: column; background: #fff; border-radius: 16px; overflow: hidden; cursor: pointer;
  border: 1.5px solid var(--line); box-shadow: 0 1px 2px rgba(17, 23, 51, .05);
  transition: transform .25s var(--ease), box-shadow .25s var(--ease), border-color .2s;
  animation: rise .5s var(--ease) both; animation-delay: calc(var(--i, 0) * 50ms);
}
.tpl-card:hover { transform: translateY(-3px); box-shadow: 0 12px 28px rgba(31, 52, 125, .14); }
.tpl-card:has(input:focus-visible) { box-shadow: var(--sh-focus); border-color: var(--brand); }
.tpl-thumb { position: relative; height: 118px; background: #FAFBFD; border-bottom: 1px solid var(--line); overflow: hidden; padding: 12px 12px; }
.tpl-scale { position: absolute; left: 12px; top: 12px; transform-origin: top left; pointer-events: none; white-space: nowrap; }
.tpl-meta { padding: 10px 12px 12px; display: flex; flex-direction: column; gap: 4px; }
.tpl-row { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.tpl-name { font-weight: 720; font-size: 14px; }
.tpl-desc { font-size: 12.5px; color: var(--ink-3); line-height: 1.4; }
.tpl-check { position: absolute; top: 8px; right: 8px; width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; color: #fff; opacity: 0; transform: scale(.4); transition: opacity .2s, transform .35s var(--ease-spring); }
.tpl-check .ic { width: 15px; height: 15px; }
.tpl-card[data-tier="free"] .tpl-check { background: var(--free-btn); }
.tpl-card[data-tier="pro"] .tpl-check { background: #B8872A; }
.tpl-card:has(input:checked) .tpl-check { opacity: 1; transform: none; }
.tpl-card[data-tier="free"]:has(input:checked) { border-color: var(--free-btn); box-shadow: 0 0 0 3px rgba(11, 138, 102, .16), 0 10px 24px rgba(11, 138, 102, .12); }
.tpl-card[data-tier="pro"]:has(input:checked) { border-color: var(--pro-gold); box-shadow: 0 0 0 3px rgba(212, 162, 60, .22), 0 10px 24px rgba(196, 146, 40, .14); }
.tpl-sel { font-size: 11.5px; font-weight: 700; color: var(--ink-3); display: none; }
.tpl-card:has(input:checked) .tpl-sel { display: inline; }
.tpl-lock { font-size: 11.5px; color: var(--pro); font-weight: 650; display: inline-flex; align-items: center; gap: 4px; }
.tpl-lock .ic { width: 12px; height: 12px; }

/* ---------- export ---------- */
.export { margin-top: 6px; padding: 20px; border-radius: var(--r-lg); background: #fff; border: 1.5px solid var(--line); box-shadow: var(--sh-1); transition: border-color .3s, background .3s; }
.export[data-state="free"] { border-color: var(--free-200); background: linear-gradient(180deg, #F3FBF7, #fff 60%); }
.export[data-state="locked"], .export[data-state="unlocked"] { border-color: var(--pro-200); background: linear-gradient(180deg, #FDF8EC, #fff 60%); }
.export-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.export-head h3 { font-size: 18px; font-weight: 760; }
.export-lede { margin: 6px 0 16px; font-size: 14px; color: var(--ink-2); }
.export-actions { display: flex; flex-direction: column; gap: 10px; align-items: flex-start; }
.export-secondary { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.export-locked { display: flex; flex-direction: column; gap: 12px; align-items: flex-start; }
.pro-callout { display: flex; gap: 10px; align-items: flex-start; font-size: 14px; color: #3D2C00; background: var(--pro-50); border: 1px solid var(--pro-200); padding: 12px 14px; border-radius: 12px; }
.pro-callout .ic { color: #B8872A; margin-top: 1px; }
.export-notes { list-style: none; padding: 0; margin: 14px 0 0; display: flex; flex-direction: column; gap: 8px; }
.export-notes li { display: flex; gap: 8px; font-size: 13px; color: var(--ink-2); }
.export-notes li .ic { width: 16px; height: 16px; margin-top: 1px; flex: none; }
.export-notes li.warn .ic { color: var(--warn); }
.export-notes li.info .ic { color: var(--brand-600); }
.export-notes li.ok .ic { color: var(--free); }

/* ---------- preview ---------- */
.preview-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; flex-wrap: wrap; margin-bottom: 14px; }
.preview-title h2 { font-size: 18px; font-weight: 760; }
.preview-title p { font-size: 13px; color: var(--ink-3); margin-top: 2px; font-weight: 550; }
.preview-tools { display: flex; gap: 8px; flex-wrap: wrap; }

.pro-banner { display: flex; align-items: center; gap: 12px; padding: 10px 12px 10px 14px; margin-bottom: 14px; border-radius: 14px; background: var(--pro-50); border: 1px solid var(--pro-200); color: #3D2C00; font-size: 13.5px; animation: bannerIn .4s var(--ease) both; }
.pro-banner > .ic { color: #B8872A; }
.pro-banner p { flex: 1; min-width: 0; }
.pb-sub { color: #5E4600; }
@keyframes bannerIn { from { opacity: 0; transform: translateY(-6px); } to { opacity: 1; transform: none; } }

.stage { border-radius: 18px; padding: 26px; background: linear-gradient(160deg, #D5DCEA, #E4E9F2); display: flex; justify-content: center; transition: padding .4s var(--ease); overflow: hidden; }
.compose {
  width: 100%; max-width: 760px; background: #fff; border-radius: 14px; overflow: hidden;
  box-shadow: 0 2px 6px rgba(17, 23, 51, .08), 0 24px 60px rgba(31, 52, 125, .16);
  font-family: Arial, Helvetica, sans-serif; color: #202124;
  transition: max-width .5s var(--ease), border-radius .4s var(--ease), background .35s, color .35s, box-shadow .4s;
}
.compose-bar { display: flex; justify-content: space-between; align-items: center; padding: 10px 16px; background: #F2F6FC; font-size: 14px; font-weight: bold; color: #1F1F1F; transition: background .35s, color .35s; }
.win { display: inline-flex; gap: 10px; }
.win i { width: 11px; height: 11px; border-radius: 3px; border: 1.6px solid #5F6368; display: block; }
.compose-row { display: flex; gap: 12px; padding: 9px 16px; border-bottom: 1px solid #ECEEF1; font-size: 14px; color: #202124; transition: border-color .35s, color .35s; }
.compose-row .k { color: #5F6368; min-width: 52px; }
.compose-body { padding: 18px 16px 26px; font-size: 14px; line-height: 1.55; min-height: 280px; }
.compose-body > p { margin: 0 0 12px; }
.compose-foot { display: flex; align-items: center; gap: 14px; padding: 12px 16px 14px; }
.compose-foot .send { background: #0B57D0; color: #fff; font-size: 14px; font-weight: bold; padding: 9px 22px; border-radius: 999px; }
.compose-foot i { width: 18px; height: 4px; border-radius: 3px; background: #DADCE0; display: block; }

.sig-wrap { position: relative; margin-top: 34px; padding-top: 4px; }
.sig-tag { position: absolute; top: -24px; left: -10px; font-family: var(--font); font-size: 10.5px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--brand-700); background: var(--brand-50); padding: 2px 8px; border-radius: 999px; }
.sig-mount { position: relative; outline: 1.5px dashed rgba(47, 85, 232, .38); outline-offset: 10px; border-radius: 2px; margin: 8px 0 4px; overflow-x: auto; transition: filter .35s; }
.sig-inner.swap { animation: sigSwap .5s var(--ease) both; }
@keyframes sigSwap { 0% { opacity: 0; transform: translateY(8px) scale(.985); filter: blur(3px); } 100% { opacity: 1; transform: none; filter: none; } }
.sig-mount a { cursor: default; }

/* phone frame */
.compose[data-device="phone"] { max-width: 360px; border-radius: 34px; border: 10px solid #141A2D; box-shadow: 0 30px 70px rgba(17, 23, 51, .3); position: relative; }
.compose[data-device="phone"]::before { content: ""; display: block; height: 22px; background: inherit; }
.compose[data-device="phone"]::after { content: ""; position: absolute; top: 6px; left: 50%; width: 86px; height: 20px; margin-left: -43px; border-radius: 12px; background: #141A2D; }
.compose[data-device="phone"] .win { display: none; }
.compose[data-device="phone"] .compose-body { padding: 14px 14px 20px; min-height: 0; }
.compose[data-device="phone"] .compose-row { padding: 9px 14px; }

/* dark approximation: background goes dark, signature colours are inverted the way some apps do */
.compose[data-theme="dark"] { background: #1F1F1F; color: #E3E3E3; }
.compose[data-theme="dark"] .compose-bar { background: #2B2B2B; color: #E3E3E3; }
.compose[data-theme="dark"] .compose-row { color: #E3E3E3; border-color: #3A3A3A; }
.compose[data-theme="dark"] .compose-row .k { color: #A8ABB0; }
.compose[data-theme="dark"] .win i { border-color: #A8ABB0; }
.compose[data-theme="dark"] .compose-foot .send { background: #A8C7FA; color: #062E6F; }
.compose[data-theme="dark"] .compose-foot i { background: #444; }
.compose[data-theme="dark"] .sig-mount { filter: invert(1) hue-rotate(180deg); outline-color: rgba(208, 170, 23, .55); }
.compose[data-theme="dark"] .sig-mount img { filter: invert(1) hue-rotate(180deg); }
.compose[data-theme="dark"] .sig-tag { background: #2B3354; color: #C9D5FF; }

.preview-note { display: flex; gap: 8px; align-items: flex-start; font-size: 12.5px; color: var(--ink-3); margin-top: 12px; }
.preview-note .ic { width: 15px; height: 15px; margin-top: 1px; }

/* ---------- mobile switcher ---------- */
.mobile-switch { display: none; }

/* ---------- guides ---------- */
.ad-slot { min-height: 0; margin: 0 auto; }
.ad-slot:empty { display: block; height: 24px; }
.guides { max-width: 1120px; margin: 40px auto 0; padding: 0 24px; }
.section-head { text-align: center; margin-bottom: 24px; }
.section-head h2 { font-size: clamp(24px, 3vw, 34px); font-weight: 800; }
.guide { border-radius: var(--r-lg); padding: 24px 26px; }
.guide h3 { font-size: 18px; font-weight: 760; margin-bottom: 10px; }
.guide p { color: var(--ink-2); font-size: 14.5px; }
.guide-wide { margin-bottom: 16px; }
.guide-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.steps-list { margin: 0 0 14px; padding: 0; list-style: none; counter-reset: s; display: grid; gap: 10px; }
.steps-list li { counter-increment: s; position: relative; padding: 2px 0 0 38px; min-height: 26px; font-size: 14.5px; color: var(--ink-2); }
.steps-list li::before { content: counter(s); position: absolute; left: 0; top: 0; width: 26px; height: 26px; border-radius: 50%; background: var(--brand); color: #fff; font-size: 12.5px; font-weight: 750; display: grid; place-items: center; box-shadow: 0 4px 10px rgba(47, 85, 232, .3); }
.guide-wide .steps-list { grid-template-columns: 1fr 1fr; gap: 12px 28px; }
kbd { font-family: inherit; font-size: 12px; padding: 1px 6px; border-radius: 6px; background: #fff; border: 1px solid var(--line-2); box-shadow: 0 1px 0 var(--line-2); }

.faq { border-radius: var(--r-lg); padding: 26px 26px 14px; }
.faq h2 { font-size: 22px; font-weight: 780; margin-bottom: 12px; }
.faq details { border-top: 1px solid var(--line); }
.faq summary { cursor: pointer; list-style: none; padding: 16px 30px 16px 0; font-weight: 650; position: relative; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: ""; position: absolute; right: 6px; top: 50%; width: 9px; height: 9px; border-right: 2px solid var(--ink-3); border-bottom: 2px solid var(--ink-3); transform: translateY(-70%) rotate(45deg); transition: transform .3s var(--ease); }
.faq details[open] summary::after { transform: translateY(-30%) rotate(-135deg); }
.faq details p { padding: 0 0 16px; color: var(--ink-2); font-size: 14.5px; max-width: 760px; }
.faq details[open] p { animation: fadeIn .3s var(--ease); }

.footer { margin-top: 40px; padding: 30px 24px 40px; border-top: 1px solid rgba(17, 23, 51, .06); }
.footer-inner { max-width: 1120px; margin: 0 auto; display: flex; gap: 20px; align-items: center; flex-wrap: wrap; color: var(--ink-3); font-size: 13px; }
.footer-inner p { flex: 1; min-width: 240px; }

/* ---------- toasts ---------- */
.toasts { position: fixed; right: 20px; bottom: 20px; z-index: 90; display: flex; flex-direction: column; gap: 8px; align-items: flex-end; pointer-events: none; }
.toast { pointer-events: auto; display: flex; align-items: center; gap: 12px; max-width: 420px; padding: 12px 14px 12px 16px; border-radius: 14px; background: #151B33; color: #fff; font-size: 14px; box-shadow: 0 16px 40px rgba(17, 23, 51, .3); animation: toastIn .4s var(--ease-spring) both; }
.toast.out { animation: toastOut .25s var(--ease) both; }
.toast .ic { width: 18px; height: 18px; }
.toast.ok .ic { color: #6EE7B7; }
.toast.err .ic { color: #FCA5A5; }
.toast.pro .ic { color: var(--pro-gold-2); }
.toast button { background: rgba(255, 255, 255, .14); color: #fff; border: 0; border-radius: 999px; padding: 5px 12px; font-weight: 650; font-size: 13px; cursor: pointer; }
.toast button:hover { background: rgba(255, 255, 255, .24); }
@keyframes toastIn { from { opacity: 0; transform: translateY(14px) scale(.96); } to { opacity: 1; transform: none; } }
@keyframes toastOut { to { opacity: 0; transform: translateY(8px); } }

/* ---------- dialogs ---------- */
.dlg { border: 0; padding: 0; border-radius: 24px; max-width: min(540px, calc(100vw - 32px)); width: 100%; background: #fff; color: var(--ink); box-shadow: 0 40px 100px rgba(17, 23, 51, .35); }
.dlg[open] { animation: dlgIn .4s var(--ease) both; }
.dlg::backdrop { background: rgba(17, 23, 51, .42); -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px); animation: fadeIn .3s ease both; }
@keyframes dlgIn { from { opacity: 0; transform: translateY(16px) scale(.97); } to { opacity: 1; transform: none; } }
.dlg-body { padding: 30px 30px 24px; display: flex; flex-direction: column; gap: 14px; }
.dlg-body h2 { font-size: 22px; font-weight: 780; padding-right: 26px; }
.dlg-x { position: absolute; top: 14px; right: 14px; width: 36px; height: 36px; border-radius: 50%; border: 0; background: rgba(17, 23, 51, .05); cursor: pointer; display: grid; place-items: center; color: var(--ink-2); }
.dlg-x:hover { background: rgba(17, 23, 51, .1); }
.dlg-actions { display: flex; justify-content: flex-end; gap: 8px; flex-wrap: wrap; margin-top: 6px; }
.dlg-success { width: 52px; height: 52px; border-radius: 50%; background: var(--free-btn); color: #fff; display: grid; place-items: center; box-shadow: 0 10px 24px rgba(11, 138, 102, .35); animation: pop .55s var(--ease-spring) both .1s; }
.dlg-success .ic { width: 26px; height: 26px; stroke-dasharray: 30; stroke-dashoffset: 30; animation: draw .5s var(--ease) forwards .35s; }
.dlg-success .ic use { stroke-dasharray: 30; }
@keyframes pop { 0% { opacity: 0; transform: scale(.3); } 100% { opacity: 1; transform: none; } }
@keyframes draw { to { stroke-dashoffset: 0; } }
.dlg-pro { border-top: 5px solid var(--pro-gold); }
.dlg-pro .badge { align-self: flex-start; }
.check-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.check-list li { display: flex; gap: 10px; font-size: 14.5px; color: var(--ink-2); }
.check-list .ic { color: var(--free); width: 18px; height: 18px; margin-top: 1px; }
.test-banner { display: flex; gap: 10px; align-items: flex-start; background: var(--warn-50); color: #4D3500; border: 1px solid #F1D79A; border-radius: 12px; padding: 10px 12px; font-size: 13.5px; }
.test-banner .ic { color: var(--warn); margin-top: 1px; }
.order-line { display: flex; justify-content: space-between; align-items: center; padding: 14px 16px; border: 1px solid var(--line-2); border-radius: 14px; }
.order-line small { display: block; color: var(--ink-3); font-size: 12.5px; }

/* ---------- swatches ---------- */
.swatches { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 10px; }
.swatch { position: relative; cursor: pointer; }
.swatch input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.swatch span { display: block; width: 32px; height: 32px; border-radius: 50%; background: var(--c); box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .1); transition: transform .25s var(--ease-spring), box-shadow .2s; }
.swatch:hover span { transform: scale(1.1); }
.swatch input:checked + span { box-shadow: 0 0 0 2px #fff, 0 0 0 4px var(--c); transform: scale(1.05); }
.swatch input:focus-visible + span { box-shadow: 0 0 0 2px #fff, 0 0 0 4px var(--brand), var(--sh-focus); }
.custom-color { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.color-pick { position: relative; width: 36px; height: 36px; border-radius: 50%; overflow: hidden; cursor: pointer; margin: 0 !important; box-shadow: 0 0 0 1px var(--line-2); }
.color-pick input { position: absolute; inset: -8px; width: 52px; height: 52px; border: 0; padding: 0; cursor: pointer; opacity: 0; }
.color-dot { display: block; width: 100%; height: 100%; background: conic-gradient(from 0deg, #E5484D, #F5A524, #30A46C, #0091FF, #8E4EC6, #E5484D); }
.hex-input { width: 110px !important; height: 36px !important; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 13.5px !important; text-transform: uppercase; }
output { font-weight: 600; color: var(--ink-3); font-size: 12.5px; }
input[type="range"] { width: 100%; accent-color: var(--brand); }

/* ---------- demo controls (standalone preview only) ---------- */
.demo-controls { position: fixed; left: 16px; bottom: 16px; z-index: 50; max-width: 320px; font-size: 13px; }
.demo-controls details { background: #fff; border: 1px dashed #C9962F; border-radius: 14px; padding: 8px 12px; box-shadow: var(--sh-1); }
.demo-controls summary { cursor: pointer; font-weight: 700; color: var(--pro); }
.demo-controls p { margin: 8px 0; color: var(--ink-2); }
.demo-buttons { display: flex; flex-wrap: wrap; gap: 6px; padding-bottom: 4px; }

/* ---------- responsive ---------- */
@media (max-width: 1100px) {
  .workspace { grid-template-columns: minmax(360px, 480px) minmax(0, 1fr); gap: 20px; }
  .hero-paper { display: none; }
  .stage { padding: 16px; }
}

@media (max-width: 920px) {
  :root { --topbar-h: 58px; }
  .topnav { display: none; }
  .workspace { grid-template-columns: 1fr; margin-top: 30px; padding-bottom: 110px; }
  .preview { position: static; max-height: none; overflow: visible; }
  body[data-view="edit"] .preview { display: none; }
  body[data-view="preview"] .editor { display: none; }
  .mobile-switch {
    display: flex; position: fixed; left: 50%; bottom: calc(14px + env(safe-area-inset-bottom)); transform: translateX(-50%); z-index: 60;
    padding: 4px; gap: 4px; border-radius: 999px; background: rgba(21, 27, 51, .92);
    -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px); box-shadow: 0 16px 40px rgba(17, 23, 51, .35);
  }
  .mobile-switch button { display: inline-flex; align-items: center; gap: 7px; height: 44px; padding: 0 20px; border: 0; border-radius: 999px; background: transparent; color: rgba(255, 255, 255, .78); font-weight: 650; font-size: 14px; cursor: pointer; transition: background .25s var(--ease), color .2s; }
  .mobile-switch button[aria-pressed="true"] { background: #fff; color: var(--ink); }
  .toasts { left: 16px; right: 16px; bottom: 82px; align-items: stretch; }
  .demo-controls { bottom: 80px; }
  .guide-grid { grid-template-columns: 1fr; }
  .guide-wide .steps-list { grid-template-columns: 1fr; }
}

@media (max-width: 560px) {
  body { font-size: 14.5px; }
  .topbar-inner { padding: 0 14px; gap: 10px; }
  .draft-status span.long { display: none; }
  .hero { margin-top: 18px; padding: 0 14px; }
  .hero-card { padding: 28px 20px 24px; }
  .hero-lede { font-size: 15.5px; }
  .orb-a { width: 440px; height: 440px; margin-left: -220px; top: -200px; }
  .workspace { padding: 0 10px 110px; }
  .editor { padding: 16px 14px 20px; }
  .preview { padding: 16px 12px; }
  .group { padding: 16px 14px 4px; }
  .grid-2 { grid-template-columns: 1fr; }
  .step-label { font-size: 12px; }
  .step-btn { flex-direction: column; gap: 6px; text-align: center; padding: 6px 2px; }
  .step-head h2 { font-size: 22px; }
  .tpl-grid { grid-template-columns: 1fr; }
  .tier { padding: 12px; }
  .stage { padding: 10px; border-radius: 14px; }
  .compose-body { min-height: 220px; }
  .seg-icon button span { display: none; }
  .seg-icon button { padding: 0 12px; }
  .step-actions .btn { flex: 1 1 auto; }
  .export-actions .btn-lg, .export-locked .btn-lg { width: 100%; }
  .guide { padding: 20px; }
  .demo-controls { left: 10px; right: auto; max-width: calc(100vw - 20px); }
  .pro-banner { flex-wrap: wrap; }
  .pro-banner p { flex: 1 1 200px; }
  .pro-banner .btn { margin-left: 30px; }
  .dlg-body { padding: 26px 20px 20px; }
  .dlg-actions .btn { flex: 1 1 auto; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .001ms !important; animation-delay: 0ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; }
}
