/* Shep console: mobile-first, light/dark. The brand (docs/specs/public-site.md §3,
   decision 1): navy ink, the orange dot, Bricolage Grotesque headings, Atkinson
   Hyperlegible text. On/off, ok and warning colors keep their meanings. */
:root {
  --bg: #f4f6f9; --surface: #ffffff; --text: #14233a; --muted: #4a5870; --border: #dde3eb;
  --accent: #14233a; --accent-text: #ffffff; --ok: #1f7a46; --warn: #b54708; --off: #98a2b3; --on: #22a55a;
  --dot: #e8590c; --fish: #7a879a;
  --radius: 12px; --gap: 16px;
  --display: "Bricolage Grotesque", "Helvetica Neue", Arial, sans-serif;
  font-family: "Atkinson Hyperlegible", system-ui, -apple-system, "Segoe UI", sans-serif;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #11161f; --surface: #1a212c; --text: #e6e9ef; --muted: #a3adbd; --border: #2b3442;
    --accent: #b9c9e4; --accent-text: #0f1a2a; --ok: #5fd08f; --warn: #f5a35c; --off: #5b6372; --on: #4ade80;
    --dot: #ff7a33; --fish: #6d7a8f;
  }
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--text); line-height: 1.45; }
a { color: var(--accent); text-decoration: none; }
h1 { font-size: 1.5rem; margin: 0 0 var(--gap); }
h2 { font-size: 1.1rem; margin: 0 0 8px; }
.topbar { display: flex; justify-content: space-between; align-items: center; padding: 12px 16px; background: var(--surface); border-bottom: 1px solid var(--border); }
.brand { font-weight: 700; font-size: 1.15rem; color: var(--text); }
h1, h2, h3 { font-family: var(--display); letter-spacing: -0.015em; }
/* The logo (the site's partial): the i's dot in orange, as on the site. */
.logo-word { font-family: var(--display); font-weight: 800; font-size: 1.45rem; letter-spacing: -0.025em; line-height: 1; color: var(--text); white-space: nowrap; }
@supports ((background-clip: text) or (-webkit-background-clip: text)) {
  .logo-i { background: linear-gradient(to bottom, var(--dot) 0 31%, var(--text) 31%); -webkit-background-clip: text; background-clip: text; color: transparent; }
}
/* The fish, alone in the corner, under the messages. */
.fish { position: fixed; right: 14px; bottom: 10px; color: var(--fish); pointer-events: none; z-index: 0; }
.brand-mark { color: var(--accent); }
.container { max-width: 720px; margin: 0 auto; padding: 16px; }
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: var(--gap); margin-bottom: var(--gap); }
.card.narrow { max-width: 480px; }
.stack { display: grid; gap: 12px; }
label { display: grid; gap: 4px; font-weight: 600; }
input[type=text], input[type=email], input[type=password] { font: inherit; padding: 10px 12px; border: 1px solid var(--border); border-radius: 8px; background: var(--bg); color: var(--text); width: 100%; }
.button, button, input[type=submit] { font: inherit; display: inline-block; padding: 10px 16px; border-radius: 8px; border: 1px solid var(--border); background: var(--surface); color: var(--text); cursor: pointer; }
.button.primary, input[type=submit].primary { background: var(--accent); color: var(--accent-text); border-color: var(--accent); }
.link-button { background: none; border: none; color: var(--muted); padding: 4px; }
.muted { color: var(--muted); }
.mono, .command, .code { font-family: ui-monospace, "SF Mono", Menlo, monospace; }
.flash { padding: 10px 12px; border-radius: 8px; border: 1px solid var(--border); }
.flash.alert { border-color: var(--warn); color: var(--warn); }
.page-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: var(--gap); }
.page-head h1 { margin: 0; }
.device-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.device-link { display: flex; align-items: center; gap: 12px; padding: 14px 16px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); color: var(--text); }
.device-main { display: grid; flex: 1; min-width: 0; }
.device-name { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dot { width: 12px; height: 12px; border-radius: 50%; flex: none; display: inline-block; }
.dot.on { background: var(--on); box-shadow: 0 0 0 3px color-mix(in srgb, var(--on) 25%, transparent); }
.dot.off { background: var(--off); }
.verdict { font-size: .9rem; white-space: nowrap; }
.verdict.protected { color: var(--ok); }
.verdict.attention { color: var(--warn); }
.verdict.unknown { color: var(--muted); }
.verdict.big { font-size: 1.25rem; font-weight: 700; margin: 8px 0; white-space: normal; }
.attention-reason { display: block; color: var(--warn); font-size: .9rem; }
.status-line { display: flex; align-items: center; gap: 8px; margin: 0; flex-wrap: wrap; }
.checks { list-style: none; padding: 0; margin: 8px 0; display: grid; gap: 6px; }
.details { display: grid; grid-template-columns: minmax(0, 1fr); gap: 2px; margin: 8px 0 0; }
.details dt { font-weight: 600; margin-top: 8px; }
.details dd { margin: 0; overflow-wrap: anywhere; color: var(--muted); }
summary { cursor: pointer; color: var(--accent); margin-top: 8px; }
.code { font-size: 2rem; letter-spacing: .12em; font-weight: 700; margin: 4px 0 12px; }
.command { background: var(--bg); border: 1px solid var(--border); border-radius: 8px; padding: 12px; white-space: pre-wrap; overflow-wrap: anywhere; font-size: .9rem; }
.ping { margin: 12px 0 0; }
.empty p { margin: 0; }
.nav { display: flex; align-items: center; gap: 14px; }
.nav form { margin: 0; }
.avatar { width: 36px; height: 36px; border-radius: 50%; flex: none; display: grid; place-items: center; background: color-mix(in srgb, var(--accent) 18%, transparent); color: var(--accent); font-weight: 700; }
.hint { margin: -6px 0 0; font-size: .9rem; }
input[type=number], select { font: inherit; padding: 10px 12px; border: 1px solid var(--border); border-radius: 8px; background: var(--bg); color: var(--text); width: 100%; }
fieldset.choices { border: 1px solid var(--border); border-radius: 8px; padding: 8px 12px 12px; margin: 0; display: grid; gap: 8px; }
fieldset.choices legend { font-weight: 600; padding: 0 4px; }
label.choice { display: flex; align-items: center; gap: 10px; font-weight: 400; }
label.choice input { width: 20px; height: 20px; }
.inline-form { display: grid; gap: 8px; margin-top: 8px; }
.button.danger { color: var(--warn); border-color: var(--warn); }
.flash.notice { border-color: var(--ok); color: var(--ok); }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
.page-nav { display: flex; justify-content: space-between; gap: 12px; }
.sync-line { margin: -8px 0 var(--gap); }
.sync-applied { color: var(--ok); }
.sync-pending { color: var(--muted); }
.sync-attention { color: var(--warn); }
.counts p { margin: 4px 0; }
/* Function rows on the child page: name on the left, Off · On · Scheduled on the right
   (wrapping under the name on narrow phones). */
.fn-list { display: grid; list-style: none; padding: 0; margin: 0; }
.fn-list > .fn-row + .fn-row { border-top: 1px solid var(--border); }
.fn-list.unavailable { opacity: .55; }
.fn-row { display: grid; gap: 8px; padding: 12px 0; }
.fn-head { display: flex; align-items: center; justify-content: space-between; gap: 8px 12px; flex-wrap: wrap; }
.fn-main { display: grid; flex: 1 1 140px; min-width: 0; }
.fn-name { font-weight: 600; overflow-wrap: anywhere; }
.fn-detail { font-size: .85rem; }
.fn-status { margin: 0; font-size: .85rem; }
.switch-form { margin: 0; }
/* Segmented switch: a radio group that looks like one pill. */
.switch { display: inline-flex; margin: 0; padding: 2px; border: 1px solid var(--border); border-radius: 999px; background: var(--bg); }
.switch label { position: relative; display: block; font-weight: 500; }
.switch input { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: pointer; }
.switch span { display: block; padding: 6px 12px; border-radius: 999px; font-size: .9rem; color: var(--muted); }
.switch input:checked + span { background: var(--accent); color: var(--accent-text); }
.switch input[value=off]:checked + span { background: var(--surface); color: var(--text); box-shadow: 0 0 0 1px var(--border); }
.switch input:focus-visible + span, .day input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: 1px; }
.windows { display: grid; gap: 8px; padding: 12px; border-radius: 8px; background: var(--bg); }
.windows .hint { margin: 0; }
.window { display: grid; gap: 8px; margin: 0; padding: 8px; border: 1px solid var(--border); border-radius: 8px; }
.days { display: flex; flex-wrap: wrap; gap: 4px; }
.day { position: relative; display: block; font-weight: 500; }
.day input { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: pointer; }
.day span { display: block; padding: 4px 8px; border: 1px solid var(--border); border-radius: 6px; font-size: .85rem; }
.day input:checked + span { background: var(--accent); color: var(--accent-text); border-color: var(--accent); }
.times { display: flex; flex-wrap: wrap; align-items: end; gap: 8px; }
.times label { display: grid; gap: 4px; flex: 1 1 8rem; min-width: 0; font-weight: 500; }
/* On a phone the two fields stack and stay inside the card, so the picker they open
   does too (gate 6: it ran off the screen, hiding its Set button). */
input[type=time] { box-sizing: border-box; width: 100%; max-width: 12rem; min-width: 0; font: inherit; padding: 8px 10px; border: 1px solid var(--border); border-radius: 8px; background: var(--surface); color: var(--text); }
.windows, .window { min-width: 0; max-width: 100%; box-sizing: border-box; }
.window-actions { display: flex; flex-wrap: wrap; gap: 8px; }
/* The Explanation under each switch. */
.explain { margin: 0; }
.explain summary { margin-top: 0; font-size: 0.9rem; }
.explain p { margin: 8px 0 0; color: var(--muted); overflow-wrap: anywhere; }
/* Off hours (step 6): the status line, the windows, Give more time. */
.off-status { margin: 0; font-weight: 600; }
.off-windows { list-style: none; padding: 0; margin: 4px 0 0; }
/* Each saved time with Change and Remove; Add off hours under them (small fixes). */
.off-window { display: flex; flex-wrap: wrap; align-items: center; gap: 0 4px; }
.off-window span { margin-right: 4px; }
.inline-action { display: inline; margin: 0; }
.off-add { margin: 12px 0 0; }
.off-hours .windows { margin-top: 12px; }
.off-hours details { margin-top: 12px; }
.inventory li { overflow-wrap: anywhere; }
/* Websites (steps 4, 4b): the add form, row actions, companions and suggestions; requests. */
.add-site { display: grid; gap: 8px; margin: 8px 0 4px; }
.add-row { display: flex; gap: 8px; }
.add-row input { flex: 1; min-width: 0; }
.row-actions { display: flex; align-items: center; gap: 4px; }
.row-actions form { margin: 0; }
.link-button.remove { font-size: 1rem; padding: 6px 8px; }
.hosts ul { margin: 8px 0 0; }
.host-list { list-style: none; padding: 0; display: grid; gap: 4px; }
.host-list li { display: flex; justify-content: space-between; align-items: center; gap: 8px; overflow-wrap: anywhere; }
.host-list form { margin: 0; }
/* Sites she opened during open web: site, when, and its two buttons in columns. */
.visit-list li { display: grid; grid-template-columns: minmax(0, 1fr) auto auto auto; }
.companions { margin: 6px 0 0; }
/* The YouTube panel under its row (step 5): mode, features, approvals. */
.adapter { display: grid; gap: 6px; padding: 10px 12px; border-radius: 8px; background: var(--bg); }
.adapter-row { padding: 2px 0; }
.adapter-items a { font-weight: 600; }
.companions > form { margin-top: 8px; }
.essentials { margin: 12px 0 0; }
.request-list { display: grid; }
.request-list > .request + .request { border-top: 1px solid var(--border); }
.request { display: grid; gap: 4px; padding: 12px 0; }
.request p { margin: 0; }
.request-url { font-size: .85rem; overflow-wrap: anywhere; }
.request-note { font-style: italic; }
.request-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.request-answer { margin: 0; }
/* Requests, both ways (docs/specs/ruby-feedback-2.md, PR 1) */
.request-facts { display: grid; gap: 2px; margin: 4px 0 0; }
.request-facts > div { display: flex; gap: 8px; }
.request-facts dt { min-width: 5.5em; color: var(--muted); }
.request-facts dd { margin: 0; overflow-wrap: anywhere; }
.request-effects { margin: 4px 0 0; padding-left: 1.2em; font-size: .9rem; }
.request-answer-form { display: grid; gap: 6px; margin: 4px 0 0; }
.request-parent-note-field { display: grid; gap: 4px; font-size: .9rem; }
.request-parent-note-field textarea { width: 100%; max-width: 36rem; font: inherit; }
.request-parent-note { font-style: italic; }
.badge { display: inline-block; min-width: 1.4em; padding: 0 6px; border-radius: 999px; background: var(--accent); color: var(--accent-text); font-size: .8rem; font-weight: 700; text-align: center; }

/* Alerts (step 7) */
.card.alerts { border-color: var(--warn); }
.alert-list { list-style: none; padding: 0; margin: 0; }
.alert-item { display: flex; flex-wrap: wrap; gap: 6px 10px; align-items: center; padding: 8px 0; border-top: 1px solid var(--border); }
.alert-item:first-child { border-top: 0; }
.alert-item form { display: inline; }
.alert-text { font-weight: 600; }

/* Step 8: kept secrets, lab mode, the safety net (docs/specs/provisioning.md). */
.banner.lab { background: #fff6d6; border: 1px solid var(--warn); border-radius: var(--radius); padding: var(--gap); margin-bottom: var(--gap); }
.secret-value { font-size: 1.6rem; letter-spacing: 0.08em; word-break: break-all; }
.secret-value span + span { margin-left: 0.6em; }
.findings li { margin-bottom: 0.5rem; }
form.inline { display: inline-flex; gap: 0.5rem; align-items: center; }
.button.danger { border-color: var(--warn); }
.error { color: var(--warn); }

/* Recent changes and Connect your assistant (docs/specs/cloud-mcp-auto-releases.md). */
.change-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 6px; }
.change-list li { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 4px 12px; font-size: .95rem; }
.connector-url { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
/* One short address, the same for every family (docs/specs/one-connector-address.md). */
.connector-url input { flex: 1; min-width: 14rem; font-family: ui-monospace, "SF Mono", Menlo, monospace; }
.consent ul { margin: 4px 0 12px; }
.consent-actions { display: flex; gap: 8px; }
/* Each laptop's versions on the Releases page (docs/specs/every-laptop-the-same.md §4). */
.versions-wrap { overflow-x: auto; }
.versions { border-collapse: collapse; width: 100%; font-size: .9rem; }
.versions th, .versions td { text-align: left; padding: 4px 8px 4px 0; border-bottom: 1px solid var(--border); vertical-align: top; }
.versions .behind { color: var(--warn); }
/* The Desktop card's line per laptop, and a program's install status (§1, §3). */
.desktop-line { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }
.desktop-line .differs { color: var(--warn); }
.program-status { margin: -4px 0 8px; display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }
.program-add { display: grid; gap: 12px; }

/* Console UI cleanup (docs/specs/console-ui-cleanup.md): every section and item is one line
   with a summary that opens; nothing runs off a phone. */
.topbar { flex-wrap: wrap; gap: 6px 16px; }
.nav { flex-wrap: wrap; gap: 6px 14px; }
@media (max-width: 600px) {
  .topbar { padding: 10px 16px 8px; }
  .nav { width: 100%; flex-wrap: nowrap; overflow-x: auto; white-space: nowrap; }
}
main.container { overflow-wrap: anywhere; }
details.section { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); margin-bottom: 10px; }
details.section > summary, details.item-more > summary { list-style: none; display: flex; align-items: center; gap: 10px; margin: 0; color: var(--text); }
details.section > summary::-webkit-details-marker, details.item-more > summary::-webkit-details-marker { display: none; }
details.section > summary { padding: 14px 16px; }
details.section > summary::before, details.item-more > summary::before { content: "›"; flex: none; width: .7em; color: var(--muted); font-size: 1.3rem; line-height: 1; transition: transform .15s; }
details[open] > summary::before { transform: rotate(90deg); }
.s-title { flex: none; font-weight: 650; font-size: 1.05rem; white-space: nowrap; }
.s-sum { flex: 1 1 0; min-width: 0; margin-left: auto; text-align: right; color: var(--muted); font-size: .9rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.s-sum.warn { color: var(--warn); }
.section-body { padding: 0 16px 14px; }
.section-body > .hint:first-child, .section-body > .lead { margin: 0 0 8px; }
.section .card { border: 0; padding: 0; margin: 0; background: none; }
.item { border-top: 1px solid var(--border); min-width: 0; }
.section-body > .item:first-child, .items > .item:first-child { border-top: 0; }
details.item-more > summary { padding: 10px 0; }
.i-main { display: grid; flex: 1 1 auto; min-width: 0; }
.i-name { font-weight: 600; overflow-wrap: break-word; }
.i-sub { color: var(--muted); font-size: .85rem; overflow-wrap: anywhere; }
.i-right { display: flex; align-items: center; gap: 4px; flex: none; margin-left: auto; cursor: default; }
.i-right form { margin: 0; }
.item-body { display: grid; gap: 8px; padding: 0 0 12px 20px; min-width: 0; }
.item-body:empty { display: none; }
.item-body > p, .item-body .explain p { margin: 0; }
.item > .fn-status, .item > .flash, .item > .windows { margin: 0 0 10px; }
.chip { font-size: .8rem; padding: 2px 8px; border-radius: 999px; border: 1px solid var(--border); color: var(--muted); white-space: nowrap; }
.chip.lab { border-color: var(--warn); color: var(--warn); }
.chip.everyone { border-color: var(--ok); color: var(--ok); }
.actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.actions form { margin: 0; }
.kv { display: grid; grid-template-columns: max-content minmax(0, 1fr); gap: 2px 12px; margin: 0; }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; overflow-wrap: anywhere; }
.kv dd.behind { color: var(--warn); }
.more-list > summary { margin: 10px 0 0; }
.always { margin-bottom: 10px; }
@media (max-width: 420px) {
  .switch span { padding: 6px 9px; }
  .item-body { padding-left: 4px; }
}
/* Notices and alerts at the bottom of the screen. */
.toasts { position: fixed; left: 0; right: 0; bottom: 16px; z-index: 10; display: grid; gap: 8px; justify-items: center; padding: 0 16px; pointer-events: none; }
.toast { pointer-events: auto; display: flex; align-items: center; gap: 8px; max-width: 688px; width: 100%; margin: 0; background: var(--surface); box-shadow: 0 4px 16px rgb(0 0 0 / .15); }
.toast span { flex: 1; }
.toast .link-button { color: inherit; }
.i-sub .behind, .behind { color: var(--warn); }
.hold-form { flex: 1 1 14rem; }
.hold-form input[type=text] { flex: 1; min-width: 0; }
form.inline select { width: auto; max-width: 100%; }
.kv .mono { font-size: .9em; }
/* The operator's Site page (docs/specs/public-site.md decision 5). */
.inquiry-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 12px; }
.inquiry-list p { margin: 0 0 6px; }
.counts { border-collapse: collapse; width: 100%; margin-bottom: 12px; }
.counts th, .counts td { text-align: left; padding: 6px 8px; border-bottom: 1px solid var(--border); }
.counts td:last-child, .counts th:last-child { text-align: right; font-variant-numeric: tabular-nums; }
