/* =====================================================================
   Theme: Bayan (from the character sheet)
   Sticker-style UI: chunky outlines, offset shadows, slight tilts.
   Components only use these tokens; never hardcode colors.
   ===================================================================== */

:root {
  --radius: 22px;
  --radius-sm: 12px;
  --bw: 2.5px;
  --font-display: 'Baloo 2', ui-rounded, 'Segoe UI', system-ui, sans-serif;
  --font-body: 'Nunito', ui-rounded, 'Segoe UI', system-ui, sans-serif;
  --ease-bounce: cubic-bezier(.34, 1.56, .64, 1);
}

:root {
  color-scheme: light;
  --bg: #F6F0E8; --bg-deco: #E6D6C2;
  --surface: #FFFCF8; --surface-2: #EEF7F3;
  --ink: #1C3533; --muted: #5F7D79; --border: #1C3533; --pop-shadow: #1C3533;
  --accent: #9ED3B6; --accent-ink: #1C3533;
  --accent-2: #D8B48E; --accent-2-ink: #1C3533;
  --bot-bubble: #FFFFFF; --bot-ink: #1C3533;
  --user-bubble: #2F4D4B; --user-ink: #EAF8F3;
  --outline: #1C3533;
  --focus: #2F7D63; --good: #2F7D63; --bad: #B9472F;
  --c0: #9ED3B6; --c1: #D8B48E; --c2: #2F4D4B; --c3: #86A3A1;
}

/* =====================================================================
   Base
   ===================================================================== */

*, *::before, *::after { box-sizing: border-box; }

html, body { margin: 0; }

body {
  min-height: 100dvh;
  background-color: var(--bg);
  background-image: radial-gradient(var(--bg-deco) 1.6px, transparent 1.7px);
  background-size: 22px 22px;
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3 { font-family: var(--font-display); line-height: 1.1; margin: 0 0 .4em; }
h2 { font-size: 1.6rem; }
h3 { font-size: 1.2rem; }
p { margin: 0 0 .8em; }
a { color: inherit; }
.muted { color: var(--muted); }
.small { font-size: .85rem; }
.error { color: var(--bad); font-weight: 700; }
.nowrap { white-space: nowrap; }
.spacer { flex: 1; }

:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; border-radius: 8px; }

/* =====================================================================
   Buttons & controls
   ===================================================================== */

.btn, .chip, .icon-btn {
  font: 700 1rem/1.2 var(--font-display);
  color: var(--ink);
  background: var(--surface);
  border: var(--bw) solid var(--border);
  border-radius: 999px;
  box-shadow: 3px 3px 0 var(--pop-shadow);
  cursor: pointer;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .4em;
  transition: transform .12s var(--ease-bounce), box-shadow .12s, background-color .15s;
  -webkit-tap-highlight-color: transparent;
}
.btn { padding: .6rem 1.15rem; min-height: 44px; }
.btn:hover:not(:disabled), .chip:hover:not(:disabled), .icon-btn:hover:not(:disabled) {
  transform: translate(-1px, -2px) rotate(-1deg);
  box-shadow: 4px 5px 0 var(--pop-shadow);
}
.btn:active:not(:disabled), .chip:active:not(:disabled), .icon-btn:active:not(:disabled) {
  transform: translate(2px, 2px);
  box-shadow: 1px 1px 0 var(--pop-shadow);
}
.btn:disabled, .chip:disabled, .icon-btn:disabled { opacity: .45; cursor: not-allowed; }
.btn-primary { background: var(--accent); color: var(--accent-ink); }
.btn-ghost { background: transparent; box-shadow: none; border-style: dashed; }
.btn-ghost:hover:not(:disabled) { box-shadow: none; background: var(--surface-2); }
.btn-small { padding: .35rem .8rem; min-height: 34px; font-size: .9rem; }
.btn-big { padding: .8rem 1.6rem; font-size: 1.15rem; min-height: 52px; }

.icon-btn { width: 42px; height: 42px; padding: 0; font-size: 1.15rem; }
.chip { padding: .45rem .95rem; font-size: .95rem; min-height: 40px; }
.chip[aria-pressed="true"] { background: var(--accent-2); color: var(--accent-2-ink); }

.input {
  font: inherit;
  color: var(--ink);
  background: var(--surface-2);
  border: var(--bw) solid var(--border);
  border-radius: var(--radius-sm);
  padding: .55rem .75rem;
  width: 100%;
  min-height: 44px;
}
textarea.input { resize: vertical; }
.input-num { width: 110px; }

/* =====================================================================
   Top bar, brand
   ===================================================================== */

.topbar {
  position: relative;
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 12px 16px;
  max-width: 1160px;
  margin: 0 auto;
  width: 100%;
}
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; }
.brand-name { font: 800 1.45rem/1 var(--font-display); letter-spacing: -.01em; }
.tag { font: 700 .7rem var(--font-body); text-transform: uppercase; letter-spacing: .08em; background: var(--accent-2); color: var(--accent-2-ink); padding: 2px 8px; border-radius: 999px; vertical-align: middle; }
.topbar-actions { display: flex; align-items: center; gap: 10px; margin-inline-start: auto; }

.logo { width: 42px; height: 42px; overflow: visible; display: block; transition: transform .3s var(--ease-bounce); }
.brand:hover .logo { transform: rotate(-10deg) scale(1.08); }
.lb-stalk { fill: none; stroke: #2B4544; stroke-width: 2.6; stroke-linecap: round; }
.lb-ball { fill: #9ED3B6; stroke: #152826; stroke-width: 1.8; }
.lb-ear { fill: #2B4544; stroke: #152826; stroke-width: 1.8; }
.lb-shell { fill: #3A5857; stroke: #152826; stroke-width: 2.2; }
.lb-screen { fill: #E8F7F2; stroke: #152826; stroke-width: 1.6; }
.lb-box { fill: none; stroke: #6E9A93; stroke-width: 2; }
.lb-check { fill: none; stroke: #74BF98; stroke-width: 3.6; stroke-linecap: round; stroke-linejoin: round; }
.lb-ink { fill: none; stroke: #152826; stroke-width: 2.2; stroke-linecap: round; }
.lb-bow { fill: #9ED3B6; stroke: #152826; stroke-width: 1.4; stroke-linejoin: round; }
/* Wordmark: rounded teal "Bayan" with a tan dot, next to the robot-head icon */
.brand [data-brand="productName"] { color: #1F6B63; font-weight: 800; letter-spacing: -.01em; }
.brand [data-brand="productName"]::after {
  content: "";
  display: inline-block;
  width: .24em;
  height: .24em;
  margin-left: .06em;
  border-radius: 50%;
  background: var(--accent-2);
  vertical-align: .62em;
}

/* =====================================================================
   Chat page
   ===================================================================== */

.page-chat .app { display: flex; flex-direction: column; height: 100dvh; }
.page-chat .topbar { flex: none; }

.progress { flex: 1; max-width: 380px; display: flex; align-items: center; gap: 10px; margin: 0 auto; }
.progress[hidden] { display: none; }
.progress-track {
  flex: 1; height: 16px;
  background: var(--surface);
  border: var(--bw) solid var(--border);
  border-radius: 999px;
  overflow: hidden;
}
.progress-fill {
  height: 100%; width: 0;
  background: repeating-linear-gradient(-45deg, var(--accent) 0 8px, color-mix(in srgb, var(--accent) 70%, white) 8px 16px);
  background-size: 22.6px 22.6px;
  border-right: var(--bw) solid var(--border);
  transition: width .7s var(--ease-bounce);
  animation: stripes 1s linear infinite;
}
.progress-label { font: 800 .95rem var(--font-display); min-width: 3ch; }

.stage {
  flex: 1;
  min-height: 0;
  width: 100%;
  max-width: 1160px;
  margin: 0 auto;
  padding: 4px 16px 16px;
  display: grid;
  grid-template-columns: minmax(220px, 320px) 1fr;
  gap: 24px;
}
.mascot-col { position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; min-width: 0; }
.mascot-host { width: 100%; max-width: 270px; cursor: pointer; border-radius: 24px; }
.mascot-name { text-align: center; font: 800 1.3rem var(--font-display); margin: 4px 0 0; display: flex; flex-direction: column; }
.mascot-name small { font: 600 .85rem var(--font-body); color: var(--muted); }

.mascot-quip {
  position: absolute;
  top: 2%;
  left: 50%;
  z-index: 5;
  max-width: 230px;
  padding: 8px 12px;
  background: var(--surface);
  border: var(--bw) solid var(--border);
  border-radius: 16px;
  box-shadow: 3px 3px 0 var(--pop-shadow);
  font: 700 .9rem var(--font-display);
  text-align: center;
  opacity: 0;
  transform: translate(-50%, 8px) scale(.9);
  transition: opacity .2s, transform .25s var(--ease-bounce);
  pointer-events: none;
}
.mascot-quip.show { opacity: 1; transform: translate(-50%, 0) scale(1) rotate(-2deg); }

.chat {
  display: flex; flex-direction: column;
  min-height: 0; min-width: 0;
  background: var(--surface);
  border: var(--bw) solid var(--border);
  border-radius: var(--radius);
  box-shadow: 6px 6px 0 var(--pop-shadow);
  overflow: hidden;
}
.log {
  flex: 1;
  overflow-y: auto;
  padding: 20px;
  display: flex; flex-direction: column; gap: 10px;
  background: var(--surface-2);
  overscroll-behavior: contain;
}
.composer {
  flex: none;
  display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 10px;
  padding: 14px;
  border-top: var(--bw) solid var(--border);
  background: var(--surface);
}
.composer:empty { display: none; }

.msg { display: flex; max-width: min(85%, 620px); }
.msg-bot { align-self: flex-start; }
.msg-user { align-self: flex-end; }
.msg-note { align-self: center; }
.bubble {
  padding: 10px 15px;
  border: var(--bw) solid var(--border);
  border-radius: 20px;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  animation: pop-in .3s var(--ease-bounce) both;
}
.msg-bot .bubble { background: var(--bot-bubble); color: var(--bot-ink); border-end-start-radius: 6px; transform-origin: bottom left; }
.msg-user .bubble { background: var(--user-bubble); color: var(--user-ink); border-end-end-radius: 6px; transform-origin: bottom right; }
.msg-note .bubble { background: transparent; border-style: dashed; color: var(--muted); font-size: .85rem; padding: 4px 12px; }
.msg-question .bubble {
  display: flex; flex-direction: column; gap: 2px;
  background: var(--accent); color: var(--accent-ink);
  font: 700 1.12rem/1.3 var(--font-display);
  box-shadow: 3px 3px 0 var(--pop-shadow);
  rotate: -.7deg;
}
.q-num { font: 800 .72rem var(--font-body); letter-spacing: .08em; text-transform: uppercase; opacity: .85; }
.q-opt { font: 700 .75rem var(--font-body); opacity: .85; }

.typing { display: inline-flex; gap: 4px; padding: 4px 2px; }
.typing i { width: 7px; height: 7px; border-radius: 50%; background: currentColor; animation: typing 1s infinite ease-in-out; }
.typing i:nth-child(2) { animation-delay: .15s; }
.typing i:nth-child(3) { animation-delay: .3s; }

.compose-text { display: flex; flex-direction: column; gap: 8px; width: 100%; }
.text-input {
  width: 100%;
  min-height: 50px;
  resize: none;
  padding: 11px 14px;
  font: inherit;
  color: var(--ink);
  background: var(--surface-2);
  border: var(--bw) solid var(--border);
  border-radius: 16px;
}
.compose-actions { display: flex; align-items: center; justify-content: flex-end; gap: 8px; width: 100%; }
.count { margin-inline-end: auto; color: var(--muted); font-size: .8rem; }

.rate-row { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; }
.rate-btn {
  display: flex; flex-direction: column; align-items: center; gap: 2px;
  width: 78px; padding: 8px 4px;
  font: 700 .75rem var(--font-display); color: var(--ink);
  background: var(--surface);
  border: var(--bw) solid var(--border);
  border-radius: 18px;
  box-shadow: 3px 3px 0 var(--pop-shadow);
  cursor: pointer;
  transition: transform .15s var(--ease-bounce), box-shadow .15s, background-color .15s;
}
.rate-btn .face { font-size: 2rem; line-height: 1.1; transition: transform .2s var(--ease-bounce); }
.rate-btn:hover { background: var(--surface-2); transform: translateY(-3px); box-shadow: 4px 6px 0 var(--pop-shadow); }
.rate-btn:hover .face { transform: scale(1.25) rotate(-10deg); }
.rate-btn:active { transform: translate(2px, 2px); box-shadow: 1px 1px 0 var(--pop-shadow); }
.chip-row { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; width: 100%; }

.receipt { display: flex; flex-direction: column; gap: 4px; font-size: .92rem; white-space: normal; }
.receipt ul { margin: 4px 0 0; padding-left: 0; list-style: none; }
.msg-receipt .bubble { border-style: dashed; rotate: .6deg; }

.sheet {
  max-width: min(460px, calc(100vw - 32px));
  padding: 22px 24px;
  color: var(--ink);
  background: var(--surface);
  border: var(--bw) solid var(--border);
  border-radius: var(--radius);
  box-shadow: 6px 6px 0 var(--pop-shadow);
}
.sheet[open] { animation: pop-in .28s var(--ease-bounce); }
.sheet::backdrop { background: rgb(0 0 0 / .35); backdrop-filter: blur(2px); }
.checklist { padding-left: 0; list-style: none; display: grid; gap: 6px; margin: 0 0 12px; }
.checklist li::before { content: '✔'; display: inline-block; width: 1.4em; color: var(--good); font-weight: 800; }

.confetti { position: fixed; inset: 0; pointer-events: none; overflow: hidden; z-index: 50; }
.confetti i { position: absolute; top: -16px; width: 10px; height: 14px; border-radius: 2px; animation-name: fall; animation-timing-function: cubic-bezier(.25, .6, .5, 1); animation-fill-mode: forwards; }
.confetti .c0 { background: var(--c0); }
.confetti .c1 { background: var(--c1); border-radius: 50%; }
.confetti .c2 { background: var(--c2); }
.confetti .c3 { background: var(--c3); width: 6px; }

/* =====================================================================
   Landing page
   ===================================================================== */

.landing {
  max-width: 1080px;
  margin: 0 auto;
  padding: 24px 16px 56px;
  display: grid;
  grid-template-columns: 1fr 1.15fr;
  gap: 40px;
  align-items: center;
}
.hero-mascot { position: relative; display: flex; justify-content: center; padding-top: 40px; }
.hero-mascot .mascot-host { max-width: 360px; }
.eyebrow { font: 800 .8rem var(--font-body); text-transform: uppercase; letter-spacing: .1em; color: var(--muted); }
.landing h1 { font-size: clamp(2.2rem, 5.2vw, 3.6rem); letter-spacing: -.02em; }
.squiggle {
  display: inline-block;
  background: var(--accent); color: var(--accent-ink);
  padding: 0 .25em;
  border: var(--bw) solid var(--border);
  border-radius: 14px;
  box-shadow: 3px 3px 0 var(--pop-shadow);
  rotate: -3deg;
}
.lede { font-size: 1.12rem; max-width: 52ch; }
.steps { list-style: none; counter-reset: step; padding: 0; margin: 20px 0; display: grid; gap: 10px; }
.steps li { counter-increment: step; position: relative; padding-inline-start: 44px; min-height: 30px; padding-top: 2px; }
.steps li::before {
  content: counter(step);
  position: absolute; inset-inline-start: 0; top: 0;
  display: grid; place-items: center;
  width: 30px; height: 30px;
  font: 800 1rem var(--font-display);
  background: var(--accent-2); color: var(--accent-2-ink);
  border: var(--bw) solid var(--border);
  border-radius: 50%;
}
.steps li:nth-child(2)::before { rotate: 8deg; }
.steps li:nth-child(3)::before { rotate: -6deg; }
.ready-title { font: 800 1.4rem var(--font-display); }

/* =====================================================================
   Cards & admin
   ===================================================================== */

.card {
  background: var(--surface);
  border: var(--bw) solid var(--border);
  border-radius: var(--radius);
  box-shadow: 5px 5px 0 var(--pop-shadow);
  padding: 20px;
}
.card.empty { text-align: center; display: flex; flex-direction: column; align-items: center; gap: 6px; }
.big-emoji { font-size: 2.6rem; }

.admin-wrap { max-width: 1160px; margin: 0 auto; padding: 4px 16px 56px; }
.tabs { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 8px 0 22px; }
.tab[aria-selected="true"] { background: var(--accent); color: var(--accent-ink); }
.badge { display: inline-grid; place-items: center; min-width: 22px; height: 22px; padding: 0 6px; font-size: .78rem; border-radius: 999px; background: var(--accent-2); color: var(--accent-2-ink); border: 2px solid var(--border); }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 340px), 1fr)); gap: 20px; }
.stack { display: grid; gap: 18px; }
.row { display: flex; align-items: center; gap: 8px; }
.row.wrap { flex-wrap: wrap; }
.row.between { justify-content: space-between; flex-wrap: wrap; }
.row.end { justify-content: flex-end; margin-top: 16px; }
.survey-card { display: flex; flex-direction: column; gap: 12px; }
.survey-card h3 { margin: 0; overflow-wrap: anywhere; }
.survey-card p { margin: 0; }
.pill { font: 800 .72rem var(--font-body); text-transform: uppercase; letter-spacing: .08em; padding: 3px 10px; border-radius: 999px; border: 2px solid var(--border); }
.pill-open { background: var(--good); color: #fff; }
.pill-closed { background: var(--surface-2); color: var(--muted); }
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.stat { text-align: center; background: var(--surface-2); border-radius: 14px; padding: 8px 4px; }
.stat b { display: block; font: 800 1.45rem/1.1 var(--font-display); }
.stat span { font-size: .68rem; color: var(--muted); text-transform: uppercase; letter-spacing: .05em; font-weight: 700; }
.links { border-top: 2px dashed var(--border); padding-top: 12px; display: grid; gap: 8px; }
.link-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; max-height: 240px; overflow-y: auto; }
.link-list li { display: flex; gap: 8px; align-items: center; }
.link { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: .8rem; background: var(--surface-2); padding: 7px 10px; border-radius: 10px; }

.login-card { max-width: 420px; margin: 40px auto; display: grid; gap: 12px; }
.builder { display: grid; gap: 4px; max-width: 820px; }
.field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 12px; }
.field-label { font-weight: 800; font-size: .9rem; }
.q-list { display: grid; gap: 12px; margin-bottom: 12px; }
.q-card { display: grid; gap: 10px; padding: 14px; border: 2px dashed var(--border); border-radius: 18px; background: var(--surface-2); }
.q-card .row select { width: auto; flex: 0 1 220px; }
.q-card .field { margin: 0; }
.q-badge { font: 800 .8rem var(--font-display); background: var(--accent-2); color: var(--accent-2-ink); padding: 2px 10px; border-radius: 999px; margin: 0; width: fit-content; }
.check { display: flex; align-items: center; gap: 8px; font-size: .92rem; cursor: pointer; }
.check input { width: 18px; height: 18px; accent-color: var(--accent-2); }

.req-row { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; padding: 14px 18px; }
.req-row select { flex: 1 1 200px; width: auto; }

.avg b { font: 800 2.6rem var(--font-display); }
.bars { display: grid; gap: 8px; margin: 8px 0; }
.bar-row { display: grid; grid-template-columns: minmax(80px, 180px) 1fr 76px; gap: 10px; align-items: center; }
.bar-label { font-weight: 700; overflow-wrap: anywhere; }
.bar { height: 18px; background: var(--surface-2); border: 2px solid var(--border); border-radius: 999px; overflow: hidden; }
.bar > span { display: block; height: 100%; background: var(--accent); border-inline-end: 2px solid var(--border); transition: width .6s var(--ease-bounce); }
.bar > span[style*="width: 0%"] { border-inline-end: 0; }
.bar-val { font-size: .85rem; color: var(--muted); text-align: end; font-variant-numeric: tabular-nums; }
.quotes { list-style: none; padding: 0; margin: 8px 0; display: grid; gap: 8px; }
.quotes li { background: var(--surface-2); border-inline-start: 5px solid var(--accent); padding: 10px 14px; border-radius: 10px; white-space: pre-wrap; overflow-wrap: anywhere; }

.toast {
  position: fixed; left: 50%; bottom: 24px; z-index: 60;
  transform: translateX(-50%);
  max-width: calc(100vw - 32px);
  padding: 10px 18px;
  font: 700 1rem var(--font-display);
  background: var(--ink); color: var(--bg);
  border-radius: 999px;
  box-shadow: 3px 3px 0 var(--accent);
  animation: toast-in .3s var(--ease-bounce);
  transition: opacity .3s, transform .3s;
}
.toast.out { opacity: 0; transform: translate(-50%, 12px); }

/* =====================================================================
   Keyframes
   ===================================================================== */

@keyframes pop-in { from { opacity: 0; transform: scale(.85) translateY(6px); } to { opacity: 1; transform: none; } }
@keyframes toast-in { from { opacity: 0; transform: translate(-50%, 16px) scale(.9); } }
@keyframes typing { 0%, 60%, 100% { transform: translateY(0); opacity: .45; } 30% { transform: translateY(-5px); opacity: 1; } }
@keyframes stripes { to { background-position: 22.6px 0; } }
@keyframes fall { to { transform: translate3d(var(--dx), 110vh, 0) rotate(var(--rot)); } }


/* =====================================================================
   Responsive
   ===================================================================== */

@media (max-width: 820px) {
  .landing { grid-template-columns: 1fr; gap: 8px; padding-top: 0; }
  .hero-mascot { padding-top: 36px; }
  .hero-mascot .mascot-host { max-width: 220px; }
}

@media (max-width: 760px) {
  .page-chat .topbar { flex-wrap: wrap; gap: 10px 12px; padding: 10px 16px; }
  .page-chat .progress { order: 3; flex-basis: 100%; max-width: none; }
  .anon-label { display: none; }
  .brand-name { font-size: 1.2rem; }
  .logo { width: 36px; height: 36px; }
  .stage { grid-template-columns: 1fr; grid-template-rows: auto 1fr; gap: 10px; padding: 0 16px 12px; }
  .mascot-col { flex-direction: row; justify-content: flex-start; gap: 12px; }
  .mascot-col .mascot-host { width: 86px; flex: none; }
  .mascot-name { text-align: start; font-size: 1.1rem; }
  .mascot-quip { left: 104px; top: 50%; transform: translate(0, -50%) scale(.9); }
  .mascot-quip.show { transform: translate(0, -50%) scale(1) rotate(-2deg); }
  .log { padding: 14px; }
  .msg { max-width: 92%; }
  .rate-btn { width: calc(20% - 7px); min-width: 54px; }
  .rate-label { font-size: .62rem; }
  .stats { grid-template-columns: repeat(2, 1fr); }
  .bar-row { grid-template-columns: 1fr 64px; }
  .bar-row .bar { grid-column: 1 / -1; grid-row: 2; }
}

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

/* =====================================================================
   Meet Bayan (showcase page)
   ===================================================================== */

.hand { font-family: 'Kalam', var(--font-display); font-weight: 700; }
.showcase { max-width: 1160px; margin: 0 auto; padding: 8px 16px 64px; display: grid; gap: 40px; }
.show-hero { display: grid; grid-template-columns: minmax(260px, 420px) 1fr; gap: 32px; align-items: start; }
.show-stage { position: relative; padding: 48px 28px 20px; background: radial-gradient(circle at 50% 45%, #D7EFE5 0 58%, var(--surface) 59%); }
.show-stage .mascot-host { max-width: 340px; margin: 0 auto; }
.show-stage .mascot-quip { top: 10px; }
.show-title { display: flex; flex-direction: column; align-items: flex-start; gap: 4px; margin-bottom: 14px; }
.title-tag {
  font: 800 clamp(3rem, 7vw, 4.6rem)/1 var(--font-display);
  letter-spacing: .02em;
  background: var(--accent-2);
  padding: 4px 18px 0;
  border-radius: 12px;
  rotate: -3deg;
}
.show-title .hand { font-size: clamp(1.4rem, 3vw, 2rem); rotate: -3deg; margin-left: 24px; border-bottom: 4px solid var(--accent-2); line-height: 1.2; }
.section-title { font-size: 2rem; display: inline-block; border-bottom: 4px solid var(--accent-2); rotate: -1.5deg; margin-bottom: 18px; }

.move-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 200px), 1fr)); gap: 10px; margin: 18px 0 10px; }
.move {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 12px;
  text-align: left; font: inherit; color: var(--ink);
  background: var(--surface);
  border: var(--bw) solid var(--border);
  border-radius: 16px;
  box-shadow: 3px 3px 0 var(--pop-shadow);
  cursor: pointer;
  transition: transform .12s var(--ease-bounce), box-shadow .12s, background-color .15s;
}
.move:hover { background: var(--surface-2); transform: translate(-1px, -2px) rotate(-.6deg); box-shadow: 4px 5px 0 var(--pop-shadow); }
.move:active { transform: translate(2px, 2px); box-shadow: 1px 1px 0 var(--pop-shadow); }
.move-icon { font-size: 1.6rem; }
.move-text { display: flex; flex-direction: column; line-height: 1.2; }
.move-text b { font-family: var(--font-display); font-size: 1.05rem; }
.move-text small { color: var(--muted); font-size: .78rem; }

.face-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 160px), 1fr)); gap: 16px; }
.face-card {
  display: flex; flex-direction: column; align-items: center; gap: 4px;
  padding: 14px 10px 10px;
  font: inherit; color: var(--ink);
  background: #CFEBE1;
  border: var(--bw) solid var(--border);
  border-radius: 20px;
  box-shadow: 4px 4px 0 var(--pop-shadow);
  cursor: pointer;
  transition: transform .15s var(--ease-bounce);
}
.face-card:hover { transform: translateY(-3px) rotate(-1deg); }
.face-host { width: 100%; max-width: 150px; }
.face-label { font-size: 1.3rem; }

.palette { display: flex; flex-wrap: wrap; gap: 22px; background: #EADCC9; }
.swatch-item { display: flex; flex-direction: column; align-items: center; gap: 4px; }
.swatch { width: 64px; height: 64px; border-radius: 50%; border: var(--bw) solid var(--border); box-shadow: 3px 3px 0 var(--pop-shadow); }
.swatch-item code { font-size: .8rem; color: var(--muted); }

@media (max-width: 820px) {
  .show-hero { grid-template-columns: 1fr; }
  .show-stage .mascot-host { max-width: 260px; }
}

/* =====================================================================
   Roaming Bayan (admin sidekick)
   ===================================================================== */

.buddy {
  position: fixed;
  left: 0;
  top: 0;
  z-index: 40;
  pointer-events: none;
  will-change: transform;
}
.buddy.off { visibility: hidden; transition: visibility 0s .5s; }
.buddy-flip { transition: transform .25s ease; }
.buddy-flip.flipped { transform: scaleX(-1); }
.buddy-host { pointer-events: auto; cursor: pointer; border-radius: 30px; filter: drop-shadow(0 6px 10px rgb(28 53 51 / .18)); }
.buddy-host:focus-visible { outline-offset: -6px; }

.buddy-bubble {
  position: fixed;
  z-index: 41;
  max-width: min(260px, calc(100vw - 32px));
  padding: 9px 13px;
  font: 700 .95rem/1.35 var(--font-display);
  color: var(--ink);
  background: var(--surface);
  border: var(--bw) solid var(--border);
  border-radius: 16px;
  box-shadow: 3px 3px 0 var(--pop-shadow);
  pointer-events: none;
  opacity: 0;
  transform: scale(.85);
  transition: opacity .18s, transform .3s var(--ease-bounce);
}
.buddy-bubble.show { opacity: 1; transform: scale(1) rotate(-1.5deg); }
.buddy-bubble.from-right { transform-origin: 100% 30%; border-top-right-radius: 4px; }
.buddy-bubble.from-left { transform-origin: 0 30%; border-top-left-radius: 4px; }
.buddy-bubble.from-bottom { transform-origin: 50% 100%; border-bottom-left-radius: 4px; }

.buddy-toggle { font-size: .85rem; }

@media print { .buddy, .buddy-bubble { display: none; } }

/* survey title: view + inline rename */
.title-view { display: flex; align-items: center; gap: 6px; min-width: 0; flex: 1; }
.icon-small { width: 32px; height: 32px; font-size: .85rem; box-shadow: 2px 2px 0 var(--pop-shadow); flex: none; }
.title-edit { flex: 1; min-width: 0; flex-wrap: wrap; }
.title-edit .input { flex: 1 1 180px; min-height: 38px; }

/* destructive actions */
.btn-danger { color: var(--bad); border-color: var(--bad); }
.btn-danger:hover:not(:disabled) { background: color-mix(in srgb, var(--bad) 10%, var(--surface)); }

/* =====================================================================
   Arabic / RTL
   ===================================================================== */

:root[lang="ar"] {
  --font-display: 'Baloo Bhaijaan 2', 'Tajawal', 'Segoe UI', system-ui, sans-serif;
  --font-body: 'Tajawal', 'Segoe UI', system-ui, sans-serif;
}
:root[lang="ar"] body { font-size: 17px; line-height: 1.65; }
:root[lang="ar"] .q-num, :root[lang="ar"] .pill, :root[lang="ar"] .stat span, :root[lang="ar"] .eyebrow { letter-spacing: 0; text-transform: none; }
[dir="rtl"] .toast { transform: translateX(50%); left: auto; right: 50%; }
.lang-toggle { font-family: 'Tajawal', 'Baloo 2', system-ui, sans-serif; min-width: 84px; }
.lang-toggle:lang(en) { font-family: 'Baloo 2', system-ui, sans-serif; }

/* =====================================================================
   Agreement scale (bank statements)
   ===================================================================== */

:root {
  --sc1: #B9472F; --sc2: #E0926F; --sc3: #C9C2B6; --sc4: #7FC3A2; --sc5: #2F7D63;
}
.q-pattern { font-weight: 700; opacity: .8; text-transform: none; letter-spacing: 0; }
.likert-row { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 8px; width: 100%; }
.likert-btn {
  font: 700 .92rem/1.2 var(--font-display); color: var(--ink);
  background: var(--surface); border: var(--bw) solid var(--border); border-radius: 16px;
  box-shadow: 3px 3px 0 var(--pop-shadow); cursor: pointer;
  display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 10px 6px; min-height: 64px; text-align: center;
  transition: transform .12s var(--ease-bounce), box-shadow .12s, background-color .15s;
}
.likert-btn:hover { transform: translateY(-3px); box-shadow: 4px 5px 0 var(--pop-shadow); background: var(--surface-2); }
.likert-btn:active { transform: translate(2px, 2px); box-shadow: 1px 1px 0 var(--pop-shadow); }
.likert-dot { width: 18px; height: 18px; border-radius: 50%; border: 2px solid var(--border); background: var(--sc3); }
.likert-1 .likert-dot { background: var(--sc1); }
.likert-2 .likert-dot { background: var(--sc2); }
.likert-4 .likert-dot { background: var(--sc4); }
.likert-5 .likert-dot { background: var(--sc5); }
@media (max-width: 560px) {
  .likert-row { grid-template-columns: 1fr; }
  .likert-btn { flex-direction: row; min-height: 46px; padding: 8px 14px; justify-content: flex-start; }
}

/* =====================================================================
   Admin: survey kinds, bank picker, stats
   ===================================================================== */

.kind-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 10px; margin-bottom: 14px; }
.kind-card {
  text-align: start; font: inherit; color: var(--ink); cursor: pointer;
  background: var(--surface); border: var(--bw) solid var(--border); border-radius: 18px;
  box-shadow: 3px 3px 0 var(--pop-shadow); padding: 12px 14px; display: grid; gap: 4px;
}
.kind-card b { font: 800 1.1rem var(--font-display); }
.kind-card[aria-pressed="true"] { background: var(--accent); }
.kind-card small { color: var(--muted); }
.kind-card[aria-pressed="true"] small { color: var(--ink); }
.pill-kind { background: var(--accent-2); color: var(--accent-2-ink); }

.bank { display: grid; gap: 14px; margin-bottom: 14px; }
.bank-dim { border: 2px solid var(--border); border-radius: 16px; overflow: hidden; background: var(--surface); }
.bank-dim > header { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 10px 14px; background: var(--surface-2); border-bottom: 2px solid var(--border); }
.bank-dim > header h4 { margin: 0; font: 800 1.05rem var(--font-display); }
.bank-pattern { padding: 10px 14px; border-top: 1px dashed color-mix(in srgb, var(--border) 35%, transparent); }
.bank-pattern:first-of-type { border-top: 0; }
.bank-pattern.is-optional { background: color-mix(in srgb, var(--accent-2) 16%, var(--surface)); }
.bank-pattern.is-optional.is-on { background: color-mix(in srgb, var(--accent-2) 38%, var(--surface)); }
.bank-pattern summary { display: flex; align-items: center; gap: 10px; cursor: pointer; list-style: none; flex-wrap: wrap; }
.bank-pattern summary::-webkit-details-marker { display: none; }
.bank-pattern summary .pname { font-weight: 800; }
.bank-pattern summary .par { color: var(--muted); font-size: .9rem; }
.bank-pattern ol { margin: 8px 0 2px; padding-inline-start: 22px; display: grid; gap: 4px; font-size: .9rem; }
.bank-pattern ol li span { display: block; color: var(--muted); }
.tier { font: 800 .68rem var(--font-body); text-transform: uppercase; letter-spacing: .06em; padding: 3px 8px; border-radius: 999px; border: 2px solid var(--border); }
.tier-basic { background: var(--accent); }
.tier-optional { background: var(--accent-2); }
.bank-tally { position: sticky; bottom: 0; z-index: 2; display: flex; flex-wrap: wrap; align-items: center; gap: 10px; padding: 10px 14px; background: var(--surface); border: var(--bw) solid var(--border); border-radius: 16px; box-shadow: 3px 3px 0 var(--pop-shadow); }
.ar-input { direction: rtl; font-family: 'Tajawal', system-ui, sans-serif; }
.two-col { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 0 14px; }
.profile-hint { margin: -4px 0 10px; }

.stat-strip { display: flex; flex-wrap: wrap; gap: 8px; margin: 6px 0 4px; }
.stat-strip span { background: var(--surface-2); border-radius: 10px; padding: 4px 10px; font-size: .85rem; font-variant-numeric: tabular-nums; }
.stat-strip b { font-family: var(--font-display); }
.results-group { font: 800 1.25rem var(--font-display); margin: 8px 0 -6px; }
.stats-table-wrap { overflow-x: auto; }
.stats-table { width: 100%; border-collapse: collapse; font-size: .88rem; font-variant-numeric: tabular-nums; }
.stats-table th, .stats-table td { padding: 7px 8px; border-bottom: 1px solid color-mix(in srgb, var(--border) 18%, transparent); text-align: start; vertical-align: top; }
.stats-table th { font-weight: 800; background: var(--surface-2); position: sticky; top: 0; }
.stats-table td.num, .stats-table th.num { text-align: end; white-space: nowrap; }
.stats-table tr.pattern-row td { background: color-mix(in srgb, var(--accent) 22%, var(--surface)); font-weight: 800; }
.stats-table tr.dim-row td { background: var(--accent); font-weight: 800; font-family: var(--font-display); }
.net-card { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; padding: 12px 16px; }
.net-card code { font-weight: 800; }

/* =====================================================================
   Survey cards (one question at a time)
   ===================================================================== */

.page-chat .app { min-height: 100dvh; height: auto; }
.survey-stage {
  flex: 1; display: grid; grid-template-columns: 240px minmax(0, 760px); justify-content: center;
  align-items: start; gap: 28px; padding: 12px 24px 40px;
}
.host { position: sticky; top: 16px; display: flex; flex-direction: column; align-items: center; gap: 10px; }
.host .mascot-host { width: 100%; max-width: 210px; }
.host-col { width: 100%; display: flex; flex-direction: column; gap: 8px; align-items: stretch; }
.host-name { margin: 0; text-align: center; font: 800 1.15rem var(--font-display); }
.host-name small { display: block; font: 600 .82rem var(--font-body); color: var(--muted); }
.host-say {
  position: relative; min-height: 0; padding: 12px 14px; font-size: .95rem; line-height: 1.5;
  background: var(--bot-bubble); color: var(--bot-ink); border: var(--bw) solid var(--border); border-radius: 16px;
  box-shadow: 3px 3px 0 var(--pop-shadow); opacity: 0; transform: translateY(4px); transition: opacity .2s, transform .25s var(--ease-bounce);
}
.host-say.show { opacity: 1; transform: none; }
.host-say:empty { display: none; }
.host-say::before {
  content: ''; position: absolute; top: -9px; left: 50%; width: 14px; height: 14px; translate: -50% 0; rotate: 45deg;
  background: var(--bot-bubble); border-left: var(--bw) solid var(--border); border-top: var(--bw) solid var(--border);
}
.host-say p { margin: 0; }
.host-say .skip-intro { margin-top: 10px; width: 100%; }

.qcard-area { min-width: 0; }
.qcard {
  background: var(--surface); border: var(--bw) solid var(--border); border-radius: var(--radius);
  box-shadow: 6px 6px 0 var(--pop-shadow); padding: 28px 30px; display: flex; flex-direction: column; gap: 16px;
  min-height: 360px; outline: none; transition: opacity .15s;
}
.qcard.is-saving { opacity: .65; pointer-events: none; }
.qcard.enter-fwd { animation: card-in-fwd .32s var(--ease-bounce); }
.qcard.enter-back { animation: card-in-back .32s var(--ease-bounce); }
@keyframes card-in-fwd { from { opacity: 0; transform: translateX(36px) rotate(.6deg); } }
@keyframes card-in-back { from { opacity: 0; transform: translateX(-36px) rotate(-.6deg); } }
[dir="rtl"] .qcard.enter-fwd { animation-name: card-in-back; }
[dir="rtl"] .qcard.enter-back { animation-name: card-in-fwd; }

.qc-head { display: flex; align-items: center; flex-wrap: wrap; gap: 8px 12px; }
.qc-num { font: 800 .78rem var(--font-body); letter-spacing: .08em; text-transform: uppercase; background: var(--accent); padding: 4px 10px; border-radius: 999px; border: 2px solid var(--border); }
:root[lang="ar"] .qc-num { letter-spacing: 0; }
.qc-section { font-size: .85rem; font-weight: 700; color: var(--muted); }
.qc-hint-btn { width: 44px; height: 44px; font-size: 1.25rem; }
.qc-hint-btn[aria-expanded="true"] { background: var(--accent-2); }
.qc-kicker { margin: 0; font: 800 .9rem var(--font-body); color: var(--muted); text-transform: uppercase; letter-spacing: .08em; }
.qc-title { margin: 0; font-size: clamp(1.6rem, 3.4vw, 2.3rem); }
.qc-question { margin: 0; font-size: clamp(1.25rem, 2.6vw, 1.6rem); line-height: 1.35; }
.qc-intro { max-height: 300px; overflow: auto; padding: 4px 14px; border-inline-start: 4px solid var(--accent); color: var(--ink); font-size: .97rem; line-height: 1.65; }
.qc-intro p { margin: 0 0 .8em; }
.qc-meta { margin: 0; color: var(--muted); font-size: .9rem; }
.qc-opt { margin: -8px 0 0; font-size: .85rem; color: var(--muted); font-weight: 700; }
.qc-simple { padding: 12px 16px; border-radius: 14px; background: color-mix(in srgb, var(--accent-2) 25%, var(--surface)); border: 2px dashed var(--accent-2); font-size: 1rem; line-height: 1.55; }
.qc-simple[hidden] { display: none; }
.qc-answer { display: flex; flex-direction: column; gap: 10px; }
.qc-answer .text-input { min-height: 120px; }
.qc-confirm { padding: 12px 16px; border-radius: 14px; background: color-mix(in srgb, var(--bad) 10%, var(--surface)); border: 2px solid var(--bad); }
.qc-confirm[hidden] { display: none; }
.qc-confirm p { margin: 0 0 8px; }
.qc-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; margin-top: auto; padding-top: 8px; }
.likert-btn[aria-pressed="true"], .rate-btn[aria-pressed="true"], .qc-answer .btn[aria-pressed="true"] {
  background: var(--accent); transform: translate(2px, 2px); box-shadow: 1px 1px 0 var(--pop-shadow);
}
.qcard .receipt { padding: 12px 16px; border: 2px dashed var(--border); border-radius: 14px; }

@media (max-width: 820px) {
  .survey-stage { grid-template-columns: 1fr; gap: 14px; padding: 8px 16px 28px; }
  .host { position: static; flex-direction: row; align-items: flex-start; }
  .host .mascot-host { width: 78px; flex: none; }
  .host-name { text-align: start; }
  .host-say::before { top: 14px; left: -9px; translate: 0; rotate: -45deg; }
  [dir="rtl"] .host-say::before { left: auto; right: -9px; rotate: 135deg; }
  .qcard { padding: 20px 18px; min-height: 0; }
}

/* builder: one answer format for all questions, simpler wording */
.answer-mode { padding: 12px 14px; margin-bottom: 12px; border-radius: 14px; background: color-mix(in srgb, var(--accent) 22%, var(--surface)); border: 2px solid var(--border); }
.answer-mode .field { margin-bottom: 6px; }
.answer-mode select { max-width: 360px; }
.q-simple summary { cursor: pointer; font-weight: 700; font-size: .9rem; color: var(--muted); }
.q-simple[open] summary { margin-bottom: 8px; }
.q-simple .muted { margin: 6px 0 0; }
.q-card .apply-all { flex: none; white-space: nowrap; }

/* =====================================================================
   New logo (frontend/img): the full logo replaces the drawn head + name
   ===================================================================== */
.brand .logo-full { height: 52px; width: auto; display: block; transition: transform .3s var(--ease-bounce); }
.brand:hover .logo-full { transform: rotate(-3deg) scale(1.04); }
.brand:has(.logo-full) [data-brand="productName"] { display: none; }
.page-admin .brand .logo-full { height: 46px; }
@media (max-width: 720px) { .brand .logo-full { height: 40px; } }

/* =====================================================================
   Survey: "Do you need help?" bubble, help menu, Bayan's idle antics
   ===================================================================== */

.help-tip {
  position: relative; width: 100%; display: grid; gap: 2px; text-align: center; cursor: pointer;
  font: 600 .86rem/1.4 var(--font-body); color: var(--ink);
  background: color-mix(in srgb, var(--accent) 45%, var(--surface)); border: var(--bw) solid var(--border); border-radius: 16px;
  box-shadow: 3px 3px 0 var(--pop-shadow); padding: 9px 12px; animation: help-nudge 6s ease-in-out infinite;
}
.help-tip b { font: 800 1rem var(--font-display); }
.help-tip::after {
  content: ''; position: absolute; bottom: -9px; left: 50%; width: 14px; height: 14px; translate: -50% 0; rotate: 45deg;
  background: color-mix(in srgb, var(--accent) 45%, var(--surface)); border-right: var(--bw) solid var(--border); border-bottom: var(--bw) solid var(--border);
}
.help-tip:hover { background: var(--accent); }
.help-tip:hover::after { background: var(--accent); }
.host.no-help .help-tip { display: none; }
@keyframes help-nudge { 0%, 88%, 100% { transform: none; } 92% { transform: translateY(-3px) rotate(-1deg); } 96% { transform: translateY(0) rotate(1deg); } }

.help-menu { display: grid; gap: 6px; margin-top: 10px; }
.help-menu .btn { width: 100%; justify-content: flex-start; text-align: start; white-space: normal; }
.help-after { grid-template-columns: 1fr 1fr; }
.help-after .btn { justify-content: center; text-align: center; }
.host-say p + p { margin-top: 8px; }
.qc-simple p { margin: 0; }
.qc-simple p + p { margin-top: 8px; }

/* Bayan wanders inside her stage; the roam layer moves, the mascot inside keeps its own animations. */
.mascot-stage { width: 100%; display: flex; justify-content: center; overflow: visible; }
.mascot-roam { width: 100%; max-width: 200px; will-change: transform; transition: transform .6s ease; }
.mascot-roam .mascot-host { max-width: 200px; transition: transform .3s ease; }
.mascot-roam.lean-left .mascot-host { transform: rotate(-4deg); }
.mascot-roam.lean-right .mascot-host { transform: rotate(4deg); }
.mascot-roam.is-running .is-walking .b-leg-l { animation-duration: .34s; }
.mascot-roam.is-running .is-walking .b-leg-r { animation-duration: .34s; animation-delay: -.17s; }
.mascot-roam.is-running .is-walking .b-arm-l, .mascot-roam.is-running .is-walking .b-arm-r { animation-duration: .34s; }
.mascot-roam.is-running .is-walking .b-jump { animation-duration: .17s; }
.mascot-roam.is-exploring .mascot-host { animation: b-explore 2.8s ease-in-out; }
@keyframes b-explore { 0%, 100% { transform: none; } 20% { transform: rotate(-7deg) translateX(-4px); } 45% { transform: rotate(-7deg) translateX(-4px); } 65% { transform: rotate(6deg) translateX(4px); } 85% { transform: rotate(6deg) translateX(4px); } }
@media (prefers-reduced-motion: reduce) { .help-tip { animation: none; } }

@media (max-width: 820px) {
  .host { flex-wrap: wrap; }
  .help-tip { order: -1; grid-template-columns: auto 1fr; text-align: start; gap: 8px; align-items: center; }
  .help-tip::after { display: none; }
  .mascot-stage { width: auto; flex: none; }
  .mascot-roam, .mascot-roam .mascot-host { width: 78px; max-width: 78px; }
  .host-col { flex: 1; min-width: 0; }
}

/* admin: import results */
.pill-imported { background: #3E6E8C; color: #fff; }
.import-pick { position: relative; overflow: hidden; width: fit-content; cursor: pointer; }
.import-pick input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.imp-rules { margin: 0 0 12px; padding-inline-start: 20px; display: grid; gap: 4px; }
.imp-preview .stats { grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); margin-bottom: 8px; }
.imp-list summary { cursor: pointer; font-weight: 700; margin: 6px 0; }
.imp-list ul { margin: 4px 0 8px; padding-inline-start: 20px; display: grid; gap: 3px; font-size: .9rem; }

/* =====================================================================
   Sign in / sign up (the main page) and accounts
   ===================================================================== */

.login-wrap {
  max-width: 980px; margin: 0 auto; padding: 8px 16px 48px;
  display: grid; grid-template-columns: minmax(200px, 340px) minmax(0, 440px); gap: 40px;
  justify-content: center; align-items: center; min-height: calc(100dvh - 110px);
}
.login-hero { position: relative; display: flex; justify-content: center; }
.login-hero .mascot-host { max-width: 300px; }
.login-side { display: grid; gap: 16px; }
.login-side .login-card { margin: 0; max-width: none; animation: pop-in .3s var(--ease-bounce) both; }
.auth-form { display: grid; gap: 4px; }
.auth-form > p { margin: 0 0 10px; }
.auth-form .btn-big { width: 100%; margin-top: 4px; }
.auth-title { font-size: 1.9rem; margin: 0 0 4px; }
.auth-ok { color: var(--good); font-weight: 700; background: var(--surface-2); border-radius: var(--radius-sm); padding: 10px 12px; }
.auth-links { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px; margin-top: 12px; font-size: .92rem; }
.link-btn { background: none; border: 0; padding: 0; font: 800 .92rem var(--font-body); color: var(--focus); cursor: pointer; text-decoration: underline; text-underline-offset: 3px; }
.continue-card { display: grid; gap: 8px; justify-items: start; }
.continue-card p { margin: 0; }
@media (max-width: 760px) {
  .login-wrap { grid-template-columns: 1fr; gap: 8px; align-items: start; min-height: 0; }
  .login-hero .mascot-host { max-width: 170px; }
}

.who { display: inline-flex; flex-direction: column; line-height: 1.15; padding-inline: 4px; max-width: 200px; }
.who b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.survey-card .owner { margin-top: -6px; }
.user-row { display: grid; gap: 12px; }
.user-info { display: grid; gap: 4px; }
.user-info b { font: 800 1.15rem var(--font-display); }
.user-pending { border-style: dashed; }
.user-disabled { opacity: .7; }
.pill-user-pending { background: var(--accent-2); color: var(--accent-2-ink); }
.pill-user-active { background: var(--good); color: #fff; }
.pill-user-disabled { background: var(--surface-2); color: var(--muted); }
.pill-reset { background: #FFE9A8; color: var(--ink); }
.btn-danger { color: var(--bad); }
.reset-link { border-top: 2px dashed var(--border); padding-top: 10px; display: grid; gap: 6px; }
.reset-link p { margin: 0; }
.reset-link code { flex: 1; min-width: 0; overflow-wrap: anywhere; font-size: .8rem; background: var(--surface-2); padding: 7px 10px; border-radius: 10px; }
.pw-overlay { position: fixed; inset: 0; z-index: 60; display: grid; place-items: center; padding: 16px; background: rgb(28 53 51 / .45); }
.pw-dialog { width: min(100%, 420px); display: grid; gap: 4px; animation: pop-in .3s var(--ease-bounce) both; }
.pw-dialog p { margin: 0 0 8px; }
.acct { flex-wrap: wrap; }
