/* Made for a phone held in one hand, in a stable, at night. Everything a carer taps is at least 56px high and the
   main action sits at the bottom, under the thumb. Wider screens get the same page with more room.
   Solio's own colours and fonts (olive, sage, khaki, cream; The Seasons and Lato). Rust is the only loud colour
   and is kept for what needs attention: critical, late, over a limit. */
@font-face { font-family: "The Seasons"; src: url(fonts/seasons-regular.woff2) format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: Lato; src: url(fonts/lato-400.woff2) format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: Lato; src: url(fonts/lato-700.woff2) format("woff2"); font-weight: 700; font-display: swap; }
:root {
  --olive: #4a533b; --olive-deep: #343b29; --sage: #69795f; --khaki: #bdbba2; --cream: #e3dec4;
  --paper: #f6f3e8; --card: #fbf9f1; --paper-2: #ebe6d2; --line: #d6d1b8;
  --ink: #262b1f; --ink-2: #4a533b; --ink-3: #62684f; --rust: #8f3a1c; --rust-paper: #f6e9df; --field: #fff;
  --serif: "The Seasons", "Iowan Old Style", Georgia, serif; --sans: Lato, "Helvetica Neue", Arial, sans-serif;
}
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--paper); color: var(--ink); font: 400 1.0625rem/1.5 var(--sans); -webkit-tap-highlight-color: transparent; }
h1, h2 { font-family: var(--serif); font-weight: 400; line-height: 1.15; margin: 0; }
h1 { font-size: clamp(1.75rem, 4vw, 2.5rem); } h2 { font-size: 1.375rem; margin-bottom: 12px; }
h3 { font: 700 1.0625rem/1.3 var(--sans); margin: 16px 0 8px; }
p { margin: 0 0 12px; } a { color: inherit; text-underline-offset: 3px; } ul { margin: 0; padding: 0; list-style: none; }
:focus-visible { outline: 3px solid var(--ink); outline-offset: 2px; border-radius: 2px; }
.top :focus-visible { outline-color: var(--cream); }
.small { font-size: .9375rem; color: var(--ink-3); } .num { font-variant-numeric: tabular-nums; white-space: nowrap; }
.late { color: var(--rust); font-weight: 700; }
.wrap { max-width: 720px; margin-inline: auto; padding: 16px 16px 128px; }

.top { background: var(--olive); color: var(--cream); padding-top: env(safe-area-inset-top); }
.top .in { max-width: 720px; margin-inline: auto; padding: 4px 16px; display: flex; align-items: center; gap: 12px; }
.brand { font-family: var(--serif); font-size: 1.25rem; text-decoration: none; min-height: 48px; display: flex; align-items: center; margin-right: auto; white-space: nowrap; }
.top select { width: auto; max-width: 48vw; min-height: 44px; }
.demo { background: var(--paper-2); border-bottom: 1px solid var(--line); margin: 0; padding: 4px 16px; font-size: .875rem; text-align: center; }

.button, button { font: 700 1.0625rem/1.2 var(--sans); min-height: 48px; padding: 8px 16px; border-radius: 4px; border: 1px solid var(--olive); background: var(--card); color: var(--olive); cursor: pointer; transition: background-color .15s, color .15s; text-decoration: none; display: inline-flex; align-items: center; justify-content: center; text-align: center; }
button:hover, .button:hover { background: var(--paper-2); } button:active { background: var(--khaki); }
button.main { background: var(--olive); color: var(--cream); min-height: 56px; padding: 12px 24px; } button.main:hover { background: var(--olive-deep); }
button.plain { border-color: transparent; background: none; text-decoration: underline; font-weight: 400; padding: 8px; min-height: 44px; }
input, select, textarea { font: 400 1.0625rem/1.3 var(--sans); min-height: 48px; padding: 8px 12px; border: 1px solid var(--sage); border-radius: 4px; background: var(--field); color: var(--ink); width: 100%; }
input.big { font-size: 1.75rem; font-weight: 700; min-height: 64px; text-align: center; }
textarea { min-height: 96px; resize: vertical; }
label, legend { display: block; font-weight: 700; padding: 0; } label .small { font-weight: 400; }
label > input:not([type=checkbox]), label > select, label > textarea { display: block; margin-top: 4px; }
fieldset { border: 0; margin: 0; padding: 0; min-width: 0; } legend { margin-bottom: 8px; }
.field { margin-bottom: 16px; } .row { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 0 16px; align-items: end; }
.tick { display: flex; gap: 12px; align-items: center; min-height: 48px; font-weight: 400; margin-bottom: 8px; } .tick input { width: 24px; min-height: 24px; height: 24px; accent-color: var(--olive); flex: none; }
.error { color: var(--rust); font-weight: 700; margin: 0 0 12px; } .error:empty { display: none; }
/* big answers to tap, in place of typing or a drop-down */
.choices { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: 8px; margin-bottom: 16px; }
.choices label, .choices button { position: relative; display: flex; align-items: center; justify-content: center; min-height: 56px; padding: 8px; border: 1px solid var(--olive); border-radius: 4px; background: var(--card); color: var(--olive); font-weight: 700; text-align: center; cursor: pointer; }
.choices input { position: absolute; inset: 0; width: 100%; height: 100%; min-height: 0; margin: 0; opacity: 0; cursor: pointer; }
.choices label:has(input:checked), .choices button[aria-pressed=true] { background: var(--olive); color: var(--cream); }
.choices label:has(input:focus-visible) { outline: 3px solid var(--ink); outline-offset: 2px; }
details { margin-bottom: 12px; } summary { min-height: 48px; display: flex; align-items: center; cursor: pointer; text-decoration: underline; text-underline-offset: 3px; color: var(--ink-2); list-style: none; } summary::-webkit-details-marker { display: none; }
details[open] > summary { text-decoration: none; font-weight: 700; }
details.card > summary { font-family: var(--serif); font-size: 1.375rem; color: var(--ink); text-decoration: none; justify-content: space-between; font-weight: 400; } details.card > summary::after { content: "Show"; font: 400 .9375rem var(--sans); text-decoration: underline; color: var(--ink-2); } details.card[open] > summary::after { content: "Hide"; }
details.card:not([open]) { padding-block: 4px; }

.card { background: var(--card); border: 1px solid var(--line); border-radius: 8px; padding: 16px; margin-bottom: 16px; }
.head { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; margin-bottom: 4px; } .head h2 { margin: 0; }
.title { margin: 8px 0 16px; } .title p { margin: 0; } .back { display: inline-flex; align-items: center; min-height: 48px; }
.actions { display: flex; flex-wrap: wrap; gap: 8px; margin: 8px 0 0; } .actions > * { flex: 1 1 140px; }
.chip { display: inline-block; padding: 2px 8px; border-radius: 4px; font: 700 .875rem/1.4 var(--sans); border: 1px solid var(--sage); white-space: nowrap; }
.chip.critical { background: var(--rust); border-color: var(--rust); color: var(--card); } .chip.watch { border-color: var(--ink); background: var(--cream); }
a.animal { display: block; text-decoration: none; transition: border-color .15s; } a.animal:hover { border-color: var(--sage); } a.animal p { margin-bottom: 4px; }
/* an alert: rust and the word "Urgent" until someone has seen it, quiet after that and for things only to watch */
.alerts li { border-left: 4px solid var(--khaki); background: var(--paper-2); padding: 8px 12px; border-radius: 0 4px 4px 0; margin-top: 8px; } .alerts li:first-child { margin-top: 0; }
.alerts li.urgent { border-left-color: var(--rust); background: var(--rust-paper); } .alerts li.urgent > div > b:first-child { color: var(--rust); }
.alerts li > div > a, .rec .txt > a { display: inline-flex; align-items: center; min-height: 44px; }
.shift h2 { font: 700 1.0625rem/1.3 var(--sans); margin: 0 0 4px; } dl.stack { display: block; } dl.stack dt { font-weight: 700; color: var(--ink); } dl.stack dd { margin-bottom: 12px; }
.shift { background: var(--paper-2); } .shift p { margin: 0; }
/* what is due: the time leads, lateness is said in words as well as colour, the button is under the thumb */
.due li { display: grid; grid-template-columns: 56px 1fr auto; gap: 4px 12px; align-items: center; min-height: 64px; padding: 8px 0; border-top: 1px solid var(--line); } .due li:first-child { border-top: 0; }
.due b.num { font-size: 1.25rem; } .due .what { text-decoration: none; display: block; min-width: 0; } .due a.what b { text-decoration: underline; text-underline-offset: 3px; } .due .what span { display: block; }
.due button { min-width: 72px; min-height: 56px; }
.tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 8px; margin-bottom: 16px; }
.tile { background: var(--card); border: 1px solid var(--line); border-radius: 8px; padding: 12px; } .tile b { display: block; font-size: 1.375rem; line-height: 1.25; } .tile span { display: block; color: var(--ink-3); font-size: .875rem; } .tile.bad { border-color: var(--rust); } .tile.bad b { color: var(--rust); }
.pick { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; } .pick button { min-height: 64px; }
svg { display: block; width: 100%; height: auto; margin-bottom: 16px; } svg text { font: 12px var(--sans); fill: var(--ink-3); }
.rec li { display: grid; grid-template-columns: 56px 1fr; gap: 0 12px; padding: 8px 0; border-top: 1px solid var(--line); } .rec li.day { display: block; font-weight: 700; color: var(--ink-2); border-top: 0; padding-top: 16px; } .rec li.day:first-child { padding-top: 0; }
.rec li.void .txt { color: var(--ink-3); text-decoration: line-through; } .rec .by { display: flex; flex-wrap: wrap; align-items: center; gap: 0 12px; } .rec button { margin: 0 0 0 -8px; font-size: .9375rem; }
.scroll { overflow-x: auto; } table { border-collapse: collapse; width: 100%; font-size: .9375rem; } th, td { padding: 8px 12px 8px 0; text-align: left; vertical-align: top; border-bottom: 1px solid var(--line); } thead th { white-space: nowrap; } td.y { font-weight: 700; } td.n { color: var(--ink-3); }
.people li { display: grid; grid-template-columns: 1fr minmax(140px, 180px); gap: 12px; align-items: center; padding: 8px 0; border-top: 1px solid var(--line); } .people li:first-child { border-top: 0; }
dl { display: grid; grid-template-columns: auto 1fr; gap: 4px 16px; margin: 0 0 12px; } dt { color: var(--ink-3); } dd { margin: 0; }
.share { min-height: 320px; font-size: .9375rem; }

/* the main action, fixed under the thumb */
.bar { position: fixed; left: 0; right: 0; bottom: 0; background: var(--paper); border-top: 1px solid var(--line); padding: 8px 16px calc(8px + env(safe-area-inset-bottom)); } .bar button { width: 100%; max-width: 688px; display: flex; margin-inline: auto; }
#toast { position: fixed; left: 16px; right: 16px; bottom: calc(88px + env(safe-area-inset-bottom)); max-width: 688px; margin: 0 auto; background: var(--ink); color: var(--paper); padding: 12px 16px; border-radius: 4px; font-weight: 700; text-align: center; transition: opacity .2s; display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 8px 12px; } #toast:empty { opacity: 0; pointer-events: none; }
#toast span { flex: 1 1 200px; } #toast button { background: none; color: inherit; border-color: currentColor; min-height: 44px; }
dialog { border: 1px solid var(--line); border-radius: 8px; padding: 24px 16px; width: min(560px, 100vw); max-width: 100vw; max-height: calc(100dvh - 16px); background: var(--paper); color: var(--ink); }
dialog::backdrop { background: #262b1f; opacity: .5; } dialog h2 { margin-bottom: 16px; } dialog .actions { position: sticky; bottom: -24px; background: var(--paper); padding: 8px 0 calc(8px + env(safe-area-inset-bottom)); margin-bottom: -24px; }
/* on a phone a form comes up from the bottom, so its buttons are where the thumb already is */
@media (max-width: 600px) { dialog { margin: auto 0 0; width: 100vw; border-radius: 12px 12px 0 0; border-width: 1px 0 0; max-height: 92dvh; } }
/* a dark stable at night: the phone's own dark setting turns the page dark, so it does not light up the stall */
@media screen and (prefers-color-scheme: dark) {
  :root { --olive: #b7c2a0; --olive-deep: #cdd6ba; --sage: #8c9a80; --khaki: #4a5140; --cream: #1b1f15;
    --paper: #14170f; --card: #1d2117; --paper-2: #262b1e; --line: #3a4030; --field: #262b1e;
    --ink: #ece8d6; --ink-2: #c9cfb8; --ink-3: #a3a88f; --rust: #f0936c; --rust-paper: #3a2118; }
  .top { background: #222719; color: #e3dec4; } .top :focus-visible { outline-color: #e3dec4; }
}
@media print { .top, .demo, .bar, #toast, button, .button, .back, .noprint { display: none !important; } body { background: #fff; } .card, .tile { border-color: #999; break-inside: avoid; background: #fff; } .wrap { padding: 0; max-width: none; } }
@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }
/* chart colours: classes, because the site's headers forbid inline styles */
.s-rust{stroke:var(--rust)}.s-line{stroke:var(--line)}.s-olive{stroke:var(--olive)}
.f-rust{fill:var(--rust)}.f-olive{fill:var(--olive)}.f-ink{fill:var(--ink)}
.t-end{font-weight:700}.bar-off{fill:var(--paper-2);stroke:var(--khaki)}
