:root { --ink:#1f2933; --muted:#64707d; --line:#d9dee3; --bg:#f5f9fb;
  /* BetterHealth brand (betterhealthllc.org logo): blue "Better", green "Health" */
  --brand-blue:#2A98DA; --brand-green:#0BB574;
  --brand:#1A73AD;        /* darker blue for text and buttons, readable on white (WCAG AA) */
  --brand-green-dark:#087A4E; --brand-tint:#e8f4fb; --green-tint:#e3f6ee;
  --red:#f8cbad; --amber:#ffe699; --green:#c6efce; --hold:#d9e1f2; }
* { box-sizing: border-box; }
body { margin:0; font: 15px/1.45 "Open Sans", system-ui, -apple-system, "Segoe UI", Arial, sans-serif; color:var(--ink); background:var(--bg); }
a { color:var(--brand); }
.top { display:flex; flex-wrap:wrap; gap:.5rem 1.2rem; align-items:center; padding:.5rem 1rem; background:#fff; color:var(--ink);
  border-bottom:4px solid transparent; border-image:linear-gradient(90deg, var(--brand-blue), var(--brand-green)) 1; }
.top a { color:var(--ink); text-decoration:none; }
.brand { display:flex; align-items:center; gap:.45rem; font-weight:700; font-size:1.15rem; letter-spacing:-.01em; }
.brand img { height:38px; width:auto; }
.brand .b1 { color:var(--brand-blue); } .brand .b2 { color:var(--brand-green); }
.brand .b3 { color:var(--muted); font-weight:400; font-size:.85em; margin-left:.15rem; }
.top nav { display:flex; flex-wrap:wrap; gap:.25rem 1rem; flex:1; }
.top nav a { padding:.2rem 0; border-bottom:2px solid transparent; font-weight:500; }
.top nav a:hover, .top nav a.on, .top nav a[aria-current] { color:var(--brand); border-bottom-color:var(--brand-green); }
.logout { display:flex; gap:.5rem; align-items:center; } .who { color:var(--muted); font-size:.9em; }
button.link { background:none; border:0; color:var(--brand); text-decoration:underline; cursor:pointer; font:inherit; }
main { max-width:1200px; margin:0 auto; padding:1rem; }
h1 { font-size:1.4rem; margin:.5rem 0; color:#14384f; } h2 { font-size:1.1rem; margin:.6rem 0; } h3 { margin:.3rem 0; font-size:1rem; }
.card { background:#fff; border:1px solid var(--line); border-radius:10px; padding:1rem; margin:.8rem 0; box-shadow:0 1px 2px rgba(16,40,64,.04); }
.narrow { max-width:460px; margin:3rem auto; }
.muted { color:var(--muted); } .small { font-size:.85em; }
.alert { background:var(--red); padding:.6rem .8rem; border-radius:6px; }
.head-row { display:flex; flex-wrap:wrap; gap:.5rem; justify-content:space-between; align-items:center; }
.btn { display:inline-block; padding:.45rem .8rem; border:1px solid var(--line); border-radius:6px; background:#fff; color:var(--ink);
  text-decoration:none; cursor:pointer; font:inherit; }
.btn.primary { background:var(--brand); color:#fff; border-color:var(--brand); }
.btn.primary:hover { background:#155f8f; }
.btn:hover { border-color:var(--brand-blue); }
.btn.small { padding:.2rem .5rem; font-size:.85em; }
.btn.selected { background:var(--green-tint); border-color:var(--brand-green); color:var(--brand-green-dark); font-weight:600; }
input, select, textarea { font:inherit; padding:.4rem; border:1px solid var(--line); border-radius:6px; max-width:100%; }
.form-grid { display:grid; grid-template-columns:repeat(auto-fill, minmax(220px, 1fr)); gap:.6rem 1rem; align-items:end; }
.form-grid label { display:flex; flex-direction:column; gap:.2rem; font-size:.9em; }
.form-grid label.check { flex-direction:row; align-items:center; gap:.4rem; }
.form-grid .wide { grid-column:1 / -1; }
.inline { display:flex; flex-wrap:wrap; gap:.4rem; align-items:center; }
.grid { width:100%; border-collapse:collapse; } .grid th, .grid td { border-bottom:1px solid var(--line); padding:.35rem .4rem; text-align:left; vertical-align:top; }
.grid th { font-size:.85em; color:var(--muted); }
.scroll { overflow-x:auto; }
tr.red td { background:#fdeee5; } tr.amber td { background:#fff6d6; } tr.green td { background:#eef9ef; }
.pill { display:inline-block; padding:.05rem .5rem; border-radius:999px; background:#eceff2; font-size:.85em; white-space:nowrap; }
.pill.red { background:var(--red); } .pill.amber { background:var(--amber); } .pill.green { background:var(--green); } .pill.hold { background:var(--hold); } .pill.grey { background:var(--muted); }
.tag { display:inline-block; font-size:.75em; padding:0 .4rem; border-radius:4px; background:#eceff2; }
.tiles { display:grid; grid-template-columns:repeat(auto-fill, minmax(150px, 1fr)); gap:.5rem; }
.tile { border:1px solid var(--line); border-top:3px solid var(--brand-green); border-radius:8px; padding:.5rem; display:flex; flex-direction:column; background:#fff; }
a.tile:hover { border-top-color:var(--brand-blue); }
.tile b { font-size:1.4rem; color:var(--brand); } .tile span { font-size:.8em; color:var(--muted); }
.tile.red { background:var(--red); } .tile.amber { background:var(--amber); }
.task .time { font-weight:600; color:var(--brand); }
.status-form { display:flex; flex-wrap:wrap; gap:.4rem; margin-top:.4rem; } .status-form input { flex:1 1 220px; }
.foot { text-align:center; color:var(--muted); font-size:.8em; padding:1.5rem; }
.check-row { display:grid; grid-template-columns:minmax(0,1fr) minmax(160px, 280px) auto; gap:.5rem; align-items:center; padding:.35rem 0; border-bottom:1px solid var(--line); }
.check-row.late { background:#fdeee5; }
.check-row label.check { display:flex; gap:.5rem; align-items:flex-start; }
a.tile { text-decoration:none; color:var(--ink); }
.handbook table { border-collapse:collapse; width:100%; } .handbook th, .handbook td { border-bottom:1px solid var(--line); padding:.3rem; text-align:left; vertical-align:top; }
.handbook ul { padding-left:1.2rem; }
@media (max-width:640px) { .check-row { grid-template-columns:1fr; } }
/* History */
.grid.history td.num, .grid td.num { text-align:right; font-variant-numeric:tabular-nums; white-space:nowrap; }
.grid.history th.section { text-align:left; background:#eef1f5; color:var(--brand); font-size:.9em; }
.grid.history svg { color:var(--brand); display:block; }
form.inline label { margin-right:.5rem; }
/* Reports */
.nowrap { white-space:nowrap; }
.report-actions { display:flex; gap:.6rem; align-items:center; margin-bottom:1rem; }
.report-head h1 { margin:.2rem 0; }
.report-table th, .report-table td { font-size:.85em; }
.report-table thead th { position:sticky; top:0; background:#fff; }
@media print {
  @page { size: landscape; margin: 12mm; }
  body { background:#fff; }
  header.top, .demo-banner, .demo-sub, footer.foot, .no-print, #toast { display:none !important; }
  main { max-width:none; padding:0; margin:0; }
  .report-table { width:100%; border-collapse:collapse; }
  .report-table th, .report-table td { border:1px solid #999; padding:3px 5px; font-size:9pt; }
  .report-table thead { display:table-header-group; }   /* headings repeat on every page */
  .report-table thead th { position:static; background:#e8f4fb; }
  .report-table tr { page-break-inside:avoid; }
  a { color:inherit; text-decoration:none; }
  /* Reports: all rows and columns, as few sheets as possible (report_print.html print settings) */
  .back-row, nav.tabbar, .guide-panel, #words-here, aside, nav.side { display:none !important; }
  .report { width:100%; }
  body:has(.report.across) { page:report-across; }
  body:has(.report.upright) { page:report-upright; }
  body:has(.report.across.m-normal) { page:report-across-normal; }
  body:has(.report.upright.m-normal) { page:report-upright-normal; }
  .report .report-head { margin:0 0 3pt; }
  .report .report-line { display:flex; justify-content:space-between; gap:8pt; font-size:7.5pt; }
  .report .report-head h1 { font-size:12pt; margin:2pt 0; }
  .report .report-head .small { font-size:7.5pt; }
  .report .report-logo { height:12pt; }
  .report-table { table-layout:auto; }
  .report-table th, .report-table td { vertical-align:top; overflow-wrap:break-word; word-break:normal; hyphens:manual; line-height:1.2; }
  .report.fs-xs .report-table th, .report.fs-xs .report-table td { font-size:6pt; padding:1px 2px; }
  .report.fs-s .report-table th, .report.fs-s .report-table td { font-size:7pt; padding:1px 3px; }
  .report.fs-m .report-table th, .report.fs-m .report-table td { font-size:8.5pt; padding:2px 4px; }
  .report.fs-l .report-table th, .report.fs-l .report-table td { font-size:10pt; padding:3px 5px; }
  .report.zebra .report-table tbody tr:nth-child(even) td { background:#f2f5f8; }
  .report .report-foot { font-size:6.5pt; margin-top:3pt; }
  .report-table th, .report-table td { -webkit-print-color-adjust:exact; print-color-adjust:exact; }
}
@page report-across { size: letter landscape; margin: 6mm 6mm 8mm; }
@page report-upright { size: letter portrait; margin: 6mm 6mm 8mm; }
@page report-across-normal { size: letter landscape; margin: 12mm; }
@page report-upright-normal { size: letter portrait; margin: 12mm; }
.print-settings { display:flex; flex-wrap:wrap; gap:.4rem 1rem; align-items:center; }
.print-settings label { display:inline-flex; gap:.4rem; align-items:center; }

/* Brand touches */
.login-logo { display:block; margin:0 auto .5rem; height:110px; width:auto; }
.foot { border-top:1px solid var(--line); }
.foot .b1 { color:var(--brand-blue); font-weight:600; } .foot .b2 { color:var(--brand-green); font-weight:600; }
.report-head .report-logo { height:30px; width:auto; vertical-align:middle; margin-right:.4rem; }
.grid.history th.section { background:var(--brand-tint); color:var(--brand); }
/* Waiting for me */
.top nav .count { display:inline-block; min-width:1.3em; padding:0 .35em; border-radius:999px; background:var(--brand-green); color:#fff; font-size:.8em; text-align:center; }
.work { border-left:4px solid var(--brand-blue); }
.work.overdue { border-left-color:#d9534f; }
.work-head { display:flex; flex-wrap:wrap; justify-content:space-between; gap:.3rem 1rem; }
.work p { margin:.4rem 0; }
.work-actions { display:flex; flex-wrap:wrap; gap:.4rem; align-items:center; }
.work-actions input { flex:1 1 260px; }

/* Assistant features */
.answer { white-space: pre-wrap; line-height: 1.5; }
p.lead { font-size: 1.1em; font-weight: 600; }
form.inline { display: inline; }
details.card summary { cursor: pointer; font-weight: 600; }
svg.spark { color: var(--brand-blue, #1f3864); vertical-align: middle; }
svg.spark.better { color: var(--brand-green, #2e7d32); }
svg.spark.worse { color: #c77700; }

/* Header menus and the always-visible Ask button */
.top nav { align-items:center; }
.menu { position:relative; }
.menu-btn { background:none; border:0; padding:.2rem 0; font:inherit; font-weight:500; color:inherit; cursor:pointer; border-bottom:2px solid transparent; }
.menu.on > .menu-btn, .menu-btn:hover { color:var(--brand); border-bottom-color:var(--brand-green); }
.menu .drop { display:none; position:absolute; top:100%; left:-.6rem; z-index:30; min-width:13rem; padding:.3rem 0; background:#fff;
  border:1px solid #d9e1ea; border-radius:8px; box-shadow:0 6px 18px rgba(20,40,70,.12); flex-direction:column; }
.menu:hover .drop, .menu.open .drop, .menu:focus-within .drop { display:flex; }
.top nav .menu .drop a { padding:.4rem .9rem; border-bottom:0; white-space:nowrap; }
.top nav .menu .drop a:hover, .top nav .menu .drop a.on { background:var(--green-tint); }
.top nav .menu .drop a.sub { padding-left:1.8rem; font-size:.95em; }
.top nav .menu .drop a.sub::before { content:"↳ "; color:var(--muted); }
.ask-btn { display:inline-flex; align-items:center; gap:.3rem; padding:.35rem .8rem; border-radius:999px; background:var(--brand-green-dark);
  color:#fff !important; font-weight:600; white-space:nowrap; }
.ask-btn:hover { filter:brightness(.95); text-decoration:none; }

/* ------------------------------------------------------------------ phones and small tablets */
.nav-toggle { display:none; align-items:center; gap:.35rem; padding:.45rem .75rem; border:1px solid var(--line); border-radius:8px;
  background:#fff; font:inherit; font-weight:600; color:var(--ink); cursor:pointer; }
.nav-toggle .count, .menu-btn .count, .top nav a .count { display:inline-block; min-width:1.3em; padding:0 .35em; border-radius:999px;
  background:var(--brand-green-dark); color:#fff; font-size:.75em; text-align:center; }
/* Header: the menu folds behind a "Menu" button below 1024px wide (tablets and phones). */
.top nav { order:2; } .ask-btn { order:3; margin-left:auto; } .nav-toggle { order:4; } .top .logout { order:5; }
@media (max-width:1024px) {
  .top { gap:.5rem; padding:.45rem .7rem; position:sticky; top:0; z-index:40; }
  .brand img { height:32px; } .brand .b3 { display:none; }
  .ask-btn { margin-left:auto; padding:.45rem .8rem; }
  .nav-toggle { display:inline-flex; }
  .top nav, .top .logout { display:none; }
  .top nav { order:10; } .top .logout { order:11; }
  .top.open nav { display:flex; flex-direction:column; flex-wrap:nowrap; align-items:stretch; flex-basis:100%; gap:0;
    max-height:75vh; overflow-y:auto; }
  .top nav .menu { width:100%; }
  .top.open .logout { display:flex; flex-basis:100%; justify-content:space-between; padding:.6rem 0 .2rem; border-top:1px solid var(--line); }
  .top nav > a, .top nav .drop a { padding:.7rem .3rem; border-bottom:1px solid var(--line); font-size:1rem; }
  .top nav > a.on, .top nav .drop a.on { border-bottom-color:var(--line); background:var(--green-tint); }
  .menu .drop, .menu:hover .drop { display:flex; position:static; box-shadow:none; border:0; border-radius:0; padding:0; min-width:0; }
  .top nav .menu .drop a { padding-left:1.1rem; }
  .top nav .menu .drop a.sub { padding-left:2rem; }
  .menu-btn { width:100%; text-align:left; padding:.75rem .3rem .3rem; cursor:default; color:var(--muted); font-size:.78rem;
    text-transform:uppercase; letter-spacing:.04em; border-bottom:0 !important; }
  .menu-btn > span[aria-hidden], .menu-btn .count { display:none; }
}
@media (max-width:760px) {
  body { font-size:16px; }
  main { padding:.6rem; }
  h1 { font-size:1.25rem; }
  .card { padding:.8rem; border-radius:8px; }
  /* Wide tables scroll sideways inside their card instead of stretching the page. */
  table.grid, table.report-table, .handbook table { display:block; max-width:100%; overflow-x:auto; -webkit-overflow-scrolling:touch; }
  .grid th, .grid td { padding:.45rem .4rem; }
  /* Comfortable tap targets; 16px text stops phones zooming into form fields. */
  input, select, textarea { font-size:16px; min-height:2.6rem; }
  input[type=checkbox], input[type=radio] { min-height:0; width:1.3rem; height:1.3rem; }
  .btn { min-height:2.6rem; padding:.55rem .9rem; } .btn.small { min-height:2.2rem; padding:.35rem .7rem; }
  .form-grid { grid-template-columns:1fr; }
  .form-grid input:not([type=checkbox]):not([type=radio]), .form-grid select, .form-grid textarea { width:100%; }
  .head-row { align-items:flex-start; }
  .report-actions { flex-wrap:wrap; }
  .tiles { grid-template-columns:repeat(2, minmax(0, 1fr)); }
  details summary { padding:.4rem 0; }
}
@media print { .nav-toggle, .ask-btn { display:none !important; } }

/* text kept as received: line breaks shown, long lines wrapped */
.pre { white-space: pre-wrap; overflow-wrap: anywhere; }

/* Boards: one column per stage; on a phone the stages stack and empty ones shrink to a line */
.board { display:grid; grid-auto-flow:column; grid-auto-columns:minmax(230px, 1fr); gap:.6rem; overflow-x:auto; padding-bottom:.5rem; align-items:start; }
.board-col { background:#f5f8fa; border:1px solid var(--line); border-radius:8px; padding:.5rem; min-height:4rem; }
.board-col h3 { font-size:.9rem; margin:0 0 .5rem; display:flex; justify-content:space-between; gap:.5rem; }
.board-col .count { background:#fff; border:1px solid var(--line); border-radius:999px; padding:0 .5rem; font-weight:normal; }
.board-card { background:#fff; border:1px solid var(--line); border-left:4px solid var(--brand-blue); border-radius:6px; padding:.5rem; margin-bottom:.5rem; font-size:.9rem; }
.board-card form { margin-top:.4rem; }
.board-card .who { color:var(--muted); font-size:.85em; }
@media (max-width: 720px) {
  .board { grid-auto-flow:row; grid-auto-columns:auto; }
  .board-col.empty { min-height:0; padding:.3rem .5rem; }
  .board-col.empty h3 { margin:0; }
}

/* Reply strength meter */
#strength meter, meter { width: 12rem; height: 1rem; vertical-align: middle; }
ul.checks { list-style: none; padding-left: 0; margin: .3rem 0; }
ul.checks li.good { color: var(--brand-green-dark, #1b6b3a); }
ul.checks li.fix { font-weight: 600; }

/* Task buttons: a tick box that looks like a button and turns green when chosen */
label.chip { display: inline-block; margin: .15rem .2rem .15rem 0; cursor: pointer; }
label.chip input { position: absolute; opacity: 0; width: 1px; height: 1px; }
label.chip span { display: inline-block; padding: .4rem .7rem; border: 1px solid #c9d3dc; border-radius: 999px; background: #fff; font-size: .9em; }
label.chip input:checked + span { background: var(--green-tint, #e3f4ea); border-color: var(--brand-green, #1b8a4b); color: var(--brand-green-dark, #145c34); font-weight: 600; }
label.chip input:checked + span::before { content: "\2713  "; }
label.chip input:focus-visible + span { outline: 2px solid var(--brand, #1a6fb0); outline-offset: 2px; }
.chip-group { margin: .5rem 0 .1rem; }
.shift { border-top: 1px solid #e3e8ee; padding: .6rem 0; }

/* ------------------------------------------------------------------ Side menu, BetterHealth's own look:
   line icons in the brand blue, small capital section headings, and a green bar on the page you are on. */
.top nav.side { gap:0; }
.top nav.side .side-sec { margin:0; padding:.15rem 0 .5rem; border-bottom:1px solid var(--line); }
.top nav.side .side-sec:last-child { border-bottom:0; }
.side-h { margin:.8rem .6rem .25rem; font-weight:700; font-size:.72rem; letter-spacing:.09em; text-transform:uppercase; color:var(--muted); }
.top nav.side a.side-a { display:flex; align-items:center; gap:.65rem; padding:.4rem .6rem; border:0; border-left:3px solid transparent;
  border-radius:0 8px 8px 0; font-weight:500; color:var(--ink); line-height:1.25; }
.top nav.side a.side-a:hover { background:var(--brand-tint); color:var(--brand); }
.top nav.side a.side-a.on { background:var(--green-tint); border-left-color:var(--brand-green); color:var(--brand-green-dark); font-weight:600; }
.top nav.side a.side-a.sub { padding-left:1.5rem; font-size:.95em; }
.ico { flex:none; width:1.25rem; height:1.25rem; display:inline-flex; align-items:center; justify-content:center; }
.ico svg { width:1.25rem; height:1.25rem; fill:none; stroke:var(--brand-blue); stroke-width:1.7; stroke-linecap:round; stroke-linejoin:round; }
.top nav.side a.side-a.on .ico svg { stroke:var(--brand-green-dark); }
.side-t { flex:1; min-width:0; }
.top nav.side a.side-a .count { margin-left:auto; background:var(--brand-green-dark); color:#fff; border-radius:999px; min-width:1.5em;
  padding:.05em .45em; font-size:.78em; font-weight:700; text-align:center; }
@media (min-width:1025px) {
  .top { position:sticky; top:0; z-index:40; }
  .top nav.side { display:block; position:fixed; left:0; top:60px; bottom:0; width:15rem; overflow-y:auto; background:#fff;
    border-right:1px solid var(--line); padding:.2rem .6rem 2rem 0; z-index:30; flex:none; }
  body.has-side main, body.has-side footer.foot { margin-left:15.5rem; margin-right:auto; }
  body.has-side main { max-width:1150px; }
}
@media (max-width:1024px) {
  .top.open nav.side { display:block; max-height:calc(100vh - 4rem); overflow-y:auto; padding:0 0 .6rem; }
  .top nav.side a.side-a { padding:.6rem .5rem; font-size:1rem; }
}
@media print { body.has-side main, body.has-side footer.foot { margin-left:0; } }
/* Staff files grid */
.files td { white-space:nowrap; } .files details.cell summary { list-style:none; cursor:pointer; } .files details.cell summary::-webkit-details-marker { display:none; }
.files details.cell[open] { background:var(--brand-tint); border-radius:6px; padding:.35rem; white-space:normal; min-width:11rem; }
.files details.cell form { display:flex; flex-direction:column; gap:.35rem; margin-top:.35rem; }
.files th.section { background:var(--brand-tint); color:var(--brand); text-align:center; border-left:2px solid #fff; } .files th { white-space:normal; min-width:5.5rem; }
/* Caregiver's own upload page (no sign-in) */
.mydocs { max-width:34rem; margin:0 auto; padding:1rem; } .mydocs label { display:flex; flex-direction:column; gap:.25rem; margin:.5rem 0; }
.mydocs input[type=file], .mydocs input[type=date], .mydocs textarea { width:100%; font-size:1rem; } .mydocs .btn.big { width:100%; padding:.9rem; font-size:1.1rem; }
.pill.wrap { white-space:normal; border-radius:8px; padding:.4rem .6rem; }
pre.letter { white-space:pre-wrap; font-family:inherit; background:var(--brand-tint); padding:.8rem; border-radius:8px; }

/* ------------------------------------------------------------------ Plain and easy (Today, help, big buttons)
   Readable text, one-sentence purpose lines, and buttons a thumb can hit (at least 44px tall, 52px for big ones). */
body { font-size:16px; }
.btn { min-height:2.75rem; padding:.55rem 1rem; display:inline-flex; align-items:center; justify-content:center; gap:.35rem;
  font-weight:600; border-radius:8px; }
.btn.small { min-height:2.4rem; padding:.35rem .8rem; font-size:.95em; }
.btn.big { min-height:3.25rem; padding:.75rem 1.4rem; font-size:1.1rem; }
button.btn { font-weight:600; }
.purpose { font-size:1.05rem; color:var(--ink); margin:.2rem 0 1rem; max-width:46rem; }
.button-row { display:flex; flex-wrap:wrap; gap:.6rem; }
/* result message after an action */
.flash { border-radius:10px; padding:.8rem 1rem; margin:.4rem 0 1rem; border:1px solid; }
.flash p { margin:.15rem 0; }
.flash.ok { background:var(--green-tint); border-color:var(--brand-green); }
.flash-what { font-weight:700; color:var(--brand-green-dark); font-size:1.05rem; }
/* Today */
.team-line { background:var(--brand-tint); border-radius:10px; padding:.6rem .9rem; }
.today-list { display:grid; grid-template-columns:repeat(auto-fill, minmax(300px, 1fr)); gap:.8rem; }
.today-card { background:#fff; border:1px solid var(--line); border-left:6px solid var(--brand-blue); border-radius:10px;
  padding:1rem; display:flex; flex-direction:column; gap:.35rem; }
.today-card.red { border-left-color:#c0392b; } .today-card.amber { border-left-color:#d4a017; }
.today-card h2 { font-size:1.15rem; margin:.1rem 0; color:#14384f; }
.today-card p { margin:0; }
.today-card .btn { margin-top:auto; align-self:flex-start; }
.level { font-size:.8rem; font-weight:700; text-transform:uppercase; letter-spacing:.06em; }
.level.red { color:#a93226; } .level.amber { color:#8a6d00; } .level.blue { color:var(--brand); }
.next-links { margin-top:1.5rem; }
/* How do I...? */
.help-index { display:flex; flex-wrap:wrap; gap:.5rem; margin-bottom:1rem; }
.help-index .btn { font-weight:500; }
.help-topic summary { list-style:none; cursor:pointer; } .help-topic summary::-webkit-details-marker { display:none; }
.help-topic summary h2 { display:inline; font-size:1.1rem; } .help-topic summary::before { content:"＋ "; color:var(--brand); font-weight:700; }
.help-topic[open] summary::before { content:"− "; }
ol.steps { padding-left:1.4rem; } ol.steps li { margin:.45rem 0; line-height:1.5; }
/* error page */
.error-box h1 { color:#a93226; } .error-detail { font-size:1.1rem; font-weight:600; }
/* menu: own pages on top, everything else under More */
.top nav.side .side-main { border-bottom:1px solid var(--line); padding-bottom:.4rem; }
.top nav.side .side-main a.side-a { font-size:1.02rem; padding-top:.55rem; padding-bottom:.55rem; }
.top nav.side details.side-more > summary { cursor:pointer; list-style:none; padding:.2rem 0; }
.top nav.side details.side-more > summary::-webkit-details-marker { display:none; }
.top nav.side details.side-more > summary::after { content:" ▸"; } .top nav.side details.side-more[open] > summary::after { content:" ▾"; }
@media (max-width:760px) {
  .btn, .btn.small { min-height:2.9rem; }
  .today-list { grid-template-columns:1fr; }
  .today-card .btn, .error-box .btn { width:100%; align-self:stretch; }
  .help-index .btn { width:100%; justify-content:flex-start; }
}
/* ------------------------------------------------------------------ Caregivers (part 2) */
.filter-row { margin:.4rem 0 1rem; }
.person-list { display:grid; grid-template-columns:repeat(auto-fill, minmax(280px, 1fr)); gap:.6rem; }
.person-card { display:flex; flex-direction:column; gap:.25rem; padding:.9rem 1rem; background:#fff; border:1px solid var(--line);
  border-left:6px solid var(--brand-green); border-radius:10px; color:var(--ink); text-decoration:none; min-height:3.25rem; }
.person-card.stop { border-left-color:#c0392b; }
.person-card:hover { border-color:var(--brand-blue); }
.person-name { font-weight:700; font-size:1.1rem; color:#14384f; }
.verdict { font-weight:600; } .verdict.ok { color:var(--brand-green-dark); } .verdict.stop { color:#a93226; }
.verdict-box.ok { border-left:6px solid var(--brand-green); } .verdict-box.stop { border-left:6px solid #c0392b; }
.verdict-box.ok h2 { color:var(--brand-green-dark); } .verdict-box.stop h2 { color:#a93226; }
ol.fix-list { padding-left:1.4rem; } ol.fix-list li { margin:.6rem 0; }
ol.fix-list li .btn { margin-left:.4rem; margin-top:.3rem; }
ul.item-list { list-style:none; padding:0; } ul.item-list li { display:flex; flex-wrap:wrap; justify-content:space-between; align-items:center;
  gap:.5rem; padding:.6rem 0; border-bottom:1px solid var(--line); }
.inline-form { display:inline; }
table.plain-list td { padding:.5rem .4rem; }
/* numbered steps */
ol.step-bar { list-style:none; display:flex; flex-wrap:wrap; gap:.4rem; padding:0; margin:.6rem 0 1rem; }
ol.step-bar li { flex:1 1 7rem; border-radius:999px; background:#eceff2; padding:.45rem .8rem; color:var(--muted); font-weight:600; }
ol.step-bar li a { color:inherit; text-decoration:none; display:block; }
ol.step-bar li.now { background:var(--brand); color:#fff; } ol.step-bar li.done { background:var(--green-tint); color:var(--brand-green-dark); }
ol.step-bar .num { display:inline-block; min-width:1.4em; text-align:center; }
@media (max-width:760px) { ol.step-bar li { flex:1 1 45%; } .person-list { grid-template-columns:1fr; } ol.fix-list li .btn { display:flex; width:100%; margin-left:0; } }
/* ------------------------------------------------------------------ Plain words (part 3) */
p.empty { background:var(--brand-tint); border-radius:10px; padding:.8rem 1rem; margin:.6rem 0; color:var(--ink); }
td > p.empty { margin:0; }
details.rules { margin:.2rem 0 1rem; color:var(--muted); }
details.rules > summary { cursor:pointer; color:var(--brand); font-weight:600; padding:.3rem 0; }
details.rules[open] { background:#fff; border:1px solid var(--line); border-radius:10px; padding:.4rem .9rem .6rem; }
/* filters fold behind one button */
details.filter-fold { margin:.4rem 0 .8rem; }
details.filter-fold > summary { list-style:none; } details.filter-fold > summary::-webkit-details-marker { display:none; }
details.filter-fold > summary::before { content:"▾ "; } details.filter-fold:not([open]) > summary::before { content:"▸ "; }
/* ------------------------------------------------------------------ Phone layouts (part 4) */
@media (max-width:760px) {
  /* Caregiver papers: one card per caregiver, one labelled line per paper */
  table.cards-on-phone, table.cards-on-phone tbody, table.cards-on-phone tr, table.cards-on-phone td { display:block; width:100%; }
  table.cards-on-phone { border:0; background:none; box-shadow:none; padding:0; overflow:visible; }
  table.cards-on-phone tr.head { display:none; }
  table.cards-on-phone tr.person { background:#fff; border:1px solid var(--line); border-radius:10px; margin:0 0 .8rem; padding:.2rem .8rem; }
  table.cards-on-phone td { display:flex; justify-content:space-between; align-items:center; gap:.6rem; white-space:normal;
    border-bottom:1px solid var(--line); padding:.55rem 0; min-height:2.9rem; }
  table.cards-on-phone td:last-child { border-bottom:0; }
  table.cards-on-phone td::before { content:attr(data-label); font-weight:600; color:var(--muted); flex:1; }
  table.cards-on-phone td.who-cell { display:block; font-size:1.1rem; font-weight:700; padding:.7rem 0; }
  table.cards-on-phone td.who-cell::before { content:none; }
  table.cards-on-phone details.cell { flex:none; } table.cards-on-phone details.cell[open] { flex:1 1 100%; }
  table.cards-on-phone details.cell summary .pill { padding:.45rem .8rem; font-size:.95rem; }
  .scroll:has(table.cards-on-phone) { overflow:visible; }
}
.note-box { background:var(--brand-tint); border:1px solid var(--brand-blue); border-radius:10px; padding:.7rem 1rem; }
/* Work hours: one caregiver at a time */
details.person-fold { padding:0; }
details.person-fold > summary { list-style:none; cursor:pointer; display:flex; flex-wrap:wrap; justify-content:space-between; align-items:center;
  gap:.4rem .8rem; padding:.9rem 1rem; min-height:3.25rem; }
details.person-fold > summary::-webkit-details-marker { display:none; }
details.person-fold > summary::after { content:"▸"; color:var(--brand); font-weight:700; } details.person-fold[open] > summary::after { content:"▾"; }
details.person-fold[open] > summary { border-bottom:1px solid var(--line); }
details.person-fold > :not(summary) { margin-left:1rem; margin-right:1rem; }
details.person-fold > :last-child { margin-bottom:1rem; }
.fold-pills { display:flex; flex-wrap:wrap; gap:.3rem; flex:1; justify-content:flex-end; }
.fold-h { font-size:1rem; margin-top:1rem; color:#14384f; }
form.line-row { display:flex; flex-wrap:wrap; justify-content:space-between; align-items:center; gap:.5rem; padding:.35rem 0; border-bottom:1px solid var(--line); }
input.num-in { width:5em; }
.jump-row { margin:.4rem 0 1rem; }
details.person-fold table.grid { margin:.4rem 0; }
dl.words { display:grid; grid-template-columns:minmax(7rem, max-content) 1fr; gap:.4rem 1rem; }
dl.words dt { font-weight:700; } dl.words dd { margin:0; }
@media (max-width:760px) { dl.words { grid-template-columns:1fr; } dl.words dd { margin-bottom:.5rem; } }
details.words-here { margin-top:1.5rem; } details.words-here > summary { cursor:pointer; font-weight:600; color:var(--brand); }
/* folded people and sections: name and arrow on one line, labels underneath */
details.person-fold > summary { display:grid; grid-template-columns:1fr auto; align-items:center; }
details.person-fold > summary::after { grid-column:2; grid-row:1; }
details.person-fold > summary .person-name { grid-column:1; grid-row:1; }
details.person-fold > summary .fold-pills { grid-column:1 / -1; grid-row:2; justify-content:flex-start; }
details.person-fold > summary .fold-pills:empty { display:none; }
@media (max-width:760px) { table.cards-on-phone td a .pill { padding:.45rem .8rem; font-size:.95rem; } }
/* an empty table's message stays on screen and wraps, even when the table is wider than a phone */
td:has(> p.empty) { white-space:normal; }
td > p.empty { position:sticky; left:0; max-width:calc(100vw - 3.5rem); white-space:normal; }
/* How do I...? in topic groups */
.help-find input { width:100%; max-width:28rem; font-size:1.05rem; padding:.6rem .8rem; }
.help-find label { display:flex; flex-direction:column; gap:.3rem; font-weight:600; }
.help-groups-index { display:flex; flex-wrap:wrap; gap:.5rem; margin:.6rem 0 1rem; }
.help-group > h2 { margin-top:1.4rem; color:#14384f; border-bottom:2px solid var(--brand-green); padding-bottom:.2rem; }
.help-topic summary h3 { display:inline; font-size:1.05rem; }
@media (max-width:760px) { .help-groups-index .btn { flex:1 1 45%; } }
/* Getting ready to start */
fieldset.prefs { border:1px solid var(--line); border-radius:10px; padding:.6rem .8rem; }
fieldset.prefs legend { font-weight:600; padding:0 .3rem; }
ol.ready-list { list-style:none; padding:0; margin:.6rem 0; }
ol.ready-list li { display:flex; flex-wrap:wrap; align-items:center; gap:.4rem .8rem; padding:.55rem 0; border-bottom:1px solid var(--line); }
ol.ready-list li > span:nth-child(2) { flex:1 1 14rem; }
ol.ready-list .mark { font-weight:700; width:1.4rem; text-align:center; }
ol.ready-list li.done .mark { color:var(--brand-green-dark); } ol.ready-list li.todo .mark { color:#a93226; }
.auto-mark { display:block; color:var(--brand-green-dark); font-weight:600; }
/* Find */
form.side-find { display:flex; gap:.35rem; padding:.5rem .6rem .3rem; }
form.side-find input { flex:1; min-width:0; }
form.find-big { display:flex; gap:.5rem; margin:.4rem 0 1rem; } form.find-big input { flex:1; font-size:1.05rem; padding:.6rem .8rem; }
ul.find-list { list-style:none; padding:0; } ul.find-list li a { display:flex; gap:.6rem; align-items:center; padding:.75rem .9rem; margin:.4rem 0;
  background:#fff; border:1px solid var(--line); border-radius:10px; text-decoration:none; color:var(--ink); min-height:3rem; }
ul.find-list li a:hover { border-color:var(--brand-blue); }
.find-kind { font-size:.8rem; font-weight:700; text-transform:uppercase; letter-spacing:.04em; color:var(--brand); min-width:6.5rem; }
.find-words { font-weight:600; }

/* ------------------------------------------------------------------ Buttons (Nov 2026)
   BetterHealth's own look: the brand's blue-to-green for the main action on a page, a soft white button for the rest,
   red only for removing or refusing something. Words stay in normal sentence case (easier to read than capitals).
   Each button gets a small picture from its first word (static/nav.js, data-icon); without it the button still works. */
:root { --icon-check:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12.5l4.5 4.5L19 7.5'/%3E%3C/svg%3E"); }
.btn { border-radius:12px; border:1px solid #c6d9e7; color:var(--brand); letter-spacing:.005em;
  background:linear-gradient(180deg, #ffffff 0%, #eef5fa 100%);
  box-shadow:inset 0 1px 0 #fff, 0 1px 2px rgba(20,56,79,.08), 0 2px 6px rgba(20,56,79,.06);
  transition:transform .12s ease, box-shadow .12s ease, border-color .12s ease; }
.btn:hover { border-color:var(--brand-blue); transform:translateY(-1px);
  box-shadow:inset 0 1px 0 #fff, 0 4px 12px rgba(26,115,173,.18); }
.btn:active { transform:translateY(1px); box-shadow:inset 0 2px 4px rgba(20,56,79,.14); }
.btn:focus-visible { outline:3px solid #8cc8ec; outline-offset:2px; }
.btn.primary { color:#fff; border:1px solid #13667f; text-shadow:0 1px 1px rgba(0,0,0,.18);
  background:linear-gradient(135deg, #1A73AD 0%, #11768a 55%, #087A4E 100%);
  box-shadow:inset 0 1px 0 rgba(255,255,255,.28), 0 2px 4px rgba(10,90,100,.22), 0 4px 12px rgba(10,110,110,.18); }
.btn.primary:hover { background:linear-gradient(135deg, #1868a0 0%, #0f6c80 55%, #076d45 100%); border-color:#0f5b70;
  box-shadow:inset 0 1px 0 rgba(255,255,255,.28), 0 6px 16px rgba(10,110,110,.30); }
.btn.primary:active { box-shadow:inset 0 2px 5px rgba(0,0,0,.25); }
.btn.danger { color:#fff; border:1px solid #8e2a20; text-shadow:0 1px 1px rgba(0,0,0,.18);
  background:linear-gradient(135deg, #c0392b 0%, #9b2c22 100%);
  box-shadow:inset 0 1px 0 rgba(255,255,255,.22), 0 3px 10px rgba(160,40,30,.22); }
.btn.danger:hover { background:linear-gradient(135deg, #a93226 0%, #85251c 100%); border-color:#7a2219;
  box-shadow:inset 0 1px 0 rgba(255,255,255,.22), 0 6px 14px rgba(160,40,30,.30); }
.btn.selected { color:var(--brand-green-dark); border-color:var(--brand-green);
  background:linear-gradient(180deg, #f2fbf7 0%, var(--green-tint) 100%); }
.btn.selected::before { content:""; flex:none; width:1em; height:1em; background:currentColor;
  -webkit-mask:var(--icon-check) center/contain no-repeat; mask:var(--icon-check) center/contain no-repeat; }
.btn[disabled], .btn[aria-disabled="true"] { opacity:.55; cursor:not-allowed; transform:none; box-shadow:none; }
.btn.big { border-radius:14px; }
/* the small picture after the words (the back arrow goes before them) */
.btn[data-icon]::after { content:""; flex:none; width:1.05em; height:1.05em; background:currentColor; opacity:.92;
  -webkit-mask:var(--icon) center/contain no-repeat; mask:var(--icon) center/contain no-repeat; }
.btn[data-icon="back"]::after, .btn[data-icon="home"]::after { order:-1; }
.btn.big[data-icon]::after { width:1.2em; height:1.2em; }
.btn[data-icon="arrow"]:hover::after { transform:translateX(2px); }
.btn[data-icon]::after { transition:transform .12s ease; }
.btn[data-icon="check"] { --icon:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12.5l4.5 4.5L19 7.5'/%3E%3C/svg%3E"); }
.btn[data-icon="plus"] { --icon:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 5v14M5 12h14'/%3E%3C/svg%3E"); }
.btn[data-icon="arrow"] { --icon:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12h14M13 6l6 6-6 6'/%3E%3C/svg%3E"); }
.btn[data-icon="back"] { --icon:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M19 12H5M11 6l-6 6 6 6'/%3E%3C/svg%3E"); }
.btn[data-icon="send"] { --icon:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M21 3L3 10.5l7 2.5 2.5 7.5zM10 13l5-5'/%3E%3C/svg%3E"); }
.btn[data-icon="download"] { --icon:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 4v11M7 10l5 5 5-5M5 20h14'/%3E%3C/svg%3E"); }
.btn[data-icon="upload"] { --icon:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 16V4M7 9l5-5 5 5M5 20h14'/%3E%3C/svg%3E"); }
.btn[data-icon="print"] { --icon:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M7 9V4h10v5M7 17H5a1 1 0 0 1-1-1v-5a2 2 0 0 1 2-2h12a2 2 0 0 1 2 2v5a1 1 0 0 1-1 1h-2M7 14h10v6H7z'/%3E%3C/svg%3E"); }
.btn[data-icon="trash"] { --icon:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 7h16M9 7V4h6v3M6 7l1 13h10l1-13M10 11v6M14 11v6'/%3E%3C/svg%3E"); }
.btn[data-icon="x"] { --icon:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 6l12 12M18 6L6 18'/%3E%3C/svg%3E"); }
.btn[data-icon="search"] { --icon:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='11' cy='11' r='6'/%3E%3Cpath d='M16 16l4.5 4.5'/%3E%3C/svg%3E"); }
.btn[data-icon="copy"] { --icon:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='9' y='9' width='11' height='11' rx='2'/%3E%3Cpath d='M5 15V5a1 1 0 0 1 1-1h9'/%3E%3C/svg%3E"); }
.btn[data-icon="edit"] { --icon:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 20h4L19 9l-4-4L4 16zM13.5 6.5l4 4'/%3E%3C/svg%3E"); }
.btn[data-icon="home"] { --icon:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 11l8-7 8 7M6 9.5V20h12V9.5M10 20v-5h4v5'/%3E%3C/svg%3E"); }
.btn[data-icon="signin"] { --icon:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M10 17l5-5-5-5M15 12H3M14 4h5a1 1 0 0 1 1 1v14a1 1 0 0 1-1 1h-5'/%3E%3C/svg%3E"); }
@media (prefers-reduced-motion: reduce) {
  .btn, .btn::after { transition:none; } .btn:hover, .btn:active, .btn[data-icon]:hover::after { transform:none; }
}
@media (forced-colors: active) { .btn[data-icon]::after, .btn.selected::before { background:ButtonText; } }
@media print { .btn { box-shadow:none; background:#fff; color:#000; } .btn[data-icon]::after { display:none; } }
/* State mail: one fold per group of messages (complaints, referrals, CQL...) */
details.mail-group > summary h2 { margin:0; font-size:1.1rem; color:#14384f; }
details.mail-group table.grid { width:100%; }
.group-jump { margin:.4rem 0 1rem; }
@media (max-width:760px) { .group-jump .btn { flex:1 1 45%; } }

/* ------------------------------------------------------------------ Guide me (training wheels, static/guide.js)
   A panel with the step in words, a pulsing ring on the next thing to press, and a bouncing pointer above it. */
.guide-switch { display:flex; align-items:center; gap:.5rem; width:100%; margin:.2rem 0 .5rem; padding:.5rem .7rem; font:inherit; font-weight:600;
  color:var(--brand); background:var(--brand-tint); border:1px solid #c6d9e7; border-radius:10px; cursor:pointer; min-height:2.75rem; }
.guide-switch.on { color:var(--brand-green-dark); background:var(--green-tint); border-color:var(--brand-green); }
.guide-dot { width:.8rem; height:.8rem; border-radius:50%; background:#9fb3c1; flex:none; }
.guide-switch.on .guide-dot { background:var(--brand-green); animation:guide-pulse-dot 1.4s ease-in-out infinite; }
.guide-hint { color:var(--muted); margin:-.4rem 0 1rem; } body.guide-on .guide-hint { display:none; }
body.guide-on main { padding-bottom:15rem; }
.guide-panel { position:fixed; right:1rem; bottom:1rem; z-index:60; width:23rem; max-width:calc(100vw - 2rem); max-height:70vh; overflow:auto;
  background:#fff; border:2px solid var(--brand-green); border-radius:14px; padding:.8rem 1rem .9rem;
  box-shadow:0 10px 30px rgba(16,40,64,.25); }
.guide-head { display:flex; align-items:center; gap:.5rem; color:var(--brand-green-dark); }
.guide-head .link { margin-left:auto; }
.guide-title { margin:.35rem 0 .1rem; font-weight:700; color:#14384f; }
.guide-say { margin:.2rem 0 .6rem; font-size:1.08rem; line-height:1.45; }
.guide-note { margin:.2rem 0 .6rem; padding:.5rem .7rem; background:var(--amber); border-radius:8px; }
.guide-list { display:flex; flex-direction:column; gap:.4rem; }
.guide-list .guide-pick { justify-content:flex-start; text-align:left; width:100%; }
.guide-more { margin-top:.3rem; }
.guide-buttons { margin:.2rem 0 0; }
.guide-buttons [hidden], .guide-panel[hidden], .guide-bubble[hidden] { display:none; }
.guide-target { outline:3px solid var(--brand-green); outline-offset:3px; border-radius:10px; position:relative; z-index:1;
  animation:guide-ring 1.4s ease-out infinite; }
.guide-bubble { position:fixed; z-index:70; pointer-events:none; padding:.35rem .8rem; border-radius:999px; font-weight:700; white-space:nowrap;
  color:#fff; background:var(--brand-green-dark); box-shadow:0 4px 12px rgba(8,122,78,.35); animation:guide-bounce 1s ease-in-out infinite; }
.guide-bubble::after { content:""; position:absolute; left:50%; bottom:-7px; margin-left:-7px; border:7px solid transparent;
  border-bottom:0; border-top-color:var(--brand-green-dark); }
.guide-bubble.below::after { bottom:auto; top:-7px; border:7px solid transparent; border-top:0; border-bottom-color:var(--brand-green-dark); }
.guide-bubble.edge { animation:none; background:#14384f; }
.guide-bubble.edge::after { display:none; }
@keyframes guide-ring { 0% { box-shadow:0 0 0 0 rgba(11,181,116,.55); } 100% { box-shadow:0 0 0 14px rgba(11,181,116,0); } }
@keyframes guide-bounce { 0%, 100% { transform:translateY(0); } 50% { transform:translateY(-6px); } }
@keyframes guide-pulse-dot { 0%, 100% { opacity:1; } 50% { opacity:.35; } }
@media (max-width:760px) {
  .guide-panel { left:.5rem; right:.5rem; bottom:.5rem; width:auto; max-width:none; max-height:55vh; }
  body.guide-on main { padding-bottom:19rem; }
}
@media (prefers-reduced-motion: reduce) { .guide-target, .guide-bubble, .guide-switch.on .guide-dot { animation:none; } }
@media print { .guide-panel, .guide-bubble, .guide-switch { display:none !important; } }

/* ------------------------------------------------------------------ Phones, second pass (Nov 2026)
   Every table is a stack of cards (static/nav.js adds the labels), every tap target is at least 44px tall, nothing
   makes the page scroll sideways, and the main pages are one thumb-press away in a bar at the bottom. */
.tabbar { display:none; }
@media (max-width:760px) {
  html, body { overflow-x:hidden; }
  /* "clip" keeps the page from scrolling sideways without making the page its own scroll box, so the top bar and the
     Back row stay in view while scrolling (with "hidden" they scrolled away on phones). */
  @supports (overflow-x:clip) { html, body { overflow-x:clip; } }
  main { overflow-wrap:anywhere; }
  main img, main video, main iframe, main pre { max-width:100%; }
  main pre { white-space:pre-wrap; }
  /* cards for every table */
  table.auto-cards { display:block; overflow:visible; }
  table.auto-cards tbody { display:block; }
  table.cards-on-phone tr.subhead { display:block; margin:.8rem 0 .3rem; font-weight:700; }
  table.cards-on-phone tr.subhead th { display:inline; border:0; padding:0; background:none; }
  table.cards-on-phone tr.person > th { display:block; width:100%; text-align:left; font-weight:700; padding:.6rem 0; border-bottom:1px solid var(--line); }
  table.cards-on-phone td.full { display:block; }
  table.cards-on-phone td.full::before { content:none; }
  table.cards-on-phone td:empty { display:none; }
  table.cards-on-phone td > form, table.cards-on-phone td > .button-row { display:flex; flex-wrap:wrap; gap:.4rem; justify-content:flex-end; }
  table.cards-on-phone td input:not([type=checkbox]):not([type=radio]), table.cards-on-phone td select, table.cards-on-phone td textarea { max-width:60vw; }
  .card table.cards-on-phone tr.person { border-color:#cfdbe4; }
  /* tap targets */
  summary { min-height:2.75rem; display:flex; align-items:center; gap:.4rem; }
  details.rules > summary, details.words-here > summary, details.filter-fold > summary { cursor:pointer; }
  button.link, main button:not(.btn) { min-height:2.75rem; padding:.4rem .2rem; }
  main a.btn.small, main button.btn.small { min-height:2.75rem; }
  main p > a:not(.btn), main li > a:not(.btn), main td > a:not(.btn) { display:inline-block; padding:.35rem 0; }
  /* forms never wider than the screen */
  main form { max-width:100%; }
  main form.find-big, .check-row, .button-row, .head-row { flex-wrap:wrap; }
  form.find-big input { flex:1 1 12rem; min-width:0; }
  .check-row > * { min-width:0; max-width:100%; }
  .check-row input:not([type=checkbox]), .check-row select { width:100%; }
  h1 { overflow-wrap:anywhere; }
  /* the bar at the bottom */
  .tabbar { display:flex; position:fixed; left:0; right:0; bottom:0; z-index:50; background:#fff; border-top:1px solid var(--line);
    box-shadow:0 -2px 10px rgba(16,40,64,.08); padding:.15rem .2rem calc(.15rem + env(safe-area-inset-bottom)); }
  .tabbar a, .tabbar button { flex:1 1 0; min-width:0; display:flex; flex-direction:column; align-items:center; justify-content:center; gap:.1rem;
    min-height:3.4rem; padding:.25rem .1rem; border:0; background:none; font:inherit; font-size:.72rem; font-weight:600; line-height:1.15;
    color:var(--muted); text-decoration:none; text-align:center; cursor:pointer; border-radius:10px; }
  .tabbar svg { width:1.5rem; height:1.5rem; fill:none; stroke:currentColor; stroke-width:1.8; stroke-linecap:round; stroke-linejoin:round; }
  .tabbar a.on { color:var(--brand-green-dark); background:var(--green-tint); }
  .tabbar .tab-t { max-width:100%; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
  body.has-tabbar main { padding-bottom:5.5rem; }
  body.has-tabbar footer.foot { padding-bottom:5rem; }
  body.has-tabbar .guide-panel { bottom:4.2rem; }
  body.has-tabbar.guide-on main { padding-bottom:22rem; }
}
@media print { .tabbar { display:none !important; } }
/* Guide me: the list of jobs folds away so the panel stays small, most of all on a phone */
details.guide-jobs { border-top:1px solid var(--line); margin-top:.4rem; padding-top:.2rem; }
details.guide-jobs > summary { cursor:pointer; font-weight:600; color:var(--brand); min-height:2.6rem; display:flex; align-items:center; list-style:none; }
details.guide-jobs > summary::-webkit-details-marker { display:none; }
details.guide-jobs > summary::after { content:"▸"; margin-left:.4rem; } details.guide-jobs[open] > summary::after { content:"▾"; }
details.guide-jobs .guide-pick { margin:.2rem 0; }
.guide-panel { scrollbar-width:thin; }
@media (max-width:760px) {
  .guide-panel { padding:.55rem .8rem .6rem; max-height:46vh; border-radius:12px; }
  .guide-say { font-size:1rem; margin:.15rem 0 .4rem; }
  .guide-title { margin:.15rem 0 0; }
  .guide-buttons { gap:.4rem; }
}
@media (max-width:760px) {
  /* card rows: the heading never breaks letter by letter; a cell with a box to fill in puts the box under its heading */
  table.cards-on-phone td::before { flex:0 0 auto; max-width:46%; overflow-wrap:normal; word-break:normal; }
  table.auto-cards td { text-align:right; }
  table.auto-cards td > * { min-width:0; }
  table.auto-cards td:has(input:not([type=checkbox]):not([type=radio]), select, textarea) { flex-direction:column; align-items:stretch; gap:.3rem; text-align:left; }
  table.auto-cards td:has(input:not([type=checkbox]):not([type=radio]), select, textarea)::before { max-width:none; }
  table.auto-cards td:has(input:not([type=checkbox]):not([type=radio]), select, textarea) input:not([type=checkbox]):not([type=radio]),
  table.auto-cards td:has(select) select, table.auto-cards td:has(textarea) textarea { width:100%; max-width:none; }
  table.auto-cards td.full { text-align:left; }
  .guide-hint button.link, main p button.link { min-height:2.75rem; padding:.35rem .1rem; }
}

/* ------------------------------------------------------------------ Menu: "More" in a few groups; the All pages list */
.top nav.side details.side-group { border-top:1px solid var(--line); }
.top nav.side details.side-group > summary { display:flex; align-items:center; justify-content:space-between; gap:.5rem; cursor:pointer; list-style:none;
  padding:.6rem .5rem; min-height:2.75rem; font-weight:600; color:var(--ink); }
.top nav.side details.side-group > summary::-webkit-details-marker { display:none; }
.top nav.side details.side-group > summary .side-gt::after { content:" ▸"; color:var(--brand); }
.top nav.side details.side-group[open] > summary .side-gt::after { content:" ▾"; }
.top nav.side details.side-group[open] > summary { color:var(--brand-green-dark); }
.top nav.side details.side-group > a.side-a { padding-left:1rem; }
.top nav.side a.side-all { border-top:1px solid var(--line); margin-top:.2rem; font-weight:600; }
.page-group { margin:1rem 0 1.4rem; } .page-group h2 { margin:.2rem 0 .5rem; }
.page-list { display:grid; grid-template-columns:repeat(auto-fill, minmax(240px, 1fr)); gap:.6rem; }
.page-card { display:flex; flex-direction:column; gap:.2rem; padding:.8rem .9rem; min-height:4.2rem; background:#fff; border:1px solid var(--line);
  border-left:5px solid var(--brand-blue); border-radius:10px; text-decoration:none; color:var(--ink);
  box-shadow:0 1px 2px rgba(16,40,64,.05); transition:transform .12s ease, box-shadow .12s ease; }
.page-card b { color:var(--brand); font-size:1.05rem; } .page-card span { color:var(--muted); font-size:.95rem; }
.page-card:hover { transform:translateY(-1px); box-shadow:0 4px 12px rgba(26,115,173,.16); border-left-color:var(--brand-green); }
@media (max-width:760px) { .page-list { grid-template-columns:1fr; } }
@media (prefers-reduced-motion: reduce) { .page-card { transition:none; } .page-card:hover { transform:none; } }
/* One row of parts at the top of every Caregivers page */
nav.tabs { display:flex; flex-wrap:wrap; gap:.4rem; margin:.2rem 0 .9rem; padding-bottom:.7rem; border-bottom:1px solid var(--line); }
nav.tabs .count { display:inline-block; min-width:1.3em; padding:0 .35em; margin-left:.2rem; border-radius:999px; background:var(--brand-green-dark); color:#fff; font-size:.75em; text-align:center; }
@media (max-width:760px) { nav.tabs { flex-wrap:nowrap; overflow-x:auto; -webkit-overflow-scrolling:touch; padding-bottom:.5rem; scrollbar-width:none; } nav.tabs .btn { flex:none; white-space:nowrap; } }
/* Long forms: the boxes that are not needed to save sit in a fold */
details.more-details { border:1px solid var(--line); border-radius:10px; background:#fafcfd; }
details.more-details > summary { cursor:pointer; padding:.7rem .9rem; min-height:44px; font-weight:600; color:var(--brand); }
details.more-details > summary .muted { font-weight:400; }
details.more-details > .form-grid { padding:.2rem .9rem .9rem; }
/* A fold that holds a whole form of its own (its required boxes are only checked once it is open and sent). */
details.act-fold { border:1px solid var(--line); border-radius:10px; background:#fafcfd; margin-top:.6rem; }
details.act-fold > summary { cursor:pointer; padding:.7rem .9rem; min-height:44px; font-weight:600; color:var(--brand); }
details.act-fold > .form-grid { padding:.2rem .9rem .9rem; }
/* Files to upload: one fold for each file, steps on the left, the upload box on the right */
.upload-tally { display:flex; flex-wrap:wrap; gap:.4rem; margin:.3rem 0 .6rem; }
.upload-system > details.upload-file { margin:.5rem 0 0; box-shadow:none; }
.upload-two { display:grid; grid-template-columns:1fr 1fr; gap:1rem 1.6rem; padding-top:.8rem; }
.upload-two h3 { margin:.1rem 0 .4rem; }
.upload-form { display:flex; flex-direction:column; gap:.6rem; align-items:flex-start; margin-bottom:.8rem; }
.upload-form label { display:flex; flex-direction:column; gap:.2rem; font-size:.9em; }
.upload-form .inline { display:flex; flex-wrap:wrap; gap:.6rem; }
details.upload-file > details.more-details { margin-top:.6rem; }
@media (max-width:760px) { .upload-two { grid-template-columns:1fr; } .upload-form, .upload-form label, .upload-form input:not([type=checkbox]) { width:100%; } }
/* One client's care schedule: an at-a-glance box, then five numbered steps that fold */
.glance-grid { display:grid; grid-template-columns:1fr 1fr; gap:.4rem 1.8rem; }
.glance-grid h3 { margin:.2rem 0 .4rem; font-size:1rem; }
.glance-line { margin:.35rem 0; line-height:1.6; }
.glance-line meter { width:100%; max-width:22rem; height:1rem; }
.glance .pill, #fit .pill, .step .fold-pills .pill { white-space:normal; }
nav.step-bar { border-bottom:0; border-top:1px solid var(--line); padding:.7rem 0 0; margin:.8rem 0 0; }
.step-n { display:inline-flex; align-items:center; justify-content:center; width:1.7rem; height:1.7rem; margin-right:.35rem; border-radius:50%;
  background:var(--brand); color:#fff; font-size:.9rem; font-weight:700; }
ul.wish-list { list-style:none; padding:0; margin:.3rem 0 .8rem; }
ul.wish-list li { display:flex; flex-wrap:wrap; align-items:center; justify-content:space-between; gap:.4rem .8rem; padding:.45rem 0; border-bottom:1px solid var(--line); }
details.month { border-top:1px solid var(--line); padding:.5rem 0; }
details.month > summary { cursor:pointer; min-height:2.75rem; display:flex; flex-wrap:wrap; align-items:center; gap:.3rem; }
details.step h3 { margin-top:1rem; }
@media (max-width:760px) { .glance-grid { grid-template-columns:1fr; } }
details.step > details.more-details, details.step > form + details.more-details { margin-top:1rem; }
@media (max-width:760px) {
  label.chip span { padding:.72rem .85rem; }                    /* day and task chips are tapped with a thumb */
  main input:not([type=checkbox]):not([type=radio]):not([type=file]):not([type=hidden]), main select { min-height:2.75rem; }
}
/* Card rows on a phone: one box for the value (nav.js adds .cell-v), so nothing overlaps; long values go underneath */
table.cards-on-phone td > .cell-v { display:block; }
@media (max-width:760px) {
  table.cards-on-phone td > .cell-v { flex:1 1 0; min-width:0; text-align:right; overflow-wrap:anywhere; line-height:1.5; }
  table.cards-on-phone td > .cell-v .pill { white-space:normal; display:inline-block; margin:.1rem 0; }
  table.cards-on-phone td.long { flex-direction:column; align-items:stretch; gap:.25rem; }
  table.cards-on-phone td.long::before { max-width:none; }
  table.cards-on-phone td.long > .cell-v { text-align:left; flex:none; }
  table.cards-on-phone td.blank { display:none; }
  table.cards-on-phone td > .cell-v > form, table.cards-on-phone td > .cell-v > .button-row { display:flex; flex-wrap:wrap; gap:.4rem; justify-content:flex-start; }
  table.auto-cards td:has(input:not([type=checkbox]):not([type=radio]), select, textarea) > .cell-v { text-align:left; flex:none; }
  main .pill { max-width:100%; }
}
@media (min-width:761px) { table.cards-on-phone td > .cell-v { display:contents; } }
/* Caregivers: on a phone the row of parts becomes one line that says where you are and opens the list */
.phone-only { display:none; }
details.tabs-fold { margin:.1rem 0 .9rem; border:1px solid var(--line); border-radius:10px; background:#fff; }
details.tabs-fold > summary { cursor:pointer; padding:.7rem .9rem; min-height:2.75rem; }
ul.part-list { list-style:none; margin:0; padding:0 .5rem .5rem; }
ul.part-list li a { display:flex; flex-wrap:wrap; align-items:baseline; gap:.1rem .5rem; padding:.6rem .5rem; min-height:2.75rem; border-top:1px solid var(--line); text-decoration:none; color:inherit; }
ul.part-list li a b { color:var(--brand); }
ul.part-list li a.on { background:var(--green-tint, #e3f4ea); border-radius:8px; }
ul.part-list li a.on b { color:var(--brand-green-dark); }
ul.part-list li a span.small { flex:1 1 100%; }
ul.part-list .count { display:inline-block; min-width:1.3em; padding:0 .35em; border-radius:999px; background:var(--brand-green-dark); color:#fff; font-size:.75em; text-align:center; }
label.find-in-list { display:flex; flex-direction:column; gap:.2rem; max-width:26rem; margin:.6rem 0 .8rem; font-size:.9em; }
.person-group { margin:0 0 1.2rem; } .person-group > h2 { font-size:1.05rem; margin:.4rem 0 .5rem; }
.person-card[hidden], .person-group[hidden] { display:none; }
@media (max-width:760px) { .phone-only { display:block; } .wide-only { display:none !important; } label.find-in-list { max-width:none; } }
ul.fix-here { list-style:none; padding:0; margin:.2rem 0 .8rem; } ul.fix-here li { margin:.35rem 0; line-height:1.5; }
table.plain-list.keep-table td:first-child { width:60%; }
details.tabs-fold > summary { display:block; } details.tabs-fold > summary .where { display:inline; overflow-wrap:normal; word-break:normal; }
@media (max-width:760px) {
  table.cards-on-phone td::before { text-align:left; }                  /* the heading reads from the left; the value sits right, or underneath */
  table.cards-on-phone td.long::before { align-self:flex-start; }
}
@media (max-width:360px) {                                              /* narrow phones, or large text: the top bar stays on one line */
  .top { gap:.35rem; padding:.4rem .5rem; }
  .top .ask-btn { padding:.35rem .6rem; } .nav-toggle { padding:.4rem .55rem; }
  .top .brand img, .top .logo img { max-height:28px; }
}
/* Daily huddle: what to talk about first; numbers in a fold for each section */
ol.talk-list .mark { width:auto; min-width:2.4rem; } ol.talk-list .mark .pill { font-weight:700; font-size:1rem; padding:.15rem .6rem; }
details.huddle-section { border:1px solid var(--line); border-radius:10px; margin:.5rem 0; background:#fff; }
.huddle-row { display:grid; grid-template-columns:minmax(0, 1fr) minmax(0, 1.3fr); gap:.3rem 1rem; align-items:center; padding:.55rem 0; border-top:1px solid var(--line); }
.huddle-row label { display:flex; flex-direction:column; gap:.2rem; font-weight:600; }
.huddle-row .huddle-app { display:flex; flex-direction:column; gap:.2rem; margin:0; font-weight:600; }
.huddle-row .huddle-num { font-size:1.4em; }
.huddle-row input { max-width:8rem; }
.huddle-row.red { box-shadow:inset 4px 0 0 #c0392b; padding-left:.6rem; } .huddle-row.amber { box-shadow:inset 4px 0 0 var(--amber, #e0a100); padding-left:.6rem; }
#isp meter { width:100%; max-width:26rem; height:1rem; }
@media (max-width:760px) { .huddle-row { grid-template-columns:1fr; } }
/* Big picture: the agency in a few boxes you can press, then one list of what needs doing and who has it */
.stand-tiles { grid-template-columns:repeat(auto-fill, minmax(190px, 1fr)); }
a.tile.green { border-top-color:var(--brand-green); } a.tile.red { border-top-color:#c0392b; background:#fdf3f1; } a.tile.amber { border-top-color:#d4a017; background:#fffaf0; }
a.tile .what { margin-top:.25rem; } a.tile:hover { border-color:var(--brand-blue); }
ol.work-list li > span:first-child { flex:1 1 16rem; }
details.upload-system > details.upload-file { margin:.5rem 1rem 0; box-shadow:none; }
details.upload-system > details.upload-file:last-child { margin-bottom:1rem; }
details.upload-file[hidden], details.upload-system[hidden] { display:none; }
/* State mail: the list on the left, the message you pressed on the right */
.mail-two { display:grid; grid-template-columns:minmax(0, 5fr) minmax(0, 6fr); gap:1rem; align-items:start; }
.mail-two .mail-left > details.mail-group { margin-top:0; }
a.mail-row { display:flex; flex-direction:column; gap:.15rem; padding:.6rem 1rem; border-top:1px solid var(--line); text-decoration:none; color:inherit; min-height:2.75rem; }
a.mail-row:hover { background:#f3f8fb; } a.mail-row.on { background:var(--green-tint, #e3f4ea); box-shadow:inset 4px 0 0 var(--brand-green); }
a.mail-row b { color:var(--brand); } a.mail-row[hidden] { display:none; }
.mail-read { position:sticky; top:4.5rem; max-height:calc(100vh - 6rem); overflow:auto; margin:0; }
.mail-read h2 { margin-top:0; } .mail-body { background:#fafcfd; border:1px solid var(--line); border-radius:8px; padding:.7rem .9rem; }
.mail-actions { margin:.4rem 0 .6rem; }
@media (max-width:900px) {
  .mail-two { display:flex; flex-direction:column; }
  .mail-read { position:static; max-height:none; display:none; order:-1; width:100%; }
  .mail-two.picked .mail-read { display:block; }
}
details#add:not([open]) { display:none; }                /* the form shows only after "Add a message" is pressed */

/* People found in Connecteam, and people found in a Therap file: a list to tick or choose from */
ul.pick-list { list-style:none; padding-left:0; margin:.5rem 1rem; }
ul.pick-list li { border-bottom:1px solid var(--line); }
ul.pick-list label.check { display:flex; gap:.6rem; align-items:center; min-height:44px; padding:.3rem 0; cursor:pointer; }
ul.pick-list input[type=checkbox] { width:1.3rem; height:1.3rem; flex:none; }
form.hidden-note { margin:.3rem 0 .8rem; }
div.alert > p { margin:.2rem 0 .5rem; } div.alert > form { margin:.3rem 0 .1rem; }

/* An email shown in full: its own formatting made safe, pictures, attachments, and the secure-message box */
.mail-html { overflow-x:auto; overflow-wrap:anywhere; line-height:1.5; }
.mail-html img { max-width:100%; height:auto; }
.mail-html table.mail-table { border-collapse:collapse; max-width:100%; width:auto; margin:.3rem 0; }
.mail-html table.mail-table td, .mail-html table.mail-table th { border:0; padding:.15rem .4rem .15rem 0; vertical-align:top; background:none; }
.mail-html blockquote { margin:.4rem 0 .4rem .4rem; padding-left:.7rem; border-left:3px solid var(--line); color:var(--muted); }
.mail-html h1, .mail-html h2, .mail-html h3 { font-size:1.05rem; margin:.6rem 0 .3rem; }
.mail-html a { overflow-wrap:anywhere; }
.pic-off { color:var(--muted); font-size:.9em; }
.mail-pictures { display:flex; flex-wrap:wrap; gap:.6rem; margin:.3rem 0 .6rem; }
.mail-pictures img { max-width:min(100%, 320px); max-height:260px; border:1px solid var(--line); border-radius:8px; display:block; }
ul.mail-files { list-style:none; padding-left:0; margin:.3rem 0; }
ul.mail-files li { display:flex; flex-wrap:wrap; gap:.4rem .8rem; align-items:center; padding:.45rem 0; border-bottom:1px solid var(--line); overflow-wrap:anywhere; }
ul.mail-files .file-links { margin-left:auto; display:flex; gap:.4rem; flex-wrap:wrap; }
ul.mail-files li.mail-file { display:block; }
ul.mail-files li.mail-file p { margin:.25rem 0; }
ul.mail-files li.mail-file .file-links { margin-left:0; }
ul.mail-files li.depth-1 { margin-left:1.2rem; border-left:3px solid var(--line); padding-left:.6rem; }
ul.mail-files li.depth-2, ul.mail-files li.depth-3 { margin-left:2.4rem; border-left:3px solid var(--line); padding-left:.6rem; }
.found-box ul { margin:.3rem 0 .3rem 1rem; padding:0; }
.found-box li { margin:.35rem 0; }
.found-box form.inline-form { display:flex; flex-wrap:wrap; gap:.4rem; align-items:end; margin-top:.3rem; }
@media (max-width:600px) { ul.mail-files li.depth-1, ul.mail-files li.depth-2, ul.mail-files li.depth-3 { margin-left:.4rem; } }
.secure-box ol { margin:.3rem 0 .6rem 1.2rem; padding:0; } .secure-box li { margin:.25rem 0; }

/* Office team performance: the strip on Today, the big number, measures and letters */
a.perf-strip { display:grid; grid-template-columns:auto minmax(120px, 260px) 1fr; gap:.4rem 1rem; align-items:center; text-decoration:none; color:var(--ink);
  background:#fff; border:1px solid var(--line); border-left:6px solid var(--brand-green, #2e8b57); border-radius:10px; padding:.6rem .9rem; margin:.4rem 0 .8rem; min-height:44px; }
a.perf-strip.amber { border-left-color:#e0a800; } a.perf-strip.red { border-left-color:#c0392b; }
a.perf-strip meter, .perf-now meter, .perf-card meter { width:100%; height:1rem; }
@media (max-width: 700px) { a.perf-strip { grid-template-columns:1fr; } }
.perf-big b { font-size:3rem; line-height:1; } .perf-big span { color:var(--muted); }
.perf-now meter { max-width:520px; }
.perf-two { display:grid; grid-template-columns:repeat(auto-fit, minmax(220px, 1fr)); gap:1rem; margin:.6rem 0; }
.perf-two meter { max-width:320px; }
ol.perf-tips { padding-left:1.2rem; } ol.perf-tips li { margin:.5rem 0; }
td meter { width:120px; vertical-align:middle; }
.perf-card .perf-n { font-size:1.5rem; }
.perf-card meter { max-width:200px; vertical-align:middle; }
.letter-text { background:#fafcfd; border:1px solid var(--line); border-radius:8px; padding:.8rem 1rem; margin:.6rem 1rem; }
details.perf-letter { border:1px solid var(--line); border-radius:10px; margin:.5rem 0; }
details.perf-letter form { margin:.4rem 1rem .8rem; } details.perf-letter .button-row { margin:.2rem 1rem .8rem; } details.perf-letter .button-row form { margin:0; }
a.person-card.perf-card { border-left:6px solid var(--line); }
a.person-card.perf-card.green { border-left-color:var(--brand-green, #2e8b57); } a.person-card.perf-card.amber { border-left-color:#e0a800; } a.person-card.perf-card.red { border-left-color:#c0392b; }
ul.extra-list { list-style:none; padding-left:0; margin:.3rem 0; }
ul.extra-list li { display:flex; justify-content:space-between; gap:.8rem; align-items:center; padding:.4rem 0; border-bottom:1px solid var(--line); min-height:44px; overflow-wrap:anywhere; }
section.alert ul { margin:.3rem 0 .2rem 1.1rem; padding:0; } section.alert li { margin:.4rem 0; }

/* Staffing plan: the list of suggestions and what was decided */
.plan-list { list-style-position:outside; padding-left:1.4rem; margin:.4rem 0; } ul.plan-list { list-style:none; padding-left:0; }
.plan-item { border-bottom:1px solid var(--line); padding:.5rem 0 .7rem; } .plan-item p { margin:.25rem 0; }
details.decide { margin-top:.4rem; }
#clients meter { width:110px; }
input[type=file] { min-height:44px; }
/* A button or message box marked hidden stays hidden (its own display rule would otherwise show it). */
.btn[hidden], .note-box[hidden], .alert[hidden] { display:none; }
/* Files to upload: a file Connecteam brings in by itself keeps its upload box in a fold (the whole form is inside it). */
details.upload-instead { border:1px solid var(--line); border-radius:10px; background:#fafcfd; padding:0 .9rem .6rem; margin:.4rem 0 .6rem; }
details.upload-instead > summary { cursor:pointer; padding:.7rem 0; min-height:44px; font-weight:600; color:var(--brand); }
/* State mail: mark a message done without a reply (a fold that holds the whole form, so its boxes may be required) */
details.mail-done { border:1px solid var(--line); border-radius:10px; background:#fafcfd; padding:0 .9rem .6rem; margin:.6rem 0; }
details.mail-done > summary { cursor:pointer; padding:.7rem 0; min-height:44px; font-weight:600; color:var(--brand); }
/* Back on every page (nav.js): small, at the top left, out of the way of the page's own title */
/* Back and Forward stay in view just under the top bar while the page scrolls (nav.js sets --top-h). */
.back-row { position:sticky; top:var(--top-h, 0px); z-index:35; display:flex; gap:.5rem; margin:.2rem 0 .4rem; padding:.3rem 0;
  background:var(--bg); }
.back-row[hidden], .back-row [hidden] { display:none; }
.back-row .back-btn { min-height:44px; display:inline-flex; align-items:center; }
.back-row .fwd-btn { margin-left:auto; }
.today-card .whose { color:var(--muted); margin-top:-.2rem; }
@media print { .back-row { display:none; } }
/* Reminders: a sticky note among the Today tiles (yellow paper, a little turned), and small notes coming up */
.today-card.sticky { background:#fff7b8; border-color:#e8d36a; box-shadow:2px 3px 0 rgba(0,0,0,.08); }
.today-card.sticky .level, .level.note { background:#f1dc5c; color:#3d3500; }
.sticky-row { display:flex; flex-wrap:wrap; gap:.6rem; }
.sticky.small-note { background:#fff7b8; border:1px solid #e8d36a; border-radius:6px; padding:.5rem .7rem; min-width:10rem; max-width:100%; }
.sticky.small-note p { margin:.15rem 0; }
.password-out { font:600 1.15rem/1.4 ui-monospace, SFMono-Regular, Menlo, monospace; letter-spacing:.02em; word-break:break-all; }

/* Done today: finished work stays in sight with a tick (Charles, Nov 2026) */
.done-today .done-list { list-style:none; margin:.3rem 0 0; padding:0; }
.done-today .done-list li { padding:.35rem 0; border-top:1px solid var(--line); }
.done-today .tick { display:inline-block; min-width:1.4em; color:var(--brand-green-dark); font-weight:700; }
.dates-ask b { white-space:nowrap; }
@media (max-width:760px) { .dates-ask b { white-space:normal; } }      /* a long list of dates wraps on a phone */
/* A list of tick boxes, for choosing several people at once (several caregivers trained for a client) */
fieldset.pick-list { border:1px solid var(--line); border-radius:8px; padding:.4rem .8rem; max-height:16rem; overflow-y:auto;
  display:grid; grid-template-columns:repeat(auto-fill, minmax(12rem, 1fr)); gap:0 .8rem; }
fieldset.pick-list legend { font-weight:600; padding:0 .3rem; }
fieldset.pick-list label.check { min-height:44px; display:flex; align-items:center; gap:.4rem; }
/* One client's whole record on the Clients page */
.client-record .record-grid { display:grid; grid-template-columns:repeat(auto-fit, minmax(18rem, 1fr)); gap:.5rem 1.5rem; }
.client-record dl.facts, #details dl.facts { display:grid; grid-template-columns:minmax(8rem, 40%) 1fr; gap:.2rem .8rem; margin:.3rem 0; }
.client-record dl.facts dt, #details dl.facts dt { color:var(--muted); }
.client-record dl.facts dd, #details dl.facts dd { margin:0; overflow-wrap:anywhere; }
#details dl.facts { padding:0 1rem; }
@media (max-width:760px) { #details dl.facts { grid-template-columns:1fr; } #details dl.facts dd { margin-bottom:.4rem; } }
#read dl.facts { display:grid; grid-template-columns:minmax(8rem, 40%) 1fr; gap:.2rem .8rem; margin:.3rem 0; }
#read dl.facts dt { color:var(--muted); } #read dl.facts dd { margin:0; overflow-wrap:anywhere; }
@media (max-width:760px) { #read dl.facts { grid-template-columns:1fr; } #read dl.facts dd { margin-bottom:.4rem; } }
.client-record .contact-line { margin:.4rem 0; }
@media (max-width:520px) { .client-record dl.facts { grid-template-columns:1fr; } .client-record dl.facts dd { margin-bottom:.3rem; } }
/* Caregiver papers: the headings stay at the top and the names at the left while scrolling (Charles, Nov 2026) */
@media (min-width:761px) {
  .files-scroll { max-height:calc(100vh - var(--top-h, 0px) - 8rem); overflow:auto; }
  table.files { border-collapse:separate; border-spacing:0; }
  table.files tr.head:first-child th { position:sticky; top:0; z-index:4; background:#fff; height:2.6rem; }
  table.files tr.head + tr.head th { position:sticky; top:2.6rem; z-index:4; background:#fff; box-shadow:0 1px 0 var(--line); }
  table.files th[rowspan] { z-index:5; }
  table.files tr.head:first-child th:first-child, table.files td.who-cell { position:sticky; left:0; background:#fff; }
  table.files td.who-cell { z-index:2; box-shadow:1px 0 0 var(--line); min-width:11rem; }
  table.files tr.head:first-child th:first-child { z-index:6; }
}
table.files .ask-form { margin:.2rem 0 0; }
table.files .ask-form .link { font-size:.8em; white-space:nowrap; }

/* A letter with the logo and the signer's signature (missing-notes letters, Nov 2026) */
.letter-sheet { background:#fff; color:#1b1b1b; border:1px solid var(--line); border-radius:8px; padding:1.2rem 1.4rem; max-width:52rem; line-height:1.45; }
.letter-logo { width:170px; height:auto; display:block; margin-bottom:1rem; }
.letter-sign { height:56px; width:auto; display:block; margin:.2rem 0; }
.letter-sheet .letter-table { font-family:Consolas, "Courier New", monospace; font-size:.85rem; white-space:pre; overflow-x:auto; }
.letter-sheet .letter-head { font-weight:700; margin-top:.2rem; }
.letter-gap { height:.6rem; }
.sign-preview { background:#fff; border:1px dashed var(--line); border-radius:8px; padding:.6rem; display:inline-block; }
.sign-preview img { height:70px; width:auto; display:block; }
@media print { .letter-sheet { border:0; padding:0; max-width:none; } }
.letter-sheet .key, .mydocs .key { color:#1A73AD; font-weight:700; }
.letter-sheet .letter-head, .mydocs .letter-head { color:var(--brand); }
/* Drawing a signature (signpad.js) */
canvas.signpad { display:block; width:100%; max-width:560px; height:180px; background:#fff; border:1px solid var(--line);
  border-radius:8px; touch-action:none; cursor:crosshair; }
.signpad-line { max-width:560px; border-top:1px dashed var(--line); margin:-40px 16px 40px; pointer-events:none; }
.sign-ways { display:grid; gap:1rem; grid-template-columns:repeat(auto-fit, minmax(280px, 1fr)); }

/* owner's plan and Visits: one step per block (22 Nov 2026) */
.plan-step { border-top:1px solid var(--line); padding:.6rem 0; }
.plan-step:first-of-type { border-top:0; }
.plan-step p { margin:.3rem 0; }

/* Stage 4: the person's own pages under their name, and the row of parts at the top of a page */
.side-me { margin:.2rem 0 .4rem; }
.side-me > summary { cursor:pointer; min-height:44px; display:flex; align-items:center; }
nav.part-views { border-bottom:none; margin-top:-.4rem; }
nav.part-views .btn { font-size:.85em; }

/* A table that grows wider each week scrolls inside its own box, never the page (Stage 4 check). */
.wide-scroll { overflow-x:auto; max-width:100%; }

/* Minnesota staff: the caution beside a weak sign wraps on a phone (a pill would run off the screen). */
.mn-caution { display:block; margin-top:.2rem; padding:.2rem .5rem; border-left:3px solid #b7791f; background:#fdf6e3; color:#5c3d00; white-space:normal; }
@media (prefers-color-scheme: dark) { .mn-caution { background:#3a2f12; color:#f5deb3; } }

/* Stage 5: quiz answers are full-size tap targets on a phone; long sources wrap. */
.quiz-q { min-width:0; }                 /* a fieldset is as wide as its widest line unless told otherwise */
.quiz-q label.check { display:flex; align-items:center; gap:.5rem; min-height:44px; }
.quiz-q input[type=radio], #reviews input[type=radio] { width:1.3rem; height:44px; margin:0; flex:none; }
#reviews label.check { display:flex; align-items:center; gap:.5rem; min-height:44px; }
.wide-scroll td.small { white-space:normal; min-width:16rem; }

/* BetterHealth policies by version (22 Nov 2026): old and new lines side by side */
.policy-text { white-space: pre-wrap; overflow-wrap: anywhere; line-height: 1.5; }
.side-by-side td { vertical-align: top; overflow-wrap: anywhere; }
.side-by-side .old-line { background: var(--amber-bg, #fff6e0); }
.side-by-side .struck { text-decoration: line-through; text-decoration-color: rgba(160, 60, 0, .45); }
.side-by-side .new-line { background: var(--green-bg, #e8f6ec); }
.manual-line { font-weight: 600; }

/* The one Upload box (22 Nov 2026) */
label.dropbox { display:flex; flex-direction:column; align-items:center; justify-content:center; gap:.35rem; text-align:center;
  min-height:9rem; padding:1.2rem 1rem; margin:.6rem 0; border:2px dashed #7fa6c4; border-radius:12px; background:#f4f8fb; cursor:pointer; }
label.dropbox:hover, label.dropbox.over, label.dropbox:focus-within { border-color:#1A73AD; background:#e8f1f8; }
label.dropbox.sending { opacity:.7; }
label.dropbox .dropbox-big { font-size:1.2rem; font-weight:700; color:#174a6e; }
label.dropbox .dropbox-big::before { content:"⇪ "; }
label.dropbox .dropbox-small { font-size:.9rem; color:var(--muted, #555); max-width:44rem; }
label.dropbox input[type=file] { max-width:100%; min-height:44px; }
label.dropbox .dropbox-chosen { font-size:.9rem; font-weight:600; }
form.dropbox-form { margin:.4rem 0; }
ul.file-check, ul.drop-results { list-style:none; padding:0; margin:.4rem 0; }
ul.file-check li { display:grid; grid-template-columns:1.6rem 1fr; gap:.2rem .5rem; padding:.55rem 0; border-bottom:1px solid var(--line); }
ul.file-check li .how-to { grid-column:2; }
ul.file-check li .file-tick { font-size:1.2rem; font-weight:700; color:#6b7785; }
ul.file-check li.done .file-tick { color:#1e7b3a; }
ul.file-check li.done .file-what b { text-decoration:none; color:#1e7b3a; }
ul.file-check .how-to summary { min-height:44px; display:flex; align-items:center; cursor:pointer; color:#1A73AD; font-weight:600; }
ul.drop-results li.drop-line { display:flex; align-items:center; gap:.6rem; padding:.5rem .6rem; margin:.3rem 0; border-radius:8px; border-left:5px solid #b9c3cc; background:#f7f9fb; }
ul.drop-results li.drop-line.green { border-left-color:#2e8b4a; background:#eef8f1; }
ul.drop-results li.drop-line.amber { border-left-color:#c98a00; background:#fdf6e6; }
ul.drop-results li.drop-line.red { border-left-color:#b42318; background:#fdeeee; }
ul.drop-results .drop-icon { font-weight:700; font-size:1.15rem; width:1.4rem; text-align:center; flex:none; }
ul.drop-results li.green .drop-icon { color:#1e7b3a; } ul.drop-results li.amber .drop-icon { color:#8a5d00; } ul.drop-results li.red .drop-icon { color:#b42318; }
ul.drop-results .drop-words { flex:1; min-width:0; overflow-wrap:anywhere; }
ul.drop-results li .btn { flex:none; }

/* Trends (23 Nov 2026): the line is inline SVG with classes only (CSP) */
.trend-head { display:flex; align-items:center; justify-content:space-between; gap:.6rem; flex-wrap:wrap; }
.trend-head h3 { margin:0; }
.trend-now { font-size:1.15rem; font-weight:700; padding:.2rem .7rem; }
svg.trend-chart { width:100%; max-width:520px; height:auto; display:block; margin:.4rem 0 0; background:#f7f9fb; border-radius:6px; }
svg.trend-chart .trend-line { fill:none; stroke:#1A73AD; stroke-width:2; stroke-linejoin:round; stroke-linecap:round; }
svg.trend-chart .trend-dot { fill:#1A73AD; }
svg.trend-chart .trend-target { stroke:#2e8b4a; stroke-width:1.5; stroke-dasharray:5 4; }
.trend-axis { display:flex; justify-content:space-between; max-width:520px; margin:.1rem 0 .4rem; }
.trend-axis .trend-key { color:#2e8b4a; }
.trend-small { border-top:1px solid var(--line); padding:.6rem 0; }
.trend-cells summary { min-height:44px; display:flex; align-items:center; cursor:pointer; color:#1A73AD; font-weight:600; }
table.history-grid td.hist { text-align:center; white-space:nowrap; }
table.history-grid td.hist.green { background:#eef8f1; color:#1e7b3a; font-weight:700; }
table.history-grid td.hist.amber { background:#fdf6e6; }
table.history-grid td.hist.red { background:#fdeeee; color:#b42318; font-weight:700; }
table.history-grid .hist-files { display:block; font-weight:400; max-width:9rem; white-space:normal; }

/* Guide me on a phone (23 Nov 2026): the panel covers the lower half of the screen, so the open menu gets room to
   scroll its last links up above it (the Trends link sat behind the panel). */
@media (max-width: 760px) { body.guide-on .top nav.side { padding-bottom: 60vh; } }

/* The Highlight button under draft boxes (change 5) */
.highlight-row { margin:.2rem 0 .6rem; }
.highlight-row .highlight-btn { color:#1A73AD; font-weight:700; }

/* Change 5: the BetterHealth logo at the top of every printed page */
.print-logo { display:none; }
@media print { .print-logo { display:block; margin:0 0 8mm; } .print-logo img { height:14mm; width:auto; } }
/* Change 1 (23 Nov 2026): a paperclip and the number of files on each mail row */
a.mail-row .clip { font-weight:600; color:var(--ink, #1f2a33); white-space:nowrap; }
/* My BetterHealth, the caregiver's own page (3A, 23 Nov 2026): phone first, the BetterHealth look */
body.portal { background:var(--bg, #f6f9fb); }
.portal-top { display:flex; align-items:center; justify-content:space-between; gap:.5rem; margin-bottom:.5rem; }
.portal-logo { height:44px; width:auto; }
.portal-nav { display:flex; flex-wrap:wrap; gap:.4rem; margin:.25rem 0 1rem; }
.portal-nav .btn, .portal-out .btn { min-height:44px; }
.portal-top { flex-wrap:wrap; }
.portal-top .guide-switch { width:auto; margin:0 0 0 auto; padding:.4rem .7rem; min-height:44px; }
.training-video { display:block; width:100%; max-height:70vh; background:#000; border-radius:8px; }
.guide-start-list { display:flex; flex-direction:column; gap:.4rem; }
.guide-start-list .btn { justify-content:flex-start; text-align:left; width:100%; white-space:normal; }
.portal-parts { list-style:none; padding:0; display:grid; gap:.6rem; }
main .portal-parts a.portal-part { display:flex; flex-direction:column; gap:.2rem; padding:1rem; text-decoration:none; color:inherit; min-height:44px; }
main .portal-parts a.portal-part b { color:var(--brand); font-size:1.1rem; }
.portal-foot { margin-top:2rem; }
/* a tick box beside its words; every box with words to type has its label above it (reading on a phone, 25 Nov 2026) */
.mydocs label.wide:has(> input[type=checkbox]), .mydocs label.wide:has(> input[type=radio]) { flex-direction:row; align-items:center; gap:.5rem; }
/* 3B: My time card */
.portal-total .big-number { font-size:1.8rem; font-weight:700; color:var(--brand); margin:.2rem 0; }
.tc-line { border-top:1px solid var(--line); padding:.5rem 0; } .tc-line p { margin:.15rem 0; }
.mydocs label.stack { display:flex; flex-direction:column; align-items:stretch; }
.mydocs label.check { flex-direction:row; align-items:center; text-align:left; gap:.6rem; }
.mydocs .quiz-q label.check { margin:.2rem 0; }
.mydocs select, .mydocs input[name=arrive], .mydocs input[name=leave] { min-height:44px; font-size:1rem; }
/* My BetterHealth 3C: My record */
.record-list { list-style:none; padding:0; margin:.25rem 0; display:grid; gap:.25rem; }
main .record-list a.record-num { display:flex; align-items:center; gap:.5rem; min-height:44px; text-decoration:none; color:inherit; }
.record-list a.record-num .pill { min-width:2.4rem; text-align:center; }
/* 3E: Speak to compliance */
.keep-lines { white-space:pre-line; overflow-wrap:anywhere; }
.ref-big { font-size:1.8rem; letter-spacing:.12em; margin:.2rem 0 .6rem; }
.count-thumb { max-width:160px; max-height:160px; border-radius:8px; border:1px solid var(--line); vertical-align:middle; }
.count-sig { max-width:280px; background:#fff; border:1px solid var(--line); border-radius:8px; }
ul.count-list { list-style:none; padding:0; display:flex; flex-direction:column; gap:.6rem; }
/* My Care (clients and families): larger text and bigger buttons by default, "Larger text" and "High contrast" */
body.care { font-size:1.125rem; line-height:1.55; }
body.care .btn, body.care button.btn, body.care input, body.care select, body.care textarea { min-height:52px; font-size:1.05rem; }
body.care .portal-nav .btn, body.care .portal-out .btn, body.care .care-view .btn { min-height:48px; }
body.care main .portal-parts a.portal-part b { font-size:1.25rem; }
.care-view { display:flex; flex-wrap:wrap; gap:.4rem; }
.care-view .btn[aria-pressed="true"] { background:var(--brand); color:#fff; }
html.care-big body.care { font-size:1.35rem; }
html.care-big body.care h1 { font-size:2rem; }
html.care-contrast body.care { --ink:#000; --muted:#1f1f1f; --line:#000; --bg:#fff; --brand:#003f7a; background:#fff; color:#000; }
html.care-contrast body.care .card { border:2px solid #000; background:#fff; }
html.care-contrast body.care a { color:#003f7a; text-decoration:underline; }
html.care-contrast body.care .btn { border:2px solid #000; }
html.care-contrast body.care .btn.primary { background:#003f7a; color:#fff; }
ul.care-people { list-style:none; padding:0; display:flex; flex-direction:column; gap:.8rem; }
.care-ref b { font-size:1.8rem; letter-spacing:.12em; }           /* My Care part 4: the reference number, easy to read back */
/* My Care part 6: the list of belongings with its photos */
ul.care-belongings { list-style:none; padding:0; display:grid; gap:.6rem; grid-template-columns:repeat(auto-fill, minmax(150px, 1fr)); }
ul.care-belongings li { display:flex; flex-direction:column; gap:.3rem; }
ul.care-belongings img { width:100%; height:auto; max-height:180px; object-fit:cover; border-radius:8px; border:1px solid var(--line, #ddd); }
/* My Care part 7: the survey and notices */
fieldset.care-question { border:1px solid var(--line, #ddd); border-radius:8px; padding:.6rem .8rem; margin:0 0 .8rem; }
fieldset.care-question legend { font-weight:600; padding:0 .3rem; }
label.care-choice { display:flex; align-items:center; gap:.5rem; min-height:44px; }
article.care-notice { border-bottom:1px solid var(--line, #ddd); padding:.4rem 0 .8rem; margin-bottom:.6rem; }
article.care-notice:last-child { border-bottom:0; }
label.care-comment { display:flex; flex-direction:column; gap:.4rem; }
label.care-comment textarea { width:100%; box-sizing:border-box; }

/* The Upload page, calm and simple (Charles, 25 Nov 2026, design review): a one-line-per-file checklist with "How?"
   folded away, one big box with the refused-files line beside it, folds at the bottom. The checklist and the box fit
   on the first phone screen. */
.up-wide { display:inline; } .up-phone { display:none; }
@media (max-width:760px) { .up-wide { display:none; } .up-phone { display:inline; } }
.sr-only { position:absolute; width:1px; height:1px; overflow:hidden; clip:rect(0 0 0 0); white-space:nowrap; }
.up-head { display:flex; justify-content:space-between; align-items:baseline; gap:.5rem; flex-wrap:wrap; margin:0 0 .2rem; }
.up-count { font-size:.95rem; font-weight:600; color:var(--muted); }
ul.up-check { list-style:none; padding:0; margin:0; }
ul.up-check > li { border-bottom:1px solid var(--line); }
ul.up-check > li:last-child { border-bottom:0; }
.up-row { display:flex; align-items:center; gap:.6rem; min-height:46px; padding:.1rem 0; }
details.up-how > summary { list-style:none; cursor:pointer; }
details.up-how > summary::-webkit-details-marker { display:none; }
.up-tick { width:1.5rem; height:1.5rem; border-radius:50%; border:2px solid #9aa8b5; flex:none; display:inline-flex; align-items:center;
  justify-content:center; font-weight:700; color:#fff; font-size:.9rem; }
ul.up-check li.done .up-tick { background:#1e7b3a; border-color:#1e7b3a; }
ul.up-check li.late .up-tick { border-color:#b42318; }
.up-name { flex:1; min-width:0; font-weight:600; line-height:1.25; overflow-wrap:anywhere; }
.up-name small { display:block; font-weight:400; color:var(--muted); font-size:.92rem; }
ul.up-check li.done .up-name { color:#1e7b3a; }
ul.up-check li.late .up-name small { color:#b42318; }
.up-q { flex:none; color:#1A73AD; font-weight:600; white-space:nowrap; }
.up-q::after { content:" ▾"; }
details.up-how[open] .up-q::after { content:" ▴"; }
.up-steps { margin:.1rem 0 .7rem 2.1rem; padding:.6rem .8rem; background:#f4f7fa; border-radius:8px; }
.up-steps ol { margin:.3rem 0 0; padding-left:1.2rem; }
.up-steps p { margin:0; }
label.dropbox.big { min-height:130px; padding:.9rem .6rem; gap:.45rem; }
label.dropbox.big .dropbox-big::before { content:"⇪ "; }
/* the browser's own "Choose Files / No file chosen" box is hidden in every drop box (it looks different in each
   browser); the box itself is the button, and the chosen files are named under it (upload.js) */
label.dropbox { position:relative; }
label.dropbox input[type=file] { position:absolute; width:1px; height:1px; opacity:0; min-height:0; }
label.dropbox .dropbox-press { display:inline-flex; align-items:center; min-height:48px; padding:0 1.3rem; border-radius:999px;
  color:#fff; font-weight:700; background:linear-gradient(90deg,#1A73AD,#1b8a4b); }
.js-drop .drop-fallback { display:none; }
.up-refused { margin:.5rem 0 0; font-weight:600; color:#7a2a20; text-align:center; }
.up-more { padding-top:.3rem; padding-bottom:.3rem; }
details.up-fold { border-top:1px solid var(--line); }
details.up-fold:first-child { border-top:0; }
details.up-fold > summary { min-height:48px; display:flex; align-items:center; font-weight:600; color:#174a6e; cursor:pointer; }
details.up-fold > summary::-webkit-details-marker { display:none; }
details.up-fold > summary::before { content:"▸"; margin-right:.5rem; }
details.up-fold[open] > summary::before { content:"▾"; }
@media (max-width:760px) {
  #todays-files, #drop { padding-top:.6rem; padding-bottom:.6rem; }
  #todays-files { margin-bottom:.5rem; } #drop { margin-top:.5rem; }
  label.dropbox.big { min-height:104px; padding:.6rem .5rem; gap:.35rem; }
  label.dropbox.big .dropbox-small { display:none; }
  .up-refused { margin-top:.35rem; }
}

/* Today, one fold for a card's extras (Charles, 25 Nov 2026, design review): "This is wrong", "Mark as done",
   "Add a team member" and "Hand it to someone" sit inside "More options", so each card is its title, why and button. */
details.card-more { margin:.5rem 0 0; }
details.card-more > summary { list-style:none; cursor:pointer; min-height:44px; display:inline-flex; align-items:center; gap:.35rem;
  color:var(--brand); font-weight:600; padding:0 .2rem; }
details.card-more > summary::-webkit-details-marker { display:none; }
details.card-more > summary::after { content:"▾"; }
details.card-more[open] > summary::after { content:"▴"; }
details.card-more > details { margin:.4rem 0; }
details.card-more > details.wrong-fold { border:1px solid var(--line); border-radius:10px; background:#fafcfd; padding:0 .9rem .6rem; }
details.card-more > details.wrong-fold > summary { cursor:pointer; padding:.7rem 0; min-height:44px; font-weight:600; color:var(--brand); }

/* Long lists, 25 at a time (Charles, 25 Nov 2026, design review; static/longlist.js). Only the screen changes: every
   count at the top of the page is worked out from the whole list. */
.ll-hide, table.cards-on-phone tr.ll-hide { display:none !important; }
.ll-bar { display:flex; flex-wrap:wrap; align-items:center; gap:.5rem; margin:.6rem 0; }
.ll-bar .ll-status { flex:1 1 12rem; }
.ll-find { margin:.4rem 0 .6rem; }

/* Reading on a phone (Charles, 25 Nov 2026, design review): on a phone no words on a page are smaller than 15 pixels,
   and the small coloured labels (pills, tags, counts) no smaller than 14. A floor only: anything already larger keeps
   its size. Every box a person types in, picks from or writes in has its label ABOVE it, never beside it.
   tests/test_phone_reading.py checks both. */
@media (max-width:760px) {
  main .small, main small, main .btn.small, main .tile span, main .who, main .grid th, main .report-table th,
  main .report-table td, main .grid.history th.section, main .letter-sheet .letter-table, main label.chip span,
  main .board-col h3, main .board-card, main .board-card .who, main .step-n, main .pic-off, main table.files .ask-form .link,
  main nav.part-views .btn, main label.dropbox .dropbox-small, main label.dropbox .dropbox-chosen, main .up-tick,
  main .up-name small, main .find-kind { font-size:15px !important; }
  main label, main legend, main summary, main .form-grid label, main .upload-form label, main label.find-in-list
    { font-size:max(15px, 1em) !important; }
  main .pill, main .tag, main .count, main .level { font-size:max(14px, .85em) !important; }
  main label:has(> textarea), main label:has(> select),
  main label:has(> input:not([type=checkbox]):not([type=radio]):not([type=hidden]):not([type=submit]):not([type=button]):not([type=file])) {
    display:flex !important; flex-direction:column !important; align-items:stretch !important; gap:.25rem; }
  /* a table turned into cards fills the box it is in, less that box's own margins; a grid's parts may shrink */
  main table.cards-on-phone { width:auto !important; max-width:100%; }
  main .upload-two > *, main .form-grid > * { min-width:0; }
  main form.inline:has(> label) { display:flex; flex-direction:column; align-items:stretch; gap:.5rem; }
  main form.inline:has(> label) > label { margin-right:0; }
  main form.inline:has(> label) > .btn { align-self:flex-start; }
  main label:has(> textarea) > textarea, main label:has(> select) > select,
  main label:has(> input:not([type=checkbox]):not([type=radio])) > input { width:100%; max-width:100%; box-sizing:border-box; }
}
