/* Tauphy demo dashboard. Builds on styles.css tokens. */
:root {
  --gain: #2F7D5B;
  --loss: var(--accent);
  --banner-bg: #1E1A16;
  --banner-ink: #FBF7F0;
  --shadow: 0 24px 50px -32px rgba(30, 26, 22, .35), 0 1px 3px rgba(30, 26, 22, .05);
  --gold: #F2C14E;
  --gold-ink: #8A6410;
  --tabbar-h: 68px;
}
@media (prefers-color-scheme: dark) {
  :root {
    --gain: #6FC39A;
    --banner-bg: #F3EDE4;
    --banner-ink: #1B1815;
    --shadow: 0 24px 50px -32px rgba(0, 0, 0, .7);
    --gold-ink: #F2C14E;
  }
}

body.app { min-height: 100vh; display: flex; flex-direction: column; }
body.app main { flex: 1; outline: none; }
body.modal-open { overflow: hidden; }
[hidden] { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.muted { color: var(--muted); }
.small { font-size: 14px; line-height: 1.5; }

/* ---------- demo banner ---------- */
.demo-banner {
  position: sticky;
  top: 0;
  z-index: 40;
  background: var(--banner-bg);
  color: var(--banner-ink);
  font-size: 14px;
  line-height: 1.4;
}
.demo-banner .wrap { display: flex; align-items: center; gap: 12px; padding-top: 9px; padding-bottom: 9px; }
.demo-tag {
  flex: none;
  font: italic 600 13px/1 var(--serif);
  letter-spacing: .02em;
  background: var(--accent);
  color: #fff;
  padding: 5px 10px 6px;
  border-radius: 999px;
}

/* ---------- header ---------- */
.session { display: flex; align-items: center; gap: 16px; min-width: 0; }
.session-email { color: var(--muted); font-size: 15px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 34ch; }
.link-btn {
  background: none; border: 0; padding: 4px 0; cursor: pointer;
  color: var(--ink); font: 500 15px var(--sans);
  text-decoration: underline; text-underline-offset: 3px; text-decoration-color: var(--line);
}
.link-btn:hover { text-decoration-color: currentColor; }

/* ---------- shared ---------- */
.view { padding: 48px 0 72px; }
.narrow { max-width: 720px; }
.lede { font-size: 19px; color: var(--muted); max-width: 32em; margin: 18px 0 24px; }
.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 24px;
}
.btn-wide { width: 100%; }
.btn[disabled] { opacity: .45; cursor: not-allowed; transform: none; box-shadow: none; }
.btn-outline {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 10px 16px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: transparent;
  color: var(--ink);
  font: 600 15px/1.2 var(--sans);
  cursor: pointer;
  white-space: nowrap;
  transition: border-color .15s ease, background .15s ease;
}
.btn-outline:hover { border-color: var(--ink); }
.btn-outline[disabled] { opacity: .5; cursor: not-allowed; }
.btn-outline.solid { background: var(--btn-bg); color: var(--btn-ink); border-color: var(--btn-bg); }
.btn-outline.danger { color: var(--accent); }
.btn-outline.danger:hover { border-color: var(--accent); }
.btn-outline.solid.danger { background: var(--accent); border-color: var(--accent); color: #fff; }
.btn-outline[aria-pressed="true"] { background: var(--accent-soft); border-color: var(--accent); color: var(--accent); }

.pill {
  display: inline-block;
  font: 600 11px/1 var(--sans);
  letter-spacing: .08em;
  text-transform: uppercase;
  padding: 5px 8px;
  border-radius: 999px;
  border: 1px dashed color-mix(in srgb, var(--accent) 65%, transparent);
  color: var(--accent);
  white-space: nowrap;
  vertical-align: middle;
}
.pill-accent { background: var(--accent); color: #fff; border-style: solid; }

/* rubber stamp */
.stamp {
  display: inline-block;
  font: 700 12px/1 var(--sans);
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--accent);
  border: 2px solid var(--accent);
  border-radius: 6px;
  padding: 6px 9px 5px;
  transform: rotate(-4deg);
  opacity: .85;
  user-select: none;
}
.stamp-sm { font-size: 10px; padding: 4px 7px 3px; transform: rotate(-3deg); }

.field { display: block; font-size: 14px; font-weight: 600; margin: 0 0 6px; }
input[type="email"], input:not([type]), select {
  width: 100%;
  font: 17px var(--sans);
  color: var(--ink);
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 12px 14px;
  min-height: 48px;
}
select {
  appearance: none;
  padding-right: 40px;
  background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(135deg, var(--muted) 50%, transparent 50%);
  background-position: calc(100% - 20px) 21px, calc(100% - 15px) 21px;
  background-size: 5px 5px;
  background-repeat: no-repeat;
  text-overflow: ellipsis;
}
input:focus, select:focus { outline: 2px solid var(--accent); outline-offset: 1px; border-color: transparent; }
.error { color: var(--accent); font-size: 15px; margin: 10px 0 0; min-height: 0; }
.error:empty { display: none; }
.error.ok { color: var(--gain); }
.up { color: var(--gain); }
.down { color: var(--loss); }

/* ---------- loading ---------- */
.skeleton { background: var(--line); border-radius: 10px; animation: pulse 1.4s ease-in-out infinite; }
.sk-eyebrow { width: 180px; height: 14px; }
.sk-hero { width: min(360px, 80%); height: 64px; margin-top: 18px; }
.sk-line { width: min(420px, 90%); height: 16px; margin-top: 16px; }
.sk-chart { width: 100%; height: 280px; margin-top: 36px; border-radius: 18px; }
.quiet-loading { color: var(--muted); font-size: 15px; margin-top: 16px; }
@keyframes pulse { 50% { opacity: .45; } }

/* ---------- sign in ---------- */
.signin { display: grid; grid-template-columns: 1fr minmax(0, 460px); gap: 56px; align-items: start; }
.signin h1 { font-size: clamp(36px, 5.4vw, 56px); }
.signin-points { list-style: none; padding: 0; margin: 0; }
.signin-points li { padding: 10px 0 10px 28px; border-top: 1px solid var(--line); position: relative; color: var(--muted); }
.signin-points li::before { content: "τ"; position: absolute; left: 4px; top: 8px; font: italic 18px var(--serif); color: var(--accent); }
.signin-card { box-shadow: var(--shadow); }
.signin-card h2 { font-size: 30px; margin-bottom: 18px; }
.signin-card h2 em { font-style: italic; color: var(--accent); }
.notice { background: var(--accent-soft); border-radius: 10px; padding: 10px 14px; margin: 0 0 18px; font-size: 15px; }
.data-details { margin: 16px 0 4px; font-size: 15px; }
.data-details summary { cursor: pointer; color: var(--muted); }
.data-details .data { padding-left: 1.2em; margin: 10px 0; }
.data-details li { margin: 4px 0; }
.consent { display: grid; grid-template-columns: 22px 1fr; gap: 10px; align-items: start; font-size: 15px; line-height: 1.5; margin: 16px 0 18px; cursor: pointer; }
.consent input { width: 18px; height: 18px; margin: 2px 0 0; accent-color: var(--accent); }
.signin-card .btn { margin-top: 16px; }
.code-input { font: 600 28px/1 ui-monospace, "SF Mono", Menlo, monospace !important; letter-spacing: .4em; text-align: center; }
.row-links { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 16px; margin-top: 16px; }

/* ---------- empty ---------- */
.empty .stamp { margin-bottom: 20px; }
.empty h1 { font-size: clamp(36px, 5.4vw, 56px); }
.empty-steps { padding-left: 1.3em; margin: 0 0 28px; }
.empty-steps li { margin: 6px 0; }
.empty-steps li::marker { font-family: var(--serif); font-style: italic; color: var(--accent); }
.empty-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-bottom: 12px; }
.controls-slot:empty { display: none; }
#empty-controls-slot .demo-controls { margin-top: 32px; }

/* ---------- dashboard ---------- */
.dash-top { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 14px; }
.dash-top .eyebrow { margin: 0; }
.as-of { text-transform: none; letter-spacing: 0; }
.currency-switch { display: inline-flex; border: 1px solid var(--line); border-radius: 999px; padding: 3px; gap: 2px; }
.currency-switch button { border: 0; background: none; color: var(--muted); font: 600 14px var(--sans); padding: 6px 14px; border-radius: 999px; cursor: pointer; }
.currency-switch button[aria-pressed="true"] { background: var(--btn-bg); color: var(--btn-ink); }

.hero-card { position: relative; padding: 8px 0 32px; border-bottom: 1px solid var(--line); }
.hero-card .stamp { position: absolute; right: 0; top: 10px; }
.value {
  font-size: clamp(52px, 9vw, 92px);
  font-weight: 500;
  letter-spacing: -0.025em;
  font-variant-numeric: lining-nums;
  margin: 0;
  padding-right: 120px;
  overflow-wrap: anywhere;
}
.hero-gain { font-size: 18px; margin: 10px 0 0; color: var(--muted); }
.hero-gain .delta { font-weight: 600; }
.hero-gain.up .delta { color: var(--gain); }
.hero-gain.down .delta { color: var(--loss); }
.hero-gain { color: var(--muted) !important; }
.hero-kept { font: italic 21px/1.4 var(--serif); margin: 14px 0 0; }
.hero-kept b { font-style: normal; font-weight: 600; color: var(--accent); }
.hero-stats { display: flex; flex-wrap: wrap; gap: 12px 40px; margin: 26px 0 0; }
.hero-stats div { min-width: 0; }
.hero-stats dt { font-size: 12px; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.hero-stats dd { margin: 2px 0 0; font: 500 22px var(--serif); }

/* chart */
.chart-card { margin-top: 32px; padding: 20px 20px 16px; }
.chart-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 12px; }
.tabs { display: inline-flex; gap: 4px; background: var(--paper); border: 1px solid var(--line); border-radius: 999px; padding: 3px; }
.tabs button { border: 0; background: none; font: 600 14px var(--sans); color: var(--muted); padding: 7px 14px; border-radius: 999px; cursor: pointer; min-width: 44px; }
.tabs button[aria-pressed="true"] { background: var(--btn-bg); color: var(--btn-ink); }
.tabs button:disabled { opacity: .45; cursor: not-allowed; }
.toggle { display: inline-flex; align-items: center; gap: 10px; font-size: 15px; font-weight: 600; cursor: pointer; user-select: none; position: relative; }
.toggle input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.toggle-ui { width: 40px; height: 24px; border-radius: 999px; background: var(--line); position: relative; transition: background .2s ease; flex: none; }
.toggle-ui::after { content: ""; position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; border-radius: 50%; background: var(--card); box-shadow: 0 1px 3px rgba(0, 0, 0, .25); transition: transform .2s ease; }
.toggle input:checked + .toggle-ui { background: var(--accent); }
.toggle input:checked + .toggle-ui::after { transform: translateX(16px); }
.toggle input:focus-visible + .toggle-ui { outline: 2px solid var(--accent); outline-offset: 3px; }

.legend { display: flex; flex-wrap: wrap; gap: 6px 18px; margin: 16px 0 4px; font-size: 13px; color: var(--muted); }
.lg { display: inline-flex; align-items: center; gap: 7px; }
.lg i { display: inline-block; width: 18px; height: 0; border-top: 2.5px solid var(--accent); }
.lg-dep i { border-top: 2px solid var(--muted); opacity: .8; }
.lg-proj i { border-top-style: dashed; }

.chart { position: relative; min-height: 220px; transition: opacity .2s ease; }
.chart.is-loading { opacity: .45; }
.chart-svg { display: block; width: 100%; height: auto; touch-action: pan-y; }
.chart-svg:focus-visible { outline: 2px solid var(--accent); outline-offset: 4px; border-radius: 8px; }
.chart .grid line { stroke: var(--line); stroke-width: 1; }
.chart .grid text { fill: var(--muted); font: 12px var(--sans); font-variant-numeric: tabular-nums; }
.area-stop-a { stop-color: var(--accent); stop-opacity: .18; }
.area-stop-b { stop-color: var(--accent); stop-opacity: 0; }
.val-line { fill: none; stroke: var(--accent); stroke-width: 2.5; stroke-linejoin: round; stroke-linecap: round; }
.val-line.proj { stroke-dasharray: 7 6; }
.dep-line { fill: none; stroke: var(--muted); stroke-width: 1.6; stroke-opacity: .8; stroke-linejoin: round; }
.end-dot { fill: var(--accent); stroke: var(--card); stroke-width: 2; }
.proj-label { fill: var(--accent); font: italic 14px var(--serif); }
.cursor-line { stroke: var(--ink); stroke-opacity: .25; stroke-width: 1; }
.cursor-val { fill: var(--accent); stroke: var(--card); stroke-width: 2; }
.cursor-dep { fill: var(--card); stroke: var(--muted); stroke-width: 2; }
.tooltip {
  position: absolute;
  pointer-events: none;
  background: var(--ink);
  color: var(--paper);
  border-radius: 10px;
  padding: 9px 12px;
  font-size: 13px;
  line-height: 1.45;
  display: grid;
  gap: 1px;
  min-width: 170px;
  box-shadow: var(--shadow);
  z-index: 2;
}
.tooltip b { font-weight: 600; margin-bottom: 2px; }
.tooltip .tv { display: flex; align-items: center; gap: 7px; font-variant-numeric: tabular-nums; }
.tooltip i { width: 10px; height: 0; border-top: 2.5px solid var(--accent); }
.tooltip i.k-dep { border-top: 2px solid var(--muted); }
.tooltip i.k-proj { border-top-style: dashed; }
.tooltip .tg { font-size: 12px; opacity: .85; }
.tooltip .tg.up { color: color-mix(in srgb, var(--gain) 55%, var(--paper)); }
.tooltip .tg.down { color: color-mix(in srgb, var(--accent) 60%, var(--paper)); }
.chart-note { font-size: 13px; color: var(--muted); margin: 8px 0 0; }
.chart-empty { color: var(--muted); padding: 60px 0; text-align: center; }

/* sections */
.section-head { margin: 56px 0 18px; }
.section-head h2 { font-size: 32px; }
.section-head p { margin: 6px 0 0; }

/* holdings */
.holdings { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 320px), 1fr)); gap: 18px; }
.holding { display: flex; flex-direction: column; gap: 6px; }
.holding-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; }
.holding h3 { font-size: 22px; }
.holding-value { font: 500 32px/1.1 var(--serif); margin: 8px 0 0; letter-spacing: -0.01em; }
.holding-gain { margin: 0; font-size: 15px; font-weight: 600; color: var(--muted); }
.alloc { display: flex; align-items: center; gap: 12px; margin: 10px 0 0; }
.alloc-bar { flex: 1; height: 8px; border-radius: 999px; background: var(--accent-soft); overflow: hidden; }
.alloc-bar i { display: block; height: 100%; background: var(--accent); border-radius: inherit; }
.alloc-pct { font-size: 14px; font-weight: 600; font-variant-numeric: tabular-nums; min-width: 4.5em; text-align: right; }
.holding-meta { margin: 4px 0 0; }
.holding-actions { display: flex; gap: 10px; margin-top: 12px; flex-wrap: wrap; }
.holding-actions .btn-outline { flex: 1; }

/* grid: activity + aside */
.dash-grid { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); gap: 48px; align-items: start; }
.dash-grid aside { padding-top: 56px; }
.dash-grid aside .section-head { margin-top: 40px; }

.activity { list-style: none; margin: 0; padding: 0; border-top: 2px solid var(--ink); }
.act { display: grid; grid-template-columns: 40px minmax(0, 1fr) auto; gap: 14px; align-items: center; padding: 14px 0; border-bottom: 1px solid var(--line); }
.act-thumb { width: 40px; height: 40px; border-radius: 10px; object-fit: cover; background: var(--accent-soft); border: 1px solid var(--line); display: block; }
.act-icon { justify-self: center; }
.act-brand { margin: 0 0 1px; font: 700 11px/1.3 var(--sans); letter-spacing: .1em; text-transform: uppercase; color: var(--muted); overflow-wrap: anywhere; }
.act-icon { width: 36px; height: 36px; display: grid; place-items: center; border-radius: 50%; background: var(--accent-soft); color: var(--accent); font: italic 18px var(--serif); }
.act-sample .act-icon { background: transparent; border: 1px dashed var(--line); color: var(--muted); }
.act-out .act-icon, .act-switch .act-icon { font-style: normal; font-family: var(--sans); font-size: 16px; }
.act-title { margin: 0; font-weight: 600; display: flex; flex-wrap: wrap; gap: 4px 8px; align-items: center; overflow-wrap: anywhere; }
.act-sub { margin: 2px 0 0; overflow-wrap: anywhere; }
.act-amount { font: 500 18px var(--serif); font-variant-numeric: tabular-nums; white-space: nowrap; }
.act-drop .act-amount, .act-sample .act-amount { color: var(--gain); }
.activity-empty { padding: 16px 0; }

.not-real { background: var(--accent-soft); border-radius: 12px; padding: 12px 14px; font-size: 14px; margin: 0 0 14px; }
.funds { list-style: none; margin: 0; padding: 0; }
.fund { padding: 14px 0; border-bottom: 1px solid var(--line); }
.fund:first-child { border-top: 1px solid var(--line); }
.fund-top { display: flex; justify-content: space-between; gap: 10px; align-items: center; }
.fund p { margin: 2px 0 0; }
.fund-meta { display: flex; flex-wrap: wrap; gap: 2px 14px; font-size: 13px; color: var(--muted); font-variant-numeric: tabular-nums; }

/* demo controls */
.demo-controls { margin-top: 56px; }
.demo-controls h3 { font-size: 24px; margin-bottom: 6px; }
.control { display: flex; justify-content: space-between; align-items: center; gap: 12px 24px; padding: 16px 0; border-top: 1px solid var(--line); flex-wrap: wrap; }
.control:first-of-type { border-top: 0; }
.control > div:first-child { flex: 1 1 280px; }
.control p { margin: 2px 0 0; }
.confirm-wrap { display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: 8px 12px; }
.confirm-q { font-weight: 600; }
.confirm-btns { display: inline-flex; align-items: center; gap: 14px; }

/* ---------- footer ---------- */
.app-footer .wrap { align-items: flex-start; }
.disclaimer { margin: 0; max-width: 46em; font-size: 14px; line-height: 1.55; }
.disclaimer b { color: var(--ink); }

/* ---------- toasts ---------- */
.toast-region { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); z-index: 70; display: grid; gap: 8px; width: min(440px, calc(100vw - 32px)); pointer-events: none; }
.toast {
  display: flex; gap: 10px; align-items: center;
  background: var(--ink); color: var(--paper);
  border-radius: 14px; padding: 12px 14px; font-size: 15px;
  box-shadow: var(--shadow);
  animation: toast-in .25s ease;
  transition: opacity .25s ease, transform .25s ease;
}
.toast.err { background: var(--accent); color: #fff; }
.toast.out { opacity: 0; transform: translateY(6px); }
.toast-pill { font: 700 10px/1 var(--sans); letter-spacing: .14em; text-transform: uppercase; border: 1px solid currentColor; border-radius: 999px; padding: 4px 7px; opacity: .8; flex: none; }
@keyframes toast-in { from { opacity: 0; transform: translateY(8px); } }

/* ---------- modal ---------- */
.modal-backdrop {
  position: fixed; inset: 0; z-index: 60;
  background: rgba(30, 26, 22, .45);
  display: grid; place-items: center;
  padding: 24px;
  animation: fade .2s ease;
}
.modal {
  width: min(520px, 100%);
  max-height: calc(100vh - 48px);
  overflow-y: auto;
  background: var(--card);
  color: var(--ink);
  border: 1px solid var(--line);
  border-radius: 22px;
  padding: 20px 24px 24px;
  box-shadow: 0 40px 80px -30px rgba(0, 0, 0, .5);
  outline: none;
  animation: rise .22s ease;
}
.modal-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 14px; }
.modal-close { background: none; border: 0; font-size: 28px; line-height: 1; color: var(--muted); cursor: pointer; width: 40px; height: 40px; border-radius: 50%; margin-right: -8px; }
.modal-close:hover { background: var(--accent-soft); color: var(--ink); }
.modal h2 { font-size: 30px; }
.modal-sub { margin: 6px 0 0; }
.modal-body { margin-top: 18px; }
.field-block { margin: 0 0 16px; min-width: 0; }
.two { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.amount-row { display: flex; gap: 8px; }
.amount-row input { flex: 1; min-width: 0; font-variant-numeric: tabular-nums; }
.small-btn { padding: 0 18px; min-height: 48px; }
.field-block > .small { margin: 6px 0 0; }
.preview { background: var(--paper); border: 1px dashed var(--line); border-radius: 12px; padding: 12px 14px; font-size: 15px; }
.preview p { margin: 2px 0; }
.pv-k { display: inline-block; min-width: 3em; font-weight: 700; color: var(--accent); }
.dest { display: flex; align-items: center; gap: 10px; padding: 12px 14px; border: 1px dashed var(--accent); border-radius: 12px; background: var(--accent-soft); }
.dest-icon { font-size: 18px; color: var(--accent); }
.dest-name { flex: 1; font-weight: 600; }
.sim-warning { font: italic 17px/1.4 var(--serif); color: var(--accent); margin: 4px 0 0; }
.modal-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 20px; }
.modal-actions .btn { flex: 1 1 auto; }
.modal-actions .btn-outline { padding: 14px 20px; }
.success { text-align: center; padding: 8px 0 0; }
.success-mark { display: inline-grid; place-items: center; width: 56px; height: 56px; border-radius: 50%; background: var(--accent-soft); color: var(--accent); font-size: 28px; }
.success-msg { font: 500 24px/1.25 var(--serif); margin: 14px 0 6px; }
.success .modal-actions { justify-content: center; }
@keyframes fade { from { opacity: 0; } }
@keyframes rise { from { opacity: 0; transform: translateY(12px); } }

/* ---------- responsive ---------- */
@media (max-width: 860px) {
  .signin { grid-template-columns: 1fr; gap: 32px; }
  .dash-grid { grid-template-columns: 1fr; gap: 0; }
  .dash-grid aside { padding-top: 0; }
}
@media (max-width: 520px) {
  .view { padding: 28px 0 56px; }
  .lede { font-size: 17px; }
  .card { padding: 18px; border-radius: 16px; }
  .chart-card { padding: 16px 12px 12px; margin-left: -4px; margin-right: -4px; }
  .value { padding-right: 0; }
  .hero-card .stamp { position: static; margin-bottom: 10px; }
  .hero-kept { font-size: 19px; }
  .hero-stats { gap: 10px 24px; }
  .hero-stats dd { font-size: 19px; }
  .session-email { max-width: 16ch; font-size: 14px; }
  .site-header .wrap { height: 60px; }
  .section-head { margin-top: 44px; }
  .section-head h2 { font-size: 28px; }
  .two { grid-template-columns: 1fr; gap: 0; }
  .act { grid-template-columns: 40px minmax(0, 1fr) auto; gap: 10px; }
  .act-icon { width: 32px; height: 32px; }
  .act-amount { font-size: 16px; }
  .empty-actions .btn { width: 100%; }
  .confirm-wrap { justify-content: flex-start; }
  .control > div:last-child { width: 100%; }

  /* bottom sheet */
  .modal-backdrop { place-items: end stretch; padding: 0; }
  .modal {
    width: 100%;
    max-height: 92vh;
    border-radius: 22px 22px 0 0;
    border-bottom: 0;
    padding: 14px 18px calc(20px + env(safe-area-inset-bottom));
    animation: sheet .25s ease;
  }
  .modal::before { content: ""; display: block; width: 40px; height: 4px; border-radius: 4px; background: var(--line); margin: 0 auto 10px; }
  .modal h2 { font-size: 26px; }
  .modal-actions { flex-direction: column; }
  .modal-actions .btn, .modal-actions .btn-outline { width: 100%; }
  @keyframes sheet { from { transform: translateY(100%); } }
}
@media (max-width: 380px) {
  .demo-banner { font-size: 13px; }
  .session { gap: 10px; }
  .session-email { max-width: 11ch; }
  .tabs button { padding: 7px 10px; min-width: 40px; }
}


/* One-row email sign-in */
.email-row { display: flex; gap: 8px; }
.email-row input { flex: 1; min-width: 0; }
.email-row .btn { white-space: nowrap; }
.consent-note { margin: 10px 0 6px; line-height: 1.5; }
#email-error:empty { display: none; }
@media (max-width: 520px) { .email-row { flex-direction: column; } .email-row .btn { width: 100%; } }

/* ---------- v1.2: re-consent ---------- */
.reconsent-wrap { padding-top: 20px; }
.reconsent {
  display: flex; align-items: center; gap: 14px 18px; flex-wrap: wrap;
  background: var(--accent-soft);
  border: 1px solid color-mix(in srgb, var(--accent) 30%, transparent);
  border-radius: 16px; padding: 14px 16px;
}
.reconsent-mark { flex: none; width: 36px; height: 36px; display: grid; place-items: center; border-radius: 50%; background: var(--accent); color: #fff; font: italic 20px var(--serif); }
.reconsent-text { flex: 1 1 320px; min-width: 0; }
.reconsent-text p { margin: 0; line-height: 1.45; }
.reconsent-text .small { margin-top: 2px; }
.reconsent-btn { flex: none; padding: 11px 20px; font-size: 15px; }
.reconsent-wrap + .view { padding-top: 28px; }

/* ---------- v1.2: fund choice ---------- */
.fund-choice { margin-top: 28px; padding: 18px 20px; }
.fc-head { display: flex; align-items: center; justify-content: space-between; gap: 12px 20px; flex-wrap: wrap; }
.fc-now { min-width: 0; flex: 1 1 260px; }
.fc-label { margin: 0; font-size: 12px; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); font-weight: 600; }
.fc-current { margin: 2px 0 0; font: 500 24px/1.25 var(--serif); display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; }
.fc-current b { font-weight: 500; }
.fc-meta { margin: 2px 0 0; }
.fc-panel { margin-top: 16px; padding-top: 16px; border-top: 1px solid var(--line); }
.fc-options { border: 0; margin: 0; padding: 0; min-width: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.fc-option { position: relative; display: block; cursor: pointer; }
.fc-radio { position: absolute; opacity: 0; width: 1px; height: 1px; }
.fc-card {
  display: flex; flex-direction: column; gap: 6px; height: 100%;
  padding: 14px 14px 16px; border: 1.5px solid var(--line); border-radius: 14px; background: var(--paper);
  transition: border-color .15s ease, background .15s ease;
  position: relative;
}
.fc-top { display: flex; flex-direction: column; align-items: flex-start; gap: 6px; }
.fc-top b { font: 600 16px/1.25 var(--sans); padding-right: 22px; }
.fc-rate { font: 500 20px/1.2 var(--serif); }
.fc-desc { line-height: 1.4; }
.fc-check { position: absolute; top: 12px; right: 12px; width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; font-size: 13px; font-weight: 700; color: transparent; border: 1.5px solid var(--line); }
.fc-option:hover .fc-card { border-color: var(--muted); }
.fc-radio:checked + .fc-card { border-color: var(--accent); background: var(--accent-soft); }
.fc-radio:checked + .fc-card .fc-check { background: var(--accent); border-color: var(--accent); color: #fff; }
.fc-radio:focus-visible + .fc-card { outline: 2px solid var(--accent); outline-offset: 2px; }
.fc-radio:disabled + .fc-card { opacity: .6; cursor: progress; }
.fc-note { margin: 14px 0 0; }

/* ---------- v1.2: savings jar ---------- */
.jar-card { margin-top: 18px; display: grid; grid-template-columns: 132px minmax(0, 1fr); gap: 8px 28px; align-items: center; position: relative; overflow: hidden; }
.jar-art { width: 132px; }
.jar-svg { display: block; width: 100%; height: auto; overflow: visible; }
.jar-glass { fill: color-mix(in srgb, var(--accent-soft) 45%, var(--card)); }
.jar-outline { fill: none; stroke: var(--ink); stroke-width: 2.5; stroke-linejoin: round; }
.jar-lid { fill: var(--ink); }
.jar-shine { fill: none; stroke: var(--card); stroke-width: 3; stroke-linecap: round; opacity: .7; }
.jar-fill { transition: transform 1.1s cubic-bezier(.2, .8, .2, 1); }
.jar-liquid { fill: var(--accent); opacity: .9; }
.jar-coin { fill: #E8B84A; stroke: color-mix(in srgb, #E8B84A 60%, #6B4A10); stroke-width: 1.5; }
.jar-pct { font: 600 19px var(--serif); fill: var(--ink); paint-order: stroke; stroke: var(--card); stroke-width: 4px; stroke-linejoin: round; }
.jar-info { min-width: 0; }
.jar-eyebrow { margin: 0; font-size: 12px; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); font-weight: 600; }
.jar-level { font-size: clamp(30px, 4vw, 40px); margin: 2px 0 0; display: flex; flex-wrap: wrap; align-items: center; gap: 6px 12px; }
.jar-next { margin: 6px 0 0; font-size: 17px; }
.jar-next b { color: var(--accent); font-weight: 700; }
.jar-chips { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 10px; margin: 12px 0 0; }
.chip { display: inline-flex; align-items: center; gap: 7px; font: 600 14px/1 var(--sans); padding: 8px 12px; border-radius: 999px; border: 1px solid var(--line); background: var(--paper); white-space: nowrap; }
.chip-streak { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.chip-streak.chip-pending { background: var(--paper); color: var(--ink); border-style: dashed; border-color: var(--accent); }
.chip-flame { width: 10px; height: 14px; background: #E8B84A; border-radius: 50% 50% 50% 50% / 60% 60% 40% 40%; box-shadow: inset 0 -4px 0 var(--accent); flex: none; }
.chip-idle { color: var(--muted); }
.chip-hint { white-space: normal; }
.jar-note { margin: 10px 0 0; }
.level-badge { font: 700 11px/1 var(--sans); letter-spacing: .1em; text-transform: uppercase; background: var(--accent); color: #fff; padding: 6px 9px; border-radius: 999px; }
.jar-card.leveled { border-color: color-mix(in srgb, var(--accent) 55%, var(--line)); box-shadow: 0 0 0 4px var(--accent-soft); }

.milestones {
  --progress: 0;
  grid-column: 1 / -1;
  list-style: none; margin: 18px 0 2px; padding: 0;
  display: grid; grid-template-columns: repeat(8, minmax(0, 1fr));
  position: relative;
}
.milestones::before, .milestones::after { content: ""; position: absolute; top: 7px; left: 6.25%; height: 3px; border-radius: 3px; }
.milestones::before { right: 6.25%; background: var(--line); }
.milestones::after { width: calc(87.5% * var(--progress)); background: var(--accent); }
.ms { position: relative; z-index: 1; display: flex; flex-direction: column; align-items: center; text-align: center; gap: 3px; min-width: 0; padding: 0 2px; }
.ms-dot { width: 17px; height: 17px; border-radius: 50%; background: var(--card); border: 2.5px solid var(--line); }
.ms-done .ms-dot { background: var(--accent); border-color: var(--accent); }
.ms-current .ms-dot { background: var(--card); border-color: var(--accent); box-shadow: 0 0 0 4px var(--accent-soft); }
.ms-name { font-size: 12px; line-height: 1.25; color: var(--muted); margin-top: 4px; overflow-wrap: anywhere; }
.ms-current .ms-name { color: var(--ink); font-weight: 700; }
.ms-at { font-size: 12px; color: var(--muted); font-variant-numeric: tabular-nums; }

.confetti { position: fixed; inset: 0; pointer-events: none; z-index: 65; overflow: hidden; }
.confetti i { position: absolute; width: 8px; height: 12px; border-radius: 2px; }

@media (max-width: 860px) {
  .fc-options { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 520px) {
  .reconsent-wrap { padding-top: 14px; }
  .reconsent-btn { width: 100%; }
  .fund-choice { padding: 16px; }
  .fc-current { font-size: 21px; }
  .fc-head .btn-outline { width: 100%; }
  .fc-options { grid-template-columns: 1fr; gap: 8px; }
  .jar-card { grid-template-columns: 92px minmax(0, 1fr); gap: 6px 16px; align-items: start; }
  .jar-art { width: 92px; }
  .jar-level { font-size: 28px; }
  .jar-next { font-size: 15px; }
  .ms-name { display: none; }
  .ms-current .ms-name { display: block; position: absolute; top: 40px; white-space: nowrap; font-size: 12px; }
  .ms-current { padding-bottom: 18px; }
  .milestones { margin-top: 14px; }
  .ms-at { font-size: 10.5px; }
}

/* ---------- v1.3: tabs (Savings | Portfolio) ---------- */
.tabs-wrap { padding-top: 24px; }
.app-tabs { display: inline-flex; gap: 4px; padding: 4px; border: 1px solid var(--line); border-radius: 999px; background: var(--card); }
.app-tab {
  display: inline-flex; align-items: center; gap: 8px;
  border: 0; background: none; color: var(--muted);
  font: 600 15px/1 var(--sans);
  padding: 10px 20px 10px 16px; min-height: 44px; border-radius: 999px; cursor: pointer;
  transition: background .15s ease, color .15s ease;
}
.app-tab:hover { color: var(--ink); }
.app-tab[aria-selected="true"] { background: var(--btn-bg); color: var(--btn-ink); }
.app-tab-icon { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.app-view .view { padding-top: 32px; }
.app-view [role="tabpanel"]:focus { outline: none; }

/* jar link on the Portfolio tab */
.jar-link {
  margin-top: 14px; width: 100%;
  display: flex; align-items: center; gap: 12px;
  padding: 12px 16px; border: 1px solid var(--line); border-radius: 14px;
  background: var(--card); color: var(--ink); font: 600 16px/1.3 var(--sans); text-align: left; cursor: pointer;
  transition: border-color .15s ease;
}
.jar-link:hover { border-color: var(--accent); }
.jar-link-icon { width: 36px; height: 36px; border-radius: 50%; background: var(--accent-soft); display: grid; place-items: center; flex: none; }
.jar-link-icon svg { width: 20px; height: 20px; fill: none; stroke: var(--accent); stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.jar-link-text { flex: 1; min-width: 0; }
.jar-link-arrow { color: var(--accent); font-size: 18px; }

/* ---------- v1.3: savings tab ---------- */
.sk-card { height: 190px; margin-top: 32px; border-radius: 18px; }
.sk-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 210px), 1fr)); gap: 12px; margin-top: 24px; }
.sk-grid .skeleton { height: 96px; border-radius: 16px; }
.sv-empty .empty-actions .btn-outline { padding: 14px 22px; }

.sv-hero { padding: 0 0 28px; }
.sv-hero .eyebrow { margin: 0 0 10px; }
.sv-kept { font-size: clamp(40px, 7.4vw, 80px); font-weight: 500; letter-spacing: -0.025em; overflow-wrap: anywhere; }
.sv-kept em { white-space: nowrap; font-variant-numeric: lining-nums; }
.sv-other { margin: 10px 0 0; }
.sv-stops { font: italic 22px/1.4 var(--serif); margin: 12px 0 0; }
.sv-hero .hero-stats { margin-top: 22px; }
.sv-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 4px 20px; }
.sv-head p { margin: 0; }

/* achievements */
.badges { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 228px), 1fr)); gap: 12px; }
.badge { position: relative; display: flex; gap: 14px; align-items: flex-start; padding: 16px; border: 1px solid var(--line); border-radius: 16px; background: var(--card); min-width: 0; }
.badge-icon { flex: none; width: 52px; height: 52px; border-radius: 50%; display: grid; place-items: center; }
.badge-svg { width: 40px; height: 40px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; overflow: visible; }
.badge-svg .g-fill { fill: currentColor; stroke: none; }
.badge-svg .g-text { fill: currentColor; stroke: none; font: italic 600 23px var(--serif); }
.badge-svg .g-text-sm { font-size: 17px; font-style: normal; }
.is-unlocked .badge-icon { background: var(--accent); color: #fff; box-shadow: 0 0 0 3px var(--card), 0 0 0 5px color-mix(in srgb, var(--gold) 85%, transparent); }
.is-locked { background: transparent; }
.is-locked .badge-icon { background: var(--paper); color: var(--muted); border: 1.5px dashed color-mix(in srgb, var(--muted) 45%, transparent); }
.is-locked .badge-title { color: var(--muted); }
.badge-body { min-width: 0; flex: 1; }
.badge-title { font-size: 19px; line-height: 1.2; display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; margin: 2px 0 0; }
.badge-desc { margin: 4px 0 0; font-size: 14px; line-height: 1.4; color: var(--muted); }
.badge-meta { margin: 9px 0 0; font: 700 11px/1.2 var(--sans); letter-spacing: .1em; text-transform: uppercase; color: var(--gain); }
.badge-progress { display: flex; align-items: center; gap: 10px; margin-top: 10px; }
.badge-bar { flex: 1; height: 6px; border-radius: 999px; background: var(--line); overflow: hidden; }
.badge-bar i { display: block; height: 100%; background: var(--accent); border-radius: inherit; opacity: .8; }
.badge-count { font: 600 12px var(--sans); color: var(--muted); font-variant-numeric: tabular-nums; white-space: nowrap; }
.badge-new { font: 700 10px/1 var(--sans); letter-spacing: .12em; text-transform: uppercase; background: var(--gold); color: #1E1A16; padding: 4px 7px; border-radius: 999px; }
.badge.is-new { border-color: var(--accent); box-shadow: 0 0 0 4px var(--accent-soft); animation: badge-pop .7s cubic-bezier(.2, .8, .2, 1) both; }
@keyframes badge-pop { 0% { transform: scale(.92); opacity: .4; } 60% { transform: scale(1.03); opacity: 1; } }

/* insights */
.insights { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 18px; }
.ins-card { padding: 20px 22px; }
.ins-title { font-size: 22px; margin: 0 0 12px; }
.stores { list-style: none; margin: 0; padding: 0; }
.store { display: grid; grid-template-columns: 38px minmax(0, 1fr) auto; gap: 12px; align-items: center; padding: 11px 0; border-top: 1px solid var(--line); }
.store:first-child { border-top: 0; padding-top: 2px; }
.store-initial { width: 38px; height: 38px; border-radius: 11px; font: italic 600 19px var(--serif); display: grid; place-items: center; }
.store-name { margin: 0; font-weight: 600; line-height: 1.3; overflow-wrap: anywhere; }
.store-sub { margin: 0; }
.store-bar { display: block; height: 4px; border-radius: 999px; background: var(--line); margin-top: 6px; overflow: hidden; }
.store-bar i { display: block; height: 100%; background: var(--accent); border-radius: inherit; }
.store-kept { margin: 0; text-align: right; display: flex; flex-direction: column; line-height: 1.25; }
.store-kept b { font: 500 19px var(--serif); color: var(--gain); white-space: nowrap; font-variant-numeric: tabular-nums; }
.months { min-height: 200px; }
.months-svg { display: block; width: 100%; height: auto; }
.months-bar { fill: var(--accent); opacity: .5; }
.is-current .months-bar { opacity: 1; }
.months-base { stroke: var(--line); stroke-width: 1; }
.months-val { fill: var(--ink); font: 600 12px var(--sans); font-variant-numeric: tabular-nums; }
.months-label { fill: var(--muted); font: 12px var(--sans); }

/* store initial tiles (also the photo fallback) */
.store-tile { background: var(--accent-soft); color: var(--accent); }
.store-tile.tile-1 { background: color-mix(in srgb, var(--gold) 30%, var(--card)); color: var(--gold-ink); }
.store-tile.tile-2 { background: color-mix(in srgb, var(--gain) 18%, var(--card)); color: var(--gain); }
.store-tile.tile-3 { background: color-mix(in srgb, var(--ink) 9%, var(--card)); color: var(--ink); }

/* history */
.filters { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 6px; }
.filter {
  display: inline-flex; align-items: center; gap: 8px;
  border: 1px solid var(--line); background: var(--card); color: var(--ink);
  font: 600 14px/1 var(--sans); padding: 8px 10px 8px 14px; min-height: 40px; border-radius: 999px; cursor: pointer;
}
.filter:hover { border-color: var(--ink); }
.filter-count { font-size: 12px; color: var(--muted); background: var(--paper); border-radius: 999px; padding: 4px 8px; font-variant-numeric: tabular-nums; }
.filter[aria-pressed="true"] { background: var(--btn-bg); color: var(--btn-ink); border-color: var(--btn-bg); }
.filter[aria-pressed="true"] .filter-count { background: color-mix(in srgb, var(--btn-ink) 20%, transparent); color: inherit; }
.hist-month-title { font-size: 21px; font-style: italic; margin: 28px 0 8px; }
.hist-items { list-style: none; margin: 0; padding: 0; border-top: 2px solid var(--ink); }
.ev { border-bottom: 1px solid var(--line); }
.ev-row {
  width: 100%; display: grid; grid-template-columns: 56px minmax(0, 1fr) auto 18px; gap: 16px; align-items: center;
  padding: 14px 8px; background: none; border: 0; border-radius: 12px;
  color: inherit; font: inherit; text-align: left; cursor: pointer;
}
.ev-row:hover { background: color-mix(in srgb, var(--accent-soft) 50%, transparent); }
.ev-row:focus-visible { outline-offset: -2px; }
.ev-thumb { width: 56px; height: 56px; border-radius: 12px; object-fit: cover; display: grid; place-items: center; border: 1px solid var(--line); font: italic 600 24px var(--serif); background-color: var(--accent-soft); }
.ev-main { display: flex; flex-direction: column; min-width: 0; }
.ev-brand { font: 700 11px/1.4 var(--sans); letter-spacing: .1em; text-transform: uppercase; color: var(--muted); overflow-wrap: anywhere; }
.ev-name { font-weight: 600; line-height: 1.3; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow-wrap: anywhere; }
.ev-meta { font-size: 14px; color: var(--muted); margin-top: 3px; }
.ev-side { display: flex; flex-direction: column; align-items: flex-end; gap: 5px; text-align: right; }
.ev-price { font: 500 19px/1.1 var(--serif); font-variant-numeric: tabular-nums; white-space: nowrap; }
.ev-decision { font: 700 11px/1 var(--sans); letter-spacing: .08em; text-transform: uppercase; padding: 5px 8px; border-radius: 999px; white-space: nowrap; border: 1px solid transparent; }
.d-dropped { background: var(--accent); border-color: var(--accent); color: #fff; }
.d-kept { border-color: var(--ink); color: var(--ink); }
.d-dismissed { background: var(--line); color: var(--muted); }
.ev-proj { font-size: 13px; color: var(--gain); white-space: nowrap; }
.ev-chev { width: 9px; height: 9px; border-right: 2px solid var(--muted); border-bottom: 2px solid var(--muted); transform: rotate(45deg); justify-self: center; margin-top: -5px; transition: transform .2s ease; }
.ev-row[aria-expanded="true"] .ev-chev { transform: rotate(225deg); margin-top: 3px; }
.ev-details { padding: 0 8px 18px 80px; }
.ev-desc { margin: 0; max-width: 62em; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; }
.ev-facts { display: flex; flex-wrap: wrap; gap: 8px 28px; margin: 12px 0 0; font-size: 14px; }
.ev-facts div { min-width: 0; }
.ev-facts dt { font-size: 11px; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); font-weight: 700; }
.ev-facts dd { margin: 1px 0 0; overflow-wrap: anywhere; }
.ev-link { display: inline-block; margin-top: 12px; font-weight: 600; }
.ev-link::after { content: " \2197"; }
.history-more { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; margin-top: 16px; }
.history-more p { margin: 0; }
.history-empty { padding: 24px 0; margin: 0; }

@media (max-width: 860px) {
  .insights { grid-template-columns: 1fr; }
}

/* phones: bottom tab bar + card history */
@media (max-width: 640px) {
  .tabs-wrap { padding: 0; }
  .app-tabs {
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 45;
    display: grid; grid-template-columns: 1fr 1fr; gap: 4px;
    border: 0; border-top: 1px solid var(--line); border-radius: 0;
    background: color-mix(in srgb, var(--card) 92%, transparent);
    -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px);
    padding: 6px max(12px, env(safe-area-inset-right)) calc(6px + env(safe-area-inset-bottom)) max(12px, env(safe-area-inset-left));
  }
  .app-tab { flex-direction: column; justify-content: center; gap: 3px; font-size: 12px; padding: 4px; min-height: 54px; border-radius: 12px; }
  .app-tab[aria-selected="true"] { background: none; color: var(--accent); }
  .app-tab-icon { width: 22px; height: 22px; box-sizing: content-box; padding: 3px 18px; border-radius: 999px; transition: background .15s ease; }
  .app-tab[aria-selected="true"] .app-tab-icon { background: var(--accent-soft); }
  body.has-tabbar { padding-bottom: calc(var(--tabbar-h) + env(safe-area-inset-bottom)); }
  body.has-tabbar .toast-region { bottom: calc(var(--tabbar-h) + 14px + env(safe-area-inset-bottom)); }
  .app-view .view { padding-top: 24px; }

  .hist-items { border-top: 0; display: grid; gap: 10px; }
  .ev { border: 1px solid var(--line); border-radius: 16px; background: var(--card); }
  .ev-row { grid-template-columns: 64px minmax(0, 1fr) 14px; grid-template-areas: "thumb main chev" "thumb side chev"; gap: 8px 12px; padding: 12px; align-items: start; border-radius: 16px; }
  .ev-thumb { grid-area: thumb; width: 64px; height: 64px; }
  .ev-main { grid-area: main; }
  .ev-side { grid-area: side; flex-direction: row; flex-wrap: wrap; align-items: center; gap: 6px 10px; text-align: left; }
  .ev-price { font-size: 18px; }
  .ev-chev { grid-area: chev; align-self: center; }
  .ev-details { padding: 0 14px 14px; }
  .hist-month-title { margin-top: 24px; }
}
@media (max-width: 520px) {
  .sv-stops { font-size: 19px; }
  .badges { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .badge { flex-direction: column; gap: 10px; padding: 14px 12px; }
  .badge-icon { width: 46px; height: 46px; }
  .badge-svg { width: 36px; height: 36px; }
  .badge-title { font-size: 17px; }
  .badge-desc { font-size: 13px; }
  .ins-card { padding: 18px 16px; }
  .store-kept b { font-size: 17px; }
  .history-more .btn-outline { width: 100%; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
