/* Beside — calm, roomy, native. One accent, opaque surfaces for what is read,
   translucent chrome, motion only where it explains something. */
:root {
  --bg: #F6F5F1; --surface: #FFFFFF; --surface-2: #F1F0EB; --sunk: #EBEAE4;
  --label: #1D1D1F; --label-2: #55554F; --label-3: #8A8A84; --hair: rgba(29, 29, 31, .1); --hair-2: rgba(29, 29, 31, .16);
  --accent: #1F6F5C; --accent-soft: rgba(31, 111, 92, .1); --on-accent: #fff;
  --danger: #C4372E; --ok: #1F7A4D;
  --scrim: rgba(20, 20, 18, .32); --mat-chrome: rgba(246, 245, 241, .78); --mat-blur: 18px;
  --shadow-1: 0 1px 2px rgba(0, 0, 0, .05), 0 1px 1px rgba(0, 0, 0, .03);
  --shadow-2: 0 12px 40px -12px rgba(0, 0, 0, .22), 0 2px 6px rgba(0, 0, 0, .06);
  --r-sm: 8px; --r: 12px; --r-lg: 18px; --r-pill: 999px;
  --ease-out: cubic-bezier(.23, 1, .32, 1); --ease-in-out: cubic-bezier(.77, 0, .175, 1); --ease-drawer: cubic-bezier(.32, .72, 0, 1);
  --font: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI Variable Text", "Segoe UI", system-ui, sans-serif;
  --font-display: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Segoe UI Variable Display", "Segoe UI", system-ui, sans-serif;
  --serif: "New York", "Iowan Old Style", Charter, Cambria, Georgia, serif;
  --mono: ui-monospace, "SF Mono", "Cascadia Code", Consolas, monospace;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #121312; --surface: #1C1D1C; --surface-2: #232523; --sunk: #0D0E0D;
    --label: #F2F2EE; --label-2: #B4B4AE; --label-3: #7D7D78; --hair: rgba(255, 255, 255, .09); --hair-2: rgba(255, 255, 255, .15);
    --accent: #4CB89A; --accent-soft: rgba(76, 184, 154, .14); --on-accent: #0B1A15;
    --danger: #FF6B5F; --ok: #4CC487; --scrim: rgba(0, 0, 0, .55); --mat-chrome: rgba(18, 19, 18, .74);
    --shadow-2: 0 18px 50px -12px rgba(0, 0, 0, .7), 0 2px 8px rgba(0, 0, 0, .4);
    color-scheme: dark;
  }
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scrollbar-width: thin; scrollbar-color: var(--hair-2) transparent; }
::-webkit-scrollbar { width: 9px; height: 9px; }
::-webkit-scrollbar-thumb { background: var(--hair-2); border-radius: 9px; border: 2px solid transparent; background-clip: padding-box; }
::-webkit-scrollbar-thumb:hover { background-color: var(--label-3); }
::-webkit-scrollbar-track, ::-webkit-scrollbar-corner { background: transparent; }
body { margin: 0; min-height: 100dvh; background: var(--bg); color: var(--label); font: 15px/1.55 var(--font); letter-spacing: -.005em;
  -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; }
h1, h2, h3 { margin: 0; font-family: var(--font-display); letter-spacing: -.02em; line-height: 1.15; }
h1 { font-size: 30px; font-weight: 700; } h2 { font-size: 20px; font-weight: 650; } h3 { font-size: 15px; font-weight: 600; letter-spacing: -.01em; }
p { margin: 0; } a { color: inherit; }
button, input, select, textarea { font: inherit; color: inherit; letter-spacing: inherit; }
button { cursor: pointer; background: none; border: 0; padding: 0; -webkit-tap-highlight-color: transparent; }
img { max-width: 100%; display: block; }
:focus-visible { outline: 2.5px solid var(--accent); outline-offset: 2px; border-radius: 6px; }
.skip { position: absolute; left: -999px; } .skip:focus { left: 12px; top: 12px; z-index: 99; background: var(--surface); padding: 8px 12px; border-radius: 8px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.muted { color: var(--label-2); } .hint { color: var(--label-3); font-size: 13px; line-height: 1.45; } .hint.ok { color: var(--ok); } .hint.bad, .err { color: var(--danger); font-size: 13px; }
.err:empty { display: none; } .center { text-align: center; } .pad { padding: 24px 0; }
main { outline: none; }

/* ---------- buttons ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 40px; padding: 0 16px; border-radius: var(--r-pill);
  font-weight: 600; font-size: 14.5px; text-decoration: none; white-space: nowrap; transition: transform 160ms var(--ease-out), background-color 160ms ease, opacity 160ms ease; }
.btn:active:not(:disabled) { transform: scale(.97); }
.btn:disabled { opacity: .55; cursor: default; }
.btn.sm { height: 34px; padding: 0 13px; font-size: 13.5px; }
.btn.big { height: 50px; padding: 0 28px; font-size: 16px; }
.btn.wide { width: 100%; }
.btn.primary { background: var(--label); color: var(--bg); }
.btn.accent { background: var(--f-accent, var(--accent)); color: var(--f-on-accent, var(--on-accent)); }
.btn.ghost { background: var(--surface-2); color: var(--label); }
.btn.danger { background: var(--danger); color: #fff; }
.btn.danger-ghost { background: none; color: var(--danger); box-shadow: inset 0 0 0 1px color-mix(in oklab, var(--danger) 40%, transparent); }
.danger-text { color: var(--danger) !important; }
@media (hover: hover) and (pointer: fine) {
  .btn.ghost:hover { background: var(--sunk); } .btn.primary:hover { opacity: .88; } .icon-btn:hover { background: var(--surface-2); }
}
.icon-btn { display: inline-grid; place-items: center; width: 36px; height: 36px; border-radius: 10px; color: var(--label-2); transition: transform 160ms var(--ease-out), background-color 160ms ease; }
.icon-btn:active { transform: scale(.94); } .icon-btn.xs { width: 28px; height: 28px; border-radius: 8px; } .icon-btn.danger { color: var(--danger); }
.icon-btn.spin svg { animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.link-btn { color: var(--accent); font-weight: 600; text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 1px; }
.actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }

/* ---------- inputs ---------- */
.in { width: 100%; min-height: 44px; padding: 10px 14px; border-radius: var(--r); background: var(--surface); border: 1px solid var(--hair-2);
  font-size: 16px; transition: border-color 160ms ease, box-shadow 160ms ease; -webkit-appearance: none; appearance: none; }
textarea.in { resize: vertical; line-height: 1.5; }
select.in { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%238A8A84' stroke-width='2' stroke-linecap='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 12px center; background-size: 16px; padding-right: 36px; }
.in:focus { outline: none; border-color: var(--f-accent, var(--accent)); box-shadow: 0 0 0 4px color-mix(in oklab, var(--f-accent, var(--accent)) 16%, transparent); }
.in:disabled { opacity: 1; background: var(--surface-2); color: var(--label-3); }
.in.mono { font-family: var(--mono); font-size: 13px; } .in.sm { min-height: 34px; padding: 6px 10px; font-size: 14px; }
.field { display: grid; gap: 6px; } .field > label { font-size: 13px; font-weight: 600; color: var(--label-2); }
.stack { display: grid; gap: 12px; } .stack.lg { gap: 28px; }
.inline { display: flex; gap: 6px; align-items: center; }
.switch { display: inline-flex; align-items: center; gap: 10px; cursor: pointer; font-size: 14px; user-select: none; }
.switch input { position: absolute; opacity: 0; }
.switch > span:not(.sw-text) { position: relative; width: 40px; height: 24px; border-radius: 12px; background: var(--hair-2); transition: background-color 200ms ease; flex: none; }
.switch > span:not(.sw-text)::after { content: ""; position: absolute; top: 2px; left: 2px; width: 20px; height: 20px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.25); transition: transform 220ms var(--ease-out); }
.switch input:checked + span { background: var(--accent); } .switch input:checked + span::after { transform: translateX(16px); }
.switch input:focus-visible + span { outline: 2.5px solid var(--accent); outline-offset: 2px; }
.switch.sm > span:not(.sw-text) { width: 34px; height: 20px; } .switch.sm > span:not(.sw-text)::after { width: 16px; height: 16px; } .switch.sm input:checked + span::after { transform: translateX(14px); }
.row-switch { display: flex; justify-content: space-between; width: 100%; padding: 6px 0; }
.sw-text { display: grid; } .sw-text small { color: var(--label-3); font-size: 12.5px; }

/* ---------- chrome ---------- */
.topbar { position: sticky; top: 0; z-index: 20; display: flex; align-items: center; justify-content: space-between; gap: 8px;
  height: 58px; padding: 0 max(14px, env(safe-area-inset-left)); padding-top: env(safe-area-inset-top);
  background: var(--mat-chrome); -webkit-backdrop-filter: blur(var(--mat-blur)) saturate(1.6); backdrop-filter: blur(var(--mat-blur)) saturate(1.6);
  border-bottom: 1px solid var(--hair); }
.tb-left, .tb-right { display: flex; align-items: center; gap: 6px; min-width: 0; }
.tb-title { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 40vw; }
.status { font-size: 13px; color: var(--label-3); white-space: nowrap; }
.logo { display: inline-flex; align-items: center; gap: 9px; font: 700 19px/1 var(--font-display); letter-spacing: -.03em; text-decoration: none; }
.logo-mark { display: inline-flex; gap: 3px; } .logo-mark i { width: 8px; height: 20px; border-radius: 4px; background: var(--accent); }
.logo-mark i + i { opacity: .45; }
@media (prefers-reduced-transparency: reduce) { .topbar { background: var(--bg); backdrop-filter: none; -webkit-backdrop-filter: none; } }

/* ---------- home ---------- */
.hero { max-width: 760px; margin: 0 auto; padding: 72px 20px 40px; }
.display { font-size: clamp(40px, 8vw, 64px); letter-spacing: -.045em; line-height: 1.02; font-weight: 750; }
.lede { margin-top: 18px; font-size: 18.5px; line-height: 1.5; color: var(--label-2); max-width: 34em; letter-spacing: -.012em; }
.tpl-row { margin-top: 36px; display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.tpl { display: flex; flex-direction: column; gap: 22px; padding: 16px; border-radius: var(--r-lg); background: var(--surface); box-shadow: var(--shadow-1);
  text-decoration: none; font-weight: 600; font-size: 14.5px; border: 1px solid var(--hair);
  animation: rise 420ms var(--ease-out) both; animation-delay: calc(var(--i) * 40ms); transition: transform 160ms var(--ease-out), box-shadow 200ms ease; }
.tpl:active { transform: scale(.97); }
@media (hover: hover) and (pointer: fine) { .tpl:hover { box-shadow: var(--shadow-2); } }
.tpl-emoji { width: 40px; height: 40px; display: grid; place-items: center; font-size: 21px; border-radius: 12px; background: color-mix(in oklab, var(--a) 14%, var(--surface)); }
@keyframes rise { from { opacity: 0; transform: translateY(8px); } }
.list-sec, .promise, .foot { max-width: 760px; margin: 0 auto; padding: 0 20px; }
.sec-title { font-size: 13px; font-weight: 600; color: var(--label-3); text-transform: uppercase; letter-spacing: .06em; margin: 28px 0 8px; }
.rows { list-style: none; margin: 0; padding: 0; background: var(--surface); border-radius: var(--r-lg); border: 1px solid var(--hair); overflow: hidden; }
.rows li + li { border-top: 1px solid var(--hair); }
.row { display: flex; align-items: center; gap: 12px; min-height: 54px; padding: 10px 16px; text-decoration: none; transition: background-color 160ms ease; }
.row:active:not(.static) { background: var(--surface-2); }
@media (hover: hover) and (pointer: fine) { a.row:hover { background: var(--surface-2); } }
.row-title { flex: 1; min-width: 0; font-weight: 550; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.row-meta { color: var(--label-3); font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 45%; }
.row svg { color: var(--label-3); flex: none; }
.promise { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 28px; padding-top: 56px; padding-bottom: 56px; }
.pr h3 { margin: 12px 0 4px; } .pr p { color: var(--label-2); font-size: 14px; }
.pr-ic { display: inline-grid; place-items: center; width: 36px; height: 36px; border-radius: 10px; background: var(--accent-soft); color: var(--accent); }
.foot { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; padding-top: 24px; padding-bottom: 40px; color: var(--label-3); font-size: 13px; border-top: 1px solid var(--hair); }
.foot.small { justify-content: center; border: 0; gap: 20px; } .foot a, .foot .link-btn { color: var(--label-3); font-weight: 500; text-decoration: none; }
.narrow { max-width: 560px; margin: 0 auto; padding: 32px 20px 64px; } .narrow.wide-ish { max-width: 820px; }
.narrow > h1 { margin-bottom: 4px; }
.auth h1 { margin: 24px 0 20px; } .auth-body { margin-top: 20px; }
.notice { padding-top: 18vh; display: grid; gap: 14px; justify-items: center; } .notice .logo { margin-bottom: 20px; }
.spinner { width: 26px; height: 26px; border-radius: 50%; border: 2.5px solid var(--hair-2); border-top-color: var(--label-2); animation: spin .8s linear infinite; }
.prose section { margin-top: 26px; } .prose h2 { font-size: 17px; margin-bottom: 6px; } .prose p { color: var(--label-2); }

/* ---------- tabs & segmented ---------- */
.ptabs { display: flex; gap: 22px; border-bottom: 1px solid var(--hair); margin: 8px 0 18px; overflow-x: auto; scrollbar-width: none; }
.ptab { position: relative; height: 40px; font-size: 15px; font-weight: 600; color: var(--label-3); white-space: nowrap; transition: color 160ms ease; }
.ptab.active { color: var(--label); }
.ptab::after { content: ""; position: absolute; left: 50%; bottom: -1px; width: 18px; height: 3px; margin-left: -9px; border-radius: 3px; background: var(--accent);
  opacity: 0; transform: scaleX(.4); transition: opacity .18s ease, transform .22s var(--ease-out); }
.ptab.active::after { opacity: 1; transform: none; }
.seg { display: flex; flex-wrap: wrap; gap: 4px; }
.seg .opt { height: 32px; padding: 0 13px; border-radius: var(--r-pill); color: var(--label-2); font-size: 13.5px; font-weight: 500; transition: background-color 160ms ease, color 160ms ease; }
.seg .opt.active { background: var(--surface-2); color: var(--label); font-weight: 600; box-shadow: inset 0 0 0 1px var(--hair); }
.lbl { font-size: 12.5px; text-transform: uppercase; letter-spacing: .06em; color: var(--label-3); font-weight: 600; margin-bottom: 4px; }
.levels { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 6px; }
.lvl { text-align: left; padding: 10px 12px; border-radius: var(--r); display: grid; gap: 2px; box-shadow: inset 0 0 0 1px var(--hair); transition: box-shadow 160ms ease, background-color 160ms ease; }
.lvl b { font-size: 14px; } .lvl small { color: var(--label-3); font-size: 12px; line-height: 1.3; }
.lvl.on { background: var(--accent-soft); box-shadow: inset 0 0 0 1.5px var(--accent); }
details.more { border-top: 1px solid var(--hair); padding-top: 10px; }
details.more summary { cursor: pointer; font-weight: 600; font-size: 14px; color: var(--label-2); list-style: none; display: flex; align-items: center; gap: 6px; }
details.more summary::before { content: ""; width: 7px; height: 7px; border-right: 1.8px solid currentColor; border-bottom: 1.8px solid currentColor; transform: rotate(-45deg); transition: transform 200ms var(--ease-out); }
details.more[open] summary::before { transform: rotate(45deg); }
details.more > div, details.more > textarea { margin-top: 12px; }

/* ---------- sheet (opaque drawer over a dimmed, blurred scrim) ---------- */
.scrim { position: fixed; inset: 0; z-index: 50; background: var(--scrim); opacity: 0; transition: opacity 240ms ease; -webkit-backdrop-filter: blur(3px); backdrop-filter: blur(3px); }
.scrim.in { opacity: 1; }
.sheet { position: absolute; top: 10px; right: 10px; bottom: 10px; width: min(420px, calc(100vw - 20px)); display: flex; flex-direction: column;
  background: var(--surface); border-radius: 20px; box-shadow: var(--shadow-2); transform: translateX(24px); opacity: 0;
  transition: transform 340ms var(--ease-drawer), opacity 220ms ease; }
.sheet.wide { width: min(560px, calc(100vw - 20px)); }
.scrim.in .sheet { transform: none; opacity: 1; }
.sheet-head { display: flex; align-items: center; justify-content: space-between; padding: 16px 14px 8px 22px; }
.sheet-head h2 { font-size: 19px; }
.sheet-body { flex: 1; overflow-y: auto; padding: 10px 22px 28px; overscroll-behavior: contain; }
.grab { display: none; }
@media (max-width: 640px) {
  .sheet, .sheet.wide { top: auto; left: 0; right: 0; bottom: 0; width: 100%; max-height: 88dvh; border-radius: 20px 20px 0 0; transform: translateY(40px); padding-bottom: env(safe-area-inset-bottom); }
  .grab { display: block; width: 38px; height: 5px; border-radius: 3px; background: var(--hair-2); margin: 8px auto 0; }
}
.upsell { padding: 16px; border-radius: var(--r); background: var(--surface-2); display: grid; gap: 10px; justify-items: start; }
.share-row { display: flex; gap: 8px; } .share-row .in { flex: 1; min-width: 0; }

/* ---------- toast ---------- */
#toasts { position: fixed; left: 50%; bottom: max(20px, env(safe-area-inset-bottom)); transform: translateX(-50%); z-index: 90; display: grid; gap: 8px; justify-items: center; pointer-events: none; }
.toast { padding: 10px 16px; border-radius: var(--r-pill); background: var(--label); color: var(--bg); font-size: 14px; font-weight: 550; box-shadow: var(--shadow-2);
  opacity: 0; transform: translateY(8px) scale(.97); transition: opacity 200ms ease, transform 260ms var(--ease-out); }
.toast.in { opacity: 1; transform: none; } .toast.bad { background: var(--danger); color: #fff; }

/* ---------- popovers ---------- */
.pop { position: absolute; z-index: 40; background: var(--surface); border-radius: 14px; box-shadow: var(--shadow-2), 0 0 0 1px var(--hair); }
.slash { width: 240px; max-height: 320px; overflow-y: auto; padding: 6px; opacity: 0; transform: scale(.96); transition: opacity 150ms ease, transform 180ms var(--ease-out); }
.slash.in { opacity: 1; transform: none; }
.slash-item { display: flex; align-items: center; gap: 10px; width: 100%; height: 36px; padding: 0 8px; border-radius: 9px; font-size: 14px; text-align: left; }
.slash-item.sel, .slash-item:focus { background: var(--surface-2); outline: none; }
.si-ic { display: grid; place-items: center; width: 26px; height: 26px; border-radius: 7px; background: var(--surface-2); color: var(--label-2); }
.slash-item.sel .si-ic { background: var(--surface); }
.stk-bar { display: flex; gap: 2px; padding: 4px; border-radius: 12px; }

/* ---------- the form page (shared by editor and public view) ---------- */
.fwrap { overflow-x: clip; --f-accent: var(--accent); min-height: calc(100dvh - 58px); padding: 32px 16px 48px; background-color: var(--bg); background-size: cover; background-position: center; background-attachment: fixed; }
.fwrap[data-bg="tint"] { background-color: color-mix(in oklab, var(--f-accent) 7%, var(--bg)); }
.fwrap[data-bg="dots"] { background-color: color-mix(in oklab, var(--f-accent) 5%, var(--bg)); background-image: radial-gradient(color-mix(in oklab, var(--f-accent) 30%, transparent) 1.2px, transparent 1.4px); background-size: 22px 22px; background-attachment: scroll; }
.fwrap[data-bg="grid"] { background-color: var(--bg); background-image: linear-gradient(var(--hair) 1px, transparent 1px), linear-gradient(90deg, var(--hair) 1px, transparent 1px); background-size: 28px 28px; background-attachment: scroll; }
.fwrap[data-bg="glow"] { background-color: var(--bg); background-image: radial-gradient(60% 50% at 20% 0%, color-mix(in oklab, var(--f-accent) 26%, transparent), transparent), radial-gradient(50% 40% at 100% 30%, color-mix(in oklab, var(--f-accent) 14%, transparent), transparent); }
.fwrap[data-bg="image"] { background-image: var(--f-bg-image); }
@media (max-width: 640px) { .fwrap { padding: 12px 8px 32px; background-attachment: scroll; } }
.fpage { position: relative; max-width: 680px; margin: 0 auto; padding: 44px 48px 40px; background: var(--surface); border-radius: 22px;
  box-shadow: var(--shadow-1), 0 30px 60px -40px rgba(0, 0, 0, .25); }
@media (max-width: 640px) { .fpage { padding: 28px 20px 28px; border-radius: 18px; } }
.fcover { margin: -44px -48px 28px; border-radius: 22px 22px 0 0; overflow: hidden; aspect-ratio: 3 / 1; background: var(--surface-2); }
.fcover img { width: 100%; height: 100%; object-fit: cover; }
@media (max-width: 640px) { .fcover { margin: -28px -20px 22px; border-radius: 18px 18px 0 0; aspect-ratio: 2.2 / 1; } }
.ftitle { font-family: var(--f-title-font, var(--serif)); font-size: clamp(28px, 5vw, 38px); font-weight: 650; letter-spacing: -.025em; line-height: 1.12; outline: none; position: relative; z-index: 2; overflow-wrap: anywhere; }
.fdesc { margin-top: 10px; color: var(--label-2); font-size: 16.5px; line-height: 1.55; outline: none; white-space: pre-wrap; position: relative; z-index: 2; overflow-wrap: anywhere; }
.fh2 { margin-top: 30px; font-family: var(--f-title-font); font-size: 22px; position: relative; z-index: 2; }
.ftext { margin-top: 14px; color: var(--label-2); white-space: pre-wrap; position: relative; z-index: 2; }
.fpage hr { border: 0; border-top: 1px solid var(--hair); margin: 26px 0; }
[contenteditable]:empty::before { content: attr(data-ph); color: var(--label-3); pointer-events: none; }
.fform { margin-top: 18px; position: relative; z-index: 2; }
.fq { padding: 20px 0; border-bottom: 1px solid var(--hair); }
.fq:last-of-type { border-bottom: 0; }
.fq-title { display: block; font-size: 16.5px; font-weight: 600; letter-spacing: -.012em; margin-bottom: 4px; overflow-wrap: anywhere; }
.fq-title .req { color: var(--f-accent); }
.fq-help { color: var(--label-3); font-size: 14px; margin-bottom: 10px; }
.fq .in { margin-top: 8px; }
.fq.bad .in { border-color: var(--danger); }
.qerr { color: var(--danger); font-size: 13.5px; margin-top: 6px; } .qerr:empty, .qnote:empty { display: none; }
.qnote { color: var(--label-3); font-size: 13px; margin-top: 6px; }
.auto-note { font-size: 12.5px; color: var(--ok); margin-top: 6px; }
.opts { display: grid; gap: 6px; margin-top: 8px; }
.opt { display: flex; align-items: center; gap: 12px; min-height: 46px; padding: 10px 14px; border-radius: var(--r); border: 1px solid var(--hair-2); cursor: pointer; transition: border-color 160ms ease, background-color 160ms ease; }
.opt input { position: absolute; opacity: 0; pointer-events: none; }
.opt .mark, .opt-row .mark { flex: none; width: 20px; height: 20px; border-radius: 50%; border: 1.8px solid var(--hair-2); transition: border-color 160ms ease, box-shadow 160ms ease, background-color 160ms ease; }
.opts[role="group"] .mark, .opt-row .mark.checks { border-radius: 6px; }
.opt-row .mark.dropdown { border-radius: 4px; width: 14px; height: 2px; border: 0; background: var(--label-3); }
.opt:has(input:checked) { border-color: var(--f-accent); background: color-mix(in oklab, var(--f-accent) 7%, transparent); }
.opt input:checked + .mark { border-color: var(--f-accent); background: var(--f-accent); box-shadow: inset 0 0 0 3.5px var(--surface); }
.opts[role="group"] input:checked + .mark { box-shadow: none; background: var(--f-accent) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12.5l4.5 4.5L19 7.5'/%3E%3C/svg%3E") center / 14px no-repeat; }
.opt input:focus-visible + .mark { outline: 2.5px solid var(--f-accent); outline-offset: 2px; }
.seg-answer { display: flex; gap: 8px; margin-top: 8px; }
.pill { min-width: 84px; height: 44px; padding: 0 18px; border-radius: var(--r-pill); border: 1px solid var(--hair-2); font-weight: 600; transition: transform 160ms var(--ease-out), background-color 160ms ease; }
.pill:active { transform: scale(.97); } .pill.on { background: var(--f-accent); border-color: var(--f-accent); color: var(--f-on-accent); }
.stars { display: flex; gap: 4px; margin-top: 6px; }
.stars .pt { width: 44px; height: 44px; display: grid; place-items: center; color: var(--hair-2); transition: transform 160ms var(--ease-out), color 120ms ease; }
.stars .pt.on { color: #F5B73B; } .stars .pt.on svg { fill: currentColor; } .stars .pt:active { transform: scale(.9); }
.scale { display: grid; grid-template-columns: repeat(10, 1fr); gap: 4px; margin-top: 8px; }
.scale .pt { height: 44px; border-radius: 10px; border: 1px solid var(--hair-2); font-weight: 600; font-variant-numeric: tabular-nums; transition: background-color 120ms ease; }
.scale .pt.on { background: var(--f-accent); color: var(--f-on-accent); border-color: var(--f-accent); }
.fsend { padding-top: 26px; display: grid; gap: 12px; justify-items: start; }
.fine { color: var(--label-3); font-size: 13px; display: flex; align-items: center; gap: 4px; }
.made { font-weight: 600 !important; }
.sent { display: grid; justify-items: center; text-align: center; gap: 14px; padding: 40px 0; }
.sent-mark { width: 64px; height: 64px; border-radius: 50%; display: grid; place-items: center; background: var(--f-accent); color: var(--f-on-accent); animation: pop 420ms var(--ease-out) both; }
@keyframes pop { from { transform: scale(.6); opacity: 0; } }

/* stickers */
.stk-layer { position: absolute; inset: 0; pointer-events: none; z-index: 1; }
.editable .stk-layer { z-index: 3; }
.stk { position: absolute; left: 0; top: 0; transform-origin: center; user-select: none; -webkit-user-select: none; }
.stk.back { opacity: .9; }
.editable .stk.back { z-index: 0; }
.stk svg, .stk img { width: 100%; height: auto; display: block; filter: drop-shadow(0 3px 6px rgba(0, 0, 0, .12)); }
.stk-emoji { display: block; font-size: 1em; line-height: 1; width: 100%; text-align: center; }
.stk:has(.stk-emoji) { font-size: 54px; }
.stk-text { display: inline-block; padding: .4em .8em; border-radius: 10px; background: var(--f-accent); color: var(--f-on-accent); font: 700 1em/1.2 var(--f-title-font); white-space: nowrap; transform: rotate(-2deg); box-shadow: 0 4px 10px rgba(0,0,0,.12); }
.fwrap.no-deco .stk-layer, .fwrap.no-deco .fcover { display: none; }
.fwrap.no-deco { background-image: none !important; }
.editable .stk-layer { pointer-events: none; } .editable .stk { pointer-events: auto; cursor: grab; touch-action: none; }
.editable .stk.dragging { cursor: grabbing; }
.editable .stk.sel { outline: 2px dashed var(--accent); outline-offset: 6px; border-radius: 6px; }
.stk-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(52px, 1fr)); gap: 6px; }
.stk-pick { aspect-ratio: 1; padding: 8px; border-radius: 12px; background: var(--surface-2); display: grid; place-items: center; transition: transform 160ms var(--ease-out); }
.stk-pick:active { transform: scale(.92); } .stk-pick svg { width: 100%; height: 100%; } .stk-pick.emoji { font-size: 26px; }
.swatches { display: flex; flex-wrap: wrap; gap: 10px; }
.sw { width: 34px; height: 34px; border-radius: 50%; background: var(--c); box-shadow: inset 0 0 0 1px rgba(0,0,0,.08); transition: transform 160ms var(--ease-out), box-shadow 160ms ease; }
.sw.on { box-shadow: 0 0 0 2.5px var(--surface), 0 0 0 4.5px var(--c); } .sw:active { transform: scale(.92); }
.sw.custom { position: relative; overflow: hidden; background: conic-gradient(#f55, #fb3, #5c5, #3bf, #95f, #f5a, #f55); cursor: pointer; }
.sw.custom input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }

/* ---------- editor ---------- */
.editing .fwrap { min-height: calc(100dvh - 58px); }
.blk { position: relative; z-index: 2; border-radius: 12px; }
.blk-q { padding: 18px 0 10px; border-bottom: 1px solid var(--hair); }
.blk-text .txt { padding: 6px 0; outline: none; color: var(--label-2); white-space: pre-wrap; min-height: 1.6em; }
.blk-text.heading .txt { font: 650 22px/1.2 var(--f-title-font); color: var(--label); margin-top: 18px; }
.blk.just-added { animation: rise 300ms var(--ease-out); }
.qhead { display: flex; gap: 4px; align-items: baseline; }
.qtitle { flex: 0 1 auto; font-size: 16.5px; font-weight: 600; outline: none; min-width: 0; overflow-wrap: anywhere; }
.req-dot { color: var(--f-accent); font-weight: 700; opacity: 0; } .blk.req .req-dot { opacity: 1; }
.qhelp { font-size: 14px; color: var(--label-3); outline: none; margin: 2px 0 6px; }
.qhelp:empty:not(:focus) { height: 0; margin: 0; overflow: hidden; } .blk-q:focus-within .qhelp:empty { height: auto; margin: 2px 0 6px; }
.qctl { pointer-events: none; }
.qctl .in, .qctl .opt, .qctl .pill, .qctl .pt { opacity: .7; }
.qfoot { display: flex; align-items: center; gap: 12px; margin-top: 6px; flex-wrap: wrap; opacity: 0; transition: opacity 160ms ease; }
.blk:hover .qfoot, .blk:focus-within .qfoot { opacity: 1; }
@media (hover: none) { .qfoot { opacity: 1; } }
.qfoot .blk-tools { margin-left: auto; }
.mini-select { height: 32px; padding: 0 30px 0 10px; border-radius: 9px; border: 1px solid var(--hair-2); background: var(--surface) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%238A8A84' stroke-width='2' stroke-linecap='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E") right 8px center / 14px no-repeat; font-size: 13.5px; -webkit-appearance: none; appearance: none; }
.blk-tools { display: flex; gap: 0; }
.blk-text > .blk-tools { position: absolute; right: -4px; top: 2px; opacity: 0; transition: opacity 160ms ease; background: var(--surface); border-radius: 9px; }
.blk-text:hover > .blk-tools, .blk-text:focus-within > .blk-tools { opacity: 1; }
@media (max-width: 640px) { .blk-text > .blk-tools { position: static; opacity: 1; justify-content: flex-end; } .blk-text:not(:focus-within) > .blk-tools { display: none; } }
.opt-edit { display: grid; gap: 4px; margin-top: 6px; justify-items: start; }
.opt-row { display: flex; align-items: center; gap: 10px; width: 100%; }
.opt-in { flex: 1; min-width: 0; height: 38px; border: 0; border-bottom: 1px solid transparent; background: none; font-size: 15px; outline: none; }
.opt-in:focus { border-bottom-color: var(--f-accent); }
.opt-edit .link-btn { margin: 6px 0 0 30px; font-size: 14px; text-decoration: none; }
.add-line { display: flex; align-items: center; gap: 8px; margin-top: 16px; height: 44px; padding: 0 14px; border-radius: 12px; color: var(--label-3); font-size: 14px; width: 100%; border: 1.5px dashed var(--hair-2); position: relative; z-index: 2; transition: color 160ms ease, border-color 160ms ease; }
@media (hover: hover) and (pointer: fine) { .add-line:hover { color: var(--label); border-color: var(--label-3); } }
.fsubmit-preview { margin-top: 26px; pointer-events: none; opacity: .5; position: relative; z-index: 2; }

/* ---------- inbox ---------- */
.privacy-line svg { vertical-align: -2px; }
.privacy-line { display: block; color: var(--label-3); font-size: 13px; margin-bottom: 8px; }
.cards { display: grid; gap: 12px; }
.card { background: var(--surface); border: 1px solid var(--hair); border-radius: var(--r-lg); padding: 18px 20px; }
.reply.held { border-color: color-mix(in oklab, #E5A50A 50%, var(--hair)); }
.reply-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; font-size: 14px; }
.who { font-weight: 650; display: inline-flex; align-items: center; gap: 4px; }
.verified { display: inline-grid; place-items: center; width: 17px; height: 17px; border-radius: 50%; background: var(--accent); color: var(--on-accent); margin-left: 4px; }
.unverified { color: var(--label-3); font-weight: 400; }
.ttl { margin-left: auto; font-size: 12.5px; color: var(--label-3); font-variant-numeric: tabular-nums; }
.ttl.kept { color: var(--ok); }
.flag { margin-top: 8px; font-size: 13px; color: #A06A00; }
@media (prefers-color-scheme: dark) { .flag { color: #E5B44A; } }
.answers { margin: 14px 0 0; display: grid; gap: 12px; }
.answers dt { font-size: 13px; color: var(--label-3); font-weight: 550; }
.answers dd { margin: 2px 0 0; white-space: pre-wrap; overflow-wrap: anywhere; }
.reply-foot { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 16px; padding-top: 12px; border-top: 1px solid var(--hair); }
.empty { text-align: center; padding: 56px 16px; display: grid; gap: 10px; justify-items: center; }
.summary { display: grid; gap: 12px; }
.sum header { display: flex; justify-content: space-between; gap: 12px; align-items: baseline; margin-bottom: 12px; }
.sum header span { font-size: 13px; white-space: nowrap; }
.big-num { font: 700 30px/1 var(--font-display); letter-spacing: -.03em; margin-bottom: 12px; } .big-num small { font-size: 14px; color: var(--label-3); font-weight: 500; letter-spacing: 0; }
.bars { display: grid; gap: 8px; }
.bar-row { display: grid; grid-template-columns: minmax(60px, 34%) 1fr 32px; gap: 10px; align-items: center; font-size: 14px; }
.bar-label { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bar { height: 10px; border-radius: 5px; background: var(--surface-2); overflow: hidden; }
.bar i { display: block; height: 100%; background: var(--accent); border-radius: 5px; transform-origin: left; transition: transform 500ms var(--ease-out); }
.bar-n { text-align: right; font-variant-numeric: tabular-nums; color: var(--label-2); }
.quotes { margin: 0; padding: 0; list-style: none; display: grid; gap: 8px; } .quotes li { padding: 10px 12px; border-radius: 10px; background: var(--surface-2); font-size: 14px; overflow-wrap: anywhere; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 1ms !important; animation-delay: 0ms !important; transition-property: opacity, background-color, color, border-color !important; }
}
@media (prefers-contrast: more) { :root { --hair: rgba(0, 0, 0, .35); --hair-2: rgba(0, 0, 0, .5); --label-3: #55554F; } }
@media (max-width: 480px) { .editing .tb-right .btn.ghost.sm { display: none; } .hero { padding-top: 44px; } .status { display: none; } }

/* ---------- home: one line that writes itself ---------- */
.home .bare-top { display: flex; justify-content: space-between; align-items: center; height: 64px; padding: 0 max(20px, env(safe-area-inset-left)); }
.quiet-link { color: var(--label-2); text-decoration: none; font-weight: 550; font-size: 14.5px; padding: 10px 4px; }
.stage { min-height: calc(100dvh - 64px - 160px); display: grid; align-content: center; justify-items: center; gap: 40px; padding: 40px 20px; text-align: center; }
.stage .display { font-size: clamp(42px, 9vw, 92px); letter-spacing: -.05em; line-height: 1.02; min-height: 1.1em; }
.caret { display: inline-block; width: .06em; height: .9em; margin-left: .06em; vertical-align: -.08em; background: var(--accent); border-radius: 2px; animation: blink 1.1s steps(1) infinite; }
@keyframes blink { 50% { opacity: 0; } }
.start { min-width: 148px; }
.home .list-sec { max-width: 560px; padding-bottom: 24px; }
.tpl-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; }
@media (prefers-reduced-motion: reduce) { .caret { display: none; } }
