/* Deep Level Narrow Reef Platinum Mine: One Half Level. What the half-level game adds to pt.css: the shift board,
 * the morning clock of one half level, and the hard month's three boards. Loaded after pt.css. */

/* ---------- the shift board: five panels and two development ends, shift by shift ---------- */
.sb { padding: 10px 14px 12px; }
.sb-grid { display: grid; gap: 3px 2px; align-items: center;
  grid-template-columns: 6.4em repeat(5, minmax(0, 1fr)) 6px repeat(5, minmax(0, 1fr)) 6px repeat(5, minmax(0, 1fr)) 6px repeat(5, minmax(0, 1fr)) 6px repeat(2, minmax(0, 1fr)); }
.sb-grid .lab { font-size: .78rem; color: var(--ink-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; padding-right: 4px; }
.sb-grid .lab.dev { color: var(--muted); }
.sb-grid .dn { font-size: .66rem; color: var(--muted); text-align: center; font-variant-numeric: tabular-nums; line-height: 1.2; }
.sb-grid .dn.mk { color: var(--crit-ink); font-weight: 700; }
.sb-grid i.pn { width: auto; height: 22px; min-width: 0; font-size: .7rem; }
.sb-grid i.pn[data-c=""] { background: var(--panel-2); border-color: var(--line); }
.sb-grid i.pn.dev { opacity: .8; height: 18px; }
.sb-grid .kit, .sb-grid .cnt { font-size: .68rem; text-align: center; font-variant-numeric: tabular-nums; border-radius: 3px; line-height: 1.6; min-width: 0; overflow: hidden; }
.kit { background: var(--panel-2); color: var(--ink-2); }
.kit[data-zone="green"] { background: color-mix(in srgb, var(--good) 20%, var(--panel)); color: var(--good-ink); }
.kit[data-zone="yellow"] { background: color-mix(in srgb, var(--warn) 30%, var(--panel)); color: var(--warn-ink); }
.kit[data-zone="red"] { background: color-mix(in srgb, var(--crit) 22%, var(--panel)); color: var(--crit-ink); font-weight: 700; }
.sb-grid .cnt { color: var(--ink); font-weight: 600; }
.sb-grid .rule { grid-column: 1 / -1; height: 1px; background: var(--line); margin: 2px 0; }
.sb-foot { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 4px 14px; padding: 0 14px 10px; font-size: .82rem; color: var(--ink-2); }
.sb-foot b { font-family: var(--font-display); font-size: 1rem; color: var(--ink); }
.sb-legend { padding-top: 2px; }
.sb-legend span::before { display: none; }
.sb-legend .lgi { display: inline-flex; align-items: center; gap: 5px; }
.sb-legend .lgpn { width: 15px; height: 15px; font-size: .6rem; border-radius: 2px; }
.sb-legend .lgkit { display: inline-block; min-width: 20px; padding: 0 3px; font-size: .68rem; text-align: center; border-radius: 3px; line-height: 1.5; font-variant-numeric: tabular-nums; }
.sb-legend .lgkit + .lgkit { margin-left: -2px; }
.sb-events { margin: 0 14px 10px; padding: 8px 10px; border-left: 3px solid var(--crit); background: color-mix(in srgb, var(--crit) 6%, var(--panel)); font-size: .85rem; color: var(--ink-2); border-radius: 0 4px 4px 0; }
.sbtable td, .sbtable th { padding: 5px 10px; }
@media (max-width: 600px) {
  .sb { padding: 8px 8px 10px; }
  .sb-grid { gap: 2px 1px; grid-template-columns: 2.5em repeat(5, minmax(0, 1fr)) 3px repeat(5, minmax(0, 1fr)) 3px repeat(5, minmax(0, 1fr)) 3px repeat(5, minmax(0, 1fr)) 3px repeat(2, minmax(0, 1fr)); }
  .sb-grid .lab { font-size: .7rem; padding-right: 2px; }
  .sb-grid i.pn { height: 17px; font-size: .56rem; border-radius: 2px; }
  .sb-grid i.pn.dev { height: 14px; }
  .sb-grid .dn { font-size: .55rem; }
  .sb-grid .kit, .sb-grid .cnt { font-size: .56rem; border-radius: 2px; letter-spacing: -.02em; }
}

/* ---------- the hard month: three boards ---------- */
.hard3 { display: grid; grid-template-columns: minmax(0, 1fr); gap: 16px; }
.hard3 .mine-head b { font-size: 1rem; }

/* ---------- a plan's choices as a line under a table row ---------- */
td .sub { display: block; font-size: .78rem; color: var(--muted); font-weight: 400; white-space: normal; }
.carry { border: 1px dashed var(--line-strong); border-radius: var(--r); padding: 8px 12px; }
.carry > summary { cursor: pointer; font-weight: 600; color: var(--accent); }
.carry[open] > summary { margin-bottom: 8px; }

/* ---------- tables that stack into blocks on a phone ---------- */
.plancell { display: block; min-width: 13em; }
@media (max-width: 600px) { .plancell { min-width: 0; } }
@media (max-width: 600px) {
  table.stackable thead { display: none; }
  table.stackable, table.stackable tbody, table.stackable tr, table.stackable td { display: block; width: 100%; }
  table.stackable tr { border-bottom: 1px solid var(--line); padding: 6px 0; }
  table.stackable tr:last-child { border-bottom: 0; }
  table.stackable td { border: 0; padding: 3px 12px; display: flex; justify-content: space-between; align-items: baseline; gap: 12px; text-align: right; white-space: normal; }
  table.stackable td::before { content: attr(data-label); flex: 0 1 auto; color: var(--muted); font-size: .78rem; text-align: left; font-family: var(--font-display); font-weight: 600; text-transform: uppercase; letter-spacing: .04em; }
  table.stackable td:first-child { display: block; font-weight: 600; text-align: left; padding-top: 4px; }
  table.stackable td:first-child::before { display: none; }
  table.stackable td.blank { display: none; }
  table.stackable td .sub { text-align: right; }
  table.stackable td:first-child .sub { text-align: left; }
  table.stackable tr.sum td { border-top: 0; }
  table.stackable tr.sum { border-top: 2px solid var(--line-strong); }
}


/* ---------- the half-level results board ---------- */
#board-top td .sub { white-space: normal; }
#board-top td.plan { min-width: 12em; }
@media (max-width: 600px) {
  #board-top td:first-child::before { display: inline; content: 'Rank '; }
  #board-top td.plan, #board-top td.who, #board-recent td.who { min-width: 0; max-width: none; white-space: normal; }
}
#board-top th, #board-recent th { white-space: normal; }
