/* covered: "Am I covered?" (../../old/explore/DIRECTION-v6.md section 5). The Policies page's section (app/covered.js
   cvSection(): the field, four suggestions, up to three answers) and the command bar's "Am I covered?" group (app/shell.js
   draws it with covered.js's cvCard()). An answer: the verdict as an icon and a word, the situation, the answer, the next
   step. Status never by color alone: Covered is a green checkCircle and the word, Partly covered a half-filled circle in
   --ink, Not covered circleSlash in --ink. No font-size inside a query; colors only as tokens. */

/* ---------- The section on Policies ---------- */
/* One column, as wide as a comfortable question and its answers; policies.js's next group keeps its own 48 above it */
.cv { --cv-v: 160px; max-width: 720px; }
.cv-field { position: relative; margin-top: var(--s-4); }
.cv-field > svg.i { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); color: var(--ink-2); pointer-events: none; }
.cv-field input { width: 100%; height: var(--field-h); padding: 0 var(--s-7) 0 44px; border: 0; border-radius: var(--r-md); background: var(--canvas); box-shadow: inset 0 0 0 1px var(--field); font: inherit; font-size: var(--fs-body); line-height: var(--lh-ui); color: var(--ink); -webkit-appearance: none; appearance: none; transition: box-shadow var(--t-hover); }
.cv-field input::-webkit-search-cancel-button, .cv-field input::-webkit-search-decoration { -webkit-appearance: none; appearance: none; }
.cv-field input:hover { box-shadow: var(--edge-hover); }
.cv-field input:focus { outline: none; box-shadow: inset 0 0 0 2px var(--green); }
/* Clear: the field's own x, shown while it holds a question (Esc does the same) */
.cv-x { position: absolute; right: var(--s-1); top: 50%; transform: translateY(-50%); display: grid; place-items: center; width: 40px; height: 40px; border-radius: var(--r-pill); color: var(--ink-2); transition: background-color var(--t-hover); }
.cv-x[hidden] { display: none; }
.cv-x svg.i { width: 18px; height: 18px; }
.cv-x:hover { background: var(--hover); color: var(--ink); }
.cv-x:active { background: var(--pressed); }
.cv-x:focus-visible { outline-offset: -2px; }
/* Four suggestions that fill the field: the command bar's popular pills */
.cv-chips { display: flex; flex-wrap: wrap; gap: var(--s-2); margin-top: var(--s-3); }
.cv-chip { display: inline-flex; align-items: center; min-height: 36px; padding: 0 14px; border-radius: var(--r-pill); box-shadow: inset 0 0 0 1px var(--line-2); font-size: var(--fs-small); line-height: var(--lh-small); color: var(--ink); transition: background-color var(--t-hover), box-shadow var(--t-hover); }
.cv-chip:hover { background: var(--hover); box-shadow: inset 0 0 0 1px var(--field); }
.cv-chip:active { background: var(--pressed); }

/* ---------- The answers ---------- */
.cv-out:not(:empty) { margin-top: var(--s-5); }
/* The set is one container, its answers rows split by hairlines (a border, not the inset edge, so a row's wash never covers it) */
.cv-list { list-style: none; margin: 0; padding: 0; border: 1px solid var(--stroke); border-radius: var(--r-lg); overflow: hidden; container-type: inline-size; }
.cv-list > li + li { border-top: 1px solid var(--line); }
/* One answer: the verdict in its own column, so a set reads down the verdicts; the situation, the answer and the next step
   beside it. The whole row is one link to the next step, which reads as a text action */
.cv-card { display: grid; grid-template-columns: var(--cv-v) minmax(0, 1fr); column-gap: var(--s-4); width: 100%; padding: 20px var(--s-5); color: var(--ink); text-decoration: none; text-align: left; transition: background-color var(--t-hover); }
.cv-v { display: flex; align-items: flex-start; gap: var(--s-2); font-weight: 700; line-height: var(--lh-ui); }
.cv-v svg.i { margin-top: 1px; stroke-width: 1.5; }
/* The verdict's period: in the flow, so a screen reader hears "Covered. A client slips…" with no stray space, and clipped from view */
.cv-p { clip-path: inset(50%); }
.cv-t, .cv-a { display: block; }
.cv-t { line-height: var(--lh-ui); }
.cv-a { margin-top: var(--s-1); color: var(--ink-2); font-size: var(--fs-small); line-height: var(--lh-small); }
.cv-n { grid-column: 2; justify-self: start; margin-top: var(--s-2); color: var(--green-text); line-height: var(--lh-ui); }
a.cv-card:hover, button.cv-card:hover { background: var(--hover); text-decoration: none; }
a.cv-card:hover .cv-nl, button.cv-card:hover .cv-nl { text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 4px; }
/* The price after a purchase or a raise: in ink, as on the policy cards ("Raise to €80 a day, +€6 a month") */
.cv-na { color: var(--ink); }
a.cv-card:active, button.cv-card:active { background: var(--pressed); --ink-2: var(--ink-2-press); }
.cv-card:focus-visible { outline-offset: -2px; }
/* The end rows follow the container's corners, so a focus ring or a wash never shows a square corner */
.cv-list > li:first-child > .cv-card { border-top-left-radius: calc(var(--r-lg) - 1px); border-top-right-radius: calc(var(--r-lg) - 1px); }
.cv-list > li:last-child > .cv-card { border-bottom-left-radius: calc(var(--r-lg) - 1px); border-bottom-right-radius: calc(var(--r-lg) - 1px); }
/* The verdict's icon: green only when covered, the word always beside it */
.v-yes .cv-v svg.i, .cv-opt.v-yes > svg.i { color: var(--green); }
/* Narrow, the verdict leads its answer on a line of its own, at the answer's own size */
@container (max-width: 520px) {
  .cv-card { grid-template-columns: minmax(0, 1fr); row-gap: var(--s-2); padding: var(--s-4); }
  .cv-n { grid-column: 1; margin-top: 0; }
}
.cv-foot { margin-top: var(--s-3); color: var(--ink-2); font-size: var(--fs-small); line-height: var(--lh-small); }
/* No match: a line and a person to ask, no container */
.cv-none { display: grid; justify-items: start; gap: var(--s-2); }
.cv-none p { color: var(--ink-2); max-width: 60ch; }
/* Nothing close enough for a verdict: the closest situations as text actions, one a line, each asking itself (the verdict
   then comes with the situation it's for), and a person to ask. No container: nothing here is an answer yet */
.cv-near { display: grid; justify-items: start; gap: var(--s-2); }
.cv-near > p { color: var(--ink-2); max-width: 60ch; }
.cv-sugg { display: grid; justify-items: start; gap: var(--s-1); list-style: none; margin: 0; padding: 0; }
.cv-sg { display: inline; padding-block: var(--s-1); text-align: left; }
.cv-nw { margin-top: var(--s-1); }
/* An answer that just arrived fades up a step; one that stays doesn't move (motion that explains what changed, spec 2.3).
   With reduced motion or "Motion: off" it still fades in place, opacity only, so what changed is signalled (spec 2.4); the
   selectors outweigh styles.css's blanket "animation: none" for those two */
@media (prefers-reduced-motion: no-preference) {
  html:not([data-motion="off"]) .cv-in { animation: cv-in var(--dur-2, 200ms) var(--ease-out, var(--ease)) both; }
}
@media (prefers-reduced-motion: reduce) { .cv-out .cv-in { animation: cv-fade var(--dur-2, 200ms) linear both !important; } }
html[data-motion="off"] .cv-out .cv-in, html.mo-still .cv-out .cv-in { animation: cv-fade var(--dur-2, 200ms) linear both !important; }
@keyframes cv-in { from { opacity: 0; transform: translateY(var(--s-1)); } }
@keyframes cv-fade { from { opacity: 0; } }

/* ---------- The command bar's "Am I covered?" group (shell.js) ---------- */
/* The group heads the list, set off from the commands under it by a hairline; its heading is 14 Bold in sentence case */
.cv-grp:not(:last-child) { padding-bottom: var(--s-2); margin-bottom: var(--s-2); border-bottom: 1px solid var(--line); }
.cmdk-gh { padding: var(--s-2) var(--s-3) var(--s-1); font-size: var(--fs-small); line-height: var(--lh-small); font-weight: 700; color: var(--ink); }
/* An answer as an option: the verdict's icon in the icon column, "Covered." in Bold before the situation, the answer under
   it, and the next step Enter runs */
.cmdk-item.cv-opt { align-items: start; padding-block: var(--s-3); }
.cv-opt > svg.i { margin-top: 1px; stroke-width: 1.5; }
.cv-opt .t b { font-weight: 700; }
.cv-opt .s { margin-top: 2px; }
.cv-opt .cv-go { display: block; margin-top: 6px; color: var(--green-text); line-height: var(--lh-ui); }
.cv-opt .end { align-self: start; }
.cv-caveat { margin: 0; padding: var(--s-2) var(--s-3) var(--s-1); color: var(--ink-2); font-size: var(--fs-small); line-height: var(--lh-small); }
/* The popular pills show while the field is empty (shell.js hides them once she types) */
.cmdk-pop[hidden] { display: none; }
/* The empty area: a line of suggestions that fill the field ("Try: a client slips, burst pipe, laptop stolen.") */
.cmdk-empty p { margin: 0; }
.cmdk-empty p + p { margin-top: var(--s-2); }
.cmdk-empty .cv-try { display: inline; padding: 0; color: var(--green-text); text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 4px; }
.cmdk-empty .cv-try:hover { color: var(--green-strong); text-decoration-thickness: 2px; }

/* ---------- Forced colors (Windows High Contrast) ----------
   Box-shadow edges are dropped there, so the field and the chips draw a system-colored border, and focus a Highlight ring */
@media (forced-colors: active) {
  .cv-field input { border: 1px solid CanvasText; }
  .cv-field input:focus { outline: 2px solid Highlight; outline-offset: 1px; }
  .cv-chip { border: 1px solid ButtonText; }
}
