:root {
  /* Richmond Rx Pharmacy brand: client red #D42D15, logo navy #0F1F2E, logo blue #3B75CD */
  --bg: #f2f2f6;
  --surface: #ffffff;
  --ink: #0f1f2e;
  --muted: #5d6875;
  --line: #e2e3ea;
  --accent: #d42d15;
  --accent-ink: #a8220f;
  --accent-soft: #fcebe8;
  --accent-line: #f3c3ba;
  --charcoal: #0f1f2e;
  --blue: #3b75cd;
  --ok: #1f8a4c;
  --warn: #8a5a00;
  --warn-soft: #fff3d6;
  --radius: 14px;
  --shadow: 0 1px 2px rgba(15, 31, 46, 0.06), 0 6px 20px rgba(15, 31, 46, 0.05);
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 16px/1.5 system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}
[hidden] { display: none !important; }
h1, h2, h3, h4, p { margin: 0; }
button, input, textarea { font: inherit; color: inherit; }
a { color: var(--accent-ink); }
:focus-visible { outline: 3px solid rgba(212, 45, 21, 0.4); outline-offset: 2px; border-radius: 6px; }

.wrap { max-width: 1160px; margin: 0 auto; padding: 0 20px; }

/* ---------- header ---------- */
.top { background: var(--surface); border-top: 4px solid var(--accent); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 10; }
.top-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding-top: 14px; padding-bottom: 10px; }
.brand { display: inline-flex; align-items: center; gap: 12px; color: var(--ink); text-decoration: none; min-width: 0; }
.brand img { height: 34px; width: auto; display: block; }
.brand-app { padding-left: 12px; border-left: 2px solid var(--line); font-size: 0.8rem; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); white-space: nowrap; }
.privacy-pill { display: inline-flex; align-items: center; gap: 8px; padding: 5px 12px; border-radius: 999px; background: #eef0f5; color: var(--charcoal); font-size: 0.82rem; font-weight: 600; white-space: nowrap; }
.privacy-pill::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--ok); }

.tabs { display: flex; gap: 4px; overflow-x: auto; scrollbar-width: none; }
.tabs::-webkit-scrollbar { display: none; }
.tabs a { padding: 10px 14px; color: var(--muted); text-decoration: none; font-weight: 600; font-size: 0.95rem; border-bottom: 3px solid transparent; white-space: nowrap; }
.tabs a:hover { color: var(--ink); }
.tabs a[aria-current="page"] { color: var(--accent-ink); border-bottom-color: var(--accent); }

main.wrap { padding-top: 28px; padding-bottom: 40px; min-height: 60vh; }
.view-head { margin-bottom: 20px; }
.view-head h1 { font-size: 1.6rem; letter-spacing: -0.02em; }
.view-head p { color: var(--muted); margin-top: 4px; max-width: 62ch; }

/* ---------- shared pieces ---------- */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 20px; }
.card + .card { margin-top: 16px; }
.card-title { display: flex; align-items: baseline; gap: 10px; margin-bottom: 14px; }
.card-title h2 { font-size: 1.08rem; letter-spacing: -0.01em; }
.step { flex: none; display: grid; place-items: center; width: 24px; height: 24px; border-radius: 50%; background: var(--accent-soft); color: var(--accent-ink); font-size: 0.8rem; font-weight: 700; transform: translateY(-1px); }
.hint { color: var(--muted); font-size: 0.86rem; margin-top: 6px; }
.label { display: block; font-weight: 600; font-size: 0.9rem; margin: 14px 0 6px; }

.input, textarea.input {
  width: 100%; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; background: #fff;
}
.input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px rgba(212, 45, 21, 0.14); }
textarea.input { min-height: 84px; resize: vertical; }
.input::placeholder { color: #98a0ab; }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; padding: 9px 14px; border-radius: 10px; border: 1px solid var(--line); background: #fff; font-weight: 600; font-size: 0.92rem; cursor: pointer; text-decoration: none; color: var(--ink); }
.btn:hover { border-color: #c5c8d2; }
.btn:disabled { opacity: 0.45; cursor: not-allowed; }
.btn-primary { background: var(--accent); border-color: var(--accent); color: #fff; }
.btn-primary:hover { background: var(--accent-ink); border-color: var(--accent-ink); }
.btn-quiet { border-color: transparent; background: transparent; color: var(--muted); }
.btn-quiet:hover { color: var(--ink); border-color: var(--line); }
.btn-danger { background: var(--accent-soft); border-color: var(--accent-line); color: var(--accent-ink); }
.btn-small { padding: 6px 10px; font-size: 0.84rem; }
.btn.is-on { background: var(--accent-soft); border-color: var(--accent-line); color: var(--accent-ink); }

.checks { display: grid; gap: 2px; }
.checks.two { grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); }
.check { display: flex; align-items: flex-start; gap: 10px; padding: 8px 10px; border-radius: 10px; cursor: pointer; }
.check:hover { background: #f4f4f8; }
.check input { flex: none; width: 18px; height: 18px; margin-top: 3px; accent-color: var(--accent); }
.check:has(input:checked) { background: var(--accent-soft); }

.segmented { display: inline-flex; flex-wrap: wrap; gap: 6px; }
.segmented button { padding: 8px 14px; border-radius: 999px; border: 1px solid var(--line); background: #fff; font-weight: 600; font-size: 0.9rem; cursor: pointer; }
.segmented button[aria-pressed="true"] { background: var(--accent); border-color: var(--accent); color: #fff; }

.chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.chip { padding: 6px 12px; border-radius: 999px; border: 1px solid var(--line); background: #fff; font-size: 0.86rem; cursor: pointer; }
.chip:hover { border-color: #c5c8d2; }
.chip[aria-pressed="true"] { background: var(--accent-soft); border-color: var(--accent-line); color: var(--accent-ink); font-weight: 600; }
.chips.is-off { opacity: 0.4; pointer-events: none; }
#condition-chips { max-height: 176px; overflow: auto; padding: 2px; }

.rows { list-style: none; margin: 12px 0 0; padding: 0; display: grid; gap: 6px; }
.row { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 8px 10px 8px 12px; border: 1px solid var(--line); border-radius: 10px; background: #fafafc; }
.row-main { min-width: 0; }
.row-name { font-weight: 600; font-size: 0.93rem; overflow-wrap: anywhere; }
.row-meta { color: var(--muted); font-size: 0.82rem; }
.row-actions { display: flex; align-items: center; gap: 6px; flex: none; }
.row .check { padding: 4px 8px; font-size: 0.86rem; }
.row .check input { margin-top: 2px; }

.tag { display: inline-block; padding: 1px 8px; border-radius: 999px; background: var(--warn-soft); color: var(--warn); font-size: 0.74rem; font-weight: 700; letter-spacing: 0.02em; vertical-align: 1px; margin-left: 6px; }
.empty { color: var(--muted); padding: 24px 4px; }

/* ---------- review ---------- */
.review { display: grid; grid-template-columns: minmax(0, 1fr) 440px; gap: 20px; align-items: start; }
.summary { position: sticky; top: 118px; }
.summary h2 { font-size: 1.08rem; }
.summary-text { margin: 12px 0 0; padding: 14px; background: #f8f8fb; border: 1px solid var(--line); border-radius: 10px; font: 0.86rem/1.55 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; white-space: pre-wrap; overflow-wrap: anywhere; max-height: 52vh; overflow: auto; }
.summary-text.is-empty { font-family: inherit; color: var(--muted); }
.summary-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.summary-actions .btn { flex: 1; }
.summary-actions .btn-quiet { flex: none; }

.suggest { position: relative; }
.suggest-list { position: absolute; left: 0; right: 0; top: calc(100% + 4px); z-index: 5; margin: 0; padding: 4px; list-style: none; background: #fff; border: 1px solid var(--line); border-radius: 12px; box-shadow: 0 12px 30px rgba(15, 31, 46, 0.14); max-height: 300px; overflow: auto; }
.suggest-list button { display: block; width: 100%; text-align: left; padding: 8px 10px; border: 0; background: none; border-radius: 8px; cursor: pointer; font-size: 0.92rem; }
.suggest-list button:hover, .suggest-list button.is-active { background: var(--accent-soft); }
.suggest-list small { color: var(--muted); }

/* ---------- counselling ---------- */
.split { display: grid; grid-template-columns: 300px minmax(0, 1fr); gap: 20px; align-items: start; }
.side { position: sticky; top: 118px; padding: 14px; }
.side-list { list-style: none; margin: 10px 0 0; padding: 0; max-height: calc(100vh - 230px); overflow: auto; }
.side-list a { display: block; padding: 8px 10px; border-radius: 9px; text-decoration: none; color: var(--ink); font-size: 0.93rem; }
.side-list a:hover { background: #f4f4f8; }
.side-list a[aria-current="true"] { background: var(--accent-soft); color: var(--accent-ink); font-weight: 600; }
.guide-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; flex-wrap: wrap; margin-bottom: 6px; }
.guide-head h1 { font-size: 1.5rem; letter-spacing: -0.02em; }
.guide-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.guide h2 { font-size: 1.05rem; margin: 24px 0 8px; padding-bottom: 6px; border-bottom: 2px solid var(--accent-soft); color: var(--accent-ink); }
.guide h3 { font-size: 0.96rem; margin: 16px 0 6px; }
.guide p { margin: 8px 0; }
.guide ul { margin: 6px 0; padding-left: 22px; }
.guide li { margin: 5px 0; }
.guide li::marker { color: var(--accent); }
.guide li ul { margin-top: 4px; }
.back { display: none; margin-bottom: 12px; }

/* ---------- medicines ---------- */
.toolbar { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 14px; }
.toolbar .input { flex: 1; min-width: 220px; }
.count { color: var(--muted); font-size: 0.88rem; }
.med-list { list-style: none; margin: 0; padding: 0; }
.med-list .row { background: var(--surface); border-radius: 0; border-width: 0 0 1px; padding: 11px 4px; }
.med-list .row:last-child { border-bottom: 0; }

/* ---------- handouts ---------- */
.group-title { font-size: 0.82rem; text-transform: uppercase; letter-spacing: 0.08em; color: var(--muted); margin: 26px 0 10px; }
.group-title:first-of-type { margin-top: 0; }
.tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 12px; }
.tile { display: flex; flex-direction: column; justify-content: space-between; gap: 12px; padding: 14px 16px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); }
.tile-title { font-weight: 600; font-size: 0.95rem; }
.tile-actions { display: flex; gap: 8px; flex-wrap: wrap; }

.foot { padding-top: 18px; padding-bottom: 36px; color: var(--muted); font-size: 0.84rem; border-top: 1px solid var(--line); }
.foot p + p { margin-top: 4px; }

.toast { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); background: var(--charcoal); color: #fff; padding: 10px 16px; border-radius: 999px; font-size: 0.9rem; font-weight: 600; z-index: 20; box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2); }

/* ---------- small screens ---------- */
@media (max-width: 900px) {
  .review { grid-template-columns: minmax(0, 1fr); }
  .summary { position: static; }
  .summary-text { max-height: none; }
  .split { grid-template-columns: minmax(0, 1fr); }
  .side { position: static; }
  .side-list { max-height: none; }
  .split.has-guide .side { display: none; }
  .split.has-guide .back { display: inline-flex; }
}
@media (max-width: 520px) {
  .wrap { padding: 0 14px; }
  .card { padding: 16px; }
  .privacy-pill { font-size: 0.74rem; padding: 4px 9px; }
  .brand img { height: 28px; }
  .brand-app { display: none; }
  .row { flex-wrap: wrap; }
}

/* ---------- print: MedCheckSheet.print() clones the target into #print-root ---------- */
#print-root { display: none; }
@media print {
  body { background: #fff; }
  body.is-printing > *:not(#print-root) { display: none !important; }
  body.is-printing #print-root { display: block; }
  #print-root .no-print { display: none !important; }
  #print-root .card { border: 0; box-shadow: none; padding: 0; }
}

/* Very narrow phones: shorten the privacy pill so the header never overflows. */
@media (max-width: 430px) {
  .privacy-pill { font-size: 0; gap: 0; padding: 4px 9px; }
  .privacy-pill::after { content: "No names"; font-size: 0.72rem; margin-left: 6px; }
}

/* ---------- saved reviews: reference number, admin ---------- */
.btn-block { width: 100%; margin-top: 12px; padding: 11px 14px; }
.ref { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-weight: 700; letter-spacing: 0.02em; color: var(--ink); }
.ref.big { font-size: 1.5rem; display: block; }
.ref-badge { display: grid; gap: 2px; margin-top: 12px; padding: 12px 14px; border-radius: 10px; background: #eaf1fb; border: 1px solid #c9daf4; }
.ref-label { font-size: 0.74rem; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--blue); }
.login { max-width: 400px; margin: 40px auto; display: grid; gap: 12px; }
.login h1 { font-size: 1.3rem; }
.form-error { color: var(--accent-ink); font-size: 0.9rem; font-weight: 600; }
.split-wide { grid-template-columns: 340px minmax(0, 1fr); }
.side .count { display: block; margin-top: 10px; }
.side-list a { display: grid; gap: 1px; }
.side-list .ref { font-size: 0.95rem; }
.clip { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.summary-text.tall { max-height: none; }
@media (max-width: 900px) { .split-wide { grid-template-columns: minmax(0, 1fr); } }
a.chip { text-decoration: none; color: var(--ink); }
.summary-actions .btn { white-space: nowrap; }

/* ---------- summary sheet (review page, admin panel, print) ---------- */
#summary-sheet { margin-top: 12px; max-height: 60vh; overflow: auto; border-radius: 12px; border: 1px solid var(--line); }
.sheet { container-type: inline-size; background: #fff; color: var(--ink); font-size: 0.9rem; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
.sheet-head { display: flex; align-items: center; justify-content: space-between; gap: 14px; flex-wrap: wrap; padding: 16px 18px; border-bottom: 3px solid var(--accent); }
.sheet-logo { height: auto; width: auto; max-height: 38px; max-width: 100%; display: block; }
.sheet-pharmacy { display: grid; gap: 1px; font-style: normal; font-size: 0.76rem; line-height: 1.4; color: var(--muted); }
.sheet-parts { display: flex; flex-wrap: wrap; column-gap: 12px; }
.sheet-parts span { white-space: nowrap; }
.sheet-pharmacy strong { color: var(--ink); font-size: 0.86rem; }
.sheet-ref { display: flex; align-items: center; justify-content: space-between; gap: 14px; flex-wrap: wrap; margin: 16px 18px 0; padding: 14px 18px; border-radius: 12px; background: var(--ink); color: #fff; }
.sheet-ref > div { display: grid; gap: 2px; }
.sheet-ref-label { font-size: 0.68rem; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; color: #9fb6d6; }
.sheet-ref-number { font: 800 1.9rem/1.1 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; letter-spacing: 0.03em; white-space: nowrap; }
.sheet-ref-state { font-size: 0.76rem; color: #ffd9a8; font-weight: 600; }
.sheet-ref-meta { font-size: 0.82rem; color: #d5deea; }
.sheet-ref-meta strong { font-size: 1.05rem; color: #fff; }
.sheet-ref.is-pending { background: #fff; color: var(--muted); border: 2px dashed var(--line); }
.sheet-ref.is-pending .sheet-ref-number { font-size: 1.15rem; font-weight: 700; font-family: inherit; letter-spacing: 0; color: var(--muted); }
.sheet-ref.is-pending .sheet-ref-label { color: var(--muted); }
.sheet-ref.is-pending .sheet-ref-meta, .sheet-ref.is-pending .sheet-ref-meta strong { color: var(--ink); }
.sheet-body { display: grid; gap: 12px; padding: 16px 18px; }
.sheet-section { border: 1px solid var(--line); border-radius: 10px; padding: 12px 14px; break-inside: avoid; }
.sheet-section h3 { display: flex; align-items: center; gap: 8px; margin: 0 0 8px; font-size: 0.72rem; font-weight: 800; letter-spacing: 0.09em; text-transform: uppercase; color: var(--accent-ink); }
.sheet-count { display: inline-grid; place-items: center; min-width: 20px; height: 20px; padding: 0 6px; border-radius: 999px; background: var(--accent-soft); color: var(--accent-ink); font-size: 0.72rem; letter-spacing: 0; }
.sheet-facts { display: grid; grid-template-columns: auto 1fr; gap: 6px 14px; margin: 0; }
.sheet-facts dt { color: var(--muted); font-size: 0.82rem; }
.sheet-facts dd { margin: 0; font-weight: 600; }
.sheet-tags { display: flex; flex-wrap: wrap; gap: 5px; }
.sheet-tags span { padding: 2px 9px; border-radius: 999px; background: #eaf1fb; color: #1f4f9c; font-size: 0.8rem; font-weight: 600; }
.sheet-ticks { list-style: none; margin: 0; padding: 0; display: grid; gap: 5px; }
.sheet-ticks li { position: relative; padding-left: 24px; }
.sheet-ticks li::before { content: "✓"; position: absolute; left: 0; top: 1px; width: 16px; height: 16px; border-radius: 50%; background: var(--ok); color: #fff; font-size: 0.66rem; font-weight: 800; display: grid; place-items: center; }
.sheet-note { margin: 6px 0 0; white-space: pre-wrap; overflow-wrap: anywhere; }
.sheet-note:first-of-type:not(ul + .sheet-note) { margin-top: 0; }
.sheet-table { width: 100%; border-collapse: collapse; }
.sheet-table th { text-align: left; font-size: 0.7rem; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); padding: 0 0 5px; border-bottom: 1px solid var(--line); }
.sheet-table td { padding: 6px 0; border-bottom: 1px solid #eff0f4; font-weight: 600; overflow-wrap: anywhere; }
.sheet-table td:last-child, .sheet-table th:last-child { text-align: right; font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-weight: 500; white-space: nowrap; padding-left: 12px; }
.sheet-table tr:last-child td { border-bottom: 0; }
.sheet-empty { margin: 0; padding: 22px 18px; color: var(--muted); }
.sheet-foot { padding: 0 18px 16px; color: var(--muted); font-size: 0.74rem; break-inside: avoid; }
.sheet-sign { display: none; grid-template-columns: 2fr 2fr 1fr; gap: 24px; margin: 30px 0 8px; }
.sheet-sign span { border-top: 1px solid var(--ink); padding-top: 4px; color: var(--ink); }
@container (min-width: 620px) {
  /* Two packed columns; wide sections (table, facts) run across both. */
  .sheet-body { display: block; columns: 2; column-gap: 12px; padding-bottom: 4px; }
  .sheet-section { margin-bottom: 12px; }
  .sheet-section:has(.sheet-table), .sheet-section:has(.sheet-facts) { column-span: all; }
  .sheet-ref-number { font-size: 2.6rem; }
  .sheet-logo { max-height: 46px; }
  .sheet-pharmacy, .sheet-ref-meta { text-align: right; }
  .sheet-parts { justify-content: flex-end; }
}
@media (max-width: 1040px) and (min-width: 901px) { .review { grid-template-columns: minmax(0, 1fr) 380px; } }
@media (max-width: 900px) { #summary-sheet { max-height: none; } }

/* ---------- full record: sheet + counselling guides + handout pages ---------- */
.sheet-attached { list-style: none; margin: 0 0 6px; padding: 0; display: grid; gap: 4px; }
.sheet-attached b { font-size: 0.7rem; letter-spacing: 0.06em; text-transform: uppercase; color: var(--blue); margin-right: 4px; }
.sheet-muted { color: var(--muted); font-size: 0.8rem; margin: 0; }
.packet-strip { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; padding-bottom: 6px; margin-bottom: 12px; border-bottom: 2px solid var(--accent); font-size: 0.74rem; color: var(--muted); }
.packet-strip b { color: var(--accent-ink); text-transform: uppercase; letter-spacing: 0.06em; }
.packet-guide { padding: 16px 18px; background: #fff; border-top: 1px solid var(--line); }
.packet-guide h1 { font-size: 1.25rem; margin-bottom: 4px; }
.packet-guide h2 { font-size: 1rem; margin: 18px 0 6px; padding-bottom: 5px; border-bottom: 2px solid var(--accent-soft); color: var(--accent-ink); }
.packet-guide h3 { font-size: 0.94rem; margin: 14px 0 4px; }
.packet-guide p { margin: 6px 0; }
.packet-guide ul { margin: 6px 0; padding-left: 22px; }
.packet-guide li { margin: 4px 0; }
.packet-guide li::marker { color: var(--accent); }
.packet-handout-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; padding: 12px 18px; background: #fff; border-top: 1px solid var(--line); font-size: 0.9rem; }
.packet-warn { color: var(--warn); font-weight: 600; }
.packet-page { display: none; }
/* On the review page the side panel shows the sheet only; the attachments print and show in the admin panel. */
#summary-sheet .packet-guide, #summary-sheet .packet-handout { display: none; }
.guide-head + .packet { border: 1px solid var(--line); border-radius: 12px; overflow: hidden; margin-top: 12px; }

@media print {
  @page { margin: 14mm; }
  #print-root .sheet, #print-root .packet-guide { font-size: 10.5pt; border: 0; border-radius: 0; }
  #print-root .packet { border: 0; }
  #print-root .sheet-head, #print-root .sheet-body, #print-root .sheet-foot, #print-root .packet-guide { padding-left: 0; padding-right: 0; }
  #print-root .sheet-ref { margin-left: 0; margin-right: 0; }
  #print-root .packet-guide { display: block; break-before: page; padding-top: 0; }
  #print-root .packet-handout { display: block; }
  #print-root .packet-page { display: block; break-before: page; break-inside: avoid; }
  #print-root .packet-page img { display: block; margin: 0 auto; max-width: 100%; max-height: 232mm; }
  .sheet-sign { display: grid; }
}
.login-logo { height: 34px; width: auto; margin-bottom: 6px; }

/* ---------- V3: medicines with strength and directions ticks ---------- */
.med-cards { list-style: none; margin: 14px 0 0; padding: 0; display: grid; gap: 10px; }
.med-card { border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; background: #fafafc; }
.med-card-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.med-card .row-name { font-size: 1rem; }
.med-ticks { display: grid; grid-template-columns: 92px 1fr; align-items: start; gap: 8px; margin-top: 10px; }
.med-ticks-label { font-size: 0.8rem; font-weight: 700; color: var(--muted); padding-top: 7px; }
.med-ticks .chips { margin-top: 0; }
.med-ticks .chip[aria-pressed="true"]::before { content: "✓ "; }
.input-small { margin: 8px 0 0 100px; width: calc(100% - 100px); padding: 7px 10px; font-size: 0.88rem; }
@media (max-width: 520px) {
  .med-ticks { grid-template-columns: 1fr; gap: 4px; }
  .med-ticks-label { padding-top: 0; }
  .input-small { margin-left: 0; width: 100%; }
}
.sheet-meds td, .sheet-meds th { text-align: left !important; font-family: inherit !important; white-space: normal !important; padding-right: 10px; vertical-align: top; }
.sheet-meds td:not(:first-child) { font-weight: 500; }

/* ---------- V3: tickable counselling guides ---------- */
.pick-status { display: block; margin: 4px 0 10px; font-size: 0.88rem; color: var(--muted); }
.pick-status.is-on { color: var(--ok); font-weight: 600; }
.guide .points { list-style: none; padding-left: 0; margin: 4px 0; }
.guide .points li { margin: 0; }
.guide .points ul { list-style: none; padding-left: 28px; margin: 0; }
.guide .check.point { padding: 5px 8px; align-items: flex-start; }
.guide .check.point input { margin-top: 4px; }
.guide .check.point:has(input:checked) { background: var(--accent-soft); }
.guide .check.point:has(input:indeterminate) { background: #fdf3f1; }
.guide .group > .check.point > span { font-weight: 600; }
.guide h2, .guide h3 { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; }
.section-tools { display: inline-flex; gap: 4px; font-size: 0.78rem; font-weight: 600; }
.linkish { border: 0; background: none; padding: 2px 6px; color: var(--accent-ink); cursor: pointer; border-radius: 6px; }
.linkish:hover { background: var(--accent-soft); }
.side-count { float: right; min-width: 20px; padding: 0 6px; border-radius: 999px; background: var(--accent); color: #fff; font-size: 0.74rem; font-weight: 700; text-align: center; line-height: 20px; }
