/* surveys.free — Mailchimp-inspired theme, plain CSS, fluid layout. */
:root {
  --yellow: #ffe01b;        /* Cavendish Yellow — primary accent */
  --yellow-dark: #ffd000;
  --ink: #241c15;           /* Peppercorn — text & dark buttons */
  --ink-soft: #3d3530;
  --muted: #6c6760;
  --bg: #ffffff;
  --paper: #f7f6f2;         /* warm off-white section background */
  --paper-2: #f1efe8;
  --line: #e4e1d9;
  --line-strong: #d6d2c7;
  --green: #2f8f4e;
  --green-bg: #e8f6ec;
  --red: #d6336c;
  --red-bg: #fdecf2;
  --blue: #1d6fb8;
  --accent: #0d9488;
  --radius: 14px;
  --radius-sm: 9px;
  --shadow: 0 1px 2px rgba(36, 28, 21, 0.06), 0 8px 24px rgba(36, 28, 21, 0.05);
  --shadow-sm: 0 1px 2px rgba(36, 28, 21, 0.08);
  --ring: 0 0 0 3px rgba(255, 224, 27, 0.55);
  --sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --serif: "Fraunces", Georgia, "Times New Roman", serif;
  --card-pad: clamp(1.1rem, 0.8rem + 1vw, 1.75rem);
}

* { box-sizing: border-box; }

/* Make the `hidden` attribute win over component display rules (.btn, flex). */
[hidden] { display: none !important; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  font-family: var(--sans);
  color: var(--ink);
  background: var(--bg);
  line-height: 1.6;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

/* Fluid container: full width with comfortable, viewport-scaled gutters. */
.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding-inline: clamp(1rem, 4vw, 3.5rem);
}

h1, h2, h3 { line-height: 1.2; color: var(--ink); }
h1 { font-size: clamp(1.6rem, 1.1rem + 2vw, 2.4rem); font-weight: 800; letter-spacing: -0.02em; margin: 0 0 0.5rem; }
h2 { font-size: clamp(1.15rem, 1rem + 0.6vw, 1.4rem); font-weight: 700; letter-spacing: -0.01em; margin: 0 0 0.9rem; }
p { margin: 0 0 0.9rem; }
a { color: var(--ink); text-decoration: underline; text-underline-offset: 2px; text-decoration-thickness: 1.5px; }
a:hover { color: var(--blue); }

/* ---------------- Header / footer ---------------- */
.site-header {
  background: var(--bg);
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 0;
  z-index: 20;
  backdrop-filter: saturate(180%) blur(6px);
}
.header-row { display: flex; align-items: center; justify-content: space-between; padding: 0.85rem 0; }
.brand {
  font-weight: 800;
  font-size: 1.3rem;
  letter-spacing: -0.02em;
  text-decoration: none;
  color: var(--ink);
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}
.brand:hover { color: var(--ink); }
.brand-mark { height: 2.6rem; width: auto; flex-shrink: 0; display: block; }
.brand-text { display: flex; flex-direction: column; gap: 0.05rem; }
.brand-name { font-family: var(--serif); font-weight: 700; font-size: 1.4rem; letter-spacing: -0.01em; line-height: 1; color: var(--ink); }
.brand-charm { color: var(--ink); }
.brand-tagline { font-family: "Dancing Script", cursive; font-weight: 700; font-size: 0.98rem; line-height: 1; color: var(--accent); }
.nav { display: flex; align-items: center; gap: 1.1rem; }
.nav a { text-decoration: none; color: var(--ink-soft); font-weight: 600; font-size: 0.95rem; }
.nav a:hover { color: var(--ink); }

.checkbox-row { display: flex; align-items: center; gap: 0.5rem; }
.checkbox-row input[type="checkbox"] { width: auto; margin: 0; }

/* Manage-notifications page */
.notif-page { max-width: 620px; margin: 0 auto; }
.notif-back { margin-bottom: 0.5rem; }
.notif-back a { color: var(--ink-soft); text-decoration: none; font-weight: 600; font-size: 0.9rem; }
.notif-card { margin-top: 1.25rem; }
.notif-row { display: flex; align-items: flex-start; justify-content: space-between; gap: 1.5rem;
  padding: 1.1rem 0; border-bottom: 1px solid var(--line); }
.notif-row:first-child { padding-top: 0; }
.notif-info { flex: 1; min-width: 0; }
.notif-info strong { display: block; margin-bottom: 0.25rem; }
.notif-info p { margin: 0; font-size: 0.9rem; line-height: 1.5; max-width: 46ch; }
.notif-row .switch { margin-top: 2px; }
.notif-actions { margin-top: 1.3rem; }
.notif-soon { text-align: center; color: var(--muted); font-size: 0.9rem; margin-top: 1.25rem; }

/* Toggle switch */
.switch { position: relative; display: inline-block; width: 46px; height: 26px; flex-shrink: 0; }
.switch input { position: absolute; opacity: 0; width: 0; height: 0; }
.switch-slider { position: absolute; inset: 0; cursor: pointer; background: var(--line-strong);
  border-radius: 999px; transition: background 0.15s ease; }
.switch-slider::before { content: ""; position: absolute; height: 20px; width: 20px; left: 3px; top: 3px;
  background: #fff; border-radius: 50%; box-shadow: 0 1px 2px rgba(36,28,21,.2); transition: transform 0.15s ease; }
.switch input:checked + .switch-slider { background: var(--yellow); }
.switch input:checked + .switch-slider::before { transform: translateX(20px); }
.switch input:focus-visible + .switch-slider { box-shadow: var(--ring); }

/* New-survey naming page */
.new-survey { padding: clamp(1.5rem, 1rem + 3vw, 3.5rem) 0; }
.new-survey-back { margin-bottom: 0.75rem; }
.new-survey-back a { color: var(--ink-soft); text-decoration: none; font-weight: 600; font-size: 0.9rem; }
.new-survey-form { margin-top: 1.25rem; }
.new-survey-form label { display: block; font-weight: 600; margin-bottom: 0.4rem; }
.new-survey-form input[type="text"] { width: 100%; padding: 0.7rem 0.9rem; font: inherit;
  border: 1px solid var(--line-strong); border-radius: var(--radius-sm); margin-bottom: 1rem; }
.new-survey-form input[type="text"]:focus { outline: none; border-color: var(--yellow); box-shadow: var(--ring); }
.new-survey-form .btn-cta { width: 100%; justify-content: center; }

.new-survey-preview { margin-top: 1.5rem; padding-top: 1.25rem; border-top: 1px solid var(--line); }
.new-survey-preview-title { font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.05em;
  font-weight: 700; color: var(--muted); margin: 0 0 0.8rem; }
.tpl-condensed { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 0.55rem; }
.tpl-condensed li { display: flex; align-items: baseline; gap: 0.5rem; font-size: 0.92rem; }
.tpl-condensed-ico { flex-shrink: 0; }
.tpl-condensed-text { flex: 1; color: var(--ink-soft); }
.tpl-condensed .q-type-tag.mini { flex-shrink: 0; }

/* Header search */
.nav-search { margin: 0; }
.nav-search input { width: 170px; padding: 0.42rem 0.9rem; font: inherit; font-size: 0.9rem;
  border: 1px solid var(--line-strong); border-radius: 999px; background: var(--bg); color: var(--ink); }
.nav-search input::placeholder { color: var(--muted); }
.nav-search input:focus { outline: none; border-color: var(--yellow); box-shadow: var(--ring); }

/* Mobile menu toggle (hamburger) — hidden on desktop. */
.nav-toggle { display: none; flex-direction: column; justify-content: center; gap: 5px;
  background: none; border: 0; padding: 0.5rem; cursor: pointer; }
.nav-toggle-bar { display: block; width: 24px; height: 2.5px; background: var(--ink); border-radius: 2px; }

.site-footer { margin-top: auto; padding: 3rem 0 1.75rem; color: var(--muted); font-size: 0.9rem; border-top: 1px solid var(--line); background: var(--paper); }
.footer-grid { display: grid; grid-template-columns: 1.6fr 1fr 1fr 1fr; gap: 2rem; align-items: start; }
.footer-brand { max-width: 320px; }
.footer-logo { display: inline-flex; align-items: center; gap: 0.45rem; text-decoration: none; }
.footer-logo .brand-mark { height: 2rem; width: auto; }
.footer-logo .brand-name { font-family: var(--serif); font-weight: 700; font-size: 1.25rem; color: var(--ink); }
.footer-blurb { margin: 0.8rem 0 1.1rem; color: var(--ink-soft); line-height: 1.55; }
.footer-col h3 { font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.06em; font-weight: 800; color: var(--ink); margin: 0 0 0.85rem; }
.footer-col { display: flex; flex-direction: column; gap: 0.55rem; }
.footer-col a { color: var(--ink-soft); text-decoration: none; font-weight: 500; }
.footer-col a:hover { color: var(--ink); text-decoration: underline; }
.footer-bottom { display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  flex-wrap: wrap; margin-top: 2.5rem; padding-top: 1.25rem; border-top: 1px solid var(--line); font-size: 0.85rem; }
.footer-legal { display: flex; gap: 1rem; }
.footer-bottom a { color: var(--ink-soft); text-decoration: none; font-weight: 600; }
.footer-bottom a:hover { color: var(--ink); text-decoration: underline; }

@media (max-width: 720px) {
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 1.75rem; }
  .footer-brand { grid-column: 1 / -1; max-width: none; }
  .footer-bottom { justify-content: center; text-align: center; }
}

main.container { flex: 1 0 auto; padding-top: 2rem; padding-bottom: 3rem; }

/* ---------------- Cards ---------------- */
.card {
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: var(--card-pad);
  margin-bottom: 1.5rem;
}
.card.centered { text-align: center; }
.card.narrow { max-width: 440px; margin-inline: auto; }

/* ---------------- Buttons ---------------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  background: var(--ink);
  color: #fff;
  border: 1.5px solid var(--ink);
  border-radius: 999px;
  padding: 0.65rem 1.3rem;
  font: inherit;
  font-weight: 700;
  font-size: 0.95rem;
  cursor: pointer;
  text-decoration: none;
  transition: transform 0.04s ease, background 0.15s ease, box-shadow 0.15s ease;
  white-space: nowrap;
}
.btn:hover { background: #000; color: #fff; box-shadow: var(--shadow-sm); }
.btn:active { transform: translateY(1px); }
.btn-cta { background: var(--yellow); border-color: var(--yellow); color: var(--ink); }
.btn-cta:hover { background: var(--yellow-dark); border-color: var(--yellow-dark); color: var(--ink); }
.btn-secondary { background: #fff; color: var(--ink); border-color: var(--line-strong); }
.btn-secondary:hover { background: var(--paper); color: var(--ink); }
.btn-small { padding: 0.42rem 0.9rem; font-size: 0.85rem; }
.btn-danger { background: var(--red); border-color: var(--red); }
.btn-danger:hover { background: #c02563; color: #fff; }

.linkish { background: none; border: none; color: var(--blue); cursor: pointer; padding: 0; font: inherit; font-size: 0.9rem; font-weight: 600; text-decoration: underline; text-underline-offset: 2px; }
.linkish:hover { color: var(--ink); }

.icon-btn {
  background: #fff; border: 1px solid var(--line-strong); border-radius: 8px;
  width: 34px; height: 34px; cursor: pointer; font-size: 0.95rem; line-height: 1;
  display: inline-flex; align-items: center; justify-content: center; color: var(--ink);
  transition: background 0.12s ease;
}
.icon-btn:hover { background: var(--paper-2); }
.icon-btn:disabled { opacity: 0.3; cursor: default; }
.icon-btn.danger:hover { background: var(--red-bg); border-color: #f0a6c2; }

/* ---------------- Forms ---------------- */
input[type=text], input[type=email], input[type=url], input[type=tel],
input[type=number], input[type=date], input[type=password], textarea, select {
  width: 100%;
  padding: 0.65rem 0.85rem;
  border: 1.5px solid var(--line-strong);
  border-radius: var(--radius-sm);
  font: inherit;
  color: var(--ink);
  background: #fff;
  margin-top: 0.3rem;
  transition: border-color 0.12s ease, box-shadow 0.12s ease;
}
select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='%23241c15' d='M1 1l5 5 5-5'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.9rem center;
  padding-right: 2.2rem;
}
textarea { resize: vertical; }
input:focus, textarea:focus, select:focus { outline: none; border-color: var(--ink); box-shadow: var(--ring); }
label { display: block; font-weight: 600; margin-bottom: 0.7rem; color: var(--ink); }
.stack > * { margin-bottom: 1rem; }
.checkline { font-weight: 500; display: flex; align-items: center; }
.checkline input { width: auto; margin: 0 0.5rem 0 0; }
input[type=checkbox], input[type=radio] { accent-color: var(--ink); width: 1.05rem; height: 1.05rem; }
.row { display: flex; gap: 1rem; flex-wrap: wrap; }
.row label { flex: 1; min-width: 120px; }
.tiny { width: 72px !important; display: inline-block; }
.inline-form { display: inline; }
.hint { color: var(--muted); font-size: 0.82rem; margin: 0.3rem 0 0; }
.muted { color: var(--muted); }

/* ---------------- Toasts (flash messages) ---------------- */
.toasts {
  position: fixed; top: 4.75rem; right: clamp(0.75rem, 2vw, 1.5rem); z-index: 1000;
  display: flex; flex-direction: column; gap: 0.6rem;
  width: min(380px, calc(100vw - 1.5rem)); pointer-events: none;
}
.toast {
  pointer-events: auto;
  display: flex; align-items: flex-start; gap: 0.75rem;
  padding: 0.8rem 1rem; border-radius: var(--radius-sm); border: 1px solid;
  box-shadow: var(--shadow); font-weight: 500;
  animation: toast-in 0.22s ease both;
}
.toast.toast-hide { animation: toast-out 0.25s ease forwards; }
.toast-msg { flex: 1; }
.toast-close {
  background: none; border: none; cursor: pointer; font-size: 1.2rem; line-height: 1;
  color: inherit; opacity: 0.55; padding: 0; margin: -0.1rem -0.1rem 0 0;
}
.toast-close:hover { opacity: 1; }
.toast-success { background: var(--green-bg); border-color: #b5e3c2; color: #1f6b39; }
.toast-error { background: var(--red-bg); border-color: #f3b0cb; color: #b02560; }
.toast-info, .toast-debug { background: #e8f1fb; border-color: #b6d6f2; color: #1a5e9c; }
.toast-warning { background: #fff7e0; border-color: #ffe08a; color: #9a6a00; }

@keyframes toast-in { from { opacity: 0; transform: translateX(14px); } to { opacity: 1; transform: none; } }
@keyframes toast-out { to { opacity: 0; transform: translateX(14px); } }
@media (prefers-reduced-motion: reduce) {
  .toast, .toast.toast-hide { animation: none; }
}

/* ---------------- Landing ---------------- */
.hero { text-align: center; padding: clamp(1.25rem, 0.75rem + 2vw, 2.5rem) 0 1rem; }
.hero-art { display: flex; justify-content: center; margin-bottom: 0.5rem; }
.hero-art svg { width: clamp(170px, 26vw, 250px); height: auto; animation: floaty 4.5s ease-in-out infinite; }
@keyframes floaty {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-9px); }
}
@media (prefers-reduced-motion: reduce) {
  .hero-art svg, .features-mascot svg, .closed-art svg, .empty-bird svg { animation: none; }
}
.hero h1 { font-family: var(--serif); font-size: clamp(2.2rem, 1.4rem + 4vw, 4rem); font-weight: 600; letter-spacing: -0.02em; }
.hero h1 .hl { background: linear-gradient(transparent 62%, var(--yellow) 62%); padding: 0 0.15em; }
.lead { font-size: clamp(1rem, 0.95rem + 0.4vw, 1.2rem); color: var(--muted); max-width: 640px; margin: 0 auto 1.5rem; }
.create-form { max-width: 620px; margin: 2rem auto; text-align: left; }
.create-row { display: flex; gap: 0.6rem; }
.create-row input { flex: 1; }
.how, .types { margin-top: clamp(2.5rem, 1.5rem + 3vw, 4.5rem); }
.section-title { text-align: center; font-family: var(--serif); font-weight: 600; font-size: clamp(1.5rem, 1.2rem + 1.2vw, 2.1rem); letter-spacing: -0.01em; margin: 0 0 0.4rem; }
.section-sub { text-align: center; color: var(--muted); margin: 0 auto 1.75rem; max-width: 520px; }
.section-title + .steps { margin-top: 1.75rem; }

.steps { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 1.25rem; }
.step { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 1.75rem 1.5rem; text-align: center; }
.step-num {
  display: inline-flex; align-items: center; justify-content: center;
  width: 2.6rem; height: 2.6rem; border-radius: 50%;
  background: var(--yellow); color: var(--ink); font-weight: 800; font-size: 1.15rem;
  margin-bottom: 0.9rem; box-shadow: var(--shadow-sm);
}
.step h3 { font-size: 1.15rem; margin: 0 0 0.4rem; }
.step p { color: var(--muted); margin: 0; }

.type-grid { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; justify-content: center; gap: 0.6rem; }
.type-chip {
  display: inline-flex; align-items: center; gap: 0.5rem;
  background: var(--card); color: var(--ink); border: 1px solid var(--line);
  border-radius: 999px; padding: 0.45rem 1rem 0.45rem 0.85rem;
  font-size: 0.9rem; font-weight: 600; box-shadow: var(--shadow-sm);
  transition: border-color 0.12s ease, transform 0.04s ease;
}
.type-chip:hover { border-color: var(--line-strong); transform: translateY(-1px); }
.type-ico { font-size: 1.05rem; line-height: 1; }

/* Feature grid — borderless, whimsical, flanked by character mascots */
.features { margin-top: clamp(2.5rem, 1.5rem + 3vw, 4.5rem); }
.features-row { display: flex; align-items: center; gap: clamp(0.5rem, 2vw, 2rem); margin-top: 1.75rem; }
.feature-grid { flex: 1; display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 1.5rem 1.25rem; }
.feature-card { background: transparent; border: none; box-shadow: none; border-radius: var(--radius); padding: 0.75rem; transition: transform 0.12s ease; }
.feature-card:hover { transform: translateY(-3px); }
.feature-ico {
  display: inline-flex; align-items: center; justify-content: center;
  width: 3rem; height: 3rem; border-radius: 14px;
  background: #fff6da; font-size: 1.5rem; margin-bottom: 0.9rem;
}
.feature-card h3 { font-size: 1.12rem; margin: 0 0 0.4rem; letter-spacing: -0.01em; }
.feature-card p { color: var(--muted); margin: 0; }

.features-mascot { flex: 0 0 auto; width: clamp(100px, 11vw, 152px); }
.features-mascot svg { width: 100%; height: auto; display: block; animation: floaty 5s ease-in-out infinite; }
.features-mascot-right svg { animation-duration: 5.6s; animation-delay: 0.4s; }
@media (max-width: 1000px) { .features-mascot { display: none; } }

/* Closing call-to-action band */
.cta-band {
  text-align: center; margin-top: clamp(2.5rem, 1.5rem + 3vw, 4.5rem);
  background: linear-gradient(135deg, #fffdf3 0%, var(--paper) 100%);
  border: 1px solid var(--line); border-radius: calc(var(--radius) + 4px);
  padding: clamp(1.75rem, 1rem + 3vw, 3.25rem);
}
.cta-band h2 { font-family: var(--serif); font-weight: 600; letter-spacing: -0.01em; font-size: clamp(1.5rem, 1.2rem + 1.2vw, 2.1rem); margin: 0 0 0.3rem; }
.cta-band .section-sub { margin-bottom: 0; }
.cta-actions { display: flex; gap: 0.75rem; justify-content: center; flex-wrap: wrap; margin-top: 1.25rem; }

/* Connect to AI */
.ai { margin-top: clamp(2.5rem, 1.5rem + 3vw, 4.5rem); }
.ai-card {
  display: grid; grid-template-columns: 1.05fr 1fr; align-items: center;
  gap: clamp(1.5rem, 1rem + 2vw, 3rem);
  background: linear-gradient(135deg, #fffdf3 0%, var(--paper) 100%);
  border: 1px solid var(--line); border-radius: calc(var(--radius) + 4px);
  box-shadow: var(--shadow); padding: clamp(1.5rem, 1rem + 2vw, 3rem);
  position: relative; overflow: hidden;
}
.ai-card::before {
  content: ""; position: absolute; top: -60px; right: -60px;
  width: 200px; height: 200px; border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 224, 27, 0.45), transparent 70%);
  pointer-events: none;
}
.pill-soon {
  display: inline-block; background: var(--ink); color: #fff;
  font-size: 0.72rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.05em;
  padding: 0.25rem 0.65rem; border-radius: 999px; margin-bottom: 0.85rem;
}
.ai-title { font-family: var(--serif); font-weight: 600; letter-spacing: -0.01em; font-size: clamp(1.6rem, 1.2rem + 1.5vw, 2.3rem); margin: 0 0 0.6rem; }
.ai-copy > p { color: var(--ink-soft); font-size: 1.02rem; max-width: 48ch; margin: 0 0 1rem; }
.ai-feats { list-style: none; padding: 0; margin: 0 0 1.3rem; display: grid; gap: 0.65rem; }
.ai-feats li { color: var(--ink); line-height: 1.5; }
.ai-providers { display: flex; gap: 0.6rem; flex-wrap: wrap; }
.provider-chip {
  display: inline-flex; align-items: center; gap: 0.5rem;
  background: var(--card); border: 1px solid var(--line-strong); border-radius: 999px;
  padding: 0.45rem 1rem; font-weight: 700; font-size: 0.9rem; box-shadow: var(--shadow-sm);
}
.dot { width: 0.7rem; height: 0.7rem; border-radius: 50%; display: inline-block; }
.dot-claude { background: #d97757; }
.dot-openai { background: #10a37f; }

.ai-chat {
  display: flex; flex-direction: column; gap: 0.55rem;
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 1rem; box-shadow: var(--shadow-sm); position: relative;
}
.bubble { padding: 0.65rem 0.9rem; border-radius: 16px; font-size: 0.9rem; line-height: 1.45; max-width: 88%; }
.bubble.user { align-self: flex-end; background: var(--ink); color: #fff; border-bottom-right-radius: 5px; }
.bubble.ai { align-self: flex-start; background: var(--paper-2); color: var(--ink); border-bottom-left-radius: 5px; }

@media (max-width: 760px) {
  .ai-card { grid-template-columns: 1fr; }
}

/* ---------------- Template library ---------------- */
.q-type-tag { display: inline-block; background: var(--paper-2); border: 1px solid var(--line); color: var(--ink-soft); border-radius: 6px; padding: 0.15rem 0.6rem; font-size: 0.78rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.03em; }
.q-choices { color: var(--muted); font-size: 0.88rem; margin: 0.45rem 0 0; }
.hero-alt { text-align: center; color: var(--muted); margin-top: -0.5rem; }

.tpl-head { text-align: center; margin-bottom: 2rem; }
.tpl-h1 { font-family: var(--serif); font-weight: 600; letter-spacing: -0.01em; font-size: clamp(1.8rem, 1.3rem + 2vw, 2.8rem); margin: 0 0 0.4rem; }
.tpl-back { text-align: center; }
.tpl-cats { display: flex; flex-wrap: wrap; justify-content: center; gap: 0.5rem; margin-top: 0.5rem; }
.tpl-cats a {
  background: var(--card); border: 1px solid var(--line-strong); border-radius: 999px;
  padding: 0.45rem 1rem; font-weight: 600; font-size: 0.9rem; text-decoration: none; color: var(--ink);
  box-shadow: var(--shadow-sm);
}
.tpl-cats a:hover { background: var(--paper); color: var(--ink); }

.tpl-group { margin-bottom: 2.5rem; }
.tpl-group-head { display: flex; align-items: baseline; justify-content: space-between; gap: 1rem; margin-bottom: 1rem; padding-bottom: 0.5rem; border-bottom: 1px solid var(--line); }
.tpl-group-title { font-size: 1.3rem; margin: 0; }
.tpl-seeall { font-size: 0.9rem; font-weight: 600; text-decoration: none; white-space: nowrap; color: var(--blue); }
.tpl-seeall:hover { color: var(--ink); }
.cat-count { display: inline-block; min-width: 1.4rem; text-align: center; background: var(--paper-2); color: var(--ink-soft); border-radius: 999px; padding: 0 0.4rem; font-size: 0.78rem; font-weight: 700; }
.pagination { display: flex; align-items: center; justify-content: center; gap: 1rem; margin-top: 2rem; }
.page-status { color: var(--muted); font-size: 0.9rem; }
.tpl-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 1.25rem; }
.tpl-card {
  display: flex; flex-direction: column; background: var(--card);
  border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow);
  padding: 1.4rem; transition: border-color 0.12s ease, transform 0.06s ease, box-shadow 0.12s ease;
}
.tpl-card:hover { border-color: var(--line-strong); transform: translateY(-2px); box-shadow: var(--shadow); }
.tpl-card-title { font-size: 1.12rem; margin: 0 0 0.4rem; letter-spacing: -0.01em; }
.tpl-card-title a { text-decoration: none; color: var(--ink); }
.tpl-card-title a:hover { color: var(--blue); }
.tpl-desc { color: var(--muted); font-size: 0.92rem; margin: 0 0 0.8rem; flex: 1; }
.tpl-meta { font-size: 0.82rem; font-weight: 600; color: var(--ink-soft); margin: 0 0 1rem; }
.tpl-actions { display: flex; gap: 0.5rem; align-items: center; }

/* Breadcrumb + detail */
.breadcrumb { font-size: 0.9rem; color: var(--muted); margin-bottom: 1.25rem; }
.breadcrumb a { color: var(--ink-soft); text-decoration: none; }
.breadcrumb a:hover { color: var(--ink); text-decoration: underline; }
.breadcrumb .sep { margin: 0 0.4rem; color: var(--line-strong); }
.breadcrumb .current { color: var(--ink); font-weight: 600; }

.tpl-detail { display: grid; grid-template-columns: 1fr 320px; gap: 1.5rem; align-items: start; }
.tpl-detail-side { position: sticky; top: 84px; }
.tpl-detail-side .card { margin-bottom: 0; }
.tpl-detail-main .q-type-tag { margin-bottom: 0.6rem; }
.tpl-detail-main h2 { margin-top: 1.5rem; border-top: 1px solid var(--line); padding-top: 1.25rem; }
.tpl-preview { list-style: none; counter-reset: q; padding: 0; margin: 0; }
.tpl-preview li { counter-increment: q; padding: 0.9rem 0; border-bottom: 1px solid var(--line); }
.tpl-preview li:last-child { border-bottom: none; }
.tpl-preview-top { display: flex; align-items: baseline; gap: 0.6rem; }
.tpl-preview-text { font-weight: 600; }
.tpl-preview-text::before { content: counter(q) ". "; color: var(--muted); font-weight: 700; }
.q-type-tag.mini { display: inline-block; margin-top: 0.4rem; font-size: 0.72rem; }

@media (max-width: 760px) {
  .tpl-detail { grid-template-columns: 1fr; }
  .tpl-detail-side { position: static; }
}

/* ---------------- Admin ---------------- */
.admin-head { display: flex; align-items: flex-end; justify-content: space-between; flex-wrap: wrap; gap: 1rem; margin-bottom: 1.5rem; }
.admin-tabs { display: flex; gap: 0.3rem; background: var(--paper-2); padding: 0.3rem; border-radius: 999px; }
.admin-tabs a { padding: 0.5rem 1.05rem; border-radius: 999px; text-decoration: none; color: var(--ink-soft); font-size: 0.9rem; font-weight: 600; }
.admin-tabs a:hover { color: var(--ink); }
.admin-tabs a.active { background: var(--ink); color: #fff; }

.status-badge { display: inline-block; font-size: 0.72rem; font-weight: 800; text-transform: uppercase; letter-spacing: 0.05em; padding: 0.25rem 0.6rem; border-radius: 999px; vertical-align: middle; }
.status-draft { background: var(--paper-2); color: var(--muted); }
.status-open { background: var(--green-bg); color: var(--green); }
.status-closed, .status-ended { background: var(--red-bg); color: var(--red); }

/* Prominent lifecycle banner on the overview */
.status-banner {
  display: flex; align-items: center; justify-content: space-between; gap: 1.5rem;
  flex-wrap: wrap; border: 1px solid; border-radius: var(--radius);
  padding: 1.15rem 1.4rem; margin-bottom: 1.5rem;
}
.status-banner h2 { margin: 0 0 0.15rem; font-size: 1.2rem; }
.status-banner p { margin: 0; color: var(--ink-soft); }
.status-banner .status-banner-action { flex-shrink: 0; }
.status-banner.is-open { background: var(--green-bg); border-color: #b5e3c2; }
.status-banner.is-open h2 { color: #1f6b39; }
.status-banner.is-draft { background: #fff7e0; border-color: #ffe08a; }
.status-banner.is-draft h2 { color: #9a6a00; }
.status-banner.is-closed, .status-banner.is-ended { background: var(--red-bg); border-color: #f3b0cb; }
.status-banner.is-closed h2, .status-banner.is-ended h2 { color: #b02560; }

/* Closing-date controls */
.deadline-status { margin-bottom: 1rem; }
.deadline-form label { font-weight: 600; margin-bottom: 0.4rem; }
.deadline-row { display: flex; gap: 0.5rem; align-items: center; }
.deadline-row input[type=date] { margin-top: 0; max-width: 200px; }
.deadline-extra { margin-top: 1rem; padding-top: 0.9rem; border-top: 1px solid var(--line); }
.deadline-extra .extend-form { margin-top: 0; }
.deadline-extra .extend-form span { color: var(--muted); }

.grid-2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 1.5rem; }
.callout { border-left: 5px solid var(--yellow); }
.danger { border-left: 5px solid var(--red); }

/* Admin action rows: button on the left, explanation to the right. */
.action-row { display: flex; align-items: center; gap: 1.5rem; flex-wrap: wrap; }
.action-row form { margin: 0; flex-shrink: 0; }
.action-note { margin: 0; color: var(--ink-soft); font-size: 0.92rem; line-height: 1.5; max-width: 52ch; }
@media (max-width: 560px) { .action-row { align-items: flex-start; } }

.link-label { margin-top: 1rem; }

/* QR + print poster */
.qr-block { display: flex; gap: 1rem; align-items: center; margin-top: 1.25rem; }
.admin-warn { margin-top: 1.5rem; padding: 1rem 1.1rem; border: 1px solid #ffe08a; background: #fff9e6; border-radius: var(--radius-sm); }
.admin-warn-title { font-weight: 700; margin: 0 0 0.3rem; color: #9a6a00; }
.admin-warn .hint { color: var(--ink-soft); margin-top: 0; }
.admin-warn .copy-row { margin-top: 0.7rem; }
.qr-thumb { flex-shrink: 0; width: 116px; height: 116px; border: 1px solid var(--line); border-radius: 10px; padding: 6px; background: #fff; }
.qr-thumb svg { display: block; width: 100%; height: 100%; }
.qr-actions { display: flex; flex-direction: column; gap: 0.5rem; align-items: flex-start; }
.qr-actions .hint { margin: 0 0 0.2rem; }

.print-toolbar { display: flex; justify-content: space-between; align-items: center; gap: 1rem; margin-bottom: 1.5rem; }
.poster { max-width: 540px; margin: 0 auto; text-align: center; padding: clamp(1.75rem, 1rem + 3vw, 3.25rem); }
.poster-kicker { text-transform: uppercase; letter-spacing: 0.08em; font-weight: 700; color: var(--muted); font-size: 0.85rem; margin: 0 0 0.5rem; }
.poster-title { font-family: var(--serif); font-weight: 600; letter-spacing: -0.01em; font-size: clamp(1.7rem, 1.2rem + 2vw, 2.6rem); margin: 0 0 0.5rem; }
.poster-desc { color: var(--ink-soft); margin: 0 auto 1rem; max-width: 42ch; }
.poster-qr { width: min(320px, 72vw); margin: 1.25rem auto; }
.poster-qr svg { width: 100%; height: auto; display: block; }
.poster-url { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 0.85rem; color: var(--ink-soft); word-break: break-all; margin: 0.5rem 0 0; }
.poster-brand { margin-top: 1.5rem; color: var(--muted); font-weight: 700; letter-spacing: -0.01em; }

@media print {
  .site-header, .site-footer, .print-toolbar, .toasts { display: none !important; }
  body { background: #fff; }
  main.container { padding: 0; }
  .poster { border: none; box-shadow: none; margin-top: 1.5rem; max-width: none; }
  .poster-qr { width: 60mm; }
}
.copy-row { display: flex; gap: 0.5rem; }
.link-input { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 0.82rem; background: var(--paper); }
.actions { display: flex; gap: 0.6rem; flex-wrap: wrap; align-items: center; margin: 0.7rem 0; }
.extend-form { display: flex; align-items: center; gap: 0.6rem; margin-top: 0.8rem; flex-wrap: wrap; }
.extend-form label { margin: 0; font-weight: 500; display: flex; align-items: center; gap: 0.4rem; }

/* ---------------- Question builder ---------------- */
.builder { display: grid; grid-template-columns: minmax(260px, 340px) 1fr; gap: 1.5rem; align-items: start; }
.builder-side { position: sticky; top: 84px; }
.builder-side .card { margin-bottom: 0; }
.builder-foot { display: flex; justify-content: space-between; gap: 0.6rem; margin-top: 0.5rem; flex-wrap: wrap; }

.q-block { border: 1px solid var(--line); border-radius: var(--radius); padding: 1rem 1.15rem; margin-bottom: 0.85rem; background: var(--bg); box-shadow: var(--shadow-sm); transition: border-color 0.12s ease; }
.q-block:hover { border-color: var(--line-strong); }
.q-block-head { display: flex; align-items: center; gap: 0.6rem; margin-bottom: 0.75rem; }
.q-num { flex-shrink: 0; width: 1.75rem; height: 1.75rem; display: inline-flex; align-items: center; justify-content: center; background: var(--ink); color: #fff; border-radius: 50%; font-size: 0.85rem; font-weight: 700; }
.q-type-select { flex: 1; margin-top: 0; max-width: 240px; }
.q-block-controls { display: flex; gap: 0.3rem; margin-left: auto; flex-shrink: 0; }
.q-block input[type=text], .q-block textarea, .q-block .type-field { margin-bottom: 0.7rem; }
.q-block .type-field:last-of-type { margin-bottom: 0.3rem; }
.q-text-input { font-weight: 600; }
.q-block label.mini { font-weight: 500; font-size: 0.85rem; color: var(--muted); margin-bottom: 0; }
.req { color: var(--red); font-weight: 700; font-size: 0.8rem; }

.empty-state { border: 2px dashed var(--line-strong); border-radius: var(--radius); padding: 2.75rem 1.5rem; text-align: center; background: var(--paper); }
.empty-icon { font-size: 2.4rem; line-height: 1; margin-bottom: 0.6rem; }
.empty-title { font-weight: 700; font-size: 1.1rem; margin: 0 0 0.25rem; }
.empty-state .muted { margin: 0 auto 1.2rem; max-width: 360px; }

@media (max-width: 820px) {
  .builder { grid-template-columns: 1fr; }
  .builder-side { position: static; }
}

/* ---------------- Public survey form ---------------- */
.take { max-width: 720px; margin-inline: auto; }
.take h1 { margin-bottom: 0.4rem; }
.question { border: none; border-top: 1px solid var(--line); padding: 1.4rem 0 0.5rem; margin: 0; }
.question:first-of-type { border-top: none; padding-top: 0.5rem; }
.question legend { font-weight: 700; font-size: 1.05rem; padding: 0; }
.question.has-error { background: var(--red-bg); border-radius: var(--radius-sm); padding-inline: 1rem; margin-inline: -1rem; }
.question.has-error legend { color: var(--red); }
.help { color: var(--muted); font-size: 0.9rem; margin: 0.25rem 0 0.7rem; }
.field-error { color: var(--red); font-size: 0.85rem; font-weight: 600; margin: 0.5rem 0 0; }
.options { display: flex; flex-direction: column; gap: 0.55rem; margin-top: 0.6rem; }
.options-inline, .likert { flex-direction: row; flex-wrap: wrap; gap: 0.75rem; }
.option {
  font-weight: 500; margin: 0; display: flex; align-items: center; gap: 0.55rem; cursor: pointer;
  border: 1.5px solid var(--line); border-radius: var(--radius-sm); padding: 0.6rem 0.85rem;
  transition: border-color 0.12s ease, background 0.12s ease;
}
.option:hover { border-color: var(--line-strong); background: var(--paper); }
.option:has(input:checked) { border-color: var(--ink); background: #fff; box-shadow: inset 0 0 0 1px var(--ink); }
.option input { margin: 0; }
.options-inline .option, .likert .option { flex: 0 0 auto; }
.likert-point { flex-direction: column; text-align: center; gap: 0.4rem; font-size: 0.85rem; min-width: 92px; flex: 1; }
.survey-form button[type=submit] { margin-top: 1.5rem; }

/* Star rating */
.rating { display: inline-flex; flex-direction: row-reverse; gap: 0.1rem; font-size: 2rem; margin-top: 0.4rem; }
.rating .star { cursor: pointer; color: #dcd8cf; line-height: 1; transition: color 0.1s ease; padding: 0 0.05rem; }
.rating .star input { position: absolute; opacity: 0; width: 0; height: 0; }
.rating .star:hover, .rating .star:hover ~ .star,
.rating .star:has(input:checked), .rating .star:has(input:checked) ~ .star { color: var(--yellow-dark); }
.rating .star:has(input:focus-visible) { outline: none; text-shadow: 0 0 0 2px var(--yellow); }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

/* ---------------- Responses table ---------------- */
.responses-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 1rem; gap: 1rem; flex-wrap: wrap; }
.table-scroll { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius-sm); }
.responses-table { border-collapse: collapse; width: 100%; font-size: 0.9rem; }
.responses-table th, .responses-table td { border-bottom: 1px solid var(--line); padding: 0.65rem 0.8rem; text-align: left; vertical-align: top; }
.responses-table th { background: var(--paper); position: sticky; top: 0; font-weight: 700; white-space: nowrap; }
.responses-table tbody tr:hover { background: var(--paper); }
.responses-table tbody tr:last-child td { border-bottom: none; }
.nowrap { white-space: nowrap; }

/* ---------------- Insights ---------------- */
.stat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 1rem; margin-bottom: 1.5rem; }
.stat-card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow-sm); padding: 1.1rem 1.25rem; }
.stat-num { font-size: 1.9rem; font-weight: 800; letter-spacing: -0.02em; line-height: 1.1; }
.stat-label { color: var(--muted); font-size: 0.85rem; font-weight: 600; margin-top: 0.2rem; }

.insight-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 1rem; }
.insight-head h2 { font-size: 1.05rem; margin: 0; }
.insight-meta { margin: 0.3rem 0 0.9rem; font-size: 0.88rem; }

.bars { display: flex; flex-direction: column; gap: 0.55rem; }
.bar-row { display: grid; grid-template-columns: minmax(80px, 28%) 1fr auto; align-items: center; gap: 0.75rem; }
.bar-label { font-size: 0.9rem; font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bar-track { background: var(--paper-2); border-radius: 999px; height: 1.15rem; overflow: hidden; }
.bar-fill { display: block; height: 100%; background: var(--yellow); border-radius: 999px; min-width: 2px; transition: width 0.35s ease; }
.bar-val { font-size: 0.85rem; font-variant-numeric: tabular-nums; white-space: nowrap; color: var(--ink); }

.ministat-grid { display: flex; gap: 2rem; flex-wrap: wrap; }
.ministat-num { font-size: 1.7rem; font-weight: 800; letter-spacing: -0.02em; }

.sample-list { margin: 0; padding-left: 1.1rem; display: flex; flex-direction: column; gap: 0.4rem; }
.sample-list li { color: var(--ink-soft); }

@media (max-width: 560px) {
  .bar-row { grid-template-columns: 1fr auto; }
  .bar-row .bar-track { grid-column: 1 / -1; order: 3; }
}

/* ---------------- Settings / plan ---------------- */
.plan-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 1rem; }
.plan-head h2 { margin-bottom: 0.2rem; }
.plan-badge { display: inline-block; font-size: 0.75rem; font-weight: 800; text-transform: uppercase; letter-spacing: 0.04em; padding: 0.25rem 0.65rem; border-radius: 999px; }
.plan-free { background: var(--paper-2); color: var(--ink-soft); }
.plan-pro { background: var(--yellow); color: var(--ink); }
.locked-list { list-style: none; padding: 0; margin: 1.25rem 0; display: flex; flex-direction: column; gap: 0.5rem; }
.locked-feature { display: flex; align-items: center; gap: 0.9rem; padding: 0.85rem 1rem; border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--paper); }
.locked-feature > div { flex: 1; }
.locked-feature strong { font-weight: 700; }
.locked-feature p { margin: 0.1rem 0 0; font-size: 0.88rem; }
.locked-feature .lock { font-size: 1.1rem; opacity: 0.6; }
.soon-badge { flex-shrink: 0; background: var(--ink); color: #fff; font-size: 0.72rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.04em; padding: 0.2rem 0.55rem; border-radius: 999px; }
.btn[disabled] { opacity: 0.55; cursor: not-allowed; }

/* ---------------- Dashboard ---------------- */
.list-toolbar { display: flex; justify-content: flex-end; margin-bottom: 1rem; }
.sort-form { display: flex; align-items: center; gap: 0.5rem; }
.sort-label { margin: 0; font-weight: 600; font-size: 0.9rem; color: var(--ink-soft); }
.sort-form select { margin-top: 0; width: auto; min-width: 170px; }
.survey-list { list-style: none; padding: 0; margin: 0; }
.survey-row { display: flex; justify-content: space-between; align-items: center; gap: 1rem; flex-wrap: wrap; }
.survey-title { display: inline-block; font-weight: 800; font-size: 1.15rem; text-decoration: none; margin-top: 0.4rem; letter-spacing: -0.01em; }
.survey-title:hover { color: var(--blue); }

.empty { color: var(--muted); }

/* Goldfinch for empty / zero states */
.empty-bird { margin: 0 auto 0.5rem; }
.empty-bird svg { width: clamp(110px, 18vw, 150px); height: auto; display: block; margin: 0 auto; animation: floaty 5s ease-in-out infinite; }
.empty-state-block { text-align: center; padding: clamp(1.5rem, 1rem + 3vw, 3rem) 1rem; }
.empty-state-block .muted { max-width: 42ch; margin-inline: auto; }

/* Sleeping-bird art on the closed/not-open survey page */
.closed-card { max-width: 560px; margin-inline: auto; padding: clamp(1.5rem, 1rem + 3vw, 3.5rem) 1rem; }
.closed-art { margin: 0 auto 0.25rem; }
.closed-art svg { width: clamp(140px, 32vw, 190px); height: auto; display: block; margin: 0 auto; animation: floaty 6s ease-in-out infinite; }

/* ---------------- SEO landing pages ---------------- */
.lp-bullets { list-style: none; padding: 0; margin: 0 auto; max-width: 640px;
  display: grid; gap: 0.6rem; }
.lp-bullets li { position: relative; padding-left: 1.8rem; color: var(--ink-soft); }
.lp-bullets li::before { content: "✅"; position: absolute; left: 0; }
.lp-body { max-width: 680px; margin: 0 auto 2.5rem; color: var(--ink-soft); }
.lp-related { max-width: 760px; margin: 0 auto 2.5rem; text-align: center; }
.lp-related-links { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap;
  gap: 0.6rem; justify-content: center; }
.lp-related-links a { display: inline-block; border: 1px solid var(--line-strong); border-radius: 999px;
  padding: 0.4rem 0.9rem; color: var(--ink-soft); text-decoration: none; font-weight: 600; font-size: 0.9rem; }
.lp-related-links a:hover { background: var(--paper); color: var(--ink); }

.faq { max-width: 760px; margin: 0 auto 3rem; }
.faq-list { display: flex; flex-direction: column; gap: 0.6rem; }
.faq-item { background: var(--bg); border: 1px solid var(--line); border-radius: var(--radius-sm);
  padding: 0.9rem 1.1rem; }
.faq-item summary { font-weight: 700; cursor: pointer; }
.faq-item p { margin: 0.6rem 0 0; color: var(--ink-soft); }

/* Error pages (404) */
.error-page { text-align: center; padding: clamp(1.5rem, 1rem + 3vw, 3.5rem) 1rem; max-width: 560px; margin: 0 auto; }
.error-code { font-family: var(--serif); font-weight: 700; font-size: clamp(3rem, 2rem + 5vw, 4.5rem);
  line-height: 1; color: var(--yellow); -webkit-text-stroke: 2px var(--ink); margin: 0.25rem 0 0.5rem; }
.error-page h1 { margin-bottom: 0.6rem; }
.error-msg { color: var(--ink-soft); max-width: 42ch; margin: 0 auto 1.6rem; line-height: 1.6; }
.error-actions { display: flex; flex-wrap: wrap; gap: 0.75rem; justify-content: center; }

/* Template detail intro copy */
.tpl-intro { margin: 0.25rem 0 1.75rem; }
.tpl-intro p { color: var(--ink-soft); line-height: 1.65; margin-bottom: 0.85rem; }

/* FAQ page */
.faq-page { max-width: 760px; margin: 0 auto 2rem; }
.faq-section { margin-bottom: 1.75rem; }
.faq-section-title { font-size: 1.2rem; margin: 0 0 0.7rem; }

/* More free apps */
.apps-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 1.25rem; margin-bottom: 3rem; }
.app-card { background: var(--bg); border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--shadow); padding: var(--card-pad); display: flex; flex-direction: column; }
.app-card h2 { font-size: 1.3rem; margin-bottom: 0.4rem; }
.app-tagline { color: var(--ink-soft); margin-bottom: 1rem; }
.app-feats { list-style: none; padding: 0; margin: 0 0 1.25rem; display: flex; flex-direction: column; gap: 0.4rem; }
.app-feats li { position: relative; padding-left: 1.5rem; color: var(--ink-soft); font-size: 0.95rem; }
.app-feats li::before { content: "✓"; position: absolute; left: 0; color: var(--green); font-weight: 800; }
.app-card .btn { margin-top: auto; align-self: flex-start; }
.why { margin-bottom: 2rem; }

/* Legal pages (privacy / terms) */
.legal { max-width: 760px; margin: 0 auto; padding: 1rem 0 2rem; }
.legal h1 { margin-bottom: 0.25rem; }
.legal-updated { color: var(--muted); font-size: 0.9rem; margin-bottom: 1.75rem; }
.legal h2 { font-size: 1.2rem; margin: 2rem 0 0.6rem; }
.legal h3 { font-size: 1rem; margin: 1.1rem 0 0.3rem; color: var(--ink); }
.legal p, .legal li { color: var(--ink-soft); line-height: 1.65; }
.legal ul { padding-left: 1.2rem; display: flex; flex-direction: column; gap: 0.35rem; margin: 0.5rem 0 1rem; }
.legal a { color: var(--blue); }

/* Buy Me a Coffee button */
.bmc-link { display: inline-flex; align-items: center; line-height: 0; }
.bmc-link img { display: block; border-radius: 8px; transition: transform 0.08s ease; }
.bmc-link:hover img { transform: translateY(-1px); }

/* Collapse the header nav into a toggle menu on smaller screens. */
@media (max-width: 760px) {
  .header-row { flex-wrap: wrap; gap: 0.5rem; }
  .nav-toggle { display: inline-flex; }
  .brand-tagline { display: none; }

  .nav { display: none; flex-basis: 100%; flex-direction: column; align-items: stretch;
    gap: 0; padding: 0 0 0.85rem; }
  .nav.open { display: flex; }

  /* full-width tappable rows, dividers between them */
  .nav a, .nav .linkish { width: 100%; padding: 0.95rem 0.25rem; font-size: 1rem;
    border-bottom: 1px solid var(--line); text-align: left; }
  .nav .inline-form { width: 100%; border-bottom: 1px solid var(--line); }
  .nav .inline-form .linkish { border-bottom: 0; }

  /* Sign-up CTA: prominent button, no divider lines around it */
  .nav .btn { width: 100%; margin-top: 0.9rem; justify-content: center; border-bottom: 0; }

  /* Buy me a coffee: pushed to the bottom and centered */
  .nav .bmc-link { order: 10; border-bottom: 0; justify-content: center; padding: 1.1rem 0 0.2rem; }

  /* Search: full-width at the top of the open menu */
  .nav .nav-search { width: 100%; padding: 0.7rem 0 0.5rem; }
  .nav .nav-search input { width: 100%; }
}

@media (max-width: 600px) {
  .create-row { flex-direction: column; }
  .admin-head { align-items: flex-start; }
  /* Admin sub-tabs wrap to two rows instead of overflowing off-screen. */
  .admin-tabs { width: 100%; flex-wrap: wrap; justify-content: center; border-radius: var(--radius); }
  .admin-tabs a { padding: 0.45rem 0.85rem; font-size: 0.85rem; }
}
