@font-face {
  font-family: "Archivo";
  src: url("/fonts/archivo.woff2") format("woff2");
  font-weight: 100 900;
  font-stretch: 62% 125%;
  font-display: swap;
}
@font-face {
  font-family: "Plex Mono";
  src: url("/fonts/plex-mono-400.woff2") format("woff2");
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: "Plex Mono";
  src: url("/fonts/plex-mono-600.woff2") format("woff2");
  font-weight: 600;
  font-display: swap;
}

:root {
  /* Safety-paper world: the pale green of a printed check, black-green ink, indigo stamp ink. */
  --paper: #E3ECE4;
  --sheet: #FAFCF8;
  --ink: #142019;
  --muted: #4F6156;
  --rule: #C3D2C6;
  --stamp: #3340B8;
  --stamp-ink: #2A35A0;
  --stamp-wash: #E6E8F7;
  --due: #A3421A;
  --due-wash: #F7E7DE;
  --ok: #1F6B43;

  /* Archivo has Latin letters only; the rest fall through to fonts that cover Korean, Chinese and Armenian. */
  --body: "Archivo", system-ui, "Segoe UI", Roboto, "Noto Sans", "Noto Sans Armenian", sans-serif;
  --mono: "Plex Mono", ui-monospace, "Cascadia Mono", monospace;

  --r: 0px;
  --ease: cubic-bezier(.2, .8, .2, 1);
  --tabbar: 64px;

  --guilloche: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='40' height='12' viewBox='0 0 40 12'%3E%3Cpath d='M0 6 Q10 0 20 6 T40 6' fill='none' stroke='%23B5C7B9' stroke-width='.8'/%3E%3Cpath d='M0 6 Q10 12 20 6 T40 6' fill='none' stroke='%23B5C7B9' stroke-width='.8'/%3E%3C/svg%3E");

  color-scheme: light;
}

* { box-sizing: border-box; }
.relief-page { --paper: var(--alert-paper); --sheet: var(--alert-sheet); --ink: var(--alert-ink); --muted: var(--alert-muted); --rule: var(--alert-rule); color-scheme: dark; }
.relief-page[data-alert-mode="light"] { color-scheme: light; }
.relief-page[data-relief-theme="community"] { --stamp: #247557; --stamp-ink: #216B50; --stamp-wash: #E2F3E7; }
.relief-page[data-relief-theme="community"][data-alert-mode="dark"] { --stamp: #A6E5C1; --stamp-ink: #B3ECCD; --stamp-wash: #244D3D; }
.relief-page[data-relief-theme="community"] .relief-overview { background: none; border: 0; gap: 12px; }
.relief-page[data-relief-theme="community"] .relief-total { border: 1px solid var(--rule); }
.relief-page[data-relief-theme="community"][data-alert-mode="light"] .relief-total:nth-child(1) { background: #E4F3E8; }
.relief-page[data-relief-theme="community"][data-alert-mode="light"] .relief-total:nth-child(2) { background: #D6F2E4; border-color: #A5D5BB; }
.relief-page[data-relief-theme="community"][data-alert-mode="light"] .relief-total:nth-child(3) { background: #FBF2DC; }
.relief-page[data-relief-theme="community"] .relief-art { background: var(--stamp-wash); color: var(--stamp-ink); }
.relief-page[data-relief-theme="community"] .relief-tabs a[aria-current] { color: var(--stamp-ink); }
.relief-page[data-relief-theme="community"] .meme-relief .btn:not(.quiet) { background: var(--stamp-ink); color: var(--sheet); border-color: var(--stamp-ink); }
.relief-page[data-alert-mode="dark"] { --stamp-ink: var(--alert-ink); --stamp: var(--alert-ink); }
.relief-shortcut { margin: 16px 0; background: var(--stamp-wash); }
.seg { flex-wrap: wrap; max-width: 100%; }
.relief-toolbar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; }
.relief-toolbar .seg { margin-bottom: 0; }
.meme-relief { margin-top: 24px; }
.meme-relief .display { max-width: none; margin-bottom: 12px; font-size: clamp(40px, 5vw, 76px); }
.relief-intro p { max-width: 65ch; }
.relief-action { display: flex; flex-wrap: wrap; gap: 8px 24px; align-content: center; }
.relief-action a { display: inline-flex; align-items: center; min-height: 44px; font-weight: 600; }
.relief-note { padding: 16px 0; border-block: 1px solid var(--rule); font-size: 15px; max-width: 90ch; }
.relief-grid { display: grid; grid-template-columns: minmax(0, 1fr); align-items: start; gap: 16px; margin-top: 20px; }
.relief-card { min-width: 0; padding: 20px; border: 1px solid var(--rule); background: var(--sheet); overflow-wrap: anywhere; }
.relief-card h3 { font-size: 24px; margin: 0; }
.relief-card h3 + p { margin-top: 4px; }
.relief-amounts { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px 12px; margin: 24px 0 12px; }
.relief-amounts dt, .relief-amounts dd { margin: 0; font-size: 15px; }
.relief-amounts dd { font-family: var(--mono); font-variant-numeric: tabular-nums; text-align: right; }
.relief-detail { border-top: 1px solid var(--rule); margin-top: 16px; padding-top: 8px; }
.meme-relief details:not([open]) > :not(summary) { display: none; }
.relief-detail summary, .relief-explainer summary { cursor: pointer; min-height: 44px; padding: 10px 0; font-weight: 600; }
.meme-relief summary:hover, .meme-relief a:hover { text-decoration: underline; text-underline-offset: 4px; }
.meme-relief :is(a, button, summary) { touch-action: manipulation; }
.relief-charity { padding-block: 8px; }
.relief-charity a { display: inline-block; min-height: 44px; padding-block: 10px; }
.relief-address { overflow-wrap: anywhere; font: 12px/1.6 var(--mono); }
.relief-explainer { margin-top: 32px; border-top: 1px solid var(--rule); padding-top: 12px; max-width: 75ch; }
.relief-explainer li { margin-bottom: 12px; }
@media (max-width: 599px) {
  .relief-toolbar .seg { width: 100%; justify-content: space-between; }
  .relief-toolbar .seg a { font-size: 12px; padding: 0 8px; }
  .relief-toolbar .seg .icon { display: none; }
  .relief-action { gap: 8px 16px; font-size: 14px; }
  .meme-relief .section-head h2 { font-size: 20px; }
  .meme-relief > .small { margin-block: 8px; }
}
@media (min-width: 1000px) {
  body.relief-page main { max-width: 1760px; padding: 24px 32px 48px; }
  .relief-intro { display: grid; grid-template-columns: minmax(0, 2fr) minmax(240px, 1fr); gap: 32px; }
  .relief-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (min-width: 1280px) { .relief-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.relief-overview { display: grid; gap: 1px; background: var(--rule); border: 1px solid var(--rule); margin-top: 24px; }
.relief-total { display: flex; flex-direction: column; gap: 6px; background: var(--sheet); padding: 20px; color: var(--ink); text-decoration: none; min-width: 0; }
.relief-total strong { font: 600 clamp(30px, 4vw, 56px)/1.15 var(--body); overflow-wrap: anywhere; }
.relief-live-note { color: var(--muted); font-size: 14px; }
.relief-story { display: grid; gap: 24px; margin-block: 24px; padding: 24px; background: var(--stamp-wash); color: var(--ink); border: 1px solid var(--rule); }
.relief-story[hidden] { display: none; }
.relief-story-identity { display: grid; grid-template-columns: 80px minmax(0, 1fr); gap: 16px; align-items: center; }
.relief-story .relief-art { width: 80px; height: 80px; }
.relief-story h2 { margin: 0; font: 700 clamp(23px, 3vw, 40px)/1.12 var(--body); text-wrap: balance; overflow-wrap: anywhere; }
.relief-story-name { margin: 12px 0 0; font-weight: 600; overflow-wrap: anywhere; }
.relief-story-trail { min-width: 0; }
.relief-story-trail h3 { margin: 16px 0 4px; font-size: 15px; }
.relief-story-trail p { margin-block: 10px; }
.relief-story-causes { display: flex; flex-wrap: wrap; gap: 4px 16px; }
.relief-story-causes a { min-height: 44px; display: inline-flex; align-items: center; font-weight: 600; overflow-wrap: anywhere; }
.relief-story-giving strong { font-variant-numeric: tabular-nums; }
.relief-story .btn { margin-top: 8px; }
.relief-how { margin-block: 16px; max-width: 75ch; }
.relief-how ol { padding-left: 24px; }
.relief-how li { margin-bottom: 16px; }
.relief-boundary { max-width: 90ch; margin-block: 16px 24px; }
@media (min-width: 900px) {
  .relief-story { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 48px; padding: 32px; }
  .relief-story-identity { grid-template-columns: minmax(120px, 220px) minmax(0, 1fr); align-content: center; }
  .relief-story .relief-art { width: 100%; height: auto; aspect-ratio: 1; }
}
.relief-accounting { max-width: 85ch; margin-block: 16px 32px; }
.meme-relief summary { min-height: 44px; padding-block: 12px; cursor: pointer; }
.relief-browse-heading { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 12px; border-bottom: 1px solid var(--rule); }
.relief-tabs { display: flex; flex-wrap: wrap; gap: 4px 16px; }
.relief-tabs a { color: var(--muted); min-height: 48px; display: inline-flex; align-items: center; text-decoration: none; border-bottom: 3px solid transparent; }
.relief-tabs a[aria-current] { color: var(--ink); border-color: currentColor; font-weight: 700; }
.relief-filters { display: grid; gap: 12px; align-items: end; margin: 20px 0; }
.relief-filters .field { margin: 0; min-width: 0; }
.relief-filters input, .relief-filters select { width: 100%; min-width: 0; }
.relief-filters input[type="search"] { min-height: 48px; padding: 10px 12px; border: 1px solid var(--rule); background: var(--sheet); color: var(--ink); font: inherit; }
.relief-page .meme-relief .btn:not(.quiet) { background: var(--ink); color: var(--sheet); border-color: var(--ink); }
.relief-search-row { display: flex; gap: 8px; }
.relief-search-row input { flex: 1; }
.relief-directory { display: grid; grid-template-columns: minmax(0, 1fr); gap: 16px; }
.relief-record { display: flex; flex-direction: column; padding: 20px; }
.relief-card-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; }
.relief-art { position: relative; width: 56px; height: 56px; flex-shrink: 0; display: grid; place-items: center; border: 1px solid var(--rule); font: 600 20px var(--mono); overflow: hidden; }
.relief-art img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; background: var(--sheet); opacity: 0; }
.relief-art img.ready { opacity: 1; }
.relief-art-charities, .relief-art-creators { width: 80px; height: 80px; }
.relief-art-charities img { background: transparent; filter: drop-shadow(0 0 0.6px #183C31); }
.relief-art:has(img.ready) > span { visibility: hidden; }
.relief-art-coins { width: 120px; height: 120px; }
.relief-art-campaigns { width: 100%; height: 168px; }
.relief-card-top:has(.relief-art-campaigns) { flex-wrap: wrap; }
.relief-art-campaigns img { object-fit: cover; }
.relief-profile .relief-art-coins { width: 200px; height: 200px; }
.relief-profile .relief-art-campaigns { height: 240px; }
.relief-gallery { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; grid-column: 1 / -1; }
.relief-gallery img { width: 100%; height: auto; display: block; background: var(--paper); }
.relief-status { font-size: 12px; color: var(--muted); text-align: right; }
.relief-card-body { flex: 1; }
.relief-record h2 { margin: 20px 0 8px; font-size: 23px; }
.relief-name { background: none; border: 0; padding: 0; text-align: left; color: inherit; font: inherit; cursor: pointer; min-height: 44px; }
.relief-name:hover { text-decoration: underline; text-underline-offset: 4px; }
.relief-mission { font-size: 15px; line-height: 1.6; display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical; overflow: hidden; }
.relief-card-stats { display: grid; grid-template-columns: 1fr 1fr; gap: 16px 12px; border-top: 1px solid var(--rule); padding-top: 16px; }
.relief-card-stats div:last-child { grid-column: 1 / -1; display: flex; gap: 10px; align-items: baseline; }
.relief-card-stats dd { margin: 0; font: 600 21px var(--mono); overflow-wrap: anywhere; }
.relief-card-stats dt { color: var(--muted); font-size: 12px; margin-top: 4px; }
.relief-card-stats div:last-child dd { font-size: 14px; }
.relief-card-foot, .relief-paging, .relief-socials { display: flex; align-items: center; flex-wrap: wrap; gap: 12px; }
.relief-card-foot { justify-content: space-between; font-size: 14px; }
.relief-card-foot a { padding-block: 12px; }
.relief-paging { margin-block: 24px; }
.relief-profile { border: 2px solid var(--ink); padding: 20px; background: var(--sheet); margin-bottom: 24px; scroll-margin-top: 24px; overflow-wrap: anywhere; }
.relief-profile .section-head { align-items: flex-start; gap: 16px; }
.relief-profile h2 { font-size: 26px; }
.relief-profile-body { display: grid; gap: 24px; }
.relief-profile-body > div { min-width: 0; }
.relief-profile .relief-amounts { grid-template-columns: 1fr; }
.relief-profile .relief-amounts dd { text-align: left; font-size: 20px; }
.relief-activity-row { padding-block: 16px; border-top: 1px solid var(--rule); }
.relief-home { margin: 24px 0; padding: 24px; border: 1px solid var(--rule); background: var(--sheet); }
.relief-home-heading { color: inherit; display: block; }
.relief-home-heading h2 { margin: 0 0 8px; }
.relief-home strong { font-size: 28px; }
.relief-coverage { max-width: 85ch; }
.relief-appearance summary { min-height: 44px; padding: 12px 0; cursor: pointer; color: var(--muted); font-size: 14px; }
.relief-appearance[open] .alert-appearance { padding-block: 8px; }
.relief-page .relief-accounting { max-width: none; border-top: 1px solid var(--rule); margin-top: 32px; }
.relief-accounting > p { max-width: 85ch; }
.relief-page .relief-filters { grid-template-columns: minmax(0, 1fr); gap: 4px; }
.relief-refine-fields { display: grid; grid-template-columns: minmax(0, 1fr); gap: 12px; padding-bottom: 12px; align-items: end; }
.relief-refine summary { color: var(--muted); font-size: 14px; }
@media (min-width: 700px) {
  .relief-refine-fields { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 699px) {
  .relief-toolbar { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 12px; }
  .relief-toolbar .seg a { padding-inline: 6px; font-size: 11px; }
  .relief-page .meme-relief { margin-top: 20px; }
  .relief-page .relief-intro .relief-action { display: none; }
  .relief-page .relief-live-note { margin: 8px 0 16px; }
  .relief-page .relief-intro .lede { margin-bottom: 8px; }
  .relief-page .relief-browse-heading { gap: 4px; }
  .relief-tabs { gap: 4px 12px; font-size: 13px; }
  .relief-page .relief-filters { margin: 16px 0 0; }
}
@media (max-width: 699px) {
  .relief-overview { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .relief-total { padding: 12px 8px; font-size: 12px; gap: 8px; overflow-wrap: anywhere; }
  .relief-total strong { font-size: clamp(20px, 6vw, 30px); }
  .relief-total .small { font-size: 11px; }
  .relief-accounting { margin-bottom: 20px; }
}
.meme-relief [hidden] { display: none !important; }
@media (min-width: 700px) {
  .relief-overview { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .relief-directory { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .relief-filters { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .relief-search { grid-column: 1 / -1; }
  .relief-profile-body { grid-template-columns: 1fr 1fr; }
}
@media (min-width: 1280px) {
  .relief-directory { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .relief-filters { grid-template-columns: minmax(280px, 2fr) repeat(3, minmax(140px, 1fr)) auto; }
  .relief-search { grid-column: auto; }
}
.help-guide { margin: 20px 0; border: 1px solid var(--rule); padding: 16px; background: var(--sheet); color: var(--ink); }
.help-guide > summary, .guide-feedback > summary { min-height: 44px; cursor: pointer; font-weight: 600; padding: 10px 0; }
.help-guide > summary::after, .guide-feedback > summary::after { content: '+'; float: right; margin-left: 12px; }
.help-guide[open] > summary::after, .guide-feedback[open] > summary::after { content: '−'; }
.help-guide .world-card { border: 1px solid var(--rule); }
.help-guide .field { min-width: 0; }
.help-guide .guide-results h2 { scroll-margin-top: 90px; }
.help-guide a, .help-guide p { overflow-wrap: anywhere; }
.ex-card .campaign-info > summary { color: inherit; min-height: 44px; padding: 10px 0; }
.help-guide select { width: 100%; min-height: 44px; padding: 10px; background: var(--paper); color: var(--ink); border: 1px solid var(--rule); }
.help-guide input[type="search"] { width: 100%; min-height: 44px; padding: 10px; background: var(--paper); color: var(--ink); border: 1px solid var(--rule); }
.guide-refine { display: grid; grid-template-columns: 1fr; gap: 0 16px; }
@media (min-width: 700px) { .guide-refine { grid-template-columns: 1fr 1fr; } }
.help-guide .field { margin: 16px 0; }
.help-guide .guide-results:empty { display: none; }
.guide-results h2 { margin-top: 20px; }
.guide-matches { grid-template-columns: 1fr; padding: 0; }
.guide-matches .world-card { color: var(--ink); }
.guide-matches .btn { margin-top: 8px; }
.guide-explanation, .guide-feedback { margin-top: 24px; padding-top: 16px; border-top: 1px solid var(--rule); }
.help-guide > a:last-child { display: inline-block; padding: 12px 0; }
@media (min-width: 700px) { .guide-offering { display: grid; grid-template-columns: 1fr 1fr; gap: 0 24px; } }
.guide-offering[hidden] { display: none; }

/* Discovery uses the desktop canvas; task forms retain their reading width. */
@media (min-width: 1000px) {
  body.home-discovery main, body.alert-list main {
    max-width: 1760px;
    padding: 24px 32px 48px;
  }
  .home-discovery .together-title { max-width: none; font-size: clamp(40px, 4vw, 64px); margin-bottom: 16px; }
  .home-discovery .view > .lede { max-width: 65ch; }
  .home-discovery .together-paths { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
  .home-discovery #help-together .paths { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
  .home-discovery .receipts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; align-items: start; }
  body:is(.home-discovery, .alert-list) .guide-host .help-guide { padding: 20px 24px; }
  body:is(.home-discovery, .alert-list) .help-guide > summary { display: inline-flex; padding: 4px 0; min-height: 36px; }
  body:is(.home-discovery, .alert-list) .help-guide > p:first-of-type { display: inline-block; margin: 4px 0 12px 24px; }
  body:is(.home-discovery, .alert-list) .help-guide .guide-results h2 { display: inline-block; margin: 8px 24px 8px 0; }
  body:is(.home-discovery, .alert-list) .guide-results > h2 + p { display: inline-block; }
  body:is(.home-discovery, .alert-list) .guide-results > p { margin: 8px 0 12px; }
  body:is(.home-discovery, .alert-list) .guide-results > .alert-actions { margin-top: 12px; }
  body:is(.home-discovery, .alert-list) .guide-refine { grid-template-columns: minmax(0, 2fr) minmax(240px, 1fr); gap: 24px; }
  body:is(.home-discovery, .alert-list) .help-guide .guide-refine .field { margin: 8px 0; }
  body:is(.home-discovery, .alert-list) .guide-host .help-guide .guide-matches { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; margin: 16px 0; }
  body:is(.home-discovery, .alert-list) .help-guide .campaign-card { display: flex; flex-direction: column; padding: 20px; min-width: 0; }
  body:is(.home-discovery, .alert-list) .help-guide .campaign-card > .campaign-official { margin-top: auto; padding-top: 12px; }
  body:is(.home-discovery, .alert-list) .help-guide .campaign-card > .alert-actions { padding-top: 8px; }
  body:is(.home-discovery, .alert-list) .help-guide .campaign-card > button:last-child { align-self: flex-start; }
  body:is(.home-discovery, .alert-list) .help-guide > form { display: grid; grid-template-columns: minmax(200px, 1fr) minmax(0, 3fr); gap: 0 24px; align-items: start; }
  body:is(.home-discovery, .alert-list) .help-guide > form[hidden] { display: none; }
  body:is(.home-discovery, .alert-list) .help-guide > form > .check, body:is(.home-discovery, .alert-list) .help-guide > form > .alert-actions { grid-column: 1 / -1; }
  body:is(.home-discovery, .alert-list) .help-guide > form > .field { min-width: 0; }
  body:is(.home-discovery, .alert-list) .guide-feedback { margin-top: 16px; padding-top: 8px; }
  body:is(.home-discovery, .alert-list) .guide-feedback .field { max-width: 640px; }
}
@media (min-width: 1280px) {
  body:is(.home-discovery, .alert-list) .guide-host .help-guide .guide-matches { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .home-discovery .receipts { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .home-discovery #help-together .paths { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
/* Product-wide shape rule: square surfaces and controls, including vendor UI.
   Circular map/status marks and the progress ring encode data, not containers. */
*, *::before, *::after {
  border-radius: 0 !important;
}
.ex-ring, .ex-ring::after, .ex-hud .live i, .ex-chips i, .legend i,
.timeline .dot, .maplibregl-user-location-dot {
  border-radius: 50% !important;
}
html { -webkit-text-size-adjust: 100%; scroll-padding: 84px 0 calc(var(--tabbar) + 16px); }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  /* Body text uses the phone's own font (SF on iPhone); Archivo is kept for headings and the brand. */
  font: 400 17px/1.47 -apple-system, BlinkMacSystemFont, system-ui, "Segoe UI", Roboto, "Noto Sans", "Noto Sans Armenian", sans-serif;
  -webkit-font-smoothing: antialiased;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  padding-bottom: calc(var(--tabbar) + env(safe-area-inset-bottom));
}
img { max-width: 100%; }
a { color: var(--stamp-ink); text-underline-offset: 3px; }
:focus-visible { outline: 3px solid var(--stamp); outline-offset: 2px; border-radius: 4px; }
button, input, select, textarea { font: inherit; color: inherit; }

.skip { position: absolute; left: 8px; top: -60px; background: var(--ink); color: var(--sheet); padding: 8px 12px; border-radius: 6px; z-index: 50; }
.skip:focus { top: 8px; }

/* ---------- header + tabs ---------- */
.top {
  position: sticky; top: 0; z-index: 20;
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 12px 20px;
  /* Solid on purpose: backdrop-filter would trap the fixed tab bar inside the header. */
  background: var(--paper);
  border-bottom: 1px solid var(--rule);
}
.mark {
  font-weight: 850; font-stretch: 125%; letter-spacing: -.02em;
  font-size: 22px; color: var(--ink); text-decoration: none;
}
.mark::after { content: "."; color: var(--stamp); }
.demo-pill {
  border: 1.5px dashed var(--due); background: var(--due-wash); color: var(--due);
  font: 600 12px/1 var(--mono); letter-spacing: .02em;
  padding: 8px 10px; border-radius: 999px; cursor: pointer; min-height: 32px;
}
.demo-pill:hover { background: #F2D9CB; }
.demo-pill.beta-pill { border: 1px solid var(--rule); background: var(--sheet); color: var(--ink); min-height: 44px; }
.demo-pill.beta-pill:hover { border-color: var(--muted); }
.beta-coverage { margin-bottom: 16px; }
.head-right { display: flex; align-items: center; gap: 8px; min-width: 0; }
/* Longer translations shouldn't wrap the header; the pill opens a sheet that explains it in full. */
.demo-pill { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.mark, .lang-btn { flex-shrink: 0; }
:lang(ko) { word-break: keep-all; }
.lang-btn {
  display: inline-flex; align-items: center; gap: 4px; min-height: 32px; padding: 0 10px;
  border: 1.5px solid var(--rule); border-radius: 999px; background: var(--sheet); color: var(--ink);
  font: 600 12px/1 var(--mono); cursor: pointer;
}
.lang-btn .icon { width: 16px; height: 16px; }
.lang-btn:hover { border-color: var(--muted); }
.lang-list { display: grid; gap: 8px; margin: 4px 0 12px; }
.lang-opt {
  display: flex; justify-content: space-between; align-items: center; min-height: 52px; padding: 0 16px;
  border: 1.5px solid var(--rule); border-radius: var(--r); background: var(--sheet); font-size: 18px; cursor: pointer; text-align: left;
}
.lang-opt[aria-pressed="true"] { border-color: var(--stamp); background: var(--stamp-wash); color: var(--stamp-ink); font-weight: 600; }
.lang-opt .icon { width: 20px; height: 20px; }

/* ---------- near you ---------- */
.near-ask { padding: 16px; border: 1.5px solid var(--rule); border-radius: var(--r); background: var(--sheet); }
.near-ask h2 { font-size: 19px; }
.near-ask p { margin: 4px 0 12px; }
.near-row { display: flex; flex-wrap: wrap; gap: 8px; }
.near-row select { flex: 1 1 160px; min-height: 44px; padding: 0 10px; border: 1.5px solid var(--rule); border-radius: var(--r); background: var(--paper); }
.near-set { display: flex; align-items: center; gap: 8px; font-weight: 600; }
.near-set .icon { width: 18px; height: 18px; color: var(--stamp-ink); }
.near-set span { flex: 1; }
.list-head { font-size: 17px; margin: 20px 0 10px; display: flex; justify-content: space-between; align-items: baseline; }
.list-head:first-child { margin-top: 0; }
.list-head .count { font: 500 13px var(--mono); color: var(--muted); }
.need-meta .near-miles { color: var(--stamp-ink); font-weight: 600; }

.tabs {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 30;
  display: grid; grid-template-columns: repeat(5, minmax(0, 1fr));
  height: calc(var(--tabbar) + env(safe-area-inset-bottom));
  padding-bottom: env(safe-area-inset-bottom);
  background: var(--sheet); border-top: 1px solid var(--rule);
}
.tabs a {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px;
  font-weight: 600; font-size: 11px; letter-spacing: .01em; color: var(--muted); text-decoration: none;
  position: relative; -webkit-tap-highlight-color: transparent;
}
.tabs .icon { width: 25px; height: 25px; }
.tabs a[aria-current="page"] { color: var(--stamp-ink); }
.tabs a[aria-current="page"]::before {
  content: ""; position: absolute; top: 0; left: 28%; right: 28%; height: 3px; border-radius: 0 0 3px 3px; background: var(--stamp);
}
.tabs a:hover { color: var(--ink); }

@media (min-width: 760px) {
  body { padding-bottom: 0; }
  .top { padding: 14px 32px; }
  .tabs { position: static; display: flex; gap: 4px; height: auto; background: none; border: 0; padding: 0; margin-left: auto; order: 2; }
  .tabs a { padding: 8px 14px; border-radius: 999px; flex-direction: row; gap: 6px; font-size: 15px; }
  .tabs .icon { width: 18px; height: 18px; }
  .tabs a[aria-current="page"] { background: var(--sheet); box-shadow: inset 0 0 0 1px var(--rule); }
  .tabs a[aria-current="page"]::before { display: none; }
  .demo-pill { order: 3; }
}

main { flex: 1; width: 100%; max-width: 640px; margin: 0 auto; padding: 24px 20px 40px; outline: none; }
.loading { color: var(--muted); }

.foot { max-width: 640px; margin: 0 auto; padding: 8px 20px 32px; color: var(--muted); font-size: 13px; }
.foot p { margin: 0 0 6px; }

/* ---------- type ---------- */
h1, h2, h3 { margin: 0; line-height: 1.08; text-wrap: balance; font-family: var(--body); }
.btn, .tabs a, .path b, .tile, .urgent-btn b { font-family: var(--body); }
.display {
  font-size: clamp(34px, 9.6vw, 52px); font-weight: 820; font-stretch: 118%; letter-spacing: -.025em;
}
.display em { font-style: normal; color: var(--stamp-ink); }
h2 { font-size: 22px; font-weight: 760; font-stretch: 112%; letter-spacing: -.01em; }
h3 { font-size: 17px; font-weight: 700; }
.lede { font-size: 18px; color: var(--muted); margin: 12px 0 0; max-width: 34ch; }
.mono { font-family: var(--mono); font-variant-numeric: tabular-nums; }
.eyebrow { font: 600 12px/1.2 var(--mono); letter-spacing: .08em; text-transform: uppercase; color: var(--muted); margin: 0 0 8px; }
.muted { color: var(--muted); }
.small { font-size: 14px; }
.section { margin-top: 36px; }
.section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 14px; }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 52px; padding: 0 22px; border-radius: var(--r);
  font-weight: 700; font-size: 17px; text-decoration: none; cursor: pointer;
  border: 0; background: var(--stamp); color: #fff;
  transition: transform .16s var(--ease), background-color .16s var(--ease), box-shadow .16s var(--ease);
  box-shadow: 0 2px 0 var(--stamp-ink);
}
.btn:hover { background: var(--stamp-ink); }
.btn:active { transform: translateY(1px); box-shadow: 0 1px 0 var(--stamp-ink); }
.btn[disabled] { opacity: .55; cursor: not-allowed; transform: none; }
.btn.block { width: 100%; }
.btn.quiet { background: var(--sheet); color: var(--ink); box-shadow: inset 0 0 0 1.5px var(--rule); }
.btn.quiet:hover { box-shadow: inset 0 0 0 1.5px var(--muted); background: var(--sheet); }
.btn.danger { background: var(--sheet); color: var(--due); box-shadow: inset 0 0 0 1.5px var(--due); }
.btn.danger:hover { background: var(--due-wash); }
.btn.small { min-height: 40px; font-size: 15px; padding: 0 14px; }
.btn-row { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 22px; }
.btn-row .btn { flex: 1 1 180px; }
.linkbtn { background: none; border: 0; padding: 0; color: var(--stamp-ink); text-decoration: underline; text-underline-offset: 3px; cursor: pointer; font-weight: 600; min-height: 32px; }

/* ---------- ledger stats ---------- */
.together-title { max-width: 12ch; text-wrap: balance; }
.view:has(.together-title) { animation: none; }
.together-paths .path { background: var(--sheet); color: var(--ink); }
.together-paths .path:hover { border-color: var(--stamp); }
.together-paths .path small { color: var(--muted); opacity: 1; }
.together-scope { max-width: 65ch; }
#help-together, #outcomes { scroll-margin-top: 80px; }
.saved-shortcut { margin-top: 16px; }
.near-disclosure, .giving-alerts { margin-top: 16px; border-bottom: 1px solid var(--rule); }
.near-disclosure > summary, .giving-alerts > summary { min-height: 44px; padding: 12px 0; cursor: pointer; font-weight: 600; }
.near-disclosure > summary, .giving-alerts > summary, .urgency-explainer > summary, .receipt-details > summary { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.near-disclosure > summary::after, .giving-alerts > summary::after, .urgency-explainer > summary::after, .receipt-details > summary::after { content: ''; width: 8px; height: 8px; flex: none; margin-right: 4px; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: rotate(45deg); }
.near-disclosure[open] > summary::after, .giving-alerts[open] > summary::after, .urgency-explainer[open] > summary::after, .receipt-details[open] > summary::after { transform: rotate(225deg); }
.near-disclosure .near-ask, .near-disclosure .near-set { margin: 8px 0 16px; }
.giving-alerts .callout { margin: 8px 0 16px; }
.together-outcomes > .tally { margin-top: 16px; }
.together-values summary { cursor: pointer; min-height: 44px; }
.together-values summary h2 { display: inline; }
.together-values dl { display: grid; gap: 6px; margin: 20px 0; }
.together-values dt { font-weight: 700; margin-top: 12px; }
.together-values dd { margin: 0; color: var(--muted); max-width: 65ch; }
@media (min-width: 640px) {
  .together-values dl { grid-template-columns: 120px 1fr; gap: 18px; }
  .together-values dt { margin: 0; }
}
.tally {
  margin-top: 22px; display: grid; grid-template-columns: .8fr 1.4fr 1fr;
  border-top: 2px solid var(--ink); border-bottom: 1px solid var(--rule);
}
.tally div { padding: 12px 0; }
.tally div + div { padding-left: 12px; border-left: 1px solid var(--rule); }
.tally b { display: block; font: 600 20px/1.2 var(--mono); font-variant-numeric: tabular-nums; }
.tally span { font-size: 13px; color: var(--muted); }
.note { font-size: 13px; color: var(--muted); margin: 8px 0 0; }
.note b { color: var(--due); font-weight: 600; }

/* ---------- the receipt (signature) ---------- */
.receipts { list-style: none; padding: 0; margin: 0; display: grid; gap: 14px; }
.receipt {
  position: relative; display: grid; grid-template-columns: 18px 1fr;
  background: var(--sheet); border-radius: 4px var(--r) var(--r) 4px;
  box-shadow: 0 1px 0 var(--rule), 0 6px 18px -12px rgba(20, 32, 25, .35);
  overflow: hidden;
}
.receipt::before {
  content: ""; grid-row: 1 / span 9;
  background: var(--guilloche) repeat-y center / 40px 12px, var(--paper);
  border-right: 2px dotted var(--rule);
}
.receipt-body { padding: 14px 16px 16px; min-width: 0; }
.receipt-top { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; }
.receipt-no { font: 400 12px/1.2 var(--mono); color: var(--muted); letter-spacing: .03em; }
.receipt dl { margin: 10px 0 0; display: grid; grid-template-columns: 82px 1fr; gap: 4px 10px; font-size: 15px; }
.receipt dt { font: 600 11px/1.9 var(--mono); letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.receipt dd { margin: 0; min-width: 0; }
.receipt-kind { font-weight: 650; }
.receipt-top { flex-wrap: wrap; }
.receipt-paid { display: inline-flex; align-items: center; gap: 5px; color: var(--ok); font-size: 12px; font-weight: 650; }
.receipt-paid .icon { width: 16px; height: 16px; }
.receipt-summary { display: flex; flex-wrap: wrap; align-items: baseline; gap: 10px 16px; margin: 16px 0; }
.receipt-summary .amount { font-size: 28px; }
.receipt-details { border-top: 1px solid var(--rule); margin-top: 16px; }
.receipt-details summary, .urgency-explainer summary { cursor: pointer; min-height: 44px; padding: 12px 0; font-weight: 600; }
.receipt-details .receipt-no { overflow-wrap: anywhere; }
.urgency-explainer { margin-top: 12px; color: var(--muted); }
.urgency-explainer p { font-size: 14px; }
.receipt-foot { display: flex; justify-content: space-between; align-items: flex-end; margin-top: 12px; gap: 12px; }
.amount { font: 600 26px/1 var(--mono); font-variant-numeric: tabular-nums; letter-spacing: -.02em; }
.stamp {
  display: inline-block; transform: rotate(-7deg);
  font: 850 15px/1 var(--body); font-stretch: 125%; letter-spacing: .14em;
  color: var(--stamp); padding: 7px 10px 6px;
  border: 2.5px solid var(--stamp); border-radius: 6px;
  box-shadow: inset 0 0 0 2px var(--sheet), inset 0 0 0 3.5px var(--stamp);
  mix-blend-mode: multiply; opacity: .9;
}
.stamp.pending { color: var(--muted); border-color: var(--muted); box-shadow: inset 0 0 0 2px var(--sheet), inset 0 0 0 3.5px var(--muted); }
.stamp.land { animation: stamp-in .42s var(--ease) both; }
@keyframes stamp-in {
  from { transform: rotate(-14deg) scale(1.6); opacity: 0; }
  60% { transform: rotate(-6deg) scale(.96); opacity: 1; }
  to { transform: rotate(-7deg) scale(1); opacity: .9; }
}
.tag { display: inline-block; font: 600 11px/1 var(--mono); letter-spacing: .06em; text-transform: uppercase; padding: 4px 6px; border-radius: 4px; background: var(--due-wash); color: var(--due); vertical-align: 2px; }
.tag.ok { background: #DCEEE2; color: var(--ok); }
.tag.blue { background: var(--stamp-wash); color: var(--stamp-ink); }
.tag.grey { background: #E7ECE8; color: var(--muted); }

.outcome {
  margin: 12px 0 0; font-size: 21px; line-height: 1.15; font-weight: 780; font-stretch: 112%; letter-spacing: -.01em; color: var(--ok);
  text-wrap: balance;
}
.outcome.partial { color: var(--muted); font-size: 17px; font-weight: 650; }
.thanks { margin: 12px 0 0; padding: 12px 14px; background: var(--stamp-wash); border-radius: 4px 12px 12px 12px; }
.thanks p { margin: 0; font-size: 16px; line-height: 1.45; color: var(--ink); }
.thanks footer { margin-top: 6px; font: 600 11px/1.2 var(--mono); letter-spacing: .06em; text-transform: uppercase; color: var(--stamp-ink); }
.choices.one { grid-template-columns: 1fr; }
.row-between { display: flex; justify-content: space-between; gap: 12px; align-items: flex-start; }
.note-review { background: var(--sheet); border-radius: var(--r); padding: 14px 16px; box-shadow: 0 1px 0 var(--rule); }
.note-review > p { margin: 0; }
.btn-row.tight { margin-top: 12px; }
.inline-form { display: flex; gap: 8px; margin-top: 8px; }
.inline-form input { min-height: 40px; font-size: 15px; }
details summary { cursor: pointer; min-height: 32px; display: flex; align-items: center; color: var(--muted); font-size: 15px; }

/* ---------- needs (give) ---------- */
.needs { list-style: none; padding: 0; margin: 0; display: grid; gap: 12px; }
.need { background: var(--sheet); border-radius: var(--r); padding: 16px; box-shadow: 0 1px 0 var(--rule); }
.need-top { display: flex; justify-content: space-between; gap: 12px; align-items: baseline; }
.need-meta { margin: 6px 0 0; font-size: 14px; color: var(--muted); }
.due { color: var(--due); font-weight: 600; }
.bar { height: 8px; background: #E3E9E4; border-radius: 99px; overflow: hidden; margin: 14px 0 6px; }
.bar i { display: block; height: 100%; background: var(--stamp); border-radius: 99px; transform-origin: left; }
.need-foot { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-top: 12px; }
.need-foot .small { min-width: 0; }

.urgent {
  margin-top: 22px; padding: 18px; border-radius: var(--r);
  background: var(--ink); color: var(--sheet);
}
.urgent p { margin: 0 0 14px; color: #C9D6CD; font-size: 15px; }
.urgent h2 { color: var(--sheet); margin-bottom: 6px; }

/* ---------- forms ---------- */
.steps { display: flex; gap: 6px; list-style: none; padding: 0; margin: 18px 0 22px; }
.steps li { flex: 1; font: 600 12px/1.3 var(--mono); color: var(--muted); padding-top: 8px; border-top: 3px solid var(--rule); }
.steps li[aria-current="step"] { color: var(--stamp-ink); border-color: var(--stamp); }
.steps li.done { color: var(--ink); border-color: var(--ink); }
.field { display: grid; gap: 6px; margin-bottom: 18px; }
.field label, .field legend { font-weight: 650; font-size: 15px; }
.field .hint { font-size: 14px; color: var(--muted); margin: -2px 0 2px; }
fieldset.field { border: 0; padding: 0; margin: 0 0 18px; min-width: 0; }
fieldset.field legend { padding: 0; margin-bottom: 8px; }
input[type="text"], input[type="email"], input[type="tel"], input[type="date"], input[type="password"], input[inputmode], select, textarea {
  width: 100%; min-height: 50px; padding: 12px 14px; border-radius: 8px;
  border: 1.5px solid var(--rule); background: var(--sheet); font-size: 17px;
  transition: border-color .15s var(--ease);
}
textarea { min-height: 96px; resize: vertical; }
input:hover, select:hover, textarea:hover { border-color: #9DB0A2; }
input:focus-visible, select:focus-visible, textarea:focus-visible { outline: 3px solid var(--stamp-wash); border-color: var(--stamp); outline-offset: 0; }
[aria-invalid="true"] { border-color: var(--due) !important; }
.err { color: var(--due); font-size: 14px; font-weight: 600; margin: 0; }
.money { position: relative; }
.money::before { content: "$"; position: absolute; left: 14px; top: 50%; translate: 0 -50%; font: 600 17px var(--mono); color: var(--muted); }
.money input { padding-left: 30px; font-family: var(--mono); }

.choices { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; }
.choice { position: relative; }
.choice input { position: absolute; opacity: 0; inset: 0; pointer-events: none; }
.choice span {
  display: flex; align-items: center; min-height: 50px; padding: 10px 12px; border-radius: 8px;
  background: var(--sheet); border: 1.5px solid var(--rule); font-size: 15px; font-weight: 550; cursor: pointer;
  transition: border-color .15s var(--ease), background-color .15s var(--ease);
}
.choice input:hover + span { border-color: #9DB0A2; }
.choice input:checked + span { border-color: var(--stamp); background: var(--stamp-wash); color: var(--stamp-ink); }
.choice input:focus-visible + span { outline: 3px solid var(--stamp); outline-offset: 2px; }
.check { display: flex; gap: 12px; align-items: flex-start; font-size: 15px; }
.check input { width: 22px; height: 22px; margin: 2px 0 0; accent-color: var(--stamp); flex: none; }

.file {
  display: grid; place-items: center; text-align: center; gap: 4px; padding: 22px 16px; border-radius: var(--r);
  border: 2px dashed var(--rule); background: var(--sheet); cursor: pointer;
}
.file:hover { border-color: var(--stamp); }
.file input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.file:focus-within { outline: 3px solid var(--stamp); outline-offset: 2px; }

.callout { background: var(--sheet); border-left: 4px solid var(--stamp); padding: 14px 16px; border-radius: 4px var(--r) var(--r) 4px; font-size: 15px; margin: 18px 0; }
.callout.warn { border-color: var(--due); }
.callout p { margin: 0 0 6px; }
.callout p:last-child { margin: 0; }
.callout.alert { border-color: var(--due); background: var(--due-wash); }
.callout.alert .icon { width: 18px; height: 18px; color: var(--due); vertical-align: -3px; margin-right: 6px; }
.local-alerts .callout { margin: 0 0 10px; }
.alert-tag { display: flex; align-items: center; gap: 6px; margin: 2px 0 4px; font-size: 14px; font-weight: 600; color: var(--due); }
.alert-tag .icon { width: 15px; height: 15px; }

/* ---------- world alerts ---------- */
.world { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.world-card { background: var(--sheet); border: 1px solid var(--rule); border-left-width: 5px; border-radius: 4px var(--r) var(--r) 4px; padding: 12px 14px; }
.world-card h3 { font-size: 18px; margin: 6px 0 2px; }
.world-card p { margin: 0 0 4px; }
.world-top { display: flex; gap: 8px; align-items: center; }
.lvl { font: 700 11px/1 var(--mono); letter-spacing: .06em; text-transform: uppercase; padding: 4px 6px; border-radius: 4px; }
.world-card.lvl-red { border-left-color: #B42318; }
.world-card.lvl-orange { border-left-color: #C26A12; }
.world-card.lvl-watch { border-left-color: var(--rule); }
.lvl.lvl-red { background: #FBE4E1; color: #8E1B12; }
.lvl.lvl-orange { background: #FCEBD7; color: #8A4A0B; }
.lvl.lvl-watch { background: #E7ECE8; color: var(--muted); }
/* ---------- globe (alerts, version 2) ---------- */
.seg { display: inline-flex; gap: 4px; padding: 4px; margin-bottom: 14px; border-radius: 999px; background: var(--sheet); border: 1px solid var(--rule); }
.seg a { display: inline-flex; align-items: center; gap: 6px; min-height: 44px; padding: 0 14px; border-radius: 999px; font-weight: 600; font-size: 14px; color: var(--muted); text-decoration: none; }
.seg a .icon { width: 16px; height: 16px; }
.seg a[aria-current="page"] { background: var(--ink); color: var(--sheet); }
/* Full-screen explorer: the globe is the page, the controls float on glass over space. */
body.immersive { overflow: hidden; padding-bottom: 0; background: #03080a; }
body.immersive .top, body.immersive .foot, body.immersive .tabs { display: none; }
body.immersive main { padding: 0; max-width: none; }
/* The page-in animation leaves a transform, which would trap the fixed explorer inside a zero-height box. */
body.immersive .view { animation: none; }
.explore {
  --bg1: #1a0b3d; --bg2: #090418; --bg3: #020107;
  position: fixed; inset: 0; overflow: hidden; color: #efeaff;
  background: radial-gradient(90% 60% at 50% 40%, var(--bg1) 0%, var(--bg2) 55%, var(--bg3) 100%);
  transition: background .6s;
}
.ex-themes {
  position: absolute; right: 64px; top: 44%; transform: translateY(-50%); display: grid; gap: 6px; padding: 8px;
  border-radius: 20px; background: rgba(12, 8, 32, .72); border: 1px solid rgba(255, 255, 255, .16);
  -webkit-backdrop-filter: blur(16px); backdrop-filter: blur(16px); animation: rise .2s var(--ease);
}
.ex-themes[hidden] { display: none; }
.ex-themes button {
  display: flex; align-items: center; gap: 10px; min-height: 44px; padding: 0 14px 0 6px; border-radius: 14px; cursor: pointer;
  border: 1.5px solid transparent; background: transparent; color: #efeaff; font: 700 15px var(--body);
}
.ex-themes button[aria-pressed="true"] { border-color: #b6a4ff; background: rgba(182, 164, 255, .14); }
.ex-themes .sw { width: 32px; height: 32px; border-radius: 50%; box-shadow: 0 0 12px rgba(255, 255, 255, .25); }
.plus-one { position: absolute; top: -6px; right: -10px; font: 800 14px var(--body); color: #7CFFB2; opacity: 0; pointer-events: none; text-shadow: 0 0 10px rgba(124, 255, 178, .8); }
.plus-one.go { animation: plus 0.9s var(--ease); }
@keyframes plus { 0% { opacity: 0; transform: translateY(6px) scale(.6); } 25% { opacity: 1; transform: translateY(-4px) scale(1.2); } 100% { opacity: 0; transform: translateY(-22px) scale(1); } }
/* Paper theme: light space, dark text. The floating glass stays dark for contrast. */
.explore.light .ex-hud { color: #4F6156; }
.explore.light .ex-hint { color: rgba(20, 32, 25, .55); }
.globe { position: absolute; inset: 0; width: 100%; height: 100%; display: block; touch-action: none; cursor: grab; outline-offset: -6px; }
.globe:active { cursor: grabbing; }
.globe { overflow: hidden; }
.globe.maplibregl-map { z-index: 0; font-family: var(--body); }
.globe .maplibregl-canvas:focus-visible { outline: 3px solid #a0c8ff; outline-offset: -4px; }
.globe .maplibregl-ctrl-attrib { font: 10px/1.4 var(--body); background: rgba(8, 5, 24, .9); color: #dad5f0; padding: 3px 6px; }
.globe .maplibregl-ctrl-attrib a { color: #dad5f0; }
.globe .maplibregl-ctrl-bottom-right { bottom: env(safe-area-inset-bottom); }
.explore .ex-card { bottom: calc(env(safe-area-inset-bottom) + 28px); max-height: calc(50dvh - 28px); }
.map-status { position: absolute; left: 12px; top: 110px; max-width: 280px; padding: 10px 14px; border-radius: 14px; background: #261c39; color: #fff; }
.globe canvas { display: block; }
.globe:focus-visible { outline: 3px solid #a0c8ff; outline-offset: -3px; }
.map-status button { min-height: 44px; padding: 8px 12px; border-radius: 10px; color: #fff; background: #514476; cursor: pointer; }
.alert-list { --paper: var(--alert-paper); --sheet: var(--alert-sheet); --ink: var(--alert-ink); --rule: var(--alert-rule); --muted: var(--alert-muted); color-scheme: dark; }
.alert-list[data-alert-mode="light"] { color-scheme: light; }
.alert-list main { max-width: 980px; }
.alert-toolbar, .alert-appearance, .alert-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; }
.alert-toolbar { justify-content: space-between; margin-bottom: 20px; }
.alert-toolbar .seg { margin: 0; }
.alert-appearance select { min-height: 44px; padding: 8px 12px; border: 1px solid var(--rule); border-radius: 12px; background: var(--sheet); color: var(--ink); font: inherit; }
.alert-appearance select { width: auto; max-width: 145px; }
.alert-list .display { font-size: clamp(34px, 4vw, 52px); margin-bottom: 12px; }
.alert-list .display em { color: var(--ink); }
.alert-context { margin: 0 0 24px; color: var(--muted); }
.alert-context summary { cursor: pointer; min-height: 44px; padding: 10px 0; }
.alert-list .callout.alert { background: var(--sheet); color: var(--ink); border: 1px solid var(--rule); border-radius: 18px; }
.explore .ex-tools { top: calc(env(safe-area-inset-top) + 120px); transform: none; grid-template-columns: repeat(2,44px); gap: 8px; }
.alert-progress { display: flex; flex-wrap: wrap; gap: 12px; margin-bottom: 22px; }
.alert-progress span { display: inline-flex; gap: 8px; align-items: center; padding: 10px 14px; background: var(--sheet); border: 1px solid var(--rule); border-radius: 14px; font-variant-numeric: tabular-nums; }
.alert-list .alert-progress { margin: 12px 0; gap: 16px; }
.alert-list .alert-progress span { padding: 0; border: 0; background: none; font-size: 13px; color: var(--muted); }
.alert-list .alert-context { margin-bottom: 12px; }
.alert-results.section { margin-top: 16px; }
.alert-filters { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 16px; }
.alert-filters .btn { min-height: 44px; }
.alert-filters [aria-pressed="true"] { background: var(--ink); color: var(--sheet); box-shadow: none; }
.alert-list .world-card { display: flex; flex-direction: column; color: var(--ink); }
.alert-list .world-card .alert-actions { margin-top: auto; padding-top: 18px; }
.alert-list .view { animation: none; }
.alert-progress .icon { width: 18px; height: 18px; }
.alert-list .world { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr)); gap: 16px; }
.alert-list .world-card { background: var(--sheet); border: 1px solid var(--rule); padding: 20px; border-radius: 22px; }
.alert-list .world-card h3 { margin: 14px 0 6px; }
.alert-list .callout.warn { background: #392e23; color: #ffe1b0; border-color: #80663c; }
.alert-list[data-alert-mode="light"] .callout.warn { background: #fff0cc; color: #573b16; }
.alert-list main a:not(.btn):not([aria-current]) { color: var(--ink); }
.alert-list .lvl.lvl-watch { background: #e7e8ec; color: #485064; }
.alert-list .tag:not(.blue):not(.ok):not(.grey) { background: #f8e7dc; color: #8a320e; }
.alert-list .foot a { color: var(--ink); }
.alert-list .tabs a[aria-current="page"] { color: var(--ink); }
.alert-list .tabs a[aria-current="page"]::before { background: var(--ink); }
.save-alert { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 9px 13px; border: 1px solid currentColor; border-radius: 12px; background: transparent; color: inherit; font: 600 14px var(--body); cursor: pointer; }
.save-alert .icon { width: 18px; height: 18px; }
.save-alert[aria-pressed="true"] .icon { fill: #ffde5a; color: #ffde5a; }
.alert-list[data-alert-mode="light"] .save-alert[aria-pressed="true"] .icon, .explore.light .save-alert[aria-pressed="true"] .icon { color: #7b5600; fill: #f4c550; }
.save-alert:hover { background: rgba(128,128,128,.15); }
.ex-card .alert-actions { margin-top: 14px; justify-content: space-between; }
.view-list-link { display: inline-flex; align-items: center; gap: 7px; min-height: 44px; }
.view-list-link .icon { width: 18px; height: 18px; }
.explore.light .ex-card { background: rgba(249,247,255,.95); color: #302947; border-color: #bcb2cd; }
.explore.light .ex-card h2, .explore.light .ex-k { color: #261f3b; }
.explore.light .ex-card .muted, .explore.light .ex-card .small.muted, .explore.light .ex-note { color: #56506a; }
.explore.light .ex-card a { color: #344ba3; }
.explore.light .ex-card .gbtn:not(.main) { background: #dfd9ec; color: #302947; }
@media (max-height: 620px) { .ex-tools { right: 8px; gap: 4px; grid-template-columns: repeat(2,44px); } .explore .ex-card { max-height: 42dvh; } }
.explore .ex-hud, .explore.light .ex-hud { padding: 8px; border-radius: 12px; background: rgba(14, 11, 32, .92); color: #b9cfc2; }
.explore .ex-hint { left: 50%; right: auto; width: max-content; max-width: calc(100% - 24px); transform: translateX(-50%); padding: 5px 8px; border-radius: 8px; background: rgba(14, 11, 32, .88); color: #d9d2ef; }
.ex-card { max-height: calc(50dvh - 16px); overflow-y: auto; }
.ex-card-toggle { display: block; width: 100%; min-height: 44px; margin-bottom: 8px; padding: 8px 0; text-align: left; background: transparent; color: inherit; border: 0; border-bottom: 1px solid currentColor; font: 600 13px var(--body); cursor: pointer; }
.ex-card-toggle:hover { text-decoration: underline; text-underline-offset: 3px; }
.ex-card:has([aria-expanded="false"]) .ex-card-toggle { margin-bottom: 0; border-bottom: 0; }
@media (min-width: 900px) {
  .explore .ex-card { left: 24px; right: auto; bottom: 24px; width: 360px; margin: 0; }
}
.ex-top { position: absolute; top: calc(env(safe-area-inset-top) + 12px); left: 12px; right: 12px; display: flex; align-items: center; gap: 8px; pointer-events: none; }
.ex-top > * { pointer-events: auto; }
.ex-tool {
  display: grid; place-items: center; width: 44px; height: 44px; flex: none; border-radius: 50%; cursor: pointer; color: #e8f2ea;
  background: rgba(14, 30, 24, .55); border: 1px solid rgba(255, 255, 255, .14);
  -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px); -webkit-tap-highlight-color: transparent;
  transition: transform .1s var(--ease);
}
.ex-tool:active { transform: scale(.9); }
.ex-tool .icon { width: 20px; height: 20px; }
.ex-hud { display: flex; flex-direction: column; gap: 4px; font: 600 11px/1 var(--mono); letter-spacing: .08em; text-transform: uppercase; color: #9fc2ae; pointer-events: none; }
.ex-hud .live { display: inline-flex; align-items: center; gap: 6px; color: #ff8b7a; }
.ex-hud .live i { width: 8px; height: 8px; border-radius: 50%; background: #ff5c4a; animation: live 1.6s infinite; }
@keyframes live { 0% { box-shadow: 0 0 0 0 rgba(255, 92, 74, .6); } 70% { box-shadow: 0 0 0 8px rgba(255, 92, 74, 0); } 100% { box-shadow: 0 0 0 0 rgba(255, 92, 74, 0); } }
.ex-progress { position: relative; display: grid; place-items: center; width: 44px; height: 44px; margin-left: auto; flex: none; }
.ex-ring { position: absolute; inset: 0; border-radius: 50%; background: conic-gradient(from 0deg, #7CFFB2, #5CE1FF, #B26BFF var(--p, 0deg), rgba(255, 255, 255, .14) 0); transition: --p .4s; }
.ex-ring::after { content: ""; position: absolute; inset: 4px; border-radius: 50%; background: #0c0820; }
.ex-progress .mono { position: relative; font-size: 11px; font-weight: 700; color: #e8f2ea; }
.seg.ex-seg { margin: 0; background: rgba(14, 30, 24, .55); border-color: rgba(255, 255, 255, .14); -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px); }
.seg.ex-seg a { color: #b9cfc2; min-height: 44px; padding: 0 10px; }
.seg.ex-seg a[aria-current="page"] { background: #e8f2ea; color: #071510; }
@media (max-width: 700px) {
  .ex-top { display: grid; grid-template-columns: 44px minmax(0, 1fr) 44px; }
  .ex-top .ex-hud { justify-self: start; }
  .ex-top .ex-seg { grid-column: 1 / -1; justify-content: center; width: 100%; }
  .ex-top .ex-seg a { min-width: 0; padding: 0 8px; min-height: 44px; }
  .explore .ex-chips { top: calc(env(safe-area-inset-top) + 124px); }
  .explore .ex-tools { top: calc(env(safe-area-inset-top) + 174px); }
}
.ex-chips {
  position: absolute; top: calc(env(safe-area-inset-top) + 66px); left: 0; right: 0; display: flex; gap: 8px;
  overflow-x: auto; padding: 4px 12px; scrollbar-width: none;
}
.ex-chips::-webkit-scrollbar { display: none; }
.ex-chips button {
  flex: none; display: inline-flex; align-items: center; gap: 6px; min-height: 36px; padding: 0 12px; border-radius: 999px; cursor: pointer;
  font: 600 14px var(--body); color: #dbe8df; background: rgba(14, 30, 24, .55); border: 1px solid rgba(255, 255, 255, .14);
  -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px); transition: transform .1s var(--ease);
}
.ex-chips button:active { transform: scale(.94); }
.ex-chips button[aria-pressed="true"] { background: #e8f2ea; color: #071510; border-color: #e8f2ea; }
.ex-chips i { width: 9px; height: 9px; border-radius: 50%; }
.ex-chips .count { font: 500 12px var(--mono); opacity: .65; }
.ex-tools { position: absolute; right: 12px; top: 44%; transform: translateY(-50%); display: grid; gap: 8px; }
.ex-hint { position: absolute; left: 0; right: 0; bottom: calc(env(safe-area-inset-bottom) + 216px); margin: 0; text-align: center; font: 500 12px var(--mono); color: rgba(232, 242, 234, .5); pointer-events: none; }
.ex-card {
  position: absolute; left: 10px; right: 10px; bottom: calc(env(safe-area-inset-bottom) + 10px); max-width: 560px; margin: 0 auto;
  padding: 16px; border-radius: 24px; color: #e8f2ea;
  background: rgba(14, 8, 38, .74); border: 1px solid rgba(190, 170, 255, .2);
  -webkit-backdrop-filter: blur(18px) saturate(150%); backdrop-filter: blur(18px) saturate(150%);
  box-shadow: 0 20px 50px -20px rgba(0, 0, 0, .8); touch-action: pan-y;
}
.ex-card.fresh { animation: rise .35s var(--ease); }
@keyframes rise { from { transform: translateY(14px); opacity: .4; } to { transform: none; opacity: 1; } }
.ex-card h2 { font-size: 24px; margin: 8px 0 4px; color: #fff; }
.ex-card p { margin: 0 0 6px; }
.ex-card a { color: #9ecbff; }
.ex-card .muted, .ex-card .small.muted { color: #9fb5a8; }
.ex-k { font: 800 22px/1.1 var(--body); color: #fff; margin: 0 0 8px; }
.ex-note { color: #c8d6cd; }
.ex-cta { display: flex; align-items: center; gap: 10px; margin: 10px 0 2px; padding: 12px 14px; border-radius: 16px; background: #FFF1C2; color: #3d2d00 !important; font-weight: 700; text-decoration: none; }
.ex-cta .icon { width: 18px; height: 18px; }
.ex-cta .icon:last-child { margin-left: auto; }
.ex-nav { display: flex; gap: 8px; margin-top: 12px; }
.ex-card .gbtn { background: rgba(255, 255, 255, .1); color: #fff; box-shadow: inset 0 0 0 1.5px rgba(255, 255, 255, .16), 0 3px 0 rgba(0, 0, 0, .35); }
.ex-card .gbtn.main { background: linear-gradient(135deg, #7B5CFF, #3D7BFF); box-shadow: 0 3px 0 #2A1F8A, 0 0 24px rgba(123, 92, 255, .45); }
.ex-card .caught-up { margin: 0 0 12px; }
.ex-card .tag { vertical-align: 0; }
.explore.light { color: #183C31; }
.explore.light :is(.ex-tool, .ex-seg, .ex-chips button, .ex-themes, .ex-card) { background: #F8FCF8; color: #183C31; border-color: #A8C6B4; backdrop-filter: none; -webkit-backdrop-filter: none; }
.explore.light .ex-card { box-shadow: 0 8px 24px -16px #183C3155; }
.explore.light :is(.ex-card h2, .ex-k, .ex-progress .mono, .ex-themes button) { color: #183C31; }
.explore.light :is(.ex-card .muted, .ex-note, .ex-seg a, .ex-hint) { color: #52695D; }
.explore.light .ex-card a { color: #216B50; }
.explore.light .ex-hud .live { color: #A13926; }
.explore.light .ex-hud, .explore.light .ex-hint { background: #F8FCF8; color: #52695D; }
.explore.light .ex-ring::after { background: #F4F8F2; }
.explore.light .ex-ring { background: conic-gradient(#247557 var(--p, 0deg), #C9DBCF 0); }
.explore.light .ex-chips button[aria-pressed="true"], .explore.light .ex-seg a[aria-current="page"] { background: #183C31; color: #FFFFFF; border-color: #183C31; }
.explore.light .ex-themes button[aria-pressed="true"] { border-color: #247557; background: #E4F3E8; }
.explore.light .ex-card .gbtn { color: #183C31; background: #E4F3E8; box-shadow: inset 0 0 0 1px #A8C6B4; }
.explore.light .ex-card .gbtn.main { color: #FFFFFF; background: #216B50; box-shadow: none; }
.explore.light .ex-chips .count { opacity: 1; }
.explore.light .map-status { background: #F8FCF8; color: #183C31; border: 1px solid #A8C6B4; }
.explore.light .map-status button { background: #216B50; color: #FFFFFF; }
.explore.light .maplibregl-ctrl-attrib, .explore.light .maplibregl-ctrl-attrib a { background: #F8FCF8; color: #52695D; }
.live-feed-tabs { display: flex; gap: 8px; margin: 12px 0; }
.live-feed-tabs button { flex: 1; padding: 10px 8px; min-height: 44px; border: 1px solid #647D70; background: transparent; color: inherit; font: 600 13px var(--body); cursor: pointer; }
.live-feed-tabs button[aria-pressed="true"] { background: #E4F3E8; color: #183C31; }
.explore.light .live-feed-tabs button[aria-pressed="true"] { background: #216B50; color: #FFFFFF; }
.live-feed-results { overflow-y: auto; max-height: 27dvh; overscroll-behavior: contain; }
.live-feed-item { display: flex; flex-direction: column; width: 100%; gap: 6px; padding: 14px 0; border: 0; border-top: 1px solid #789485; background: transparent; color: inherit; text-align: left; cursor: pointer; font: inherit; }
.live-feed-item:hover strong { text-decoration: underline; text-underline-offset: 3px; }
.live-feed-item strong { font-size: 16px; line-height: 1.4; }
.live-feed-funding { font: 600 14px var(--mono); }
.live-feed-note { margin-top: 12px !important; font-size: 12px; }
.live-feed-footer { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 10px; }
.ex-card.feed-view { max-height: calc(60dvh - 28px); }
@media (min-width: 900px) {
  .explore .ex-card.feed-view { top: 120px; bottom: 24px; max-height: none; }
  .live-feed-results { max-height: calc(100dvh - 410px); }
}
@media (max-width: 899px) {
  .ex-card.feed-view .live-feed-results { max-height: 17dvh; }
}
@media (prefers-reduced-motion: reduce) { .ex-ring { transition: none; } .ex-tool, .ex-chips button { transition: none; } }
.gbtn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 52px; padding: 0 16px;
  border: 0; border-radius: 999px; background: var(--sheet); color: var(--ink); font: 700 16px var(--body); cursor: pointer; white-space: nowrap;
  box-shadow: inset 0 0 0 1.5px var(--rule), 0 3px 0 var(--rule); transition: transform .08s var(--ease), box-shadow .08s var(--ease);
  -webkit-tap-highlight-color: transparent;
}
.gbtn:active { transform: translateY(3px); box-shadow: inset 0 0 0 1.5px var(--rule), 0 0 0 var(--rule); }
.gbtn .icon { width: 20px; height: 20px; }
.gbtn.round { width: 52px; padding: 0; }
.gbtn.main { flex: 1; background: var(--stamp); color: #fff; box-shadow: 0 3px 0 #1E2780; }
.gbtn.main:active { box-shadow: 0 0 0 #1E2780; }
.gbtn:disabled { opacity: .5; cursor: default; }
.gcard-top { display: flex; align-items: center; gap: 8px; }
.gcard-top .mono { margin-left: auto; }
.lvl.lvl-local { background: #FFF1C2; color: #7A5A00; }
.lvl.lvl-hood { background: #DDE2FF; color: #2A35A0; }
.legend { list-style: none; padding: 0; margin: 10px 0 0; display: flex; flex-wrap: wrap; gap: 8px 16px; font-size: 14px; }
.legend li { display: inline-flex; align-items: center; gap: 6px; }
.legend i { width: 10px; height: 10px; border-radius: 50%; }
.dot-red { background: #ff5c4a; } .dot-orange { background: #ffa640; } .dot-watch { background: #aac4b4; } .dot-local { background: #ffd65a; }
.caught-up { display: flex; align-items: center; gap: 12px; margin-top: 10px; padding: 14px; border-radius: 18px; background: #DCEEE2; color: var(--ok); }
.caught-up > div { flex: 1; }
.caught-up p { margin: 2px 0 0; color: var(--ink); }
.done-pop { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; background: var(--ok); color: #fff; animation: pop .45s var(--ease); }
.done-pop .icon { width: 22px; height: 22px; }
@keyframes pop { 0% { transform: scale(.4); } 70% { transform: scale(1.15); } 100% { transform: scale(1); } }
@media (prefers-reduced-motion: reduce) { .hud .live i, .done-pop { animation: none; } .gbtn { transition: none; } }

.safe-list { padding-left: 20px; margin: 8px 0 0; }
.safe-list li { margin-bottom: 8px; }

/* ---------- code reveal ---------- */
.code-card { background: var(--sheet); border-radius: var(--r); padding: 22px 18px; text-align: center; margin: 22px 0; border: 2px solid var(--ink); }
.code-card .mono { font-size: 34px; font-weight: 600; letter-spacing: .06em; display: block; margin: 6px 0 10px; }

/* ---------- timeline (track) ---------- */
.timeline { list-style: none; padding: 0; margin: 22px 0 0; }
.timeline li { position: relative; padding: 0 0 20px 34px; }
.timeline li::before { content: ""; position: absolute; left: 8px; top: 22px; bottom: 0; width: 2px; background: var(--rule); }
.timeline li:last-child::before { display: none; }
.timeline .dot { position: absolute; left: 0; top: 3px; width: 18px; height: 18px; border-radius: 50%; border: 2px solid var(--rule); background: var(--paper); }
.timeline .done .dot { background: var(--ink); border-color: var(--ink); }
.timeline .now .dot { background: var(--stamp); border-color: var(--stamp); box-shadow: 0 0 0 4px var(--stamp-wash); }
.timeline b { display: block; font-weight: 650; }
.timeline span { font-size: 14px; color: var(--muted); }

/* ---------- sheet dialog ---------- */
.sheet {
  border: 0; padding: 0; margin: auto auto 0; width: 100%; max-width: 520px; max-height: 92dvh;
  border-radius: 18px 18px 0 0; background: var(--sheet); color: var(--ink);
  transition: transform .32s var(--ease), opacity .2s var(--ease), overlay .32s allow-discrete, display .32s allow-discrete;
  transform: translateY(100%);
}
.sheet[open] { transform: translateY(0); }
@starting-style { .sheet[open] { transform: translateY(100%); } }
.sheet::backdrop { background: rgba(20, 32, 25, .45); transition: opacity .25s var(--ease), overlay .32s allow-discrete, display .32s allow-discrete; opacity: 0; }
.sheet[open]::backdrop { opacity: 1; }
@starting-style { .sheet[open]::backdrop { opacity: 0; } }
.sheet-inner { padding: 10px 20px calc(22px + env(safe-area-inset-bottom)); overflow: auto; max-height: 92dvh; }
.grab { width: 40px; height: 4px; border-radius: 4px; background: var(--rule); margin: 0 auto 14px; }
.sheet-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; }
.close { background: none; border: 0; width: 44px; height: 44px; margin: -8px -10px 0 0; border-radius: 50%; font-size: 26px; line-height: 1; cursor: pointer; color: var(--muted); }
.close:hover { background: var(--paper); color: var(--ink); }
.chips { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin: 16px 0 12px; }
.chips button {
  min-height: 52px; border-radius: 8px; border: 1.5px solid var(--rule); background: var(--sheet);
  font: 600 16px var(--mono); cursor: pointer; transition: border-color .15s var(--ease), background-color .15s var(--ease);
}
.chips button:hover { border-color: #9DB0A2; }
.chips button[aria-pressed="true"] { border-color: var(--stamp); background: var(--stamp-wash); color: var(--stamp-ink); }
@media (min-width: 760px) {
  .sheet { margin: auto; border-radius: 18px; transform: translateY(24px); opacity: 0; }
  .sheet[open] { transform: none; opacity: 1; }
  @starting-style { .sheet[open] { transform: translateY(24px); opacity: 0; } }
}

/* ---------- toast ---------- */
.toast {
  position: fixed; left: 50%; bottom: calc(var(--tabbar) + 16px + env(safe-area-inset-bottom)); z-index: 60;
  translate: -50% 0; max-width: min(92vw, 420px);
  background: var(--ink); color: var(--sheet); padding: 12px 16px; border-radius: 10px; font-size: 15px;
  opacity: 0; transform: translateY(12px); pointer-events: none;
  transition: opacity .2s var(--ease), transform .2s var(--ease);
}
.toast.show { opacity: 1; transform: none; }
@media (min-width: 760px) { .toast { bottom: 24px; } }

/* ---------- checker ---------- */
.queue { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.queue a { display: grid; grid-template-columns: 1fr auto; gap: 2px 12px; padding: 14px 16px; background: var(--sheet); border-radius: var(--r); text-decoration: none; color: var(--ink); box-shadow: 0 1px 0 var(--rule); }
.queue a:hover { box-shadow: inset 0 0 0 1.5px var(--stamp); }
.queue .small { grid-column: 1 / -1; }
.facts { display: grid; grid-template-columns: 130px 1fr; gap: 8px 12px; margin: 16px 0; font-size: 15px; background: var(--sheet); padding: 16px; border-radius: var(--r); }
.facts dt { color: var(--muted); }
.facts dd { margin: 0; min-width: 0; overflow-wrap: anywhere; }
.audit { list-style: none; padding: 0; margin: 0; font-size: 14px; }
.audit li { padding: 10px 0; border-bottom: 1px solid var(--rule); display: grid; gap: 2px; }
.audit .mono { font-size: 12px; color: var(--muted); overflow-wrap: anywhere; }
.demo-creds { font: 400 14px/1.5 var(--mono); background: var(--due-wash); color: var(--due); padding: 10px 12px; border-radius: 8px; margin: 0 0 18px; }

.empty { text-align: center; padding: 36px 16px; background: var(--sheet); border-radius: var(--r); color: var(--muted); }
.empty h3 { color: var(--ink); margin-bottom: 6px; }

.howto { counter-reset: s; list-style: none; padding: 0; margin: 0; display: grid; gap: 12px; }
.howto li { counter-increment: s; display: grid; grid-template-columns: 30px 1fr; gap: 10px; font-size: 15px; }
.howto li::before { content: counter(s); font: 600 13px/28px var(--mono); text-align: center; width: 28px; height: 28px; border-radius: 50%; border: 1.5px solid var(--ink); }
.howto b { display: block; }

/* ---------- iOS-style pieces ---------- */
.icon { width: 22px; height: 22px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.center { text-align: center; }

.paths { display: grid; gap: 10px; margin-top: 22px; }
.path {
  display: flex; align-items: center; gap: 14px; padding: 18px 16px; min-height: 76px;
  background: var(--stamp); color: #fff; border-radius: 16px; text-decoration: none;
  transition: transform .14s var(--ease), background-color .14s var(--ease);
}
.path.give { background: var(--sheet); color: var(--ink); box-shadow: inset 0 0 0 1.5px var(--rule); }
.path:hover { background: var(--stamp-ink); }
.path.give:hover { background: #fff; }
.path:active { transform: scale(.98); }
.path > span { flex: 1; min-width: 0; display: grid; gap: 2px; }
.path b { font-size: 18px; font-weight: 750; }
.path small { font-size: 14px; opacity: .8; }
.path > .icon:first-child { width: 28px; height: 28px; }
.path > .icon:last-child { opacity: .6; }

.path-mini {
  display: flex; align-items: center; gap: 12px; min-height: 52px; padding: 12px 16px; border-radius: 14px;
  color: var(--ink); text-decoration: none; font-size: 15px; font-weight: 600;
  background: color-mix(in srgb, var(--sheet) 55%, transparent);
}
.path-mini:hover { background: var(--sheet); }
.path-mini > span { flex: 1; }
.path-mini > .icon:first-child { color: var(--stamp-ink); }
.path-mini > .icon:last-child { width: 18px; height: 18px; opacity: .5; }
.class-line { margin: 4px 0 0; display: grid; gap: 1px; }
.class-line b { font-weight: 650; font-size: 16px; }
.class-line span { font-size: 14px; color: var(--muted); }

.together { margin-top: 12px; padding-top: 10px; border-top: 1px dashed var(--rule); display: grid; gap: 4px; }
.together p { margin: 0; display: flex; gap: 8px; align-items: flex-start; font-size: 14px; color: var(--muted); }
.together .icon { width: 16px; height: 16px; margin-top: 3px; color: var(--stamp-ink); }
.together .passed { color: var(--ok); font-weight: 600; }
.together .passed .icon { color: var(--ok); }
.pulse { margin-top: 22px; }
.pulse h2 { font-size: 17px; }
.pulse ul { list-style: none; padding: 0; margin: 10px 0 0; display: flex; flex-wrap: wrap; gap: 8px; }
.pulse li { background: var(--sheet); border-radius: 999px; padding: 6px 12px; font-size: 14px; box-shadow: inset 0 0 0 1px var(--rule); }
.pulse li b { font-family: var(--mono); color: var(--stamp-ink); }
.pulse p { display: flex; gap: 8px; align-items: center; margin: 10px 0 0; font-size: 14px; color: var(--ok); font-weight: 600; }
.pulse p .icon { width: 16px; height: 16px; }
.ctx-chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 4px 0 4px; }
.ctx-chip { display: inline-flex; align-items: center; gap: 6px; padding: 4px 4px 4px 10px; border-radius: 999px; background: var(--stamp-wash); color: var(--stamp-ink); font-size: 14px; font-weight: 600; }
.ctx-chip .icon { width: 14px; height: 14px; }
.ctx-chip button { width: 28px; height: 28px; border-radius: 50%; border: 0; background: none; color: inherit; font-size: 18px; cursor: pointer; }
.ctx-chip button:hover { background: rgba(51, 64, 184, .12); }
.q-hint a { color: var(--stamp-ink); font-weight: 600; }
.pass-on { background: var(--sheet); border-radius: var(--r); padding: 18px; }
.pass-on p { margin: 8px 0 14px; }

.tiles.three { grid-template-columns: repeat(3, 1fr); }
.choice.multi span, .tiles .choice span { min-height: 52px; }
.choice .two-line { display: grid; gap: 2px; align-content: center; padding-top: 12px; padding-bottom: 12px; }
.two-line small { font-weight: 400; color: var(--muted); font-size: 14px; }
.choice input:checked + .two-line small { color: var(--stamp-ink); }

.how summary { list-style: none; }
.how summary::-webkit-details-marker { display: none; }
.how summary h2::after { content: " +"; color: var(--muted); font-weight: 500; }
.how[open] summary h2::after { content: " âˆ’"; }
.how .howto { margin-top: 16px; }

/* one question per screen */
.q { min-height: calc(100dvh - 220px); display: flex; flex-direction: column; }
.q-top { display: flex; justify-content: space-between; align-items: center; margin: -8px 0 10px; }
.back { display: inline-flex; align-items: center; gap: 2px; min-height: 44px; padding: 0 8px 0 0; background: none; border: 0; color: var(--stamp-ink); font-size: 17px; text-decoration: none; cursor: pointer; }
.back .icon { width: 22px; height: 22px; stroke-width: 2.4; }
.q-count { font: 500 13px var(--mono); color: var(--muted); }
.q-bar { height: 4px; background: var(--rule); border-radius: 4px; overflow: hidden; margin-bottom: 26px; }
.q-bar i { display: block; height: 100%; background: var(--stamp); border-radius: 4px; transition: width .3s var(--ease); }
.q-title { font-size: 30px; font-weight: 800; font-stretch: 112%; letter-spacing: -.02em; outline: none; }
.q-hint { color: var(--muted); margin: 8px 0 0; }
.q .err { margin-top: 12px; }
.q > .field:first-of-type, .q > div > .field:first-child { margin-top: 22px; }

.tiles { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; margin-top: 22px; }
.tiles.one { grid-template-columns: 1fr; }
.tile {
  min-height: 64px; padding: 12px 14px; text-align: left; border-radius: 14px; cursor: pointer;
  background: var(--sheet); border: 0; box-shadow: inset 0 0 0 1.5px var(--rule);
  font-size: 16px; font-weight: 650; line-height: 1.2; color: var(--ink);
  transition: transform .12s var(--ease), box-shadow .12s var(--ease), background-color .12s var(--ease);
}
.tile:hover { box-shadow: inset 0 0 0 1.5px #9DB0A2; }
.tile:active { transform: scale(.97); }
.tile[aria-pressed="true"] { background: var(--stamp-wash); color: var(--stamp-ink); box-shadow: inset 0 0 0 2px var(--stamp); }

.big-money { display: flex; align-items: center; justify-content: center; gap: 4px; margin: 40px 0 8px; font: 600 52px/1 var(--mono); }
.big-money span { color: var(--muted); }
.big-money input {
  width: 6.5ch; min-height: 0; padding: 0; border: 0; background: none; text-align: left;
  font: 600 52px/1.1 var(--mono); font-variant-numeric: tabular-nums; outline: none; caret-color: var(--stamp);
}
.big-money input:focus-visible { outline: none; }
.big-money:focus-within { color: var(--ink); }
input.big-date { margin-top: 28px; min-height: 60px; font-size: 20px; }

.photo-pick { display: grid; gap: 10px; margin-top: 26px; }
.photo-btn {
  display: flex; align-items: center; justify-content: center; gap: 10px; min-height: 64px; border-radius: 14px; cursor: pointer;
  background: var(--stamp); color: #fff; font-weight: 700; font-size: 17px;
}
.photo-btn.quiet { background: var(--sheet); color: var(--ink); box-shadow: inset 0 0 0 1.5px var(--rule); }
.photo-btn:focus-within { outline: 3px solid var(--stamp); outline-offset: 2px; }
.photo-btn .icon { width: 24px; height: 24px; }
.file-status { margin: 4px 0 0; font-weight: 600; color: var(--ok); min-height: 1.5em; }

.dock {
  position: sticky; bottom: calc(var(--tabbar) + env(safe-area-inset-bottom)); margin-top: auto; padding: 16px 0 12px;
  background: linear-gradient(to bottom, transparent, var(--paper) 30%);
}
@media (min-width: 760px) { .dock { bottom: 0; } }
.done-mark { width: 72px; height: 72px; margin: 20px auto 18px; border-radius: 50%; background: var(--ok); color: #fff; display: grid; place-items: center; }
.done-mark .icon { width: 38px; height: 38px; stroke-width: 2.6; }
.code-card .mono { margin-top: 0; }

/* give: urgent shortcut, search, browse chips */
.urgent-btn {
  display: flex; align-items: center; gap: 12px; width: 100%; margin-top: 20px; padding: 16px; min-height: 72px;
  border: 0; border-radius: 16px; background: var(--ink); color: var(--sheet); text-align: left; cursor: pointer;
  transition: transform .14s var(--ease);
}
.urgent-btn:active { transform: scale(.98); }
.urgent-btn > span { flex: 1; display: grid; gap: 2px; }
.urgent-btn b { font-size: 17px; }
.urgent-btn small { color: #C9D6CD; font-size: 14px; }
.searchbox { position: relative; }
.searchbox .icon { position: absolute; left: 12px; top: 50%; translate: 0 -50%; width: 19px; height: 19px; color: var(--muted); pointer-events: none; }
.searchbox input { width: 100%; min-height: 44px; padding: 10px 12px 10px 38px; border-radius: 12px; border: 0; background: #D5E0D7; font-size: 17px; -webkit-appearance: none; }
.searchbox input:focus-visible { outline: 3px solid var(--stamp-wash); background: var(--sheet); }
.filter { display: flex; gap: 8px; overflow-x: auto; margin: 12px -20px 0; padding: 2px 20px 4px; scrollbar-width: none; }
.filter::-webkit-scrollbar { display: none; }
.filter button {
  flex: none; display: inline-flex; align-items: center; gap: 6px; min-height: 36px; padding: 0 14px; border-radius: 999px;
  border: 0; background: var(--sheet); box-shadow: inset 0 0 0 1px var(--rule); font-size: 15px; font-weight: 600; cursor: pointer; color: var(--ink);
}
.filter button[aria-pressed="true"] { background: var(--ink); color: var(--sheet); box-shadow: none; }
.filter .count { font: 500 12px var(--mono); opacity: .65; }
.browse + .section { margin-top: 18px; }

.other { margin: 4px 0 12px; text-align: center; }
.other .field { text-align: left; margin-bottom: 0; }
.sheet.dragging { transition: none; }
.grab { cursor: grab; touch-action: none; padding: 8px 0; box-sizing: content-box; background-clip: content-box; margin-top: -8px; }
.sheet-head { touch-action: none; }

.view { animation: view-in .28s var(--ease) both; }
@keyframes view-in { from { transform: translateY(6px); } }

/* Phone layout for the globe explorer. The controls flow in a column, so larger system text cannot push
   one row under another, and the details sheet starts closed so the globe is the first thing seen. */
@media (max-width: 700px) {
  .explore { display: flex; flex-direction: column; }
  .explore .ex-top { position: relative; top: auto; left: auto; right: auto; flex: none; margin: calc(env(safe-area-inset-top) + 8px) 10px 0; gap: 6px; }
  .explore .ex-top .ex-seg { flex-wrap: wrap; }
  .explore .ex-top .ex-seg a { flex: 1 1 auto; justify-content: center; }
  .explore .ex-chips { position: relative; top: auto; flex: none; margin-top: 6px; }
  .explore .ex-tools { position: relative; top: auto; right: auto; transform: none; flex: none; align-self: flex-end; margin: 6px 10px 0 0; grid-template-columns: repeat(2, 44px); gap: 6px; }
  .explore:has(.ex-card-toggle[aria-expanded="true"]) .ex-tools button:nth-child(n+3) { display: none; }
  .explore .ex-themes { top: auto; bottom: calc(env(safe-area-inset-bottom) + 70px); right: 10px; transform: none; max-height: 50dvh; overflow-y: auto; }
  .explore .ex-card { left: 8px; right: 8px; bottom: calc(env(safe-area-inset-bottom) + 8px); max-height: 46dvh; padding: 10px 14px 14px; }
  .explore .ex-card:has(.ex-card-toggle[aria-expanded="false"]) { padding-block: 4px; }
  .explore .ex-hint { bottom: calc(env(safe-area-inset-bottom) + 72px); }
  .explore:has(.ex-card-toggle[aria-expanded="true"]) .ex-hint { display: none; }
  .explore .live-feed-results { max-height: 20dvh; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}
