/* modeldash.css — the per-model dashboard panel.
 *
 * One row per model the person has actually used: tokens, cost, turns and a
 * one-tap trust rating, read straight off the local cost ledger and the local
 * rating store. The layout borrows spend.css's table and stat conventions
 * (same variables, same rhythm) rather than inventing a second visual
 * language for a screen that sits one click away from Spending. */

.mdash-view {
	height: 100%;
	overflow-y: auto;
	overflow-x: hidden;
	padding: 16px 10px 24px;
	font-size: var(--fs-sm);
	color: var(--text-primary);
}

/* As Spending's: a section ends flush, and the break before the next one is the token its head owns (r535 U3). */
.mdash-sec { margin: 0; }
.mdash-sec + .mdash-sec { margin-top: var(--gap-section); }
.mdash-sec > :last-child { margin-bottom: 0; }

/* Two block lines, not a wrap (layout_contract.md V7): a wide hint -- French's
   own -- dropped under the title only in that locale, since flex-wrap decides
   per string width. The title and its hint now always keep their own line. */
.mdash-sec-head {
	display: block;
	margin: 0 0 10px;
}
.mdash-sec-title {
	margin: 0;
	font-size: var(--fs-lg);
	font-weight: 600;
	letter-spacing: 0.01em;
}
.mdash-sec-hint {
	display: block;
	margin-top: 2px;
	font-size: var(--fs-2xs-xs);
	color: var(--text-muted);
}

/* The "this is a preview, nothing is sent" note. Quiet, not a warning. */
.mdash-note {
	color: var(--text-secondary);
	font-size: var(--fs-xs-sm);
	line-height: 1.5;
	background: var(--bg-tertiary);
	border: 1px solid transparent;
	border-radius: var(--radius);
	padding: 12px 14px;
	margin: 0 0 14px;
}

/* Week / Month toggle, the same shape as Spending's. */
.mdash-toggle {
	display: inline-flex;
	gap: 2px;
	padding: 2px;
	background: var(--bg-tertiary);
	border: 1px solid var(--border-strong);
	border-radius: var(--radius-sm);
	margin: 0 0 12px;
}
.mdash-toggle-btn {
	appearance: none;
	border: 0;
	background: transparent;
	color: var(--text-secondary);
	font: inherit;
	font-size: var(--fs-xs);
	padding: 3px 12px;
	border-radius: var(--radius-sm);
	cursor: pointer;
}
.mdash-toggle-btn.on {
	background: var(--bg-secondary);
	color: var(--text-primary);
	box-shadow: 0 1px 2px rgba(0, 0, 0, 0.15);
}

.mdash-empty {
	color: var(--text-muted);
	font-size: var(--fs-xs);
	padding: 10px 0;
}

/* The model table. */
.mdash-table {
	width: 100%;
	border-collapse: collapse;
	margin: 4px 0 8px;
	font-size: var(--fs-xs);
	/* At dock width the table was crushed to one letter per line -- "moc /
	   k/fa / st" -- rather than scrolling (sweep item 3, every skin). */
	display: block;
	overflow-x: auto;
	max-width: 100%;
}
.mdash-table th {
	text-align: left;
	font-weight: 600;
	color: var(--text-muted);
	font-size: var(--fs-2xs);
	padding: 4px 8px 4px 0;
	border-bottom: 1px solid var(--border);
	white-space: nowrap;
}
.mdash-table td {
	padding: 6px 8px 6px 0;
	border-bottom: 1px solid var(--border);
	color: var(--text-secondary);
	vertical-align: middle;
	white-space: nowrap;
}
.mdash-table th.num,
.mdash-table td.num {
	text-align: right;
	font-variant-numeric: tabular-nums;
	padding-right: 0;
	/* Nowrap alone (sweep item 3) stopped a figure breaking letter by letter,
	   but every numeric column already carried zero padding on BOTH sides
	   that face its neighbour -- this one's own left, the previous one's
	   right, already 0 -- so two short, no-longer-wrapping heads now sat
	   flush against each other: "TurnsTokens inTokens out". A left gap on
	   every numeric column gives each the space its neighbour was never
	   going to provide; the right edge stays 0, flush for the last column. */
	padding-left: 12px;
	white-space: nowrap;
}
/* A `.num` column's own right padding is 0 (its left gap above already
   separates it from the PREVIOUS numeric head), so a non-numeric head
   straight after one -- "Trust" after "Fail %" -- had nothing on either
   side and read as "Fail %Trust" once the table scrolled right. */
.mdash-table th.num + th:not(.num),
.mdash-table td.num + td:not(.num) {
	padding-left: 12px;
}
/* The last column's flush right edge (above) assumes the table is not
   scrolling; on the phone it is (this table's own overflow-x: auto), and
   the last column then sat flush against the SCROLLER's edge, which the
   panel's own padding then cut by a further few pixels (§11: "Median" and
   its figure cut 9px). The table's own right padding restores the panel's
   gutter once scrolling is what "flush" is measured against. */
@media (max-width: 760px) {
	/* R14 (D-20260929-03 r526 residual): the view itself clipped 3px off the
	   last numeric column ("Median", its figure) -- the table's own scroller
	   (above) was not the only `overflow-x: hidden` in the chain. */
	.mdash-view { overflow-x: auto; }
	.mdash-table th:last-child,
	.mdash-table td:last-child { padding-right: 12px; }
}
.mdash-table td.mdash-model {
	color: var(--text-primary);
	font-family: var(--font-mono);
	font-size: var(--fs-2xs);
	word-break: break-all;
}
.mdash-default-badge {
	display: inline-block;
	margin-left: 6px;
	padding: 0 6px;
	border-radius: 999px;
	background: var(--bg-hover);
	color: var(--text-muted);
	font-size: var(--fs-3xs-2xs);
	vertical-align: middle;
}

.mdash-divider {
	height: 1px;
	background: var(--border);
	margin: 16px 0 14px;
}

/* What the contribution preview lists as not yet tracked -- honest about the
   gap rather than a row that quietly reads zero. */
.mdash-gap {
	color: var(--text-muted);
	font-size: var(--fs-2xs-xs);
	line-height: 1.5;
	margin: 0 0 14px;
}
