/* The camera page (face/). It loads the home page's stylesheet first (../style.css), so the colours, the type, the
   menu, the cards, the tiles and the footer are the home page's own rules. This file adds only what this page has:
   the camera's stage, the readings and their bars. Every class here starts with "face-" so that nothing collides
   with the home page's names. */

.face-page main > header.top { padding-top: 22px; }
.face-page header.top .tag { max-width: 90ch; }
.face-page main > nav { padding: 8px 0 0; }

.face-read { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: 14px 28px; align-items: start; }
@media (max-width: 900px) { .face-read { grid-template-columns: minmax(0, 1fr); } }
.face-left { min-width: 0; position: sticky; top: 12px; }
@media (max-width: 900px) { .face-left { position: static; } }

/* the camera's picture: mirrored, as a mirror shows a face; the drawing over it is mirrored with it */
.face-stage { position: relative; background: #0b0e14; border-radius: 12px; overflow: hidden; aspect-ratio: 16 / 9; max-height: 70vh; width: 100%; }
.face-stage video, .face-stage canvas { position: absolute; inset: 0; width: 100%; height: 100%; transform: scaleX(-1); }
.face-stage video { object-fit: contain; }
.face-hint { position: absolute; inset: 0; margin: 0; display: grid; place-items: center; text-align: center; color: #c5cbd6; font-size: 15px; padding: 16px; }

.face-controls { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; margin: 10px 0 0; }
.face-btn { font: inherit; font-size: 14px; color: var(--ink); background: transparent; border: 1px solid var(--muted); border-radius: 999px; padding: 5px 16px; cursor: pointer; line-height: 1.5; }
.face-btn.primary { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.face-btn:hover:not([disabled]) { border-color: var(--accent); }
.face-btn[disabled] { opacity: 0.45; cursor: default; }
.face-btn:focus-visible, .face-check input:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.face-check { font-size: 13px; color: var(--muted); display: inline-flex; align-items: center; gap: 5px; }
.face-status { margin: 10px 0 0; color: var(--ink); }
.face-left > .status { margin: 8px 0 0; max-width: 78ch; }

.face-cards { display: grid; gap: 14px; min-width: 0; }
.face-card { min-width: 0; }
.face-card h3 { margin: 0 0 8px; font-size: 16px; display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.face-pair { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 250px), 1fr)); gap: 14px; }

/* what kind of number this is, said in words; the colour only repeats it */
.face-kind { font-size: 11px; font-weight: 500; padding: 2px 8px; border-radius: 999px; background: var(--soft); color: var(--muted); white-space: nowrap; }

.face-hero { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 10px; margin: 0 0 10px; }
.face-big { font-size: 56px; line-height: 1; font-weight: 700; font-variant-numeric: tabular-nums; letter-spacing: -0.02em; min-width: 1.2ch; }
.face-big.small { font-size: 40px; }
.face-big.held, .face-big.tentative { color: var(--muted); }   /* a number not, or no longer, to be trusted yet */
.face-unit { color: var(--muted); font-size: 14px; }
.face-state { margin-left: auto; font-size: 12px; padding: 2px 9px; border-radius: 999px; border: 1px solid var(--line); color: var(--muted); white-space: nowrap; }
.face-state::before { content: ""; display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: var(--noclaim); margin-right: 6px; vertical-align: 1px; }
.face-state[data-state="steady"]::before { background: var(--good); }
.face-state[data-state="reading"]::before, .face-state[data-state="collecting"]::before, .face-state[data-state="baseline"]::before { background: var(--ok); }
.face-state[data-state="low"]::before, .face-state[data-state="none"]::before { background: var(--bad); }

.face-meter { display: grid; grid-template-columns: 110px minmax(0, 1fr) 46px; align-items: center; gap: 10px; font-size: 13px; margin: 6px 0; }
.face-meter-name { color: var(--muted); }
.face-meter-n { text-align: right; font-variant-numeric: tabular-nums; color: var(--ink); }
.face-bar { display: block; height: 8px; background: var(--soft); border-radius: 999px; overflow: hidden; }
.face-bar > i { display: block; height: 100%; width: 0; background: var(--accent); border-radius: 999px; transition: width 0.3s; }
@media (prefers-reduced-motion: reduce) { .face-bar > i { transition: none; } }

.face-wave { margin: 12px 0 8px; }
.face-wave canvas { display: block; width: 100%; height: 150px; border: 1px solid var(--line); border-radius: 8px; background: var(--card); }
.face-wave figcaption, .face-small { color: var(--muted); font-size: 12.5px; }
.face-wave figcaption { margin-top: 4px; }
.face-line { margin: 8px 0; font-size: 14px; }
.face-line b { font-variant-numeric: tabular-nums; }
.face-card > .face-small { margin: 8px 0 0; }

.face-bars { list-style: none; margin: 8px 0; padding: 0; display: grid; gap: 6px; }
.face-bars li { display: grid; grid-template-columns: 80px minmax(0, 1fr) 46px; align-items: center; gap: 10px; font-size: 13px; }
.face-bars li > span:first-child { color: var(--muted); }
.face-bars li.lead > span:first-child { color: var(--ink); font-weight: 600; }

.face-tiles { margin: 0; }
.face-tiles { gap: 8px; }
.face-tiles .tile { min-width: 68px; flex: 1 1 68px; padding: 8px 8px; }
.face-tiles .tile b { font-variant-numeric: tabular-nums; }

.face-how td:first-child { white-space: nowrap; font-weight: 600; }
.face-how td:last-child { white-space: nowrap; }
@media (max-width: 600px) { .face-how td:first-child { white-space: normal; } }
.face-not { margin: 6px 0 0; padding-left: 18px; max-width: 90ch; }
.face-not li { margin: 4px 0; }
#how > .status { max-width: 100ch; margin-top: 10px; }
