/* TUFFUI (https://tuffui.com), MIT, Copyright (c) 2026 TUFFUI contributors, static/LICENSE-tuffui.txt.
   its look ported off react and tailwind: depth from layered surfaces, no borders. every page draws with it,
   the older pages through the last section here, which lays it over style.css's classes inside #page */

:root {
  --tf-fg: #161618;
  --tf-muted: #636368;
  --tf-surface: #ededef;
  --tf-inset: #fff;
  --tf-raised: #e2e2e4;
  --tf-brand: #0071e3;
  --tf-pos: #248a3d;
  --tf-neg: #d70015;
  --tf-warn: #c93400;
  --tf-c2: #1a9e8c;
  --tf-c3: #bf5af2;
  --tf-c4: #b8862b;
  --tf-btn: linear-gradient(0deg, #fff 0%, #e6e6e6 100%);
  --tf-btn-hover: linear-gradient(0deg, #fff 0%, #eee 100%);
  --tf-btn-fg: #111;
  --tf-btn-edge: rgb(0 0 0 / .1);
  --tf-btn-shadow: 0 0 #0000;
  --tf-btn2: linear-gradient(180deg, #e2e2e2 0%, #ececec 100%);
  --tf-btn2-hover: linear-gradient(180deg, #dadada 0%, #e4e4e4 100%);
  --tf-ease: cubic-bezier(.23, 1, .32, 1);
  --tf-io: cubic-bezier(.77, 0, .175, 1);
  --tf-mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}
:root.dark {
  --tf-fg: #f5f5f5;
  --tf-muted: #98989b;
  --tf-surface: #191919;
  --tf-inset: #101010;
  --tf-raised: #252525;
  --tf-brand: #0a84ff;
  --tf-pos: #30d158;
  --tf-neg: #ff453a;
  --tf-warn: #ff9f0a;
  --tf-btn: linear-gradient(0deg, #fff 0%, #ababab 100%);
  --tf-btn-hover: linear-gradient(0deg, #fff 0%, #c2c2c2 100%);
  --tf-btn-edge: rgb(255 255 255 / .5);
  --tf-btn-shadow: 0 2px 2px 0 rgb(0 0 0 / .1);
  --tf-btn2: linear-gradient(180deg, #1d1d1d 0%, #262626 100%);
  --tf-btn2-hover: linear-gradient(180deg, #242424 0%, #2d2d2d 100%);
}
/* tailwind's foreground/[n] tints, on :root so dark mode's --tf-fg carries into them */
:root {
  --tf-f3: color-mix(in oklab, var(--tf-fg) 3%, transparent);
  --tf-f4: color-mix(in oklab, var(--tf-fg) 4%, transparent);
  --tf-f5: color-mix(in oklab, var(--tf-fg) 5%, transparent);
  --tf-f6: color-mix(in oklab, var(--tf-fg) 6%, transparent);
  --tf-f7: color-mix(in oklab, var(--tf-fg) 7%, transparent);
  --tf-f8: color-mix(in oklab, var(--tf-fg) 8%, transparent);
  --tf-f10: color-mix(in oklab, var(--tf-fg) 10%, transparent);
  --tf-zebra: color-mix(in oklab, var(--tf-fg) 2.5%, transparent);
}

/* ---------------------------------------------------------------- surfaces */

.tf-shell { display: flex; flex-direction: column; min-width: 0; border-radius: 22px; background: var(--tf-surface);
  padding: 6px; color: var(--tf-fg); container: tf / inline-size; }
.tf-panel { min-width: 0; border-radius: 16px; background: var(--tf-inset); }
.tf-panel.pad { padding: 16px; }
.tf-panel.pad8 { padding: 8px; }
.tf-panel.grow { flex: 1; }
.tf-inset { border-radius: 12px; background: var(--tf-f4); }
.tf-tile { display: flex; align-items: center; justify-content: center; width: 36px; height: 36px; flex: none;
  border-radius: 12px; background: var(--tf-f6); color: var(--tf-muted); }
.tf-tile .i { width: 16px; height: 16px; }
.tf-head { display: flex; align-items: center; gap: 12px; min-width: 0; padding: 6px 14px 12px 6px; }
.tf-head .tx { flex: 1; min-width: 0; }
.tf-head.bare .tx { padding-left: 8px; }
.tf-head .t { font-size: 15px; font-weight: 500; line-height: 1.4; overflow: hidden; text-overflow: ellipsis;
  white-space: nowrap; }
.tf-head .s { font-size: 13px; color: var(--tf-muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tf-head .aside { display: flex; align-items: center; gap: 8px; flex: none; }
.tf-head .total { font-size: 20px; font-weight: 500; letter-spacing: -.025em; font-variant-numeric: tabular-nums; }

/* ---------------------------------------------------------------- controls */

.tf-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px; height: 32px; padding: 0 14px; flex: none;
  border: 0; border-radius: 999px; background-image: var(--tf-btn2); color: var(--tf-fg); font: inherit; font-size: 13px;
  font-weight: 500; white-space: nowrap; cursor: pointer; user-select: none;
  transition: background-color .15s var(--tf-ease), color .15s var(--tf-ease), transform .15s var(--tf-ease), opacity .15s;
}
.tf-btn:hover { background-image: var(--tf-btn2-hover); }
.tf-btn:active { transform: scale(.97); }
.tf-btn[disabled], .tf-btn.off { opacity: .4; pointer-events: none; }
.tf-btn .i { width: 14px; height: 14px; }
/* the silver primary is the one place a hairline edge and a drop shadow are allowed */
.tf-btn.primary { border: 1px solid var(--tf-btn-edge); background-image: var(--tf-btn); background-origin: border-box;
  color: var(--tf-btn-fg); box-shadow: var(--tf-btn-shadow); }
.tf-btn.primary:hover { background-image: var(--tf-btn-hover); }
.tf-btn.quiet { background: none; color: var(--tf-muted); }
.tf-btn.quiet:hover { background: var(--tf-f6); color: var(--tf-fg); }
.tf-btn.danger { background: none; color: var(--tf-neg); }
.tf-btn.danger:hover { background: color-mix(in oklab, var(--tf-neg) 10%, transparent); }
.tf-btn.icon { width: 32px; padding: 0; }
.tf-btn.sm { height: 28px; font-size: 12px; }
.tf-btn.sm.icon { width: 28px; }
.tf-btn.ok, .tf-btn.ok:hover { color: var(--tf-pos); }
.tf-btn .i-done, .tf-btn.ok .i-copy { display: none; }
.tf-btn.ok .i-done { display: inline; }

.tf-pill { display: inline-flex; align-items: center; gap: 6px; height: 24px; padding: 0 10px; flex: none; border-radius: 999px;
  background: var(--tf-f7); color: var(--tf-muted); font-size: 12px; font-weight: 500; white-space: nowrap;
  font-variant-numeric: tabular-nums; }
.tf-pill.sm { height: 20px; gap: 4px; padding: 0 8px; font-size: 11px; }
.tf-pill .i { width: 12px; height: 12px; stroke-width: 2.5; }
.tf-pill.pos { background: color-mix(in oklab, var(--tf-pos) 15%, transparent); color: var(--tf-pos); }
.tf-pill.neg { background: color-mix(in oklab, var(--tf-neg) 15%, transparent); color: var(--tf-neg); }
.tf-pill.warn { background: color-mix(in oklab, var(--tf-warn) 15%, transparent); color: var(--tf-warn); }
.tf-pill.brand { background: color-mix(in oklab, var(--tf-brand) 15%, transparent); color: var(--tf-brand); }
.tf-tag { display: inline-flex; align-items: center; height: 20px; padding: 0 6px; flex: none; border-radius: 6px;
  background: var(--tf-f6); color: var(--tf-muted); font-family: var(--tf-mono); font-size: 11px; white-space: nowrap; }
.tf-kbd { display: inline-flex; align-items: center; justify-content: center; height: 20px; min-width: 20px; padding: 0 4px;
  border-radius: 6px; background: var(--tf-f8); color: var(--tf-muted); font-size: 11px; font-weight: 500; }
.tf-btn .tf-kbd { background: color-mix(in oklab, currentColor 15%, transparent); color: currentColor; opacity: .8; }

#page .seg { height: 32px; gap: 0; padding: 2px; border-radius: 999px; background: var(--tf-f5); }
#page .seg a, #page .seg button, #page .seg label span { height: 100%; padding: 0 12px; border-radius: 999px; font-size: 13px;
  color: var(--tf-muted); transition: color .15s var(--tf-ease), background-color .15s var(--tf-ease), transform .15s var(--tf-ease); }
#page .seg label { height: 100%; }
#page .seg a:hover, #page .seg button:hover, #page .seg label span:hover { color: var(--tf-fg); }
#page .seg a:active, #page .seg button:active, #page .seg label span:active { transform: scale(.97); }
#page .seg .on, #page .seg label input:checked + span { background: var(--tf-raised); color: var(--tf-fg); box-shadow: none; }
#page .seg .on .n { color: var(--tf-fg); }

.tf-search { position: relative; flex: 1; min-width: 0; }
.tf-search > .i { position: absolute; left: 12px; top: 50%; width: 14px; height: 14px; transform: translateY(-50%);
  color: var(--tf-muted); pointer-events: none; }
.tf-search input { width: 100%; height: 36px; padding: 0 36px 0 32px; border: 0; border-radius: 999px; outline: none;
  background: var(--tf-f6); color: var(--tf-fg); font: inherit; font-size: 14px; transition: background-color .15s var(--tf-ease); }
.tf-search input::placeholder { color: var(--tf-muted); }
.tf-search input:hover { background: var(--tf-f8); }
.tf-search input:focus-visible { background: var(--tf-f10); }
.tf-search input::-webkit-search-cancel-button { display: none; }
.tf-search .clear { position: absolute; right: 4px; top: 50%; transform: translateY(-50%); }
.tf-search .clear[hidden] { display: none; }

.tf-spin { display: inline-block; width: 14px; height: 14px; flex: none; border: 2px solid currentColor;
  border-right-color: transparent; border-radius: 50%; animation: spin .7s linear infinite; }

/* ---------------------------------------------------------------- stat grid */

.tf-stats { display: grid; grid-template-columns: minmax(0, 1fr); gap: 6px; }
@container tf (min-width: 320px) { .tf-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@container tf (min-width: 560px) { .tf-stats.n3, .tf-stats.n5, .tf-stats.n6 { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@container tf (min-width: 620px) { .tf-stats.wide { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@container tf (min-width: 1400px) { .tf-stats.wide { grid-template-columns: repeat(6, minmax(0, 1fr)); } }
.tf-stat { display: flex; flex-direction: column; gap: 8px; min-width: 0; padding: 16px; border-radius: 16px;
  background: var(--tf-inset); color: inherit; transition: transform .15s var(--tf-ease); }
a.tf-stat:active { transform: scale(.98); }
.tf-stat .lbl { display: flex; align-items: center; gap: 6px; min-width: 0; font-size: 13px; color: var(--tf-muted); }
.tf-stat .lbl span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tf-stat .lbl .go { width: 13px; height: 13px; margin-left: auto; opacity: 0; transition: opacity .15s, transform .15s var(--tf-ease); }
a.tf-stat:hover .go, a.tf-stat:focus-visible .go { opacity: 1; transform: translateX(2px); }
.tf-stat .row { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; min-width: 0; }
.tf-stat .val { font-size: 26px; font-weight: 500; line-height: 1; letter-spacing: -.025em; white-space: nowrap;
  font-variant-numeric: tabular-nums; }
.tf-stat .foot { display: flex; align-items: center; gap: 8px; min-width: 0; font-size: 12px; color: var(--tf-muted); }
.tf-stat .foot .h { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tf-spark { display: block; width: 72px; height: 28px; flex: none; overflow: visible; }
.tf-stats.money .tf-stat .row { flex-wrap: wrap; height: 28px; overflow: hidden; }
:root:not(.tf-settled) .tf-stat { animation: tf-rise .24s var(--tf-ease) both; animation-delay: calc(var(--i, 0) * 50ms); }

/* odometer digits, each on its own wheel, rightmost first */
.tf-roll { display: inline-flex; }
.tf-dig { position: relative; display: inline-block; height: 1lh; overflow: hidden;
  -webkit-mask-image: linear-gradient(transparent, #000 22%, #000 78%, transparent);
  mask-image: linear-gradient(transparent, #000 22%, #000 78%, transparent); }
.tf-dig .sz { visibility: hidden; }
.tf-dig .col { position: absolute; left: 0; right: 0; top: 0; display: flex; flex-direction: column; align-items: center; }
.tf-dig .col span { height: 1lh; }
.tf-roll .ch { white-space: pre; }

/* ---------------------------------------------------------------- chart card */

.tf-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 12px; }
.tf-chip { display: inline-flex; align-items: center; gap: 6px; height: 28px; padding: 0 10px; border: 0; border-radius: 999px;
  background: var(--tf-f6); color: var(--tf-fg); font: inherit; font-size: 12px; cursor: pointer;
  transition: background-color .15s var(--tf-ease), color .15s, opacity .15s, transform .15s var(--tf-ease); }
.tf-chip:active { transform: scale(.97); }
.tf-chip i { width: 10px; height: 10px; border-radius: 3px; }
.tf-chip .v { font-family: var(--tf-mono); font-size: 11px; color: var(--tf-muted); font-variant-numeric: tabular-nums; }
.tf-chip[aria-pressed="false"] { background: none; color: var(--tf-muted); opacity: .6; }
.tf-chip[aria-pressed="false"]:hover { opacity: 1; }
.tf-chart:empty { height: 200px; }
/* a card stretched by the grid row grows its chart rather than leaving the panel half empty */
.tf-panel.grow { display: flex; flex-direction: column; }
.tf-panel.grow > .tf-chart { display: flex; flex-direction: column; flex: 1; }
.tf-plot { position: relative; flex: 1; min-height: 200px; border-radius: 12px; outline-offset: 4px; }
.tf-plot.donut { min-height: 220px; }
.tf-plot svg { display: block; overflow: visible; }
.tf-chart .ax { fill: var(--tf-muted); font-size: 10px; }
.tf-chart .nodata { fill: var(--tf-muted); font-size: 13px; }
.tf-chart .tf-col { transition: opacity .15s ease-out; }
.tf-chart .slice { transition: stroke-width .15s ease-out; }
.tf-tip { position: absolute; top: 0; z-index: 10; min-width: 144px; padding: 8px 12px; border-radius: 12px; pointer-events: none;
  background: var(--tf-raised); color: var(--tf-fg); font-size: 12px; transform-origin: top center; animation: tf-pop .2s var(--tf-ease); }
.tf-tip.still { animation: none; }
.tf-tip .t1 { margin-bottom: 4px; font-weight: 500; }
.tf-tip .r { display: flex; align-items: center; gap: 8px; color: var(--tf-muted); }
.tf-tip .r i { width: 8px; height: 8px; flex: none; border-radius: 2px; }
.tf-tip .r .k { flex: 1; }
.tf-tip .r b { font-family: var(--tf-mono); font-weight: 400; color: var(--tf-fg); font-variant-numeric: tabular-nums; }

/* ---------------------------------------------------------------- data table */

.tf-dt .tools { display: flex; align-items: center; gap: 8px; padding: 4px 4px 8px; }
table.tf-t { width: 100%; border-collapse: separate; border-spacing: 0; font-size: 13px; }
.tf-t th { padding: 8px; text-align: left; font-weight: 500; color: var(--tf-muted); white-space: nowrap; }
.tf-t th.num { text-align: right; }
.tf-t th button { display: inline-flex; align-items: center; gap: 4px; margin: 0 -6px; padding: 2px 6px; border: 0; border-radius: 6px;
  background: none; color: inherit; font: inherit; cursor: pointer;
  transition: background-color .15s var(--tf-ease), color .15s, transform .15s var(--tf-ease); }
.tf-t th.num button { flex-direction: row-reverse; }
.tf-t th button:hover { background: var(--tf-f6); color: var(--tf-fg); }
.tf-t th button:active { transform: scale(.97); }
.tf-t th button .i { width: 12px; height: 12px; stroke-width: 2.5; opacity: .3; transition: opacity .15s, transform .15s; }
.tf-t th[aria-sort] button { color: var(--tf-fg); }
.tf-t th[aria-sort] button .i { opacity: 1; }
.tf-t th[aria-sort="ascending"] button .i { transform: rotate(180deg); }
.tf-t td { padding: 10px 8px; white-space: nowrap; vertical-align: middle; }
.tf-t td.num { text-align: right; font-family: var(--tf-mono); font-size: 12px; font-variant-numeric: tabular-nums; }
.tf-t td.clip { width: 100%; max-width: 0; overflow: hidden; text-overflow: ellipsis; }
.tf-t td.muted { color: var(--tf-muted); }
.tf-t tbody tr { transition: background-color .15s; }
.tf-t tbody tr.z { background: var(--tf-zebra); }
.tf-t tbody tr:hover { background: var(--tf-f5); }
.tf-t td:first-child { border-radius: 12px 0 0 12px; }
.tf-t td:last-child { border-radius: 0 12px 12px 0; }
.tf-t tr[data-href] { cursor: pointer; }
.tf-t .avatar { width: 24px; height: 24px; font-size: 10px; }
.tf-t .who { gap: 8px; }
.tf-t .badge { height: 20px; }
@container tf (max-width: 447px) { .tf-t .p2 { display: none; } }
@container tf (max-width: 575px) { .tf-t .p3 { display: none; } }
.tf-foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 6px 6px 0 14px;
  font-size: 12px; color: var(--tf-muted); font-variant-numeric: tabular-nums; }
.tf-foot .pg { display: flex; align-items: center; gap: 4px; }
.tf-foot .pg span { width: 56px; text-align: center; }
.tf-empty { display: flex; align-items: center; gap: 12px; padding: 12px; text-align: left; }
.tf-empty b { display: block; font-size: 14px; font-weight: 500; }
.tf-empty p { margin-top: 2px; font-size: 13px; color: var(--tf-muted); text-wrap: pretty; }
.tf-empty[hidden] { display: none; }

/* ---------------------------------------------------------------- the overview's own pieces */

.tf-ph h1 { font-weight: 600; }
.tf-nodes { display: flex; flex-direction: column; gap: 2px; padding: 4px; }
.tf-node { display: block; padding: 10px 12px; border-radius: 12px; transition: background-color .15s; }
a.tf-node:hover { background: var(--tf-f4); }
.tf-node .top { display: flex; align-items: center; gap: 8px; min-width: 0; }
.tf-node .top b { min-width: 0; font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tf-node .top .v { margin-left: auto; font-family: var(--tf-mono); font-size: 12px; font-variant-numeric: tabular-nums; }
.tf-node .meta { font-size: 12px; color: var(--tf-muted); }
.tf-bar { position: relative; height: 6px; margin: 8px 0; overflow: hidden; border-radius: 999px; background: var(--tf-f7); }
.tf-bar > i { position: absolute; inset: 0; border-radius: 999px; background: var(--tf-brand);
  transition: clip-path .5s var(--tf-ease); }
/* the funnel's steps as columns seen corner on, cut off flat by the panel's bottom edge and joined by a band. a
   column's lit face is hatched and goes solid under the pointer, with its cell lit and a tip beside it. the cells
   are fifths of the width and a column's box is 100 wide, so .2cqw is one of its units */
.tf-iso { position: relative; isolation: isolate; display: flex; flex: 1; width: calc(100% - 32px); max-width: 528px;
  margin: 0 auto; container-type: inline-size; --tip: 168px; }
.tf-iso .defs { position: absolute; }
/* under the cells, so their rules and the lit cell lie over it */
.tf-iso .band { position: absolute; z-index: -1; left: 0; bottom: 0; width: 100%; height: auto; fill: var(--tf-brand);
  opacity: .26; }
.tf-iso .step { display: flex; flex-direction: column; align-items: center; flex: 1 1 0; min-width: 0; padding-top: 14px;
  text-align: center; transition: background-color .15s; }
.tf-iso .step + .step { box-shadow: inset 1px 0 var(--tf-f6); }
.tf-iso .step:is(:hover, :focus-visible) { background: color-mix(in oklab, var(--tf-brand) 10%, transparent); }
.tf-iso .step:focus-visible { outline: 2px solid var(--tf-brand); outline-offset: -2px; }
.tf-iso .step > .k { display: flex; align-items: flex-end; justify-content: center; min-height: 2.5em; padding: 0 3px;
  font-size: 12px; line-height: 1.25; color: var(--tf-muted); text-wrap: balance; }
.tf-iso .step > b { margin-bottom: 12px; font-size: 15px; font-weight: 500; line-height: 1.6; font-variant-numeric: tabular-nums; }
.tf-iso .step > svg { display: block; width: 100%; height: auto; margin-top: auto; }
.tf-iso .top { fill: color-mix(in oklab, var(--tf-brand), #fff 30%); }
.tf-iso .side { fill: color-mix(in oklab, var(--tf-brand), #000 28%); }
.tf-iso .ln { fill: color-mix(in oklab, var(--tf-brand), #fff 55%); }
.tf-iso .bg, .tf-iso .solid { fill: var(--tf-brand); }
.tf-iso .solid { opacity: 0; transition: opacity .15s ease-out; }
.tf-iso .step:is(:hover, :focus-visible) .solid { opacity: 1; }
/* a step nobody could count: a grey tile, no hatch */
.tf-iso .na .top { fill: color-mix(in oklab, var(--tf-fg) 14%, var(--tf-inset)); }
.tf-iso .na :is(.front, .solid) { fill: color-mix(in oklab, var(--tf-fg) 20%, var(--tf-inset)); }
.tf-iso .na .side { fill: color-mix(in oklab, var(--tf-fg) 26%, var(--tf-inset)); }
.tf-iso .tf-pill { position: absolute; z-index: 1; translate: -50% 0; pointer-events: none;
  background: color-mix(in oklab, var(--tf-neg) 14%, var(--tf-inset));
  box-shadow: 0 0 0 1px color-mix(in oklab, var(--tf-neg) 22%, transparent); }
.tf-iso .tf-tip { display: none; width: var(--tip); min-width: 0; text-align: left; translate: 0 -50%;
  left: min(calc((var(--at) + 1) * 20%), calc(100% - var(--tip)));
  top: clamp(64px, calc(100% - var(--mid) * .2cqw), calc(100% - 64px)); }
.tf-iso .step:nth-last-child(-n+2) .tf-tip { left: max(0px, calc(var(--at) * 20% - var(--tip))); }
.tf-iso .step:is(:hover, :focus-visible) .tf-tip { display: block; }
.tf-iso .tf-tip p { margin-top: 4px; font-size: 11px; line-height: 1.35; color: var(--tf-muted); text-wrap: pretty; }
@container tf (max-width: 400px) { .tf-iso { --tip: 150px; } }

/* ---------------------------------------------------------------- Ask AI, the DataAnswer screen */

.page[data-page="ask"] { padding: 0; gap: 0; }
.da { position: relative; display: flex; height: calc(100dvh - 64px); overflow: hidden; border-radius: 0 0 12px 12px;
  background: var(--background); color: var(--tf-fg); container: da / inline-size; }
.da-side { display: none; width: 288px; flex: none; overflow: hidden; transition: width .3s var(--tf-ease), opacity .3s var(--tf-ease); }
.da.shut .da-side { width: 0; opacity: 0; }
.da.still .da-side { transition: none; }
@container da (min-width: 896px) { .da-side { display: block; } }
.da-side .in { display: flex; flex-direction: column; gap: 12px; width: 288px; height: 100%; overflow-y: auto; padding: 12px 0 12px 12px; }
.da-sec { border-radius: 22px; background: var(--tf-surface); padding: 6px; }
.da-sec h3 { display: flex; align-items: center; gap: 8px; padding: 6px 10px 8px; font-size: 13px; font-weight: 500;
  color: var(--tf-muted); }
.da-sec h3 .i { width: 15px; height: 15px; }
.da-sec ul { display: flex; flex-direction: column; gap: 1px; margin: 0; padding: 4px; list-style: none; border-radius: 16px;
  background: var(--tf-inset); }
.da-src { display: flex; align-items: center; gap: 8px; padding: 8px 10px; border-radius: 12px; }
.da-src .tx { flex: 1; min-width: 0; }
.da-src .n { display: block; font-size: 13px; font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.da-src .d { display: block; font-family: var(--tf-mono); font-size: 11px; color: var(--tf-muted); overflow: hidden;
  text-overflow: ellipsis; white-space: nowrap; }
.da-q { display: block; width: 100%; padding: 8px 10px; border: 0; border-radius: 12px; background: none; color: var(--tf-fg);
  font: inherit; font-size: 13px; text-align: left; cursor: pointer;
  transition: background-color .15s ease-out, transform .15s ease-out; }
.da-q:hover { background: var(--tf-f5); }
.da-q:active { transform: scale(.98); }
.da-q.on { background: var(--tf-f6); }
.da-q .w { display: block; margin-top: 1px; font-size: 11px; color: var(--tf-muted); }
.da-side .none { padding: 8px 10px; font-size: 12px; color: var(--tf-muted); }

.da-main { display: flex; flex-direction: column; flex: 1; min-width: 0; }
.da-top { display: flex; align-items: center; gap: 8px; height: 56px; flex: none; padding: 0 12px; }
.da-top h2 { min-width: 0; font-size: 15px; font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.da-top .tf-tag { display: none; }
.da-top .new { margin-left: auto; }
@container da (min-width: 448px) { .da-top { padding: 0 20px; } .da-top .tf-tag { display: inline-flex; } }
.da-body { position: relative; flex: 1; min-height: 0; }
.da-log { height: 100%; overflow-x: hidden; overflow-y: auto; overscroll-behavior: contain; outline: none; }
.da-col { display: flex; flex-direction: column; gap: 6px; width: 100%; max-width: 768px; margin: 0 auto;
  padding: 20px 16px calc(var(--dock, 140px) + 20px); }
@container da (min-width: 448px) { .da-col { padding-left: 20px; padding-right: 20px; } }

.da-msg { display: flex; gap: 10px; }
.da-msg + .da-msg { margin-top: 16px; }
.da-msg.user { flex-direction: row-reverse; }
.da-av { position: relative; display: flex; align-items: center; justify-content: center; width: 28px; height: 28px; flex: none;
  overflow: hidden; border-radius: 50%; font-size: 11px; font-weight: 500; }
.da-av.ai { background: color-mix(in oklab, var(--tf-brand) 15%, transparent); color: var(--tf-brand); }
.da-av .i { width: 14px; height: 14px; }
.da-av img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.da-stack { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.da-msg.user .da-stack { align-items: flex-end; max-width: 80%; }
.da-msg.ai .da-stack { flex: 1; max-width: 92%; }
.da-name { display: flex; align-items: baseline; gap: 8px; font-size: 13px; }
.da-msg.user .da-name { flex-direction: row-reverse; }
.da-name b { font-weight: 500; }
.da-name time { font-size: 12px; color: var(--tf-muted); font-variant-numeric: tabular-nums; opacity: 0; transition: opacity .15s; }
.da-msg:hover .da-name time, .da-msg:focus-within .da-name time { opacity: 1; }
@media (hover: none) { .da-name time { opacity: 1; } }
.da-bubble { max-width: 100%; font-size: 14px; line-height: 1.625; }
.da-msg.user .da-bubble { padding: 8px 14px; border-radius: 16px 6px 16px 16px; background: var(--tf-raised); white-space: pre-wrap;
  overflow-wrap: anywhere; }
:root:not(.tf-settled) .da-msg, .da-msg.fresh { animation: tf-rise .2s var(--tf-ease) both; }
.da-parts { display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.da-text { display: flex; flex-direction: column; gap: 12px; line-height: 24px; text-wrap: pretty; overflow-wrap: anywhere; }
.da-text p, .da-text ul { margin: 0; }
.da-text ul { padding-left: 20px; }
.da-text li + li { margin-top: 4px; }
.da-text code { padding: 1px 4px; border-radius: 6px; background: var(--tf-f7); font-family: var(--tf-mono); font-size: 12px; }
.da-text strong { font-weight: 600; }
.da-text .w { animation: tf-fade .25s var(--tf-ease); }
.da-caret { display: inline-block; width: 2px; height: 1.1em; margin-left: 2px; border-radius: 999px; background: var(--tf-brand);
  vertical-align: -3px; animation: tf-blink 1s linear infinite; }
.da-note { font-size: 12px; color: var(--tf-muted); }

.da-think { border-radius: 16px; background: var(--tf-f4); }
.da-think > button { display: flex; align-items: center; gap: 6px; width: 100%; padding: 10px 14px; border: 0; border-radius: 16px;
  background: none; color: var(--tf-muted); font: inherit; font-size: 13px; text-align: left; cursor: pointer;
  transition: color .15s var(--tf-ease), transform .15s var(--tf-ease); }
.da-think > button:hover { color: var(--tf-fg); }
.da-think > button:active { transform: scale(.99); }
.da-think > button .i { width: 14px; height: 14px; }
.da-think > button .chev { margin-left: auto; transition: transform .2s var(--tf-io); }
.da-think > button[aria-expanded="true"] .chev { transform: rotate(90deg); }
.da-fold { display: grid; grid-template-rows: 0fr; opacity: 0; transition: grid-template-rows .22s var(--tf-ease), opacity .22s var(--tf-ease); }
.da-fold.open { grid-template-rows: 1fr; opacity: 1; }
.da-fold > div { min-height: 0; overflow: hidden; }
.da-think p { padding: 0 14px 12px; font-size: 13px; line-height: 24px; color: var(--tf-muted); white-space: pre-wrap; }
.da-shimmer { background: linear-gradient(90deg, var(--tf-muted) 35%, var(--tf-fg) 50%, var(--tf-muted) 65%) 0 0 / 200% 100%;
  -webkit-background-clip: text; background-clip: text; color: transparent; animation: tf-shimmer 1.6s linear infinite; }

.da-tool { border-radius: 18px; padding: 4px; overflow: hidden; }
.da-tool > button { display: flex; align-items: center; gap: 10px; width: 100%; padding: 6px 10px 6px 6px; border: 0;
  border-radius: 14px; background: none; color: var(--tf-fg); font: inherit; font-size: 14px; text-align: left; cursor: pointer;
  transition: background-color .15s ease-out, transform .15s ease-out; }
.da-tool > button:hover { background: var(--tf-f3); }
.da-tool > button:active { transform: scale(.99); }
.da-tool .st { display: flex; align-items: center; justify-content: center; width: 24px; height: 24px; flex: none; border-radius: 50%;
  background: var(--tf-f6); color: var(--tf-muted); }
.da-tool .st .i { width: 13px; height: 13px; stroke-width: 2.5; }
.da-tool .st .tf-spin { width: 12px; height: 12px; }
.da-tool .st.run { background: color-mix(in oklab, var(--tf-brand) 15%, transparent); color: var(--tf-brand); }
.da-tool .st.ok { background: color-mix(in oklab, var(--tf-pos) 15%, transparent); color: var(--tf-pos); }
.da-tool .st.bad { background: color-mix(in oklab, var(--tf-neg) 15%, transparent); color: var(--tf-neg); }
.da-tool .nm { flex: none; font-family: var(--tf-mono); font-size: 13px; font-weight: 500; }
.da-tool .sum { flex: 1; min-width: 0; font-family: var(--tf-mono); font-size: 12px; color: var(--tf-muted); overflow: hidden;
  text-overflow: ellipsis; white-space: nowrap; }
.da-tool .ms { flex: none; font-family: var(--tf-mono); font-size: 12px; color: var(--tf-muted); font-variant-numeric: tabular-nums; }
.da-tool .chev { width: 16px; height: 16px; flex: none; color: var(--tf-muted); transition: transform .3s var(--tf-ease); }
.da-tool > button[aria-expanded="true"] .chev { transform: rotate(90deg); }
.da-tool .pn { display: flex; flex-direction: column; gap: 12px; margin-top: 4px; padding: 12px; border-radius: 14px;
  background: var(--tf-inset); }
.da-tool .sh { display: flex; align-items: center; justify-content: space-between; margin-bottom: 6px; }
.da-tool .sh span { padding-left: 4px; font-size: 13px; color: var(--tf-muted); }
.da-tool .code { padding: 10px 12px; border-radius: 12px; background: var(--tf-f4); }
.da-tool pre { margin: 0; font-family: var(--tf-mono); font-size: 12px; line-height: 20px; white-space: pre-wrap; word-break: break-word; }
.da-tool .fade { max-height: 160px; overflow: hidden;
  -webkit-mask-image: linear-gradient(to bottom, #000 70%, transparent); mask-image: linear-gradient(to bottom, #000 70%, transparent); }
.da-tool .err { display: flex; align-items: flex-start; gap: 8px; padding: 8px 8px 8px 12px; border-radius: 12px;
  background: color-mix(in oklab, var(--tf-neg) 10%, transparent); color: var(--tf-neg); font-family: var(--tf-mono);
  font-size: 12px; line-height: 20px; overflow-wrap: anywhere; }
.da-tool .err .i { width: 14px; height: 14px; margin-top: 3px; flex: none; }
.da-json .k { color: var(--tf-muted); }
.da-json .s { color: var(--tf-pos); }
.da-json .b { color: var(--tf-brand); }
.da-json .n { color: var(--tf-warn); }
.da-tool .res { display: flex; flex-direction: column; gap: 2px; margin: -4px; padding: 0; list-style: none; }
.da-tool .res a { display: flex; align-items: baseline; gap: 12px; padding: 6px 8px; border-radius: 10px; font-size: 13px;
  transition: background-color .15s ease-out; }
.da-tool .res a:hover { background: var(--tf-f5); }
.da-tool .res .t { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.da-tool .res .d { flex: none; max-width: 50%; font-family: var(--tf-mono); font-size: 11px; color: var(--tf-muted); overflow: hidden;
  text-overflow: ellipsis; white-space: nowrap; }
.da-tool .none { font-size: 13px; color: var(--tf-muted); }
.da-cite { display: inline-block; min-width: 16px; margin: 0 1px 0 3px; padding: 0 4px; border-radius: 999px; background: var(--tf-f8);
  color: var(--tf-muted); font-family: var(--tf-mono); font-size: 10px; font-weight: 500; line-height: 16px; text-align: center;
  vertical-align: 2px; transition: background-color .15s ease-out, color .15s ease-out; }
.da-cite:hover { background: var(--tf-fg); color: var(--background); }
.da-nb { white-space: nowrap; }
.da-srcs { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-top: 12px; }
.da-srcs[hidden] { display: none; }
.da-srcs .lbl { margin-right: 2px; font-size: 12px; color: var(--tf-muted); }
.da-srcs a { display: flex; align-items: center; gap: 6px; max-width: 340px; height: 26px; padding: 0 10px 0 4px; border-radius: 999px;
  background: var(--tf-f5); font-size: 12px; line-height: 1; transition: background-color .15s ease-out; }
.da-srcs a:hover { background: var(--tf-f10); }
.da-srcs a b { min-width: 18px; flex: none; border-radius: 999px; background: var(--tf-f8); color: var(--tf-muted);
  font-family: var(--tf-mono); font-size: 10px; font-weight: 500; line-height: 18px; text-align: center; }
.da-srcs a span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; line-height: 26px; }
.da-srcs a .d { flex: none; font-family: var(--tf-mono); font-size: 11px; color: var(--tf-muted); }

.da-fail { display: flex; align-items: center; gap: 10px; padding: 8px 8px 8px 14px; border-radius: 16px;
  background: color-mix(in oklab, var(--tf-neg) 10%, transparent); font-size: 13px; }
.da-fail .i { width: 16px; height: 16px; flex: none; color: var(--tf-neg); }
.da-fail b { font-weight: 500; color: var(--tf-neg); }
.da-fail span { color: var(--tf-muted); }
.da-acts { display: flex; align-items: center; gap: 2px; margin-left: -8px; }
.da-acts .meta { margin-left: 6px; font-family: var(--tf-mono); font-size: 11px; color: var(--tf-muted); }
.da-follow { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-top: 12px; padding-left: 38px; }
.da-follow button { display: flex; align-items: center; gap: 6px; height: 32px; max-width: 320px; padding: 0 10px 0 14px; border: 0;
  border-radius: 999px; background: var(--tf-f6); color: var(--tf-fg); font: inherit; font-size: 13px; cursor: pointer;
  animation: tf-rise .22s var(--tf-ease) both; animation-delay: calc(var(--i, 0) * 40ms);
  transition: background-color .15s ease-out, transform .15s ease-out; }
.da-follow button:hover { background: var(--tf-f10); }
.da-follow button:active { transform: scale(.97); }
.da-follow button span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.da-follow button .i { width: 12px; height: 12px; flex: none; color: var(--tf-muted); }
.da-div { display: flex; justify-content: center; margin: 12px 0; }
.da-div span { padding: 2px 10px; border-radius: 999px; background: var(--tf-f5); color: var(--tf-muted); font-size: 11px; font-weight: 500; }

.da-jump { position: absolute; left: 50%; bottom: calc(var(--dock, 140px) + 12px); z-index: 2; display: flex; align-items: center;
  gap: 6px; height: 32px; padding: 0 14px; border: 0; border-radius: 999px; background: var(--tf-raised); color: var(--tf-fg);
  font: inherit; font-size: 13px; font-weight: 500; cursor: pointer; transform: translateX(-50%);
  animation: tf-rise .2s var(--tf-ease); transition: background-color .15s ease-out; }
.da-jump:hover { background: color-mix(in oklab, var(--tf-raised), var(--tf-fg) 7%); }
.da-jump .i { width: 14px; height: 14px; stroke-width: 2.5; }
.da-jump[hidden] { display: none; }

.da-dock { position: absolute; left: 0; right: 0; bottom: 0; background: var(--background); }
.da-dock::before { content: ""; position: absolute; left: 0; right: 0; top: -24px; height: 24px; pointer-events: none;
  background: linear-gradient(to top, var(--background), transparent); }
.da-dock .w { max-width: 768px; margin: 0 auto; padding: 4px 12px 12px; }
@container da (min-width: 448px) { .da-dock .w { padding: 4px 20px 20px; } }
.da-comp textarea { display: block; width: 100%; min-height: 64px; max-height: 180px; padding: 12px 16px 4px; border: 0; outline: none;
  resize: none; background: transparent; color: var(--tf-fg); font: inherit; font-size: 14px; line-height: 24px; }
.da-comp textarea::placeholder { color: var(--tf-muted); }
.da-bar { display: flex; align-items: center; gap: 8px; padding: 0 8px 8px 16px; }
.da-comp .hint { display: flex; align-items: center; gap: 6px; flex: 1; min-width: 0; font-size: 12px; color: var(--tf-muted);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.da-comp .hint .tf-spin { color: var(--tf-brand); }
.da-comp .stop[hidden] { display: none; }
.da-queue p { padding: 0 10px 4px; font-size: 12px; color: var(--tf-muted); }
.da-queue ol { display: flex; flex-direction: column; gap: 4px; margin: 0 0 6px; padding: 0; list-style: none; }
.da-queue li { display: flex; align-items: center; gap: 8px; padding: 6px 4px 6px 12px; border-radius: 12px; background: var(--tf-f4);
  font-size: 13px; animation: tf-pop .2s var(--tf-ease); }
.da-queue li span { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.da-queue[hidden] { display: none; }
.da-off { padding: 10px 14px; border-radius: 16px; background: color-mix(in oklab, var(--tf-warn) 12%, transparent);
  color: var(--tf-fg); font-size: 13px; }
.da-off code { font-family: var(--tf-mono); font-size: 12px; }

.da-empty { display: flex; flex-direction: column; gap: 12px; width: 100%; max-width: 576px; margin: 8vh auto 0; }
.da-empty h3 { padding: 0 4px; font-size: 15px; font-weight: 500; }
.da-empty .s { padding: 0 4px; margin-top: -8px; font-size: 13px; color: var(--tf-muted); }
.da-cards { display: grid; grid-template-columns: minmax(0, 1fr); gap: 8px; }
@container da (min-width: 520px) { .da-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.da-card { display: flex; align-items: center; gap: 12px; width: 100%; height: 100%; padding: 6px 14px 6px 6px; border: 0;
  border-radius: 18px; background: var(--tf-surface); color: var(--tf-fg); font: inherit; text-align: left; cursor: pointer;
  animation: tf-rise .22s var(--tf-ease) both; animation-delay: calc(var(--i, 0) * 40ms);
  transition: background-color .15s ease-out, transform .15s ease-out; }
.da-card:hover { background: var(--tf-raised); }
.da-card:active { transform: scale(.98); }
.da-card .tx { flex: 1; min-width: 0; padding: 4px 0; }
.da-card .t { display: block; font-size: 13px; font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.da-card .h { display: block; font-size: 12px; color: var(--tf-muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.da-card > .i { width: 14px; height: 14px; flex: none; color: var(--tf-muted); opacity: 0; transition: opacity .15s, transform .15s; }
.da-card:hover > .i, .da-card:focus-visible > .i { opacity: 1; transform: translateX(2px); }

.da-drawer { position: absolute; inset: 0; z-index: 20; }
.da-drawer[hidden] { display: none; }
.da-drawer .sc { position: absolute; inset: 0; border: 0; background: rgb(0 0 0 / .4); animation: tf-fade .2s var(--tf-ease); }
.da-drawer .pn { position: absolute; top: 8px; bottom: 8px; left: 8px; display: flex; flex-direction: column; gap: 12px;
  width: min(320px, calc(100% - 48px)); padding: 6px; overflow-y: auto; border-radius: 24px; outline: none;
  background: var(--background); animation: tf-slide .4s cubic-bezier(.32, .72, 0, 1); }
.da-drawer .pn > .x { display: flex; justify-content: flex-end; padding: 6px 6px 0; }
@container da (min-width: 896px) { .da-drawer { display: none; } }

@media (max-width: 860px) { .da { height: calc(100dvh - 48px); border-radius: 0; } }

/* ---------------------------------------------------------------- the other pages, style.css's classes in this look */

/* the strip keeps its own column counts and breakpoints, a note too long for one line wraps rather than hides */
#page .kpis { gap: 6px; padding: 6px; border: 0; border-radius: 22px; background: var(--tf-surface); overflow: visible; }
.kpis .tf-stat .foot { flex-wrap: wrap; align-items: baseline; row-gap: 4px; }
.kpis .tf-stat .foot .h { white-space: normal; line-height: 1.4; }
.tf-stat .val .unit, #page .kpi-value .unit { margin-left: 4px; font-size: 13px; font-weight: 500; letter-spacing: 0;
  color: var(--tf-muted); }
#page .kpi-value { font-size: 26px; font-weight: 500; letter-spacing: -.025em; line-height: 1.1; }
#page .kpi-note { margin-top: 4px; color: var(--tf-muted); }

.tf-head .t .count { margin-left: 8px; font-weight: 400; color: var(--tf-muted); font-variant-numeric: tabular-nums; }
.tf-head.wrap { flex-wrap: wrap; row-gap: 8px; }
.tf-head.wrap .tx { flex: 1 1 160px; }
.tf-head.wrap .s { white-space: normal; }
.tf-head.wrap .aside { flex-wrap: wrap; max-width: 100%; }
.tf-panel.flush { padding: 8px; }
.tf-empty.big { flex-direction: column; justify-content: center; gap: 10px; padding: 28px 16px; text-align: center; }
.tf-empty.big .tf-tile { width: 44px; height: 44px; border-radius: 14px; }
.tf-empty.big .tf-tile .i { width: 18px; height: 18px; }
.tf-empty.big p { max-width: 420px; margin: 4px auto 0; }
.tf-pill .dot, #page .badge .dot { width: 6px; height: 6px; background: currentColor; box-shadow: none; }
.tf-pill .dot.pulse, #page .badge .dot.pulse { animation: tf-pulse 2s ease-in-out infinite; }

/* :is() weighs as #page whichever matched, so the sign-in page's controls outrank style.css's dark-mode rules too */
:is(#page, .auth-body) .btn { height: 32px; padding: 0 14px; border: 0; border-radius: 999px; background: var(--tf-btn2);
  color: var(--tf-fg); font-size: 13px; font-weight: 500;
  transition: background-color .15s var(--tf-ease), color .15s var(--tf-ease), transform .15s var(--tf-ease), opacity .15s; }
:is(#page, .auth-body) .btn:hover { background: var(--tf-btn2-hover); }
:is(#page, .auth-body) .btn:active { transform: scale(.97); }
:is(#page, .auth-body) .btn .i { width: 14px; height: 14px; }
:is(#page, .auth-body) .btn.sm { height: 28px; padding: 0 12px; border-radius: 999px; font-size: 12px; }
:is(#page, .auth-body) .btn.icon { width: 32px; padding: 0; }
:is(#page, .auth-body) .btn.sm.icon { width: 28px; }
:is(#page, .auth-body) .btn.ghost { background: none; color: var(--tf-muted); }
:is(#page, .auth-body) .btn.ghost:hover { background: var(--tf-f6); color: var(--tf-fg); }
:is(#page, .auth-body) .btn.primary { border: 1px solid var(--tf-btn-edge); background: var(--tf-btn) border-box;
  color: var(--tf-btn-fg); box-shadow: var(--tf-btn-shadow); }
:is(#page, .auth-body) .btn.primary:hover { background: var(--tf-btn-hover) border-box; opacity: 1; }
:is(#page, .auth-body) .btn[disabled], :is(#page, .auth-body) .btn.off { opacity: .4; }
:is(#page, .auth-body) [data-copy].done { background: color-mix(in oklab, var(--tf-pos) 15%, transparent); color: var(--tf-pos); }

/* background-color alone, so a select keeps the chevron style.css draws in its background-image */
#page .input, #page .select { height: 32px; padding: 0 12px; border: 0; border-radius: 999px; background-color: var(--tf-f6);
  color: var(--tf-fg); font-size: 13px; transition: background-color .15s var(--tf-ease); }
#page .input:hover, #page .select:hover { background-color: var(--tf-f8); }
#page .input:focus, #page .select:focus { background-color: var(--tf-f10); box-shadow: none; }
#page .input::placeholder { color: var(--tf-muted); }
#page .input.sm, #page .select.sm { height: 28px; padding: 0 10px; border-radius: 999px; font-size: 12px; }
#page .select { padding-right: 28px; background-image: linear-gradient(45deg, transparent 50%, var(--tf-muted) 50%),
  linear-gradient(135deg, var(--tf-muted) 50%, transparent 50%); background-position: calc(100% - 15px) 50%, calc(100% - 11px) 50%;
  background-size: 4px 4px; background-repeat: no-repeat; }
#page .select.sm { padding-right: 24px; background-position: calc(100% - 13px) 50%, calc(100% - 9px) 50%; }
#page .searchbox .i { left: 12px; }
#page .searchbox .input { padding-left: 32px; }
#page .toolbar { padding: 0 0 8px; }
#page .pager .input { width: 44px; padding: 0 4px; text-align: center; }

:is(#page, .auth-body) .badge { height: 20px; gap: 4px; padding: 0 8px; border: 0; border-radius: 999px; background: var(--tf-f7);
  color: var(--tf-muted); font-size: 11px; }
#page .badge.ok { background: color-mix(in oklab, var(--tf-pos) 15%, transparent); color: var(--tf-pos); }
#page .badge.bad { background: color-mix(in oklab, var(--tf-neg) 15%, transparent); color: var(--tf-neg); }
#page .badge.warn { background: color-mix(in oklab, var(--tf-warn) 15%, transparent); color: var(--tf-warn); }
#page .badge.brand { background: color-mix(in oklab, var(--tf-brand) 15%, transparent); color: var(--tf-brand); }
#page .badge.info { background: color-mix(in oklab, var(--tf-c2) 15%, transparent); color: var(--tf-c2); }
#page .badge.solid { background: var(--tf-fg); color: var(--tf-inset); }
/* an outline badge names a thing rather than a state, so it takes the tag's shape */
:is(#page, .auth-body) .badge.outline { padding: 0 6px; border-radius: 6px; background: var(--tf-f6); }
#page .bar { height: 6px; background: var(--tf-f7); }
#page .bar > i { background: var(--tf-brand); }
#page .bar.ok > i, #page .bar.lime > i { background: var(--tf-pos); }
#page .bar.bad > i { background: var(--tf-neg); }
#page .bar.warn > i { background: var(--tf-warn); }
#page .bar.info > i { background: var(--tf-c2); }
#page .ok-text { color: var(--tf-pos); }
#page .bad-text { color: var(--tf-neg); }
#page .warn-text { color: var(--tf-warn); }
#page .plist .top .v, #page .rating .v { font-family: var(--tf-mono); font-size: 12px; }
#page .legend-top .lk { font-size: 12px; letter-spacing: 0; text-transform: none; color: var(--tf-muted); }
#page .legend-top .lv { font-weight: 500; }

#page table.t { border-collapse: separate; border-spacing: 0; }
#page .t th { height: auto; padding: 8px; border: 0; background: none; font-size: 13px; color: var(--tf-muted); }
/* opaque, rows scroll under a held header */
#page .tablewrap.scroll thead th { background: var(--tf-inset); }
#page .t td { padding: 10px 8px; border: 0; transition: background-color .15s; }
#page .t.compact td { padding: 8px; }
#page .t.dense th, #page .t.dense td { padding-left: 6px; padding-right: 6px; }
#page .t td.num { font-family: var(--tf-mono); font-size: 12px; }
#page .t td:first-child { border-radius: 12px 0 0 12px; }
#page .t td:last-child { border-radius: 0 12px 12px 0; }
#page .t tbody tr:nth-child(even) > td { background: var(--tf-zebra); }
#page .t tbody tr:hover > td { background: var(--tf-f5); }
#page .t details pre { padding: 10px 12px; border-radius: 12px; background: var(--tf-f4); font-family: var(--tf-mono); }
.t th .tf-sort { margin: 0 -6px; padding: 2px 6px; border-radius: 6px; color: inherit;
  transition: background-color .15s var(--tf-ease), color .15s, transform .15s var(--tf-ease); }
.t th.num .tf-sort { flex-direction: row-reverse; }
.t th .tf-sort:hover { background: var(--tf-f6); color: var(--tf-fg); }
.t th .tf-sort:active { transform: scale(.97); }
.t th .tf-sort .i { stroke-width: 2.5; opacity: .3; transition: opacity .15s, transform .15s; }
.t th[aria-sort] .tf-sort { color: var(--tf-fg); }
.t th[aria-sort] .tf-sort .i { opacity: 1; }
.t th[aria-sort="ascending"] .tf-sort .i { transform: rotate(180deg); }
#page .tfoot { padding: 8px 0 0 8px; border: 0; font-size: 12px; color: var(--tf-muted); font-variant-numeric: tabular-nums; }

#page .svc { padding: 10px 8px; border-bottom: 0; border-radius: 12px; }
#page .svc .ic, #page .tt-row > .tf-pill { flex: none; }
#page .svc .ic { width: 36px; height: 36px; border-radius: 12px; background: var(--tf-f6); color: var(--tf-muted); }
#page .node-stats .k { font-size: 12px; letter-spacing: 0; text-transform: none; color: var(--tf-muted); }
#page .node-stats .v { font-weight: 500; }
:is(#page, .auth-body) .alert { padding: 10px 14px; border: 0; border-radius: 16px;
  background: color-mix(in oklab, var(--tf-neg) 10%, transparent); color: var(--tf-fg); }
:is(#page, .auth-body) .alert.ok { background: color-mix(in oklab, var(--tf-pos) 12%, transparent); }
:is(#page, .auth-body) .alert.neutral { background: var(--tf-f5); color: var(--tf-muted); }
#page .tt-flash { padding: 0 0 8px; }
#page .tt-row { padding: 10px 8px; border-bottom: 0; }
#page .tt-row > .tf-pill { min-width: 78px; justify-content: center; }
#page .tt-give { padding: 12px 8px 8px; }
#page .tt-quick .on { background: color-mix(in oklab, var(--tf-brand) 15%, transparent); color: var(--tf-brand); box-shadow: none; }
#page .tt-log { margin-top: 4px; padding: 12px; border-top: 0; border-radius: 12px; background: var(--tf-f4); }

#page .jump { align-items: center; height: 44px; border-bottom: 0; }
#page .jump a { height: 28px; margin: 0; padding: 0 12px; border: 0; border-radius: 999px; color: var(--tf-muted);
  transition: color .15s var(--tf-ease), background-color .15s var(--tf-ease); }
#page .jump a:hover { color: var(--tf-fg); }
#page .jump a.on { background: var(--tf-f6); color: var(--tf-fg); }

/* a [data-chart] box tuff.js took over, its old height moved onto the plot */
.chart.tf-chart { height: auto; }
.chart.tf-chart .tf-plot { min-height: 240px; }
.chart.sm.tf-chart .tf-plot { min-height: 180px; }
.chart.xs.tf-chart .tf-plot { min-height: 150px; }
.chart.donut.tf-chart .tf-plot { min-height: 220px; }
#page .heat { color: var(--tf-muted); }
#page .heat .c { border-radius: 20%; background: var(--tf-f5); }
.tip { padding: 8px 12px; border-radius: 12px; background: var(--tf-raised); color: var(--tf-fg); box-shadow: 0 8px 24px rgb(0 0 0 / .14); }
.tip .t1 { font-weight: 500; }
.tip .r b { font-family: var(--tf-mono); font-weight: 400; }

/* the sign-in page, its steps, Steam card, code slots, QR and env line on the same surfaces */
.auth-body .auth-box h1 { font-weight: 600; }
:is(#page, .auth-body) .auth-btn { height: 42px; font-size: 14px; }
.auth-steps li + li::before { background: var(--tf-f10); }
.auth-steps span { background: var(--tf-f6); box-shadow: none; font-weight: 500; }
.auth-steps .on span { background: var(--tf-fg); color: var(--tf-inset); }
.auth-steps .done span { background: color-mix(in oklab, var(--tf-pos) 15%, transparent); color: var(--tf-pos); box-shadow: none; }
.auth-who { padding: 8px 14px 8px 8px; border-radius: 18px; background: var(--tf-surface); box-shadow: none; }
.otp-slots span { height: 56px; border-radius: 14px; background: var(--tf-f6); box-shadow: none; font-weight: 500;
  transition: background-color .15s var(--tf-ease), box-shadow .15s var(--tf-ease); }
.otp-slots i { background: var(--tf-f10); }
.otp.focus .otp-slots span.cur { background: var(--tf-f10); box-shadow: 0 0 0 2px var(--tf-brand); }
.otp.focus .otp-slots span.cur:empty::after { background: var(--tf-brand); }
.qr-box { border-radius: 16px; box-shadow: 0 0 0 6px var(--tf-surface); }
.envline { padding: 6px 6px 6px 14px; border-radius: 18px; background: var(--tf-surface); }
.auth-art { border-radius: 22px; }

@media (max-width: 560px) {
  #page .tt .seg { height: 40px; }
  #page .tt-quick .btn { height: 36px; }
  #page .tt-line .input, #page .tt-line .select { height: 40px; font-size: 16px; }
  #page .tt-go { height: 42px; }
}

/* ---------------------------------------------------------------- date field: its DatePicker and Calendar */

.tf-df { position: relative; }
.tf-df-trigger { display: flex; align-items: center; gap: 8px; width: 100%; height: 40px; padding: 0 16px; border: 0;
  border-radius: 999px; background: var(--tf-f6); color: var(--tf-fg); font: inherit; font-size: 14px; text-align: left;
  cursor: pointer; transition: background-color .15s var(--tf-ease); }
.tf-df-trigger:hover { background: var(--tf-f8); }
.tf-df-trigger:focus-visible, .tf-df.open .tf-df-trigger { background: var(--tf-f10); outline: none; }
.tf-df-trigger[hidden] { display: none; }
.tf-df-trigger .i { width: 16px; height: 16px; flex: none; color: var(--tf-muted); }
.tf-df-trigger .v { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tf-df-trigger .v.ph { color: var(--tf-muted); }
/* the row's height where it sits beside 32px boxes and buttons */
.tf-df.sm .tf-df-trigger { height: 32px; padding: 0 12px; font-size: 13px; }
/* every card a layer of its own, so the one holding an open picker comes up over the next */
.tf-shell:has(.tf-df.open) { position: relative; z-index: 10; }
.tf-df-pop { position: absolute; z-index: 50; top: calc(100% + 8px); left: 0; padding: 12px; border-radius: 20px;
  background: var(--tf-inset); color: var(--tf-fg); font-size: 14px; box-shadow: 0 12px 32px -12px rgb(0 0 0 / .28);
  transform-origin: top left; }
:root.dark .tf-df-pop { background: var(--tf-raised); box-shadow: 0 16px 40px -12px rgb(0 0 0 / .7); }
.tf-df-pop.up { top: auto; bottom: calc(100% + 8px); transform-origin: bottom left; }
.tf-df-pop[hidden] { display: none; }
.tf-cal { width: 280px; user-select: none; }
.tf-cal .hd { display: flex; align-items: center; gap: 4px; margin-bottom: 8px; padding-left: 8px; }
.tf-cal .hd p { flex: 1; font-size: 14px; font-weight: 500; }
.tf-cal .nav { display: inline-flex; align-items: center; justify-content: center; width: 32px; height: 32px; flex: none;
  padding: 0; border: 0; border-radius: 999px; background: none; color: var(--tf-muted); cursor: pointer;
  transition: background-color .15s var(--tf-ease), color .15s var(--tf-ease), transform .15s var(--tf-ease); }
.tf-cal .nav:hover { background: var(--tf-f6); color: var(--tf-fg); }
.tf-cal .nav:active { transform: scale(.97); }
.tf-cal .nav .i { width: 14px; height: 14px; stroke-width: 2.5; }
.tf-cal .wk { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); padding-bottom: 4px; text-align: center;
  font-size: 11px; color: var(--tf-muted); }
.tf-cal .fr { position: relative; overflow: hidden; }
.tf-cal .mo { display: flex; flex-direction: column; gap: 2px; }
.tf-cal .mo.old { position: absolute; top: 0; left: 0; right: 0; pointer-events: none; }
.tf-cal .row { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); }
.tf-cal .cell { display: flex; justify-content: center; }
.tf-cal .day { position: relative; display: flex; align-items: center; justify-content: center; width: 36px; height: 36px;
  padding: 0; border: 0; border-radius: 999px; background: none; color: var(--tf-fg); font: inherit; font-size: 13px;
  font-variant-numeric: tabular-nums; cursor: pointer;
  transition: background-color .15s var(--tf-ease), color .15s var(--tf-ease), transform .15s var(--tf-ease); }
.tf-cal .day:hover { background: var(--tf-f7); }
.tf-cal .day:active { transform: scale(.94); }
.tf-cal .day:focus-visible { outline: 2px solid var(--tf-brand); outline-offset: 1px; }
.tf-cal .day.out { color: color-mix(in oklab, var(--tf-muted) 50%, transparent); }
.tf-cal .day.on { background: var(--tf-brand); color: #fff; font-weight: 500; }
.tf-cal .day[aria-disabled="true"] { cursor: default; text-decoration: line-through; opacity: .35; }
.tf-cal .day[aria-disabled="true"]:hover { background: none; }
.tf-cal .day[aria-disabled="true"]:active { transform: none; }
.tf-cal .day .now { position: absolute; bottom: 4px; width: 12px; height: 2px; border-radius: 999px; background: var(--tf-brand); }
.tf-cal .day.on .now { background: #fff; }

/* ---------------------------------------------------------------- creators */

.cr-vid { display: flex; align-items: center; gap: 10px; min-width: 0; }
.cr-vid .tx { display: flex; align-items: center; gap: 8px; min-width: 0; }
.cr-vid .n { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 500; color: var(--tf-fg); }
.cr-vid a.n:hover { text-decoration: underline; text-underline-offset: 3px; }
.cr-thumb { position: relative; display: block; width: 64px; height: 36px; flex: none; overflow: hidden; border-radius: 8px;
  background: var(--tf-f6); }
.cr-thumb img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.cr-thumb i { position: absolute; right: 3px; bottom: 3px; padding: 0 4px; border-radius: 4px; background: rgb(0 0 0 / .72);
  color: #fff; font-family: var(--tf-mono); font-size: 10px; font-style: normal; line-height: 15px; }
tr[data-video] { cursor: pointer; }
dialog.cr-card { width: min(420px, calc(100vw - 32px)); max-height: calc(100dvh - 32px); padding: 0; border: 0;
  overflow: auto; background: none; color: var(--tf-fg); }
dialog.cr-card[open] { animation: tf-pop .2s var(--tf-ease); }
dialog.cr-card::backdrop { background: rgb(0 0 0 / .45); }
.cr-shot { position: relative; aspect-ratio: 16 / 9; margin-bottom: 6px; overflow: hidden; border-radius: 16px;
  background: var(--tf-f6); }
.cr-shot img { display: block; width: 100%; height: 100%; object-fit: cover; }
.cr-shot i { position: absolute; right: 8px; bottom: 8px; padding: 1px 6px; border-radius: 6px; background: rgb(0 0 0 / .72);
  color: #fff; font-family: var(--tf-mono); font-size: 12px; font-style: normal; }
.cr-shot i:empty { display: none; }
.cr-top { display: flex; align-items: flex-start; gap: 8px; }
.cr-top h2 { flex: 1; min-width: 0; font-size: 15px; font-weight: 500; line-height: 1.4; overflow-wrap: anywhere; }
.cr-meta { margin-top: 2px; font-size: 13px; color: var(--tf-muted); }
.cr-meta a { color: var(--tf-fg); }
.cr-nums { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; margin-top: 14px; }
.cr-nums div { min-width: 0; padding: 10px 12px; border-radius: 12px; background: var(--tf-f4); }
.cr-nums span { display: block; font-size: 12px; color: var(--tf-muted); }
.cr-nums b { display: block; font-size: 17px; font-weight: 500; font-variant-numeric: tabular-nums; overflow: hidden;
  text-overflow: ellipsis; white-space: nowrap; }
.cr-why { margin-top: 12px; font-size: 13px; color: var(--tf-muted); }
.cr-do { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.cr-do .tf-btn.danger { background: color-mix(in oklab, var(--tf-neg) 12%, transparent); }
.cr-do .tf-btn.danger:hover { background: color-mix(in oklab, var(--tf-neg) 18%, transparent); }
.cr-do [hidden] { display: none; }
.cr-x { width: 1%; text-align: right; }
.cr-add, .cr-line { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.cr-add { padding: 10px 8px 6px; }
#page .cr-add .input { flex: 1 1 220px; }
.cr-pay { display: flex; flex-direction: column; gap: 8px; padding: 8px 8px 12px; }
#page .cr-pay .input[name="note"] { width: 100%; }
.cr-pay .tf-btn { align-self: flex-start; }
.cr-money { position: relative; display: flex; min-width: 0; }
.cr-line .cr-money { flex: 1 1 120px; }
.cr-line .tf-df { flex: 1 1 140px; min-width: 0; }
.cr-money > b { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); color: var(--tf-muted); font-size: 13px;
  font-weight: 400; pointer-events: none; }
#page .cr-money .input { width: 100%; padding-left: 26px; }
.cr-note { margin-top: 12px; padding: 10px 12px; border-radius: 12px; background: var(--tf-f4); font-size: 13px; white-space: pre-wrap;
  overflow-wrap: anywhere; }
.cr-terms { display: flex; flex-direction: column; gap: 6px; margin-top: 12px; padding: 10px 12px; border-radius: 12px;
  background: var(--tf-f4); font-size: 13px; }
.cr-term { display: flex; align-items: baseline; gap: 10px; }
/* a payout a creator asked for on their own site, waiting to be marked paid or declined */
.cr-asked { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; min-width: 0; padding: 10px 12px; border-radius: 12px;
  background: color-mix(in oklab, var(--tf-warn) 10%, transparent); font-size: 13px; }
.cr-asked + .cr-asked { margin-top: 4px; }
.cr-asked .grow { flex: 1 1 200px; }
.cr-asked .acts { display: flex; align-items: center; gap: 4px; margin-left: auto; }
.cr-asked b { font-weight: 500; }
.cr-asked.in { margin: 8px 8px 0; }

.cr-fields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px 20px; }
.cr-field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.cr-field.wide { grid-column: 1 / -1; }
.cr-field > span:first-child { font-size: 13px; font-weight: 500; }
.cr-field small { font-size: 12px; line-height: 1.45; color: var(--tf-muted); }
#page .cr-field .input { width: 100%; }
#page .cr-field .seg { align-self: flex-start; }
#page .cr-field .cr-n { width: 96px; flex: none; }
.cr-field textarea { width: 100%; min-height: 64px; padding: 10px 14px; border: 0; border-radius: 16px; outline: none; resize: vertical;
  background: var(--tf-f6); color: var(--tf-fg); font: inherit; font-size: 13px; line-height: 1.5;
  transition: background-color .15s var(--tf-ease); }
.cr-field textarea:hover { background: var(--tf-f8); }
.cr-field textarea:focus { background: var(--tf-f10); }
.cr-field textarea::placeholder { color: var(--tf-muted); }
.cr-chans { display: flex; flex-direction: column; gap: 2px; margin-bottom: 4px; }
.cr-chan { display: flex; align-items: center; gap: 10px; min-width: 0; padding: 8px 10px; border-radius: 12px;
  background: var(--tf-f4); cursor: pointer; }
.cr-chan .grow { display: flex; flex-direction: column; }
.cr-chan b { font-weight: 500; }
.cr-off { display: inline-flex; align-items: center; gap: 6px; flex: none; font-size: 12px; color: var(--tf-muted); }
.cr-chan:has(input:checked) { background: color-mix(in oklab, var(--tf-neg) 10%, transparent); }
.cr-chan:has(input:checked) .cr-off { color: var(--tf-neg); }
.cr-acts { display: flex; justify-content: flex-end; gap: 8px; padding: 12px 6px 4px; }
.cr-danger .grow p { margin-top: 2px; }
@media (max-width: 640px) { .cr-fields { grid-template-columns: minmax(0, 1fr); } }

/* ---------------------------------------------------------------- motion */

@keyframes tf-rise { from { opacity: 0; transform: translateY(6px); } }
@keyframes tf-pop { from { opacity: 0; transform: scale(.97); } }
@keyframes tf-fade { from { opacity: 0; } }
@keyframes tf-slide { from { transform: translateX(-105%); } }
@keyframes tf-blink { 50% { opacity: 0; } }
@keyframes tf-shimmer { from { background-position: 100% 0; } to { background-position: -100% 0; } }
@keyframes tf-pulse { 50% { opacity: .35; } }
@keyframes tf-draw { from { stroke-dashoffset: 1; } to { stroke-dashoffset: 0; } }
.tf-draw { stroke-dasharray: 1; animation: tf-draw .8s var(--tf-ease) both; }
@media (prefers-reduced-motion: reduce) {
  .tf-stat, .da-msg, .da-msg.fresh, .da-follow button, .da-card, .da-queue li, .tf-tip, .da-jump, .da-drawer .sc,
  .da-drawer .pn, .da-text .w, dialog.cr-card[open] { animation: none !important; }
  .da-caret, .tf-spin, .da-shimmer, .tf-pill .dot.pulse, #page .badge .dot.pulse { animation: none; }
  .da-shimmer { color: var(--tf-muted); background: none; }
  .tf-bar > i, .da-side, .da-fold { transition: none; }
}
