.portal-auth-body { min-height: 100vh; background: var(--navy); }
.portal-auth { display: grid; grid-template-columns: minmax(22rem, .9fr) minmax(30rem, 1.1fr); min-height: 100vh; }
.portal-auth__intro { display: flex; flex-direction: column; justify-content: space-between; min-height: 100vh; padding: clamp(2rem, 6vw, 5rem); color: rgb(255 255 255 / 72%); background: radial-gradient(circle at 75% 25%, rgb(30 132 191 / 28%), transparent 35%), var(--navy); }
.portal-auth__intro > div { max-width: 38rem; padding-block: 4rem; }
.portal-auth__intro h1 { max-width: 11ch; font-size: clamp(3rem, 6vw, 5rem); }
.portal-auth__intro .eyebrow { color: var(--cyan); }
.portal-auth__intro p:last-child { max-width: 34rem; font-size: 1.15rem; }
.portal-auth__panel { display: grid; padding: 2rem; background: var(--surface); place-items: center; }
.portal-auth__form-wrap { width: min(100%, 30rem); padding: clamp(2rem, 5vw, 3.5rem); background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }
.portal-kicker { margin-bottom: .5rem; color: var(--blue); font-size: .76rem; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; }
.portal-auth__form-wrap h2 { margin-bottom: .75rem; font-size: clamp(2.25rem, 5vw, 3.25rem); }
.portal-auth__lead { margin-bottom: 2rem; color: var(--muted); }
.portal-launch-note { display: grid; gap: .25rem; margin-bottom: 1.75rem; padding: 1rem; color: var(--ink); background: var(--surface); border-left: 3px solid var(--cyan); font-size: .85rem; }
.portal-launch-note span { color: var(--muted); }
.portal-form { display: grid; gap: 1.25rem; }
.portal-form > label { display: grid; gap: .45rem; color: var(--ink); font-size: .9rem; font-weight: 750; }
.portal-form input[type="email"], .portal-form input[type="password"] { width: 100%; min-height: 3.2rem; padding: .75rem .9rem; color: var(--ink); background: var(--white); border: 1px solid #bccdd4; border-radius: .6rem; font: inherit; }
.portal-form input:focus { border-color: var(--blue); outline: 3px solid rgb(71 178 215 / 22%); outline-offset: 1px; }
.portal-form__row { display: flex; gap: 1rem; align-items: center; justify-content: space-between; }
.portal-check { display: inline-flex; gap: .55rem; align-items: center; color: var(--muted); font-size: .86rem; }
.portal-check input { width: 1rem; height: 1rem; accent-color: var(--blue); }
.portal-link-button { padding: 0; color: var(--blue); background: none; border: 0; font: inherit; font-size: .86rem; font-weight: 750; cursor: pointer; }
.portal-form__submit { width: 100%; margin-top: .25rem; }
.portal-form__status { min-height: 1.5rem; margin: 0; color: var(--blue); font-size: .88rem; font-weight: 700; }
.portal-auth__help { margin: 1.5rem 0 0; color: var(--muted); font-size: .88rem; text-align: center; }
.portal-auth__help a { color: var(--blue); font-weight: 750; }
.portal-app-body { min-height: 100vh; overflow-x: hidden; background: var(--surface); }
.portal-preview-banner { position: sticky; z-index: 30; top: 0; padding: .5rem 1rem; color: var(--navy); background: var(--cyan); font-size: .78rem; font-weight: 800; text-align: center; }
.portal-shell { display: grid; grid-template-columns: 17rem minmax(0, 1fr); min-height: 100vh; }
.portal-sidebar { position: sticky; top: 0; display: flex; min-width: 0; flex-direction: column; height: 100vh; padding: 2rem 1.5rem; color: rgb(255 255 255 / 70%); background: var(--navy); }
.portal-nav { display: grid; min-width: 0; max-width: 100%; gap: .35rem; margin-top: 4rem; }
.portal-nav a { padding: .8rem 1rem; border-radius: .55rem; font-size: .92rem; font-weight: 700; }
.portal-nav a:hover, .portal-nav a:focus-visible, .portal-nav a.is-active { color: var(--white); background: rgb(255 255 255 / 9%); }
.portal-sidebar__back { margin-top: auto; padding: .8rem 1rem; font-size: .86rem; font-weight: 700; }
.portal-main { width: min(100%, 92rem); min-width: 0; padding: clamp(1.5rem, 4vw, 3.5rem); }
.portal-topbar { display: flex; gap: 2rem; align-items: center; justify-content: space-between; padding-bottom: 2rem; border-bottom: 1px solid var(--line); }
.portal-topbar h1 { margin: 0; color: var(--navy); font-size: clamp(2rem, 4vw, 3.25rem); }
.portal-account-button { display: inline-flex; gap: .7rem; align-items: center; padding: .45rem .75rem .45rem .45rem; color: var(--ink); background: var(--white); border: 1px solid var(--line); border-radius: 2rem; font: inherit; font-size: .84rem; font-weight: 750; cursor: pointer; }
.portal-account-button > span:first-child { display: grid; width: 2.2rem; height: 2.2rem; color: var(--white); background: var(--blue); border-radius: 50%; font-size: .72rem; place-items: center; }
.portal-dashboard-section { padding-top: clamp(3rem, 6vw, 5rem); scroll-margin-top: 3rem; }
.portal-section-heading { display: flex; gap: 2rem; align-items: end; justify-content: space-between; margin-bottom: 1.75rem; }
.portal-section-heading h2 { margin: 0; font-size: clamp(2rem, 4vw, 3rem); }
.portal-summary-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1rem; }
.portal-summary-grid article { min-width: 0; padding: 1.5rem; background: var(--white); border: 1px solid var(--line); border-radius: 1rem; }
.portal-summary-grid span { display: block; margin-bottom: 1.5rem; color: var(--muted); font-size: .82rem; font-weight: 700; }
.portal-summary-grid strong { display: block; overflow: hidden; color: var(--navy); font-size: clamp(1.25rem, 2.5vw, 2rem); text-overflow: ellipsis; white-space: nowrap; }
.portal-subscriptions { display: grid; gap: 1rem; }
.portal-subscription-card { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 1.25rem; align-items: center; padding: 1.5rem; background: var(--white); border: 1px solid var(--line); border-radius: 1rem; }
.portal-subscription-card img { width: 3.5rem; height: 3.5rem; padding: .45rem; object-fit: contain; background: var(--surface); border-radius: .8rem; }
.portal-subscription-card h3 { margin-bottom: .35rem; font-size: 1.3rem; }
.portal-subscription-card p { margin: 0; color: var(--muted); font-size: .88rem; }
.portal-subscription-card__status { padding: .35rem .7rem; color: #157347; background: #e8f6ee; border-radius: 2rem; font-size: .75rem; font-weight: 800; }
.portal-secondary-button { display: inline-flex; min-height: 2.7rem; padding: .55rem 1rem; color: var(--muted); background: var(--white); border: 1px solid var(--line); border-radius: .55rem; font-size: .84rem; font-weight: 750; align-items: center; }
.portal-table-wrap { width: 100%; min-width: 0; max-width: 100%; overflow-x: auto; background: var(--white); border: 1px solid var(--line); border-radius: 1rem; contain: inline-size; }
.portal-table-wrap table { width: 100%; border-collapse: collapse; text-align: left; }
.portal-table-wrap th, .portal-table-wrap td { padding: 1rem 1.25rem; border-bottom: 1px solid var(--line); white-space: nowrap; }
.portal-table-wrap th { color: var(--muted); font-size: .76rem; letter-spacing: .04em; text-transform: uppercase; }
.portal-table-wrap td { color: var(--ink); font-size: .88rem; }
.portal-table-wrap tbody tr:last-child td { border-bottom: 0; }
.portal-table-wrap a { color: var(--blue); font-weight: 750; }
.portal-support { display: flex; gap: 3rem; align-items: center; justify-content: space-between; margin-top: clamp(3rem, 7vw, 6rem); padding: clamp(2rem, 5vw, 3.5rem); color: rgb(255 255 255 / 72%); background: var(--navy); border-radius: var(--radius); }
.portal-support h2 { max-width: 18ch; color: var(--white); font-size: clamp(2rem, 4vw, 3rem); }
.portal-support p:last-child { margin-bottom: 0; }
.portal-noscript { margin: 2rem; padding: 1rem; color: var(--navy); background: var(--white); border: 1px solid var(--line); }

@media (max-width: 60rem) {
  .portal-auth { grid-template-columns: 1fr; }
  .portal-auth__intro { min-height: auto; }
  .portal-auth__intro > div { padding-block: 5rem; }
  .portal-shell { grid-template-columns: 1fr; }
  .portal-sidebar { position: static; height: auto; padding: 1.25rem; }
  .portal-nav { display: flex; margin-top: 1.5rem; overflow-x: auto; }
  .portal-sidebar__back { display: none; }
}

@media (max-width: 42rem) {
  .portal-auth { display: block; }
  .portal-auth__intro { min-height: auto; padding: 1.5rem; }
  .portal-auth__intro > div { padding-block: 4rem; }
  .portal-auth__intro h1 { font-size: 2.75rem; white-space: normal; }
  .portal-auth__intro > .text-link { display: none; }
  .portal-auth__panel { padding: 1rem; }
  .portal-auth__form-wrap { padding: 1.5rem; }
  .portal-form__row, .portal-topbar, .portal-section-heading, .portal-support { align-items: flex-start; flex-direction: column; }
  .portal-summary-grid { grid-template-columns: 1fr; }
  .portal-subscription-card { grid-template-columns: auto minmax(0, 1fr); }
  .portal-subscription-card__status { grid-column: 2; justify-self: start; }
}
