/* Compute Passport — portal chrome.
   The portal reads as an instrument: a fixed rail of services, a working
   surface, and data in the same monospace voice as the rest of the system. */

.portal {
  display: grid;
  grid-template-columns: 272px minmax(0, 1fr);
  align-items: start;
  min-height: 70vh;
}

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

/* ---- Rail ---- */

.portal-rail {
  position: sticky;
  top: 68px;
  border-right: 1px solid var(--line);
  background: var(--plate);
  min-height: calc(100vh - 68px);
  display: flex;
  flex-direction: column;
}
@media (max-width: 1024px) {
  .portal-rail { position: static; min-height: 0; border-right: 0; border-bottom: 1px solid var(--line); }
}

.portal-rail-head { padding: 22px 22px 14px; border-bottom: 1px solid var(--line); }

.portal-rail nav ul { list-style: none; margin: 0; padding: 10px 0; }
.portal-rail nav li { border-bottom: 1px solid rgba(255, 255, 255, .05); }
.portal-rail nav a {
  display: block; padding: 14px 22px;
  border-left: 2px solid transparent;
}
.portal-rail nav a b { display: block; font-size: 14px; font-weight: 500; color: var(--muted); }
.portal-rail nav a span { display: block; font-size: 12px; color: var(--dim); margin-top: 3px; line-height: 1.45; }
.portal-rail nav a:hover { background: var(--plate-2); }
.portal-rail nav a:hover b { color: var(--text); }
.portal-rail nav a[aria-current="page"] { border-left-color: var(--signal); background: var(--plate-2); }
.portal-rail nav a[aria-current="page"] b { color: var(--text); }

.portal-rail-foot { margin-top: auto; padding: 20px 22px; border-top: 1px solid var(--line); }
.portal-rail-foot p { margin: 0 0 2px; font-size: 12px; }
.portal-rail-foot .btn { width: 100%; justify-content: center; }

/* ---- Working surface ---- */

.portal-main { padding: clamp(24px, 3vw, 44px); max-width: 1180px; }

.portal-head { margin-bottom: 30px; padding-bottom: 22px; border-bottom: 1px solid var(--line); }
.portal-head h1 { font-size: clamp(26px, 3vw, 38px); margin-bottom: 10px; }
.portal-head .lede { font-size: 16px; }

.panel {
  background: var(--plate);
  border: 1px solid var(--line);
  border-radius: var(--r);
  padding: 26px;
  margin-top: 24px;
}
.panel > h2 { font-size: 19px; margin-bottom: 14px; }
.panel > h2:first-child { margin-top: 0; }
.panel pre {
  background: var(--ink);
  border: 1px solid var(--line);
  border-radius: var(--r);
  padding: 18px;
  margin: 0;
}
.panel pre code { color: var(--muted); font-size: 12.5px; line-height: 1.6; }

.metrics { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
@media (max-width: 900px) { .metrics { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 520px) { .metrics { grid-template-columns: 1fr; } }

.metric {
  background: var(--plate);
  border: 1px solid var(--line);
  border-top: 2px solid var(--line-strong);
  border-radius: var(--r);
  padding: 22px;
}
.metric span {
  display: block;
  font-family: var(--mono); font-size: 10px; letter-spacing: .14em; text-transform: uppercase;
  color: var(--dim); margin-bottom: 12px;
}
.metric strong { display: block; font-size: 30px; font-weight: 500; letter-spacing: -.03em; line-height: 1; }
.metric p { margin: 10px 0 0; font-size: 12.5px; color: var(--dim); }

.duo { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; margin-top: 24px; }
.duo--wide { grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); }
.duo > .panel { margin-top: 0; }
@media (max-width: 1100px) { .duo, .duo--wide { grid-template-columns: 1fr; } }

/* ---- Sign-in form (wp_login_form) ---- */

#loginform p { margin-bottom: 16px; }
#loginform label {
  display: block;
  font-family: var(--mono); font-size: 10.5px; letter-spacing: .14em; text-transform: uppercase;
  color: var(--dim); margin-bottom: 8px;
}
#loginform input[type="text"],
#loginform input[type="password"] {
  width: 100%;
  background: var(--ink); color: var(--text);
  border: 1px solid var(--line-strong); border-radius: var(--r);
  padding: 12px 13px; font-family: var(--mono); font-size: 13px;
}
#loginform input:focus { border-color: var(--signal); outline: none; }
#loginform .login-remember label {
  display: flex; align-items: center; gap: 9px;
  text-transform: none; letter-spacing: 0; font-size: 13px; font-family: var(--sans); color: var(--muted);
}
#loginform .login-remember input { accent-color: var(--signal); }
#loginform .login-submit input[type="submit"] {
  width: 100%;
  font-family: var(--mono); font-size: 12px; letter-spacing: .1em; text-transform: uppercase;
  padding: 14px 22px; border-radius: var(--r);
  background: var(--signal); border: 1px solid var(--signal); color: #fff; cursor: pointer;
}
#loginform .login-submit input[type="submit"]:hover { background: #cf5334; }

body.cp-portal .site-footer { margin-top: 0; }

/* Solarion AI blueprint instrumentation */
.portal-main {
  position: relative;
  background-image:
    linear-gradient(rgba(124,169,245,.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(124,169,245,.025) 1px, transparent 1px);
  background-size: 40px 40px;
}
.portal-rail-head::after {
  content: "COMPUTE PASSPORT ™ · SOLARION AI ™";
  display: block;
  margin-top: 8px;
  font: 8px/1.4 var(--mono);
  letter-spacing: .12em;
  color: rgba(124,169,245,.46);
}


/* ============================================================
   ISOLATED PORTAL CHROME + CUSTOM AUTH · v1.4.1
   ============================================================ */

body.cp-portal{
  background:#080a0d;
  min-height:100vh;
}

body.cp-portal main{
  min-height:calc(100vh - 62px);
}

.portal-topbar{
  min-height:62px;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:28px;
  padding:0 clamp(20px,3vw,42px);
  background:#07090b;
  border-bottom:1px solid rgba(255,255,255,.12);
  position:sticky;
  top:0;
  z-index:150;
}

.portal-topbar-brand{
  display:flex;
  align-items:baseline;
  gap:12px;
  color:#f2f4f7;
}

.portal-topbar-brand b{
  font-size:15px;
  font-weight:600;
  letter-spacing:-.02em;
}

.portal-topbar-brand span,
.portal-topbar-meta > span{
  font:8px/1 var(--mono);
  letter-spacing:.15em;
  text-transform:uppercase;
  color:#6f7b89;
}

.portal-topbar-meta{
  display:flex;
  align-items:center;
  gap:24px;
}

.portal-public-link{
  display:inline-flex;
  align-items:center;
  gap:8px;
  min-height:34px;
  padding:0 12px;
  border:1px solid rgba(255,255,255,.14);
  color:#dce2e8;
  font:9px/1 var(--mono);
  letter-spacing:.10em;
  text-transform:uppercase;
}

.portal-public-link:hover{
  border-color:rgba(255,255,255,.32);
  color:#fff;
}

.portal-public-label--mobile{
  display:none;
}

.portal-footer{
  min-height:48px;
  padding:0 clamp(20px,3vw,42px);
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:20px;
  border-top:1px solid rgba(255,255,255,.09);
  background:#07090b;
  color:#697582;
  font:8px/1.4 var(--mono);
  letter-spacing:.10em;
  text-transform:uppercase;
}

.portal-footer a{color:#aeb8c3;}
.portal-footer a:hover{color:#fff;}

.portal-login-form{
  display:grid;
  gap:20px;
  margin-top:20px;
}

.portal-login-field label{
  display:block;
  margin-bottom:8px;
  color:#778390;
  font:9px/1.2 var(--mono);
  letter-spacing:.15em;
  text-transform:uppercase;
}

.portal-login-field input{
  width:100%;
  min-height:54px;
  padding:13px 14px;
  border:1px solid rgba(255,255,255,.16);
  background:#090c10;
  color:#f1f4f7;
  border-radius:0;
  font:14px/1.4 var(--mono);
}

.portal-login-field input:focus{
  outline:none;
  border-color:#7ca9f5;
  box-shadow:0 0 0 1px #7ca9f5;
}

.portal-login-remember{
  display:flex;
  align-items:center;
  gap:9px;
  color:#919ba7;
  font-size:12px;
}

.portal-login-remember input{accent-color:#e2603e;}

.portal-login-submit{
  min-height:54px;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:20px;
  padding:0 16px;
  border:1px solid #eef1f4;
  background:#eef1f4;
  color:#090b0e;
  cursor:pointer;
  font:10px/1 var(--mono);
  letter-spacing:.12em;
  text-transform:uppercase;
  font-weight:600;
}

.portal-login-submit:hover{
  background:#fff;
  border-color:#fff;
}

.portal-login-alert{
  margin:18px 0 4px;
  padding:14px 16px;
  border:1px solid rgba(240,87,79,.32);
  background:rgba(240,87,79,.06);
}

.portal-login-alert strong{
  display:block;
  color:#f2f4f7;
  margin-bottom:3px;
}

.portal-login-alert p{
  margin:0;
  color:#a6b0bb;
  font-size:12px;
}

.portal-back-public{
  display:block;
  margin-bottom:16px;
  color:#9aa5b1;
  font:9px/1.4 var(--mono);
  letter-spacing:.08em;
  text-transform:uppercase;
}

.portal-back-public:hover{color:#fff;}

body.cp-portal .site-header,
body.cp-portal .site-footer{
  display:none !important;
}

body.cp-portal .portal-rail{
  top:62px;
  min-height:calc(100vh - 62px);
}

@media(max-width:760px){
  .portal-topbar{
    align-items:flex-start;
    flex-direction:column;
    padding-block:14px;
    gap:10px;
  }

  .portal-topbar-meta{
    width:100%;
    justify-content:space-between;
  }

  .portal-topbar-meta > span{
    display:none;
  }

  /* Mobile command row: Public Site on the left, hamburger on the right. */
  .portal-public-link{
    order:1;
    margin-left:0;
  }

  .portal-menu-toggle{
    order:2;
    margin-left:auto;
  }

  .portal-public-label--desktop{
    display:none;
  }

  .portal-public-label--mobile{
    display:inline;
  }

  .portal-footer{
    align-items:flex-start;
    flex-direction:column;
    padding-block:14px;
  }

  body.cp-portal .portal-rail{
    top:0;
    min-height:0;
  }
}


/* ============================================================
   MOBILE PORTAL FLOW · v1.4.2
   ============================================================ */

@media(max-width:1024px){
  body.cp-portal{
    overflow-x:hidden;
  }

  .portal{
    display:block;
    min-height:0;
  }

  .portal-rail{
    position:sticky;
    top:62px;
    z-index:120;
    display:block;
    min-height:0;
    background:rgba(13,17,22,.985);
    border-right:0;
    border-bottom:1px solid var(--line);
    backdrop-filter:blur(16px);
  }

  .portal-rail-head{
    display:none;
  }

  .portal-rail nav{
    overflow-x:auto;
    overflow-y:hidden;
    -webkit-overflow-scrolling:touch;
    scrollbar-width:none;
  }

  .portal-rail nav::-webkit-scrollbar{
    display:none;
  }

  .portal-rail nav ul{
    display:flex;
    width:max-content;
    min-width:100%;
    padding:0;
    margin:0;
  }

  .portal-rail nav li{
    flex:0 0 auto;
    border-bottom:0;
    border-right:1px solid rgba(255,255,255,.06);
  }

  .portal-rail nav a{
    min-width:134px;
    min-height:58px;
    display:flex;
    flex-direction:column;
    justify-content:center;
    gap:2px;
    padding:10px 14px;
    border-left:0;
    border-bottom:2px solid transparent;
    white-space:nowrap;
  }

  .portal-rail nav a b{
    font-size:12px;
    line-height:1.15;
  }

  .portal-rail nav a span{
    display:none;
  }

  .portal-rail nav a[aria-current="page"]{
    border-left:0;
    border-bottom-color:var(--signal);
    background:var(--plate-2);
  }

  .portal-rail-foot{
    display:none;
  }

  .portal-main{
    width:100%;
    max-width:none;
    min-height:70vh;
    padding:24px clamp(18px,4vw,28px) 54px;
    scroll-margin-top:132px;
  }

  .portal-main > .notice:first-child{
    margin-top:0 !important;
  }

  .portal-head{
    margin-bottom:22px;
    padding-bottom:18px;
  }

  .portal-head h1{
    font-size:clamp(25px,7vw,34px);
  }

  .panel{
    padding:20px;
  }

  .metrics{
    grid-template-columns:repeat(2,minmax(0,1fr));
    gap:12px;
  }

  .metric{
    padding:17px;
  }

  .metric strong{
    font-size:25px;
  }

  .duo,
  .duo--wide{
    gap:16px;
  }

  table.data{
    min-width:720px;
  }

  .table-scroll{
    margin-inline:-4px;
    padding-bottom:6px;
    overflow-x:auto;
    -webkit-overflow-scrolling:touch;
  }

  pre{
    max-width:100%;
    overflow-x:auto;
    -webkit-overflow-scrolling:touch;
  }
}

@media(max-width:760px){
  .portal-topbar{
    position:sticky;
    top:0;
    min-height:56px;
    padding:11px 16px;
    flex-direction:row;
    align-items:center;
    gap:12px;
  }

  .portal-topbar-brand{
    min-width:0;
    display:block;
  }

  .portal-topbar-brand b{
    display:block;
    font-size:13px;
    line-height:1.15;
  }

  .portal-topbar-brand span{
    display:block;
    margin-top:3px;
    font-size:7px;
  }

  .portal-topbar-meta{
    width:auto;
    margin-left:auto;
    flex:0 0 auto;
  }

  .portal-public-link{
    margin-left:0;
    min-height:32px;
    padding:0 9px;
    font-size:7.5px;
    letter-spacing:.07em;
  }

  .portal-rail{
    top:56px;
  }

  .portal-rail nav a{
    min-width:122px;
    min-height:54px;
    padding:9px 12px;
  }

  .portal-main{
    padding:20px 16px 48px;
    scroll-margin-top:118px;
  }

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

  .panel{
    padding:17px;
  }

  .portal-footer{
    display:none;
  }
}

@media(max-width:460px){
  .portal-public-link{
    max-width:120px;
    text-align:center;
    line-height:1.2;
  }

  .portal-rail nav a{
    min-width:112px;
  }

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

  .portal-head .lede{
    font-size:14px;
  }
}


/* ============================================================
   MOBILE PORTAL NAVIGATION · v1.4.15
   Compact hamburger + off-canvas workspace menu.
   ============================================================ */

.portal-menu-toggle,
.portal-menu-close,
.portal-menu-scrim{
  display:none;
}

.portal-rail-context{
  margin:8px 0 0;
  color:var(--dim);
  font:9px/1.4 var(--mono);
  letter-spacing:.12em;
  text-transform:uppercase;
}

@media(max-width:1024px){
  body.cp-portal.portal-menu-open{
    overflow:hidden;
  }

  .portal-topbar-meta{
    gap:10px;
  }

  .portal-menu-toggle{
    display:inline-flex;
    align-items:center;
    justify-content:center;
    gap:9px;
    min-height:36px;
    padding:0 12px;
    border:1px solid rgba(255,255,255,.16);
    background:#0d1116;
    color:#f1f4f7;
    cursor:pointer;
    font:9px/1 var(--mono);
    letter-spacing:.10em;
    text-transform:uppercase;
  }

  .portal-menu-toggle:hover,
  .portal-menu-toggle:focus-visible{
    border-color:var(--signal);
    outline:none;
  }

  .portal-menu-toggle-icon{
    width:16px;
    display:grid;
    gap:3px;
  }

  .portal-menu-toggle-icon i{
    display:block;
    width:100%;
    height:1px;
    background:currentColor;
    transition:transform .2s ease,opacity .2s ease;
  }

  .portal{
    display:block;
  }

  .portal-rail{
    position:fixed !important;
    inset:0 auto 0 0;
    top:0 !important;
    z-index:260;
    width:min(88vw,360px);
    min-height:100vh !important;
    max-height:100vh;
    display:flex !important;
    flex-direction:column;
    background:#0b0f13;
    border-right:1px solid rgba(255,255,255,.13);
    border-bottom:0;
    box-shadow:22px 0 64px rgba(0,0,0,.48);
    transform:translate3d(-104%,0,0);
    visibility:hidden;
    transition:transform .24s ease,visibility .24s ease;
    overflow:hidden;
  }

  .portal-rail.is-open{
    transform:translate3d(0,0,0);
    visibility:visible;
  }

  .portal-rail-head{
    display:flex !important;
    align-items:flex-start;
    justify-content:space-between;
    gap:18px;
    padding:23px 20px 18px;
    border-bottom:1px solid var(--line);
  }

  .portal-rail-head::after{
    display:none;
  }

  .portal-menu-close{
    display:grid;
    place-items:center;
    width:36px;
    height:36px;
    flex:0 0 36px;
    border:1px solid rgba(255,255,255,.14);
    background:transparent;
    color:#c8d0d8;
    font:300 25px/1 var(--sans);
    cursor:pointer;
  }

  .portal-menu-close:hover,
  .portal-menu-close:focus-visible{
    color:#fff;
    border-color:var(--signal);
    outline:none;
  }

  .portal-rail nav{
    flex:1 1 auto;
    overflow-y:auto !important;
    overflow-x:hidden !important;
    overscroll-behavior:contain;
  }

  .portal-rail nav ul{
    display:block !important;
    width:100% !important;
    min-width:0 !important;
    padding:8px 0 14px !important;
  }

  .portal-rail nav li{
    display:block;
    width:100%;
    border-right:0 !important;
    border-bottom:1px solid rgba(255,255,255,.055) !important;
  }

  .portal-rail nav a{
    width:100%;
    min-width:0 !important;
    min-height:0 !important;
    display:block !important;
    padding:15px 20px !important;
    white-space:normal !important;
    border-left:2px solid transparent !important;
    border-bottom:0 !important;
    background:transparent;
  }

  .portal-rail nav a b{
    display:block;
    color:#aeb8c4;
    font-size:14px;
    line-height:1.25;
    font-weight:500;
  }

  .portal-rail nav a span{
    display:block !important;
    margin-top:5px;
    max-width:29ch;
    color:#697582;
    font-size:11px;
    line-height:1.45;
  }

  .portal-rail nav a:hover{
    background:#111820;
  }

  .portal-rail nav a[aria-current="page"]{
    border-left-color:var(--signal) !important;
    background:#12181f;
  }

  .portal-rail nav a[aria-current="page"] b{
    color:#fff;
  }

  .portal-rail-foot{
    display:block !important;
    flex:0 0 auto;
    padding:17px 20px calc(17px + env(safe-area-inset-bottom));
    background:#090c10;
  }

  .portal-back-public{
    margin-bottom:13px;
  }

  .portal-menu-scrim{
    position:fixed;
    inset:0;
    z-index:250;
    width:100%;
    height:100%;
    border:0;
    padding:0;
    background:rgba(0,0,0,.62);
    backdrop-filter:blur(3px);
    opacity:0;
    visibility:hidden;
    transition:opacity .2s ease,visibility .2s ease;
    cursor:pointer;
  }

  .portal-menu-scrim.is-open{
    display:block;
    opacity:1;
    visibility:visible;
  }

  .portal-main{
    padding-top:24px;
    scroll-margin-top:74px;
  }
}

@media(max-width:760px){
  .portal-topbar{
    min-height:58px;
    padding:10px 14px;
  }

  .portal-topbar-brand b{
    font-size:12.5px;
  }

  .portal-topbar-brand span{
    font-size:6.8px;
  }

  .portal-menu-toggle{
    min-width:40px;
    min-height:36px;
    padding:0 10px;
  }

  .portal-menu-toggle-label{
    display:none;
  }

  .portal-public-link{
    max-width:none;
    min-height:36px;
    padding:0 10px;
    white-space:nowrap;
    font-size:7px;
  }

  .portal-main{
    padding:18px 14px 44px;
    scroll-margin-top:68px;
  }
}

@media(max-width:430px){
  .portal-topbar{
    gap:8px;
  }

  .portal-topbar-brand span{
    display:none;
  }

  .portal-public-link{
    padding-inline:8px;
  }

  .portal-public-arrow{
    display:none;
  }

  .portal-rail{
    width:min(92vw,340px);
  }

  .portal-main{
    padding-inline:12px;
  }
}

/* ============================================================
   DESKTOP PORTAL APPEARANCE · v1.4.17
   Persistent dark / light switch for enterprise reviewers.
   Orange remains the structural accent in both modes.
   ============================================================ */

.portal-theme-toggle{
  display:inline-flex;
  align-items:center;
  gap:9px;
  min-height:34px;
  padding:0 10px;
  border:1px solid rgba(255,255,255,.14);
  background:transparent;
  color:#aeb8c3;
  cursor:pointer;
  font:8px/1 var(--mono);
  letter-spacing:.10em;
  text-transform:uppercase;
  transition:border-color .18s ease,background .18s ease,color .18s ease;
}

.portal-theme-toggle:hover,
.portal-theme-toggle:focus-visible{
  border-color:var(--signal);
  color:#fff;
  outline:none;
}

.portal-theme-toggle-copy{
  color:inherit;
}

.portal-theme-toggle-state{
  color:#dce2e8;
  min-width:62px;
  text-align:right;
}

.portal-theme-toggle-track{
  position:relative;
  width:30px;
  height:16px;
  flex:0 0 30px;
  border:1px solid rgba(255,255,255,.24);
  border-radius:999px;
  background:#11161c;
}

.portal-theme-toggle-track i{
  position:absolute;
  width:10px;
  height:10px;
  left:2px;
  top:2px;
  border-radius:50%;
  background:#e2603e;
  transition:transform .18s ease;
}

html[data-cp-theme="light"] .portal-theme-toggle-track i{
  transform:translateX(14px);
}

@media(max-width:1024px){
  .portal-theme-toggle{display:none !important;}
}

html[data-cp-theme="light"] body.cp-portal{
  --ink:#f5f7f9;
  --plate:#ffffff;
  --plate-2:#f1f4f6;
  --plate-3:#e8edf1;
  --line:rgba(15,24,34,.11);
  --line-strong:rgba(15,24,34,.20);
  --text:#101820;
  --muted:#566371;
  --dim:#778391;
  --key:#315f9f;
  background:#f5f7f9;
  color:#101820;
  color-scheme:light;
}

/* Keep the portal command bar dark in both appearance modes. This creates a
   stable enterprise navigation anchor while the working surface switches to light. */
html[data-cp-theme="light"] body.cp-portal .portal-topbar{
  background:#07090b;
  border-bottom-color:rgba(255,255,255,.12);
  box-shadow:0 1px 0 rgba(0,0,0,.28),0 8px 24px rgba(15,24,34,.08);
}

html[data-cp-theme="light"] body.cp-portal .portal-topbar-brand{
  color:#f2f4f7;
}

html[data-cp-theme="light"] body.cp-portal .portal-topbar-brand span,
html[data-cp-theme="light"] body.cp-portal .portal-topbar-meta > span{
  color:#7d8996;
}

html[data-cp-theme="light"] body.cp-portal .portal-public-link,
html[data-cp-theme="light"] body.cp-portal .portal-theme-toggle{
  border-color:rgba(255,255,255,.16);
  color:#c8d0d8;
  background:#0b0e12;
}

html[data-cp-theme="light"] body.cp-portal .portal-public-link:hover,
html[data-cp-theme="light"] body.cp-portal .portal-theme-toggle:hover,
html[data-cp-theme="light"] body.cp-portal .portal-theme-toggle:focus-visible{
  border-color:var(--signal);
  color:#fff;
  background:#10141a;
}

html[data-cp-theme="light"] body.cp-portal .portal-theme-toggle-state{
  color:#f2f4f7;
}

html[data-cp-theme="light"] body.cp-portal .portal-theme-toggle-track{
  border-color:rgba(255,255,255,.24);
  background:#151a20;
}

html[data-cp-theme="light"] body.cp-portal .portal-footer{
  background:#fff;
  border-top-color:rgba(15,24,34,.10);
  color:#74808c;
}

html[data-cp-theme="light"] body.cp-portal .portal-footer a{
  color:#4d5965;
}

html[data-cp-theme="light"] body.cp-portal .portal-footer a:hover{
  color:#101820;
}

html[data-cp-theme="light"] body.cp-portal .portal-rail{
  background:#fff;
  border-right-color:rgba(15,24,34,.11);
}

html[data-cp-theme="light"] body.cp-portal .portal-rail nav li{
  border-bottom-color:rgba(15,24,34,.07);
}

html[data-cp-theme="light"] body.cp-portal .portal-rail nav a:hover{
  background:#f4f6f8;
}

html[data-cp-theme="light"] body.cp-portal .portal-rail nav a[aria-current="page"]{
  background:#f1f4f6;
}

html[data-cp-theme="light"] body.cp-portal .portal-rail-foot{
  background:#fff;
}

html[data-cp-theme="light"] body.cp-portal .portal-back-public{
  color:#5b6773;
}

html[data-cp-theme="light"] body.cp-portal .portal-back-public:hover{
  color:#101820;
}

html[data-cp-theme="light"] body.cp-portal .portal-main{
  background-image:
    linear-gradient(rgba(25,43,60,.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(25,43,60,.035) 1px, transparent 1px);
}

html[data-cp-theme="light"] body.cp-portal .portal-rail-head::after{
  color:rgba(49,95,159,.58);
}

html[data-cp-theme="light"] body.cp-portal .panel pre,
html[data-cp-theme="light"] body.cp-portal .field select,
html[data-cp-theme="light"] body.cp-portal .field input[type="text"],
html[data-cp-theme="light"] body.cp-portal .field input[type="number"],
html[data-cp-theme="light"] body.cp-portal .field input[type="email"],
html[data-cp-theme="light"] body.cp-portal .field input[type="password"],
html[data-cp-theme="light"] body.cp-portal .field textarea,
html[data-cp-theme="light"] body.cp-portal #loginform input[type="text"],
html[data-cp-theme="light"] body.cp-portal #loginform input[type="password"],
html[data-cp-theme="light"] body.cp-portal .portal-login-field input{
  background:#fff;
  color:#101820;
  border-color:rgba(15,24,34,.18);
}

html[data-cp-theme="light"] body.cp-portal .portal-login-field label,
html[data-cp-theme="light"] body.cp-portal .portal-login-remember{
  color:#63707c;
}

html[data-cp-theme="light"] body.cp-portal .portal-login-submit{
  border-color:#111820;
  background:#111820;
  color:#fff;
}

html[data-cp-theme="light"] body.cp-portal .portal-login-submit:hover{
  border-color:#e2603e;
  background:#e2603e;
  color:#fff;
}

html[data-cp-theme="light"] body.cp-portal .portal-login-alert{
  background:rgba(240,87,79,.045);
}

html[data-cp-theme="light"] body.cp-portal .portal-login-alert strong{
  color:#101820;
}

html[data-cp-theme="light"] body.cp-portal .portal-login-alert p{
  color:#5e6a76;
}

html[data-cp-theme="light"] body.cp-portal .cpid .s-sep{
  color:rgba(15,24,34,.25);
}

html[data-cp-theme="light"] body.cp-portal .receipt{
  box-shadow:0 24px 64px -44px rgba(15,24,34,.32);
}

html[data-cp-theme="light"] body.cp-portal .receipt-head,
html[data-cp-theme="light"] body.cp-portal .receipt-foot{
  background:rgba(15,24,34,.035);
}

html[data-cp-theme="light"] body.cp-portal .receipt-row{
  border-bottom-color:rgba(15,24,34,.08);
}

html[data-cp-theme="light"] body.cp-portal .checks li{
  border-bottom-color:rgba(15,24,34,.07);
}

html[data-cp-theme="light"] body.cp-portal .btn:hover:not(.btn--primary){
  color:#101820;
  background:#fff7f4;
}

@media(max-width:1024px){
  html[data-cp-theme="light"] body.cp-portal .portal-rail{
    background:#fff;
    border-right-color:rgba(15,24,34,.13);
    box-shadow:22px 0 64px rgba(15,24,34,.16);
  }

  html[data-cp-theme="light"] body.cp-portal .portal-menu-toggle{
    border-color:rgba(255,255,255,.16);
    background:#0b0e12;
    color:#f2f4f7;
  }

  html[data-cp-theme="light"] body.cp-portal .portal-menu-toggle:hover,
  html[data-cp-theme="light"] body.cp-portal .portal-menu-toggle:focus-visible{
    border-color:var(--signal);
    background:#10141a;
    color:#fff;
  }

  html[data-cp-theme="light"] body.cp-portal .portal-menu-close{
    border-color:rgba(15,24,34,.14);
    color:#5b6773;
  }

  html[data-cp-theme="light"] body.cp-portal .portal-menu-close:hover,
  html[data-cp-theme="light"] body.cp-portal .portal-menu-close:focus-visible{
    color:#101820;
  }

  html[data-cp-theme="light"] body.cp-portal .portal-rail nav li{
    border-bottom-color:rgba(15,24,34,.065) !important;
  }

  html[data-cp-theme="light"] body.cp-portal .portal-rail nav a b{
    color:#53606d;
  }

  html[data-cp-theme="light"] body.cp-portal .portal-rail nav a span{
    color:#7a8692;
  }

  html[data-cp-theme="light"] body.cp-portal .portal-rail nav a:hover{
    background:#f4f6f8;
  }

  html[data-cp-theme="light"] body.cp-portal .portal-rail nav a[aria-current="page"]{
    background:#eef2f5;
  }

  html[data-cp-theme="light"] body.cp-portal .portal-rail nav a[aria-current="page"] b{
    color:#101820;
  }

  html[data-cp-theme="light"] body.cp-portal .portal-rail-foot{
    background:#f8fafb;
  }

  html[data-cp-theme="light"] body.cp-portal .portal-menu-scrim{
    background:rgba(15,24,34,.28);
  }
}


/* ============================================================
   ENTERPRISE CONTROL PLANE · v1.4.20
   High-assurance portal hierarchy: restrained, dense, auditable.
   No decorative iconography; status and structure carry meaning.
   ============================================================ */

body.cp-portal{
  --cp-shell:#07090c;
  --cp-shell-2:#0b0f14;
  --cp-shell-3:#10161d;
  --cp-orange:#e2603e;
  --cp-orange-soft:rgba(226,96,62,.12);
  --cp-green:#5fd08a;
  --cp-amber:#e7b84e;
  --cp-red:#ef6a61;
}

/* Desktop shell */
@media(min-width:1025px){
  .portal{
    grid-template-columns:286px minmax(0,1fr);
    min-height:calc(100vh - 72px);
  }

  body.cp-portal .portal-topbar{
    min-height:72px;
    padding-inline:30px;
    background:linear-gradient(180deg,#090c10 0%,#07090c 100%);
    border-bottom:1px solid rgba(255,255,255,.10);
  }

  body.cp-portal .portal-topbar-brand b{
    font-size:16px;
    letter-spacing:-.015em;
  }

  body.cp-portal .portal-topbar-brand span{
    font-size:7.5px;
    letter-spacing:.13em;
    color:#83909c;
  }

  body.cp-portal .portal-rail{
    top:72px;
    min-height:calc(100vh - 72px);
    background:linear-gradient(180deg,#0b0f14 0%,#090c10 100%);
    border-right:1px solid rgba(255,255,255,.09);
    box-shadow:14px 0 38px rgba(0,0,0,.12);
  }

  .portal-rail-head{
    padding:24px 24px 18px;
    border-bottom-color:rgba(255,255,255,.08);
  }

  .portal-rail-head .tag{
    color:#eef2f5;
    border-color:rgba(255,255,255,.13);
    background:rgba(255,255,255,.025);
  }

  .portal-rail-context{
    margin-top:7px;
    color:#75818d;
  }

  .portal-rail-head::after{
    color:rgba(226,96,62,.64);
    letter-spacing:.14em;
  }

  .portal-rail nav{
    padding:10px 0 14px;
  }

  .portal-rail nav ul{
    padding:0;
  }

  .portal-rail nav li:not(.portal-nav-group){
    border-bottom:0;
  }

  .portal-nav-group{
    padding:18px 24px 8px;
    color:#596572;
    font:8px/1 var(--mono);
    letter-spacing:.18em;
    text-transform:uppercase;
    border:0 !important;
  }

  .portal-rail nav a{
    position:relative;
    display:grid;
    grid-template-columns:28px minmax(0,1fr);
    gap:10px;
    align-items:start;
    margin:2px 10px;
    padding:11px 12px;
    border:1px solid transparent;
    border-left:1px solid transparent;
    transition:background .16s ease,border-color .16s ease,transform .16s ease;
  }

  .portal-rail nav a:hover{
    background:rgba(255,255,255,.035);
    border-color:rgba(255,255,255,.06);
  }

  .portal-rail nav a[aria-current="page"]{
    background:linear-gradient(90deg,rgba(226,96,62,.12),rgba(226,96,62,.035));
    border-color:rgba(226,96,62,.22);
    border-left:2px solid var(--cp-orange);
  }

  .portal-nav-index{
    padding-top:2px;
    color:#53606d;
    font:8px/1.4 var(--mono);
    letter-spacing:.10em;
  }

  .portal-rail nav a[aria-current="page"] .portal-nav-index{
    color:var(--cp-orange);
  }

  .portal-nav-copy{
    min-width:0;
  }

  .portal-rail nav a .portal-nav-copy > b{
    color:#aeb8c3;
    font-size:13px;
    font-weight:560;
  }

  .portal-rail nav a .portal-nav-copy > span{
    margin-top:3px;
    color:#65717e;
    font-size:10.5px;
    line-height:1.38;
  }

  .portal-rail nav a[aria-current="page"] .portal-nav-copy > b{
    color:#f5f7f9;
  }

  .portal-rail-foot{
    padding:18px 22px 20px;
    background:#080b0f;
    border-top-color:rgba(255,255,255,.08);
  }

  .portal-back-public{
    color:#8d99a5;
  }

  .portal-main{
    width:100%;
    max-width:1440px;
    padding:28px clamp(30px,3vw,48px) 64px;
    background-size:48px 48px;
  }
}

/* Authenticated workspace context */
.portal-contextbar{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:24px;
  min-height:56px;
  margin:-4px 0 18px;
  padding:10px 14px;
  border:1px solid var(--line);
  background:color-mix(in srgb,var(--plate) 90%,transparent);
}

.portal-context-primary{
  min-width:180px;
  display:flex;
  align-items:center;
  gap:12px;
}

.portal-context-label{
  padding:5px 7px;
  border:1px solid rgba(226,96,62,.42);
  background:rgba(226,96,62,.07);
  color:var(--signal);
  font:7.5px/1 var(--mono);
  letter-spacing:.14em;
  text-transform:uppercase;
  white-space:nowrap;
}

.portal-context-primary strong{
  color:var(--text);
  font-size:12px;
  font-weight:600;
}

.portal-context-meta{
  display:flex;
  align-items:center;
  gap:0;
  margin:0;
}

.portal-context-meta > div{
  min-width:112px;
  padding:2px 16px;
  border-left:1px solid var(--line);
}

.portal-context-meta dt,
.portal-context-meta dd{
  margin:0;
}

.portal-context-meta dt{
  margin-bottom:4px;
  color:var(--dim);
  font:7px/1 var(--mono);
  letter-spacing:.14em;
  text-transform:uppercase;
}

.portal-context-meta dd{
  color:var(--muted);
  font:9px/1.2 var(--mono);
}

.portal-environment-banner{
  display:grid;
  grid-template-columns:190px minmax(0,1fr);
  align-items:start;
  gap:18px;
  margin-bottom:28px;
  padding:14px 16px;
  border:1px solid rgba(231,184,78,.20);
  border-left:2px solid var(--hold);
  background:rgba(231,184,78,.035);
}

.portal-environment-banner strong{
  color:#e9edf1;
  font:9px/1.45 var(--mono);
  letter-spacing:.11em;
  text-transform:uppercase;
}

.portal-environment-banner span{
  color:var(--dim);
  font-size:12px;
  line-height:1.55;
}

/* Page hierarchy */
.portal-head{
  position:relative;
  display:grid;
  grid-template-columns:minmax(0,1fr) auto;
  gap:24px;
  align-items:end;
  margin-bottom:26px;
  padding:0 0 22px;
  border-bottom:1px solid var(--line);
}

.portal-head::before{
  content:"COMPUTE PASSPORT / CONTROL PLANE";
  grid-column:1 / -1;
  margin-bottom:-14px;
  color:var(--signal);
  font:8px/1 var(--mono);
  letter-spacing:.16em;
}

.portal-head h1{
  margin:0 0 8px;
  font-size:clamp(30px,3vw,42px);
  font-weight:580;
  letter-spacing:-.04em;
}

.portal-head .lede{
  max-width:78ch;
  margin:0;
  color:var(--muted);
  font-size:14px;
  line-height:1.6;
}

/* Panels are records/work surfaces, not decorative cards. */
.panel{
  position:relative;
  border-radius:2px;
  padding:24px;
  border-color:var(--line);
  box-shadow:0 16px 42px -38px rgba(0,0,0,.65);
}

.panel::before{
  content:"";
  position:absolute;
  left:-1px;
  top:18px;
  bottom:18px;
  width:1px;
  background:rgba(226,96,62,.18);
}

.panel > h2{
  font-size:17px;
  font-weight:580;
  letter-spacing:-.015em;
}

.metrics{
  gap:12px;
}

.metric{
  min-height:144px;
  padding:19px 20px;
  border-radius:2px;
  border-top:1px solid var(--line-strong);
  box-shadow:0 16px 36px -36px rgba(0,0,0,.75);
}

.metric::after{
  content:"";
  display:block;
  width:28px;
  height:1px;
  margin-top:16px;
  background:var(--signal);
  opacity:.72;
}

.metric strong{
  font-size:28px;
  font-weight:520;
}

/* Forms */
.field label,
.field-label{
  color:var(--dim);
  font-size:9px;
  letter-spacing:.13em;
}

.field input[type="text"],
.field input[type="number"],
.field input[type="email"],
.field input[type="password"],
.field select,
.field textarea{
  min-height:48px;
  border-radius:1px;
  border-color:var(--line-strong);
  box-shadow:inset 0 0 0 1px rgba(255,255,255,.01);
}

.field input:focus,
.field select:focus,
.field textarea:focus{
  outline:none;
  border-color:var(--signal);
  box-shadow:0 0 0 1px var(--signal),0 0 0 4px rgba(226,96,62,.08);
}

/* Tables */
.table-scroll{
  border:1px solid var(--line);
  background:rgba(0,0,0,.025);
}

.panel > .table-scroll:first-child{
  margin:-1px;
}

table.data{
  border-collapse:separate;
  border-spacing:0;
}

table.data thead th{
  position:sticky;
  top:0;
  z-index:2;
  padding:12px 14px;
  background:color-mix(in srgb,var(--plate-2) 94%,var(--ink));
  border-bottom:1px solid var(--line-strong);
  color:var(--dim);
  font-size:8px;
  letter-spacing:.13em;
  text-transform:uppercase;
}

table.data tbody td{
  padding:14px;
  border-bottom:1px solid var(--line);
  vertical-align:middle;
}

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

table.data tbody tr{
  transition:background .12s ease;
}

table.data tbody tr:hover{
  background:rgba(226,96,62,.035);
}

/* Buttons: tighter control-grade actions. */
body.cp-portal .btn{
  min-height:40px;
  border-radius:1px;
  padding:0 14px;
  font-size:9px;
  letter-spacing:.09em;
}

body.cp-portal .btn--primary{
  background:var(--signal);
  border-color:var(--signal);
  color:#fff;
}

body.cp-portal .btn--primary:hover,
body.cp-portal .btn--primary:focus-visible{
  background:#f06a46;
  border-color:#f06a46;
  outline:none;
}

/* Light appearance keeps the command shell dark and converts the working
   surface to a document-like government/enterprise workspace. */
html[data-cp-theme="light"] body.cp-portal .portal-rail{
  background:linear-gradient(180deg,#0b0f14 0%,#090c10 100%);
  border-right-color:rgba(255,255,255,.08);
}

html[data-cp-theme="light"] body.cp-portal .portal-rail-head{
  border-bottom-color:rgba(255,255,255,.08);
}

html[data-cp-theme="light"] body.cp-portal .portal-rail-head .tag{
  color:#f2f4f7;
  border-color:rgba(255,255,255,.13);
}

html[data-cp-theme="light"] body.cp-portal .portal-rail-context,
html[data-cp-theme="light"] body.cp-portal .portal-nav-group{
  color:#65717d;
}

html[data-cp-theme="light"] body.cp-portal .portal-rail nav a:hover{
  background:rgba(255,255,255,.04);
}

html[data-cp-theme="light"] body.cp-portal .portal-rail nav a[aria-current="page"]{
  background:linear-gradient(90deg,rgba(226,96,62,.14),rgba(226,96,62,.035));
}

html[data-cp-theme="light"] body.cp-portal .portal-rail nav a .portal-nav-copy > b{
  color:#aeb8c3;
}

html[data-cp-theme="light"] body.cp-portal .portal-rail nav a[aria-current="page"] .portal-nav-copy > b{
  color:#fff;
}

html[data-cp-theme="light"] body.cp-portal .portal-rail nav a .portal-nav-copy > span{
  color:#65717e;
}

html[data-cp-theme="light"] body.cp-portal .portal-rail-foot{
  background:#080b0f;
  border-top-color:rgba(255,255,255,.08);
}

html[data-cp-theme="light"] body.cp-portal .portal-rail-foot p{
  color:#aeb8c3 !important;
}

html[data-cp-theme="light"] body.cp-portal .portal-back-public{
  color:#8d99a5;
}

html[data-cp-theme="light"] body.cp-portal .portal-back-public:hover{
  color:#fff;
}

html[data-cp-theme="light"] body.cp-portal .portal-contextbar{
  background:#fff;
  box-shadow:0 12px 30px -28px rgba(15,24,34,.35);
}

html[data-cp-theme="light"] body.cp-portal .portal-environment-banner strong{
  color:#202a34;
}

html[data-cp-theme="light"] body.cp-portal .panel,
html[data-cp-theme="light"] body.cp-portal .metric{
  box-shadow:0 18px 48px -42px rgba(15,24,34,.34);
}

html[data-cp-theme="light"] body.cp-portal table.data thead th{
  background:#f0f3f5;
}

html[data-cp-theme="light"] body.cp-portal table.data tbody tr:hover{
  background:rgba(226,96,62,.035);
}

/* Responsive control plane */
@media(max-width:1024px){
  .portal-contextbar{
    margin-top:0;
  }

  .portal-context-meta{
    display:none;
  }

  .portal-context-primary{
    width:100%;
    justify-content:space-between;
  }

  .portal-nav-group{
    padding:16px 22px 7px;
    color:#65717e;
    font:8px/1 var(--mono);
    letter-spacing:.16em;
    text-transform:uppercase;
  }

  .portal-rail nav a{
    display:grid;
    grid-template-columns:26px minmax(0,1fr);
    gap:10px;
  }

  .portal-nav-index{
    color:#65717e;
    font:8px/1.3 var(--mono);
    padding-top:2px;
  }

  .portal-nav-copy{
    min-width:0;
  }

  .portal-environment-banner{
    grid-template-columns:1fr;
    gap:7px;
    padding:13px 14px;
  }

  .portal-head{
    display:block;
  }

  .portal-head::before{
    display:block;
    margin-bottom:12px;
  }
}

@media(max-width:620px){
  .portal-contextbar{
    min-height:48px;
    padding:8px 10px;
    margin-bottom:14px;
  }

  .portal-context-label{
    font-size:7px;
  }

  .portal-context-primary strong{
    font-size:11px;
  }

  .portal-environment-banner{
    margin-bottom:22px;
  }

  .portal-environment-banner span{
    font-size:11.5px;
  }

  .portal-head h1{
    font-size:clamp(28px,9vw,36px);
  }

  .portal-head .lede{
    font-size:13px;
    line-height:1.55;
  }

  .panel{
    padding:18px;
  }

  .metric{
    min-height:128px;
    padding:16px;
  }
}

@media(max-width:1024px){
  .portal-nav-group{
    border-bottom:0 !important;
  }
  .portal-nav-index{
    margin-top:0 !important;
    max-width:none !important;
    padding-top:3px;
    color:#687582 !important;
    font-size:8px !important;
    line-height:1.3 !important;
  }
  .portal-nav-copy{
    margin-top:0 !important;
    max-width:none !important;
  }
  .portal-nav-copy > b{
    margin:0 !important;
  }
  .portal-nav-copy > span{
    margin-top:4px !important;
    max-width:29ch !important;
    color:#697582 !important;
    font-size:11px !important;
    line-height:1.45 !important;
  }
}


/* Portal navigation density · v1.4.21
 * Labels only: removes explanatory copy from navigation controls and keeps
 * desktop/mobile navigation compact, scan-friendly and government-grade.
 */
.portal-rail nav a{
  align-items:center;
  min-height:42px;
  padding-top:9px;
  padding-bottom:9px;
}
.portal-nav-index{
  padding-top:0;
}
.portal-nav-copy{
  display:flex;
  align-items:center;
  min-width:0;
}
.portal-rail nav a .portal-nav-copy > b{
  display:block;
  line-height:1.25;
}
@media(max-width:1024px){
  .portal-rail nav a{
    align-items:center;
    min-height:44px;
    padding-top:10px;
    padding-bottom:10px;
  }
  .portal-nav-index{
    padding-top:0 !important;
  }
}

/* ============================================================
   MOBILE PORTAL HARDENING · v1.4.23
   Dense enterprise controls remain desktop-first while all workflows stay
   fully usable on phones and tablets without horizontal page overflow.
   ============================================================ */

body.cp-portal,
body.cp-portal main,
body.cp-portal .portal,
body.cp-portal .portal-main{
  max-width:100%;
}

@media(max-width:1024px){
  body.cp-portal{
    overflow-x:clip;
  }

  .portal-topbar{
    padding-left:max(14px, env(safe-area-inset-left));
    padding-right:max(14px, env(safe-area-inset-right));
  }

  .portal-menu-toggle,
  .portal-public-link{
    min-height:44px;
    touch-action:manipulation;
  }

  .portal-rail{
    width:min(88vw,340px);
    padding-left:env(safe-area-inset-left);
  }

  .portal-rail-head{
    padding-top:calc(20px + env(safe-area-inset-top));
  }

  .portal-rail nav a{
    min-height:48px !important;
    padding:12px 20px !important;
  }

  .portal-menu-close{
    width:44px;
    height:44px;
    flex-basis:44px;
  }

  .portal-main{
    padding-left:max(16px, env(safe-area-inset-left));
    padding-right:max(16px, env(safe-area-inset-right));
    padding-bottom:calc(48px + env(safe-area-inset-bottom));
  }

  .portal-contextbar{
    overflow:hidden;
  }

  .portal-context-primary{
    min-width:0;
    gap:10px;
  }

  .portal-context-primary strong{
    overflow:hidden;
    text-overflow:ellipsis;
    white-space:nowrap;
  }

  .panel,
  .metric,
  .receipt,
  .notice{
    max-width:100%;
  }

  .table-scroll{
    max-width:100%;
    overflow-x:auto;
    -webkit-overflow-scrolling:touch;
    overscroll-behavior-inline:contain;
    scrollbar-width:thin;
  }

  body.cp-portal table.data{
    min-width:700px;
  }

  body.cp-portal pre,
  body.cp-portal code,
  body.cp-portal .cpid,
  body.cp-portal .hash{
    max-width:100%;
    overflow-wrap:anywhere;
  }

  body.cp-portal input,
  body.cp-portal select,
  body.cp-portal textarea,
  #loginform input[type="text"],
  #loginform input[type="password"]{
    font-size:16px;
  }

  body.cp-portal .btn,
  body.cp-portal button,
  body.cp-portal input[type="submit"]{
    touch-action:manipulation;
  }
}

@media(max-width:760px){
  .portal-topbar{
    min-height:60px;
    gap:8px;
    padding-top:8px;
    padding-bottom:8px;
  }

  .portal-topbar-brand{
    flex:1 1 auto;
    min-width:0;
  }

  .portal-topbar-brand b{
    font-size:12px;
    white-space:nowrap;
  }

  .portal-topbar-brand span{
    max-width:150px;
    overflow:hidden;
    text-overflow:ellipsis;
    white-space:nowrap;
  }

  .portal-topbar-meta{
    flex:0 0 auto;
    gap:8px;
  }

  .portal-public-link{
    min-height:42px;
    padding-inline:10px;
  }

  .portal-menu-toggle{
    width:44px;
    min-width:44px;
    min-height:42px;
    padding:0 11px;
  }

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

  .portal-contextbar{
    margin-bottom:12px;
  }

  .portal-environment-banner{
    margin-bottom:18px;
    padding:12px 13px;
  }

  .portal-head{
    margin-bottom:20px;
    padding-bottom:16px;
  }

  .portal-head h1{
    font-size:clamp(28px,9vw,36px);
    overflow-wrap:anywhere;
  }

  .portal-head .lede{
    max-width:100%;
    font-size:14px;
  }

  .metrics{
    grid-template-columns:repeat(2,minmax(0,1fr));
    gap:10px;
  }

  .metric{
    min-height:0;
    padding:15px;
  }

  .metric strong{
    font-size:24px;
  }

  .panel{
    margin-top:16px;
    padding:16px;
  }

  .duo,
  .duo--wide{
    gap:12px;
    margin-top:16px;
  }

  .field{
    margin-bottom:16px;
  }

  .field select,
  .field input,
  .field textarea{
    min-height:48px;
  }

  .portal-rail{
    width:min(90vw,332px);
  }

  .portal-nav-group{
    padding:15px 20px 6px;
  }
}

@media(max-width:520px){
  .portal-topbar-brand span{
    display:none;
  }

  .portal-public-link{
    font-size:7px;
    letter-spacing:.06em;
  }

  .portal-main{
    padding-left:max(13px, env(safe-area-inset-left));
    padding-right:max(13px, env(safe-area-inset-right));
  }

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

  .metric{
    display:grid;
    grid-template-columns:minmax(0,1fr) auto;
    column-gap:12px;
    align-items:end;
  }

  .metric span{
    grid-column:1 / -1;
    margin-bottom:8px;
  }

  .metric p{
    margin-top:0;
    text-align:right;
  }

  .panel{
    padding:14px;
  }

  body.cp-portal table.data{
    min-width:660px;
  }

  .portal-rail{
    width:min(92vw,320px);
  }
}

@media(max-width:380px){
  .portal-topbar{
    padding-inline:10px;
  }

  .portal-topbar-brand b{
    font-size:11px;
  }

  .portal-public-link{
    min-width:82px;
    padding-inline:7px;
  }

  .portal-menu-toggle{
    width:42px;
    min-width:42px;
  }

  .portal-main{
    padding-inline:11px;
  }
}
