/* Opmate: the chat page's own rules (PR 4 of docs/CODE_REVIEW.md, P16), after the design system block pasted in
   the page and the shared reply rules. Repeated selectors are merged where the cascade allows, the focus ring is
   one grouped rule, and the narrow-screen rules are one block. */
/* ==========================================================================
   Opmate: page-specific rules, after the design system block above.
   ========================================================================== */
@font-face { font-family: 'Geist'; src: url('/static/fonts/Geist-Variable.woff2') format('woff2'); font-weight: 100 900; font-style: normal; font-display: swap; }
@font-face { font-family: 'Geist Mono'; src: url('/static/fonts/GeistMono-Variable.woff2') format('woff2'); font-weight: 100 900; font-style: normal; font-display: swap; }
/* Never upper-case headings or labels (Watercalcs rule; overrides the design system's h4 eyebrow). */
h4 { text-transform: none; letter-spacing: 0; }
/* The design system's display rules would otherwise beat the hidden attribute. */
[hidden] { display: none !important; }
.page-title h2 + p { margin: 4px 0 0; font-size: 13px; }
.chat-log { display: flex; flex-direction: column; gap: 14px; }
.chat-log:empty { display: none; }
.msg { max-width: 820px; font-size: 15px; line-height: 1.6; }
.msg p { margin: 0 0 8px; }
.msg p:last-child { margin-bottom: 0; }
.msg ol { margin: 4px 0 0; padding-left: 22px; }
.msg li { margin: 4px 0; }
.msg.op { align-self: flex-end; background: var(--bg-subtle); border-radius: 16px; padding: 12px 16px; max-width: 640px; }
.msg.bot { align-self: flex-start; background: var(--bg); border: 1px solid var(--border); border-radius: 16px; padding: 16px 20px; display: flex; flex-direction: column; gap: 12px; }
.msg.bot .note p { margin: 0; }
.plant-log-links { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.plant-log-links .btn { text-decoration: none; }
@media (max-width: 560px) {
  .calc-inputs { grid-template-columns: fit-content(10em) max-content max-content minmax(0, 1fr); }
  .calc-row .calc-src { grid-column: 1 / -1; font-size: 12px; }
  .calc-foot .btn { flex: 1 1 100%; justify-content: center; height: 44px; }
}
.msg-foot { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; font-size: 13px; }
.msg-foot .btn { height: 32px; padding: 0 14px; font-size: 13px; }
.composer textarea { width: 100%; min-height: 84px; resize: vertical; font: inherit; font-size: 15px; line-height: 1.5; padding: 10px 12px; border: 1px solid var(--border-input); border-radius: 10px; background: var(--bg); color: var(--text); box-sizing: border-box; }
.composer-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 12px; }
.composer-hint { font-size: 12px; }
.note-actions { margin-top: 10px; }
.sign-in { max-width: 560px; }
.sign-in-msg { font-size: 13px; }
.rate-btn { width: 32px; height: 32px; border: 0; background: transparent; border-radius: var(--r-md); color: var(--text-muted); cursor: pointer; display: inline-grid; place-items: center; padding: 0; }
.rate-btn svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linejoin: round; }
.rate-btn:hover { color: var(--text); background: var(--bg-subtle); }
.om-rated:empty { display: none; }
/* migration 63: Send to Opmate, quiet beside the thumbs under a reply Opmate couldn't answer */
.om-send { min-height: 32px; border: 0; background: transparent; border-radius: var(--r-md); color: var(--text-muted); cursor: pointer; font: inherit; font-size: 13px; padding: 0 8px; text-decoration: underline; text-underline-offset: 2px; }
.om-send:hover { color: var(--text); background: var(--bg-subtle); }
.om-send:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; }
.om-sent { font-size: 13px; }
.om-sharing-line { font-weight: 600; }
/* T1: a Watercalcs tool with its two switches, side by side, wrapping under the name when narrow */
.om-wc-tools { align-self: stretch; }
.om-wc-tools .om-tool-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 8px 16px; }
.om-tool-switches { display: flex; flex-wrap: wrap; gap: 8px 20px; }
@media (max-width: 600px) { .om-wc-tools .om-tool-row { grid-template-columns: minmax(0, 1fr); } }
#tester-note-text p + p, #about-tester-note p + p { margin-top: 8px; }
.rate-note { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; width: 100%; }
.rate-note input { flex: 1 1 220px; min-width: 0; height: var(--h-control); padding: 0 12px; border: 1px solid var(--border-input); border-radius: 10px; font-family: inherit; font-size: 14px; box-sizing: border-box; }
.sign-in input { width: 100%; height: var(--h-control); padding: 0 12px; border: 1px solid var(--border-input); border-radius: 10px; font-family: 'Geist Mono', ui-monospace, monospace; font-size: 15px; letter-spacing: 1px; box-sizing: border-box; }
.setting-switch { display: inline-flex; align-items: center; gap: 10px; font-size: 14px; }
/* ---- Three panes (v0.2): your conversations | the chat | your plant. The page itself doesn't scroll; each pane
   does. Side panes sit on the subtle grey with white blocks; colour only for a limit reached (amber / red). ---- */
body { height: 100vh; height: 100dvh; display: flex; flex-direction: column; overflow: hidden; }
.om-title-row { display: flex; align-items: center; gap: 10px; min-width: 0; margin-right: auto; }
.app-header .om-narrow-only, .app-header .om-mid-only { display: none; }
.om-app { flex: 1; min-height: 0; display: grid; grid-template-columns: var(--om-side-w, 320px) minmax(0, 1fr); }
.om-pane { display: flex; flex-direction: column; min-height: 0; min-width: 0; background: var(--bg-subtle); }
.om-history { border-right: 1px solid var(--border); position: relative; }
/* page v0.95: the menu's width dragged on desktop; none where the menu slides in */
.om-resize { position: absolute; top: 0; right: -4px; width: 8px; height: 100%; z-index: 5; cursor: col-resize; touch-action: none; }
.om-resize::after { content: ""; position: absolute; top: 0; bottom: 0; left: 3px; width: 2px; background: transparent; transition: background .15s; }
.om-resize:hover::after, .om-resize:focus-visible::after, .om-resizing .om-resize::after { background: var(--border-input); }
.om-resize:focus-visible { outline: none; }
.om-resizing { cursor: col-resize; user-select: none; }
.om-plant { border-left: 1px solid var(--border); }
.om-pane-head { display: none; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 16px; background: var(--bg); border-bottom: 1px solid var(--border); }
.om-pane-title { font-size: 17px; font-weight: 600; }
.om-pane-body { flex: 1; min-height: 0; overflow-y: auto; padding: 16px; display: flex; flex-direction: column; gap: 14px; }
.om-pane-foot { padding: 12px 16px; border-top: 1px solid var(--border); background: var(--bg-subtle); }
.om-pane-foot .btn { width: 100%; justify-content: center; }
/* you, at the bottom left (Jase, 20 Oct 2026): your initials, name and role; a tap opens the menu above it */
.om-user-foot { position: relative; padding: 8px; }
.om-user { width: 100%; display: flex; align-items: center; gap: 10px; padding: 8px; min-height: 52px; border: 0; border-radius: var(--r-md); background: transparent; font: inherit; color: var(--text); text-align: left; cursor: pointer; }
.om-user:hover, .om-user[aria-expanded="true"], .om-user.on { background: var(--bg); }
.om-avatar { flex-shrink: 0; width: 32px; height: 32px; border-radius: 50%; background: var(--text); color: var(--bg); display: grid; place-items: center; font-size: 12px; font-weight: 600; letter-spacing: .3px; }
.om-avatar-lg { width: 48px; height: 48px; font-size: 16px; }
.om-user-text { display: flex; flex-direction: column; min-width: 0; flex: 1; }
.om-user-name { font-size: 14px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.om-user-role { font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.om-user-more { flex-shrink: 0; width: 16px; height: 16px; fill: var(--text-muted); }
.om-user-menu { position: absolute; left: 8px; right: 8px; bottom: calc(100% - 4px); z-index: 45; display: flex; flex-direction: column; padding: 6px; background: var(--bg); border: 1px solid var(--border); border-radius: var(--r-lg); box-shadow: var(--shadow-seg), 0 12px 32px -12px rgba(13,15,20,.22); }
.om-user-menu[hidden] { display: none; }
.om-user-menu-head { display: flex; flex-direction: column; gap: 2px; padding: 8px 10px 10px; margin-bottom: 4px; border-bottom: 1px solid var(--border); }
.om-user-menu-head .muted { font-size: 12px; overflow-wrap: anywhere; }
.om-user-menu button { display: flex; align-items: center; gap: 10px; text-align: left; border: 0; background: transparent; border-radius: 6px; padding: 8px 10px; min-height: 40px; font: inherit; font-size: 14px; color: var(--text); cursor: pointer; }
.om-user-menu button[hidden] { display: none; }
.om-user-menu button:hover { background: var(--bg-subtle); }
.om-user-menu svg { width: 16px; height: 16px; flex-shrink: 0; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.om-user-menu .om-rule { margin: 4px 0; }
/* qualifications: one line each, its badges on the right; on a phone the badges go under it */
.om-quals { list-style: none; margin: 0; padding: 0; }
.om-qual { display: flex; align-items: center; gap: 10px 12px; padding: 10px 0; border-top: 1px solid var(--border); flex-wrap: wrap; }
.om-quals > li:first-child { border-top: 0; }
.om-qual-main { display: flex; flex-direction: column; gap: 2px; flex: 1; min-width: 180px; }
.om-qual-name { font-size: 14px; font-weight: 500; }
.om-qual-meta { font-size: 13px; }
.om-qual-badges { display: flex; gap: 6px; flex-wrap: wrap; }
.badge.om-unverified { background: var(--bg); border-color: var(--border-input); color: var(--text-muted); }
.om-qual-form { display: flex; flex-direction: column; gap: 12px; padding-bottom: 14px; border-bottom: 1px solid var(--border); }
.om-qual-form[hidden] { display: none; }
.om-qual-person + .om-qual-person { margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--border); }
.om-qual-who { display: flex; gap: 8px; align-items: baseline; flex-wrap: wrap; }
.om-qual-who .muted { font-size: 13px; }
.om-qual-person .om-quals { margin-top: 4px; }
.om-quals-list { list-style: none; margin: 0; padding: 0; columns: 2 240px; column-gap: 24px; }
.om-quals-list li { display: flex; flex-direction: column; padding: 5px 0; font-size: 14px; break-inside: avoid; }
.om-quals-list .muted { font-size: 12px; }
.om-qual-add { display: flex; gap: 10px; align-items: flex-end; flex-wrap: wrap; padding-top: 12px; border-top: 1px solid var(--border); }
.om-qual-add .field { flex: 1; min-width: 220px; }
#settings-tab .card-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
/* Help: the questions, each folding open, with a search */
.om-faq { display: flex; flex-direction: column; gap: 18px; margin-top: 8px; }
.om-faq-group[hidden], .om-faq-item[hidden] { display: none; }
.om-faq-group h4 { margin: 0 0 6px; }
.om-faq-item { border-top: 1px solid var(--border); }
.om-faq-item:last-child { border-bottom: 1px solid var(--border); }
.om-faq-item summary { cursor: pointer; padding: 11px 24px 11px 0; font-size: 14px; font-weight: 500; list-style: none; position: relative; }
.om-faq-item summary::-webkit-details-marker { display: none; }
.om-faq-item summary::after { content: "+"; position: absolute; right: 2px; top: 9px; font-size: 17px; color: var(--text-muted); }
.om-faq-item[open] summary::after { content: "\2212"; }
.om-faq-item p { margin: 0 0 12px; font-size: 14px; line-height: 1.55; color: var(--text); }
.om-label { margin: 0; font-size: 12px; font-weight: 600; color: var(--text-muted); }
.om-empty { margin: 0; font-size: 13px; }
.om-site { background: var(--bg); border: 1px solid var(--border-input); border-left: 4px solid var(--primary); border-radius: var(--r-lg); padding: 12px 14px; display: flex; flex-direction: column; gap: 4px; min-width: 0; }
/* page v0.95: the plant plain to see, so nothing is written at the wrong one */
.om-site-name { flex: 1; min-width: 0; font-size: 17px; font-weight: 700; line-height: 1.3; overflow-wrap: break-word; }
.om-site-chev-text { font-size: 13px; font-weight: 500; white-space: nowrap; }
.om-site-role { font-size: 13px; }
/* I2: sign in with a Watercalcs account; the plant picker and the switcher */
.om-site .om-switch-plant { align-self: flex-start; margin-top: 6px; }
/* more than one plant: the name with a chevron; the plants open in the card, one tap each (Jase, 20 Oct 2026) */
.om-site-row { display: flex; align-items: center; justify-content: space-between; gap: 8px; min-width: 0; }
.om-site-many .om-site-row { cursor: pointer; }
.om-site-chev { align-self: flex-start; display: inline-flex; align-items: center; gap: 2px; min-height: 28px; padding: 0; margin: 2px 0 0; border: 0; background: transparent; color: var(--primary); font: inherit; cursor: pointer; }
.om-site-chev:hover { color: var(--primary-hover); text-decoration: underline; }
.om-site-chev svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; transition: transform .18s ease; }
.om-site-chev[aria-expanded="true"] svg { transform: rotate(90deg); }
.om-site-menu { display: flex; flex-direction: column; gap: 2px; margin: 8px -6px -4px; padding-top: 8px; border-top: 1px solid var(--border); }
.om-site-menu[hidden] { display: none; }
.om-site-opt { display: flex; align-items: center; justify-content: space-between; gap: 8px; width: 100%; min-height: 44px; padding: 6px 8px; border: 0; border-radius: 8px; background: transparent; text-align: left; cursor: pointer; font: inherit; color: var(--text); }
.om-site-opt:hover:not(:disabled) { background: var(--bg-subtle); }
.om-site-opt:disabled { cursor: default; }
.om-site-opt-text { display: flex; flex-direction: column; min-width: 0; }
.om-site-opt-name { font-size: 14px; font-weight: 600; overflow-wrap: anywhere; }
.om-site-opt-role { font-size: 12px; color: var(--text-muted); }
.om-site-opt-mark { flex: none; font-size: 12px; color: var(--text-muted); }
.om-site-opt-mark svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; vertical-align: middle; }
@media (prefers-reduced-motion: reduce) {
  .om-site-chev svg { transition: none; }
}
.om-or { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; margin-top: 16px; padding-top: 16px; border-top: 1px solid var(--border); }
.om-plants { display: flex; flex-direction: column; gap: 8px; }
.om-plants .om-calc { flex-direction: row; justify-content: space-between; align-items: center; gap: 8px; }
/* I3: plants & access, for a plant's site admin and the organisation's admin */
.om-access-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.om-access-list li { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 12px; padding: 10px 0; border-top: 1px solid var(--border); }
.om-access-list li:first-child { border-top: 0; padding-top: 0; }
.om-access-who { display: flex; flex-direction: column; gap: 2px; min-width: 0; flex: 1 1 200px; }
.om-access-who .om-person { font-weight: 500; overflow-wrap: anywhere; }
.om-access-who .muted { font-size: 13px; overflow-wrap: anywhere; }
.om-access-acts { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.om-access-acts select { height: var(--h-control); padding: 0 10px; border: 1px solid var(--border-input); border-radius: var(--r-md); background: var(--bg); color: var(--text); font: inherit; font-size: 14px; }
.om-access-give { margin-top: 16px; padding-top: 16px; border-top: 1px solid var(--border); }
.om-access-asks { margin-bottom: 16px; padding-bottom: 16px; border-bottom: 1px solid var(--border); }
.om-access-asks h4 { margin: 0 0 8px; }
#ask-card input { font-family: inherit; letter-spacing: 0; }
/* O1: the organisation admin's page */
/* settings and admin in a dialog over the page, as Claude's settings (Jase, 20 Oct 2026): its list on the left, the
   page on the right; full screen on a phone, the list then a row of tabs across the top */
.om-modal-back { position: fixed; inset: 0; z-index: 1200; background: var(--overlay); display: grid; place-items: center; padding: 24px; }
.om-modal-back[hidden] { display: none; }
/* Required: the handover over the whole page until it is read (Jase, 8 Nov 2026) */
.om-must-read { z-index: 1300; }
.om-must-read-card { width: min(720px, 100%); max-height: 100%; overflow-y: auto; }
.om-modal { width: min(1000px, 100%); height: min(720px, 100%); display: grid; grid-template-columns: 220px minmax(0, 1fr); background: var(--bg); border: 1px solid var(--border); border-radius: var(--r-lg); box-shadow: 0 24px 64px -16px rgba(13,15,20,.35); overflow: hidden; }
.om-modal-nav { display: flex; flex-direction: column; gap: 2px; padding: 18px 12px; background: var(--om-side); border-right: 1px solid var(--border); overflow-y: auto; }
.om-modal-title { font-size: 17px; font-weight: 600; padding: 2px 10px 12px; }
.om-modal-nav button { text-align: left; border: 0; background: transparent; border-radius: var(--r-md); padding: 9px 10px; min-height: 40px; font: inherit; font-size: 14px; color: var(--text); cursor: pointer; }
.om-modal-nav button[hidden] { display: none; }
.om-modal-nav button:hover { background: var(--bg); }
.om-modal-nav button.on { background: var(--bg); font-weight: 600; box-shadow: var(--shadow-seg); }
.om-modal-body { position: relative; min-width: 0; min-height: 0; display: flex; flex-direction: column; }
.om-modal-close { position: absolute; top: 12px; right: 12px; z-index: 2; }
.om-admin-page { flex: 1; min-height: 0; display: flex; flex-direction: column; }
.om-admin-page[hidden] { display: none; }
.om-admin-page > .page-title { padding: 18px 60px 12px 28px; border-bottom: 1px solid var(--border); }
.om-admin-page > .page-title h2 { font-size: 18px; letter-spacing: -0.2px; }
.om-admin-page > .om-scroll { flex: 1; min-height: 0; overflow-y: auto; padding: 18px 28px 28px; display: flex; flex-direction: column; gap: 14px; }
#settings-tab .card-body, #site-tab .card-body { display: flex; flex-direction: column; gap: 10px; }
@media (max-width: 768px) {
  .om-modal-back { padding: 0; }
  .om-modal { width: 100%; height: 100%; border-radius: 0; border: 0; grid-template-columns: minmax(0, 1fr); grid-template-rows: auto minmax(0, 1fr); }
  .om-modal-nav { flex-direction: row; align-items: center; gap: 4px; padding: 10px 12px; border-right: 0; border-bottom: 1px solid var(--border); overflow-x: auto; scrollbar-width: none; }
  .om-modal-nav::-webkit-scrollbar { display: none; }
  .om-modal-title { display: none; }
  .om-modal-nav button { flex-shrink: 0; min-height: 44px; }
  .om-modal-close { top: 10px; right: 10px; }
  .om-admin-page > .page-title { padding: 14px 60px 12px 14px; }
  .om-admin-page > .om-scroll { padding-left: 14px; padding-right: 14px; }
}
.om-you { flex-direction: row !important; align-items: center; flex-wrap: wrap; gap: 14px !important; }
.om-you-text { display: flex; flex-direction: column; gap: 2px; flex: 1; min-width: 160px; }
.om-you-text .muted { font-size: 13px; overflow-wrap: anywhere; }
.om-org-row { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 16px; }
.om-org-settings { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 12px; }
.om-org-settings .field { min-width: 220px; }
#org-add-form { margin-top: 8px; }
.om-needs { cursor: default; }
.om-needs > span:first-of-type, .om-needs > input + span { color: var(--text-muted); }
#ask-card .om-plants { margin-top: 14px; }
.om-ask-note { font-size: 13px; color: var(--text-secondary); overflow-wrap: anywhere; }
.om-new { width: 100%; justify-content: center; }
.btn.tonal { background: #e3e4e8; color: var(--text); border: 1px solid transparent; font-weight: 600; padding: 0 18px; }
.btn.tonal:hover { background: #d8d9de; }
.om-convs { display: flex; flex-direction: column; gap: 2px; }
.om-convs .om-label { padding: 10px 10px 4px; }
.om-conv { display: block; width: 100%; text-align: left; border: 0; background: transparent; border-radius: var(--r-md); padding: 8px 10px; font: inherit; color: var(--text); cursor: pointer; min-height: 36px; }
@media (pointer: coarse) {
  .om-conv { min-height: 44px; }
}
.om-conv:hover { background: var(--bg); }
.om-conv:focus-visible { outline: none; box-shadow: 0 0 0 3px var(--focus-ring); }
.om-conv.on { background: var(--bg); box-shadow: inset 0 0 0 1px var(--border-input); }
.om-conv-title { display: block; font-size: 14px; line-height: 1.35; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.om-conv.on .om-conv-title { font-weight: 600; }
.om-conv-meta { display: none; font-size: 12px; color: var(--text-muted); margin-top: 2px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
/* flat line icons on the pages (Jase, 19 Oct 2026) */
.om-page-icon { width: 18px; height: 18px; flex-shrink: 0; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; color: var(--text-secondary); }
.om-page.on .om-page-icon { color: var(--text); }
.om-page .om-count { margin-left: auto; }
/* search results */
.om-search-results { display: flex; flex-direction: column; gap: 14px; }
.om-search-results .om-label { margin: 6px 0 0; }
.om-hit { display: flex; flex-direction: column; gap: 3px; text-align: left; width: 100%; border: 1px solid var(--border); border-radius: var(--r-md); background: var(--bg); padding: 10px 12px; font: inherit; color: var(--text); cursor: pointer; }
.om-hit:hover { background: var(--bg-subtle); }
.om-hit-title { font-size: 14px; font-weight: 500; overflow-wrap: anywhere; }
.om-hit-meta { font-size: 12px; color: var(--text-muted); }
.om-hit-text { font-size: 13px; color: var(--text-secondary); line-height: 1.45; overflow-wrap: anywhere; }
/* the left pane's list (Jase, 19 Oct 2026): one line an item, its detail on hover, pin and delete under "More";
   pins kept in this browser (Q91) */
.om-conv-row { position: relative; display: flex; align-items: center; gap: 2px; min-width: 0; }
.om-conv-row .om-conv { flex: 1; min-width: 0; }
.om-conv-row:hover .om-conv-meta, .om-conv:focus-visible .om-conv-meta { display: block; }
.om-more { flex-shrink: 0; width: 32px; height: 32px; border: 0; background: transparent; border-radius: var(--r-md); color: var(--text-muted); cursor: pointer; display: grid; place-items: center; opacity: 0; }
.om-conv-row:hover .om-more, .om-more:focus-visible, .om-more[aria-expanded="true"] { opacity: 1; }
.om-more:hover, .om-more[aria-expanded="true"] { background: var(--bg); color: var(--text); }
.om-more svg { width: 16px; height: 16px; fill: currentColor; }
@media (hover: none) {
  .om-more { opacity: 1; }
}
.om-menu { position: absolute; right: 2px; top: calc(100% - 2px); z-index: 40; min-width: 190px; max-width: 260px; display: flex; flex-direction: column; padding: 4px; background: var(--bg); border: 1px solid var(--border); border-radius: var(--r-md); box-shadow: var(--shadow-seg), 0 8px 24px -8px rgba(13,15,20,.18); }
.om-menu-meta { font-size: 12px; color: var(--text-muted); padding: 6px 10px 4px; overflow-wrap: anywhere; }
.om-menu button { text-align: left; border: 0; background: transparent; border-radius: 6px; padding: 8px 10px; min-height: 40px; font: inherit; font-size: 14px; color: var(--text); cursor: pointer; }
.om-menu button:hover { background: var(--bg-subtle); }
.om-menu button.om-danger { color: var(--danger-ink); }
.om-scope { margin: 6px 0 2px; }
.om-see-all { display: block; border: 0; background: transparent; padding: 10px 0; min-height: 44px; font: inherit; font-size: 13px; color: var(--text); text-decoration: underline; text-underline-offset: 3px; cursor: pointer; text-align: left; }
.om-see-all:hover { color: var(--text-secondary); }
.om-see-all:focus-visible,
.om-faq-item summary:focus-visible { outline: none; box-shadow: 0 0 0 3px var(--focus-ring); border-radius: 4px; }
.om-going-off { font-size: 14px; font-weight: 500; margin: 0; }
/* H2: the handover settings, one labelled choice each */
.om-handover-settings { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 12px 16px; margin-bottom: 12px; }
.om-summary-when { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 12px 16px; margin-bottom: 12px; }
.om-handover-settings .field { margin: 0; }
.om-handover-plant { display: flex; flex-direction: column; gap: 10px; }
/* an entry opened from the list or the right-hand pane shows where it is for a moment */
.om-entry.om-flash { box-shadow: 0 0 0 3px var(--focus-ring); transition: box-shadow .3s ease; }
/* Jase, 5 Dec 2026: the Plant log row the same height as Conversations (an old margin on its + made it taller) */
/* a new conversation: the greeting and the box in the middle, as in a chat; they move down once it starts */
.om-hello { text-align: center; padding: 0 28px 18px; }
/* three examples under the greeting, quiet until pointed at (Jase, 20 Oct 2026) */
.om-try { display: flex; justify-content: center; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.om-try button { height: 32px; padding: 0 12px; border: 1px solid var(--border); border-radius: var(--r-pill); background: transparent; font: inherit; font-size: 13px; color: var(--text-secondary); cursor: pointer; }
.om-try button:hover { background: var(--bg); color: var(--text); border-color: var(--border-input); }
.om-try button[aria-pressed="true"] { background: var(--bg); color: var(--text); border-color: var(--border-input); }
/* Need something calculated: the list under the examples (Jase, 24 Oct 2026) */
.om-calc-pick { max-width: 560px; margin: 14px auto 0; padding: 14px 16px; border: 1px solid var(--border); border-radius: var(--r-lg); background: var(--bg); text-align: left; }
.om-calc-pick .field { margin-bottom: 8px; }
.om-calc-items { list-style: none; margin: 0 0 8px; padding: 0; max-height: 280px; overflow-y: auto; }
.om-calc-item { display: flex; flex-direction: column; gap: 2px; width: 100%; min-height: 44px; padding: 8px 10px; border: 0; border-radius: var(--r-md); background: transparent; font: inherit; font-size: 14px; color: var(--text); text-align: left; cursor: pointer; }
.om-calc-item:hover { background: var(--bg-subtle); }
.om-calc-item:focus-visible { outline: 2px solid var(--primary); outline-offset: 1px; }
.om-calc-item .muted { font-size: 13px; }
.om-calc-item:disabled { cursor: default; background: transparent; }
.om-calc-item:disabled .om-calc-name { color: var(--text-muted); }
.om-calc-name .badge { margin-left: 8px; vertical-align: 1px; }
.om-calc-name { font-weight: 500; }
/* R0: a card opened from the list, in the middle of the page; greyed while the calculators work it out again */
.om-picked { max-width: 560px; margin: 14px auto 0; text-align: left; }
.om-picked.om-picked-inline { max-width: none; margin: 0; }
.om-picked-card .calc-hero, .om-picked-card .om-picked-result { transition: opacity 0.15s; }
.om-picked-card.working .calc-hero, .om-picked-card.working .om-picked-result { opacity: 0.45; }
.om-picked-line { margin: 0; padding: 0 16px 10px; font-size: 13px; }
.om-picked-line:empty { display: none; }
.om-picked-result > .calc-inputs { border-top: 1px solid var(--border); }
.om-against { margin: 0; padding: 10px 16px 0; font-size: 13px; color: var(--text-secondary); }
.om-against.outside { color: var(--warning-text); font-weight: 500; }
.om-picked-result > .om-against:last-child { padding-bottom: 10px; }
.om-pick-choice { padding: 0 4px 0 8px; }
.om-pick-choice select { border: 0; background: transparent; font: inherit; font-size: 13px; color: var(--text); max-width: 100%; height: 32px; outline: none; }
@media (prefers-reduced-motion: reduce) { .om-picked-card .calc-hero, .om-picked-card .om-picked-result { transition: none; } }
.om-hello-line { margin: 0; font-size: 22px; font-weight: 600; letter-spacing: -0.3px; color: var(--text); overflow-wrap: anywhere; }
#chat-tab.active.empty { justify-content: center; justify-content: safe center; padding-bottom: 12vh; overflow-y: auto; }
/* a tall card opened from Need something calculated scrolls the pane, never clipped above or below (26 Oct 2026) */
#chat-tab.empty > .om-hello { flex-shrink: 0; }
#chat-tab.empty > .page-title, #chat-tab.empty > .om-readings { display: none; }
#chat-tab.empty > .om-scroll { flex: 0 0 auto; padding-top: 0; padding-bottom: 0; }
#chat-tab.empty > .om-scroll:not(:has(> :not([hidden]):not(.chat-log:empty))) { display: none; }
#chat-tab.empty > .composer { margin-bottom: 0; }
/* while Opmate works on a reply: a drop falls and ripples */
.om-thinking { display: flex; align-items: flex-start; gap: 12px; font-size: 14px; color: var(--text-secondary); padding: 4px 0; }
/* what Opmate has done so far, a line a stage (Jase, 19 Oct 2026): the done ones muted, the one under way last */
.om-steps { list-style: none; margin: 0; padding: 8px 0 0; display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.om-steps li { line-height: 1.4; }
.om-steps li.done { color: var(--text-muted); }
.om-steps li.done::before { content: ""; display: inline-block; width: 6px; height: 6px; margin: 0 8px 2px 1px; border-radius: 50%; background: var(--border-input); }
.om-steps li.now::before { content: ""; display: inline-block; width: 6px; height: 6px; margin: 0 8px 2px 1px; border-radius: 50%; background: var(--text-secondary); animation: om-pulse 1.2s ease-in-out infinite; }
@keyframes om-pulse { 50% { opacity: .3; } }
@media (prefers-reduced-motion: reduce) {
  .om-steps li.now::before { animation: none; }
}
.om-water { position: relative; width: 36px; height: 36px; flex-shrink: 0; }
.om-drop { position: absolute; left: 50%; top: 0; width: 9px; height: 9px; margin-left: -4.5px; background: var(--text-secondary); border-radius: 50% 0 50% 50%; transform: rotate(-45deg); animation: om-drop 1.6s ease-in infinite; }
.om-ripple { position: absolute; left: 50%; bottom: 5px; width: 30px; height: 9px; margin-left: -15px; border: 1.5px solid var(--text-muted); border-radius: 50%; opacity: 0; animation: om-ripple 1.6s ease-out infinite; }
.om-ripple.r2 { animation-delay: .3s; }
@keyframes om-drop {
  0% { transform: translateY(0) rotate(-45deg) scale(.5); opacity: 0; }
  15% { opacity: 1; }
  55% { transform: translateY(21px) rotate(-45deg) scale(1); opacity: 1; }
  62%, 100% { transform: translateY(23px) rotate(-45deg) scale(.2); opacity: 0; }
}
@keyframes om-ripple { 0%, 55% { transform: scale(.2); opacity: 0; } 62% { opacity: .9; } 100% { transform: scale(1.15); opacity: 0; } }
@media (prefers-reduced-motion: reduce) {
  .om-drop, .om-ripple { animation: none; }
  .om-drop { top: 12px; }
  .om-ripple { opacity: .6; }
}
/* a new conversation: a soft sheen follows the pointer across the pane, and faint rings spread where it passes,
   like a finger drawn over still water (Jase, 21 Oct 2026). Neutral, behind everything, never in the way of a click;
   only while the pane is empty, only with a mouse, and no rings for anyone who has asked for less motion. */
#chat-tab { position: relative; z-index: 0; }
.om-pond { --mx: 50%; --my: 40%; position: absolute; inset: 0; z-index: -1; overflow: hidden; pointer-events: none; opacity: 0; transition: opacity .4s ease; }
#chat-tab.empty > .om-pond.on { opacity: 1; }
.om-pond::before { content: ""; position: absolute; inset: 0;
  background: radial-gradient(260px circle at var(--mx) var(--my), rgba(120, 140, 160, .10), transparent 70%); }
.om-ring { position: absolute; width: 90px; height: 90px; margin: -45px 0 0 -45px; border: 1px solid var(--text-muted); border-radius: 50%;
  opacity: 0; animation: om-ring 1.8s ease-out forwards; }
@keyframes om-ring { 0% { transform: scale(.15); opacity: .28; } 100% { transform: scale(1.3); opacity: 0; } }
@media (prefers-reduced-motion: reduce) {
  .om-ring { display: none; }
}
/* the chat: a header row, the readings strip, the scrolling conversation, the composer at the foot */
.wrap.om-main { max-width: none; margin: 0; padding: 0; gap: 0; min-width: 0; min-height: 0; background: var(--om-canvas); }
/* Shades of grey (Jase, 19 Oct 2026): the headers and the middle on a very light grey, the side panes a step
   deeper, and everything you read or fill in (replies, cards, forms, entries) on white. */
:root { --om-canvas: #fafafa; --om-side: #f3f3f4; --om-bubble: #ececee; }
.site-bar, .app-header { flex-shrink: 0; background: var(--om-canvas); }
/* migration 72: the update notice across the top, black with white words (Jase, 30 Oct 2026) */
.om-notice { flex-shrink: 0; display: flex; align-items: center; gap: 12px; padding: 8px 8px 8px 28px; background: var(--text); color: var(--bg); font-size: 14px; line-height: 1.4; }
.om-notice[hidden] { display: none; }
/* step D: the demo strip across the top, under any notice, quieter than it */
.om-demo { flex-shrink: 0; padding: 10px 28px; background: var(--om-side); border-bottom: 1px solid var(--border); font-size: 14px; line-height: 1.4; overflow-wrap: anywhere; }
.om-demo[hidden] { display: none; }
@media (max-width: 600px) { .om-demo { padding-left: 14px; padding-right: 14px; } }
.om-notice-words { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.om-notice-close { flex-shrink: 0; width: 44px; height: 44px; border: 0; border-radius: var(--r-pill); background: transparent; color: var(--bg); font-size: 24px; line-height: 1; cursor: pointer; }
.om-notice-close:hover { background: rgba(255, 255, 255, .15); }
.om-notice-close:focus-visible { outline: 2px solid var(--bg); outline-offset: -4px; }
@media (max-width: 600px) { .om-notice { padding-left: 14px; } }
.site-bar.om-disclaimer { display: block; height: auto; border: 0; background: transparent; padding: 4px 16px calc(14px + env(safe-area-inset-bottom, 0px)); margin: 0; text-align: center; font-size: 12px; line-height: 1.4; color: var(--text-muted); }
.site-bar.om-disclaimer a { color: inherit; text-decoration: underline; }
/* search, About Opmate and Help: three icons in one pill (Jase, 20 Oct 2026, in place of the design system's
   labelled pills); each button keeps its name for screen readers and as its tooltip */
.om-tools { display: inline-flex; align-items: center; gap: 2px; padding: 3px; border: 1px solid var(--border-input); border-radius: var(--r-pill); background: var(--bg); }
.om-tools .hbtn { width: 34px; height: 34px; padding: 0; gap: 0; justify-content: center; border: 0; background: transparent; }
.om-tools .hbtn:hover, .om-tools .hbtn[aria-expanded="true"] { background: var(--bg-subtle); }
.om-tools .hbtn .hbtn-icon { width: 26px; height: 26px; }
@media (max-width: 768px) {
  .om-tools { padding: 1px; gap: 0; }
  .om-tools .hbtn { width: 44px; height: 44px; background: transparent; }
  .om-tools .hbtn .hbtn-icon { width: 32px; height: 32px; }
  .om-tools .hbtn .hbtn-icon.i { font-size: 15px; }
  .om-tools .hbtn .hbtn-icon svg { width: 17px; height: 17px; }
}
.om-pane, .om-pane-head, .om-pane-foot { background: var(--om-side); }
.msg.op { background: var(--om-bubble); }
/* the left pane's sections, with a line between each */
.om-rule { border: 0; border-top: 1px solid var(--border); margin: 0 -16px; }
#duty-block[hidden] + .om-rule { display: none; }
/* a viewer reads only (docs/PLATFORM_PLAN.md I1): nothing to ask, add, rate or change */
body.om-viewer #composer, body.om-viewer #new-btn, body.om-viewer #duty-block, body.om-viewer #duty-block + .om-rule,
body.om-viewer #entry-form, body.om-viewer .msg-foot, body.om-viewer .calc-note, body.om-viewer .calc-rerun,
body.om-viewer .om-danger, body.om-viewer .om-write { display: none !important; }
/* log forms in the form library (F1): each field a block of its own, a line between */
.om-form-fields { display: flex; flex-direction: column; }
.om-form-field { border-top: 1px solid var(--border); padding: 12px 0; display: flex; flex-direction: column; gap: 10px; }
.om-form-field:first-child { border-top: 0; padding-top: 4px; }
.om-form-field-foot { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; }
.om-fill-flag:empty { display: none; }
.om-fill-flag { display: flex; flex-direction: column; gap: 4px; margin-top: 6px; }
.om-fill-line { margin: 0; font-size: 13px; line-height: 1.4; padding: 6px 10px; border-radius: 8px; }
.om-fill-line.warn { background: var(--warning-bg); color: var(--warning-text); border: 1px solid var(--warning-border); }
.om-fill-line.bad { background: var(--danger-bg); color: var(--danger-ink); border: 1px solid var(--danger-border); }
.om-form-field-foot .om-pick { margin-right: auto; }
/* the logo beside the wordmark (Jase, 19 Oct 2026) */
.om-logo { width: 28px; height: 28px; flex-shrink: 0; display: block; }
/* on a narrow phone the five header buttons leave room for the logo only: the wordmark is kept for screen readers */
@media (max-width: 420px) {
  .app-header .app-title { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
}
/* your status as a strip in the header, desktop only (Jase, 19 Oct 2026): with all three panes (over 1200 px); narrower,
   it stays in the left pane */
.om-status-home { display: flex; flex-direction: column; gap: 14px; }
.om-status-slot { display: none; }
@media (min-width: 1201px) {
  .app-header .om-title-row { flex-shrink: 0; }
  .om-status-slot { display: flex; align-items: center; min-width: 0; padding-right: 12px; margin-right: 4px; border-right: 1px solid var(--border); }
  .om-status-slot:not(:has(> :not([hidden]))) { display: none; }
  .om-status-slot #duty-block { flex-direction: row; align-items: center; gap: 10px; background: transparent; border: 0; border-radius: 0; padding: 0; min-width: 0; }
  .om-status-slot .om-label { white-space: nowrap; }
  .om-status-slot .om-status { grid-auto-flow: column; grid-template-columns: none; height: 36px; }
  .om-status-slot .om-status button { height: 30px; padding: 0 12px; white-space: nowrap; }
  .om-status-slot .om-duty-who { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
  /* the strip starts beside the title so the line after it has room for the time (Jase, 20 Oct 2026) */
  /* Jase, 5 Dec 2026: with the duty selector switched off the slot goes, and search, help and the version stay right */
  .app-header .header-actions { flex: 1 1 auto; min-width: 0; margin-left: 28px; justify-content: flex-end; }
  .om-status-slot { margin-right: auto; border-right: 0; }
  .om-status-slot .om-duty-actions { flex-direction: row; flex-shrink: 0; }
  .om-status-slot .om-duty-actions .btn { width: auto; height: 32px; padding: 0 14px; font-size: 13px; white-space: nowrap; }
}
@media (max-width: 1360px) {
  .om-status-slot .om-label { display: none; }
}
.om-history .om-pane-body > * { flex-shrink: 0; }
.om-main > .tab-content.active { flex: 1; min-height: 0; gap: 0; }
#chat-tab > .page-title { padding: 14px 28px 12px; border-bottom: 1px solid var(--border); }
#chat-tab > .page-title h2 { font-size: 18px; letter-spacing: -0.2px; overflow-wrap: anywhere; }
.om-readings { padding: 10px 28px; border-bottom: 1px solid var(--border); display: flex; flex-direction: column; gap: 6px; }
.om-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.om-chip { display: inline-flex; align-items: baseline; gap: 6px; max-width: 100%; border: 1px solid var(--border-input); border-radius: var(--r-pill); padding: 3px 10px; font-size: 12.5px; color: var(--text-secondary); background: var(--bg); }
.om-chip b { font-family: var(--font-mono); font-weight: 500; color: var(--text); white-space: nowrap; }
.om-scroll { flex: 1; min-height: 0; overflow-y: auto; padding: 20px 28px; display: flex; flex-direction: column; gap: 14px; }
.om-scroll > *, #chat-tab > .composer { width: 100%; max-width: 860px; margin-left: auto; margin-right: auto; }
#chat-tab > .composer { flex-shrink: 0; margin-bottom: 4px; width: calc(100% - 56px); }
.om-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
#chat-tab > .composer .card-body { padding: 10px 12px; display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: end; gap: 10px; }
#chat-tab > .composer .field { min-width: 0; }
#chat-tab > .composer textarea { width: 100%; }
/* a closed About or Settings panel sits just off the right edge; its shadow mustn't show on the page */
.right-panel:not(.open) { box-shadow: none; }
#chat-tab > .composer .composer-row { margin: 0; flex-direction: row; align-items: flex-end; gap: 8px; }
#chat-tab > .composer .composer-row .om-calc-btn { margin-right: 0; }
/* the calculations list and a card opened from it sit just above the box, with or without a conversation */
#chat-tab > .om-calc-pick, #chat-tab > .om-picked { flex-shrink: 0; width: calc(100% - 56px); max-height: 55vh; overflow-y: auto; margin-bottom: 10px; }
.composer textarea { min-height: 48px; max-height: 40vh; resize: none; }
/* your plant */
.om-block { background: var(--bg); border: 1px solid var(--border); border-radius: 16px; padding: 14px 16px; display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.om-plant-name { font-size: 15px; font-weight: 600; }
.om-facts { margin: 0; display: flex; flex-direction: column; gap: 8px; }
.om-credit-item + .om-credit-item { margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--border); }
.om-facts div, .om-control dl div { display: grid; grid-template-columns: 92px minmax(0, 1fr); gap: 8px; font-size: 13px; line-height: 1.45; }
.om-facts dt, .om-control dt { color: var(--text-secondary); }
.om-facts dd, .om-control dd { margin: 0; color: var(--text); overflow-wrap: anywhere; }
.om-fold { border-top: 1px solid var(--border); padding-top: 8px; font-size: 13px; }
.om-fold summary { cursor: pointer; color: var(--text-secondary); font-weight: 500; padding: 4px 0; min-height: 28px; }
.om-fold .om-label { margin-top: 8px; }
.om-fold ul { margin: 4px 0 0; padding-left: 18px; color: var(--text); }
.om-fold li { margin: 2px 0; }
.om-controls { display: flex; flex-direction: column; }
.om-control { border-top: 1px solid var(--border); padding: 10px 0; }
.om-control:first-child { border-top: 0; padding-top: 0; }
.om-control:last-child { padding-bottom: 0; }
.om-control-head { display: flex; flex-direction: column; align-items: flex-start; gap: 6px; margin-bottom: 6px; }
.om-line { display: block; }
.om-control-name { font-size: 14px; font-weight: 600; }
.om-control-where { display: block; font-size: 12px; font-weight: 400; color: var(--text-muted); }
.om-control-badges { display: flex; flex-wrap: wrap; gap: 6px; }
.om-control.ccp .om-control-name { font-size: 15px; }
.om-control dl { margin: 0; display: flex; flex-direction: column; gap: 4px; }
.om-calcs { display: flex; flex-direction: column; gap: 6px; }
.om-calc { display: flex; flex-direction: column; gap: 2px; text-align: left; width: 100%; border: 1px solid var(--border); border-radius: var(--r-md); background: var(--bg); padding: 8px 10px; font: inherit; cursor: pointer; color: var(--text); }
.om-calc:hover { background: var(--bg-subtle); }
.om-calc-title { font-size: 13px; font-weight: 500; }
.om-calc-value { font-family: var(--font-mono); font-size: 13px; color: var(--text-secondary); }
.om-calc.superseded { opacity: 0.6; }
/* the plant log (L1): the form, then the entries, day by day */
.om-views { width: 100%; }
.om-main > #log-tab.active { flex: 1; min-height: 0; gap: 0; }
#log-tab > .page-title { padding: 14px 28px 12px; border-bottom: 1px solid var(--border); }
#log-tab > .page-title h2 { font-size: 18px; letter-spacing: -0.2px; }
.om-hint { font-size: 12px; }
.om-entry-form .card-body { display: flex; flex-direction: column; gap: 12px; }
.om-entry-text textarea { width: 100%; min-height: 76px; resize: vertical; font: inherit; font-size: 15px; line-height: 1.5; padding: 10px 12px; border: 1px solid var(--border-input); border-radius: var(--r-md); background: var(--bg); color: var(--text); box-sizing: border-box; }
.om-entry-readings { display: flex; flex-direction: column; gap: 8px; }
.om-entry-readings:empty { display: none; }
.om-reading-row { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, 1.5fr) minmax(0, 0.8fr) minmax(0, 0.7fr) auto; gap: 8px; align-items: center; }
.om-reading-row input { width: 100%; height: var(--h-control); border: 1px solid var(--border-input); border-radius: var(--r-md); padding: 0 10px; font: inherit; font-size: 14px; background: var(--bg); color: var(--text); box-sizing: border-box; min-width: 0; }
.om-reading-row input.mono { font-family: var(--font-mono); }
.om-entry-foot { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; padding: 0; }
.om-correcting { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; }
.om-correcting p { margin: 0; }
.om-log { display: flex; flex-direction: column; gap: 10px; }
.om-log > .om-label { padding-top: 8px; padding-left: 17px; }
.om-entry { background: var(--bg); border: 1px solid var(--border); border-radius: 16px; padding: 12px 16px; display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.om-entry-meta { display: flex; align-items: center; flex-wrap: wrap; gap: 6px 10px; font-size: 13px; color: var(--text-secondary); }
.om-entry-time { font-family: var(--font-mono); color: var(--text); }
.om-entry-text-out { margin: 0; font-size: 15px; line-height: 1.55; white-space: pre-wrap; overflow-wrap: anywhere; }
.om-entry.corrected > .om-entry-text-out { text-decoration: line-through; color: var(--text-muted); }
.om-entry .om-chips .om-chip.flag { border-color: var(--warning-border); background: var(--warning-bg); color: var(--warning-text); }
.om-entry-check { margin: 0; font-size: 13px; color: var(--warning-text); }
.om-entry .register { background: var(--bg-subtle); border: 1px solid var(--border-input); border-radius: var(--r-lg); padding: 12px 14px; font-size: 14px; }
.om-entry .register p, .om-entry .note p { margin: 0; }
.om-entry-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.om-entry-actions .btn { height: 32px; padding: 0 14px; font-size: 13px; }
.om-entry .om-entry { border: 0; border-top: 1px solid var(--border); border-radius: 0; padding: 10px 0 0; }
.om-entry details summary { cursor: pointer; font-size: 13px; color: var(--text-secondary); }
/* duty and handovers (L2) */
.om-history .om-block { border-radius: var(--r-lg); padding: 12px 14px; gap: 6px; }
.om-duty-who { font-size: 13px; color: var(--text-secondary); overflow-wrap: anywhere; }
/* your status (L6): Duty, On site, On call, Off */
.om-status { grid-auto-flow: row; grid-template-columns: 1fr 1fr; height: auto; gap: 2px; }
.om-status button { height: calc(var(--h-control) - 6px); padding: 0 6px; min-width: 0; }
/* the status pressed shows at once, with a small pulsing dot until the server has it */
.om-status button.om-saving::after { content: ''; display: inline-block; width: 6px; height: 6px; margin-left: 6px; border-radius: 50%; background: currentColor; vertical-align: middle; animation: om-saving 1s ease-in-out infinite; }
@keyframes om-saving { 50% { opacity: .2; } }
@media (prefers-reduced-motion: reduce) {
  .om-status button.om-saving::after { animation: none; }
}
#rail-learnings { font-size: 13px; line-height: 1.45; }
#rail-learnings li { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.om-people { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; font-size: 13px; }
.om-people li { display: flex; justify-content: space-between; gap: 8px; flex-wrap: wrap; }
.om-people .om-person { font-weight: 500; color: var(--text); overflow-wrap: anywhere; }
/* F3: the forms due this shift, day or week, in the plant log's right-hand pane */
.om-forms-pinned { display: flex; flex-direction: column; gap: 6px; }
.om-rail-links { display: flex; flex-wrap: wrap; gap: 4px 16px; }
/* All forms (Jase, 29 Oct 2026): a form a row, its name and what it holds, Pin and Fill it in on the right; the site
   admin's Change this form folded under it */
.om-form-row { display: flex; flex-direction: column; gap: 8px; padding: 12px 0; border-top: 1px solid var(--border); }
.om-form-row:first-child { border-top: 0; }
.om-form-row-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 12px; }
.om-form-row-acts { display: flex; flex-wrap: wrap; gap: 8px; }
.om-forms-all { display: flex; flex-direction: column; gap: 12px; }
.om-form-row-title { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.om-form-row-title .om-ce-where { font-size: 13px; color: var(--text-secondary); }
.om-form-row .om-form-edit:not([open]) { display: none; }   /* opened by Change, its summary not needed */
.om-form-row .om-form-edit > summary { display: none; }
.om-form-pin-line { font-size: 13px; }
div.om-calc { cursor: default; }
div.om-calc:hover { background: var(--bg); }
.om-duty-actions { display: flex; flex-direction: column; gap: 8px; }
.om-duty-actions .btn { width: 100%; justify-content: center; }
.om-waiting { display: flex; flex-direction: column; gap: 10px; }
.om-waiting:empty { display: none; }
/* a small title over what waits on you, like a notification area (Jase, 20 Oct 2026); none when nothing waits */
.om-attention { margin: 4px auto -4px; padding-left: 17px; }   /* auto: centred with the log on a wide screen, as .om-scroll > * */
/* in line with the text inside the cards below (Jase, 21 Oct 2026) */
.om-attention:has(+ .om-waiting:empty) { display: none; }
.om-pending summary { cursor: pointer; font-size: 14px; font-weight: 500; color: var(--text); min-height: 28px; }
.om-pending .om-hint { margin: 4px 0 8px; }
.om-handover { display: flex; flex-direction: column; gap: 8px; }
/* plant setup (P1) */
.om-main > #setup-tab.active { flex: 1; min-height: 0; gap: 0; }
#setup-tab > .page-title { padding: 14px 28px 12px; border-bottom: 1px solid var(--border); }
#setup-tab > .page-title h2 { font-size: 18px; letter-spacing: -0.2px; }
.om-main > #learnings-tab.active, .om-main > #runs-tab.active { flex: 1; min-height: 0; gap: 0; }
#learnings-tab > .page-title, #runs-tab > .page-title { padding: 14px 28px 12px; border-bottom: 1px solid var(--border); }
#learnings-tab > .page-title h2, #runs-tab > .page-title h2 { font-size: 18px; letter-spacing: -0.2px; }
#learnings-tab > .om-scroll, #runs-tab > .om-scroll { padding: 18px 28px 28px; }
#learnings-tab .card-body, #runs-tab .card-body { display: flex; flex-direction: column; gap: 12px; }
#learnings-tab .om-learnings { margin-bottom: 0; }
#learnings-tab .om-items li { font-size: 14px; line-height: 1.5; padding: 10px 0; border-top: 1px solid var(--border); }
#learnings-tab .om-items li:first-child { border-top: 0; padding-top: 0; }
/* date and time inputs, as the design system's other inputs (its stylesheet leaves them out) */
.field input[type=datetime-local], .field input[type=time] { width: 100%; height: var(--h-control); border: 1px solid var(--border-input); border-radius: var(--r-md); background: var(--bg); font: inherit; font-size: 14px; color: var(--text); padding: 0 12px; box-sizing: border-box; font-family: var(--font-mono); }
/* greyed, for something that can't be changed */
.om-locked { opacity: .55; }
.om-locked a.btn { pointer-events: none; }
#setup-body { display: flex; flex-direction: column; gap: 18px; }
/* Set-up's quick links (Jase, 20 Oct 2026): a contents list on the left that stays put; narrower, a row of links at the top */
#setup-scroll > .om-setup-wrap { max-width: 1100px; display: grid; grid-template-columns: 180px minmax(0, 1fr); gap: 24px; align-items: start; }
.om-setup-main { display: flex; flex-direction: column; gap: 14px; min-width: 0; }
#setup-body .card { scroll-margin-top: 12px; }
.om-toc { position: sticky; top: 0; display: flex; flex-direction: column; gap: 2px; padding-top: 4px; }
.om-toc:empty { display: none; }
.om-toc button { border: 0; background: transparent; text-align: left; font: inherit; font-size: 13px; color: var(--text-secondary); padding: 7px 10px; border-radius: 8px; cursor: pointer; min-height: 32px; }
.om-toc button:hover { color: var(--text); background: var(--bg-subtle); }
.om-toc button.on { color: var(--text); font-weight: 600; background: var(--bg-subtle); }
.om-toc button:focus-visible { outline: none; box-shadow: 0 0 0 3px var(--focus-ring); }
@media (max-width: 1100px) {
  #setup-scroll > .om-setup-wrap { grid-template-columns: minmax(0, 1fr); gap: 10px; }
  .om-toc { flex-direction: row; overflow-x: auto; background: var(--om-canvas); z-index: 2; padding: 4px 0 8px; margin-top: -4px; scrollbar-width: none; top: -14px; box-shadow: 0 -14px 0 0 var(--om-canvas); }
  .om-toc button { white-space: nowrap; flex-shrink: 0; }
  #setup-body .card { scroll-margin-top: 56px; }
}
.om-setup .card-body { display: flex; flex-direction: column; gap: 18px; }
/* spacing (Jase, 19 Oct 2026): a line between sections always has room on both sides; nothing sits on a line */
.om-setup .card-body > .om-hint { margin: -8px 0 0; }
.om-setup .fields { gap: 16px 18px; }
/* the Set-up defects brief (Jase, 11 Nov 2026: "looks low rent"): a label that wraps takes the space above its box, so
   the boxes in a row sit level */
/* Jase, 11 Nov 2026 ("ridiculous overlong title which wraps and ruins the alignment"): a Set-up label is one line, so the
   boxes in a row sit level whatever is under them; the labels are short, the sentence goes under the box (`help`),
   and a label longer than its column ends in "…" with the whole label on hover */
.om-setup .fields > .field > label { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.om-setup .fields > .field[hidden] { display: none; }
/* a list of questions (the protections): one a row, the question beside its answer, free to wrap */
.om-setup .fields.om-rows { grid-template-columns: minmax(0, 1fr); gap: 8px; }
.om-setup .fields.om-rows > .field { display: grid; grid-template-columns: minmax(0, 1fr) minmax(120px, 160px); align-items: center; gap: 12px; }
.om-setup .fields.om-rows > .field > label { white-space: normal; }
/* the same day: room between a unit's fields, its "no meter fitted" ticks, its meter lines and its hints */
.om-pfd-panel { display: flex; flex-direction: column; gap: 12px; }
.om-pfd-panel > .om-pfd-panel-head { margin-bottom: 0; }
.om-pfd-panel > p.om-hint { margin: 0; }
/* and inside a fold (Retire this control, Retire this form): its hint, its reason and its button apart */
.om-retire > * + * { margin-top: 10px; }
.om-setup .om-retire, .om-setup .om-moves { margin-top: 12px; }
.om-setup .om-fold { padding-top: 14px; }
.om-setup .om-fold[open] > summary { margin-bottom: 6px; }
.om-setup h4.om-label { margin: 6px 0 -6px; }
.om-picks { display: flex; flex-wrap: wrap; gap: 8px; }
/* the plant card's two groups (Jase, 11 Nov 2026: "no spacing between sub-titles and the checkboxes"): each sub-title
   with room above it and its ticks below it */
.om-source-picks { display: flex; flex-direction: column; gap: 8px; }
.om-setup .om-source-picks h4.om-label { margin: 10px 0 0; }
.om-setup .om-source-picks h4.om-label:first-child { margin-top: 0; }
.om-source-picks .om-hint { margin: -4px 0 0; }
.om-pick { display: inline-flex; align-items: center; gap: 8px; min-height: 36px; padding: 0 12px; border: 1px solid var(--border-input); border-radius: var(--r-pill); font-size: 14px; cursor: pointer; background: var(--bg); }
.om-pick input { margin: 0; }
/* Opmate's checkboxes (Jase, 19 Oct 2026: the browser's own were barely visible): ink outline, ink fill with a white
   tick when ticked */
.om-pick input[type=checkbox], .om-unit input[type=checkbox] { -webkit-appearance: none; appearance: none; flex-shrink: 0; width: 20px; height: 20px; margin: 0; border: 2px solid var(--text); border-radius: 5px; background: var(--bg) center / 14px 14px no-repeat; cursor: pointer; }
.om-pick input[type=checkbox]:checked, .om-unit input[type=checkbox]:checked { background-color: var(--text); background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M3 8.5l3.2 3L13 4.5' fill='none' stroke='%23fff' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E"); }
.om-pick input[type=checkbox]:focus-visible, .om-unit input[type=checkbox]:focus-visible { outline: none; box-shadow: 0 0 0 3px var(--focus-ring); }
.om-pick input[type=checkbox]:disabled, .om-unit input[type=checkbox]:disabled { opacity: 0.55; cursor: default; }
/* the process flow diagram on Plant set-up (Jase, 21 Oct 2026): every unit the same size and fixed in place, the
   picked one outlined in ink; details beside the diagram when the card is wide enough, below it when not */
.om-pfd-box { container-type: inline-size; }
.om-pfd-wrap { display: grid; grid-template-columns: minmax(0, 1fr); gap: 16px; margin: 4px 0 16px; }
@container (min-width: 500px) { .om-pfd-wrap { grid-template-columns: 230px minmax(0, 1fr); } .om-pfd-side { position: sticky; top: 8px; align-self: start; } }
.om-pfd { display: flex; flex-direction: column; min-width: 0; }
.om-pfd-group { display: flex; flex-direction: column; }
.om-pfd-node { position: relative; display: grid; grid-template-columns: 20px minmax(0, 1fr); align-items: center; gap: 6px; box-sizing: border-box; width: 100%; height: 60px; padding: 0 12px 0 6px; text-align: left; border: 1px solid var(--border); border-radius: var(--r-md); background: var(--bg); color: var(--text); font: inherit; cursor: pointer; }
.om-pfd-node + .om-pfd-node { margin-top: 22px; }
.om-pfd-node + .om-pfd-node::before { content: "↓"; position: absolute; left: 0; right: 0; top: -20px; text-align: center; color: var(--text-muted); font-size: 13px; line-height: 18px; pointer-events: none; }
.om-pfd-node:hover { border-color: var(--text-muted); }
.om-pfd-node.on { border-color: var(--text); box-shadow: inset 0 0 0 1px var(--text); }
.om-pfd-node.dragging { opacity: .7; }
.om-pfd-handle { color: var(--text-muted); font-size: 14px; text-align: center; cursor: grab; touch-action: none; user-select: none; line-height: 60px; }
.om-pfd-text { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.om-pfd-name, .om-pfd-spec { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.om-pfd-name { font-weight: 600; font-size: 14px; }
.om-pfd-spec { font-size: 12px; color: var(--text-secondary); }
.om-pfd-over { color: var(--warning-text); }
.om-pfd-heading { margin: 22px 0 8px; padding: 0; font-size: 12px; font-weight: 600; color: var(--text-secondary); text-align: left; }
.om-pfd-side { min-width: 0; }
.om-pfd-panel { border: 1px solid var(--border); border-radius: var(--r-md); padding: 12px 14px; background: var(--bg); }
.om-pfd-panel-head { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 8px; margin-bottom: 10px; }
.om-pfd-panel-title { font-weight: 600; font-size: 14px; }
.om-pfd-moves { display: flex; gap: 6px; }
.om-unit { display: grid; grid-template-columns: auto minmax(0, 1fr) 88px; gap: 12px; align-items: center; padding: 10px 0; border-top: 1px solid var(--border); font-size: 14px; }
.om-unit:first-of-type { border-top: 0; }
.om-unit .muted { display: block; font-size: 12px; }
.om-unit input[type=number], .om-vals input, .om-chem-row input, .om-chem-row select { width: 100%; height: var(--h-control); border: 1px solid var(--border-input); border-radius: var(--r-md); padding: 0 10px; font: inherit; font-size: 14px; font-family: var(--font-mono); background: var(--bg); color: var(--text); box-sizing: border-box; min-width: 0; }
.om-chem-row select, .om-chem-row input.text { font-family: inherit; }
.om-unit input:disabled, .om-vals input:disabled, .om-chem-row input:disabled, .om-chem-row select:disabled { background: var(--bg-subtle); color: var(--text-secondary); }
.om-chem-list { display: flex; flex-direction: column; gap: 14px; }
.om-chem { border: 1px solid var(--border); border-radius: var(--r-lg, 10px); padding: 16px; display: block; background: var(--bg); }
.om-chem > * + * { margin-top: 14px; }
.om-chem-summary { cursor: pointer; flex-wrap: wrap; list-style: none; }
.om-chem-summary::-webkit-details-marker { display: none; }
.om-chem-summary::before { content: '\25B8'; color: var(--text-secondary); margin-right: 2px; }
details[open] > .om-chem-summary::before { content: '\25BE'; }
.om-chem-summary .om-chem-name { color: var(--text); }
.om-chem-where { flex-basis: 100%; font-size: 13px; }
.om-unit-editor-inline { margin: 6px 0 4px; }
.om-chem-name { font-size: 15px; font-weight: 600; }
.om-chem-group { display: flex; flex-direction: column; gap: 8px; padding-top: 12px; border-top: 1px solid var(--border); }
.om-chem-group-title { font-size: 13px; font-weight: 600; color: var(--text); }
.om-chem-row { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px 12px; }
.om-chem-row.om-two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
/* Jase, 28 Oct 2026: a chemical's dose points sit under it, each a box of its own with everything for that place */
.om-dose-title { padding-top: 12px; border-top: 1px solid var(--border); }
.om-dose-list { display: flex; flex-direction: column; gap: 12px; }
.om-dose-point { border: 1px solid var(--border); border-radius: var(--r-md); padding: 12px 14px; display: flex; flex-direction: column; gap: 12px; background: var(--bg-subtle); }
.om-dose-point .om-chem-group:first-of-type { border-top: 0; padding-top: 0; }
.om-dose-name { font-size: 14px; font-weight: 600; }
.om-cf { display: flex; flex-direction: column; gap: 4px; font-size: 12px; color: var(--text-secondary); min-width: 0; }
.om-cf[hidden] { display: none; }
.om-cf > span:first-child { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.om-vals { display: grid; grid-template-columns: minmax(0, 1.6fr) repeat(3, minmax(0, 1fr)); gap: 10px; align-items: center; padding: 10px 0; border-top: 1px solid var(--border); font-size: 14px; }
.om-vals.head { border-top: 0; font-size: 12px; color: var(--text-muted); font-weight: 600; padding: 2px 0 0; }
.om-water-group { display: flex; flex-direction: column; }
.om-water-group + .om-water-group { border-top: 1px solid var(--border); padding-top: 18px; margin-top: 6px; }
.om-water-group > .om-sum-head { margin-bottom: 8px; }
.om-vals .u { display: block; font-size: 12px; color: var(--text-muted); }
/* the control register: CCPs first and heaviest, then operational and supporting controls; each control folds out */
.om-reg-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }
.om-reg-group { display: flex; flex-direction: column; gap: 10px; }
.om-reg-group + .om-reg-group { margin-top: 6px; }
.om-reg-group > h4 { margin: 0; font-size: 13px; font-weight: 600; color: var(--text-secondary); }
.om-controls-edit { display: flex; flex-direction: column; gap: 18px; }
.om-control-edit { border: 1px solid var(--border); border-radius: var(--r-lg); background: var(--bg); }
.om-control-edit.ccp { border-color: var(--border-input); box-shadow: 0 1px 2px rgba(13,15,20,.06); }
.om-control-edit > summary { list-style: none; cursor: pointer; display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 6px 14px; padding: 14px 16px; min-height: 44px; }
.om-control-edit > summary::-webkit-details-marker { display: none; }
.om-control-edit .om-ce-title { display: flex; align-items: baseline; flex-wrap: wrap; gap: 4px 10px; min-width: 0; }
.om-control-edit .om-ce-name { font-size: 15px; font-weight: 600; color: var(--text); }
.om-control-edit.ccp .om-ce-name { font-size: 16px; }
.om-control-edit .om-ce-where { font-size: 13px; color: var(--text-secondary); }
.om-control-edit .om-ce-limits { grid-column: 1; font-family: var(--font-mono); font-size: 12.5px; color: var(--text-secondary); overflow-wrap: anywhere; }
.om-control-edit .om-ce-open { grid-column: 2; grid-row: 1 / span 2; display: inline-flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 500; color: var(--text-secondary); white-space: nowrap; }
.om-control-edit .om-ce-open::after { content: ''; width: 8px; height: 8px; border-right: 1.5px solid var(--text-secondary); border-bottom: 1.5px solid var(--text-secondary); transform: rotate(45deg) translateY(-2px); transition: transform .15s; }
.om-control-edit[open] .om-ce-open::after { transform: rotate(-135deg) translateY(-2px); }
.om-control-edit > summary:hover .om-ce-open { color: var(--text); }
.om-control-edit > summary:focus-visible { outline: none; box-shadow: 0 0 0 3px var(--focus-ring); border-radius: var(--r-lg); }
.om-control-edit[open] > summary { border-bottom: 1px solid var(--border); }
.om-ce-body { padding: 18px 16px 18px; display: flex; flex-direction: column; gap: 18px; }
.badge.ink { background: var(--text); color: var(--bg); }
.om-control-edit .om-ce-rule { grid-column: 1; font-size: 12.5px; color: var(--text-secondary); }
.om-control-edit .om-ce-rule.looser { color: var(--warning-text); font-weight: 500; }
.om-rules-check > summary { cursor: pointer; font-weight: 500; }
.om-rules-check ul { margin: 10px 0 6px; padding-left: 20px; display: flex; flex-direction: column; gap: 6px; }
.om-rules-check p { margin: 0; font-size: 13px; }
.om-rules-check + .om-rules-check { margin-top: 8px; }
.om-tier { border-top: 1px solid var(--border); padding-top: 18px; display: flex; flex-direction: column; gap: 14px; }
.om-tier > h4.om-label { margin: 0; font-size: 13px; color: var(--text); }
.om-setup textarea { width: 100%; font: inherit; font-size: 14px; line-height: 1.5; padding: 8px 10px; border: 1px solid var(--border-input); border-radius: var(--r-md); background: var(--bg); color: var(--text); box-sizing: border-box; resize: vertical; }
.om-setup textarea:disabled { background: var(--bg-subtle); color: var(--text-secondary); }
.om-setup-foot { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; padding: 12px 28px; border-top: 1px solid var(--border); background: var(--bg); }
.om-setup-problems { flex: 1 1 100%; margin: 0; max-height: 32vh; overflow-y: auto; }
.om-setup-problems ul { margin: 4px 0; padding-left: 20px; }
.om-setup-problems .btn-link { text-align: left; }
.card.om-not-saved { border-color: var(--danger-border); box-shadow: 0 0 0 1px var(--danger-border); }
@media (max-width: 768px) {
  #setup-tab > .page-title, .om-setup-foot, #learnings-tab > .page-title, #learnings-tab > .om-scroll, #runs-tab > .page-title, #runs-tab > .om-scroll { padding-left: 14px; padding-right: 14px; }
  .om-chem-row { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .om-chem { padding: 14px 12px; }
  .om-setup dl.om-facts > div { grid-template-columns: minmax(0, 1fr); gap: 2px; }
  .om-vals { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .om-vals > span:first-child { grid-column: 1 / -1; }
  .om-vals.head > span:first-child { display: none; }
}
/* a summary of the log (handover, weekly summary): sections badged by kind, the most important first */
.om-summary { display: flex; flex-direction: column; gap: 12px; }
.om-sum-section { display: flex; flex-direction: column; gap: 6px; }
.om-sum-head { display: flex; align-items: center; gap: 8px; }
.om-sum-head .muted { font-size: 12px; }
.om-sum-items { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 6px; }
.om-sum-item { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 4px 10px; align-items: baseline; font-size: 14px; line-height: 1.45; }
.om-sum-item .om-entry-time { font-size: 12.5px; color: var(--text-secondary); white-space: nowrap; }
.om-sum-item .om-chips { grid-column: 2; }
.om-sum-section.top .om-sum-item { font-size: 15px; font-weight: 500; }
.om-sum-section.top .om-sum-item .om-entry-time { font-weight: 400; }
.om-sum-section + .om-sum-section { border-top: 1px solid var(--border); padding-top: 10px; }
/* the plant log by kind of entry, weekly summaries and handovers included (Jase, 19 Oct 2026) */
.om-log-filter { flex-direction: row; align-items: center; gap: 10px; margin: 0; }
.om-log-filter label { margin: 0; white-space: nowrap; }
.om-log-filter select { width: auto; min-width: 200px; }
.om-log-buttons { display: flex; gap: 8px; flex-wrap: wrap; }
/* the work area (Jase, 20 Oct 2026): set apart from the log on a grey desk, one thing in it at a time; closed, it is
   one bar to start an entry or a form */
.om-desk { background: var(--bg-subtle); border: 1px solid var(--border); border-radius: 20px; padding: 10px; display: flex; flex-direction: column; gap: 10px; }
.om-desk:not(:has(> :not([hidden]))) { display: none; }
/* closed, the bar stays at the top as the log scrolls (Jase, 20 Oct 2026); an open card scrolls with the page */
.om-desk:has(> #log-compose:not([hidden])) { position: sticky; top: -8px; z-index: 3; box-shadow: 0 -6px 0 12px var(--om-canvas); }
/* stuck, a clear gap below the title's line (Jase, 20 Oct 2026) */
@media (max-width: 768px) {
  .om-desk:has(> #log-compose:not([hidden])) { top: -4px; box-shadow: 0 -5px 0 10px var(--om-canvas); }
}
/* where scrolling content meets a fixed box, a soft fade (Jase, 20 Oct 2026, as Claude's own chat does), shown only
   while content runs under it; at rest there is a clear gap */
.om-desk:has(> #log-compose:not([hidden]))::after { content: ""; position: absolute; left: -12px; right: -12px; top: calc(100% + 1px); height: 32px; background: linear-gradient(var(--om-canvas), rgba(250, 250, 250, 0)); pointer-events: none; opacity: 0; transition: opacity .15s; }
#log-scroll.om-scrolled .om-desk:has(> #log-compose:not([hidden]))::after { opacity: 1; }
#chat-tab > .composer { position: relative; margin-top: 4px; }
#chat-tab > .composer::before { content: ""; position: absolute; left: -12px; right: -12px; bottom: calc(100% + 4px); height: 48px; background: linear-gradient(rgba(250, 250, 250, 0), var(--om-canvas) 85%); pointer-events: none; opacity: 0; transition: opacity .15s; }
#chat-tab.om-more-below:not(.empty) > .composer::before { opacity: 1; }
/* your handover not yet posted: marked as waiting for you, as one waiting to be acknowledged is */
.btn.om-due { background: var(--warning-bg); border-color: var(--warning-border); color: var(--warning-ink); }
.btn.om-due:hover { background: var(--warning-bg); border-color: var(--warning); }
.om-label .badge { margin-left: 8px; vertical-align: 1px; }
.om-desk > .card { margin: 0; box-shadow: none; }
.om-compose { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.om-compose-open { flex: 1 1 240px; min-width: 0; height: 44px; display: flex; align-items: center; gap: 10px; padding: 0 16px; border: 1px solid var(--border-input); border-radius: var(--r-pill); background: var(--bg); font: inherit; font-size: 15px; color: var(--text-secondary); text-align: left; cursor: text; }
.om-compose-open:hover { border-color: var(--text-muted); }
.om-compose-open svg { width: 18px; height: 18px; flex-shrink: 0; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linejoin: round; }
.om-compose-open span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.om-compose .btn { height: 32px; }
/* the log by group: pills, the one shown in ink */
.om-kinds { display: flex; flex-wrap: wrap; gap: 6px; }
.om-kinds button { height: 32px; padding: 0 12px; border: 1px solid var(--border-input); border-radius: var(--r-pill); background: var(--bg); font: inherit; font-size: 13px; color: var(--text-secondary); cursor: pointer; display: inline-flex; align-items: center; gap: 6px; }
.om-kinds button:hover { color: var(--text); }
.om-kinds button.on { background: var(--text); border-color: var(--text); color: #fff; font-weight: 500; }
.om-kinds button:focus-visible,
.rate-btn:focus-visible,
.om-user:focus-visible,
.om-user-menu button:focus-visible,
.om-modal-nav button:focus-visible,
.om-hit:focus-visible,
.om-more:focus-visible,
.om-menu button:focus-visible,
.om-try button:focus-visible,
.om-pfd-node:focus-visible { outline: none; box-shadow: 0 0 0 3px var(--focus-ring); }
.om-kind-count { font-family: var(--font-mono); font-size: 12px; opacity: .7; }
.om-log-tools { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; border-top: 1px solid var(--border); padding-top: 14px; align-items: center; }
.om-log-day { margin-left: auto; }
.om-when { display: flex; flex-wrap: wrap; gap: 8px; min-width: 0; }
.field .om-when input[type=time] { flex: 1 1 120px; width: auto; min-width: 0; max-width: 160px; }
.om-when select { flex: 1 1 120px; min-width: 0; }
.om-when-state { display: flex; align-items: center; flex-wrap: wrap; gap: 4px 10px; font-size: 13px; min-height: 32px; }
.om-when-set { font-weight: 600; color: var(--text); }
.om-when-state .om-see-all { padding: 0; min-height: 32px; }
.om-log-day input { width: auto; min-width: 160px; height: 36px; font-size: 14px; }
.om-day-note { margin: 0; font-size: 13px; color: var(--text-secondary); display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.om-day-note .om-see-all { padding: 0; min-height: 32px; }
/* a form, a handover or a weekly summary in the log: one line until opened */
.om-entry > details.om-entry-fold > * + * { margin-top: 10px; }
.om-entry > details.om-entry-fold > summary { list-style: none; cursor: pointer; display: flex; flex-direction: column; gap: 4px; font-size: 14px; color: var(--text); position: relative; padding-right: 24px; }
.om-entry > details.om-entry-fold > summary::-webkit-details-marker { display: none; }
.om-entry > details.om-entry-fold > summary::after { content: ""; position: absolute; right: 4px; top: 6px; width: 7px; height: 7px; border-right: 1.5px solid var(--text-secondary); border-bottom: 1.5px solid var(--text-secondary); transform: rotate(45deg); transition: transform .15s; }
.om-entry > details.om-entry-fold[open] > summary::after { transform: rotate(-135deg); top: 10px; }
.om-entry > details.om-entry-fold > summary:focus-visible { outline: none; box-shadow: 0 0 0 3px var(--focus-ring); border-radius: 8px; }
.om-entry-gist { color: var(--text-secondary); overflow-wrap: anywhere; }
/* what Opmate wrote sits quieter than what people wrote */
.badge.om-event::before { content: ""; display: inline-block; width: 6px; height: 6px; margin-right: 6px; border-radius: 50%; background: var(--warning); vertical-align: 1px; }
.om-entry.om-quiet { background: transparent; }
.om-entry.om-entry-line { padding-top: 8px; padding-bottom: 8px; }
.om-entry-links { gap: 2px; margin-left: -8px; }
.om-entry-links .btn.secondary { border-color: transparent; background: transparent; color: var(--text-secondary); padding: 0 8px; }
.om-entry-links .btn.secondary:hover { background: var(--bg-subtle); color: var(--text); }
/* a completed log form in the plant log (F2) */
.om-form-done { display: flex; flex-direction: column; gap: 8px; }
.om-form-name { margin: 0; font-weight: 600; font-size: 14px; }
.om-form-done .om-facts div { grid-template-columns: minmax(0, 220px) minmax(0, 1fr); }
@media (max-width: 560px) {
  .om-form-done .om-facts div { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
}
.om-handover .om-facts div { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
.om-setup .om-facts div { grid-template-columns: minmax(0, 220px) minmax(0, 1fr); font-size: 14px; }
.om-retire { display: flex; flex-direction: column; gap: 10px; }
.om-pages { display: flex; flex-direction: column; gap: 2px; margin: 4px 0 8px; }
.om-page { display: flex; justify-content: flex-start; align-items: center; gap: 10px; width: 100%; min-height: 40px; padding: 0 12px; border: 0; border-radius: var(--r-md); background: transparent; color: var(--text); font: inherit; font-size: 14px; font-weight: 500; text-align: left; cursor: pointer; }
.om-page:hover { background: rgba(255, 255, 255, .7); }
.om-page.on { background: var(--bg); box-shadow: inset 0 0 0 1px var(--border); font-weight: 600; }
/* page v0.95: a + beside Conversations and Plant log starts one */
.om-page-row { display: flex; align-items: center; gap: 0; padding-right: 2px; }
.om-page-row[hidden] { display: none; }
.om-page-row .om-page { flex: 1; min-width: 0; }
.om-page-add { flex: none; display: inline-flex; align-items: center; justify-content: center; width: 36px; height: 36px; border: 0; border-radius: var(--r-md); background: transparent; color: var(--text); cursor: pointer; }
/* Jase, 4 Dec 2026: Conversations and Plant log highlight and hover as one row, the + inside it; the + itself a light
   blue under the pointer (Jase, 6 Dec 2026: a bit of colour, in place of the dark grey) */
.om-page-row { border-radius: var(--r-md); }
.om-page-row:hover { background: rgba(255, 255, 255, .7); }
.om-page-row:has(.om-page.on) { background: var(--bg); box-shadow: inset 0 0 0 1px var(--border); }
.om-page-row .om-page, .om-page-row .om-page:hover, .om-page-row .om-page.on { background: transparent; box-shadow: none; }
.om-page-add:hover { background: var(--focus-ring); color: var(--text); }
.om-page-add:focus-visible { outline: none; box-shadow: 0 0 0 3px var(--focus-ring); }
.om-page-add[hidden] { display: none; }
.om-page-add svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2.4; stroke-linecap: round; }
@media (pointer: coarse) { .om-page-add { width: 44px; height: 44px; } }
.om-entry-plant { font-size: 14px; font-weight: 600; color: var(--text); }
.om-count { min-width: 20px; height: 20px; padding: 0 6px; border-radius: 10px; background: var(--text); color: var(--bg); font-size: 12px; line-height: 20px; text-align: center; }
.om-learnings { display: flex; flex-direction: column; gap: 12px; margin-bottom: 18px; }
.om-learnings:empty { display: none; }
.om-learning-text { font-size: 15px; margin: 0 0 6px; white-space: pre-line; }
.om-kl { justify-content: flex-start; }
.om-learning .card-body { display: flex; flex-direction: column; gap: 12px; }
.om-learning textarea.om-draft { width: 100%; font: inherit; font-size: 14px; line-height: 1.5; padding: 8px 10px; border: 1px solid var(--border-input); border-radius: var(--r-md); background: var(--bg); color: var(--text); box-sizing: border-box; resize: vertical; }
.om-evidence { background: var(--bg-subtle); border-radius: var(--r-md); padding: 10px 12px; }
.om-evidence p { margin: 4px 0 0; font-size: 14px; }
.om-site-setting { display: flex; flex-direction: column; gap: 10px; align-items: flex-start; }
.om-site-setting .field { align-self: stretch; }
.om-site-setting + .om-site-setting { margin-top: 18px; padding-top: 18px; border-top: 1px solid var(--border); }
#views-list { display: flex; flex-direction: column; gap: 6px; align-self: stretch; }
.om-view-row { margin: 0; font-size: 13px; overflow-wrap: anywhere; }
.om-view-row .mono { color: var(--text-secondary); }
.om-retire .om-hint { margin: 0; }
.om-items { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 6px; }
.om-item { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; font-size: 14px; border-top: 1px solid var(--border); padding-top: 6px; }
.om-item:first-child { border-top: 0; padding-top: 0; }
.om-item.done > span:first-child { color: var(--text-muted); }
.om-item .btn { height: 32px; padding: 0 14px; font-size: 13px; }
.om-ack { margin: 0; font-size: 13px; color: var(--text-secondary); }
.om-shift-times { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 10px; }
.om-shift-reminder { margin: 0; font-size: 14px; line-height: 1.5; color: var(--warning-text); }
.om-duty-counts { margin: 0; font-size: 14px; line-height: 1.5; }
.om-item-src { background: none; border: 0; padding: 0; font: inherit; font-size: 12px; color: var(--text-muted); text-decoration: underline; cursor: pointer; }
.om-item-age { font-size: 12px; color: var(--text-muted); }
.om-item-main { display: flex; flex-direction: column; gap: 2px; min-width: 0; flex: 1 1 160px; }
.om-add-item { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px; }
.om-add-item input { width: 100%; height: var(--h-control); border: 1px solid var(--border-input); border-radius: var(--r-md); padding: 0 10px; font: inherit; font-size: 14px; background: var(--bg); color: var(--text); box-sizing: border-box; min-width: 0; }
.om-since-body { display: flex; flex-direction: column; gap: 12px; margin-top: 10px; }
.om-since h4 { margin: 0; }
.om-item-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px; align-items: center; }
.om-item-row input { width: 100%; height: var(--h-control); border: 1px solid var(--border-input); border-radius: var(--r-md); padding: 0 10px; font: inherit; font-size: 14px; background: var(--bg); color: var(--text); box-sizing: border-box; min-width: 0; }
.om-item-row input:focus,
.composer textarea:focus,
.om-entry-text textarea:focus,
.om-reading-row input:focus,
.field input[type=datetime-local]:focus, .field input[type=time]:focus,
.om-unit input:focus, .om-vals input:focus, .om-chem-row input:focus, .om-chem-row select:focus,
.om-setup textarea:focus,
.om-compose-open:focus-visible,
.om-learning textarea.om-draft:focus,
.om-add-item input:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px var(--focus-ring); }
.om-handover-form .card-body { display: flex; flex-direction: column; gap: 12px; }
.om-handover-form textarea { min-height: 200px; }
.om-handover-foot { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; padding: 0; }
.om-handover-foot > div { display: flex; gap: 8px; flex-wrap: wrap; }
/* narrower screens: the plant pane, then the conversations, slide in over the chat */
.om-side-overlay { z-index: 1090; }
/* the interface brief 3 (Jase, 2 Dec 2026): the plant pane is closed at every width, opened from its button, which
   carries a dot when something new arrives (a reading taken, a register box fired) */
/* Jase, 3 Dec 2026: on a wide screen the plant pane always on the right, folded to a 44 px rail to start, open in place
   at its old 320 px; below 1200 px it slides in from the header's button as it did before */
.om-app { grid-template-columns: var(--om-side-w, 320px) minmax(0, 1fr) 44px; }
.om-app.om-plant-open { grid-template-columns: var(--om-side-w, 320px) minmax(0, 1fr) 320px; }
#btn-plant-head { position: relative; }
.om-plant { position: relative; }
.om-plant .om-pane-head { display: flex; }
.om-plant.om-folded > :not(.om-plant-rail) { display: none; }
.om-plant:not(.om-folded) > .om-plant-rail { display: none; }
.om-plant-rail { flex: 1; width: 100%; border: 0; background: transparent; cursor: pointer; display: flex; flex-direction: column; align-items: center; gap: 12px; padding: 14px 0; color: var(--text-secondary); position: relative; font: inherit; }
.om-plant-rail:hover { background: var(--bg); color: var(--text); }
.om-plant-rail:focus-visible { outline: none; box-shadow: inset 0 0 0 3px var(--focus-ring); }
.om-plant-rail svg, .om-plant-fold svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.om-plant-rail-label { writing-mode: vertical-rl; font-size: 13px; font-weight: 500; letter-spacing: .01em; }
.om-plant .om-pane-head { justify-content: flex-start; gap: 8px; padding-left: 10px; }
.om-plant .om-pane-head .om-pane-title { margin-right: auto; }
.om-setup-btn { height: 32px; min-height: 32px; padding: 0 12px; font-size: 13px; gap: 6px; }
.om-setup-btn svg { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; }
.om-plant-fold { width: 32px; height: 32px; border: 0; border-radius: var(--r-md); background: transparent; color: var(--text-secondary); cursor: pointer; display: inline-flex; align-items: center; justify-content: center; }
.om-plant-fold:hover { background: var(--bg-subtle); color: var(--text); }
/* Jase, 4 Dec 2026: site learnings waiting, a blue dot on the avatar's corner and the number in the menu */
.om-user { position: relative; }
.om-user .om-user-dot { top: 6px; right: auto; left: 34px; box-shadow: 0 0 0 2px var(--bg-subtle); }
.om-menu-count { margin-left: auto; min-width: 20px; height: 20px; padding: 0 6px; border-radius: 10px; background: var(--primary); color: #fff; font-size: 12px; font-weight: 600; line-height: 20px; text-align: center; }
.om-menu-count[hidden] { display: none; }
.om-new-dot { position: absolute; top: 10px; right: 8px; width: 9px; height: 9px; border-radius: 50%; background: var(--primary); box-shadow: 0 0 0 2px var(--om-side, var(--bg-subtle)); }
@media (max-width: 1200px) {
  .om-app, .om-app.om-plant-open { grid-template-columns: var(--om-side-w, 320px) minmax(0, 1fr); }
  .app-header .om-mid-only { display: inline-flex; }
  .om-plant > .om-plant-rail { display: none; }
  .om-plant { position: fixed; top: 0; right: 0; height: 100vh; height: 100dvh; width: min(90vw, 380px); z-index: 1095; transform: translateX(105%); visibility: hidden; transition: transform .25s ease, visibility .25s; }
  .om-plant:not(.om-folded) { transform: none; visibility: visible; box-shadow: var(--shadow-panel); }
}
@media (max-width: 900px) {
  .om-app, .om-app.om-plant-open { grid-template-columns: minmax(0, 1fr); }
  .app-header .om-narrow-only { display: inline-flex; }
  .om-history { position: fixed; top: 0; left: 0; height: 100vh; height: 100dvh; width: min(90vw, 340px); z-index: 1095; transform: translateX(-105%); visibility: hidden; transition: transform .25s ease, visibility .25s; }
  .om-history.open { transform: none; visibility: visible; box-shadow: 24px 0 48px -12px rgba(13,15,20,.18); }
  .om-history .om-pane-head { display: flex; }
  .om-resize { display: none; }
}
@media (max-width: 768px) {
  .composer-hint { display: none; }
  /* Jase, 3 Dec 2026: the header's icons a white circle with a black outline; the message box a little tighter */
  .om-under-bar { width: calc(100% - 28px); }
  .app-header .hbtn .hbtn-icon.q { font-size: 17px; }
  .app-header .hbtn { width: 40px; height: 40px; background: var(--bg); border: 1px solid var(--text); }
  .app-header .hbtn:hover, .app-header .hbtn[aria-expanded="true"] { background: var(--bg-subtle); }
  .app-header .hbtn .hbtn-icon { width: 38px; height: 38px; background: transparent; color: var(--text); }
  .app-header .hbtn .hbtn-icon svg { width: 18px; height: 18px; }
  .app-header .hbtn .hbtn-icon.i { font-size: 16px; }
  .app-header .om-tools { border: 0; background: transparent; padding: 0; gap: 6px; }
  .app-header .om-tools .hbtn { width: 40px; height: 40px; border: 1px solid var(--text); background: var(--bg); }
  .app-header .om-tools .hbtn .hbtn-icon { width: 38px; height: 38px; }
  #chat-tab > .composer .card-body { padding: 8px 8px 8px 14px; }
  .composer-row { justify-content: space-between; }
  .msg.op, .msg.bot { max-width: 100%; }
  #chat-tab > .page-title, .om-readings, #log-tab > .page-title { padding-left: 14px; padding-right: 14px; }
  .om-reading-row { grid-template-columns: repeat(2, minmax(0, 1fr)); padding-bottom: 8px; border-bottom: 1px solid var(--border); }
  .om-reading-row .btn-remove { justify-self: end; }
  .om-scroll { padding: 14px; }
  #chat-tab > .composer { width: calc(100% - 28px); margin-bottom: 4px; }
  .om-plant, .om-history { width: 100vw; }
  #chat-tab > .page-title { padding-top: 10px; padding-bottom: 10px; }
  #chat-tab > .page-title h2 { font-size: 16px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
}
.om-move-up { display: flex; flex-wrap: wrap; gap: 8px; margin: 4px 0 12px; }
/* C5: who is site admin at the plant, on Plants & access for the organisation's admin */
.om-site-admin { display: flex; flex-direction: column; gap: 8px; margin-bottom: 12px; padding-bottom: 12px; border-bottom: 1px solid var(--border); }
.om-site-admin > .btn { align-self: flex-start; }
/* C8: the set-up checklist on Plant set-up, for the site admin */
.om-check-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.om-check { display: flex; align-items: center; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--border); }
.om-check:last-child { border-bottom: 0; }
.om-check .badge { flex: none; min-width: 64px; justify-content: center; }
.om-check-words { display: flex; flex-direction: column; gap: 2px; flex: 1; min-width: 0; }
.om-check-label { font-weight: 500; }
.om-check.done .om-check-label { color: var(--text-secondary); font-weight: 400; }
/* C8: the first-user tour: one step at a time beside what it points at */
.om-tour { position: fixed; z-index: 1300; padding: 16px; display: flex; flex-direction: column; gap: 8px; box-shadow: var(--shadow-seg), 0 16px 40px -12px rgba(13,15,20,.3); }
.om-tour p { margin: 0; }
.om-tour-title { margin: 0; font-size: 15px; }
.om-tour-row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.om-tour-row > .muted { margin-right: auto; }
.om-tour-lit { outline: 2px solid var(--primary); outline-offset: 3px; border-radius: var(--r-md); position: relative; z-index: 1250; }
.om-tour-again { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 16px; }

/* migration 58: what a handover lists, one switch a kind */
.om-switches { display: flex; flex-direction: column; gap: 4px; }

/* Photos on a plant log entry (P1): previews while the entry is written, then small thumbnails on the entry */
.om-entry-photos { display: flex; flex-direction: column; gap: 8px; }
.om-file { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.om-photo-note { margin: 0; font-size: 13px; }
.om-photo-strip { display: flex; flex-wrap: wrap; gap: 10px; }
.om-photo-strip:empty { display: none; }
.om-photo-tile { display: flex; flex-direction: column; gap: 6px; width: 132px; font-size: 13px; }
.om-photo-tile img { width: 132px; height: 99px; object-fit: cover; border-radius: 10px; border: 1px solid var(--border); background: var(--bg-subtle); }
.om-photo-tile.failed img { opacity: 0.5; }
.om-photo-state { color: var(--text-secondary); }
.om-photo-why { color: var(--text); }
.om-photo-tile .btn { min-height: 44px; }
.om-photo-thumb { display: block; width: 96px; height: 72px; border-radius: 8px; overflow: hidden; border: 1px solid var(--border); }
.om-photo-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.om-entry-photo-strip { margin-top: 8px; }
.om-photo-cell { display: flex; flex-direction: column; gap: 6px; max-width: 220px; }
.om-photo-withdrawn { margin: 0; width: 160px; padding: 10px 12px; border: 1px dashed var(--border); border-radius: 8px; font-size: 13px; color: var(--text-secondary); }
.om-photo-withdraw { display: flex; flex-direction: column; gap: 6px; }
.om-photo-withdraw input { height: var(--h-control); padding: 0 10px; border: 1px solid var(--border-input); border-radius: 10px; font: inherit; font-size: 14px; box-sizing: border-box; }
.om-photo-withdraw .btn { min-height: 44px; }
.om-photo-warn { margin: 0; font-size: 13px; color: var(--text); }
.om-photo-label { font-size: 14px; font-weight: 500; color: var(--text); }
.om-form-photo, .om-form-extra { display: flex; flex-direction: column; gap: 8px; }

/* signed out: a sign-in page and nothing else (Jase, 24 Oct 2026): no header, panes or page title round the card,
   the card in the middle of the page; Sign in with Watercalcs first, a passcode behind its own button */
.om-signed-out .app-header, .om-signed-out .om-history, .om-signed-out .om-plant,
.om-signed-out #chat-tab > .page-title, .om-signed-out #chat-tab > .om-readings, .om-signed-out .om-disclaimer,
.om-signed-out #tester-note { display: none !important; }
.om-signed-out .om-app { grid-template-columns: minmax(0, 1fr); }
.om-signed-out #chat-tab > .om-scroll { justify-content: center; padding: 32px 16px; }
.om-signin.card { max-width: 400px; width: 100%; margin: 0 auto; padding: 0; background: var(--bg); box-shadow: 0 1px 2px rgba(0, 0, 0, .04), 0 8px 24px rgba(0, 0, 0, .05); }
.om-signin .card-body { padding: 32px 28px 24px; display: flex; flex-direction: column; gap: 14px; }
.om-signin-brand { display: flex; align-items: center; gap: 10px; }
.om-signin-brand .om-logo { width: 32px; height: 32px; }
.om-signin-name { font-size: 18px; font-weight: 600; letter-spacing: -0.2px; color: var(--text); }
.om-signin-title { margin: 10px 0 2px; font-size: 22px; font-weight: 600; letter-spacing: -0.3px; }
.om-signin-account, .om-signin-passcode { display: flex; flex-direction: column; gap: 12px; }
.om-signin-passcode[hidden], .om-signin-account[hidden] { display: none; }
.om-signin .om-signin-main { width: 100%; justify-content: center; }
.om-signin .field { margin: 0; }
.om-signin-or { display: flex; align-items: center; gap: 12px; color: var(--text-muted); font-size: 12px; }
.om-signin-or::before, .om-signin-or::after { content: ""; flex: 1; height: 1px; background: var(--border); }
.om-signin-or[hidden] { display: none; }
.om-signin-foot { margin: 0; padding: 14px 28px; border-top: 1px solid var(--border); font-size: 12.5px; text-align: center; }
.om-signin-foot a { color: var(--text-secondary); text-decoration: underline; text-underline-offset: 2px; }
@media (max-width: 480px) { .om-signin .card-body { padding: 24px 20px 20px; } .om-signin-foot { padding: 12px 20px; } }

/* a carry-over item from the plant log or a reply: its record's words, read-only (Jase, 25 Oct 2026) */
.om-item-linked { flex: 1; min-width: 0; padding: 10px 12px; border: 1px solid var(--border); border-radius: var(--r-md); background: var(--bg-subtle); color: var(--text); font-size: 14px; }
/* the entry just saved, picked out for a moment */
.om-entry.om-just-saved { box-shadow: 0 0 0 2px var(--text-muted); transition: box-shadow .3s; }
/* R2a: the Calculations page and the recall line on a card */
.btn-link { border: none; background: none; padding: 0; font: inherit; color: var(--text); text-decoration: underline; cursor: pointer; }
.om-recall { display: flex; flex-wrap: wrap; gap: 8px; align-items: baseline; padding: 8px 16px 0; font-size: 13px; }
.om-runs { list-style: none; margin: 0; padding: 0; }
.om-runs li { border-top: 1px solid var(--border); }
.om-runs li:first-child { border-top: none; }
/* the plant log's calculations: name, then who and when; the link on the right (page v0.97) */
.om-run-log { display: flex; align-items: center; justify-content: space-between; gap: 6px 16px; flex-wrap: wrap; padding: 12px 0; }
.om-run-log-what { display: flex; flex-direction: column; gap: 3px; min-width: 0; flex: 1 1 260px; }
.om-run-log-what .muted { font-size: 13px; }
.om-run-log .btn-link { flex: none; font-size: 14px; }
.om-run-row { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; width: 100%; padding: 10px 0; border: none; background: none; text-align: left; font: inherit; cursor: pointer; }
.om-run-name { font-weight: 600; color: var(--text); }
/* R2 (page v1.02): a Watercalcs tool's run as it saved it, results then inputs, the table scrolling inside the card */
#run-open-body h4 { margin: 14px 0 6px; font-size: 14px; }
.om-run-table { display: block; max-width: 100%; overflow-x: auto; border-collapse: collapse; font-size: 14px; }
.om-run-table th, .om-run-table td { padding: 6px 10px 6px 0; border-bottom: 1px solid var(--border); text-align: left; vertical-align: top; overflow-wrap: anywhere; }
.om-run-table th { font-weight: 600; color: var(--text-secondary); }
.om-run-table td:first-child { color: var(--text-secondary); }
.om-run-part { border-top: 1px solid var(--border); padding: 8px 0; }
.om-run-part > summary { cursor: pointer; font-weight: 500; }
.om-run-part > .om-run-table { margin-top: 8px; }
.om-run-part .om-run-part { margin-left: 12px; }
#run-open-body .om-entry-actions input { flex: 1; min-width: 160px; height: var(--h-control); padding: 0 12px; border: 1px solid var(--border-input); border-radius: var(--r-md); font: inherit; }

/* key learning review (page v0.97): what it is, the lesson in three boxes, the decline set apart */
.om-learning-intro { margin: 0 0 4px; font-size: 14px; line-height: 1.5; color: var(--text); }
.om-lesson { display: flex; flex-direction: column; gap: 12px; padding: 14px; border: 1px solid var(--border); border-radius: var(--r-md); background: var(--bg-subtle); }
.om-lesson .om-label { margin: 0; }
.om-lesson .field { margin: 0; }
.om-topics-hint { margin: -2px 0 4px; }
.om-learning .om-retire { margin-top: 4px; padding-top: 12px; border-top: 1px solid var(--border); }
.om-learning .om-retire > summary { color: var(--text-secondary); }
.om-learning .om-retire .field { margin: 0; }
.om-learning .om-retire textarea { width: 100%; min-height: 76px; padding: 10px 12px; border: 1px solid var(--border-input); border-radius: var(--r-md); background: var(--bg); font: inherit; font-size: 14px; line-height: 1.45; resize: vertical; }
.om-learning .om-retire textarea:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px var(--focus-ring); }
.om-learning .om-retire .om-handover-foot { padding-bottom: 4px; }
.om-learning .note ul { margin: 4px 0 0; padding-left: 18px; }
.om-entry-head { display: flex; align-items: center; justify-content: space-between; gap: 8px 12px; flex-wrap: wrap; }
.om-entry-or { display: flex; align-items: center; margin-left: auto; }
.om-entry-or[hidden] { display: none; }
.om-correcting-entry .om-entry-or { display: none; }
/* the register's order on the right-hand pane, set on Plant set-up (page v0.97) */
.om-reg-order { margin-top: 12px; }
.om-reg-order-list { list-style: none; margin: 8px 0; padding: 0; display: flex; flex-direction: column; gap: 4px; }
.om-reg-order-row { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border: 1px solid var(--border); border-radius: var(--r-md); background: var(--bg); }
.om-reg-order-row.dragging { box-shadow: 0 6px 18px -6px rgba(13,15,20,.25); }
.om-reg-order-name { flex: 1; min-width: 0; font-weight: 500; }
.om-reg-order-row .btn-link { font-size: 13px; }
.om-time24 { font-variant-numeric: tabular-nums; max-width: 7em; }
/* E77: a card picked shows at once, named, with the drop while Opmate fills it in (Jase, 26 Oct 2026) */
.om-picked-wait { padding: 4px 16px 14px; align-items: center; }
/* Jase, 26 Oct 2026: each protozoa credit its own box, the take-out at its top right; the treatment wider than the log;
   a barrier the plant set-up doesn't carry said under it */
.om-credits { display: flex; flex-direction: column; gap: 10px; margin-bottom: 14px; }
.om-credit-item { border: 1px solid var(--border); border-radius: var(--r-md); padding: 10px 12px 12px; }
.om-credit-item + .om-credit-item { margin-top: 0; padding-top: 10px; border-top: 1px solid var(--border); }
.om-credit-head { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin-bottom: 8px; }
.om-credit-head .om-label { margin: 0; }
.om-credit .fields, .fields.om-credit { grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); }
.om-comp-flag { margin: 6px 0 0; font-size: 13px; color: var(--warning-text); }
.om-foot-btns { display: flex; gap: 8px; flex-wrap: wrap; }
/* Q213 (Jase, 26 Oct 2026): a qualification's photo, small, opening full size */
.om-qual-photo { display: inline-flex; border: 1px solid var(--border); border-radius: var(--r-md); overflow: hidden; }
.om-qual-photo img { display: block; width: 56px; height: 56px; object-fit: cover; }
/* Generate now (page v1.04): the last 7 days' summary under its button, its Download after it */
#summary-now { display: flex; flex-direction: column; align-items: flex-start; gap: 10px; margin-top: 14px; width: 100%; }
#summary-now > *:not(.btn) { width: 100%; }
.om-summary-now-period { font-weight: 600; margin: 0; }
/* the easier form builder (Jase, 29 Oct 2026): a button for each sort of field; the preview as it will be filled in */
.om-form-adds { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 8px; }
.om-form-preview { display: flex; flex-direction: column; gap: 10px; padding: 14px 16px; border: 1px dashed var(--border-input); border-radius: var(--r-lg); background: var(--bg-subtle); }
.om-form-preview .om-form-name { margin: 0; font-weight: 600; }
/* migration 69: a handover not acknowledged in its duty says so, for good */
.om-ack.om-not-acked { color: var(--warning-text); font-weight: 500; }
/* E99: a source's hazards, ticked under its row */
.om-source-flags { display: flex; flex-wrap: wrap; gap: 6px 16px; margin-top: 8px; }
.om-source-flag { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; color: var(--text-secondary); }
/* v86 item 9: what Online meters says of a unit's meters, shown, never asked */
.om-meter-lines { margin: 8px 0 0; display: grid; gap: 4px; font-size: 13px; }
.om-meter-lines > div { display: flex; flex-wrap: wrap; gap: 4px 8px; }
.om-meter-lines dt { color: var(--text-secondary); }
.om-meter-lines dd { margin: 0; }
/* v87 (the Set-up audit item 2): one card per cartridge housing */
.om-housings-head { margin-top: 16px; }
.om-housings-hint { margin: 4px 0 10px; line-height: 1.45; }
.om-housing-card { border: 1px solid var(--border); border-radius: var(--r-md); padding: 12px 14px; margin: 0 0 12px; background: var(--bg); }
.om-housing-title { font-weight: 600; margin: 0 0 8px; }
.om-source-picks > h4 { margin: 16px 0 8px; }
.om-source-picks > h4:first-child { margin-top: 0; }
.om-source-picks > .om-hint { margin: -4px 0 8px; }
details.om-water-group > summary { cursor: pointer; }

/* Jase, 3 Dec 2026: the message box is one rounded box, as Claude's: the words at the top, a calculator icon
   bottom left and the send arrow bottom right, both inside it; the box's border shows the focus */
#chat-tab > .composer { border: 1px solid var(--border-input); border-radius: 18px; background: var(--bg); box-shadow: 0 1px 2px rgba(13,15,20,.04), 0 4px 14px rgba(13,15,20,.04); transition: border-color .15s, box-shadow .15s; }
#chat-tab > .composer:focus-within { border-color: var(--text-muted); box-shadow: 0 1px 2px rgba(13,15,20,.05), 0 6px 18px rgba(13,15,20,.06); }
#chat-tab > .composer .card-body { display: flex; flex-direction: row; align-items: flex-end; gap: 10px; padding: 10px 10px 10px 16px; }
#chat-tab > .composer .field { flex: 1; min-width: 0; }
#chat-tab > .composer textarea { display: block; border: 0; border-radius: 0; padding: 4px 0; min-height: 0; height: 30px; line-height: 22px; overflow-y: auto; background: transparent; box-shadow: none; font-size: 15px; }
#chat-tab > .composer textarea:focus { outline: none; border: 0; box-shadow: none; }
#chat-tab > .composer .composer-row { display: flex; justify-content: flex-end; align-items: center; margin: 0; gap: 8px; }
.om-calc-btn, .om-send { width: 34px; height: 34px; min-height: 34px; padding: 0; border-radius: 10px; display: inline-flex; align-items: center; justify-content: center; cursor: pointer; flex-shrink: 0; transition: background .15s, color .15s, border-color .15s; }
.om-calc-btn { border: 0; background: transparent; color: var(--text-secondary); }
.om-calc-btn:hover, .om-calc-btn[aria-expanded="true"] { background: var(--bg-subtle); color: var(--text); }
.om-calc-btn svg, .om-send svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.om-send { border: 0; background: var(--bg-subtle); color: var(--text-muted); text-decoration: none; }
.om-send svg { stroke-width: 2.1; width: 17px; height: 17px; }
#composer.om-ready .om-send { background: var(--primary); color: #fff; }
#composer.om-ready .om-send:hover { background: var(--primary-hover); color: #fff; }
.om-send:disabled { cursor: default; }
.om-calc-btn:focus-visible, .om-send:focus-visible { outline: none; box-shadow: 0 0 0 3px var(--focus-ring); }

/* Jase, 3 Dec 2026: the header's icons white with a black outline, not black circles */
.app-header .hbtn-icon { background: transparent; color: var(--text); }
.app-header .om-tools .hbtn .hbtn-icon { background: transparent; }
/* the gear drawn as an outline, as the other icons read */
.app-header .hbtn-icon svg.om-stroke { fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
/* Jase, 3 Dec 2026: the calculator icon under the box at the left, as Claude's tools sit under its box; the
   disclaimer in the middle of the same line */
.om-under-bar { flex-shrink: 0; width: calc(100% - 56px); max-width: 860px; margin: 0 auto; display: grid; grid-template-columns: 72px minmax(0, 1fr) 72px; align-items: start; gap: 8px; }
/* Jase, 3 Dec 2026: the bulb then the calculator, together at the left; an empty column of the same width on the
   right keeps the disclaimer centred under the box (dropped on a phone, where the width is wanted for the words) */
.om-under-tools { display: flex; gap: 4px; }
@media (max-width: 600px) { .om-under-bar { grid-template-columns: auto minmax(0, 1fr); } .om-under-pad { display: none; } }
.om-under-bar .om-calc-btn { margin-top: 2px; }
.om-under-bar .site-bar.om-disclaimer { padding-left: 0; padding-right: 0; }
.om-signed-out .om-under-bar .om-calc-btn, body.om-viewer .om-under-bar .om-calc-btn { visibility: hidden; }
/* the ? upright, in the type of the page (Jase, 3 Dec 2026) */
.hbtn-icon.q { font-family: inherit; font-style: normal; font-weight: 600; font-size: 15px; }
.panel-header .hbtn-icon.q { font-size: 17px; }
.om-help-support { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; padding: 12px 14px; margin-bottom: 14px; border: 1px solid var(--border); border-radius: var(--r-md); background: var(--bg-subtle); }
.om-help-support p { margin: 0; font-size: 14px; }
/* migration 82 (Jase, 3 Dec 2026): a plant with the duty selector switched off shows no status block and no rule under it */
.om-status-home.om-no-duty { display: none; }
/* Jase, 3 Dec 2026: the calculations list's heading with its close, and a card's way back to the list */
.om-pick-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 8px; }
.om-pick-title { font-size: 15px; font-weight: 600; color: var(--text); }
.om-pick-x { width: 32px; height: 32px; border: 0; border-radius: var(--r-md); background: transparent; color: var(--text-secondary); cursor: pointer; display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; }
.om-pick-x:hover { background: var(--bg-subtle); color: var(--text); }
.om-pick-x svg, .om-pick-back svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.om-pick-nav { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 8px 10px 0 8px; }
.om-pick-back { display: inline-flex; align-items: center; gap: 4px; height: 32px; padding: 0 10px 0 4px; border: 0; border-radius: var(--r-md); background: transparent; color: var(--text-secondary); font: inherit; font-size: 13px; cursor: pointer; }
.om-pick-back:hover { background: var(--bg-subtle); color: var(--text); }
.om-pick-x:focus-visible, .om-pick-back:focus-visible { outline: none; box-shadow: 0 0 0 3px var(--focus-ring); }
/* the way back and the close stay at the top while a long card or list is scrolled */
.om-picked:not(.om-picked-inline) .om-pick-nav { position: sticky; top: 0; z-index: 2; background: var(--bg); padding-bottom: 4px; }
.om-calc-pick .om-pick-head { position: sticky; top: -14px; z-index: 2; background: var(--bg); padding-top: 4px; }

/* What you can ask (Jase, 3 Dec 2026): the guide's rows, a topic and one example each */
.om-ask-intro { margin: 0 0 8px; font-size: 14px; color: var(--text); }
/* page v1.55 (Jase, 4 Dec 2026): one grid for the whole list, the labels' column as wide as the longest label on one
   line, so "A health check" never wraps and the examples line up */
.om-ask-list { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: max-content minmax(0, 1fr);
  column-gap: 14px; row-gap: 6px; font-size: 14px; line-height: 1.4; }
.om-ask-list li { display: grid; grid-column: 1 / -1; grid-template-columns: subgrid; }
.om-ask-list b { font-weight: 600; color: var(--text); white-space: nowrap; }
.om-ask-list span { color: var(--text-secondary); }
@media (max-width: 480px) { .om-ask-list { grid-template-columns: 1fr; row-gap: 0; } .om-ask-list span { margin-bottom: 6px; } }
.om-signed-out #ask-guide-btn { visibility: hidden; }

/* page v1.50: nothing of the page shows until start() knows who is here (signed out, the sign-in card alone); after
   0.4 s the logo, centred. Shown by itself after 10 s whatever happened, so a page never stays blank. */
.om-splash { display: none; }
body.om-starting > :not(.om-splash) { visibility: hidden; animation: om-shown 0s 10s forwards; }
body.om-starting .om-splash { display: flex; position: fixed; inset: 0; align-items: center; justify-content: center;
  opacity: 0; animation: om-splash-in .3s ease .4s forwards; }
body.om-starting .om-splash .om-logo { width: 56px; height: 56px; }
@keyframes om-splash-in { to { opacity: 1; } }
@keyframes om-shown { to { visibility: visible; } }
@media (prefers-reduced-motion: reduce) { body.om-starting .om-splash { animation: none; opacity: 1; } }

/* Jase, 4 Dec 2026: one button height, the smaller one (Not now, I've read it, take over): every button on the page at
   32 px with a mouse; on a touch screen the design system's 44 px touch target stands */
@media (pointer: fine) {
  .btn { height: 32px; padding: 0 14px; font-size: 13px; }
}
