:root {
  --bg: #0b0e14;
  --card: #12171f;
  --raised: #171d27;
  --hover: #1b2230;
  --border: #222a37;
  --border-strong: #323d4e;
  --text: #e8edf3;
  --muted: #8b95a3;
  --yes: #2ecc71;
  --yes-soft: rgba(46, 204, 113, .13);
  --no: #ff5c5c;
  --no-soft: rgba(255, 92, 92, .13);
  --accent: #4f8ef7;
  --accent-soft: rgba(79, 142, 247, .15);
  --radius: 14px;
  --ease: cubic-bezier(.2, .8, .2, 1);
  --shadow: 0 12px 32px rgba(0, 0, 0, .35);
  color-scheme: dark;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-tap-highlight-color: transparent; }
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track, ::-webkit-scrollbar-corner { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--border-strong) padding-box; border: 3px solid transparent; border-radius: 99px; }
::-webkit-scrollbar-thumb:hover { background-color: #4a5870; }
@supports not selector(::-webkit-scrollbar) {
  * { scrollbar-width: thin; scrollbar-color: var(--border-strong) transparent; }
}

body {
  margin: 0;
  background: radial-gradient(1200px 500px at 50% -200px, rgba(79, 142, 247, .08), transparent), var(--bg);
  background-attachment: fixed;
  color: var(--text);
  font: 15px/1.5 Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  font-feature-settings: "cv11", "ss01";
  -webkit-font-smoothing: antialiased;
  padding-bottom: env(safe-area-inset-bottom);
}

a { color: inherit; text-decoration: none; }
h1 { font-size: 1.6rem; line-height: 1.25; letter-spacing: -.02em; margin: 0 0 .35rem; }
h3 { margin: 0 0 .85rem; font-size: 1rem; letter-spacing: -.01em; }
small { font-size: .8rem; }
p { margin: .25rem 0; }
b, .stat b, .chance, .gauge b, .right, .amount input { font-variant-numeric: tabular-nums; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
::selection { background: var(--accent-soft); }

/* Loading bar */
body.loading::before {
  content: ''; position: fixed; top: 0; left: 0; right: 0; height: 2px; z-index: 50;
  background: linear-gradient(90deg, transparent, var(--accent), transparent); background-size: 50% 100%; background-repeat: no-repeat;
  animation: loading 1s linear infinite, fade-in .2s .15s both;
}
@keyframes loading { from { background-position: -50% 0; } to { background-position: 150% 0; } }
@keyframes fade-in { from { opacity: 0; } }

/* Header */
header {
  position: sticky; top: 0; z-index: 10;
  background: rgba(11, 14, 20, .8); backdrop-filter: saturate(1.4) blur(14px); -webkit-backdrop-filter: saturate(1.4) blur(14px);
  border-bottom: 1px solid var(--border);
}
.bar {
  max-width: 1140px; margin: 0 auto; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .75rem;
  padding: calc(.65rem + env(safe-area-inset-top)) 1.25rem .65rem;
}
.logo { display: flex; align-items: center; gap: .55rem; font-weight: 800; font-size: 1.05rem; letter-spacing: -.02em; transition: opacity .15s; }
.logo img { width: 28px; height: 28px; }
.logo:hover { opacity: .8; }
nav { display: flex; align-items: center; gap: .6rem; }
.links { display: flex; gap: .15rem; margin-right: .4rem; }
.links a { padding: .45rem .8rem; border-radius: 9px; color: var(--muted); font-weight: 500; transition: color .15s, background .15s; white-space: nowrap; }
.links a:hover { color: var(--text); background: var(--hover); }
.links a.active { color: var(--text); background: var(--border); }
.me {
  display: flex; align-items: center; gap: .55rem; padding: .2rem .2rem .2rem .8rem;
  border: 1px solid var(--border); border-radius: 99px; font-weight: 600; font-variant-numeric: tabular-nums;
  transition: border-color .15s, background .15s;
}
.me:hover, .me.active { border-color: var(--border-strong); background: var(--hover); }
.me .avatar { width: 1.85rem; height: 1.85rem; }

main { max-width: 1140px; margin: 0 auto; padding: 1.5rem 1.25rem 4rem; }
.enter { animation: enter .35s var(--ease); }
@keyframes enter { from { opacity: 0; transform: translateY(8px); } }
.page-head { margin-bottom: 1.25rem; }
.page-head h1 { margin: 0; }

/* Form controls */
input, textarea, select, button { font: inherit; color: inherit; }
input, textarea {
  width: 100%; padding: .72rem .9rem; margin: .4rem 0 .9rem;
  background: var(--bg); border: 1px solid var(--border); border-radius: 11px;
  transition: border-color .15s, box-shadow .15s, background .15s;
}
input:hover, textarea:hover { border-color: var(--border-strong); }
input:focus, textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
input::placeholder, textarea::placeholder { color: #5d6776; }
textarea { resize: none; }
input[type=number]::-webkit-inner-spin-button, input[type=number]::-webkit-outer-spin-button { -webkit-appearance: none; margin: 0; }
input[type=number] { -moz-appearance: textfield; }
input[type=search]::-webkit-search-cancel-button { display: none; }
input:-webkit-autofill, input:-webkit-autofill:hover, input:-webkit-autofill:focus {
  -webkit-text-fill-color: var(--text); caret-color: var(--text); box-shadow: 0 0 0 100px var(--bg) inset; transition: background-color 99999s;
}
.invalid, .invalid:focus { border-color: var(--no); box-shadow: 0 0 0 3px var(--no-soft); }
.dialog-error { margin: .6rem 0 0; font-size: .85rem; }
.dialog-error:empty { display: none; }

[data-tip] { position: relative; }
[data-tip]:hover::after {
  content: attr(data-tip); position: absolute; top: calc(100% + 6px); right: 0; z-index: 40; pointer-events: none;
  padding: .3rem .55rem; border-radius: 7px; background: #1f2733; border: 1px solid var(--border-strong);
  color: var(--text); font-size: .75rem; font-weight: 500; white-space: nowrap; box-shadow: var(--shadow);
  animation: fade-in .15s .35s both;
}
@media (hover: none) { [data-tip]:hover::after { display: none; } }

.picker-wrap, .dropdown { position: relative; }
.picker {
  display: flex; align-items: center; gap: .55rem; width: 100%; padding: .72rem .9rem; margin: .4rem 0 0;
  background: var(--bg); border: 1px solid var(--border); border-radius: 11px; color: var(--text); font-weight: 500; text-align: left;
  transition: border-color .15s, box-shadow .15s;
}
.dropdown .picker { margin: 0; }
.picker:hover { border-color: var(--border-strong); }
.open > .picker { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.picker span { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.picker .ico { color: var(--muted); transition: transform .2s var(--ease); }
.open > .picker .ico:last-child { transform: rotate(180deg); }
.popover {
  position: absolute; top: calc(100% + 6px); left: 0; z-index: 30; min-width: 100%; padding: .35rem;
  background: var(--raised); border: 1px solid var(--border-strong); border-radius: 13px; box-shadow: var(--shadow);
  animation: pop .15s var(--ease);
}
.dropdown .popover, .picker-wrap + .picker-wrap .popover { left: auto; right: 0; }
.menu { max-height: 264px; overflow-y: auto; }
.menu button { display: block; width: 100%; padding: .5rem .75rem; border-radius: 8px; color: var(--text); text-align: left; white-space: nowrap; transition: background .1s; }
.menu button:hover { background: var(--border); }
.menu button.active { color: #8fb6ff; background: var(--accent-soft); font-weight: 600; }
.calendar { width: 292px; padding: .7rem; }
.cal-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: .45rem; }
.icon-btn { display: grid; place-items: center; width: 2rem; height: 2rem; border-radius: 8px; color: var(--muted); transition: background .15s, color .15s; }
.icon-btn:hover { background: var(--border); color: var(--text); }
.cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 2px; text-align: center; }
.cal-grid small { padding: .25rem 0; color: var(--muted); font-weight: 600; font-size: .72rem; }
.cal-grid button { aspect-ratio: 1; border-radius: 9px; color: var(--text); font-size: .88rem; font-variant-numeric: tabular-nums; transition: background .1s; }
.cal-grid button:hover:not(:disabled) { background: var(--border); }
.cal-grid .outside { color: var(--muted); }
.cal-grid .today { box-shadow: inset 0 0 0 1px var(--border-strong); }
.cal-grid .selected, .cal-grid .selected:hover { background: var(--accent) !important; color: #fff; font-weight: 700; }
.cal-grid button:disabled { opacity: .25; cursor: default; }
.times { min-width: 160px; }
label.link { display: inline; cursor: pointer; font-size: inherit; font-weight: 400; }
.meta .link { font-size: inherit; }
button.link { padding: 0; }
label, .label { display: block; color: var(--muted); font-size: .88rem; font-weight: 500; }
button { cursor: pointer; border: none; background: none; }
.field { margin-bottom: 1.1rem; }
.field input { margin-bottom: 0; }
.hint { display: block; color: var(--muted); font-size: .8rem; margin-top: .45rem; }
.hint.no { color: var(--no); }
.inline { display: flex; gap: .5rem; }
.inline input { margin: 0; }

input[type=range] {
  appearance: none; height: 6px; padding: 0; margin: .9rem 0 .2rem; border: none; border-radius: 99px; cursor: pointer;
  background: linear-gradient(90deg, var(--yes) var(--fill, 50%), var(--border) var(--fill, 50%));
}
input[type=range]:focus { box-shadow: none; }
input[type=range]::-webkit-slider-thumb {
  appearance: none; width: 20px; height: 20px; border-radius: 50%; background: #fff; border: 4px solid var(--yes);
  box-shadow: 0 2px 8px rgba(0, 0, 0, .4); transition: transform .15s;
}
input[type=range]::-moz-range-thumb { width: 12px; height: 12px; border-radius: 50%; background: #fff; border: 4px solid var(--yes); }
input[type=range]:hover::-webkit-slider-thumb, input[type=range]:active::-webkit-slider-thumb { transform: scale(1.15); }
.odds-value { font-size: 1.35rem; }
.field .row.hint { padding: 0; margin: 0; }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .4rem;
  padding: .6rem 1.05rem; border-radius: 11px; border: 1px solid transparent;
  background: var(--accent); color: #fff; font-weight: 600; white-space: nowrap;
  transition: filter .15s, background .15s, border-color .15s, transform .1s, opacity .15s;
}
.btn:hover { filter: brightness(1.12); }
.btn:active { transform: scale(.97); }
.btn:disabled { opacity: .45; pointer-events: none; }
.btn.ghost { background: transparent; border-color: var(--border-strong); color: var(--text); }
.btn.ghost:hover { background: var(--hover); filter: none; }
.btn.danger { background: transparent; border-color: rgba(255, 92, 92, .4); color: var(--no); }
.btn.danger:hover { background: var(--no-soft); filter: none; }
.btn.danger.solid { background: var(--no); color: #fff; border-color: transparent; }
.btn.buy-yes { background: var(--yes); color: #04130a; }
.btn.buy-no { background: var(--no); color: #1a0505; }
.btn.small { padding: .35rem .7rem; font-size: .82rem; border-radius: 9px; }
.btn.large { padding: .8rem 1rem; font-size: 1rem; }
.busy form .btn, .busy dialog .btn { opacity: .6; pointer-events: none; }
.wide { width: 100%; margin-top: .5rem; }
.icon { display: grid; place-items: center; color: var(--muted); width: 1.9rem; height: 1.9rem; border-radius: 50%; transition: background .15s, color .15s, opacity .15s; }
.icon:hover { background: var(--no-soft); color: var(--no); }
.buttons { display: flex; flex-wrap: wrap; gap: .5rem; }
.buttons.end { justify-content: flex-end; margin-top: 1.25rem; }

.chips { display: flex; flex-wrap: wrap; gap: .4rem; margin: .5rem 0; }
.chip {
  padding: .35rem .75rem; border-radius: 99px; border: 1px solid var(--border); background: var(--raised);
  color: var(--muted); font-size: .82rem; font-weight: 600; transition: color .15s, border-color .15s, background .15s, transform .1s;
}
.chip:hover { color: var(--text); border-color: var(--border-strong); }
.chip:active { transform: scale(.95); }
.chip.active { color: var(--accent); border-color: var(--accent); background: var(--accent-soft); }
.date-row { display: grid; grid-template-columns: 6.2rem minmax(0, 1fr) 2.8rem auto; align-items: center; gap: .7rem; padding: .3rem 0; }
.date-row input[type=range] { margin: 0; }
.form:not(.advanced) .adv { display: none; }
.form:not(.advanced) .date-row { grid-template-columns: minmax(0, 1fr) auto; }
.date-row [data-remove] { grid-column: -2; justify-self: end; }
#advanced { margin: .2rem 0 1.1rem; color: var(--muted); }
#advanced:hover { color: var(--text); }
.advanced #advanced .ico:last-child { transform: rotate(180deg); }
.date-row .odds-value { font-size: 1rem; text-align: right; }
.date-name { font-weight: 600; white-space: nowrap; }
.date-options { display: grid; gap: .15rem; }
.date-option { display: flex; align-items: center; gap: .5rem; padding: .25rem 0; font-size: .92rem; }
.date-option > span:first-child { flex: 1; font-weight: 500; }
.date-option b { min-width: 2.6rem; text-align: right; }
.date-option .outcome { flex: none; padding: .28rem .7rem; border-radius: 8px; font-size: .8rem; }
.option-row { display: grid; grid-template-columns: 2.4rem minmax(0, 1fr) auto; align-items: center; gap: .3rem .55rem; margin-top: .55rem; }
.option-odds-line, .set-all { display: grid; grid-template-columns: minmax(0, 1fr) 2.8rem; align-items: center; gap: .7rem; }
.option-odds-line { grid-column: 2 / -1; padding: 0 .4rem 0 .1rem; }
.set-all { grid-template-columns: auto minmax(0, 1fr) 2.8rem; margin: .5rem 0 .2rem; padding-right: .4rem; color: var(--muted); font-size: .84rem; }
.option-odds-line input[type=range], .set-all input[type=range] { margin: 0; }
.option-odds-line .odds-value, .set-all .odds-value { font-size: .95rem; text-align: right; color: var(--text); }
.option-row > .avatar, .option-pic { width: 2.4rem; height: 2.4rem; }
.option-row input { margin: 0; }
.option-pic {
  display: grid; place-items: center; overflow: hidden; cursor: pointer; border-radius: 50%; color: var(--muted);
  border: 1.5px dashed var(--border-strong); transition: color .15s, border-color .15s;
}
.option-pic:hover { color: var(--accent); border-color: var(--accent); }
.option-pic img { width: 100%; height: 100%; object-fit: cover; }
#add-option { margin-top: .7rem; }
.avatar.called-off { background: var(--border); color: var(--muted); }
.date-option .avatar, .date-tab .avatar, .chip .avatar { width: 1.5rem; height: 1.5rem; font-size: .68rem; }
.chip.with-icon { display: inline-flex; align-items: center; gap: .4rem; }
.date-tabs { display: flex; gap: .45rem; margin-bottom: 1rem; overflow-x: auto; scrollbar-width: none; }
.date-tabs::-webkit-scrollbar { display: none; }
.date-tab {
  display: grid; flex-shrink: 0; gap: .1rem; padding: .5rem .9rem; border: 1px solid var(--border); border-radius: 11px;
  background: var(--card); color: var(--muted); font-size: .8rem; transition: border-color .15s, background .15s;
}
.date-tab b { font-size: 1rem; color: var(--text); }
.date-tab b.yes { color: var(--yes); }
.date-tab b.no { color: var(--no); }
.date-tab:hover { border-color: var(--border-strong); }
.option-list { padding: .5rem; }
.option-list .date-option { padding: .55rem .7rem; border-radius: 10px; cursor: pointer; transition: background .15s; }
.option-list .date-option:hover { background: var(--hover); }
.option-list .date-option.active { background: var(--accent-soft); box-shadow: inset 0 0 0 1px var(--accent); }
.option-list .date-option .avatar { width: 1.8rem; height: 1.8rem; font-size: .75rem; }
.option-list #add-to-group { margin: .5rem .7rem .3rem; }
.add-tab { display: flex; align-items: center; gap: .4rem; border-style: dashed; color: var(--muted); font-size: .85rem; font-weight: 600; }
.add-tab:hover { color: var(--accent); border-color: var(--accent); }
.calendar.flat { width: auto; padding: 0; margin: .9rem 0 .4rem; }
.existing { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem .7rem; margin: -.2rem 0 1.1rem; color: var(--muted); font-size: .85rem; }
.existing .dropdown { flex: 1; min-width: 12rem; }
.people-hint { margin-top: -.6rem; margin-bottom: 1.1rem; }
.date-tab.active { border-color: var(--accent); background: var(--accent-soft); color: #8fb6ff; }
.datetime { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: .5rem; }

.segmented { display: flex; padding: 3px; margin-bottom: .9rem; background: var(--bg); border: 1px solid var(--border); border-radius: 11px; }
.segmented button { flex: 1; padding: .45rem; border-radius: 8px; color: var(--muted); font-weight: 600; transition: color .15s, background .15s; }
.segmented button:hover { color: var(--text); }
.segmented button.active { background: var(--border); color: var(--text); box-shadow: 0 1px 3px rgba(0, 0, 0, .3); }

/* Cards & rows */
.card {
  display: block; background: var(--card); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 1.1rem 1.2rem; margin-bottom: 1rem;
  transition: border-color .2s, transform .25s var(--ease), box-shadow .25s, background .2s;
}
.narrow { max-width: 480px; margin: 1rem auto; }
.form { max-width: 560px; margin: 0 auto; padding: 1.5rem; }
.form > .muted { margin-bottom: 1.4rem; }
.row { display: flex; justify-content: space-between; align-items: center; gap: 1rem; padding: .5rem 0; }
.card > .row + .row, #users .row + .row, .quote .row + .row { border-top: 1px solid var(--border); }
.card > a.row, .leader { margin: 0 -.65rem; padding: .65rem; border-radius: 11px; transition: background .15s; }
.card > a.row:hover, .leader:hover { background: var(--hover); }
.card > a.row + a.row, .leader + .leader { border-top-color: transparent; }
.who { display: flex; align-items: center; gap: .65rem; min-width: 0; }
.right { text-align: right; white-space: nowrap; }
.nowrap { white-space: nowrap; }
.muted { color: var(--muted); }
.meta { display: flex; flex-wrap: wrap; gap: .3rem .9rem; color: var(--muted); font-size: .84rem; }
.pre { white-space: pre-wrap; overflow-wrap: anywhere; }
.yes { color: var(--yes); }
.no { color: var(--no); }
.none { margin: 0; }

.empty { grid-column: 1 / -1; display: grid; justify-items: center; gap: .6rem; padding: 2.5rem 1rem; text-align: center; color: var(--muted); }
.empty-icon { width: 4rem; height: 4rem; display: grid; place-items: center; border-radius: 50%; background: var(--raised); color: var(--muted); }
.ico { flex-shrink: 0; }
.with-icon, .link.with-icon { display: inline-flex; align-items: center; gap: .3rem; }
.empty p { margin: 0; }

img.avatar { object-fit: cover; background: var(--border); }
.avatar {
  display: inline-grid; place-items: center; flex-shrink: 0; width: 2rem; height: 2rem; border-radius: 50%;
  background: hsl(var(--hue) 45% 26%); color: hsl(var(--hue) 85% 82%); font-weight: 700; font-size: .85rem;
}
.badge {
  display: inline-block; padding: .08rem .5rem; margin-left: .3rem; border-radius: 99px; vertical-align: middle;
  background: var(--accent-soft); color: #8fb6ff; font-size: .7rem; font-weight: 600; letter-spacing: .01em;
}
.badge.gray { background: var(--border); color: var(--muted); }
.pill { display: inline-block; padding: .05rem .45rem; border-radius: 6px; font-size: .78rem; font-weight: 700; }
.pill.yes { background: var(--yes-soft); }
.pill.no { background: var(--no-soft); }
.thumb { width: 46px; height: 46px; border-radius: 11px; object-fit: cover; flex-shrink: 0; background: var(--border); }
.thumb.small { width: 38px; height: 38px; border-radius: 9px; }
.thumb.large { width: 76px; height: 76px; border-radius: 16px; transition: transform .25s var(--ease); }
.photo { padding: 0; border-radius: 16px; }
.photo:hover .thumb { transform: scale(1.05) rotate(-1deg); }

/* Markets */
.toolbar { display: flex; flex-wrap: wrap; gap: .75rem; align-items: center; margin-bottom: 1.25rem; }
.search { flex: 1; min-width: 220px; position: relative; }
.search input { margin: 0; padding-left: 2.5rem; background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='none' stroke='%238b95a3' stroke-width='2' stroke-linecap='round'%3E%3Ccircle cx='7' cy='7' r='5'/%3E%3Cpath d='m11 11 3.5 3.5'/%3E%3C/svg%3E") no-repeat .9rem center, var(--bg); }
.tabs { display: flex; gap: .2rem; }
.tabs button { display: flex; align-items: center; gap: .35rem; padding: .45rem .8rem; border-radius: 9px; color: var(--muted); font-weight: 600; transition: color .15s, background .15s; }
.tabs button:hover { color: var(--text); background: var(--hover); }
.tabs button.active { background: var(--border); color: var(--text); }
.tabs small { min-width: 1.3rem; padding: 0 .3rem; border-radius: 99px; background: var(--bg); color: var(--muted); font-weight: 600; font-size: .72rem; text-align: center; }

.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 1rem; }
.grid .card { margin: 0; }
.market-card { display: flex; flex-direction: column; gap: .85rem; padding: 1.1rem 1.2rem 1rem; }
.market-card:hover { transform: translateY(-3px); border-color: var(--border-strong); background: var(--raised); box-shadow: var(--shadow); }
.market-card .meta { margin-top: auto; }
.card-head { display: flex; gap: .8rem; align-items: flex-start; }
.card-head h3 { flex: 1; margin: 0; line-height: 1.4; font-size: 1rem; }
.resolved { padding: .65rem; border-radius: 11px; text-align: center; font-weight: 700; background: var(--border); }
.resolved.yes { background: var(--yes-soft); }
.resolved.no { background: var(--no-soft); }

.gauge { position: relative; width: 78px; height: 54px; flex-shrink: 0; display: grid; justify-items: center; align-content: end; line-height: 1.1; }
.gauge svg { position: absolute; top: 0; left: 0; width: 78px; height: 44px; overflow: visible; fill: none; stroke-width: 4; stroke-linecap: round; }
.gauge .track { stroke: var(--border-strong); }
.gauge .fill { stroke: var(--tone); filter: drop-shadow(0 0 3px color-mix(in srgb, var(--tone) 55%, transparent)); }
.gauge b { font-size: 1rem; }
.gauge small { font-size: .65rem; color: var(--muted); }

.chance { display: flex; align-items: baseline; gap: .5rem; font-size: 2.3rem; font-weight: 800; letter-spacing: -.03em; }
.chance small { font-size: .95rem; font-weight: 500; letter-spacing: 0; color: var(--muted); }
.chance small.yes { color: var(--yes); }
.chance small.no { color: var(--no); }
.flash-up { animation: flash-up 1.6s var(--ease); }
.flash-down { animation: flash-down 1.6s var(--ease); }
@keyframes flash-up { 0%, 30% { color: var(--yes); text-shadow: 0 0 18px rgba(46, 204, 113, .55); } }
@keyframes flash-down { 0%, 30% { color: var(--no); text-shadow: 0 0 18px rgba(255, 92, 92, .55); } }

.outcomes { display: flex; gap: .5rem; }
.outcome {
  flex: 1; display: flex; justify-content: center; gap: .35rem; padding: .62rem; border-radius: 11px;
  font-weight: 600; background: var(--border); transition: background .15s, color .15s, transform .1s, box-shadow .15s;
}
.outcome:hover { background: var(--border-strong); }
.outcome:active { transform: scale(.97); }
.outcome.yes { background: var(--yes-soft); color: var(--yes); }
.outcome.no { background: var(--no-soft); color: var(--no); }
.outcome.yes:hover, .outcome.yes.active { background: var(--yes); color: #04130a; }
.outcome.no:hover, .outcome.no.active { background: var(--no); color: #1a0505; }
.outcome.active { box-shadow: 0 6px 18px rgba(0, 0, 0, .3); }

/* Market page */
.layout { display: grid; grid-template-columns: minmax(0, 1fr) 350px; grid-template-rows: auto 1fr; grid-template-areas: "head aside" "details aside"; column-gap: 1.5rem; align-items: start; }
.head { grid-area: head; }
.details { grid-area: details; }
aside { grid-area: aside; position: sticky; top: 5rem; }
.title { display: flex; gap: 1rem; align-items: center; margin-bottom: 1.1rem; }
.title-text { flex: 1; min-width: 0; }
.chart-card { padding-bottom: .8rem; }
.chart-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: .5rem; margin-bottom: .6rem; }
.chart { position: relative; height: 300px; }
.chart canvas { touch-action: pan-y; }
#chance-note { white-space: nowrap; }

.trade .outcomes { margin: .1rem 0 1rem; }
.trade .outcome { padding: .75rem; font-size: 1rem; }
.amount { position: relative; display: flex; align-items: center; margin: .4rem 0 0; }
.amount span { position: absolute; left: .95rem; color: var(--muted); font-size: 1.3rem; font-weight: 600; }
.amount input { margin: 0; padding: .7rem .95rem .7rem 2rem; font-size: 1.4rem; font-weight: 700; }
#prefix[hidden] + input { padding-left: .95rem; }
.quote { font-size: .9rem; color: var(--muted); }
.quote .row { padding: .4rem 0; }
.quote .total { color: var(--text); font-size: 1rem; }
.quote .total b small { font-size: .78rem; font-weight: 600; opacity: .8; }
.status-card { text-align: center; padding: 1.5rem 1.2rem; }
.status-card.yes { border-color: rgba(46, 204, 113, .35); background: linear-gradient(var(--yes-soft), transparent 70%), var(--card); }
.status-card.no { border-color: rgba(255, 92, 92, .35); background: linear-gradient(var(--no-soft), transparent 70%), var(--card); }
.status-icon { width: 3.2rem; height: 3.2rem; margin: 0 auto .6rem; display: grid; place-items: center; border-radius: 50%; background: var(--raised); color: var(--muted); }
.status-card.yes .status-icon { color: var(--yes); background: var(--yes-soft); }
.status-card.no .status-icon { color: var(--no); background: var(--no-soft); }
.status-card h3 { margin-bottom: .2rem; font-size: 1.15rem; }

#comment { display: flex; gap: .65rem; align-items: flex-start; }
#comment .avatar { margin-top: .35rem; }
#comment textarea { margin: 0; min-height: 2.7rem; overflow: hidden; }
#comment .btn { height: 2.7rem; }
.comment { display: flex; gap: .75rem; padding: .9rem 0; border-top: 1px solid var(--border); }
.comment:first-child { margin-top: 1rem; }
.comment > div { flex: 1; min-width: 0; }
.comment .icon { opacity: 0; }
.comment:hover .icon { opacity: 1; }

.mention-field { position: relative; flex: 1; min-width: 0; }
.mentions {
  position: absolute; left: 0; top: calc(100% + 4px); z-index: 5; min-width: 220px; padding: .3rem;
  background: var(--raised); border: 1px solid var(--border-strong); border-radius: 12px; box-shadow: var(--shadow);
  animation: pop .15s var(--ease);
}
.mentions button { display: flex; align-items: center; gap: .55rem; width: 100%; padding: .4rem .5rem; border-radius: 8px; font-weight: 500; text-align: left; }
.mentions button .avatar { width: 1.6rem; height: 1.6rem; font-size: .75rem; }
.mentions button:hover, .mentions button.active { background: var(--border); }
.mention { color: #8fb6ff; font-weight: 600; }
.people {
  display: flex; flex-wrap: wrap; align-items: center; gap: .35rem; padding: .4rem .5rem; margin-top: .4rem; cursor: text;
  background: var(--bg); border: 1px solid var(--border); border-radius: 11px; transition: border-color .15s, box-shadow .15s;
}
.people:focus-within { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.people-chips { display: contents; }
.people input { min-width: 8rem; padding: .3rem; margin: 0; border: none; background: none; box-shadow: none; }
.person-chip {
  display: inline-flex; align-items: center; gap: .4rem; padding: .2rem .55rem .2rem .2rem; border-radius: 99px;
  background: var(--raised); border: 1px solid var(--border); font-size: .85rem; font-weight: 500; color: var(--text);
}
.person-chip .avatar { width: 1.45rem; height: 1.45rem; font-size: .68rem; }
.person-chip button { display: grid; place-items: center; margin-left: -.1rem; color: var(--muted); }
.person-chip button:hover { color: var(--no); }
a.person-chip:hover { border-color: var(--border-strong); }
.people-line { display: flex; flex-wrap: wrap; align-items: center; gap: .4rem; margin-top: .55rem; font-size: .84rem; }
.faces { display: inline-flex; }
.faces .avatar { width: 1.35rem; height: 1.35rem; font-size: .62rem; box-shadow: 0 0 0 2px var(--card); }
.faces .avatar + .avatar { margin-left: -.4rem; }
.market-card:hover .faces .avatar { box-shadow: 0 0 0 2px var(--raised); }
.section-title { margin: 1.6rem 0 .8rem; }
a.mention:hover, .profile-link:hover b, .meta .profile-link:hover, p .profile-link:hover { text-decoration: underline; }
.avatar-link { display: flex; flex-shrink: 0; height: fit-content; border-radius: 50%; transition: box-shadow .15s; }
.avatar-link:hover { box-shadow: 0 0 0 2px var(--border-strong); }
.mention.self { padding: 0 .2rem; border-radius: 5px; background: var(--accent-soft); }
.comment.highlight { animation: highlight 2.5s var(--ease); }
@keyframes highlight { 0%, 40% { background: var(--accent-soft); box-shadow: 0 0 0 .5rem var(--accent-soft); } }

/* Notifications */
.bell-wrap { position: relative; }
.bell {
  position: relative; display: grid; place-items: center; width: 2.4rem; height: 2.4rem; border-radius: 50%;
  border: 1px solid var(--border); color: var(--muted); transition: color .15s, background .15s, border-color .15s;
}
.bell:hover, .bell.active { color: var(--text); background: var(--hover); border-color: var(--border-strong); }
.count {
  position: absolute; top: -4px; right: -4px; min-width: 1.15rem; height: 1.15rem; padding: 0 .25rem; border-radius: 99px;
  display: grid; place-items: center; background: var(--no); color: #fff; font-size: .68rem; font-weight: 800;
  box-shadow: 0 0 0 2px var(--bg); animation: pop .25s var(--ease);
}
.notifications {
  position: absolute; right: 0; top: calc(100% + .6rem); z-index: 20; width: 360px; max-height: 70vh; overflow-y: auto; padding: .4rem;
  background: var(--card); border: 1px solid var(--border-strong); border-radius: 16px; box-shadow: 0 24px 60px rgba(0, 0, 0, .55);
  animation: pop .18s var(--ease);
}
.panel-head { display: flex; align-items: center; justify-content: space-between; gap: .5rem; padding: .4rem .5rem .6rem .6rem; font-weight: 700; }
.panel-head .tabs button { padding: .3rem .6rem; font-size: .82rem; }
.panel-foot { display: flex; justify-content: center; margin-top: .3rem; padding: .6rem; border-top: 1px solid var(--border); color: var(--muted); font-size: .85rem; }
.panel-foot:hover { color: var(--text); }
.notification > span > b { font-weight: 600; }
.notifications .none { padding: .4rem .6rem 1rem; }
.notification { display: flex; gap: .7rem; padding: .65rem .6rem; border-radius: 11px; transition: background .15s; }
.notification:hover { background: var(--hover); }
.notification > span { display: grid; gap: .15rem; min-width: 0; font-size: .9rem; }
.notification.unread { background: var(--accent-soft); }
.notification.unread:hover { background: rgba(79, 142, 247, .22); }
.quote-text { color: var(--text); opacity: .85; overflow-wrap: anywhere; }

/* New market */
.upload {
  position: relative; height: 168px; margin: .4rem 0 1.1rem; overflow: hidden;
  border: 1.5px dashed var(--border-strong); border-radius: 14px; background: var(--bg) center / cover no-repeat;
  transition: border-color .15s, background-color .15s;
}
.upload:hover, .upload.dragging { border-color: var(--accent); background-color: var(--accent-soft); }
.upload-empty { height: 100%; display: grid; place-content: center; justify-items: center; gap: .3rem; cursor: pointer; color: var(--text); font-size: .95rem; }
.upload-icon { width: 2.9rem; height: 2.9rem; margin-bottom: .35rem; display: grid; place-items: center; border-radius: 12px; background: var(--raised); color: var(--muted); transition: color .15s, transform .2s var(--ease); }
.upload:hover .upload-icon, .upload.dragging .upload-icon { color: var(--accent); transform: translateY(-2px); }
.upload-actions { position: absolute; right: .6rem; bottom: .6rem; display: none; gap: .4rem; }
.upload-actions .btn { background: rgba(11, 14, 20, .75); backdrop-filter: blur(6px); cursor: pointer; }
.upload.has-image { border-style: solid; border-color: var(--border); }
.upload.has-image .upload-empty { display: none; }
.upload.has-image .upload-actions { display: flex; }
.photo-placeholder {
  display: grid; place-items: center; width: 76px; height: 76px; flex-shrink: 0; cursor: pointer; color: var(--muted);
  border: 1.5px dashed var(--border-strong); border-radius: 16px; transition: color .15s, border-color .15s, background .15s;
}
.photo-placeholder:hover { color: var(--accent); border-color: var(--accent); background: var(--accent-soft); }

.manage { padding: 0; }
.manage summary {
  display: flex; align-items: center; gap: .55rem; padding: 1rem 1.2rem; cursor: pointer; list-style: none;
  color: var(--muted); font-weight: 600; border-radius: var(--radius); transition: color .15s, background .15s;
}
.manage summary::-webkit-details-marker { display: none; }
.manage summary:hover { color: var(--text); background: var(--hover); }
.manage summary small { margin-left: auto; font-weight: 400; }
.manage summary::after {
  content: ''; width: .45rem; height: .45rem; margin: 0 .2rem 0 .4rem;
  border-right: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: rotate(45deg) translateY(-2px); transition: transform .2s var(--ease);
}
.manage[open] summary { color: var(--text); border-bottom-left-radius: 0; border-bottom-right-radius: 0; }
.manage[open] summary::after { transform: rotate(-135deg); }
.manage-section { padding: 1.1rem 1.2rem; border-top: 1px solid var(--border); }

/* Portfolio, leaderboard, admin */
.stats.compact { display: flex; flex-wrap: wrap; gap: .6rem; max-width: 760px; }
.stats.compact .card { flex: 1 1 150px; padding: .75rem .9rem; }
.stats.compact small, .stats.compact b { white-space: nowrap; }
.stats.compact b { font-size: 1.15rem; }
.admin-tabs { margin-bottom: 1rem; overflow-x: auto; scrollbar-width: none; }
.admin-tabs::-webkit-scrollbar { display: none; }
.admin-section { max-width: 760px; }
.card-title { padding: 0; }
.card-title h3 { margin: 0; }
.card-title h3 small { font-weight: 500; }
.live { display: inline-flex; align-items: center; gap: .45rem; font-size: .78rem; font-weight: 600; color: var(--yes); }
.live i { position: relative; width: .5rem; height: .5rem; border-radius: 50%; background: currentColor; }
.live i::after { content: ''; position: absolute; inset: 0; border-radius: 50%; background: currentColor; animation: live-ring 1.6s var(--ease) infinite; }
.live.off { color: var(--muted); }
.live.off i::after { animation: none; opacity: 0; }
@keyframes live-ring { from { transform: scale(1); opacity: .7; } to { transform: scale(3.2); opacity: 0; } }
@keyframes live-fade { 50% { opacity: .35; } }
.activity { align-items: flex-start; font-size: .9rem; }
.activity a:hover { text-decoration: underline; }
.activity .who { align-items: flex-start; }
.activity .who > span:last-child { padding-top: .2rem; }
.activity-icon { display: grid; place-items: center; width: 1.9rem; height: 1.9rem; flex-shrink: 0; border-radius: 50%; background: var(--raised); color: var(--muted); }
.activity-icon.kind-bet, .activity-icon.kind-market { color: var(--yes); background: var(--yes-soft); }
.activity-icon.kind-sell { color: var(--no); background: var(--no-soft); }
.activity-icon.kind-comment, .activity-icon.kind-resolve { color: #8fb6ff; background: var(--accent-soft); }
.profile-head { display: flex; align-items: center; gap: .9rem; }
.profile-head .avatar { width: 3.2rem; height: 3.2rem; font-size: 1.3rem; }
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 1rem; margin-bottom: 1rem; }
.stats .card { margin: 0; }
.stat b { display: block; margin-top: .15rem; font-size: 1.5rem; letter-spacing: -.02em; }
.rank { display: inline-grid; place-items: center; width: 1.6rem; height: 1.6rem; border-radius: 50%; color: var(--muted); font-size: .8rem; }
.rank.r1, .rank.r2, .rank.r3 { color: #1a1300; box-shadow: inset 0 -2px 0 rgba(0, 0, 0, .18); }
.rank.r1 { background: linear-gradient(145deg, #ffe08a, #e6a817); }
.rank.r2 { background: linear-gradient(145deg, #eef1f5, #a9b2bf); }
.rank.r3 { background: linear-gradient(145deg, #f2c29b, #b9733f); }
.leader.mine { background: var(--accent-soft); }
.leaderboard { max-width: 640px; }
.profile { display: flex; gap: 1rem; align-items: center; }
.profile .avatar { width: 3.6rem; height: 3.6rem; font-size: 1.45rem; }
.profile .meta { margin-top: .3rem; }
.account .profile { margin-bottom: 1.2rem; }
.account #rename { margin: 0; }
.account .card > p.muted { margin: -.3rem 0 .4rem; font-size: .9rem; }
.switches + .switches { margin-top: .4rem; padding-top: .4rem; border-top: 1px solid var(--border); }
.switch-row { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: .65rem 0; cursor: pointer; }
.switch-row > span { display: grid; gap: .15rem; }
.switch-row b { font-weight: 600; }
.switch-row small { font-size: .82rem; line-height: 1.4; }
.switch-row.disabled { cursor: default; }
.switch-row.disabled b { color: var(--muted); }
.switch {
  appearance: none; position: relative; flex-shrink: 0; width: 2.6rem; height: 1.5rem; margin: 0; padding: 0; border: none; border-radius: 99px;
  background: var(--border-strong); cursor: pointer; transition: background .2s var(--ease);
}
.switch::after {
  content: ''; position: absolute; top: .2rem; left: .2rem; width: 1.1rem; height: 1.1rem; border-radius: 50%;
  background: #fff; box-shadow: 0 1px 3px rgba(0, 0, 0, .4); transition: transform .2s var(--ease);
}
.switch:checked { background: var(--yes); }
.switch:checked::after { transform: translateX(1.1rem); }
.switch:focus-visible { box-shadow: 0 0 0 3px var(--accent-soft); }
.switch:disabled { opacity: .4; cursor: default; }
.avatar-edit { position: relative; flex-shrink: 0; cursor: pointer; border-radius: 50%; }
.avatar-edit > span:last-of-type {
  position: absolute; right: -2px; bottom: -2px; display: grid; place-items: center; width: 1.45rem; height: 1.45rem; border-radius: 50%;
  background: var(--accent); color: #fff; border: 2px solid var(--card); transition: transform .15s var(--ease);
}
.avatar-edit:hover > span:last-of-type { transform: scale(1.12); }
.avatar-edit.small > span:last-of-type { width: 1.05rem; height: 1.05rem; right: -4px; bottom: -4px; border-width: 1.5px; }
.profile h1 { margin: 0; }
.user.deleted { opacity: .5; }

.actions .menu { min-width: 200px; }
.updates h3.with-icon { gap: .5rem; }
#test-notice .switches { margin-bottom: .8rem; }
.updates p { margin: .6rem 0 0; }
.updates .row { font-size: .9rem; }
.commits { margin: .6rem 0; max-height: 22rem; overflow-y: auto; border-top: 1px solid var(--border); }
.commit { display: flex; align-items: center; justify-content: space-between; gap: .75rem; padding: .6rem .4rem; border-bottom: 1px solid var(--border); font-size: .9rem; }
.commit > div { display: grid; gap: .15rem; min-width: 0; overflow-wrap: anywhere; }
.updates a { color: inherit; text-decoration: none; }
.updates a:hover { text-decoration: underline; }
.updates a.sha { display: inline-flex; align-items: center; gap: .25rem; padding: .1rem .2rem; margin: -.1rem -.2rem; color: var(--accent); }
.commit .btn { flex-shrink: 0; }
.commit:has(.btn:hover), .commit:has(.btn:hover) ~ .commit { background: var(--hover); }
.updates code { font-size: .8em; }
.link-note { display: block; margin-top: .4rem; overflow-wrap: anywhere; }
.menu button.danger { color: var(--no); }
.menu button.danger:hover { background: var(--no-soft); }
.thumb.blank { display: grid; place-items: center; color: var(--muted); background: var(--raised); border: 1px solid var(--border); }
.sides { display: inline-flex; flex-wrap: wrap; align-items: center; gap: .2rem .7rem; white-space: nowrap; }
.card-title .tabs button { padding: .3rem .6rem; font-size: .85rem; }
.edit-links { margin-top: .4rem; }
.title-avatar .avatar { width: 76px; height: 76px; font-size: 1.9rem; }

/* Login */
.auth { max-width: 400px; margin: 3rem auto; padding: 2rem 1.6rem 1.6rem; text-align: center; box-shadow: var(--shadow); }
.auth .muted { margin-bottom: 1.4rem; }
.hero-icon { width: 60px; height: 60px; margin: 0 auto .8rem; display: block; filter: drop-shadow(0 6px 20px rgba(46, 204, 113, .35)); }

/* Dialogs & toast */
dialog {
  width: min(420px, calc(100vw - 2rem)); padding: 0; border: 1px solid var(--border-strong); border-radius: 18px;
  background: var(--card); color: var(--text); box-shadow: 0 24px 60px rgba(0, 0, 0, .55);
  animation: pop .22s var(--ease);
}
dialog::backdrop { background: rgba(5, 7, 10, .65); backdrop-filter: blur(3px); animation: fade-in .2s; }
@keyframes pop { from { opacity: 0; transform: translateY(10px) scale(.97); } }
.dialog { padding: 1.4rem; }
.dialog h3 { font-size: 1.15rem; margin-bottom: .4rem; }
.dialog input { margin: 1rem 0 0; }
dialog.lightbox { width: fit-content; max-width: 92vw; background: transparent; border: none; box-shadow: none; cursor: zoom-out; }
dialog.lightbox img { display: block; max-width: 92vw; max-height: 88vh; border-radius: 14px; }

#toast {
  position: fixed; left: 50%; bottom: calc(1.5rem + env(safe-area-inset-bottom)); z-index: 100;
  display: flex; align-items: center; gap: .6rem; transform: translate(-50%, 1rem); opacity: 0;
  padding: .7rem 1.1rem .7rem .75rem; border-radius: 12px; background: var(--raised); border: 1px solid var(--border-strong);
  font-weight: 600; box-shadow: var(--shadow); transition: .3s var(--ease); pointer-events: none; max-width: calc(100vw - 2rem);
}
#toast.show { transform: translate(-50%, 0); opacity: 1; }
.toast-icon { display: grid; place-items: center; width: 1.4rem; height: 1.4rem; border-radius: 50%; flex-shrink: 0; }
.toast-icon .ico { stroke-width: 3; }
#toast.error .toast-icon { background: var(--no); color: #fff; }
#toast.success .toast-icon { background: var(--yes); color: #04130a; }

@media (hover: none) {
  .comment .icon { opacity: 1; }
  .market-card:hover { transform: none; box-shadow: none; background: var(--card); }
}

@media (max-width: 860px) {
  .bar { padding-bottom: .35rem; gap: .5rem; }
  nav { display: contents; }
  .logo { margin-right: auto; }
  .logo span, .bar .btn span { display: none; }
  .bell-wrap { position: static; }
  .notifications { position: fixed; left: .75rem; right: .75rem; top: 3.6rem; width: auto; }
  .links a { padding: .4rem .65rem; }
  .links { order: 3; width: 100%; margin: 0; overflow-x: auto; scrollbar-width: none; }
  main { padding: 1rem 1rem 3rem; }
  .layout { grid-template-columns: minmax(0, 1fr); grid-template-areas: "head" "aside" "details"; }
  aside { position: static; }
  .chart { height: 220px; }
  .chance { font-size: 2rem; }
  .title h1 { font-size: 1.3rem; }
  .title .btn span { display: none; }
  .title .thumb.large, .title-avatar .avatar { width: 56px; height: 56px; border-radius: 14px; }
  .title-avatar .avatar { border-radius: 50%; font-size: 1.4rem; }
  .edit-links { gap: .3rem .8rem; }
  .title .photo-placeholder { order: 1; width: 2.25rem; height: 2.25rem; border-radius: 9px; }
  .title .photo-placeholder .ico { width: 17px; height: 17px; }
  .title #share { order: 2; }
  .grid { grid-template-columns: minmax(0, 1fr); }
  .toolbar .dropdown { flex: 1; }
}

@media (max-width: 520px) {
  .datetime { grid-template-columns: minmax(0, 1fr); gap: 0; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .live:not(.off) i { animation: live-fade 2s ease-in-out infinite !important; }
}

.page-tabs { margin-bottom: 1rem; }
.card-note { margin: -.4rem 0 .6rem; font-size: .85rem; }
.chart.small { height: 200px; }

.record-card { display: flex; flex-wrap: wrap; align-items: center; gap: 1rem 1.4rem; }
.ring {
  --size: 92px; display: grid; place-content: center; text-align: center; flex-shrink: 0; width: var(--size); height: var(--size); border-radius: 50%;
  background: radial-gradient(closest-side, var(--card) 78%, transparent 80%), conic-gradient(var(--yes) var(--p), rgba(255, 92, 92, .55) 0);
}
.ring.none { background: radial-gradient(closest-side, var(--card) 78%, transparent 80%), var(--border); }
.ring b { font-size: 1.35rem; line-height: 1; font-variant-numeric: tabular-nums; }
.ring small { color: var(--muted); font-size: .75rem; }
.record-main { display: grid; gap: .25rem; flex: 1 1 180px; }
.record { font-size: 2.1rem; letter-spacing: -.02em; line-height: 1.1; font-variant-numeric: tabular-nums; }
.record-main .chips { display: flex; flex-wrap: wrap; gap: .4rem; margin-top: .3rem; }
.chip-tag { display: inline-flex; align-items: center; gap: .3rem; padding: .25rem .6rem; border-radius: 99px; background: var(--raised); border: 1px solid var(--border); color: var(--muted); font-size: .78rem; font-weight: 600; }
.chip-tag.yes { color: var(--yes); background: var(--yes-soft); border-color: transparent; }
.chip-tag.no { color: var(--no); background: var(--no-soft); border-color: transparent; }
.record-numbers { display: flex; gap: 1.4rem; flex: 1 1 260px; justify-content: flex-end; }
.record-numbers div, .facts div { display: grid; gap: .15rem; }
.record-numbers b { font-size: 1.35rem; font-variant-numeric: tabular-nums; }

.highlights { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 150px), 1fr)); gap: .75rem; margin-bottom: 1rem; }
.highlight { display: grid; align-content: start; gap: .2rem; margin: 0; min-width: 0; }
.highlight b { font-size: 1rem; line-height: 1.3; overflow-wrap: anywhere; }
.highlight b a { color: inherit; }
.highlight b a:hover { text-decoration: underline; }
.highlight-icon { display: grid; place-items: center; width: 2rem; height: 2rem; margin-bottom: .35rem; border-radius: 10px; }
.highlight-icon.yes { color: var(--yes); background: var(--yes-soft); }
.highlight-icon.no { color: var(--no); background: var(--no-soft); }
.highlight-icon.accent { color: #8fb6ff; background: var(--accent-soft); }

.stats-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 380px), 1fr)); gap: 1rem; align-items: start; }
.stats-grid .card { margin: 0; }
.stats-grid h3 { margin-bottom: .8rem; }
.best-worst { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: .5rem; margin-bottom: .6rem; }
.best-worst > div { display: flex; gap: .55rem; align-items: flex-start; padding: .6rem .7rem; border-radius: 10px; font-weight: 600; font-size: .9rem; }
.best-worst > div.yes { background: var(--yes-soft); }
.best-worst > div.no { background: var(--no-soft); }
.best-worst span { display: grid; color: var(--text); }
.best-worst small { color: var(--muted); font-weight: 500; font-size: .75rem; }
.best-worst .ico { margin-top: .15rem; flex-shrink: 0; }

.profit-row, .versus { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(60px, 1fr) auto; gap: .8rem; align-items: center; color: inherit; }
.profit-row .who, .versus .who { min-width: 0; overflow-wrap: anywhere; font-size: .9rem; }
.profit-row .right { min-width: 4.8rem; }
.profit-bar { position: relative; height: 8px; border-radius: 99px; background: var(--raised); }
.profit-bar::after { content: ''; position: absolute; left: 50%; top: -3px; bottom: -3px; width: 1px; background: var(--border-strong); }
.profit-bar i { position: absolute; top: 0; bottom: 0; border-radius: 99px; }
.profit-bar.yes i { left: 50%; background: var(--yes); }
.profit-bar.no i { right: 50%; background: var(--no); }
.split { display: flex; height: 8px; border-radius: 99px; overflow: hidden; background: var(--no); }
.split i:first-child { width: var(--w); background: var(--yes); }
.split i:last-child { flex: 1; background: var(--no); }
.versus .right { min-width: 2.6rem; text-align: right; font-variant-numeric: tabular-nums; }
.lean { display: grid; gap: .45rem; margin-bottom: 1rem; }
.lean .split { height: 10px; }
.facts { display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: .9rem 1rem; }
.facts b { font-size: 1.05rem; font-variant-numeric: tabular-nums; }
@media (max-width: 600px) {
  .record-numbers { justify-content: flex-start; }
  .ring { --size: 80px; }
}

.admin-section > .card + .card { margin-top: 1rem; }
.chip small { margin-left: .35rem; color: var(--muted); font-weight: 600; }
.sent-event { padding: .35rem 0 .7rem; }
.sent-event + .sent-event { border-top: 1px solid var(--border); }
.sent-event .row { padding-bottom: .3rem; }
.sent-to { display: grid; gap: .3rem; padding-left: 2.6rem; font-size: .85rem; }
.sent-to > div { display: flex; gap: .45rem; align-items: flex-start; }
.sent-to .ico { flex-shrink: 0; margin-top: .15rem; }
.sent-to span { color: var(--text); }
.sent-to b { font-weight: 600; margin-right: .25rem; }
.sent-to .yes b, .sent-to .yes .ico { color: var(--yes); }
.sent-to .no b, .sent-to .no .ico { color: var(--no); }
.sent-to .muted b, .sent-to .muted .ico { color: var(--muted); }
.sent-to a { color: inherit; }
.sent-to a:hover { text-decoration: underline; }
