/* =====================================================================================================
   UpClose premium finish (21 Nov 2026), loaded after design.css. Tactile buttons, hairline-lit surfaces,
   refined widgets. Light comes from above: every raised surface gets a 1px top highlight and a hairline edge.
   ===================================================================================================== */
:root { --hi:#ffffffcc; --edge:#1412160f; --ease:cubic-bezier(.2,.8,.2,1); --accent-2:#5b7cff; --accent-3:#1f45e6; }
@media (prefers-color-scheme: dark) { :root { --hi:#ffffff14; --edge:#ffffff12; --accent-2:#6e8bff; --accent-3:#2a50f0; } }
::selection { background:color-mix(in srgb, var(--accent) 28%, transparent); }
html { scrollbar-color:color-mix(in srgb, var(--fg) 22%, transparent) transparent; scrollbar-width:thin; }
body { text-rendering:optimizeLegibility; }

/* ---- buttons: lit from above, soft coloured glow, a sheen sweeps across on hover, presses in ---- */
.btn { position:relative; isolation:isolate; overflow:hidden; display:inline-flex; align-items:center; justify-content:center; gap:8px;
  min-height:42px; border:0; border-radius:999px; color:#fff; -webkit-tap-highlight-color:transparent; text-align:center;
  background:linear-gradient(180deg, var(--accent-2) 0%, var(--accent) 55%, var(--accent-3) 100%);
  box-shadow:inset 0 1px 0 #ffffff47, inset 0 -1px 0 #00000026, 0 0 0 1px color-mix(in srgb, var(--accent-3) 80%, #000),
    0 1px 2px #14121626, 0 6px 18px -4px color-mix(in srgb, var(--accent) 55%, transparent);
  transition:transform .18s var(--ease), box-shadow .18s var(--ease), filter .18s; }
.btn::after { content:""; position:absolute; z-index:-1; inset:0; pointer-events:none;
  background:linear-gradient(105deg, transparent 35%, #ffffff40 50%, transparent 65%); transform:translateX(-120%); transition:transform .6s var(--ease); }
.btn:hover { transform:translateY(-1px); filter:brightness(1.05);
  box-shadow:inset 0 1px 0 #ffffff52, inset 0 -1px 0 #00000026, 0 0 0 1px color-mix(in srgb, var(--accent-3) 80%, #000),
    0 2px 4px #1412162e, 0 12px 28px -6px color-mix(in srgb, var(--accent) 60%, transparent); }
.btn:hover::after { transform:translateX(120%); }
.btn:active { transform:scale(.97); filter:brightness(.96); transition-duration:.06s; }
.btn:focus-visible { outline:none; box-shadow:0 0 0 3px var(--bg), 0 0 0 5px var(--accent); }
.btn:disabled, .btn[aria-disabled=true] { filter:grayscale(.5) opacity(.55); transform:none; cursor:not-allowed; }
.btn:disabled::after { display:none; }
.btn.sm { min-height:34px; padding:7px 14px; font-size:.86rem; }
.btn.lg { min-height:52px; padding:15px 28px; font-size:1.03rem; }
/* ghost = a raised paper chip, not a flat outline */
.btn.ghost { color:var(--fg); border:0; background:linear-gradient(180deg, var(--card), color-mix(in srgb, var(--card) 90%, var(--soft)));
  box-shadow:inset 0 1px 0 var(--hi), 0 0 0 1px color-mix(in srgb, var(--fg) 11%, transparent), 0 1px 2px #1412160f; }
.btn.ghost::after { background:linear-gradient(105deg, transparent 35%, color-mix(in srgb, var(--fg) 7%, transparent) 50%, transparent 65%); }
.btn.ghost:hover { filter:none; background:var(--card);
  box-shadow:inset 0 1px 0 var(--hi), 0 0 0 1px color-mix(in srgb, var(--fg) 18%, transparent), 0 8px 18px -8px #14121640; }
.btn.danger-btn { background:linear-gradient(180deg, #f05252, #dc2626 55%, #b91c1c);
  box-shadow:inset 0 1px 0 #ffffff40, 0 0 0 1px #991b1b, 0 6px 18px -4px #dc262666; }
/* the hero's main call to action is ink: the luxury move (SSENSE, Passes) */
.hero-cta .btn:not(.ghost) { color:var(--bg); background:linear-gradient(180deg, color-mix(in srgb, var(--fg) 80%, var(--bg)), var(--fg));
  box-shadow:inset 0 1px 0 #ffffff2e, 0 0 0 1px var(--fg), 0 12px 28px -10px #141216aa; }
.hero-cta .btn:not(.ghost)::after { background:linear-gradient(105deg, transparent 35%, color-mix(in srgb, var(--bg) 32%, transparent) 50%, transparent 65%); }
.link { font-weight:600; text-decoration:none; background:linear-gradient(currentColor, currentColor) 0 100% / 0 1.5px no-repeat;
  transition:background-size .25s var(--ease); }
.link:hover { background-size:100% 1.5px; }

/* ---- surfaces: hairline edge + top highlight ---- */
.card, .post, .item, .stat, .results, .top-row, .poll, .paywall, .notice {
  box-shadow:inset 0 1px 0 var(--hi), 0 0 0 1px var(--edge), var(--shadow); }
.card { overflow:hidden; }
.card:hover { box-shadow:inset 0 1px 0 var(--hi), 0 0 0 1px var(--edge), var(--shadow-lift); }
.card-art { position:relative; overflow:hidden; }
.card-art::after { content:""; position:absolute; inset:0; pointer-events:none;
  background:linear-gradient(180deg, #ffffff1f, transparent 40%), radial-gradient(120% 60% at 50% 120%, #0000001a, transparent 70%); }
.card-art .thumb { transition:transform .5s var(--ease); } .card:hover .card-art .thumb { transform:scale(1.06) translateY(-2px); }
.top-row.mine, .item.unread { box-shadow:inset 0 1px 0 var(--hi), 0 0 0 1.5px var(--accent), var(--shadow); }
.paywall { position:relative; overflow:hidden; isolation:isolate; }
.paywall::before { content:""; position:absolute; z-index:-1; left:-10%; right:-10%; bottom:-30%; height:80%; pointer-events:none;
  background:radial-gradient(50% 60% at 50% 100%, color-mix(in srgb, var(--accent) 18%, transparent), transparent 70%); }
.notice { position:relative; padding-left:20px; background:linear-gradient(90deg, color-mix(in srgb, var(--accent) 10%, var(--card)), var(--card) 65%); }
.notice::before { content:""; position:absolute; left:0; top:10px; bottom:10px; width:3px; border-radius:3px; background:var(--accent); }

/* ---- stats: editorial numbers with small caps labels ---- */
.stat { padding:18px 20px; gap:8px; position:relative; overflow:hidden; }
.stat::after { content:""; position:absolute; right:-30px; top:-30px; width:110px; height:110px; border-radius:50%; pointer-events:none;
  background:radial-gradient(circle, color-mix(in srgb, var(--accent) 14%, transparent), transparent 70%); }
.stat > span:first-child { font-size:.7rem; font-weight:600; text-transform:uppercase; letter-spacing:.1em; }
.stat strong, .big strong { font-family:var(--serif); font-weight:400; font-size:2.3rem; line-height:1; letter-spacing:-.02em; font-variant-numeric:tabular-nums lining-nums; }

/* ---- inputs ---- */
input:not([type=checkbox]):not([type=radio]):not([type=range]):not([type=color]):not([type=file]), select, textarea {
  box-shadow:inset 0 1px 2px #1412160d; transition:border-color .15s, box-shadow .15s; }
input:not([type=checkbox]):not([type=radio]):hover, select:hover, textarea:hover { border-color:color-mix(in srgb, var(--fg) 22%, var(--line)); }
input:focus, select:focus, textarea:focus { border-color:var(--accent); box-shadow:0 0 0 4px color-mix(in srgb, var(--accent) 16%, transparent); }
::placeholder { color:color-mix(in srgb, var(--muted) 75%, transparent); }
select { appearance:none; -webkit-appearance:none; padding-right:38px; cursor:pointer; background-repeat:no-repeat; background-position:right 14px center;
  background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' fill='none' stroke='%238a8590' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M1 1.5l5 5 5-5'/%3E%3C/svg%3E"); }
input[type=checkbox], input[type=radio] { accent-color:var(--accent); width:18px; height:18px; cursor:pointer; }
input[type=range] { accent-color:var(--accent); }
/* a checkbox with class "switch" becomes an iOS-style toggle */
input[type=checkbox].switch { appearance:none; -webkit-appearance:none; width:42px; height:26px; border-radius:999px; flex:none; position:relative;
  background:color-mix(in srgb, var(--fg) 16%, transparent); box-shadow:inset 0 1px 2px #0000001f; transition:background .2s var(--ease); }
input[type=checkbox].switch::after { content:""; position:absolute; top:3px; left:3px; width:20px; height:20px; border-radius:50%;
  background:#fff; box-shadow:0 1px 3px #0000003d; transition:transform .2s var(--ease); }
input[type=checkbox].switch:checked { background:var(--accent); }
input[type=checkbox].switch:checked::after { transform:translateX(16px); }

/* ---- tags, badges, live ---- */
.tag { box-shadow:inset 0 0 0 1px var(--edge); }
.tag.live { background:color-mix(in srgb, #22c55e 16%, var(--card)); color:color-mix(in srgb, #15803d 85%, var(--fg)); }
.tag.live::before { content:""; display:inline-block; width:6px; height:6px; border-radius:50%; background:#22c55e; margin-right:6px; vertical-align:1px; animation:pulse 1.8s infinite; }
.badge { background:linear-gradient(180deg, #fde68a, #fbbf24); color:#5b3208; box-shadow:inset 0 1px 0 #ffffff80, 0 0 0 1px #d9770655; font-weight:700; }
@keyframes pulse { 0% { box-shadow:0 0 0 0 #22c55e88; } 70% { box-shadow:0 0 0 6px #22c55e00; } 100% { box-shadow:0 0 0 0 #22c55e00; } }
.live-banner { text-decoration:none; color:inherit; background:linear-gradient(90deg, color-mix(in srgb, #ef4444 10%, var(--card)), var(--card) 70%);
  transition:transform .18s var(--ease); }
.live-banner:hover { transform:translateY(-1px); }

/* ---- meters, bars, polls ---- */
.meter, .bar { height:10px; border-radius:999px; background:color-mix(in srgb, var(--fg) 8%, transparent); box-shadow:inset 0 1px 2px #0000001a; }
.meter span { border-radius:999px; background:linear-gradient(90deg, var(--accent), #8b5cf6); box-shadow:inset 0 1px 0 #ffffff55;
  transform-origin:left; animation:grow .9s var(--ease) both; }
@keyframes grow { from { transform:scaleX(0); } }
.poll { padding:18px; gap:10px; }
.poll-opt { border:0; padding:12px 16px; border-radius:14px; background:var(--soft); box-shadow:inset 0 0 0 1px var(--edge); font-weight:500;
  transition:transform .15s var(--ease), box-shadow .15s; }
.poll-opt:not(:disabled):hover { transform:translateY(-1px); box-shadow:inset 0 0 0 1px color-mix(in srgb, var(--accent) 40%, transparent), var(--shadow); }
.poll-opt .fill { background:linear-gradient(90deg, color-mix(in srgb, var(--accent) 22%, transparent), color-mix(in srgb, #8b5cf6 18%, transparent));
  transform-origin:left; animation:grow .9s var(--ease) both; }
.poll-opt.mine { box-shadow:inset 0 0 0 1.5px var(--accent); }
.poll-opt.mine .label::after { content:" ✓"; color:var(--accent-fg); }
.poll-opt .pct { font-variant-numeric:tabular-nums; font-weight:600; }
.swatch { transition:transform .15s var(--ease); } .swatch.big:hover { transform:scale(1.08); }
.swatch.chosen { box-shadow:0 0 0 2px var(--bg), 0 0 0 4px var(--accent); }

/* ---- messages ---- */
.msg.me { background:linear-gradient(180deg, var(--accent-2), var(--accent)); color:#fff; box-shadow:inset 0 1px 0 #ffffff33, 0 6px 16px -8px var(--accent); }

/* ---- toasts: frosted ink pills with a status dot ---- */
.toast { position:relative; padding:13px 18px 13px 40px; border-radius:16px; font-weight:500; color:var(--bg);
  background:color-mix(in srgb, var(--fg) 88%, transparent); backdrop-filter:blur(16px) saturate(1.4); -webkit-backdrop-filter:blur(16px) saturate(1.4);
  box-shadow:inset 0 1px 0 #ffffff1f, 0 0 0 1px #0000001a, 0 14px 40px -10px #0006; animation:toast-in .32s var(--ease); }
.toast::before { content:""; position:absolute; left:16px; top:50%; width:10px; height:10px; margin-top:-5px; border-radius:50%; background:#22c55e; box-shadow:0 0 0 3px #22c55e33; }
.toast.error { background:color-mix(in srgb, #b3261e 94%, transparent); color:#fff; } .toast.error::before { background:#fff; box-shadow:0 0 0 3px #ffffff33; }
@keyframes toast-in { from { opacity:0; transform:translateY(12px) scale(.96); } }

/* ---- top bar: alerts and account as raised round buttons ---- */
.topbar nav a.bell, .topbar nav a.acct { display:inline-grid; place-items:center; min-width:38px; height:38px; padding:0 12px; border-radius:999px; text-decoration:none;
  color:var(--fg); background:var(--card); box-shadow:inset 0 1px 0 var(--hi), 0 0 0 1px var(--edge), 0 1px 2px #1412160f; transition:transform .15s var(--ease); }
.topbar nav a.bell:hover, .topbar nav a.acct:hover { transform:translateY(-1px); }

/* ---- phone tab bar: line icons, a lit pill behind the active tab ---- */
.tabbar svg { width:22px; height:22px; fill:none; stroke:currentColor; stroke-width:1.7; stroke-linecap:round; stroke-linejoin:round; }
@media (max-width:720px) {
  .tabbar { padding-top:8px; box-shadow:0 -1px 0 var(--edge), 0 -10px 30px -12px #14121626; isolation:isolate; }
  .tabbar > a, .tabbar summary { position:relative; gap:3px; transition:color .2s, transform .1s; }
  .tabbar > a::before { content:""; position:absolute; z-index:-1; top:-3px; left:50%; width:56px; height:30px; margin-left:-28px; border-radius:999px;
    background:color-mix(in srgb, var(--accent) 15%, transparent); opacity:0; transform:scale(.6); transition:opacity .25s var(--ease), transform .25s var(--ease); }
  .tabbar > a.active::before { opacity:1; transform:none; }
  .tabbar > a.active svg { stroke-width:2.1; }
  .tabbar span { font-size:.68rem; font-weight:600; letter-spacing:.01em; }
  .tabbar > a:active, .tabbar summary:active { transform:scale(.94); }
  .more-sheet { padding:6px; background:color-mix(in srgb, var(--card) 86%, transparent);
    backdrop-filter:blur(20px) saturate(1.5); -webkit-backdrop-filter:blur(20px) saturate(1.5);
    box-shadow:inset 0 1px 0 var(--hi), 0 0 0 1px var(--edge), var(--shadow-lift); animation:sheet-in .28s var(--ease); }
  .more-sheet a { font-weight:500; }
  .more-sheet a:hover { background:color-mix(in srgb, var(--fg) 6%, transparent); }
  .btn { min-height:44px; } .btn.sm { min-height:36px; }
}
@keyframes sheet-in { from { opacity:0; transform:translateY(10px) scale(.98); } }

/* ---- creator portraits ---- */
.avatar.has-photo { overflow:hidden; padding:0; background:var(--c); }
.avatar.has-photo img { width:100%; height:100%; object-fit:cover; object-position:50% 25%; display:block; border-radius:50%; }

/* ---- page entrance: content rises in, staggered ---- */
#app.enter > * { animation:rise .45s var(--ease) both; }
#app.enter > *:nth-child(2) { animation-delay:.04s; } #app.enter > *:nth-child(3) { animation-delay:.08s; } #app.enter > *:nth-child(n+4) { animation-delay:.12s; }
@keyframes rise { from { opacity:0; transform:translateY(8px); } }
@media (prefers-reduced-motion: reduce) { * { transition:none !important; animation:none !important; } }
