:root {
  --portal-navy: #0a2540;
  --portal-navy-2: #123858;
  --portal-green: #59c96b;
  --portal-green-dark: #16783a;
  --portal-ink: #10243a;
  --portal-text: #415266;
  --portal-muted: #607286;
  --portal-line: #d9e2e8;
  --portal-soft: #f3f7f5;
  --portal-soft-blue: #edf3f7;
  --portal-white: #ffffff;
  --portal-danger: #a52929;
  --portal-warning: #9a5d00;
  --portal-shadow: 0 14px 38px rgba(10, 37, 64, 0.1);
  --portal-topbar-height: 76px;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--portal-ink);
  background: var(--portal-soft);
  font-synthesis: none;
}

* {
  box-sizing: border-box;
  letter-spacing: 0;
}

html {
  min-width: 320px;
  min-height: 100%;
  background: var(--portal-soft);
}

body {
  min-width: 320px;
  min-height: 100vh;
  margin: 0;
  color: var(--portal-ink);
  background: var(--portal-soft);
  -webkit-font-smoothing: antialiased;
}

button,
input,
select,
textarea {
  font: inherit;
}

button,
a,
input,
select,
textarea {
  -webkit-tap-highlight-color: transparent;
}

button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 3px solid rgba(22, 120, 58, 0.28);
  outline-offset: 2px;
}

[hidden] {
  display: none !important;
}

.portal-review-banner {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px 18px;
  min-height: 42px;
  padding: 8px 18px;
  color: #fff;
  background: var(--portal-navy);
  font-size: 12px;
  line-height: 1.35;
  text-align: center;
}

.portal-review-banner strong {
  color: var(--portal-green);
  text-transform: uppercase;
}

.sr-only,
.sb-skip-link {
  position: absolute;
  top: 0;
  left: 0;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

.portal-access {
  display: grid;
  grid-template-rows: auto 1fr auto;
  min-height: 100vh;
  background: var(--portal-soft);
}

.portal-access__brand,
.portal-access__footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: min(1180px, calc(100% - 48px));
  margin-inline: auto;
}

.portal-access__brand {
  min-height: 88px;
  border-bottom: 1px solid var(--portal-line);
}

.portal-access__brand img {
  display: block;
  width: 167px;
  height: auto;
}

.portal-security-label,
.portal-readonly-badge {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 5px 10px;
  border: 1px solid #bcdcc3;
  border-radius: 4px;
  color: #145d31;
  background: #effaf1;
  font-size: 12px;
  font-weight: 800;
  white-space: nowrap;
}

.portal-access__main {
  display: grid;
  align-items: center;
  justify-items: center;
  width: min(1180px, calc(100% - 48px));
  margin-inline: auto;
  padding: 56px 0 72px;
}

.portal-access__panel {
  width: min(620px, 100%);
  padding: 44px;
  border: 1px solid var(--portal-line);
  border-top: 4px solid var(--portal-green);
  border-radius: 6px;
  background: var(--portal-white);
  box-shadow: var(--portal-shadow);
}

.portal-access__mark {
  position: relative;
  width: 42px;
  height: 42px;
  margin-bottom: 26px;
  border: 1px solid #bdd0dc;
  border-radius: 6px;
  background: var(--portal-soft-blue);
}

.portal-access__mark::before,
.portal-access__mark::after,
.portal-access__mark span {
  position: absolute;
  display: block;
  content: "";
  background: var(--portal-green-dark);
}

.portal-access__mark::before {
  top: 10px;
  left: 12px;
  width: 4px;
  height: 22px;
}

.portal-access__mark::after {
  top: 10px;
  left: 20px;
  width: 10px;
  height: 4px;
}

.portal-access__mark span {
  right: 10px;
  bottom: 10px;
  width: 10px;
  height: 14px;
}

.portal-eyebrow {
  margin: 0 0 9px;
  color: var(--portal-green-dark);
  font-size: 12px;
  font-weight: 900;
  line-height: 1.2;
  text-transform: uppercase;
}

.portal-access h1,
.portal-pagehead h1 {
  margin: 0;
  max-width: 760px;
  color: var(--portal-navy);
  font-size: 34px;
  line-height: 1.15;
}

.portal-access__intro,
.portal-pagehead p {
  margin: 14px 0 0;
  max-width: 720px;
  color: var(--portal-text);
  font-size: 15px;
  line-height: 1.65;
}

.portal-notice {
  display: grid;
  gap: 5px;
  margin-top: 26px;
  padding: 15px 16px;
  border: 1px solid #bcdcc3;
  border-left: 4px solid var(--portal-green-dark);
  border-radius: 4px;
  background: #f2fbf4;
  color: var(--portal-text);
  font-size: 13px;
  line-height: 1.5;
}

.portal-notice strong {
  color: var(--portal-ink);
}

.portal-form {
  margin-top: 30px;
}

.portal-form label,
.portal-admin-panel > label,
.portal-building-checks legend {
  display: block;
  margin-bottom: 8px;
  color: var(--portal-ink);
  font-size: 13px;
  font-weight: 800;
}

.portal-field-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
}

input,
select,
textarea {
  width: 100%;
  min-height: 46px;
  padding: 10px 12px;
  border: 1px solid #aebdc8;
  border-radius: 4px;
  color: var(--portal-ink);
  background: var(--portal-white);
}

input:hover,
select:hover,
textarea:hover {
  border-color: #8094a3;
}

input:focus,
select:focus,
textarea:focus {
  border-color: var(--portal-green-dark);
  outline: 3px solid rgba(22, 120, 58, 0.14);
}

textarea {
  resize: vertical;
  line-height: 1.5;
}

.portal-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 9px 15px;
  border: 1px solid transparent;
  border-radius: 4px;
  font-size: 13px;
  font-weight: 800;
  line-height: 1.2;
  text-decoration: none;
  cursor: pointer;
}

.portal-button:disabled {
  cursor: wait;
  opacity: 0.58;
}

.portal-button--primary {
  border-color: var(--portal-green);
  color: var(--portal-navy);
  background: var(--portal-green);
}

.portal-button--primary:hover:not(:disabled) {
  border-color: #45b858;
  background: #45b858;
}

.portal-button--secondary {
  border-color: #9dafbb;
  color: var(--portal-navy);
  background: var(--portal-white);
}

.portal-button--secondary:hover:not(:disabled),
.portal-button--quiet:hover:not(:disabled) {
  border-color: #8ca1af;
  background: var(--portal-soft-blue);
}

.portal-button--quiet {
  border-color: var(--portal-line);
  color: var(--portal-navy);
  background: transparent;
}

.portal-button--danger {
  border-color: #e2aaaa;
  color: var(--portal-danger);
  background: #fff7f7;
}

.portal-form__help {
  margin: 9px 0 0;
  color: var(--portal-muted);
  font-size: 12px;
  line-height: 1.5;
}

.portal-feedback {
  min-height: 24px;
  margin-top: 16px;
  color: var(--portal-green-dark);
  font-size: 13px;
  font-weight: 700;
  line-height: 1.5;
}

.portal-feedback.is-error {
  color: var(--portal-danger);
}

.portal-access__facts {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 16px;
  margin-top: 28px;
  padding-top: 22px;
  border-top: 1px solid var(--portal-line);
  color: var(--portal-muted);
  font-size: 12px;
}

.portal-access__facts span {
  position: relative;
  padding-left: 13px;
}

.portal-access__facts span::before {
  position: absolute;
  top: 6px;
  left: 0;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--portal-green-dark);
  content: "";
}

.portal-access__footer {
  min-height: 64px;
  border-top: 1px solid var(--portal-line);
  color: var(--portal-muted);
  font-size: 12px;
}

.portal-access__footer a {
  color: var(--portal-green-dark);
  font-weight: 800;
  text-decoration: none;
}

.portal-access__footer nav {
  display: flex;
  gap: 18px;
}

.portal-app {
  min-height: 100vh;
  background: #f4f6f7;
}

.portal-topbar {
  position: sticky;
  z-index: 20;
  top: 0;
  min-height: var(--portal-topbar-height);
  border-bottom: 1px solid var(--portal-line);
  background: rgba(255, 255, 255, 0.98);
}

.portal-topbar__inner {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 18px;
  width: min(1440px, calc(100% - 40px));
  min-height: var(--portal-topbar-height);
  margin-inline: auto;
}

.portal-topbar__brand img {
  display: block;
  width: 142px;
  height: auto;
}

.portal-topbar__context {
  display: grid;
  gap: 1px;
  padding-left: 18px;
  border-left: 1px solid var(--portal-line);
  line-height: 1.25;
}

.portal-topbar__context span {
  color: var(--portal-muted);
  font-size: 11px;
}

.portal-topbar__context strong {
  color: var(--portal-navy);
  font-size: 13px;
}

.portal-topbar__actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  min-width: 0;
}

.portal-user {
  max-width: 180px;
  overflow: hidden;
  color: var(--portal-text);
  font-size: 13px;
  font-weight: 700;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.portal-layout {
  display: grid;
  grid-template-columns: 238px minmax(0, 1fr);
  width: min(1440px, 100%);
  min-height: calc(100vh - var(--portal-topbar-height));
  margin-inline: auto;
}

.portal-sidebar {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: calc(100vh - var(--portal-topbar-height));
  padding: 26px 18px 22px;
  border-right: 1px solid var(--portal-line);
  background: var(--portal-navy);
}

.portal-nav {
  display: grid;
  gap: 4px;
}

.portal-nav__item {
  width: 100%;
  min-height: 42px;
  padding: 10px 12px;
  border: 0;
  border-left: 3px solid transparent;
  border-radius: 3px;
  color: #dbe7ee;
  background: transparent;
  font-size: 13px;
  font-weight: 700;
  text-align: left;
  cursor: pointer;
}

.portal-nav__item:hover {
  color: var(--portal-white);
  background: rgba(255, 255, 255, 0.08);
}

.portal-nav__item.is-active {
  border-left-color: var(--portal-green);
  color: var(--portal-white);
  background: rgba(255, 255, 255, 0.12);
}

.portal-sidebar__status {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: start;
  gap: 9px;
  padding: 13px 12px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 4px;
  color: #dbe7ee;
}

.portal-sidebar__status div {
  display: grid;
  gap: 3px;
}

.portal-sidebar__status strong {
  color: var(--portal-white);
  font-size: 12px;
}

.portal-sidebar__status span:not(.portal-status-dot) {
  color: #b5c6d0;
  font-size: 11px;
  line-height: 1.4;
}

.portal-status-dot {
  width: 8px;
  height: 8px;
  margin-top: 3px;
  border-radius: 50%;
  background: var(--portal-green);
  box-shadow: 0 0 0 3px rgba(89, 201, 107, 0.18);
}

.portal-main {
  min-width: 0;
  padding: 34px clamp(20px, 4vw, 54px) 70px;
}

.portal-pagehead {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 28px;
  max-width: 1180px;
  margin: 0 auto 28px;
}

.portal-pagehead h1 {
  font-size: 28px;
}

.portal-pagehead p {
  margin-top: 7px;
  font-size: 14px;
}

.portal-building-select {
  display: grid;
  gap: 6px;
  width: min(320px, 100%);
}

.portal-building-select span {
  color: var(--portal-muted);
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
}

.portal-loading {
  display: grid;
  gap: 10px;
  max-width: 1180px;
  margin: 0 auto;
  color: var(--portal-muted);
  font-size: 12px;
}

.portal-loading__bar {
  display: block;
  position: relative;
  width: 100%;
  height: 3px;
  overflow: hidden;
  background: #dce5e9;
}

.portal-loading__bar::after {
  position: absolute;
  top: 0;
  left: -35%;
  width: 35%;
  height: 100%;
  background: var(--portal-green-dark);
  animation: portal-loading 1.2s ease-in-out infinite;
  content: "";
}

@keyframes portal-loading {
  to { left: 100%; }
}

@media (prefers-reduced-motion: reduce) {
  .portal-loading__bar::after {
    animation: none;
    left: 0;
    width: 45%;
  }
}

.portal-view {
  display: grid;
  gap: 22px;
  max-width: 1180px;
  margin-inline: auto;
}

.portal-metrics {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  border: 1px solid var(--portal-line);
  border-radius: 6px;
  background: var(--portal-white);
}

.portal-metric {
  min-width: 0;
  padding: 19px 20px;
  border-right: 1px solid var(--portal-line);
}

.portal-metric:last-child {
  border-right: 0;
}

.portal-metric span {
  display: block;
  color: var(--portal-muted);
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
}

.portal-metric strong {
  display: block;
  margin-top: 8px;
  color: var(--portal-navy);
  font-size: 27px;
  line-height: 1;
}

.portal-section {
  border: 1px solid var(--portal-line);
  border-radius: 6px;
  background: var(--portal-white);
}

.portal-section__header,
.portal-panel-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  padding: 19px 20px;
  border-bottom: 1px solid var(--portal-line);
}

.portal-section__header h2,
.portal-panel-heading h2 {
  margin: 0;
  color: var(--portal-navy);
  font-size: 17px;
  line-height: 1.25;
}

.portal-section__header p,
.portal-panel-heading p:not(.portal-eyebrow) {
  margin: 5px 0 0;
  color: var(--portal-muted);
  font-size: 12px;
  line-height: 1.5;
}

.portal-building-list {
  display: grid;
}

.portal-building-row {
  display: grid;
  grid-template-columns: minmax(190px, 1.5fr) repeat(3, minmax(86px, 0.58fr)) auto;
  align-items: center;
  gap: 16px;
  min-height: 74px;
  padding: 13px 20px;
  border-bottom: 1px solid var(--portal-line);
}

.portal-building-row:last-child {
  border-bottom: 0;
}

.portal-building-row__name {
  min-width: 0;
}

.portal-building-row__name strong,
.portal-record strong {
  display: block;
  overflow-wrap: anywhere;
  color: var(--portal-ink);
  font-size: 14px;
}

.portal-building-row__name span,
.portal-record span {
  display: block;
  margin-top: 3px;
  color: var(--portal-muted);
  font-size: 11px;
  line-height: 1.4;
}

.portal-building-stat span {
  display: block;
  color: var(--portal-muted);
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
}

.portal-building-stat strong {
  display: block;
  margin-top: 4px;
  color: var(--portal-navy);
  font-size: 15px;
}

.portal-link-button {
  min-height: 36px;
  padding: 8px 11px;
  border: 1px solid #aebdc8;
  border-radius: 4px;
  color: var(--portal-navy);
  background: var(--portal-white);
  font-size: 12px;
  font-weight: 800;
  cursor: pointer;
}

.portal-link-button:hover {
  background: var(--portal-soft-blue);
}

.portal-integration-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  padding: 16px;
}

.portal-integration {
  min-height: 148px;
  padding: 15px;
  border: 1px solid var(--portal-line);
  border-radius: 5px;
  background: #fafcfc;
}

.portal-integration__status {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--portal-muted);
  font-size: 10px;
  font-weight: 900;
  text-transform: uppercase;
}

.portal-integration__status::before {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #9aa8b3;
  content: "";
}

.portal-integration.is-connected .portal-integration__status {
  color: var(--portal-green-dark);
}

.portal-integration.is-connected .portal-integration__status::before {
  background: var(--portal-green-dark);
}

.portal-integration.is-blocked .portal-integration__status {
  color: var(--portal-warning);
}

.portal-integration h3 {
  margin: 13px 0 5px;
  color: var(--portal-navy);
  font-size: 14px;
}

.portal-integration p {
  margin: 0;
  color: var(--portal-muted);
  font-size: 11px;
  line-height: 1.5;
}

.portal-integration__freshness {
  display: block;
  margin-top: 12px;
  color: var(--portal-text);
  font-size: 10px;
  line-height: 1.45;
}

.portal-section__header--detail {
  align-items: center;
}

.portal-detail-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
}

.portal-segmented {
  display: inline-grid;
  grid-template-columns: repeat(2, minmax(90px, auto));
  padding: 3px;
  border: 1px solid var(--portal-line);
  border-radius: 4px;
  background: var(--portal-soft-blue);
}

.portal-segmented button {
  min-height: 31px;
  padding: 6px 10px;
  border: 0;
  border-radius: 3px;
  color: var(--portal-text);
  background: transparent;
  font-size: 11px;
  font-weight: 800;
  cursor: pointer;
}

.portal-segmented button[aria-pressed="true"] {
  color: var(--portal-navy);
  background: var(--portal-white);
  box-shadow: 0 1px 3px rgba(10, 37, 64, 0.12);
}

.portal-source-line {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 42px;
  padding: 9px 20px;
  border-bottom: 1px solid var(--portal-line);
  color: var(--portal-muted);
  background: #f8fbf9;
  font-size: 11px;
}

.portal-source-line strong {
  color: var(--portal-green-dark);
}

.portal-source-line.is-unavailable {
  background: #f8fafb;
}

.portal-source-line.is-unavailable strong {
  color: var(--portal-muted);
}

.portal-source-line__dot {
  flex: 0 0 auto;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--portal-green-dark);
}

.portal-source-line.is-unavailable .portal-source-line__dot {
  background: #8d9aa4;
}

.portal-record-list {
  display: grid;
}

.portal-record {
  display: grid;
  grid-template-columns:
    minmax(210px, 1.5fr)
    minmax(96px, 0.5fr)
    minmax(116px, 0.68fr)
    minmax(126px, 0.72fr)
    minmax(132px, 0.78fr);
  align-items: center;
  gap: 18px;
  min-height: 68px;
  padding: 13px 20px;
  border-bottom: 1px solid var(--portal-line);
}

.portal-record:last-child {
  border-bottom: 0;
}

.portal-record__primary {
  min-width: 0;
}

.portal-record__primary p {
  margin: 7px 0 0;
  max-width: 520px;
  color: var(--portal-text);
  font-size: 11px;
  line-height: 1.5;
}

.portal-record__label {
  color: var(--portal-muted);
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
}

.portal-record__value {
  display: block;
  margin-top: 4px;
  color: var(--portal-ink);
  font-size: 12px;
  overflow-wrap: anywhere;
}

.portal-record__value.is-overdue {
  color: var(--portal-danger);
  font-weight: 800;
}

.portal-load-more {
  display: flex;
  justify-content: center;
  padding: 16px 20px;
  border-top: 1px solid var(--portal-line);
}

.portal-status {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  min-height: 26px;
  padding: 4px 8px;
  border-radius: 3px;
  color: #3f5363;
  background: #eaf0f3;
  font-size: 10px;
  font-weight: 900;
  text-transform: uppercase;
}

.portal-status--active,
.portal-status--connected,
.portal-status--resolved,
.portal-status--compliant {
  color: #145d31;
  background: #e8f7eb;
}

.portal-status--high,
.portal-status--critical,
.portal-status--revoked,
.portal-status--major {
  color: #8d2020;
  background: #fdecec;
}

.portal-status--medium,
.portal-status--invited,
.portal-status--suspended,
.portal-status--attention,
.portal-status--moderate {
  color: #7a4a00;
  background: #fff3d8;
}

.portal-status--published {
  color: #145d31;
  background: #e8f7eb;
}

.portal-status--internal,
.portal-status--withheld {
  color: #3f5363;
  background: #eaf0f3;
}

.portal-empty {
  display: grid;
  justify-items: start;
  gap: 6px;
  min-height: 150px;
  padding: 34px 20px;
  color: var(--portal-muted);
}

.portal-empty strong {
  color: var(--portal-navy);
  font-size: 15px;
}

.portal-empty span {
  max-width: 620px;
  font-size: 12px;
  line-height: 1.55;
}

.portal-empty--compact {
  min-height: 118px;
  padding-block: 26px;
}

.portal-data-metrics {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  border: 1px solid var(--portal-line);
  border-radius: 6px;
  background: var(--portal-white);
}

.portal-data-metrics > div {
  min-width: 0;
  padding: 17px 20px;
  border-right: 1px solid var(--portal-line);
}

.portal-data-metrics > div:last-child {
  border-right: 0;
}

.portal-data-metrics span,
.portal-point-row small,
.portal-work-record > div:not(.portal-work-record__main) > span {
  display: block;
  color: var(--portal-muted);
  font-size: 10px;
  font-weight: 800;
  line-height: 1.35;
  text-transform: uppercase;
}

.portal-data-metrics strong {
  display: block;
  margin-top: 7px;
  color: var(--portal-navy);
  font-size: 24px;
  line-height: 1;
}

.portal-point-list {
  display: grid;
}

.portal-point-row {
  display: grid;
  grid-template-columns:
    minmax(210px, 1.4fr)
    minmax(120px, 0.7fr)
    minmax(94px, 0.48fr)
    minmax(150px, 0.72fr);
  align-items: center;
  gap: 18px;
  width: 100%;
  min-height: 68px;
  padding: 12px 20px;
  border: 0;
  border-bottom: 1px solid var(--portal-line);
  color: var(--portal-ink);
  background: var(--portal-white);
  text-align: left;
  cursor: pointer;
}

.portal-point-row:last-child {
  border-bottom: 0;
}

.portal-point-row:hover {
  background: #f7faf8;
}

.portal-point-row.is-selected {
  box-shadow: inset 4px 0 0 var(--portal-green-dark);
  background: #f0f8f2;
}

.portal-point-row strong {
  display: block;
  margin-top: 4px;
  overflow-wrap: anywhere;
  color: var(--portal-ink);
  font-size: 12px;
  line-height: 1.4;
}

.portal-point-row__identity strong {
  margin-top: 0;
  color: var(--portal-navy);
  font-size: 13px;
}

.portal-point-row__identity small {
  margin-top: 4px;
  text-transform: none;
}

.portal-current-value {
  color: var(--portal-navy);
  font-size: 18px;
  white-space: nowrap;
}

.portal-chart {
  position: relative;
  min-height: 268px;
  padding: 18px 20px 36px 48px;
  overflow: hidden;
  background: #fbfcfc;
}

.portal-chart svg {
  display: block;
  width: 100%;
  height: 214px;
  overflow: visible;
}

.portal-chart__grid {
  stroke: #dbe4e9;
  stroke-width: 1;
  vector-effect: non-scaling-stroke;
}

.portal-chart__line {
  fill: none;
  stroke: var(--portal-green-dark);
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 3;
  vector-effect: non-scaling-stroke;
}

.portal-chart__scale {
  position: absolute;
  top: 28px;
  bottom: 51px;
  left: 14px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  color: var(--portal-muted);
  font-size: 10px;
  font-weight: 700;
}

.portal-chart__dates {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  padding: 1px 2px 0;
  color: var(--portal-muted);
  font-size: 10px;
}

.portal-diagnostic-list,
.portal-work-list {
  display: grid;
}

.portal-diagnostic {
  display: grid;
  grid-template-columns: minmax(250px, 1.35fr) minmax(330px, 1fr);
  gap: 26px;
  padding: 18px 20px;
  border-bottom: 1px solid var(--portal-line);
}

.portal-diagnostic:last-child,
.portal-work-record:last-child {
  border-bottom: 0;
}

.portal-diagnostic > div > strong {
  display: block;
  margin-top: 9px;
  color: var(--portal-navy);
  font-size: 14px;
}

.portal-diagnostic p,
.portal-work-record__main p {
  margin: 6px 0 0;
  color: var(--portal-text);
  font-size: 12px;
  line-height: 1.55;
}

.portal-diagnostic dl {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin: 0;
}

.portal-diagnostic dt {
  color: var(--portal-muted);
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
}

.portal-diagnostic dd {
  margin: 5px 0 0;
  overflow-wrap: anywhere;
  color: var(--portal-ink);
  font-size: 11px;
  line-height: 1.45;
}

.portal-work-record {
  display: grid;
  grid-template-columns:
    minmax(250px, 1.5fr)
    minmax(100px, 0.5fr)
    minmax(140px, 0.72fr)
    minmax(145px, 0.75fr);
  align-items: center;
  gap: 18px;
  min-height: 88px;
  padding: 15px 20px;
  border-bottom: 1px solid var(--portal-line);
}

.portal-work-record__main {
  min-width: 0;
}

.portal-work-record__main > strong {
  display: block;
  margin-top: 8px;
  overflow-wrap: anywhere;
  color: var(--portal-navy);
  font-size: 14px;
}

.portal-work-record > div:not(.portal-work-record__main) > strong {
  display: block;
  margin-top: 5px;
  overflow-wrap: anywhere;
  color: var(--portal-ink);
  font-size: 11px;
  line-height: 1.45;
}

.portal-work-value {
  display: grid;
  grid-template-columns: minmax(240px, .8fr) minmax(420px, 1.2fr);
  gap: 26px;
  padding: 22px;
  border: 1px solid #b8d7c0;
  border-left: 5px solid var(--portal-green-dark);
  border-radius: 5px;
  background: #f4faf5;
}

.portal-work-value > div > span,
.portal-work-purpose > span,
.portal-work-next > span,
.portal-work-detail-section header span {
  display: block;
  color: var(--portal-green-dark);
  font-size: 10px;
  font-weight: 900;
  letter-spacing: .04em;
  text-transform: uppercase;
}

.portal-work-value h2 {
  margin: 6px 0 0;
  color: var(--portal-navy);
  font-size: 19px;
}

.portal-work-value p,
.portal-work-purpose p,
.portal-work-next p {
  margin: 7px 0 0;
  color: var(--portal-text);
  font-size: 12px;
  line-height: 1.55;
}

.portal-work-value ol {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.portal-work-value li {
  padding: 11px;
  border: 1px solid #c9dcd0;
  border-radius: 4px;
  background: var(--portal-white);
}

.portal-work-value li > span {
  display: grid;
  place-items: center;
  width: 23px;
  height: 23px;
  border-radius: 50%;
  color: #fff;
  background: var(--portal-green-dark);
  font-size: 9px;
  font-weight: 900;
}

.portal-work-value li strong,
.portal-work-value li small {
  display: block;
}

.portal-work-value li strong {
  margin-top: 8px;
  color: var(--portal-navy);
  font-size: 11px;
}

.portal-work-value li small {
  margin-top: 4px;
  color: var(--portal-muted);
  font-size: 9px;
  line-height: 1.4;
}

.portal-work-card {
  border-bottom: 1px solid var(--portal-line);
  background: var(--portal-white);
}

.portal-work-card:last-child {
  border-bottom: 0;
}

.portal-work-card > summary {
  display: grid;
  grid-template-columns:
    minmax(250px, 1.5fr)
    minmax(100px, .5fr)
    minmax(120px, .62fr)
    minmax(130px, .68fr)
    auto;
  align-items: center;
  gap: 18px;
  min-height: 96px;
  padding: 15px 20px;
  cursor: pointer;
  list-style: none;
}

.portal-work-card > summary::-webkit-details-marker {
  display: none;
}

.portal-work-card[open] > summary {
  border-bottom: 1px solid var(--portal-line);
  background: #fafcfc;
}

.portal-work-card > summary > div:not(.portal-work-record__main) > span {
  color: var(--portal-muted);
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
}

.portal-work-card > summary > div:not(.portal-work-record__main) > strong {
  display: block;
  margin-top: 5px;
  color: var(--portal-ink);
  font-size: 11px;
  line-height: 1.45;
}

.portal-work-card__toggle {
  padding: 8px 10px;
  border: 1px solid #aebdc8;
  border-radius: 4px;
  color: var(--portal-navy);
  background: var(--portal-white);
  font-size: 10px;
  font-weight: 900;
  white-space: nowrap;
}

.portal-work-card[open] .portal-work-card__toggle {
  color: var(--portal-green-dark);
  border-color: #b8d7c0;
  background: #eff8f1;
}

.portal-work-card__body {
  display: grid;
  gap: 16px;
  padding: 20px;
  background: #fbfcfd;
}

.portal-work-purpose {
  padding: 16px;
  border: 1px solid #c7d8cf;
  border-radius: 5px;
  background: #f3faf5;
}

.portal-work-purpose > strong,
.portal-work-next > strong {
  display: block;
  margin-top: 6px;
  color: var(--portal-navy);
  font-size: 14px;
}

.portal-work-progress {
  padding: 13px 14px;
  border: 1px solid var(--portal-line);
  border-radius: 5px;
  background: var(--portal-white);
}

.portal-work-progress > span {
  display: block;
  width: 0;
  height: 8px;
  border-radius: 999px;
  background: var(--portal-green-dark);
}

.portal-work-progress::before {
  display: block;
  height: 8px;
  margin-bottom: -8px;
  border-radius: 999px;
  background: #e4ebef;
  content: "";
}

.portal-work-progress--0 > span { width: 10%; }
.portal-work-progress--1 > span { width: 25%; }
.portal-work-progress--2 > span { width: 40%; }
.portal-work-progress--3 > span { width: 58%; }
.portal-work-progress--4 > span { width: 76%; }
.portal-work-progress--5 > span { width: 90%; }
.portal-work-progress--6 > span { width: 100%; }

.portal-work-progress.is-cancelled > span {
  width: 100%;
  background: #a4afb7;
}

.portal-work-progress > div {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  margin-top: 9px;
  color: var(--portal-muted);
  font-size: 9px;
  font-weight: 800;
}

.portal-work-next {
  padding: 14px;
  border: 1px solid #c7d6e0;
  border-radius: 5px;
  background: var(--portal-soft-blue);
}

.portal-work-facts {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 9px;
}

.portal-work-facts > div {
  padding: 11px;
  border: 1px solid var(--portal-line);
  border-radius: 4px;
  background: var(--portal-white);
}

.portal-work-facts span {
  color: var(--portal-muted);
  font-size: 9px;
  font-weight: 900;
  text-transform: uppercase;
}

.portal-work-facts strong {
  display: block;
  margin-top: 5px;
  color: var(--portal-ink);
  font-size: 10px;
  line-height: 1.4;
}

.portal-work-detail-section {
  overflow: hidden;
  border: 1px solid var(--portal-line);
  border-radius: 5px;
  background: var(--portal-white);
}

.portal-work-detail-section > header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 13px 14px;
  border-bottom: 1px solid var(--portal-line);
  background: #f8fafb;
}

.portal-work-detail-section h3 {
  margin: 4px 0 0;
  color: var(--portal-navy);
  font-size: 13px;
}

.portal-work-detail-section > header > strong {
  color: var(--portal-green-dark);
  font-size: 12px;
}

.portal-customer-checklist,
.portal-customer-timeline,
.portal-customer-evidence {
  display: grid;
  gap: 0;
  margin: 0;
  padding: 0;
  list-style: none;
}

.portal-customer-checklist li,
.portal-customer-evidence li {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  padding: 11px 14px;
  border-bottom: 1px solid var(--portal-line);
}

.portal-customer-checklist li:last-child,
.portal-customer-evidence li:last-child {
  border-bottom: 0;
}

.portal-customer-checklist li > span {
  display: grid;
  place-items: center;
  width: 23px;
  height: 23px;
  border: 1px solid #aebdc8;
  border-radius: 50%;
  color: var(--portal-muted);
  font-size: 10px;
  font-weight: 900;
}

.portal-customer-checklist li.is-complete > span {
  border-color: var(--portal-green-dark);
  color: #fff;
  background: var(--portal-green-dark);
}

.portal-customer-checklist strong,
.portal-customer-checklist small,
.portal-customer-evidence strong,
.portal-customer-evidence small {
  display: block;
}

.portal-customer-checklist strong,
.portal-customer-evidence strong {
  color: var(--portal-ink);
  font-size: 11px;
}

.portal-customer-checklist small,
.portal-customer-evidence small {
  margin-top: 3px;
  color: var(--portal-muted);
  font-size: 9px;
}

.portal-customer-timeline {
  padding: 12px 14px 12px 28px;
}

.portal-customer-timeline li {
  position: relative;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 10px;
  padding-bottom: 14px;
}

.portal-customer-timeline li:last-child {
  padding-bottom: 0;
}

.portal-customer-timeline li > span {
  width: 9px;
  height: 9px;
  margin-top: 4px;
  border: 2px solid var(--portal-white);
  border-radius: 50%;
  background: var(--portal-green-dark);
  box-shadow: 0 0 0 1px var(--portal-green-dark);
}

.portal-customer-timeline li:not(:last-child)::before {
  position: absolute;
  top: 14px;
  bottom: 0;
  left: 4px;
  width: 1px;
  background: #b9c8d1;
  content: "";
}

.portal-customer-timeline strong {
  color: var(--portal-navy);
  font-size: 10px;
}

.portal-customer-timeline p {
  margin: 4px 0 0;
  color: var(--portal-text);
  font-size: 11px;
  line-height: 1.5;
}

.portal-customer-timeline small {
  display: block;
  margin-top: 5px;
  color: var(--portal-muted);
  font-size: 9px;
}

.portal-customer-evidence li > span {
  color: var(--portal-green-dark);
  font-size: 21px;
}

.portal-work-empty {
  margin: 0;
  padding: 18px 14px;
  color: var(--portal-muted);
  font-size: 10px;
}

.portal-admin-body {
  background: #f4f6f7;
}

.portal-admin {
  width: min(1320px, calc(100% - 40px));
  margin-inline: auto;
  padding: 34px 0 72px;
}

.portal-readonly-badge--admin {
  border-color: #bac7d0;
  color: var(--portal-navy);
  background: var(--portal-soft-blue);
}

.portal-feedback--admin {
  max-width: 1180px;
  margin: -12px auto 18px;
}

.portal-admin-grid {
  display: grid;
  grid-template-columns: minmax(300px, 0.75fr) minmax(0, 1.55fr);
  gap: 20px;
  max-width: 1180px;
  margin-inline: auto;
}

.portal-admin-panel {
  align-self: start;
  padding: 20px;
  border: 1px solid var(--portal-line);
  border-radius: 6px;
  background: var(--portal-white);
}

.portal-admin-panel--wide {
  min-width: 0;
  padding: 0;
}

.portal-admin-panel > label {
  margin-top: 16px;
}

.portal-admin-panel > .portal-button {
  width: 100%;
  margin-top: 20px;
}

.portal-admin-panel .portal-panel-heading {
  margin: -20px -20px 18px;
}

.portal-admin-panel--wide .portal-panel-heading {
  margin: 0;
}

.portal-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 32px;
  min-height: 28px;
  padding: 4px 8px;
  border-radius: 4px;
  color: var(--portal-navy);
  background: var(--portal-soft-blue);
  font-size: 12px;
  font-weight: 900;
}

.portal-building-checks {
  padding: 0;
  margin: 18px 0 0;
  border: 0;
}

.portal-check-list {
  display: grid;
  gap: 8px;
  max-height: 220px;
  overflow: auto;
  padding: 1px;
}

.portal-check-list--columns {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  max-height: none;
}

.portal-check {
  display: grid;
  grid-template-columns: 18px minmax(0, 1fr);
  align-items: start;
  gap: 9px;
  min-height: 42px;
  padding: 10px;
  border: 1px solid var(--portal-line);
  border-radius: 4px;
  color: var(--portal-text);
  background: #fafcfc;
  font-size: 12px;
  line-height: 1.4;
  cursor: pointer;
}

.portal-check:hover {
  border-color: #a4b6c2;
}

.portal-check input {
  width: 17px;
  min-height: 17px;
  margin: 0;
  accent-color: var(--portal-green-dark);
}

.portal-table-wrap {
  min-width: 0;
  overflow-x: auto;
}

.portal-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
}

.portal-table th,
.portal-table td {
  padding: 13px 14px;
  border-bottom: 1px solid var(--portal-line);
  text-align: left;
  vertical-align: middle;
}

.portal-table th {
  color: var(--portal-muted);
  background: #fafcfc;
  font-size: 10px;
  font-weight: 900;
  text-transform: uppercase;
}

.portal-table tbody tr:last-child td {
  border-bottom: 0;
}

.portal-table__user {
  min-width: 180px;
}

.portal-table__user strong,
.portal-table__user span {
  display: block;
  max-width: 260px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.portal-table__user strong {
  color: var(--portal-ink);
}

.portal-table__user span {
  margin-top: 3px;
  color: var(--portal-muted);
  font-size: 11px;
}

.portal-table__actions {
  display: flex;
  justify-content: flex-end;
  gap: 6px;
  min-width: 210px;
}

.portal-table__actions .portal-button {
  min-height: 34px;
  padding: 7px 9px;
  font-size: 11px;
}

.portal-admin-access {
  max-width: 1180px;
  margin: 20px auto 0;
  scroll-margin-top: calc(var(--portal-topbar-height) + 16px);
}

.portal-admin-issues {
  max-width: 1180px;
  margin: 20px auto 0;
}

.portal-admin-gacs {
  max-width: 1180px;
  margin: 20px auto 0;
}

.portal-admin-access .portal-panel-heading {
  margin: -20px -20px 18px;
}

.portal-app-access {
  margin-top: 22px;
  padding-top: 20px;
  border-top: 1px solid var(--portal-line);
}

.portal-app-access__heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 16px;
}

.portal-app-access__heading h3 {
  margin: 0;
  color: var(--portal-navy);
  font-size: 16px;
  letter-spacing: 0;
}

.portal-app-access__heading p {
  margin: 5px 0 0;
  color: var(--portal-muted);
  font-size: 12px;
  line-height: 1.5;
}

.portal-app-access fieldset {
  display: grid;
  gap: 10px;
  min-width: 0;
  margin: 0;
  padding: 0;
  border: 0;
}

.portal-app-access fieldset:disabled {
  opacity: 0.55;
}

.portal-app-access legend {
  margin: 8px 0 0;
  color: var(--portal-ink);
  font-size: 12px;
  font-weight: 900;
}

.portal-app-list {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  max-height: none;
}

.portal-switch {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 38px;
  padding: 8px 10px;
  border: 1px solid var(--portal-line);
  border-radius: 4px;
  color: var(--portal-navy);
  background: #fafcfc;
  font-size: 12px;
  font-weight: 900;
  cursor: pointer;
}

.portal-switch input {
  width: 18px;
  min-height: 18px;
  margin: 0;
  accent-color: var(--portal-green-dark);
}

.portal-admin-form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.portal-form-field {
  display: grid;
  align-content: start;
  gap: 8px;
  margin: 0;
  color: var(--portal-ink);
  font-size: 13px;
  font-weight: 800;
}

.portal-form-field--wide {
  grid-column: 1 / -1;
}

.portal-admin-actions {
  display: flex;
  justify-content: flex-end;
  margin-top: 18px;
}

.portal-admin-actions--split {
  justify-content: space-between;
  gap: 12px;
}

@media (max-width: 1050px) {
  .portal-metrics,
  .portal-integration-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .portal-metric:nth-child(2) {
    border-right: 0;
  }

  .portal-metric:nth-child(-n + 2) {
    border-bottom: 1px solid var(--portal-line);
  }

  .portal-building-row {
    grid-template-columns: minmax(180px, 1.4fr) repeat(3, minmax(68px, 0.5fr)) auto;
  }

  .portal-admin-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 800px) {
  :root {
    --portal-topbar-height: 70px;
  }

  .portal-access {
    background: var(--portal-soft);
  }

  .portal-layout {
    grid-template-columns: 1fr;
  }

  .portal-sidebar {
    position: sticky;
    z-index: 15;
    top: var(--portal-topbar-height);
    display: block;
    min-height: 0;
    padding: 8px 16px;
    overflow-x: auto;
    border-right: 0;
    border-bottom: 1px solid #1b4567;
  }

  .portal-nav {
    display: flex;
    width: max-content;
    min-width: 100%;
  }

  .portal-nav__item {
    width: auto;
    min-height: 38px;
    padding: 8px 11px;
    border-bottom: 3px solid transparent;
    border-left: 0;
    white-space: nowrap;
  }

  .portal-nav__item.is-active {
    border-bottom-color: var(--portal-green);
    border-left-color: transparent;
  }

  .portal-sidebar__status {
    display: none;
  }

  .portal-main {
    padding-top: 26px;
  }

  .portal-pagehead {
    align-items: start;
    flex-direction: column;
    gap: 16px;
  }

  .portal-building-select {
    width: 100%;
  }

  .portal-topbar__context,
  .portal-user {
    display: none;
  }

  .portal-topbar__actions {
    gap: 7px;
  }

  .portal-record {
    grid-template-columns: minmax(0, 1fr) minmax(100px, 0.45fr);
  }

  .portal-record > :nth-child(3),
  .portal-record > :nth-child(4) {
    display: none;
  }

  .portal-record > :nth-child(5) {
    grid-column: 1 / -1;
  }

  .portal-source-line {
    flex-wrap: wrap;
  }

  .portal-check-list--columns {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 620px) {
  .portal-review-banner {
    align-items: flex-start;
    flex-direction: column;
    gap: 2px;
    text-align: left;
  }

  .portal-access__brand,
  .portal-access__footer,
  .portal-access__main {
    width: min(100% - 28px, 560px);
  }

  .portal-access__brand {
    min-height: 76px;
  }

  .portal-access__brand img {
    width: 148px;
  }

  .portal-security-label {
    min-height: 27px;
    padding: 4px 7px;
    font-size: 10px;
  }

  .portal-access__main {
    padding: 26px 0 40px;
  }

  .portal-access__panel {
    padding: 28px 20px;
  }

  .portal-access h1 {
    font-size: 28px;
  }

  .portal-field-row {
    grid-template-columns: 1fr;
  }

  .portal-field-row .portal-button {
    width: 100%;
  }

  .portal-topbar__actions .portal-button,
  .portal-nav__item,
  .portal-link-button,
  .portal-segmented button,
  .portal-table__actions .portal-button,
  .portal-check {
    min-height: 44px;
  }

  .portal-topbar__inner {
    width: calc(100% - 24px);
    gap: 10px;
  }

  .portal-topbar__brand img {
    width: 126px;
  }

  .portal-readonly-badge {
    min-height: 26px;
    padding: 4px 7px;
    font-size: 10px;
  }

  .portal-topbar__actions .portal-readonly-badge {
    display: none;
  }

  .portal-topbar__actions .portal-button {
    padding: 7px 10px;
    font-size: 11px;
  }

  .portal-sidebar {
    position: static;
    overflow-x: visible;
    padding: 8px 14px 10px;
  }

  .portal-nav {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    width: 100%;
    min-width: 0;
    gap: 4px;
  }

  .portal-nav__item {
    width: 100%;
    padding: 7px 8px;
    white-space: normal;
  }

  .portal-main {
    padding-right: 14px;
    padding-left: 14px;
  }

  .portal-work-value {
    grid-template-columns: 1fr;
    gap: 16px;
    padding: 16px;
  }

  .portal-work-value ol {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .portal-work-card > summary {
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 10px;
    padding: 14px;
  }

  .portal-work-card > summary > div:not(.portal-work-record__main) {
    display: none;
  }

  .portal-work-card__toggle {
    align-self: start;
    font-size: 9px;
  }

  .portal-work-card__body {
    padding: 14px;
  }

  .portal-work-facts {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .portal-pagehead h1 {
    font-size: 24px;
  }

  .portal-metrics,
  .portal-integration-grid {
    grid-template-columns: 1fr 1fr;
  }

  .portal-metric {
    padding: 15px;
  }

  .portal-metric strong {
    font-size: 23px;
  }

  .portal-integration-grid {
    gap: 8px;
    padding: 10px;
  }

  .portal-integration {
    min-height: 132px;
    padding: 12px;
  }

  .portal-building-row {
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 10px;
    min-height: 68px;
    padding: 12px 14px;
  }

  .portal-building-row .portal-building-stat {
    display: none;
  }

  .portal-section__header,
  .portal-panel-heading {
    padding: 16px 14px;
  }

  .portal-section__header--detail {
    align-items: flex-start;
    flex-direction: column;
  }

  .portal-detail-actions {
    width: 100%;
    justify-content: space-between;
  }

  .portal-segmented {
    min-width: 0;
    width: min(250px, 100%);
  }

  .portal-source-line {
    padding-right: 14px;
    padding-left: 14px;
  }

  .portal-record {
    padding: 12px 14px;
  }

  .portal-record__primary p {
    display: none;
  }

  .portal-admin {
    width: calc(100% - 24px);
    padding-top: 24px;
  }

  .portal-admin-panel {
    padding: 16px;
  }

  .portal-admin-form-grid {
    grid-template-columns: 1fr;
  }

  .portal-form-field--wide {
    grid-column: auto;
  }

  .portal-admin-panel .portal-panel-heading,
  .portal-admin-access .portal-panel-heading {
    margin: -16px -16px 16px;
  }

  .portal-app-access__heading {
    align-items: stretch;
    flex-direction: column;
  }

  .portal-app-list {
    grid-template-columns: 1fr;
  }

  .portal-table-wrap {
    overflow: visible;
    padding: 12px 0 0;
  }

  .portal-table,
  .portal-table tbody,
  .portal-table tr,
  .portal-table td {
    display: block;
    width: 100%;
  }

  .portal-table thead {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    clip-path: inset(50%);
  }

  .portal-table tbody {
    display: grid;
    gap: 10px;
  }

  .portal-table tr {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px 16px;
    padding: 14px;
    border: 1px solid var(--portal-line);
    border-radius: 4px;
    background: #fafcfc;
  }

  .portal-table td {
    padding: 0;
    border: 0;
  }

  .portal-table td:first-child,
  .portal-table td:nth-child(4),
  .portal-table td:last-child {
    grid-column: 1 / -1;
  }

  .portal-table td[data-label]::before {
    display: block;
    margin-bottom: 5px;
    color: var(--portal-muted);
    content: attr(data-label);
    font-size: 10px;
    font-weight: 900;
    text-transform: uppercase;
  }

  .portal-table__user {
    min-width: 0;
    padding-bottom: 2px;
  }

  .portal-table__actions {
    justify-content: flex-start;
    min-width: 0;
    flex-wrap: wrap;
  }

  .portal-table__actions .portal-button {
    flex: 1 1 86px;
  }

  .portal-check-list--columns {
    grid-template-columns: 1fr;
  }

  .portal-access__footer {
    align-items: flex-start;
    flex-direction: column;
    justify-content: center;
    gap: 4px;
  }

  .portal-access__footer nav {
    flex-wrap: wrap;
    gap: 4px 14px;
  }
}

@media (max-width: 380px) {
  .portal-access__brand {
    align-items: flex-start;
    flex-direction: column;
    justify-content: center;
    gap: 4px;
  }

  .portal-access__brand img {
    width: 138px;
  }

  .portal-metrics,
  .portal-integration-grid {
    grid-template-columns: 1fr;
  }

  .portal-metric {
    border-right: 0;
    border-bottom: 1px solid var(--portal-line);
  }

  .portal-metric:last-child {
    border-bottom: 0;
  }
}

@media (max-width: 1050px) {
  .portal-data-metrics {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .portal-data-metrics > div:nth-child(2) {
    border-right: 0;
  }

  .portal-data-metrics > div:nth-child(-n + 2) {
    border-bottom: 1px solid var(--portal-line);
  }

  .portal-diagnostic {
    grid-template-columns: 1fr;
  }

  .portal-work-record {
    grid-template-columns: minmax(230px, 1.3fr) repeat(3, minmax(96px, 0.55fr));
  }

  .portal-work-value {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .portal-work-card > summary {
    grid-template-columns: minmax(230px, 1fr) minmax(105px, .42fr) auto;
  }

  .portal-work-card > summary > div:nth-child(3),
  .portal-work-card > summary > div:nth-child(4) {
    display: none;
  }
}

@media (max-width: 800px) {
  .portal-point-row {
    grid-template-columns: minmax(0, 1fr) minmax(120px, 0.58fr);
    padding-inline: 14px;
  }

  .portal-point-row > :nth-child(3) {
    justify-self: start;
  }

  .portal-point-row > :nth-child(4) {
    display: none;
  }

  .portal-diagnostic {
    padding-inline: 14px;
  }

  .portal-work-record {
    grid-template-columns: minmax(0, 1fr) minmax(112px, 0.46fr);
    padding-inline: 14px;
  }

  .portal-work-record > :nth-child(3),
  .portal-work-record > :nth-child(4) {
    display: none;
  }
}

@media (max-width: 620px) {
  .portal-data-metrics > div {
    padding: 14px;
  }

  .portal-data-metrics strong {
    font-size: 21px;
  }

  .portal-point-row {
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 10px;
  }

  .portal-point-row > :nth-child(2) {
    text-align: right;
  }

  .portal-point-row > :nth-child(3) {
    grid-column: 1 / -1;
  }

  .portal-current-value {
    font-size: 15px;
  }

  .portal-chart {
    min-height: 230px;
    padding: 12px 12px 30px 38px;
  }

  .portal-chart svg {
    height: 180px;
  }

  .portal-chart__scale {
    top: 22px;
    bottom: 44px;
    left: 9px;
  }

  .portal-chart__dates {
    font-size: 9px;
  }

  .portal-diagnostic dl {
    grid-template-columns: 1fr 1fr;
  }

  .portal-diagnostic dl > div:last-child {
    grid-column: 1 / -1;
  }

  .portal-work-record {
    grid-template-columns: 1fr;
  }

  .portal-work-record > :nth-child(2) {
    display: block;
  }
}

@media (max-width: 380px) {
  .portal-data-metrics {
    grid-template-columns: 1fr;
  }

  .portal-data-metrics > div {
    border-right: 0;
    border-bottom: 1px solid var(--portal-line);
  }

  .portal-data-metrics > div:last-child {
    border-bottom: 0;
  }
}
