/* GENERATED by tools/build_css.py - edit the source files, not this one. */
@layer legacy, ds;
@layer legacy {
/* ---- app.css ---- */
/* Emooto - Clanert Sustain design system (same tokens as clanertsustain.com and its Studio dashboard).
   brandBlue var(--blue) · brandGreen var(--green) · brandCream var(--cream) · zinc greys · red only for problems. Arial. */
:root { --blue-10: rgba(35,59,145,.08); --blue-20: rgba(35,59,145,.18); --green-10: rgba(140,198,65,.14); --green-ink: var(--green-70); --red: var(--red-50); --red-ink: var(--red-60);
  --z50: var(--gray-10); --z100: var(--gray-10); --z200: var(--gray-30); --z300: var(--gray-40); --z400: var(--gray-50); --z500: var(--gray-60);
  --z600: var(--gray-70); --z700: var(--gray-80); --z900: var(--gray-100);
  --ease: cubic-bezier(0.16,1,0.3,1);
  --shadow: 0 1px 2px rgba(0,0,0,.04); --shadow-soft: 0 15px 40px -15px rgba(0,0,0,.05);
  --font: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body { margin: 0; font: 400 14px/1.5 var(--font); color: var(--z900); background: var(--z50); -webkit-font-smoothing: antialiased; overflow-x: clip; }
a { color: var(--blue); text-decoration: none; transition: color .2s; }
a:hover { color: var(--green-ink); }
::selection { background: rgba(140,198,65,.3); }
h1, h2, h3 { margin: 0; font-weight: 300; }
small { font-size: 12px; }
.muted { color: var(--z500); }
.yes { color: var(--green-ink); font-weight: 700; }
hr { border: 0; border-top: 1px solid var(--z100); margin: 18px 0; }
code, pre { font-family: Consolas, 'Courier New', monospace; }
code { overflow-wrap: anywhere; }
svg.lucide { width: 16px; height: 16px; stroke-width: 1.75; flex: none; }
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-thumb { background: var(--z200); border-radius: 8px; }

/* tiny-caps label: the Clanert fingerprint */
.label, .eyebrow, .t th, .field label, .nav-group, .kpi .label {
  font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .12em; color: var(--z500);
}

/* ------------------------------------------------------------ app shell */
.shell { display: flex; min-height: 100vh; }
.side { width: 256px; flex: none; background: var(--blue); color: #fff; position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column; }
.side-head { padding: 22px 24px 18px; border-bottom: 1px solid rgba(255,255,255,.1); }
.side-head img { height: 34px; width: auto; display: block; filter: brightness(0) invert(1); opacity: .92; }
.side-head p { margin: 8px 0 0; font-size: 12px; letter-spacing: .14em; text-transform: uppercase; color: rgba(255,255,255,.5); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.nav { flex: 1; overflow-y: auto; padding: 16px 14px 28px; scrollbar-width: thin; scrollbar-color: rgba(255,255,255,.2) transparent; }
.nav-group { color: rgba(255,255,255,.42); margin: 22px 12px 8px; }
.nav-group:first-child { margin-top: 4px; }
.nav-section { margin-top: 10px; }
.nav-section summary { color: rgba(255,255,255,.67); cursor: pointer; font-size: 12px; font-weight: 700; letter-spacing: .03em; list-style: none; padding: 10px 12px; border-radius: 10px; }
.nav-section summary::-webkit-details-marker { display: none; }
.nav-section summary::after { content: '+'; float: right; font-size: 16px; line-height: 12px; }
.nav-section[open] summary::after { content: '−'; }
.nav-section summary:hover, .nav-section[open] summary { background: rgba(255,255,255,.08); color: #fff; }
.nav-section a { margin-left: 8px; }
.nav a { display: flex; align-items: center; gap: 12px; padding: 9px 12px; border-radius: 12px; color: rgba(255,255,255,.82); font-size: 13.5px; transition: background .2s, color .2s; }
.nav a:hover { background: rgba(255,255,255,.1); color: #fff; }
.nav a.on { background: rgba(255,255,255,.14); color: #fff; font-weight: 700; }
.nav a.on svg { color: var(--green); }
.nav a b { margin-left: auto; min-width: 20px; height: 20px; padding: 0 6px; border-radius: 999px; background: var(--green); color: var(--z900); font-size: 12px; display: grid; place-items: center; }
.main { flex: 1; min-width: 0; }
.top { position: sticky; top: 0; z-index: 40; background: #fff; border-bottom: 1px solid var(--z100); padding: 12px 32px; display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.top form { margin: 0; }
.content { padding: 28px 32px 56px; max-width: 1480px; }
.pill-select, .top .select { height: 38px; border: 1px solid var(--z200); border-radius: 999px; background: var(--z50); padding: 0 14px; font: 700 11px var(--font); text-transform: uppercase; letter-spacing: .08em; color: var(--z600); min-width: 170px; cursor: pointer; }
.search { flex: 1; min-width: 160px; max-width: 380px; position: relative; }
.search svg { position: absolute; left: 14px; top: 11px; color: var(--z400); }
.search input { width: 100%; height: 38px; border: 1px solid var(--z200); border-radius: 999px; padding: 0 16px 0 38px; background: var(--z50); font: 13px var(--font); }
.search input:focus, .pill-select:focus { outline: none; border-color: var(--blue); box-shadow: 0 0 0 3px var(--blue-20); background: #fff; }
.top-spacer { flex: 1; }
.today { color: var(--z400); font-size: 12px; white-space: nowrap; }
.icon-btn { position: relative; width: 38px; height: 38px; border-radius: 999px; border: 1px solid var(--z200); background: #fff; display: grid; place-items: center; color: var(--z600); cursor: pointer; transition: border-color .2s, color .2s; }
.icon-btn:hover { border-color: var(--blue); color: var(--blue); }
.dot { position: absolute; top: -4px; right: -4px; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px; background: var(--green); color: var(--z900); font-size: 12px; font-weight: 700; display: grid; place-items: center; }
.avatar { width: 38px; height: 38px; border-radius: 50%; background: var(--blue); color: #fff; display: grid; place-items: center; font-weight: 700; font-size: 12px; letter-spacing: .05em; }
.menu { position: relative; }
.menu > summary { list-style: none; cursor: pointer; }
.menu > summary::-webkit-details-marker { display: none; }
.menu-pop { position: absolute; right: 0; top: 48px; background: #fff; border: 1px solid var(--z100); border-radius: 18px; box-shadow: 0 20px 50px -12px rgba(0,0,0,.15); min-width: 250px; padding: 8px; z-index: 60; }
.menu-pop a, .menu-pop button { display: block; width: 100%; text-align: left; padding: 9px 12px; border-radius: 10px; color: var(--z700); background: none; border: 0; font: 13px var(--font); cursor: pointer; }
.menu-pop a:hover, .menu-pop button:hover { background: var(--z50); color: var(--blue); }
.menu-pop .who { padding: 10px 12px 12px; border-bottom: 1px solid var(--z100); margin-bottom: 6px; line-height: 1.6; }
.menu-toggle { display: none; }
.scrim { display: none; }

/* ------------------------------------------------------------ page heading */
.eyebrow { margin: 0 0 8px; color: var(--z400); }
.eyebrow a { color: var(--z500); } .eyebrow a:hover { color: var(--blue); }
.page-title { font-size: 34px; line-height: 1.05; font-weight: 300; text-transform: uppercase; letter-spacing: -.01em; color: var(--blue); }
.page-title em { font-style: normal; color: var(--green); font-weight: 400; }
.page-head { display: flex; align-items: flex-end; gap: 16px; flex-wrap: wrap; margin-bottom: 26px; }
.page-head .lead { color: var(--z500); max-width: 760px; margin: 10px 0 0; font-weight: 300; font-size: 14.5px; }
.page-head .actions { margin-left: auto; display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.section-title { font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .12em; color: var(--z900); margin-bottom: 14px; display: flex; align-items: center; gap: 8px; }
.section-title .muted, .section-title span.muted { font-weight: 400; text-transform: none; letter-spacing: 0; font-size: 12px; }
.section-title a { margin-left: auto; font-size: 12px; }

/* --------------------------------------------------------- workspace launcher */
.workspace-launcher { margin: 4px 0 28px; }
.launcher-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 14px; }
.launcher-head h2 { color: var(--z900); font-size: 22px; font-weight: 400; }
.launcher-head .eyebrow { margin-bottom: 5px; }
.launcher-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
.module-card { position: relative; display: flex; min-height: 164px; flex-direction: column; align-items: flex-start; overflow: hidden; padding: 20px; border: 1px solid var(--z200); border-radius: 16px; background: #fff; color: var(--z900); box-shadow: 0 4px 14px rgba(20,30,55,.05); transition: transform .18s var(--ease), box-shadow .18s var(--ease), border-color .18s; }
.module-card::after { position: absolute; right: -28px; top: -36px; width: 108px; height: 108px; border-radius: 50%; background: var(--module-tint); content: ''; opacity: .7; }
.module-card:hover { transform: translateY(-3px); border-color: var(--module-color); box-shadow: 0 14px 28px rgba(20,30,55,.12); color: var(--z900); }
.module-icon { z-index: 1; display: grid; width: 42px; height: 42px; place-items: center; margin-bottom: 14px; border-radius: 12px; background: var(--module-tint); color: var(--module-color); }
.module-icon svg { width: 22px; height: 22px; stroke-width: 2; }
.module-card strong { z-index: 1; font-size: 17px; font-weight: 700; letter-spacing: -.01em; }
.module-card small { z-index: 1; min-height: 35px; margin-top: 4px; color: var(--z500); font-size: 12px; line-height: 1.35; }
.module-meta { z-index: 1; display: flex; align-items: center; gap: 5px; margin-top: auto; padding-top: 13px; color: var(--module-color); font-size: 12px; font-weight: 700; }
.module-meta svg { width: 14px; height: 14px; }
.module-blue { --module-color: #3056b3; --module-tint: #e7efff; }
.module-red { --module-color: #c34d5e; --module-tint: #ffeaee; }
.module-green { --module-color: #568a25; --module-tint: #edf7dd; }
.module-purple { --module-color: #7756b5; --module-tint: #f0eaff; }
.module-amber { --module-color: #a56a08; --module-tint: #fff4d8; }
.module-cyan { --module-color: #147c88; --module-tint: #e1f6f7; }
.module-teal { --module-color: #16766b; --module-tint: #e2f6f1; }
.module-slate { --module-color: #506078; --module-tint: #edf1f6; }
.module-actions { z-index: 1; display: flex; gap: 16px; margin-top: auto; padding-top: 16px; color: #98a2ad; }
.module-actions svg { width: 19px; height: 19px; stroke-width: 1.9; }
.module-actions svg:hover { color: var(--module-color); }

/* ------------------------------------------------------------ buttons (pill, blue -> green) */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 40px; padding: 0 20px; border-radius: 999px; border: 1px solid var(--z200);
  background: var(--z50); color: var(--z700); font: 700 11px var(--font); text-transform: uppercase; letter-spacing: .1em; cursor: pointer; white-space: nowrap;
  transition: all .3s var(--ease); }
.btn:hover { border-color: var(--blue); color: var(--blue); }
.btn:active { transform: scale(.96); }
.btn-primary, .btn-navy { background: var(--blue); border-color: var(--blue); color: #fff; box-shadow: 0 8px 20px -10px rgba(35,59,145,.6); }
.btn-primary:hover, .btn-navy:hover { background: var(--green); border-color: var(--green); color: #000; }
.btn-green { background: var(--green); border-color: var(--green); color: #000; }
.btn-green:hover { background: var(--blue); border-color: var(--blue); color: #fff; }
.btn-danger { background: var(--red); border-color: var(--red); color: #fff; }
.btn-danger:hover { background: var(--red-ink); color: #fff; border-color: var(--red-ink); }
.btn-sm { height: 30px; padding: 0 14px; font-size: 12px; }
.btn-link { background: none; border: 0; color: var(--blue); cursor: pointer; font: 700 11px var(--font); text-transform: uppercase; letter-spacing: .1em; padding: 0; }
.seg { display: inline-flex; border: 1px solid var(--z200); border-radius: 999px; background: #fff; padding: 3px; gap: 2px; }
.seg a { padding: 6px 14px; border-radius: 999px; font-weight: 700; font-size: 12px; letter-spacing: .1em; color: var(--z500); }
.seg a.on { background: var(--blue); color: #fff; }
.seg a:hover:not(.on) { color: var(--blue); }

/* ------------------------------------------------------------ cards / grid */
.grid { display: grid; gap: 20px; }
.g4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.g3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.g2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.g21 { grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); }
.g12 { grid-template-columns: minmax(0, 1fr) minmax(0, 2fr); }
.card { background: #fff; border-radius: 24px; padding: 24px; border: 1px solid var(--z100); box-shadow: var(--shadow); min-width: 0; }
.card.flush { padding: 0; overflow: hidden; }
.card.flush > .section-title { padding: 22px 24px 0; }
a.card { display: block; color: inherit; transition: box-shadow .3s; } a.card:hover { box-shadow: 0 10px 30px -12px rgba(0,0,0,.12); }
.kpi { position: relative; }
.kpi .label { margin-bottom: 10px; }
.kpi .value { font-size: 32px; line-height: 1; font-weight: 300; color: var(--blue); letter-spacing: -.01em; }
.kpi .value small { font-size: 13px; color: var(--z400); margin-left: 4px; font-weight: 400; letter-spacing: 0; }
.kpi .row { display: flex; align-items: flex-end; justify-content: space-between; gap: 8px; }
.kpi .delta { font-size: 12px; margin-top: 12px; color: var(--z500); }
.kpi.accent .value { color: var(--green-ink); }
.up { color: var(--red-ink) !important; } .down { color: var(--green-ink) !important; }
.stat-big { font-size: 52px; line-height: 1; font-weight: 300; color: var(--blue); letter-spacing: -.02em; }
.stat-big small { font-size: 20px; color: var(--z400); }
.spark { display: block; }
.chart { width: 100%; height: 170px; display: block; }
.chart .axis { font: 10px var(--font); fill: var(--z400); }
.line { width: 100%; height: 70px; display: block; }
.gauge { width: 100%; max-width: 220px; display: block; margin: 10px auto 0; }
.hbar { display: inline-block; width: 100%; min-width: 60px; height: 6px; border-radius: 999px; background: var(--z100); overflow: hidden; vertical-align: middle; }
.hbar-fill { display: block; height: 100%; border-radius: 999px; background: var(--blue); }
.hbar-fill.green { background: var(--green); } .hbar-fill.red { background: var(--red); } .hbar-fill.amber { background: var(--red-50); } .hbar-fill.navy { background: var(--blue); }
.progress-cell { display: flex; align-items: center; gap: 10px; min-width: 120px; }
.progress-cell b { font-weight: 700; font-size: 12px; }
.legend { list-style: none; margin: 14px 0 0; padding: 0; }
.legend li { display: flex; align-items: center; gap: 10px; padding: 5px 0; font-size: 13px; color: var(--z700); }
.legend li b { margin-left: auto; font-weight: 400; color: var(--z500); }
.sw { width: 8px; height: 8px; border-radius: 50%; display: inline-block; flex: none; }
.bar-row { display: grid; grid-template-columns: 150px 1fr 80px; gap: 12px; align-items: center; margin: 10px 0; font-size: 13px; }
.bar-row b { text-align: right; font-weight: 700; }

/* ------------------------------------------------------------ pill badges */
.badge { display: inline-block; padding: 4px 10px; border-radius: 999px; font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .12em; white-space: nowrap; line-height: 1.2; }
.badge.ok { background: var(--green-10); color: var(--green-ink); }
.badge.info { background: var(--blue-10); color: var(--blue); }
.badge.warn { background: var(--red-10); color: var(--red-ink); }
.badge.bad { background: var(--red); color: #fff; }
.badge.muted { background: var(--z100); color: var(--z500); }
.due small { display: block; font-size: 12px; color: var(--z400); }
.due.bad { color: var(--red-ink); font-weight: 700; } .due.bad small { color: var(--red); }
.due.warn { color: var(--blue); font-weight: 700; }

/* ------------------------------------------------------------ tables */
.table-wrap { overflow-x: auto; }
table.t { width: 100%; border-collapse: collapse; font-size: 13px; }
.t th { text-align: left; padding: 14px 16px; border-bottom: 1px solid var(--z100); white-space: nowrap; background: #fff; }
.t td { padding: 14px 16px; border-bottom: 1px solid var(--z100); vertical-align: top; color: var(--z700); }
.t tr:last-child td { border-bottom: 0; }
.t tbody tr { transition: background .15s; }
.t tbody tr:hover td { background: var(--z50); }
.t .rowlink { font-weight: 700; color: var(--z900); }
.t .rowlink:hover { color: var(--blue); }
.t strong { color: var(--z900); }
.t td.n, .t th.n { text-align: right; font-variant-numeric: tabular-nums; }
.t td.n a { font-weight: 700; font-size: 12px; text-transform: uppercase; letter-spacing: .08em; }
.row-bad td { background: var(--gray-10); }
.toolbar { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; padding: 16px 20px; border-bottom: 1px solid var(--z100); }
.toolbar input[type=search], .toolbar select { height: 36px; border: 1px solid var(--z200); border-radius: 999px; padding: 0 14px; background: var(--z50); font: 12px var(--font); color: var(--z700); }
.toolbar select { font-weight: 700; font-size: 12px; text-transform: uppercase; letter-spacing: .08em; color: var(--z600); }
.toolbar input[type=search] { min-width: 230px; }
.toolbar input:focus, .toolbar select:focus { outline: none; border-color: var(--blue); box-shadow: 0 0 0 3px var(--blue-20); background: #fff; }
.pager { display: flex; gap: 8px; align-items: center; justify-content: flex-end; padding: 14px 20px; color: var(--z500); font-size: 12px; border-top: 1px solid var(--z100); }
.empty { padding: 44px 20px; text-align: center; color: var(--z500); font-size: 13.5px; }
.empty strong { display: block; color: var(--z900); font-size: 18px; font-weight: 300; text-transform: uppercase; margin-bottom: 6px; }
.empty svg.lucide { width: 40px; height: 40px; color: var(--green); margin: 0 auto 12px; display: block; stroke-width: 1.25; }

/* ------------------------------------------------------------ forms */
.form { max-width: 900px; }
.form .fields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px 20px; }
.form .field.wide { grid-column: 1 / -1; }
.field label { display: block; margin-bottom: 8px; }
.field input:not([type=checkbox]):not([type=radio]):not([type=file]), .field select, .field textarea {
  width: 100%; border: 1px solid var(--z200); border-radius: 12px; padding: 11px 14px; background: var(--z50); min-height: 44px; font: 14px var(--font); color: var(--z900);
  transition: all .2s; }
.field textarea { min-height: 96px; resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus { outline: none; background: #fff; border-color: var(--blue); box-shadow: 0 0 0 3px var(--blue-20); }
.field input[type=checkbox] { width: 18px; height: 18px; accent-color: var(--blue); }
.field input[type=file] { font-size: 13px; color: var(--z600); }
.field input[type=file]::file-selector-button { margin-right: 12px; padding: 8px 16px; border: 0; border-radius: 999px; background: var(--blue); color: #fff; font: 700 10.5px var(--font); text-transform: uppercase; letter-spacing: .1em; cursor: pointer; }
.field input[type=file]::file-selector-button:hover { background: var(--green); color: #000; }
.field .help { font-size: 12px; color: var(--z400); margin-top: 6px; }
.field .err, .errorlist { color: var(--red-ink); font-size: 12px; margin: 6px 0 0; padding: 0; list-style: none; }
.field.check { display: flex; align-items: center; gap: 10px; }
.field.check label { margin: 0; }
.field ul { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 8px; }
.field ul label { font-size: 13px; font-weight: 400; text-transform: none; letter-spacing: 0; color: var(--z700); display: flex; gap: 8px; align-items: center; }
.form-actions { display: flex; gap: 10px; margin-top: 26px; align-items: center; flex-wrap: wrap; }

/* ------------------------------------------------------------ messages */
.flash { list-style: none; margin: 0 0 20px; padding: 0; }
.flash li { padding: 12px 18px; border-radius: 14px; margin-bottom: 8px; background: var(--green-10); border: 1px solid rgba(140,198,65,.3); color: var(--z900); font-size: 13.5px; }
.flash li.warning, .flash li.error { background: var(--red-10); border-color: var(--red-20); color: var(--red-ink); }
.flash li.info { background: var(--blue-10); border-color: var(--blue-20); color: var(--blue); }
.banner { display: flex; align-items: center; gap: 12px; padding: 14px 18px; border-radius: 16px; background: var(--blue-10); color: var(--blue); margin-bottom: 20px; font-size: 13.5px; }
.banner.bad { background: var(--red-10); color: var(--red-ink); }
.banner .btn { margin-left: auto; }

/* ------------------------------------------------------------ lists */
.list { list-style: none; margin: 0; padding: 0; }
.list li { display: flex; gap: 12px; align-items: center; padding: 12px 0; border-bottom: 1px solid var(--z100); }
.list li:last-child { border-bottom: 0; }
.list .grow { flex: 1; min-width: 0; }
.list .title { font-weight: 700; display: block; overflow: hidden; text-overflow: ellipsis; color: var(--z900); font-size: 13.5px; }
.list a.title:hover { color: var(--blue); }
.list .sub { color: var(--z500); font-size: 12px; }
.tick { width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; flex: none; font-size: 12px; font-weight: 700; }
.tick.ok { background: var(--green-10); color: var(--green-ink); } .tick.no { background: var(--z100); color: var(--z500); }
.kv { display: grid; grid-template-columns: 170px 1fr; gap: 12px 18px; margin: 0; }
.kv dt { font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .12em; color: var(--z400); padding-top: 2px; }
.kv dd { margin: 0; color: var(--z900); }
.prose { white-space: pre-line; line-height: 1.7; color: var(--z700); font-weight: 300; font-size: 14.5px; }

/* ------------------------------------------------------------ board */
.board { display: grid; grid-template-columns: repeat(4, minmax(230px, 1fr)); gap: 16px; overflow-x: auto; padding-bottom: 6px; }
.col { background: var(--z100); border-radius: 22px; padding: 12px; min-height: 240px; }
.col h3 { font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .12em; color: var(--z500); margin: 6px 6px 12px; display: flex; }
.col h3 span { margin-left: auto; color: var(--blue); }
.tile { background: #fff; border-radius: 16px; padding: 14px; margin-bottom: 10px; border: 1px solid var(--z100); box-shadow: var(--shadow); }
.tile .ref { font-size: 12px; color: var(--z400); font-weight: 700; text-transform: uppercase; letter-spacing: .1em; }
.tile .ttl { font-weight: 700; margin: 6px 0 10px; display: block; color: var(--z900); font-size: 13.5px; line-height: 1.35; }
.tile .ttl:hover { color: var(--blue); }
.tile .meta { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; font-size: 12px; color: var(--z500); }
.tile form { display: inline; }
.tile .moves { display: flex; gap: 6px; margin-top: 12px; flex-wrap: wrap; }

/* ------------------------------------------------------------ matrix */
.matrix { display: grid; grid-template-columns: 26px repeat(5, 1fr); gap: 4px; font-size: 12px; }
.matrix div { aspect-ratio: 1.7; border-radius: 8px; display: grid; place-items: center; font-weight: 700; }
.matrix .ax { background: none; color: var(--z400); aspect-ratio: auto; font-size: 12px; }
.m-low { background: var(--z100); color: var(--z500); } .m-med { background: var(--red-10); color: var(--red-ink); }
.m-high { background: var(--red); color: #fff; }

/* ------------------------------------------------------------ map */
#map { height: 580px; border-radius: 18px; z-index: 1; }
.map-legend { display: flex; gap: 18px; flex-wrap: wrap; font-size: 12px; color: var(--z600); margin-top: 14px; }
.map-legend span { display: flex; align-items: center; gap: 6px; }

/* ------------------------------------------------------------ public site */
.public { background: #fff; color: var(--z900); }
.pub-bar { position: sticky; top: 0; z-index: 50; background: rgba(255,255,255,.92); backdrop-filter: blur(10px); border-bottom: 1px solid var(--z100); }
.pub-nav { display: flex; align-items: center; gap: 20px; max-width: 1280px; margin: 0 auto; padding: 16px 24px; }
.pub-nav img { height: 40px; width: auto; }
.pub-nav .links { margin-left: auto; display: flex; gap: 26px; align-items: center; }
.pub-nav .links a:not(.btn) { font-size: 12px; font-weight: 300; text-transform: uppercase; letter-spacing: .14em; color: var(--z500); }
.pub-nav .links a:not(.btn):hover { color: var(--blue); }
.hero { position: relative; overflow: hidden; background: var(--cream); border-bottom: 1px solid var(--z100); }
.hero:before { content: ""; position: absolute; inset: 0; background-image: radial-gradient(var(--blue) 1px, transparent 1px); background-size: 16px 16px; opacity: .03; }
.hero-glow { position: absolute; width: 520px; height: 520px; border-radius: 50%; filter: blur(140px); pointer-events: none; }
.hero-in { position: relative; max-width: 1280px; margin: 0 auto; padding: 96px 24px 104px; display: grid; grid-template-columns: 1.15fr 1fr; gap: 56px; align-items: center; }
.hero .kicker { font-size: 12px; font-weight: 700; letter-spacing: .16em; text-transform: uppercase; color: var(--blue); background: var(--blue-10); border-radius: 999px; padding: 6px 14px; display: inline-block; margin-bottom: 22px; }
.hero h1 { font-size: 62px; line-height: .98; font-weight: 300; text-transform: uppercase; letter-spacing: -.02em; color: var(--blue); }
.hero h1 em { font-style: normal; color: var(--green); font-weight: 400; display: block; }
.hero p { font-size: 17px; line-height: 1.7; color: var(--z600); max-width: 560px; font-weight: 300; margin: 26px 0 0; }
.hero .btn { height: 52px; padding: 0 30px; }
.hero-card { background: #fff; border-radius: 32px; padding: 20px; border: 1px solid var(--z100); box-shadow: 0 30px 60px -20px rgba(35,59,145,.18); }
.wrap { max-width: 1280px; margin: 0 auto; padding: 104px 24px; }
.wrap h2 { font-size: 48px; line-height: 1; font-weight: 300; text-transform: uppercase; letter-spacing: -.01em; color: var(--blue); margin-bottom: 18px; }
.wrap h2 em { font-style: normal; color: var(--green); font-weight: 400; }
.wrap .sub { color: var(--z500); font-size: 16px; font-weight: 300; line-height: 1.7; max-width: 720px; margin: 0 0 44px; }
.feature { padding: 30px; border-radius: 28px; background: #fff; border: 1px solid var(--z100); box-shadow: var(--shadow-soft); transition: transform .4s var(--ease), box-shadow .4s var(--ease); }
.feature:hover { transform: translateY(-6px); box-shadow: 0 24px 48px -8px rgba(35,59,145,.12); }
.feature .fi { width: 48px; height: 48px; border-radius: 16px; background: var(--blue-10); color: var(--blue); display: grid; place-items: center; margin-bottom: 18px; }
.feature .fi svg.lucide { width: 22px; height: 22px; }
.feature b { font-size: 18px; font-weight: 300; text-transform: uppercase; color: var(--blue); display: block; margin-bottom: 10px; letter-spacing: .02em; }
.feature p { margin: 0; color: var(--z600); font-weight: 300; line-height: 1.65; font-size: 14px; }
.band { background: var(--cream); }
.plan { border: 1px solid var(--z100); border-radius: 32px; padding: 34px; display: flex; flex-direction: column; background: #fff; box-shadow: var(--shadow-soft); transition: transform .4s var(--ease), box-shadow .4s var(--ease); }
.plan:hover { transform: translateY(-6px); box-shadow: 0 24px 48px -8px rgba(35,59,145,.12); }
.plan.pop { border: 2px solid var(--blue); }
.plan h3 { font-size: 26px; font-weight: 300; text-transform: uppercase; color: var(--blue); }
.plan .price { font-size: 52px; line-height: 1; font-weight: 300; margin: 22px 0 6px; color: var(--z900); letter-spacing: -.02em; }
.plan .price small { font-size: 13px; color: var(--z400); letter-spacing: 0; }
.plan ul { padding: 0; list-style: none; margin: 24px 0 30px; flex: 1; }
.plan li { padding: 8px 0 8px 28px; position: relative; color: var(--z700); font-weight: 300; border-bottom: 1px solid var(--z100); }
.plan li:last-child { border-bottom: 0; }
.plan li:before { content: ""; position: absolute; left: 4px; top: 13px; width: 10px; height: 5px; border-left: 2px solid var(--green); border-bottom: 2px solid var(--green); transform: rotate(-45deg); }
.auth { min-height: 100vh; display: grid; place-items: center; background: var(--cream); padding: 24px; position: relative; }
.auth:before { content: ""; position: absolute; inset: 0; background-image: radial-gradient(var(--blue) 1px, transparent 1px); background-size: 16px 16px; opacity: .03; }
.auth-card { position: relative; background: #fff; border-radius: 32px; padding: 40px; width: 100%; max-width: 480px; border: 1px solid var(--z100); box-shadow: 0 30px 60px -25px rgba(35,59,145,.2); }
.auth-card.wide { max-width: 760px; }
.auth-card img { height: 42px; margin-bottom: 26px; }
.auth-card h1 { font-size: 30px; font-weight: 300; text-transform: uppercase; color: var(--blue); margin-bottom: 6px; letter-spacing: -.01em; }
.footer { background: var(--cream); border-top: 1px solid var(--z100); }
.footer .wrap { padding: 36px 24px; display: flex; gap: 22px; flex-wrap: wrap; font-size: 13px; color: var(--z500); font-weight: 300; }
.drawn-underline { position: relative; white-space: nowrap; }
.drawn-underline::after { content: ""; position: absolute; left: 0; right: 0; bottom: -4px; height: 8px; pointer-events: none; background-size: 100% 100%;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 10' preserveAspectRatio='none'%3E%3Cpath d='M1,5 C30,2 70,2 99,5 C70,8 30,8 1,5 Z' fill='%238cc641'/%3E%3C/svg%3E"); }

/* scroll reveal (public pages only) */
[data-reveal] { opacity: 0; transform: translateY(36px); transition: opacity .75s var(--ease), transform .75s var(--ease); }
[data-reveal].is-visible { opacity: 1; transform: none; }
[data-stagger] > * { opacity: 0; transform: translateY(24px); transition: opacity .6s var(--ease), transform .6s var(--ease); }
[data-stagger].is-visible > * { opacity: 1; transform: none; }
[data-stagger].is-visible > *:nth-child(2) { transition-delay: .1s; } [data-stagger].is-visible > *:nth-child(3) { transition-delay: .2s; }
[data-stagger].is-visible > *:nth-child(4) { transition-delay: .3s; } [data-stagger].is-visible > *:nth-child(5) { transition-delay: .4s; }
[data-stagger].is-visible > *:nth-child(6) { transition-delay: .5s; }

/* ------------------------------------------------------------ responsive */
@media (max-width: 1200px) {
  .g4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .g21, .g12 { grid-template-columns: minmax(0, 1fr); }
  .launcher-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 900px) {
  .side { position: fixed; left: 0; top: 0; z-index: 80; transform: translateX(-100%); transition: transform .35s var(--ease); width: 280px; }
  .shell.nav-open .side { transform: none; }
  .shell.nav-open .scrim { display: block; position: fixed; inset: 0; background: rgba(0,0,0,.4); z-index: 70; }
  .menu-toggle { display: grid; }
  .top { padding: 10px 16px; }
  .content { padding: 20px 16px 48px; }
  .g3, .g2 { grid-template-columns: 1fr; }
  .hero-in { grid-template-columns: 1fr; padding: 56px 24px; }
  .hero h1 { font-size: 40px; }
  .wrap { padding: 64px 24px; } .wrap h2 { font-size: 34px; }
  .form .fields { grid-template-columns: 1fr; }
  .kv { grid-template-columns: 1fr; gap: 4px 0; } .kv dd { margin-bottom: 10px; }
  .today, .search { display: none; }
  .board { grid-template-columns: repeat(4, 270px); }
  .page-title { font-size: 28px; }
  .bar-row { grid-template-columns: 110px 1fr 64px; }
  .launcher-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .launcher-head { align-items: flex-start; flex-direction: column; }
}
@media (max-width: 560px) {
  .g4 { grid-template-columns: 1fr; }
  .pub-nav .links a:not(.btn) { display: none; }
  .top .pill-select { min-width: 0; max-width: 150px; }
  .launcher-grid { grid-template-columns: 1fr; }
  .module-card { min-height: 142px; }
}

.work-intro { display:flex; justify-content:space-between; align-items:center; gap:22px; margin:18px 0 16px; background:linear-gradient(115deg,var(--blue-10),var(--cream)); }
.work-intro h2 { margin:5px 0 5px; font-size:22px; color:var(--blue); }
.work-intro p { margin:0; color:var(--z600); font-size:13px; line-height:1.5; max-width:650px; }
.work-count { min-width:100px; text-align:center; font-size:30px; color:var(--blue); line-height:1; }
.work-count span { display:block; margin-top:6px; font-size:12px; color:var(--z600); }
.work-panels { margin-bottom:20px; }
.work-list .work-mark { width:8px; height:8px; flex:none; margin-top:6px; border-radius:50%; background:var(--blue); }
.work-list .work-mark.urgent { background:var(--amber-50); }
.work-list .work-mark.late { background:var(--red); }
@media (max-width:560px) { .work-intro { align-items:flex-start; } .work-count { min-width:65px; font-size:25px; } }
.guided-form { max-width:980px; }

/* ------------------------------------------------------------ enterprise application shell refresh */
body { background: var(--gray-10); color: var(--gray-90); font-size: 14px; }
.side { width: 272px; background: var(--blue-80); border-right: 1px solid rgba(15,34,67,.22); }
.side-head { padding: 20px 22px 18px; background: var(--blue-80); }
.side-head img { height: 32px; }
.side-head p { color: rgba(255,255,255,.58); font-size: 12px; letter-spacing: .12em; }
.nav { padding: 14px 12px 28px; }
.nav > a { min-height: 42px; padding: 10px 12px; border-radius: 9px; gap: 11px; color: rgba(255,255,255,.78); font-size: 13px; }
.nav > a:hover { background: rgba(255,255,255,.09); }
.nav > a.on { background: var(--blue-10); color: var(--blue-70); box-shadow: 0 2px 6px rgba(3,19,48,.18); }
.nav > a.on svg { color: var(--blue); }
.nav > a b { background: var(--green); color: var(--green-80); }
.nav-section { margin-top: 8px; }
.nav-section summary { display: flex; align-items: center; gap: 10px; min-height: 40px; padding: 9px 12px; border-radius: 9px; color: rgba(255,255,255,.72); font-size: 12px; letter-spacing: .01em; }
.nav-section summary::after { margin-left: auto; float: none; color: rgba(255,255,255,.52); font-size: 15px; }
.nav-section summary svg { width: 16px; height: 16px; color: var(--blue-40); }
.nav-section[open] summary { background: rgba(255,255,255,.08); color: #fff; }
.nav-section a { margin-left: 9px; min-height: 38px; padding: 8px 12px; border-radius: 8px; font-size: 12.5px; }
.nav-section a svg { width: 15px; height: 15px; opacity: .9; }
.main { background: var(--gray-10); }
.top { min-height: 64px; padding: 11px 28px; border-bottom: 1px solid var(--gray-30); box-shadow: 0 1px 5px rgba(16,42,86,.04); }
.pill-select, .search input { background: #fff; border-color: var(--blue-20); }
.search input { height: 38px; }
.content { max-width: 1680px; padding: 30px 36px 64px; }
.page-title { color: var(--blue-80); font-size: 29px; font-weight: 650; text-transform: none; letter-spacing: -.025em; }
.page-title em { color: var(--blue); font-weight: 650; }
.eyebrow, .label, .t th, .field label, .nav-group, .kpi .label { letter-spacing: .08em; }
.card { border-radius: 14px; border-color: var(--gray-30); box-shadow: 0 2px 10px rgba(26,47,82,.045); padding: 22px; }
.module-card { min-height: 154px; border-radius: 13px; box-shadow: 0 2px 8px rgba(26,47,82,.05); }
.module-card:hover { transform: translateY(-2px); box-shadow: 0 10px 22px rgba(26,47,82,.11); }
.launcher-head h2 { font-size: 21px; font-weight: 650; color: var(--blue-80); }
.work-intro { border-color: var(--blue-20); }
.section-title { color: var(--blue-80); letter-spacing: .08em; }
.btn { border-radius: 9px; text-transform: none; letter-spacing: .01em; font-size: 12px; }
.btn-primary { background: var(--blue); border-color: var(--blue); }
.btn-primary:hover { background: var(--blue-70); border-color: var(--blue-70); color: #fff; }
.seg { border-radius: 9px; }
.seg a { border-radius: 7px; text-transform: none; letter-spacing: .02em; }
.t th { background: var(--gray-10); color: var(--gray-60); }
.t td { padding-top: 13px; padding-bottom: 13px; }
*:focus-visible { outline: 3px solid rgba(52,117,202,.42); outline-offset: 2px; }
@media (max-width: 900px) {
  .side { width: 292px; }
  .content { padding: 22px 18px 48px; }
  .top { padding: 10px 16px; }
}
.form-step { display:flex; align-items:flex-start; gap:18px; padding:10px 0 26px; border-bottom:1px solid var(--z100); margin-bottom:22px; }
.form-step .step-number { display:grid; place-items:center; flex:none; width:32px; height:32px; border-radius:50%; background:var(--blue); color:white; font-size:13px; font-weight:700; }
.form-step .step-body { flex:1; min-width:0; }
.form-step h2 { margin:0 0 5px; font-size:17px; color:var(--blue); }
.form-step p { margin:0 0 17px; font-size:12.5px; color:var(--z600); }
.optional-step { display:block; }
.optional-step summary { display:flex; align-items:center; gap:18px; cursor:pointer; list-style:none; }
.optional-step summary::-webkit-details-marker { display:none; }
.optional-step summary strong { display:block; font-size:17px; color:var(--blue); }
.optional-step summary small { display:block; margin-top:4px; color:var(--z600); }
.optional-step .step-body { margin:18px 0 0 50px; }
@media (max-width:560px) { .form-step { gap:10px; } .optional-step .step-body { margin-left:0; } }

/* keep the top bar on one line */
.top { flex-wrap: nowrap; }
.search { min-width: 0; }
@media (max-width: 1280px) { .today { display: none; } }
@media (max-width: 1100px) { .top .btn-primary span.txt { display: none; } .top .btn-primary { padding: 0 12px; } .top .pill-select { min-width: 0; max-width: 170px; } }
.t td strong, .t .badge { white-space: nowrap; }

.pub-nav .links a.on:not(.btn) { color: var(--blue); font-weight: 700; }

/* ------------------------------------------------------------ files & office */
.fileicon { display: inline-grid; place-items: center; min-width: 38px; height: 26px; padding: 0 6px; border-radius: 7px; font-size: 12px; font-weight: 700; letter-spacing: .05em; color: #fff; background: var(--z400); flex: none; }
.fileicon.word { background: #2b579a; } .fileicon.excel { background: #217346; } .fileicon.powerpoint { background: #d24726; }
.fileicon.pdf { background: #e5252a; } .fileicon.image { background: var(--green-ink); } .fileicon.text { background: var(--z600); }
.office-shell { display: flex; flex-direction: column; }
.doc-toolbar { position: sticky; top: 63px; z-index: 20; display: flex; gap: 4px; align-items: center; flex-wrap: wrap; padding: 10px 14px; background: #fff; border-bottom: 1px solid var(--z100); }
.doc-toolbar button { width: 34px; height: 34px; border-radius: 10px; border: 1px solid transparent; background: none; color: var(--z700); display: grid; place-items: center; cursor: pointer; }
.doc-toolbar button:hover { background: var(--z100); color: var(--blue); }
.doc-toolbar button.on { background: var(--blue-10); color: var(--blue); border-color: var(--blue-20); }
.doc-toolbar select { height: 34px; border: 1px solid var(--z200); border-radius: 10px; padding: 0 10px; background: var(--z50); font: 13px var(--font); }
.doc-toolbar .sep { width: 1px; height: 22px; background: var(--z200); margin: 0 6px; }
.page-sheet { background: var(--z100); padding: 28px 16px; }
.doc { max-width: 820px; min-height: 1000px; margin: 0 auto; background: #fff; padding: 72px 80px; box-shadow: 0 2px 12px rgba(0,0,0,.08); border-radius: 4px;
  font: 11pt/1.55 Calibri, Arial, sans-serif; color: var(--gray-100); outline: none; }
.doc h1 { font-size: 20pt; font-weight: 700; color: var(--blue-80); margin: 0 0 12px; } .doc h2 { font-size: 15pt; font-weight: 700; color: var(--blue-70); margin: 18px 0 8px; }
.doc h3 { font-size: 12.5pt; font-weight: 700; color: var(--blue-80); margin: 14px 0 6px; } .doc p { margin: 0 0 8px; }
.doc table { border-collapse: collapse; width: 100%; margin: 10px 0; } .doc td, .doc th { border: 1px solid var(--gray-40); padding: 5px 8px; vertical-align: top; }
.doc img { max-width: 100%; height: auto; } .doc blockquote { border-left: 3px solid var(--green); margin: 8px 0; padding: 4px 14px; color: var(--z600); }
.cellref { min-width: 54px; height: 34px; display: grid; place-items: center; border: 1px solid var(--z200); border-radius: 10px; font-size: 12px; font-weight: 700; color: var(--z600); }
.fx { flex: 1; min-width: 180px; height: 34px; border: 1px solid var(--z200); border-radius: 10px; padding: 0 12px; font: 13px Consolas, monospace; }
.fx:focus { outline: none; border-color: var(--blue); box-shadow: 0 0 0 3px var(--blue-20); }
.grid-wrap { overflow: auto; max-height: calc(100vh - 290px); }
table.xl { border-collapse: collapse; font: 12.5px Calibri, Arial, sans-serif; }
.xl th { position: sticky; top: 0; background: var(--z50); color: var(--z500); font-weight: 400; font-size: 12px; border: 1px solid var(--z200); padding: 3px 8px; min-width: 40px; z-index: 2; }
.xl tbody th { position: sticky; left: 0; z-index: 1; }
.xl td { border: 1px solid #e3e3e3; padding: 3px 8px; min-width: 96px; max-width: 260px; height: 24px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; cursor: cell; }
.xl td.sel { outline: 2px solid #217346; outline-offset: -2px; background: #f1f8f3; }
.xl td.has-f { color: #0b5394; }
.sheet-tabs { display: flex; gap: 2px; padding: 6px 10px; border-top: 1px solid var(--z100); background: var(--z50); overflow-x: auto; }
.sheet-tabs button { border: 0; background: none; padding: 6px 14px; border-radius: 8px; font: 12px var(--font); cursor: pointer; color: var(--z600); }
.sheet-tabs button.on { background: #fff; color: #217346; font-weight: 700; box-shadow: var(--shadow); }
.deck { display: grid; grid-template-columns: 180px 1fr; gap: 16px; }
.thumbs { max-height: calc(100vh - 220px); overflow-y: auto; display: flex; flex-direction: column; gap: 10px; padding-right: 4px; }
.thumb { border: 2px solid transparent; background: none; padding: 0; border-radius: 10px; cursor: pointer; position: relative; }
.thumb.on { border-color: var(--blue); } .thumb span { position: absolute; left: -2px; top: -2px; background: var(--blue); color: #fff; font-size: 12px; padding: 1px 6px; border-radius: 8px 0 8px 0; }
.stage { background: #fff; border: 1px solid var(--z100); border-radius: 16px; min-width: 0; }
.slide-frame { position: relative; width: 100%; background: #fff; }
.stage > .slide-frame { width: calc(100% - 48px); margin: 24px; box-shadow: 0 4px 20px rgba(0,0,0,.12); }
.thumb .slide-frame { box-shadow: 0 1px 4px rgba(0,0,0,.12); border-radius: 8px; overflow: hidden; }
.slide { position: absolute; inset: 0; overflow: hidden; font-family: Calibri, Arial, sans-serif; color: var(--gray-90); }
.slide-frame:fullscreen { background: #000; display: grid; place-items: center; } .slide-frame:fullscreen .slide { position: relative; width: 100vw; aspect-ratio: inherit; max-height: 100vh; background: #fff; }
.shape { position: absolute; overflow: hidden; line-height: 1.2; }
.shape.text[contenteditable]:hover, .shape.text[contenteditable]:focus { outline: 1px dashed var(--blue); outline-offset: 2px; }
.shape img { width: 100%; height: 100%; object-fit: contain; }
.shape table { width: 100%; height: 100%; border-collapse: collapse; font-size: calc(12 / 540 * var(--h)); }
.shape td { border: 1px solid var(--gray-40); padding: 2px 4px; }
.notes { margin: 0 24px 24px; padding: 12px 14px; background: var(--z50); border-radius: 12px; font-size: 13px; color: var(--z600); white-space: pre-line; }
.notes:empty { display: none; }
.pdf-pages { background: var(--z100); padding: 24px; display: flex; flex-direction: column; align-items: center; gap: 18px; overflow: auto; max-height: calc(100vh - 230px); }
.pdf-page { position: relative; background: #fff; box-shadow: 0 2px 12px rgba(0,0,0,.12); flex: none; }
.pdf-page.deleted { opacity: .25; outline: 3px solid var(--red); }
.pdf-overlay { position: absolute; inset: 0; }
.pdf-num { position: absolute; right: -34px; top: 0; font-size: 12px; color: var(--z400); }
.pdf-pages[data-tool="text"] .pdf-page { cursor: text; } .pdf-pages[data-tool="highlight"] .pdf-page, .pdf-pages[data-tool="whiteout"] .pdf-page, .pdf-pages[data-tool="ink"] .pdf-page { cursor: crosshair; touch-action: none; }
.pdf-pages[data-tool="rotate"] .pdf-page, .pdf-pages[data-tool="delete"] .pdf-page { cursor: pointer; }
@media (max-width: 900px) { .deck { grid-template-columns: 1fr; } .thumbs { flex-direction: row; max-height: none; overflow-x: auto; } .thumb { width: 130px; flex: none; }
  .doc { padding: 32px 22px; } .doc-toolbar { top: 59px; } }
.card.flush.office-shell { overflow: visible; } .office-shell > .doc-toolbar:first-child { border-radius: 24px 24px 0 0; }

/* ------------------------------------------------------------ Clanert Air */
.aqi-hero { text-align: center; }
.aqi-ring { width: 170px; height: 170px; margin: 14px auto 10px; border-radius: 50%; display: grid; place-items: center;
  background: conic-gradient(var(--aqi) 0 100%); padding: 12px; }
.aqi-ring > div { width: 100%; height: 100%; border-radius: 50%; background: #fff; display: grid; place-content: center; }
.aqi-ring b { font-size: 50px; font-weight: 300; line-height: 1; color: var(--z900); }
.aqi-ring span { font-size: 12px; font-weight: 700; letter-spacing: .14em; color: var(--z400); }
.aqi-level { font-size: 22px; font-weight: 300; text-transform: uppercase; color: var(--aqi); letter-spacing: .02em; }
.aqi-params { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin-top: 18px; }
.aqi-params div { background: var(--z50); border-radius: 12px; padding: 8px 4px; }
.aqi-params span { display: block; font-size: 12px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--z400); }
.aqi-params b { font-size: 18px; font-weight: 400; color: var(--blue); } .aqi-params small { font-size: 12px; color: var(--z400); margin-left: 2px; }
.aqi-card { border: 1px solid var(--gray-30); border-top: 4px solid var(--aqi); color: inherit; }
.aqi-card-top { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
.aqi-card-name { font-weight: 700; color: var(--z900); margin-bottom: 4px; }
.aqi-pill { display: inline-grid; place-items: center; min-width: 46px; height: 30px; padding: 0 8px; border-radius: 999px; background: var(--aqi); color: #fff; font-weight: 700; font-size: 14px; }
.aqi-legend { display: flex; gap: 16px; flex-wrap: wrap; font-size: 12px; color: var(--z600); margin-top: 16px; }
.aqi-legend span { display: flex; align-items: center; gap: 6px; } .aqi-legend i { width: 12px; height: 12px; border-radius: 50%; display: inline-block; }
.live-dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--green); margin-right: 6px; box-shadow: 0 0 0 3px rgba(140,198,65,.25); animation: pulse 2s infinite; }
@keyframes pulse { 50% { box-shadow: 0 0 0 6px rgba(140,198,65,0); } }
.aqi-marker span { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; color: #fff; font: 700 13px Arial; border: 3px solid #fff; box-shadow: 0 2px 8px rgba(0,0,0,.3); }
.chip { display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; border: 1px solid var(--z200); border-radius: 999px; font-size: 12.5px; background: var(--z50); cursor: pointer; }
.chip:has(input:checked) { border-color: var(--blue); background: var(--blue-10); color: var(--blue); }

/* ---- Every action answers (feedback.js) ---- */
#ems-progress { position: fixed; top: 0; left: 0; height: 3px; width: 0; z-index: 9999; background: linear-gradient(90deg, var(--blue), var(--green)); box-shadow: 0 0 8px rgba(140,198,65,.6); opacity: 0; pointer-events: none; }
#ems-progress.run { opacity: 1; animation: ems-progress 8s cubic-bezier(.1,.7,.2,1) forwards; }
#ems-progress.done { opacity: 0; width: 100%; transition: opacity .35s ease .15s, width .2s ease; }
@keyframes ems-progress { 0% { width: 0; } 30% { width: 55%; } 100% { width: 92%; } }
.btn.is-busy, button.is-busy { cursor: progress; opacity: .92; pointer-events: none; }
.is-busy .spin { width: 14px; height: 14px; border-radius: 50%; border: 2px solid currentColor; border-right-color: transparent; display: inline-block; animation: ems-spin .7s linear infinite; flex: none; }
@keyframes ems-spin { to { transform: rotate(360deg); } }
a.is-pressed { opacity: .65; transition: opacity .1s; }
.flash li { animation: ems-flash-in .3s ease both; }
.flash li.success::before { content: "✓ "; font-weight: 700; color: var(--green-ink, var(--green-70)); }
.flash li.warning { background: var(--amber-10); border-color: var(--amber-20); color: var(--amber-70); }
@keyframes ems-flash-in { from { opacity: 0; transform: translateY(-6px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { #ems-progress.run, .is-busy .spin, .flash li { animation: none; } }
.add-inline { display: inline-block; margin-top: 4px; font-size: 12px; font-weight: 600; color: var(--blue); }
.add-inline:hover { color: var(--green-ink, var(--green-70)); }
.help.empty-link { color: var(--amber-70); background: var(--amber-10); border: 1px solid var(--amber-20); border-radius: 10px; padding: 6px 10px; }
.help.empty-link a { font-weight: 700; color: var(--blue); }
.draft-note { grid-column: 1 / -1; margin-bottom: 12px; padding: 8px 12px; border-radius: 10px; background: var(--blue-10); color: var(--blue); font-size: 12.5px; }
.quick-add > summary { list-style: none; cursor: pointer; }
.quick-add > summary::-webkit-details-marker { display: none; }
.quick-add .menu-pop { min-width: 230px; animation: ems-flash-in .18s ease both; }
.quick-add .menu-pop a { display: flex; align-items: center; gap: 10px; }
.quick-add .menu-pop a svg { width: 16px; height: 16px; color: var(--blue); flex: none; }
.quick-add[open] > summary { background: var(--green); border-color: var(--green); color: #000; }
.banner.lock { background: var(--amber-10); border-color: var(--amber-20); color: var(--amber-70); }
.reason-field { background: var(--amber-10); border: 1px solid var(--amber-20); border-radius: 12px; padding: 12px; }
.history-card { margin-top: 18px; }
.history-card > summary { cursor: pointer; list-style: none; display: flex; align-items: center; gap: 8px; margin: 0; }
.history-card > summary .muted { font-weight: 400; text-transform: none; letter-spacing: 0; margin-left: 6px; }
.history-list { list-style: none; margin: 12px 0 0; padding: 0; border-left: 2px solid var(--z200); }
.history-list > li { position: relative; padding: 6px 0 12px 16px; font-size: 13px; }
.history-list > li::before { content: ""; position: absolute; left: -6px; top: 10px; width: 10px; height: 10px; border-radius: 50%; background: var(--blue); }
.history-list > li.h-create::before { background: var(--green); } .history-list > li.h-delete::before { background: var(--red); }
.h-head { color: var(--z700); } .h-reason { color: var(--amber-70); margin-top: 2px; }
.h-changes { list-style: none; margin: 4px 0 0; padding: 0; } .h-changes li { margin: 2px 0; }
.h-field { font-weight: 600; color: var(--z700); } .h-changes del { color: var(--red-ink); } .h-changes ins { color: var(--green-70); text-decoration: none; font-weight: 600; }
.access-card { margin-top: 18px; }
.access-list li { display: flex; align-items: center; gap: 10px; }
.access-list form { margin: 0; }
.share-form { display: flex; gap: 8px; margin-top: 10px; align-items: center; }
.share-form select { flex: 1; max-width: 340px; height: 34px; border-radius: 10px; border: 1px solid var(--z200); padding: 0 10px; font: 13px var(--font); }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
a[aria-label="Notifications"].ring svg { animation: ems-ring .8s ease 2; transform-origin: 50% 0; }
@keyframes ems-ring { 0%,100% { transform: rotate(0); } 20% { transform: rotate(14deg); } 40% { transform: rotate(-12deg); } 60% { transform: rotate(8deg); } 80% { transform: rotate(-4deg); } }
.alert-tests { display: flex; flex-wrap: wrap; gap: 10px; }
.alert-tests form { margin: 0; }
.fields ul[id$="email_mode"] { list-style: none; padding: 0; margin: 4px 0 0; display: grid; gap: 6px; }
.fields ul[id$="email_mode"] label { display: flex; gap: 8px; align-items: center; font-weight: 400; text-transform: none; letter-spacing: 0; font-size: 13.5px; }
.help-search { display: flex; gap: 10px; margin-bottom: 16px; padding: 12px; }
.help-search input { flex: 1; height: 40px; border-radius: 999px; border: 1px solid var(--z200); padding: 0 16px; font: 14px var(--font); }
.help-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 12px; }
.help-item { display: grid; gap: 4px; color: inherit; transition: transform .15s, border-color .15s; }
.help-item:hover { transform: translateY(-2px); border-color: var(--blue); }
.help-item strong { color: var(--blue); } .help-item span { font-size: 12.5px; color: var(--z600); }
.help-steps { margin: 0; padding-left: 22px; display: grid; gap: 10px; font-size: 14px; }
/* Guide mode: a floating side panel over the page (never pushes the layout). Folds into an edge tab. */
.page-guide { position: fixed; right: 18px; top: 150px; z-index: 70; width: min(340px, calc(100vw - 36px)); }
.page-guide > details { background: #fff; border: 1px solid var(--blue-20, var(--blue-20)); border-radius: 16px;
  box-shadow: 0 24px 50px -18px rgba(35,59,145,.35); max-height: calc(100vh - 270px); overflow: auto; padding: 0 16px; }
.page-guide > details[open] { animation: pg-in .25s cubic-bezier(.2,.8,.2,1) both; }
@keyframes pg-in { from { opacity: 0; transform: translateX(24px); } to { opacity: 1; transform: none; } }
.page-guide summary { display: grid; grid-template-columns: auto 1fr auto; gap: 4px 10px; align-items: center; cursor: pointer; list-style: none;
  padding: 14px 0 10px; position: sticky; top: 0; background: #fff; }
.page-guide summary::-webkit-details-marker { display: none; }
.page-guide summary > svg { width: 18px; height: 18px; color: var(--blue); }
.pg-title { font-weight: 700; color: var(--blue); font-size: 14px; }
.pg-sum { grid-column: 2 / 4; color: var(--z600); font-size: 12.5px; line-height: 1.45; }
.pg-fold { width: 26px; height: 26px; border-radius: 8px; display: grid; place-items: center; color: var(--z500); }
.pg-fold:hover { background: var(--z50); color: var(--blue); }
.pg-steps { margin: 0 0 12px; padding-left: 20px; display: grid; gap: 8px; font-size: 13px; color: var(--z700); line-height: 1.45; }
.pg-actions { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; padding-bottom: 14px; }
.pg-actions .btn-link { width: 100%; text-align: left; margin-top: 2px; font-size: 12px; }
/* folded: a slim tab on the right edge */
.page-guide > details:not([open]) { position: fixed; right: 0; top: 160px; width: auto; max-height: none; overflow: visible; padding: 0;
  border-radius: 12px 0 0 12px; border-right: 0; background: var(--blue); box-shadow: 0 10px 24px -10px rgba(35,59,145,.6); }
.page-guide > details:not([open]) summary { display: flex; flex-direction: column; gap: 6px; padding: 12px 9px; background: transparent; position: static; }
.page-guide > details:not([open]) summary > svg { color: #fff; }
.page-guide > details:not([open]) .pg-title { writing-mode: vertical-rl; transform: rotate(180deg); color: #fff; font-size: 12px; letter-spacing: .12em; text-transform: uppercase; }
.page-guide > details:not([open]) .pg-title::before { content: "Guide"; }
.page-guide > details:not([open]) .pg-title span, .page-guide > details:not([open]) .pg-sum, .page-guide > details:not([open]) .pg-fold { display: none; }
.page-guide > details:not([open]):hover { background: var(--green); }
@media (max-width: 760px) {
  .page-guide { top: auto; bottom: 86px; right: 12px; left: 12px; width: auto; }
  .page-guide > details { max-height: 55vh; }
  .page-guide > details:not([open]) { top: auto; bottom: 92px; right: 12px; border-radius: 999px; border-right: 1px solid var(--blue); }
  .page-guide > details:not([open]) summary { flex-direction: row; padding: 9px 14px; }
  .page-guide > details:not([open]) .pg-title { writing-mode: horizontal-tb; transform: none; }
}
.tour-offer { display: flex; align-items: center; gap: 12px; margin-bottom: 16px; border-color: var(--green); }
.tour-offer svg { color: var(--green-ink, var(--green-70)); }
.tour-offer[hidden] { display: none; }
.guide-toggle[hidden] { display: none; }
.driver-popover { font-family: var(--font) !important; border-radius: 14px !important; }
.driver-popover-title { color: var(--blue) !important; font-size: 15px !important; }
.driver-popover-next-btn { background: var(--blue) !important; color: #fff !important; text-shadow: none !important; border: 0 !important; border-radius: 999px !important; }
.driver-popover-prev-btn { border-radius: 999px !important; }

/* Incident evidence: voice report and photo. */
.voice-note { width: 100%; max-width: 420px; margin: 4px 0 12px; }
.evidence-photo { display: block; max-width: 100%; max-height: 320px; border-radius: 10px; border: 1px solid var(--line, var(--gray-30)); margin-top: 4px; }
/* Alerts always sit above the floating guide; the open guide stops short of the alert corner. */
.feedback-toast-stack { z-index: 90; }
@media (min-width: 761px) { .page-guide > details { max-height: calc(100vh - 340px); } }
/* Map pin under latitude / longitude fields. */
.pin-map { grid-column: 1 / -1; border: 1px solid var(--line, var(--gray-30)); border-radius: 12px; overflow: hidden; margin: 4px 0 8px; }
.pin-map-head { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; padding: 8px 12px; background: var(--gray-10); font-size: 13px; }
.pin-map-head .btn { margin-left: auto; }
.pin-map-canvas { height: 280px; }
/* Searchable lists (static/js/searchable-select.js). */
.ss { position: relative; }
.ss-native { position: absolute !important; inset: auto 0 0 0; width: 100% !important; height: 1px !important; opacity: 0; pointer-events: none; }
.ss-input { width: 100%; padding-right: 34px !important; background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='none' stroke='%236b7090' stroke-width='2'%3E%3Ccircle cx='7' cy='7' r='5'/%3E%3Cpath d='m11 11 4 4'/%3E%3C/svg%3E") no-repeat right 12px center; }
.ss-list { display: block !important; grid-template-columns: none !important; position: absolute; z-index: 60; left: 0; right: 0; top: calc(100% + 4px); max-height: 260px; overflow: auto; margin: 0; padding: 4px; list-style: none;
  background: #fff; border: 1px solid var(--line, var(--gray-30)); border-radius: 10px; box-shadow: 0 16px 34px -14px rgba(35,59,145,.35); }
.ss-opt { padding: 8px 10px; border-radius: 7px; cursor: pointer; }
.ss-opt:hover, .ss-opt.on { background: var(--blue-10); color: var(--blue, var(--blue)); }
.ss-opt[aria-selected="true"] { font-weight: 700; }
.ss-group { padding: 8px 10px 4px; font-size: 12px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--gray-60); }
.ss-none { padding: 8px 10px; color: var(--gray-60); }
.ss-list[hidden] { display: none !important; }
/* Daily page: quick report tiles and the OK / Problem walk-round. */
.daily-quick { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 12px; margin-bottom: 16px; }
.daily-tile { display: grid; gap: 4px; padding: 16px; border-radius: 14px; background: #fff; border: 1px solid var(--line, var(--gray-30)); color: inherit; text-decoration: none; }
.daily-tile svg { width: 26px; height: 26px; color: var(--blue, var(--blue)); }
.daily-tile.danger { background: var(--gray-10); border-color: var(--red-20); } .daily-tile.danger svg { color: var(--red-50); }
.daily-tile span { color: var(--gray-60); font-size: 13px; }
.daily-tile:hover { border-color: var(--blue, var(--blue)); }
.daily-items { list-style: none; margin: 8px 0 12px; padding: 0; display: grid; gap: 6px; }
.daily-items li { display: grid; grid-template-columns: 1fr auto; gap: 6px 12px; align-items: center; padding: 10px 12px; border: 1px solid var(--line, var(--gray-30)); border-radius: 10px; }
.daily-choice { display: flex; gap: 6px; }
.daily-choice label { position: relative; }
.daily-choice input { position: absolute; opacity: 0; }
.daily-choice span { display: inline-block; padding: 6px 14px; border-radius: 999px; border: 1px solid var(--line, var(--gray-30)); font-weight: 600; cursor: pointer; }
.daily-choice input:checked + span { background: var(--green-20); border-color: var(--green); color: var(--green-70); }
.daily-choice .bad input:checked + span { background: var(--red-10); border-color: var(--red-50); color: var(--red-80); }
.daily-choice input:focus-visible + span { outline: 2px solid var(--blue, var(--blue)); }
.daily-note { grid-column: 1 / -1; display: none; }
.daily-items li:has(.bad input:checked) { border-color: var(--red-20); background: var(--gray-10); }
.daily-items li:has(.bad input:checked) .daily-note { display: block; }
@media (max-width: 600px) { .daily-items li { grid-template-columns: 1fr; } }
/* Sign in with Google / Microsoft */
.sso { display: grid; gap: 8px; margin-top: 14px; text-align: center; }
.sso-btn { justify-content: center; height: 42px; }
/* Inspections grouped by when they are due */
.when-tabs { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 14px; }
.when-tabs a { padding: 7px 14px; border-radius: 999px; border: 1px solid var(--line, var(--gray-30)); background: #fff; color: inherit; text-decoration: none; font-weight: 600; font-size: 13px; }
.when-tabs a b { margin-left: 4px; color: var(--gray-60); }
.when-tabs a.on { background: var(--blue, var(--blue)); border-color: var(--blue, var(--blue)); color: #fff; } .when-tabs a.on b { color: var(--blue-20); }
.when-tabs a.late { border-color: var(--red-20); color: var(--red-80); } .when-tabs a.late b { color: var(--red-80); }
/* Messages on a record */
.thread { list-style: none; margin: 8px 0 12px; padding: 0; display: grid; gap: 8px; }
.thread li { max-width: 80%; padding: 8px 12px; border-radius: 12px; background: var(--blue-10); }
.thread li.mine { margin-left: auto; background: var(--blue-10); }
.thread .who { font-size: 12px; color: var(--gray-60); margin-bottom: 2px; } .thread .who svg { width: 12px; height: 12px; vertical-align: -2px; }
.thread-form { display: flex; gap: 8px; align-items: flex-end; } .thread-form textarea { flex: 1; }
/* Company code and join requests (Users page) */
.join-code .code-row { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.company-code { font-size: 22px; letter-spacing: .12em; font-weight: 800; padding: 8px 14px; border-radius: 10px; background: var(--blue-10); color: var(--blue, var(--blue)); }
.join-requests { border-color: var(--amber-20); } .jr-form { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.join-code, .join-requests { margin-bottom: 16px; }
/* Priorities: compact strip on every dashboard view, grouped list on My priorities */
.prio-strip { display: grid; grid-template-columns: auto 1fr auto; gap: 18px; align-items: center; margin-bottom: 18px; color: inherit; text-decoration: none; border: 1px solid var(--gray-30); }
.prio-strip.late { border-color: var(--red-20); background: var(--gray-10); }
.prio-strip:hover { box-shadow: 0 14px 30px -20px rgba(35,59,145,.5); }
.prio-counts { display: flex; gap: 10px; }
.pc { display: grid; text-align: center; min-width: 74px; padding: 6px 10px; border-radius: 12px; background: var(--blue-10); font-size: 12px; color: var(--gray-60); }
.pc b { font-size: 22px; line-height: 1.1; color: var(--gray-90); } .pc.late b { color: var(--red-50); } .pc.soon b { color: var(--amber-70); }
.prio-top { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; min-width: 0; }
.prio-top li { display: flex; align-items: center; gap: 8px; font-size: 13.5px; min-width: 0; }
.prio-top li span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.prio-top li svg { width: 16px; height: 16px; flex: none; color: var(--blue, var(--blue)); } .prio-top li.late svg { color: var(--red-50); }
.prio-top li em { margin-left: auto; font-style: normal; font-size: 12px; color: var(--gray-60); flex: none; } .prio-top li.late em { color: var(--red-50); font-weight: 700; }
.prio-go { display: flex; align-items: center; gap: 4px; font-weight: 700; color: var(--blue, var(--blue)); white-space: nowrap; } .prio-go svg { width: 16px; height: 16px; }
@media (max-width: 760px) { .prio-strip { grid-template-columns: 1fr; } .prio-go { justify-content: flex-end; } }
.prio-group { margin-top: 10px; } .prio-head { font-size: 12px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: var(--gray-60); margin: 6px 0; }
.prio-head span { background: var(--blue-10); color: var(--gray-90); border-radius: 999px; padding: 1px 8px; margin-left: 4px; }
.prio-group.late .prio-head { color: var(--red-80); } .prio-group.late .prio-head span { background: var(--red-10); color: var(--red-80); }
.prio-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.prio-list li { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border: 1px solid var(--line, var(--gray-30)); border-radius: 10px; background: #fff; }
.prio-list li.late { border-color: var(--red-20); background: var(--gray-10); } .prio-list li.urgent { border-color: var(--amber-20); background: var(--cream); }
.prio-ico { width: 34px; height: 34px; flex: none; border-radius: 10px; display: grid; place-items: center; background: var(--blue-10); color: var(--blue, var(--blue)); }
.prio-list li.late .prio-ico { background: var(--red-10); color: var(--red-50); } .prio-ico svg { width: 18px; height: 18px; }
.prio-list .title { display: block; font-weight: 700; } .prio-list .sub { display: block; font-size: 12.5px; color: var(--gray-60); }
.prio-due { font-size: 12px; font-weight: 700; padding: 3px 10px; border-radius: 999px; background: var(--blue-10); color: var(--gray-90); white-space: nowrap; }
.prio-list li.late .prio-due { background: var(--red-10); color: var(--red-80); }
@media (max-width: 600px) { .prio-list li { flex-wrap: wrap; } .prio-list li .btn { margin-left: auto; } }
.linked { margin-bottom: 14px; } .linked-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.linked-list li { display: flex; align-items: center; gap: 8px; } .linked-list svg { width: 16px; height: 16px; color: var(--blue, var(--blue)); }
/* Step tracker (incidents) */
.tracker { margin-bottom: 16px; }
.tracker-head { display: flex; gap: 12px; align-items: baseline; flex-wrap: wrap; margin-bottom: 12px; } .tracker-head b { font-size: 16px; }
.tracker-steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; counter-reset: s; }
.tracker-steps li { position: relative; display: grid; justify-items: center; text-align: center; gap: 4px; padding-top: 2px; }
.tracker-steps li::before { content: ""; position: absolute; top: 15px; left: -50%; width: 100%; height: 3px; background: var(--gray-30); z-index: 0; }
.tracker-steps li:first-child::before { display: none; }
.tracker-steps li.done::before, .tracker-steps li.current::before { background: var(--green); }
.ts-dot { position: relative; z-index: 1; width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; font-weight: 800; font-size: 13px;
  background: #fff; border: 2px solid var(--gray-40); color: var(--gray-60); }
.ts-dot svg { width: 16px; height: 16px; }
.tracker-steps li.done .ts-dot { background: var(--green); border-color: var(--green); color: #fff; }
.tracker-steps li.current .ts-dot { background: var(--blue, var(--blue)); border-color: var(--blue, var(--blue)); color: #fff; box-shadow: 0 0 0 5px var(--blue-20); }
.ts-label { font-size: 12.5px; font-weight: 700; line-height: 1.2; } .tracker-steps li.todo .ts-label { color: var(--blue-40); font-weight: 600; }
.ts-who { font-size: 12px; color: var(--gray-60); line-height: 1.2; }
.tracker-next { display: flex; align-items: center; gap: 12px; justify-content: space-between; flex-wrap: wrap; margin-top: 14px; padding: 12px 14px;
  border-radius: 12px; background: var(--blue-10); }
@media (max-width: 760px) {
  .tracker-steps { grid-template-columns: 1fr; gap: 8px; }
  .tracker-steps li { grid-template-columns: 30px 1fr; justify-items: start; text-align: left; column-gap: 10px; }
  .tracker-steps li::before { display: none; } .ts-dot { grid-row: span 2; } }
.prio-step { display: inline-block; margin-top: 4px; font-size: 12px; font-weight: 700; color: var(--blue, var(--blue)); background: var(--blue-10); padding: 2px 8px; border-radius: 999px; }
.prio-list form { margin: 0; }
/* A moment of done */
.ems-celebrate { position: fixed; inset: 0; z-index: 3000; display: grid; place-items: center; pointer-events: auto; background: rgba(20,28,60,.18); animation: cel-in .2s ease-out; overflow: hidden; }
.ems-celebrate.leaving { opacity: 0; transition: opacity .3s; }
.cel-card { display: grid; justify-items: center; gap: 10px; max-width: min(420px, calc(100vw - 40px)); padding: 26px 28px; border-radius: 20px; background: #fff;
  box-shadow: 0 30px 60px -20px rgba(20,28,60,.45); text-align: center; animation: cel-pop .35s cubic-bezier(.2,1.4,.4,1); }
.cel-card p { margin: 0; font-weight: 700; color: var(--gray-90); font-size: 16px; line-height: 1.35; }
.ems-celebrate.big .cel-card p { font-size: 18px; }
.cel-tick svg { width: 64px; height: 64px; } .ems-celebrate.big .cel-tick svg { width: 84px; height: 84px; }
.cel-tick circle { fill: var(--green); stroke: none; transform-origin: center; animation: cel-pop .4s ease-out; }
.cel-tick path { fill: none; stroke: #fff; stroke-width: 5; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 40; stroke-dashoffset: 40; animation: cel-draw .45s .15s ease-out forwards; }
.cel-bit { position: absolute; top: 45%; left: 50%; width: 9px; height: 14px; border-radius: 2px; opacity: 0; animation: cel-fly var(--d, 1s) ease-out forwards; }
@keyframes cel-in { from { opacity: 0; } } @keyframes cel-pop { from { transform: scale(.6); opacity: 0; } }
@keyframes cel-draw { to { stroke-dashoffset: 0; } }
@keyframes cel-fly { 0% { opacity: 1; transform: translate(0, 0) rotate(0); } 100% { opacity: 0; transform: translate(calc(var(--x) * 42vw), -38vh) rotate(540deg); } }
@media (prefers-reduced-motion: reduce) { .ems-celebrate, .cel-card, .cel-tick circle { animation: none; } .cel-tick path { animation: none; stroke-dashoffset: 0; } }
.flash li.celebrate { display: none; }
/* Buttons inside reminder pop-ups */
.toast-actions { display: flex; gap: 6px; margin: 6px 0 2px; } .feedback-toast.done { border-color: var(--green-20); background: var(--green-10); }
.prio-group.doing .prio-head { color: var(--green-70); } .prio-group.doing .prio-head span { background: var(--green-20); color: var(--green-70); }
.prio-group.doing .prio-list li { border-color: var(--green-20); }

/* ---- workspace.css ---- */
/* Shared working surfaces, scoped to the EMS application. */
.ems-app {
  --brand-blue: var(--blue);
  --brand-blue-dark: var(--blue-70);
  --brand-green: var(--green);
  --brand-green-ink: var(--green-70);
  --brand-cream: var(--cream);
  --brand-blue-soft: var(--blue-10);
  --font: "Segoe UI Variable", "Segoe UI", ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, Arial, sans-serif;
  --text-small: 12px;
  --text-label: 13px;
  --text-body: 14px;
  --text-section: 16px;
  --text-title: 28px;
  font-family: var(--font);
  font-size: var(--text-body);
  line-height: 1.5;
  font-weight: 400;
  font-optical-sizing: auto;
}
.ems-app button, .ems-app input, .ems-app select, .ems-app textarea { font-family: var(--font); }
.ems-app .page-title { font-size: var(--text-title); font-weight: 600; line-height: 1.25; letter-spacing: -.02em; }
.ems-app .page-title em { font-weight: 600; }
.ems-app .nav > a { font-size: var(--text-body); font-weight: 400; }
.ems-app .nav a.on { font-weight: 600; }
.ems-app .nav-section summary { font-size: var(--text-label); font-weight: 600; }
.ems-app .nav-section a { font-size: var(--text-label); }
.ems-app .side-footer button, .ems-app .side-footer a { font-size: var(--text-label); }
.ems-app .nav svg.lucide, .ems-app .nav-section summary svg.lucide, .ems-app .side-footer svg.lucide { width: 18px; height: 18px; stroke-width: 1.8; opacity: 1; }
.ems-app svg.lucide { width: 18px; height: 18px; stroke-width: 1.8; vertical-align: middle; }
.ems-app .icon-btn svg.lucide, .ems-app .nav-close svg.lucide { width: 20px; height: 20px; }
.ems-app .module-icon svg.lucide { width: 22px; height: 22px; stroke-width: 1.8; }
.ems-app .module-meta svg.lucide, .ems-app .row-edit svg.lucide { width: 14px; height: 14px; }
.ems-app .empty svg.lucide { width: 36px; height: 36px; }
.ems-app .eyebrow { font-size: 12px; font-weight: 500; letter-spacing: .035em; text-transform: none; }
.ems-app .t th { font-size: var(--text-small); font-weight: 600; }
.ems-app .btn, .ems-app .btn-sm { font-weight: 600; font-size: var(--text-label); }
.ems-app .btn-link { font-size: var(--text-label); font-weight: 600; text-transform: none; letter-spacing: 0; }
.ems-app .list .title, .ems-app .t .rowlink { font-weight: 600; }
.ems-app .field input[type=file]::file-selector-button { font: 600 12px var(--font); text-transform: none; letter-spacing: 0; border-radius: 7px; }
.ems-app .kpi .value, .ems-app .stat-big { font-weight: 600; font-variant-numeric: tabular-nums lining-nums; }
.ems-app .t td.n { font-variant-numeric: tabular-nums lining-nums; }
.ems-app h2, .ems-app h3 { font-weight: 600; }
/* Brand colours identify navigation and actions; status colours retain their meaning. */
.ems-app, .ems-app .main { background: var(--brand-cream); }
.ems-app .page-title, .ems-app .page-title em, .ems-app .launcher-head h2 { color: var(--brand-blue); }
.ems-app .btn-primary { background: var(--brand-blue); border-color: var(--brand-blue); color: #fff; }
.ems-app .btn-primary:hover { background: var(--brand-blue-dark); border-color: var(--brand-blue-dark); color: #fff; }
.ems-app .btn-primary:active { background: var(--blue-80); }
.ems-app .avatar { background: var(--brand-blue); }
.ems-app .icon-btn:hover { border-color: var(--brand-blue); color: var(--brand-blue); background: var(--brand-blue-soft); }
.ems-app .segmented .on { background: var(--brand-blue); color: #fff; }
.ems-app .field input:focus, .ems-app .field select:focus, .ems-app .field textarea:focus { border-color: var(--brand-blue); box-shadow: 0 0 0 3px var(--blue-20); }
.ems-app input[type=checkbox], .ems-app input[type=radio] { accent-color: var(--brand-blue); }
.ems-app :focus-visible { outline: 2px solid var(--brand-blue); outline-offset: 3px; }
.ems-app .side :focus-visible { outline-color: var(--brand-green); }
.software-symbols { position: absolute; overflow: hidden; pointer-events: none; }
.software-icon { width: 18px; height: 18px; display: inline-block; flex: none; fill: currentColor; vertical-align: middle; }
.software-accent { fill: #fff; }
.ems-app .nav .software-icon { width: 18px; height: 18px; color: inherit; }
.ems-app .side { background: var(--brand-blue); border-right-color: var(--brand-blue-dark); }
.ems-app .side-head { background: var(--brand-blue-dark); border-bottom: 3px solid var(--brand-green); }
.ems-app .side-head p { color: var(--blue-20); }
.ems-app .nav a, .ems-app .nav-section summary { color: var(--blue-20); }
.ems-app .nav a:hover, .ems-app .nav-section summary:hover { background: #ffffff14; color: #fff; }
.ems-app .nav-section[open] summary { background: #ffffff12; color: #fff; }
.ems-app .nav a.on { background: #fff; color: var(--brand-blue); }
.ems-app .nav > a b { background: var(--brand-green); color: var(--green-80); }
.ems-app .nav a.on svg { color: inherit; }
.ems-app .nav-section summary svg.lucide { color: inherit; }
.ems-app .side-footer button, .ems-app .side-footer a { color: var(--blue-20); }
.ems-app .side-footer button:hover, .ems-app .side-footer a:hover { color: #fff; }
.ems-app .module-card { --module-color: var(--brand-blue); --module-tint: var(--brand-blue-soft); }
.ems-app .module-icon { background: transparent; color: var(--brand-blue); border: 0; }
.ems-app .module-icon .software-icon { width: 28px; height: 28px; }
.ems-app .module-meta { color: #596575; font-weight: 500; }
.ems-app .module-card:hover { border-color: var(--brand-blue); }
.ems-app .module-card:hover .module-icon { color: var(--brand-blue-dark); background: transparent; }
.ems-app .menu-toggle { display: grid; flex: none; }
.ems-app .side { transition: width .22s cubic-bezier(.2,.8,.2,1), transform .22s cubic-bezier(.2,.8,.2,1); }
.ems-app .nav a, .ems-app .nav-section summary { transition: background-color .16s ease, color .16s ease, box-shadow .16s ease; }
@supports (interpolate-size: allow-keywords) {
  .ems-app .nav-section { interpolate-size: allow-keywords; }
  .ems-app .nav-section::details-content { height: 0; opacity: 0; overflow: clip; transition: height .2s ease, opacity .16s ease, content-visibility .2s allow-discrete; }
  .ems-app .nav-section[open]::details-content { height: auto; opacity: 1; }
}
.ems-app .side-head { position: relative; }
.nav-close { display: none; }
.ems-app .scrim { padding: 0; border: 0; }
.ems-app .side-footer { display: grid; gap: 4px; padding: 12px; border-top: 1px solid #ffffff18; }
.side-footer button, .side-footer a { display: flex; align-items: center; gap: 11px; width: 100%; min-height: 38px; padding: 8px 12px; border: 0; border-radius: 8px; background: transparent; font: 12px var(--font); color: var(--blue-20); cursor: pointer; text-align: left; }
.side-footer button:hover, .side-footer a:hover, .density-toggle[aria-pressed=true] { background: #ffffff15; color: #fff; }
.ems-app .top { gap: 10px; }
.ems-app .search { min-width: 120px; max-width: 440px; }
.ems-app .search input, .ems-app .pill-select { border-radius: 8px; text-transform: none; letter-spacing: 0; font-size: 13px; font-weight: 400; }
.ems-app .today { font-size: 12px; }
.ems-app .page-head { align-items: center; margin-bottom: 24px; }
.ems-app .page-head .lead { font-size: 13px; line-height: 1.55; font-weight: 400; }
.ems-app .eyebrow { color: var(--gray-60); }
.ems-app .section-title { font-size: 14px; font-weight: 600; text-transform: none; letter-spacing: 0; margin-bottom: 16px; }
.ems-app .kpi .label { font-size: 12px; text-transform: none; letter-spacing: 0; color: var(--gray-60); font-weight: 500; }
.ems-app .kpi .value { font-weight: 600; font-size: 30px; font-variant-numeric: tabular-nums; }
.ems-app .stat-big { font-weight: 600; font-variant-numeric: tabular-nums; }
.ems-app .module-card { min-height: 184px; padding: 22px 16px 16px; align-items: center; text-align: center; border-radius: 5px; border-color: #e3e5eb; box-shadow: none; }
.ems-app .module-card::after { display: none; }
.ems-app .module-icon { width: 48px; height: 48px; margin-bottom: 10px; border-radius: 0; }
.ems-app .module-icon .software-icon { width: 44px; height: 44px; }
.ems-app .module-icon svg.lucide { width: 38px; height: 38px; }
.ems-app .module-card:hover { transform: none; box-shadow: 0 2px 6px rgba(35,59,145,.09); }
.ems-app .module-meta { display: flex; justify-content: center; align-items: center; gap: 5px; padding-top: 12px; }
.ems-app .launcher-grid { gap: 12px; }
.ems-app .card, .ems-app .menu-pop { border-radius: 8px; box-shadow: 0 1px 3px rgba(35,59,145,.04); }
.ems-app .top { min-height: 60px; box-shadow: none; }
.ems-app .icon-btn, .ems-app .btn, .ems-app .btn-sm { border-radius: 6px; }
.ems-app .nav a, .ems-app .nav-section summary { border-radius: 6px; }
.ems-app .nav > a { padding-top: 8px; padding-bottom: 8px; }
.ems-app .nav-section { margin-top: 8px; }
.ems-app .side-footer button, .ems-app .side-footer a { border-radius: 6px; }
.ems-app .module-card strong { font-size: 15px; font-weight: 600; }
.ems-app .module-card small { min-height: 0; font-size: 12px; line-height: 1.5; color: #596575; }
.ems-app .module-meta { font-size: 12px; line-height: 1.5; }
.ems-app .launcher-head .muted { font-size: 12px; }
.ems-app .work-intro { background: var(--brand-blue-soft); border-color: var(--blue-20); }
.ems-app .work-intro h2 { font-weight: 600; }
.workspace-tabs { display: flex; gap: 24px; margin: -4px 0 24px; border-bottom: 1px solid var(--gray-30); }
.workspace-tabs a { display: flex; align-items: center; gap: 7px; padding: 12px 0; font-size: 13px; font-weight: 600; color: var(--gray-60); }
.workspace-tabs a[aria-current=page] { color: var(--brand-blue); border-bottom: 2px solid var(--brand-green-ink); }
.workspace-tabs a span { padding: 1px 6px; border-radius: 5px; background: var(--brand-blue-soft); font-size: 12px; }
.ems-app #modules, .ems-app #priorities, .ems-app #performance { scroll-margin-top: 90px; }
.ems-app .toolbar { gap: 10px; padding: 16px 20px; background: #fff; }
.ems-app .toolbar input[type=search], .ems-app .toolbar select { border-radius: 7px; background: #fff; font-size: 13px; font-weight: 400; text-transform: none; letter-spacing: 0; }
.ems-app .toolbar .muted { font-size: 12px; }
.filter-reset { font-size: 12px; text-decoration: underline; text-underline-offset: 3px; }
.ems-app .t th { font-size: var(--text-small); text-transform: none; letter-spacing: 0; font-weight: 600; border-bottom: 1px solid var(--gray-30); }
.ems-app .t td { font-size: 13px; line-height: 1.5; border-bottom-color: var(--blue-10); }
.ems-app .t tbody tr:hover td { background: var(--blue-10); }
.ems-app .row-edit { display: inline-flex; align-items: center; gap: 5px; padding: 4px 7px; border-radius: 6px; font-size: 12px !important; text-transform: none !important; letter-spacing: 0 !important; font-weight: 500 !important; }
.row-edit:hover { background: var(--blue-10); }
.row-edit svg { width: 14px; height: 14px; }
.ems-app .badge { border-radius: 6px; padding: 4px 8px; font-size: 12px; text-transform: none; letter-spacing: 0; font-weight: 600; }
.ems-app .pager { font-size: 12px; padding: 12px 20px; background: var(--gray-10); }
.record-range { margin-right: auto; }
.ems-app .empty strong { font-size: 18px; font-weight: 600; text-transform: none; }
.ems-app .empty p { margin: 8px 0 18px; }
.form-intro { display: flex; gap: 12px; align-items: flex-start; padding-bottom: 20px; margin-bottom: 24px; border-bottom: 1px solid var(--blue-10); }
.form-intro > svg { color: var(--brand-blue); width: 20px; height: 20px; margin-top: 2px; }
.form-intro strong { font-size: 15px; font-weight: 600; }
.form-intro p { margin: 5px 0 0; color: var(--gray-60); font-size: 12px; }
.ems-app .field label { font-size: 13px; color: var(--gray-70); font-weight: 600; text-transform: none; letter-spacing: 0; margin-bottom: 7px; }
.ems-app .field.is-required:not(.check) > label::after { content: ' *'; color: var(--red-50); }
.ems-app .field input:not([type=checkbox]):not([type=radio]):not([type=file]), .ems-app .field select, .ems-app .field textarea { min-height: 40px; border-radius: 7px; background: #fff; border-color: var(--blue-20); padding: 9px 12px; font-size: 13px; }
.ems-app .field .help { color: var(--gray-60); font-size: 12px; line-height: 1.5; }
.ems-app .field.has-error input, .ems-app .field.has-error select, .ems-app .field.has-error textarea { border-color: var(--red-50) !important; background: var(--gray-10) !important; }
.validation-summary { padding: 14px 16px; margin-bottom: 20px; border: 1px solid var(--red-20); border-radius: 8px; background: var(--gray-10); color: var(--red-80); font-size: 13px; }
.validation-summary p { margin: 5px 0 0; font-size: 12px; }
.ems-app .form-actions { position: sticky; bottom: 0; padding: 16px 0 4px; border-top: 1px solid var(--blue-10); background: #fff; z-index: 10; }
.ems-app .kv dt, .ems-app .detail-list dt { text-transform: none; letter-spacing: 0; font-size: 12px; color: var(--gray-60); }
.ems-app .kv dd, .ems-app .detail-list dd { font-size: 13px; }
.ems-app .detail-list { margin: 0; }
.ems-app .detail-list dt { margin: 14px 0 3px; }
.ems-app .detail-list dt:first-child { margin-top: 0; }
.ems-app .detail-list dd { margin: 0; line-height: 1.6; }
.ems-app .section-title { flex-wrap: wrap; }
.ems-app .section-title .muted { line-height: 1.5; }
.ems-app .form-step .step-number { border-radius: 9px; background: var(--brand-blue-soft); color: var(--brand-blue); }
.ems-app .form-step h2, .ems-app .optional-step summary strong { color: var(--blue-80); font-size: 16px; font-weight: 600; }
.ems-app .form-step { border-bottom-color: var(--blue-10); }
.ems-app .prose { font-weight: 400; font-size: 13px; }
.ems-app .board .col { border-radius: 12px; background: var(--blue-10); }
.ems-app .board .tile { border-radius: 10px; border-color: var(--gray-30); }
.ems-app .compact .t td, .ems-app .compact .t th { padding: 8px 12px; }
.ems-app .compact .list li { padding: 8px 0; }
.ems-app .compact .card:not(.flush) { padding: 16px; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
@media (min-width: 901px) {
  .ems-app .nav-collapsed .side { width: 76px; }
  .nav-collapsed .side-head { padding: 20px 10px; }
  .nav-collapsed .side-head img { width: 54px; height: auto; }
  .nav-collapsed .side-head p, .nav-collapsed .nav-section summary span, .nav-collapsed .side-footer span { display: none; }
  .nav-collapsed .nav a { font-size: 0; justify-content: center; gap: 0; margin-left: 0; padding: 11px; position: relative; }
  .nav-collapsed .nav a b { position: absolute; right: 0; top: 0; font-size: 12px; min-width: 16px; height: 16px; padding: 0 4px; }
  .nav-collapsed .nav-section summary { justify-content: center; gap: 0; padding: 10px; }
  .nav-collapsed .nav-section summary::after { display: none; }
  .nav-collapsed .side-footer button, .nav-collapsed .side-footer a { justify-content: center; padding: 10px; }
}
@media (max-width: 900px) {
  .nav-close { display: grid; place-items: center; position: absolute; top: 14px; right: 12px; width: 32px; height: 32px; border: 1px solid #ffffff22; border-radius: 7px; background: transparent; color: #fff; cursor: pointer; }
  .ems-app .top .search { display: none; }
  .ems-app .page-title { font-size: 25px; }
  .ems-app .toolbar input[type=search] { min-width: 0; flex: 1 1 180px; }
}
@media (max-width: 560px) {
  .ems-app .toolbar { padding: 12px; }
  .ems-app .pager { flex-wrap: wrap; gap: 8px; }
  .record-range { flex-basis: 100%; }
  .ems-app .launcher-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .ems-app .module-card { padding: 14px; }
  .ems-app .module-card strong { font-size: 14px; }
  .ems-app .module-meta { font-size: 12px; }
}
@media (prefers-reduced-motion: reduce) {
  .ems-app *, .ems-app *::before, .ems-app *::after { scroll-behavior: auto !important; transition: none !important; }
}
/* Clanert colours blended over light surfaces, without fading text or controls. */
.ems-app {
  --brand-blue: var(--blue);
  --brand-blue-dark: var(--blue-70);
  --brand-blue-soft: var(--blue-10);
  --brand-cream: var(--cream);
  --brand-green: var(--green);
  --brand-green-ink: var(--green-70);
  --blue-20: rgba(35,59,145,.18);
}
.ems-app, .ems-app .main { background: var(--brand-cream); }
.ems-app .side { background: #fff; border-right: 1px solid rgba(35,59,145,.12); }
.ems-app .side-head { background: #fff; border-bottom: 1px solid rgba(35,59,145,.12); }
.ems-app .side-head img { filter: none; opacity: 1; }
.ems-app .side-head p { color: var(--gray-60); }
.ems-app .nav a, .ems-app .nav-section summary { color: var(--gray-70); }
.ems-app .nav a:hover, .ems-app .nav-section summary:hover,
.ems-app .nav-section[open] summary { color: var(--brand-blue); background: rgba(35,59,145,.06); }
.ems-app .nav a.on { background: var(--blue-10); color: var(--brand-blue); font-weight: 600; }
.ems-app .nav > a b { background: var(--brand-green); color: var(--green-80); }
.ems-app .side-footer { border-top-color: var(--gray-30); }
.ems-app .side-footer button, .ems-app .side-footer a { color: var(--gray-70); }
.ems-app .side-footer button:hover, .ems-app .side-footer a:hover,
.ems-app .side-footer .density-toggle[aria-pressed=true] { color: var(--brand-blue); background: rgba(35,59,145,.06); }
.ems-app .top { background: #fff; border-top: 3px solid var(--brand-blue); border-bottom-color: rgba(35,59,145,.12); }
.ems-app .nav-close { color: var(--gray-70); border-color: var(--blue-20); }
.ems-app .side :focus-visible { outline-color: var(--brand-blue); }
.ems-app .module-card { --module-color: var(--brand-blue); background: #fff; border: 1px solid rgba(35,59,145,.12); border-radius: 5px; }
.ems-app .module-card:hover { border-color: var(--brand-blue); }
.ems-app .module-blue { --module-color: #d96b53; }
.ems-app .module-red { --module-color: #739f36; }
.ems-app .module-green { --module-color: #b88632; }
.ems-app .module-purple { --module-color: #238ca6; }
.ems-app .module-amber { --module-color: #479979; }
.ems-app .module-cyan { --module-color: #739f36; }
.ems-app .module-teal { --module-color: #238ca6; }
.ems-app .module-slate { --module-color: #a17cb2; }
.ems-app .module-icon, .ems-app .module-card:hover .module-icon { color: var(--module-color); background: transparent; }
.ems-app .work-intro { background: #fff; }
.ems-app .seg .on { background: var(--brand-blue); }
.ems-app .page-loading .top::after { content: ''; position: absolute; bottom: 0; left: 0; height: 2px; width: 30%; background: var(--brand-green); animation: workspace-loading 1s ease-in-out infinite; }
.ems-app .content.page-arriving { animation: workspace-arrive .16s ease-out; }
@keyframes workspace-loading { from { left: 0; } to { left: 70%; } }
@keyframes workspace-arrive { from { opacity: .65; transform: translateY(3px); } to { opacity: 1; transform: translateY(0); } }
/* Sparse green curves live in the gutters, never behind words. */
.ems-app .main { position: relative; isolation: isolate; }
.sustainability-network { display: block; position: absolute; inset: 0; z-index: -1; overflow: clip; pointer-events: none; user-select: none; mask-image: linear-gradient(to right, #000, transparent 14px, transparent calc(100% - 14px), #000); }
.sustainability-scene { position: sticky; top: 0; width: 100%; height: 100vh; mix-blend-mode: multiply; }
.sustainability-scene .network-scroll, .sustainability-scene .network-flow { width: 100%; height: 100%; }
.sustainability-scene img { display: block; width: 100%; height: 100%; object-fit: fill; opacity: .45; }
.network-scroll { transform: translateY(var(--network-scroll, 0px)); }
.network-flow { transform-origin: center; animation: network-drift 28s ease-in-out infinite alternate; }
/* Reading and input surfaces stay opaque; pictograms retain their own colours. */
.ems-app .content { margin: 0; background: transparent; border: 0; border-radius: 0; }
.ems-app .flash { position: relative; z-index: 2; margin-bottom: 18px; }
.ems-app .flash li { border: 1px solid var(--blue-20); background: #fff; padding: 16px 20px; font-size: 14px; box-shadow: 0 3px 12px #233b9110; }
.ems-app .flash .error, .ems-app .flash .warning { border-color: var(--red-20); background: var(--gray-10); }
.ems-app .flash .success { border-color: var(--green-20); background: var(--green-10); }
.feedback-toast-stack { position: fixed; right: 20px; top: 76px; width: min(360px, calc(100vw - 40px)); z-index: 150; display: grid; gap: 10px; pointer-events: none; }
.feedback-toast { position: relative; pointer-events: auto; border: 1px solid var(--gray-30); border-radius: 8px; background: #fff; color: var(--gray-80); padding: 16px 48px 16px 16px; box-shadow: 0 6px 24px #26334b24; animation: workspace-arrive .2s ease-out; }
.feedback-toast.critical { border-color: var(--red-20); background: var(--gray-10); }
.feedback-toast p { font-size: 12px; line-height: 1.5; margin: 7px 0; }
.feedback-toast button { position: absolute; right: 4px; top: 4px; width: 40px; height: 40px; border: 0; background: transparent; color: var(--gray-80); cursor: pointer; font-size: 22px; }
.feedback-toast a { text-decoration: underline; font-size: 12px; color: var(--blue); }
.ems-app button[type=submit]:active, .ems-app .btn:active { transform: translateY(1px); }
@media (prefers-reduced-motion: reduce) { .feedback-toast { animation: none; } }
.ems-app .card, .ems-app .board .tile { background-color: #fff; }
@keyframes network-drift {
  from { transform: scale(1.02) translate(-2px, 2px); }
  to { transform: scale(1.02) translate(2px, -2px); }
}
@media (prefers-reduced-motion: reduce) {
  .ems-app .content.page-arriving, .ems-app .page-loading .top::after { animation: none; }
  .network-flow { animation: none; }
  .network-scroll { transform: none; }
}

/* ---- sidebar.css ---- */
/* Sidebar: Dashboard + six short groups, one open at a time; collapses to an icon rail.
   Plain Clanert colours: white panel, blue text and active state, green only for counts. */
body.ems-app .sb { width: 236px; background: #fff; border-right: 1px solid var(--z100); color: var(--z700); }
@media (min-width: 901px) { body.ems-app .sb { z-index: 60; } }  /* above sticky page panels; phones keep the drawer above its overlay */
body.ems-app .sb .side-head { padding: 18px 18px 14px; background: #fff; border-bottom: 0; }
body.ems-app .sb .side-head img { height: 30px; width: auto; filter: none; opacity: 1; }
body.ems-app .sb .nav { display: flex; flex-direction: column; gap: 2px; padding: 4px 10px 12px; overflow-y: auto; overflow-x: hidden; flex: 1; }

/* rows: top-level links, group headers, group items */
body.ems-app .sb .nav a, body.ems-app .sb .nav-section summary {
  display: flex; align-items: center; gap: 11px; min-height: 38px; margin: 0; padding: 8px 10px; border-radius: 10px; color: var(--z700);
  font-size: 13.5px; font-weight: 500; background: none; box-shadow: none; cursor: pointer; list-style: none; position: relative; text-decoration: none; }
body.ems-app .sb .nav-section summary::-webkit-details-marker { display: none; }
body.ems-app .sb .nav-section summary::after { display: none; }
body.ems-app .sb .nav a:hover, body.ems-app .sb .nav-section summary:hover { background: var(--z50); color: var(--blue); }
body.ems-app .sb .nav svg.lucide, body.ems-app .sb .nav .software-icon { width: 18px; height: 18px; flex: none; color: var(--z500); stroke-width: 1.8; }
body.ems-app .sb .nav a:hover svg, body.ems-app .sb .nav-section summary:hover svg { color: var(--blue); }
body.ems-app .sb .nav a.on { background: var(--blue-10); color: var(--blue); font-weight: 600; box-shadow: none; }
body.ems-app .sb .nav a.on svg, body.ems-app .sb .nav a.on .software-icon { color: var(--blue); }
body.ems-app .sb .nav a.on::before { content: ""; position: absolute; left: -10px; top: 8px; bottom: 8px; width: 3px; border-radius: 0 3px 3px 0; background: var(--blue); }
body.ems-app .sb .nav a b { margin-left: auto; min-width: 20px; height: 20px; padding: 0 6px; border-radius: 999px; display: inline-grid; place-items: center;
  background: var(--green); color: #000; font-size: 12px; font-weight: 700; }

/* groups */
body.ems-app .sb .nav-section { margin: 0; }
body.ems-app .sb .nav-section summary span { flex: 1; min-width: 0; }
body.ems-app .sb .nav-section[open] > summary { color: var(--z900); background: none; }
body.ems-app .sb .nav-section:has(a.on) > summary { color: var(--blue); }
body.ems-app .sb .nav-section:has(a.on) > summary > svg:first-child { color: var(--blue); }
body.ems-app .sb .sb-chev { width: 16px !important; height: 16px !important; color: var(--z400) !important; transition: transform .25s var(--ease); }
body.ems-app .sb .nav-section[open] .sb-chev { transform: rotate(180deg); color: var(--blue) !important; }
body.ems-app .sb .sb-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--green); flex: none; }
body.ems-app .sb .nav-section[open] .sb-dot { display: none; }
body.ems-app .sb .sb-items { display: grid; gap: 1px; margin: 2px 0 6px 18px; padding-left: 10px; border-left: 1px solid var(--z100); }
body.ems-app .sb .sb-items a { min-height: 34px; padding: 6px 10px; font-size: 13px; font-weight: 400; }
body.ems-app .sb .sb-items a.on::before { left: -11px; }
body.ems-app .sb .sb-items svg.lucide, body.ems-app .sb .sb-items .software-icon { width: 16px; height: 16px; }

/* footer: the collapse control, always visible */
body.ems-app .sb .side-footer { padding: 10px; border-top: 1px solid var(--z100); }
body.ems-app .sb .sb-collapse { display: flex; align-items: center; gap: 10px; width: 100%; height: 40px; padding: 0 12px; border: 1px solid var(--z200); border-radius: 10px;
  background: #fff; color: var(--z700); font: inherit; font-size: 13px; font-weight: 600; cursor: pointer; }
body.ems-app .sb .sb-collapse:hover { border-color: var(--blue); color: var(--blue); background: var(--blue-10); }
body.ems-app .sb .sb-collapse svg { width: 18px; height: 18px; }
body.ems-app .sb .sb-more { display: none; }

/* icon rail (desktop) */
@media (min-width: 901px) {
  body.ems-app .nav-collapsed .sb { width: 72px; }
  body.ems-app .nav-collapsed .sb .side-head { padding: 16px 8px 12px; display: grid; place-items: center; }
  body.ems-app .nav-collapsed .sb .side-head img { width: 44px; height: auto; object-fit: cover; object-position: left; }
  body.ems-app .nav-collapsed .sb .nav { padding: 4px 10px; align-items: stretch; }
  body.ems-app .nav-collapsed .sb .nav > a, body.ems-app .nav-collapsed .sb .nav-section > summary { justify-content: center; padding: 10px; font-size: 0; gap: 0; }
  body.ems-app .nav-collapsed .sb .nav-section > summary span, body.ems-app .nav-collapsed .sb .sb-chev { display: none !important; }
  body.ems-app .nav-collapsed .sb .nav > a.on::before { left: -10px; }
  body.ems-app .nav-collapsed .sb .nav > a b { position: absolute; top: 2px; right: 2px; min-width: 16px; height: 16px; font-size: 12px; padding: 0 4px; }
  body.ems-app .nav-collapsed .sb .sb-dot { position: absolute; top: 8px; right: 10px; display: block !important; }
  body.ems-app .nav-collapsed .sb .nav-section:has(a.on) > summary { background: var(--blue-10); }
  body.ems-app .nav-collapsed .sb .nav-section[open] > summary { background: var(--blue); }
  body.ems-app .nav-collapsed .sb .nav-section[open] > summary svg { color: #fff !important; }
  /* the group's links open as a panel beside the rail */
  body.ems-app .nav-collapsed .sb .sb-items { position: fixed; left: 78px; top: var(--fly-top, 120px); z-index: 120; min-width: 200px; margin: 0; padding: 8px;
    border: 1px solid var(--z100); border-radius: 14px; background: #fff; box-shadow: 0 20px 40px -12px rgba(0,0,0,.2); }
  body.ems-app .nav-collapsed .sb .sb-items a { font-size: 13px; justify-content: flex-start; gap: 10px; }
  body.ems-app .nav-collapsed .sb .sb-items a.on::before { display: none; }
  body.ems-app .nav-collapsed .sb .sb-collapse { justify-content: center; padding: 0; }
  body.ems-app .nav-collapsed .sb .sb-collapse span, body.ems-app .nav-collapsed .sb .sb-less { display: none; }
  body.ems-app .nav-collapsed .sb .sb-more { display: block; }
}
/* phones: the drawer always shows names */
@media (max-width: 900px) {
  body.ems-app .sb { width: 280px; }
  body.ems-app .sb .sb-collapse span { font-size: 0; } body.ems-app .sb .sb-collapse span::after { content: "Close"; font-size: 13px; }
  body.ems-app .sb .sb-less { display: block; }
}
@media (prefers-reduced-motion: reduce) { body.ems-app .sb .sb-chev { transition: none; } }

/* colours: deep Clanert blue at rest; Clanert green on hover and for the selected page */
body.ems-app .sb .nav a, body.ems-app .sb .nav-section summary, body.ems-app .sb .nav-section[open] > summary,
body.ems-app .sb .nav-section:has(a.on) > summary { color: var(--blue); transition: color .25s ease, background-color .25s ease; }
body.ems-app .sb .nav svg.lucide:not(.sb-chev), body.ems-app .sb .nav .software-icon,
body.ems-app .sb .nav-section:has(a.on) > summary > svg:first-child { color: var(--blue); fill: currentColor; fill-opacity: .16; transition: color .25s ease, fill-opacity .25s ease; }
body.ems-app .sb .sb-chev { color: var(--blue) !important; }

body.ems-app .sb .nav a:hover, body.ems-app .sb .nav-section summary:hover { background: var(--green-10); color: var(--green-ink); }
body.ems-app .sb .nav a:hover svg, body.ems-app .sb .nav a:hover .software-icon,
body.ems-app .sb .nav-section summary:hover svg, body.ems-app .sb .nav-section summary:hover .software-icon,
body.ems-app .sb .sb-collapse:hover svg { color: var(--green) !important; fill-opacity: .25; }

body.ems-app .sb .nav a.on { background: var(--green-10); color: var(--green-ink); font-weight: 600; }
body.ems-app .sb .nav a.on svg, body.ems-app .sb .nav a.on .software-icon { color: var(--green) !important; fill-opacity: .3; }
body.ems-app .sb .nav a.on::before { background: var(--green); }
body.ems-app .sb .nav-section:has(a.on) > summary > svg:first-child { color: var(--green); fill-opacity: .3; }

body.ems-app .sb .sb-collapse { color: var(--blue); transition: color .25s ease, background-color .25s ease, border-color .25s ease; }
body.ems-app .sb .sb-collapse:hover { border-color: var(--green); color: var(--green-ink); background: var(--green-10); }
@media (min-width: 901px) {
  body.ems-app .nav-collapsed .sb .nav-section:has(a.on) > summary { background: var(--green-10); }
  body.ems-app .nav-collapsed .sb .nav-section[open] > summary { background: var(--blue); }
  body.ems-app .nav-collapsed .sb .nav-section[open] > summary svg { color: #fff !important; }
  body.ems-app .nav-collapsed .sb .nav-section[open] > summary:hover svg { color: var(--green) !important; }
}
/* solid icons stay fully filled */
body.ems-app .sb .nav .software-icon, body.ems-app .sb .nav a:hover .software-icon, body.ems-app .sb .nav-section summary:hover .software-icon,
body.ems-app .sb .nav a.on .software-icon, body.ems-app .sb .nav-section:has(a.on) > summary > .software-icon { fill-opacity: 1 !important; }

/* ---- brand.css ---- */
/* Brand unification - loaded after app.css and workspace.css so every shared component uses the same
   few Clanert tokens. Blue var(--blue) for structure and actions, green var(--green) for highlights and counts,
   cream var(--cream) for soft surfaces, zinc greys for text, red only for real problems. One font. */
.ems-app {
  --ink: var(--z900); --text: var(--z700); --soft: var(--z500); --line: var(--z100);
  --font: "Segoe UI Variable", "Segoe UI", ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, Arial, sans-serif;
  font-family: var(--font); color: var(--ink);
}
.ems-app button, .ems-app input, .ems-app select, .ems-app textarea, .ems-app .btn { font-family: var(--font); }
.ems-app, .ems-app .main { background: var(--cream); }
.ems-app .top { background: #fff; border-top: 3px solid var(--blue); border-bottom: 1px solid var(--line); box-shadow: none; }

/* headings: one style for every page title */
.ems-app .page-title, .ems-app .tw-h1, .ems-app .fm-head h1 { font-size: 28px; line-height: 1.2; font-weight: 600; letter-spacing: -.02em; text-transform: none; color: var(--blue); }
.ems-app .page-title em, .ems-app .tw-h1 span { color: var(--green-ink); font-style: normal; font-weight: 600; }
.ems-app .fm-head h1 span { color: var(--z400); font-weight: 400; }
.ems-app .eyebrow { font-size: 12px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--soft); }
.ems-app .section-title, .ems-app .tw-sec-head h2, .ems-app .fm-h2 { color: var(--ink); }
.ems-app .lead { color: var(--soft); font-size: 13px; max-width: 60ch; }

/* buttons: blue, green on hover */
.ems-app .btn-primary, .ems-app .tw-btn, .ems-app .fm-btn.primary { background: var(--blue); border-color: var(--blue); color: #fff; }
.ems-app .btn-primary:hover, .ems-app .tw-btn:hover, .ems-app .fm-btn.primary:hover { background: var(--green); border-color: var(--green); color: #000; }
.ems-app .btn-primary:active { background: var(--green); }
.ems-app .btn { color: var(--ink); }
.ems-app .btn:hover { border-color: var(--blue); color: var(--blue); }
.ems-app a { color: var(--blue); } .ems-app a:hover { color: var(--green-ink); }
.ems-app .btn-primary:hover, .ems-app .tw-btn:hover { color: #000; }

/* surfaces */
.ems-app .card { background: #fff; border: 1px solid var(--line); border-radius: 16px; box-shadow: 0 1px 2px rgba(0,0,0,.03); }
.ems-app .t th { background: var(--z50); color: var(--soft); }
.ems-app .work-intro { background: #fff; border-color: var(--line); }
.ems-app .row-bad td { background: var(--red-10); }

/* status: green ok, blue info, cream warning, red problem */
.ems-app .badge.ok { background: var(--green-10); color: var(--green-ink); }
.ems-app .badge.info { background: var(--blue-10); color: var(--blue); }
.ems-app .badge.warn { background: var(--cream); color: var(--z700); box-shadow: inset 0 0 0 1px var(--amber-10); }
.ems-app .badge.bad { background: var(--red); color: #fff; }
.ems-app .badge.muted { background: var(--z100); color: var(--soft); }
.ems-app .hbar-fill.amber { background: var(--blue); }
.ems-app .work-list .work-mark.urgent { background: var(--red); }

/* messages and alerts */
.ems-app .flash li { border: 1px solid var(--line); background: #fff; box-shadow: none; }
.ems-app .flash .success { border-color: var(--green-20); background: #fff; }
.ems-app .flash .error, .ems-app .flash .warning { border-color: var(--red-20); background: var(--red-10); }
.ems-app .feedback-toast { border: 1px solid var(--line); background: #fff; color: var(--ink); }
.ems-app .feedback-toast.critical { border-color: var(--red-20); background: var(--gray-10); }
.ems-app .feedback-toast a { color: var(--blue); }

/* dashboard module icons keep their own colours (workspace.css) */

/* file-type badges used outside the Files page */
.ems-app .fileicon.word { background: var(--blue); } .ems-app .fileicon.excel { background: var(--green-ink); }
.ems-app .fileicon.powerpoint { background: #d9cfae; color: var(--blue); } .ems-app .fileicon.pdf { background: var(--z900); }

/* file types: conventional colours */
.ems-app .fileicon.word { background: #2f8fd8; } .ems-app .fileicon.excel { background: #1fa463; }
.ems-app .fileicon.powerpoint { background: #e8743b; color: #fff; } .ems-app .fileicon.pdf { background: #e04f44; }

/* dashboard work areas: title only, larger icons; the white square-cornered card stays as it was */
.ems-app .module-card small { display: none; }
.ems-app .module-icon, .ems-app .module-card:hover .module-icon { width: 76px; height: 76px; margin-bottom: 8px; }
.ems-app .module-icon svg, .ems-app .module-icon .software-icon { width: 64px; height: 64px; }

/* buttons: white text on blue, hover deepens the blue (no black text or icons on buttons) */
.ems-app { --blue-dark: var(--blue-70); }
.ems-app .btn-primary, .ems-app a.btn-primary, .ems-app .tw-btn, .ems-app a.tw-btn, .ems-app .fm-btn.primary, .ems-app .gm-btn { background: var(--blue); border-color: var(--blue); color: #fff; }
.ems-app .btn-primary:hover, .ems-app a.btn-primary:hover, .ems-app .tw-btn:hover, .ems-app a.tw-btn:hover, .ems-app .fm-btn.primary:hover, .ems-app .gm-btn:hover,
.ems-app .btn-primary:active { background: var(--blue-dark); border-color: var(--blue-dark); color: #fff; }
.ems-app .tw-btn.green, .ems-app a.tw-btn.green, .ems-app .fm-btn.green { background: var(--blue); border-color: var(--blue); color: #fff; }
.ems-app .tw-btn.green:hover, .ems-app .fm-btn.green:hover { background: var(--blue-dark); color: #fff; }
.ems-app .tw-round:hover, .ems-app .tw-icon-btn:hover, .ems-app .tw-icon-btn.dark, .ems-app .fm-round:hover { background: var(--blue); border-color: var(--blue); color: #fff; }
.ems-app .tw-icon-btn.dark:hover { background: var(--blue-dark); }
.ems-app .tw-round.light:hover, .ems-app .sb-collapse:hover { color: var(--blue); }
.ems-app .btn-primary svg, .ems-app .tw-btn svg, .ems-app .fm-btn.primary svg, .ems-app .gm-btn svg { color: #fff; }
/* count badges: white on dark green */
.ems-app .sb .nav a b, .ems-app .tw-badge, .ems-app .nav > a b { background: var(--green-ink); color: #fff; }
/* smooth everywhere */
.ems-app .btn, .ems-app a, .ems-app button, .ems-app .card, .ems-app .module-card { transition: background-color .25s ease, color .25s ease, border-color .25s ease, box-shadow .25s ease, transform .25s ease; }

/* compliance calendar month view */
.ems-app .cal { padding: 16px; }
.ems-app .cal-head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 12px; }
.ems-app .cal-head h2 { min-width: 150px; text-align: center; font-size: 18px; font-weight: 600; color: var(--blue); }
.ems-app .cal-head .btn svg { width: 16px; height: 16px; }
.ems-app .cal-key { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; font-size: 12px; color: var(--z500); }
.ems-app .cal-key i { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: -4px; }
.ems-app .cal-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); border-top: 1px solid var(--z100); border-left: 1px solid var(--z100); }
.ems-app .cal-dow { padding: 8px; font-size: 12px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--z400); border-right: 1px solid var(--z100); border-bottom: 1px solid var(--z100); background: var(--z50); }
.ems-app .cal-day { min-height: 104px; padding: 6px; display: flex; flex-direction: column; gap: 3px; border-right: 1px solid var(--z100); border-bottom: 1px solid var(--z100); background: #fff; min-width: 0; }
.ems-app .cal-day.out { background: var(--z50); } .ems-app .cal-day.out .cal-num { color: var(--z300); }
.ems-app .cal-num { font-size: 12px; font-weight: 600; color: var(--z700); width: 24px; height: 24px; display: grid; place-items: center; border-radius: 50%; }
.ems-app .cal-day.today .cal-num { background: var(--blue); color: #fff; }
.ems-app .cal-ev { display: block; padding: 2px 6px; border-radius: 5px; font-size: 12px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: #fff; }
.ems-app .cal-ev:hover { color: #fff; filter: brightness(1.08); }
.ems-app .t-task { background: var(--blue); } .ems-app .t-permit { background: #8e5bd6; } .ems-app .t-cert { background: #2bb7cf; }
.ems-app .t-audit { background: #f5a24b; } .ems-app .t-done { background: var(--z300); } .ems-app .t-late, .ems-app .cal-ev.late { background: #e04f44; }
.ems-app .cal-more { font-size: 12px; color: var(--z500); padding-left: 4px; }
@media (max-width: 700px) {
  .ems-app .cal { padding: 10px; } .ems-app .cal-day { min-height: 70px; padding: 3px; } .ems-app .cal-dow { padding: 6px 2px; text-align: center; font-size: 12px; }
  .ems-app .cal-ev { font-size: 0; padding: 0; height: 6px; } .ems-app .cal-key { display: none; }
}

/* emissions: satellite baseline */
.sat-base .section-title { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.sat-actions { margin-left: auto; display: inline-flex; align-items: center; gap: 12px; }
.sat-actions form { margin: 0; }
.sat-site { display: flex; align-items: baseline; gap: 10px; padding: 14px 20px 6px; border-top: 1px solid var(--z100); color: var(--blue); }
.sat-site:first-of-type { border-top: 0; }
.sat-site .muted { font-size: 12px; }
.sat-src { display: block; font-size: 12px; color: var(--z500); font-weight: 400; }
.sat-spark { width: 120px; height: 28px; display: block; }
.sat-spark polyline { fill: none; stroke: var(--blue); stroke-width: 1.6; vector-effect: non-scaling-stroke; }
.sat-notes { list-style: none; margin: 0; padding: 8px 20px 12px; display: grid; gap: 6px; }
.sat-notes li { display: flex; gap: 8px; align-items: flex-start; font-size: 12.5px; color: var(--z700); }
.sat-notes svg { width: 15px; height: 15px; flex: none; margin-top: 1px; color: var(--blue); }
.sat-compare th, .sat-compare td { font-size: 12.5px; }

/* look settings */
.brand-grid { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, .9fr); gap: 16px; align-items: start; }
.brand-logo-row { display: flex; gap: 16px; align-items: center; flex-wrap: wrap; margin-bottom: 14px; }
.brand-logo-box { width: 200px; height: 76px; display: grid; place-items: center; padding: 10px; border: 1px dashed var(--z300); border-radius: 12px; background: #fff; }
.brand-logo-box img { max-width: 100%; max-height: 100%; object-fit: contain; }
.brand-logo-ctl { display: grid; gap: 6px; justify-items: start; }
.brand-logo-ctl label.btn { cursor: pointer; display: inline-flex; gap: 6px; align-items: center; }
.brand-logo-ctl label.btn svg { width: 15px; height: 15px; color: #fff; }
.brand-colours { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin-bottom: 8px; }
.brand-colour { display: grid; gap: 6px; }
.brand-colour label { font-size: 12.5px; font-weight: 600; color: var(--z700); }
.brand-swatch { display: flex; align-items: center; gap: 8px; padding: 6px; border: 1px solid var(--z200); border-radius: 10px; background: #fff; }
.brand-swatch input[type=color] { width: 38px; height: 32px; padding: 0; border: 0; border-radius: 8px; background: none; cursor: pointer; }
.brand-swatch code { font-size: 12.5px; color: var(--z700); }
.brand-form .err, .bp-note.err { color: var(--red-ink); font-size: 12px; }
.bp { display: grid; grid-template-columns: 130px 1fr; min-height: 220px; border: 1px solid var(--z200); border-radius: 12px; overflow: hidden; background: var(--bg); }
.bp-side { display: grid; align-content: start; gap: 4px; padding: 10px 8px; background: #fff; border-right: 1px solid var(--z100); }
.bp-logo { height: 30px; display: flex; align-items: center; margin: 0 4px 6px; } .bp-logo img { max-height: 26px; max-width: 110px; object-fit: contain; }
.bp-nav { display: flex; align-items: center; gap: 6px; padding: 6px 8px; border-radius: 8px; font-size: 12px; color: var(--p); }
.bp-nav svg { width: 14px; height: 14px; color: var(--p); }
.bp-nav.on { background: color-mix(in srgb, var(--a) 16%, transparent); font-weight: 700; }
.bp-nav.on svg, .bp-nav.hov svg { color: var(--a); }
.bp-main { padding: 14px; display: grid; gap: 8px; align-content: start; }
.bp-eyebrow { font-size: 12px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--z500); }
.bp-title { margin: 0; font-size: 17px; color: var(--p); font-weight: 600; } .bp-title em { font-style: normal; color: var(--a); }
.bp-card { display: flex; align-items: baseline; gap: 8px; padding: 10px 12px; border-radius: 10px; background: #fff; font-size: 12px; color: var(--z500); }
.bp-card b { font-size: 18px; color: var(--p); } .bp-chip { margin-left: auto; font-style: normal; padding: 2px 8px; border-radius: 999px; background: var(--a); color: #fff; font-size: 12px; font-weight: 700; }
.bp-row { display: flex; align-items: center; gap: 12px; }
.bp-btn { padding: 7px 14px; border-radius: 8px; background: var(--p); color: #fff; font-size: 12px; font-weight: 600; }
.bp-link { font-size: 12px; font-weight: 600; color: var(--p); text-decoration: underline; text-decoration-color: var(--a); }
.bp-note { margin: 10px 0 0; font-size: 12px; }

/* admin console */
.adm-kpi { text-decoration: none; transition: box-shadow .25s ease, transform .25s ease; } .adm-kpi:hover { box-shadow: 0 8px 20px -10px var(--blue-20); }
.adm-run { display: flex; align-items: center; gap: 8px; font-size: 16px; }
.adm-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 16px; margin: 16px 0; }
.adm-look-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 8px; }
.adm-logo { height: 54px; display: flex; align-items: center; } .adm-logo img { max-height: 48px; max-width: 200px; object-fit: contain; }
.adm-swatches { display: flex; gap: 6px; } .adm-swatches i { width: 30px; height: 30px; border-radius: 8px; box-shadow: inset 0 0 0 1px rgba(0,0,0,.1); }
.adm-nav { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; }
.adm-nav a { display: flex; align-items: center; gap: 8px; padding: 8px 10px; border-radius: 8px; font-size: 13px; font-weight: 500; color: var(--blue); text-decoration: none; transition: background .2s ease, color .2s ease; }
.adm-nav a:hover { background: var(--green-10); color: var(--green-ink); } .adm-nav svg { width: 16px; height: 16px; color: var(--blue); } .adm-nav a:hover svg { color: var(--green); }
.adm-modules { margin-bottom: 16px; }
.adm-modules .section-title { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; } .adm-modules .section-title .btn { margin-left: auto; }
.adm-mod-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 14px; }
.adm-mod-grid fieldset { margin: 0; padding: 0; border: 0; display: grid; gap: 4px; align-content: start; }
.adm-mod-grid legend { margin-bottom: 4px; font-size: 12px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--z500); }
.adm-switch, .adm-toggle { display: inline-flex; align-items: center; gap: 9px; font-size: 13px; color: var(--z700); cursor: pointer; }
.adm-switch input { position: absolute; opacity: 0; pointer-events: none; }
.adm-track { position: relative; width: 30px; height: 17px; flex: none; border-radius: 999px; background: var(--z300); transition: background .25s ease; }
.adm-track::after { content: ""; position: absolute; top: 2px; left: 2px; width: 13px; height: 13px; border-radius: 50%; background: #fff; box-shadow: 0 1px 2px rgba(0,0,0,.2); transition: transform .25s var(--ease); }
.adm-switch input:checked + .adm-track, .adm-toggle.on .adm-track { background: var(--green); }
.adm-switch input:checked + .adm-track::after, .adm-toggle.on .adm-track::after { transform: translateX(13px); }
.adm-switch input:focus-visible + .adm-track { outline: 2px solid var(--blue); outline-offset: 2px; }
.adm-toggle { border: 0; background: none; padding: 4px 0; font: inherit; font-size: 13px; }
.adm-toggle form, td form { margin: 0; }
@media (max-width: 900px) { .brand-grid, .adm-grid { grid-template-columns: 1fr; } .brand-colours { grid-template-columns: 1fr; } .adm-nav { grid-template-columns: 1fr; } }

/* custom logos keep their shape in the sidebar */
body.ems-app .sb .side-head img { max-width: 180px; object-fit: contain; object-position: left center; }

/* alert pop-up: compact, one at a time, fades away */
.feedback-toast-stack { top: auto !important; bottom: 20px; right: 20px; width: min(320px, calc(100vw - 32px)) !important; }
.ems-app .feedback-toast { padding: 12px 40px 12px 14px; border-radius: 12px; box-shadow: 0 12px 28px -12px rgba(0,0,0,.3); transition: opacity .25s ease, transform .25s ease; }
.ems-app .feedback-toast strong { display: block; font-size: 13px; color: var(--z900); }
.ems-app .feedback-toast p { margin: 4px 0 6px; font-size: 12px; color: var(--z600); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.ems-app .feedback-toast a { font-size: 12px; font-weight: 600; text-decoration: none; }
.ems-app .feedback-toast button { width: 32px; height: 32px; font-size: 18px; }
.ems-app .feedback-toast.leaving { opacity: 0; transform: translateY(8px); }
.shell:has(.gm) ~ .feedback-toast-stack, body:has(.gm) .feedback-toast-stack { bottom: 76px; }
.adm-db { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.adm-db b.good { color: var(--green-ink); } .adm-db .muted { font-size: 12px; }
.adm-note { margin: 0; font-size: 12.5px; }
.page-head .actions form { margin: 0; display: inline-flex; }
.page-head .actions .btn svg { width: 16px; height: 16px; color: inherit; }
@media (max-width: 700px) { .adm-db { grid-template-columns: 1fr; } }

/* ISO context, risk matrix, management review */
.ctx-top { margin-bottom: 16px; }
.ro-matrix div { position: relative; gap: 2px; }
.ro-matrix b { font-size: 13px; }
.ro-opp { position: absolute; right: 4px; bottom: 3px; min-width: 16px; height: 16px; padding: 0 4px; border-radius: 999px; display: inline-grid; place-items: center; font-style: normal; font-size: 12px; font-weight: 700; background: var(--green); color: #fff; }
.ro-key { display: flex; gap: 16px; margin-top: 10px; font-size: 12px; color: var(--z500); }
.ro-key .ro-opp { position: static; } .ro-key .k-r { font-size: 12px; color: var(--z700); }
.ro-sources { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.ro-sources li, .ro-sources a { display: flex; align-items: center; gap: 8px; padding: 8px 10px; border-radius: 8px; font-size: 13px; color: var(--blue); text-decoration: none; }
.ro-sources a:hover { background: var(--green-10); color: var(--green-ink); } .ro-sources svg { width: 16px; height: 16px; color: var(--blue); }
.mr-head { margin: -6px 0 12px; font-size: 12.5px; }
.mr-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 16px; }
.mr-sec .section-title { font-size: 14px; }
.mr-note { margin: -4px 0 8px; font-size: 12px; }
.mr-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }
.mr-list li { display: flex; justify-content: space-between; gap: 12px; padding: 6px 0; border-bottom: 1px solid var(--z100); font-size: 13px; color: var(--z700); }
.mr-list li:last-child { border-bottom: 0; } .mr-list b { color: var(--z900); white-space: nowrap; }
.mr-sub { margin: 12px 0 2px; font-size: 12px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; color: var(--z500); }
.mr-out { display: grid; grid-template-columns: minmax(140px, 200px) 1fr; gap: 10px 16px; margin: 0; font-size: 13px; }
.mr-out dt { color: var(--z500); } .mr-out dd { margin: 0; color: var(--z900); }
@media (max-width: 700px) { .mr-out { grid-template-columns: 1fr; } }
@media print { .sb, .top, .page-head .actions, .feedback-toast-stack { display: none !important; } .mr-grid { grid-template-columns: 1fr 1fr; } }
.ems-app .workspace-tabs a:not([aria-current]) { color: var(--z600); } .ems-app .workspace-tabs a:not([aria-current]):hover { color: var(--green-ink); }
.ems-app .workspace-tabs a svg { color: currentColor; }

/* spreadsheet import */
.imp-track { list-style: none; display: flex; gap: 8px; margin: 0 0 16px; padding: 0; flex-wrap: wrap; }
.imp-track li { display: flex; align-items: center; gap: 8px; padding: 8px 14px; border-radius: 999px; background: #fff; border: 1px solid var(--z100); font-size: 13px; font-weight: 600; color: var(--z500); transition: background .25s ease, color .25s ease; }
.imp-track li span { width: 22px; height: 22px; display: grid; place-items: center; border-radius: 50%; background: var(--z100); font-size: 12px; }
.imp-track li.on { background: var(--blue); border-color: var(--blue); color: #fff; } .imp-track li.on span { background: #fff; color: var(--blue); }
.imp-track li.done { color: var(--green-ink); } .imp-track li.done span { background: var(--green); color: #fff; }
.imp-zone { display: grid; justify-items: center; gap: 8px; padding: 40px 20px; border: 2px dashed var(--z200); border-radius: 16px; text-align: center; cursor: pointer; transition: border-color .25s ease, background .25s ease; }
.imp-zone:hover, .imp-zone.over { border-color: var(--green); background: var(--green-10); }
.imp-zone svg { width: 40px; height: 40px; color: var(--blue); } .imp-zone b { font-size: 16px; color: var(--blue); } .imp-zone small { color: var(--z500); }
.imp-cols { display: flex; flex-wrap: wrap; gap: 6px; } .imp-cols .chip.req { border-color: var(--blue); color: var(--blue); font-weight: 600; }
.imp-change { margin-left: auto; font-size: 12.5px; font-weight: 600; }
.imp-map .section-title { display: flex; align-items: baseline; gap: 6px; flex-wrap: wrap; }
.imp-opts { display: flex; align-items: end; gap: 12px; flex-wrap: wrap; margin-bottom: 12px; }
.imp-opts label { display: grid; gap: 4px; font-size: 12px; font-weight: 600; color: var(--z500); }
.imp-opts select, .imp-opts input { height: 34px; padding: 0 8px; border: 1px solid var(--z200); border-radius: 8px; font: inherit; font-size: 13px; }
.imp-opts input { width: 80px; }
.imp-table select { width: 100%; min-width: 180px; height: 34px; border: 1px solid var(--z200); border-radius: 8px; padding: 0 8px; font: inherit; font-size: 13px; background: #fff; }
.imp-table tr.is-mapped select { border-color: var(--green); background: var(--green-10); }
.imp-alert { display: flex; align-items: center; gap: 8px; margin: 12px 0 0; padding: 10px 12px; border-radius: 10px; background: var(--red-10); color: var(--red-ink); font-size: 13px; font-weight: 600; }
.imp-alert svg { width: 16px; height: 16px; }
.imp-fixes { margin-top: 16px; } .imp-fixes fieldset { border: 0; margin: 0 0 12px; padding: 0; display: grid; gap: 6px; }
.imp-fixes legend { font-size: 12px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; color: var(--z500); margin-bottom: 4px; }
.imp-fixes label { display: grid; grid-template-columns: minmax(120px, 1fr) minmax(180px, 1.4fr); gap: 10px; align-items: center; font-size: 13px; }
.imp-fixes label span { padding: 6px 10px; border-radius: 8px; background: var(--z50); color: var(--z900); font-weight: 600; overflow-wrap: anywhere; }
.imp-fixes select { height: 34px; border: 1px solid var(--z200); border-radius: 8px; padding: 0 8px; font: inherit; font-size: 13px; }
.imp-bar { position: sticky; bottom: 0; z-index: 5; display: flex; align-items: center; justify-content: flex-end; gap: 10px; flex-wrap: wrap; margin: 16px 0; padding: 12px 16px; border-radius: 14px; background: rgba(255,255,255,.96); box-shadow: 0 10px 30px -12px rgba(0,0,0,.2); }
.imp-dupes { margin-right: auto; display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--z600); }
.imp-bar .btn svg { width: 16px; height: 16px; color: inherit; }
.good-t { color: var(--green-ink); } .bad-t { color: var(--red-ink); font-size: 12.5px; }
@media (max-width: 700px) { .imp-fixes label { grid-template-columns: 1fr; } }

/* policy creator */
.pg-grid { display: grid; grid-template-columns: minmax(260px, 340px) minmax(0, 1fr); gap: 16px; align-items: start; }
.pg-side { position: sticky; top: 84px; display: grid; gap: 10px; max-height: calc(100vh - 100px); overflow: auto; }
.pg-field { display: grid; gap: 4px; font-size: 12px; font-weight: 600; color: var(--z600); }
.pg-field input, .pg-field select { height: 36px; padding: 0 10px; border: 1px solid var(--z200); border-radius: 8px; font: inherit; font-size: 13px; color: var(--z900); background: #fff; }
.pg-two { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.pg-seg { display: grid; grid-template-columns: 1fr 1fr; padding: 3px; border-radius: 10px; background: var(--z100); }
.pg-seg input { position: absolute; opacity: 0; }
.pg-seg span { display: block; padding: 7px; border-radius: 8px; text-align: center; font-size: 13px; font-weight: 600; color: var(--z600); cursor: pointer; transition: background .2s ease, color .2s ease; }
.pg-seg input:checked + span { background: var(--blue); color: #fff; }
.pg-h { margin-top: 6px; font-size: 12px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--z500); }
.pg-fixed { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; font-size: 12.5px; color: var(--z700); }
.pg-fixed li::before { content: "\2713  "; color: var(--green-ink); font-weight: 700; }
.pg-check { display: flex; gap: 8px; align-items: flex-start; font-size: 13px; color: var(--z700); cursor: pointer; line-height: 1.35; }
.pg-check input { accent-color: var(--blue); margin-top: 2px; }
.pg-side .btn svg { width: 15px; height: 15px; }
.pg-main { display: grid; gap: 16px; min-width: 0; }
.pg-checks ul { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 6px 14px; }
.pg-checks li { display: flex; gap: 8px; align-items: center; font-size: 13px; color: var(--z700); }
.pg-checks li.no { color: var(--red-ink); }
.pg-note { display: flex; gap: 8px; align-items: center; margin: 10px 0 0; font-size: 12.5px; color: var(--z600); }
.pg-note svg { width: 16px; height: 16px; color: var(--blue); }
.pg-paper { position: relative; padding: 34px 38px 30px; border-radius: 6px; background: #fff; border: 1px solid var(--z100); box-shadow: 0 25px 50px -25px rgba(0,0,0,.25); overflow: hidden; }
.pg-paper::before { content: ""; position: absolute; inset: 0 0 auto 0; height: 8px; background: linear-gradient(90deg, var(--blue) 70%, var(--green) 70%); }
.pp-head { display: flex; align-items: center; gap: 12px; padding-bottom: 12px; border-bottom: 1px solid var(--z100); }
.pp-head img { max-height: 36px; max-width: 140px; object-fit: contain; }
.pp-head b { display: block; font-size: 14px; } .pp-head small { color: var(--z500); font-size: 12px; }
.pg-paper h2 { margin: 18px 0 8px; font-size: 24px; color: var(--blue); }
.pg-paper p { font-size: 13.5px; line-height: 1.65; color: var(--z700); }
.pp-purpose, .pp-will { font-weight: 700; color: var(--blue) !important; }
.pp-will { margin-bottom: 6px; }
.pp-list { list-style: none; margin: 0 0 12px; padding: 0; display: grid; gap: 8px; }
.pp-list li { position: relative; padding-left: 26px; font-size: 13.5px; line-height: 1.5; color: var(--z900); }
.pp-list li::before { content: ""; position: absolute; left: 0; top: 3px; width: 14px; height: 14px; border-radius: 50%; border: 4px solid var(--green); background: #fff; box-sizing: border-box; }
.pp-sign { display: flex; gap: 40px; margin-top: 22px; flex-wrap: wrap; }
.pp-sign div { min-width: 170px; padding-top: 6px; border-top: 1px solid var(--z900); font-size: 13px; }
.pp-sign small { display: block; color: var(--z500); font-size: 12px; }
.pol-links { display: flex; gap: 14px; flex-wrap: wrap; margin-top: 12px; }
.pol-links a { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 600; }
.pol-links svg { width: 15px; height: 15px; }
.pol-more { display: grid; gap: 8px; margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--z100); }
.pol-chip { display: grid; grid-template-columns: auto 1fr auto; gap: 10px; align-items: center; padding: 10px 12px; border-radius: 10px; background: var(--z50); color: var(--blue); font-size: 13px; font-weight: 600; text-decoration: none; transition: background .2s ease; }
.pol-chip:hover { background: var(--green-10); }
.pol-chip small { color: var(--z500); font-weight: 500; } .pol-chip svg { width: 16px; height: 16px; }
.pol-chip.draft { color: var(--z600); }
@media (max-width: 900px) { .pg-grid { grid-template-columns: 1fr; } .pg-side { position: static; max-height: none; } .pg-paper { padding: 26px 20px; } }

/* setup guide */
.sg-progress { max-width: 420px; margin: -8px 0 16px; }
.sg-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 16px; }
.sg-steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.sg-steps li { display: grid; grid-template-columns: auto 1fr auto; gap: 10px; align-items: center; padding: 10px 4px; border-bottom: 1px solid var(--z100); }
.sg-steps li:last-child { border-bottom: 0; }
.sg-text b { display: block; font-size: 13.5px; color: var(--z900); } .sg-text small { font-size: 12px; color: var(--z500); }
.sg-steps li.done .sg-text b { color: var(--z500); text-decoration: line-through; text-decoration-color: var(--green); }
.sg-act { display: flex; gap: 6px; } .sg-open { font-size: 12.5px; font-weight: 600; }
@media (max-width: 900px) { .pg-grid { grid-template-columns: minmax(0, 1fr); } }
.pg-side, .pg-main, .pg-field, .pg-seg { min-width: 0; } .pg-field input, .pg-field select { width: 100%; min-width: 0; }
.sg-grid { grid-template-columns: repeat(auto-fit, minmax(min(300px, 100%), 1fr)); }

/* regulator reports */
.rg-due { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 12px; margin-bottom: 16px; }
.rg-cycle { display: grid; gap: 2px; text-decoration: none; transition: box-shadow .25s ease; }
.rg-cycle:hover { box-shadow: 0 10px 24px -14px var(--blue-20); } .rg-cycle.late { border-color: var(--red-20); background: var(--gray-10); }
.rg-cycle small { font-size: 12px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; color: var(--z500); }
.rg-cycle b { color: var(--blue); font-size: 14px; } .rg-cycle span { font-size: 13px; color: var(--z900); font-weight: 600; } .rg-cycle.late span { color: var(--red-ink); }
.rg-cycle em { font-style: normal; font-size: 12px; color: var(--z500); }
.rg-top { align-items: start; } .rg-new { display: grid; gap: 10px; } .rg-new .btn svg { width: 16px; height: 16px; color: #fff; }
.rg-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(260px, 330px); gap: 16px; align-items: start; }
.rg-main { display: grid; gap: 14px; min-width: 0; }
.rg-side { position: sticky; top: 84px; display: grid; gap: 14px; }
.rg-anchor { display: grid; gap: 4px; } .rg-anchor small { color: var(--z500); font-size: 12px; } .rg-anchor b { font-size: 13px; color: var(--z900); font-weight: 600; }
.rg-sec .section-title { gap: 8px; }
.rg-items { list-style: none; margin: -2px 0 10px; padding: 0; display: flex; flex-wrap: wrap; gap: 4px; }
.rg-items li { padding: 2px 8px; border-radius: 999px; background: var(--blue-10); color: var(--blue); font-size: 12px; font-weight: 600; }
.rg-block { margin-bottom: 12px; } .rg-bl { display: flex; justify-content: space-between; font-size: 12px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: var(--z500); margin-bottom: 4px; }
.rg-bl a { text-transform: none; letter-spacing: 0; }
.rg-t { font-size: 12.5px; } .rg-t td, .rg-t th { white-space: nowrap; } .rg-empty { margin: 4px 0; font-size: 13px; color: var(--amber-70); }
.rg-kpis { display: flex; gap: 22px; margin-bottom: 8px; } .rg-kpis small { display: block; font-size: 12px; color: var(--z500); } .rg-kpis b { font-size: 18px; color: var(--blue); }
.rg-sec textarea { width: 100%; min-height: 96px; padding: 10px 12px; border: 1px solid var(--z200); border-radius: 10px; font: inherit; font-size: 13.5px; line-height: 1.5; resize: vertical; }
.rg-sec textarea:focus { outline: 2px solid var(--blue-10); border-color: var(--blue); }
.rg-team input, .rg-team select { width: 100%; min-width: 110px; height: 32px; padding: 0 8px; border: 1px solid var(--z200); border-radius: 8px; font: inherit; font-size: 13px; }
.rg-team input[type=checkbox] { width: auto; min-width: 0; height: auto; accent-color: var(--blue); }
.rg-sig { grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); margin-top: 12px; }
.rg-auto { margin-right: auto; font-size: 12.5px; }
.rg-checks { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; max-height: 46vh; overflow: auto; }
.rg-checks li { display: flex; gap: 8px; align-items: flex-start; font-size: 12.5px; line-height: 1.35; } .rg-checks li.no a { color: var(--red-ink); font-weight: 600; }
.rg-state { display: grid; gap: 8px; } .rg-dl { margin: 0; font-size: 12px; } .rg-next { margin: 0; font-size: 13px; }
.rg-hash { margin: 0; font-size: 12px; color: var(--z500); } .rg-outcome { display: grid; gap: 6px; }
.rg-outcome select, .rg-outcome input { height: 34px; padding: 0 8px; border: 1px solid var(--z200); border-radius: 8px; font: inherit; font-size: 13px; }
.rg-state .btn svg { width: 15px; height: 15px; }
@media (max-width: 1000px) { .rg-grid { grid-template-columns: minmax(0, 1fr); } .rg-side { position: static; } }
.rg-none { color: var(--green-ink) !important; font-style: normal !important; }
.rg-confirm { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; color: var(--z600); cursor: pointer; }
.rg-confirm input { accent-color: var(--blue); }

/* ISO 14001:2026 readiness */
.r26 { margin-bottom: 16px; } .r26 summary { cursor: pointer; list-style: none; gap: 8px; flex-wrap: wrap; } .r26 summary::-webkit-details-marker { display: none; }
.r26-list { list-style: none; margin: 10px 0 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(min(300px, 100%), 1fr)); gap: 6px 16px; }
.r26-list li { display: flex; gap: 8px; align-items: center; font-size: 13px; color: var(--z700); } .r26-list li.no a { color: var(--red-ink); font-weight: 600; }

/* Consultant: which client am I in (shown to anyone in more than one organisation) */
.client-strip { display: flex; align-items: center; gap: 10px; margin: 0 0 14px; padding: 8px 14px; border-radius: 10px; background: var(--blue, var(--blue)); color: #fff; font-size: 13px; }
.client-strip span { text-transform: uppercase; letter-spacing: .1em; font-size: 12px; opacity: .75; }
.client-strip b { font-size: 14px; }
.client-strip a { margin-left: auto; color: #fff; font-weight: 700; text-decoration: none; border: 1px solid rgba(255,255,255,.35); border-radius: 999px; padding: 4px 12px; }
.client-strip a:hover { background: var(--green, var(--green)); color: var(--gray-100); border-color: transparent; }

/* ---- shell.css ---- */
/* Shell 2026 - one dark Clanert-navy frame (menu + top bar) around a light work area.
   Loaded after brand.css. Colours come from the brand variables, so an organisation's own "Look" still applies.
   Rules: nothing floats over the work area by default - the guide docks on the right, alerts sit bottom-left. */
body.ems-app {
  --chrome: var(--blue-70); --chrome-hi: rgba(255,255,255,.12); --chrome-hover: rgba(255,255,255,.07);
  --chrome-line: rgba(255,255,255,.10); --chrome-ink: rgba(255,255,255,.88); --chrome-dim: rgba(255,255,255,.60);
  --dock-w: 320px; --top-h: 60px;
}
@supports (color: color-mix(in srgb, red, blue)) {
  body.ems-app { --chrome: color-mix(in srgb, var(--brand-blue, var(--blue)) 70%, var(--gray-100)); }
}

/* ---------------------------------------------------------------- menu */
body.ems-app .sb { background: var(--chrome); border-right: 0; color: var(--chrome-ink); }
body.ems-app .sb .side-head { background: transparent; padding: 15px 18px 13px; }
body.ems-app .sb .side-head .sb-logo img { filter: brightness(0) invert(1); }
body.ems-app .sb .side-head .sb-logo-custom { display: inline-block; padding: 5px 9px; border-radius: 9px; background: #fff; }
body.ems-app .sb .side-head .sb-logo-custom img { filter: none; display: block; }
body.ems-app .sb .nav { scrollbar-width: thin; scrollbar-color: rgba(255,255,255,.25) transparent; }

body.ems-app .sb .nav a, body.ems-app .sb .nav-section summary, body.ems-app .sb .nav-section[open] > summary,
body.ems-app .sb .nav-section:has(a.on) > summary { color: var(--chrome-ink); }
body.ems-app .sb .nav svg.lucide:not(.sb-chev), body.ems-app .sb .nav .software-icon,
body.ems-app .sb .nav-section:has(a.on) > summary > svg:first-child { color: var(--chrome-dim); fill-opacity: 0; }
body.ems-app .sb .sb-chev { color: var(--chrome-dim) !important; }
body.ems-app .sb .nav-section[open] .sb-chev { color: #fff !important; }

body.ems-app .sb .nav a:hover, body.ems-app .sb .nav-section summary:hover { background: var(--chrome-hover); color: #fff; }
body.ems-app .sb .nav a:hover svg, body.ems-app .sb .nav a:hover .software-icon,
body.ems-app .sb .nav-section summary:hover svg, body.ems-app .sb .nav-section summary:hover .software-icon { color: var(--green) !important; fill-opacity: 0; }

body.ems-app .sb .nav a.on { background: var(--chrome-hi); color: #fff; font-weight: 600; }
body.ems-app .sb .nav a.on svg, body.ems-app .sb .nav a.on .software-icon { color: var(--green) !important; fill-opacity: 0; }
body.ems-app .sb .nav a.on::before { background: var(--green); }
body.ems-app .sb .nav-section:has(a.on) > summary { color: #fff; font-weight: 600; }
body.ems-app .sb .nav-section:has(a.on) > summary > svg:first-child { color: var(--green); fill-opacity: 0; }
body.ems-app .sb .nav a b { background: var(--green); color: var(--blue-80); }
body.ems-app .sb .sb-items { border-left-color: var(--chrome-line); }
body.ems-app .sb .nav a:focus-visible, body.ems-app .sb .nav-section summary:focus-visible,
body.ems-app .sb .sb-collapse:focus-visible { outline: 2px solid var(--green); outline-offset: 1px; }

body.ems-app .sb .side-footer { border-top-color: var(--chrome-line); }
body.ems-app .sb .sb-collapse { background: transparent; border-color: var(--chrome-line); color: var(--chrome-ink); }
body.ems-app .sb .sb-collapse:hover { background: var(--chrome-hover); border-color: var(--green); color: #fff; }
body.ems-app .sb .nav-close { background: transparent; border-color: var(--chrome-line); color: #fff; }

@media (min-width: 901px) {
  body.ems-app .nav-collapsed .sb .nav-section:has(a.on) > summary { background: var(--chrome-hi); }
  body.ems-app .nav-collapsed .sb .nav-section[open] > summary { background: var(--green); }
  body.ems-app .nav-collapsed .sb .nav-section[open] > summary svg { color: var(--blue-80) !important; }
  /* the fly-out beside the icon rail is a light card: dark text again */
  body.ems-app .nav-collapsed .sb .sb-items { border: 1px solid var(--z100); }
  body.ems-app .nav-collapsed .sb .sb-items a { color: var(--blue); }
  body.ems-app .nav-collapsed .sb .sb-items a svg.lucide { color: var(--blue) !important; }
  body.ems-app .nav-collapsed .sb .sb-items a:hover, body.ems-app .nav-collapsed .sb .sb-items a.on { background: var(--green-10); color: var(--green-ink); }
}

/* ------------------------------------------------------------- top bar */
body.ems-app .top { height: var(--top-h); min-height: var(--top-h); background: var(--chrome); border-top: 0; border-bottom: 0; box-shadow: none; color: #fff; }
body.ems-app .top .icon-btn { background: var(--chrome-hover); border-color: transparent; color: #fff; }
body.ems-app .top .icon-btn:hover { background: rgba(255,255,255,.2); border-color: transparent; color: #fff; }
body.ems-app .top .icon-btn:focus-visible, body.ems-app .top summary:focus-visible { outline: 2px solid var(--green); outline-offset: 2px; }
body.ems-app .top .icon-btn .dot { background: var(--green); color: var(--blue-80); }
body.ems-app .top .pill-select { background: var(--chrome-hover); border-color: transparent; color: #fff; color-scheme: dark; }
body.ems-app .top .pill-select option { color: var(--gray-100); background: #fff; }
body.ems-app .top .search input { background: var(--chrome-hover); border-color: transparent; color: #fff; }
body.ems-app .top .search input::placeholder { color: var(--chrome-dim); }
body.ems-app .top .search svg { color: var(--chrome-dim); }
body.ems-app .top .search input:focus, body.ems-app .top .pill-select:focus { background: rgba(255,255,255,.16); border-color: var(--green); box-shadow: 0 0 0 3px rgba(140,198,65,.28); color: #fff; }
body.ems-app .top .today { color: var(--chrome-dim); }
body.ems-app .top .quick-add > summary.btn-primary { background: var(--green); border-color: var(--green); color: var(--blue-80); box-shadow: none; }
body.ems-app .top .quick-add > summary.btn-primary svg { color: var(--blue-80); }
body.ems-app .top .quick-add > summary.btn-primary:hover { background: #fff; border-color: #fff; color: var(--blue); }
body.ems-app .top .avatar { background: #fff; color: var(--blue); }
body.ems-app .page-loading .top::after { background: var(--green); }

/* ----------------------------------------------- guide: a docked panel */
@media (min-width: 1180px) {
  body.ems-app .page-guide { position: fixed; top: var(--top-h); right: 0; bottom: 0; left: auto; width: var(--dock-w); z-index: 30; }
  body.ems-app .page-guide > details[open] { height: 100%; max-height: none; overflow-y: auto; border: 0; border-left: 1px solid rgba(35,59,145,.14);
    border-radius: 0; box-shadow: none; animation: none; background: #fff; padding-bottom: 96px; }
  body.ems-app .content:has(> .page-guide > details[open]) { padding-right: calc(var(--dock-w) + 28px); }
  /* closed: a slim tab on the edge, below the page buttons */
  body.ems-app .page-guide:has(> details:not([open])) { width: auto; bottom: auto; top: calc(var(--top-h) + 120px); }
  body.ems-app .page-guide > details:not([open]) { position: static; }
}

/* alerts: bottom-left of the work area, never on top of the page buttons or the last table columns */
body.ems-app .feedback-toast-stack { right: auto !important; left: 256px; bottom: 20px !important; width: min(340px, calc(100vw - 32px)) !important; }
body.ems-app:has(.shell.nav-collapsed) .feedback-toast-stack { left: 92px; }
@media (max-width: 900px) { body.ems-app .feedback-toast-stack { left: 16px; bottom: 88px !important; } }

/* phones: the top bar fits the screen (it used to push the page 7px sideways) */
@media (max-width: 480px) {
  body.ems-app .top { gap: 6px; padding-left: 10px; padding-right: 10px; }
  body.ems-app .top .pill-select { max-width: 112px; padding: 0 8px; }
  body.ems-app .top a.icon-btn[aria-label="Help"] { display: none; }  /* Help stays in the profile menu */
}

/* --------------------------------------------- work area: calmer, tighter */
body.ems-app .content { padding-top: 24px; }
body.ems-app .page-head { margin-bottom: 18px; }
/* row actions: four small icon buttons in one column instead of two columns of stacked links */
body.ems-app table.t .row-acts { display: inline-flex; gap: 2px; justify-content: flex-end; white-space: nowrap; }
body.ems-app table.t .row-act { width: 30px; height: 30px; border-radius: 8px; display: inline-grid; place-items: center; color: var(--blue); }
body.ems-app table.t .row-act:hover { background: var(--blue-10); color: var(--blue); }
body.ems-app table.t .row-act:focus-visible { outline: 2px solid var(--blue); outline-offset: 1px; }
body.ems-app table.t .row-act svg.lucide { width: 16px; height: 16px; }
body.ems-app table.t td .badge, body.ems-app table.t td.k-date, body.ems-app table.t td.k-due, body.ems-app table.t td.k-datetime,
body.ems-app table.t td.k-strong { white-space: nowrap; }
body.ems-app table.t td.k-link { min-width: 200px; }
/* the action buttons stay in view when a wide table scrolls sideways */
body.ems-app .table-wrap table.t:has(.row-acts) thead th:last-child,
body.ems-app .table-wrap table.t td:has(> .row-acts) { position: sticky; right: 0; z-index: 1; background: #fff; box-shadow: -10px 0 10px -10px rgba(16,32,79,.22); }
body.ems-app .table-wrap table.t:has(.row-acts) thead th:last-child { background: var(--gray-10); }
body.ems-app .table-wrap table.t tbody tr:hover td:has(> .row-acts) { background: var(--blue-10); }
body.ems-app table.t td, body.ems-app table.t th { padding-left: 12px; padding-right: 12px; }
body.ems-app table.t td:first-child, body.ems-app table.t th:first-child { padding-left: 16px; }

/* follow-up strip on a record: what is done, and the next step as a link */
body.ems-app .flow { display: flex; flex-wrap: wrap; gap: 6px 4px; list-style: none; margin: 0 0 18px; padding: 10px 14px; background: #fff; border: 1px solid rgba(35,59,145,.10); border-radius: 14px; }
body.ems-app .flow li { display: flex; align-items: center; gap: 8px; color: var(--z500); font-size: 13px; }
body.ems-app .flow li + li::before { content: ""; width: 26px; height: 2px; margin: 0 6px 0 2px; background: var(--z200); border-radius: 2px; }
body.ems-app .flow li.done + li::before { background: var(--green); }
body.ems-app .flow .flow-n { width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; flex: none; background: var(--z100); color: var(--z600); font-size: 12px; font-weight: 700; }
body.ems-app .flow .flow-n svg { width: 14px; height: 14px; }
body.ems-app .flow li.done { color: var(--z700); }
body.ems-app .flow li.done .flow-n { background: var(--green); color: var(--blue-80); }
body.ems-app .flow li.next .flow-n { background: var(--blue); color: #fff; }
body.ems-app .flow li.next .flow-t { color: var(--blue); font-weight: 600; }
body.ems-app .flow a.flow-t { text-decoration: underline; text-underline-offset: 3px; }

@media print { body.ems-app .sb, body.ems-app .top { display: none; } }

/* ------------------------------------------------ operational modules */
/* training matrix */
body.ems-app table.tmx { width: 100%; }
body.ems-app table.tmx th.mx-h { min-width: 120px; max-width: 170px; white-space: normal; vertical-align: bottom; text-align: center; line-height: 1.3; text-transform: none; letter-spacing: 0; font-size: 12px; }
body.ems-app table.tmx th.mx-h a { color: inherit; }
body.ems-app table.tmx td.mx-who { white-space: nowrap; min-width: 180px; }
body.ems-app table.tmx td.mx { text-align: center; }
body.ems-app .mx-pill { display: inline-flex; align-items: center; gap: 4px; padding: 4px 9px; border-radius: 999px; font-size: 12px; font-weight: 600; white-space: nowrap; text-decoration: none; }
body.ems-app .mx-pill svg { width: 13px; height: 13px; }
body.ems-app td.mx-valid .mx-pill, body.ems-app .mx-k-valid { background: var(--green-10); color: var(--green-ink); }
body.ems-app td.mx-expiring .mx-pill, body.ems-app .mx-k-expiring { background: var(--green-20); color: var(--amber-70); }
body.ems-app td.mx-expired .mx-pill, body.ems-app td.mx-failed .mx-pill, body.ems-app .mx-k-expired { background: var(--red-10); color: var(--red-ink); }
body.ems-app td.mx-missing .mx-pill, body.ems-app .mx-k-missing { background: #fff; color: var(--blue); border: 1px dashed var(--blue); }
body.ems-app a.mx-pill:hover { filter: brightness(.95); text-decoration: underline; }
body.ems-app .mx-key { display: inline-flex; gap: 8px; flex-wrap: wrap; }
/* chemicals */
body.ems-app .haz { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 14px; }
body.ems-app .haz-chip { padding: 5px 11px; border-radius: 999px; background: var(--cream); border: 1px solid var(--amber-20); color: var(--red-60); font-size: 12.5px; font-weight: 600; }
body.ems-app .banner.ok { background: var(--green-10); color: var(--green-ink); border-color: transparent; }
/* checklist builder */
body.ems-app .qb { list-style: none; margin: 8px 0 12px; padding: 0; counter-reset: q; display: grid; gap: 8px; }
body.ems-app .qb-row { counter-increment: q; display: grid; grid-template-columns: 28px minmax(180px, 2fr) 140px minmax(140px, 1.4fr) auto; gap: 8px; align-items: center; }
body.ems-app .qb-n::before { content: counter(q); display: grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; background: var(--z100); color: var(--z600); font-size: 12px; font-weight: 700; }
body.ems-app .qb-row input, body.ems-app .qb-row select { height: 38px; border: 1px solid var(--z200); border-radius: 8px; padding: 0 10px; font: inherit; font-size: 13.5px; background: #fff; min-width: 0; width: 100%; }
body.ems-app .qb-row input:focus, body.ems-app .qb-row select:focus { outline: none; border-color: var(--blue); box-shadow: 0 0 0 3px var(--blue-20); }
body.ems-app .qb-btns { display: inline-flex; gap: 2px; }
body.ems-app .qb-btns .row-act { width: 30px; height: 30px; border: 0; background: none; border-radius: 8px; display: inline-grid; place-items: center; color: var(--blue); cursor: pointer; }
body.ems-app .qb-btns .row-act:hover { background: var(--blue-10); }
body.ems-app .qb-btns .row-act svg { width: 16px; height: 16px; }
@media (max-width: 760px) { body.ems-app .qb-row { grid-template-columns: 28px 1fr auto; } body.ems-app .qb-row select, body.ems-app .qb-row input[name=item_hint] { grid-column: 2 / -1; } }
/* doing an inspection: big, thumb-sized answers */
body.ems-app .insp { padding: 0; overflow: hidden; }
body.ems-app .insp-list { list-style: none; margin: 0; padding: 0; }
body.ems-app .insp-item { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: 10px 18px; padding: 14px 18px; border-bottom: 1px solid var(--z100); align-items: center; }
body.ems-app .insp-item.is-fail, body.ems-app .insp-item:has(.tri-fail input:checked) { background: var(--gray-10); }
body.ems-app .insp-q { display: flex; gap: 12px; align-items: flex-start; }
body.ems-app .insp-n { flex: none; width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; background: var(--z100); color: var(--z600); font-size: 12px; font-weight: 700; }
body.ems-app .insp-a { display: grid; gap: 8px; }
body.ems-app .tri { display: inline-grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
body.ems-app .tri label { position: relative; cursor: pointer; }
body.ems-app .tri input { position: absolute; opacity: 0; inset: 0; cursor: pointer; }
body.ems-app .tri span { display: flex; align-items: center; justify-content: center; gap: 6px; min-height: 44px; padding: 0 10px; border: 1.5px solid var(--z200); border-radius: 10px; background: #fff; font-weight: 600; font-size: 13.5px; color: var(--z700); white-space: nowrap; }
body.ems-app .tri span svg { width: 16px; height: 16px; }
body.ems-app .tri input:focus-visible + span { outline: 2px solid var(--blue); outline-offset: 2px; }
body.ems-app .tri-ok input:checked + span { background: var(--green); border-color: var(--green); color: var(--blue-80); }
body.ems-app .tri-fail input:checked + span { background: var(--red-ink); border-color: var(--red-ink); color: #fff; }
body.ems-app .tri-na input:checked + span { background: var(--z600); border-color: var(--z600); color: #fff; }
body.ems-app .insp-num, body.ems-app .insp-text, body.ems-app .insp-note { height: 42px; border: 1px solid var(--z200); border-radius: 10px; padding: 0 12px; font: inherit; font-size: 14px; width: 100%; background: #fff; }
body.ems-app .insp-note { height: 36px; font-size: 13px; background: var(--z50); }
body.ems-app .insp-foot { padding: 16px 18px 18px; display: grid; gap: 10px; }
body.ems-app .insp-foot textarea { width: 100%; border: 1px solid var(--z200); border-radius: 10px; padding: 10px 12px; font: inherit; }
@media (max-width: 760px) { body.ems-app .insp-item { grid-template-columns: 1fr; } body.ems-app .tri { display: grid; } }
body.ems-app .whys { margin: 6px 0 10px; padding-left: 20px; color: var(--z700); font-size: 13.5px; }
body.ems-app .whys li { margin: 4px 0; }

/* ---- smartform.css ---- */
/* Tap-to-choose forms: classifier, chips, risk matrix, suggestions, emission source picker. */
.clf { display: grid; gap: 14px; margin-bottom: 18px; }
.clf-step { border: 1px solid rgba(35,59,145,.14); border-radius: 8px; background: #fff; padding: 14px 16px; }
.clf-step > h3 { display: flex; align-items: center; gap: 8px; margin: 0 0 10px; font-size: 14px; color: var(--brand-blue); }
.clf-step > h3 .n { width: 22px; height: 22px; border-radius: 50%; background: var(--brand-blue); color: #fff; display: grid; place-items: center; font-size: 12px; flex: none; }
.clf-step > h3 .opt { margin-left: auto; font-weight: 500; font-size: 12px; color: var(--gray-60); }
.clf-kinds { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px; }
.clf-kind { text-align: left; border: 1px solid var(--blue-20); background: #fff; border-radius: 8px; padding: 10px 12px; font: 600 13px var(--font); color: var(--gray-70); cursor: pointer; transition: border-color .15s, background .15s, box-shadow .15s; }
.clf-kind:hover { border-color: var(--brand-blue); }
.clf-kind[aria-pressed=true] { border-color: var(--brand-blue); background: var(--brand-blue-soft); color: var(--brand-blue); }
.clf-q { margin: 12px 0 0; }
.clf-q:first-of-type { margin-top: 0; }
.clf-q > b { display: block; font-size: 13px; color: var(--gray-70); margin-bottom: 6px; }
.clf-q > b small { font-weight: 500; color: var(--gray-60); margin-left: 6px; }
.clf-grp { font-size: 12px; text-transform: uppercase; letter-spacing: .04em; color: var(--gray-60); margin: 8px 0 4px; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip { border: 1px solid var(--blue-20); background: #fff; border-radius: 999px; padding: 6px 12px; font: 500 13px var(--font); color: var(--gray-70); cursor: pointer; transition: background .15s, border-color .15s, color .15s; line-height: 1.2; }
.chip:hover { border-color: var(--brand-blue); }
.chip[aria-pressed=true] { background: var(--brand-blue); border-color: var(--brand-blue); color: #fff; }
.chip.multi[aria-pressed=true]::before { content: "✓ "; }
.clf-q select, .clf-q input { min-height: 38px; border: 1px solid var(--blue-20); border-radius: 7px; padding: 7px 10px; font: 13px var(--font); background: #fff; max-width: 100%; }
.clf-q input[type=number] { width: 130px; }
.clf-row { display: flex; flex-wrap: wrap; gap: 16px; }
.clf-row > .clf-q { margin-top: 12px; }
.clf-search { width: 100%; max-width: 360px; margin-bottom: 8px; }
/* risk matrix */
.rm { display: grid; grid-template-columns: auto repeat(5, minmax(44px, 1fr)); gap: 4px; max-width: 560px; font-size: 12px; }
.rm .ax { color: var(--gray-60); display: flex; align-items: center; padding-right: 6px; }
.rm .axb { color: var(--gray-60); text-align: center; padding-top: 4px; line-height: 1.2; }
.rm button { border: 2px solid transparent; border-radius: 6px; min-height: 38px; font: 700 13px var(--font); color: var(--gray-90); cursor: pointer; }
.rm .low { background: var(--green-20); } .rm .medium { background: var(--amber-20); } .rm .high { background: var(--red-20); } .rm .critical { background: var(--red-20); }
.rm button[aria-pressed=true] { border-color: var(--brand-blue); box-shadow: 0 0 0 2px #fff inset; transform: scale(1.04); }
.rm-out { margin-top: 10px; font-size: 13px; }
.rm-out b { font-size: 15px; }
.band { display: inline-block; padding: 2px 9px; border-radius: 999px; font-weight: 700; font-size: 12px; }
.band.low { background: var(--green-20); color: var(--green-70); } .band.medium { background: var(--amber-20); color: var(--amber-70); }
.band.high { background: var(--red-20); color: var(--amber-70); } .band.critical { background: var(--red-20); color: var(--red-80); }
.auto-tag { display: inline-block; margin-left: 6px; font-size: 12px; font-weight: 600; color: var(--brand-green-ink); background: var(--green-10); border-radius: 4px; padding: 1px 6px; }
/* suggestions under text boxes */
.sugg { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.sugg[hidden] { display: none; }
.sugg button { border: 1px dashed var(--gray-40); background: var(--gray-10); border-radius: 999px; padding: 4px 10px; font: 12px var(--font); color: var(--gray-70); cursor: pointer; }
.sugg button:hover { border-color: var(--brand-blue); color: var(--brand-blue); }
/* emission source picker */
.efp { display: grid; gap: 10px; margin-bottom: 4px; }
.efp .chip small { display: block; font-size: 12px; opacity: .8; font-weight: 400; }
.efp-preview { font-size: 13px; color: var(--gray-70); background: var(--brand-blue-soft); border-radius: 7px; padding: 8px 12px; }
.efp-preview b { color: var(--brand-blue); }
/* incident detail */
.clf-view { display: grid; gap: 10px; }
.clf-view h4 { margin: 0 0 4px; font-size: 12px; text-transform: uppercase; letter-spacing: .04em; color: var(--gray-60); }
.clf-view dl { display: grid; grid-template-columns: minmax(120px, 34%) 1fr; gap: 4px 10px; margin: 0; font-size: 13px; }
.clf-view dt { color: var(--gray-60); } .clf-view dd { margin: 0; }
.tagline { display: flex; flex-wrap: wrap; gap: 6px; margin: 4px 0 10px; }
.tag { font-size: 12px; font-weight: 600; padding: 3px 9px; border-radius: 999px; background: var(--brand-blue-soft); color: var(--brand-blue); }
.tag.red { background: var(--red-10); color: var(--red-60); }
.sugg-actions li { display: flex; gap: 8px; align-items: center; }
.sugg-actions .ctl { font-size: 12px; font-weight: 700; color: var(--brand-green-ink); background: var(--green-10); border-radius: 4px; padding: 2px 6px; white-space: nowrap; }
/* insights */
.ins-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 16px; margin-top: 16px; }
.ins-row { display: grid; grid-template-columns: minmax(0, 1fr) 44px; gap: 8px; align-items: center; margin: 7px 0; font-size: 13px; }
.ins-row b { text-align: right; }
.ins-row .hbar { display: block; margin-top: 4px; }
.pyr { display: grid; gap: 4px; justify-items: center; }
.pyr div { background: var(--brand-blue); color: #fff; text-align: center; padding: 6px 4px; border-radius: 4px; font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pyr div:nth-child(1) { background: #a1281d; } .pyr div:nth-child(2) { background: #d0582c; } .pyr div:nth-child(3) { background: #e8743b; }
.pyr div:nth-child(4) { background: #3d56b8; } .pyr div:nth-child(5) { background: #2bb7cf; } .pyr div:nth-child(6) { background: #8cc641; color: #20340d; }
.hm { display: grid; grid-template-columns: auto repeat(5, 1fr); gap: 3px; font-size: 12px; }
.hm span { display: grid; place-items: center; min-height: 32px; border-radius: 4px; font-weight: 700; }
.hm .ax { color: var(--gray-60); font-weight: 500; justify-items: end; padding-right: 4px; }
.hm .axb { color: var(--gray-60); font-weight: 500; text-align: center; line-height: 1.15; }
@media (max-width: 640px) {
  .clf-step { padding: 12px; }
  .clf-kinds { grid-template-columns: 1fr 1fr; }
  .rm { grid-template-columns: auto repeat(5, minmax(34px, 1fr)); }
  .rm .axb { font-size: 12px; }
}
@media print {
  .ems-app .side, .ems-app .top, .no-print, .assistant-widget { display: none !important; }
  .ins-grid { grid-template-columns: 1fr 1fr; }
  .card { break-inside: avoid; }
}

/* field tools: GPS, voice, dictation */
.ft-row { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.ft-btn { border: 1px solid var(--brand-blue, var(--blue)); background: #fff; color: var(--brand-blue, var(--blue)); border-radius: 999px; padding: 8px 14px; font-weight: 700; font-size: 13px; cursor: pointer; }
.ft-btn.on { background: var(--red-60); border-color: var(--red-60); color: #fff; }
.ft-status { font-size: 12px; color: var(--gray-60); }
.ft-link { border: 0; background: none; color: var(--brand-blue, var(--blue)); font-size: 12px; font-weight: 600; cursor: pointer; padding: 4px 0; }
.ft-row audio { max-width: 100%; }

/* Auto / Manual badges */
.fill-tag { display: inline-block; margin-left: 6px; font-size: 12px; font-weight: 700; letter-spacing: .02em; border-radius: 4px; padding: 1px 6px; vertical-align: middle; text-transform: none; }
.fill-tag.auto { color: var(--brand-green-ink, var(--green-70)); background: var(--green-10); border: 1px solid var(--green-20); }
.fill-tag.manual { color: var(--gray-70); background: var(--blue-10); border: 1px solid var(--blue-20); }
.auto-tag { display: none; }
/* one dropdown panel for suggestions and long lists: scrolls, searchable, keyboard friendly */
.combo-pop { position: fixed; z-index: 2000; background: #fff; border: 1px solid var(--blue-20); border-radius: 8px; box-shadow: 0 12px 32px rgba(17, 27, 60, .18);
  display: flex; flex-direction: column; overflow: hidden; font: 13px var(--font, Arial); }
.combo-pop[hidden] { display: none; }
.combo-search { margin: 8px; min-height: 36px; border: 1px solid var(--blue-20); border-radius: 6px; padding: 6px 10px; font: inherit; }
.combo-list { overflow-y: auto; overscroll-behavior: contain; -webkit-overflow-scrolling: touch; padding: 4px 0; flex: 1 1 auto; min-height: 0; }
.combo-group { padding: 8px 12px 4px; font-size: 12px; text-transform: uppercase; letter-spacing: .04em; color: var(--gray-60); position: sticky; top: 0; background: #fff; }
.combo-opt { padding: 8px 12px; cursor: pointer; color: var(--gray-90); line-height: 1.35; }
.combo-opt small { display: block; color: var(--gray-60); font-size: 12px; }
.combo-opt:hover, .combo-opt.act { background: var(--brand-blue-soft, var(--blue-10)); }
.combo-opt.on { font-weight: 700; color: var(--brand-blue, var(--blue)); background: var(--blue-10); }
.combo-opt.off { color: var(--gray-50); cursor: default; }
.combo-opt mark { background: var(--amber-20); color: inherit; border-radius: 2px; padding: 0 1px; }
.combo-empty { padding: 10px 12px; color: var(--gray-60); }
.combo-native { position: absolute !important; width: 1px !important; height: 1px !important; opacity: 0 !important; pointer-events: none !important; }
.combo-trigger { width: 100%; min-height: 40px; text-align: left; border: 1px solid var(--blue-20); border-radius: 7px; background: #fff; padding: 9px 34px 9px 12px; font: 13px var(--font, Arial);
  color: var(--gray-90); cursor: pointer; position: relative; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.combo-trigger::after { content: ""; position: absolute; right: 13px; top: 50%; width: 7px; height: 7px; border-right: 2px solid var(--gray-60); border-bottom: 2px solid var(--gray-60); transform: translateY(-70%) rotate(45deg); }
.combo-trigger.empty { color: var(--gray-50); }
.combo-trigger:focus-visible { outline: none; border-color: var(--brand-blue, var(--blue)); box-shadow: 0 0 0 3px rgba(35, 59, 145, .18); }
.field { position: relative; }
.sugg { display: none !important; }
@media (max-width: 640px) { .combo-pop { font-size: 14px; } .combo-opt { padding: 11px 12px; } }

/* selected = solid Clanert blue, white text; no inner stripe */
.clf-kind { border-radius: 6px; }
.clf-kind[aria-pressed=true] { background: var(--brand-blue, var(--blue)); border-color: var(--brand-blue, var(--blue)); color: #fff; box-shadow: none; }
.combo-opt.on { box-shadow: none; background: var(--brand-blue-soft, var(--blue-10)); }
.chip { border-radius: 6px; }

/* calendar-style year grid */
.year-trigger::after { display: none; }
.year-trigger { background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='none' stroke='%2366758e' stroke-width='1.8'%3E%3Crect x='2' y='3' width='12' height='11' rx='1.5'/%3E%3Cpath d='M2 6.5h12M5 1.5v3M11 1.5v3'/%3E%3C/svg%3E") no-repeat right 12px center; }
.yp-head { display: flex; align-items: center; justify-content: space-between; padding: 8px 10px; border-bottom: 1px solid var(--gray-30); }
.yp-head b { color: var(--brand-blue, var(--blue)); font-size: 13px; }
.yp-nav { border: 1px solid var(--blue-20); background: #fff; border-radius: 6px; width: 32px; height: 30px; font-size: 18px; line-height: 1; cursor: pointer; color: var(--gray-70); }
.yp-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; padding: 10px; }
.yp-year { border: 1px solid var(--gray-30); background: #fff; border-radius: 6px; padding: 10px 0; font: 600 13px var(--font, Arial); color: var(--gray-90); cursor: pointer; }
.yp-year:hover { border-color: var(--brand-blue, var(--blue)); }
.yp-year.now { border-color: var(--brand-green, var(--green)); }
.yp-year.on { background: var(--brand-blue, var(--blue)); border-color: var(--brand-blue, var(--blue)); color: #fff; }
.yp-year:disabled { color: var(--gray-40); background: var(--gray-10); cursor: default; }

/* linked records, gaps, flow map */
.links-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 14px; }
.links-grid h4 { margin: 0 0 6px; font-size: 12px; text-transform: uppercase; letter-spacing: .04em; color: var(--gray-60); }
.links-grp { margin-bottom: 8px; font-size: 13px; } .links-grp ul { margin: 4px 0 0; padding-left: 16px; }
.gap-list { list-style: none; margin: 0 0 12px; padding: 0; display: grid; gap: 8px; }
.gap-list li { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border: 1px solid var(--amber-20); background: var(--amber-10); border-radius: 6px; }
.gap-list small { display: block; color: var(--gray-60); font-size: 12px; }
.gap-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--amber-50); flex: none; }
.gap-banner { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; padding: 12px 16px; margin-bottom: 14px; border-radius: 6px; background: var(--amber-10);
  border: 1px solid var(--amber-20); color: var(--amber-70); text-decoration: none; }
.gap-banner span { color: var(--amber-70); font-size: 13px; } .gap-banner .gap-go { margin-left: auto; font-weight: 700; color: var(--brand-blue, var(--blue)); }
.gap-head { display: flex; align-items: center; gap: 10px; }
.gap-step { font: 700 11px var(--font, Arial); letter-spacing: .06em; padding: 3px 7px; border-radius: 4px; background: var(--blue-10); color: var(--brand-blue, var(--blue)); }
.pdca { display: grid; grid-template-columns: 1fr auto 1fr auto 1fr auto 1fr; align-items: stretch; gap: 0; margin-top: 8px; }
.pdca-step { background: #fff; border: 1px solid #dfe5ef; border-radius: 6px; padding: 14px; display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.pdca-step header { display: flex; align-items: center; gap: 8px; }
.pdca-step header b { font-size: 16px; color: #1f2a44; } .pdca-step header .badge { margin-left: auto; text-decoration: none; }
.pdca-n { width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; background: var(--brand-blue, var(--blue)); color: #fff; font-size: 12px; font-weight: 700; }
.pdca-step.s-plan { border-top: 3px solid #3d56b8; } .pdca-step.s-do { border-top: 3px solid #2bb7cf; } .pdca-step.s-check { border-top: 3px solid #e8743b; } .pdca-step.s-act { border-top: 3px solid #8cc641; }
.pdca-nodes { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.pdca-nodes a { display: flex; justify-content: space-between; gap: 8px; padding: 8px 10px; border-radius: 5px; background: var(--gray-10); color: var(--gray-90); text-decoration: none; font-size: 13px; }
.pdca-nodes a:hover { background: var(--blue-10); color: var(--brand-blue, var(--blue)); }
.pdca-nodes b { color: var(--gray-60); font-weight: 600; }
.pdca-gaps { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; font-size: 12px; }
.pdca-gaps a { display: flex; justify-content: space-between; gap: 6px; color: var(--amber-70); text-decoration: none; padding: 4px 8px; background: var(--amber-10); border-radius: 4px; }
.pdca-arrow { width: 28px; position: relative; } .pdca-arrow::after { content: ""; position: absolute; top: 50%; left: 6px; width: 14px; height: 14px;
  border-top: 2px solid var(--gray-50); border-right: 2px solid var(--gray-50); transform: translateY(-50%) rotate(45deg); }
.pdca-loop { grid-column: 1 / -1; margin-top: 12px; text-align: center; font-size: 12px; color: var(--gray-60); border-top: 2px dashed var(--blue-20); padding-top: 8px; }
@media (max-width: 900px) { .pdca { grid-template-columns: 1fr; } .pdca-arrow { height: 24px; width: auto; } .pdca-arrow::after { left: 50%; top: 4px; transform: translateX(-50%) rotate(135deg); } }

/* plain, product-style: no coloured edge strips, no decorative arrows or circles */
.pdca { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.pdca-arrow { display: none; }
.pdca-step, .pdca-step.s-plan, .pdca-step.s-do, .pdca-step.s-check, .pdca-step.s-act { border: 1px solid #dfe3ea; border-top: 1px solid #dfe3ea; border-radius: 4px; box-shadow: none; }
.pdca-step header { border-bottom: 1px solid #eceff4; padding-bottom: 8px; }
.pdca-step header b { font-size: 14px; font-weight: 600; }
.pdca-n { width: auto; height: auto; background: none; color: var(--gray-60); font-size: 13px; font-weight: 600; border-radius: 0; }
.pdca-n::after { content: "."; }
.pdca-nodes a { background: none; border-radius: 0; border-bottom: 1px solid var(--gray-20); padding: 7px 2px; }
.pdca-nodes li:last-child a { border-bottom: 0; }
.pdca-gaps a { background: none; padding: 3px 2px; border-radius: 0; }
.pdca-loop { border-top: 0; text-align: left; padding-top: 0; }
.gap-dot { display: none; }
.gap-list li { border-radius: 4px; }
.gap-banner { border-radius: 4px; }
.clf-step > h3 .n { width: auto; height: auto; background: none; color: var(--gray-60); border-radius: 0; font-size: 13px; display: inline; }
.clf-step > h3 .n::after { content: "."; }
.clf-step { border-radius: 4px; }
.rm button[aria-pressed=true] { transform: none; box-shadow: none; outline: 2px solid var(--gray-90); outline-offset: -2px; }
@media (max-width: 900px) { .pdca { grid-template-columns: 1fr; } }

/* chart export menu */
.chart-export { position: relative; margin-left: auto; font-weight: 500; text-transform: none; letter-spacing: 0; }
.chart-export summary { list-style: none; cursor: pointer; font-size: 12px; color: var(--brand-blue, #233b91); padding: 2px 8px; border: 1px solid #c9d1dd; border-radius: 3px; background: #fff; }
.chart-export summary::-webkit-details-marker { display: none; }
.chart-export-pop { position: absolute; right: 0; top: calc(100% + 4px); z-index: 30; background: #fff; border: 1px solid #c9d1dd; border-radius: 3px;
  box-shadow: 0 6px 16px rgba(17, 27, 60, .14); display: grid; min-width: 150px; }
.chart-export-pop button { border: 0; background: #fff; text-align: left; padding: 7px 12px; font: 13px var(--font, Arial); color: #1f2a44; cursor: pointer; }
.chart-export-pop button:hover { background: #eef3fb; }
.section-title { position: relative; }

/* the guide button and helper must never sit on top of a field someone is filling in */
.aw-root, .page-guide > details { transition: opacity .15s; }
body:has(.main form :is(input, select, textarea):focus) .aw-root,
body:has(.main form :is(input, select, textarea):focus) .page-guide > details:not([open]),
body:has(.combo-pop:not([hidden])) .aw-root, body:has(.combo-pop:not([hidden])) .page-guide > details:not([open]) { opacity: 0; pointer-events: none; }
/* the emission source picker needs the whole row, not half of a two-column form */
.form .fields > .field:has(.efp) { grid-column: 1 / -1; align-items: start !important; }
.form .fields > .field:has(.efp) > select, .form .fields > .field:has(.efp) > .combo { max-width: 620px; }
/* global search results while typing */
.top .search { position: relative; }
.search-pop { position: absolute; left: 0; top: calc(100% + 4px); z-index: 2100; min-width: 100%; width: max-content; max-width: min(560px, 92vw); max-height: 60vh; overflow-y: auto;
  background: #fff; border: 1px solid var(--blue-20); border-radius: 6px; box-shadow: 0 12px 32px rgba(17, 27, 60, .18); padding: 4px 0; }
.search-pop[hidden] { display: none; }
.search-pop a { display: flex; align-items: baseline; gap: 10px; padding: 7px 12px; color: var(--gray-90); text-decoration: none; font-size: 13px; }
.search-pop a small { flex: 0 0 108px; color: var(--gray-60); font-size: 12px; }
.search-pop a span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.search-pop a:hover, .search-pop a.on { background: var(--brand-blue-soft, var(--blue-10)); }
.search-pop a.all { border-top: 1px solid var(--gray-30); margin-top: 4px; color: var(--brand-blue, var(--blue)); font-weight: 600; }
/* list filters: a dropdown in a toolbar is as wide as its text, not the whole row */
.toolbar > .combo-trigger { width: auto; min-width: 150px; flex: 0 0 auto; }

/* Auto / Manual and "how it was worked out" are one small point; the words open on a click */
.fill-tag { font-size: 0 !important; width: 8px; height: 8px; padding: 0 !important; border-radius: 50% !important; vertical-align: middle; cursor: pointer; position: relative; }
.fill-tag.auto { background: var(--green); border-color: var(--green); }
.fill-tag.manual { background: var(--gray-40); border-color: var(--gray-40); }
.fill-tag.open::after { content: attr(title); position: absolute; left: 14px; top: -6px; z-index: 30; width: max-content; max-width: 260px; white-space: normal;
  font-size: 12px; font-weight: 500; letter-spacing: 0; color: var(--gray-90); background: #fff; border: 1px solid var(--blue-20); border-radius: 4px; padding: 5px 8px; box-shadow: 0 6px 18px rgba(17,27,60,.14); text-align: left; }
.how-pt { display: inline-grid; place-items: center; width: 16px; height: 16px; margin-left: 8px; padding: 0; border-radius: 50%; border: 1px solid var(--gray-40); background: #fff; color: var(--gray-60);
  font: italic 700 10.5px/1 Georgia, serif; cursor: pointer; vertical-align: middle; }
.how-pt:hover, .how-pt[aria-expanded=true] { border-color: var(--brand-blue, var(--blue)); color: var(--brand-blue, var(--blue)); }
.how-detail { margin-top: 6px; font-size: 12.5px; color: var(--gray-70); display: grid; gap: 2px; }
.how-detail[hidden] { display: none; }

.efp-preview { align-self: start; }

/* Back / Forward in the title bar */
.nav-hist { display: inline-flex; gap: 2px; margin-right: 8px; flex: none; }
.nav-hist button { width: 28px; height: 28px; border: 1px solid rgba(255,255,255,.28); background: rgba(255,255,255,.10); color: #fff; border-radius: 4px;
  font-size: 20px; line-height: 1; cursor: pointer; display: grid; place-items: center; padding: 0 0 3px; }
.nav-hist button:hover { background: rgba(255,255,255,.22); }
@media (max-width: 899px) { .nav-hist { display: none; } }

/* offline: a plain bar at the bottom, and a note on a form that could not be sent */
.offline-bar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 3000; background: var(--gray-80); color: #fff; font-size: 13px; padding: 7px 14px; text-align: center; }
.offline-bar[hidden] { display: none; }
.offline-note { margin: 0 0 12px; padding: 9px 12px; border: 1px solid var(--amber-50); background: var(--amber-10); color: var(--amber-70); border-radius: 4px; font-size: 13px; }

/* ---- software.css ---- */
/* Desktop-software feel (computer screens only), same Clanert colours and font.
   Dense, structured, calm: labels left of fields, compact controls with small corners, group boxes with a header bar,
   grid tables, flat buttons. Phones keep the large touch layout. */
@media (min-width: 900px) {
  body.ems-app { --sw-line: var(--gray-40); --sw-line-soft: var(--gray-30); --sw-head: var(--blue-10); --sw-text: var(--gray-90); --sw-muted: var(--gray-60); }

  /* page header */
  body.ems-app .page-title { font-size: 21px; font-weight: 600; letter-spacing: 0; }
  body.ems-app .page-head { margin-bottom: 12px; padding-bottom: 10px; border-bottom: 1px solid var(--sw-line-soft); }
  body.ems-app .eyebrow { font-size: 12px; }
  body.ems-app .lead { font-size: 13px; margin-top: 4px; }

  /* group boxes instead of floating cards */
  body.ems-app .card { border-radius: 3px; border: 1px solid var(--sw-line); box-shadow: none; padding: 14px 16px; }
  body.ems-app .card > .section-title:first-child, body.ems-app .card > summary.section-title:first-child {
    margin: -14px -16px 12px; padding: 7px 16px; background: var(--sw-head); border-bottom: 1px solid var(--sw-line);
    font-size: 12px; letter-spacing: .02em; text-transform: none; font-weight: 700; color: var(--sw-text); }
  body.ems-app .card.flush > .section-title:first-child { margin: 0; padding: 7px 16px; }
  body.ems-app .card.kpi { padding: 10px 14px; }
  body.ems-app .grid { gap: 12px; }

  /* forms: label on the left, compact controls */
  body.ems-app .form .fields { gap: 8px 28px; }
  body.ems-app .form .fields > .field:not(.wide):not(.check) { display: grid; grid-template-columns: 150px minmax(0, 1fr); column-gap: 10px; align-items: center; }
  body.ems-app .form .fields > .field:not(.wide):not(.check) > label { grid-column: 1; margin: 0; text-align: right; font-weight: 500; color: var(--sw-muted); font-size: 12.5px; line-height: 1.25; }
  body.ems-app .form .fields > .field:not(.wide):not(.check) > :not(label) { grid-column: 2; }
  body.ems-app .form .fields > .field.wide > label { font-weight: 500; color: var(--sw-muted); font-size: 12.5px; margin-bottom: 4px; }
  body.ems-app .field input:not([type=checkbox]):not([type=radio]):not([type=file]), body.ems-app .field select, body.ems-app .field textarea,
  body.ems-app .combo-trigger { min-height: 30px; padding: 4px 8px; border-radius: 3px; border: 1px solid var(--sw-line); font-size: 13px; }
  body.ems-app .combo-trigger { padding-right: 28px; }
  body.ems-app .field textarea { min-height: 64px; }
  body.ems-app .field input:focus, body.ems-app .field select:focus, body.ems-app .field textarea:focus, body.ems-app .combo-trigger:focus-visible {
    border-color: var(--brand-blue, var(--blue)); box-shadow: 0 0 0 1px var(--brand-blue, var(--blue)); outline: none; }
  body.ems-app .field .help { font-size: 12px; margin-top: 2px; }
  body.ems-app .fill-tag { font-size: 12px; padding: 0 5px; border-radius: 2px; }
  body.ems-app .form-actions { border-top: 1px solid var(--sw-line-soft); padding-top: 12px; margin-top: 12px; gap: 8px; }

  /* buttons */
  body.ems-app .btn { height: 30px; padding: 0 14px; border-radius: 3px; font-size: 13px; box-shadow: none; }
  body.ems-app .btn-sm { height: 26px; padding: 0 10px; font-size: 12px; }
  body.ems-app .btn:not(.btn-primary) { background: #fff; border-color: var(--sw-line); color: var(--sw-text); }
  body.ems-app .btn:not(.btn-primary):hover { background: var(--gray-10); }
  body.ems-app .seg a { border-radius: 0; }

  /* tables: grid lines, grey header, dense rows */
  body.ems-app .t { border-collapse: collapse; }
  body.ems-app .t th { background: var(--sw-head); padding: 6px 10px; font-size: 12px; font-weight: 600; color: var(--sw-text); border: 1px solid var(--sw-line); text-transform: none; letter-spacing: 0; }
  body.ems-app .t td { padding: 6px 10px; font-size: 13px; border: 1px solid var(--sw-line-soft); }
  body.ems-app .t tbody tr:nth-child(even) td { background: var(--gray-10); }
  body.ems-app .t tbody tr:hover td { background: var(--blue-10); }
  body.ems-app .badge { border-radius: 2px; }

  /* tap-to-choose pieces */
  body.ems-app .chip, body.ems-app .clf-kind { border-radius: 3px; padding: 4px 10px; font-size: 12.5px; }
  body.ems-app .clf-step { border-radius: 3px; border-color: var(--sw-line); padding: 0 14px 12px; }
  body.ems-app .clf-step > h3 { margin: 0 -14px 10px; padding: 7px 14px; background: var(--sw-head); border-bottom: 1px solid var(--sw-line); font-size: 12.5px; color: var(--sw-text); }
  body.ems-app .combo-pop { border-radius: 3px; box-shadow: 0 6px 18px rgba(17, 27, 60, .18); }
  body.ems-app .combo-opt { padding: 5px 10px; }
  body.ems-app .combo-search { min-height: 28px; border-radius: 3px; margin: 6px; }

  /* lists */
  body.ems-app .list li { padding-top: 7px; padding-bottom: 7px; }
}

/* Quentic-like workspace: plain light grey behind white panels; chart values readable */
@media (min-width: 900px) {
  body.ems-app, body.ems-app .main { background: var(--gray-20); }
  body.ems-app .content > .card, body.ems-app .grid > .card { background: #fff; }
  body.ems-app .card.kpi .label { font-size: 12px; color: var(--sw-muted); text-transform: none; letter-spacing: 0; font-weight: 600; }
  body.ems-app .card.kpi .value { font-size: 24px; font-weight: 600; }
}
svg.chart .axis { font-size: 12px; fill: #5f6b80; }
svg.chart .axis.val { font-weight: 700; fill: #1f2a44; }

/* analytics dashboard layout: filter panel, key-figure tiles, tabs, chart grid */
.dash { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: 12px; align-items: start; }
.dash-filters { position: sticky; top: 72px; display: grid; gap: 10px; }
.dash-filters label { display: grid; gap: 4px; font-size: 12px; font-weight: 600; color: var(--gray-60); }
.dash-filters select, .dash-filters input { min-height: 30px; border: 1px solid var(--gray-40); border-radius: 3px; padding: 4px 8px; font-size: 13px; background: #fff; }
.dash-filters .btn { width: 100%; }
.dash-clear { text-align: center; font-size: 12px; color: var(--gray-60); }
.dash-kpis { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 12px; margin-bottom: 12px; }
.dash-kpis .kpi small { display: block; color: var(--gray-60); font-size: 12px; margin-top: 2px; }
.dash-tabs-card { padding-top: 0 !important; }
.dash-tabs { display: flex; gap: 0; border-bottom: 1px solid var(--gray-40); margin: 0 -16px 12px; padding: 0 12px; background: var(--gray-10); }
.dash-tabs button { border: 0; border-bottom: 2px solid transparent; background: none; padding: 9px 14px; font: 600 13px var(--font, Arial); color: var(--gray-60); cursor: pointer; margin-bottom: -1px; }
.dash-tabs button[aria-selected=true] { color: var(--brand-blue, var(--blue)); border-bottom-color: var(--brand-blue, var(--blue)); background: #fff; }
.dash-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 12px; margin-bottom: 12px; }
.dash-grid.two { grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr); }
.dash-pane[hidden] { display: none !important; }
.donut-wrap { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.donut-wrap svg { flex: none; }
.chart-legend { list-style: none; margin: 0; padding: 0; display: grid; gap: 5px; font-size: 12.5px; }
.chart-legend.row { display: flex; flex-wrap: wrap; gap: 4px 14px; margin-bottom: 6px; }
.chart-legend i { display: inline-block; width: 10px; height: 10px; margin-right: 6px; vertical-align: -1px; }
.chart-legend b { margin-left: 4px; } .chart-legend span { color: #5f6b80; margin-left: 4px; }
@media (max-width: 1100px) { .dash-kpis { grid-template-columns: repeat(3, minmax(0, 1fr)); } .dash-grid.two { grid-template-columns: 1fr; } }
@media (max-width: 900px) { .dash { grid-template-columns: 1fr; } .dash-filters { position: static; } .dash-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* key figures table */
.kf td.kf-name { font-weight: 600; color: var(--gray-90); vertical-align: middle; background: var(--gray-10); }
.kf td.kf-unit { color: var(--gray-60); font-size: 12px; white-space: nowrap; }
.kf td.kf-bad { color: var(--red-60); font-weight: 700; font-style: italic; }
.kf td.kf-good { color: var(--green-70); font-weight: 700; }
.kf tr.kf-ref td { color: var(--gray-50); font-size: 12px; }

/* cleaner panels, as in the reference: plain titles, dark figures, lighter text */
@media (min-width: 900px) {
  body.ems-app .card > .section-title:first-child, body.ems-app .card > summary.section-title:first-child { background: none; border-bottom: 0; margin-bottom: 4px; padding-top: 10px; font-size: 13px; font-weight: 600; }
  body.ems-app .card { border-color: var(--gray-30); }
  body.ems-app .card.kpi .value { color: var(--gray-90); font-weight: 500; font-size: 26px; }
  body.ems-app .card.kpi .label { color: var(--gray-90); font-weight: 600; }
  body.ems-app .dash-tabs { background: none; border-bottom-color: var(--gray-30); }
  body.ems-app .dash-tabs button { font-weight: 500; font-size: 12.5px; padding: 8px 12px; }
  body.ems-app .dash-grid .card { border: 0; padding-left: 4px; padding-right: 4px; }
  body.ems-app .t th { background: var(--gray-10); font-weight: 600; }
  body.ems-app .chart-export summary { border: 0; color: #6a7686; }
}

/* Top / Side navigation choice */
.nav-choice { display: flex; align-items: center; gap: 6px; padding: 8px 12px; font-size: 12.5px; color: inherit; }
.nav-choice span { margin-right: auto; opacity: .8; }
.nav-choice button { border: 1px solid var(--gray-40); background: #fff; color: var(--gray-80); border-radius: 3px; padding: 3px 10px; font: 600 12px var(--font, Arial); cursor: pointer; }
.nav-choice button[aria-pressed=true] { background: var(--brand-blue, var(--blue)); border-color: var(--brand-blue, var(--blue)); color: #fff; }

/* ---- analytics look: light text, legend above the chart, calm colours ---- */
@media (min-width: 900px) {
  body.ems-app { font-family: "Segoe UI", "Open Sans", Roboto, "Helvetica Neue", Arial, sans-serif; }
  body.ems-app .page-title { font-weight: 400; letter-spacing: 0; color: var(--gray-80); }
  body.ems-app .section-title { font-weight: 600; font-size: 13px; color: var(--gray-80); letter-spacing: 0; }
  body.ems-app .card.kpi .label { font-weight: 600; font-size: 13px; color: var(--gray-80); }
  body.ems-app .card.kpi .value { font-weight: 400; font-size: 28px; color: var(--gray-80); letter-spacing: 0; }
  body.ems-app .dash-kpis .kpi small { font-size: 12px; color: var(--gray-60); }
  body.ems-app .dash-filters label { font-weight: 400; color: var(--gray-70); font-size: 12.5px; }
  body.ems-app .dash-filters .section-title { font-weight: 600; }
  body.ems-app .dash-tabs button { font-weight: 400; }
  body.ems-app .dash-tabs button[aria-selected=true] { font-weight: 600; }
}
svg.chart .axis { font-size: 12px; fill: #6b7382; font-weight: 400; }
svg.chart .axis.val { font-weight: 600; fill: #3a404b; }
svg.chart .axis.lab { font-size: 12px; fill: #3a404b; }
svg.chart.donut { width: 100%; max-width: 560px; height: auto; display: block; margin: 0 auto; }
.donut-wrap { display: block; }
.chart-legend { font-size: 12px; color: #3a404b; }
.chart-legend.row { gap: 4px 16px; margin-bottom: 8px; }
.chart-legend i { width: 14px; height: 9px; border-radius: 1px; margin-right: 6px; vertical-align: 0; }
svg.chart .axis.lab .sub { fill: #6b7382; font-size: 12px; }

/* what the chart is saying, in one line; Explain hands the figures to the assistant */
.chart-note { margin: 8px 0 0; font-size: 12.5px; line-height: 1.45; color: #4a5160; display: flex; gap: 10px; align-items: baseline; justify-content: space-between; }
.chart-ask { flex: none; border: 0; background: none; padding: 0; font: inherit; font-size: 12px; color: var(--brand-blue, #233b91); cursor: pointer; text-decoration: underline; text-underline-offset: 2px; }
.chart-ask[hidden] { display: none; }
@media print { .chart-ask { display: none; } }

/* ---- plain.css ---- */
/* Plain look. Loaded last. Removes the two patterns people read as "made by AI":
   a thick coloured stripe down one side of a rounded card, and soft two-colour gradient washes.
   Status is shown by a quiet tint of the whole border and background, plus the words already on the item. */
:root { --pl-line: var(--gray-30); --pl-red-line: var(--red-20); --pl-red-bg: var(--gray-10); --pl-amb-line: var(--amber-20); --pl-amb-bg: var(--cream);
  --pl-grn-line: var(--green-20); --pl-grn-bg: var(--green-10); --pl-blue-bg: var(--blue-10); }

/* side stripes -> one even border */
.ems-app .flash li, .ems-app .flash .success, .ems-app .flash .error, .ems-app .flash .warning,
.feedback-toast, .ems-app .feedback-toast, .ems-app .feedback-toast.critical, .feedback-toast.critical, .feedback-toast.done,
.prio-strip, .prio-strip.late, .prio-list li, .prio-list li.late, .prio-list li.urgent, .prio-group.doing .prio-list li,
.rg-cycle, .rg-cycle.late, .rg-anchor, .aqi-card, .work-intro, .ems-app .work-intro {
  border: 1px solid var(--pl-line); border-left: 1px solid var(--pl-line); }

.ems-app .flash li, .feedback-toast, .ems-app .feedback-toast { background: #fff; box-shadow: 0 4px 14px rgba(20, 30, 60, .08); }
.ems-app .flash .success, .feedback-toast.done { border-color: var(--pl-grn-line); background: var(--pl-grn-bg); }
.ems-app .flash .warning { border-color: var(--pl-amb-line); background: var(--pl-amb-bg); }
.ems-app .flash .error, .feedback-toast.critical, .ems-app .feedback-toast.critical { border-color: var(--pl-red-line); background: var(--pl-red-bg); }
.prio-strip.late, .prio-list li.late, .rg-cycle.late { border-color: var(--pl-red-line); background: var(--pl-red-bg); }
.prio-list li.urgent { border-color: var(--pl-amb-line); background: var(--pl-amb-bg); }
.prio-group.doing .prio-list li { border-color: var(--pl-grn-line); }
.aqi-card { border-top: 4px solid var(--aqi); }

/* gradient washes -> flat colour */
.ems-app, .ems-app .main { background: var(--brand-cream, var(--cream)); }
.ems-app .side { background: #fff; }
.ems-app .side-head, .ems-app .top, .ems-app .module-card, .ems-app .work-intro, .work-intro { background: #fff; }
.ems-app .nav a.on { background: var(--pl-blue-bg); box-shadow: none; font-weight: 600; }

/* instant-alerts prompt */
#push-bar { position: fixed; left: 50%; bottom: 18px; transform: translateX(-50%); z-index: 1200; display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  max-width: calc(100% - 32px); padding: 12px 14px; background: #fff; color: var(--gray-90); border: 1px solid var(--gray-30); border-radius: 10px; box-shadow: 0 8px 26px rgba(20, 30, 60, .16); font-size: 14px; line-height: 1.4; }
#push-bar button { border: 1px solid var(--blue); border-radius: 8px; padding: 7px 14px; font-family: inherit; font-size: 13px; font-weight: 600; cursor: pointer; background: #fff; color: var(--blue); }
#push-bar .push-on { background: var(--blue); color: #fff; }

/* "Open" in an alert is a real button */
.feedback-toast a.toast-open, .ems-app .feedback-toast a.toast-open { display: inline-flex; align-items: center; justify-self: start; width: max-content; margin-top: 8px;
  padding: 6px 16px; border-radius: 8px; background: var(--blue); color: #fff; font-size: 13px; font-weight: 600; text-decoration: none; border: 1px solid var(--blue); }
.feedback-toast a.toast-open:hover { background: var(--blue-70); color: #fff; }

/* Readable fields everywhere (audit: most boxes were 30px tall with 13px text). !important because many
   page and component styles set smaller sizes with higher specificity; hidden native controls are excluded. */
body.ems-app input:not([type=checkbox]):not([type=radio]):not([type=file]):not([type=hidden]):not([type=color]):not([type=range]):not(.combo-native):not(.ss-native),
body.ems-app select:not(.combo-native):not(.ss-native), body.ems-app textarea, body.ems-app .combo-trigger, body.ems-app .ss-input {
  font-size: 14px; min-height: 40px; line-height: 1.29; }  /* Carbon field: 40px tall, 14px text */
body.ems-app textarea { min-height: 90px !important; }
body.ems-app .combo-search { font-size: 15px !important; min-height: 40px !important; }
body.ems-app .combo-opt { font-size: 15px; padding: 10px 14px; }
body.ems-app input::placeholder, body.ems-app textarea::placeholder { color: var(--gray-50); }
body.ems-app .field label { font-size: 14px; }
/* top bar: compact but readable */
body.ems-app .top .pill-select, body.ems-app .top select { font-size: 14px !important; min-height: 32px !important; height: 32px; }
body.ems-app .top .search input { font-size: 14px !important; min-height: 0 !important; }
@media (max-width: 760px) {  /* 16px stops iPhone from zooming into a field */
  body.ems-app input:not([type=checkbox]):not([type=radio]):not([type=file]):not([type=hidden]):not(.combo-native):not(.ss-native),
  body.ems-app select:not(.combo-native):not(.ss-native), body.ems-app textarea { font-size: 16px !important; min-height: 46px !important; }
}
@media (max-width: 760px) {
  html body.ems-app .top select.pill-select { font-size: 16px !important; min-height: 34px !important; height: 34px; }
  html body.ems-app .top .search input { font-size: 16px !important; min-height: 0 !important; }
}

/* Label beside the box only when the form is wide enough; in narrow panels (side cards, phone) the label goes on top
   and the box takes the full width. Audit: boxes in side cards were squeezed to 18px. */
body.ems-app .form { container-type: inline-size; }
body.ems-app .form .fields > .field > label { font-size: 14px !important; }
@container (max-width: 700px) {
  body.ems-app .form .fields { grid-template-columns: minmax(0, 1fr) !important; }
  body.ems-app .form .fields > .field:not(.check) { display: block !important; }
  body.ems-app .form .fields > .field:not(.check) > label { text-align: left !important; margin: 0 0 6px !important; }
  body.ems-app .form .fields > .field > input:not([type=checkbox]):not([type=radio]), body.ems-app .form .fields > .field > select,
  body.ems-app .form .fields > .field > textarea, body.ems-app .form .fields > .field > .combo { width: 100% !important; }
}

/* small number boxes: room for the whole value */
body.ems-app select[name=year] { min-width: 100px; }
body.ems-app input[type=number], body.ems-app input[inputmode=decimal] { min-width: 96px; }

/* Hubs: the tabs of the hub you are in (ems/hubs.py) */
body.ems-app .hub-tabs { display: flex; gap: 4px; margin: 0 0 18px; padding-bottom: 2px; border-bottom: 1px solid var(--z200); overflow-x: auto; scrollbar-width: thin; }
body.ems-app .hub-tabs a { flex: none; padding: 9px 12px; font-size: 13.5px; font-weight: 600; color: var(--z600); text-decoration: none; border-bottom: 2px solid transparent; margin-bottom: -3px; white-space: nowrap; }
body.ems-app .hub-tabs a:hover { color: var(--blue); }
body.ems-app .hub-tabs a[aria-current] { color: var(--blue); border-bottom-color: var(--green); }
body.ems-app .hub-tabs b { margin-left: 6px; background: var(--red); color: #fff; border-radius: 9px; padding: 0 6px; font-size: 12px; }
/* Report: the one button for anything that happened */
body.ems-app .btn-report { background: var(--green); color: var(--green-80); border-color: transparent; font-weight: 700; }
body.ems-app .btn-report:hover { filter: brightness(.95); color: var(--green-80); }
body.ems-app .rt-title { font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; color: var(--z500); margin: 4px 0 8px; }
body.ems-app .rt-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 10px; margin-bottom: 14px; }
body.ems-app .rt { display: flex; flex-direction: column; align-items: flex-start; gap: 8px; padding: 14px; border: 1px solid var(--z200); border-radius: 12px; background: #fff; color: var(--z900); font-weight: 600; font-size: 14px; text-decoration: none; transition: border-color .15s, transform .15s; }
body.ems-app .rt svg { width: 22px; height: 22px; color: var(--blue); }
body.ems-app .rt.rt-bad svg { color: var(--red); }
body.ems-app .rt:hover { border-color: var(--blue); transform: translateY(-1px); }
body.ems-app .home-report { margin-bottom: 16px; padding-bottom: 4px; }
body.ems-app .home-wait { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 16px; }
body.ems-app .home-wait a { display: flex; align-items: center; gap: 8px; padding: 12px 16px; text-decoration: none; color: var(--z900); font-size: 14px; }
body.ems-app .home-wait svg { width: 18px; height: 18px; color: var(--blue); }
body.ems-app .home-wait b { color: var(--red); font-size: 16px; }
@media (max-width: 760px) { body.ems-app .rt-grid { grid-template-columns: repeat(2, 1fr); } body.ems-app .btn-report .txt { display: inline; } }
@media (prefers-color-scheme: dark) { body.ems-app.theme-auto .rt { background: transparent; } }
@media (max-width: 560px) { body.ems-app .top .quick-add { display: none; } body.ems-app .btn-report { padding-left: 12px; padding-right: 12px; } }
/* Row actions: words, not a row of unlabelled icons */
body.ems-app .row-acts { display: inline-flex; gap: 6px; align-items: center; justify-content: flex-end; white-space: nowrap; }
body.ems-app .row-more > summary { list-style: none; cursor: pointer; }
body.ems-app .row-more > summary::-webkit-details-marker { display: none; }
body.ems-app .row-pop, .row-pop-float { position: fixed; z-index: 80; min-width: 190px; background: #fff; border: 1px solid var(--z200); border-radius: 12px; box-shadow: 0 16px 40px -12px rgba(0,0,0,.25); padding: 6px; text-align: left; }
body.ems-app .row-pop a, .row-pop-float a { display: flex; gap: 10px; align-items: center; padding: 9px 10px; border-radius: 8px; color: var(--z900); font-size: 14px; text-decoration: none; }
body.ems-app .row-pop a:hover, .row-pop-float a:hover { background: var(--blue-10); }
body.ems-app .row-pop svg, .row-pop-float svg { width: 16px; height: 16px; color: var(--blue); }
/* Keep the last lines of a page clear of the assistant button */
body.ems-app .main { padding-bottom: 88px; }
body.ems-app .row-acts .btn, body.ems-app .row-pop a, .row-pop-float a { text-transform: none; letter-spacing: 0; }
body.ems-app .row-pop, .row-pop-float { z-index: 300; white-space: nowrap; }
/* Search in the title bar: the text field fits inside its box (it was taller and spilled out of the bottom) */
body.ems-app .top .search { height: 32px; display: flex; align-items: center; position: relative; overflow: hidden; }
#shell .top .search input, #shell .top .pill-select { min-height: 0 !important; font-size: 13.5px !important; }
body.ems-app .top .search input { height: 100% !important; line-height: 30px; font-size: 13.5px; padding: 0 12px 0 34px; border: 0; border-radius: inherit; box-shadow: none; }
body.ems-app .top .search svg, body.ems-app .top .search i { position: absolute; left: 11px; top: 50%; transform: translateY(-50%); width: 16px; height: 16px; pointer-events: none; }
/* Home: safety numbers */
body.ems-app .home-safety { margin-bottom: 16px; }
body.ems-app .hs-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
body.ems-app .hs-grid a { display: flex; flex-direction: column; gap: 4px; padding: 12px 14px; border: 1px solid var(--z200); border-radius: 12px; text-decoration: none; color: var(--z700); font-size: 13px; }
body.ems-app .hs-grid a:hover { border-color: var(--blue); }
body.ems-app .hs-grid b { font-size: 26px; line-height: 1; color: var(--blue); }
body.ems-app .hs-grid a.bad b, body.ems-app .hs-grid em { color: var(--red); font-style: normal; }
@media (max-width: 760px) { body.ems-app .hs-grid { grid-template-columns: repeat(2, 1fr); } }


/* Home heading: greeting on the left, one photo on the right that changes now and then. No overlays. */
body.ems-app .home-head { display: flex; align-items: center; justify-content: space-between; gap: 16px 28px; margin: 6px 0 18px; }
body.ems-app .home-head .page-title { margin: 0; }
body.ems-app .home-head .hh-sub { margin: 4px 0 14px; font-size: 13.5px; color: var(--z500); }
body.ems-app .home-head .actions { display: flex; gap: 8px; flex-wrap: wrap; }
body.ems-app .hh-photo { position: relative; flex: 0 0 min(46%, 620px); height: 190px; border-radius: 10px; overflow: hidden; background: var(--gray-20); }
body.ems-app .hh-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0; transition: opacity 1.4s ease; }
body.ems-app .hh-img.on { opacity: 1; }
@media (max-width: 760px) { body.ems-app .home-head.with-photo { flex-direction: column-reverse; align-items: stretch; } body.ems-app .hh-photo { flex-basis: auto; height: 150px; } }
@media (prefers-reduced-motion: reduce) { body.ems-app .hh-img { transition: none; } }
/* one Report button: on the home page the header carries it, so the bar does not repeat it */
body.ems-app:has(.home-head) .top .btn-report { display: none; }
/* Tick lists (choose several): chips that wrap, a filter box for long lists */
body.ems-app .field.multi > div[id] { display: flex; flex-wrap: wrap; gap: 8px; max-height: 260px; overflow-y: auto; padding: 2px; }
body.ems-app .field.multi > div[id] > div { margin: 0; }
body.ems-app .field.multi label:has(input) { display: inline-flex; align-items: center; gap: 8px; margin: 0; padding: 7px 12px; border: 1px solid var(--z200); border-radius: 999px; background: #fff; font-size: 14px; font-weight: 500; cursor: pointer; text-transform: none; letter-spacing: 0; color: var(--z700); }
body.ems-app .field.multi label:has(input:checked) { border-color: var(--blue); background: var(--blue-10); color: var(--blue); }
body.ems-app .field.multi label:has(input) input { min-height: 0 !important; width: 16px; height: 16px; margin: 0; accent-color: var(--blue); }
body.ems-app .mp-tools { display: flex; gap: 10px; align-items: center; margin: 4px 0 8px; }
body.ems-app .mp-tools input { max-width: 260px; min-height: 36px !important; font-size: 14px !important; }
body.ems-app .mp-tools button { background: none; border: 0; color: var(--blue); font-size: 13px; cursor: pointer; padding: 4px; }
body.ems-app .mp-count { font-size: 13px; color: var(--z500); }

/* Branches: map of the group and one card per branch */
body.ems-app .br-tot { font-size: 13px; color: var(--z500); }
body.ems-app .br-map-wrap { position: relative; margin: 0 0 18px; }
body.ems-app .br-map { height: 380px; border-radius: 18px; overflow: hidden; background: var(--blue-10); }
body.ems-app .br-map-empty { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); background: #fff; padding: 10px 16px; border-radius: 12px; font-size: 14px; color: var(--z600); box-shadow: 0 10px 30px -12px rgba(0,0,0,.25); z-index: 500; }
body.ems-app .br-pin span { display: block; width: 22px; height: 22px; border-radius: 50%; background: var(--blue); border: 3px solid #fff; box-shadow: 0 0 0 6px color-mix(in srgb, var(--blue) 22%, transparent), 0 6px 14px -4px rgba(0,0,0,.4); }
body.ems-app .br-pin.root span { background: var(--green); box-shadow: 0 0 0 6px color-mix(in srgb, var(--green) 28%, transparent), 0 6px 14px -4px rgba(0,0,0,.4); }
body.ems-app .br-pop-k { color: var(--blue); font-weight: 600; margin: 4px 0 2px; }
body.ems-app .br-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 14px; margin-bottom: 16px; }
body.ems-app .br-card { display: flex; flex-direction: column; gap: 10px; }
body.ems-app .br-card.here { outline: 2px solid var(--green); }
body.ems-app .br-top { display: flex; justify-content: space-between; gap: 10px; }
body.ems-app .br-top h3 { margin: 0; font-size: 17px; color: var(--blue); }
body.ems-app .br-where { display: flex; align-items: center; gap: 6px; font-size: 13px; color: var(--z600); margin-top: 3px; }
body.ems-app .br-where svg { width: 14px; height: 14px; color: var(--green-ink); }
body.ems-app .br-kinds { display: flex; flex-wrap: wrap; gap: 6px; }
body.ems-app .br-kinds span { background: var(--blue-10); color: var(--blue); font-size: 12px; font-weight: 600; padding: 3px 10px; border-radius: 999px; }
body.ems-app .br-does { margin: 0; font-size: 14px; color: var(--z700); }
body.ems-app .br-sites { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; font-size: 13px; }
body.ems-app .br-sites b { font-size: 12px; text-transform: uppercase; letter-spacing: .06em; color: var(--z500); margin-right: 2px; }
body.ems-app .br-sites span { border: 1px solid var(--z200); padding: 2px 9px; border-radius: 999px; background: #fff; }
body.ems-app .br-nums { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; border-top: 1px solid var(--z100); padding-top: 10px; }
body.ems-app .br-nums span { display: flex; flex-direction: column; font-size: 12px; color: var(--z500); line-height: 1.25; }
body.ems-app .br-nums b { font-size: 18px; color: var(--z900); }
body.ems-app .br-nums .warn b { color: var(--amber-70); } body.ems-app .br-nums .bad b { color: var(--red); }
body.ems-app .br-foot { display: flex; gap: 8px; align-items: flex-start; flex-wrap: wrap; margin-top: auto; }
body.ems-app .br-edit { flex: 1 1 100%; }
body.ems-app .br-edit > summary { list-style: none; cursor: pointer; display: inline-flex; }
body.ems-app .br-edit > summary::-webkit-details-marker { display: none; }
body.ems-app .br-edit[open] > summary { margin-bottom: 10px; }
body.ems-app .br-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 10px; }
body.ems-app .br-chips label { display: inline-flex; align-items: center; gap: 6px; padding: 5px 10px; border: 1px solid var(--z200); border-radius: 999px; font-size: 13px; cursor: pointer; background: #fff; }
body.ems-app .br-chips label:has(input:checked) { border-color: var(--blue); background: var(--blue-10); color: var(--blue); }
body.ems-app .br-chips input { min-height: 0 !important; width: 15px; height: 15px; margin: 0; accent-color: var(--blue); }
body.ems-app .br-tip { font-size: 12.5px; margin: 6px 0 10px; }
body.ems-app .br-add > summary { cursor: pointer; font-weight: 600; color: var(--blue); display: flex; gap: 8px; align-items: center; list-style: none; }
body.ems-app .br-add > summary::-webkit-details-marker { display: none; }
body.ems-app .br-add[open] > summary { margin-bottom: 12px; }
@media (max-width: 760px) { body.ems-app .br-map { height: 260px; } body.ems-app .br-nums { grid-template-columns: repeat(2, 1fr); } }

}
@layer ds {
/* ---- ds/tokens.css ---- */
/* Emooto design system = IBM Carbon (v11), Gray 10 theme. Values are Carbon's own tokens.
   Typeface IBM Plex (self-hosted, SIL Open Font Licence in static/fonts/plex/LICENSE.txt).
   A company's own colour (Settings > Look) replaces Carbon blue for interactive elements via --blue. */
@font-face { font-family: "IBM Plex Sans"; font-style: normal; font-weight: 300; font-display: swap; src: url("../fonts/plex/IBMPlexSans-Light-Latin1.woff2") format("woff2"); }
@font-face { font-family: "IBM Plex Sans"; font-style: normal; font-weight: 400; font-display: swap; src: url("../fonts/plex/IBMPlexSans-Regular-Latin1.woff2") format("woff2"); }
@font-face { font-family: "IBM Plex Sans"; font-style: normal; font-weight: 600; font-display: swap; src: url("../fonts/plex/IBMPlexSans-SemiBold-Latin1.woff2") format("woff2"); }
@font-face { font-family: "IBM Plex Mono"; font-style: normal; font-weight: 400; font-display: swap; src: url("../fonts/plex/IBMPlexMono-Regular-Latin1.woff2") format("woff2"); }

:root, body, .ems-app {
  /* Clanert Sustain colours: blue #243C94 for every interactive element, green #8BC741 for success and brand accents.
     A company's own colours (Settings > Look) replace them. */
  --blue: #243c94; --green: #8bc741; --cream: #f4f4f4;

  /* Carbon palette (subset used) */
  --gray-10: #f4f4f4; --gray-20: #e0e0e0; --gray-30: #c6c6c6; --gray-40: #a8a8a8; --gray-50: #8d8d8d;
  --gray-60: #6f6f6f; --gray-70: #525252; --gray-80: #393939; --gray-90: #262626; --gray-100: #161616;
  --blue-10: color-mix(in srgb, var(--blue) 8%, #fff); --blue-20: color-mix(in srgb, var(--blue) 20%, #fff); --blue-60: var(--blue);
  --blue-70: color-mix(in srgb, var(--blue) 82%, #000); --blue-80: color-mix(in srgb, var(--blue) 60%, #000);
  --red-10: #fff1f1; --red-20: #ffd7d9; --red-60: #da1e28; --red-70: #a2191f;
  --green-10: color-mix(in srgb, var(--green) 14%, #fff); --green-20: color-mix(in srgb, var(--green) 38%, #fff); --green-50: var(--green);
  --green-70: color-mix(in srgb, var(--green) 45%, #000);
  --yellow-20: #fddc69; --yellow-30: #f1c21b; --yellow-80: #483700;
  --purple-20: #e8daff; --purple-70: #6929c4; --cyan-20: #bae6ff; --cyan-70: #00539a; --teal-20: #9ef0f0; --teal-70: #005d5d;
  --gray-0: #ffffff; --amber-10: #fcf4d6; --amber-20: #f8e6a0; --amber-70: #8e6a00; --blue-40: #78a9ff; --green-80: #044317;

  /* Carbon categorical chart palette (14), in Carbon's order */
  --cat-1: #6929c4; --cat-2: #1192e8; --cat-3: #005d5d; --cat-4: #9f1853; --cat-5: #fa4d56; --cat-6: #570408; --cat-7: #198038;
  --cat-8: #002d9c; --cat-9: #ee538b; --cat-10: #b28600; --cat-11: #009d9a; --cat-12: #012749; --cat-13: #8a3800; --cat-14: #a56eff;

  /* Carbon semantic tokens, Gray 10 theme */
  --background: #f4f4f4;
  --layer-01: #ffffff; --layer-02: #f4f4f4;
  --layer-hover: #e8e8e8; --layer-selected: #e0e0e0; --layer-accent: #e0e0e0;
  --field-01: #ffffff; --field-02: #f4f4f4; --field-hover: #e8e8e8;
  --border-subtle: #e0e0e0; --border-subtle-01: #c6c6c6; --border-strong: #8d8d8d; --border-interactive: var(--blue);
  --text-primary: #161616; --text-secondary: #525252; --text-helper: #6f6f6f; --text-placeholder: #a8a8a8; --text-on-color: #ffffff;
  --text-brand: #161616;
  --icon-primary: #161616; --icon-secondary: #525252;
  --link-primary: var(--blue); --link-hover: color-mix(in srgb, var(--blue) 82%, #fff);
  --interactive: var(--blue);
  /* the brand blue is deep navy: hover goes LIGHTER so the change shows (white text stays 6:1); pressed goes darker */
  --interactive-hover: color-mix(in srgb, var(--blue) 82%, #fff); --interactive-active: color-mix(in srgb, var(--blue) 70%, #000);
  --button-secondary: #393939; --button-secondary-hover: #474747; --button-danger: #da1e28; --button-danger-hover: #b81921;
  --highlight: var(--blue-20); --brand-accent: var(--green);
  --focus: var(--blue); --focus-inset: #ffffff;
  --focus-ring: inset 0 0 0 2px var(--blue), inset 0 0 0 3px #ffffff;
  --support-error: #da1e28;   --support-error-bg: #fff1f1;
  --support-warning: #8e6a00; --support-warning-bg: #fcf4d6; --support-warning-icon: #f1c21b;
  --support-success: var(--green-70); --support-success-bg: var(--green-10); --support-success-icon: color-mix(in srgb, var(--green) 70%, #000);
  --support-info: var(--blue);    --support-info-bg: var(--blue-10);
  --layer-hover-raised: var(--layer-hover);

  /* UI shell (Carbon header is Gray 100) */
  /* UI shell header in Clanert blue (Carbon header anatomy; text and icons white at 9.8:1) */
  --shell-bg: var(--blue); --shell-text: #ffffff; --shell-text-strong: #ffffff;
  --shell-hover: color-mix(in srgb, var(--blue) 82%, #fff); --shell-active: color-mix(in srgb, var(--blue) 70%, #000);
  --shell-field: color-mix(in srgb, var(--blue) 75%, #000); --shell-field-line: color-mix(in srgb, var(--blue) 45%, #fff); --shell-border: color-mix(in srgb, var(--blue) 70%, #000);

  /* spacing (Carbon scale) */
  --space-01: 2px; --space-02: 4px; --space-03: 8px; --space-04: 12px; --space-05: 16px; --space-06: 24px; --space-07: 32px; --space-08: 40px; --space-09: 48px;
  /* Carbon is square: 0 corners; tags are fully rounded */
  --radius-sm: 0; --radius-md: 0; --radius-lg: 0; --radius-full: 24px;
  /* type: IBM Plex, Carbon productive type set */
  --font: "IBM Plex Sans", "Helvetica Neue", Arial, sans-serif; --font-mono: "IBM Plex Mono", Menlo, Consolas, monospace;
  --weight-light: 300; --weight-regular: 400; --weight-semibold: 600;
  --lh-12: 16px; --lh-14: 18px; --lh-16: 24px; --lh-28: 36px;
  --text-xs: 12px; --text-sm: 14px; --text-md: 14px; --text-lg: 16px; --heading-sm: 14px; --heading-md: 20px; --heading-lg: 28px;
  --tracking-body: .16px; --tracking-label: .32px;
  /* motion: Carbon productive easing and durations */
  --duration-fast: 110ms; --duration-moderate: 150ms; --easing: cubic-bezier(.2, 0, .38, .9);

  /* legacy names pointing at Carbon tokens (until every old rule is retired) */
  --z50: #f4f4f4; --z100: #f4f4f4; --z200: #e0e0e0; --z300: #c6c6c6; --z400: #a8a8a8; --z500: #6f6f6f; --z600: #525252; --z700: #393939; --z900: #161616;
  --green-ink: var(--green-70); --red: #da1e28; --red-ink: #a2191f; --blue-dark: var(--blue-70); --amber-50: #f1c21b; --red-50: #fa4d56; --red-80: #750e13;
  --brand-blue: var(--blue); --brand-green: var(--green); --brand-cream: #f4f4f4; --green-40: var(--green);
  --ink: #161616; --text: #393939; --soft: #525252; --line: #e0e0e0; --page: #f4f4f4;
  --shadow: none; --shadow-soft: none;
}

/* ---- ds/components.css ---- */
/* Emooto design system = IBM Carbon (v11) components, applied to Emooto's class names.
   Layer "ds" sits above the legacy layer, so these plain selectors win without !important.
   Square corners, Plex type, 1px dividers, blue for interaction, colour only for meaning. */

/* ---------- base ---------- */
body.ems-app, body.ems-app .main { font-family: var(--font); color: var(--text-primary); background: var(--background); letter-spacing: var(--tracking-body); }
body.ems-app { font-size: var(--text-sm); line-height: var(--lh-14); -webkit-font-smoothing: antialiased; }
body.ems-app button, body.ems-app input, body.ems-app select, body.ems-app textarea { font-family: var(--font); letter-spacing: var(--tracking-body); }
code, kbd, .mono, .ref, td.k-strong strong { font-family: var(--font-mono); letter-spacing: 0; }

/* ---------- type (Carbon productive) ---------- */
.page-title { color: var(--text-primary); font-weight: var(--weight-regular); font-size: var(--heading-lg); line-height: var(--lh-28); letter-spacing: 0; margin: 0; }
.section-title { color: var(--text-primary); font-weight: var(--weight-semibold); font-size: var(--heading-sm); line-height: var(--lh-14); letter-spacing: var(--tracking-body); }
.eyebrow, .label, .t th, .field label, .kpi .label, .prio-head, .rt-title, .nav-group { text-transform: none; letter-spacing: var(--tracking-label); }
.eyebrow { font-size: var(--text-xs); color: var(--text-secondary); }
.field label, .label { font-size: var(--text-xs); color: var(--text-secondary); font-weight: var(--weight-regular); }
.muted, .help { color: var(--text-helper); }
.lead { color: var(--text-secondary); }

/* ---------- links ---------- */
.content :where(a:not([class])) { color: var(--link-primary); text-decoration: none; }
.content :where(a:not([class])):hover { color: var(--link-hover); text-decoration: underline; }
/* Carbon inline link: links inside sentences are underlined, because the navy brand blue is close to body text
   (1.85:1) and colour alone would not show them. Tabs, tiles, menus and buttons keep no underline. */
.content :where(p, li, td, dd, small, label, .lead, .help, .sub, .muted, .err) a:not([class]) { text-decoration: underline; text-underline-offset: 2px; text-decoration-thickness: 1px; }

/* ---------- surfaces: Carbon tiles are square, white, no border on the grey page ---------- */
.card { background: var(--layer-01); border: 0; border-radius: 0; box-shadow: none; }

/* ---------- buttons: square; text left, icon right ---------- */
.btn { border-radius: 0; box-shadow: none; min-height: 40px; padding: 0 var(--space-05); gap: var(--space-04); flex-direction: row-reverse; justify-content: space-between;
  background: transparent; border: 1px solid var(--interactive); color: var(--interactive); font-weight: var(--weight-regular); font-size: var(--text-sm); letter-spacing: var(--tracking-body); text-transform: none;
  transition: background-color var(--duration-fast) var(--easing), color var(--duration-fast) var(--easing), border-color var(--duration-fast) var(--easing); }
.btn:hover { background: var(--interactive-hover); border-color: var(--interactive-hover); color: var(--text-on-color); }
.btn:active { background: var(--interactive-active); border-color: var(--interactive-active); color: var(--text-on-color); }
.btn svg { width: 16px; height: 16px; color: currentColor; }
.btn-primary, .btn.btn-primary { background: var(--interactive); border-color: transparent; color: var(--text-on-color); }
.btn-primary:hover, .btn.btn-primary:hover { background: var(--interactive-hover); color: var(--text-on-color); }
.btn-primary:active, .btn.btn-primary:active { background: var(--interactive-active); }
.btn-secondary, .btn.btn-secondary { background: var(--button-secondary); border-color: transparent; color: var(--text-on-color); }
.btn-secondary:hover { background: var(--button-secondary-hover); }
.btn-danger, .btn.danger, .btn.btn-danger { background: var(--button-danger); border-color: transparent; color: var(--text-on-color); }
.btn-danger:hover, .btn.danger:hover { background: var(--button-danger-hover); }
.btn-sm, .btn.btn-sm { min-height: 32px; padding: 0 var(--space-04); font-size: var(--text-sm); }
/* ghost buttons: row actions and quiet links */
.row-acts .btn, .btn-ghost, .btn.ghost { background: transparent; border-color: transparent; color: var(--interactive); }
.row-acts .btn:hover, .btn-ghost:hover, .btn.ghost:hover { background: var(--layer-hover); color: var(--interactive-hover); border-color: transparent; }

/* ---------- focus: Carbon's 2px blue inset ring ---------- */
a:focus-visible, button:focus-visible, .btn:focus-visible, summary:focus-visible, [tabindex]:focus-visible { outline: 2px solid var(--focus); outline-offset: -2px; box-shadow: none; }
.btn-primary:focus-visible, .btn.btn-primary:focus-visible { box-shadow: var(--focus-ring); outline: 0; }

/* ---------- text inputs: grey field, bottom rule, square ---------- */
.content input:not([type=checkbox]):not([type=radio]):not([type=file]):not([type=range]):not([type=color]),
.content select, .content textarea, .content .combo-trigger, .content .ss-input {
  background-color: var(--field-02); border: 0; border-bottom: 1px solid var(--border-strong); border-radius: 0; color: var(--text-primary); box-shadow: none; }
.card input:not([type=checkbox]):not([type=radio]):not([type=file]):not([type=range]):not([type=color]),
.card select, .card textarea, .card .combo-trigger, .card .ss-input { background-color: var(--field-02); }
.content input:not([type=checkbox]):not([type=radio]):hover, .content select:hover, .content textarea:hover { background-color: var(--field-hover); }
input:focus, select:focus, textarea:focus, .combo-trigger:focus { outline: 2px solid var(--focus); outline-offset: -2px; box-shadow: none; border-bottom-color: transparent; }
::placeholder { color: var(--text-placeholder); }
input[type=checkbox], input[type=radio] { accent-color: var(--text-primary); }
.has-error input, .has-error select, .has-error textarea { outline: 2px solid var(--support-error); outline-offset: -2px; }
.err, .errorlist { color: var(--support-error); }

/* ---------- UI shell header: Carbon header anatomy in Clanert blue ---------- */
body.ems-app .top { background: var(--shell-bg); color: var(--shell-text); border: 0; border-bottom: 3px solid var(--brand-accent); }
body.ems-app .tb-brand img { filter: brightness(0) invert(1); }
body.ems-app .top .icon-btn { color: var(--shell-text); border-radius: 0; }
body.ems-app .top .icon-btn:hover { background: var(--shell-hover); color: var(--shell-text-strong); }
body.ems-app .top .icon-btn:active { background: var(--shell-active); }
body.ems-app .top .pill-select, body.ems-app .top .search, body.ems-app .top .nav-hist button {
  background-color: var(--shell-field); border: 0; border-bottom: 1px solid var(--shell-field-line); color: var(--shell-text-strong); border-radius: 0; }
body.ems-app .top .nav-hist button:hover { background-color: var(--shell-hover); }
body.ems-app .top .pill-select option { color: var(--text-primary); background: var(--text-on-color); }
body.ems-app .top .search input { color: var(--shell-text-strong); background: transparent; }
body.ems-app .top .search input::placeholder, body.ems-app .top .search svg { color: color-mix(in srgb, var(--text-on-color) 75%, var(--blue)); }
body.ems-app .top .search:focus-within, body.ems-app .top .pill-select:focus { outline: 2px solid var(--text-on-color); outline-offset: -2px; }
body.ems-app .top a:focus-visible, body.ems-app .top button:focus-visible, body.ems-app .top summary:focus-visible { outline: 2px solid var(--text-on-color); outline-offset: -2px; }
@media (min-width: 900px) {
  body.ems-app .top { height: 51px; min-height: 51px; }
  body.ems-app .top .icon-btn { width: 48px; height: 48px; }
  body.ems-app .mbar { top: 51px; background: var(--layer-01); border-bottom: 1px solid var(--border-subtle); }
}
/* actions in the blue bar: Report is the one filled action (Clanert green, dark text 8.9:1); New is outlined white */
.top .btn-report { background: var(--brand-accent); color: var(--text-primary); border: 0; border-radius: 0; font-weight: var(--weight-semibold); }
.top .btn-report:hover { background: color-mix(in srgb, var(--green) 85%, var(--text-on-color)); color: var(--text-primary); }
.top .btn-report svg { color: var(--text-primary); }
.top .quick-add > summary { background: transparent; color: var(--shell-text); border: 1px solid rgba(255,255,255,.7); border-radius: 0; }
.top .quick-add > summary:hover { background: var(--shell-hover); color: var(--text-on-color); }
.top .avatar { background: var(--text-on-color); color: var(--blue); border-radius: 50%; display: grid; place-items: center; font-weight: var(--weight-semibold); }
.top .icon-btn .dot { background: var(--support-error); color: var(--text-on-color); box-shadow: 0 0 0 2px var(--blue); }

/* ---------- module bar (header navigation): Carbon colours on the icons, blue mark on the open module ---------- */
.mb-ico.c0 { color: var(--cat-8); } .mb-ico.c1 { color: var(--cat-2); } .mb-ico.c2 { color: var(--cat-7); } .mb-ico.c3 { color: var(--cat-10); }
.mb-ico.c4 { color: var(--cat-11); } .mb-ico.c5 { color: var(--cat-5); } .mb-ico.c6 { color: var(--cat-1); } .mb-ico.c7 { color: var(--cat-3); }
.mb-item > a, .mb-item > button { color: var(--text-secondary); font-weight: var(--weight-regular); letter-spacing: var(--tracking-label); transition: background-color var(--duration-fast) var(--easing), color var(--duration-fast) var(--easing); }
.mb-item > a:hover, .mb-item > button:hover { background: var(--layer-hover); color: var(--text-primary); }
.mb-item > a.on, .mb-item.on > button { border-bottom: 3px solid var(--interactive); color: var(--text-primary); font-weight: var(--weight-semibold); background: var(--layer-selected); }
.mb-dot { background: var(--support-error); }
.mb-pop { border: 0; border-radius: 0; box-shadow: 0 2px 6px rgba(0,0,0,.3); }
.mb-pop a:hover { background: var(--layer-hover); }

/* ---------- tabs (Carbon line tabs) ---------- */
.hub-tabs, .workspace-tabs { border-bottom: 2px solid var(--border-subtle); gap: 0; }
.hub-tabs a, .workspace-tabs a { color: var(--text-secondary); font-weight: var(--weight-regular); border-bottom: 2px solid transparent; margin-bottom: -2px; padding: var(--space-04) var(--space-05); transition: color var(--duration-fast) var(--easing), border-color var(--duration-fast) var(--easing); }
.hub-tabs a:hover, .workspace-tabs a:hover { color: var(--text-primary); border-bottom-color: var(--border-strong); }
.hub-tabs a[aria-current], .workspace-tabs a[aria-current] { color: var(--text-primary); font-weight: var(--weight-semibold); border-bottom-color: var(--interactive); }

/* ---------- counts ---------- */
.hub-tabs b, .nav b, .mb-pop a b { background: var(--gray-20); color: var(--text-primary); font-weight: var(--weight-regular); border-radius: var(--radius-full); }

/* ---------- tags (Carbon tag: 24px, fully rounded) ---------- */
.badge { border: 0; box-shadow: none; font-weight: var(--weight-regular); letter-spacing: var(--tracking-label); text-transform: none; border-radius: var(--radius-full); padding: 0 var(--space-03); min-height: 24px; line-height: var(--lh-16); font-size: var(--text-xs); background: var(--gray-20); color: var(--text-primary); }
.badge.muted { background: var(--gray-20); color: var(--text-primary); }
.badge.info { background: var(--blue-20); color: var(--blue-70); }
.badge.ok { background: var(--green-20); color: var(--green-70); }
.badge.warn { background: var(--yellow-20); color: var(--yellow-80); }
.badge.bad { background: var(--red-20); color: var(--red-70); }

/* ---------- data table ---------- */
table.t { border-collapse: collapse; }
table.t thead th { background: var(--layer-accent); color: var(--text-primary); font-weight: var(--weight-semibold); font-size: var(--text-sm); letter-spacing: var(--tracking-body); height: 48px; border: 0; }
table.t td { border: 0; border-bottom: 1px solid var(--border-subtle); color: var(--text-secondary); height: 48px; }
table.t td strong, table.t td .rowlink { color: var(--text-primary); }
table.t tbody tr { background: var(--layer-01); transition: background-color var(--duration-fast) var(--easing); }
table.t tbody tr:hover { background: var(--layer-hover); }
table.t tbody tr:hover td { color: var(--text-primary); }
.table-wrap { border: 0; border-radius: 0; }

/* ---------- structured list (home priorities) ---------- */
.prio-head { font-size: var(--text-sm); font-weight: var(--weight-semibold); color: var(--text-primary); letter-spacing: var(--tracking-body); }
.prio-head span { background: var(--gray-20); color: var(--text-primary); border-radius: var(--radius-full); font-weight: var(--weight-regular); }
.prio-group.late .prio-head { color: var(--support-error); }
.prio-list { gap: 0; border: 0; border-radius: 0; overflow: hidden; background: var(--layer-01); }
.prio-list li { border: 0; border-bottom: 1px solid var(--border-subtle); border-radius: 0; background: var(--layer-01); box-shadow: none; transition: background-color var(--duration-fast) var(--easing); }
.prio-list li:last-child { border-bottom: 0; }
.prio-list li:hover { background: var(--layer-hover); }
.prio-ico { border-radius: 0; background: transparent; color: var(--icon-secondary); }
.prio-list li.late .prio-ico { background: transparent; color: var(--support-error); }
.prio-list .title { font-weight: var(--weight-regular); color: var(--text-primary); }
.prio-list .sub { color: var(--text-helper); font-size: var(--text-xs); letter-spacing: var(--tracking-label); }
.prio-due { background: none; padding: 0; font-weight: var(--weight-regular); color: var(--text-secondary); }
.prio-list li.late .prio-due { color: var(--support-error); }
.prio-step { background: var(--blue-10); color: var(--blue-70); border-radius: var(--radius-full); }

/* ---------- clickable tiles ---------- */
.hs-grid a, .rt { background: var(--layer-01); border: 0; border-radius: 0; color: var(--text-secondary); transition: background-color var(--duration-fast) var(--easing); }
.hs-grid a:hover, .rt:hover { background: var(--layer-hover); transform: none; }
.hs-grid { gap: 1px; background: transparent; }
.hs-grid b { color: var(--text-primary); font-size: var(--heading-lg); font-weight: var(--weight-light); line-height: var(--lh-28); }
.hs-grid a.bad b, .hs-grid em { color: var(--support-error); }
.rt svg { color: var(--icon-primary); }
.rt.rt-bad svg { color: var(--support-error); }

/* ---------- home heading ---------- */
.home-head .page-title span { color: var(--text-primary); }
.hh-photo { border-radius: 0; }

/* ---------- notifications (flash messages): Carbon inline notification ---------- */
.flash li { border-radius: 0; border: 0; border-left: 3px solid var(--support-info); background: var(--support-info-bg); color: var(--text-primary); box-shadow: none; }
.flash li.success { border-left-color: var(--support-success-icon); background: var(--support-success-bg); }
.flash li.warning { border-left-color: var(--support-warning-icon); background: var(--support-warning-bg); }
.flash li.error { border-left-color: var(--support-error); background: var(--support-error-bg); }

/* ---------- menus and pop-overs ---------- */
.menu-pop, .row-pop-float { border-radius: 0; border: 0; box-shadow: 0 2px 6px rgba(0,0,0,.3); background: var(--layer-01); }
.menu-pop a:hover, .row-pop-float a:hover { background: var(--layer-hover); }

/* ---------- Carbon rules ---------- */
/* content: sentence case everywhere - no capitalised or spaced-out labels */
body.ems-app :where(*) { text-transform: none; }
/* forms: label above the field, helper text below, 8px between label and field, 24px between fields */
.form .fields > .field:not(.check), .fields > .field:not(.check) { display: flex; flex-direction: column; align-items: stretch; gap: var(--space-03); }
.form .fields > .field:not(.check) > label, .fields > .field:not(.check) > label { text-align: left; margin: 0; font-size: var(--text-xs); line-height: var(--lh-12); color: var(--text-secondary); font-weight: var(--weight-regular); letter-spacing: var(--tracking-label); }
.fields { row-gap: var(--space-06); column-gap: var(--space-07); }
.field .help { font-size: var(--text-xs); line-height: var(--lh-12); color: var(--text-helper); letter-spacing: var(--tracking-label); margin: 0; }
.field.is-required > label::after { content: none; }
/* icons: 16px in buttons and inline, 20px in the header and navigation */
.btn svg, .badge svg, td svg, .help svg { width: 16px; height: 16px; }
.mb-ico svg, .top .icon-btn svg, .hub-tabs svg { width: 20px; height: 20px; }
svg.carbon-icon { fill: currentColor; fill-opacity: 1; stroke: none; }
/* tables: text left, numbers right in a fixed-width figure style */
table.t td.n, table.t th.n { text-align: right; font-variant-numeric: tabular-nums; }
/* motion: productive, short; nothing bounces or slides in */
.card, .btn, .badge { animation: none; }

/* the folded guide tab sits half-way down the edge, clear of the page buttons */
@media (min-width: 1180px) { body.ems-app .page-guide:has(> details:not([open])) { top: 46vh; } }
@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }

/* ---------- picker forms (PPE issue, JSA): Carbon content switcher, selectable tags, item cards ---------- */
.ppe-form fieldset.ppe-step { border: 0; padding: 0; margin: 0 0 var(--space-07); }
.ppe-form legend { font-size: var(--heading-sm); font-weight: var(--weight-semibold); color: var(--text-primary); margin-bottom: var(--space-04); }
.ppe-form .seg { display: inline-flex; border: 1px solid var(--border-strong); border-radius: 0; padding: 0; gap: 0; background: transparent; margin-bottom: var(--space-05); }
.ppe-form .seg label { display: flex; align-items: center; min-height: 40px; padding: 0 var(--space-05); cursor: pointer; color: var(--text-secondary); font-size: var(--text-sm); }
.ppe-form .seg label:has(input:checked) { background: var(--interactive); color: var(--text-on-color); }
.ppe-form .seg input { position: absolute; opacity: 0; pointer-events: none; }
.ppe-form .seg label:has(input:focus-visible) { outline: 2px solid var(--focus); outline-offset: -2px; }
.chips { display: flex; flex-wrap: wrap; gap: var(--space-03); }
.ppe-form .chip, .jsa-ppe .chip { display: inline-flex; align-items: center; gap: var(--space-03); min-height: 32px; padding: 0 var(--space-04); border: 1px solid var(--border-strong); border-radius: 24px; background: var(--layer-01); color: var(--text-primary); font-size: var(--text-sm); cursor: pointer; }
.ppe-form .chip:has(input:checked), .jsa-ppe .chip:has(input:checked) { background: var(--interactive); border-color: var(--interactive); color: var(--text-on-color); }
.ppe-form .chip input, .jsa-ppe .chip input { accent-color: var(--text-on-color); }
.ppe-line { border-top: 1px solid var(--border-subtle); padding-top: var(--space-05); margin-top: var(--space-06); }
.ppe-line h3 { font-size: var(--text-lg); font-weight: var(--weight-semibold); margin: 0 0 var(--space-04); }
.ppe-pick { display: flex; gap: var(--space-03); flex-wrap: wrap; }
.ppe-pick select, .ppe-pick input { min-width: 140px; flex: 1; }
.ppe-table { margin: var(--space-05) 0 var(--space-04); }
.ppe-table td { vertical-align: middle; }
.ppe-qty { width: 88px; text-align: right; }
.ppe-total { margin-top: var(--space-05); }
.jsa-steps table { margin-bottom: var(--space-04); }
.jsa-steps td input { width: 100%; min-width: 120px; }
.jsa-steps td:first-child { width: 32px; color: var(--text-secondary); }
.jsa-ppe { margin-bottom: var(--space-04); }
.jsa-offer, .jsa-next { display: flex; gap: var(--space-03); flex-wrap: wrap; margin-top: var(--space-04); }
.jsa-next { margin-bottom: var(--space-05); }
[hidden] { display: none !important; }
@media (max-width: 1100px) {
  .jsa-steps thead { display: none; }
  .jsa-steps tr { display: grid; grid-template-columns: 32px 1fr auto; gap: var(--space-03); padding: var(--space-04) 0; border-bottom: 1px solid var(--border-subtle); }
  .jsa-steps td { border: 0; padding: 0; height: auto; }
  .jsa-steps td:nth-child(2), .jsa-steps td:nth-child(3), .jsa-steps td:nth-child(4) { grid-column: 2; }
  .jsa-steps td:nth-child(5) { grid-column: 3; grid-row: 1; }
  .jsa-steps td:nth-child(3) input::placeholder, .jsa-steps td:nth-child(4) input::placeholder { color: var(--text-placeholder); }
}

}
