/* The Today workspace (#376). Scoped under .today-view; the shared language comes from method.css. */
.today-view .today-intro h1 { margin:0 0 6px; }
.today-view .today-intro .sub { color:var(--m-ink-soft); line-height:1.55; max-width:72ch; }
/* Two columns on a desktop, one on a phone; each column keeps its cards in order. */
.today-view .today-grid { display:grid; grid-template-columns:repeat(auto-fit, minmax(min(100%, 420px), 1fr)); gap:18px; align-items:start; margin-top:18px; }
.today-view .today-card { border:1px solid var(--m-rule); border-radius:8px; padding:16px 18px; background:var(--m-card); overflow-wrap:anywhere; }
.today-view .today-card[data-state="unreadable"] { border-left:3px solid var(--m-warn); }
.today-view .today-card[data-state="not-loaded"], .today-view .today-card[data-state="not-recorded"] { border-style:dashed; }
.today-view .today-head { display:flex; flex-wrap:wrap; gap:6px 12px; align-items:baseline; justify-content:space-between; }
.today-view .today-head h2 { margin:0; }
.today-view .today-state { font-size:.8rem; font-weight:600; padding:2px 8px; border-radius:4px; border:1px solid var(--m-rule); background:var(--m-ground); }
.today-view .today-card[data-state="unreadable"] .today-state { background:var(--m-warn-ground); color:var(--m-warn); }
.today-view .today-asof { margin:8px 0; color:var(--m-ink-soft); line-height:1.5; }
.today-view .today-detail { padding:10px 12px; border-radius:6px; background:var(--m-warn-ground); color:var(--m-ink); line-height:1.5; }
.today-view .today-card h3 { margin:14px 0 6px; font-size:1rem; }
.today-view .today-phase { margin:6px 0; line-height:1.5; }
.today-view .today-meta, .today-view .today-why { color:var(--m-ink-soft); line-height:1.5; }
.today-view .today-empty { color:var(--m-ink-soft); }
.today-positions-tabs { display:flex; flex-wrap:wrap; gap:8px; margin:12px 0; }
.today-positions-tabs button { min-height:44px; padding:8px 12px; border:1px solid var(--line-strong, var(--m-rule)); border-radius:6px; background:var(--m-card); color:var(--m-ink); font:inherit; cursor:pointer; }
.today-positions-tabs button[aria-pressed="true"] { font-weight:700; border:2px solid var(--m-accent); padding:7px 11px; background:var(--m-ground); }
.today-positions-tabs button:focus-visible { outline:2px solid var(--m-accent); outline-offset:3px; }
.today-view .today-list { list-style:none; padding:0; margin:0; }
.today-view .today-list li { padding:8px 0; border-top:1px solid var(--m-rule); display:flex; flex-wrap:wrap; gap:4px 10px; align-items:baseline; }
.today-view .today-list li:first-child { border-top:0; }
.today-view .today-why { flex-basis:100%; font-size:.9rem; }
.today-view .today-task { font-size:.8rem; font-weight:600; padding:2px 6px; border-radius:4px; border:1px solid var(--m-rule); }
.today-view .today-task[data-task="review"] { background:var(--m-warn-ground); color:var(--m-warn); }
.today-view .today-open { font:inherit; color:var(--m-accent); background:none; border:0; padding:8px 0; min-height:44px; text-decoration:underline; cursor:pointer; }
.today-view .today-opens { display:flex; flex-wrap:wrap; gap:0 18px; }
.today-view .today-counts { display:grid; gap:2px; margin:6px 0; }
.today-view .today-counts > div { display:grid; grid-template-columns:minmax(96px, 9rem) 1fr; gap:4px 10px; padding:4px 0; border-bottom:1px solid var(--m-rule); }
.today-view .today-counts dt { font-weight:600; }
.today-view .today-counts dd { margin:0; font-variant-numeric:tabular-nums; }

/* IS432: reasons and an Open position action on every Today position row. */
.today-view .today-reasons { flex-basis:100%; margin:2px 0 0; padding-left:1.1rem; font-size:.9rem; }
.today-view .today-reasons li { display:list-item; border:0; padding:1px 0; }
.today-view .today-open-position { display:inline-flex; align-items:center; margin-left:auto; min-height:44px; padding:2px 12px; border:1px solid var(--m-rule); border-radius:4px; color:inherit; background:transparent; font:inherit; font-weight:600; text-decoration:none; }
.today-view .today-open-position:hover { text-decoration:underline; }
.today-view .today-open-position:focus-visible { outline:2px solid var(--m-accent); outline-offset:2px; }

/* #487: the four Bounce slots on the Setups card — each family·direction
   named, its setup/forming counts as real links, qualifying symbols listed
   with their evidence dates. */
.today-slots { display: grid; gap: 12px; margin: 8px 0; }
.today-slot h3 { margin: 0 0 2px; font-size: 1rem; }
.today-slot-counts { display: flex; flex-wrap: wrap; gap: 4px 14px; margin: 0 0 4px; }
.today-count { display: inline-flex; align-items: center; gap: 5px; min-height: 44px; color: var(--ink); }
.today-count strong { font-size: 1.1rem; }
.today-open-detail { display: inline-block; margin-left: 8px; }
.today-setup-filter { display: flex; align-items: center; gap: 10px; min-height: 44px; width: fit-content; max-width: 100%; cursor: pointer; font-weight: 600; }
.today-setup-filter input { width: 20px; height: 20px; margin: 0; accent-color: var(--m-accent); }
.today-setup-filter:focus-within { outline: 2px solid var(--m-accent); outline-offset: 3px; border-radius: 3px; }
@media (min-width: 900px) { .today-slots { grid-template-columns: 1fr 1fr; } }

/* #423: the Open position action reads the page ink in both themes; it set
   no colour, so in dark mode its label was dark on dark. The stronger border
   gives the control 3:1 against the card. Kept apart from the IS432/#503
   rule above so either can change without the other. */
.today-view .today-open-position { color: var(--m-ink); border-color: var(--line-strong, var(--m-rule)); }

/* #487: the account strip's slot on Today — same strip as the Setups
   overview carries, between the intro and the cards. */
.today-strip-slot { margin: 4px 0 14px; }
.today-strip-slot:empty { margin: 0; }

/* #492: the cards are one flat sequence. On the phone they stack; on
   desktop they flow down two balanced columns (like the fixed split before),
   so the DOM order is the one logical order on both. */
@media (min-width: 900px) {
  .today-view .today-grid { display: block; column-count: 2; column-gap: 18px; }
  .today-view .today-card { break-inside: avoid; margin-bottom: 18px; }
}

/* #492: arrange mode. The bar sits in the intro; while arranging, the start
   button hides and the active controls show. Cards carry Earlier/Later move
   buttons (44px touch targets) and are draggable; the mode is visible in
   outline and cursor as well as the controls, never colour alone. */
.today-arrange-bar { margin: 2px 0 6px; }
.today-arrange-active { display: inline-flex; gap: 10px; flex-wrap: wrap; }
.today-arrange-bar button { min-height: 44px; padding: 8px 14px; }
.today-view[data-arranging] .today-arrange-start { display: none; }
.today-view:not([data-arranging]) .today-arrange-active { display: none; }
.today-view[data-arranging] .today-card { outline: 2px dashed var(--line, #b8b0a0); outline-offset: 2px; }
.today-move { display: flex; gap: 10px; margin: -4px 0 10px; }
.today-move button {
  min-height: 44px; min-width: 44px; padding: 8px 14px; flex: 1;
  font: inherit; font-weight: 600; cursor: pointer;
}
.today-move button:disabled { opacity: 0.45; cursor: default; }
/* Outside arrange mode the cards are ordinary content: text selection,
   links and scrolling behave exactly as before — the move bars only exist
   in the DOM while arranging. */

/* #504: the Run Into Earnings rows — one compact row per report. The symbol
   is the row's link (44px target); days and the report day read down a
   column; the "Elsewhere on Setups" line is labelled context in worded chips,
   so nothing depends on colour and nothing reads as the checklist's result.
   Two-line rows at every width: the card is about 540px even on a wide
   desktop. */
.today-view .today-earnings-count { display:inline-block; margin-left:6px; padding:0 7px; border-radius:999px; background:var(--m-ink); color:var(--m-card); font-size:.8rem; font-variant-numeric:tabular-nums; }
.today-view .today-earnings-rows { list-style:none; margin:4px 0 0; padding:0; }
.today-view .today-earnings-row { display:grid; grid-template-columns:4.75rem 1fr; gap:0 12px; align-items:baseline; padding:4px 0 8px; border-top:1px solid var(--m-rule); }
.today-view .today-earnings-row:first-child { border-top:0; }
.today-view .today-earnings-id { grid-column:1 / -1; }
.today-view .today-earnings-sym { display:inline-flex; align-items:center; min-height:44px; font-family:'IBM Plex Mono', ui-monospace, monospace; font-weight:700; color:var(--j-action, var(--action, #1d4f91)); text-underline-offset:3px; }
.today-view .today-earnings-days { font-variant-numeric:tabular-nums; }
.today-view .today-earnings-when { color:var(--m-ink-soft); }
.today-view .today-earnings-context { grid-column:1 / -1; display:flex; flex-wrap:wrap; gap:4px 6px; align-items:baseline; margin-top:4px; font-size:.85rem; color:var(--m-ink-soft); }
.today-view .today-earnings-chip { padding:1px 9px; border-radius:999px; border:1px solid var(--m-rule); font-weight:600; color:var(--m-ink); }
.today-view .today-earnings-chip[data-kind="setup"] { border-color:currentColor; }
.today-view .today-earnings-chip[data-kind="forming"], .today-view .today-earnings-chip[data-kind="shortlist"] { border-style:dashed; }
.today-view .today-earnings-chip[data-kind="none"], .today-view .today-earnings-chip[data-kind="unread"] { border-color:transparent; padding-inline:0; color:var(--m-ink-soft); }
.today-view .today-earnings-more summary { display:flex; align-items:center; min-height:44px; cursor:pointer; font-weight:600; color:var(--j-action, var(--action, #1d4f91)); }
/* display:flex drops the native disclosure triangle; draw it back so the fold reads as one. */
.today-view .today-earnings-more summary::before { content:'▸'; margin-right:6px; }
.today-view .today-earnings-more[open] summary::before { content:'▾'; }
.today-view [data-today-earnings-unjudged] { color:var(--j-action, var(--action, #1d4f91)); }

/* Issue505: the live layout previews its exact linear insertion slot. */
.today-arrange-bar button, .today-move button {
  border: 1px solid var(--line-strong, var(--m-rule));
  background: var(--surface, var(--m-card)); color: var(--ink, var(--m-ink));
  border-radius: 6px;
}
.today-arrange-bar button:hover, .today-move button:not(:disabled):hover { background: var(--hover, var(--m-ground)); }
.today-arrange-hint { margin: 8px 0; color: var(--ink, var(--m-ink)); line-height: 1.5; }
.today-arrange-hint:empty { display: none; }
.today-move { flex-wrap: wrap; align-items: center; }
.today-drag-handle { display: inline-flex; align-items: center; min-height: 44px; padding: 0 10px; cursor: grab; touch-action: none; user-select: none; font-weight: 600; }
.today-drag-handle:active { cursor: grabbing; }
.today-view .today-drop-slot { position: relative; border: 2px dashed var(--m-accent); background: var(--m-ground); outline: 0; }
.today-drop-slot > * { visibility: hidden; }
.today-drop-slot::after { content: attr(data-drop-label); position: absolute; top: 14px; left: 14px; max-width: 100px; padding: 8px; border-radius: 6px; background: var(--surface, var(--m-card)); color: var(--ink, var(--m-ink)); font-weight: 700; }
.today-drag-floating { max-width: min(240px, calc(100vw - 32px)); max-height: 110px !important; overflow: hidden; padding: 12px 16px; border: 2px solid var(--m-accent); border-radius: 8px; background: var(--surface, var(--m-card)); color: var(--ink, var(--m-ink)); box-shadow: 0 10px 30px #0003; opacity: .95 !important; pointer-events: none; }
.today-drag-floating > :not(.today-head) { display: none; }
.today-drag-floating .today-head { display: flex; gap: 12px; align-items: center; justify-content: space-between; }
.today-drag-floating h2 { margin: 0; font-size: 1.1rem; }
