[hidden] {
  display: none !important;
}

:root {
  --ink: #1c1c21;
  --ink-2: #33333b;
  --muted: #5a5a66;
  --line: #e4e4ea;
  --line-2: #cfcfd8;
  --bg: #f6f6f9;
  --card: #ffffff;
  --accent: #3b5bdb;
  --accent-2: #2b3e9e;
  --accent-bg: #eef0fe;
  --gold: #e3be5e;
  --gold-line: #c9a24a;
  --gold-ink: #7a5c12;
  --further: #b91c1c;
  --further-bg: #fee2e2;
  --further-ink: #991b1b;
  --may: #b45309;
  --may-bg: #fef3c7;
  --may-ink: #92400e;
  --ok: #15803d;
  --ok-bg: #dcfce7;
  --ok-ink: #14532d;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
  font-family: Inter, system-ui, sans-serif;
  color: var(--ink);
  background: var(--bg);
  font-size: 14px;
}
a {
  color: var(--accent);
}
a:hover {
  color: var(--accent-2);
}
h1 {
  font-family: "Space Grotesk", sans-serif;
  font-size: 26px;
  margin: 0;
}
h2 {
  font-family: "Space Grotesk", sans-serif;
  font-size: 19px;
  margin: 0;
}
.mono {
  font-family: "JetBrains Mono", monospace;
}
.muted {
  color: var(--muted);
}
.small {
  font-size: 12px;
}
.row {
  display: flex;
  gap: 12px;
  align-items: center;
  flex-wrap: wrap;
}
.col {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.grow {
  flex: 1;
  min-width: 0;
}
.right {
  margin-left: auto;
}
.page {
  padding: 20px 24px;
  max-width: 1400px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.cols {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  align-items: flex-start;
}
.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 16px;
}
.card.focus {
  border: 2px solid var(--accent);
}
.label {
  font-size: 12px;
  font-weight: 600;
  color: #4b5563;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.big {
  font-family: "Space Grotesk", sans-serif;
  font-size: 30px;
  font-weight: 700;
}
button,
.btn {
  font: inherit;
  font-size: 14px;
  padding: 10px 14px;
  border-radius: 8px;
  border: 1px solid var(--line-2);
  background: #fff;
  color: var(--ink);
  cursor: pointer;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}
button.primary,
.btn.primary {
  background: var(--accent);
  color: #fff;
  border: 0;
  font-weight: 600;
  box-shadow: inset 0 -2px 0 var(--gold-line);
}
button.danger {
  background: var(--further);
  color: #fff;
  border: 0;
  font-weight: 600;
}
button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}
button.chip {
  padding: 6px 10px;
  border-radius: 999px;
  font-size: 13px;
}
button.chip.on,
button.pick.on {
  border: 2px solid var(--accent);
  background: var(--accent-bg);
  font-weight: 600;
}
input,
select,
textarea {
  font: inherit;
  font-size: 14px;
  border: 1px solid var(--line-2);
  border-radius: 8px;
  padding: 9px 11px;
  background: #fff;
  color: var(--ink);
}
label.field {
  display: flex;
  flex-direction: column;
  gap: 5px;
  font-size: 13px;
  font-weight: 500;
  color: var(--ink-2);
}
table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}
th {
  text-align: left;
  font-size: 12px;
  color: var(--muted);
  font-weight: 600;
  padding: 10px 8px;
  border-bottom: 1px solid #e5e7eb;
}
td {
  padding: 10px 8px;
  border-bottom: 1px solid #f1f1f4;
  vertical-align: top;
}
.table-wrap {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 12px;
  overflow-x: auto;
}
.pill {
  font-size: 12px;
  font-weight: 600;
  padding: 3px 9px;
  border-radius: 999px;
  white-space: nowrap;
  display: inline-block;
}
.t-further,
.r-further_evaluation {
  background: var(--further-bg);
  color: var(--further-ink);
}
.t-may_require {
  background: var(--may-bg);
  color: var(--may-ink);
}
.t-no_further,
.r-normal,
.r-normal_variant,
.s-Cleared {
  background: var(--ok-bg);
  color: var(--ok-ink);
}
.r-repeat_ecg,
.s-pending,
.s-Result.pending {
  background: #f1f1f4;
  color: var(--ink-2);
}
.s-unread {
  background: #e0e7ff;
  color: #3730a3;
}
.s-needs_match,
.s-Needs.follow-up {
  background: var(--may-bg);
  color: var(--may-ink);
}
header.top {
  background:
    radial-gradient(520px 140px at 88% -30%, rgba(180, 156, 255, 0.3), transparent 70%),
    radial-gradient(420px 120px at 8% 140%, rgba(138, 180, 255, 0.2), transparent 70%), #1c1c21;
  color: #ececf1;
  border-bottom: 1px solid var(--gold-line);
}
header .bar {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 12px 24px 6px;
}
.brand {
  display: flex;
  align-items: center;
  flex-shrink: 0;
  gap: 10px;
}
.wordmark {
  display: flex;
  flex-direction: column;
  line-height: 1.15;
}
.wordmark b {
  font-family: "Space Grotesk", sans-serif;
  font-size: 18px;
}
.by {
  font-size: 11px;
  color: #a0a0ad;
  white-space: nowrap;
}
.by b {
  color: var(--gold);
  font-family: Inter;
  font-size: 11px;
}
.by span {
  letter-spacing: 0.18em;
  font-size: 10px;
}
header nav {
  display: flex;
  gap: 24px;
  padding: 0 24px;
  overflow-x: auto;
}
header nav a {
  white-space: nowrap;
  padding: 12px 2px 10px;
  color: #a0a0ad;
  text-decoration: none;
  border-bottom: 2px solid transparent;
}
header nav a.on {
  color: #fff;
  font-weight: 600;
  border-bottom-color: var(--gold);
}
.user {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-left: auto;
}
.avatar {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: #2a2a31;
  border: 1px solid var(--gold);
  color: var(--gold);
  font-size: 12px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
}
.user .who {
  display: flex;
  flex-direction: column;
  min-width: 0;
  line-height: 1.2;
  font-size: 13px;
}
.user .who span {
  font-size: 11px;
  color: #a0a0ad;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.user button {
  background: transparent;
  color: #cdcdd6;
  border-color: #43434d;
  padding: 6px 10px;
  font-size: 12px;
}
.guide {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  background: #fffaee;
  border: 1px solid #ead9a8;
  border-radius: 10px;
  padding: 10px 12px;
}
.guide .t {
  font-size: 11px;
  font-weight: 700;
  color: var(--gold-ink);
  letter-spacing: 0.05em;
}
.guide .b {
  font-size: 13px;
  line-height: 1.5;
  color: #3a2e0b;
}
.gnote {
  display: flex;
  gap: 6px;
  align-items: flex-start;
  font-size: 12.5px;
  color: #3a2e0b;
  line-height: 1.45;
}
.finding {
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  padding: 10px 12px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.finding .rule {
  font-family: "JetBrains Mono", monospace;
  font-size: 12px;
  color: var(--ink-2);
}
.decision,
.decision.r-normal,
.decision.r-normal_variant,
.decision.r-further_evaluation {
  background: #fff;
  color: var(--ink);
}
.decision {
  text-align: left;
  justify-content: flex-start;
  padding: 10px 12px;
  border-radius: 10px;
  width: 100%;
}
.decision.on.r-normal,
.decision.on.r-normal_variant {
  border: 2px solid var(--ok);
  background: #f0fdf4;
}
.decision.on.r-further_evaluation {
  border: 2px solid var(--further);
  background: #fef2f2;
}
.decision .meaning {
  font-size: 12px;
  color: var(--muted);
  font-weight: 400;
  display: block;
}
kbd {
  font-family: "JetBrains Mono", monospace;
  font-size: 11px;
  padding: 2px 6px;
  border: 1px solid var(--line-2);
  border-bottom-width: 2px;
  border-radius: 5px;
  background: #fff;
  color: #1f2937;
}
.ecg-wrap {
  background: #fffdf8;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 12px;
}
canvas.ecg {
  width: 100%;
  display: block;
  border-radius: 6px;
}
.legend {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 16px;
  font-size: 12px;
  color: var(--ink-2);
  align-items: center;
}
.tracing-legend {
  flex: 1 1 360px;
}
.sw {
  width: 12px;
  height: 12px;
  border-radius: 3px;
  display: inline-block;
  vertical-align: -2px;
  margin-right: 5px;
}
.stepper {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.step {
  flex: 1 1 120px;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 10px 12px;
  background: #fff;
}
.step.done {
  background: #ecfdf3;
}
.step.now {
  border-color: var(--accent);
  background: var(--accent-bg);
}
.step .k {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: var(--muted);
}
.drop {
  border: 2px dashed #b9b9c6;
  border-radius: 12px;
  background: #fafafc;
  padding: 18px;
  display: flex;
  gap: 16px;
  align-items: center;
  flex-wrap: wrap;
  cursor: pointer;
}
.drop.over {
  border-color: var(--accent);
  background: var(--accent-bg);
}
.toast {
  position: fixed;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  background: #1c1c21;
  color: #fff;
  padding: 10px 16px;
  border-radius: 10px;
  border-bottom: 2px solid var(--gold);
  z-index: 20;
}
.error {
  background: var(--further-bg);
  color: var(--further-ink);
  border-radius: 8px;
  padding: 10px 12px;
}
footer.foot {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 16px;
  justify-content: space-between;
  padding: 14px 24px;
  border-top: 1px solid var(--line);
  font-size: 12px;
  color: var(--muted);
  margin-top: 24px;
}
footer.foot a {
  color: var(--ink);
  text-decoration: none;
}
.login {
  min-height: 100vh;
  display: flex;
  flex-wrap: wrap;
}
.login .brandside {
  flex: 1 1 480px;
  position: relative;
  overflow: hidden;
  padding: 56px 64px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  color: #ececf1;
  background:
    radial-gradient(700px 420px at 85% 0%, rgba(180, 156, 255, 0.32), transparent 70%),
    radial-gradient(600px 380px at 0% 100%, rgba(138, 180, 255, 0.22), transparent 70%),
    radial-gradient(300px 200px at 70% 75%, rgba(227, 190, 94, 0.16), transparent 70%), #1c1c21;
  border-right: 2px solid var(--gold-line);
}
.login .formside {
  flex: 1 1 440px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 48px 24px;
}
.login form {
  width: 100%;
  max-width: 380px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.login input {
  height: 46px;
}
.tagline {
  font-family: "Space Grotesk", sans-serif;
  font-size: 40px;
  font-weight: 700;
  line-height: 1.1;
  max-width: 520px;
}
.parent {
  max-width: 460px;
  margin: 0 auto;
  min-height: 100vh;
  background: var(--bg);
  display: flex;
  flex-direction: column;
}
.parent .q {
  font-family: "Space Grotesk", sans-serif;
  font-size: 23px;
  font-weight: 700;
  line-height: 1.25;
}
.parent .bigbtn {
  height: 60px;
  font-size: 18px;
  font-weight: 600;
  border-radius: 14px;
  width: 100%;
}
.progress {
  height: 6px;
  background: #e5e7eb;
  border-radius: 4px;
}
.progress > div {
  height: 6px;
  background: var(--accent);
  border-radius: 4px;
}
.modal-back {
  position: fixed;
  inset: 0;
  background: rgba(28, 28, 33, 0.45);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10;
  padding: 16px;
}
.modal {
  background: #fff;
  border-radius: 14px;
  padding: 20px;
  width: 100%;
  max-width: 560px;
  max-height: 90vh;
  overflow: auto;
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.grid2 {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}
@media (max-width: 700px) {
  .grid2 {
    grid-template-columns: 1fr;
  }
  .tagline {
    font-size: 30px;
  }
  .login .brandside {
    padding: 32px;
  }
}

.demo-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 14px;
  align-items: center;
  justify-content: space-between;
  padding: 7px 24px;
  background: #fff6dd;
  border-bottom: 1px solid #ead9a8;
  font-size: 13px;
  color: #3a2e0b;
}
.demo-bar > span:first-child {
  display: block;
  line-height: 1.5;
}
.demo-bar > span:first-child svg {
  vertical-align: -1px;
  margin-right: 4px;
}
.demo-bar button {
  padding: 6px 12px;
  font-size: 13px;
  font-weight: 600;
  border-color: #c9a24a;
  background: #fff;
}
button.avatar {
  padding: 0;
  cursor: pointer;
}
.plainlink {
  color: inherit;
  text-decoration: none;
}
.plainlink:hover {
  text-decoration: underline;
}
.fab {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 9;
  background: #1c1c21;
  color: #fff;
  border: 1px solid var(--gold-line);
  border-radius: 999px;
  padding: 10px 16px;
  font-weight: 600;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.18);
}
.fab svg {
  margin-top: 0 !important;
}
.linkbtn {
  border: 0;
  background: none;
  padding: 2px 0;
  color: var(--accent);
  font-weight: 600;
  font-size: 13px;
  justify-content: flex-start;
}
.linkbtn:hover {
  text-decoration: underline;
}
label.check {
  gap: 8px;
  font-size: 14px;
  cursor: pointer;
  flex-wrap: nowrap;
  align-items: flex-start;
}
label.check input {
  margin-top: 3px;
}
label.chip {
  cursor: pointer;
  border: 1px solid var(--line-2);
}
label.chip:has(input:checked) {
  border: 2px solid var(--accent);
  background: var(--accent-bg);
  font-weight: 600;
}
label.chip input {
  display: none;
}
details.folder summary {
  list-style: none;
  cursor: pointer;
  display: flex;
  gap: 10px;
  align-items: center;
  padding: 14px 16px;
}
details.folder summary::-webkit-details-marker {
  display: none;
}
details.folder .folder-ico {
  transition: transform 0.15s;
  color: var(--muted);
}
details.folder[open] .folder-ico {
  transform: rotate(90deg);
}
.tl-item {
  display: flex;
  gap: 12px;
  padding: 10px 0;
  border-top: 1px solid #f1f1f4;
}
.tl-item:first-of-type {
  border-top: 0;
}
.tl-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: #c7c7d1;
  margin-top: 4px;
  flex: none;
}
.tl-dot.r-normal,
.tl-dot.r-normal_variant {
  background: var(--ok);
}
.tl-dot.r-further_evaluation {
  background: var(--further);
}
.parent .bigbtn.on {
  border: 2px solid var(--accent);
  background: var(--accent-bg);
}
.bigbtn {
  height: 56px;
  font-size: 17px;
  font-weight: 600;
  border-radius: 14px;
  width: 100%;
}
@media (max-width: 700px) {
  .page {
    padding: 14px;
  }
  header .bar {
    padding: 10px 14px 4px;
    flex-wrap: wrap;
  }
  header nav {
    padding: 0 14px;
    gap: 18px;
  }
  .user .who {
    display: none;
  }
  .demo-bar {
    padding: 6px 14px;
    font-size: 12px;
  }
  .hide-sm {
    display: none;
  }
  h1 {
    font-size: 22px;
  }
  .table-wrap table {
    font-size: 12px;
  }
  td,
  th {
    padding: 8px 6px;
  }
  .plainlink {
    color: inherit;
    text-decoration: none;
  }
  .plainlink:hover {
    text-decoration: underline;
  }
  .fab {
    right: 12px;
    bottom: 12px;
    padding: 9px 13px;
  }
  .modal {
    padding: 16px;
  }
}

button.user {
  margin-left: auto;
  min-width: 0;
  background: transparent;
  border: 0;
  color: #ececf1;
  padding: 4px 6px;
  border-radius: 10px;
}
button.user:hover {
  background: rgba(255, 255, 255, 0.06);
}
button.user .caret {
  color: #a0a0ad;
  font-size: 11px;
}
button.user .who {
  text-align: left;
}
button.acct {
  justify-content: flex-start;
  flex-direction: column;
  align-items: flex-start;
  gap: 2px;
  text-align: left;
}
button.acct.on {
  border: 2px solid var(--accent);
  background: var(--accent-bg);
}
.chip.mini {
  padding: 3px 7px;
  font-size: 11px;
  font-family: "JetBrains Mono", monospace;
}
.qr svg {
  display: block;
  max-width: 100%;
  height: auto;
}
.qr {
  background: #fff;
  padding: 6px;
  border: 1px solid var(--line);
  border-radius: 10px;
}

.qbar {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 10px;
  align-items: baseline;
  border-radius: 10px;
  padding: 9px 12px;
  font-size: 13px;
  border: 1px solid;
}
.qbar b {
  font-weight: 600;
}
.qbar span {
  flex: 1 1 260px;
}
.qbar.warn {
  background: #fef2f2;
  border-color: #fca5a5;
  color: #7f1d1d;
}
.qbar.notable {
  background: #fffbeb;
  border-color: #fcd34d;
  color: #78350f;
}
.qbar.info {
  background: #eff6ff;
  border-color: #bfdbfe;
  color: #1e3a8a;
}
.qbar.ok {
  background: #f0fdf4;
  border-color: #bbf7d0;
  color: #14532d;
}
table.mini {
  width: auto;
  font-size: 13px;
}
table.mini td,
table.mini th {
  padding: 5px 10px;
}
table.mini td.over {
  color: var(--further);
  font-weight: 700;
}
table.mini td.expected {
  color: var(--muted);
  font-weight: 700;
  text-decoration: underline dotted;
}
table.mini td.over,
table.mini td.expected {
  cursor: help;
}
table.mini tr.flagged td {
  background: #fffbeb;
  font-weight: 600;
}
.finding.tier-further {
  border-left: 4px solid #dc2626;
}
.finding.tier-may_require {
  border-left: 4px solid #d97706;
}
.finding.tier-no_further {
  border-left: 4px solid #16a34a;
}

button.fold {
  justify-content: flex-start;
  border: 0;
  background: transparent;
  padding: 7px 10px;
  border-radius: 8px;
  gap: 8px;
  text-align: left;
}
button.fold:hover {
  background: var(--bg);
}
button.fold.on {
  background: var(--accent-bg);
  font-weight: 600;
}

.msg {
  border-radius: 10px;
  padding: 8px 10px;
  background: var(--bg);
  display: flex;
  flex-direction: column;
  gap: 3px;
  font-size: 13.5px;
}
.msg.consultant {
  background: #eef0fe;
}
.ecgtip {
  position: absolute;
  z-index: 20;
  width: min(380px, 92%);
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  box-shadow: 0 10px 30px rgba(17, 24, 39, 0.16);
  padding: 10px 12px;
  font-size: 13px;
  line-height: 1.45;
  display: flex;
  flex-direction: column;
  gap: 10px;
  pointer-events: none;
}
.ecgtip[hidden] {
  display: none;
}
.tipf {
  border-left: 3px solid #9ca3af;
  padding-left: 9px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.tipf.tier-further {
  border-color: #b91c1c;
}
.tipf.tier-may_require {
  border-color: #b45309;
}
.tipf.tier-no_further {
  border-color: #15803d;
}
.tipsrc {
  font-size: 11.5px;
  color: #4b5563;
  display: flex;
  flex-direction: column;
  gap: 3px;
}
.tipsrc .label {
  font-size: 10.5px;
  margin: 0;
}
.tipfoot {
  font-size: 11px;
  color: #9ca3af;
}
.row.wrap {
  flex-wrap: wrap;
}
.tabs {
  display: flex;
  gap: 4px;
  flex-wrap: wrap;
}
.tab {
  background: transparent;
  border: 1px solid transparent;
  border-radius: 999px;
  padding: 6px 12px;
  font-weight: 500;
  color: var(--muted);
  cursor: pointer;
}
.tab.on {
  background: #fff;
  border-color: #d4d4de;
  color: var(--ink, #111827);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}
.tab .n {
  display: inline-block;
  min-width: 20px;
  padding: 0 6px;
  margin-left: 4px;
  border-radius: 999px;
  background: #eef0f5;
  font-size: 12px;
  color: #4b5563;
}
.tab.on .n {
  background: var(--accent-bg);
  color: var(--accent);
}
.prog {
  width: 90px;
  height: 6px;
  background: #e5e7eb;
  border-radius: 4px;
  overflow: hidden;
  flex: none;
}
.prog > span {
  display: block;
  height: 100%;
  background: #15803d;
}
details.earlier > summary {
  cursor: pointer;
  padding: 6px 2px;
}
.legend .ink {
  display: inline-block;
  width: 14px;
  height: 3px;
  border-radius: 2px;
  vertical-align: middle;
  margin-right: 6px;
}
.dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex: none;
  display: inline-block;
}
.focusbar {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  background: #fff;
  font-size: 13.5px;
}
.ecgtip {
  width: min(320px, 92%);
  gap: 8px;
  padding: 10px 12px;
  font-size: 13px;
}
.ecgtip.pinned {
  pointer-events: auto;
  border-color: #c9cbd1;
}
.tipf {
  border-left: 0;
  padding-left: 0;
  gap: 3px;
}
.tipsrc summary {
  cursor: pointer;
  color: #3b5bdb;
  font-size: 12px;
  list-style: none;
}
.tipsrc summary::-webkit-details-marker {
  display: none;
}
.tipsrc[open] summary {
  margin-bottom: 4px;
}
.legend .ring {
  display: inline-block;
  width: 14px;
  height: 10px;
  border-radius: 50%;
  vertical-align: middle;
  margin-right: 6px;
}
.setup {
  max-width: 900px;
  gap: 18px;
}
.setup h1 {
  font-size: 28px;
  margin: 0;
}
.stps {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  font-size: 13px;
}
.stp {
  padding: 6px 12px;
  border-radius: 999px;
  background: #eef0f5;
  color: #5a5a66;
}
.stp.now {
  background: #1c1c21;
  color: #fff;
  font-weight: 600;
}
.stp.done {
  background: #e7f8ec;
  color: #15803d;
}
.choice {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 8px;
  padding: 18px;
  border-radius: 12px;
  background: #fff;
  text-align: left;
  border: 1px solid #e5e7eb;
  cursor: pointer;
  min-height: 44px;
  font: inherit;
  color: inherit;
}
.choice span {
  font-size: 14px;
  color: #5a5a66;
  line-height: 1.5;
}
.choice.on {
  border: 2px solid #3b5bdb;
  box-shadow: 0 0 0 3px #e3e9ff;
}
.choice .tick {
  width: 24px;
  height: 24px;
  border-radius: 6px;
  border: 1px solid #b9b9c6;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  flex: none;
}
.choice.on .tick {
  background: #3b5bdb;
  border-color: #3b5bdb;
}
.setup fieldset {
  margin: 0;
}
.setup legend {
  font-weight: 600;
  padding: 0 6px;
}
.qrsheet {
  max-width: 816px;
  margin: 0 auto 40px;
  background: #fff;
  border: 1px solid #e5e7eb;
  color: #1c1c21;
}
.qrhead {
  background: #1c1c21;
  color: #fff;
  border-bottom: 4px solid #c9a24a;
  padding: 24px 48px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.qrhead > span:last-child {
  color: #cdcdd6;
  font-size: 14px;
}
.qrbody {
  padding: 32px 48px 40px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 18px;
  text-align: center;
}
.qrbody h1 {
  font-size: 48px;
  margin: 0;
  font-family: "Space Grotesk", Inter, sans-serif;
}
.qrcode svg {
  width: 260px;
  height: 260px;
  display: block;
}
.qrsteps {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  width: 100%;
  text-align: left;
}
.qrsteps > div,
.qrwalk {
  background: #f4f4f6;
  border-radius: 12px;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.qrsteps span,
.qrwalk span {
  font-size: 13px;
  color: #5a5a66;
  line-height: 1.5;
}
.qrwalk {
  width: 100%;
  box-sizing: border-box;
  background: #fff;
  border: 1.5px dashed #b9b9c6;
  text-align: left;
}
@media print {
  .noprint {
    display: none !important;
  }
  .qrsheet {
    border: 0;
    margin: 0;
    max-width: none;
  }
  body {
    background: #fff;
  }
}
@media (max-width: 640px) {
  .qrsteps {
    grid-template-columns: 1fr;
  }
}
.mono .adj {
  color: #b45309;
  font-weight: 600;
  cursor: help;
}
.measure {
  font-size: 13px;
  line-height: 1.5;
  background: #f4f6ff;
  border-radius: 8px;
  padding: 8px 10px;
}
.measure .pill {
  margin-left: 4px;
}
details.finding.quiet summary {
  cursor: pointer;
  list-style: none;
}
details.finding.quiet summary::-webkit-details-marker {
  display: none;
}
details.finding.quiet[open] {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.fb-about {
  display: flex;
  flex-direction: column;
  gap: 2px;
  background: var(--bg, #f4f4f6);
  border-radius: 10px;
  padding: 10px 12px;
  font-size: 14px;
}
.fb-kinds {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}
.fb-kind {
  display: flex;
  gap: 8px;
  align-items: flex-start;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 10px;
  cursor: pointer;
}
.fb-kind:has(input:checked) {
  border: 2px solid var(--accent);
  background: var(--accent-bg);
}
.fb-kind span {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.linkbtn.subtle {
  color: var(--muted, #5a5a66);
}
@media (max-width: 640px) {
  .fb-kinds {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

/* Clinical review module */
.rv-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
}
.rv-nav a {
  padding: 8px 14px;
  border-radius: 999px;
  border: 1px solid var(--line-2);
  color: var(--ink);
  text-decoration: none;
  font-weight: 600;
  font-size: 14px;
}
.rv-nav a.on {
  background: var(--ink);
  color: #fff;
  border-color: var(--ink);
}
.rv-cards {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}
.rv-cards.three {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}
.rv-card {
  display: flex;
  flex-direction: column;
  gap: 8px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 20px;
  color: var(--ink);
  text-decoration: none;
}
.rv-card:hover {
  border-color: var(--accent);
}
.rv-progress {
  display: block;
  height: 8px;
  border-radius: 999px;
  background: #eef0f5;
  overflow: hidden;
  min-width: 120px;
}
.rv-progress span {
  display: block;
  height: 100%;
  background: var(--accent);
}
.rv-tag {
  align-self: flex-start;
  display: inline-block;
  border-radius: 6px;
  padding: 2px 8px;
  font-size: 12px;
  font-weight: 600;
  background: #eef0f5;
  color: var(--ink-2);
  white-space: nowrap;
}
.rv-tag.tag-workflow {
  background: #e3e9ff;
  color: #2f49b5;
}
.rv-tag.tag-medical {
  background: #ffede3;
  color: #9a3412;
}
.rv-tag.tag-safety {
  background: var(--further-bg);
  color: var(--further-ink);
}
.rv-tag.tag-ok {
  background: #e4f5ea;
  color: #1e6b3c;
}
.rv-q {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.rv-q.rv-missing .rv-why textarea {
  border: 2px solid var(--further);
}
.rv-qhead {
  display: flex;
  gap: 8px;
  align-items: flex-start;
  font-size: 14px;
  line-height: 1.4;
}
.rv-opts {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.rv-opt {
  min-height: 40px;
  min-width: 40px;
  padding: 0 12px;
  border-radius: 9px;
  border: 1px solid var(--line-2);
  background: #fff;
  font-weight: 500;
}
.rv-opt.on {
  border: 2px solid var(--accent);
  background: var(--accent-bg);
  color: var(--accent-2);
  font-weight: 600;
}
.rv-why {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 13px;
  font-weight: 600;
  color: var(--may-ink);
}
.rv-why textarea {
  border: 2px solid #e8c07a;
}
.rv-split {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  align-items: flex-start;
}
.rv-list {
  flex: 1 1 260px;
  display: flex;
  flex-direction: column;
  gap: 2px;
  max-height: 80vh;
  overflow: auto;
}
.rv-list input {
  margin-bottom: 6px;
}
.rv-item {
  display: flex;
  gap: 8px;
  align-items: center;
  padding: 9px 8px;
  border-radius: 8px;
  color: var(--ink);
  text-decoration: none;
  font-size: 14px;
}
.rv-item.on {
  background: var(--accent-bg);
  color: var(--accent-2);
  font-weight: 600;
}
.rv-content {
  font-size: 15px;
  line-height: 1.55;
}
.rv-content ol {
  margin: 6px 0 0;
  padding-left: 20px;
}
.rv-rules td {
  vertical-align: top;
}
.rv-rules .rv-opt {
  min-height: 36px;
}
.rv-panel {
  position: fixed;
  top: 0;
  right: 0;
  width: 400px;
  height: 100vh;
  z-index: 40;
  background: #fff;
  border-left: 2px solid var(--accent);
  display: flex;
  flex-direction: column;
  box-shadow: -8px 0 24px rgba(0, 0, 0, 0.08);
}
.rv-top {
  background: #2f49b5;
  color: #fff;
  padding: 14px 16px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.rv-top .linkbtn.light {
  color: #fff;
}
.rv-as {
  align-self: flex-start;
  background: rgba(255, 255, 255, 0.18);
  border-radius: 999px;
  padding: 3px 10px;
  font-size: 12px;
  font-weight: 600;
}
.rv-bar {
  display: flex;
  gap: 3px;
}
.rv-seg {
  flex: 1;
  height: 8px;
  padding: 0;
  border: 0;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.3);
  min-height: 8px;
  cursor: pointer;
}
.rv-seg.done {
  background: #fff;
}
.rv-seg.now {
  background: var(--gold);
}
.rv-body {
  flex: 1;
  overflow-y: auto;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.rv-body .rv-q {
  border-top: 1px solid var(--line);
  padding-top: 12px;
}
.rv-tries {
  background: #f5f7ff;
  border: 1px solid #c9d3f7;
  border-radius: 12px;
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.rv-try {
  display: flex;
  gap: 8px;
  align-items: flex-start;
  font-size: 13px;
  line-height: 1.4;
}
.rv-try input {
  margin-top: 2px;
}
.rv-foot {
  display: flex;
  gap: 8px;
  padding: 12px 16px;
  border-top: 1px solid var(--line);
}
.rv-foot .primary {
  flex: 2;
}
.rv-foot button:first-child {
  flex: 1;
}
body.rv-docked #app {
  margin-right: 400px;
}
.rv-look {
  position: fixed;
  left: 50%;
  bottom: 16px;
  transform: translateX(-50%);
  z-index: 40;
  display: flex;
  gap: 12px;
  align-items: center;
  background: #2f49b5;
  color: #fff;
  padding: 10px 12px 10px 18px;
  border-radius: 12px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
  font-size: 14px;
}
@media (max-width: 900px) {
  .rv-panel {
    top: auto;
    bottom: 0;
    width: 100%;
    height: 55vh;
    border-left: 0;
    border-top: 2px solid var(--accent);
  }
  body.rv-docked #app {
    margin-right: 0;
    margin-bottom: 55vh;
  }
  .rv-cards,
  .rv-cards.three {
    grid-template-columns: 1fr;
  }
}
.fb-sevs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.fb-sevs label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 40px;
  padding: 0 14px;
  border: 1px solid var(--line-2);
  border-radius: 999px;
  cursor: pointer;
  font-size: 14px;
}
.fb-sevs label:has(input:checked) {
  border: 2px solid var(--accent);
  background: var(--accent-bg);
  font-weight: 600;
}
.rv-kv {
  border-collapse: collapse;
  width: 100%;
  font-size: 14px;
}
.rv-kv th {
  text-align: left;
  font-weight: 600;
  padding: 6px 12px 6px 0;
  vertical-align: top;
  width: 34%;
  color: var(--ink-2);
}
.rv-kv td {
  padding: 6px 0;
  vertical-align: top;
}
.rv-kv tr + tr {
  border-top: 1px solid var(--line);
}
.rv-step {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: var(--ink);
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  flex: none;
}
.rv-file {
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 8px 12px;
}
.rv-file summary {
  cursor: pointer;
}
.rv-file pre {
  margin: 8px 0 0;
  font-size: 12px;
  white-space: pre-wrap;
  word-break: break-all;
  background: var(--bg);
  padding: 10px;
  border-radius: 8px;
}
.rv-csv {
  margin-top: 8px;
  max-height: 420px;
  overflow: auto;
}
.rv-csv table {
  font-size: 12px;
}
.rv-csv th,
.rv-csv td {
  padding: 6px 8px;
  white-space: nowrap;
}
.rv-csv td.long {
  min-width: 300px;
  white-space: normal;
  word-break: break-word;
}
.rv-steps {
  margin: 0;
  padding-left: 22px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  font-size: 13.5px;
  line-height: 1.45;
}
.rv-steps li {
  color: var(--muted);
}
.rv-steps li.now {
  color: var(--ink);
  font-weight: 500;
}
.rv-steps li.now > span:first-child {
  display: block;
  background: #fff;
  border: 2px solid var(--accent);
  border-radius: 8px;
  padding: 8px 10px;
  margin-bottom: 4px;
}
.rv-steps li.done {
  color: var(--ok);
  text-decoration: line-through;
  text-decoration-color: rgba(21, 128, 61, 0.4);
}
.rv-steps li.skipped {
  color: var(--muted);
  font-style: italic;
}
button.small {
  min-height: 32px;
  padding: 0 12px;
  font-size: 13px;
}
.rv-target {
  outline: 3px solid #f5b400 !important;
  outline-offset: 3px;
  border-radius: 8px;
  animation: rv-pulse 1.4s ease-in-out infinite;
  position: relative;
  z-index: 5;
}
@keyframes rv-pulse {
  0%,
  100% {
    box-shadow: 0 0 0 0 rgba(245, 180, 0, 0.55);
  }
  50% {
    box-shadow: 0 0 0 10px rgba(245, 180, 0, 0);
  }
}
@media (prefers-reduced-motion: reduce) {
  .rv-target {
    animation: none;
  }
}
.rv-offbox {
  display: flex;
  flex-direction: column;
  gap: 6px;
  align-items: flex-start;
  background: var(--may-bg);
  border: 1px solid #e8c07a;
  border-radius: 10px;
  padding: 12px;
  color: var(--may-ink);
}
.rv-seg.full {
  background: #fff;
}
.rv-seg.part {
  background: linear-gradient(90deg, #fff 50%, rgba(255, 255, 255, 0.3) 50%);
}
.rv-seg.now {
  outline: 2px solid var(--gold);
  outline-offset: 2px;
}
.rv-redo {
  font-size: 12px;
  margin-left: 4px;
  text-decoration: none;
}
.rv-part > summary {
  cursor: pointer;
  list-style: none;
}
.rv-ans-sec {
  border-top: 1px solid var(--line);
  padding-top: 10px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.rv-ans {
  width: 100%;
  border-collapse: collapse;
  font-size: 13.5px;
}
.rv-ans td {
  padding: 6px 8px 6px 0;
  vertical-align: top;
  border-top: 1px solid var(--line);
}
.rv-ans td:last-child {
  width: 40%;
}
.rv-flag {
  color: var(--may-ink);
  font-weight: 600;
}
.rv-missing-tag {
  display: inline-block;
  background: var(--may-bg);
  color: var(--may-ink);
  border-radius: 6px;
  padding: 1px 8px;
  font-size: 12px;
  font-weight: 600;
}
a.btn.small {
  min-height: 32px;
  padding: 0 12px;
  font-size: 13px;
  display: inline-flex;
  align-items: center;
}
.cmp-picks {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 8px 10px;
  align-items: center;
}
.cmp-picks select {
  width: 100%;
}
.cmp-sum {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 10px 12px;
  border: 1px solid var(--line, #e5e7eb);
  border-radius: 10px;
}
.cmp-line {
  font-size: 13.5px;
  padding-left: 12px;
  position: relative;
}
.cmp-line::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.55em;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #9ca3af;
}
.cmp-line.warn::before {
  background: #d97706;
}
.cmp-line.note::before {
  background: #2563eb;
}
.cmp-line.ok::before {
  background: #16a34a;
}
.cmp-line.muted {
  color: var(--muted, #6b7280);
}
.cmp-side {
  border-top: 1px solid var(--line, #e5e7eb);
  padding-top: 10px;
}
.cmp-more summary {
  cursor: pointer;
}
[data-fold].folded > :not(.fold-head) {
  display: none !important;
}
[data-fold].folded > .fold-head > :not(.fold-label):not(.fold-show) {
  display: none;
}
.fold-head {
  cursor: pointer;
}
.fold-label {
  user-select: none;
  display: flex;
  align-items: center;
  gap: 10px;
}
.fold-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: none;
  width: 28px;
  height: 28px;
  min-height: 0;
  padding: 0;
  border-radius: 50%;
  border: 1px solid #d1d5db;
  background: #fff;
  color: #374151;
  cursor: pointer;
  transition:
    transform 0.15s ease,
    background 0.15s ease;
}
.fold-btn[aria-expanded="true"] svg {
  transform: rotate(90deg);
}
.fold-head:hover .fold-btn {
  background: #f3f4f6;
  border-color: #9ca3af;
}
.fold-btn:focus-visible {
  outline: 2px solid var(--accent, #4f46e5);
  outline-offset: 2px;
}
.fold-show {
  margin-left: auto;
  font-size: 12px;
  color: #6b7280;
}
[data-fold].folded > .fold-head > .fold-show {
  display: inline;
}
.look {
  gap: 8px;
  background: #fffaee;
  border: 1px solid #ead9a8;
  border-radius: 10px;
  padding: 10px 12px;
}
.look .label {
  color: var(--gold-ink);
}
.look-body {
  font-size: 14px;
  padding-left: 38px;
}
.fold-all {
  padding: 6px 10px;
  border: 1px dashed var(--line, #e5e7eb);
  border-radius: 10px;
}
.crit-row {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 4px 0;
}
#rv-donebar {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 12px auto 0;
  max-width: 1500px;
  width: calc(100% - 48px);
  padding: 12px 16px;
  border-radius: 10px;
  background: #ecfdf3;
  border: 1px solid #86efac;
  color: #14532d;
  font-size: 14.5px;
}
.rv-done-tick {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: #16a34a;
  color: #fff;
  font-weight: 700;
  flex: none;
}
.rv-pulse {
  animation: rvpulse 1.6s ease-in-out infinite;
}
@keyframes rvpulse {
  0%,
  100% {
    box-shadow: 0 0 0 0 rgba(79, 70, 229, 0.45);
  }
  50% {
    box-shadow: 0 0 0 8px rgba(79, 70, 229, 0);
  }
}
.rv-flash {
  outline: 3px solid #f59e0b;
  outline-offset: 4px;
  border-radius: 8px;
  transition: outline-color 0.4s;
}
a.rv-away {
  opacity: 0.4;
  cursor: not-allowed;
}
.rv-blocked {
  opacity: 0.55;
  cursor: not-allowed;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}
@media (prefers-reduced-motion: reduce) {
  .rv-pulse {
    animation: none;
    outline: 2px solid #4f46e5;
  }
}
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}
.ask-btn {
  flex-shrink: 0;
  margin-left: auto;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 12px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  background: rgba(255, 255, 255, 0.08);
  color: #ececf1;
  font: inherit;
  font-size: 14px;
  cursor: pointer;
}
.ask-btn:hover,
.ask-btn[aria-expanded="true"] {
  background: rgba(255, 255, 255, 0.16);
}
.ask-btn kbd {
  font: 11px var(--mono, monospace);
  padding: 1px 6px;
  border-radius: 4px;
  border: 1px solid rgba(255, 255, 255, 0.3);
  color: #c9cbe3;
}
.ask-btn + button.user {
  margin-left: 12px;
}
body.ask-docked #app {
  margin-right: 420px;
}
#ask-panel {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  width: 420px;
  z-index: 40;
  background: #fff;
  border-left: 1px solid var(--line);
  box-shadow: -8px 0 24px rgba(20, 20, 40, 0.08);
  display: flex;
  flex-direction: column;
}
.ask-head {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 14px 16px;
  border-bottom: 1px solid var(--line);
  font-size: 16px;
}
.ask-x {
  background: none;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 4px 10px;
  font: inherit;
  font-size: 13px;
  cursor: pointer;
}
.ask-body {
  flex: 1;
  overflow-y: auto;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.ask-hello {
  color: var(--ink-2);
  font-size: 14px;
}
.ask-hello p {
  margin: 0 0 6px;
}
.ask-foot {
  border-top: 1px solid var(--line);
  padding: 12px 16px 14px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.ask-form {
  display: flex;
  gap: 8px;
  align-items: flex-end;
}
.ask-form textarea {
  flex: 1;
  resize: none;
  font: inherit;
  font-size: 14px;
  padding: 9px 11px;
  border: 1px solid var(--line-2);
  border-radius: 10px;
}
.ask-note {
  font-size: 12px;
  color: var(--muted);
}
@media (max-width: 900px) {
  body.ask-docked #app {
    margin-right: 0;
  }
  #ask-panel {
    width: 100%;
    top: auto;
    height: 75vh;
    border-left: 0;
    border-top: 1px solid var(--line);
  }
  .ask-btn span,
  .ask-btn kbd {
    display: none;
  }
}
.ask-preview {
  background: var(--accent-bg);
  color: var(--accent-2);
  border: 1px solid #cfd6fb;
  border-radius: 10px;
  padding: 10px 12px;
  font-size: 14px;
}
.ask-will {
  margin: 0 0 12px;
  padding-left: 0;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.ask-will li {
  padding: 9px 12px;
  border: 1px dashed var(--line-2);
  border-radius: 10px;
  color: var(--ink-2);
  font-size: 14px;
}
.ask-will.plain li {
  border: 0;
  padding: 0 0 0 16px;
  position: relative;
}
.ask-will.plain li::before {
  content: "•";
  position: absolute;
  left: 2px;
  color: var(--muted);
}

/* Clickable table rows (Darkstar staff list) */
tr.click {
  cursor: pointer;
}
tr.click:hover td,
tr.click:focus-visible td {
  background: var(--bg);
}
.read-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px 24px;
  margin-bottom: 16px;
}
.read-tabs {
  display: flex;
  gap: 2px;
  overflow-x: auto;
  border-bottom: 1px solid var(--line);
}
.read-tab {
  flex: none;
  background: none;
  border: 0;
  padding: 12px 14px;
  min-height: 44px;
  font: inherit;
  font-size: 14px;
  font-weight: 500;
  color: var(--muted);
  cursor: pointer;
}
.read-tab.on {
  color: var(--accent);
  font-weight: 600;
  box-shadow: inset 0 -2px 0 var(--accent);
}
.read-aside {
  position: sticky;
  top: 12px;
  max-height: calc(100vh - 24px);
  overflow-y: auto;
}
@media (max-width: 1000px) {
  .read-aside {
    position: static;
    max-height: none;
    overflow: visible;
  }
}

.subnav {
  display: flex;
  gap: 4px;
  padding: 8px 24px;
  background: #fff;
  border-bottom: 1px solid var(--line);
  overflow-x: auto;
}
.subnav a {
  flex: none;
  padding: 7px 14px;
  border-radius: 999px;
  color: var(--muted);
  text-decoration: none;
  font-weight: 500;
  font-size: 14px;
}
.subnav a.on {
  background: var(--accent-bg);
  color: var(--accent);
  font-weight: 600;
}

.bar-track {
  height: 8px;
  border-radius: 4px;
  background: #e5e7eb;
  overflow: hidden;
}
.bar-fill {
  height: 100%;
  background: var(--accent);
}
.stage-tiles {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
  gap: 8px;
}
.stage-tile {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 2px;
  padding: 12px 14px;
  border: 2px solid var(--line);
  border-radius: 12px;
  background: #fff;
  font: inherit;
  cursor: pointer;
  text-align: left;
}
.stage-tile b {
  font-size: 22px;
}
.stage-tile span {
  font-size: 13px;
  color: var(--muted);
}
.stage-tile.on {
  border-color: var(--accent);
  background: var(--accent-bg);
}

.cal-top {
  display: none;
}
@media (max-width: 700px), (max-height: 500px) {
  .ecg-wrap.cal-on {
    position: fixed;
    inset: 0;
    z-index: 60;
    margin: 0;
    border-radius: 0;
    background: #fff;
    overflow: auto;
    padding: 12px;
  }
  .ecg-wrap.cal-on .cal-top {
    display: flex;
    align-items: center;
    gap: 8px;
    position: sticky;
    top: -12px;
    background: #fff;
    padding: 8px 0;
    z-index: 1;
  }
}

.combo {
  position: relative;
  display: block;
  min-width: 0;
}
.combo-input {
  width: 100%;
  padding-right: 28px;
  background: var(--card)
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%236b6b78' stroke-width='2.5'%3E%3Ccircle cx='11' cy='11' r='7'/%3E%3Cpath d='m20 20-3.5-3.5'/%3E%3C/svg%3E")
    no-repeat right 10px center;
}
.combo-list {
  display: none;
  position: absolute;
  z-index: 60;
  left: 0;
  right: 0;
  top: calc(100% + 4px);
  max-height: 280px;
  overflow: auto;
  background: var(--card);
  border: 1px solid var(--line-2);
  border-radius: 10px;
  box-shadow: 0 8px 24px rgba(20, 20, 40, 0.12);
  padding: 4px;
}
.combo-opt {
  padding: 8px 10px;
  border-radius: 6px;
  cursor: pointer;
  font-size: 14px;
}
.combo-opt.on,
.combo-opt:hover {
  background: var(--bg);
}
.combo-none {
  padding: 8px 10px;
  color: var(--ink-2);
  font-size: 13px;
}

.orgpick {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0;
  margin-left: auto;
  margin-right: 12px;
  padding: 6px 12px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.14);
  color: #fff;
  line-height: 1.2;
  position: relative;
  padding-right: 26px;
}
.orgpick .muted {
  color: rgba(255, 255, 255, 0.6);
}
.orgpick .caret {
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
}

table thead th:not(:empty) {
  cursor: pointer;
  user-select: none;
}
table thead th[data-dir="asc"]::after {
  content: " ▲";
  font-size: 10px;
}
table thead th[data-dir="desc"]::after {
  content: " ▼";
  font-size: 10px;
}
