.portal-page [hidden] {
  display: none !important;
}
.portal-main {
  padding-bottom: 90px;
  min-height: 65vh;
}
.portal-hero {
  padding: 55px 0 42px;
  max-width: 850px;
}
.portal-hero h1 {
  font-size: clamp(42px, 5vw, 68px);
  line-height: 1.12;
  letter-spacing: -0.055em;
  margin: 23px 0;
}
.portal-hero > p:last-child {
  max-width: 630px;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.8;
}
.portal-login-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 90px;
  align-items: start;
  max-width: 1100px;
}
.portal-card {
  background: var(--paper-light);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 32px;
}
.portal-card h2 {
  font-size: 30px;
  margin: 0 0 22px;
}
.portal-card h3 {
  font-size: 22px;
  margin-bottom: 24px;
}
.portal-card p {
  font-size: 13px;
  line-height: 1.85;
  color: var(--muted);
}
.portal-card .button {
  margin-top: 25px;
}
.portal-card fieldset {
  border: 0;
  padding: 0;
  margin: 0;
}
.portal-page label {
  display: block;
  font-size: 12px;
  margin: 20px 0 10px;
  font-weight: 600;
}
.portal-page label span {
  font-weight: 400;
  color: var(--muted);
}
.portal-page :is(input:not([type="checkbox"]), select, textarea) {
  width: 100%;
  min-height: 46px;
  border: 1px solid var(--night-border, #b9c4a9);
  border-radius: 5px;
  padding: 12px;
  background: var(--night-surface, #fffef8);
  color: var(--ink);
  font: 13px/1.6 var(--sans);
}
.portal-page textarea {
  resize: vertical;
}
.portal-page :is(input, select, textarea):focus-visible {
  outline: 3px solid var(--moss);
  outline-offset: 3px;
}
.portal-page input:read-only {
  background: var(--night-soft, #e9edde);
  color: var(--muted);
}
.portal-page small {
  font-size: 11px;
  line-height: 1.8;
  color: var(--muted);
  display: block;
  margin-top: 8px;
}
.portal-login-note {
  padding: 24px 0;
}
.portal-login-note h2 {
  font-size: 38px;
  letter-spacing: -0.04em;
  margin: 25px 0;
}
.portal-login-note p {
  font-size: 13px;
  color: var(--muted);
  line-height: 1.9;
  margin-bottom: 20px;
}
.portal-login-note a {
  overflow-wrap: anywhere;
}
.portal-login-note .text-link {
  margin-top: 15px;
}
.portal-message {
  font-size: 12px;
  line-height: 1.85;
  overflow-wrap: anywhere;
  margin-top: 18px;
}
.portal-message:empty {
  display: none;
}
.portal-message[data-error="true"] {
  color: var(--night-error, #98333d);
}
.portal-session-bar {
  display: flex;
  align-items: center;
  gap: 25px;
  flex-wrap: wrap;
  border-block: 1px solid var(--line);
  padding: 20px 0;
  font-size: 12px;
  margin-bottom: 35px;
}
.portal-session-bar > p {
  margin-right: auto;
  color: var(--muted);
}
.portal-session-bar .text-link {
  font-size: 12px;
}
.portal-quiet-button {
  border: 1px solid var(--night-border, #aebe98);
  background: var(--paper-light);
  color: var(--forest);
  font: 500 12px/1.6 var(--sans);
  padding: 12px 16px;
  min-height: 44px;
  border-radius: 5px;
  cursor: pointer;
}
.portal-quiet-button:hover {
  background: var(--night-soft, #e4ead5);
  border-color: var(--moss);
}
.portal-page-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}
.portal-page-link {
  display: block;
  color: var(--ink);
  text-decoration: none;
}
.portal-page-link:hover {
  border-color: var(--moss);
  background: var(--night-soft, #eef1e4);
}
.portal-page-link h2 {
  font-size: 25px;
  letter-spacing: -0.035em;
  margin: 18px 0;
}
.portal-page-link > span:last-child {
  display: block;
  font-size: 12px;
  color: var(--moss);
  margin-top: 25px;
}
.portal-resource {
  max-width: 900px;
  margin: 35px auto;
}
.portal-resource > .eyebrow {
  margin-top: 35px;
}
.portal-resource h2 {
  font-size: 40px;
  letter-spacing: -0.045em;
  margin: 20px 0;
}
.portal-resource-summary {
  font-size: 17px !important;
  border-bottom: 1px solid var(--line);
  padding-bottom: 24px;
  margin-bottom: 25px;
}
.portal-resource #resource-body p {
  white-space: pre-wrap;
  margin-bottom: 20px;
}
.portal-tabs {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin: 0 0 35px;
  padding-bottom: 25px;
  border-bottom: 1px solid var(--line);
}
.portal-tabs :is(a, button) {
  display: inline-block;
  border: 1px solid var(--night-border, #b9c7a7);
  border-radius: 24px;
  min-height: 44px;
  padding: 12px 18px;
  color: var(--forest);
  background: var(--paper-light);
  font: 500 12px var(--sans);
  text-decoration: none;
  cursor: pointer;
}
.portal-tabs :is(a, button):hover {
  background: var(--night-soft, #e5ebd7);
}
.portal-tabs button[aria-pressed="true"] {
  color: var(--night-action-ink, #fbfaf4);
  background: var(--night-action, #283b2e);
  border-color: var(--night-action, #283b2e);
}
.portal-tabs button[aria-pressed="true"]:hover {
  background: var(--night-action-hover, #405534);
}
.portal-section-head {
  display: flex;
  gap: 30px;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 35px;
}
.portal-section-head h2 {
  font-size: 35px;
  letter-spacing: -0.045em;
  margin: 15px 0;
}
.portal-section-head p:not(.eyebrow) {
  font-size: 12px;
  line-height: 1.9;
  color: var(--muted);
  max-width: 620px;
}
.portal-section-head > button {
  flex-shrink: 0;
}
.portal-admin-grid {
  display: grid;
  grid-template-columns: minmax(240px, 0.75fr) minmax(0, 1.5fr);
  gap: 35px;
  align-items: start;
}
.portal-record-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.portal-record-list > button {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--paper-light);
  text-align: left;
  padding: 20px;
  font: 600 13px/1.7 var(--sans);
  color: var(--ink);
  cursor: pointer;
  overflow-wrap: anywhere;
}
.portal-record-list > button:hover {
  background: var(--night-soft, #e9edde);
  border-color: var(--moss);
}
.portal-record-list > button small {
  font-weight: 400;
}
.portal-form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 22px;
}
.portal-page .portal-check {
  display: flex;
  gap: 10px;
  align-items: start;
  font-size: 12px;
  line-height: 1.8;
  font-weight: 400;
  cursor: pointer;
}
.portal-check input {
  width: 19px;
  height: 19px;
  accent-color: var(--forest);
  flex-shrink: 0;
  margin-top: 1px;
}
.portal-page fieldset#member-page-choices {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 15px 20px;
  margin-top: 20px;
}
.portal-page fieldset legend {
  font-size: 11px;
  color: var(--muted);
  padding: 0 8px;
}
.portal-page fieldset:disabled {
  opacity: 0.6;
}
.portal-enquiries {
  display: flex;
  flex-direction: column;
  gap: 15px;
}
.portal-enquiry {
  border: 1px solid var(--line);
  background: var(--paper-light);
  border-radius: 9px;
  padding: 0 25px;
}
.portal-enquiry summary {
  cursor: pointer;
  padding: 24px 0;
  font: 600 14px/1.8 var(--sans);
}
.portal-enquiry summary small {
  font-weight: 400;
}
.portal-enquiry-content {
  border-top: 1px solid var(--line);
  padding: 20px 0 30px;
}
.portal-enquiry-content p {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  font-size: 13px;
  line-height: 1.9;
  margin-bottom: 15px;
}
.portal-enquiry-content dl {
  display: grid;
  grid-template-columns: 170px 1fr;
  gap: 10px;
  font-size: 12px;
  margin-bottom: 25px;
}
.portal-enquiry-content dt {
  color: var(--muted);
}
.portal-enquiry-content dd {
  margin: 0;
  overflow-wrap: anywhere;
}
.portal-enquiry-content button {
  margin-top: 20px;
}
.portal-page button:disabled {
  cursor: wait;
  opacity: 0.65;
}
.portal-empty {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.9;
}
.portal-role {
  display: inline-block;
  font-size: 10px !important;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  color: var(--forest);
  background: var(--night-soft, #e7edda);
  border-radius: 20px;
  padding: 5px 10px;
}
@media (max-width: 800px) {
  .portal-main {
    padding-bottom: 60px;
  }
  .portal-hero {
    padding: 35px 0;
  }
  .portal-hero h1 {
    font-size: 44px;
  }
  .portal-login-layout,
  .portal-admin-grid {
    grid-template-columns: 1fr;
    gap: 25px;
  }
  .portal-login-note {
    padding: 10px 0;
  }
  .portal-card {
    padding: 25px;
  }
  .portal-page-grid {
    grid-template-columns: 1fr;
  }
  .portal-section-head {
    display: block;
  }
  .portal-section-head > button {
    margin-top: 20px;
  }
  .portal-form-row {
    grid-template-columns: 1fr;
    gap: 0;
  }
  .portal-tabs {
    gap: 8px;
  }
  .portal-tabs :is(a, button) {
    font-size: 11px;
    padding: 12px 14px;
  }
  .portal-resource h2 {
    font-size: 33px;
  }
  .portal-enquiry {
    padding: 0 19px;
  }
  .portal-enquiry-content dl {
    grid-template-columns: 1fr;
    gap: 6px;
  }
  .portal-enquiry-content dd {
    margin-bottom: 12px;
  }
}
