/* The client portal. Warden Technologies' colors: a forest band on top, white panels on warm paper,
   gold only in the logo and the one number that needs you. Buttons are black and white. */
:root {
  --ground: #f3ede1;
  --card: #ffffff;
  --ink: #12322b;
  --band: #12322b;
  --cream: #f6f0e4;
  --band-text: #c9d6d0;
  --mid: #3f4d46;
  --dim: #56635c;
  --line: #e2d8c4;
  --soft: #efe8da;
  --head: #faf6ee;
  --good: #2f9a79;
  --good-ink: #1f6f57;
  --good-soft: #8fbfae;
  --wait: #e09a2d;
  --wait-ink: #8a4b06;
  --gold: #e6b54f;
  --stop: #d9503c;
  --off: #a9b2ad;
  --strip: #f7f3ea;
  --grid: #e9e1d1;
  --never: #8f2f22;
  color-scheme: light;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { margin: 0; background: var(--ground); }
body { color: var(--ink); font: 16px/1.5 Outfit, system-ui, -apple-system, 'Segoe UI', sans-serif; -webkit-font-smoothing: antialiased; }
h1, h2, h3 { text-wrap: balance; }
a { color: inherit; }
button { font: inherit; }
.in { max-width: 1160px; margin: 0 auto; padding-inline: 24px; }
.tnum, .nums, .row, .cost { font-variant-numeric: tabular-nums; }
a:focus-visible, button:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }

/* ---------------------------------------------------------------- the dark top: bar and band, one block */
.bar { background: var(--band); color: var(--cream); padding-top: env(safe-area-inset-top, 0px); }
.bar .in { display: flex; align-items: center; justify-content: space-between; gap: 12px 20px; flex-wrap: wrap; padding-block: 14px; }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 600; font-size: 17px; text-decoration: none; color: var(--cream); }
.who { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; font-size: 14.5px; color: var(--band-text); }
.who .co { color: var(--cream); font-weight: 600; }
.link { background: none; border: 0; padding: 0; color: var(--cream); text-decoration: underline; text-underline-offset: 3px; cursor: pointer; font-size: 14.5px; }
.band { background: var(--band); color: var(--cream); padding: 6px 0 46px; }
.band .in { display: flex; justify-content: space-between; align-items: flex-end; gap: 20px 32px; flex-wrap: wrap; }
.band h1 { font-size: clamp(32px, 3.4vw, 42px); line-height: 1.05; letter-spacing: -.02em; margin: 14px 0 6px; font-weight: 600; }
.band .back { color: var(--cream); text-decoration: none; font-size: 14.5px; font-weight: 600; }
.band .back::before { content: '\2190\00a0'; }
.band .state { font-size: 15px; font-weight: 500; color: var(--band-text); margin-left: 12px; letter-spacing: 0; }
.updated { margin: 0; font-size: 14.5px; color: var(--band-text); }
.updated.late { color: var(--gold); font-weight: 600; }
.nums { display: flex; gap: 20px 36px; flex-wrap: wrap; }
.nums div { min-width: 96px; }
.nums b { display: block; font-size: 38px; line-height: 1; font-weight: 600; }
.nums span { display: block; margin-top: 6px; font-size: 14px; color: var(--band-text); }
.nums .wait b { color: var(--gold); }

/* Warden looking at a client's page: one plain strip under the bar */
.looking { background: #fbf1dc; border-bottom: 1px solid #ecd9ad; color: var(--ink); padding-top: env(safe-area-inset-top, 0px); }
.looking .in { display: flex; align-items: center; justify-content: space-between; gap: 10px 20px; flex-wrap: wrap; padding-block: 10px; }
.looking p { margin: 0; font-size: 15px; }

/* ---------------------------------------------------------------- the page under the band */
main { padding-bottom: 60px; }
.lift { margin-top: -26px; display: grid; gap: 22px; }
.panel { background: var(--card); border: 1px solid var(--line); border-radius: 14px; box-shadow: 0 14px 34px -24px rgba(18, 50, 43, .45); }
.loading, .empty, .quiet { color: var(--dim); }
.loading { padding-top: 40px; }

/* today, hour by hour */
.today { padding: 18px 22px 16px; }
.today h2, .panel h2 { font-size: 19px; margin: 0; font-weight: 600; }
.key { display: flex; flex-wrap: wrap; gap: 4px 18px; font-size: 14px; color: var(--dim); margin: 2px 0 12px; }
.key span { display: flex; align-items: center; gap: 7px; }
.hours { position: relative; height: 20px; font-size: 12.5px; color: var(--dim); }
.hours span { position: absolute; transform: translateX(-50%); white-space: nowrap; }
.hours span.first { transform: none; }
.hours span.last { transform: translateX(-100%); }
.strip { margin-top: 8px; }
.strip-head { display: flex; justify-content: space-between; gap: 12px; font-size: 15px; margin-bottom: 4px; }
.strip-head a { font-weight: 600; text-decoration: none; }
.strip-head a:hover { text-decoration: underline; text-underline-offset: 3px; }
.strip-head span { color: var(--mid); }
.track { position: relative; height: 40px; background: var(--strip); border-radius: 8px; overflow: hidden; }
.track .gl { position: absolute; top: 0; bottom: 0; width: 1px; background: var(--grid); }
.track .now { position: absolute; top: 0; bottom: 0; border-left: 1.5px dashed var(--ink); }
.mk { position: absolute; width: 10px; height: 10px; margin: -5px 0 0 -5px; border-radius: 50%; background: var(--good); opacity: .85; }
.mk.person { width: 12px; height: 12px; margin: -6px 0 0 -6px; background: #fff; border: 3px solid var(--wait); opacity: 1; }
.mk.waiting { width: 12px; height: 12px; margin: -6px 0 0 -6px; background: var(--wait); border: 3px solid var(--wait); opacity: 1; }
.key .mk { position: static; margin: 0; flex: none; }

/* a row per agent */
.agents { overflow: hidden; }
.row { display: grid; grid-template-columns: minmax(0, 1fr) 190px 330px 110px 52px; gap: 22px; align-items: center; padding: 16px 24px; border-top: 1px solid var(--soft); text-decoration: none; }
.row.th { border-top: 0; padding-block: 11px; font-size: 13.5px; font-weight: 600; color: var(--dim); background: var(--head); border-bottom: 1px solid var(--soft); }
.row.th + .row { border-top: 0; }
a.row:hover { background: #fbf8f2; }
.row small { display: block; font-size: 13.5px; color: var(--dim); }
.c-name { display: flex; align-items: flex-start; gap: 12px; }
.c-name b { display: block; font-size: 18px; font-weight: 600; }
.c-name small.w { color: var(--wait-ink); font-weight: 600; }
.dot { display: inline-block; width: 12px; height: 12px; border-radius: 50%; margin-top: 7px; flex: none; background: var(--good); box-shadow: 0 0 0 4px #e3f2ec; }
.dot.paused { background: var(--stop); box-shadow: 0 0 0 4px #f8e1dd; }
.dot.off { background: var(--off); box-shadow: 0 0 0 4px #eceeed; }
.c-std { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 2px 14px; align-items: center; }
.c-std svg { grid-row: span 2; }
.c-std b { font-size: 17px; font-weight: 600; white-space: nowrap; }
.c-std b.unp { color: var(--mid); font-weight: 500; }
.c-std small.ok { color: var(--good-ink); }
.c-std small.low { color: var(--wait-ink); font-weight: 600; }
.c-cost b { font-size: 17px; font-weight: 600; }
.c-open { text-align: right; font-weight: 600; color: var(--good-ink); font-size: 15px; }
.row em { display: none; font-style: normal; font-size: 13px; color: var(--dim); }
.ax { font: 11px Outfit, system-ui, sans-serif; fill: #6b776f; }

/* ---------------------------------------------------------------- one agent */
.cols { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, .85fr); gap: 22px; align-items: start; }
.side { display: grid; gap: 22px; }
.card { padding: 16px 20px; }
.card h2 { margin-bottom: 6px; }
.card .quiet { margin: 0 0 6px; font-size: 14.5px; }
.log h3 { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; font-size: 14.5px; font-weight: 600;
  margin: 16px 0 0; padding-bottom: 6px; border-bottom: 1px solid var(--line); }
.log h3 span { font-weight: 400; color: var(--dim); }
.log ol, .waiting { list-style: none; margin: 0; padding: 0; }
.log li { display: grid; grid-template-columns: 72px minmax(0, 1fr); gap: 2px 10px; padding: 7px 0; border-top: 1px solid var(--soft); font-size: 15px; }
.log li:first-child { border-top: 0; }
.log time { color: var(--dim); font-size: 14px; padding-top: 1px; font-variant-numeric: tabular-nums; }
.log .more { margin: 6px 0 0 82px; font-size: 14px; color: var(--dim); }
.tag { grid-column: 2; font-style: normal; font-size: 13.5px; color: var(--dim); }
.tag.wait { color: var(--wait-ink); font-weight: 600; }
.waiting li { padding: 8px 0; border-top: 1px solid var(--soft); font-size: 15px; display: grid; grid-template-columns: 14px minmax(0, 1fr); gap: 0 10px; }
.waiting li:first-child { border-top: 0; }
.waiting li::before { content: ''; width: 10px; height: 10px; margin-top: 6px; border-radius: 50%; background: var(--wait); }
.waiting small { grid-column: 2; display: block; color: var(--dim); font-size: 13.5px; }
.std { margin: 0 0 2px; font-variant-numeric: tabular-nums; }
.std b { font-size: 24px; }
.std span { color: var(--dim); }
.std.meets span { color: var(--good-ink); }
.std.below, .std.below span { color: var(--wait-ink); }
.std.unproven b { font-size: 20px; color: var(--mid); font-weight: 500; }
.chart { width: 100%; height: auto; display: block; margin-top: 8px; overflow: visible; }
.chart .grid { stroke: var(--soft); stroke-width: 1; }
.chart .needs { stroke: var(--ink); stroke-width: 1.5; stroke-dasharray: 4 4; }
.chart .trend { fill: none; stroke: var(--good); stroke-width: 2; stroke-linejoin: round; }
.chart .pt { fill: var(--good); stroke: #fff; stroke-width: 2; }
.chart .tick { fill: var(--dim); font: 11.5px Outfit, system-ui, sans-serif; }
.legend { margin: 4px 0 0; font-size: 13.5px; color: var(--dim); }
.cost div { display: flex; justify-content: space-between; padding: 6px 0; border-top: 1px solid var(--soft); }
.cost div:first-of-type { border-top: 0; }
.job { padding: 14px 20px; font-size: 15.5px; }
.job p { margin: 4px 0; }
.job .never { color: var(--never); }

/* ---------------------------------------------------------------- what an agent asks: one question beside its document */
.needs { padding: 18px 22px; }
.needs .sub { color: var(--dim); font-size: 14.5px; margin: 2px 0 12px; }
.queue { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 22px; align-items: start; }
.doc { border: 1px solid var(--line); border-radius: 12px; background: #fbf9f4; padding: 12px; }
.doc iframe, .doc img { display: block; width: 100%; height: 420px; border: 1px solid #e3ddd0; border-radius: 6px; background: #fff; object-fit: contain; }
.doc.none { display: grid; place-items: center; min-height: 160px; }
.doc-foot { display: flex; justify-content: space-between; gap: 12px; margin: 10px 2px 0; font-size: 14px; color: var(--dim); }
.doc-foot a, .doc-more a { color: var(--ink); text-underline-offset: 3px; }
.doc-more { margin: 4px 2px 0; font-size: 14px; color: var(--dim); }
.q h3 { margin: 0 0 4px; font-size: 18px; font-weight: 600; }
.q .what { color: var(--dim); font-size: 15px; margin: 0 0 10px; }
.q .claim { margin: 0 0 10px; font-size: 16px; font-weight: 600; }
.step { display: flex; justify-content: space-between; align-items: center; gap: 12px; font-size: 14.5px; color: var(--dim); margin: 0 0 10px; }
.step b { color: var(--ink); }
.link-btn { background: none; border: 0; padding: 0; color: var(--ink); text-decoration: underline; text-underline-offset: 3px; cursor: pointer; font-size: 15px; }
.facts { display: grid; grid-template-columns: max-content minmax(0, 1fr); gap: 6px 16px; margin: 0 0 14px; padding: 12px 14px;
  border: 1px solid var(--line); border-radius: 10px; font-size: 15px; }
.facts dt { color: var(--dim); }
.facts dd { margin: 0; font-variant-numeric: tabular-nums; }
.choices { display: grid; gap: 8px; margin-bottom: 4px; }
.ch { display: grid; grid-template-columns: 22px minmax(0, 1fr); gap: 10px; align-items: start; padding: 10px 12px;
  border: 1px solid var(--line); border-radius: 10px; font-size: 15px; cursor: pointer; }
.ch:has(input:checked) { border: 2px solid var(--ink); padding: 9px 11px; }
.ch input { width: 18px; height: 18px; margin: 2px 0 0; accent-color: var(--ink); }
.ch small { display: block; color: var(--dim); font-size: 13.5px; }
.acts { display: flex; align-items: center; gap: 12px 16px; flex-wrap: wrap; margin-top: 12px; }
.btn.dark { background: var(--ink); color: #fff; text-decoration: none; display: inline-block; }
.btn.dark:hover { background: #0b211c; }
.acts .btn { font-size: 15px; padding: 8px 16px; }
.msg { min-height: 1.4em; margin: 8px 0 0; font-size: 14.5px; color: var(--mid); }
.msg.bad, .bad { color: var(--never); font-weight: 600; }
.prog { height: 8px; background: #ece5d6; border-radius: 8px; overflow: hidden; margin: 16px 0 4px; }
.prog b { display: block; height: 100%; background: var(--good); border-radius: 8px; }
.more { margin: 4px 0 0; font-size: 14px; color: var(--dim); }

/* ---------------------------------------------------------------- one agent's day */
.dayhead { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; margin: 8px 0 14px; }
.days { display: flex; gap: 4px; flex-wrap: wrap; }
.days a { display: grid; justify-items: center; padding: 4px 10px; border-radius: 8px; text-decoration: none; color: var(--mid); font-size: 14.5px; line-height: 1.25; }
.days a small { font-size: 12px; color: var(--dim); }
.days a:hover { background: var(--soft); }
.days a.on { background: var(--ink); color: var(--cream); font-weight: 600; }
.days a.on small { color: var(--band-text); }
.track.tall { height: 96px; }
.track .closed { position: absolute; top: 0; bottom: 0; background: #ebe3d3; }
.mk.hid { opacity: 0 !important; }
.replay-wrap { position: relative; padding-bottom: 4px; }
.replay-clock { position: absolute; bottom: -22px; transform: translateX(-50%); margin: 0; font-size: 13px; font-weight: 600; color: var(--ink); white-space: nowrap; }
.panel .legend { margin-top: 12px; }
.fixed li::before { background: var(--good-soft); }

/* ---------------------------------------------------------------- narrower screens */
@media (max-width: 1000px) {
  .row { grid-template-columns: minmax(0, 1fr) 170px 300px 90px; }
  .c-open { display: none; }
  .row.th span:last-child { display: none; }
  .cols, .queue { grid-template-columns: minmax(0, 1fr); }
  .side { order: -1; }
  .doc iframe, .doc img { height: 320px; }   /* what waits on you comes first */
}
@media (max-width: 760px) {
  .in { padding-inline: 16px; }
  .who .me { display: none; }
  .band { padding-bottom: 40px; }
  .nums { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; width: 100%; }
  .nums div { min-width: 0; }
  .nums b { font-size: 27px; }
  .nums span { font-size: 13px; }
  .today { padding: 14px 14px 12px; }
  .hours span.odd { display: none; }
  .row.th { display: none; }
  .row { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 10px 16px; padding: 16px; }
  .c-name { grid-column: 1 / -1; }
  .c-bars svg { width: 100%; height: auto; }
  .c-std { grid-template-columns: minmax(0, 1fr); }
  .c-std svg { grid-row: auto; width: 100%; max-width: 150px; }
  .c-cost { grid-column: 1 / -1; display: flex; gap: 8px; align-items: baseline; }
  .row em { display: block; }
}

/* ---------------------------------------------------------------- Warden's home: a row per client */
.wait-link { text-decoration: none; display: block; }
.wait-link:hover span { text-decoration: underline; text-underline-offset: 3px; }
.clients { overflow: hidden; }
.cl { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1.6fr) 96px 150px 120px 150px; gap: 20px;
  align-items: center; padding: 16px 24px; border-top: 1px solid var(--soft); font-size: 15px; font-variant-numeric: tabular-nums; }
.cl.th { border-top: 0; padding-block: 11px; font-size: 13.5px; font-weight: 600; color: var(--dim); background: var(--head);
  border-bottom: 1px solid var(--soft); }
.cl.th + .cl { border-top: 0; }
.cl-name b { display: block; font-size: 18px; font-weight: 600; }
.cl-name small { display: block; font-size: 13.5px; color: var(--dim); }
.cl-name small.late { color: var(--wait-ink); font-weight: 600; }
.cl .n { font-size: 17px; font-weight: 600; }
.cl .n.w { color: var(--wait-ink); }
.cl .go { text-align: right; }
.cl em { display: none; font-style: normal; font-size: 13px; font-weight: 400; color: var(--dim); }
.pad { padding: 16px 24px; margin: 0; }
@media (max-width: 1000px) {
  .cl { grid-template-columns: minmax(0, 1.2fr) minmax(0, 1.3fr) 80px 120px 100px 140px; gap: 14px; }
}
@media (max-width: 760px) {
  .cl.th { display: none; }
  .cl { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px 16px; padding: 16px; align-items: start; }
  .cl-name, .cl > div:nth-child(2), .cl .go { grid-column: 1 / -1; }
  .cl .go { text-align: left; }
  .cl em { display: block; margin-top: 2px; }
  .pad { padding: 16px; }
}

/* ---------------------------------------------------------------- the sign-in page */
.sign { max-width: 420px; margin: 0 auto; padding: calc(56px + env(safe-area-inset-top, 0px)) 20px 40px; }
.sign .brand { margin-bottom: 30px; font-size: 18px; color: var(--ink); }
.sign h1 { font-size: 30px; line-height: 1.15; letter-spacing: -.015em; margin: 0 0 8px; }
.lede { color: var(--mid); margin: 0 0 22px; }
.devname { display: grid; gap: 6px; font-size: 14px; font-weight: 600; margin-bottom: 16px; }
.devname input { font: inherit; font-weight: 400; padding: 9px 12px; border: 1.5px solid #c9bfa8; border-radius: 8px; background: #fff; color: var(--ink); }
.devname input:focus { outline: 2px solid var(--ink); outline-offset: 1px; }
.btn { border: 1.5px solid var(--ink); background: #fff; color: var(--ink); border-radius: 8px; padding: 6px 13px; font-weight: 600; font-size: 14px; cursor: pointer; }
.btn.big { width: 100%; padding: 12px 16px; font-size: 16px; background: var(--ink); color: #fff; }
.btn.big:hover { background: #0b211c; }
.btn.big:disabled { opacity: .55; cursor: default; }
.msg { min-height: 1.6em; margin: 14px 0 0; font-size: 15px; color: var(--mid); }
.msg.bad { color: var(--never); font-weight: 600; }
.help { margin-top: 40px; font-size: 14px; color: var(--dim); }
.addr { user-select: all; color: var(--ink); }
