/* NeuroClarity Resources: the parts the screens are built from, as the plan page draws them: the list table, cards,
   status tags, the usage bars, key-value lines (also the "In the report" card), the Try a patient side panel and its
   result rows, Review's side-by-side words, the sign-in card, and the provider screens' facts, locations and sources.
   Every colour comes from css/tokens.css. */

/* The list table. */
table.grid { width: 100%; border-collapse: separate; border-spacing: 0; background: var(--color-card); border: 1px solid var(--color-line); border-radius: 9px; overflow: hidden; }
table.grid th { text-align: left; font-size: 12px; font-weight: 600; color: var(--color-muted); padding: 9px 12px; border-bottom: 1px solid var(--color-line); white-space: nowrap; }
table.grid td { padding: 10px 12px; border-bottom: 1px solid var(--color-line-soft); vertical-align: top; overflow-wrap: break-word; }
table.grid td.nw { white-space: nowrap; }
table.grid tr:last-child td { border-bottom: 0; }
table.grid tbody tr.go { cursor: pointer; }
table.grid tbody tr.go:hover td { background: var(--color-page); }
table.grid tr.sel td { background: var(--color-selected-row); }
table.grid .t { font-weight: 600; }
table.grid .t a { color: var(--color-text); text-decoration: none; }
table.grid .s { color: var(--color-muted); font-size: 12.5px; }
table.grid .r { text-align: right; font-variant-numeric: tabular-nums; }
table.grid td.acts { text-align: right; white-space: nowrap; }
table.grid tr.off td { color: var(--color-muted); }
/* Narrower windows: tighter cells, so List › Providers' six columns fit at 1024 wide (walk W3, minor 2). */
@media (max-width: 1100px) { table.grid th, table.grid td { padding-left: 10px; padding-right: 10px; } }

/* Status tags. */
.tagx { display: inline-flex; align-items: center; font-size: 12px; font-weight: 600; padding: 1px 8px; border-radius: 99px; white-space: nowrap; line-height: 18px; background: var(--color-chip-grey-bg); color: var(--color-chip-grey); }
.tagx.ok, .tagx.first { background: var(--color-chip-green-bg); color: var(--color-chip-green); }
.tagx.warn { background: var(--color-chip-amber-bg); color: var(--color-chip-amber); }
.tagx.bad { background: var(--color-chip-red-bg); color: var(--color-chip-red); }
.tagx.mine { background: var(--color-chip-blue-bg); color: var(--color-chip-blue); }
.tags { display: flex; gap: 4px; flex-wrap: wrap; }

/* Cards. */
.card { background: var(--color-card); border: 1px solid var(--color-line); border-radius: 9px; padding: 18px; display: grid; gap: 14px; align-content: start; min-width: 0; }
.card .ch { font-size: 14px; font-weight: 600; display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.card .ch span { font-weight: 400; color: var(--color-muted); font-size: 12.5px; }
.empty { background: var(--color-card); border: 1px solid var(--color-line); border-radius: 9px; padding: 28px 22px; display: grid; gap: 12px; justify-items: start; }
.empty b { font-size: 15px; }
.loading { color: var(--color-muted); padding: 6px 0; }

.kv { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 6px 14px; font-size: 13px; margin: 0; }
.kv dt { color: var(--color-muted); white-space: nowrap; }
.kv dd { margin: 0; overflow-wrap: anywhere; }
.kv dd .blk { display: block; }
.kv a { cursor: pointer; }

/* Usage in signed reports. */
.bars { display: grid; gap: 7px; font-size: 12.5px; }
.bar { display: grid; grid-template-columns: 96px minmax(0, 1fr) 34px; gap: 8px; align-items: center; }
.bar .tr { height: 7px; border-radius: 99px; background: var(--color-panel); overflow: hidden; }
.bar .tr i { display: block; height: 100%; background: var(--color-main); border-radius: 99px; }
.bar .tr i.rm { background: var(--color-decor); }
.bar b { font-weight: 600; text-align: right; font-variant-numeric: tabular-nums; }

/* First choice rows on the Item form: the conditions across, then the ages and Remove, then the guideline across;
   each box has its label. */
.fc { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 10px 8px; align-items: end; padding: 10px; border: 1px solid var(--color-line-soft); border-radius: 8px; }
.fc > .field:first-child, .fc > .field:last-child:not(:nth-child(2)) { grid-column: 1 / -1; }
.fc > .btn { justify-self: end; }

/* History on the Item screen: each version's name on its own line, what happened to it under it. */
.hist { display: grid; gap: 10px; font-size: 13px; margin: 0; padding: 0; list-style: none; }
.hist li { display: grid; gap: 2px; }
.hist .w { color: var(--color-muted); overflow-wrap: anywhere; }

/* Try a patient: a panel on the right of the List. */
.pane {
  position: fixed; top: 48px; right: 0; bottom: 0; width: 400px; max-width: 100%; z-index: 40; background: var(--color-card);
  border-left: 1px solid var(--color-line); padding: 20px; display: grid; gap: 14px; align-content: start; overflow-y: auto;
  box-shadow: var(--shadow-pane);
}
.res { display: grid; grid-template-columns: 20px minmax(0, 1fr) auto; gap: 2px 10px; align-items: start; font-size: 13.5px; padding: 8px 0; border-top: 1px solid var(--color-line-soft); }
.res .why { grid-column: 2 / 4; font-size: 12.5px; color: var(--color-muted); }
.res.sub { margin-left: 30px; }
.res a { color: var(--color-text); text-decoration: none; }
.res a:hover { text-decoration: underline; }
.gh { font-size: 13px; font-weight: 600; margin-top: 8px; }
/* Try a patient's Session rows (a title, a quote, the answer of the last Try) and its Providers part. */
.named { display: grid; gap: 8px; }
.nrow { display: grid; gap: 6px; padding: 8px; border: 1px solid var(--color-line-soft); border-radius: 8px; }
.said-row { flex-wrap: nowrap; align-items: flex-start; }
.said-row > .said { flex: 1; }
.said { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; font-size: 12.5px; min-width: 0; }
.said a { color: var(--color-text); }
.said .s { color: var(--color-muted); }
.gs { font-size: 12.5px; color: var(--color-muted); margin-top: 6px; }
.res.pv { grid-template-columns: minmax(0, 1fr) auto; }
.res.pv .why { grid-column: 1 / 3; }
.box { width: 16px; height: 16px; border-radius: 4px; border: 1.5px solid var(--color-line); background: var(--color-card); margin-top: 2px; display: grid; place-items: center; flex: none; }
.box.on { background: var(--color-main); border-color: var(--color-main); }
.box.on::after { content: ""; width: 8px; height: 4px; border-left: 2px solid var(--color-on-main); border-bottom: 2px solid var(--color-on-main); transform: rotate(-45deg) translate(1px, -1px); }
.conds { display: grid; gap: 6px; }
.cond { display: grid; grid-template-columns: minmax(0, 1fr) 140px auto; gap: 8px; align-items: center; }

/* Review: the words now and the words proposed, side by side. */
.cmp { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 10px; font-size: 13px; }
.cmp > div { border-radius: 6px; padding: 8px 10px; overflow-wrap: anywhere; white-space: pre-wrap; }
.cmp .now { background: var(--color-chip-red-bg); }
.cmp .new { background: var(--color-chip-green-bg); }
.mk { font-size: 11.5px; font-weight: 600; display: block; white-space: normal; }
.cmp .now .mk { color: var(--color-chip-red); }
.cmp .new .mk { color: var(--color-chip-green); }

/* Settings: a row being renamed, given other names or merged. */
.edit-row td { background: var(--color-page); }
.key-once { font-family: ui-monospace, Menlo, monospace; font-size: 13px; background: var(--color-panel); border-radius: 6px; padding: 8px 10px; overflow-wrap: anywhere; flex: 1; min-width: 0; }

/* Sign-in: one card in the middle of the page. */
.signin { min-height: 100%; display: grid; place-items: center; padding: 40px 16px; }
.signin .card { width: 100%; max-width: 440px; padding: 28px; gap: 16px; box-shadow: var(--shadow-card); }
.signin h1 { font-size: 20px; margin: 0; letter-spacing: -0.02em; }
.signin .people { display: grid; gap: 6px; }
.signin .people .btn { justify-content: space-between; height: auto; min-height: 40px; padding: 8px 12px; text-align: left; white-space: normal; }
.signin .people small { color: var(--color-muted); font-weight: 400; }
.signin .dev { font-size: 12px; font-weight: 600; color: var(--color-chip-amber); }

/* Providers: a fact's value and the page it came from side by side, its check under them; each location with Remove;
   the Sources list; Find on the web's four boxes across. */
.fact { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr); gap: 6px 8px; align-items: start; min-width: 0; }
.fact > div:last-child { grid-column: 1 / -1; }
.fl { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; font-size: 12px; min-height: 18px; }
a.src { font-size: 12px; }
.fv { display: grid; gap: 4px; min-height: 34px; align-content: center; overflow-wrap: anywhere; }
.loc { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px; align-items: start; padding: 10px; border: 1px solid var(--color-line-soft); border-radius: 8px; }
.srcs { display: grid; gap: 8px; font-size: 13px; }
.srcs a { overflow-wrap: anywhere; }
.srcs .blk { display: block; }
span.nw, div.s.nw { white-space: nowrap; }
/* The provider page's status tag with who approved it under it ("By the automatic checks"). */
.tagnote { display: grid; justify-items: end; gap: 1px; }
.tagnote span:not(.tagx) { font-size: 11.5px; color: var(--color-muted); white-space: nowrap; }
.pf { display: inline-flex; gap: 4px; align-items: baseline; margin-right: 8px; }
.find4 { grid-template-columns: minmax(0, 1.2fr) minmax(0, 1.2fr) minmax(0, 1fr) minmax(0, 0.9fr); }
/* An address is long: its page goes under it. */
.loc .fact { grid-template-columns: minmax(0, 1fr); }
@media (max-width: 1100px) { .fact { grid-template-columns: minmax(0, 1fr); } }

