/* Prompt & Present look and feel v1 (3 November 2026). Tokens and rationale: docs/brand-ui-v1.md. Class names are unchanged
   from the first build so the pages, app.js and the rendering tests keep working; only colours, type, shape and spacing moved. */
:root { --ink: #26222a; --text2: #46404a; --muted: #6b6069; --accent: #72405f; --accent-dark: #5c3350; --accent-fg: #ffffff; --tint: #e8dde4; --bg: #f2eeec; --card: #ffffff; --line: #e4dcdf; --line-strong: #b9aab4; --ok: #2f7a4a; --warn: #9a6414; --bad: #a3372f; --staging-bg: #f6e7c4; --staging-fg: #4d3a07; --owner-bg: var(--tint); --owner-line: #d6c3cf; --warn-bg: #fbf4e6; --warn-line: #e3c98f; --bad-bg: #fbeeec; --bad-line: #e3aaa3; --ok-bg: #eef6f0; --ok-line: #a9d0b6; --track: #e4dcdf; --toast-bg: #26222a; --toast-fg: #ffffff; --shadow: 0 1px 2px rgba(38, 34, 42, .06), 0 6px 18px rgba(38, 34, 42, .07); --art-s: 22%; --art-l: 92%; --art-fg-l: 32%; --r-card: 14px; --r-ctl: 10px; color-scheme: light; }
@media (prefers-color-scheme: dark) { :root { --ink: #ece6ea; --text2: #cfc6cc; --muted: #a99fa7; --accent: #cfa3bf; --accent-dark: #bd8dab; --accent-fg: #1f1c22; --tint: #3a2f37; --bg: #1f1c22; --card: #2a262d; --line: #3f373d; --line-strong: #5e535b; --ok: #8fd3a5; --warn: #e2b35a; --bad: #f0907f; --staging-bg: #4a3d12; --staging-fg: #f1dd9a; --owner-bg: var(--tint); --owner-line: #574852; --warn-bg: #3a2f14; --warn-line: #7a6424; --bad-bg: #3a1f1a; --bad-line: #7a3b31; --ok-bg: #1b2f22; --ok-line: #2f5a3d; --track: #3f373d; --toast-bg: #ece6ea; --toast-fg: #1f1c22; --shadow: 0 2px 12px rgba(0, 0, 0, .4); --art-s: 14%; --art-l: 24%; --art-fg-l: 82%; color-scheme: dark; } }
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif; color: var(--ink); background: var(--bg); line-height: 1.5; font-size: 16px; }
h1, h2, h3, .btn, .brand, .foot-cta .pill, .stepbar { font-family: ui-rounded, "SF Pro Rounded", "Nunito", "Segoe UI Variable Display", system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
a { color: var(--accent); }
.staging-bar { background: var(--staging-bg); color: var(--staging-fg); font-size: 13px; padding: 6px 16px; text-align: center; }
.site-header { padding: 12px 16px; background: var(--card); box-shadow: var(--shadow); display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.brand { color: var(--ink); font-weight: 800; text-decoration: none; font-size: 19px; letter-spacing: -.02em; display: inline-flex; align-items: center; gap: 5px; white-space: nowrap; }
.brand .amp { display: inline-flex; align-items: center; justify-content: center; width: 22px; height: 22px; border-radius: 6px; background: var(--accent); color: var(--accent-fg); font-size: 15px; line-height: 1; }
.page { max-width: 640px; margin: 0 auto; padding: 24px 16px 56px; }
.site-footer { max-width: 640px; margin: 0 auto; padding: 16px; color: var(--muted); font-size: 13px; border-top: 1px solid var(--line); }
.site-footer a { color: var(--muted); }
h1 { font-size: 28px; line-height: 1.1; letter-spacing: -.02em; font-weight: 800; margin: 8px 0 12px; }
h2 { font-size: 20px; line-height: 1.2; letter-spacing: -.01em; font-weight: 800; margin: 26px 0 8px; }
p { margin: 8px 0; }
.lead { font-size: 18px; color: var(--text2); }
.muted { color: var(--muted); font-size: 14px; }
.small { font-size: 13px; }
.steps { padding-left: 20px; }
.steps li { margin: 6px 0; }
.btn { display: inline-block; background: var(--accent); color: var(--accent-fg); text-decoration: none; border: 0; border-radius: var(--r-ctl); padding: 14px 20px; font-size: 17px; font-weight: 700; line-height: 1.2; cursor: pointer; -webkit-appearance: none; }
.btn:hover { background: var(--accent-dark); }
.btn.secondary { background: var(--card); color: var(--ink); border: 1px solid var(--line-strong); }
.btn.secondary:hover { background: var(--tint); }
.btn.small { padding: 8px 12px; font-size: 14px; border-radius: 8px; }
.btn.block { display: block; width: 100%; text-align: center; }
.btn[disabled] { opacity: .5; cursor: default; }
.btn-row { display: flex; gap: 10px; flex-wrap: wrap; margin: 16px 0; }
form.survey label { display: block; font-weight: 700; margin: 20px 0 6px; }
form.survey .hint { font-weight: 400; color: var(--muted); font-size: 14px; display: block; margin-top: 2px; }
input[type=text], input[type=number], input[type=password], textarea, select { width: 100%; font: inherit; padding: 12px; border: 1px solid var(--line-strong); border-radius: var(--r-ctl); background: var(--card); color: var(--ink); }
textarea { min-height: 180px; }
.range-row { display: flex; gap: 10px; align-items: center; }
.range-row span { color: var(--muted); }
.choice { display: flex; gap: 10px; flex-wrap: wrap; }
.choice label { font-weight: 500; margin: 0; display: flex; align-items: center; gap: 6px; padding: 10px 12px; border: 1px solid var(--line-strong); border-radius: var(--r-ctl); background: var(--card); }
.choice label:has(input:checked) { background: var(--tint); border-color: var(--accent); }
.prompt-box { white-space: pre-wrap; background: var(--card); border: 1px solid var(--line); border-radius: var(--r-ctl); padding: 12px; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 12px; max-height: 320px; overflow: auto; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--r-card); box-shadow: var(--shadow); padding: 14px 16px; margin: 12px 0; }
.card.warn { border-color: var(--warn-line); background: var(--warn-bg); }
.card.bad { border-color: var(--bad-line); background: var(--bad-bg); }
.card.ok { border-color: var(--ok-line); background: var(--ok-bg); }
.gift { display: block; }
.gift .kind { display: inline-block; font-size: 12px; text-transform: uppercase; letter-spacing: .4px; color: var(--muted); border: 1px solid var(--line); border-radius: 6px; padding: 1px 6px; margin-bottom: 6px; }
.gift h3 { margin: 0 0 6px; font-size: 18px; }
.gift .why { margin: 0 0 10px; color: var(--text2); }
.gift .meta { font-size: 13px; color: var(--muted); margin-bottom: 8px; }
.gift .buy { font-weight: 700; }
.owner-controls { display: flex; gap: 8px; margin-top: 10px; }
.share-row { display: flex; gap: 8px; flex-wrap: wrap; }
.share-row .btn { flex: 1 1 120px; text-align: center; }
.disclosure { font-size: 13px; color: var(--muted); margin: 18px 0; }
.cta { background: var(--card); border: 2px solid var(--accent); border-radius: var(--r-card); padding: 18px; text-align: center; margin: 24px 0; }
.cta h2 { margin-top: 0; }
.progress { height: 10px; background: var(--track); border-radius: 6px; overflow: hidden; }
.progress > div { height: 100%; background: var(--accent); width: 0; transition: width .4s; }
.toast { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); background: var(--toast-bg); color: var(--toast-fg); padding: 10px 16px; border-radius: var(--r-ctl); font-size: 14px; opacity: 0; transition: opacity .2s; pointer-events: none; }
.toast.show { opacity: 1; }
table.numbers { width: 100%; border-collapse: collapse; font-size: 14px; }
table.numbers th, table.numbers td { text-align: left; padding: 6px 8px; border-bottom: 1px solid var(--line); }
table.numbers td.n { text-align: right; font-variant-numeric: tabular-nums; }
.hp { position: absolute; left: -9999px; }
ul.plain { padding-left: 18px; }
.owner-bar { background: var(--owner-bg); border: 1px solid var(--owner-line); border-radius: var(--r-card); padding: 10px 12px; font-size: 14px; }
.owner-bar code { word-break: break-all; font-size: 12px; }
@media (min-width: 700px) { h1 { font-size: 36px; } }

/* The character (docs/brand-ui-v1.md, "Where the character appears"): home, the building page and dead ends only. The JPEG keeps the
   image's own pale background, a shade warmer than the page, so a radial fade hides the edge; browsers without mask-image show the square. */
.figure { display: block; margin: 0; -webkit-mask-image: radial-gradient(ellipse 62% 58% at 50% 50%, #000 58%, transparent 100%); mask-image: radial-gradient(ellipse 62% 58% at 50% 50%, #000 58%, transparent 100%); }
.figure img { display: block; width: 100%; height: auto; }
.hero-home { display: grid; grid-template-columns: minmax(0, 1fr) 128px; gap: 8px 12px; align-items: center; margin-bottom: 6px; }
.hero-home .figure { width: 128px; }
.hero-home h1 { margin: 0; }
@media (min-width: 700px) { .hero-home { grid-template-columns: minmax(0, 1fr) 200px; gap: 16px 24px; } .hero-home .figure { width: 200px; } }
@media (prefers-color-scheme: dark) { .figure { -webkit-mask-image: none; mask-image: none; border-radius: var(--r-card); overflow: hidden; } }
.aside-figure { float: right; width: 96px; margin: -6px 0 8px 12px; }
@media (min-width: 700px) { .aside-figure { width: 140px; } }
.note-figure { float: right; width: 72px; margin: 0 0 6px 10px; }

/* ---- list page: Throne-style sticky header button, hero with share, two-up tile grid, Linktree-style foot pill ---- */
.viewer .site-header, .owner .site-header { position: sticky; top: 0; z-index: 5; }
.hdr-cta { white-space: nowrap; }
.hero h1 { margin: 10px 0 6px; }
.hero .sub { color: var(--muted); font-size: 14.5px; margin: 0 0 10px; }
.hero .share-row { margin: 0 0 6px; }
.hero .share-row .btn { flex: 0 1 auto; }
.hero .disclosure { margin: 8px 0 14px; padding: 6px 10px; border-left: 2px solid var(--line-strong); font-size: 12.5px; }
.grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin: 6px 0 20px; }
@media (min-width: 600px) { .grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; } }
.tile { background: var(--card); border: 1px solid var(--line); border-radius: var(--r-card); box-shadow: var(--shadow); overflow: hidden; display: flex; flex-direction: column; min-width: 0; }
.tile-link { display: flex; flex-direction: column; flex: 1; color: inherit; text-decoration: none; padding: 0 0 10px; min-width: 0; }
.tile-link:active { background: var(--tint); }
.tile-art { position: relative; height: 96px; display: flex; align-items: center; justify-content: center; background: hsl(var(--h) var(--art-s) var(--art-l)); color: hsl(var(--h) 20% var(--art-fg-l)); }
.tile-art img { width: 72px; height: 72px; display: block; }
.tile-art .n { position: absolute; top: 6px; right: 10px; font-size: 12px; font-weight: 700; font-variant-numeric: tabular-nums; opacity: .7; }
.tile h3 { font-size: 14.5px; line-height: 1.25; letter-spacing: 0; font-weight: 700; margin: 10px 10px 2px; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; overflow-wrap: anywhere; }
.tile .idea { font-size: 12px; color: var(--muted); margin: 0 10px 6px; }
.tile .why { font-size: 12.5px; line-height: 1.4; color: var(--text2); margin: 0 10px 8px; flex: 1; }
.tile .meta { font-size: 11.5px; color: var(--muted); margin: 0 10px 8px; }
.tile .buy { display: block; margin: 0 10px; text-align: center; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; background: var(--accent); color: var(--accent-fg); border-radius: 9px; padding: 9px 8px; font-size: 13.5px; font-weight: 700; }
.tile.fallback .buy { background: var(--card); color: var(--ink); border: 1px solid var(--line-strong); }
.tile .owner-controls { padding: 0 10px 10px; margin: 0; }
.tile .owner-controls .btn { flex: 1; padding: 7px 6px; font-size: 12.5px; }
.foot-cta { text-align: center; margin: 24px 0 16px; }
.foot-cta .pill { display: inline-block; background: var(--accent); color: var(--accent-fg); border-radius: 999px; padding: 14px 24px; font-weight: 700; font-size: 16px; text-decoration: none; }
.foot-cta .pill:hover { background: var(--accent-dark); }
.foot-cta p { max-width: 36ch; margin: 10px auto 0; }
.center { text-align: center; }
@media (prefers-reduced-motion: reduce) { .progress > div, .toast { transition: none; } }

/* Step bar (3 November 2026): five numbered steps; the current one carries its label on narrow screens, all do from 600px. */
.stepbar { list-style: none; display: flex; gap: 6px; padding: 0; margin: 0 0 16px; font-size: 12px; align-items: center; flex-wrap: wrap; }
.stepbar li { display: inline-flex; align-items: center; gap: 5px; color: var(--muted); border: 1px solid var(--line); border-radius: 999px; padding: 3px 8px 3px 4px; }
.stepbar li .n { display: inline-flex; width: 18px; height: 18px; border-radius: 50%; align-items: center; justify-content: center; background: var(--line); color: var(--ink); font-size: 11px; font-weight: 700; }
.stepbar li.current { color: var(--accent-fg); background: var(--accent); border-color: var(--accent); font-weight: 700; }
.stepbar li.current .n { background: var(--accent-fg); color: var(--accent); }
.stepbar li.done { background: var(--tint); border-color: var(--tint); color: var(--ink); }
.stepbar li.done .n { background: var(--ok); color: #ffffff; }
.stepbar li:not(.current) .t { display: none; }
@media (min-width: 600px) { .stepbar li:not(.current) .t { display: inline; } }
.prompt-details summary { cursor: pointer; color: var(--muted); font-size: 14px; margin: 10px 0; }
.field-label { display: flex; justify-content: space-between; align-items: center; font-size: 14px; margin-bottom: 6px; }
