:root {
  --ink: #172c31;
  --muted: #6c8084;
  --line: #dfe7e7;
  --green: #006d5a;
  --bg: #f3f6f5;
  --orange: #be7326;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
  font:
    16px/1.6 -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    sans-serif;
  color: var(--ink);
  background: var(--bg);
}
[hidden] {
  display: none !important;
}
button,
input,
select,
textarea {
  font: inherit;
}
button,
a.button {
  cursor: pointer;
}
button {
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 10px 14px;
  background: white;
  color: var(--ink);
}
button:hover {
  border-color: #89a7a0;
  background: #eef5f2;
}
button:focus-visible,
a:focus-visible,
input:focus,
textarea:focus,
select:focus {
  outline: 2px solid #299a85;
  outline-offset: 3px;
}
button:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}
a {
  color: var(--green);
}
input,
select,
textarea {
  width: 100%;
  border: 1px solid #ccd9d6;
  border-radius: 6px;
  padding: 12px;
  background: white;
  color: var(--ink);
}
textarea {
  resize: vertical;
  min-height: 85px;
}
label {
  display: block;
  font-size: 14px;
  font-weight: 600;
  color: var(--muted);
  margin-bottom: 7px;
}
h1,
h2,
h3,
p {
  margin-top: 0;
}
h2 {
  font-size: 22px;
  font-weight: 600;
  letter-spacing: -0.5px;
  line-height: 1.3;
}
h3 {
  font-size: 16px;
}
small {
  color: var(--muted);
  font-size: 13px;
}
.brand {
  display: flex;
  gap: 12px;
  align-items: center;
  font-size: 26px;
  font-weight: 800;
  letter-spacing: -1px;
}
.brand > span {
  font-size: 20px;
  letter-spacing: 3px;
}
.brand small {
  display: block;
  font-size: 10px;
  letter-spacing: 1.7px;
  margin-top: -4px;
}
.eyebrow {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 1.7px;
  color: var(--green);
}
.sidebar {
  position: fixed;
  inset: 0 auto 0 0;
  width: 234px;
  padding: 30px 22px;
  background: #fff;
  border-right: 1px solid var(--line);
  display: flex;
  flex-direction: column;
}
.workspace-label {
  font-size: 11px;
  letter-spacing: 1.5px;
  color: #8b9b9c;
  margin: 52px 0 15px;
}
.sidebar nav {
  display: grid;
  gap: 7px;
}
.sidebar nav button {
  text-align: left;
  border: 0;
  background: transparent;
  padding: 12px 10px;
  font-size: 14px;
  display: flex;
  align-items: center;
  gap: 9px;
}
.sidebar nav button.active {
  background: #e8f2ed;
  color: var(--green);
  font-weight: 650;
}
.sidebar nav button b {
  font-size: 11px;
  background: #d4e7df;
  padding: 1px 5px;
  border-radius: 4px;
  margin-left: auto;
}
.side-bottom {
  margin-top: auto;
}
.isolation {
  font-size: 13px;
  font-weight: 600;
}
.isolation p {
  font-weight: 400;
  font-size: 13px;
  color: var(--muted);
  margin: 9px 0 24px;
}
.status-dot {
  display: inline-block;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #25856c;
  vertical-align: middle;
  margin-right: 5px;
}
.identity {
  display: flex;
  align-items: center;
  gap: 9px;
  border-top: 1px solid var(--line);
  padding-top: 18px;
}
.identity > span {
  width: 31px;
  height: 31px;
  display: grid;
  place-items: center;
  background: #e8f2ed;
  border-radius: 50%;
  color: var(--green);
  font-weight: 700;
}
.identity b,
.identity small {
  display: block;
  font-size: 13px;
}
.identity small {
  font-size: 11px;
}
.identity button {
  margin-left: auto;
  border: 0;
  padding: 5px;
}
main {
  margin-left: 234px;
}
.topbar {
  height: 70px;
  background: white;
  border-bottom: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 36px;
  font-size: 13px;
  color: var(--muted);
}
.topbar i {
  font-style: normal;
  color: #bdc9c7;
  margin: 0 12px;
}
.topbar > div {
  display: flex;
  align-items: center;
  gap: 18px;
}
.clock {
  font-variant-numeric: tabular-nums;
}
.badge {
  display: inline-block;
  font-size: 11px;
  letter-spacing: 0.8px;
  color: #96651e;
  background: #fbefd7;
  border: 1px solid #eedbb4;
  border-radius: 4px;
  padding: 2px 8px;
  font-weight: 650;
  vertical-align: middle;
}
.badge.pale {
  background: #f3f7f5;
  border-color: #dce7e1;
  color: #618075;
}
.content {
  padding: 34px 36px;
  max-width: 1580px;
  margin: auto;
}
.page-heading {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
}
.page-heading h1 {
  font-size: 34px;
  letter-spacing: -1px;
  font-weight: 600;
  line-height: 1.2;
  margin: 11px 0;
}
.page-heading p {
  font-size: 14px;
  color: var(--muted);
  margin-bottom: 24px;
}
.button {
  display: inline-block;
  text-decoration: none;
  padding: 10px 16px;
  font-size: 13px;
  border-radius: 6px;
  border: 1px solid var(--line);
  white-space: nowrap;
  background: white;
}
.boundary {
  display: flex;
  align-items: center;
  gap: 13px;
  padding: 11px 15px;
  border: 1px solid #e9d9b9;
  background: #fcf6e9;
  color: #82622e;
  font-size: 13px;
  border-radius: 6px;
  margin: 5px 0 24px;
}
.boundary-lock {
  margin-left: auto;
  font-size: 11px;
  letter-spacing: 1px;
  white-space: nowrap;
}
.metrics {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
  margin-bottom: 24px;
}
.metrics article {
  background: #fff;
  border: 1px solid var(--line);
  padding: 18px;
  border-radius: 8px;
}
.metrics strong {
  display: block;
  font-size: 23px;
  font-weight: 600;
  margin: 7px 0 2px;
  letter-spacing: -0.6px;
}
.metrics strong em {
  font-style: normal;
  color: #7c9390;
  font-size: 18px;
}
.metrics strong.muted {
  font-size: 20px;
  color: #8a9b99;
}
.metrics small {
  font-size: 12px;
}
.desk-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.65fr) minmax(270px, 1fr);
  gap: 22px;
}
.panel {
  background: white;
  border: 1px solid var(--line);
  border-radius: 9px;
  padding: 23px;
  min-width: 0;
}
.panel-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.panel-heading h2 {
  margin: 6px 0 19px;
}
.panel-heading h2 .badge {
  margin-left: 6px;
}
.pill {
  font-size: 12px;
  padding: 4px 9px;
  border-radius: 20px;
  background: #e4f2e9;
  color: #26705b;
  white-space: nowrap;
}
.pill.bad {
  background: #fae9e6;
  color: #ac4b3a;
}
.pill.neutral {
  background: #f0f3f5;
  color: #5d717b;
}
.map {
  height: 272px;
  position: relative;
  overflow: hidden;
  background: #e9f0f1;
  border: 1px solid #dce6e6;
  border-radius: 7px;
}
.map-grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(#cfdddd70 1px, transparent 1px),
    linear-gradient(90deg, #cfdddd70 1px, transparent 1px);
  background-size: 36px 36px;
}
.map-land {
  position: absolute;
  background: #d3e0d9;
  border: 1px solid #bfcebd;
  transform: rotate(-25deg);
}
.land-one {
  width: 220px;
  height: 230px;
  left: -100px;
  top: -95px;
  border-radius: 40%;
}
.land-two {
  width: 250px;
  height: 200px;
  right: -130px;
  bottom: -130px;
  border-radius: 30%;
}
.map-label {
  position: absolute;
  top: 15px;
  left: 15px;
  font-size: 10px;
  letter-spacing: 1px;
  color: #7d9495;
}
.route {
  position: absolute;
  inset: 10% 0;
  width: 100%;
  height: 90%;
}
.route path {
  fill: none;
  stroke: #659b8c;
  stroke-width: 1.5;
  stroke-dasharray: 6 5;
}
.route circle {
  fill: #e8f2e9;
  stroke: #467d6a;
}
.aircraft {
  position: absolute;
  top: 44%;
  left: 62%;
  font-size: 27px;
  color: #006d5a;
  transform: rotate(-35deg);
  text-shadow: 0 0 20px #fff;
}
.aircraft span {
  display: block;
  font-size: 10px;
  transform: rotate(35deg);
  background: white;
  padding: 2px 5px;
  margin-left: 9px;
  white-space: nowrap;
  letter-spacing: 0.5px;
}
.map-legend {
  position: absolute;
  bottom: 12px;
  left: 12px;
  font-size: 11px;
  color: #668781;
}
.compass {
  position: absolute;
  right: 14px;
  top: 12px;
  font-size: 13px;
  color: #65817e;
}
.asset-values {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
  padding-top: 20px;
}
.asset-values label {
  font-size: 11px;
  font-weight: 400;
}
.asset-values b {
  font-size: 15px;
  font-weight: 600;
}
.scenario-panel h2 {
  margin: 7px 0 10px;
}
.scenario-panel p {
  font-size: 13px;
  color: var(--muted);
}
.scenario-panel select {
  font-size: 13px;
}
.scenario-state {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 17px 0;
}
.scenario-state b,
.scenario-state small {
  display: block;
}
.scenario-state b {
  font-size: 13px;
}
.scenario-state small {
  font-size: 12px;
}
.video-box {
  display: grid;
  text-align: center;
  background: #f2f6f5;
  border: 1px dashed #d2deda;
  padding: 14px;
  border-radius: 6px;
  gap: 3px;
}
.video-box > span {
  font-size: 22px;
  color: #98aaa5;
}
.video-box > b {
  font-size: 13px;
}
.video-box small {
  font-size: 11px;
}
.control-title {
  font-size: 13px;
  font-weight: 600;
  margin: 18px 0 9px;
}
.control-title .badge {
  float: right;
}
.commands {
  display: flex;
  gap: 7px;
  margin-bottom: 9px;
}
.commands button {
  flex: 1;
  font-size: 12px;
  padding: 9px 4px;
  background: #eaf3ef;
  color: var(--green);
  border-color: #d8e8df;
}
.scenario-panel > small {
  font-size: 11px;
  display: block;
}
.journal {
  margin-top: 22px;
}
.table-wrap {
  overflow: auto;
}
table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}
th {
  text-align: left;
  color: #7b8d8c;
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.5px;
  background: #f7f9f8;
}
td,
th {
  padding: 12px 10px;
  border-bottom: 1px solid #e9eeec;
}
td small {
  display: block;
  font-size: 11px;
}
td code {
  font-size: 11px;
  color: #849792;
}
.empty {
  text-align: center;
  color: #8b9d99;
  padding: 34px;
}
.section-intro {
  margin: 30px 0;
}
.section-intro p {
  color: var(--muted);
  font-size: 14px;
  max-width: 800px;
}
.gates {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
}
.gate h3 {
  margin: 9px 0;
}
.gate p {
  font-size: 14px;
  color: var(--muted);
  min-height: 40px;
}
.gate-actions {
  display: flex;
  gap: 8px;
  margin-top: 12px;
}
.gate-actions button {
  font-size: 13px;
}
.gate-actions .primary {
  margin-left: auto;
}
.gate-meta {
  font-size: 12px;
  color: var(--muted);
  margin-top: 10px;
}
.primary {
  background: var(--green);
  color: white;
  border: 1px solid var(--green);
}
.primary:hover {
  background: #005444;
  color: white;
}
.handover-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin-top: 28px;
}
.handover-grid h2 {
  margin-top: 10px;
}
.handover-grid ul {
  padding-left: 18px;
  font-size: 15px;
  color: var(--muted);
}
.handover-grid li {
  margin: 12px 0;
}
.wide {
  grid-column: 1/-1;
}
.steps {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 25px;
  margin-top: 25px;
}
.steps b {
  display: inline-block;
  font-size: 13px;
  color: var(--green);
  background: #eaf3ed;
  padding: 5px 9px;
  border-radius: 5px;
  margin-bottom: 12px;
}
.steps p {
  font-size: 14px;
  color: var(--muted);
}
footer {
  display: flex;
  justify-content: space-between;
  gap: 15px;
  font-size: 11px;
  letter-spacing: 0.4px;
  color: #8da19b;
  margin-top: 30px;
}
.toast {
  position: fixed;
  bottom: 25px;
  left: 50%;
  transform: translateX(-50%);
  background: #193d32;
  color: white;
  padding: 15px 22px;
  border-radius: 7px;
  box-shadow: 0 8px 30px #16362a22;
  z-index: 5;
  max-width: 90vw;
}
.login-shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 1fr 1fr;
}
.login-art {
  padding: 45px 60px;
  position: relative;
  background: #0b3028;
  color: white;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  min-height: 650px;
}
.login-art .brand {
  position: relative;
  z-index: 1;
}
.login-art > .eyebrow {
  color: #89c7b0;
  margin-top: 100px;
}
.login-art h1 {
  font-size: clamp(44px, 5vw, 76px);
  letter-spacing: -3px;
  line-height: 1.08;
  font-weight: 500;
  margin: 22px 0;
}
.login-art > p {
  color: #a4c3b6;
  max-width: 320px;
  position: relative;
  z-index: 1;
}
.login-foot {
  font-size: 11px;
  letter-spacing: 1.4px;
  color: #8bafa0;
  margin-top: auto;
  padding-top: 40px;
}
.orbits {
  position: absolute;
  width: 380px;
  height: 380px;
  right: -180px;
  bottom: 60px;
  border: 1px solid #7ab89c44;
  border-radius: 50%;
}
.orbits i {
  position: absolute;
  inset: 40px;
  border: 1px solid #7ab89c44;
  border-radius: 50%;
}
.orbits i:nth-child(2) {
  inset: 80px;
}
.orbits i:nth-child(3) {
  inset: 120px;
}
.orbits b {
  position: absolute;
  top: 43%;
  left: 47%;
  font-size: 35px;
  font-weight: 200;
  color: #89bba8;
}
.login-form {
  align-self: center;
  max-width: 460px;
  padding: 50px 35px;
  margin: auto;
}
.login-form h2 {
  font-size: 34px;
  margin: 17px 0;
}
.login-form p {
  color: var(--muted);
  font-size: 15px;
}
.login-form form {
  margin: 30px 0 20px;
}
.login-form .primary {
  width: 100%;
  margin-top: 16px;
  padding: 13px;
}
.divider {
  display: block;
  font-size: 12px;
  color: var(--muted);
  padding: 16px 0;
  border-top: 1px solid var(--line);
}
#local-login button {
  font-size: 13px;
  margin: 0 5px 20px 0;
}
.error {
  color: #b34d3d !important;
}
body.busy {
  cursor: progress;
}
@media (min-width: 1500px) {
  .map {
    height: 320px;
  }
}
@media (max-width: 1150px) {
  .sidebar {
    width: 200px;
    padding: 25px 15px;
  }
  main {
    margin-left: 200px;
  }
  .content {
    padding: 28px 24px;
  }
  .metrics {
    grid-template-columns: repeat(2, 1fr);
  }
  .desk-grid {
    grid-template-columns: 1fr;
  }
  .asset-values {
    margin-bottom: 5px;
  }
  .scenario-panel .video-box {
    margin-top: 10px;
  }
  .scenario-panel {
    display: block;
  }
  .steps {
    grid-template-columns: 1fr 1fr;
  }
  .gates {
    grid-template-columns: 1fr;
  }
}
@media (max-width: 700px) {
  .sidebar {
    position: static;
    width: auto;
    padding: 16px;
    display: block;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }
  .sidebar .brand {
    font-size: 20px;
  }
  .sidebar .brand small {
    display: none;
  }
  .sidebar .brand > span {
    font-size: 16px;
  }
  .workspace-label,
  .side-bottom {
    display: none;
  }
  .sidebar nav {
    display: flex;
    margin-top: 16px;
    overflow: auto;
  }
  .sidebar nav button {
    white-space: nowrap;
    font-size: 12px;
    padding: 9px;
  }
  .sidebar nav button span {
    display: none;
  }
  main {
    margin: 0;
  }
  .topbar {
    height: 48px;
    padding: 0 18px;
  }
  .clock {
    display: none;
  }
  .content {
    padding: 22px 16px;
  }
  .page-heading {
    align-items: flex-start;
    flex-direction: column;
    gap: 0;
  }
  .page-heading h1 {
    font-size: 28px;
  }
  .page-heading p {
    font-size: 13px;
  }
  .page-heading a {
    margin-bottom: 18px;
  }
  .boundary-lock {
    display: none;
  }
  .boundary {
    font-size: 12px;
    align-items: flex-start;
  }
  .metrics {
    gap: 10px;
  }
  .metrics article {
    padding: 14px;
  }
  .metrics strong {
    font-size: 18px;
  }
  .metrics label {
    font-size: 12px;
  }
  .metrics small {
    font-size: 11px;
  }
  .metrics strong.muted {
    font-size: 16px;
  }
  .panel {
    padding: 17px;
  }
  .panel-heading {
    align-items: flex-start;
  }
  .panel-heading h2 {
    font-size: 18px;
  }
  .panel-heading h2 .badge {
    display: block;
    width: max-content;
    margin: 7px 0;
  }
  .map {
    height: 240px;
  }
  .asset-values {
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
  }
  .handover-grid,
  .steps {
    grid-template-columns: 1fr;
  }
  .wide {
    grid-column: auto;
  }
  footer {
    flex-direction: column;
  }
  .login-shell {
    grid-template-columns: 1fr;
  }
  .login-art {
    min-height: 330px;
    padding: 28px;
  }
  .login-art > .eyebrow {
    margin-top: 35px;
  }
  .login-art h1 {
    font-size: 43px;
    letter-spacing: -2px;
  }
  .login-art h1 br {
    display: none;
  }
  .login-art > p {
    font-size: 14px;
  }
  .login-foot {
    padding-top: 20px;
  }
  .login-form {
    padding: 30px 24px;
  }
  .login-form h2 {
    font-size: 28px;
  }
}
@media print {
  .sidebar,
  .topbar,
  .boundary,
  .page-heading a,
  button,
  textarea,
  select,
  .login-shell {
    display: none !important;
  }
  main {
    margin: 0;
  }
  .content {
    padding: 0;
  }
  .panel {
    break-inside: avoid;
  }
  .metrics {
    grid-template-columns: repeat(4, 1fr);
  }
}
/* AGRON brand, language and theme preferences */
.brand {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 5px;
  letter-spacing: 0;
}
.brand img {
  display: block;
  width: 170px;
  height: auto;
  max-height: 60px;
  object-fit: contain;
}
.brand > span {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 1.3px;
  white-space: nowrap;
}
.brand-login img {
  width: 260px;
  max-height: 90px;
}
.brand-login > span {
  font-size: 12px;
  letter-spacing: 2px;
  color: #bcd5c9;
}
.sidebar .brand small {
  display: none;
}
.login-copyright {
  font-size: 11px;
  color: var(--muted);
  margin-top: 26px;
  letter-spacing: 0.4px;
}
.preferences {
  position: fixed;
  z-index: 20;
  top: 18px;
  right: 22px;
  display: flex;
  gap: 8px;
  align-items: center;
  padding: 5px;
  background: #ffffffed;
  border: 1px solid var(--line);
  border-radius: 9px;
  box-shadow: 0 4px 18px #0b30280a;
}
.preferences button {
  font-size: 13px;
  padding: 6px 10px;
  line-height: 1.4;
  border: 0;
  background: transparent;
  border-radius: 5px;
}
.segmented {
  display: flex;
}
.preferences button.active {
  background: #e7f0eb;
  color: #006d5a;
  font-weight: 700;
}
.preferences #theme-toggle {
  border-left: 1px solid var(--line);
  font-size: 18px;
  width: 34px;
  padding: 2px 7px;
  border-radius: 0;
}
.topbar > div {
  padding-right: 180px;
}
.login-form {
  padding-top: 80px;
}
.sidebar .workspace-label {
  margin-top: 36px;
}
html[data-theme="dark"] {
  color-scheme: dark;
  --ink: #e0e9e6;
  --muted: #9fb4ad;
  --line: #2c443d;
  --green: #80cdb0;
  --bg: #0d1916;
  --orange: #e4ae66;
}
html[data-theme="dark"] body {
  background: var(--bg);
}
html[data-theme="dark"] .sidebar,
html[data-theme="dark"] .topbar,
html[data-theme="dark"] .panel,
html[data-theme="dark"] .metrics article {
  background: #14251f;
}
html[data-theme="dark"] button,
html[data-theme="dark"] a.button,
html[data-theme="dark"] input,
html[data-theme="dark"] select,
html[data-theme="dark"] textarea {
  background: #192e26;
  color: var(--ink);
  border-color: var(--line);
}
html[data-theme="dark"] button:hover {
  background: #234236;
  border-color: #5a8d77;
}
html[data-theme="dark"] .sidebar nav button {
  background: transparent;
}
html[data-theme="dark"] .sidebar nav button.active {
  background: #254336;
  color: #a8e5cd;
}
html[data-theme="dark"] .sidebar nav button b {
  background: #315642;
}
html[data-theme="dark"] .identity > span {
  background: #254336;
}
html[data-theme="dark"] .boundary {
  background: #302819;
  border-color: #5c482c;
  color: #e2c99e;
}
html[data-theme="dark"] .badge {
  background: #3a2d19;
  border-color: #665133;
  color: #ebc68d;
}
html[data-theme="dark"] .badge.pale {
  background: #20382d;
  border-color: #3e5d4e;
  color: #afd7be;
}
html[data-theme="dark"] .pill {
  background: #234638;
  color: #b0dfc7;
}
html[data-theme="dark"] .pill.bad {
  background: #4b2c28;
  color: #f1b6a7;
}
html[data-theme="dark"] .pill.neutral {
  background: #293c3c;
  color: #bbcecc;
}
html[data-theme="dark"] .video-box {
  background: #12221c;
  border-color: #3c584a;
}
html[data-theme="dark"] .commands button {
  background: #244333;
  color: #b0e9cf;
  border-color: #3a654e;
}
html[data-theme="dark"] th {
  background: #102019;
  color: #b5c9c0;
}
html[data-theme="dark"] td {
  border-color: #2a3d34;
}
html[data-theme="dark"] .map {
  background: #162d2b;
  border-color: #35524a;
}
html[data-theme="dark"] .map-grid {
  opacity: 0.3;
}
html[data-theme="dark"] .map-land {
  background: #274334;
  border-color: #446343;
}
html[data-theme="dark"] .map-label,
html[data-theme="dark"] .map-legend,
html[data-theme="dark"] .compass {
  color: #b0c6bd;
}
html[data-theme="dark"] .aircraft {
  color: #a3e6c8;
  text-shadow: none;
}
html[data-theme="dark"] .aircraft span {
  background: #1e3d31;
}
html[data-theme="dark"] .route circle {
  fill: #284e3f;
  stroke: #97c3a9;
}
html[data-theme="dark"] .primary {
  background: #87c8a9;
  border-color: #87c8a9;
  color: #10291d;
}
html[data-theme="dark"] .primary:hover {
  background: #a4dfbf;
}
html[data-theme="dark"] .steps b {
  background: #274836;
  color: #b9e8ce;
}
html[data-theme="dark"] .preferences {
  background: #192e26f5;
}
html[data-theme="dark"] .preferences button.active {
  background: #345744;
  color: #dbf6e7;
}
html[data-theme="dark"] .login-art {
  background: #091e17;
}
html[data-theme="dark"] .login-form p {
  color: var(--muted);
}
html[data-theme="dark"] .error {
  color: #f1ac99 !important;
}
html[data-theme="dark"] .toast {
  background: #c4e6d3;
  color: #122d20;
}
@media (max-width: 700px) {
  .sidebar .brand img {
    width: 145px;
    max-height: 48px;
  }
  .sidebar .brand > span {
    font-size: 9px;
    letter-spacing: 0.8px;
  }
  .preferences {
    top: 13px;
    right: 12px;
    padding: 3px;
    gap: 3px;
  }
  .preferences button {
    font-size: 12px;
    padding: 5px 7px;
  }
  .preferences #theme-toggle {
    font-size: 16px;
    width: 28px;
  }
  .topbar > div {
    padding-right: 0;
  }
  .login-art .brand img {
    width: 185px;
  }
  .login-art .brand > span {
    font-size: 10px;
    letter-spacing: 1px;
  }
  .login-art {
    padding-top: 60px;
  }
  .login-form {
    padding-top: 28px;
  }
  .sidebar nav {
    margin-top: 12px;
  }
  .sidebar nav button {
    white-space: normal;
    line-height: 1.35;
  }
  .brand-sidebar {
    max-width: 160px;
  }
}
@media print {
  .preferences {
    display: none !important;
  }
}
/* v0.2: comfortable typography, warm light surfaces and softer dark greens */
:root {
  --bg: #f3f0e7;
  --ink: #23372f;
  --muted: #65756b;
  --line: #dedfd0;
  --green: #236b52;
}
html:not([data-theme="dark"]) .sidebar,
html:not([data-theme="dark"]) .topbar,
html:not([data-theme="dark"]) .panel,
html:not([data-theme="dark"]) .metrics article {
  background: #fffdf6;
}
html:not([data-theme="dark"]) input,
html:not([data-theme="dark"]) textarea,
html:not([data-theme="dark"]) select,
html:not([data-theme="dark"]) button,
html:not([data-theme="dark"]) a.button {
  background: #faf8f0;
}
html:not([data-theme="dark"]) .primary {
  background: #2c6e52;
  color: #fffdf6;
}
html:not([data-theme="dark"]) th {
  background: #efeee3;
}
html:not([data-theme="dark"]) .preferences {
  background: #fffdf4f5;
}
.brand-sidebar {
  width: 100%;
  gap: 10px;
}
.sidebar .brand-sidebar img {
  width: 100%;
  max-height: 72px;
}
.sidebar .brand-sidebar > span {
  display: block;
  width: 100%;
  font-size: 21px;
  font-weight: 750;
  letter-spacing: 0.4px;
  line-height: 1.16;
  white-space: normal;
}
.sidebar .workspace-label {
  margin-top: 26px;
}
.sidebar nav button {
  font-size: 14px;
  line-height: 1.35;
}
.sidebar nav {
  gap: 5px;
}
.heading-actions {
  display: flex;
  gap: 10px;
  align-items: center;
}
.heading-actions button {
  font-size: 13px;
}
.tools-grid {
  display: grid;
  grid-template-columns: minmax(270px, 0.8fr) minmax(0, 1.3fr);
  gap: 24px;
  align-items: start;
}
.tool-form label {
  margin-top: 13px;
}
.tool-form > button {
  width: 100%;
  margin-top: 18px;
}
.record-list {
  display: grid;
  gap: 18px;
}
.record h2 {
  margin-top: 13px;
}
.record p {
  color: var(--muted);
}
.record small {
  font-size: 12px;
}
.record-fields {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}
.record-fields dt {
  font-size: 12px;
  color: var(--muted);
}
.record-fields dd {
  margin: 4px 0;
  font-size: 15px;
  font-weight: 600;
  overflow-wrap: anywhere;
}
.record-actions {
  display: flex;
  gap: 9px;
  margin-top: 18px;
  flex-wrap: wrap;
}
.preserve {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
.run-bar {
  display: flex;
  gap: 18px;
  align-items: end;
  margin-bottom: 22px;
  flex-wrap: wrap;
}
.run-bar > div {
  flex: 1;
  min-width: 220px;
}
.suite summary {
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 18px;
  flex-wrap: wrap;
}
.suite summary small {
  margin-left: auto;
}
.suite .table-wrap {
  margin-top: 18px;
}
.audit-panel {
  margin-top: 24px;
}
.filter-bar {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 18px;
}
.filter-bar select {
  max-width: 240px;
}
.contract-filters {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 18px;
}
.api-operation {
  border-bottom: 1px solid var(--line);
  padding: 15px 0;
}
.api-operation summary {
  display: flex;
  gap: 14px;
  align-items: center;
  cursor: pointer;
  flex-wrap: wrap;
}
.api-operation code {
  font-size: 13px;
  overflow-wrap: anywhere;
}
.api-operation summary > span:last-child {
  color: var(--muted);
  font-size: 13px;
}
.api-operation pre {
  max-height: 450px;
  overflow: auto;
  background: #e8eee4;
  color: #1f3e2b;
  padding: 18px;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  font-size: 12px;
}
.section-intro p {
  font-size: 15px;
  max-width: 900px;
}
.gates .gate p {
  font-size: 15px;
}
.gate-actions button {
  font-size: 13px;
}
.gate-meta {
  font-size: 12px;
}
.preferences {
  background: #fffdf4f5;
}
.sidebar .side-bottom {
  padding-top: 18px;
}
.sidebar {
  overflow-y: auto;
}
html[data-theme="dark"] {
  --bg: #1c3229;
  --ink: #edf3e6;
  --muted: #bfd0ba;
  --line: #4c6955;
  --green: #b5dbac;
}
html[data-theme="dark"] .sidebar,
html[data-theme="dark"] .topbar {
  background: #253e30;
}
html[data-theme="dark"] .panel,
html[data-theme="dark"] .metrics article {
  background: #2d4837;
}
html[data-theme="dark"] button,
html[data-theme="dark"] a.button,
html[data-theme="dark"] input,
html[data-theme="dark"] select,
html[data-theme="dark"] textarea {
  background: #233c2d;
  border-color: #628167;
}
html[data-theme="dark"] .sidebar nav button.active {
  background: #42634a;
  color: #f0f6e9;
}
html[data-theme="dark"] .pill {
  background: #42654a;
  color: #edfae8;
}
html[data-theme="dark"] .pill.neutral {
  background: #3b5945;
  color: #e0edda;
}
html[data-theme="dark"] .pill.bad {
  background: #654438;
  color: #ffe0ce;
}
html[data-theme="dark"] .primary {
  background: #afd39d;
  color: #1a3221;
  border-color: #afd39d;
}
html[data-theme="dark"] .primary:hover {
  background: #c3e3b3;
}
html[data-theme="dark"] .map {
  background: #294739;
  border-color: #5d7b61;
}
html[data-theme="dark"] .map-land {
  background: #43614a;
  border-color: #73896a;
}
html[data-theme="dark"] .preferences {
  background: #2d4837f5;
}
html[data-theme="dark"] .preferences button.active {
  background: #55775a;
  color: #f3f9ed;
}
html[data-theme="dark"] th {
  background: #253d2e;
  color: #d6e6cb;
}
html[data-theme="dark"] td {
  border-color: #4a6550;
}
html[data-theme="dark"] .video-box {
  background: #263e2d;
  border-color: #6b8467;
}
html[data-theme="dark"] .commands button {
  background: #426249;
  color: #f0f8e8;
  border-color: #72916c;
}
html[data-theme="dark"] .login-art {
  background: #203d2c;
}
html[data-theme="dark"] .api-operation pre {
  background: #1c3023;
  color: #e0f0d6;
}
html[data-theme="dark"] .metrics strong.muted {
  color: #c1cfb9;
}
@media (max-height: 850px) and (min-width: 701px) {
  .sidebar {
    padding-top: 20px;
  }
  .sidebar .workspace-label {
    margin-top: 18px;
  }
  .sidebar nav button {
    padding: 9px 7px;
  }
  .isolation p {
    margin-bottom: 12px;
  }
}
@media (max-width: 1100px) {
  .tools-grid {
    grid-template-columns: 1fr;
  }
  .heading-actions {
    flex-wrap: wrap;
  }
  .page-heading {
    align-items: flex-start;
  }
}
@media (max-width: 700px) {
  .sidebar .brand-sidebar > span {
    font-size: 21px;
    max-width: 220px;
    width: 220px;
    letter-spacing: 0.2px;
  }
  .sidebar .brand-sidebar img {
    width: 180px;
  }
  .sidebar .brand-sidebar {
    gap: 5px;
  }
  .sidebar nav {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 4px;
  }
  .sidebar nav button {
    font-size: 13px;
    padding: 10px;
  }
  .sidebar nav button span {
    display: inline;
  }
  .sidebar nav button b {
    margin-left: 4px;
  }
  .heading-actions {
    margin-bottom: 16px;
    width: 100%;
  }
  .heading-actions button,
  .heading-actions a {
    flex: 1;
    text-align: center;
  }
  .page-heading .heading-actions a {
    margin-bottom: 0;
  }
  .contract-filters {
    grid-template-columns: 1fr;
  }
  .record-fields {
    grid-template-columns: 1fr;
  }
  .suite summary small {
    margin-left: 0;
  }
  .run-bar {
    align-items: stretch;
  }
  .run-bar > button {
    flex: 1;
  }
  .record .panel-heading {
    flex-wrap: wrap;
  }
  .preferences {
    top: 16px;
  }
  .api-operation summary {
    gap: 8px;
  }
  .sidebar .brand-sidebar > span {
    padding-right: 0;
  }
}
@media print {
  .tool-form,
  .run-bar button,
  .record-actions,
  .filter-bar,
  .contract-filters {
    display: none !important;
  }
  .tools-grid {
    display: block;
  }
}
/* v0.3: partner equipment, reviewed protocols and operating guide */
.profile-group,
.discussion {
  border-top: 1px solid var(--line);
  margin-top: 18px;
  padding-top: 15px;
}
.profile-group summary,
.discussion summary,
.record details summary {
  cursor: pointer;
  font-weight: 650;
  color: var(--green);
}
.hint {
  font-size: 14px !important;
  padding: 13px;
  border-left: 3px solid var(--green);
  background: var(--bg);
  line-height: 1.6;
}
.comment {
  border-bottom: 1px solid var(--line);
  padding: 14px 0;
}
.comment p {
  margin-bottom: 0;
}
.comment-form {
  margin-top: 18px;
}
.comment-form button {
  margin-top: 10px;
}
.profile-group input,
.profile-group textarea {
  margin-bottom: 10px;
}
.record {
  margin-top: 16px;
}
.record h3 {
  margin: 18px 0 5px;
}
.snapshot {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  font-size: 12px;
  max-height: 350px;
  overflow: auto;
}
.report-metrics {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
  margin-bottom: 24px;
}
.report-metrics strong {
  display: block;
  font-size: 32px;
}
.guide-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin-top: 22px;
}
.guide-grid p {
  color: var(--muted);
  font-size: 16px;
  white-space: pre-line;
}
.guide-grid article:first-child,
.guide-grid article:last-child {
  grid-column: 1/-1;
}
.sidebar nav button {
  padding: 9px 7px;
}
.sidebar .workspace-label {
  margin-top: 18px;
}
@media (max-width: 800px) {
  .guide-grid {
    grid-template-columns: 1fr;
  }
  .report-metrics {
    gap: 8px;
  }
  .report-metrics .panel {
    padding: 12px;
    font-size: 13px;
  }
}
@media print {
  body {
    color: #172c31 !important;
    background: white !important;
  }
  .sidebar,
  .topbar,
  .page-heading,
  .boundary,
  footer,
  .toast,
  .preferences,
  #print-guide,
  #print-protocols,
  .comment-form {
    display: none !important;
  }
  main {
    margin: 0 !important;
  }
  .content {
    padding: 0 !important;
    max-width: none;
  }
  section[hidden] {
    display: none !important;
  }
  .panel {
    break-inside: avoid;
    background: white !important;
    color: #172c31 !important;
  }
  .record p,
  .guide-grid p {
    color: #263a30 !important;
  }
  .record details:not([open]) {
    display: none;
  }
  .report-metrics {
    display: none;
  }
}
#page-mapping code {
  color: var(--ink);
  font-size: 13px;
  overflow-wrap: anywhere;
}
#page-mapping .table-wrap td {
  min-width: 150px;
}
#page-mapping .report-metrics strong {
  font-variant-numeric: tabular-nums;
}
/* Whole-lab structure: shared civil infrastructure and phase-two review. */
.nav-label {
  font-size: 11px;
  letter-spacing: 1.6px;
  color: var(--muted);
  margin: 20px 8px 8px;
}
.nav-domains {
  border: 1px solid var(--line);
  border-radius: 8px;
  margin: 6px 0;
  padding: 10px 8px;
}
.nav-domains summary {
  cursor: pointer;
  font-weight: 650;
  font-size: 14px;
  color: var(--green);
}
.nav-domains button {
  width: 100%;
  margin-top: 5px;
}
.sidebar nav {
  display: block;
}
.sidebar nav > button {
  width: 100%;
  margin: 3px 0;
}
.domain-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
  margin-top: 22px;
}
.domain-card {
  display: flex;
  flex-direction: column;
  min-height: 285px;
}
.domain-card p {
  color: var(--muted);
  flex: 1;
}
.domain-card small {
  margin-bottom: 18px;
}
.domain-icon {
  font-size: 30px;
  color: var(--green);
  margin-bottom: 12px;
}
.domain-assets,
.record-list {
  display: grid;
  gap: 18px;
}
.domain-assets {
  margin-top: 24px;
}
.phase-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 22px;
}
.phase-card {
  padding: 28px;
}
.phase-card h2 {
  font-size: 28px;
  margin-top: 13px;
}
.phase-card p {
  color: var(--muted);
}
.active-phase {
  border-top: 3px solid #bd955d;
}
.overview-actions,
.chip-list,
.source-links {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin: 22px 0;
}
.attention-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
}
.model-row {
  border-bottom: 1px solid var(--line);
  padding: 14px 0;
}
.model-row small,
.asset-card small {
  display: block;
}
.source-links a {
  border: 1px solid var(--line);
  padding: 12px;
  border-radius: 6px;
}
.text-button {
  border: 0;
  background: transparent !important;
  padding: 0;
  color: var(--green);
  text-align: left;
}
.classification {
  border: 1px solid var(--line);
  padding: 16px;
  border-radius: 8px;
  margin: 20px 0;
}
.infrastructure-guide {
  margin-bottom: 24px;
}
.record-fields dd,
.asset-card p {
  overflow-wrap: anywhere;
}
.report-metrics {
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
}
.tool-form details form button {
  margin-top: 12px;
}
#page-monitor td {
  min-width: 150px;
}
.sidebar .brand-sidebar > span {
  font-size: 24px;
}
.sidebar .workspace-label {
  margin: 18px 0;
}
.sidebar .side-bottom {
  padding-top: 26px;
}
.sidebar .brand-sidebar img {
  max-height: 75px;
}
html[data-theme="dark"] .nav-domains {
  background: #294332;
}
html[data-theme="dark"] .active-phase {
  border-top-color: #d7ba82;
}
@media (min-width: 901px) {
  .sidebar {
    width: 286px;
    padding: 24px 22px;
  }
  main {
    margin-left: 286px;
  }
  .content {
    max-width: 1800px;
  }
  .sidebar .brand-sidebar > span {
    font-size: 25px;
  }
}
@media (max-width: 1200px) {
  .domain-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
@media (max-width: 900px) {
  .sidebar {
    position: relative;
    width: 100%;
    height: auto;
    overflow: visible;
    padding: 24px;
  }
  main {
    margin-left: 0;
  }
  .sidebar nav {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 6px;
  }
  .sidebar .side-bottom {
    display: none;
  }
  .sidebar .brand-sidebar {
    max-width: 240px;
  }
  .sidebar nav .nav-label {
    grid-column: 1/-1;
  }
  .phase-grid,
  .attention-grid {
    grid-template-columns: 1fr;
  }
  .domain-grid {
    grid-template-columns: 1fr;
  }
  .topbar {
    padding: 0 20px;
  }
  .content {
    padding: 24px 20px;
  }
  .nav-domains summary {
    line-height: 1.5;
  }
  .sidebar nav button {
    white-space: normal;
  }
  .sidebar .brand-sidebar > span {
    width: 240px;
  }
  .sidebar .workspace-label {
    margin-top: 16px;
  }
}
@media print {
  .overview-actions,
  .nav-domains,
  .classification {
    display: none;
  }
  .domain-grid,
  .phase-grid {
    display: block;
  }
  .domain-card {
    min-height: 0;
    margin: 12px 0;
  }
}
/* Identity, access and navigation · v0.6 */
.page-back-row {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 18px;
  color: var(--muted);
  font-size: 13px;
}
.back-button {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 15px;
  font-weight: 700;
  border-radius: 10px;
  padding: 9px 14px;
}
.back-button:disabled {
  opacity: 0.45;
  cursor: default;
}
.sidebar nav button {
  position: relative;
  border-left: 3px solid transparent;
  transition:
    background 0.18s,
    transform 0.18s,
    border-color 0.18s,
    box-shadow 0.18s;
}
.sidebar nav button[data-accent="mint"] {
  --nav-accent: #5bbf91;
  --nav-soft: #5bbf911c;
}
.sidebar nav button[data-accent="cyan"] {
  --nav-accent: #45a9c0;
  --nav-soft: #45a9c01c;
}
.sidebar nav button[data-accent="amber"] {
  --nav-accent: #d6a84d;
  --nav-soft: #d6a84d1c;
}
.sidebar nav button[data-accent="violet"] {
  --nav-accent: #a693d7;
  --nav-soft: #a693d71c;
}
.sidebar nav button[data-accent="rose"] {
  --nav-accent: #d58c95;
  --nav-soft: #d58c951c;
}
.sidebar nav button > span:first-child {
  color: var(--nav-accent, var(--green));
  background: var(--nav-soft, transparent);
  display: inline-grid;
  place-items: center;
  min-width: 27px;
  height: 27px;
  border-radius: 7px;
  font-size: 17px;
}
.sidebar nav button:hover,
.sidebar nav button:focus-visible {
  background: var(--nav-soft);
  border-left-color: var(--nav-accent);
  transform: translateX(3px);
  box-shadow: 0 3px 12px #00000008;
}
.sidebar nav button.active {
  background: var(--nav-soft);
  border-left-color: var(--nav-accent);
  font-weight: 700;
}
.sidebar nav button:focus-visible {
  outline: 2px solid var(--nav-accent);
  outline-offset: 2px;
}
.nav-label {
  margin-top: 24px !important;
  letter-spacing: 1.7px;
}
.nav-domains summary:hover {
  color: var(--green);
}
.identity b {
  overflow-wrap: anywhere;
}
.team-key-access {
  margin-top: 20px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
}
.team-key-access summary {
  cursor: pointer;
  font-size: 14px;
  color: var(--muted);
}
.team-key-access form {
  margin-top: 16px;
}
#email-access form {
  display: grid;
  gap: 15px;
}
#email-access label {
  display: grid;
  gap: 7px;
}
.admin-gate {
  max-width: 640px;
  margin: 30px auto;
  padding: 36px;
}
.admin-shield {
  display: inline-grid;
  place-items: center;
  width: 58px;
  height: 58px;
  border-radius: 16px;
  background: #d58c9522;
  color: #cc8191;
  font-size: 35px;
}
.admin-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  margin-top: 24px;
}
.admin-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  margin: 20px 0;
}
.admin-warning {
  border-left: 4px solid #d6a84d;
}
.permission-list {
  margin: 14px 0;
}
.permission-list summary {
  font-weight: 700;
  cursor: pointer;
}
.check-row {
  display: flex !important;
  align-items: center;
  gap: 10px !important;
  font-weight: 400 !important;
  margin: 9px 0;
}
.check-row input {
  width: 18px !important;
  min-height: 18px !important;
  margin: 0 !important;
  accent-color: var(--green);
}
.policy-row {
  padding: 17px 0;
  border-bottom: 1px solid var(--line);
}
.policy-row:last-child {
  border: 0;
}
.policy-row small {
  display: block;
  margin: 7px 0;
}
.policy-row code {
  overflow-wrap: anywhere;
}
.account-card {
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 12px;
}
.account-card summary {
  cursor: pointer;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}
.account-card summary small {
  flex-basis: 100%;
}
.account-card form {
  max-width: 650px;
  margin-top: 20px;
}
.invitation-result,
.recovery-panel {
  border-left: 4px solid #d6a84d;
  margin: 22px 0;
}
.recovery-panel pre {
  font-size: 18px;
  line-height: 1.7;
}
.permission-list p,
.policy-row p {
  font-size: 14px;
}
#page-admin .tool-form label {
  display: grid;
  gap: 8px;
}
#page-admin input[readonly] {
  font-family: monospace;
}
#page-admin .table-wrap {
  max-height: 500px;
  overflow: auto;
}
button:disabled {
  cursor: not-allowed;
}
.login-form {
  overflow-y: auto;
}
.admin-gate input {
  width: 100%;
}
@media (max-width: 1000px) {
  .admin-grid {
    grid-template-columns: 1fr;
  }
}
@media (prefers-reduced-motion: reduce) {
  .sidebar nav button {
    transition: none;
  }
  .sidebar nav button:hover {
    transform: none;
  }
}
@media print {
  .page-back-row,
  .admin-toolbar {
    display: none;
  }
  .recovery-panel,
  .invitation-result,
  .admin-gate {
    display: none;
  }
}
/* Administration workbench · v0.7 */
.admin-tabs {
  display: flex;
  gap: 9px;
  flex-wrap: wrap;
  margin: 22px 0;
}
.admin-tabs button {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 13px 17px;
  border-radius: 10px;
  background: var(--panel, var(--bg));
  font-weight: 600;
}
.admin-tabs button span {
  color: #9981c8;
  font-size: 20px;
}
.admin-tabs button.active {
  border-color: var(--green);
  box-shadow: inset 0 -3px var(--green);
  background: #74bc9d18;
}
.admin-field-pair {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
}
.permission-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4px 20px;
  margin: 15px 0;
}
.permission-list {
  padding: 15px;
  border: 1px solid var(--line);
  border-radius: 10px;
}
.admin-feedback {
  border: 1px solid #d6a84d;
  border-left: 4px solid #d6a84d;
  padding: 16px 20px;
  border-radius: 10px;
  margin: 18px 0;
  overflow-wrap: anywhere;
}
.admin-locked-preview {
  border-style: dashed;
  margin-top: 24px;
}
.admin-gate {
  max-width: none;
  display: grid;
  grid-template-columns: 58px 1fr;
  gap: 22px;
  margin: 20px 0;
}
.admin-gate .tool-form {
  max-width: 540px;
}
.admin-gate input {
  max-width: 100%;
}
.admin-gate h2 {
  margin-top: 7px;
}
.role-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 16px;
}
.role-cards h3 {
  margin: 0 0 12px;
}
.role-cards ul {
  padding-left: 20px;
  font-size: 14px;
}
.role-cards .account-card {
  display: flex;
  flex-direction: column;
}
.role-cards .record-actions {
  margin-top: auto;
}
#page-admin fieldset {
  border: 0;
  padding: 0;
  margin: 0;
  min-width: 0;
}
#page-admin .policy-row > .pill {
  margin-left: 12px;
}
#page-admin .tool-form input,
#page-admin .tool-form select {
  min-width: 0;
}
#page-admin .record-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
#admin-invitation-link {
  width: 100%;
}
.account-card summary .pill {
  margin-left: auto;
}
@media (max-width: 720px) {
  .admin-field-pair,
  .permission-grid {
    grid-template-columns: 1fr;
  }
  .admin-tabs {
    gap: 7px;
  }
  .admin-tabs button {
    flex: 1 1 42%;
    padding: 10px;
  }
  .admin-gate {
    grid-template-columns: 1fr;
    padding: 22px;
  }
  .admin-gate .admin-shield {
    width: 46px;
    height: 46px;
  }
  .account-card summary .pill {
    margin-left: 0;
  }
}

/* AGRON brand returns to the laboratory overview. */
#lab-home {
  color: inherit;
  text-decoration: none;
  cursor: pointer;
  border-radius: 12px;
  transition: filter 0.16s ease;
}
#lab-home:hover {
  filter: brightness(1.1);
}
#lab-home:focus-visible {
  outline: 2px solid var(--green);
  outline-offset: 7px;
}
@media (prefers-reduced-motion: reduce) {
  #lab-home {
    transition: none;
  }
}

.connection-center {
  border-top: 3px solid var(--mint, #79e5b0);
}
.connection-hero {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  flex-wrap: wrap;
}
.connection-flow {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  margin: 22px 0;
}
.connection-flow span {
  padding: 12px 16px;
  border: 1px solid var(--line, #546b63);
  border-radius: 10px;
}
.connection-checks {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 12px;
  margin: 22px 0;
}
.connection-check {
  border: 1px solid var(--line, #546b63);
  border-radius: 12px;
  padding: 16px;
}
.connection-check.ready {
  border-left: 3px solid #49b58b;
}
.connection-check.pending {
  border-left: 3px solid #cc9e52;
}
.connection-check h3 {
  font-size: 1rem;
  line-height: 1.4;
  margin: 14px 0 10px;
}
.connection-center details {
  margin-top: 20px;
}
.connection-center li {
  margin: 10px 0;
  line-height: 1.6;
}

/* Universal handbook: shared in-app and standalone presentation. */
.handbook-header {
  padding: 30px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: linear-gradient(120deg, rgba(97, 193, 166, 0.12), transparent);
  margin-bottom: 24px;
}
.handbook-header h2 {
  font-size: clamp(26px, 3vw, 40px);
  max-width: 900px;
  margin: 16px 0;
}
.handbook-header p {
  max-width: 85ch;
}
.handbook-header label {
  margin-top: 24px;
}
.handbook-meta {
  display: flex;
  gap: 14px;
  align-items: center;
  flex-wrap: wrap;
  color: var(--muted);
  font-size: 14px;
}
.handbook-toc {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin: 24px 0 32px;
}
.handbook-toc a {
  display: block;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px 14px;
  text-decoration: none;
  font-size: 15px;
}
.handbook-toc a:hover {
  background: rgba(97, 193, 166, 0.12);
  border-color: var(--green);
}
.handbook-entry {
  scroll-margin-top: 100px;
  margin-bottom: 20px;
  line-height: 1.75;
  overflow-wrap: anywhere;
}
.handbook-entry p,
.handbook-entry li {
  font-size: 18px;
  max-width: 100ch;
}
.handbook-entry li {
  padding: 3px 0 5px 6px;
}
.handbook-entry h3 {
  font-size: 21px;
}
.handbook-entry code {
  font-size: 14px;
}
.handbook-table {
  overflow-x: auto;
  max-width: 100%;
  margin: 14px 0;
}
.handbook-table table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  font-size: 15px;
}
.handbook-table td,
.handbook-table th {
  border-bottom: 1px solid var(--line);
  padding: 12px;
  vertical-align: top;
}
.handbook-table th {
  color: var(--green);
  font-weight: 650;
}
.handbook-category-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
}
.handbook-category-grid .handbook-entry {
  margin-bottom: 0;
}
.handbook-category-grid + * {
  margin-top: 24px;
}
[data-handbook] > section {
  margin-top: 32px;
}
.handbook-standalone main {
  max-width: 1300px;
  margin: 32px auto;
  padding: 0 28px;
  min-height: 60vh;
}
.handbook-standalone-bar {
  display: flex;
  gap: 24px;
  justify-content: space-between;
  align-items: center;
  padding: 22px 28px;
  border-bottom: 1px solid var(--line);
  background: var(--bg);
}
.handbook-standalone-bar > a {
  font-size: 20px;
  font-weight: 800;
  text-decoration: none;
  letter-spacing: 0.06em;
}
.handbook-standalone-bar nav {
  display: flex;
  align-items: center;
  gap: 18px;
}
.handbook-standalone footer {
  padding: 28px;
  text-align: center;
  color: var(--muted);
  font-size: 14px;
}
#handbook-search-status {
  margin: 8px 0 0;
  font-size: 14px;
  min-height: 22px;
}
@media (max-width: 1000px) {
  .handbook-toc {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .handbook-category-grid {
    grid-template-columns: 1fr;
  }
}
@media (max-width: 600px) {
  .handbook-toc {
    grid-template-columns: 1fr;
  }
  .handbook-header {
    padding: 20px;
  }
  .handbook-standalone main {
    padding: 0 14px;
    margin-top: 20px;
  }
  .handbook-standalone-bar {
    padding: 16px;
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }
  .handbook-entry p,
  .handbook-entry li {
    font-size: 17px;
  }
  .handbook-meta {
    gap: 8px;
  }
  .handbook-header .record-actions {
    display: flex;
    flex-wrap: wrap;
  }
  .handbook-table td,
  .handbook-table th {
    padding: 9px;
  }
}
@media print {
  [data-handbook] {
    color: #172c31 !important;
    background: #fff !important;
  }
  .handbook-standalone-bar,
  .handbook-toc,
  .handbook-header .record-actions,
  .handbook-header label,
  #handbook-search,
  #handbook-search-status {
    display: none !important;
  }
  .handbook-standalone main {
    padding: 0;
    margin: 0;
    max-width: none;
  }
  .handbook-entry[data-guide-entry][hidden] {
    display: block !important;
  }
  .handbook-entry,
  .handbook-header {
    background: #fff !important;
    box-shadow: none !important;
    color: #172c31 !important;
    border: 1px solid #ddd;
  }
  .handbook-category-grid {
    display: block;
  }
  .handbook-entry {
    break-inside: auto;
  }
  .handbook-entry h2,
  .handbook-entry h3 {
    break-after: avoid;
  }
  .handbook-table tr {
    break-inside: avoid;
  }
  .handbook-table {
    overflow: visible;
  }
  .handbook-table table {
    font-size: 11px;
  }
  .handbook-entry p,
  .handbook-entry li {
    font-size: 12px;
    line-height: 1.6;
  }
  .handbook-entry code,
  .handbook-meta {
    font-size: 10px;
  }
}

[data-handbook][data-search-active="true"] .handbook-toc {
  display: none;
}
