/* learn/support-local/ - "Help a local business". Loaded after ../personas/personas.css (same tokens and components);
   only the page's own pieces live here: the warm palette, the street (hero figure), the ripple, status tags, the wizard,
   the badge gallery, the points table, the badge dialog and the printable take-over card. */
.sl { --loc: #b4441c; --on-loc: #fff; --loc-2: #d97706; --loc-soft: #fdeee6; --gold: #c9a227; }
@media (prefers-color-scheme: dark) { .sl { --loc: #f59e7b; --on-loc: #2a0d02; --loc-2: #fbbf24; --loc-soft: #3a1d12; --gold: #f2d27a; } }

.sl-hero { background:
  radial-gradient(1000px 420px at 85% -10%, color-mix(in srgb, var(--loc-2) 24%, transparent), transparent 70%),
  radial-gradient(700px 360px at -10% 110%, color-mix(in srgb, var(--loc) 16%, transparent), transparent 70%); }
.sl-grad { background: linear-gradient(90deg, var(--loc), var(--loc-2) 60%, var(--accent)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.sl .pr-btn { font: inherit; font-weight: 700; cursor: pointer; }
.sl .pr-btn[disabled] { opacity: .5; cursor: default; }
.sl-btn-hot { background: var(--loc); border-color: var(--loc); color: var(--on-loc); box-shadow: 0 6px 18px color-mix(in srgb, var(--loc) 35%, transparent); }
.sl-btn-hot:hover { background: color-mix(in srgb, var(--loc) 85%, #000); }
.sl-pts { display: inline-block; margin-left: 6px; padding: 0 7px; border-radius: 999px; font-size: .78em; font-weight: 800;
  background: color-mix(in srgb, var(--gold) 30%, transparent); color: inherit; }

/* ---------- the street ---------- */
.sl-street svg { max-height: 380px; }
.sl-street .sky { fill: #23284a; transition: fill .6s; }
.sl-street.dusk .sky { fill: #1a1d36; }
.sl-street.day .sky { fill: #8ec5f2; }
.sl-street .moon { fill: #f4ecc8; transition: opacity .6s; }
.sl-street.day .moon { fill: #ffd76a; }
.sl-street .wall { fill: #3b3f5c; transition: fill .5s; }
.sl-street .awn { fill: #4a4e6a; transition: fill .5s; }
.sl-street .win { fill: #20233b; transition: fill .5s, filter .5s; }
.sl-street .door { fill: #2a2d48; }
.sl-street .sign { fill: #8a8fb0; font-size: 7px; font-weight: 800; letter-spacing: .06em; }
.sl-street .upwin { fill: #2a2d48; transition: fill .5s; }
.sl-street .shop.lit .upwin { fill: #fbe7b0; }
.sl-street .shop.lit .wall { fill: #f3e6cf; }
.sl-street .shop.lit .win { fill: #ffd76a; filter: drop-shadow(0 0 6px #ffd76a); }
.sl-street .shop.lit .door { fill: #7a4b2a; }
.sl-street .shop.lit .sign { fill: #7a2e0e; }
.sl-street .shop.lit[data-i="0"] .awn { fill: #e2674a; }
.sl-street .shop.lit[data-i="1"] .awn { fill: #2f6db5; }
.sl-street .shop.lit[data-i="2"] .awn { fill: #0f766e; }
.sl-street .shop.lit[data-i="3"] .awn { fill: #d97706; }
.sl-street .shop.lit[data-i="4"] .awn { fill: #7c3aed; }
.sl-street .shop.lit[data-i="5"] .awn { fill: #be123c; }
.sl-street .pave { fill: #55597a; }
.sl-street.day .pave { fill: #c9c3b6; }
.sl-street .person { fill: #f3e6cf; opacity: 0; transform: translateY(6px); transition: opacity .4s, transform .4s; }
.sl-street.day .person { fill: #3b3f5c; }
.sl-street .person.on { opacity: 1; transform: none; }
.sl-street .lamp rect { fill: #6b6f8f; }
.sl-street .bulb { fill: #ffd76a; filter: drop-shadow(0 0 5px #ffd76a); }
.sl-street.day .bulb { fill: #d7d2c2; filter: none; }
@media (prefers-reduced-motion: reduce) { .sl-street * { transition: none !important; } }
.sl-slider { display: flex; flex-direction: column; gap: 6px; font-weight: 700; }
.sl-slider input { width: 100%; accent-color: var(--loc); }

/* ---------- ripple ---------- */
.sl-ripple { position: relative; overflow: hidden; }
.sl-rings { position: absolute; right: -60px; top: -60px; width: 300px; height: 300px; pointer-events: none; }
.sl-rings span { position: absolute; inset: 0; margin: auto; border-radius: 50%; border: 2px solid var(--loc); opacity: 0; transform: scale(.2);
  transition: opacity .5s, transform .6s; }
.sl-rings span:nth-child(1) { width: 40px; height: 40px; background: var(--loc); }
.sl-rings span:nth-child(2) { width: 80px; height: 80px; }
.sl-rings span:nth-child(3) { width: 120px; height: 120px; }
.sl-rings span:nth-child(4) { width: 160px; height: 160px; }
.sl-rings span:nth-child(5) { width: 200px; height: 200px; }
.sl-rings span:nth-child(6) { width: 240px; height: 240px; }
.sl-rings span:nth-child(7) { width: 290px; height: 290px; }
.sl-rings span.on { opacity: .45; transform: scale(1); }
.sl-ripple-card { position: relative; max-width: 640px; border: 1px solid var(--line); border-radius: 16px; padding: 18px 20px; background: var(--bg); }
.sl-ripple-card small { color: var(--loc); font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.sl-ripple-card h3 { margin: 4px 0 6px; font-size: 1.3em; }
.sl-ripple-card p { margin: 0; }
.sl-ripple-nav { display: flex; gap: 10px; margin: 14px 0 6px; position: relative; }

/* ---------- status tags ---------- */
.sl-tag { align-self: flex-start; font-size: .7em; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; padding: 2px 9px; border-radius: 999px; margin-bottom: 8px; }
.sl-tag.live { background: var(--good-soft); color: var(--good); }
.sl .pr-card h3 { margin-top: 0; }
.sl .pr-quotes { grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
.sl .pr-flips { grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); }
.sl .pr-never li { margin: .35em 0; }
.sl .pr-never p { margin: 0 0 .6em; }

/* ---------- wizard ---------- */
.sl-wiz-sec { background: linear-gradient(180deg, color-mix(in srgb, var(--loc-soft) 70%, var(--bg)), var(--bg)); }
.sl-wiz { border: 2px solid color-mix(in srgb, var(--loc) 40%, var(--line)); border-radius: 22px; background: var(--card); padding: 20px;
  box-shadow: 0 18px 40px -24px color-mix(in srgb, var(--loc) 60%, transparent); max-width: 980px; }
.sl-wiz-top { display: flex; flex-wrap: wrap; gap: 14px; align-items: center; justify-content: space-between; margin-bottom: 18px; }
.sl-steps { display: flex; flex-wrap: wrap; gap: 6px; list-style: none; margin: 0; padding: 0; counter-reset: st; }
.sl-steps li { counter-increment: st; }
.sl-steps button { border: 1px solid var(--line); background: var(--bg); color: var(--ink); border-radius: 999px; padding: 6px 12px; font: inherit; font-size: .86em; cursor: pointer; }
.sl-steps button::before { content: counter(st) ". "; color: var(--muted); }
.sl-steps button.past { border-color: color-mix(in srgb, var(--loc) 50%, var(--line)); }
.sl-steps button[aria-current="step"] { background: var(--loc); border-color: var(--loc); color: var(--on-loc); }
.sl-steps button[aria-current="step"]::before { color: inherit; }
.sl-steps button[disabled] { opacity: .45; cursor: default; }
.sl-score { position: relative; display: grid; grid-template-columns: auto auto; align-items: center; gap: 4px 10px; padding: 8px 14px; border-radius: 16px;
  background: color-mix(in srgb, var(--gold) 16%, var(--card)); border: 1px solid color-mix(in srgb, var(--gold) 50%, var(--line)); min-width: 180px; }
.sl-score-n { font-size: 1.9em; font-weight: 900; line-height: 1; color: var(--ink); }
.sl-score-l { font-size: .8em; font-weight: 700; line-height: 1.2; color: var(--ink); }
.sl-score-l small { color: var(--muted); font-weight: 600; }
.sl-score-bar { grid-column: 1 / -1; height: 6px; border-radius: 999px; background: var(--line); overflow: hidden; }
.sl-score-bar span { display: block; height: 100%; width: 0; background: linear-gradient(90deg, var(--loc-2), var(--loc)); transition: width .5s; }
.sl-float { position: absolute; right: 12px; top: -6px; font-weight: 900; font-size: 1.3em; color: var(--loc); animation: sl-float 1.5s ease-out forwards; pointer-events: none; }
@keyframes sl-float { from { opacity: 1; transform: translateY(0) scale(1.1); } to { opacity: 0; transform: translateY(-36px) scale(.9); } }
@media (prefers-reduced-motion: reduce) { .sl-float { animation-duration: .01s; } }

.sl-step h3 { margin: 0 0 8px; font-size: 1.35em; }
.sl-step h3:focus { outline: none; }
.sl-step h4 { margin: 16px 0 8px; }
.sl-hint { color: var(--muted); margin: 0 0 14px; }
.sl-grid2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 12px 16px; }
.sl-field { display: flex; flex-direction: column; gap: 4px; font-weight: 600; margin-bottom: 12px; }
.sl-field small { font-weight: 400; color: var(--muted); }
.sl-field .req { font-size: .72em; font-weight: 800; color: var(--loc); text-transform: uppercase; letter-spacing: .06em; margin-left: 4px; }
.sl-field input, .sl-field textarea, .sl-field select { font: inherit; font-weight: 400; padding: 10px 12px; border-radius: 10px; border: 1px solid var(--line);
  background: var(--bg); color: var(--ink); min-width: 0; }
.sl-field input:focus-visible, .sl-field textarea:focus-visible, .sl-field select:focus-visible { outline: 3px solid var(--focus); outline-offset: 1px; }
.sl-field input[disabled], .sl-field textarea[disabled] { opacity: .6; }
.grow { flex: 1 1 auto; }
.sl-row { display: flex; flex-wrap: wrap; gap: 10px; align-items: flex-end; margin-bottom: 10px; }
.sl-chips { margin: 4px 0 14px; }
.sl-chips legend small { font-weight: 400; color: var(--muted); }
.sl-check { display: flex; gap: 10px; align-items: flex-start; margin: 6px 0 12px; padding: 12px 14px; border-radius: 12px; background: var(--loc-soft); }
.sl-check input { width: 20px; height: 20px; margin-top: 2px; accent-color: var(--loc); flex: none; }
.sl-nav { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--line); }
.sl-nav-r { display: flex; gap: 10px; align-items: center; }
.sl-skip { border: 0; background: none; color: var(--muted); font: inherit; text-decoration: underline; cursor: pointer; padding: 8px; }
.sl-skip:hover { color: var(--ink); }
.sl-msg { margin: 10px 0 0; }
.sl-msg:empty { display: none; }
.sl-msg.err { background: var(--warn-soft); color: var(--ink); padding: 8px 12px; border-radius: 10px; }
.sl-msg.warn { background: var(--warn-soft); color: var(--ink); padding: 8px 12px; border-radius: 10px; }
.sl-msg.ok { background: var(--good-soft); color: var(--ink); padding: 8px 12px; border-radius: 10px; }

.sl-personas { display: flex; flex-wrap: wrap; gap: 8px; margin: 6px 0 12px; }
.sl-persona { display: flex; flex-direction: column; align-items: flex-start; border: 2px solid var(--line); background: var(--bg); color: var(--ink);
  border-radius: 14px; padding: 10px 14px; font: inherit; cursor: pointer; min-width: 150px; text-align: left; }
.sl-persona small { color: var(--muted); }
.sl-persona[aria-checked="true"] { border-color: var(--loc); background: var(--loc-soft); }
.sl-persona[aria-checked="true"]::after { content: "✓ gets the credit"; font-size: .78em; font-weight: 800; color: var(--loc); margin-top: 2px; }
.sl-new-persona { margin: 4px 0 12px; }
.sl-new-persona summary { cursor: pointer; font-weight: 700; color: var(--accent); }
.sl-new-persona .sl-row { margin-top: 10px; }
.sl-new-persona .sl-field { margin-bottom: 0; }
.sl-mine, .sl-matches ul { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 8px; }
.sl-mine-item, .sl-match { width: 100%; display: flex; flex-direction: column; align-items: flex-start; text-align: left; border: 1px solid var(--line);
  background: var(--bg); color: var(--ink); border-radius: 12px; padding: 10px 12px; font: inherit; cursor: pointer; }
.sl-mine-item:hover, .sl-match:hover { border-color: var(--loc); }
.sl-mine-item small, .sl-match small { color: var(--muted); }
.sl-matches { margin: 0 0 12px; padding: 12px; border-radius: 12px; border: 1px dashed color-mix(in srgb, var(--loc) 50%, var(--line)); }
.sl-matches p { margin: 0 0 8px; }

.sl-show { display: flex; gap: 14px; align-items: flex-end; flex-wrap: wrap; }
.sl-logo-preview { width: 96px; height: 96px; border-radius: 16px; border: 1px solid var(--line); background: var(--bg); display: grid; place-items: center;
  overflow: hidden; font-size: 2.4em; margin-bottom: 12px; }
.sl-logo-preview img { width: 100%; height: 100%; object-fit: cover; }

.sl-svc-list { list-style: none; margin: 12px 0 0; padding: 0; display: grid; gap: 8px; }
.sl-svc-list li { display: flex; gap: 10px; justify-content: space-between; align-items: flex-start; border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; background: var(--bg); }
.sl-svc-list p { margin: 2px 0 0; color: var(--muted); font-size: .92em; }
.sl-svc-list small { color: var(--muted); }
.sl-state { display: inline-block; margin-left: 8px; padding: 0 8px; border-radius: 999px; font-size: .75em; font-weight: 700; background: var(--warn-soft); color: var(--warn); }
.sl-state.ok { background: var(--good-soft); color: var(--good); }
.sl-x { border: 0; background: none; color: var(--muted); font: inherit; font-size: .88em; text-decoration: underline; cursor: pointer; }

.sl-ad-preview { display: flex; gap: 12px; align-items: flex-start; border: 1px solid var(--line); border-radius: 14px; padding: 12px; background: var(--bg); max-width: 520px; }
.sl-ad-preview img { width: 72px; height: 72px; border-radius: 10px; object-fit: cover; flex: none; }
.sl-ad-preview b { display: block; }
.sl-ad-preview p { margin: 4px 0; font-size: .92em; }
.sl-ad-preview small { color: var(--accent); display: block; word-break: break-all; }
.sl-ad-preview em { display: inline-block; margin-top: 6px; font-size: .75em; font-style: normal; font-weight: 700; color: var(--muted); }

.sl-handover { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 14px; }
.sl-hand-card { border: 1px solid var(--line); border-radius: 16px; padding: 14px 16px; background: var(--bg); }
.sl-hand-card h4 { margin: 0 0 6px; }
.sl-qr { display: grid; place-items: center; width: 180px; max-width: 100%; margin: 6px auto 10px; background: #fff; border-radius: 12px; padding: 6px; color: #000; }
.sl-qr p { word-break: break-all; color: #333; }
.sl-qr svg { width: 100%; height: auto; }

.sl-done { position: relative; display: flex; gap: 20px; align-items: center; flex-wrap: wrap; }
.sl-done-badge { border-radius: 50%; animation: sl-pop .7s cubic-bezier(.2, 1.6, .4, 1) both; }
@keyframes sl-pop { from { transform: scale(.3) rotate(-12deg); opacity: 0; } to { transform: none; opacity: 1; } }
.sl-done > div { flex: 1 1 320px; }
.sl-done-list { list-style: none; padding: 0; margin: 8px 0 14px; }
.sl-done-list li { margin: 4px 0; font-weight: 600; }
.sl-confetti { position: absolute; inset: 0; pointer-events: none; overflow: hidden; }
.sl-confetti i { position: absolute; top: -10px; width: 8px; height: 14px; border-radius: 2px; animation: sl-fall 2.6s ease-in forwards; }
@keyframes sl-fall { to { transform: translateY(420px) rotate(540deg); opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .sl-done-badge, .sl-confetti i { animation: none; } }

/* ---------- badges ---------- */
.sl-badges { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 16px; margin-bottom: 26px; }
.sl-badge { margin: 0; text-align: center; padding: 14px 10px; border-radius: 18px; border: 1px solid var(--line); background: var(--card); }
.sl-badge img { width: 110px; height: 110px; border-radius: 50%; filter: grayscale(.35); transition: filter .3s, transform .3s; }
.sl-badge:hover img, .sl-badge.earned img { filter: none; transform: scale(1.04); }
.sl-badge figcaption { display: flex; flex-direction: column; gap: 3px; margin-top: 8px; }
.sl-badge figcaption span { font-size: .88em; color: var(--muted); }
.sl-badge-state { font-weight: 800; color: var(--loc); }
.sl-badge.earned { border-color: var(--gold); box-shadow: 0 0 0 3px color-mix(in srgb, var(--gold) 25%, transparent); }
.sl-points { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 20px; align-items: start; }
.sl-points table { border-collapse: collapse; width: 100%; background: var(--card); border: 1px solid var(--line); border-radius: 14px; overflow: hidden; }
.sl-points caption { text-align: left; font-weight: 800; margin-bottom: 6px; }
.sl-points th, .sl-points td { padding: 8px 12px; border-bottom: 1px solid var(--line); text-align: left; font-size: .93em; }
.sl-points td:nth-child(2) { font-weight: 800; color: var(--loc); white-space: nowrap; }
.sl-points td:nth-child(3) { color: var(--muted); }
.sl-levels { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; counter-reset: lv; }
.sl-levels li { display: flex; justify-content: space-between; padding: 10px 14px; border-radius: 12px; border: 1px solid var(--line); background: var(--card);
  border-left: 6px solid color-mix(in srgb, var(--loc) calc(20% + var(--n, 0) * 20%), var(--line)); }
.sl-levels li:nth-child(1) { --n: 0; } .sl-levels li:nth-child(2) { --n: 1; } .sl-levels li:nth-child(3) { --n: 2; } .sl-levels li:nth-child(4) { --n: 3; } .sl-levels li:nth-child(5) { --n: 4; }
.sl-levels span { color: var(--muted); font-weight: 700; }
.sl-levels span::after { content: " pts"; }

/* ---------- badge dialog ---------- */
.sl-badge-won { text-align: center; position: relative; }
.sl-badge-won img { border-radius: 50%; margin: 0 auto; display: block; animation: sl-pop .7s cubic-bezier(.2, 1.6, .4, 1) both; position: relative; }
.sl-badge-kicker { margin: 10px 0 0; font-size: .78em; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; color: var(--loc, #b4441c); }
.sl-burst { position: absolute; left: 50%; top: 90px; width: 260px; height: 260px; margin: -130px 0 0 -130px; border-radius: 50%;
  background: repeating-conic-gradient(from 0deg, rgba(245, 211, 107, .45) 0 10deg, transparent 10deg 20deg); animation: sl-spin 12s linear infinite; }
@keyframes sl-spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .sl-burst, .sl-badge-won img { animation: none; } }
.sl-mail { max-height: 60vh; overflow: auto; border: 1px solid #ddd; border-radius: 10px; background: #fff; color: #222; }

.sl-close { background: linear-gradient(135deg, color-mix(in srgb, var(--loc) 14%, var(--bg)), color-mix(in srgb, var(--loc-2) 10%, var(--bg))); }

/* ---------- printable take-over card ---------- */
.sl-print-card { display: none; }
@media print {
  body.sl-printing > *:not(.sl-print-card) { display: none !important; }
  body.sl-printing .sl-print-card { display: block; max-width: 12cm; margin: 1cm auto; padding: 1cm; border: 2px dashed #b4441c; border-radius: 12px; font-family: Georgia, serif; color: #000; text-align: center; }
  .sl-print-card .k { text-transform: uppercase; letter-spacing: .12em; font: 700 10pt sans-serif; color: #b4441c; }
  .sl-print-card h2 { margin: 6px 0; font-size: 20pt; }
  .sl-print-card svg { width: 5cm; height: 5cm; }
  .sl-print-card .u { font: 9pt monospace; word-break: break-all; }
}
