/* idetik Faculty Dashboard — Course Packs workspace.

   Measurements taken from ../idetik/Developer Dashboard.dc.html (read
   2026-08-18), not approximated:
     workspace back link  13px #8F8474, 13px chevron, hover #C9A87A
     identity tile        40px, 11px radius, gradient rgba(201,168,122,.25→.08)
     workspace title      19px/800 -0.02em
     status pill          12px/700, 6px dot, bg rgba(237,230,217,.05),
                          border rgba(237,230,217,.08), 999px, 3px 10px
     tab strip            2px gap, 1px bottom hairline @0.08, 8px 13px tabs,
                          2px active underline, colour .13s ease
     key/value rows       150px key #8F8474, value #D8CFBE, 7px 0, hairline @0.05
     version timeline     10px dot ringed in #211D18, 1.5px connector @0.09
*/

/* ══ Page header with a trailing action ══ */
.page-head.with-action {
  display: flex; align-items: flex-start; gap: 16px;
}
.page-head.with-action > :first-child { flex: 1; min-width: 0; }

/* ══ Buttons: the danger and small variants ══ */
.btn-sm { min-height: 32px; padding: 0 11px; font-size: 15px; }
.btn-danger { background: var(--danger); border-color: var(--danger); color: #fff; }
.btn-danger:hover { background: #E15757; border-color: #E15757; color: #fff; }
.btn.is-on { border-color: rgba(201, 178, 143, 0.5); color: var(--tan); }

.icon-btn {
  display: inline-grid; place-items: center;
  width: 30px; height: 30px; flex: none;
  border: 0; border-radius: 7px; background: transparent;
  color: var(--text-3); cursor: pointer;
  transition: background 0.12s ease, color 0.12s ease;
}
.icon-btn:hover { background: rgba(237, 230, 217, 0.06); color: var(--text); }
.icon-btn.is-danger:hover { background: rgba(214, 69, 69, 0.12); color: #E88C8C; }

/* ══ Workspace header ══ */
.view.is-workspace { padding-top: 22px; }

.ws-back {
  display: inline-flex; align-items: center; gap: 6px;
  border: 0; background: none; padding: 0;
  font-family: inherit; font-size: 15.5px; color: var(--text-2);
  cursor: pointer; margin-bottom: 12px;
  transition: color 0.13s ease;
}
.ws-back:hover { color: var(--accent); }

.ws-id { display: flex; align-items: center; gap: 14px; }
.ws-tile {
  width: 40px; height: 40px; border-radius: 11px; flex: none;
  background: linear-gradient(135deg, rgba(201, 168, 122, 0.25), rgba(201, 168, 122, 0.08));
  border: 1px solid rgba(201, 168, 122, 0.25);
  display: grid; place-items: center; color: var(--accent);
}
.ws-titlerow { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.ws-title { font-size: 23px; font-weight: 800; letter-spacing: -0.02em; margin: 0; }
.ws-sub { font-size: 15.5px; color: var(--text-2); margin-top: 2px; }
.ws-actions { display: flex; gap: 8px; flex: none; }

/* Two pills, because status is two axes. */
.pill {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 14.5px; font-weight: 700;
  background: rgba(237, 230, 217, 0.05);
  border: 1px solid rgba(237, 230, 217, 0.08);
  border-radius: 999px; padding: 3px 10px;
  white-space: nowrap;
}
.pill-dot { width: 6px; height: 6px; border-radius: 50%; background: currentColor; flex: none; }
.pill.is-live { color: var(--green); }
.pill.is-none { color: var(--text-3); }
.pill.is-draft { color: var(--tan); }
.pill.is-ready { color: var(--accent); }

.view.is-workspace .tabs { margin: 16px 0 20px; border-bottom-color: rgba(237, 230, 217, 0.08); }
.view.is-workspace .tab { padding: 8px 13px; }

/* ══ Cards, meters, key/value ══ */
.card-note { font-size: 15px; color: var(--text-3); margin-left: auto; }
.card-body-text { font-size: 15.5px; color: var(--text-2); line-height: 1.6; }
.card-actions { display: flex; gap: 9px; margin-top: 14px; flex-wrap: wrap; }
.card.is-focus { border-color: rgba(201, 168, 122, 0.28); background: linear-gradient(180deg, rgba(201, 168, 122, 0.05), transparent 60%), var(--panel); }

.meter { height: 5px; border-radius: 999px; background: rgba(237, 230, 217, 0.07); overflow: hidden; margin: 4px 0 12px; }
.meter-fill { height: 100%; background: var(--tan); border-radius: 999px; transition: width 0.24s ease; }
.meter-fill.is-ready { background: var(--accent); }

.kv { display: grid; grid-template-columns: 150px minmax(0, 1fr); gap: 0; margin: 0; }
.kv > dt, .kv > dd {
  padding: 7px 0; margin: 0;
  border-bottom: 1px solid var(--line-soft);
  font-size: 16px;
}
.kv > dt { color: var(--text-2); }
.kv > dd { color: var(--text-val); overflow-wrap: anywhere; }
.kv > dt:last-of-type, .kv > dd:last-of-type { border-bottom: 0; }
.kv.is-tight { grid-template-columns: 120px minmax(0, 1fr); margin-top: 12px; }
.kv.is-tight > dt, .kv.is-tight > dd { padding: 6px 0; font-size: 15.5px; }

/* ══ Version timeline ══ */
.timeline { display: flex; flex-direction: column; }
.tl-row { display: flex; gap: 12px; }
.tl-rail { display: flex; flex-direction: column; align-items: center; flex: none; width: 10px; }
.tl-dot {
  width: 10px; height: 10px; border-radius: 50%; flex: none;
  background: var(--text-3); border: 2px solid var(--panel);
  box-shadow: 0 0 0 1.5px var(--text-3);
}
.tl-dot.is-current { background: var(--green); box-shadow: 0 0 0 1.5px var(--green); }
.tl-line { width: 1.5px; flex: 1; background: rgba(237, 230, 217, 0.09); margin: 3px 0; }
.tl-row:last-child .tl-line { display: none; }
.tl-body { padding-bottom: 16px; min-width: 0; flex: 1; }
.tl-row:last-child .tl-body { padding-bottom: 0; }
.tl-head { display: flex; align-items: center; gap: 8px; }
.tl-ver { font-size: 16.5px; font-weight: 700; }
.tl-note { font-size: 15.5px; color: var(--text-2); margin-top: 3px; line-height: 1.5; }
.tl-time { font-size: 14.5px; color: var(--text-3); margin-top: 3px; }

/* ══════════════════════════════════════════════════════════════════════════
   CONTENT — the creation workspace
   Desktop is ADAPTIVE: two panes while browsing, three only when a card is
   open. Reserving an editor column that is not in use wastes the widest thing
   on the screen.
   ══════════════════════════════════════════════════════════════════════════ */

.content-grid {
  display: grid;
  grid-template-columns: 238px minmax(0, 1fr);
  gap: var(--gap);
  align-items: start;
}
/* The with-editor columns now live in styles-browse.css, which owns the docked
   editor and its draggable divider (a fourth track this rule did not have).
   They are NOT duplicated here: the old copy carried an attribute selector and
   therefore outranked the new one, silently keeping the three-column layout
   and leaving the divider with no track to sit in. */

/* ── Deck rail ── */
.rail-panel {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  position: sticky; top: 20px;
}
.rail-panel-head {
  display: flex; align-items: center; gap: 8px;
  padding: 10px 10px 10px 16px;
  border-bottom: 1px solid var(--line);
  font-size: 14px; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.07em; color: var(--text-2);
}
.rail-panel-head > span { flex: 1; }

.decklist { display: flex; flex-direction: column; padding: 6px; }
.deckrow {
  display: flex; align-items: center;
  border-radius: 8px;
  transition: background 0.12s ease;
}
.deckrow:hover { background: rgba(237, 230, 217, 0.035); }
.deckrow.is-on { background: var(--accent-soft); box-shadow: inset 2px 0 0 var(--accent); }
.deckrow-main {
  flex: 1; min-width: 0;
  display: flex; align-items: center; gap: 8px;
  border: 0; background: none;
  padding: 9px 4px 9px 10px;
  font-family: inherit; font-size: 16px; color: var(--text-2);
  text-align: left; cursor: pointer;
}
.deckrow.is-on .deckrow-main { color: var(--text-hi); font-weight: 650; }
.deckrow-name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.deckrow-count { font-size: 14.5px; color: var(--text-3); font-variant-numeric: tabular-nums; flex: none; }
.dotmark { width: 6px; height: 6px; border-radius: 50%; background: var(--tan); flex: none; }

/* The row menu is present but quiet — revealed on hover/focus, always there for
   touch, because a hidden-until-hover control is unreachable on a phone. */
.deckrow-menu { display: flex; gap: 1px; padding-right: 5px; opacity: 0; transition: opacity 0.12s ease; }
.deckrow:hover .deckrow-menu,
.deckrow:focus-within .deckrow-menu { opacity: 1; }
.deckrow-menu .icon-btn { width: 26px; height: 26px; }

.rail-empty { padding: 14px 12px; font-size: 15px; color: var(--text-3); }
.rail-add {
  display: flex; align-items: center; gap: 8px;
  width: 100%; padding: 11px 16px;
  border: 0; border-top: 1px solid var(--line); background: transparent;
  font-family: inherit; font-size: 15.5px; font-weight: 650;
  color: var(--accent); cursor: pointer;
  transition: background 0.12s ease;
}
.rail-add:hover { background: rgba(237, 230, 217, 0.03); }
.rail-foot-meter { padding: 12px 16px; border-top: 1px solid var(--line); }
.rail-foot-label { font-size: 14px; color: var(--text-3); margin-bottom: 6px; }
.rail-foot-meter .meter { margin: 0; }

/* ── Pane (card list / editor) ── */
.pane {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  min-width: 0;
}
.pane-head {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 12px 10px 16px;
  border-bottom: 1px solid var(--line);
  min-height: 50px;
}
.pane-title { font-size: 16.5px; font-weight: 700; letter-spacing: -0.005em; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pane-count { font-size: 15px; color: var(--text-3); margin-left: auto; flex: none; }
.pane-head .btn { flex: none; }
.pane-back {
  display: grid; place-items: center;
  width: 34px; height: 34px; margin-left: -8px; flex: none;
  border: 0; background: none; color: var(--text-2); cursor: pointer;
}
.pane-empty { padding: 34px 20px; text-align: center; font-size: 15.5px; color: var(--text-2); line-height: 1.65; }
.pane-empty strong { display: block; color: var(--text); font-size: 17px; font-weight: 700; margin-bottom: 6px; }

/* ── Card list ── */
.cardlist { display: flex; flex-direction: column; }
.cardrow {
  display: flex; align-items: center; gap: 11px;
  width: 100%; padding: 10px 14px 10px 16px;
  border: 0; border-bottom: 1px solid var(--line-row);
  background: transparent; color: inherit;
  font-family: inherit; text-align: left; cursor: pointer;
  transition: background 0.12s ease;
}
.cardlist > .cardrow:last-child { border-bottom: 0; }
.cardrow:hover { background: rgba(237, 230, 217, 0.03); }
.cardrow.is-on { background: var(--selected); }
.cardrow-state {
  width: 18px; height: 18px; flex: none;
  display: grid; place-items: center;
  border-radius: 50%;
  font-size: 13.5px; font-weight: 800; line-height: 1;
}
.cardrow-state.is-pending { color: var(--text-3); border: 1.5px solid rgba(237, 230, 217, 0.18); }
.cardrow-state.is-approved { color: var(--green); background: rgba(127, 181, 132, 0.14); }
.cardrow-state.is-flagged { color: var(--tan); background: rgba(201, 178, 143, 0.16); }
.cardrow-body { flex: 1; min-width: 0; }
.cardrow-label {
  display: block; font-size: 16px; line-height: 1.4;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.cardrow-label.is-empty { color: var(--text-3); font-style: italic; }
.cardrow-meta { display: block; font-size: 14.5px; color: var(--text-3); margin-top: 2px; }
.cardrow-warn { color: var(--tan); flex: none; display: flex; }
.cardrow-go { color: var(--text-3); flex: none; display: flex; }

/* ── Editor ── */
.pane.is-editor { position: sticky; top: 20px; }
.savestate { font-size: 14.5px; color: var(--text-3); margin-left: auto; flex: none; }
.savestate.is-pending { color: var(--tan); }
.savestate.is-bad { color: #E88C8C; font-weight: 650; }

.locked-note {
  display: flex; gap: 10px; align-items: flex-start;
  margin: 14px 16px 0; padding: 11px 13px;
  border-radius: 9px;
  background: rgba(143, 168, 201, 0.08);
  border: 1px solid rgba(143, 168, 201, 0.24);
  font-size: 15px; line-height: 1.6; color: var(--text-mid);
}
.locked-note svg { color: var(--blue); flex: none; margin-top: 1px; }
.locked-note strong { color: var(--text); font-weight: 700; }

.editor-body { padding: 16px; }
.editor-field + .editor-field { margin-top: 14px; }
.editor-label {
  display: block;
  font-size: 13.5px; font-weight: 700; text-transform: uppercase;
  letter-spacing: 0.07em; color: var(--text-2); margin-bottom: 6px;
}
.editor-input {
  width: 100%;
  font-family: inherit; font-size: 16.5px; line-height: 1.55;
  color: var(--text); background: var(--page);
  border: 1px solid var(--line-2); border-radius: 9px;
  padding: 10px 12px;
  resize: vertical;
  transition: border-color 0.14s ease;
}
.editor-input:focus { outline: none; border-color: var(--accent); }
.editor-input[readonly] { color: var(--text-mid); background: rgba(0, 0, 0, 0.18); resize: none; }
.editor-hint { font-size: 14.5px; color: var(--text-3); margin-top: 8px; }
.editor-hint.is-warn { color: var(--tan); }

.editor-issues { margin-top: 14px; display: flex; flex-direction: column; gap: 6px; }
.editor-issue {
  display: flex; align-items: center; gap: 7px;
  font-size: 15px; color: var(--tan);
}
.editor-issue svg { flex: none; }

.editor-meta { margin-top: 18px; padding-top: 14px; border-top: 1px solid var(--line); }
.editor-metarow { display: flex; align-items: center; gap: 12px; padding: 6px 0; }
.editor-metalabel { font-size: 15px; color: var(--text-2); width: 62px; flex: none; }
.editor-metaval { font-size: 15.5px; color: var(--text-val); }

.select {
  font-family: inherit; font-size: 15.5px;
  color: var(--text); background: var(--page);
  border: 1px solid var(--line-2); border-radius: 8px;
  padding: 6px 10px; min-height: 34px;
  flex: 1; min-width: 0;
}
.select:focus { outline: none; border-color: var(--accent); }

.editor-actions {
  display: flex; align-items: center; gap: 9px;
  padding: 13px 16px;
  border-top: 1px solid var(--line);
  background: rgba(0, 0, 0, 0.12);
}
.editor-review { display: flex; gap: 9px; flex: 1; }
.editor-review .btn { flex: 1; }

/* ── Card-type picker (inside the New card dialog) ── */
.typepick { display: flex; flex-direction: column; gap: 7px; }
.typeopt {
  text-align: left; width: 100%;
  border: 1px solid var(--line-2); border-radius: 9px;
  background: transparent; padding: 10px 12px;
  font-family: inherit; cursor: pointer; color: inherit;
  transition: border-color 0.12s ease, background 0.12s ease;
}
.typeopt:hover { border-color: rgba(201, 168, 122, 0.4); }
.typeopt[aria-pressed="true"] { border-color: var(--accent); background: var(--accent-soft); }
.typeopt-name { font-size: 16px; font-weight: 700; }
.typeopt-hint { font-size: 14.5px; color: var(--text-2); margin-top: 2px; line-height: 1.45; }

/* ══════════════════════════════════════════════════════════════════════════
   REVIEW MODE
   ══════════════════════════════════════════════════════════════════════════ */

.view.is-review { max-width: 1080px; }
.rv-top { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; }
.rv-top .ws-back { margin-bottom: 0; }
.rv-deck { font-size: 15.5px; color: var(--text-3); margin-left: auto; }

.rv-progress { display: flex; align-items: center; gap: 14px; margin-bottom: 16px; }
.rv-count { font-size: 15.5px; font-weight: 650; color: var(--text-2); flex: none; }
.rv-progress .meter { flex: 1; margin: 0; }
.rv-done { font-size: 15px; color: var(--text-3); flex: none; font-variant-numeric: tabular-nums; }

.rv-body { display: grid; grid-template-columns: minmax(0, 1.7fr) minmax(240px, 1fr); gap: var(--gap); align-items: start; }

.rv-card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 24px 26px;
  min-height: 260px;
}
.rv-field + .rv-field { margin-top: 22px; padding-top: 20px; border-top: 1px solid var(--line-soft); }
.rv-fieldlabel {
  font-size: 13px; font-weight: 700; text-transform: uppercase;
  letter-spacing: 0.08em; color: var(--text-3); margin-bottom: 9px;
}
.rv-fieldvalue { font-size: 19px; line-height: 1.6; color: var(--text); overflow-wrap: anywhere; }
.rv-fieldvalue.is-empty { color: var(--text-3); font-style: italic; font-size: 16.5px; }

.rv-context {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 16px;
}
.rv-ctxtitle { font-size: 16.5px; font-weight: 700; margin-bottom: 10px; }
.rv-issues { margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--line-soft); }
.rv-issuestitle { font-size: 13.5px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.07em; color: var(--tan); margin-bottom: 7px; }
.rv-issue { display: flex; align-items: center; gap: 7px; font-size: 15px; color: var(--text-mid); padding: 3px 0; }
.rv-issue svg { flex: none; color: var(--tan); }

.rv-keys { margin-top: 16px; padding-top: 13px; border-top: 1px solid var(--line-soft); }
.rv-keystitle { font-size: 13.5px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.07em; color: var(--text-3); margin-bottom: 8px; }
.rv-key { display: flex; align-items: center; gap: 10px; padding: 3px 0; font-size: 15px; color: var(--text-2); }
.rv-key kbd {
  font-family: ui-monospace, Menlo, Consolas, monospace;
  font-size: 13.5px; color: var(--text-val);
  background: rgba(237, 230, 217, 0.06);
  border: 1px solid var(--line-2); border-radius: 5px;
  padding: 2px 6px; min-width: 44px; text-align: center;
}

.rv-actions { display: flex; align-items: center; gap: 9px; margin-top: var(--gap); }
.rv-actions .btn { flex: 1; }
.rv-actions .rv-nav { flex: none; width: 44px; padding: 0; }

/* ══ Toasts ══ */
.toasts {
  position: fixed; z-index: 70;
  left: 50%; transform: translateX(-50%);
  bottom: 26px;
  display: flex; flex-direction: column; gap: 8px;
  align-items: center;
  pointer-events: none;
}
.toast {
  display: flex; align-items: center; gap: 14px;
  background: var(--popover);
  border: 1px solid var(--line-2);
  border-radius: 10px;
  padding: 10px 14px;
  box-shadow: 0 12px 34px rgba(0, 0, 0, 0.45);
  font-size: 15.5px; color: var(--text);
  pointer-events: auto;
  animation: toast-in 0.18s ease both;
  transition: opacity 0.18s ease, transform 0.18s ease;
  max-width: min(92vw, 420px);
}
.toast.is-warn { border-color: rgba(214, 69, 69, 0.4); color: #E8C0C0; }
.toast.is-out { opacity: 0; transform: translateY(6px); }
.toast-msg { min-width: 0; }
.toast-undo {
  border: 0; background: none; padding: 0; flex: none;
  font-family: inherit; font-size: 15.5px; font-weight: 700;
  color: var(--accent); cursor: pointer;
}
.toast-undo:hover { color: var(--accent-hi); }
@keyframes toast-in { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

/* ══ Dialog additions ══ */
.dialog-form { display: flex; flex-direction: column; gap: 12px; }
.dialog-form .field + .field { margin-top: 2px; }
.field-hint { font-size: 14px; color: var(--text-3); line-height: 1.5; }
.dialog-error {
  font-size: 15px; color: #E88C8C; line-height: 1.55;
  background: rgba(214, 69, 69, 0.09);
  border: 1px solid rgba(214, 69, 69, 0.28);
  border-radius: 9px; padding: 9px 12px;
}
.dialog-body .kv { margin-top: 14px; }

/* ══════════════════════════════════════════════════════════════════════════
   MOBILE
   Content drills down — one level per screen — so there is no rail to squeeze
   and no third column to fold. The editor and the review card each become the
   whole screen, which is the only composition a phone actually has.
   ══════════════════════════════════════════════════════════════════════════ */

[data-layout="mobile"] .page-head.with-action { display: block; }
[data-layout="mobile"] .page-head.with-action .btn { width: 100%; margin-top: 14px; }

[data-layout="mobile"] .view.is-workspace { padding-top: 16px; }
[data-layout="mobile"] .ws-id { align-items: flex-start; }
[data-layout="mobile"] .ws-tile { width: 34px; height: 34px; border-radius: 9px; }
[data-layout="mobile"] .ws-title { font-size: 20.5px; }
[data-layout="mobile"] .ws-actions { display: none; }   /* Publish moves below */
[data-layout="mobile"] .ws-head .tabs { margin: 14px 0 16px; }

/* On a phone the publish action belongs where the decision is made — the draft
   panel on Overview — not crammed into a header that already carries the name
   and two pills. */
[data-layout="mobile"] .card.is-focus .card-actions .btn { flex: 1; }

[data-layout="mobile"] .content-grid,
[data-layout="mobile"] .content-grid.has-editor { display: block; }
[data-layout="mobile"] .rail-panel,
[data-layout="mobile"] .pane.is-editor { position: static; }

[data-layout="mobile"] .deckrow-menu { opacity: 1; }
[data-layout="mobile"] .deckrow-main { min-height: 48px; }
[data-layout="mobile"] .deckrow-menu .icon-btn { width: 40px; height: 40px; }
[data-layout="mobile"] .rail-add { min-height: 52px; }
[data-layout="mobile"] .cardrow { min-height: 60px; padding: 12px 14px 12px 16px; }
[data-layout="mobile"] .icon-btn { width: 40px; height: 40px; }
[data-layout="mobile"] .pane-back { width: 40px; height: 40px; }

[data-layout="mobile"] .editor-actions {
  position: sticky; bottom: 0;
  background: var(--panel);
  padding-bottom: calc(13px + env(safe-area-inset-bottom));
}
[data-layout="mobile"] .editor-actions .btn { min-height: 46px; }

[data-layout="mobile"] .kv { grid-template-columns: minmax(0, 1fr); }
[data-layout="mobile"] .kv > dt { padding-bottom: 0; border-bottom: 0; font-size: 14.5px; }
[data-layout="mobile"] .kv > dd { padding-top: 2px; }

[data-layout="mobile"] .rv-top .rv-deck { display: none; }
[data-layout="mobile"] .rv-body-mobile { display: block; }
[data-layout="mobile"] .rv-card { padding: 20px 18px; min-height: 200px; }
[data-layout="mobile"] .rv-fieldvalue { font-size: 20.5px; }
[data-layout="mobile"] .rv-more {
  margin-top: var(--gap);
  background: var(--panel); border: 1px solid var(--line);
  border-radius: var(--radius); overflow: hidden;
}
[data-layout="mobile"] .rv-more > summary {
  padding: 14px 16px; font-size: 15.5px; font-weight: 650;
  color: var(--text-2); cursor: pointer; list-style: none;
  min-height: 48px; display: flex; align-items: center;
}
[data-layout="mobile"] .rv-more > summary::-webkit-details-marker { display: none; }
[data-layout="mobile"] .rv-more .rv-context { border: 0; border-top: 1px solid var(--line); border-radius: 0; }

/* Decision row pinned above the bottom tab bar — the thumb's home. */
[data-layout="mobile"] .rv-actions {
  position: sticky;
  bottom: calc(var(--tabbar) + env(safe-area-inset-bottom) + 8px);
  background: var(--page);
  padding: 8px 0;
  margin-top: 18px;
}
[data-layout="mobile"] .rv-actions .btn { min-height: 50px; }
[data-layout="mobile"] .rv-actions .rv-nav { width: 46px; }

[data-layout="mobile"] .toasts { bottom: calc(var(--tabbar) + env(safe-area-inset-bottom) + 14px); }

/* Touch targets, mobile. Every one of these measured under 44px in the first
   pass — the icon buttons at 40px, the back links at their text height, and the
   deck <select> at its default control height. A thumb does not care that they
   looked fine on a laptop. */
[data-layout="mobile"] .icon-btn,
[data-layout="mobile"] .deckrow-menu .icon-btn,
[data-layout="mobile"] .pane-back { width: 44px; height: 44px; }
[data-layout="mobile"] .ws-back {
  min-height: 44px; align-items: center;
  margin: -10px 0 4px; padding: 0 4px 0 0;
}
[data-layout="mobile"] .select { min-height: 44px; font-size: 19px; }
[data-layout="mobile"] .rv-more > summary { min-height: 52px; }


/* ══ Publishing ══════════════════════════════════════════════════════════════
   Two screens: a table of Subjects, and one Subject's summary. Neither shows
   cards — that is Browse's job, and Browse is the student application's own
   screen. So there is very little here: a status word, one panel, and the
   list of cards that were REMOVED (the one kind Browse cannot show, because
   they are no longer in the deck).

   Nothing here is a badge. The only state that carries colour is one that asks
   the faculty for something; a page of green "Up to date" pills is noise. */

.pub-status { font-size: 15px; color: var(--text-3); }
.pub-status.is-due  { color: var(--accent); font-weight: 650; }
.pub-status.is-warn { color: #E88C8C; font-weight: 650; }
.pub-status.is-none { color: var(--text-3); }

/* ── The one panel on a Subject's page ─────────────────────────────────────── */
.pub-panel {
  border: 1px solid var(--line);
  background: var(--panel);
  border-radius: var(--radius);
  padding: 22px 24px;
  margin-bottom: 26px;
}
.pub-panel.is-ready {
  border-color: rgba(201, 168, 122, 0.28);
  background: linear-gradient(180deg, rgba(201, 168, 122, 0.05), transparent 60%), var(--panel);
}
.pub-panel.is-blocked {
  border-color: rgba(214, 69, 69, 0.28);
  background: rgba(214, 69, 69, 0.06);
}

/* The state line: "Changes ready" / "Up to date". */
.pub-panel-state {
  display: flex; align-items: center; gap: 9px;
  font-size: 16.5px; font-weight: 700; letter-spacing: -0.01em;
  color: var(--text);
}
.pub-panel-state svg { color: var(--green); flex: none; }
.pub-dot {
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--accent); flex: none;
}

/* "18 added · 7 moved · 3 outdated" — the whole change list, in one line. */
.pub-counts {
  margin-top: 9px;
  font-size: 23px; font-weight: 700; letter-spacing: -0.015em;
  color: var(--text); font-variant-numeric: tabular-nums;
}

.pub-panel-head {
  display: flex; align-items: center; gap: 9px;
  color: #E88C8C; font-size: 16px; margin-bottom: 8px;
}
.pub-panel-head svg { flex: none; }
.pub-panel-body { font-size: 15.5px; color: var(--text-2); line-height: 1.65; margin-top: 8px; }
.pub-panel-actions { display: flex; gap: 9px; margin-top: 18px; flex-wrap: wrap; }
.pub-note { margin-top: 14px; font-size: 15px; color: var(--text-3); line-height: 1.6; }

/* ── Removed cards ──────────────────────────────────────────────────────────
   Labels, not links: the card is gone from the deck, which is precisely what
   makes it outdated, so there is nothing to open. */
.pub-outdated {
  border: 1px solid var(--line);
  background: var(--panel);
  border-radius: var(--radius);
  padding: 16px 18px;
}
.pub-outdated-note {
  font-size: 15px; color: var(--text-3); line-height: 1.6;
  padding-bottom: 12px; margin-bottom: 4px;
  border-bottom: 1px solid var(--line-row);
}
.pub-outdated-row {
  display: flex; align-items: baseline; gap: 14px;
  padding: 7px 0; font-size: 15.5px;
  border-bottom: 1px solid var(--line-row);
}
.pub-outdated-row:last-of-type { border-bottom: 0; }
.pub-outdated-label {
  flex: 1; min-width: 0; font-weight: 650; color: var(--text-2);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.pub-outdated-row .dimmer { flex: none; font-size: 15px; }
.pub-outdated-more { padding-top: 10px; font-size: 15px; color: var(--text-3); }

/* ── The confirmation's count list ─────────────────────────────────────────── */
.pub-summary {
  list-style: none; margin: 15px 0 0; padding: 13px 0 0;
  border-top: 1px solid rgba(237, 230, 217, 0.07);
  display: flex; flex-direction: column; gap: 5px;
}
.pub-summary li {
  font-size: 16px; font-weight: 650; color: var(--text);
  font-variant-numeric: tabular-nums;
}
.pub-warn {
  margin-top: 15px; padding-top: 13px;
  border-top: 1px solid rgba(237, 230, 217, 0.07);
  font-size: 15px; color: var(--text-3); line-height: 1.6;
}

/* The version-history list is the only table left on these pages, and it
   carries three columns of unrelated values, so it needs a gutter. */
.tbl-row.is-static { cursor: default; text-align: left; }
.tbl.is-changes .tbl-head,
.tbl.is-changes .tbl-row { column-gap: 14px; }

[data-layout="mobile"] .pub-panel { padding: 18px 16px; }
[data-layout="mobile"] .pub-counts { font-size: 20.5px; }
[data-layout="mobile"] .pub-panel-actions .btn { flex: 1; }
