.portal {
  --p-ink: #1b1d18;
  --p-muted: #565a53;
  --p-background: #eeece5;
  --p-surface: #f9f8f2;
  --p-line: #d3d1c7;
  --p-sidebar: #171a17;
  --p-side-line: #393d35;
  --p-side-text: #f4f3ec;
  --p-side-muted: #b6b9af;
  --p-accent: #dbeea4;
  --p-positive: #315329;
  --p-negative: #8a3329;
  min-height: 100vh;
  color: var(--p-ink);
  background: var(--p-background);
  color-scheme: light;
  font-size: .9375rem;
}
.portal a { text-underline-offset: .21em; }
.portal p { text-wrap: pretty; }
.portal .portal-skip {
  z-index: 20;
  position: fixed;
  inset: .6rem auto auto .6rem;
  transform: translateY(-160%);
  color: var(--p-ink);
  background: var(--p-surface);
  border: 1px solid var(--p-line);
  padding: .6rem .9rem;
}
.portal .portal-skip:focus { transform: none; }
.portal .portal-brand { display: inline-flex; align-items: center; padding: 3px 0; min-height: 44px; }
.portal .portal-brand img { width: 144px; height: auto; }
.portal-shell { display: grid; grid-template-columns: 220px minmax(0, 1fr); min-height: 100vh; }
.portal-sidebar {
  background: var(--p-sidebar);
  color: var(--p-side-text);
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 23px;
  min-width: 0;
  padding: 27px 19px 22px;
}
.portal-sidebar-head { padding: 0 5px 16px; border-bottom: 1px solid var(--p-side-line); }
.portal-sidebar-label { display: block; color: var(--p-side-muted); font: 500 .705rem/1.35 var(--mono); margin-top: 7px; }
.portal-nav { display: grid; gap: 4px; }
.portal-nav a {
  display: flex;
  align-items: center;
  gap: 9px;
  min-height: 43px;
  padding: 8px 11px;
  color: var(--p-side-muted);
  font-weight: 550;
  border: 1px solid transparent;
  border-radius: 6px;
}
.portal-nav a:hover { color: var(--p-side-text); background: #232723; }
.portal-nav a[aria-current="page"] {
  border-color: #505844;
  background: #303827;
  color: #eef4df;
}
.portal-nav a[aria-current="page"]::before {
  content: "";
  display: block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--p-accent);
}
.portal-sidebar-foot { margin-top: auto; border-top: 1px solid var(--p-side-line); padding: 13px 5px 0; }
.portal-identity { display: grid; gap: 3px; margin-bottom: 10px; min-width: 0; }
.portal-identity strong, .portal-identity small { overflow-wrap: anywhere; }
.portal-identity small { color: var(--p-side-muted); font-size: .75rem; }
.portal-exit { color: var(--p-side-muted); background: transparent; border: 0; padding: 0; min-height: 34px; font-size: .8rem; }
.portal-exit:hover { color: var(--p-side-text); text-decoration: underline; }
.portal-main { width: min(100%, 1500px); min-width: 0; padding: clamp(24px, 4vw, 56px) clamp(18px, 4.1vw, 58px) 68px; margin-inline: auto; }
.portal-top { display: flex; flex-wrap: wrap; align-items: end; justify-content: space-between; gap: 13px; margin-bottom: 25px; padding-bottom: 20px; border-bottom: 1px solid var(--p-line); }
.portal-kicker { color: var(--p-muted); font: 500 .725rem/1.55 var(--mono); }
.portal-title { color: var(--p-ink); font: 760 clamp(2.15rem, 3.8vw, 3.4rem)/1.04 var(--display); letter-spacing: -.071em; overflow-wrap: anywhere; }
.portal-summary { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1px; border: 1px solid var(--p-line); border-radius: 7px; overflow: hidden; background: var(--p-line); margin-bottom: 25px; }
.portal-stat { background: var(--p-surface); padding: 16px 16px 18px; min-width: 0; }
.portal-stat p { color: var(--p-muted); font-size: .785rem; margin-bottom: 6px; }
.portal-stat strong { display: block; font: 760 clamp(1.48rem, 2.45vw, 2.05rem)/1.1 var(--display); letter-spacing: -.045em; overflow-wrap: anywhere; font-variant-numeric: tabular-nums; }
.portal-stat small { display: block; color: var(--p-muted); font-size: .735rem; line-height: 1.4; margin-top: 7px; }
.portal-stat.portal-negative strong { color: var(--p-negative); }
.portal-stat.portal-positive strong { color: var(--p-positive); }
.portal-stack { display: grid; align-content: start; gap: 20px; min-width: 0; }
.portal-split { display: grid; grid-template-columns: minmax(0, 1.45fr) minmax(250px, 1fr); align-items: start; gap: 16px; }
.portal-card { border: 1px solid var(--p-line); border-radius: 7px; background: var(--p-surface); padding: clamp(14px, 2vw, 23px); min-width: 0; }
.portal-card h2, .portal-card h3 { font-family: var(--display); line-height: 1.18; letter-spacing: -.04em; }
.portal-card h2 { font-size: 1.27rem; font-weight: 760; }
.portal-card h3 { font-size: 1.075rem; font-weight: 750; }
.portal-card-head { display: flex; align-items: baseline; justify-content: space-between; flex-wrap: wrap; gap: 6px 12px; margin-bottom: 14px; }
.portal-card-head p, .portal-meta { color: var(--p-muted); font-size: .8rem; }
.portal-card-body { display: grid; gap: 13px; }
.portal-card + .portal-card { margin: 0; }
.portal-table-wrap { overflow: auto; }
.portal-table { width: 100%; text-align: left; border-collapse: collapse; font-size: .8375rem; }
.portal-table caption { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
.portal-table th, .portal-table td { border-bottom: 1px solid var(--p-line); padding: 10px 11px 10px 0; vertical-align: top; }
.portal-table tbody tr:last-child > * { border-bottom: 0; }
.portal-table th { color: var(--p-muted); font-size: .75rem; font-weight: 650; }
.portal-table td { overflow-wrap: anywhere; }
.portal-table td strong { color: var(--p-ink); }
.portal-table :is(td, th):last-child { padding-right: 0; }
.portal-table-action { min-width: 7.5rem; }
.portal-money { white-space: nowrap; font-variant-numeric: tabular-nums; font-weight: 620; }
.portal-text-link { color: var(--p-positive); font-weight: 650; text-decoration: underline; }
.portal-text-link:hover { color: #172913; }
.portal-inline { display: flex; flex-wrap: wrap; gap: 7px 10px; align-items: center; }
.portal-badge { display: inline-flex; align-items: center; gap: 5px; background: #e8e7df; color: #444941; border: 1px solid #d5d4cb; padding: 3px 7px; min-height: 25px; border-radius: 4px; font-size: .73rem; font-weight: 620; line-height: 1.18; }
.portal-badge::before { content: ""; flex: 0 0 5px; width: 5px; height: 5px; border-radius: 50%; background: currentColor; }
.portal-badge[data-tone="good"] { color: #31502d; border-color: #cad7b5; background: #e7eddc; }
.portal-badge[data-tone="warn"] { color: #674910; border-color: #dfcfab; background: #f0e7ce; }
.portal-badge[data-tone="bad"] { color: #883128; border-color: #e6c6bf; background: #f3e4de; }
.portal-empty { color: var(--p-muted); border: 1px dashed var(--p-line); padding: 16px; font-size: .85rem; }
.portal-flash { margin-bottom: 19px; background: #e1ead7; color: #2b4827; border: 1px solid #b6cba8; padding: 10px 13px; border-radius: 5px; overflow-wrap: anywhere; }
.portal-flash[data-tone="bad"] { background: #f4e4dc; color: var(--p-negative); border-color: #dec1b8; }
.portal-form { display: grid; gap: 11px; }
.portal-form-rows { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 11px; }
.portal-field { display: grid; align-content: start; gap: 4px; min-width: 0; font-size: .81rem; font-weight: 620; }
.portal-field :is(input, select, textarea) {
  font: inherit;
  font-size: .89rem;
  font-weight: 480;
  display: block;
  width: 100%;
  min-width: 0;
  min-height: 41px;
  padding: 7px 8px;
  color: var(--p-ink);
  background: #fffefa;
  border: 1px solid #b8b9b0;
  border-radius: 5px;
}
.portal-field input[readonly] { background: #eae9e1; }
.portal-field textarea { min-height: 73px; resize: vertical; }
.portal-field input::placeholder, .portal-field textarea::placeholder { color: #72766c; }
.portal-field small { color: var(--p-muted); font-weight: 480; line-height: 1.35; }
.portal-field-full { grid-column: 1 / -1; }
.portal-check { display: flex; align-items: flex-start; gap: 8px; min-height: 30px; color: var(--p-ink); font-size: .81rem; font-weight: 560; }
.portal-check input { width: 17px; height: 17px; margin: 4px 0 0; flex: 0 0 auto; accent-color: #374e2c; }
.portal-form-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; }
.portal-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  width: fit-content;
  min-height: 42px;
  padding: 7px 13px;
  color: #182013;
  font: 700 .79rem/1.2 var(--sans);
  text-align: center;
  border: 1px solid #aeb77e;
  border-radius: 5px;
  background: var(--p-accent);
  white-space: normal;
}
.portal-button:hover { background: #d1e49a; border-color: #8b9766; }
.portal-button[data-kind="secondary"] { background: transparent; border-color: #b9bbae; }
.portal-button[data-kind="secondary"]:hover { background: #efefe4; border-color: #8b9380; }
.portal-button[data-kind="quiet"] { border-color: transparent; color: var(--p-positive); text-decoration: underline; background: transparent; }
.portal-button[data-kind="quiet"]:hover { border-color: #c4c9bd; text-decoration: none; background: #e7eadf; }
.portal-button[data-kind="danger"] { border-color: #e4c4bf; color: var(--p-negative); background: #f5e8e4; }
.portal-button[data-kind="danger"]:hover { border-color: #c08477; background: #efd9d2; }
.portal-button[data-size="small"] { padding: 5px 8px; min-height: 33px; font-size: .75rem; }
.portal-details { padding-top: 11px; border-top: 1px solid var(--p-line); margin-top: 11px; }
.portal-details summary { width: fit-content; color: var(--p-positive); font-size: .82rem; font-weight: 650; cursor: pointer; }
.portal-details[open] > summary { margin-bottom: 11px; }
.portal-details summary:hover { text-decoration: underline; }
.portal-note { white-space: pre-wrap; overflow-wrap: anywhere; }
.portal-record { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: start; gap: 8px 14px; padding: 12px 0; border-top: 1px solid var(--p-line); }
.portal-record:first-child { padding-top: 0; border-top: 0; }
.portal-record:last-child { padding-bottom: 0; }
.portal-record-title { color: var(--p-ink); overflow-wrap: anywhere; font-family: var(--display); font-weight: 740; }
.portal-record dd, .portal-record dl { margin: 0; }
.portal-record dl :is(dt, dd) { display: inline; }
.portal-record dt { color: var(--p-muted); }
.portal-auth { display: grid; min-height: 100vh; place-items: center; background: var(--p-sidebar); padding: 23px 15px; }
.portal-auth-box { display: grid; width: min(100%, 465px); gap: 12px; }
.portal-auth-logo { padding: 9px 5px; }
.portal-auth-form { background: var(--p-surface); border: 1px solid var(--p-line); border-radius: 9px; padding: clamp(17px, 4vw, 30px); }
.portal-auth-title { font: 760 clamp(1.75rem, 4.5vw, 2.5rem)/1.09 var(--display); letter-spacing: -.062em; }
.portal-auth-intro { color: var(--p-muted); font-size: .86rem; margin: 7px 0 16px; }
.portal-auth-form .portal-flash { margin: 12px 0; }
.portal-auth-back { color: var(--p-side-muted); font-size: .8rem; width: fit-content; padding: 4px 5px; }
.portal-auth-back:hover { color: var(--p-side-text); text-decoration: underline; }
.portal-stub .portal-auth-logo { margin-bottom: 7px; }
.portal-stub .portal-status-action { margin-top: 12px; }

@media (max-width: 1020px) {
  .portal-shell { grid-template-columns: 186px minmax(0, 1fr); }
  .portal-sidebar { padding-inline: 14px; }
  .portal-split { grid-template-columns: 1fr; }
}
@media (max-width: 700px) {
  .portal-shell { grid-template-columns: minmax(0, 1fr); }
  .portal-sidebar { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px 10px; padding: 8px 13px; }
  .portal-sidebar-head { border: 0; padding: 0; }
  .portal-sidebar-head .portal-brand img { width: 109px; }
  .portal-sidebar-label { margin-top: 0; }
  .portal-sidebar-foot { margin: 0; padding: 0; border: 0; align-self: center; grid-column: 2; grid-row: 1; text-align: right; }
  .portal-identity strong, .portal-identity small { max-width: 145px; line-height: 1.25; }
  .portal-identity { font-size: .75rem; margin-bottom: 0; }
  .portal-identity small { font-size: .675rem; }
  .portal-exit { min-height: 29px; }
  .portal-nav { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: 4px; }
  .portal-nav a { min-height: 34px; padding: 5px 8px; font-size: .78rem; }
  .portal-main { padding: 20px 13px 40px; }
  .portal-top { padding-bottom: 14px; margin-bottom: 16px; }
  .portal-record { grid-template-columns: 1fr; }
  .portal-stat { padding: 11px; }
  .portal-summary { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 380px) {
  .portal-form-rows { grid-template-columns: minmax(0, 1fr); }
  .portal-nav a { padding-inline: 6px; }
}

.portal-period { display: flex; flex-wrap: wrap; align-items: flex-start; gap: 7px; }
.portal-period .portal-field { min-width: 10.6rem; }
.portal-period .portal-button { margin-top: 21px; }
.portal-client-item + .portal-client-item { border-top: 1px solid var(--p-line); padding-top: 17px; margin-top: 19px; }
.portal-client-item > .portal-record { padding-bottom: 6px; }
.portal-client-item > .portal-note { margin: 8px 0; }
.portal-site-fields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 9px 14px; margin: 9px 0 0; }
.portal-site-fields > div { min-width: 0; }
.portal-site-fields dt { display: block; color: var(--p-muted); font-size: .73rem; }
.portal-site-fields dd { margin: 2px 0 0; font-size: .87rem; font-weight: 650; overflow-wrap: anywhere; }
.portal-site-fields-primary { margin: 15px 0 18px; border-block: 1px solid var(--p-line); padding-block: 12px; }
.portal-client-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.portal-client-site { padding: clamp(14px, 2.4vw, 23px); min-width: 0; border: 1px solid var(--p-line); border-radius: 7px; background: var(--p-surface); }
.portal-client-site h2 { font: 760 1.28rem/1.17 var(--display); letter-spacing: -.05em; overflow-wrap: anywhere; }
.portal-client-site h3 { font: 740 .9rem/1.2 var(--display); }
.portal-client-services { margin-bottom: 15px; }
.portal-client-services ul { color: var(--p-muted); margin: 7px 0 0; padding-left: 1rem; font-size: .81rem; }
.portal-table-action .portal-details { border: 0; padding-top: 0; margin-top: 0; }
.portal-table-action .portal-form { min-width: 205px; }
.portal-table-action .portal-form-rows { grid-template-columns: 1fr; }
@media (max-width: 870px) {
  .portal-client-grid { grid-template-columns: minmax(0,1fr); }
}
@media (max-width: 700px) {
  .portal-summary { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .portal-period .portal-button { min-height: 41px; }
}

body:has(.px-gate) { margin: 0; }
.px-gate {
  box-sizing: border-box;
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: clamp(18px, 5vw, 58px);
  background: #eeece5;
  color: #1b1d18;
  font: 400 1rem/1.5 system-ui, sans-serif;
}
.px-gate > div {
  box-sizing: border-box;
  width: min(100%, 560px);
  padding: clamp(19px, 5vw, 42px);
  background: #f9f8f2;
  border: 1px solid #d3d1c7;
  border-radius: 7px;
}
.px-gate > div > p:first-child { color: #565a53; font-size: .79rem; }
.px-gate h1 { margin: 9px 0 11px; font-size: clamp(1.7rem, 5.5vw, 2.45rem); line-height: 1.12; letter-spacing: -.051em; }
.px-gate a {
  display: inline-flex;
  align-items: center;
  min-height: 42px;
  padding: 3px 11px;
  background: #dbeea4;
  color: #182013;
  font-weight: 650;
  text-decoration: none;
  border: 1px solid #aeb77e;
  border-radius: 5px;
}
.px-gate a:hover { background: #d1e49a; }
