:root {
  --ink: #14221c;
  --muted: #617069;
  --deep: #173128;
  --deep-2: #214437;
  --paper: #f6f7f3;
  --panel: #fff;
  --line: #dfe5df;
  --soft: #edf2ee;
  --accent: #b08b45;
  --danger: #a53b32;
  --danger-soft: #fff0ee;
  --warn: #9d6b17;
  --warn-soft: #fff4df;
  --ok: #2f6b4f;
  --ok-soft: #edf7f0;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--ink);
  background: var(--paper);
}
[hidden] { display:none !important; }
.skip-link { position:absolute;left:16px;top:-100px;padding:12px;background:#fff;color:var(--deep);z-index:2000; }
.skip-link:focus { top:8px; }
.notice { position:sticky;top:0;z-index:500;display:flex;align-items:center;flex-wrap:wrap;gap:8px; }
.notice a { color:var(--deep);font-weight:800; }
.notice.sharing { border:2px solid var(--ok);background:var(--ok-soft); }
.notice button { margin-left:auto; }
.consent-line { display:flex;align-items:flex-start;gap:10px;line-height:1.5;margin-top:16px; }
.consent-line input { width:22px;height:22px;flex:none;accent-color:var(--deep); }
.manager-board,.incident-card,.map-card,.boundary-card { margin:18px 0; }
.team-grid { display:grid;grid-template-columns:repeat(auto-fit,minmax(240px,1fr));gap:12px; }
.team-item,.alert-item,.message-item { padding:15px;border:1px solid var(--line);border-radius:12px;background:#f8faf8;overflow-wrap:anywhere; }
.team-item p,.alert-item p,.message-item p { margin:6px 0;line-height:1.5;white-space:pre-wrap; }
.alert-item { border-left:5px solid var(--danger);margin:12px 0; }
.alert-item.acknowledged { border-left-color:var(--warn); }
.alert-item textarea { margin:10px 0; }
.message-list { display:grid;gap:10px;max-height:420px;overflow:auto; }
.message-item small { color:var(--muted); }
.message-item button { margin-top:6px; }
.assignment-creator { margin-top:24px;padding-top:18px;border-top:1px solid var(--line); }
.assignment-creator summary { cursor:pointer;font-weight:800;padding:10px 0; }
.assignment-creator form { margin-top:12px; }
.span-two { grid-column:1/-1; }
.timeline { max-height:300px;overflow:auto;padding:12px;font-size:.86rem; }
.status { overflow-wrap:anywhere; }
button,input,select,summary { min-height:44px; }
@media(max-width:560px) { .notice { position:static; }.team-grid { grid-template-columns:1fr; }.notice button{margin-left:0;} }
* { box-sizing: border-box; }
body { margin: 0; min-width: 320px; min-height: 100vh; background: var(--paper); }
button, input, select, textarea { font: inherit; }
button:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible { outline: 3px solid rgba(176, 139, 69, .32); outline-offset: 2px; }
.field-header { padding: 22px clamp(18px, 4vw, 46px); display: flex; align-items: center; justify-content: space-between; gap: 20px; background: linear-gradient(135deg, #173128, #214437); color: #fff; }
.field-header h1 { margin: 0; font-size: clamp(1.8rem, 4vw, 2.8rem); }
.subtitle { margin: 8px 0 0; max-width: 820px; color: #d8e3dd; line-height: 1.55; }
.eyebrow { margin: 0 0 6px; text-transform: uppercase; letter-spacing: .13em; font-weight: 850; font-size: .72rem; color: #bca46f; }
.back-link { color: #fff; border: 1px solid rgba(255,255,255,.25); border-radius: 11px; padding: 10px 13px; text-decoration: none; font-weight: 800; white-space: nowrap; }
.field-shell { padding: 24px clamp(18px, 4vw, 46px) 54px; }
.notice { padding: 13px 15px; margin-bottom: 18px; border: 1px solid #d9dfda; border-radius: 13px; background: #fff; color: #4d5d55; }
.notice strong { color: var(--deep); }
.grid { display: grid; gap: 18px; margin-bottom: 18px; }
.grid.two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.safety-grid { grid-template-columns: 1.1fr .9fr; }
.card { padding: 22px; border: 1px solid var(--line); border-radius: 18px; background: var(--panel); box-shadow: 0 16px 44px rgba(20,34,28,.07); min-width: 0; }
.card h2 { margin: 0 0 12px; font-size: 1.25rem; }
.card-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; margin-bottom: 16px; }
.card-copy, .privacy-note, .map-note { color: var(--muted); line-height: 1.55; }
.privacy-note { margin-bottom: 0; padding: 12px 13px; border-radius: 12px; background: #f8faf8; border: 1px solid #e7ebe7; font-size: .88rem; }
.badge { display: inline-flex; align-items: center; min-height: 28px; padding: 4px 9px; border-radius: 999px; background: var(--soft); color: #4b5d54; font-size: .72rem; font-weight: 850; text-transform: uppercase; letter-spacing: .04em; }
.badge.off { background: #eee; color: #68716c; }
.badge.on { background: var(--ok-soft); color: var(--ok); }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
label { display: grid; gap: 7px; color: #3f4e47; font-size: .82rem; font-weight: 750; }
input, select, textarea { width: 100%; border: 1px solid #ccd6cf; border-radius: 11px; padding: 11px 12px; background: #fff; color: var(--ink); }
textarea { resize: vertical; }
.location-readout { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.location-readout div { padding: 12px; border-radius: 12px; background: #f8faf8; border: 1px solid #e7ebe7; min-width: 0; }
.location-readout small { display: block; color: var(--muted); font-size: .68rem; text-transform: uppercase; letter-spacing: .06em; font-weight: 800; }
.location-readout strong { display: block; margin-top: 5px; overflow-wrap: anywhere; }
.button-row { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 15px; }
button { border: 0; border-radius: 11px; padding: 11px 14px; font-weight: 800; cursor: pointer; }
button:disabled { opacity: .52; cursor: not-allowed; }
.primary { background: var(--deep); color: #fff; }
.primary:hover:not(:disabled) { background: var(--deep-2); }
.secondary { background: var(--soft); color: var(--deep); }
.safe-action { background: var(--ok-soft); color: var(--ok); }
.warn-action { background: var(--warn-soft); color: var(--warn); }
.danger-action { background: var(--danger); color: #fff; }
.status { color: var(--muted); font-size: .86rem; line-height: 1.45; }
.status.error { color: var(--danger); }
.status.ok { color: var(--ok); }
.safety-actions { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 9px; }
.state-line { margin-top: 14px; padding: 11px 12px; border-radius: 11px; background: #f8faf8; border: 1px solid #e7ebe7; }
.comms-card { display: grid; gap: 12px; align-content: start; }
#field-map { height: min(54vh, 520px); min-height: 340px; border-radius: 14px; border: 1px solid var(--line); background: #e9efe9; overflow: hidden; }
.boundary-card ul { margin: 10px 0 0; padding-left: 21px; color: var(--muted); line-height: 1.6; }
dialog { border: 0; border-radius: 18px; padding: 0; width: min(92vw, 520px); box-shadow: 0 28px 90px rgba(0,0,0,.3); }
dialog::backdrop { background: rgba(9,18,14,.58); }
.dialog-card { padding: 22px; }
.dialog-card h2 { margin-top: 0; }
@media (max-width: 880px) {
  .grid.two, .safety-grid { grid-template-columns: 1fr; }
  .field-header { align-items: flex-start; flex-direction: column; }
}
@media (max-width: 560px) {
  .field-shell { padding-inline: 14px; }
  .field-header { padding-inline: 17px; }
  .form-grid, .location-readout, .safety-actions { grid-template-columns: 1fr; }
  .card { padding: 18px; border-radius: 15px; }
  #field-map { min-height: 300px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition: none !important; animation: none !important; }
}

/* PTEROLEON SERAPHIM branding for field safety. */
.field-brand{display:flex;align-items:center;gap:20px;min-width:0}.seraphim-emblem{width:clamp(84px,11vw,128px);height:auto;aspect-ratio:1;object-fit:contain;flex:none}.field-motto{margin:9px 0 0;color:#d8c48e;font-size:.78rem;font-weight:800;letter-spacing:.11em;text-transform:uppercase}@media(max-width:560px){.field-brand{align-items:flex-start;gap:12px}.seraphim-emblem{width:78px}.field-header h1{font-size:1.55rem}}

/* Shared three-brand application credits */
.kmi-app-credits{display:flex;flex-wrap:wrap;align-items:center;justify-content:center;gap:18px 32px;padding:22px 18px;background:#132e27;color:#f0f4ee;font-family:Inter,ui-sans-serif,system-ui,sans-serif;border-top:1px solid rgba(213,181,107,.35)}
.kmi-credit{display:flex;align-items:center;gap:12px;min-width:0}.kmi-credit img{width:56px;height:56px;object-fit:contain;flex:none}.kmi-credit small{display:block;color:#d4b875;letter-spacing:.09em;font-size:10px;font-weight:750}.kmi-credit strong{display:block;font-size:12px;line-height:1.4;color:#fff}.ellvii-wordmark{display:grid;place-items:center;width:56px;height:56px;border:1px solid #c7a55e;border-radius:12px;background:#1d3b31;color:#f2d68e;font-size:21px;font-weight:850;letter-spacing:-.06em;position:relative}.ellvii-wordmark span{position:absolute;right:6px;top:4px;font-size:10px}.kmi-app-credits .seraphim-credit-logo{border-radius:6px}
@media(max-width:700px){.kmi-app-credits{flex-direction:column;align-items:flex-start;gap:15px;padding:22px max(20px,calc((100% - 320px)/2))}.kmi-credit{width:100%}}

/* Pteroleon Seraphim PWA identity, aligned with KMI app palette. */
.app-identity{margin:0 0 8px;color:#efd18f;font-size:.85rem;font-weight:750;letter-spacing:.035em}
.install-brand{display:flex;align-items:center;gap:15px;margin-bottom:12px}
.install-brand img{width:66px;height:66px;flex:none;border-radius:16px;box-shadow:0 6px 20px rgba(0,0,0,.12)}
.install-brand h2{margin:0 0 5px}
.install-brand p{margin:0;color:var(--muted);font-size:.88rem}
@media(max-width:560px){.install-brand img{width:56px;height:56px}.field-header{padding-top:max(18px,env(safe-area-inset-top))}.field-shell{padding-bottom:max(24px,env(safe-area-inset-bottom))}}

/* Official owner-supplied KMI and Seraphim image sizing. */
.kmi-app-credits .kmi-credit img{width:72px;height:72px;max-width:72px;object-fit:contain;aspect-ratio:1;flex:none}
@media(max-width:700px){.kmi-app-credits .kmi-credit img{width:64px;height:64px;max-width:64px}}
