/* Simply MBBS — v12. The home screen becomes a workspace.

   The previous two versions spent the whole first screen on a countdown.
   It looked good and it was the wrong call: the number does not change
   anything you do in the next ten minutes, and it pushed the actual work
   below the fold. So the countdown is now a strip — still first, still the
   frame for everything — and the card sits directly under it, at full size,
   answerable.

   Everything that only reports got quieter to pay for that. */

/* ---------- the strip ---------- */

.smcc-hm__in { display: grid; gap: 14px; }

.smcc-hm__strip {
  position: relative;
  background:
    radial-gradient(120% 120% at 88% 0%, rgba(124,107,240,.30) 0%, transparent 60%),
    var(--smcc-strong);
  color: #fff;
  border-radius: 20px;
  padding: 0 clamp(16px, 4vw, 26px) clamp(14px, 3vw, 18px);
  overflow: hidden;
}
.smcc-hm__rail {
  position: relative; display: flex; gap: 2px; height: 4px;
  margin: 0 clamp(-16px, -4vw, -26px) 14px;
  padding: 16px clamp(16px, 4vw, 26px) 0;
}
.smcc-hm__seg { flex: 1 1 auto; height: 4px; border-radius: 3px; background: rgba(255,255,255,.13); }
.smcc-hm__seg.is-past { background: rgba(14,155,132,.7); }
.smcc-hm__seg.is-live { background: var(--smcc-violet); box-shadow: 0 0 12px rgba(124,107,240,.8); }
.smcc-hm__marker {
  position: absolute; top: 11px; width: 2px; height: 14px;
  background: #fff; border-radius: 2px; box-shadow: 0 0 0 3px rgba(25,22,52,.55);
}

.smcc-hm__line { display: flex; align-items: center; justify-content: space-between; gap: 14px; flex-wrap: wrap; }
.smcc-hm__lft { display: flex; align-items: baseline; gap: 10px; }
.smcc-hm__n {
  font-family: var(--smcc-display); font-size: clamp(34px, 8vw, 50px);
  font-weight: 700; line-height: .85; letter-spacing: -.04em; font-variant-numeric: tabular-nums;
}
.smcc-hm__lmeta { display: grid; gap: 1px; }
.smcc-hm__u { font-size: 12.5px; font-weight: 600; }
.smcc-hm__date { font-family: var(--smcc-mono); font-size: 11px; color: rgba(255,255,255,.55); }

.smcc-hm__rgt { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-left: auto; }
.smcc-hm__where {
  font-family: var(--smcc-mono); font-size: 10px; letter-spacing: .12em;
  text-transform: uppercase; color: rgba(255,255,255,.5);
}
.smcc-hm__duty {
  font: inherit; font-size: 12.5px; cursor: pointer;
  background: rgba(255,255,255,.13); color: #fff; border: 0;
  border-radius: 999px; padding: 7px 14px;
}
.smcc-hm__pick { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 12px; }
.smcc-hm__pickI {
  font: inherit; font-size: 12.5px; cursor: pointer;
  background: rgba(255,255,255,.1); color: rgba(255,255,255,.86);
  border: 0; border-radius: 999px; padding: 7px 13px;
}
.smcc-hm__pickI.is-on { background: #fff; color: var(--smcc-strong); font-weight: 600; }
.smcc-hm__protected {
  margin: 12px 0 0; font-size: 13px; line-height: 1.5;
  color: rgba(255,255,255,.72); border-left: 2px solid rgba(255,255,255,.28);
  padding-left: 12px;
}

/* ---------- the reviewer. The point of the page. ---------- */

.smcc-rv {
  background: var(--smcc-card); border: 1px solid var(--smcc-line);
  border-radius: 20px; padding: clamp(16px, 3.5vw, 24px);
  box-shadow: var(--smcc-shadow);
}
.smcc-rv__head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
.smcc-rv__k { font-family: var(--smcc-mono); font-size: 10px; letter-spacing: .16em; color: var(--smcc-deep); }
.smcc-rv__count { font-family: var(--smcc-mono); font-size: 11px; color: var(--smcc-muted); }

.smcc-rv__stage {
  min-height: 132px; display: flex; flex-direction: column; justify-content: center;
  padding: 18px 0 14px;
}
.smcc-rv__stage.is-quiet { color: var(--smcc-muted); font-size: 14px; }
.smcc-rv__subj {
  font-family: var(--smcc-mono); font-size: 10px; letter-spacing: .13em;
  text-transform: uppercase; color: var(--smcc-muted); margin: 0 0 8px;
}
.smcc-rv__front {
  font-family: var(--smcc-display); font-size: clamp(18px, 3.6vw, 24px);
  line-height: 1.3; font-weight: 600; margin: 0;
}
.smcc-rv__back {
  font-size: clamp(16px, 3vw, 19px); line-height: 1.45; margin: 14px 0 0;
  color: var(--smcc-clinical); font-weight: 600;
  padding-top: 14px; border-top: 1px solid var(--smcc-line);
}
.smcc-rv__note {
  font-size: 13.5px; line-height: 1.55; color: var(--smcc-muted);
  margin: 10px 0 0; max-height: 30vh; overflow: auto;
}
.smcc-rv__sub { font-size: 13.5px; color: var(--smcc-muted); margin: 8px 0 0; line-height: 1.5; }

.smcc-rv__acts { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.smcc-rv__reveal {
  grid-column: 1 / -1; font: inherit; font-size: 16px; font-weight: 600; cursor: pointer;
  background: var(--smcc-strong); color: #fff; border: 0;
  border-radius: 14px; padding: 16px;
}
.smcc-rv__g {
  font: inherit; font-size: 14px; font-weight: 600; cursor: pointer;
  border: 1.5px solid; border-radius: 14px; padding: 15px 8px; background: transparent;
}
.smcc-rv__g.is-again { border-color: var(--smcc-alert); color: var(--smcc-alert); }
.smcc-rv__g.is-good  { border-color: var(--smcc-deep); color: var(--smcc-deep); }
.smcc-rv__g.is-easy  { border-color: var(--smcc-clinical); color: var(--smcc-clinical); }
.smcc-rv__g:active { transform: scale(.97); }

.smcc-rv__foot {
  display: flex; gap: 14px; flex-wrap: wrap;
  margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--smcc-line);
}
.smcc-rv__link { font-size: 12.5px; color: var(--smcc-muted); text-decoration: none; }
.smcc-rv__link:hover { color: var(--smcc-deep); }
.smcc-rv__link.is-alert { color: var(--smcc-alert); font-weight: 600; }

/* ---------- ward tool, inline ---------- */

.smcc-hm__ward {
  background: var(--smcc-card); border: 1px solid var(--smcc-line);
  border-left: 3px solid var(--smcc-violet);
  border-radius: 18px; padding: 16px 18px;
}
.smcc-hm__wardHead { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; margin-bottom: 10px; }
.smcc-hm__more { margin-left: auto; font-size: 12px; color: var(--smcc-deep); text-decoration: none; }
.smcc-hm__wardBody .smcc-wk__form { margin-top: 4px; }

/* ---------- everything below the work ---------- */

.smcc-hm__vitals {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px;
  background: var(--smcc-line); border: 1px solid var(--smcc-line);
  border-radius: 16px; overflow: hidden;
}
.smcc-hm__vital { background: var(--smcc-card); padding: 13px 8px; text-align: center;
  display: grid; gap: 2px; text-decoration: none; color: inherit; }
.smcc-hm__vital:hover { background: var(--smcc-wash); }
.smcc-hm__vN { font-family: var(--smcc-display); font-size: clamp(18px, 4.2vw, 24px); font-weight: 700; line-height: 1; }
.smcc-hm__vL { font-family: var(--smcc-mono); font-size: 9.5px; color: var(--smcc-muted); }

.smcc-hm__k { font-family: var(--smcc-mono); font-size: 10px; letter-spacing: .16em; color: var(--smcc-muted); margin: 0 0 10px; }
.smcc-hm__stake { background: var(--smcc-card); border: 1px solid var(--smcc-line); border-radius: 18px; padding: 18px; }
.smcc-hm__marks { display: flex; gap: 2px; height: 56px; border-radius: 8px; overflow: hidden; background: var(--smcc-wash); }
.smcc-hm__mseg { position: relative; min-width: 3px; background: var(--smcc-chipbg); display: flex; align-items: flex-end; }
.smcc-hm__mfill { width: 100%; background: var(--smcc-clinical); transition: height .5s ease; }
.smcc-hm__mseg.is-dead { background: repeating-linear-gradient(45deg, var(--smcc-chipbg), var(--smcc-chipbg) 4px, transparent 4px, transparent 8px); }

.smcc-hm__top3 { display: grid; gap: 1px; margin-top: 14px; background: var(--smcc-line); border-radius: 12px; overflow: hidden; }
.smcc-hm__t3 { display: flex; align-items: center; gap: 10px; text-decoration: none; color: inherit;
  background: var(--smcc-card); padding: 11px 14px; }
.smcc-hm__t3:hover { background: var(--smcc-wash); }
.smcc-hm__t3n { font-weight: 600; font-size: 14px; flex: 1 1 auto; }
.smcc-hm__t3s { font-family: var(--smcc-mono); font-size: 11px; color: var(--smcc-muted); }
.smcc-hm__t3m { font-family: var(--smcc-display); font-weight: 700; font-size: 16px; color: var(--smcc-alert); min-width: 44px; text-align: right; }

.smcc-hm__grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(92px, 1fr)); gap: 8px; }
.smcc-hm__tile {
  display: grid; justify-items: center; gap: 6px; text-decoration: none;
  background: var(--smcc-card); border: 1px solid var(--smcc-line);
  border-radius: 14px; padding: 14px 6px;
  color: var(--smcc-text); font-size: 11px; text-align: center;
  transition: border-color .15s ease;
}
.smcc-hm__tile:hover { border-color: var(--smcc-violet); }
.smcc-hm__tile svg { width: 21px; height: 21px; fill: none; stroke: var(--smcc-deep); stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }

@media (max-width: 520px) {
  .smcc-hm__vitals { grid-template-columns: repeat(4, 1fr); }
  .smcc-hm__vL { font-size: 9px; }
  .smcc-hm__grid { grid-template-columns: repeat(3, 1fr); }
  .smcc-hm__rgt { width: 100%; margin-left: 0; }
}

@media (prefers-reduced-motion: reduce) {
  .smcc-hm__mfill, .smcc-hm__tile, .smcc-rv__g { transition: none; }
}
