/* CoreShift Lockout · "Industrial pro" theme (v3 B, Oct 2026).
   Loaded after app.css and worker.css. Inter, sentence case, one yellow accent, thin borders, line icons. */

:root {
  --sans: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, Menlo, monospace;
  --paper: #F5F5F3; --paper-2: #EFEEEA; --card: #FFFFFF;
  --ink: #161A1F; --ink-2: #3A4048; --muted: #6B7076; --rule: #E6E4DF; --line-2: #F0EFEB;
  --safety: #C24F1F; --safety-2: #A8431A; --safety-bg: #FBEAE1; --brand: #CF5A2A; --brand-on-dark: #E8743F;  /* CoreShift logo orange; --safety is the darker shade behind white text */
  --signal: #CF5A2A; --signal-ink: #9A3B12;
  --danger: #B42318; --ok: #1E6B3A; --ok-bg: #E8F5EC; --warn-bg: #FEF6DC; --bad-bg: #FDECEA;
  --side: #14181D; --side-2: #1D232A; --side-3: #262D35;
  --radius: 12px;
  --shadow: 0 1px 2px rgba(20, 24, 29, .05);
}

/* ---------- Type: one family, sentence case, few sizes ---------- */
body { font: 400 16px/1.55 var(--sans); color: var(--ink); background: var(--paper); font-feature-settings: "cv11", "ss01"; -webkit-font-smoothing: antialiased; }
h1, h2, h3, h4 { font-family: var(--sans); font-stretch: 100%; text-transform: none; letter-spacing: -.01em; color: var(--ink); }
h1 { font: 600 26.4px/1.25 var(--sans); letter-spacing: -.02em; margin: 0 0 4px; }
h2 { font: 600 18px/1.35 var(--sans); letter-spacing: -.01em; margin: 0 0 10px; }
h3 { font: 600 16px/1.4 var(--sans); }
.empty h2 { font: 600 19.8px/1.3 var(--sans); text-transform: none; letter-spacing: -.01em; }
p { color: var(--ink-2); }
.muted, .hint { color: var(--muted); }
.mono { font-family: var(--mono); font-size: .9em; }
a { color: var(--ink); text-decoration-color: #D9B23A; text-underline-offset: 3px; }
:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }

/* No more SHOUTING: every rule that forced uppercase */
.btn, .crumbs, .etable th, .label, .mini-jha th, .navtip__k, .need em, .pdrawer__body h3, .pill, .plantsw__k,
.product__name, .product__prefix, .tbottom h3, .ttable th, .w-head small, .w-kind, .w-steps h3, .wz-n, h2, label, table.list th,
.tstat span, .ttabs a, .w-tabs a, .w-tabs button, .langtab a, .tsum__facts, .tgap__p em {
  text-transform: none; letter-spacing: normal;
}

/* ---------- Buttons ---------- */
.btn { font: 600 15px/1 var(--sans); min-height: 36px; padding: 9px 14px; border-radius: 8px; border: 1px solid #DDDAD3; background: #fff; color: var(--ink); box-shadow: var(--shadow); gap: 6px; }
.btn:hover { background: var(--paper); border-color: #CFCBC2; color: var(--ink); }
.btn--signal { background: var(--safety); border-color: var(--safety); color: #fff; box-shadow: none; }
.btn--signal:hover { background: var(--safety-2); border-color: var(--safety-2); color: #fff; }
.btn--ghost { background: #fff; color: var(--ink); border-color: #DDDAD3; }
.btn--ghost:hover { background: var(--paper); border-color: #CFCBC2; }
.btn--sm { min-height: 32px; padding: 6px 11px; font-size: 15px; }
.btn--big { min-height: 46px; font-size: 17px; padding: 12px 18px; }
.btn--danger, .btn--ghost.btn--danger { color: var(--danger); border-color: #F1C9C4; background: #fff; }
.btn--danger:hover { background: #FDF3F2; color: #8E1C16; }
.btn .ic { width: 16px; height: 16px; }
.linkbtn { color: var(--ink-2); text-decoration-color: #CFCBC2; font-size: 15px; }
.linkbtn:hover { color: var(--danger); }

/* ---------- Forms ---------- */
label, .label { font: 500 15px/1.4 var(--sans); color: var(--ink-2); margin: 0 0 6px; }
input:not([type]), input[type=text], input[type=email], input[type=file], input[type=date], input[type=datetime-local], input[type=search], input[type=number], select, textarea {
  font: 400 16px/1.45 var(--sans); padding: 9px 12px; border: 1px solid #DDDAD3; border-radius: 8px; background: #fff; color: var(--ink); box-shadow: var(--shadow);
}
input:focus, select:focus, textarea:focus { border-color: var(--ink); outline: none; box-shadow: 0 0 0 3px rgba(242, 194, 48, .35); }
::placeholder { color: #9AA0A6; }
.chip { font: 500 15px/1.3 var(--sans); padding: 7px 11px; border: 1px solid #DDDAD3; border-radius: 8px; background: #fff; }
.chip input { accent-color: var(--ink); }
.chip:has(input:checked) { border-color: var(--ink); background: #FFF9E3; }

/* ---------- Surfaces ---------- */
.card { background: #fff; border: 1px solid var(--rule); border-top: 1px solid var(--rule); border-radius: var(--radius); box-shadow: var(--shadow); padding: 20px; }
.card[style*="border-top"], .card[style*="border-left"] { border: 1px solid var(--rule) !important; }
.alert { border-radius: 10px; font-size: 16px; padding: 11px 14px; border: 1px solid transparent; }
.alert--ok { background: var(--ok-bg); color: #1E5631; border-color: #CDE8D6; }
.alert--warn { background: var(--warn-bg); color: #6E4C00; border-color: #F5E2A6; }
.alert--err { background: var(--bad-bg); color: #8E1C16; border-color: #F5CBC6; }

/* Status badges: soft color with a dot */
.pill { display: inline-flex; align-items: center; gap: 6px; font: 600 14px/1.5 var(--sans); padding: 2px 9px; border-radius: 999px; background: #F2F1ED; color: #4A5058; white-space: nowrap; }
.pill::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; flex: none; }
.pill--ok { background: var(--ok-bg); color: var(--ok); }
.pill--draft { background: var(--warn-bg); color: #8A5F00; }
.pill--bad { background: var(--bad-bg); color: var(--danger); }
.pill--none { background: #F2F1ED; color: #4A5058; }
.pill--signal { background: var(--safety); color: #fff; }
.badge { background: var(--safety); color: #fff; border-radius: 999px; font: 600 13px/20px var(--sans); }

/* Tables */
table.list th, .ttable th, .etable th { font: 500 14px/1.4 var(--sans); color: var(--muted); background: #FAFAF8; border-bottom: 1px solid var(--rule); }
table.list td { border-color: var(--line-2); }
.crumbs { font-size: 15px; color: var(--muted); } .crumbs a { color: var(--muted); }

/* ---------- App frame ---------- */
.ic { width: 18px; height: 18px; flex: none; }
.side { background: var(--side); padding: 16px 12px 0; }
.side__logo { font: 700 17px/1 var(--sans); letter-spacing: -.01em; text-transform: none; padding: 0 8px 14px; }
.side__logo img { width: 28px; height: 28px; border-radius: 7px; }
.plantsw summary { border-radius: 8px; background: var(--side-2); border: 0; }
.plantsw__k { font: 500 13px/1 var(--sans); color: #8C939B; }
.side__nav a { justify-content: flex-start; gap: 10px; padding: 8px 10px; color: #AEB5BD; font: 500 16px/1.3 var(--sans); border-radius: 7px; }
.side__nav a span:first-of-type { flex: 1; }
.side__nav a .ic { color: #7D858E; }
.side__nav a:hover { background: var(--side-2); color: #fff; }
.side__nav a[aria-current] { background: var(--side-3); color: #fff; box-shadow: inset 3px 0 0 var(--brand-on-dark); }
.side__nav a[aria-current] .ic { color: var(--brand-on-dark); }
.side__nav a[aria-current] .badge, .side__nav a .badge { background: var(--safety); color: #fff; }
.navrow--add { margin-top: 6px; }
.navrow--add > a { border: 0; background: var(--safety); color: #fff; justify-content: center; font-weight: 600; }
.navrow--add > a:hover { background: var(--safety-2); color: #fff; }
.navrow--add > a .ic { color: #fff; }
.navinfo { border-color: #3A424C; color: #7D858E; font: 600 14px/1 var(--sans); }
.side__stripe { display: none; }
.side__me { font-size: 14.5px; color: #8C939B; border-top: 1px solid #232A31; padding: 14px 8px; }
.side__push { display: inline-flex; align-items: center; gap: 6px; border-color: #2E353D; border-radius: 7px; }
.side__push .ic { width: 15px; height: 15px; }

.shell__top { position: sticky; top: 0; z-index: 10; height: 56px; align-items: center; padding: 0 32px; background: #fff; border-bottom: 1px solid var(--rule); }
.langtab { background: var(--paper-2); border-radius: 8px; padding: 2px; }
.langtab a { font: 600 14px/1 var(--sans); padding: 7px 11px; border-radius: 6px; color: var(--muted); }
.langtab a.on { background: #fff; color: var(--ink); box-shadow: 0 1px 2px rgba(0,0,0,.08); }
.page { padding: 28px 32px 64px; }
.page__head, .dhead { margin-bottom: 20px; }

/* Tabs (Team, etc.) */
.ttabs a { font: 600 15px/1 var(--sans); padding: 8px 12px; border-radius: 8px; background: transparent; color: var(--muted); }
.ttabs a.on { background: #fff; color: var(--ink); box-shadow: 0 0 0 1px var(--rule), var(--shadow); }
.w-tabs--light { background: var(--paper-2); border-radius: 8px; }
.w-tabs--light button { font: 600 14px/1 var(--sans); border-radius: 6px; }
.w-tabs--light button.on { background: #fff; color: var(--ink); box-shadow: 0 1px 2px rgba(0,0,0,.08); }

/* ---------- Dashboard ---------- */
.dash-sub { margin: 2px 0 0; color: var(--muted); }
.kpis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; margin-bottom: 20px; }
.kpi { background: #fff; border: 1px solid var(--rule); border-radius: var(--radius); box-shadow: var(--shadow); padding: 16px 18px; color: inherit; text-decoration: none; }
a.kpi:hover { border-color: #CFCBC2; }
.kpi__l { font-size: 15px; font-weight: 500; color: var(--ink-2); }
.kpi__v { font-size: 28.6px; font-weight: 600; letter-spacing: -.02em; margin-top: 4px; line-height: 1.2; }
.kpi__v small { font-size: 17px; color: var(--muted); font-weight: 500; }
.kpi__s { font-size: 14px; color: var(--muted); margin-top: 2px; }
.kpi--bad .kpi__v { color: var(--danger); }
@media (max-width: 900px) { .kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.panel { background: #fff; border: 1px solid var(--rule); border-radius: var(--radius); box-shadow: var(--shadow); margin-bottom: 20px; overflow: hidden; }
.panel__h { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 14px 18px; border-bottom: 1px solid var(--line-2); }
.panel__h h2 { margin: 0; }
.task { display: flex; align-items: center; gap: 14px; padding: 12px 18px; color: inherit; text-decoration: none; }
.task + .task { border-top: 1px solid var(--line-2); }
.task:hover { background: #FBFBF9; }
.task__ic { width: 34px; height: 34px; border-radius: 8px; display: grid; place-items: center; flex: none; }
.task__t { flex: 1; min-width: 0; } .task__h { font-weight: 600; color: var(--ink); } .task__s { font-size: 15px; color: var(--muted); }
.tone-bad { background: var(--bad-bg); color: var(--danger); } .tone-warn { background: var(--warn-bg); color: #9A6B00; } .tone-info { background: #EEF2F6; color: #38506B; } .tone-ok { background: var(--ok-bg); color: var(--ok); }
.mtable { width: 100%; border-collapse: collapse; }
.mtable th { text-align: left; font: 500 14px/1.4 var(--sans); color: var(--muted); background: #FAFAF8; padding: 10px 18px; border-bottom: 1px solid var(--line-2); }
.mtable td { padding: 11px 18px; border-top: 1px solid var(--line-2); vertical-align: middle; }
.mtable tbody tr:first-child td { border-top: 0; }
.mtable tbody tr:hover { background: #FBFBF9; }
.mtable .r { text-align: right; }
.mrow { display: flex; align-items: center; gap: 12px; color: inherit; text-decoration: none; }
.mrow img, .mrow__ph { width: 48px; height: 36px; border-radius: 6px; object-fit: cover; flex: none; background: var(--paper-2); color: #9AA0A6; display: grid; place-items: center; }
.mrow__n { font-weight: 600; } .mrow__s { font-size: 14px; color: var(--muted); }
.openlink { display: inline-flex; align-items: center; gap: 4px; font-weight: 600; font-size: 15px; color: var(--ink); text-decoration: underline; text-decoration-color: var(--safety); text-decoration-thickness: 2px; text-underline-offset: 3px; }
.openlink .ic { width: 14px; height: 14px; }
@media (max-width: 760px) { .mtable .hide-sm { display: none; } }

/* Getting-started checklist */
.setup { background: #fff; border: 1px solid var(--rule); border-radius: var(--radius); box-shadow: var(--shadow); }
.setup__head h2 { font-size: 18px; }

/* ---------- Sign-in ---------- */
.signin h1, .signin__art h1 { font: 700 48.4px/1.1 var(--sans); letter-spacing: -.03em; text-transform: none; font-stretch: 100%; }
.signin__logo { font: 700 17px/1 var(--sans); letter-spacing: -.01em; }
.signin__stripe { display: none; }
.signin__box h1, .signin__box h2 { font: 600 26.4px/1.25 var(--sans); }

/* ---------- Team page: summary + table already follow the theme ---------- */
.tstat { border-top: 1px solid var(--rule); border: 1px solid var(--rule); box-shadow: var(--shadow); }
.code-big { font-family: var(--mono); letter-spacing: .12em; }

/* ---------- Worker (phone) pages ---------- */
.w-top { background: var(--side); }
.w-top__home { color: #fff; font: 600 16px/1 var(--sans); }
.w-tabs { background: var(--side-3); border-radius: 8px; }
.w-tabs a, .w-tabs button { font: 600 15px/1 var(--sans); border-radius: 6px; padding: 8px 12px; }
.w-tabs .on { background: var(--safety); color: #fff; }
.w-head, .w-head--home, .w-head--job { background: var(--side); border-bottom: 0; padding: 18px 16px 20px; }
.w-head small { font: 500 14px/1.3 var(--sans); color: #AEB5BD; opacity: 1; }
.w-head h1 { font: 600 26.4px/1.2 var(--sans); color: #fff; letter-spacing: -.02em; }
.w-status { background: var(--side-2); font-size: 15px; }
.w-status .ok { color: #9BDDB2; font-weight: 600; }
.w-body { padding: 16px; }
.w-card, .w-energy, .w-steps, .w-job, .w-tile, .w-empty, .wz, .w-who { border: 1px solid var(--rule); box-shadow: var(--shadow); border-radius: 12px; }
.w-h2 { font: 600 18.7px/1.3 var(--sans); }
.w-tile { font: 600 17px/1.3 var(--sans); }
.w-tile .ic { width: 24px; height: 24px; color: var(--ink-2); }
.w-job b { font: 600 18.7px/1.35 var(--sans); }
.w-job--new { border-left: 4px solid var(--safety); }
.w-jstep { border: 1px solid var(--rule); box-shadow: var(--shadow); }
.w-jstep::before { background: var(--ink); color: #fff; font-family: var(--sans); font-weight: 600; }
.w-jstep--lockout { border-left: 4px solid var(--danger); } .w-jstep--check { border-left: 4px solid var(--ok); } .w-jstep--restore { border-left: 4px solid #38506B; }
.w-kind { font: 600 14px/1.4 var(--sans); }
.w-energy { border-left: 4px solid var(--danger); }
.w-energy h2 { font: 600 19.8px/1.3 var(--sans); }
.w-locked { background: var(--danger); border-radius: 12px; }
.w-locked b { font: 700 19.8px/1.3 var(--sans); letter-spacing: 0; }
.w-warn { background: var(--side); color: var(--safety); font-weight: 600; border-radius: 12px; }
.w-go { font-size: 18px; }
.wz h2 { font: 600 24.2px/1.3 var(--sans); }
.wz-n { font: 600 14px/1.4 var(--sans); color: var(--danger); }
.w-jobbar { border-radius: 12px; }
.w-push { border-radius: 12px; }
.chat .msg { border-radius: 12px; }

/* Fixes after the first pass */
.side__logo, .signin__logo { text-transform: none !important; letter-spacing: -.01em !important; }
.w-tabs.w-tabs--light { background: var(--paper-2); }
.w-tabs.w-tabs--light button { color: var(--muted); background: transparent; }
.w-tabs.w-tabs--light button.on { background: #fff; color: var(--ink); box-shadow: 0 1px 2px rgba(0,0,0,.08); }
.navinfo { border: 0; width: 20px; height: 20px; color: #5E6670; opacity: .7; }
.navinfo:hover, .navinfo[aria-expanded="true"] { opacity: 1; color: var(--safety); }
.ic-sm { width: 14px; height: 14px; }
.w-top__home { display: inline-flex; align-items: center; gap: 4px; }
.speak { background: var(--paper-2); }
.speak button { font: 600 14px/1 var(--sans); }
.speak button.on { background: #fff; color: var(--ink); box-shadow: 0 1px 2px rgba(0,0,0,.08); }
.jstep::before, .w-jstep::before { font-family: var(--sans); }
.jstep::before { background: var(--ink); color: #fff; font-weight: 600; }
.energy-card, .ecard { border-radius: 10px; }

/* Lockout photos */
.lphotos { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.lphoto { display: flex; flex-direction: column; gap: 4px; text-decoration: none; color: var(--ink-2); font-size: 14px; }
.lphoto img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 8px; border: 1px solid var(--rule); }
.lstage { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; margin-bottom: 10px; }
.lstage select { width: auto; }
.w-photo { display: flex; align-items: center; justify-content: center; gap: 8px; min-height: 52px; padding: 12px; border: 1.5px dashed #CFCBC2; border-radius: 10px; background: #FAFAF8; font: 600 17px/1.3 var(--sans); color: var(--ink); cursor: pointer; text-transform: none; letter-spacing: 0; margin: 0; }
.w-photo:hover { border-color: var(--ink); }
.w-photo input { display: none; }
.w-photo .ic { width: 22px; height: 22px; }

.chip.is-off { opacity: .55; cursor: not-allowed; }
input[type=tel] { font: 400 16px/1.45 var(--sans); padding: 9px 12px; border: 1px solid #DDDAD3; border-radius: 8px; background: #fff; width: 100%; box-shadow: var(--shadow); }

/* Machine library */
.libhit { display: flex; align-items: center; gap: 12px; padding: 12px 14px; margin: 4px 0 12px; border: 1px solid #DCE5EF; background: #F5F8FB; border-radius: 10px; }
.libhit__t { flex: 1; display: flex; flex-direction: column; gap: 2px; font-size: 15px; }
.libhit__t b { font-size: 16px; }
.libshare { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
@media (max-width: 760px) { .libshare { grid-template-columns: 1fr; } }
.libsearch input { width: 260px; }
.libdet summary { cursor: pointer; }
.libdet ul { margin: 8px 0 0; padding-left: 18px; font-size: 15px; }
.libdet li { margin-bottom: 6px; }

.libentry { display: grid; grid-template-columns: minmax(0, 2fr) minmax(260px, 1fr); gap: 20px; align-items: start; }
@media (max-width: 980px) { .libentry { grid-template-columns: 1fr; } }
.specs { display: grid; grid-template-columns: 180px 1fr; margin: 0; padding: 6px 18px 12px; }
.specs dt { color: var(--muted); font-size: 15px; padding: 8px 0; border-bottom: 1px solid var(--line-2); }
.specs dd { margin: 0; padding: 8px 0; border-bottom: 1px solid var(--line-2); font-weight: 500; }
.libphoto { width: 100%; border-radius: 8px; border: 1px solid var(--rule); }

.libfilter { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; flex: 1; }
.libfilter input[type=search] { width: 280px; }
.libfilter select { width: auto; }
.libmodel { color: var(--ink-2); font-size: 15px; }
.pager { display: flex; justify-content: center; align-items: center; gap: 14px; padding: 14px; border-top: 1px solid var(--line-2); }
.libsharebox summary { cursor: pointer; list-style: none; }
.libsharebox summary::-webkit-details-marker { display: none; }

/* Library picker on the add-machine form */
.libpick { position: relative; }
.libpick__res { position: absolute; left: 20px; right: 20px; top: calc(100% - 12px); z-index: 20; background: #fff; border: 1px solid var(--rule); border-radius: 10px; box-shadow: 0 12px 32px rgba(0,0,0,.18); max-height: 360px; overflow-y: auto; padding: 4px; }
.libpick__it { display: grid; grid-template-columns: 1fr auto; gap: 2px 10px; width: 100%; text-align: left; background: none; border: 0; border-radius: 8px; padding: 8px 10px; font: inherit; cursor: pointer; }
.libpick__it:hover, .libpick__it:focus { background: var(--paper); outline: none; }
.libpick__it span { grid-column: 1; font-size: 14px; color: var(--muted); }
.libpick__it em { grid-row: 1 / span 2; grid-column: 2; align-self: center; font-style: normal; }
/* Injury data */
.inccard__nums { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; padding: 14px 18px 4px; }
.inccard__nums b { display: block; font-size: 24.2px; font-weight: 600; letter-spacing: -.02em; }
.inccard__nums span { font-size: 14px; color: var(--muted); }
.inccard__r { margin: 0; padding: 10px 18px; border-top: 1px solid var(--line-2); font-size: 15px; color: var(--ink-2); }
.incrow { padding: 14px 18px; border-top: 1px solid var(--line-2); }
.incrow__m { display: flex; flex-wrap: wrap; gap: 6px 12px; align-items: center; }
.incrow__t { margin: 6px 0 0; font-size: 16px; color: var(--ink-2); }

/* Sidebar groups and account menu */
.navgroup { margin: 14px 10px 4px; font-size: 13.5px; font-weight: 500; color: #6E7781; letter-spacing: .01em; }
.acct { margin-top: auto; border-top: 1px solid #232A31; padding: 10px 0 12px; position: relative; }
.acct > summary { list-style: none; display: flex; align-items: center; gap: 10px; padding: 8px; border-radius: 8px; cursor: pointer; color: #C9CED4; }
.acct > summary::-webkit-details-marker { display: none; }
.acct > summary:hover, .acct[open] > summary { background: var(--side-2); }
.acct > summary .ic { width: 16px; height: 16px; color: #7D858E; margin-left: auto; transition: transform .15s; }
.acct:not([open]) > summary .ic { transform: rotate(180deg); }
.acct__av { flex: none; width: 30px; height: 30px; border-radius: 50%; background: var(--safety); color: #fff; display: grid; place-items: center; font: 600 14px/1 var(--sans); }
.acct__who { min-width: 0; display: flex; flex-direction: column; line-height: 1.3; }
.acct__who b { color: #fff; font-weight: 500; font-size: 15.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.acct__who span { font-size: 14px; color: #8C939B; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.acct__menu { position: absolute; left: 0; right: 0; bottom: calc(100% - 4px); background: #1C2228; border: 1px solid #2E353D; border-radius: 10px; padding: 6px; box-shadow: 0 12px 28px rgba(0,0,0,.35); z-index: 20; }
.acct__menu > a, .acct__lang { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 7px; color: #C9CED4; text-decoration: none; font-size: 15.5px; }
.acct__menu > a:hover { background: var(--side-3); color: #fff; }
.acct__menu .ic { width: 16px; height: 16px; color: #7D858E; flex: none; }
.acct__lang a { color: #8C939B; text-decoration: none; padding: 2px 8px; border-radius: 5px; }
.acct__lang a[aria-current] { background: var(--side-3); color: #fff; }
.acct__menu #push-box { padding: 4px 10px 6px; }
.acct__menu > a:last-child { border-top: 1px solid #2E353D; border-radius: 0 0 7px 7px; margin-top: 4px; }
.side__nav { overflow-y: auto; min-height: 0; }
.side { overflow: visible; }

/* Settings tabs */
.stabs { display: flex; gap: 4px; border-bottom: 1px solid var(--rule); margin: 0 0 18px; }
.stabs a { display: inline-flex; align-items: center; gap: 8px; padding: 10px 14px; color: var(--ink-2); text-decoration: none; font-weight: 500; font-size: 16px; border-bottom: 2px solid transparent; margin-bottom: -1px; }
.stabs a .ic { width: 16px; height: 16px; }
.stabs a[aria-current] { color: var(--ink); border-bottom-color: var(--safety); }
@media (max-width: 760px) { .stabs { overflow-x: auto; } .stabs a { white-space: nowrap; } }

@media (max-width: 900px) {
  .navgroup { display: none; }
  .acct { margin: 0 0 8px auto; border: 0; padding: 0; order: 2; }
  .acct__who, .acct > summary .ic { display: none; }
  .acct__menu { left: auto; right: 0; bottom: auto; top: calc(100% + 6px); width: 260px; }
}

/* Video next to photos */
.photo video { width: 100%; aspect-ratio: 4/3; object-fit: cover; display: block; background: #000; }
.thumb video { width: 100%; aspect-ratio: 1; object-fit: cover; display: block; background: #000; }

/* Add-machine steps */
.msteps { display: flex; gap: 8px; list-style: none; padding: 0; margin: 4px 0 18px; counter-reset: ms; flex-wrap: wrap; }
.msteps li { counter-increment: ms; display: flex; align-items: center; gap: 8px; padding: 8px 12px; border: 1px solid var(--rule); border-radius: 999px; background: #fff; font-size: 15.5px; color: var(--muted); }
.msteps li::before { content: counter(ms); width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; background: #EDEBE6; color: var(--ink-2); font-weight: 600; font-size: 14px; }
.msteps li.on { color: var(--ink); border-color: var(--ink); font-weight: 500; }
.msteps li.on::before { background: var(--safety); color: #fff; }
.nextbox { display: flex; gap: 12px; align-items: flex-start; background: #FBFAF7; border: 1px dashed var(--rule); border-radius: 10px; padding: 12px 14px; margin: 4px 0 14px; font-size: 15.5px; color: var(--ink-2); }
.nextbox .ic { width: 20px; height: 20px; flex: none; color: var(--ink-2); margin-top: 1px; }

/* Library pick: type → brand → model */
.libdd { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.libdd select:disabled { color: var(--muted); background: #F6F5F2; }
.libsearch { margin-top: 10px; position: relative; }
.libsearch > summary { cursor: pointer; font-size: 15px; color: var(--ink-2); }
.libsearch[open] > summary { margin-bottom: 8px; }
.libsearch .libpick__res { left: 0; right: 0; top: 100%; }
@media (max-width: 760px) { .libdd { grid-template-columns: 1fr; } }

/* Recall warning */
.recall { border-color: #E5A39B; }
.recall .panel__h h2 { display: inline-flex; align-items: center; gap: 8px; color: var(--danger); }
.recall .panel__h .ic { width: 18px; height: 18px; }
.recall__it + .recall__it { border-top: 1px solid var(--rule); margin-top: 10px; padding-top: 10px; }
.pill--bad { background: #FBE7E4; color: #9A2B1E; }
.libdd input[type=text] { width: 100%; }
.libdd .linkbtn { font-size: 14.5px; margin-top: 4px; }

/* Photo actions: under the caption, not on the image */
.photo form { position: static; }
.photo__acts { display: flex; align-items: center; gap: 6px; padding: 0 8px 8px; background: #fff; }
.photo .photo__act { display: inline-flex; align-items: center; gap: 6px; background: none; border: 1px solid transparent; color: var(--muted); border-radius: 7px; padding: 5px 7px; font: 500 14.5px/1 var(--sans); cursor: pointer; }
.photo .photo__act .ic { width: 16px; height: 16px; }
.photo .photo__act:hover { background: #F4F2EE; color: var(--ink); }
.photo .photo__act--del:hover { background: #FBE7E4; color: #B42318; }
.photo .photo__act:focus-visible { outline: 2px solid var(--ink); outline-offset: 1px; }

/* Machine page: one compact Records panel */
.recs { padding: 0; }
.recs > h2 { margin: 0; padding: 14px 18px; border-bottom: 1px solid var(--rule); }
.rec { display: grid; grid-template-columns: 22px max-content minmax(0, 1fr) auto; gap: 4px 12px; align-items: center; padding: 11px 18px; border-bottom: 1px solid #EFEDE8; font-size: 16px; }
.rec:last-child { border-bottom: 0; }
.rec__ic .ic { width: 18px; height: 18px; color: var(--muted); display: block; }
.rec__k { font-weight: 500; }
.rec__v { color: var(--muted); min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rec__v--warn { color: #9A5B00; font-weight: 500; }
.rec .rec__a { font: 500 15px/1 var(--sans); color: var(--ink); text-decoration: none; border: 1px solid #D9D6CF; background: #fff; border-radius: 7px; padding: 6px 10px; white-space: nowrap; cursor: pointer; }
.rec .rec__a:hover { background: #F4F2EE; }
.rec__list { grid-column: 2 / -1; list-style: none; margin: 4px 0 0; padding: 0; font-size: 15px; }
.rec__list li { padding: 3px 0; }
.rec__rep { display: flex; justify-content: space-between; gap: 10px; align-items: center; }
@media (max-width: 640px) {
  .rec { grid-template-columns: 22px minmax(0, 1fr) auto; }
  .rec__v { grid-column: 2 / 3; grid-row: 2; white-space: normal; }
  .rec__list { grid-column: 2 / -1; }
}

/* Plan and license */
.bill { display: grid; grid-template-columns: minmax(0, 1fr); gap: 16px; align-items: start; max-width: 760px; }
.billtab td, .billtab th { padding: 9px 10px; }
.billtab .r { text-align: right; }
.billtab__tot td { font-weight: 600; border-top: 2px solid var(--rule); }
.billpay { margin-top: 16px; padding-top: 4px; border-top: 1px solid var(--rule); }
.billpay > .btn { margin-top: 12px; }
.meter { height: 8px; background: #EDEBE6; border-radius: 99px; overflow: hidden; }
.meter span { display: block; height: 100%; background: var(--safety); }
@media (max-width: 900px) { .bill { grid-template-columns: 1fr; } }

/* Public pages: binder grader */
.pub { background: var(--paper); }
.pub__top { display: flex; justify-content: space-between; align-items: center; padding: 14px 24px; background: #14181D; }
.pub__brand { display: inline-flex; gap: 10px; align-items: center; color: #fff; text-decoration: none; font: 600 17px var(--sans); }
.pub__brand img { width: 28px; height: 28px; border-radius: 7px; }
.pub__top nav { display: flex; gap: 14px; align-items: center; }
.pub__top nav a:not(.btn) { color: #C9CED4; text-decoration: none; font-size: 16px; }
.pub__main { max-width: 1080px; margin: 0 auto; padding: 36px 20px 48px; }
.pub__foot { text-align: center; color: var(--muted); font-size: 14.5px; padding: 0 20px 28px; }
.eyebrow { font-size: 15px; font-weight: 600; color: #9A5B00; margin: 0 0 6px; }
.grade { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: 32px; align-items: start; }
.grade h1 { font-size: 37.4px; line-height: 1.15; letter-spacing: -.02em; margin: 0 0 12px; }
.grade .lead { font-size: 18.2px; color: var(--ink-2); }
.grade__why { padding-left: 18px; color: var(--ink-2); line-height: 1.6; }
.gres { max-width: 860px; margin: 0 auto; }
.gres__head { display: flex; gap: 20px; align-items: center; }
.gres__score { flex: none; width: 104px; height: 104px; border-radius: 50%; display: grid; place-content: center; text-align: center; border: 6px solid; }
.gres__score b { font-size: 37.4px; line-height: 1; } .gres__score span { color: var(--muted); font-size: 15px; }
.gres__score--ok { border-color: #2E9B52; } .gres__score--warn { border-color: #E0A100; } .gres__score--bad { border-color: #D64531; }
.gres__items { padding: 6px 18px; }
.gi { display: grid; grid-template-columns: 96px minmax(0, 1fr); gap: 12px; padding: 12px 0; border-bottom: 1px solid #EFEDE8; }
.gi:last-child { border-bottom: 0; }
.gi__st { font-size: 14.5px; font-weight: 600; border-radius: 99px; padding: 3px 10px; align-self: start; text-align: center; }
.gi--present .gi__st { background: #E9F5EC; color: #1F6B37; } .gi--partial .gi__st { background: #FFF4D6; color: #8A5A00; }
.gi--missing .gi__st { background: #FBE7E4; color: #9A2B1E; } .gi--not_applicable .gi__st { background: #F1EFE9; color: var(--muted); }
.gi__ev { margin: 4px 0 0; color: var(--ink-2); font-style: italic; font-size: 15.5px; }
.gi__fix { margin: 4px 0 0; font-size: 15.5px; }
.gres__cta { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin: 16px 0; }
@media (max-width: 860px) { .grade, .gres__cta { grid-template-columns: 1fr; } .grade h1 { font-size: 30.8px; } }

/* Page headers: the title block takes the room and wraps its text; actions stay on one line beside it, or drop below on narrow screens. */
.page__head > :first-child { flex: 1 1 360px; min-width: 0; }
.page__head > :first-child p { overflow-wrap: anywhere; }
.btn { white-space: nowrap; }
.newmsg { flex: 0 1 380px; max-width: 100%; }
.newmsg select { flex: 1 1 auto; min-width: 0; min-height: 36px; height: 36px; padding-top: 0; padding-bottom: 0; }
.thread, .thread > * { min-width: 0; } .thread .muted { overflow-wrap: anywhere; }
.newmsg .btn { min-height: 36px; height: 36px; }

/* Documents (print sheets, uploaded bills) open in a panel inside the app instead of a new window. */
.docview { border: 0; padding: 0; width: min(1000px, 96vw); height: 92vh; max-height: 92vh; border-radius: 12px; overflow: hidden; background: #fff; box-shadow: 0 20px 60px rgba(0,0,0,.35); }
.docview::backdrop { background: rgba(10, 12, 14, .55); }
.docview__bar { display: flex; gap: 8px; align-items: center; padding: 10px 12px; border-bottom: 1px solid var(--rule); background: var(--paper); }
.docview__bar b { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 16px; }
.docview iframe { width: 100%; height: calc(100% - 57px); border: 0; display: block; background: #fff; }
@media (max-width: 700px) { .docview { width: 100vw; height: 100dvh; max-height: 100dvh; border-radius: 0; } }

/* Tabs inside a section (Machines, Lockouts & jobs, People, Compliance). They scroll sideways on a phone. */
.hubtabs { overflow-x: auto; scrollbar-width: none; flex-wrap: nowrap; margin-top: -4px; }
.hubtabs::-webkit-scrollbar { display: none; }
.hubtabs a { white-space: nowrap; }
.hubtabs a[aria-current] { color: var(--ink); box-shadow: inset 0 -2px 0 var(--safety); font-weight: 600; }
/* Compliance overview */
.ring { --p: 0; width: 92px; height: 92px; border-radius: 50%; display: grid; place-items: center; font-weight: 800; font-size: 22px; position: relative; flex: none;
  background: conic-gradient(var(--ok) calc(var(--p) * 1%), #E6E4DF 0); }
.ring::after { content: ""; position: absolute; inset: 10px; background: #fff; border-radius: 50%; }
.ring span { position: relative; z-index: 1; }
.trend { display: flex; align-items: flex-end; gap: 4px; height: 48px; margin-top: 14px; border-bottom: 1px solid var(--rule); }
.trend span { flex: 1; max-width: 28px; background: var(--ok); opacity: .75; border-radius: 3px 3px 0 0; min-height: 2px; }
.gaprow { display: flex; gap: 10px; align-items: center; padding: 10px 0; border-top: 1px solid var(--line-2); flex-wrap: wrap; }
.gaprow:first-of-type { border-top: 0; }
.gapfix summary { list-style: none; } .gapfix summary::-webkit-details-marker { display: none; }
.gapfix form { display: flex; gap: 6px; margin-top: 6px; flex-wrap: wrap; }
.tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 10px; }
.tile { background: #fff; border: 1px solid var(--rule); border-radius: var(--radius, 12px); padding: 14px 16px; text-decoration: none; color: inherit; display: flex; flex-direction: column; gap: 4px; }
.tile:hover { border-color: #CFCBC2; }
.tile > span { color: var(--muted); font-size: 15px; }

/* Lockout record: where you are in the steps, and the rarer tasks as buttons */
.lsteps { display: flex; gap: 6px; list-style: none; padding: 0; margin: 14px 0 8px; counter-reset: s; flex-wrap: wrap; }
.lsteps li { counter-increment: s; flex: 1 1 140px; }
.lsteps a { display: flex; align-items: center; gap: 8px; padding: 10px 12px; border-radius: 10px; border: 1px solid var(--rule); background: #fff; text-decoration: none; color: var(--muted); font-weight: 600; font-size: 15px; }
.lsteps a::before { content: counter(s); width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; background: #F0EFEB; color: var(--ink); font-size: 14px; flex: none; }
.lsteps li.done a { color: var(--ok); } .lsteps li.done a::before { content: "✓"; background: var(--ok); color: #fff; }
.lsteps li.now a { border: 2px solid var(--safety); background: #FFFBEA; color: var(--ink); } .lsteps li.now a::before { background: var(--safety); }
.ltools { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 4px; }
details.lstep > summary { list-style: none; cursor: pointer; }
details.lstep > summary::-webkit-details-marker { display: none; }
details.lstep > summary h2 { margin: 0; display: flex; align-items: center; gap: 8px; }
details.lstep > summary h2::after { content: "▾"; margin-left: auto; color: var(--muted); font-size: 16px; }
details.lstep[open] > summary { margin-bottom: 12px; }
/* Executive summary */
.xkpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 10px; margin-bottom: 12px; }
.xk { background: #fff; border: 1px solid var(--rule); border-radius: 12px; padding: 14px 16px; }
.xk small { color: var(--muted); font-size: 14px; display: block; } .xk b { font-size: 30.8px; display: block; letter-spacing: -.02em; } .xk span { color: var(--muted); font-size: 14px; }
.xgrid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 12px; }
.xcard { background: #fff; border: 1px solid var(--rule); border-radius: 12px; padding: 14px 16px; break-inside: avoid; }
.xcard h3 { margin: 0 0 8px; font-size: 17px; }
.xchart { width: 100%; height: 110px; display: block; }
.xlabels { display: flex; } .xlabels span { flex: 1; text-align: center; font-size: 12px; color: var(--muted); overflow: hidden; white-space: nowrap; }
.xnote { color: var(--muted); font-size: 14px; margin: 6px 0 0; }
.xtable { width: 100%; border-collapse: collapse; font-size: 15px; } .xtable th, .xtable td { text-align: left; padding: 6px 4px; border-bottom: 1px solid var(--line-2); }
.xbar { display: block; height: 8px; background: #EEECE7; border-radius: 4px; overflow: hidden; } .xbar i { display: block; height: 100%; background: var(--ok); }
.xgaps { margin: 0; padding-left: 18px; } .xgaps li { margin: 4px 0; font-size: 15px; }

/* A section's pages, listed under it in the sidebar (on phones they show as tabs above the page instead) */
.navsub { display: flex; flex-direction: column; gap: 1px; margin: 2px 0 6px 14px; padding-left: 8px; border-left: 1px solid #2E353D; }
.side__nav .navsub a { padding: 6px 10px; font-size: 15.5px; font-weight: 400; color: #959CA4; }
.side__nav .navsub a:hover { color: #fff; }
.side__nav .navsub a[aria-current] { background: var(--side-2); color: #fff; font-weight: 500; box-shadow: none; }
.hubtabs--phone { display: none; }
@media (max-width: 900px) { .navsub { display: none; } .hubtabs--phone { display: flex; } }

/* Today: the rest of the list, and one line of plant numbers */
.panel details.more > summary { list-style: none; cursor: pointer; padding: 11px 18px; color: var(--ink-2); font-size: 15.5px; font-weight: 500; border-top: 1px solid var(--line-2); }
.panel details.more > .task { border-top: 1px solid var(--line-2); }
.panel details.more > summary::-webkit-details-marker { display: none; }
.panel details.more[open] > summary { display: none; }
.dash-sum { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 18px; margin: 14px 2px 0; color: var(--ink-2); font-size: 15.5px; }
.dash-sum .openlink { margin-left: auto; }

/* Machine page: the forms for this machine, together */
.formsbar { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 10px; background: #fff; border: 1px solid var(--line-2); border-radius: 10px; padding: 10px 14px; margin: 0 0 16px; }
.formsbar > b { font-size: 15.5px; margin-right: 4px; }
.formsbar .hint { flex-basis: 100%; margin: 0; }

/* Lockouts and jobs: rows that read as cards and stack on a phone */
.lrow { display: flex; align-items: flex-start; gap: 12px; padding: 12px 18px; color: inherit; text-decoration: none; border-top: 1px solid var(--line-2); }
.panel__h + .lrow, .panel__h + .lrow__empty { border-top: 0; }
.lrow:hover { background: #FBFBF9; }
.lrow__ic { width: 34px; height: 34px; border-radius: 8px; display: grid; place-items: center; flex: none; }
.lrow__main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.lrow__t { color: var(--ink); overflow-wrap: anywhere; }
.lrow__s { font-size: 15px; color: var(--muted); overflow-wrap: anywhere; }
.lrow__warn { display: inline-flex; align-items: center; gap: 6px; font-size: 15px; font-weight: 500; color: var(--danger); }
.lrow__warn .ic { width: 15px; height: 15px; }
.lrow__end { flex: none; padding-top: 1px; }
.lrow__empty { margin: 0; padding: 14px 18px; border-top: 1px solid var(--line-2); }
.panel__h small { font-weight: 500; font-size: 15px; }
@media (max-width: 640px) {
  .lrow { flex-wrap: wrap; padding: 12px 14px; }
  .lrow__main { flex: 1 1 0; }
  .lrow__end { flex-basis: 100%; }
  .lrow__ic + .lrow__main + .lrow__end { padding-left: 46px; }
  .panel__h .openlink { white-space: nowrap; }
}

/* ---------- Phones: one compact top bar, the main places in a bar at the bottom ---------- */
.side__lang, .bnav { display: none; }
@media (max-width: 900px) {
  .side { flex-wrap: nowrap; gap: 8px; padding: 8px 12px; min-height: 52px; top: 0; }
  .side__logo { padding: 0; font-size: 0; gap: 0; flex: none; }
  .side__logo img { width: 30px; height: 30px; }
  .side__nav, .side__stripe { display: none; }
  .plantsw { order: 0; width: auto; min-width: 0; flex: 0 1 auto; margin: 0; border: 0; position: relative; }
  .plantsw summary { padding: 6px 10px; flex-direction: row; align-items: center; gap: 6px; }
  .plantsw__k { display: none; }
  .plantsw summary b { font-size: 16px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 40vw; }
  .plantsw__menu { position: absolute; left: 0; top: calc(100% + 6px); min-width: 230px; background: #1C2228; border: 1px solid #2E353D; border-radius: 10px; box-shadow: 0 12px 28px rgba(0,0,0,.35); z-index: 20; }
  .side__lang { display: block; order: 1; margin-left: auto; flex: none; }
  .side__lang .langtab { background: var(--side-2); }
  .side__lang .langtab a { padding: 6px 8px; font-size: 14px; color: #AEB5BD; }
  .side__lang .langtab a.on { background: var(--side-3); color: #fff; box-shadow: none; }
  .acct { order: 2; margin: 0; flex: none; }
  .acct > summary { padding: 2px; }
  .shell__top { display: none; }
  .page { padding-bottom: calc(88px + env(safe-area-inset-bottom)); }
  .cap-bar, .chat-bar { bottom: calc(60px + env(safe-area-inset-bottom)); }

  .bnav { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; position: fixed; left: 0; right: 0; bottom: 0; z-index: 30;
    background: var(--side); border-top: 1px solid #232A31; padding: 0 4px env(safe-area-inset-bottom); }
  .bnav > a, .bnav__more > summary { position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; height: 60px;
    color: #AEB5BD; text-decoration: none; font: 500 13.5px/1.1 var(--sans); list-style: none; cursor: pointer; }
  .bnav__more > summary::-webkit-details-marker { display: none; }
  .bnav .ic { width: 22px; height: 22px; color: #7D858E; }
  .bnav > a[aria-current], .bnav__more > summary.on, .bnav__more[open] > summary { color: #fff; }
  .bnav > a[aria-current] .ic, .bnav__more > summary.on .ic, .bnav__more[open] > summary .ic { color: var(--safety); }
  .bnav > a[aria-current]::before, .bnav__more > summary.on::before { content: ""; position: absolute; top: 0; left: 25%; right: 25%; height: 3px; border-radius: 0 0 3px 3px; background: var(--safety); }
  .bnav .badge { position: absolute; top: 6px; left: calc(50% + 6px); min-width: 18px; padding: 0 5px; font-size: 12.5px; line-height: 18px; text-align: center; }
  .bnav__menu { position: fixed; left: 8px; right: 8px; bottom: calc(68px + env(safe-area-inset-bottom)); max-height: 70vh; overflow-y: auto;
    background: #1C2228; border: 1px solid #2E353D; border-radius: 12px; padding: 6px; box-shadow: 0 -12px 28px rgba(0,0,0,.35); }
  .bnav__group { padding: 6px 4px; }
  .bnav__group + .bnav__group { border-top: 1px solid #2E353D; }
  .bnav__group b { display: block; padding: 4px 8px; font: 500 14px/1.3 var(--sans); color: #8C939B; }
  .bnav__group a { display: block; padding: 10px 8px; border-radius: 7px; color: #E3E6E9; text-decoration: none; font-size: 16.5px; }
  .bnav__group a[aria-current] { background: var(--side-3); color: #fff; box-shadow: inset 3px 0 0 var(--safety); }
}

/* Tables that become stacked rows on a phone (add class "stack"). .sm-lab is a label only shown when stacked. */
.sm-lab { display: none; }
.span2 { grid-column: span 2; }
@media (max-width: 640px) {
  .span2 { grid-column: 1 / -1; }
  table.stack, table.stack tbody, table.stack tr, table.stack td { display: block; width: auto !important; }
  table.stack thead { display: none; }
  table.stack tr { padding: 10px 0; border-bottom: 1px solid var(--line-2); }
  table.stack tr:last-child { border-bottom: 0; }
  table.stack td { border: 0 !important; padding: 2px 0 !important; }
  table.stack td:empty { display: none; }
  table.list.stack tr:hover td { background: none; }
  table.stack td > b:first-child { font-size: 17px; }
  table.stack textarea, table.stack input:not([type=checkbox]):not([type=radio]), table.stack select { width: 100%; min-width: 0; }
  table.stack .sm-lab { display: inline; font-size: 15px; color: var(--muted); margin-right: 6px; }
  table.stack .sm-row { display: inline-flex; align-items: center; gap: 8px; }
  table.stack td[style*="nowrap"] { white-space: normal !important; }
  table.stack td form[style*="display:flex"] { flex-wrap: wrap; }
  .etable.stack td.mono { font-weight: 600; padding-top: 4px !important; }
}
@media (max-width: 640px) { .grid.g21 { grid-template-columns: 1fr !important; } }

/* Phones: forms laid out in fixed columns (style="grid-template-columns:1fr 1fr" etc.) become one column.
   Rows that are "text + button" (1fr auto) and grids that already wrap (auto-fit / auto-fill) keep their layout. */
@media (max-width: 640px) {
  main .grid[style*="grid-template-columns"]:not([style*="auto-fit"]):not([style*="auto-fill"]):not([style*="columns:1fr auto"]) { grid-template-columns: minmax(0, 1fr) !important; }
  main .grid > [style*="grid-column:span"], main .grid > [style*="grid-column: span"] { grid-column: 1 / -1 !important; }
}
@media (max-width: 640px) {
  .specs { grid-template-columns: minmax(0, 120px) minmax(0, 1fr); column-gap: 10px; padding: 6px 14px 12px; }
  .specs dd { overflow-wrap: anywhere; }
}
@media (max-width: 980px) { .libentry { grid-template-columns: minmax(0, 1fr); } }
input[type=file] { max-width: 100%; }
/* Section tabs on phones: tighter, so three tabs usually fit without sideways scrolling */
@media (max-width: 640px) { .hubtabs--phone a { padding: 9px 10px; font-size: 15.5px; } .hubtabs--phone { gap: 0; } }
.shot__ai .ic, .ai-cap summary .ic, .draft__steps .ic, #fill .ic { width: 14px; height: 14px; vertical-align: -2px; display: inline-block; }
.shot__ai { display: inline-flex; align-items: center; gap: 4px; }
@media (max-width: 640px) { .mtable .mrow img, .mtable .mrow__ph { display: none; } .mtable th, .mtable td { padding-left: 14px; padding-right: 14px; } }
/* Laptops and tablets (sidebar + narrower page): tighter table cells so rows and their buttons fit without sideways scrolling */
@media (min-width: 641px) and (max-width: 1240px) {
  .ttable th, .ttable td { padding-left: 10px; padding-right: 10px; }
  table.list th, table.list td { padding-left: 8px; padding-right: 8px; }
  .etable textarea { min-width: 130px; }
  table.list input[type=date] { max-width: 150px; }
  .mtable th, .mtable td { padding-left: 12px; padding-right: 12px; }
}
@media (min-width: 761px) and (max-width: 1240px) { .ttable .hide-md { display: none; } .ttable__act { white-space: normal; } .ttable__act .btn { margin-bottom: 4px; } }

/* Team-member app: big enough to tap with gloves on (44px), and clear empty states */
.w-top__home { display: inline-flex; align-items: center; gap: 4px; min-height: 44px; padding-right: 12px; }
.w-top .w-tabs a { display: inline-flex; align-items: center; min-height: 38px; padding: 0 14px; }
.w-nolock { display: flex; align-items: flex-start; gap: 8px; margin: 0 0 10px; color: var(--danger); font-weight: 600; font-size: 17px; }
.w-nolock .ic { margin-top: 3px; flex: none; }
.w-status .ok { display: inline-flex; align-items: center; gap: 4px; }
#code::placeholder { color: #C9CED4; font-weight: 500; }
.w-job .pill { vertical-align: 1px; }

/* Team page: add people */
.addpeople { padding: 12px 16px; margin: 0 0 14px; }
.addpeople > summary { cursor: pointer; display: flex; gap: 10px; flex-wrap: wrap; align-items: baseline; }
.addpeople textarea { width: 100%; font: 16px/1.5 var(--mono, monospace); margin-top: 6px; }

/* Team page: person search above the list */
.tfindrow { display: flex; justify-content: flex-start; margin: 0 0 10px; }
.tfindrow input { max-width: 260px; }

/* CoreShift logo in the sidebar */
.side__logo img { border-radius: 0; width: 26px; height: 26px; align-self: flex-start; margin-top: 1px; }  /* top of the mark lines up with the top of "CoreShift AI" */
.side__name { display: flex; flex-direction: column; line-height: 1.15; }
.side__name b { font: 700 17px/1.15 var(--sans); color: #fff; letter-spacing: -.01em; }
.side__name small { font: 500 14px/1.25 var(--sans); letter-spacing: 0; text-transform: none; color: #8C939B; }

/* Team page: people added as "Other employee" by default blink until a lead verifies them */
@keyframes vblink { 0%, 100% { opacity: 1; transform: scale(1); } 50% { opacity: .25; transform: scale(.7); } }
.vdot, .vblink i { display: inline-block; width: 9px; height: 9px; border-radius: 50%; background: var(--brand, #CF5A2A); animation: vblink 1.2s ease-in-out infinite; flex: none; }
.vblink { display: inline-flex; align-items: center; gap: 6px; margin-top: 4px; padding: 2px 8px; border: 1px solid var(--brand, #CF5A2A); border-radius: 999px; background: #FBEAE1; color: #9A3B12; font: 600 14px var(--sans); cursor: pointer; white-space: nowrap; }
.vnote { display: flex; gap: 10px; align-items: flex-start; background: #FBEAE1; border: 1px solid #F0C4AE; border-radius: 10px; padding: 10px 14px; margin: 0 0 12px; font-size: 16px; }
.vnote .vdot { margin-top: 6px; }
@media (prefers-reduced-motion: reduce) { .vdot, .vblink i { animation: none; } }

/* CoreShift mark: no tile, so no rounded frame or ring around it */
.product__icon, .signin__logo img, .pub__brand img { border-radius: 0 !important; box-shadow: none !important; }

/* Today: the not-urgent list, closed by default */
details.later > summary { cursor: pointer; list-style: none; }
details.later > summary::-webkit-details-marker { display: none; }
details.later > summary h2::after { content: "›"; display: inline-block; margin-left: 8px; color: var(--muted, #676B70); transition: transform .15s; }
details.later[open] > summary h2::after { transform: rotate(90deg); }
details.later:not([open]) > summary { border-bottom: 0; }

/* Corrective actions: the row opened from Today, and the close form */
.arow:target td { background: var(--safety-bg); }
.aclose > summary { list-style: none; display: inline-flex; }
.aclose > summary::-webkit-details-marker { display: none; }
.aclose[open] > summary { display: none; }
.aclose form { display: grid; gap: 6px; min-width: 240px; }
.aclose textarea { width: 100%; }
.aclose .hint { margin: 0; }

/* Machine page: add a corrective action in the Records list */
.rec__add { display: contents; }
.rec__add > summary { list-style: none; justify-self: end; }
.rec__add > summary::-webkit-details-marker { display: none; }
.rec__add > form { grid-column: 2 / -1; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); align-items: end; margin-top: 8px; }
.rec__add > form .field:first-of-type { grid-column: 1 / -1; }
@media (max-width: 640px) { .rec__add > form { grid-template-columns: 1fr !important; } }

/* Corrective actions: edit an open action in place */
.aedit { margin-top: 6px; }
.aedit > summary { cursor: pointer; font-size: 15px; color: var(--muted, #676B70); text-decoration: underline; width: max-content; }
.aedit > form { grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); align-items: end; gap: 8px; margin-top: 8px; min-width: 300px; }
.aedit .field { margin: 0; }

/* AI result blocks */
.ai-h { font-size: 16px; margin: 14px 0 6px; }
.ai-list { margin: 0; padding-left: 18px; } .ai-list li { margin: 6px 0; }
.ai-fix { display: grid; grid-template-columns: 1fr auto; gap: 10px; align-items: start; padding: 10px 0; border-top: 1px solid var(--line-2, #EFEDE8); }
.ai-fix > details > summary { list-style: none; } .ai-fix > details > summary::-webkit-details-marker { display: none; }
.ai-fix__form { display: grid; gap: 6px; margin-top: 6px; min-width: 200px; }
@media (max-width: 640px) { .ai-fix { grid-template-columns: 1fr; } }
.importbox { border: 1px dashed #D9D6CF; border-radius: 10px; padding: 10px 14px; background: #FBFAF7; }
.importbox > summary { cursor: pointer; display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.importbox form { margin-top: 10px; }

/* Page intros: what it's for, who uses it, how to start */
.intro { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1px; background: var(--rule, #E6E4DF); border: 1px solid var(--rule, #E6E4DF); border-radius: 12px; overflow: hidden; margin-bottom: 18px; }
.intro > div { background: #FBFAF7; padding: 12px 16px; font-size: 15.5px; line-height: 1.45; }
.intro b { display: block; font-size: 14px; color: var(--muted, #676B70); font-weight: 600; margin-bottom: 3px; }
@media (max-width: 760px) { .intro { grid-template-columns: 1fr; } }
.hero-card { display: grid; grid-template-columns: 1fr auto; gap: 18px; align-items: center; border-left: 4px solid var(--brand, #CF5A2A); }
@media (max-width: 640px) { .hero-card { grid-template-columns: 1fr; } }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* Environment calendar and obligations */
.calm { font-size: 14px; text-transform: none; color: var(--muted, #676B70); margin: 16px 0 4px; font-weight: 600; }
.calrow { display: grid; grid-template-columns: 44px 1fr auto; gap: 12px; align-items: center; padding: 8px 0; border-top: 1px solid var(--line-2, #EFEDE8); }
.calrow__d { text-align: center; line-height: 1.1; } .calrow__d b { display: block; font-size: 18.7px; } .calrow__d small { color: var(--muted, #676B70); font-size: 13px; }
.calrow__t a { color: var(--ink); text-decoration: none; font-weight: 500; } .calrow__t a:hover { text-decoration: underline; }
.calrow__t small { display: block; color: var(--muted, #676B70); font-size: 14.5px; }
.calrow__s { display: flex; gap: 8px; align-items: center; justify-content: flex-end; flex-wrap: wrap; }
.calrow--late .calrow__d b { color: var(--danger); } .calrow--done { opacity: .6; }
.oblig { border-top: 1px solid var(--line-2, #EFEDE8); padding: 10px 0; }
.oblig > summary { cursor: pointer; display: flex; gap: 10px; align-items: center; flex-wrap: wrap; list-style: none; }
.oblig > summary::-webkit-details-marker { display: none; }
.oblig__a { font-size: 13px; font-weight: 600; color: var(--muted, #676B70); background: #F2F0EB; border-radius: 5px; padding: 2px 7px; }
.statenote, .plain, .envq__hint { background: #FBEAE1; border-radius: 8px; padding: 8px 10px; font-size: 15.5px; margin: 8px 0 0; }
.plain { background: #F6F4EF; }
.toolrow { display: grid; grid-template-columns: auto 1fr auto; gap: 12px; align-items: center; padding: 11px 0; border-top: 1px solid var(--line-2, #EFEDE8); color: inherit; text-decoration: none; }
.toolrow:first-of-type { border-top: 0; } .toolrow:hover b { text-decoration: underline; }
.toolrow small { display: block; font-size: 14.5px; color: var(--ink-2, #3A3D41); }
.envq { border: 0; border-top: 1px solid var(--line-2, #EFEDE8); padding: 14px 0; margin: 0; }
.envq:first-of-type { border-top: 0; padding-top: 0; }
.envq legend { font-weight: 600; font-size: 17px; padding: 0; display: flex; gap: 10px; }
.envq__n { flex: none; width: 22px; height: 22px; border-radius: 50%; background: #F2F0EB; font-size: 14px; display: inline-grid; place-items: center; }
.envq .hint { margin: 4px 0 0 32px; } .envq__hint { margin-left: 32px; }
.envq__c { display: flex; gap: 8px; flex-wrap: wrap; margin: 10px 0 0 32px; }

/* Ask CoreShift */
.askbox { display: grid; grid-template-columns: 1fr; gap: 10px; }
.askbox .btn { justify-self: end; min-width: 140px; }
.askbox .interim:empty { display: none; }
.askbox .busyline { margin: 0; text-align: right; }
.askbox textarea { font-size: 18px; resize: vertical; }
@media (max-width: 640px) { .askbox { grid-template-columns: 1fr; } }
.askq { font-weight: 600; margin: 0 0 8px; color: var(--muted, #676B70); }
.askans { white-space: pre-wrap; font-size: 17px; line-height: 1.55; }
.srcs { display: flex; gap: 6px; flex-wrap: wrap; } .srcs .chip { text-decoration: none; color: var(--ink); font-family: var(--mono, monospace); font-size: 14px; }
@media print { .side, .bnav, .intro, .page__head .actions, form, .toolrow { display: none !important; } }
.dot + .dot::before { content: " · "; }

/* Leadership briefing and penalty exposure */
.brief { margin-bottom: 12px; border-left: 4px solid var(--signal, #D9622B); }
.brief__h { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.brief__h h3 { margin: 0; }
.brief__head { font-size: 18.7px; font-weight: 600; margin: 8px 0 4px; letter-spacing: -.01em; }
.brief h4 { font-size: 15px; margin: 12px 0 6px; color: var(--muted); text-transform: none; }
.brief__risks { margin: 0; padding-left: 20px; display: grid; gap: 8px; }
.brief__risks li span { display: block; color: var(--muted); font-size: 15px; }
.brief__risks li .brief__act { color: var(--ink); display: flex; gap: 4px; align-items: center; }
.brief__risks .brief__act svg { width: 14px; height: 14px; flex: none; }
.brief__two { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 0 20px; }
.xk--risk b { color: var(--danger); }
.xpen { margin: -4px 0 8px; }

/* Machines list: search and filters */
.mfilter { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-bottom: 10px; }
.mfilter input[type=search] { flex: 1 1 240px; max-width: 360px; }
.mfilter .chip { cursor: pointer; }
.mfilter .chip[aria-pressed=true], .docchips .chip[aria-pressed=true] { background: var(--ink); color: #fff; border-color: var(--ink); }
.mfilter .chip b { font-weight: 600; margin-left: 4px; opacity: .75; }
.mcover { display: flex; align-items: center; gap: 10px; margin: 0 0 12px; font-size: 15px; color: var(--muted); }
.mcover .xbar { flex: 1; max-width: 320px; }
tr[hidden] { display: none; }

/* Equipment list import */
.imp-table { width: 100%; border-collapse: collapse; font-size: 15px; }
.imp-table th { text-align: left; font-weight: 600; color: var(--muted); font-size: 14px; padding: 6px 4px; border-bottom: 1px solid var(--rule); position: sticky; top: 0; background: #fff; }
.imp-table td { padding: 4px; border-bottom: 1px solid var(--rule); vertical-align: middle; }
.imp-table input[type=text], .imp-table select { width: 100%; min-width: 80px; padding: 5px 6px; font-size: 15px; }
.imp-table tr.is-dup td { background: #FFF8E6; }
.imp-wrap { overflow-x: auto; max-height: 70vh; overflow-y: auto; border: 1px solid var(--rule); border-radius: 10px; }
.imp-steps { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 10px; margin: 0 0 14px; }
.imp-steps div { background: #fff; border: 1px solid var(--rule); border-radius: 10px; padding: 10px 12px; font-size: 15px; }
.imp-steps b { display: block; }
.imp-bar { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; justify-content: space-between; margin: 12px 0; }

/* Safety programs: equipment, checklists, people grid, permits */
.grid3 { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 0 12px; }
.have { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.have .chip { text-decoration: none; display: inline-flex; gap: 4px; align-items: center; }
.have .chip svg { width: 14px; height: 14px; }
.chip--bad { border-color: #F5CBC6; background: var(--bad-bg); color: #8E1C16; }
.eqtabs { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 6px; align-items: center; }
.eqtabs > a { display: inline-flex; align-items: center; gap: 8px; height: 38px; box-sizing: border-box; padding: 0 8px 0 14px; border: 1px solid var(--rule); border-radius: 999px; text-decoration: none; color: var(--ink); background: #fff; font-size: 15px; line-height: 1; white-space: nowrap; }
.eqtabs > a:not(:has(b)) { padding-right: 14px; }
.eqtabs > a:hover { background: #F4F2EE; }
.eqtabs > a b, .eqkey b { display: inline-flex; align-items: center; justify-content: center; min-width: 24px; height: 24px; padding: 0 7px; box-sizing: border-box; border-radius: 999px; background: #EFEDE8; color: var(--ink); font: 600 13px/1 var(--sans); }
.eqtabs > a b.late, .eqkey b.late { background: #FBE3DF; color: var(--danger); }
.eqtabs > a[aria-current=page] { background: var(--ink); color: #fff; border-color: var(--ink); }
.eqtabs > a[aria-current=page] b:not(.late) { background: rgba(255,255,255,.18); color: #fff; }
.eqtabs > a[aria-current=page] b.late { background: #fff; }
.eqtabs select.eqadd { width: auto !important; flex: 0 0 auto; max-width: 220px; height: 38px; margin: 0; padding: 0 30px 0 14px; border: 1px dashed #C9C5BC; border-radius: 999px; background-color: transparent; color: var(--muted); font-size: 15px; cursor: pointer; }
.eqkey { display: flex; align-items: center; gap: 6px; margin: 0 0 14px; }
.eqkey b { min-width: 14px; height: 14px; padding: 0; }
.chk { width: 100%; border-collapse: collapse; margin-bottom: 10px; } .chk td { padding: 6px 0; border-bottom: 1px solid var(--rule); font-size: 16px; }
.chk__o, .wchk__o { white-space: nowrap; text-align: right; }
.seg { display: inline-block; position: relative; margin-left: 4px; }
.seg input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.seg span { display: inline-block; padding: 6px 10px; border: 1px solid var(--rule); border-radius: 8px; font-size: 15px; font-weight: 600; cursor: pointer; background: #fff; min-width: 44px; text-align: center; }
.seg input:focus-visible + span { outline: 2px solid var(--ink); outline-offset: 2px; }
.seg--ok input:checked + span { background: var(--ok); border-color: var(--ok); color: #fff; }
.seg--fail input:checked + span { background: var(--danger); border-color: var(--danger); color: #fff; }
.seg--na input:checked + span { background: #6B6F76; border-color: #6B6F76; color: #fff; }
.wchk { display: grid; gap: 0; margin-bottom: 12px; }
.wchk__row { display: flex; justify-content: space-between; gap: 10px; align-items: center; padding: 10px 0; border-bottom: 1px solid var(--rule); font-size: 17px; }
.wchk .seg span { padding: 10px 12px; font-size: 16px; }
.btn--block { display: block; width: 100%; text-align: center; }
.hist { display: grid; gap: 2px; padding: 8px 0; border-bottom: 1px solid var(--rule); font-size: 16px; }
.hist small { color: var(--muted); } .hist--fail { border-left: 3px solid var(--danger); padding-left: 8px; }
.hist__ph, .eqphoto { max-width: 160px; border-radius: 6px; margin-top: 4px; }
.airead { display: grid; gap: 6px; padding: 10px; border: 1px dashed var(--rule); border-radius: 10px; margin-bottom: 10px; }
.airead label { display: flex; gap: 6px; align-items: center; font-weight: 600; } .airead svg { width: 16px; height: 16px; }
.reqgrid { border-collapse: collapse; width: 100%; font-size: 15px; }
.reqgrid th { text-align: left; font-size: 14px; padding: 6px 8px; border-bottom: 1px solid var(--rule); vertical-align: bottom; min-width: 110px; }
.reqgrid th small, .reqgrid td small { display: block; font-weight: 400; color: var(--muted); font-size: 13px; }
.reqgrid td { padding: 6px 8px; border-bottom: 1px solid var(--rule); vertical-align: top; position: relative; }
.rq--ok { background: #EEF7F1; } .rq--soon { background: var(--warn-bg); } .rq--expired { background: var(--bad-bg); } .rq--missing { background: #FFF4EE; }
.rq--expired span:first-child { color: #8E1C16; font-weight: 600; }
.rq__del { position: absolute; top: 2px; right: 4px; } .rq__del .linkbtn { color: var(--muted); font-size: 16px; }
.rq-key { display: inline-block; width: 12px; height: 12px; border-radius: 3px; vertical-align: middle; margin: 0 2px 0 8px; border: 1px solid var(--rule); }
.hz { display: grid; gap: 6px; } .hz__row { display: grid; grid-template-columns: 1fr 1.4fr; gap: 6px; }
.ckrow { display: flex; gap: 8px; align-items: flex-start; padding: 6px 0; border-bottom: 1px solid var(--rule); font-size: 16px; font-weight: 400; }
.ckrow input { margin-top: 3px; }
.rd--bad td { background: var(--bad-bg); color: #8E1C16; font-weight: 600; }
.heat { border-collapse: separate; border-spacing: 4px; width: 100%; }
.heat td { padding: 8px 10px; border-radius: 6px; font-size: 15px; }
.heat .h0 { background: var(--ok-bg); } .heat .h1 { background: var(--warn-bg); } .heat .h2 { background: var(--bad-bg); color: #8E1C16; }
.heat td b { display: block; font-size: 17px; }
@media (max-width: 640px) { .hz__row { grid-template-columns: 1fr; } .wchk__row { flex-direction: column; align-items: flex-start; } }
.reqgrid th:first-child, .reqgrid td:first-child { position: sticky; left: 0; background: #fff; z-index: 1; min-width: 150px; box-shadow: 1px 0 0 var(--rule); }

/* Maintenance work */
.wo { display: grid; grid-template-columns: 10px 1fr auto; gap: 12px; align-items: center; padding: 10px 4px; border-bottom: 1px solid var(--rule); text-decoration: none; color: var(--ink); }
.wo:last-child { border-bottom: 0; } .wo:hover { background: #FAF9F6; }
.wo__st { width: 10px; height: 10px; border-radius: 50%; background: var(--muted); }
.wo__st--blocked { background: var(--danger); } .wo__st--todo { background: #D99A00; } .wo__st--ready { background: var(--ok); }
.wo__m b { display: block; font-size: 16px; } .wo__m small { color: var(--muted); font-size: 14px; }
.wo__late { color: var(--danger); font-weight: 600; }
.wo__needs { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 4px; }
.need { font-size: 13px; padding: 2px 8px; border-radius: 999px; border: 1px solid var(--rule); }
.need--ok { background: var(--ok-bg); border-color: #CDE8D6; color: #1E5631; } .need--bad { background: var(--bad-bg); border-color: #F5CBC6; color: #8E1C16; } .need--todo { background: var(--warn-bg); border-color: #F5E2A6; color: #6E4C00; }
.ready { display: grid; grid-template-columns: 28px 1fr auto; gap: 10px; align-items: center; padding: 10px 0; border-bottom: 1px solid var(--rule); }
.ready b { display: block; font-size: 16px; } .ready small { color: var(--muted); font-size: 15px; }
.ready__ic { width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; } .ready__ic svg { width: 16px; height: 16px; }
.ready--ok .ready__ic { background: var(--ok-bg); color: var(--ok); } .ready--bad .ready__ic { background: var(--bad-bg); color: var(--danger); } .ready--todo .ready__ic { background: var(--warn-bg); color: #8A6100; }
.wo__prog { display: flex !important; gap: 4px; align-items: center; color: var(--ink) !important; } .wo__prog svg { width: 12px; height: 12px; }
.wog { display: flex; gap: 8px; align-items: center; font-size: 17px; } .wog::before { content: ""; width: 10px; height: 10px; border-radius: 50%; background: var(--muted); }
.wog--working::before { background: #2F6FB5; } .wog--blocked::before { background: var(--danger); } .wog--todo::before { background: #D99A00; } .wog--ready::before { background: var(--ok); }
.wo__st--working { background: #2F6FB5; }
.two > * { min-width: 0; }
@media (max-width: 640px) {
  .heat, .heat tbody { display: block; } .heat tr { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; margin-bottom: 4px; } .heat td { display: block; }
  .kpis { grid-template-columns: 1fr 1fr; }
}

/* One chevron everywhere: dropdowns and expandable sections (the browser's own arrows sat against the edge and differed per page) */
select:not([multiple]) {
  -webkit-appearance: none; appearance: none; padding-right: 36px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%235A6068' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 12px center; background-size: 12px 12px;
}
select:disabled { opacity: .7; }
summary { list-style: none; } summary::-webkit-details-marker { display: none; }
details:not(.plantsw):not(.acct):not(.libsharebox):not(.eqmore):not(.later):not(.bnav__more) > summary::after {
  content: ""; display: inline-block; width: 7px; height: 7px; margin-left: 8px; vertical-align: 2px;
  border-right: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: rotate(45deg); opacity: .55; transition: transform .15s;
}
details[open]:not(.plantsw):not(.acct):not(.libsharebox):not(.eqmore):not(.later):not(.bnav__more) > summary::after { transform: rotate(225deg); vertical-align: -2px; }

/* Today: a second column with the state of the floor */
.today-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 0 20px; align-items: start; }
@media (min-width: 1200px) { .today-grid { grid-template-columns: minmax(0, 1.7fr) minmax(280px, 1fr); align-items: stretch; }
  .today-main { display: flex; flex-direction: column; } .today-main > .panel:last-child { flex: 1; } .today-side { align-self: start; } }
.glance__links { margin: 0; padding: 0 16px 14px; }
.today-side .panel__h a { font-size: 15px; }
.minis { display: grid; grid-template-columns: repeat(auto-fit, minmax(90px, 1fr)); gap: 8px; padding: 12px 16px 16px; }
.minis a { display: grid; gap: 2px; align-content: start; padding: 10px 12px; border: 1px solid var(--rule); border-radius: 10px; text-decoration: none; color: var(--ink); }
.minis a b { font-size: 24.2px; letter-spacing: -.02em; } .minis a span { font-size: 14px; color: var(--muted); }
.minis a.bad b { color: var(--danger); } .minis a:hover { border-color: var(--ink); }

/* Wide screens: use the width, and center what's left */
@media (min-width: 1500px) { .page { max-width: 1480px; margin: 0 auto; } }

/* Sidebar: grouped sections with red counts of what needs attention */
.navgroup { font: 600 13px/1 var(--sans); letter-spacing: .06em; text-transform: uppercase; color: #6E767F; padding: 14px 10px 6px; }
.side__nav .badge { background: #D92D20; color: #fff; font-size: 13px; min-width: 18px; padding: 1px 6px; border-radius: 9px; text-align: center; }

/* Phone header: the logo mark alone, so the plant name has room (it was squeezed to an empty box behind the language switch) */
@media (max-width: 900px) {
  .side__logo .side__name { display: none; }
  .plantsw { flex: 1 1 auto; min-width: 80px; }
  .plantsw summary { min-width: 0; }
  .plantsw summary b { max-width: none; display: block; min-width: 0; }
}
@media (max-width: 360px) { .side__lang .langtab a { padding: 6px 6px; } }
/* Sidebar rhythm: every row the same height, even space between rows, section labels with modest space above and a little below */
.side__nav { gap: 2px; }
.side__nav .navgroup { margin: 0; padding: 14px 10px 4px; font: 600 13px/1 var(--sans); letter-spacing: .06em; text-transform: uppercase; color: #6E767F; }
.side__nav .navrow > a { min-height: 36px; box-sizing: border-box; }
.side__nav a .badge { height: 18px; line-height: 18px; min-width: 18px; padding: 0 6px; margin: 0; font-size: 13px; border-radius: 9px; text-align: center; flex: none; }

/* Documents */
.doc { display: grid; grid-template-columns: 32px 1fr auto; gap: 12px; align-items: center; padding: 10px 4px; border-bottom: 1px solid var(--rule); text-decoration: none; color: var(--ink); }
.doc:last-child { border-bottom: 0; } .doc:hover { background: #FAF9F6; }
.doc__ic { width: 32px; height: 32px; border-radius: 8px; background: var(--paper-2, #F1EFEA); display: grid; place-items: center; } .doc__ic svg { width: 16px; height: 16px; }
.doc__m b { display: block; font-size: 16px; } .doc__m small { display: block; color: var(--muted); font-size: 14px; }
.doc__s { margin-top: 2px; color: var(--ink-2, #4A4F55) !important; }

/* Form rhythm for forms built without .field wrappers: space above each label, a small gap to its box, room before the button */
form > label:not(.chip):not(.ckrow):not(.seg), .card > label:not(.chip):not(.ckrow):not(.seg), .grid3 > div > label { display: block; margin: 14px 0 6px; }
form > h2 + label, .card > h2 + label, form > label:first-child, form > input[type=hidden]:first-child + label, .grid3 > div > label { margin-top: 14px; }
form > h2 + label, .card > h2 + label { margin-top: 0; }
form > input:not([type=hidden]):not([type=checkbox]):not([type=radio]), form > select, form > textarea { display: block; width: 100%; }
form > .btn, form > button.btn, form > span > .btn { margin-top: 16px; }
form > .hint, .card > form + .hint { margin-top: 10px; }
.grid3 { margin-top: 0; }
form > .grid3 + label { margin-top: 14px; }
.hz__head span { font: 600 14px/1 var(--sans); color: var(--muted); padding: 0 2px; }
.hz textarea { min-height: 0; resize: vertical; line-height: 1.4; }
.reqpick { margin: 0; } .reqpick select { width: auto; min-width: 240px; }
/* Sidebar head: clear space between the brand and the plant box, and between the plant box and the menu */
@media (min-width: 901px) {
  .side__logo { padding-bottom: 22px; }
  .plantsw { margin: 0 0 18px; }
}

/* Risk score */
.riskc { margin-bottom: 12px; }
.riskc__top { display: flex; gap: 14px; align-items: center; margin-bottom: 8px; }
.riskc__score { width: 74px; height: 74px; border-radius: 50%; display: grid; place-content: center; text-align: center; flex: none; border: 4px solid var(--ok); }
.riskc__score b { font-size: 28.6px; line-height: 1; } .riskc__score span { font-size: 13px; color: var(--muted); }
.riskc__score--B { border-color: #6FA43A; } .riskc__score--C { border-color: #D99A00; } .riskc__score--D { border-color: #D9622B; } .riskc__score--F { border-color: var(--danger); }
.riskc__t td small { display: block; color: var(--muted); font-size: 13px; } .riskc__t td.r { text-align: right; white-space: nowrap; font-weight: 600; }
.riskc__zero { opacity: .55; }
.scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.codebox { background: #16181B; color: #E9ECEF; border-radius: 8px; padding: 10px 12px; font: 14px/1.5 "IBM Plex Mono", monospace; overflow-x: auto; white-space: pre; }
/* Cost of risk and machines to watch (executive) */
.costc, #watch { margin-bottom: 12px; }
.costc td small, #watch td small { display: block; color: var(--muted); font-size: 13px; margin-top: 2px; }
.costc td.r, #watch td.r { text-align: right; white-space: nowrap; vertical-align: top; }
#watch td.r small { display: inline; }
.costc__total td { border-top: 2px solid var(--line, #ddd); }
.costc__set { margin-top: 8px; } .costc__set summary { cursor: pointer; font-weight: 600; font-size: 15px; }
.costc__form { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 10px; align-items: end; margin-top: 8px; }
.costc__form .field { margin: 0; }
/* Mock inspection */
.mockq { margin: 0; padding-left: 20px; } .mockq li { margin: 0 0 10px; } .mockq small { display: block; color: var(--muted); font-size: 14.5px; margin-top: 2px; }
.mockc { border-top: 1px solid var(--line, #e5e2dc); padding: 10px 0; } .mockc:first-of-type { border-top: 0; padding-top: 0; }
.mockc__h { display: flex; justify-content: space-between; gap: 8px; align-items: center; font-size: 15px; }
.mockc__f { display: grid; grid-template-columns: 1fr 1fr auto; gap: 8px; align-items: end; margin-top: 8px; }
@media (max-width: 640px) { .mockc__f { grid-template-columns: 1fr; } }
.aicheck { display: block; margin-top: 4px; font-size: 14.5px; } .aicheck--problem { color: var(--bad, #B42318); font-weight: 600; } .aicheck--ok { color: var(--ok, #1E6B3A); }
.lphoto__f { margin: 4px 0 8px; } .cmp { margin: 0; padding-left: 18px; } .cmp li { margin: 0 0 4px; }
/* Machine changes, walks, padlocks */
.mocf { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 12px; margin-bottom: 12px; }
.mocs { list-style: none; margin: 0 0 12px; padding: 0; } .mocs li { border-left: 3px solid var(--warn, #C98A00); padding: 6px 0 10px 12px; margin-bottom: 8px; }
.mocs li.is-ok { border-left-color: var(--ok, #1E6B3A); } .mocs__h { display: flex; gap: 8px; align-items: center; } .mocs__h .ic { width: 18px; height: 18px; }
.mocs li.is-ok .mocs__h .ic { color: var(--ok, #1E6B3A); } .mocs__f { display: flex; gap: 8px; flex-wrap: wrap; } .mocs__f input { flex: 1 1 220px; }
.walkpick { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 12px; } .walkpick__c { text-decoration: none; color: inherit; margin: 0; }
.walkpick__c b { display: block; font-size: 18px; } .walkpick__c span { color: var(--muted); font-size: 15px; }
.walki { padding: 12px 14px; } .walki__t { margin: 0 0 8px; } .walki__r { display: flex; gap: 8px; flex-wrap: wrap; } .walki__r .chip { min-width: 72px; justify-content: center; }
.walki__more { display: flex; gap: 8px; margin-top: 8px; } .walki__more input { flex: 1; } .walki__cam { white-space: nowrap; }
.chip--fix:has(input:checked) { background: var(--bad-bg, #FBE9E7); border-color: var(--bad, #B42318); }
.lockf { display: grid; grid-template-columns: 2fr 1fr 1fr 80px auto; gap: 10px; align-items: end; }
@media (max-width: 760px) { .lockf { grid-template-columns: 1fr 1fr; } }
.lockrow { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; } .lockrow input { width: 140px; }
.kpi[aria-current] { outline: 2px solid var(--signal, #D9622B); }
@media print { body:has(.lockf) .side, body:has(.lockf) form, body:has(.lockf) .actions { display: none !important; } }
.isot__n { width: 64px; color: var(--muted); } .rulec__h { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; font-size: 15px; }
/* Agent, ROI, alerts, photo checks, walkaround */
.agent__all { display: flex; gap: 12px; align-items: center; justify-content: space-between; flex-wrap: wrap; }
.agent__h { font-size: 17px; margin: 18px 0 8px; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; }
.agent__step { padding: 12px 14px; } .agent__step--done { border-left: 3px solid var(--ok, #1E6B3A); } .agent__step--skipped { opacity: .6; }
.agent__top { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.agent__f { display: grid; grid-template-columns: minmax(0, 1fr) 180px auto auto; gap: 10px; align-items: end; }
.agent__f label { display: block; margin: 0 0 6px !important; line-height: 1.3; }
.agent__f input { width: 100% !important; height: 46px; box-sizing: border-box; margin: 0; }
.agent__f .btn { height: 46px; margin: 0; padding: 0 20px; }
@media (max-width: 640px) { .agent__f { grid-template-columns: 1fr 1fr; } }
.roif { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 10px; align-items: end; margin-top: 8px; }
.malert__h { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; } .malert.is-ack { opacity: .75; }
.malert__f { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 10px; } .malert__f input { flex: 1 1 220px; }
.pfind--confirmed { border-left: 3px solid var(--ok, #1E6B3A); } .pfind--rejected { opacity: .6; }
.wa__modes { display: flex; gap: 10px; flex-wrap: wrap; } #wa-video { width: 100%; max-height: 360px; background: #000; border-radius: 8px; margin-top: 12px; }
.wa__status { font-weight: 600; margin: 8px 0; } .wa__frames { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; margin-top: 8px; } .wa__frames img { width: 100%; border-radius: 6px; }
.terms p { font-size: 16px; margin: 6px 0; }
.snap { display: grid; grid-template-columns: 1fr 200px auto; gap: 10px; align-items: center; } .snap b { display: block; } .snap .hint { display: block; margin: 2px 0 0; }
@media (max-width: 640px) { .snap { grid-template-columns: 1fr; } }
.nowrap { white-space: nowrap; }
.roiq th { white-space: nowrap; }
/* Phone fixes from the design scan */
.digest .kpis { grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); }
.ttable-wrap { overflow-x: auto; }
@media (max-width: 640px) {
  .isot__n { display: none; } .isot .pill { white-space: normal; text-align: center; }
  .roit td:first-child { min-width: 150px; }
}
.wa__step { display: flex; gap: 10px; align-items: center; margin: 0 0 10px; font-weight: 600; }
.wa__step b { display: inline-grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; background: var(--signal, #D9622B); color: #fff; font-size: 16px; flex: none; }
.wa__step ~ .wa__step { margin-top: 22px; }
.ptproof { display: flex; flex-wrap: wrap; gap: 8px 12px; align-items: center; margin: 0 0 10px; font-size: 15.5px; }
.ptproof img { width: 64px; height: 64px; object-fit: cover; border-radius: 6px; border: 1px solid var(--line, #ddd); }
.kindpick { display: flex; flex-wrap: wrap; gap: 6px; margin: 6px 0; }
/* Downtime and audit rooms */
.dtbars { display: grid; grid-template-columns: repeat(13, 1fr); gap: 6px; align-items: end; height: 140px; }
.dtbar { display: flex; flex-direction: column; justify-content: flex-end; align-items: center; height: 100%; gap: 4px; }
.dtbar i { display: block; width: 100%; min-height: 2px; background: var(--signal, #D9622B); border-radius: 4px 4px 0 0; }
.dtbar span { font-size: 13px; color: var(--muted); }
.room { border-top: 1px solid var(--line, #e5e2dc); padding: 12px 0; } .room:first-of-type { border-top: 0; padding-top: 0; }
.room__h { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; } .room__l { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin-top: 8px; } .room__l input { flex: 1 1 300px; }
/* Microphone button: centered in one-line fields, top-right in text boxes, never past the field's edge */
.voice-wrap .mic { width: 32px; height: 32px; right: 6px; top: 6px; }
.voice-wrap .mic svg { width: 17px; height: 17px; }
.voice-wrap > input ~ .mic { top: 50%; transform: translateY(-50%); }
.voice-wrap > input { padding-right: 46px; }
.voice-wrap > textarea { padding-right: 46px; }
.voice-wrap > textarea ~ .mic { top: 7px; }
.voice-wrap .mic.on { animation: none; box-shadow: 0 0 0 4px color-mix(in srgb, var(--danger) 25%, transparent); }
/* Add-machine steps: earlier and later steps are links */
.msteps li a { color: inherit; text-decoration: none; }
.msteps li:has(a):hover { border-color: var(--ink); color: var(--ink); }
.msteps li.done::before { content: "✓"; background: var(--ok, #1E6B3A); color: #fff; }
.cap-bar { display: flex; gap: 10px; } .cap-bar > form, .cap-bar > .btn--signal { flex: 1; }
.based__list { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 8px; }
.based__list li { display: flex; gap: 8px; align-items: center; color: var(--muted); font-size: 16px; } .based__list li.is-ok { color: var(--ink); }
.based__list li .ic { width: 18px; height: 18px; } .iq__chips { display: flex; gap: 8px; flex-wrap: wrap; }
/* Machine page: sticky title, add/more menus, back bar, manuals form */
.mhead { position: sticky; top: 0; z-index: 20; background: var(--paper, #F7F5F1); padding: 10px 0 8px; margin-top: -10px; border-bottom: 1px solid transparent; }
.mhead.is-stuck { border-bottom-color: var(--rule, #e5e2dc); box-shadow: 0 6px 12px -10px rgba(0,0,0,.25); }
.mhead.is-stuck .crumbs, .mhead.is-stuck .mhead__meta { display: none; } .mhead.is-stuck h1 { font-size: 24.2px; margin: 0; }
.menu { position: relative; } .menu > summary { list-style: none; cursor: pointer; display: inline-flex; align-items: center; gap: 6px; } .menu > summary::-webkit-details-marker { display: none; }
.menu__list { position: absolute; right: 0; top: calc(100% + 6px); z-index: 30; min-width: 300px; background: #fff; border: 1px solid var(--rule, #e5e2dc); border-radius: 12px; box-shadow: 0 12px 30px rgba(0,0,0,.14); padding: 6px; display: flex; flex-direction: column; }
.menu__list a, .menu__list button { display: flex; gap: 12px; align-items: flex-start; padding: 10px 12px; border-radius: 8px; text-decoration: none; color: var(--ink); background: none; border: 0; text-align: left; font: inherit; cursor: pointer; width: 100%; }
.menu__list a:hover, .menu__list button:hover { background: var(--paper-2, #F1EEE8); }
.menu__list b { display: block; font-size: 16.5px; } .menu__list small { display: block; color: var(--muted); font-size: 14.5px; margin-top: 1px; } .menu__list .ic { margin-top: 2px; flex: none; }
.menu__list form { margin: 0; } .menu__danger b { color: var(--danger, #B42318); }
@media (max-width: 700px) { .menu__list { right: auto; left: 0; min-width: 260px; } .menu__list--right { left: auto; right: 0; } }
.backbar { display: inline-flex; gap: 6px; align-items: center; margin: 0 0 12px; font-weight: 600; text-decoration: none; color: var(--ink); background: #fff; border: 1px solid var(--rule, #e5e2dc); border-radius: 999px; padding: 6px 14px; font-size: 16px; }
.docadd { display: grid; grid-template-columns: 1fr 220px auto; gap: 12px; align-items: end; margin-top: 10px; width: 100%; }
@media (max-width: 760px) { .docadd { grid-template-columns: 1fr; } }
.rec__add[open] { flex-basis: 100%; } .basedon { display: flex; gap: 6px; align-items: center; margin: -4px 0 10px; }
/* Nameplate field: microphone and camera sit inside the box, on the right */
.platefield { position: relative; }
.platefield .voice-wrap > input, .platefield > input[type=text] { padding-right: 84px; }
.platefield__cam { position: absolute; right: 42px; top: 50%; transform: translateY(-50%); width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; background: var(--paper-2); color: var(--ink); cursor: pointer; z-index: 1; }
.platefield__cam:hover { background: #E8E4DC; }
.platefield__cam .ic { width: 17px; height: 17px; }
.platefield:not(:has(.mic)) .platefield__cam { right: 6px; }
.platefield:not(:has(.mic)) > input[type=text] { padding-right: 46px; }
/* One look for the English / Español switch on every page: the selected language is the orange pill. */
.langtab a.on, .side__lang .langtab a.on, .w-top .w-tabs a.on, .w-tabs a.on { background: var(--safety); color: #fff; box-shadow: none; }
.langtab a:not(.on):hover { color: var(--ink); }
.side__lang .langtab a:not(.on):hover { color: #fff; }
.mrow__cta { font: 600 14.5px/1 var(--sans); color: var(--signal-ink); margin-left: 6px; white-space: nowrap; }
.mrow__cta:hover { text-decoration: underline; }
.qrprint__k { font: 600 14px/1 var(--sans); text-transform: uppercase; letter-spacing: .06em; color: var(--muted); margin: 14px 0 6px; }
.qrprint { display: grid; gap: 8px; }
.qrprint__opt { display: flex; gap: 10px; align-items: flex-start; padding: 10px 12px; border: 1px solid var(--rule); border-radius: 10px; color: var(--ink); text-decoration: none; background: #fff; }
.qrprint__opt:hover { border-color: var(--ink-2); }
.qrprint__opt .ic { width: 20px; height: 20px; flex: none; margin-top: 1px; }
.qrprint__opt b { display: block; font-size: 16px; } .qrprint__opt small { display: block; color: var(--muted); font-size: 14.5px; margin-top: 2px; }
.qrprint__opt.is-off { opacity: .55; cursor: not-allowed; background: transparent; }
details.menu > summary::after { content: none !important; display: none !important; }
/* Procedure edit: the machine stays visible on the right while you edit */
.pedit { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 20px; align-items: start; }
.pedit__side { position: sticky; top: 16px; display: flex; flex-direction: column; gap: 14px; }
.pedit__side .card { margin: 0; }
.pedit__pics { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.pedit__pics a { display: block; text-decoration: none; color: var(--muted); font-size: 13px; }
.pedit__pics img { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 6px; display: block; }
.pedit__pics span { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin-top: 2px; }
@media (max-width: 1100px) { .pedit { grid-template-columns: minmax(0, 1fr); } .pedit__side { position: static; } }
.pedit__side .specs { grid-template-columns: 84px minmax(0, 1fr); column-gap: 10px; padding: 0; } .pedit__side .specs dd { margin: 0; }
/* Manuals & SOPs add form: a full-width panel under the row, file and kind side by side */
.rec .docadd { grid-column: 1 / -1; grid-template-columns: minmax(0, 1fr) 220px; gap: 12px 16px; align-items: start; margin: 10px 0 4px; padding: 14px 16px; background: var(--paper-2, #F6F4EF); border: 1px solid var(--rule); border-radius: 10px; }
.rec .docadd[hidden] { display: none; }
.docadd__t { grid-column: 1 / -1; margin: 0; font-weight: 600; font-size: 16px; }
.docadd__go { grid-column: 1 / -1; }
.rec .docadd input[type=file] { width: 100%; background: #fff; }
@media (max-width: 640px) { .rec .docadd { grid-template-columns: minmax(0, 1fr); } }
.rec__panel { grid-column: 1 / -1; margin: 10px 0 4px; padding: 14px 16px; background: var(--paper-2, #F6F4EF); border: 1px solid var(--rule); border-radius: 10px; }
.rec__panel[hidden] { display: none; }
.rec__panel form { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 10px 14px; align-items: end; margin: 0; }
.rec__panel form .field { margin: 0; } .rec__panel form > .btn, .rec__panel form > button { justify-self: start; }
.rec__panel input:not([type=checkbox]):not([type=radio]), .rec__panel select { width: 100%; background: #fff; }
.shootbar { display: flex; flex-wrap: wrap; gap: 8px; }
.shootbar label { cursor: pointer; }
.shootbar label.is-busy { opacity: .6; pointer-events: none; }
@media (max-width: 900px) { .mhead { top: 52px; } }
.cap-bar .btn { display: inline-flex; align-items: center; justify-content: center; text-align: center; }
.thumb__file { aspect-ratio: 1; display: grid; place-items: center; background: var(--paper-2); border-radius: 8px; border: 1px solid var(--rule); }
.thumb__file b { font: 700 15px/1 var(--sans); color: var(--ink-2); letter-spacing: .04em; }
/* Drafting guardrail */
.gate { border-left: 6px solid var(--warn, #B7791F); }
.gate__list { list-style: none; padding: 0; margin: 0 0 14px; display: grid; gap: 8px; }
.gate__list li { display: flex; gap: 8px; align-items: flex-start; font-size: 16.5px; }
.gate__list li .ic { width: 18px; height: 18px; flex: none; color: var(--danger, #B42318); margin-top: 1px; }
.gate__list li.is-ok { color: var(--muted); } .gate__list li.is-ok .ic { color: var(--ok); }
.gate__list--opt li .ic { color: var(--muted); } .gate__list--opt li.is-ok .ic { color: var(--ok); }
.iq--miss label:first-child { color: var(--danger, #B42318); }
.capgate { flex: 1; display: flex; flex-direction: column; gap: 4px; }
.capgate .is-locked { opacity: .55; cursor: not-allowed; gap: 8px; }
.capgate__need { font-size: 14.5px; color: var(--ink-2); text-align: center; }
.is-locked { opacity: .55; cursor: not-allowed; }
.pickfiles { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-top: 12px; } .pickfiles label { cursor: pointer; }
.acct__grp { display: block; padding: 10px 10px 4px; font: 600 12.5px/1 var(--sans); text-transform: uppercase; letter-spacing: .08em; color: #7E868F; }
.acct__grp:first-child { padding-top: 4px; }
/* Today: Get started stepper, so a step number never reads as a count */
.setupsteps { list-style: none; margin: 0; padding: 10px 18px 4px; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 8px; }
.setupsteps li { display: flex; flex-direction: column; gap: 6px; font-size: 14px; color: var(--muted); position: relative; }
.setupsteps li:not(:last-child)::after { content: ""; position: absolute; top: 12px; left: 32px; right: 0; height: 1.5px; background: var(--rule); }
.setupsteps li.done:not(:last-child)::after { background: var(--ok); }
.setupnext { border-top: 1px solid var(--line-2); margin-top: 10px; }
.setupsteps li span { width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; border: 1.5px solid var(--rule); font: 600 14px/1 var(--sans); background: #fff; }
.setupsteps li b { font-weight: 500; line-height: 1.3; }
.setupsteps li.done span { background: var(--ok); border-color: var(--ok); color: #fff; } .setupsteps li.done span .ic { width: 14px; height: 14px; }
.setupsteps li.on span { background: var(--safety); border-color: var(--safety); color: #fff; } .setupsteps li.on b { color: var(--ink); font-weight: 600; }
.setupnext__k { display: block; font: 600 13px/1.2 var(--sans); text-transform: uppercase; letter-spacing: .06em; color: var(--signal-ink); margin-bottom: 3px; }
@media (max-width: 640px) { .setupsteps li::after { display: none; } .setupsteps li b { display: none; } .setupsteps { grid-template-columns: repeat(5, auto); justify-content: start; gap: 14px; } }
@media (max-width: 640px) { .setupnext { flex-wrap: wrap; } .setupnext .btn { width: 100%; justify-content: center; } }
/* Capture page: small, quiet bottom navigation */
.capnav { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-top: 18px; padding: 12px 0; border-top: 1px solid var(--rule); position: sticky; bottom: 0; background: var(--paper); z-index: 5; }
.capnav__back { display: inline-flex; align-items: center; gap: 4px; font-size: 16px; font-weight: 500; color: var(--ink-2); text-decoration: none; padding: 6px 4px; }
.capnav__back:hover { color: var(--ink); text-decoration: underline; }
.capnav__next { display: flex; flex-direction: column; align-items: flex-end; gap: 4px; }
.capnav__need { font-size: 14.5px; color: var(--ink-2); text-align: right; max-width: 420px; }
@media (max-width: 900px) { .capnav { bottom: calc(60px + env(safe-area-inset-bottom)); } }

.followups { border-left: 6px solid var(--signal, #CF5A2A); }
.confline { display: flex; align-items: center; gap: 6px; margin: 0 0 10px; }
.msteps li.todo::before { background: #FDECC8; color: #9A5B00; }
/* Machine page: photos summary links to the photos page (the one place to add and manage them) */
a.photostrip { display: block; text-decoration: none; color: inherit; }
a.photostrip:hover { border-color: var(--ink-2); }
.photostrip__h { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.photostrip__row { display: flex; gap: 6px; margin-top: 10px; align-items: center; }
.photostrip__row img { width: 64px; height: 64px; object-fit: cover; border-radius: 8px; }
.photostrip__more { font: 600 15px/1 var(--sans); color: var(--muted); padding: 0 6px; }
/* Photos page: delete / read again on each thumbnail */
.thumb { position: relative; }
.thumb__acts { position: absolute; top: 4px; right: 4px; display: flex; gap: 4px; opacity: 0; transition: opacity .15s; }
.thumb:hover .thumb__acts, .thumb:focus-within .thumb__acts { opacity: 1; }
@media (hover: none) { .thumb__acts { opacity: 1; } }
.thumb__acts form { margin: 0; }
.thumb__acts button { width: 28px; height: 28px; border-radius: 50%; border: 0; background: rgba(255,255,255,.92); display: grid; place-items: center; cursor: pointer; box-shadow: 0 1px 3px rgba(0,0,0,.2); }
.thumb__acts button .ic { width: 15px; height: 15px; }
/* Machine card: actions about the machine itself */
.machacts { border-top: 1px solid var(--rule); margin-top: 12px; padding-top: 8px; display: grid; gap: 2px; }
.machacts form { margin: 0; }
.machacts a, .machacts button { display: flex; gap: 10px; align-items: flex-start; width: 100%; padding: 8px 6px; border: 0; background: none; border-radius: 8px; text-align: left; font: inherit; color: var(--ink); text-decoration: none; cursor: pointer; }
.machacts a:hover, .machacts button:hover { background: var(--paper-2, #F1EEE8); }
.machacts b { display: block; font-size: 15.5px; font-weight: 600; } .machacts small { display: block; color: var(--muted); font-size: 14px; }
.machacts .ic { margin-top: 2px; flex: none; }
.machacts__danger b, .machacts__danger .ic { color: var(--danger, #B42318); }
/* Review and approve page: four numbered steps */
.revsteps { list-style: none; counter-reset: rs; display: flex; flex-wrap: wrap; gap: 8px; padding: 0; margin: 4px 0 18px; }
.revsteps li { counter-increment: rs; }
.revsteps a { display: inline-flex; align-items: center; gap: 8px; padding: 6px 12px 6px 6px; border: 1px solid var(--rule); border-radius: 999px; background: #fff; font-size: 15px; color: var(--ink-2); text-decoration: none; }
.revsteps a::before { content: counter(rs); width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; background: #EDEBE6; font-weight: 600; font-size: 14px; }
.revsteps li.on a { border-color: var(--ink); color: var(--ink); } .revsteps li.on a::before { background: var(--safety); color: #fff; }
.revsteps li.done a::before { content: "✓"; background: var(--ok); color: #fff; }
.revsec { margin: 0 0 26px; scroll-margin-top: 80px; }
.revsec__h { display: flex; align-items: center; gap: 10px; font-size: 19.8px; margin: 0 0 6px; }
.revsec__h span { width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; background: var(--ink); color: #fff; font-size: 15px; flex: none; }
.revsec__why { margin: 0 0 10px; }
.revsec__ok { display: flex; align-items: center; gap: 6px; margin: 0; }
.revsec .followups, .revsec .questions { margin-top: 0; }
.procbar { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin: 0 0 10px; }
.procbar__state { display: inline-flex; align-items: center; gap: 6px; font-size: 15px; color: var(--muted); }
.procfields { border: 0; padding: 0; margin: 0; min-width: 0; }
#procform.is-view input:not([type=hidden]), #procform.is-view textarea, #procform.is-view select { background: var(--paper-2, #F6F4EF); border-color: transparent; color: var(--ink); opacity: 1; -webkit-text-fill-color: var(--ink); }
#procform.is-view .chip { opacity: .85; }
#procform.is-view .mic { display: none; }

.followups h2 { display: flex; align-items: center; gap: 10px; }
.followups__ic { display: inline-grid; place-items: center; width: 32px; height: 32px; border-radius: 50%; background: #FDEBDD; color: var(--signal-ink, #B8430F); flex: none; }
.followups__ic .ic { width: 20px; height: 20px; }
.cardhead { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin: 0 0 8px; }
.cardhead__t { margin: 0; display: flex; align-items: center; gap: 8px; font-size: 22px; line-height: 1.3; }
.cardhead__t .ic { width: 20px; height: 20px; flex: none; }
.cardhead form { margin: 0; }

/* AI review findings: each one has a Fix this button that takes you to the field */
.issue { display: flex; gap: 12px; align-items: flex-start; justify-content: space-between; }
.issue__body { flex: 1; min-width: 0; }
.issue__fix { flex: none; white-space: nowrap; }
.fixtip { border: 2px solid var(--safety, #E8701A); background: #FFF7EF; border-radius: 10px; padding: 12px 14px; margin: 4px 0 12px; scroll-margin-top: 90px; }
.fixtip--high { border-color: var(--danger, #B42318); background: #FDF3F2; }
.fixtip__sev { font-size: 14px; font-weight: 700; letter-spacing: .06em; color: var(--muted); margin-bottom: 6px; }
.fixtip__dl { display: grid; grid-template-columns: 120px 1fr; gap: 6px 12px; margin: 0 0 10px; }
.fixtip__dl dt { font-weight: 700; font-size: 15.5px; color: var(--ink, #17191D); }
.fixtip__dl dd { margin: 0; font-size: 16.5px; line-height: 1.45; }
.fixtip__where b { color: var(--signal-ink, #9A3B12); }
.fixtip__acts { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.fixtip__filled { flex-basis: 100%; background: #fff; border: 1px solid #CDE7D3; border-radius: 8px; padding: 10px 12px; }
.fixtip__filled b { color: var(--ok, #1E7B3C); } .fixtip__filled p { margin: 4px 0 8px; font-size: 15.5px; color: var(--muted); }
.fixtip__err { flex-basis: 100%; margin: 4px 0 0; color: var(--danger, #B42318); font-size: 15.5px; }
@media (max-width: 640px) { .fixtip__dl { grid-template-columns: 1fr; } .fixtip__dl dd { margin-bottom: 6px; } }
.field.is-fixing, tr.is-fixing td { background: #FFF7EF; }
.field.is-fixwide { grid-column: 1 / -1; border: 2px solid var(--safety, #E8701A); border-radius: 12px; padding: 12px; background: #FFF7EF; }
.field.is-fixwide .fixtip { margin-top: 0; background: #fff; }
.field.is-fixwide > label { font-weight: 700; color: var(--signal-ink, #9A3B12); }
input.is-fixing, textarea.is-fixing { outline: 3px solid var(--safety, #E8701A); outline-offset: 1px; }
@media (max-width: 640px) { .issue { flex-direction: column; } }
.fixtip__hint { font-size: 15px; color: var(--muted); }
.followups__round { display: inline-block; margin-left: 6px; font-size: 14.5px; font-weight: 700; color: var(--muted); background: var(--paper, #F2EEE6); border-radius: 999px; padding: 2px 9px; }
.interim.interim--err { color: var(--danger, #B42318); font-size: 15.5px; font-style: normal; margin-top: 6px; }
/* Busy AI buttons: spinner in the button, a running clock under it */
.btn.is-busy { opacity: 1; cursor: progress; gap: 8px; }
.spin { display: inline-block; width: 15px; height: 15px; border: 2px solid currentColor; border-right-color: transparent; border-radius: 50%; animation: spin .8s linear infinite; flex: none; vertical-align: -2px; margin-right: 6px; }
@keyframes spin { to { transform: rotate(360deg); } }
.busyline { flex-basis: 100%; margin: 8px 0 0; font-size: 15.5px; color: var(--muted); }
@media (prefers-reduced-motion: reduce) { .spin { animation-duration: 2.4s; } }
.qmore summary { cursor: pointer; font-weight: 600; color: var(--signal-ink, #9A3B12); margin: 2px 0 4px; }
.qmore[open] summary { margin-bottom: 4px; }
/* Alerts that start with an icon: icon beside the first line of text, text wraps beside it */
.alert:has(> svg.ic:first-child) { display: flex; align-items: flex-start; gap: 10px; }
.alert > svg.ic:first-child { width: 18px; height: 18px; flex: none; margin-top: 1px; }
.alert > svg.ic:first-child + span { flex: 1; min-width: 0; line-height: 1.45; }
.qcheck > summary { cursor: pointer; list-style: none; } .qcheck > summary::-webkit-details-marker { display: none; }
.qcheck[open] > summary { margin-bottom: 4px; }
/* Energy table: the required columns only; cells grow to show their whole text */
#energy textarea.grow { display: block; width: 100%; min-width: 140px; min-height: 0; resize: none; overflow: hidden; line-height: 1.4; padding: 8px; font-size: 16px; }
#energy td > * + * { margin-top: 6px; }
#energy input[name="es_type"] { width: 100%; min-width: 120px; }

/* ---- Review and approve: energy source cards ---- */
.rprog { display: flex; align-items: center; gap: 12px; margin: 0 0 18px; }
.rprog__bar { flex: 1; height: 8px; background: #E6E0D4; border-radius: 99px; overflow: hidden; max-width: 420px; min-width: 120px; }
.rprog__bar span { display: block; height: 100%; background: var(--ok, #1E7B3C); border-radius: 99px; }
.rprog__t { font-size: 16px; font-weight: 600; color: var(--muted); display: inline-flex; align-items: center; gap: 6px; }
.rsec { margin: 0 0 26px; }
.rsec__h { font-size: 20.9px; margin: 0 0 2px; }
.rsec__hint { color: var(--muted); font-size: 16px; margin: 0 0 12px; }
.src { background: #fff; border: 1px solid var(--line, #E4E0D8); border-radius: 12px; margin: 0 0 8px; }
.src--todo { border-color: #EBC873; }
.src__sum { list-style: none; display: flex; align-items: center; gap: 10px; padding: 12px 14px; cursor: pointer; flex-wrap: wrap; }
.src__sum::-webkit-details-marker { display: none; }
.src__ic { display: inline-grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; flex: none; }
.src__ic .ic { width: 16px; height: 16px; }
.src--ready .src__ic { background: #E3F3E8; color: var(--ok, #1E7B3C); }
.src--todo .src__ic { background: #FDF0D2; color: #8A5A00; }
.src__name { font-size: 17.5px; } .src__name b { margin-right: 4px; }
.src__meta { color: var(--muted); font-size: 15.5px; flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.src__act { margin-left: auto; font-size: 15.5px; font-weight: 600; color: var(--signal-ink, #9A3B12); }
.src__pill { margin-left: auto; font-size: 14.5px; font-weight: 700; background: #FDF0D2; color: #7A4F00; border-radius: 99px; padding: 3px 10px; }
.src[open] .src__act { visibility: hidden; }
.src__form { padding: 0 14px 14px; border-top: 1px solid var(--line, #EEEAE2); }
.src__note { margin: 12px 0 0; font-size: 16px; background: #FFF8E6; border-radius: 8px; padding: 8px 10px; color: #6E4C00; }
.src__grid { display: grid; grid-template-columns: 150px minmax(0, 1fr); gap: 8px 14px; align-items: center; margin-top: 12px; }
.src__k { font-size: 16px; font-weight: 600; color: var(--muted); margin: 0; }
.src__v { border-color: transparent; background: var(--paper-2, #FAF8F4); }
.src__v:hover { border-color: var(--line, #E4E0D8); }
.src__v.is-miss { background: #FFFBEF; border: 1.5px solid #E2B44B; }
.src__v.is-miss::placeholder { color: #9A7A3A; }
.src__btns { display: flex; gap: 8px; align-items: center; margin-top: 12px; flex-wrap: wrap; }
.src__rm { margin-left: auto; color: var(--muted); border-color: transparent; }
.srcadd { margin-top: 6px; } .srcadd > summary { list-style: none; cursor: pointer; display: inline-flex; gap: 6px; align-items: center; font-weight: 600; color: var(--signal-ink, #9A3B12); font-size: 16px; }
.srcadd > summary::-webkit-details-marker { display: none; }
.srcadd__f { display: flex; gap: 8px; margin-top: 8px; max-width: 360px; }
.hchk { background: #fff; border: 1px solid var(--line, #E4E0D8); border-radius: 12px; }
.hchk__row { display: flex; align-items: center; gap: 12px; padding: 10px 14px; flex-wrap: wrap; }
.hchk__row + .hchk__row { border-top: 1px solid var(--line, #EEEAE2); }
.hchk__q { flex: 1; min-width: 220px; font-size: 16.5px; }
.hchk__btns { display: flex; gap: 6px; } .hchk__btns form { margin: 0; }
.hchk__btns .btn.is-picked { background: var(--ink, #17191D); color: #fff; border-color: var(--ink, #17191D); }
.hchk__done { color: var(--ok, #1E7B3C); font-size: 15.5px; font-weight: 600; display: inline-flex; gap: 4px; align-items: center; }
.steps { background: #fff; border: 1px solid var(--line, #E4E0D8); border-radius: 12px; }
.steps__sum { list-style: none; display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 14px; cursor: pointer; }
.steps__sum::-webkit-details-marker { display: none; }
.steps__sum small { display: block; color: var(--muted); font-size: 15.5px; font-weight: 400; margin-top: 2px; }
.steps[open] .steps__sum > .ic { transform: rotate(180deg); }
.steps__body { padding: 0 14px 14px; border-top: 1px solid var(--line, #EEEAE2); }
.steps__body h3 { font-size: 16.5px; margin: 14px 0 4px; }
.steps__body ol { margin: 0; padding-left: 20px; } .steps__body li { margin: 2px 0; font-size: 16.5px; }
.steps__body p { margin: 0; font-size: 16.5px; }
.steps__edit { margin-top: 16px; } .steps__edit > summary { list-style: none; } .steps__edit > summary::-webkit-details-marker { display: none; }
.steps__edit form { margin-top: 12px; }
.apv { border-left: 0; } .apv--on { border: 2px solid var(--ok, #1E7B3C); }
.apv__chk { display: flex; gap: 10px; align-items: flex-start; font-weight: 600; margin: 0 0 12px; }
.apv__chk input { width: 20px; height: 20px; margin-top: 2px; flex: none; }
.apv__row { display: flex; gap: 8px; flex-wrap: wrap; } .apv__row input { flex: 1 1 180px; }
@media (max-width: 640px) { .src__grid { grid-template-columns: 1fr; gap: 2px; } .src__k { margin-top: 8px; } .src__meta { flex-basis: 100%; order: 5; } }
.src__v { resize: none; overflow: hidden; min-height: 0; line-height: 1.45; padding: 8px 46px 8px 10px; font-size: 17px; display: block; width: 100%; }
.src__grid .voice-wrap { width: 100%; }
.src__k { align-self: start; padding-top: 9px; }

/* cards, lighter: facts as text, a box only for each question */
.src, .src--todo { border: 1px solid var(--line, #E4E0D8); box-shadow: none; }
.src--todo .src__ic { background: #FFF1E0; color: var(--signal-ink, #9A3B12); }
.src__pill { background: #FFF1E0; color: var(--signal-ink, #9A3B12); font-weight: 600; }
.src__meta { white-space: nowrap; }
.src__form { padding: 4px 14px 14px; }
.ask { margin: 12px 0 0; }
.ask__q { display: block; font-weight: 600; font-size: 17px; margin: 0 0 6px; color: var(--ink, #17191D); }
.ask .src__v { background: #fff; border: 1.5px solid #E7B98F; }
.ask .src__v:focus { border-color: var(--signal, #CF5A2A); }
.facts { display: grid; grid-template-columns: 130px minmax(0, 1fr); gap: 6px 14px; margin: 14px 0 0; font-size: 16.5px; }
.facts dt { color: var(--muted); margin: 0; } .facts dd { margin: 0; }
.facts:empty { display: none; }
.src__more { margin-top: 10px; } .src__more > summary { list-style: none; cursor: pointer; display: inline-flex; gap: 6px; align-items: center; font-size: 15.5px; font-weight: 600; color: var(--muted); }
.src__more > summary::-webkit-details-marker { display: none; } .src__more > summary .ic { width: 14px; height: 14px; }
.src__more[open] + .src__btns { margin-top: 14px; }
.src__more .src__v { background: #fff; border: 1px solid var(--line, #E4E0D8); }
@media (max-width: 640px) { .facts { grid-template-columns: 1fr; gap: 0; } .facts dt { margin-top: 8px; font-size: 15px; } }
.src__form .interim:empty { display: none; }
.issue { flex-wrap: nowrap; align-items: flex-start; }
.issue__acts { display: flex; gap: 8px; align-items: center; flex: none; }
.issue__acts form { margin: 0; display: flex; }
.issue__acts .btn { margin: 0; height: 36px; display: inline-flex; align-items: center; }
.issue__dis .btn { color: var(--muted); background: transparent; }
@media (max-width: 640px) { .issue { flex-direction: column; } .issue__acts { width: 100%; } }
.issue__cite { color: var(--muted); font-size: 14.5px; }
.issue { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px 14px; align-items: start; }
.issue__ans { grid-column: 1 / -1; margin: 4px 0 2px; }
.issue__ans label { display: block; font-weight: 600; font-size: 16.5px; margin: 0 0 6px; }
.issue__row { display: flex; flex-wrap: wrap; gap: 8px; align-items: flex-start; }
.issue__row .voice-wrap { flex: 1; min-width: 0; } .issue__row input, .issue__row textarea { background: #fff; }
.issue__row .btn { height: 40px; flex: none; }
@media (max-width: 640px) { .issue { grid-template-columns: 1fr; } }
textarea.autogrow { resize: vertical; overflow: hidden; line-height: 1.5; min-height: 0; }
/* energy sources: one card per source, labelled full-width fields */
.esrcs { display: grid; gap: 10px; margin: 8px 0; }
.esrc { border: 1px solid var(--line, #E4E0D8); border-radius: 12px; padding: 12px 14px; background: #fff; }
.esrc--gap { border-color: #EBC873; }
.esrc__head { display: flex; gap: 8px; align-items: center; margin-bottom: 10px; flex-wrap: wrap; }
.esrc__head input.esrc__id { width: 76px; flex: none; font-weight: 700; } .esrc__head input.esrc__type { width: auto; flex: 1 1 200px; min-width: 0; font-weight: 600; }
.esrc__tag { font-size: 14.5px; font-weight: 700; background: #FDF0D2; color: #7A4F00; border-radius: 99px; padding: 3px 10px; }
.esrc__rm { color: var(--muted); border-color: transparent; }
.esrc__grid { display: grid; gap: 8px; }
.esrc__row { display: grid; grid-template-columns: 140px minmax(0, 1fr); gap: 14px; align-items: start; }
.esrc__f { min-width: 0; }
.esrc__k { font-size: 16px; font-weight: 600; color: var(--muted); padding-top: 9px; margin: 0; }
.esrc__v { width: 100%; padding: 8px 46px 8px 10px; font-size: 17px; line-height: 1.45; }
.esrc .voice-wrap { width: 100%; }
.esrc.is-fixing { border: 2px solid var(--safety, #E8701A); }
#procform.is-view .esrc__rm { display: none; }
@media (max-width: 640px) { .esrc__row { grid-template-columns: 1fr; gap: 2px; } .esrc__k { padding-top: 4px; } }
.esrc .interim:empty { display: none; }
.fixtip__br { color: var(--danger, #B42318); font-weight: 600; }
.procbar__acts { display: inline-flex; gap: 8px; flex-wrap: wrap; } .procview[hidden] { display: none !important; }
/* Yes / No / N/A: one row of three, the chosen one filled */
.qrow { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 12px 0; border-top: 1px solid var(--line, #EEEAE2); }
.qrow p { margin: 0; flex: 1; min-width: 0; }
.ynn { display: inline-flex; flex: none; border: 1px solid var(--line, #DCD6CA); border-radius: 10px; overflow: hidden; background: #fff; }
.ynn label { margin: 0; position: relative; display: block; }
.ynn input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.ynn span { display: block; min-width: 56px; padding: 8px 12px; text-align: center; font-size: 16px; font-weight: 600; cursor: pointer; color: var(--ink, #17191D); }
.ynn label + label span { border-left: 1px solid var(--line, #DCD6CA); }
.ynn label:hover span { background: var(--paper, #F7F4EE); }
.ynn__yes input:checked + span { background: var(--ok, #1E7B3C); color: #fff; }
.ynn__no input:checked + span { background: var(--danger, #B42318); color: #fff; }
.ynn__na input:checked + span { background: var(--ink, #17191D); color: #fff; }
.ynn input:focus-visible + span { outline: 2px solid var(--signal, #CF5A2A); outline-offset: -2px; }
@media (max-width: 640px) { .qrow { flex-direction: column; align-items: flex-start; } }
.rec__up { margin: 0; display: inline; } .rec__up label.rec__a { cursor: pointer; } .rec__up label.is-busy { opacity: .6; pointer-events: none; }
.tgroup { font-size: 14.5px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: var(--muted); margin: 0; padding: 14px 16px 6px; border-top: 1px solid var(--line, #EEEAE2); }
.panel__h + .tgroup { border-top: 0; padding-top: 6px; }
.tgroup .muted { font-weight: 600; margin-left: 4px; }
.busyline { grid-column: 1 / -1; }
.ekinds__err { color: var(--danger, #B42318); font-weight: 600; margin: 4px 0 8px; }
.fixtip__live { margin: 0 0 10px; font-weight: 600; color: var(--danger, #B42318); }
.fixtip__live.is-ok { color: var(--ok, #1E7B3C); }
.issue.is-pending { background: #EEF7F0; }
.issue__fixed { display: none; color: var(--ok, #1E7B3C); font-weight: 700; font-size: 15.5px; margin-bottom: 2px; align-items: center; gap: 4px; }
.issue.is-pending .issue__fixed { display: flex; }
.issue.is-pending .issue__body > b, .issue.is-pending .issue__sug { text-decoration: line-through; text-decoration-thickness: 1.5px; color: var(--muted); }
/* catalog search: one even row (search, type, button), then the filter and count */
.libtool { padding: 16px 18px 12px; border-bottom: 1px solid var(--line, #EEEAE2); }
.libtool .libfilter { display: flex; gap: 8px; align-items: stretch; flex-wrap: wrap; }
.libfilter__q { flex: 1 1 320px; position: relative; display: flex; }
.libfilter__q .ic { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); width: 18px; height: 18px; color: var(--muted); pointer-events: none; }
.libtool .libfilter__q input[type=search] { width: 100%; height: 42px; padding-left: 38px; margin: 0; }
.libtool .libfilter select { width: auto; flex: 0 1 200px; min-width: 0; height: 42px; margin: 0; }
.libfilter__q { flex-basis: 100% !important; }
.libtool .libfilter .btn { height: 42px; padding: 0 22px; margin: 0; }
.libtool__row { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-top: 10px; font-size: 16px; flex-wrap: wrap; }
.libtool__chk { display: inline-flex; align-items: center; gap: 8px; margin: 0; font-weight: 500; cursor: pointer; }
.libtool__chk input { width: 18px; height: 18px; margin: 0; }
@media (max-width: 640px) { .libtool .libfilter select, .libtool .libfilter .btn { flex: 1 1 100%; } }
.libtool .libfilter__q input[type=search] { padding-right: 108px; }
.libtool .libfilter__go { position: absolute; right: 4px; top: 4px; bottom: 4px; height: auto !important; padding: 0 18px !important; border-radius: 8px; }
.libshare__form { margin-top: 14px; }
.libshare__photos { border: 1px solid var(--line, #E4E0D8); border-radius: 10px; padding: 10px 14px 12px; margin: 0 0 12px; }
.libshare__photos legend { font-weight: 700; padding: 0 4px; }
.libshare__opt { display: flex; gap: 10px; align-items: flex-start; margin: 8px 0 0; cursor: pointer; }
.libshare__opt input { margin-top: 3px; width: 18px; height: 18px; flex: none; }
.libshare__opt small { display: block; color: var(--muted); font-size: 15px; }
.libshare__btns { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.libgallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); gap: 8px; margin-top: 12px; }
.libgallery a { display: block; text-decoration: none; color: inherit; } .libgallery img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 8px; display: block; }
.libgallery span { display: block; font-size: 14px; color: var(--muted); margin-top: 3px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.libshare__line { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; font-size: 16px; color: var(--muted); margin: 14px 0; } .libshare__line .ic { width: 16px; height: 16px; } .libshare__line b { color: var(--ink, #17191D); }

/* questions before drafting: a clear message when a question is unanswered */
.iq__err { color: var(--danger, #B42318); font-size: .9rem; margin: 6px 0 0; font-weight: 500; }
.iq--miss textarea { border-color: var(--danger, #B42318); box-shadow: 0 0 0 3px color-mix(in srgb, var(--danger, #B42318) 15%, transparent); }

/* the "Working…" line sits below the buttons, never between them */
.actions > .busyline { order: 99; }
/* multi-line answers: the box grows with the text, the mic stays at the top right */
textarea.autogrow { resize: vertical; overflow: hidden; min-height: 44px; line-height: 1.45; }
.iq textarea { width: 100%; }
/* while dictating, the live words show on their own line under the box, never beside the mic */
.issue__row .interim { order: 5; flex-basis: 100%; margin: 0; }
.issue__row .interim:empty, .iq .interim:empty { display: none; }

.inccard__chk { padding: 12px 18px 0; font-size: 15.5px; }
.inccard__r .pill { font-size: 13px; }

.libtool__note { display: flex; gap: 8px; align-items: flex-start; margin: 10px 0 0; padding: 10px 12px; border-radius: 8px; background: var(--warn-bg, #FFF7E0); font-size: 16px; }
.libtool__note .ic { width: 18px; height: 18px; flex: none; margin-top: 2px; }

a.pill { text-decoration: none; }
.mrow__id { font-variant-numeric: tabular-nums; font-weight: 600; color: var(--ink-2, #3a3a3a); }
.field__err { color: var(--danger, #B42318); font-size: 15.5px; font-weight: 500; margin: 6px 0 0; }
.libtags { font-weight: 600; color: var(--ink-2, #3a3a3a); font-size: 15.5px; }
.stat--text b { font-size: 18px; line-height: 1.35; font-weight: 700; font-stretch: normal; }

/* Machine changes: a clear 4-step checklist */
.mocform .field { margin-bottom: 12px; } .mocform .interim:empty { display: none; }
.mocprog { display: flex; align-items: center; gap: 12px; font-size: 16px; }
.mocprog__bar { flex: 1; max-width: 320px; height: 8px; border-radius: 99px; background: var(--line-2, #EEEAE2); overflow: hidden; }
.mocprog__bar i { display: block; height: 100%; background: var(--ok, #1E6B3A); }
.mocsteps { list-style: none; padding: 0; margin: 0; display: grid; gap: 12px; }
.mocstep { margin: 0; border-left: 4px solid var(--line, #E5E1D8); }
.mocstep.mocstep--next { border-left-color: var(--signal, #B4532A); box-shadow: 0 0 0 1px color-mix(in srgb, var(--signal, #B4532A) 30%, transparent); }
.mocstep.is-ok { border-left-color: var(--ok, #1E6B3A); }
.mocstep__h { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.mocstep__h b { font-size: 18px; }
.mocstep__n { width: 28px; height: 28px; border-radius: 50%; display: inline-grid; place-items: center; font-weight: 700; font-size: 16px; background: var(--line-2, #EEEAE2); flex: none; }
.mocstep.mocstep--next .mocstep__n { background: var(--signal, #B4532A); color: #fff; }
.mocstep.is-ok .mocstep__n { background: var(--ok, #1E6B3A); color: #fff; } .mocstep__n .ic { width: 16px; height: 16px; }
.mocstep__what { margin: 8px 0 10px; color: var(--ink-2, #3a3a3a); }
.mocstep__how { margin: 6px 0 6px; font-size: 16px; }
.mocstep__links { display: flex; gap: 8px; flex-wrap: wrap; margin: 0 0 10px; }
.mocskip { margin-top: 8px; }
/* change review steps: every note box and button the same size, lined up from card to card */
.mocstep .mocs__f { display: grid; grid-template-columns: minmax(0, 1fr) 230px; gap: 10px; align-items: center; }
.mocstep .mocs__f input { height: 44px; margin: 0; width: 100%; }
.mocstep .mocs__f .btn { height: 44px; width: 100%; margin: 0; justify-content: center; white-space: nowrap; }
@media (max-width: 640px) { .mocstep .mocs__f { grid-template-columns: 1fr; } }

/* Today: lockout problems first, the rest short, the long tail folded */
.tgroup--danger { color: var(--danger, #B42318); }
.tdanger .task { border-left: 3px solid var(--danger, #B42318); }
.tmore > summary { cursor: pointer; padding: 12px 16px; color: var(--signal, #B4532A); font-weight: 600; font-size: 16px; list-style: none; border-top: 1px solid var(--line-2, #EEEAE2); }
.tmore > summary::-webkit-details-marker { display: none; }
.minis a b small { font-size: 16px; color: var(--muted); font-weight: 500; }

/* isolation points */
.isokpis { grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); }
.kpi__v--warn { color: var(--warn, #9A6700); }
.isotable td { vertical-align: top; font-size: 16px; }
@media print { .libtool, .isokpis { display: none !important; } }

/* Manuals & SOPs: search, type chips and the list in one panel, its top level with the Upload card */
.docpanel { margin-top: 0; }
.docchips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.docchips .chip { margin: 0; }
.doclist { padding: 6px 18px 14px; }
.doclist > p { margin: 10px 0 4px; }
.two > div > .card:first-child, .two > div > .panel:first-child { margin-top: 0; }
.askabout { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin: 0 0 10px; font-size: 16px; }
.askabout .ic { width: 18px; height: 18px; } .askabout > a.muted { margin-left: auto; font-size: 15px; }

/* "Ask about it" on a document: one line, the Ask button beside the box, example questions underneath */
.docask__f { display: flex; gap: 8px; align-items: flex-start; margin: 0; }
.docask__f .voice-wrap { flex: 1; min-width: 0; }
.docask__f textarea { min-height: 44px; margin: 0; }
.docask__f > .btn { height: 44px; flex: none; margin: 0; }
.docask__f + .interim:empty, .docask .interim:empty { display: none; }
.docask__f .busyline { flex-basis: 100%; order: 99; }
.docask__f { flex-wrap: wrap; }
.docask__f .voice-wrap { flex: 1 1 200px; }
.docask__ex { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.docask__ex .chip { margin: 0; cursor: pointer; font-size: 15px; }

/* Ask CoreShift: a chat. Questions on the right, answers full width, a composer card at the bottom */
.achat { max-width: 780px; margin: 0 auto; display: flex; flex-direction: column; min-height: calc(100vh - 120px); }
.achat__head { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 6px; }
.achat__head h1 { margin: 0; }
.achat__sub { margin: 0 0 14px; color: var(--muted); font-size: 16.5px; }
.achat__ctx { display: flex; align-items: center; gap: 12px; padding: 10px 12px 10px 14px; margin: 0 0 14px; background: var(--paper, #fff);
  border: 1px solid var(--line, #E5E1D8); border-radius: 12px; }
.achat__ctx > .ic { width: 20px; height: 20px; color: var(--signal, #B4532A); flex: none; }
.achat__ctx > div { flex: 1; min-width: 0; }
.achat__ctx small { display: block; font-size: 14px; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; }
.achat__ctx b { display: block; font-size: 16.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.achat__ctx b a { color: inherit; text-decoration: none; } .achat__ctx b a:hover { text-decoration: underline; }
.achat__ctx .btn { flex: none; }
.achat__log { flex: 1; display: flex; flex-direction: column; gap: 18px; padding: 6px 0 20px; }
.achat__empty { padding: 10px 0; }
.achat__ex { display: flex; flex-wrap: wrap; gap: 8px; }
.achat__ex .chip { margin: 0; cursor: pointer; text-align: left; }
.amsg { display: flex; }
.amsg--me { justify-content: flex-end; }
.amsg__b { max-width: 78%; background: #F1EEE8; color: var(--ink, #1c1c1c); padding: 10px 14px; border-radius: 14px 14px 4px 14px; white-space: pre-wrap; font-size: 17.5px; line-height: 1.5; }
.amsg__a { width: 100%; font-size: 17.5px; line-height: 1.6; }
.amsg__t { white-space: pre-line; }
.amsg__next { margin: 12px 0 0; padding: 10px 12px; border-radius: 10px; background: #FFF7E0; font-size: 16.5px; }
.amsg__a .srcs { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-top: 10px; }
.amsg__a .srcs .hint { margin-right: 4px; }
.amsg__a .toolrow { display: flex; gap: 10px; padding: 6px 0; text-decoration: none; color: inherit; }
.amsg__wait { display: flex; align-items: center; gap: 10px; color: var(--muted); font-size: 16.5px; }
.amsg__wait .spin { width: 16px; height: 16px; border-radius: 50%; border: 2px solid var(--line, #E5E1D8); border-top-color: var(--signal, #B4532A); animation: achatspin .8s linear infinite; }
@keyframes achatspin { to { transform: rotate(360deg); } }
.achat__bar { position: sticky; bottom: 12px; display: block; background: var(--paper, #fff); border: 1px solid var(--line, #E5E1D8); border-radius: 14px;
  box-shadow: 0 1px 2px rgba(0,0,0,.04), 0 8px 24px rgba(0,0,0,.06); transition: border-color .15s, box-shadow .15s; }
.achat__bar:focus-within { border-color: #C9C2B5; box-shadow: 0 0 0 3px rgba(180,83,42,.10), 0 8px 24px rgba(0,0,0,.06); }
.achat__bar .voice-wrap { display: block; }
.achat__bar textarea { display: block; width: 100%; border: 0; box-shadow: none; background: transparent; resize: none; margin: 0;
  min-height: 52px; max-height: 220px; padding: 14px 52px 6px 16px; font-size: 17.5px; line-height: 1.5; }
.achat__bar textarea:focus { outline: none; box-shadow: none; }
.achat__bar .voice-wrap > .mic { top: 10px !important; right: 10px; transform: none; }
.achat__bar .interim { padding: 0 16px; } .achat__bar .interim:empty { display: none; }
.achat__tools { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 6px 8px 8px 16px; }
.achat__tools span { font-size: 14px; color: var(--muted); }
.achat__tools .btn { height: 36px; padding: 0 16px; border-radius: 10px; margin: 0; }
.achat__foot { text-align: center; font-size: 14px; color: var(--muted); margin: 8px 0 0; }
@media (max-width: 640px) { .amsg__b { max-width: 90%; } .achat { min-height: calc(100vh - 160px); } .achat__tools span { display: none; } .achat__tools { justify-content: flex-end; } }
/* Ask CoreShift uses the same box as "Ask about it" on a document; it stays at the bottom of the screen */
.achat__composer { position: sticky; bottom: 0; padding: 10px 0 4px; background: var(--paper); }
/* while dictating, the live words show on their own line under the box (never beside the mic) */
.docask__f > .interim { flex-basis: 100%; order: 98; margin: 2px 2px 0; font-size: 16px; }
.docask__f > .interim:empty { display: none; }

/* Ask about a document: the document shows as a chip above the question, like an attached file; × asks about everything */
.achat__chiprow { flex-basis: 100%; order: -1; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 2px; }
.achat__doc { display: inline-flex; align-items: center; gap: 6px; max-width: 100%; padding: 5px 6px 5px 10px; border-radius: 8px;
  background: #FFF4E5; border: 1px solid #F1D7B0; color: #7A4A12; font-size: 15.5px; font-weight: 500; }
.achat__doc .ic { width: 16px; height: 16px; flex: none; }
.achat__doc > a:not(.achat__x) { color: inherit; text-decoration: none; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 46ch; }
.achat__doc > a:not(.achat__x):hover { text-decoration: underline; }
.achat__x { display: grid; place-items: center; width: 22px; height: 22px; border-radius: 6px; color: inherit; text-decoration: none; font-size: 18.7px; line-height: 1; flex: none; }
.achat__x:hover { background: rgba(122,74,18,.12); }
.achat__chiphint { font-size: 14.5px; color: var(--muted); }
@media (max-width: 640px) { .achat__chiphint { display: none; } .achat__doc > a:not(.achat__x) { max-width: 26ch; } }

/* Add a machine: two cards side by side on wide screens (what machine / where and nameplate), stacked on phones */
.mform__grid { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr); gap: 16px; align-items: stretch; }
.mform__grid > .card { margin: 0; }
.mform .actions { margin-top: 16px; }
@media (max-width: 980px) { .mform__grid { grid-template-columns: minmax(0, 1fr); } }


/* Add a machine: search the catalog above the type / brand / model dropdowns */
.libfind { margin: 0 0 12px; }
.libfind > label { display: block; font: 500 15px/1.4 var(--sans); margin-bottom: 6px; }
.libfind__bar { display: flex; gap: 8px; align-items: center; position: relative; }
.libfind__bar input { flex: 1 1 auto; min-width: 0; padding-left: 36px; }
.libfind__ic { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); color: var(--muted); display: flex; pointer-events: none; }
.libfind__ic svg { width: 16px; height: 16px; }
.libfind__res { margin-top: 8px; border: 1px solid var(--rule); border-radius: 10px; background: #fff; padding: 4px; max-height: 320px; overflow-y: auto; }
.libfind__it { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; width: 100%; text-align: left; background: none; border: 0;
  border-radius: 6px; padding: 8px 10px; font: 400 16px/1.4 var(--sans); color: var(--ink); cursor: pointer; }
.libfind__it span { color: var(--muted); font-size: 14.5px; white-space: nowrap; }
.libfind__it:hover, .libfind__it:focus-visible { background: var(--paper-2); outline: none; }
.libfind__msg { margin: 6px 8px; display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.libfind__or { margin: 0 0 10px; }
.libfind__res { max-height: 420px; }
.libfind__h { font: 700 14px/1.4 var(--sans); color: var(--ink); padding: 10px 10px 4px; position: sticky; top: -4px; background: #fff; }
.libfind__h span { color: var(--muted); font-weight: 500; }
/* Catalog page: the grouped search results open over the list */
.libfilter__q { position: relative; }
.libfind__res--pop { position: absolute; z-index: 40; top: calc(100% + 4px); left: 0; right: 0; min-width: 320px; box-shadow: 0 8px 24px rgba(20, 24, 29, .12); margin: 0; }
a.libfind__it { text-decoration: none; }
.libfind__all b { color: var(--signal-ink); }
.esprep { display: flex; gap: 10px; align-items: center; }
.mocstep__note { display: flex; gap: 8px; align-items: flex-start; background: var(--warn-bg); border-radius: 8px; padding: 8px 10px; margin: 6px 0 8px; font-size: 15.5px; }
.mocstep__note svg { flex: none; margin-top: 2px; }
/* Buttons in one row, some inside small forms: same height, lined up */
.acts-even { align-items: center; }
.acts-even > form { display: inline-flex; margin: 0; }
.acts-even > .btn, .acts-even > form > .btn { height: 34px; min-height: 34px; display: inline-flex; align-items: center; margin: 0; }

/* Lockout record: three steps, one tap per isolation point */
.lsteps--3 { grid-template-columns: repeat(3, 1fr); }
.lstep2 h2 { margin: 0 0 4px; }
.lpt { display: flex; align-items: center; gap: 12px; padding: 10px 0; border-top: 1px solid var(--line-2); margin: 0; }
.lpt__id { flex: none; font: 600 14px var(--mono); background: #FBEAE1; color: #9A3B12; border-radius: 6px; padding: 3px 7px; min-width: 42px; text-align: center; display: inline-flex; justify-content: center; }
.lpt.is-ok .lpt__id { background: var(--ok-bg); color: var(--ok); }
.lpt__t { flex: 1; min-width: 0; }
.lpt__t summary { cursor: pointer; list-style: none; }
.lpt__t summary::-webkit-details-marker { display: none; }
.lpt__t summary b { display: block; font-size: 16px; }
.lpt__t summary small { color: var(--muted); font-size: 14px; }
.lpt__more { font-size: 14px; color: var(--ink-2); margin-top: 6px; }
.lpt__more p { margin: 4px 0; }
.lpt__ph { width: 90px; height: 68px; object-fit: cover; border-radius: 6px; margin: 4px 6px 0 0; }
.lpt form { margin: 0; flex: none; }
.lpt .btn { margin: 0; white-space: nowrap; }
.lpt__done { background: var(--ok-bg) !important; color: var(--ok) !important; border-color: var(--ok) !important; }
.lnote { margin: 12px 0 0; display: flex; gap: 8px; align-items: center; color: var(--danger); font-size: 15px; }
.lnote--ok { color: var(--ok); }
.lmy { display: flex; gap: 8px; align-items: center; margin: 12px 0 0; }
.lmy input { max-width: 160px; margin: 0; }
.lmy .btn { margin: 0; }
.lmore { margin-top: 10px; }
.lmore summary, .lmore-all summary { cursor: pointer; color: var(--ink-2); }
.lrestore { display: inline-flex; gap: 8px; }
@media (max-width: 640px) { .lpt { flex-wrap: wrap; } .lpt form { width: 100%; } .lpt form .btn { width: 100%; justify-content: center; } }
.lpt__ok { color: var(--ok); margin: 4px 0; display: flex; gap: 6px; align-items: center; }
.lk { display: flex; align-items: center; gap: 12px; padding: 10px 0 4px; border-top: 1px solid var(--line-2); }
.lk__ic { flex: none; width: 32px; height: 32px; border-radius: 8px; background: #FBEAE1; color: #9A3B12; display: grid; place-items: center; }
.lk__t { flex: 1; min-width: 0; }
.lk__t small { display: block; color: var(--muted); font-size: 14px; }
.lk__warn { color: #9A5B00; }
.lk form { margin: 0; }
.lk .btn { margin: 0; }
.lk__away { margin: 0 0 6px 44px; font-size: 14px; }
.lk__away summary { cursor: pointer; color: var(--muted); }
.lk__gone { margin: 4px 0; color: var(--muted); font-size: 14px; }
.lk__add { border-top: 1px solid var(--line-2); margin-top: 10px; padding-top: 4px; }
.lk__add .lmy select { max-width: 280px; margin: 0; }
.lk__add .lmy { flex-wrap: wrap; }
.lk__add .lmy select { min-width: 280px; max-width: none; flex: 0 1 320px; }
.lk__add .lmy input { min-width: 260px; max-width: none; flex: 0 1 280px; }
/* Under "More" on the lockout page: one block with thin dividers, not boxes inside a box */
#more > .card { border: 0; box-shadow: none; background: transparent; border-radius: 0; padding: 12px 0 4px; margin: 0; border-top: 1px solid var(--line-2); }
#more > .card > summary h2 { font-size: 17px; margin: 0; display: inline; }
#more > .card > summary { cursor: pointer; }
#more > .card > summary { list-style: none; }
#more > .card > summary::-webkit-details-marker { display: none; }
/* The app is light: dropdown lists, date pickers and scrollbars are drawn light even when the computer is in dark mode */
:root { color-scheme: light; }
/* Lockouts: Active / Completed tabs and filters */
.lotabs { margin: 0 0 12px; }
.lotabs a { display: inline-flex; gap: 6px; align-items: center; }
.lofilter { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin: 0 0 14px; }
.lofilter > * { margin: 0; }
.lofilter .lofilter__q { margin: 0; flex: 1 1 320px; max-width: 520px; position: relative; display: flex; align-items: center; }
.lofilter__q svg { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); width: 18px; height: 18px; color: var(--muted); pointer-events: none; }
.lofilter__q input { margin: 0; width: 100%; padding-left: 38px; }
.lofilter select { width: auto; flex: 0 0 auto; margin: 0; }
.lofilter .chip { display: inline-flex; gap: 8px; align-items: center; cursor: pointer; box-sizing: border-box; height: 43px; padding: 0 14px; font-size: 16px; white-space: nowrap; }
.lofilter .chip input { margin: 0; width: 16px; height: 16px; }
.lofilter__clear { font-weight: 600; font-size: 15px; padding: 0 6px; }
.twait__r { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 8px 0; border-top: 1px solid var(--line-2); margin: 0; }
.twait__r .btn { margin: 0; }
/* Team: counts double as filters */
.tfilt { gap: 6px; }
.tfilt button { font: inherit; color: inherit; background: transparent; border: 1px solid transparent; border-radius: 8px; padding: 6px 10px; cursor: pointer; }
.tfilt button:hover { background: var(--line-2, #F1EFEA); }
.tfilt button[aria-pressed="true"] { border-color: var(--ink); background: #FFF9E3; }
.tlessons summary { cursor: pointer; display: flex; gap: 10px; flex-wrap: wrap; align-items: baseline; }
.tlessons__grid { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; margin-top: 14px; }
.tlessons__grid h3 { margin: 0 0 6px; font-size: 16px; }
.tlessons__r { display: flex; justify-content: space-between; gap: 10px; align-items: center; margin: 0; padding: 7px 0; border-top: 1px solid var(--line-2, #EEE); }
@media (max-width: 760px) { .tlessons__grid { grid-template-columns: 1fr; } }
.ttable .tdate, .ttable .tdue { white-space: nowrap; }

.lhow ol { margin: 0; padding-left: 22px; display: grid; gap: 4px; }
.cadd { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)) auto; gap: 10px; align-items: end; margin: 12px 0 14px; padding: 12px; background: var(--line-2, #F5F3EE); border-radius: 10px; }
.cadd .field { margin: 0; } .cadd .field label { margin: 0 0 4px; } .cadd input { margin: 0; } .cadd .btn { margin: 0; }
@media (max-width: 900px) { .cadd { grid-template-columns: 1fr 1fr; } }

.ledit__card, .ledit__q { margin-bottom: 10px; }
.ledit__card .field, .ledit__q .field { margin: 0 0 6px; }
.ledit__opt { display: flex; gap: 8px; align-items: center; margin: 0 0 6px; }
.ledit__opt input[data-o] { flex: 1; margin: 0; }
.ledit__ok { display: inline-flex; gap: 4px; align-items: center; margin: 0; font-size: 14px; white-space: nowrap; color: var(--muted); }
.ledit__opt:has(input[type=radio]:checked) input[data-o] { border-color: var(--ok, #1E7B45); background: #F1FAF4; }
.ledit__bar { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; position: sticky; bottom: 0; background: var(--bg, #F6F5F1); padding: 12px 0; margin-top: 8px; border-top: 1px solid var(--line-2, #E7E4DD); }
.ledit__bar .btn { margin: 0; }
/* one line per section and page in the side menu */
.side__nav a { white-space: nowrap; }
.side__nav a span:not(.badge) { overflow: hidden; text-overflow: ellipsis; }
.side__nav .navsub a { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.rhead { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 10px; }
.rfilt { display: flex; gap: 6px; flex-wrap: wrap; }
.rfilt button { font: inherit; font-size: 15px; background: #fff; border: 1px solid #DDDAD3; border-radius: 8px; padding: 6px 10px; cursor: pointer; }
.rfilt button[aria-pressed="true"] { border-color: var(--ink); background: #FFF9E3; }
.twaitnote a { font-weight: 600; margin-left: 4px; }

.tagpre { display: inline-block; margin-left: 6px; padding: 1px 6px; border-radius: 5px; font: 600 11px/1.5 var(--sans); letter-spacing: .03em; text-transform: uppercase; vertical-align: middle;
  color: #8A5A00; background: #FFF1C9; border: 1px solid #F1D88A; }
.side__nav .tagpre { color: #F3C969; background: rgba(243, 201, 105, .12); border-color: rgba(243, 201, 105, .35); }
.tagpre--lg { font-size: 12px; padding: 2px 8px; vertical-align: 4px; }
.rec__acts { display: flex; gap: 6px; justify-content: flex-end; }
.relnav { display: flex; flex-wrap: wrap; gap: 8px; margin: -6px 0 18px; }
.relnav a { display: inline-flex; align-items: center; gap: 6px; font-size: 15px; color: var(--ink); text-decoration: none; border: 1px solid #D9D6CF; background: #fff; border-radius: 999px; padding: 6px 12px; }
.relnav a:hover { background: #F4F2EE; }
.relnav .ic { width: 16px; height: 16px; color: var(--muted); }

/* One even 3-column grid for a form's fields; labels stay on one line so every box lines up. */
.eqgrid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0 12px; }
.eqgrid > div > label { display: block; margin: 14px 0 6px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.eqgrid > div > input, .eqgrid > div > select { width: 100%; }
@media (max-width: 700px) { .eqgrid { grid-template-columns: 1fr; } }

.hzrow { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 14px; align-items: start; padding: 14px 0; border-top: 1px solid #EFEDE8; }
.hzrow:first-of-type { border-top: 0; }
.hzrow__ph img { width: 72px; height: 72px; object-fit: cover; border-radius: 8px; display: block; }
.hzrow:not(:has(.hzrow__ph)) { grid-template-columns: minmax(0, 1fr) auto; }
.hzrow__t p { margin: 4px 0; }
.hzrow__a { display: flex; gap: 8px; align-items: flex-start; }
.hzpop { position: relative; }
.hzpop > summary { list-style: none; }
.hzpop > summary::-webkit-details-marker { display: none; }
.hzpop > summary::after { display: none !important; }
.hzpop[open] > form { position: absolute; right: 0; top: calc(100% + 6px); z-index: 5; width: 260px; background: #fff; border: 1px solid var(--rule); border-radius: 10px; padding: 4px 14px 14px; box-shadow: 0 8px 24px rgba(0,0,0,.08); }
.hzpop form label { display: block; margin: 10px 0 4px; font-size: 14px; }
.hzpop form button { margin-top: 10px; }
@media (max-width: 700px) { .hzrow, .hzrow:not(:has(.hzrow__ph)) { grid-template-columns: minmax(0, 1fr); } .hzpop[open] > form { position: static; width: auto; } }

.rulescard > summary { list-style: none; cursor: pointer; }
.rulescard > summary h2 { display: flex; align-items: center; gap: 8px; }
.rulescard > summary h2 .ic { width: 18px; height: 18px; color: var(--muted); }
.rulescard ul { list-style: none; margin: 10px 0 0; padding: 0; }
.rulescard li { display: grid; grid-template-columns: 190px minmax(0, 1fr) auto; gap: 12px; align-items: start; padding: 9px 0; border-top: 1px solid #EFEDE8; font-size: 15px; }
.rulescard__c { font: 500 13px/1.5 var(--mono, ui-monospace, monospace); color: var(--muted); }
.rulescard li .pill { white-space: nowrap; }
@media (max-width: 700px) { .rulescard li { grid-template-columns: minmax(0, 1fr) auto; } .rulescard__c { grid-column: 1 / -1; } }

/* Corrective actions: one even row of fields for new and edit; edit opens as its own row under the action */
.afields { display: grid; grid-template-columns: minmax(0, 2.2fr) minmax(0, 1fr) 160px minmax(0, 1fr) minmax(0, 1fr) auto; gap: 12px; align-items: end; }
.afields > div > label { display: block; margin: 0 0 6px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.afields input, .afields select { width: 100%; height: 46px; box-sizing: border-box; margin: 0; }
.afields > .btn, .afields__btns .btn { height: 46px; white-space: nowrap; }
.afields__btns { display: flex; gap: 8px; }
.aedit__btn { display: block; margin-top: 6px; padding: 0; border: 0; background: none; font: inherit; font-size: 15px; color: var(--muted); text-decoration: underline; cursor: pointer; }
.aeditrow > td { background: #FAF9F6; padding: 14px 16px 18px !important; border-top: 0; }
.aclose.hzpop[open] > form { width: 320px; }
@media (max-width: 1100px) { .afields { grid-template-columns: repeat(3, minmax(0, 1fr)); } .afields > div:first-child { grid-column: 1 / -1; } }
@media (max-width: 700px) { .afields { grid-template-columns: minmax(0, 1fr); } }
.aclosef { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 12px; align-items: start; }
.aclosef label { display: block; margin: 0 0 6px; }
.aclosef .afields__btns { margin-top: 27px; }
@media (max-width: 700px) { .aclosef { grid-template-columns: minmax(0, 1fr); } .aclosef .afields__btns { margin-top: 0; } }

.aphoto { display: inline-flex; align-items: center; gap: 6px; margin: 10px 0 0; padding: 6px 12px; border: 1px dashed #C9C5BC; border-radius: 999px; font-size: 14px; color: var(--muted); cursor: pointer; }
.aphoto:hover { background: #F4F2EE; }
.aphoto .ic { width: 16px; height: 16px; }
.aphoto.is-set { border-style: solid; color: var(--ink); background: #EEF6EE; }
.athumb { float: left; margin: 2px 10px 4px 0; }
.athumb img { width: 48px; height: 48px; object-fit: cover; border-radius: 6px; display: block; }
.afields .interim:empty, .aclosef .interim:empty { display: none; }
form > label.aphoto, .aclosef label.aphoto { display: inline-flex; width: max-content; margin: 10px 0 0; }
.aclosef > div > label:first-child { display: block; }

.atabs { margin: 0 0 14px; }
.aphoto--icon { margin: 0 !important; width: 46px !important; height: 46px; padding: 0; justify-content: center; border-radius: 10px; }
.aphoto--icon .ic { width: 20px; height: 20px; }
.afix { display: flex; align-items: center; justify-content: space-between; gap: 12px; text-align: left; }
.afix > span { flex: 1; }
.afix .athumb { margin: 0; }
.aempty { padding: 28px 20px; }
.aempty h2 { margin: 0 0 4px; }

/* close form: label on top, then the note and its buttons on one line, bottoms lined up */
.aclosef { grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "l l" "t b" "h h"; column-gap: 12px; row-gap: 0; align-items: end; }
.aclosef__l { grid-area: l; margin: 0 0 6px !important; }
.aclosef .voice-wrap, .aclosef > textarea { grid-area: t; }
.aclosef textarea { height: 92px; min-height: 92px; margin: 0; resize: vertical; display: block; }
.aclosef .afields__btns { grid-area: b; margin: 0 !important; }
.aclosef .interim { grid-area: h; }
.aclosef__h { grid-area: h; margin: 6px 0 0; }
@media (max-width: 700px) { .aclosef { grid-template-columns: minmax(0, 1fr); grid-template-areas: "l" "t" "b" "h"; } .aclosef .afields__btns { margin-top: 10px !important; } }
/* close form, final: one row the same height as every other field and button (46px), note box not wider than it needs */
.aclosef { grid-template-columns: minmax(0, 620px) auto; justify-content: start; align-items: center; }
.aclosef textarea { height: 46px; min-height: 46px; padding-top: 11px; padding-bottom: 11px; line-height: 1.4; resize: none; overflow: hidden; }
.aclosef .voice-wrap > textarea ~ .mic { top: 50%; transform: translateY(-50%); }
.aclosef .afields__btns { align-items: center; }
.aclosef .afields__btns .btn, .aclosef .aphoto--icon { height: 46px; }
.aclosef .afields__btns .btn, .afields .afields__btns .btn, .afields > .btn { margin: 0; }
.aclosef { grid-template-columns: minmax(0, 1fr) auto; justify-content: stretch; }

/* A one-line form: fields share the row, the button sits at the end, everything 46px tall and bottom-aligned */
.rowf { display: flex; gap: 12px; align-items: flex-end; flex-wrap: wrap; }
.rowf > div { flex: 1 1 140px; min-width: 0; }
.rowf > .rowf__w { flex: 3 1 240px; }
.rowf label { display: block; margin: 0 0 6px !important; white-space: nowrap; }
.rowf input, .rowf select { width: 100% !important; height: 46px; box-sizing: border-box; margin: 0; }
.rowf .interim:empty { display: none; }
.rowf > .btn { height: 46px; margin: 0; padding: 0 22px; flex: 0 0 auto; }
.rowf > div:has(> select) { flex: 1.6 1 190px; }

/* Written program document: each section is a heading and its text, close together, with a clear gap to the next */
.psec { padding: 14px 0 16px; border-top: 1px solid #EFEDE8; }
.psec:first-of-type { border-top: 0; padding-top: 4px; }
.psec__h { display: flex; align-items: center; gap: 10px; margin-bottom: 6px; }
.psec__h input { flex: 1; border: 1px solid transparent; background: transparent; padding: 4px 8px; margin: 0 0 0 -8px; font: 600 18px/1.3 var(--sans); height: auto; box-shadow: none; }
.psec__h input:not([readonly]):hover { border-color: var(--rule); background: #fff; }
.psec__h input:focus { border-color: var(--ink); background: #fff; }
.psec textarea { min-height: 0; margin: 0; line-height: 1.55; overflow: hidden; resize: none; }
.psec .interim:empty { display: none; }
.psec--todo textarea { border-color: #E9C46A; background: #FFFCF2; }
.pq { min-height: 46px; line-height: 1.5; resize: none; overflow: hidden; }

/* Heat: the plant, then its rule in a box with the plan button */
.hplant__addr { display: flex; align-items: center; gap: 8px; }
.hplant__addr .ic { width: 18px; height: 18px; color: var(--muted); flex: none; }
.hplant__addr span { text-transform: none; }
.linkbtn { border: 0; background: none; padding: 0; font: inherit; font-size: 15px; color: var(--muted); text-decoration: underline; cursor: pointer; }
.hrule { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 20px; align-items: start; margin-top: 16px; padding: 16px 18px; border: 1px solid var(--rule); border-radius: 12px; background: #FAF9F6; }
.hrule__seg { display: flex; align-items: center; gap: 10px; margin-top: 12px; }
.seg2 { display: inline-flex; border: 1px solid var(--rule); border-radius: 10px; overflow: hidden; background: #fff; }
.seg2 button { border: 0; background: transparent; padding: 8px 14px; font: 500 15px/1 var(--sans); color: var(--ink); cursor: pointer; }
.seg2 button + button { border-left: 1px solid var(--rule); }
.seg2 button[aria-pressed=true] { background: var(--ink); color: #fff; }
@media (max-width: 700px) { .hrule { grid-template-columns: minmax(0, 1fr); } }
.rowf > .rowf__d { flex: 1.4 1 200px; }
/* A card's title row: heading left, a note or one button right, on one line */
.cardhead { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 0 0 10px; flex-wrap: wrap; }
.cardhead > h2 { margin: 0; }
.cardhead > form { margin: 0; }
.cardhead .btn { margin: 0; }
/* calendar rows: the status pill and the button share one line, centered on the row */
.calrow { padding: 10px 0; }
.calrow__s form { margin: 0; display: flex; }
.calrow__s .btn { margin: 0; }
.calrow__s .pill { margin: 0; }
.obnotes { margin: 14px 0 0; padding-top: 12px; border-top: 1px solid #EFEDE8; }
.obnotes:has(form:empty), .obnotes:empty { display: none; }
.obnotes form { margin: 0; }
.side__nav .navrow > a .tagpre { margin-left: 4px; padding: 0 4px; font-size: 9.5px; letter-spacing: .02em; flex: none; }
.side__nav .navrow > a > span:not(.tagpre):not(.badge) { overflow: visible; text-overflow: clip; }

.heatbtn { all: unset; display: block; width: 100%; cursor: pointer; }
.heatbtn b { display: block; }
.heat td:has(.heatbtn[aria-pressed=true]) { outline: 2px solid var(--ink); outline-offset: -2px; }
.heat td:has(.heatbtn):hover { filter: brightness(.97); }
/* audit log: when, who and what stay on one line; details take the rest */
.auditt td:nth-child(1), .auditt td:nth-child(2) { white-space: nowrap; }
.auditt td:nth-child(3) { min-width: 170px; }
.auditt td:nth-child(4) { min-width: 180px; }

/* Filter rows: every box and the button share one height and one baseline */
.fgrid { display: flex; flex-wrap: wrap; gap: 12px; align-items: flex-end; }
.fgrid > .field { margin: 0; min-width: 0; flex: 1 1 140px; }
.fgrid label { display: block; margin: 0 0 6px !important; line-height: 1.3; white-space: nowrap; }
.fgrid input, .fgrid select { width: 100% !important; height: 46px; box-sizing: border-box; margin: 0; }
.fgrid > .btn { height: 46px; margin: 0; padding: 0 22px; flex: 0 0 auto; }

/* Sortable column header */
.thsort { color: inherit; text-decoration: none; display: inline-flex; align-items: center; gap: 4px; cursor: pointer; }
.thsort span { font-size: 1.1em; color: var(--signal, currentColor); }
.thsort:hover { text-decoration: underline; }

/* Settings: short text with the details one click away */
.smore > summary { cursor: pointer; display: inline-block; margin-top: 6px; }
.smore > summary:hover { color: var(--ink); }
details.archivecard > summary { cursor: pointer; list-style: none; }
details.archivecard > summary::-webkit-details-marker { display: none; }
details.archivecard > summary::after { content: "›"; float: right; color: var(--ink-2); transition: transform .15s; }
details.archivecard[open] > summary::after { transform: rotate(90deg); }

/* Integrations: read API buttons in one even row */
.apibtns { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.apibtns form { margin: 0; display: contents; }
.apibtns .btn { margin: 0; }

/* Users and roles: one height for every box and button in a row */
.userst td { vertical-align: middle; }
.userst select { min-width: 175px; }
.userst input[type=date] { width: 160px; }
.userst td:first-child { max-width: 200px; overflow-wrap: anywhere; }
.uchk { display: flex; align-items: center; gap: 8px; margin: 2px 0; white-space: nowrap; font-size: 15px; cursor: pointer; }
.uchk input { width: 18px !important; height: 18px !important; margin: 0; }
.userst__rm { width: 46px; padding: 0 !important; justify-content: center; }
.userst__rm .ic { width: 18px; height: 18px; }
.userst th, .userst td { padding-left: 10px; padding-right: 10px; }
.userst select, .userst input[type=date] { height: 46px; box-sizing: border-box; margin: 0; }
.userst .sm-row { display: flex; align-items: center; min-height: 46px; margin: 0; }
.userst input[type=checkbox] { width: 20px; height: 20px; margin: 0; }
.userst__act { white-space: nowrap; text-align: right; }
.userst__act form { display: inline-flex !important; margin: 0; vertical-align: middle; }
.userst__act .btn { vertical-align: middle; display: inline-flex; align-items: center; }
.userst__act .btn { height: 46px; margin: 0 0 0 6px; padding: 0 14px; }
.userst__chk { display: flex; gap: 10px; flex-wrap: wrap; margin: 14px 0 16px; }
.userst__chk .chip { border-radius: 8px; min-height: 46px; box-sizing: border-box; display: inline-flex; align-items: center; gap: 10px; margin: 0; }
