:root {
  color-scheme: light;
}
body {
  background: #f1f5f1;
}
.portal-header {
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(255, 255, 255, 0.97);
  border-bottom: 1px solid #d6e3da;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 18px max(24px, calc((100vw - 1440px) / 2));
  min-height: 80px;
}
.portal-header img {
  display: block;
  width: 190px;
  height: auto;
}
.portal-header nav {
  display: flex;
  gap: 22px;
  flex-wrap: wrap;
  font-size: 14px;
}
.portal-shell {
  display: grid;
  grid-template-columns: 235px minmax(0, 1fr);
  max-width: 1440px;
  margin: auto;
  min-height: 75vh;
  gap: 35px;
  padding: 35px 24px;
}
.portal-shell aside {
  align-self: start;
  position: sticky;
  top: 115px;
  background: #173334;
  color: #ecf7ef;
  border-radius: 18px;
  padding: 25px 15px;
}
.portal-shell aside h2 {
  font-size: 18px;
  padding: 0 12px;
  margin: 0 0 22px;
  color: #a6ecce;
}
.portal-shell aside a,
.portal-shell aside button {
  display: block;
  width: 100%;
  padding: 13px 14px;
  border-radius: 9px;
  color: inherit;
  font-size: 14px;
  text-align: left;
  text-decoration: none;
  background: none;
  border: 0;
  cursor: pointer;
  min-height: 44px;
}
.portal-shell aside a[aria-current="page"] {
  background: #a6ecce;
  color: #173334;
  font-weight: 700;
}
.portal-shell aside a:hover {
  background: #2c5147;
  color: white;
}
.portal-shell aside hr {
  border: 0;
  border-top: 1px solid #416356;
  margin: 18px 0;
}
.portal-shell main {
  min-width: 0;
}
.portal-shell h1 {
  font-size: clamp(30px, 4vw, 48px);
  line-height: 1.12;
  margin: 8px 0 18px;
}
.portal-shell h2 {
  font-size: 24px;
  line-height: 1.2;
  margin: 0 0 16px;
}
.portal-shell h3 {
  font-size: 18px;
  margin: 0 0 12px;
}
.portal-shell p {
  line-height: 1.65;
  color: #50665d;
}
.lead {
  font-size: 17px;
  max-width: 760px;
  margin-bottom: 28px;
}
.portal-card {
  border: 1px solid #d8e5dc;
  border-radius: 16px;
  background: white;
  padding: 28px;
  margin: 0 0 24px;
  min-width: 0;
}
.portal-card form {
  max-width: 720px;
}
.portal-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 22px;
}
.portal-grid .portal-card {
  margin: 0;
}
.portal-shell label {
  display: block;
  margin: 17px 0;
  font-size: 14px;
  font-weight: 600;
  color: #284b3b;
}
.portal-shell input:not([type="checkbox"]),
.portal-shell select,
.portal-shell textarea {
  display: block;
  width: 100%;
  min-width: 0;
  padding: 13px 14px;
  font: inherit;
  font-size: 16px;
  color: #173334;
  background: #f8faf7;
  border: 1px solid #c6d7ca;
  border-radius: 8px;
  margin-top: 7px;
  min-height: 46px;
}
.portal-shell input[type="checkbox"] {
  margin-right: 9px;
  width: 18px;
  height: 18px;
  vertical-align: middle;
}
.portal-shell textarea {
  min-height: 120px;
  resize: vertical;
}
.portal-shell button,
.portal-shell .button {
  cursor: pointer;
  min-height: 44px;
  margin: 5px 6px 5px 0;
  border-radius: 8px;
}
.portal-shell button:disabled {
  opacity: 0.55;
  cursor: wait;
}
.portal-shell .danger {
  background: #963e3e;
  color: white;
}
.portal-shell .form-result {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  margin: 15px 0;
  line-height: 1.6;
}
.portal-shell .error {
  color: #9c3030;
}
.portal-shell .success {
  color: #226b48;
}
.portal-shell .eyebrow {
  color: #387a65;
  font-weight: 700;
  font-size: 12px;
  letter-spacing: 2px;
}
.portal-badge {
  font-size: 12px;
  background: #e5f5ec;
  border: 1px solid #c5e2cf;
  padding: 6px 10px;
  border-radius: 20px;
  display: inline-block;
  margin: 5px 5px 8px 0;
}
.portal-badge.amber {
  background: #fff2cf;
  border-color: #e5cb8c;
}
.portal-list {
  display: grid;
  gap: 14px;
}
.portal-row {
  border: 1px solid #d9e6dd;
  border-radius: 12px;
  padding: 18px;
  overflow-wrap: anywhere;
}
.portal-row p {
  margin: 6px 0 12px;
}
.portal-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  align-items: center;
}
.portal-shell pre {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  background: #edf3ec;
  padding: 16px;
  border-radius: 8px;
  font-size: 14px;
  user-select: all;
}
.portal-shell .honey {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}
.portal-shell .notice {
  margin: 20px 0;
}
.conversation {
  display: flex;
  flex-direction: column;
  gap: 15px;
  max-height: 460px;
  overflow: auto;
  overscroll-behavior: contain;
  margin: 20px 0;
}
.message {
  max-width: 88%;
  padding: 15px 19px;
  background: #edf3ec;
  border-radius: 14px;
  align-self: flex-start;
}
.message.staff {
  background: #173334;
  color: #f1fbf3;
  align-self: flex-end;
}
.message p {
  color: inherit;
  white-space: pre-wrap;
  margin: 8px 0;
  overflow-wrap: anywhere;
}
.message small {
  opacity: 0.75;
  font-size: 11px;
}
.portal-footer {
  max-width: 1440px;
  margin: 20px auto 0;
  padding: 28px;
  text-align: center;
  font-size: 13px;
}
.live-dot {
  display: inline-block;
  width: 9px;
  height: 9px;
  border-radius: 100%;
  background: #387a65;
  margin-right: 6px;
  box-shadow: 0 0 0 4px #d8efdf;
}
.offline-dot {
  background: #bd8d35;
  box-shadow: 0 0 0 4px #f7edce;
}
.portal-shell details {
  margin: 18px 0;
}
.portal-shell summary {
  cursor: pointer;
  padding: 12px 0;
  font-weight: 700;
}
.portal-shell :focus-visible {
  outline: 3px solid #d69a42;
  outline-offset: 3px;
}
.portal-shell .small {
  font-size: 13px;
}
.portal-shell .secret-output {
  border: 2px solid #d69a42;
  background: #fff8e5;
  padding: 18px;
  border-radius: 12px;
  margin: 18px 0;
}
.portal-shell .empty {
  border: 1px dashed #a5bdac;
  padding: 28px;
  border-radius: 14px;
  text-align: center;
}
.portal-shell .muted {
  color: #667b6d;
}
.portal-shell .checkline {
  display: flex;
  align-items: center;
  gap: 9px;
}
.portal-shell .checkline input {
  flex-shrink: 0;
}
.portal-shell .row-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
}
.portal-shell .metric {
  font-size: 36px;
  font-weight: 700;
  color: #173334;
}
.portal-shell .field-pair {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
}
.portal-shell a {
  overflow-wrap: anywhere;
}
@media (max-width: 850px) {
  .portal-header {
    padding: 15px 18px;
    gap: 16px;
    flex-wrap: wrap;
  }
  .portal-header img {
    width: 155px;
  }
  .portal-header nav {
    gap: 14px;
    font-size: 12px;
  }
  .portal-shell {
    grid-template-columns: 1fr;
    padding: 20px 16px;
    gap: 24px;
  }
  .portal-shell aside {
    position: static;
    display: flex;
    gap: 5px;
    flex-wrap: wrap;
    padding: 12px;
  }
  .portal-shell aside h2,
  .portal-shell aside hr {
    display: none;
  }
  .portal-shell aside a,
  .portal-shell aside button {
    width: auto;
    font-size: 13px;
    padding: 10px;
  }
  .portal-grid {
    grid-template-columns: 1fr;
  }
  .portal-card {
    padding: 22px;
  }
  .portal-shell .field-pair {
    grid-template-columns: 1fr;
    gap: 0;
  }
  .portal-shell h1 {
    font-size: 34px;
  }
  .portal-header {
    top: 0;
  }
  .message {
    max-width: 95%;
  }
}
@media (max-width: 380px) {
  .portal-header nav {
    gap: 10px;
  }
  .portal-header {
    min-height: 100px;
  }
  .portal-card {
    padding: 18px;
  }
  .portal-shell h1 {
    font-size: 30px;
  }
}
@media (prefers-reduced-motion: reduce) {
  * {
    scroll-behavior: auto !important;
  }
}

.portal-shell aside button.button {
  color: #ecf7ef;
  border: 1px solid #527165;
  background: transparent;
}
.portal-shell aside button.button:hover {
  background: #2c5147;
}
