.portal-body {
  --container: 78rem;
  --portal-soft: var(--soft, #edf0eb);
  --portal-success: var(--success, #255d49);
  --portal-error: var(--error, #a52a23);
  --portal-serif: var(--serif);
  --portal-sans: var(--sans);
  --red-soft: var(--red-soft, #f6ebe6);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--portal-sans);
  font-size: 1rem;
  line-height: 1.75;
  font-variant-numeric: tabular-nums;
}
.portal-body .container {
  width: min(100% - 2.5rem, var(--container));
}
.portal-body .masthead {
  background: var(--ink);
}
.portal-body .masthead-inner {
  min-height: 1.9rem;
}
.portal-body a, .portal-body button {
  transition: color .18s, background .18s, border-color .18s, box-shadow .18s;
}
.portal-body :is(a, button, input, select, textarea, summary):focus-visible {
  outline: 2px solid var(--red);
  outline-offset: 4px;
}
.portal-header {
  background: var(--white);
  border-bottom: 1px solid var(--line);
}
.portal-top {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: .3rem 1.5rem;
  padding-block: 1.15rem .55rem;
}
.portal-brand {
  display: inline-flex;
  align-items: center;
  min-height: 3.4rem;
  flex: none;
}
.portal-logo {
  display: block;
  position: relative;
  overflow: hidden;
  width: 10.2rem;
  height: 3.475rem;
}
.portal-logo img {
  position: absolute;
  width: 134.37%;
  max-width: none;
  height: auto;
  left: -13.01%;
  top: -61.95%;
}
.portal-account {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: .2rem 1rem;
  width: 100%;
  color: var(--muted);
  font-size: .875rem;
}
.portal-account > span {
  max-width: 100%;
  overflow-wrap: anywhere;
}
.portal-account .text-link {
  min-height: 2.75rem;
  border: 0;
  padding: .35rem 0;
  font-size: .875rem;
  gap: .5rem;
}
.portal-account .text-link:hover {
  color: var(--red);
}
.portal-account .button {
  min-height: 2.5rem;
  padding: .45rem .85rem;
}
.portal-nav {
  display: flex;
  align-items: stretch;
  flex-wrap: nowrap;
  gap: .85rem 1.25rem;
  overflow-x: auto;
  overscroll-behavior-inline: contain;
  scrollbar-width: thin;
  padding-block: .55rem .9rem;
}
.portal-nav-group {
  display: flex;
  flex-direction: column;
  gap: .35rem;
  flex: none;
  min-width: max-content;
  padding-right: 1rem;
  border-right: 1px solid var(--line);
}
.portal-nav-group:last-child {
  border-right: 0;
  padding-right: 0;
}
.portal-nav-label {
  font-size: .6875rem;
  font-weight: 600;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: #8a948b;
  line-height: 1.2;
}
.portal-nav-links {
  display: flex;
  align-items: stretch;
  gap: .25rem;
}
.portal-nav a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: none;
  white-space: nowrap;
  min-height: 2.75rem;
  padding: .55rem .85rem;
  border: 1px solid transparent;
  border-radius: var(--radius, .45rem);
  color: var(--muted);
  font-size: .875rem;
  line-height: 1.5;
}
.portal-nav a:hover {
  color: var(--ink);
  background: #f0f2ed;
}
.portal-nav a[aria-current="page"] {
  color: var(--red);
  background: var(--red-soft);
  border-color: #eed3cb;
  font-weight: 600;
}
.portal-main {
  flex: 1 0 auto;
  min-width: 0;
  padding-block: 2.1rem 4.5rem;
}
.portal-main:focus {
  outline: none;
}
#view {
  min-width: 0;
}
.portal-title {
  padding-bottom: 1.8rem;
  margin-bottom: 1.8rem;
  border-bottom: 1px solid var(--line);
}
.portal-title h1 {
  max-width: 56rem;
  font-family: var(--portal-serif);
  font-weight: 600;
  font-size: clamp(2.15rem, 5.2vw, 3.35rem);
  line-height: 1.25;
  letter-spacing: -.035em;
  margin: 0 0 .8rem;
}
.portal-title p {
  max-width: 49rem;
  color: var(--muted);
  font-size: 1rem;
  line-height: 1.85;
}
.portal-muted, .portal-loading {
  font-size: .9375rem;
  color: var(--muted);
}
.portal-loading {
  padding: 2rem 0;
}
.portal-notice {
  background: #eaf2e9;
  color: var(--portal-success);
  border: 1px solid #cbdecf;
  border-radius: .55rem;
  padding: 1rem 1.15rem;
  margin-bottom: 1.5rem;
  font-size: .9375rem;
  line-height: 1.75;
  overflow-wrap: anywhere;
}
.portal-notice[data-kind="error"] {
  background: #faece7;
  border-color: #ebc8be;
  color: var(--portal-error);
}
.portal-section {
  margin-top: 2.4rem;
  min-width: 0;
  scroll-margin-top: 1.5rem;
}
.portal-section > h2 {
  font-family: var(--portal-sans);
  font-size: 1.25rem;
  font-weight: 600;
  line-height: 1.5;
  letter-spacing: -.015em;
  margin: 0 0 1rem;
}
.portal-section > .portal-muted {
  margin: -.35rem 0 1.2rem;
  max-width: 54rem;
}
.portal-split, .portal-card-grid, .portal-form-grid, .portal-metrics {
  display: grid;
  gap: 1.1rem;
  min-width: 0;
}
.portal-card, .portal-form-panel, .portal-empty, .portal-disclosure, .portal-metric {
  min-width: 0;
  border-radius: .75rem;
}
.portal-card, .portal-form-panel, .portal-empty {
  padding: 1.35rem;
  border: 1px solid var(--line);
  background: var(--white);
}
.portal-card {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: .8rem;
  overflow-wrap: anywhere;
}
.portal-card > * {
  max-width: 100%;
}
.portal-card h3, .portal-form-panel h3 {
  font-family: var(--portal-sans);
  font-weight: 600;
  font-size: 1.125rem;
  line-height: 1.5;
  letter-spacing: -.01em;
}
.portal-card p {
  white-space: pre-line;
  font-size: .9375rem;
  line-height: 1.8;
}
.portal-card > .portal-muted {
  font-size: .875rem;
}
.portal-empty {
  display: grid;
  gap: .85rem;
  justify-items: start;
  color: var(--muted);
  font-size: .9375rem;
  line-height: 1.8;
  padding-block: 1.5rem;
  border-style: dashed;
  background: #fcfbf7;
}
.portal-empty .button,
.portal-empty .text-link {
  justify-self: start;
}
.portal-price {
  display: block;
  color: var(--ink);
  font-family: var(--portal-sans);
  font-size: clamp(1.8rem, 4.2vw, 2.35rem);
  font-weight: 600;
  line-height: 1.2;
  letter-spacing: -.055em;
  font-variant-numeric: tabular-nums;
  margin: .1rem 0 .15rem;
}
.portal-plans {
  align-items: stretch;
}
.portal-plans > .portal-card {
  padding-top: 1.6rem;
  border-top: 3px solid var(--ink);
  gap: 1rem;
}
.portal-plans > .portal-card:nth-child(2) {
  border-top-color: var(--red);
}
.portal-plans > .portal-card:nth-child(2) h3 {
  color: var(--red);
}
.portal-plans > .portal-card > :last-child {
  margin-top: auto;
}
.portal-plans > .portal-card > p:last-child {
  padding-top: .8rem;
  border-top: 1px solid var(--line);
  width: 100%;
  font-size: .875rem;
}
.portal-plans > .portal-card > .text-link:last-child {
  padding-top: .5rem;
}
.portal-plans .portal-disclosure {
  width: 100%;
}
.portal-metrics {
  margin-bottom: 2.6rem;
}
.portal-metric {
  padding: 1.25rem 1.35rem;
  background: var(--white);
  color: var(--ink);
  overflow-wrap: anywhere;
  border: 1px solid var(--line);
  border-top: 3px solid var(--ink);
}
.portal-metric > span {
  display: block;
  color: var(--muted);
  font-size: .875rem;
  line-height: 1.6;
}
.portal-metric strong {
  display: block;
  margin-top: .55rem;
  font-family: var(--portal-sans);
  font-weight: 600;
  font-size: clamp(1.45rem, 3.5vw, 1.9rem);
  line-height: 1.3;
  letter-spacing: -.025em;
  font-variant-numeric: tabular-nums;
}
.portal-metric:nth-child(2) {
  border-top-color: var(--red);
}
.portal-metric:last-child {
  background: #eef2ea;
  border-top-color: #5f7a66;
}
.portal-form-panel {
  min-width: 0;
}
.portal-form-panel h3 {
  margin-bottom: .9rem;
}
.portal-form-panel > .portal-muted {
  margin: -.15rem 0 1.3rem;
}
.portal-form-panel label {
  display: flex;
  flex-direction: column;
  gap: .5rem;
  min-width: 0;
  margin: 0 0 1.05rem;
  color: #3c4942;
  font-size: .875rem;
  font-weight: 500;
  line-height: 1.7;
}
.portal-form-panel :is(input:not([type="radio"]):not([type="checkbox"]), select, textarea) {
  width: 100%;
  min-width: 0;
  min-height: 3rem;
  padding: .75rem .85rem;
  border: 1px solid #cbd4ca;
  border-radius: .4rem;
  background: #fffefa;
  color: var(--ink);
  font-family: var(--portal-sans);
  font-size: 1rem;
  font-weight: 400;
  line-height: 1.5;
  transition: border-color .18s, box-shadow .18s;
}
.portal-form-panel textarea {
  min-height: 7rem;
  resize: vertical;
}
.portal-form-panel input::placeholder, .portal-form-panel textarea::placeholder {
  color: #89928a;
}
.portal-form-panel :is(input, select, textarea):focus {
  border-color: var(--red);
}
.portal-form-panel input[type="file"] {
  padding: .65rem;
  font-size: .875rem;
}
.portal-form-panel input[type="file"]::file-selector-button {
  min-height: 2rem;
  margin-right: .6rem;
  border: 0;
  border-radius: .25rem;
  background: #e9eee6;
  color: var(--ink);
  padding: .35rem .7rem;
  font: inherit;
  cursor: pointer;
}
.portal-form-panel label.portal-check {
  flex-direction: row;
  align-items: flex-start;
  gap: .7rem;
  cursor: pointer;
  min-height: 2.75rem;
  font-weight: 400;
}
.portal-check input {
  width: 1.125rem;
  height: 1.125rem;
  margin: .25rem 0 0;
  accent-color: var(--red);
  flex: none;
}
.portal-body .button {
  min-height: 3rem;
  border-radius: .4rem;
  padding: .75rem 1.15rem;
  font-family: var(--portal-sans);
  font-size: .875rem;
  font-weight: 500;
  line-height: 1.5;
}
.portal-body .button-red {
  background: var(--red);
  color: #fff;
  border-color: var(--red);
}
.portal-body .button-red:hover {
  background: var(--red-dark);
  border-color: var(--red-dark);
}
.portal-form-panel .button, .portal-card .button, .portal-admin-nav .button {
  justify-content: center;
}
.portal-form-panel .button[disabled], .portal-card .button[disabled] {
  background: var(--portal-soft);
  border-color: var(--line);
  color: #6c786e;
  cursor: not-allowed;
}
.portal-form-error {
  color: var(--portal-error);
  margin: .8rem 0;
  font-size: .875rem;
  line-height: 1.7;
  overflow-wrap: anywhere;
}
.portal-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: .6rem .75rem;
  margin-block: .3rem;
  width: 100%;
}
.portal-secondary {
  background: var(--white);
  border-color: #cad3c8;
  color: var(--ink);
}
.portal-secondary:hover {
  background: #edf1e9;
  border-color: #adbda9;
}
.portal-body .text-link {
  font-size: .875rem;
  line-height: 1.5;
  min-height: 2.75rem;
}
.portal-details {
  display: grid;
  grid-template-columns: minmax(5rem, .4fr) minmax(0, 1fr);
  gap: .55rem 1rem;
  width: 100%;
  margin: 0;
  font-size: .875rem;
  line-height: 1.75;
  overflow-wrap: anywhere;
}
.portal-details dt {
  color: var(--muted);
  font-size: .875rem;
}
.portal-details dd {
  min-width: 0;
  margin: 0;
  font-variant-numeric: tabular-nums;
}
.portal-list {
  display: grid;
  gap: .85rem;
  min-width: 0;
}
.portal-disclosure {
  min-width: 0;
  border: 1px solid var(--line);
  background: var(--white);
  padding-inline: 1.1rem;
  overflow-wrap: anywhere;
}
.portal-disclosure > summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: 3.5rem;
  list-style: none;
  font-family: var(--portal-sans);
  font-size: .9375rem;
  font-weight: 500;
  line-height: 1.65;
  padding-block: .9rem;
  cursor: pointer;
}
.portal-disclosure > summary::-webkit-details-marker {
  display: none;
}
.portal-disclosure > summary::after {
  content: "+";
  flex: none;
  color: var(--muted);
  font-family: var(--portal-sans);
  font-size: 1.25rem;
  font-weight: 400;
  line-height: 1;
}
.portal-disclosure[open] > summary {
  color: var(--ink);
  border-bottom: 1px solid var(--line);
}
.portal-disclosure[open] > summary::after {
  content: "−";
  color: var(--red);
}
.portal-disclosure-content {
  display: grid;
  gap: 1rem;
  min-width: 0;
  padding-block: 1.1rem 1.3rem;
}
.portal-disclosure-content > .portal-form-panel {
  background: #f9faf6;
  padding: 1.15rem;
  border-color: #e3e7df;
}
.portal-status {
  display: inline-flex;
  align-items: center;
  align-self: flex-start;
  justify-self: start;
  color: #3f5647;
  background: #edf1e8;
  border: 1px solid #d5dfd0;
  border-radius: .25rem;
  font-size: .75rem;
  font-weight: 600;
  letter-spacing: .02em;
  line-height: 1.45;
  padding: .28rem .55rem;
}
.portal-admin-nav {
  display: flex;
  align-items: stretch;
  flex-wrap: wrap;
  gap: .5rem;
  padding: .8rem;
  border: 1px solid var(--line);
  border-radius: .65rem;
  background: #efeee7;
  margin-bottom: 2rem;
}
.portal-admin-nav .button {
  flex: 1 1 auto;
  min-height: 2.75rem;
  border-color: transparent;
  background: transparent;
}
.portal-admin-nav .button:hover {
  background: #fffdf9;
}
.portal-admin-nav a[aria-current="page"] {
  border-color: #e7ccc2;
  background: var(--white);
  color: var(--red);
  box-shadow: 0 2px 7px #202a2705;
}
.portal-dialog {
  width: min(40rem, calc(100vw - 1.5rem));
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 1rem;
  box-shadow: 0 1.5rem 5rem #15241b30;
}
.portal-dialog .dialog-shell {
  display: grid;
  gap: 1.1rem;
  padding: 1.5rem;
}
.portal-dialog h2 {
  margin: 0;
  font-family: var(--portal-serif);
  font-size: 1.8rem;
  line-height: 1.4;
}
.portal-dialog .portal-details {
  padding-block: .6rem;
}
.portal-dialog .button {
  justify-self: end;
}
.portal-body .site-footer {
  margin-top: auto;
  padding: 0;
  background: var(--white);
  border-top: 1px solid var(--line);
}
.portal-body .portal-footer {
  padding-block: 1.4rem;
  margin-top: 0;
  border: 0;
  font-size: .8125rem;
  line-height: 1.7;
}
.portal-footer a {
  min-height: 2.75rem;
  display: inline-flex;
  align-items: center;
}
@media (min-width: 640px) {
  .portal-body .container {
    width: min(100% - 3.5rem, var(--container));
  }
  .portal-form-grid, .portal-card-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .portal-form-grid > label:has(textarea), .portal-form-grid > fieldset {
    grid-column: 1 / -1;
  }
  .portal-metrics {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
  .portal-top {
    padding-block: 1.3rem .6rem;
  }
  .portal-card, .portal-form-panel {
    padding: 1.5rem;
  }
  .portal-dialog .dialog-shell {
    padding: 2rem;
  }
}
@media (min-width: 768px) {
  .portal-body .container {
    width: min(100% - 5rem, var(--container));
  }
  .portal-top {
    flex-wrap: nowrap;
    padding-block: 1.4rem .85rem;
  }
  .portal-account {
    justify-content: flex-end;
    width: auto;
  }
  .portal-nav {
    gap: .3rem;
    padding-bottom: 1rem;
  }
  .portal-main {
    padding-top: 2.8rem;
  }
  .portal-title {
    padding-bottom: 2rem;
    margin-bottom: 2rem;
  }
  .portal-section {
    margin-top: 2.7rem;
  }
  .portal-plans > .portal-card {
    min-height: 19rem;
  }
}
@media (min-width: 1024px) {
  .portal-header {
    position: sticky;
    top: 0;
    z-index: 30;
  }
  .portal-main {
    padding-block: 3.2rem 5rem;
  }
  .portal-section {
    scroll-margin-top: 11rem;
  }
  .portal-card-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
  .portal-split {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    align-items: start;
    gap: 1.4rem;
  }
  .portal-split > .portal-form-panel {
    padding: 1.8rem;
  }
  .portal-plans {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .portal-details {
    grid-template-columns: minmax(6rem, .4fr) minmax(0, 1fr);
  }
  .portal-admin-nav {
    gap: .65rem;
  }
  .portal-admin-nav .button {
    flex: 0 1 auto;
    padding-inline: 1.2rem;
  }
}
@media (min-width: 1280px) {
  .portal-plans {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
  .portal-plans > .portal-card {
    min-height: 21rem;
    padding-inline: 1.3rem;
  }
  .portal-plans .portal-price {
    font-size: 2rem;
  }
  .portal-nav {
    gap: .55rem;
  }
  .portal-nav a {
    padding-inline: 1rem;
  }
}
@media (prefers-reduced-motion: reduce) {
  .portal-body {
    scroll-behavior: auto;
  }
  .portal-body *, .portal-body *::before, .portal-body *::after {
    animation: none !important;
    transition: none !important;
  }
}
@media print {
  .portal-body .masthead, .portal-header, .portal-account, .portal-nav, .portal-admin-nav, .portal-actions, .portal-form-panel, .portal-body .site-footer {
    display: none !important;
  }
  .portal-body {
    background: white;
    color: black;
  }
  .portal-main {
    width: 100% !important;
    padding: 0;
  }
  .portal-card, .portal-metric, .portal-disclosure {
    break-inside: avoid;
    box-shadow: none;
  }
}

.account-secret {
  display: block;
  max-width: 100%;
  padding: 1rem;
  background: var(--portal-soft);
  color: var(--ink);
  border: 1px solid var(--line);
  font: 1rem/1.8 ui-monospace, SFMono-Regular, Menlo, monospace;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  user-select: all;
}
.portal-dialog .portal-form-panel { margin-block: 1rem; }
.issuance-provider-notice { display: flex; flex-wrap: wrap; align-items: center; gap: 1rem; padding: 1.25rem; margin-block: .5rem 1rem; border: 1px solid var(--line); border-radius: .5rem; background: var(--portal-soft); }
.issuance-provider-notice[hidden] { display: none; }
.issuance-provider-notice img { width: 5rem; height: 5rem; object-fit: contain; background: transparent; border: 0; }
.issuance-provider-notice span { flex: 1 1 10rem; font-size: 1.125rem; font-weight: 700; }

.portal-auth {
  max-width: 34rem;
}
.portal-auth-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: .35rem;
  margin-bottom: 1.2rem;
  padding: .3rem;
  border: 1px solid var(--line);
  border-radius: .55rem;
  background: #f1f3ee;
}
.portal-auth-tabs button {
  min-height: 2.75rem;
  border: 0;
  border-radius: .4rem;
  background: transparent;
  color: var(--muted);
  font: 500 .9375rem/1.4 var(--portal-sans);
}
.portal-auth-tabs button[aria-selected="true"] {
  background: var(--white);
  color: var(--red);
  box-shadow: 0 1px 0 #202a2708;
}
.portal-auth-panel[hidden] {
  display: none !important;
}
.portal-plans-preview {
  opacity: .96;
}
.portal-plans-preview > .portal-card {
  min-height: auto;
}
.portal-membership-brief > .portal-muted {
  max-width: 46rem;
}
.portal-benefit-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: .9rem;
  margin: 1.15rem 0 1.35rem;
}
.portal-benefit-item {
  min-width: 0;
  padding: 1.1rem 1.15rem;
  border: 1px solid var(--line);
  border-radius: .65rem;
  background: linear-gradient(180deg, #fffdf9 0%, #f4f6f2 100%);
}
.portal-benefit-item h3 {
  margin: 0 0 .45rem;
  font-size: 1rem;
  font-weight: 600;
  letter-spacing: -.01em;
}
.portal-benefit-item p {
  margin: 0;
  color: var(--muted);
  font-size: .9rem;
  line-height: 1.7;
}
.portal-audience {
  padding: 1.15rem 1.2rem;
  border: 1px solid var(--line);
  border-radius: .65rem;
  background: var(--portal-soft);
}
.portal-audience h3 {
  margin: 0 0 .7rem;
  font-size: 1rem;
  font-weight: 600;
}
.portal-audience ul {
  margin: 0;
  padding-left: 1.15rem;
  display: grid;
  gap: .45rem;
  color: var(--ink);
  font-size: .9375rem;
  line-height: 1.7;
}
@media (max-width: 767px) {
  .portal-benefit-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 767px) {
  .portal-nav {
    gap: .75rem;
  }
  .portal-nav-group {
    padding-right: .75rem;
  }
  .portal-nav-label {
    font-size: .625rem;
  }
}
