/* Dashboard-Learning review tab. Standalone, namespaced `dl-*`; uses the app's theme
   tokens (every palette, light/dark), the shared radius scale and the card / label /
   button / table vocabulary surface.css defines. Responsive at 760px. Mirrors the
   relationships.css conventions.

   The architecture is the shared one: a tinted ground with discrete cards floating on
   it. The control surface and every suggested edit are separate objects with a gap
   between them, never a continuous hairline-divided sheet — a hairline appears only
   INSIDE a card, joining an edit's head to its expanded body, or ruling the rows of the
   weight table. Labels are tracked mono capitals, weights are mono and tabular. */

/* The view's top padding now comes from `.view` in surface.css, which is what floats the
   first card clear of the sticky header; the old `padding: 0` here predates that rule and
   only fought it. The stack is a flex column, so hiding a block cannot leave its margin
   behind — every gap belongs to the container, not to the children. */
.dl-wrap {
  display: flex;
  flex-direction: column;
  gap: clamp(9px, 1vw, 13px);
  padding-bottom: 24px;
}

/* Loading / disabled / "no suggested edits yet" all land in this box, so it is a card
   too — an empty state on the bare ground reads as a page that failed to draw. */
.dl-empty {
  padding: 40px 24px; color: var(--text-muted); font-size: 14px; text-align: center;
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--r-lg); box-shadow: var(--shadow-1);
}
.dl-faint { color: var(--text-faint); }
/* Every weight, date and before/after value on this page lines up in a column, so it
   is mono and tabular. */
.dl-mono { font-family: var(--font-mono); font-variant-numeric: tabular-nums; }

.dl-controls {
  display: flex; align-items: baseline; justify-content: space-between; gap: 12px;
  flex-wrap: wrap;
  padding: clamp(13px, 1.2vw, 18px);
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--r-lg); box-shadow: var(--shadow-1);
}
/* Headline in the serif, gloss in the UI face — the shared .sec-head / .sec-note
   pairing. The gloss is what keeps the heading from reading as jargon, so it is
   deliberately not shrunk to a footnote. */
.dl-title { font: 600 18px/1.3 var(--font-display); letter-spacing: -.015em; color: var(--text); }
.dl-title .dl-faint { font: 400 12px/1.5 var(--font-sans); color: var(--text-muted); }

.dl-filters { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
/* The buttons ride the shared `.btn` (mono, tracked, --r-md, hover + press): only the
   deltas live here. A filter's resting state is quieter than an action's, so it steps
   down from the accent text `.btn` gives, and its selected state is the filled accent. */
.dl-fbtn { color: var(--text-2); }
.dl-fbtn--on,
.dl-fbtn--on:hover { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
/* The counts strip stays a caption on the ground rather than becoming a second box
   above the edits: it describes the list below it. */
.dl-summary {
  font: 400 11.5px/1.5 var(--font-mono); font-variant-numeric: tabular-nums;
  letter-spacing: .04em; padding: 0 2px;
}
.dl-notice {
  font-size: 12px; padding: 10px 14px; border-radius: var(--r-lg);
  border: 1px solid var(--warn-edge); color: var(--warn-text); background: var(--warn-tint);
}

.dl-tone--good { color: var(--bull-text); }
.dl-tone--warn { color: var(--warn-text); }
.dl-tone--bad { color: var(--bear-text); }
.dl-tone--neutral { color: var(--text-muted); }

/* One suggested edit, one card; the card clips so a head's hover fill follows its
   corners instead of squaring them off. */
.dl-card {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--r-lg); box-shadow: var(--shadow-1);
  overflow: hidden;
}
.dl-head {
  display: flex; align-items: center; gap: 10px;
  padding: 11px 14px; cursor: pointer;
  transition: background-color var(--dur-micro) var(--ease-out);
}
.dl-head:hover { background: var(--surface-sunken); }
.dl-tw { color: var(--text-muted); width: 12px; }
.dl-status {
  font: 500 10.5px/1 var(--font-mono); letter-spacing: .12em; text-transform: uppercase;
  white-space: nowrap;
}
/* which competition silo the suggested edit came from (currency-strength / pairs-picks). */
.dl-silo {
  font: 500 9px/1 var(--font-mono); text-transform: uppercase; letter-spacing: .12em;
  color: var(--text-faint); border: 1px solid var(--line2);
  border-radius: var(--r-sm); padding: 4px 7px; white-space: nowrap;
}
.dl-target { font-size: 13px; color: var(--text); }
.dl-change { font-size: 11px; color: var(--text-2); flex: 1; }
.dl-when { font: 400 11px/1 var(--font-mono); font-variant-numeric: tabular-nums; white-space: nowrap; }

/* The expanded detail steps DOWN a rung onto the sunken tier, as a nested surface
   should, and the hairline is the head/body join inside one card — not a sheet rule. */
.dl-body {
  padding: 12px 14px 14px 34px;
  border-top: 1px solid var(--line);
  background: var(--surface-sunken);
}
/* The page's eyebrow: tracked mono capitals in the quietest tier, so a block can be
   introduced without a heading big enough to compete with what it labels. */
.dl-sub {
  font: 500 10.5px/1.4 var(--font-mono); letter-spacing: .16em;
  text-transform: uppercase; color: var(--colhead); margin: 12px 0 5px;
}

/* The weight diff is the one real data grid here, so it takes the table-card shape:
   the CARD rounds and clips, the CELLS stay square. Everything the shared table rules
   already say — the mono tracked header on the sunken tier, the hairline-ruled square
   cells, the row hover — is deliberately not restated. */
/* overflow-x rather than hidden: it still clips the header fill to the rounded
   corners, but a table too wide for a narrow card scrolls instead of losing a column. */
.dl-tablecard {
  margin: 4px 0 10px;
  border: 1px solid var(--line); border-radius: var(--r-md);
  background: var(--surface); overflow-x: auto;
}
.dl-diff { font-size: 12px; min-width: 260px; }
.dl-diff td { color: var(--text-2); }
.dl-diff-row--chg td { color: var(--text); font-weight: 600; }
.dl-diff-row--chg td:last-child { color: var(--bull-text); }

.dl-textdiff { overflow-x: auto; }
.dl-before, .dl-after {
  font-family: var(--font-sans); font-size: 11px; white-space: pre-wrap;
  padding: 9px 11px; margin: 2px 0 8px; border-radius: var(--r-md); line-height: 1.5;
}
/* Diff washes. These were var(--del) / var(--add), neither of which the SPA defines,
   so the hard-coded dark rgba fallback is what actually painted - in light mode too. */
.dl-before { background: var(--bear-tint); }
.dl-after { background: var(--bull-tint); }

.dl-why { font-size: 12px; color: var(--text-2); line-height: 1.55; margin: 6px 0; }
.dl-prov { font-size: 12px; margin: 6px 0; }
.dl-resolved { font-size: 12px; margin: 6px 0; }

.dl-actions { display: flex; gap: 8px; margin-top: 10px; }
.dl-btn--approve { border-color: var(--bull-text); color: var(--bull-text); }
.dl-btn--approve:hover:not([disabled]) { background: var(--bull-tint); border-color: var(--bull-text); }
.dl-btn--reject { border-color: var(--bear-text); color: var(--bear-text); }
.dl-btn--reject:hover:not([disabled]) { background: var(--bear-tint); border-color: var(--bear-text); }
.dl-btn[disabled] { opacity: .5; cursor: default; }

.dl-foot { font: 400 11px/1.55 var(--font-sans); padding: 2px 2px 0; }

@media (max-width: 760px) {
  .dl-head { flex-wrap: wrap; }
  .dl-change { order: 3; width: 100%; flex-basis: 100%; }
  .dl-body { padding-left: 16px; }
}
