/* KN — Twitter 2019 colours; iOS on phones, iPadOS on tablets, macOS on desktops. */
:root {
  --nav: 84px; --col: 640px; --side: 340px; --fs: 15px; --lh: 20px; --pad: 14px; --bar: 52px; --tab: 62px;
  --st: env(safe-area-inset-top, 0px); --sb: env(safe-area-inset-bottom, 0px);
  --ease: cubic-bezier(.25, .8, .25, 1); --spring: cubic-bezier(.3, 1.35, .55, 1);
  --ac: #1d9bf0; --on: #fff; --ac-soft: color-mix(in srgb, var(--ac) 14%, transparent);
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}
html[data-size="s"] { --fs: 14px; --lh: 19px; }
html[data-size="l"] { --fs: 17px; --lh: 23px; }
html[data-theme="light"] { --bg: #f2f5f7; --surf: #fff; --surf2: #e9eef1; --fg: #0f1419; --fg2: #536471; --fg3: #8b98a5; --line: #e3e9ec; --shadow: rgba(83, 100, 113, .16); --glass: rgba(246, 248, 250, .86); --press: rgba(15, 20, 25, .05); color-scheme: light; }
html[data-theme="dim"] { --bg: #15202b; --surf: #1c2a38; --surf2: #263544; --fg: #f7f9f9; --fg2: #8b98a5; --fg3: #6e7d8a; --line: #2c3b4a; --shadow: rgba(0, 0, 0, .35); --glass: rgba(21, 32, 43, .86); --press: rgba(255, 255, 255, .05); color-scheme: dark; }
html[data-theme="black"] { --bg: #000; --surf: #16181c; --surf2: #22252a; --fg: #e7e9ea; --fg2: #71767b; --fg3: #5b6066; --line: #26292d; --shadow: rgba(0, 0, 0, .6); --glass: rgba(0, 0, 0, .8); --press: rgba(255, 255, 255, .06); color-scheme: dark; }

*, *::before, *::after { box-sizing: border-box; }
html { background: var(--bg); -webkit-text-size-adjust: 100%; text-size-adjust: 100%; overflow-x: clip; }
body { margin: 0; background: var(--bg); color: var(--fg); font-size: var(--fs); line-height: var(--lh); -webkit-font-smoothing: antialiased; overflow-x: clip; -webkit-tap-highlight-color: transparent; overscroll-behavior-y: none; }
a { color: inherit; text-decoration: none; }
a, button, [role="button"], .c, label { touch-action: manipulation; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
input { font: inherit; color: inherit; }
img { display: block; }
svg { display: block; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }
h1, h2, h3, p { margin: 0; }
[hidden] { display: none !important; }
:focus-visible { outline: 2px solid var(--ac); outline-offset: 2px; border-radius: 10px; }

/* ---------------------------------------------------------------- frame */
.app { display: flex; justify-content: center; min-height: 100dvh; }
.side-nav { width: var(--nav); flex: 0 0 auto; }
.side-nav-in { position: sticky; top: 0; height: 100dvh; display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 10px 12px 20px; }
.col { width: 100%; max-width: var(--col); min-width: 0; min-height: 100dvh; outline: none; position: relative; }
.side { width: var(--side); flex: 0 0 auto; display: none; margin-left: 20px; }
.side-in { position: sticky; top: 0; padding: 12px 0 24px; max-height: 100dvh; overflow-y: auto; scrollbar-width: none; }
.side-in::-webkit-scrollbar { display: none; }
.side-in > * + *, #glance > * + * { margin-top: 14px; }
@media (min-width: 1100px) { .side { display: block; } }
@media (min-width: 1240px) { :root { --nav: 236px; } .side-nav-in { align-items: stretch; } }
@media (max-width: 699px) { .side-nav { display: none; } .col { padding-bottom: calc(var(--tab) + var(--sb) + 34px); } }

.brand { display: flex; align-items: center; gap: 10px; height: 52px; padding: 0 12px; margin-bottom: 6px; }
.brand .mark { width: 34px; height: 34px; color: var(--ac); stroke-width: 0; }
.brand span { display: none; font-size: 24px; font-weight: 800; letter-spacing: -.03em; }
.nav-links { display: flex; flex-direction: column; gap: 2px; }
.nl { display: flex; align-items: center; gap: 14px; height: 46px; padding: 0 12px; border-radius: 12px; font-size: 16px; font-weight: 500; color: var(--fg); }
.nl svg { width: 24px; height: 24px; flex: 0 0 auto; }
.nl span { display: none; }
.nl:hover { background: var(--press); }
.nl[aria-current] { background: var(--ac-soft); color: var(--ac); font-weight: 700; }
@media (min-width: 1240px) { .brand span, .nl span { display: inline; } }

/* ---------------------------------------------------------------- top bar */
.bar { position: sticky; top: 0; z-index: 30; padding-top: var(--st); background: var(--glass); -webkit-backdrop-filter: blur(22px) saturate(180%); backdrop-filter: blur(22px) saturate(180%); }
.bar::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 1px; background: var(--line); }
.bar-row { overflow: clip; position: relative; display: grid; grid-template-columns: minmax(88px, 1fr) auto minmax(88px, 1fr); align-items: center; height: var(--bar); padding: 0 6px; }
.bar-l, .bar-r, .bar-title { transition: opacity .18s var(--ease), transform .22s var(--ease); }
.bar-l, .bar-r { display: flex; align-items: center; min-width: max-content; }
.bar-r { justify-content: flex-end; }
.bar-title { text-align: center; font-size: 17px; font-weight: 700; letter-spacing: -.01em; white-space: nowrap; }
.bar-title.brandname { font-size: 22px; font-weight: 800; letter-spacing: -.03em; }
.icon { width: 42px; height: 42px; border-radius: 50%; display: grid; place-items: center; color: var(--fg); }
.icon:active { background: var(--press); transform: scale(.92); }
.icon svg { width: 21px; height: 21px; }
.icon.spin svg { animation: spin .7s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.mark-btn { color: var(--ac); }
.mark-btn svg { width: 30px; height: 30px; stroke-width: 0; }
@media (min-width: 700px) { .mark-btn { display: none; } }
.back { display: flex; align-items: center; gap: 2px; color: var(--ac); font-size: 16px; height: 42px; padding: 0 8px 0 4px; white-space: nowrap; }
.back svg { width: 22px; height: 22px; stroke-width: 2.4; }
/* the title bar becomes the search field */
.bar-search { position: absolute; inset: 0 8px; display: flex; align-items: center; gap: 4px; opacity: 0; pointer-events: none; transform: translateX(28px) scaleX(.72); transform-origin: right center; transition: opacity .2s var(--ease), transform .28s var(--spring); }
.bar-search label { flex: 1; min-width: 0; display: flex; align-items: center; gap: 8px; height: 38px; padding: 0 12px; border-radius: 12px; background: var(--surf2); color: var(--fg2); }
.bar-search svg { width: 17px; height: 17px; flex: 0 0 auto; }
.bar-search input { flex: 1; min-width: 0; height: 100%; border: 0; outline: 0; background: none; font-size: 16px; }
.bar-search input::-webkit-search-cancel-button { -webkit-appearance: none; }
.bar-search button { color: var(--ac); font-size: 16px; padding: 0 8px; height: 38px; }
.bar.searching .bar-search { opacity: 1; pointer-events: auto; transform: none; }
.bar.searching .bar-l, .bar.searching .bar-r, .bar.searching .bar-title { opacity: 0; transform: scale(.94); pointer-events: none; }

/* subsection headings: centred capsules */
.tabs-top { position: relative; display: flex; justify-content: safe center; gap: 4px; padding: 0 10px 9px; overflow-x: auto; scrollbar-width: none; }
.tabs-top::-webkit-scrollbar { display: none; }
.tabs-top:empty { display: none; }
.tabs-top a { flex: 0 0 auto; display: flex; align-items: center; height: 34px; padding: 0 14px; border-radius: 99px; color: var(--fg2); font-size: 14.5px; font-weight: 600; white-space: nowrap; }
.tabs-top a:active { background: var(--press); }
.tabs-top a[aria-current] { background: var(--fg); color: var(--bg); }

.pill { position: sticky; top: calc(var(--bar-h, 96px) + 10px); z-index: 25; display: flex; align-items: center; gap: 6px; margin: 10px auto -48px; height: 38px; padding: 0 18px 0 14px; border-radius: 99px; background: var(--ac); color: var(--on); font-weight: 700; font-size: 14px; box-shadow: 0 6px 18px var(--shadow); animation: pop .3s var(--spring); }
.pill svg { width: 17px; height: 17px; stroke-width: 2.6; }
@keyframes pop { from { transform: translateY(-12px) scale(.9); opacity: 0; } }

/* ---------------------------------------------------------------- cards */
.list { padding: 12px var(--pad) 0; perspective: 1200px; }
.c { display: block; margin: 0 0 10px; padding: 14px 16px; border-radius: 22px; background: var(--surf); box-shadow: 0 1px 2px var(--shadow); cursor: pointer; transition: transform .16s var(--ease), box-shadow .2s var(--ease); }
.c:active { transform: scale(.985); }
.c.open { cursor: default; transform: none; box-shadow: 0 10px 30px -12px var(--shadow), 0 0 0 1.5px var(--ac-soft); }
.c.fresh { animation: fresh .55s var(--spring); }
@keyframes fresh { from { opacity: 0; transform: rotateX(-18deg) translateY(-14px) scale(.96); } }
.ch { display: flex; align-items: center; gap: 8px; min-width: 0; height: 24px; color: var(--fg2); font-size: 13.5px; white-space: nowrap; }
.av { width: 24px; height: 24px; border-radius: 7px; flex: 0 0 auto; background: var(--surf2); object-fit: cover; }
.av.lg { width: 40px; height: 40px; border-radius: 12px; }
.cn { font-weight: 600; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.ct { margin-left: auto; flex: 0 0 auto; color: var(--fg3); font-variant-numeric: tabular-nums; }
.hot { flex: 0 0 auto; display: inline-flex; align-items: center; gap: 5px; color: var(--ac); font-weight: 700; font-size: 12.5px; }
.hot::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; box-shadow: 0 0 0 3px var(--ac-soft); }
.cx { margin-top: 8px; font-size: calc(var(--fs) + 1.5px); line-height: calc(var(--lh) + 2px); font-weight: 600; letter-spacing: -.01em; overflow-wrap: anywhere; min-height: calc(3 * (var(--lh) + 2px)); }
@media (min-width: 700px) { .cx { min-height: calc(2 * (var(--lh) + 2px)); } }
.c:has(.cf) .cx { min-height: calc(2 * (var(--lh) + 2px)); }
.c.k4 .cx { font-weight: 400; min-height: 0; display: -webkit-box; -webkit-line-clamp: 6; -webkit-box-orient: vertical; overflow: hidden; }
.c.open .cx { min-height: 0; -webkit-line-clamp: unset; }
.cf { display: flex; align-items: center; gap: 8px; height: 26px; margin-top: 10px; color: var(--fg2); font-size: 13px; overflow: hidden; white-space: nowrap; }
.cf > span:last-child:not(.chip) { overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.chip { display: inline-flex; align-items: center; height: 26px; padding: 0 10px; border-radius: 9px; background: var(--surf2); color: var(--fg); font-size: 12.5px; font-weight: 600; white-space: nowrap; flex: 0 0 auto; }
.chip.amt { background: var(--fg); color: var(--bg); font-weight: 800; font-variant-numeric: tabular-nums; }
.chip.acc { background: var(--ac-soft); color: var(--ac); }
.stat { display: inline-flex; align-items: center; gap: 5px; font-variant-numeric: tabular-nums; }
.stat svg { width: 15px; height: 15px; }
.ctx { color: var(--fg2); font-size: 13px; margin-top: 6px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
/* smooth expand */
.ce { display: grid; grid-template-rows: 0fr; transition: grid-template-rows .26s var(--ease); }
.ce-in { overflow: hidden; min-height: 0; opacity: 0; transition: opacity .2s var(--ease); }
.c.open .ce { grid-template-rows: 1fr; }
.c.open .ce-in { opacity: 1; }
.ce-in > :first-child { margin-top: 12px; }
.ce p { margin-bottom: 12px; color: var(--fg2); overflow-wrap: anywhere; }
.ce p.sum, .ce p.body { color: var(--fg); line-height: calc(var(--lh) + 2px); padding: 12px 14px; border-radius: 14px; background: var(--bg); }
.sk { display: block; }
.sk i { display: block; height: 10px; margin: 6px 0 10px; border-radius: 5px; background: var(--surf2); animation: shimmer 1.1s ease-in-out infinite alternate; }
@keyframes shimmer { to { opacity: .4; } }
.row-b { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.row-b small { color: var(--fg2); font-size: 13px; }
.read, .lk { display: inline-flex; align-items: center; gap: 7px; height: 36px; padding: 0 16px; border-radius: 99px; font-weight: 700; font-size: 14px; white-space: nowrap; }
.read { background: var(--fg); color: var(--bg); }
.lk { background: var(--surf2); color: var(--fg); }
.lk.p { background: var(--ac); color: #fff; }
.read:active, .lk:active { transform: scale(.95); }
.read svg { width: 15px; height: 15px; stroke-width: 2.3; }
html[data-compact="1"] .cf { display: none; }
html[data-compact="1"] .cx, html[data-compact="1"] .c:has(.cf) .cx { min-height: 0; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
html[data-compact="1"] .c { padding: 11px 14px; margin-bottom: 7px; border-radius: 18px; }

/* expandable rows: programs and directory */
.xh { display: flex; align-items: center; gap: 12px; min-width: 0; }
.xt { flex: 1; min-width: 0; }
.xt b, .xt small { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.xt b { font-size: calc(var(--fs) + 1px); font-weight: 650; }
.xt small { color: var(--fg2); font-size: 13px; margin-top: 1px; }
.xh > svg { width: 16px; height: 16px; color: var(--fg3); stroke-width: 2.4; flex: 0 0 auto; transition: transform .25s var(--ease); }
.c.open .xh > svg { transform: rotate(90deg); }
.kv { display: grid; grid-template-columns: auto 1fr; gap: 6px 14px; margin-bottom: 12px; font-size: 14px; }
.kv dt { color: var(--fg2); } .kv dd { margin: 0; }
.chips-w { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 12px; }

/* headings between groups: centred, clearly not a card */
.sep, .label { display: flex; justify-content: center; align-items: center; height: 44px; margin: 2px 0 8px; }
.sep span, .label span { display: inline-flex; align-items: center; gap: 6px; height: 26px; padding: 0 12px; border-radius: 99px; background: var(--surf2); color: var(--fg2); font-size: 12px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; white-space: nowrap; }
.sep b { color: var(--fg); font-weight: 800; }

/* equal-size tiles for filters and categories */
.cats { display: grid; grid-auto-flow: column; grid-auto-columns: 104px; gap: 8px; justify-content: safe center; overflow-x: auto; scrollbar-width: none; padding: 12px var(--pad) 2px; }
.cats::-webkit-scrollbar { display: none; }
.cat { height: 58px; border-radius: 16px; background: var(--surf); box-shadow: 0 1px 2px var(--shadow); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1px; font-size: 13px; font-weight: 650; white-space: nowrap; transition: transform .15s var(--ease); }
.cat small { font-size: 11.5px; font-weight: 500; color: var(--fg2); font-variant-numeric: tabular-nums; }
.cat:active { transform: scale(.94); }
.cat[aria-pressed="true"], .cat[aria-current] { background: var(--fg); color: var(--bg); }
.cat[aria-pressed="true"] small, .cat[aria-current] small { color: inherit; opacity: .7; }

/* slow ticker (terminal tape) */
.tick { overflow: hidden; margin-top: 12px; height: 38px; background: var(--surf); border-block: 1px solid var(--line); -webkit-mask-image: linear-gradient(90deg, transparent, #000 28px, #000 calc(100% - 28px), transparent); mask-image: linear-gradient(90deg, transparent, #000 28px, #000 calc(100% - 28px), transparent); }
.tick-in { display: flex; width: max-content; height: 100%; animation: tick var(--d, 80s) linear infinite; }
.tick:hover .tick-in, .tick:active .tick-in { animation-play-state: paused; }
@keyframes tick { to { transform: translateX(-50%); } }
.tk { display: inline-flex; align-items: center; gap: 7px; height: 100%; padding: 0 16px; font-size: 13px; white-space: nowrap; color: var(--fg2); font-variant-numeric: tabular-nums; }
.tk b { color: var(--fg); font-weight: 700; }
.tk i { font-style: normal; color: #00ba7c; font-weight: 700; }
.tk::after { content: ""; width: 4px; height: 4px; border-radius: 50%; background: var(--line); margin-left: 16px; }

.box { margin: 12px var(--pad) 0; border-radius: 18px; background: var(--surf); box-shadow: 0 1px 2px var(--shadow); overflow: hidden; }
.box > summary { list-style: none; display: flex; align-items: center; gap: 10px; padding: 13px 16px; cursor: pointer; font-weight: 650; }
.box > summary::-webkit-details-marker { display: none; }
.box > summary span { margin-left: auto; color: var(--fg2); font-weight: 500; font-size: 13.5px; }
.box > summary svg { width: 16px; height: 16px; color: var(--fg3); transition: transform .25s var(--ease); }
.box[open] > summary svg { transform: rotate(90deg); }
.box ol { margin: 0; padding: 0 16px 12px 36px; }
.box li { padding: 4px 0; }
.box .more { display: block; padding: 0 16px 14px; color: var(--ac); font-weight: 600; }

.empty { padding: 64px 32px; text-align: center; color: var(--fg2); }
.empty b { display: block; color: var(--fg); font-size: 20px; font-weight: 800; margin-bottom: 6px; }
.end { padding: 18px var(--pad) 30px; text-align: center; color: var(--fg3); font-size: 13.5px; }
.sentinel { height: 1px; }
.skel { height: 112px; margin-bottom: 10px; border-radius: 22px; background: var(--surf); animation: shimmer 1.2s ease-in-out infinite alternate; }

/* ---------------------------------------------------------------- Today: swipe deck */
.tw { display: flex; flex-direction: column; align-items: center; padding: 10px 18px 0; -webkit-user-select: none; user-select: none; }
.tn { height: 22px; color: var(--fg2); font-size: 13px; font-weight: 600; font-variant-numeric: tabular-nums; }
.stack { position: relative; width: min(100%, 400px); height: clamp(290px, calc(100dvh - var(--bar-h, 96px) - 276px), 540px); margin: 8px 0 44px; perspective: 1400px; }
.tc { position: absolute; inset: 0; border-radius: 30px; touch-action: pan-y; cursor: grab; will-change: transform; transform-origin: 50% 100%; transition: transform .38s var(--spring), opacity .3s var(--ease); z-index: 3; animation: tcin .35s var(--ease); }
@keyframes tcin { from { opacity: 0; } }
.tc[data-i="1"] { transform: translateY(12px) scale(.94); z-index: 2; }
.tc[data-i="2"] { transform: translateY(24px) scale(.88); z-index: 1; }
.tc[data-i="1"] .tf > *:not(.viz), .tc[data-i="2"] .tf > *:not(.viz) { opacity: 0; }
.tc.drag { transition: none; cursor: grabbing; }
.tc.out { pointer-events: none; z-index: 4; transition: transform .34s var(--ease), opacity .3s var(--ease); }
.tc-in { position: absolute; inset: 0; transform-style: preserve-3d; transition: transform .55s var(--spring); }
.tc.flip .tc-in { transform: rotateY(180deg); }
.tf, .tb { position: absolute; inset: 0; border-radius: 30px; overflow: hidden; -webkit-backface-visibility: hidden; backface-visibility: hidden; display: flex; flex-direction: column; padding: 20px; box-shadow: 0 18px 40px -18px var(--shadow), 0 2px 6px var(--shadow); }
.tf { color: #fff; background: var(--g); }
.tf .viz { position: absolute; inset: 0; width: 100%; height: 100%; stroke-width: 0; -webkit-mask-image: linear-gradient(180deg, transparent 56px, #000 130px, #000 55%, transparent 82%); mask-image: linear-gradient(180deg, transparent 56px, #000 130px, #000 55%, transparent 82%); }
.tf::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, transparent 35%, rgba(0, 0, 0, .46)); pointer-events: none; }
.tf > *:not(.viz) { position: relative; z-index: 1; transition: opacity .25s; }
.tf-top { display: flex; align-items: center; gap: 8px; font-size: 13.5px; font-weight: 650; min-width: 0; white-space: nowrap; }
.tf-top img { width: 26px; height: 26px; border-radius: 8px; background: rgba(255, 255, 255, .92); }
.tf-top span:first-of-type { overflow: hidden; text-overflow: ellipsis; }
.tf-top .t { opacity: .8; font-weight: 500; margin-left: auto; }
.tf-hot { align-self: flex-start; margin-top: 12px; padding: 4px 10px; border-radius: 99px; background: rgba(255, 255, 255, .22); font-size: 12px; font-weight: 700; }
.tf-x { margin-top: auto; font-size: clamp(20px, 5.6vw, 25px); line-height: 1.22; font-weight: 800; letter-spacing: -.02em; display: -webkit-box; -webkit-line-clamp: 6; -webkit-box-orient: vertical; overflow: hidden; text-shadow: 0 1px 3px rgba(0, 0, 0, .3); }
.tf-hint { margin-top: 12px; font-size: 12px; font-weight: 600; opacity: .72; }
.stamp { position: absolute !important; top: 64px; padding: 6px 14px; border: 3px solid #fff; border-radius: 12px; font-size: 20px; font-weight: 900; letter-spacing: .08em; text-transform: uppercase; opacity: 0; }
.stamp.l { right: 20px; transform: rotate(12deg); opacity: var(--sl, 0); }
.stamp.r { left: 20px; transform: rotate(-12deg); opacity: var(--sr, 0); }
.tb { transform: rotateY(180deg); background: var(--surf); color: var(--fg); }
.tb-q { font-size: 17px; line-height: 22px; font-weight: 750; letter-spacing: -.01em; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.tb-s { margin-top: 12px; flex: 1; min-height: 0; overflow: hidden; color: var(--fg); font-size: 15px; line-height: 21px; display: -webkit-box; -webkit-line-clamp: 9; -webkit-box-orient: vertical; }
.tb-a { margin-top: 12px; display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.tb-a small { color: var(--fg2); font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tc-empty { position: absolute; inset: 0; border-radius: 30px; border: 2px dashed var(--line); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; padding: 24px; text-align: center; color: var(--fg2); }
.tc-empty svg { width: 54px; height: 54px; color: var(--ac); stroke-width: 0; }
.tc-empty b { color: var(--fg); font-size: 20px; font-weight: 800; }
.tc-empty .lk { margin-top: 8px; }
.ta { display: flex; align-items: center; justify-content: center; gap: 16px; height: 64px; }
.ta button { width: 46px; height: 46px; border-radius: 50%; display: grid; place-items: center; background: var(--surf); color: var(--fg2); box-shadow: 0 2px 8px var(--shadow); transition: transform .15s var(--spring); }
.ta button.big { width: 62px; height: 62px; color: var(--fg); }
.ta button.big.save { background: var(--ac); color: #fff; }
.ta button:active { transform: scale(.86); }
.ta button:disabled { opacity: .35; }
.ta svg { width: 22px; height: 22px; stroke-width: 2.2; }
.ta .big svg { width: 26px; height: 26px; }
.th { color: var(--fg3); font-size: 12px; text-align: center; padding: 4px 0 0; }
@media (hover: none) { .th { display: none; } }

/* ---------------------------------------------------------------- directory: profile of the day */
.potd { position: relative; margin: 12px var(--pad) 0; padding: 20px; border-radius: 28px; color: #fff; background: linear-gradient(145deg, #1d9bf0, #7856ff 70%, #f91880 130%); box-shadow: 0 20px 44px -22px #1d9bf0; overflow: hidden; animation: potd .7s var(--spring); }
@keyframes potd { from { opacity: 0; transform: perspective(900px) rotateX(14deg) translateY(16px); } }
.potd::before { content: ""; position: absolute; width: 260px; height: 260px; right: -80px; top: -110px; border-radius: 50%; background: rgba(255, 255, 255, .13); }
.potd > * { position: relative; }
.potd-k { font-size: 11.5px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; opacity: .85; }
.potd-h { display: flex; align-items: center; gap: 12px; margin-top: 12px; }
.potd-h img { width: 48px; height: 48px; border-radius: 14px; background: #fff; }
.potd-h b { display: block; font-size: 22px; line-height: 26px; font-weight: 800; letter-spacing: -.02em; }
.potd-h small { font-size: 13px; opacity: .85; }
.potd p { margin-top: 12px; font-size: 15px; line-height: 21px; }
.potd .chips-w { margin: 12px 0 0; }
.potd .chip { background: rgba(255, 255, 255, .2); color: #fff; }
.potd .row-b { margin-top: 16px; }
.potd .lk { background: rgba(255, 255, 255, .2); color: #fff; }
.potd .lk.p { background: #fff; color: #0f1419; }

/* ---------------------------------------------------------------- right column */
.gcard { background: var(--surf); border-radius: 20px; overflow: hidden; box-shadow: 0 1px 2px var(--shadow); }
.gcard h3 { padding: 14px 16px 6px; font-size: 13px; font-weight: 800; letter-spacing: .05em; text-transform: uppercase; color: var(--fg2); text-align: center; }
.g-item { display: block; width: 100%; text-align: left; padding: 9px 16px; }
.g-item:hover, .g-fund:hover { background: var(--press); }
.g-item small { display: block; color: var(--fg2); font-size: 12.5px; }
.g-item b { display: block; font-weight: 700; }
.g-fund { display: flex; align-items: center; gap: 10px; padding: 9px 16px; cursor: pointer; }
.g-fund .gf { flex: 1; min-width: 0; }
.g-fund .gf b, .g-fund .gf small { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.g-fund .gf small { color: var(--fg2); font-size: 12.5px; }
.gcard .more { display: block; padding: 10px 16px 14px; color: var(--ac); font-weight: 600; text-align: center; }
.legal { text-align: center; font-size: 12.5px; color: var(--fg3); }

/* ---------------------------------------------------------------- settings (inset grouped) */
.set { padding: 4px var(--pad) 32px; }
.grp-t { margin: 20px 0 8px; font-size: 12px; font-weight: 700; color: var(--fg2); text-transform: uppercase; letter-spacing: .05em; text-align: center; }
.grp { background: var(--surf); border-radius: 18px; overflow: hidden; box-shadow: 0 1px 2px var(--shadow); }
.it { display: flex; align-items: center; gap: 12px; min-height: 50px; padding: 8px 16px; position: relative; width: 100%; text-align: left; }
.it + .it::before { content: ""; position: absolute; top: 0; left: 16px; right: 0; height: 1px; background: var(--line); }
a.it:active, button.it:active { background: var(--press); }
.it .lb { flex: 1; min-width: 0; }
.it .lb small { display: block; color: var(--fg2); font-size: 13px; line-height: 17px; margin-top: 1px; }
.it .val { display: inline-flex; align-items: center; gap: 8px; color: var(--fg2); white-space: nowrap; }
.it > svg { width: 16px; height: 16px; color: var(--fg3); stroke-width: 2.4; flex: 0 0 auto; }
.grp-f { margin: 8px 16px 0; font-size: 13px; color: var(--fg2); line-height: 18px; text-align: center; }
.it.st { flex-direction: column; align-items: stretch; gap: 10px; padding: 12px 16px; }
.seg { display: flex; background: var(--surf2); border-radius: 10px; padding: 2px; }
.seg button { flex: 1; height: 32px; padding: 0 10px; border-radius: 8px; font-size: 13.5px; font-weight: 500; white-space: nowrap; }
.seg button[aria-pressed="true"] { background: var(--surf); font-weight: 650; box-shadow: 0 1px 4px var(--shadow); }
html:not([data-theme="light"]) .seg button[aria-pressed="true"] { background: var(--fg3); color: #fff; }
.flag { display: inline-grid; place-items: center; width: 26px; height: 26px; font-size: 21px; line-height: 1; flex: 0 0 auto; font-family: "Apple Color Emoji", "Segoe UI Emoji", "Noto Color Emoji", sans-serif; }
.it.cty > svg { width: 20px; height: 20px; color: var(--ac); stroke-width: 2.6; }
.it.cty[aria-pressed="true"] .lb { font-weight: 650; }
.sw { position: relative; width: 51px; height: 31px; flex: 0 0 auto; }
.sw input { position: absolute; inset: 0; opacity: 0; margin: 0; cursor: pointer; z-index: 1; }
.sw span { position: absolute; inset: 0; border-radius: 99px; background: var(--surf2); transition: background-color .22s var(--ease); }
.sw span::after { content: ""; position: absolute; top: 2px; left: 2px; width: 27px; height: 27px; border-radius: 50%; background: #fff; box-shadow: 0 2px 6px rgba(0, 0, 0, .22); transition: transform .28s var(--spring); }
.sw input:checked + span { background: #34c759; }
.sw input:checked + span::after { transform: translateX(20px); }
.sw input:disabled + span { opacity: .45; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; padding: 14px 16px; justify-content: center; }
.f { height: 34px; padding: 0 14px; border-radius: 99px; background: var(--surf2); font-size: 14px; font-weight: 600; }
.f[aria-pressed="true"] { background: var(--fg); color: var(--bg); }
.status { margin: 10px 16px 0; font-size: 13px; color: var(--fg2); text-align: center; }
.status.ok { color: #00ba7c; } .status.warn { color: #f4212e; }
.ios { margin: 12px 0; padding: 14px 16px; border-radius: 18px; background: var(--surf); font-size: 14px; }
.ios ol { margin: 6px 0 0; padding-left: 18px; }
.src-g { margin-bottom: 10px; }
.src-g > summary { list-style: none; cursor: pointer; }
.src-g > summary::-webkit-details-marker { display: none; }
.src-g > summary > svg { transition: transform .25s var(--ease); }
.src-g[open] > summary > svg { transform: rotate(90deg); }
.src-r { display: flex; align-items: center; gap: 12px; padding: 8px 16px; border-top: 1px solid var(--line); }
.src-r .lb { flex: 1; min-width: 0; }
.src-r .lb b { display: block; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.src-r .lb small { color: var(--fg2); font-size: 12.5px; }
.src-r i { width: 8px; height: 8px; border-radius: 50%; background: var(--surf2); flex: 0 0 auto; }
.src-r i.ok { background: #00ba7c; } .src-r i.bad { background: #f4212e; }

/* ---------------------------------------------------------------- floating tab bar (phones) */
.tabbar { display: none; position: fixed; left: 50%; bottom: calc(10px + var(--sb)); transform: translateX(-50%); z-index: 40; width: min(calc(100% - 20px), 430px); height: var(--tab); padding: 5px; border-radius: 31px; background: var(--glass); -webkit-backdrop-filter: blur(24px) saturate(190%); backdrop-filter: blur(24px) saturate(190%); border: 1px solid var(--line); box-shadow: 0 12px 34px -8px var(--shadow), 0 2px 6px var(--shadow); }
@media (max-width: 699px) { .tabbar { display: flex; } }
.tabbar a { flex: 1; min-width: 0; height: 100%; border-radius: 26px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; color: var(--fg2); font-size: 10px; line-height: 12px; font-weight: 650; transition: background-color .18s var(--ease), color .18s var(--ease); }
.tabbar svg { width: 23px; height: 23px; transition: transform .25s var(--spring); }
.tabbar a:active svg { transform: scale(.82); }
.tabbar a[aria-current] { background: var(--ac-soft); color: var(--ac); }

.toast { position: fixed; left: 50%; bottom: calc(24px + var(--sb)); transform: translateX(-50%); z-index: 60; background: var(--fg); color: var(--bg); padding: 10px 18px; border-radius: 99px; font-size: 14px; font-weight: 600; box-shadow: 0 6px 20px var(--shadow); white-space: nowrap; }
@media (max-width: 699px) { .toast { bottom: calc(var(--tab) + var(--sb) + 24px); } }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation-duration: .001ms !important; transition-duration: .001ms !important; } .tick-in { animation: none; } .tick { overflow-x: auto; } }
