/* The whole site's styles, written by hand: there is no build step. Elements are styled directly where they can be, and the classes below name things on the page (a card, a meal, an item) rather than how they look. */
:root {
    --paper: #fbfaf7;
    --card: #ffffff;
    --tint: #f6f5f1;
    --text: #1f2933;
    --muted: #667085;
    --line: #e4e2dc;
    --primary: #2563eb;
    --primary-dark: #1d4ed8;
    --primary-tint: #eff6ff;
    --good: #15803d;
    --good-tint: #f0fdf4;
    --warn: #b45309;
    --warn-tint: #fffbeb;
    --danger: #dc2626;
    --danger-tint: #fef2f2;
    --radius: 8px;
    --shadow: 0 1px 3px rgba(31, 41, 51, 0.12);
    --shadow-lifted: 0 10px 24px rgba(31, 41, 51, 0.16);
}

* { box-sizing: border-box; }

body {
    margin: 0;
    min-height: 100vh;
    color: var(--text);
    background: linear-gradient(rgba(255, 255, 255, 0.7), rgba(255, 255, 255, 0.7)), url('/Images/Paper1.webp') var(--paper);
    font: 16px/1.5 'Libre Baskerville', Georgia, serif;
}

a { color: var(--primary); text-decoration: none; }

a:hover { color: var(--primary-dark); }

h1, h2, h3, p { margin: 0; }

h1 { font-size: 1.85rem; margin-bottom: 1.5rem; }

h2 { font-size: 1.15rem; }

h3 { font-size: 1rem; }

img, video { display: block; max-width: 100%; }

[hidden] { display: none !important; }

/* Forms */

label { display: block; margin-bottom: 4px; font-size: 0.875rem; font-weight: 700; color: #3d4852; }

input[type=text], input[type=email], input[type=password], select, textarea {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid #cfd4dc;
    border-radius: 4px;
    background: var(--card);
    color: var(--text);
    font: inherit;
}

textarea { resize: vertical; }

input:focus, select:focus, textarea:focus, button:focus-visible, .button:focus-visible { outline: 2px solid var(--primary); outline-offset: 1px; }

input[type=range] { width: 100%; accent-color: var(--primary); }

input[type=checkbox] { width: 1.1rem; height: 1.1rem; accent-color: var(--primary); }

.field { margin-bottom: 1rem; }

.check { display: flex; align-items: center; gap: 8px; margin: 0; font-weight: 400; cursor: pointer; }

button, .button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 8px 16px;
    border: 1px solid #cfd4dc;
    border-radius: 4px;
    background: var(--card);
    color: var(--text);
    font: inherit;
    font-weight: 700;
    cursor: pointer;
    transition: background 0.15s, color 0.15s;
}

button:hover, .button:hover { background: var(--tint); color: var(--text); }

button:disabled { opacity: 0.55; cursor: default; }

.primary { border-color: var(--primary); background: var(--primary); color: #fff; }

.primary:hover { background: var(--primary-dark); color: #fff; }

.danger-outline { border-color: #fca5a5; color: var(--danger); }

.danger-outline:hover { background: var(--danger-tint); color: var(--danger); }

.wide { width: 100%; }

/* A bare icon that acts as a button, such as a row's delete. */
.icon { padding: 6px 8px; border: none; background: none; color: var(--muted); }

.icon:hover { background: var(--tint); }

.icon.good { color: var(--good); }

.icon.danger { color: var(--danger); }

.icon.danger:hover { background: var(--danger-tint); color: var(--danger); }

/* Layout */

.bar { position: sticky; top: 0; z-index: 10; background: var(--card); box-shadow: var(--shadow); }

.bar > div { display: flex; align-items: center; gap: 8px; max-width: 80rem; margin: 0 auto; padding: 12px 16px; }

.brand { display: flex; align-items: center; gap: 8px; color: var(--text); font-weight: 700; font-size: 1.1rem; }

.brand img { width: 24px; height: 24px; }

.bar nav { display: flex; gap: 2px; }

.bar nav a { display: flex; align-items: center; gap: 6px; padding: 8px 12px; border-radius: 6px; color: #3d4852; font-size: 0.875rem; font-weight: 700; }

.bar nav a:hover { background: var(--tint); color: var(--primary); }

/* On a phone the brand and the links keep their icons and give up their words. */
@media (max-width: 900px) {
    .bar nav span, .brand span { display: none; }

    .bar nav a { font-size: 1.15rem; }
}

.page { max-width: 80rem; margin: 0 auto; padding: 24px 16px 48px; }

.page.narrow { max-width: 30rem; }

.page.narrow h1 { text-align: center; }

/* A document to read, such as the privacy policy and terms (#286), at a line length that reads well, with room between its parts. */
.page.document { max-width: 44rem; line-height: 1.6; }

.document h2 { margin: 2rem 0 0.5rem; }

.document p, .document ul { margin: 0 0 0.75rem; }

.document ul { padding-left: 1.25rem; }

.document li + li { margin-top: 0.35rem; }

/* The links to the privacy policy and terms at the foot of every page, a Welcome page's included. */
.site-footer { display: flex; justify-content: center; gap: 1.5rem; padding: 8px 16px 32px; font-size: 0.875rem; }

.site-footer a { color: var(--muted); }

.site-footer a:hover { color: var(--primary); }

.row { display: flex; align-items: center; gap: 8px; }

.row.wrap { flex-wrap: wrap; }

.spacer { flex: 1; }

.stack > * + * { margin-top: 1rem; }

.columns { display: grid; gap: 24px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 24rem), 1fr)); }

.muted { color: var(--muted); }

.small { font-size: 0.875rem; }

.center { text-align: center; }

/* Card: a titled box. <section class="card"><header>…</header><div>…</div></section> */

.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; }

.card > header { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 20px; background: var(--tint); border-bottom: 1px solid var(--line); }

.card > div { padding: 20px; }

.card + .card { margin-top: 24px; }

.alert { padding: 12px 16px; border: 1px solid; border-radius: var(--radius); margin-bottom: 1rem; }

.alert.info { background: var(--primary-tint); border-color: #bfdbfe; color: #1e40af; }

.alert.good { background: var(--good-tint); border-color: #bbf7d0; color: #166534; }

.alert.warn { background: var(--warn-tint); border-color: #fde68a; color: #92400e; }

.alert.danger { background: var(--danger-tint); border-color: #fecaca; color: #991b1b; }

.badge { display: inline-flex; align-items: center; padding: 1px 10px; border-radius: 999px; background: #eef0f3; color: #3d4852; font-size: 0.75rem; font-weight: 700; white-space: nowrap; }

.badge.blue { background: #dbeafe; color: #1e40af; }

.badge.amber { background: #fef3c7; color: #92400e; }

.badge.red { background: #fee2e2; color: #991b1b; }

.badge.green { background: #dcfce7; color: #166534; }

details > summary { cursor: pointer; color: var(--primary); font-weight: 700; }

details[open] > summary { margin-bottom: 12px; }

/* Shown while an htmx request from the element named by hx-indicator is in flight. */
.htmx-indicator { font-weight: 400; }

/* An app's conversation on the home page, phone first: the person's words on the right, the app's on the left, cards that scroll sideways, and the box to talk in fixed at the bottom. Room is left below everything for that box, and for a phone's home indicator. */

.talk { max-width: 46rem; margin: 0 auto; padding: 16px 16px calc(6rem + env(safe-area-inset-bottom)); }

.talk .models { display: flex; justify-content: flex-end; margin-bottom: 12px; }

.talk .models select { width: auto; padding: 4px 8px; font-size: 0.8rem; }

.greeting { margin: 8px 0 20px; color: var(--muted); }

/* Under the greeting of a site with a film of a conversation with it, the way to it, for someone unsure what to say. */
.greeting-help { margin: -12px 0 20px; font-size: 0.9rem; font-weight: 700; }

/* What the stream adds to is kept above the box when it scrolls into view. */
.turn, .turn > * { scroll-margin-bottom: calc(5.5rem + env(safe-area-inset-bottom)); }

.turn { display: flex; flex-direction: column; align-items: flex-start; gap: 10px; margin-bottom: 22px; }

.said, .reply { max-width: 88%; padding: 8px 14px; white-space: pre-wrap; overflow-wrap: anywhere; }

.said { align-self: flex-end; border-radius: 18px 18px 4px 18px; background: var(--primary); color: #fff; }

.reply { border: 1px solid var(--line); border-radius: 18px 18px 18px 4px; background: var(--card); }

.turn > .note { color: var(--muted); font-size: 0.875rem; }

.stats { color: var(--muted); font: 0.75rem/1.4 -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif; }

/* What was heard and recorded, and any question about which item was meant. */
.heard { align-self: stretch; padding: 10px 14px; border-left: 3px solid var(--good); border-radius: var(--radius); background: var(--good-tint); font-size: 0.9rem; }

.heard ul { margin: 0; padding-left: 1.1rem; }

.heard ul:empty { display: none; }

/* Words being heard behind the reply that answered them (#274): the box of what was heard, with three dots that pulse in turn until it shows what was recorded. */
.heard.hearing { display: flex; gap: 5px; align-self: flex-start; }

.heard.hearing span { width: 7px; height: 7px; border-radius: 50%; background: var(--good); animation: pulse 1.2s infinite ease-in-out; }

.heard.hearing span:nth-child(2) { animation-delay: 0.2s; }

.heard.hearing span:nth-child(3) { animation-delay: 0.4s; }

.question { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 8px; }

/* What happened in the person's space outside the conversation (Legato step 6b): someone else's cart as they shop, or whose trip ended, over what it recorded. */
.news { align-self: stretch; color: var(--muted); font-size: 0.875rem; }

.news p { margin: 0; }

.news ul { margin: 4px 0 0; padding-left: 1.1rem; }

/* An app's cards, drawn from what each declares it shows (v2 §4.8). They run off the edge of a phone's screen, so a swipe shows the next. */
.cards { display: flex; gap: 12px; align-self: stretch; margin: 0 -16px; padding: 2px 16px 10px; overflow-x: auto; scroll-snap-type: x mandatory; scroll-padding-inline: 16px; }

.cards > article { display: flex; flex: 0 0 min(85%, 19rem); flex-direction: column; gap: 8px; padding: 14px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--card); box-shadow: var(--shadow); scroll-snap-align: start; }

.cards > article > p { font-size: 0.9rem; }

.cards .label { display: block; color: var(--muted); font-size: 0.75rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.04em; }

.cards .list { font-size: 0.875rem; }

.cards .list.warn .label { color: var(--warn); }

.cards > article > button { margin-top: auto; }

.made { width: min(100%, 19rem); }

/* Three dots that pulse in turn while the app answers. */
.answering { display: flex; gap: 5px; margin: -8px 0 0 4px; }

.answering span { width: 7px; height: 7px; border-radius: 50%; background: var(--muted); animation: pulse 1.2s infinite ease-in-out; }

.answering span:nth-child(2) { animation-delay: 0.2s; }

.answering span:nth-child(3) { animation-delay: 0.4s; }

@keyframes pulse { 0%, 80%, 100% { opacity: 0.25; } 40% { opacity: 1; } }

.composer { position: fixed; right: 0; bottom: 0; left: 0; z-index: 10; padding: 10px 16px calc(10px + env(safe-area-inset-bottom)); background: var(--card); box-shadow: 0 -1px 3px rgba(31, 41, 51, 0.12); }

.composer > div { display: flex; align-items: center; gap: 8px; max-width: 46rem; margin: 0 auto; }

.composer fieldset { display: flex; flex: 1; align-items: center; gap: 8px; min-width: 0; margin: 0; padding: 0; border: none; }

.composer input { flex: 1; min-width: 0; border-radius: 20px; padding: 10px 16px; }

.composer .primary { padding: 10px 14px; border-radius: 20px; }

/* Voice (#205 step 5): a big mic in the send button's place while the box is empty, red and pulsing while it listens, and the speaker's switch, blue while it is on. */
.composer .mic { width: 3rem; height: 3rem; padding: 0; border-radius: 50%; font-size: 1.3rem; }

.composer.hears:not(.typed) [type=submit], .composer.hears.typed:not(.listening) .mic { display: none; }

.composer.listening .mic { border-color: var(--danger); background: var(--danger); animation: listening 1.2s infinite; }

@keyframes listening { 0% { box-shadow: 0 0 0 0 rgba(220, 38, 38, 0.45); } 100% { box-shadow: 0 0 0 12px rgba(220, 38, 38, 0); } }

.speaker[aria-pressed=true] { color: var(--primary); }

/* Entity: a card of something a job made, such as a meal or a recipe, in the grid of a page an app lists and in the conversation that made it. */

.entities { display: grid; gap: 28px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 18rem), 1fr)); }

.entity { display: flex; flex-direction: column; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; transition: box-shadow 0.25s, transform 0.25s; }

.entity:hover { box-shadow: var(--shadow-lifted); transform: translateY(-3px); }

.entity .media { position: relative; display: block; aspect-ratio: 3 / 2; background: var(--tint); }

.entity .media img, .entity .media video { width: 100%; height: 100%; object-fit: cover; }

.entity .media .badge { position: absolute; top: 8px; right: 8px; padding: 4px 10px; }

.entity .failed { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px; height: 100%; padding: 16px; background: var(--danger-tint); color: #991b1b; text-align: center; }

.entity .about { display: flex; flex-direction: column; flex: 1; gap: 10px; padding: 12px; }

.entity h3 { flex: 1; color: var(--text); }

@keyframes spin { to { transform: rotate(360deg); } }

.spin { display: inline-block; animation: spin 1.4s linear infinite; }

/* An app's checklist, such as the shopping list: a box that adds, then a row per thing, each with a box to check it off and a cross to take it off, then what is checked off, struck through, and Done. Made for a phone in a shop, so every tap target is large. */
.checklist { max-width: 36rem; }

.checklist .add { display: flex; gap: 8px; margin-bottom: 1rem; }

.checklist .rows { margin: 0 0 1rem; padding: 0; list-style: none; }

.checklist .rows li { display: flex; align-items: center; gap: 4px; min-height: 3rem; border-bottom: 1px solid var(--line); }

.checklist .rows li > span { flex: 1; overflow-wrap: anywhere; }

.checklist .rows .box { font-size: 1.35rem; padding: 8px 10px; }

.checklist .got li > span { color: var(--muted); text-decoration: line-through; }

.checklist .got .box { color: var(--good); }

/* What someone else got shows who, and isn't the person's to uncheck. */
.checklist .got li > .box, .checklist .got li > .who { flex: none; text-decoration: none; }

.checklist .got li > .who { padding-right: 10px; font-size: 0.875rem; }

/* The offer to put the site on the home screen, over the list, once someone has joined it (#267). */
.home-screen { display: flex; gap: 12px; margin-bottom: 1rem; padding: 12px 14px; border-radius: var(--radius); background: var(--tint); }

.home-screen > i { color: var(--primary); font-size: 1.5rem; }

.home-screen > div { flex: 1; }

.home-screen p + p { margin-top: 4px; }

.home-screen .row { margin-top: 10px; }

/* Sharing the list, under it (Legato step 6b). */
.checklist .share { margin-top: 2rem; }

.checklist h2 { margin: 1.5rem 0 0.25rem; color: var(--muted); font-size: 0.875rem; text-transform: uppercase; letter-spacing: 0.04em; }

.checklist .dropped { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 0.5rem; padding: 4px 4px 4px 12px; border-radius: var(--radius); background: var(--tint); }

.checklist .dropped .icon { color: var(--primary); font-weight: 700; }

/* Who else is in the person's space, on the Account page (Legato step 6b). */
.members { margin: 0; padding: 0; list-style: none; }

.members li { display: flex; align-items: center; justify-content: space-between; gap: 8px; min-height: 2.5rem; }

/* What the person has used of their plan this week, on the Account page, as Claude shows its usage: "This week" and how much is used over the bar, then when it resets and how the week is going under it. */
.usage { padding-top: 1rem; border-top: 1px solid var(--line); }

.usage > .row { justify-content: space-between; align-items: baseline; }

.usage > * + * { margin-top: 6px; }

.usage meter { display: block; width: 100%; }

.usage .warn { color: var(--warn); }

.usage .danger { color: var(--danger); }

/* Welcome: the page for someone who is not signed in. */

.welcome { max-width: 62rem; }

.welcome > section { margin-bottom: 5rem; }

.welcome h1 { font-size: 2.9rem; margin-bottom: 1rem; }

.welcome h2 { font-size: 1.85rem; margin-bottom: 1.25rem; }

.welcome h3 { font-size: 1.2rem; margin-bottom: 0.75rem; }

.welcome p { font-size: 1.1rem; color: #3d4852; }

.welcome .lead { font-size: 1.45rem; color: var(--muted); margin-bottom: 2.5rem; }

/* For someone already signed up, above everything else, since most who come back to a Welcome page come to sign in. */
.welcome .returning { margin: -8px 0 8px; text-align: right; font-size: 0.95rem; font-weight: 700; }

.panel { padding: 2.5rem; border-radius: var(--radius); background: var(--tint); }

.panel.warm { background: linear-gradient(90deg, #fff7ed, #fefce8); }

@media (max-width: 600px) {
    .panel { padding: 1.75rem 1.25rem; }
}

.story { display: grid; gap: 4rem; grid-template-columns: repeat(auto-fit, minmax(min(100%, 22rem), 1fr)); }

.picture { border-radius: var(--radius); box-shadow: var(--shadow-lifted); margin: 0 auto; }

/* A Welcome page's first screen: a few words and the button to start, then the site's clip, which shows in seconds what it is for. On a phone they stack, the button before the clip so it shows without scrolling; wider, the clip stands beside the words. */
.hero { display: flex; flex-direction: column; align-items: center; gap: 2rem; text-align: center; }

.hero .pitch { display: flex; flex-direction: column; align-items: center; gap: 1rem; max-width: 32rem; }

.welcome .hero h1 { margin: 0; font-size: clamp(2.1rem, 8vw, 3.4rem); line-height: 1.15; }

.welcome .hero .lead { margin: 0; font-size: 1.2rem; }

.hero .ticks { margin: 0; }

@media (min-width: 900px) {
    .hero { flex-direction: row; justify-content: center; gap: 5rem; text-align: left; }

    .hero .pitch { align-items: flex-start; }
}

/* The big button a Welcome page sells with, which takes the person to its sign-up form. */
.cta { padding: 14px 32px; border-radius: 999px; font-size: 1.15rem; box-shadow: var(--shadow-lifted); }

/* Beside it, or under a Welcome page's screens, the way to the site's film of a conversation with it (/help). */
.watch { display: inline-flex; align-items: center; gap: 8px; font-size: 1.05rem; font-weight: 700; }

.watch i { font-size: 1.6rem; }

/* A site's clip: phone-shaped, as it was made, playing muted and looping because browsers only start a video by themselves when it is muted. Its button turns the sound on, from the start, so the person hears what is said. */
.clip { position: relative; flex: none; height: min(62vh, 38rem); aspect-ratio: 9 / 16; overflow: hidden; border-radius: 24px; background: #1f2933; box-shadow: var(--shadow-lifted); }

.clip video { width: 100%; height: 100%; object-fit: cover; }

.clip .sound { position: absolute; right: 12px; bottom: 12px; padding: 10px 12px; border: none; border-radius: 999px; background: rgba(17, 24, 39, 0.6); color: #fff; font-size: 1.15rem; }

.clip .sound:hover { background: rgba(17, 24, 39, 0.8); color: #fff; }

.sound[aria-pressed=true] .bi-volume-mute, .sound[aria-pressed=false] .bi-volume-up { display: none; }

/* How a site works, as real screens of it in phone frames, each with a few words under it. On a phone they scroll sideways, one screen at a time, with the next one peeking in. */
.shots { display: flex; gap: 1.25rem; margin: 0 -16px; padding: 0.5rem 16px 1rem; overflow-x: auto; scroll-snap-type: x mandatory; list-style: none; counter-reset: shot; }

.shots li { flex: 0 0 min(68%, 16rem); scroll-snap-align: center; text-align: center; counter-increment: shot; }

.shots img { width: 100%; aspect-ratio: 390 / 844; object-fit: cover; object-position: top; margin-bottom: 1rem; border: 6px solid #1f2933; border-radius: 28px; box-shadow: var(--shadow-lifted); background: var(--card); }

.shots span { font-size: 1.1rem; font-weight: 700; }

.shots span::before { content: counter(shot); display: inline-grid; place-items: center; width: 1.75rem; height: 1.75rem; margin-right: 0.5rem; border-radius: 50%; background: var(--primary); color: #fff; font-size: 0.95rem; }

@media (min-width: 900px) {
    .shots { justify-content: center; margin: 0; padding: 0.5rem 0 1rem; overflow: visible; }
}

/* What else a site does, a few words each, under an icon. */
.perks { display: grid; gap: 1.5rem 1rem; grid-template-columns: repeat(auto-fit, minmax(min(45%, 11rem), 1fr)); margin: 0; padding: 0; list-style: none; text-align: center; font-weight: 700; }

.perks i { display: block; margin-bottom: 0.5rem; color: var(--primary); font-size: 2rem; }

.signup { max-width: 28rem; margin: 0 auto; }

.signup form { text-align: left; margin-top: 1.5rem; }

/* Under the sign-up button: what signing up agrees to, with links to the terms and the privacy policy (#286). */
.welcome .agree { margin-top: 0.75rem; font-size: 0.875rem; color: var(--muted); }

.ticks { display: flex; flex-wrap: wrap; justify-content: center; gap: 0.5rem 1.5rem; margin-top: 1rem; font-size: 0.875rem; color: var(--muted); }

.ticks i { color: var(--good); }

/* Admin */

.tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(10rem, 1fr)); gap: 12px; margin-bottom: 24px; }

.tile { padding: 12px 14px; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); }

.tile .label { font-size: 0.8rem; color: var(--muted); }

.tile .value { font-size: 1.5rem; font-weight: 700; font-variant-numeric: tabular-nums; }

/* A tally that gives each value its own sum (#380), as each person with what they put in: a line apiece under the tile's label. */
.tile .each { display: flex; justify-content: space-between; gap: 12px; margin-top: 4px; font-size: 0.95rem; font-variant-numeric: tabular-nums; }

/* A tally of many values, as a crew of eight with each one's share: the tile is as wide as two, and lists them in two columns. */
.tile.many { grid-column: span 2; columns: 2; column-gap: 28px; }

.tile.many .label { column-span: all; }

.tile.many .each { break-inside: avoid; }

/* A tally whose values take a tap, as who still owes with a button to mark each paid: the name takes the room, and the amount and its button keep to the right. */
.tile.taps { grid-column: span 2; }

.tile.taps .each { align-items: center; }

.tile.taps .each span:first-child { flex: 1; }

.tile.taps .each button { padding: 2px 10px; font-size: 0.85rem; }

.tile.alarm { border-color: var(--danger); }

.tile.alarm .value { color: var(--danger); }

.tableWrap { overflow-x: auto; }

table { width: 100%; border-collapse: collapse; font: 0.875rem/1.4 -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif; }

th, td { padding: 8px 10px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }

th { color: var(--muted); font-weight: 600; white-space: nowrap; }

td.number, th.number { text-align: right; font-variant-numeric: tabular-nums; }

td .error { max-width: 36rem; color: var(--danger); overflow-wrap: anywhere; }

td form { display: inline; }

td.loss { color: var(--danger); }

tr.total td { font-weight: 700; border-bottom: none; }

/* The Admin page's bar (#202), as ESS's admin's: it stays put while the page scrolls, over a chart's tooltip, with the tabs, the range and when the showing tab was read. The tabs scroll sideways within it on a narrow window, and the asides give way. */
.adminBar { position: sticky; top: 0; z-index: 10; display: flex; align-items: center; gap: 12px; padding: 0 16px; background: var(--card); box-shadow: var(--shadow); }

.adminBar .brand { flex-shrink: 0; white-space: nowrap; }

.adminBar select { width: auto; padding: 5px 8px; }

.adminBar .aside { white-space: nowrap; }

@media (max-width: 900px) {
    .adminBar .aside { display: none; }
}

@media (max-width: 600px) {
    .adminBar .brand span { display: none; }
}

.tabs { min-width: 0; }

.tabs [role=tablist] { display: flex; gap: 2px; overflow-x: auto; scrollbar-width: none; }

.tabs [role=tab] { padding: 16px 12px 14px; border: none; border-bottom: 2px solid transparent; border-radius: 0; background: none; color: var(--muted); font-weight: 600; white-space: nowrap; }

.tabs [role=tab]:hover { color: var(--text); background: none; }

.tabs [role=tab][aria-selected=true] { color: var(--text); border-bottom-color: var(--primary); }

.tabs [role=tab]:focus-visible { outline-offset: -2px; }

.admin .page { max-width: 90rem; }

.admin .card { margin-bottom: 24px; }

.admin .card + .card { margin-top: 0; }

.admin .card > header { flex-wrap: wrap; }

.admin .card > header select { width: auto; }

.admin .columns > .card { margin-bottom: 0; }

.admin .columns { margin-bottom: 24px; }

.tile .value.small { font-size: 1.05rem; padding-top: 6px; }

/* The fields the platform's own rule leaves out, as its text fields look. */
.admin input[type=search], .admin input[type=number], .admin input[type=date], .admin input:not([type]) { padding: 8px 12px; border: 1px solid #cfd4dc; border-radius: 4px; background: var(--card); color: var(--text); font: inherit; }

.sectionHead { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 12px; }

.sectionHead input, .sectionHead select { width: auto; min-width: 14rem; }

.inline { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }

.inline input:not([type=number]) { flex: 1; min-width: 12rem; width: auto; }

.inline select { width: auto; }

.empty { margin: 0; padding: 16px; color: var(--muted); text-align: center; font-size: 0.875rem; }

tr.clickable { cursor: pointer; }

tr.clickable:hover td { background: var(--tint); }

.chip { display: inline-block; margin: 1px 4px 1px 0; padding: 1px 8px; border: 1px solid var(--line); border-radius: 999px; font-size: 0.78rem; white-space: nowrap; }

.chip.green { border-color: #86efac; color: var(--good); }

.chip.blue { border-color: #bfdbfe; color: #1e40af; }

.chip.amber, .chip.warn { border-color: #fcd34d; color: var(--warn); }

.chip.red { border-color: #fca5a5; color: var(--danger); }

.chip.muted { color: var(--muted); }

.feed td { vertical-align: middle; }

.feed .when { white-space: nowrap; color: var(--muted); }

/* Someone's page, over the Customers tab, as ESS's admin opens an org. */
.admin dialog { width: min(760px, calc(100vw - 32px)); max-height: calc(100vh - 32px); padding: 20px; background: var(--card); color: var(--text); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow-lifted); }

.admin dialog::backdrop { background: rgba(31, 41, 51, 0.45); }

.dialogHead { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; margin-bottom: 14px; }

.dialogHead h2 { overflow-wrap: anywhere; }

.admin fieldset { margin: 0 0 14px; padding: 10px 14px 12px; border: 1px solid var(--line); border-radius: 6px; }

.admin legend { padding: 0 4px; color: var(--muted); font-size: 0.85rem; font-weight: 700; }

.admin fieldset .stack > * + * { margin-top: 8px; }

.dangerZone { border-color: #fca5a5 !important; }

.fates { margin: 0; padding: 0; list-style: none; }

.fates li + li { margin-top: 4px; }

/* The dashboard's charts (charts.js), whose series colors are admin.js's. */
.charts { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(340px, 100%), 1fr)); gap: 12px; }

.chart { position: relative; min-width: 0; margin: 0; padding: 12px 14px; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); }

.chart h3 { font-size: 0.9rem; }

.chart h3 span { margin-left: 8px; font-weight: 400; color: var(--muted); }

.chart .empty { padding: 60px 0; color: var(--muted); text-align: center; font-size: 0.875rem; }

.legend { display: flex; flex-wrap: wrap; gap: 4px 14px; margin-top: 4px; font-size: 0.8rem; color: var(--muted); }

.swatch { display: inline-block; width: 10px; height: 10px; margin-right: 6px; border-radius: 2px; }

.chart svg { display: block; width: 100%; height: 170px; margin-top: 8px; }

.chart svg text { fill: var(--muted); font-size: 11px; font-variant-numeric: tabular-nums; }

.chart svg .rule { stroke: var(--line); stroke-width: 1; }

.chart svg .hit { fill: transparent; }

.chart svg .hit:hover { fill: rgba(31, 41, 51, 0.04); }

.tip { position: absolute; z-index: 2; padding: 6px 10px; background: var(--card); border: 1px solid var(--line); border-radius: 6px; box-shadow: var(--shadow); font-size: 0.8rem; white-space: nowrap; pointer-events: none; }

.tip .when { color: var(--muted); }

.tip .row { display: flex; align-items: center; gap: 8px; }

.tip .key { width: 10px; height: 2px; }

.tip .name { color: var(--muted); }

.tip b { margin-left: auto; padding-left: 14px; font-variant-numeric: tabular-nums; }

/* The server's health, as a term and what it is. */
.facts { display: grid; grid-template-columns: max-content 1fr; gap: 6px 16px; margin: 0; font-size: 0.875rem; }

.facts dt { color: var(--muted); }

.facts dd { margin: 0; }

/* A session's page, such as cooking (Legato step 7), phone first: the step in large type, so it reads from across a counter, its timers in a strip above it, the buttons to go on big enough for a floury thumb, and the conversation below, with the box to talk in at the bottom as on the home page. */

.step { margin-bottom: 24px; padding: 16px; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }

.step .where { margin: 0 0 8px; color: var(--muted); font-size: 0.875rem; }

.step .group { margin-bottom: 12px; padding: 10px 12px; background: var(--tint); border-radius: var(--radius); }

.step .group h2 { margin: 0 0 6px; font-size: 1.1rem; }

.step .group h3 { margin: 8px 0 4px; font-size: 0.95rem; color: var(--muted); }

.step .group ul { margin: 0; padding-left: 1.1rem; }

.step .say p { margin: 0 0 12px; font-size: 1.45rem; line-height: 1.45; }

.step .recorded { font-size: 1.3rem; }

.step .moves { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 8px; }

.step .moves button { padding: 12px 18px; font-size: 1.05rem; }

.step .moves .primary { flex: 1; justify-content: center; }

.step .ends { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-top: 14px; font-size: 0.875rem; }

.step .ends p { flex-basis: 100%; margin: 0; }

.step .ends form { display: inline; }

.link { padding: 4px 6px; border: none; background: none; color: var(--muted); text-decoration: underline; }

.timers { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 12px; padding: 0; list-style: none; }

.timers li { display: flex; align-items: center; gap: 8px; padding: 4px 4px 4px 12px; background: var(--primary-tint); border-radius: 20px; }

.timers time { font-variant-numeric: tabular-nums; font-weight: 600; }

.timers li.rung { background: var(--danger); color: #fff; animation: listening 1.2s infinite; }

.timers li.rung .icon { color: #fff; }

.switch { padding: 16px; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); }

.switch p { margin: 0 0 12px; }

.entity .starts { margin-top: auto; }

.entity .starts button { width: 100%; justify-content: center; }

@media print {
    .bar, .site-footer { display: none; }
}
