:root {
  --portal-sidebar: 274px;
  --portal-topbar: 74px;
}

.portal-body {
  min-height: 100svh;
  background: var(--surface-soft);
}

.portal-sidebar {
  position: fixed;
  z-index: 1100;
  inset: 0 auto 0 0;
  display: flex;
  width: var(--portal-sidebar);
  flex-direction: column;
  padding: 28px 22px 24px;
  border-right: 1px solid var(--line);
  background: color-mix(in srgb, var(--surface) 94%, transparent);
  box-shadow: 20px 0 60px rgba(0, 0, 0, .035);
  -webkit-backdrop-filter: blur(20px);
  backdrop-filter: blur(20px);
}

.portal-brand-row {
  display: flex;
  min-height: 42px;
  align-items: center;
  justify-content: space-between;
}

.portal-brand {
  display: inline-flex;
  align-items: center;
}

.portal-brand img {
  width: 113px;
  height: auto;
}

html[data-theme="light"] .portal-brand .brand-dark,
html[data-theme="light"] .purchase-intro-card .brand-dark {
  display: block;
}

html[data-theme="light"] .portal-brand .brand-light,
html[data-theme="light"] .purchase-intro-card .brand-light {
  display: none;
}

.portal-sidebar-close {
  display: none;
  width: 38px;
  height: 38px;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: transparent;
  color: var(--text);
}

.portal-sidebar-close svg {
  width: 16px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-width: 1.6;
}

.portal-product-label {
  margin: 14px 0 38px;
  color: var(--text-soft);
  font-size: 9px;
  font-weight: 800;
  letter-spacing: .16em;
  text-transform: uppercase;
}

.portal-navigation {
  display: grid;
  gap: 5px;
}

.portal-navigation a {
  position: relative;
  display: grid;
  min-height: 53px;
  align-items: center;
  gap: 11px;
  padding: 0 13px;
  border: 1px solid transparent;
  border-radius: 13px;
  color: var(--text-soft);
  grid-template-columns: 20px 1fr auto;
  transition: color 250ms ease, background-color 250ms ease, border-color 250ms ease, transform 300ms var(--ease-out);
}

.portal-navigation a:hover {
  color: var(--text);
  transform: translateX(4px);
}

.portal-navigation a.is-active {
  border-color: color-mix(in srgb, var(--blue) 25%, var(--line));
  background: color-mix(in srgb, var(--blue) 11%, var(--surface));
  color: var(--text);
}

.portal-navigation a.is-active::before {
  position: absolute;
  top: 50%;
  left: -23px;
  width: 3px;
  height: 24px;
  border-radius: 0 3px 3px 0;
  background: var(--blue);
  box-shadow: 0 0 18px rgba(70, 91, 255, .7);
  content: "";
  transform: translateY(-50%);
}

.portal-navigation svg {
  width: 19px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.55;
}

.portal-navigation span {
  font-size: 11px;
  font-weight: 750;
}

.portal-navigation small {
  color: var(--text-soft);
  font-size: 8px;
  font-weight: 800;
  letter-spacing: .12em;
}

.portal-sidebar-bottom {
  display: grid;
  gap: 12px;
  margin-top: auto;
  padding-top: 24px;
  border-top: 1px solid var(--line);
}

.portal-return,
.portal-exit {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 6px;
  background: transparent;
  color: var(--text-soft);
  font-size: 10px;
  font-weight: 700;
  text-align: left;
  transition: color 200ms ease;
}

.portal-return {
  justify-content: flex-start;
}

.portal-return:hover,
.portal-exit:hover {
  color: var(--text);
}

.portal-return svg {
  width: 17px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.6;
}

.portal-overlay {
  position: fixed;
  z-index: 1050;
  inset: 0;
  background: rgba(2, 4, 10, .65);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
}

.portal-layout {
  min-height: 100svh;
  margin-left: var(--portal-sidebar);
}

.portal-topbar {
  position: sticky;
  z-index: 900;
  top: 0;
  display: flex;
  height: var(--portal-topbar);
  align-items: center;
  justify-content: space-between;
  padding: 0 clamp(22px, 4vw, 66px);
  border-bottom: 1px solid var(--line);
  background: color-mix(in srgb, var(--surface-soft) 86%, transparent);
  -webkit-backdrop-filter: blur(18px) saturate(130%);
  backdrop-filter: blur(18px) saturate(130%);
}

.portal-status {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  color: var(--text-soft);
  font-size: 9px;
  font-weight: 800;
  letter-spacing: .11em;
  text-transform: uppercase;
}

.portal-status i {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--amber);
  box-shadow: 0 0 0 4px rgba(245, 165, 68, .1), 0 0 14px rgba(245, 165, 68, .6);
}

.portal-top-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.portal-topbar .round-control {
  border-color: var(--line);
  background: color-mix(in srgb, var(--surface) 65%, transparent);
  color: var(--text);
}

.portal-avatar {
  display: flex;
  height: 45px;
  align-items: center;
  gap: 10px;
  margin-left: 6px;
  padding-left: 7px;
  padding-right: 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: color-mix(in srgb, var(--surface) 70%, transparent);
}

.portal-avatar img {
  width: 31px;
  height: 31px;
  padding: 7px;
  border-radius: 50%;
  background: linear-gradient(145deg, var(--violet), var(--blue));
  object-fit: contain;
}

.portal-avatar b,
.portal-avatar small {
  display: block;
  line-height: 1.1;
}

.portal-avatar b {
  font-size: 9px;
}

.portal-avatar small {
  margin-top: 3px;
  color: var(--text-soft);
  font-size: 7px;
  font-weight: 800;
  letter-spacing: .1em;
}

.portal-menu-button {
  display: none;
  width: 42px;
  height: 42px;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 4px;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: var(--surface);
}

.portal-menu-button span {
  width: 17px;
  height: 1.5px;
  background: var(--text);
}

.portal-main {
  width: min(calc(100% - 8vw), 1420px);
  margin-inline: auto;
  padding-block: clamp(30px, 4vw, 60px) 90px;
}

.portal-notice {
  display: grid;
  align-items: center;
  gap: 14px;
  margin-bottom: clamp(35px, 4vw, 60px);
  padding: 15px 17px;
  border: 1px solid color-mix(in srgb, var(--amber) 24%, var(--line));
  border-radius: 15px;
  background: color-mix(in srgb, var(--amber) 7%, var(--surface));
  color: var(--text-soft);
  grid-template-columns: 21px 1fr auto;
}

.portal-notice > svg {
  width: 20px;
  fill: none;
  stroke: var(--amber);
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.5;
}

.portal-notice p {
  margin: 0;
  font-size: 10px;
  line-height: 1.55;
}

.portal-notice button {
  display: grid;
  width: 28px;
  height: 28px;
  place-items: center;
  border-radius: 50%;
  background: transparent;
  color: var(--text-soft);
}

.portal-notice button:hover {
  background: color-mix(in srgb, var(--amber) 12%, transparent);
}

.portal-notice button svg {
  width: 14px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-width: 1.6;
}

.portal-view {
  animation: portal-view-in 550ms var(--ease-out) both;
}

@keyframes portal-view-in {
  from { opacity: 0; transform: translateY(18px); }
  to { opacity: 1; transform: none; }
}

.portal-page-header {
  display: grid;
  align-items: end;
  gap: clamp(35px, 7vw, 100px);
  margin-bottom: clamp(38px, 5vw, 70px);
  grid-template-columns: minmax(0, 1.2fr) minmax(280px, .55fr);
}

.portal-page-header .eyebrow {
  margin-bottom: 15px;
}

.portal-page-header h1 {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(48px, 6vw, 90px);
  font-weight: 600;
  letter-spacing: -.07em;
  line-height: .9;
}

.portal-page-header > p {
  margin: 0;
  color: var(--text-soft);
  font-size: 14px;
  line-height: 1.7;
}

.portal-metrics {
  display: grid;
  gap: 16px;
  grid-template-columns: repeat(3, 1fr);
}

.portal-metric-card {
  position: relative;
  min-height: 195px;
  overflow: hidden;
  padding: 27px;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: var(--surface);
  box-shadow: 0 18px 55px rgba(0, 0, 0, .04);
}

.portal-metric-card::before {
  position: absolute;
  top: 25px;
  right: 25px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--blue-bright);
  box-shadow: 0 0 16px rgba(70, 91, 255, .5);
  content: "";
}

.metric-violet-card::before { background: #a173ff; }
.metric-amber-card::before { background: var(--amber); }

.metric-label {
  display: block;
  color: var(--text-soft);
  font-size: 9px;
  font-weight: 800;
  letter-spacing: .12em;
  text-transform: uppercase;
}

.portal-metric-card strong {
  display: block;
  margin-top: 15px;
  font-family: var(--font-display);
  font-size: 62px;
  font-weight: 600;
  letter-spacing: -.07em;
  line-height: 1;
}

.portal-metric-card small {
  color: var(--text-soft);
  font-size: 9px;
}

.portal-metric-card > svg {
  position: absolute;
  right: 15px;
  bottom: 17px;
  width: 105px;
  fill: none;
  stroke: var(--blue-bright);
  stroke-width: 2;
  opacity: .45;
}

.metric-violet-card > svg { stroke: #a173ff; }
.metric-amber-card > svg { stroke: var(--amber); }

.portal-quick-actions {
  display: grid;
  overflow: hidden;
  margin-top: 16px;
  border: 1px solid var(--line);
  border-radius: 19px;
  background: var(--surface);
  grid-template-columns: repeat(3, 1fr);
}

.portal-quick-actions a {
  display: grid;
  min-height: 82px;
  align-items: center;
  gap: 13px;
  padding: 0 23px;
  border-right: 1px solid var(--line);
  color: var(--text-soft);
  grid-template-columns: auto 1fr auto;
  transition: background-color 250ms ease, color 250ms ease;
}

.portal-quick-actions a:last-child {
  border-right: 0;
}

.portal-quick-actions a:hover {
  background: color-mix(in srgb, var(--blue) 8%, var(--surface));
  color: var(--text);
}

.portal-quick-actions span {
  font-size: 8px;
  font-weight: 800;
  letter-spacing: .12em;
}

.portal-quick-actions b {
  font-size: 11px;
}

.portal-quick-actions i {
  font-style: normal;
}

.portal-panel {
  border: 1px solid var(--line);
  border-radius: 23px;
  background: var(--surface);
  box-shadow: 0 20px 70px rgba(0, 0, 0, .045);
}

.recent-orders {
  margin-top: 32px;
  overflow: hidden;
}

.portal-panel-heading {
  display: flex;
  min-height: 74px;
  align-items: center;
  justify-content: space-between;
  gap: 22px;
  padding: 0 28px;
  border-bottom: 1px solid var(--line);
}

.portal-panel-heading h2 {
  margin: 0;
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 600;
  letter-spacing: -.04em;
}

.portal-panel-heading a,
.portal-panel-heading > span {
  color: var(--text-soft);
  font-size: 8px;
  font-weight: 800;
  letter-spacing: .1em;
  text-transform: uppercase;
}

.portal-panel-heading a:hover {
  color: var(--blue-bright);
}

.portal-table-wrap {
  width: 100%;
  overflow-x: auto;
}

.portal-table {
  width: 100%;
  border-collapse: collapse;
}

.portal-table th {
  height: 52px;
  padding: 0 24px;
  border-bottom: 1px solid var(--line);
  color: var(--text-soft);
  font-size: 8px;
  font-weight: 800;
  letter-spacing: .1em;
  text-align: left;
  text-transform: uppercase;
  white-space: nowrap;
}

.portal-table td {
  padding: 20px 24px;
  border-bottom: 1px solid var(--line);
  font-size: 11px;
}

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

.empty-table-row td {
  height: 245px;
  color: var(--text-soft);
  text-align: center;
}

.empty-table-row h2 {
  margin: 17px 0 7px;
  color: var(--text);
  font-family: var(--font-display);
  font-size: 28px;
  font-weight: 600;
  letter-spacing: -.04em;
}

.empty-table-row p {
  max-width: 560px;
  margin: 0 auto;
  font-size: 10px;
  line-height: 1.6;
}

.empty-table-row .button {
  margin-top: 24px;
}

.empty-orbit {
  position: relative;
  display: inline-grid;
  width: 58px;
  height: 58px;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 50%;
}

.empty-orbit::before {
  position: absolute;
  inset: 9px;
  border: 1px solid var(--line);
  border-radius: 50%;
  content: "";
}

.empty-orbit i {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--amber);
  box-shadow: 0 0 12px var(--amber);
}

/* Licences */
.license-layout {
  display: grid;
  gap: 18px;
  grid-template-columns: minmax(400px, 1.1fr) minmax(350px, .9fr);
}

.license-empty {
  display: flex;
  min-height: 520px;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  padding: 50px;
  text-align: center;
}

.license-key-art {
  position: relative;
  display: flex;
  width: min(100%, 330px);
  height: 130px;
  align-items: center;
  justify-content: center;
  gap: 14px;
  margin-bottom: 45px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: linear-gradient(135deg, color-mix(in srgb, var(--blue) 12%, var(--surface)), var(--surface));
  box-shadow: 0 24px 60px rgba(0, 0, 0, .08);
  transform: rotate(-3deg);
}

.license-key-art::before {
  position: absolute;
  top: 16px;
  left: 17px;
  width: 31px;
  height: 9px;
  border-radius: 3px;
  background: linear-gradient(90deg, var(--violet), var(--blue));
  content: "";
}

.license-key-art span {
  width: 50px;
  height: 7px;
  border-radius: 999px;
  background: var(--line-strong);
}

.license-key-art i {
  position: absolute;
  right: 17px;
  bottom: 15px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--amber);
  box-shadow: 0 0 13px var(--amber);
}

.license-empty h2 {
  margin: 0 0 13px;
  font-family: var(--font-display);
  font-size: 35px;
  font-weight: 600;
  letter-spacing: -.055em;
}

.license-empty > p {
  max-width: 530px;
  margin: 0 0 29px;
  color: var(--text-soft);
  font-size: 12px;
  line-height: 1.7;
}

.license-anatomy {
  min-height: 520px;
  padding: clamp(35px, 4vw, 55px);
  border-radius: 23px;
  background: #080b13;
  color: #fff;
}

.license-anatomy .eyebrow {
  margin-bottom: 48px;
}

.license-anatomy dl {
  margin: 0 0 45px;
}

.license-anatomy dl div {
  padding: 19px 0;
  border-bottom: 1px solid rgba(255, 255, 255, .12);
}

.license-anatomy dt {
  margin-bottom: 7px;
  color: rgba(255, 255, 255, .4);
  font-size: 8px;
  font-weight: 800;
  letter-spacing: .11em;
  text-transform: uppercase;
}

.license-anatomy dd {
  margin: 0;
  font-size: 12px;
  font-weight: 650;
}

.status-chip {
  display: inline-flex;
  min-width: 45px;
  min-height: 21px;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(255, 255, 255, .15);
  border-radius: 999px;
}

.license-anatomy .button-ghost {
  border-color: rgba(255, 255, 255, .18);
  background: rgba(255, 255, 255, .05);
  color: #fff;
}

.orders-panel {
  overflow: hidden;
}

.orders-panel .empty-table-row td {
  height: 420px;
}

/* Purchase */
.purchase-showcase {
  display: grid;
  min-height: 600px;
  overflow: hidden;
  margin-bottom: 24px;
  border: 1px solid var(--line);
  border-radius: 25px;
  background: var(--surface);
  grid-template-columns: minmax(0, 1.5fr) minmax(340px, .5fr);
}

.purchase-carousel {
  position: relative;
  display: grid;
  overflow: hidden;
  place-items: center;
  border-right: 1px solid var(--line);
  background: radial-gradient(circle at 50% 45%, rgba(70, 91, 255, .15), transparent 56%), var(--surface-soft);
}

.purchase-carousel figure {
  width: 100%;
  height: 100%;
  margin: 0;
  animation: purchase-slide-in 500ms var(--ease-out) both;
}

.purchase-carousel img {
  width: 100%;
  height: 100%;
  padding: clamp(25px, 4vw, 60px);
  object-fit: contain;
  filter: drop-shadow(0 28px 40px rgba(0, 0, 0, .25));
}

@keyframes purchase-slide-in {
  from { opacity: 0; transform: scale(.97); }
  to { opacity: 1; transform: none; }
}

.purchase-carousel-controls {
  position: absolute;
  right: 22px;
  bottom: 21px;
  left: 22px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.purchase-carousel-controls > button {
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: var(--surface);
  color: var(--text);
}

.purchase-carousel-controls > span {
  display: flex;
  gap: 6px;
}

.purchase-carousel-controls .carousel-dot {
  display: block;
  width: 15px;
  height: 3px;
  min-height: 3px;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: var(--line-strong);
  transition: width 220ms ease, background-color 220ms ease;
}

.purchase-carousel-controls .carousel-dot.is-active {
  width: 30px;
  background: var(--blue);
}

.purchase-intro-card {
  display: flex;
  justify-content: center;
  flex-direction: column;
  padding: clamp(35px, 4vw, 60px);
}

.purchase-intro-card > img {
  width: 125px;
  height: auto;
  margin-bottom: 38px;
}

.purchase-intro-card > p {
  margin: 0 0 28px;
  color: var(--text-soft);
  font-size: 13px;
  line-height: 1.7;
}

.purchase-intro-card ul {
  display: grid;
  gap: 13px;
  margin: 0;
  padding: 24px 0 0;
  border-top: 1px solid var(--line);
  color: var(--text-soft);
  font-size: 10px;
  list-style: none;
}

.purchase-intro-card li::before {
  margin-right: 9px;
  color: var(--blue-bright);
  content: "✓";
}

.portal-purchase-grid {
  display: grid;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: var(--surface);
  grid-template-columns: repeat(2, 1fr);
}

.portal-purchase-grid article {
  display: flex;
  min-height: 395px;
  flex-direction: column;
  padding: clamp(30px, 3.5vw, 48px);
  border-right: 1px solid var(--line);
}

.portal-purchase-grid article:last-child {
  border-right: 0;
}

.portal-purchase-grid article.is-featured {
  background: linear-gradient(145deg, #465bff, #2739a7);
  color: #fff;
}

.portal-purchase-grid h2 {
  margin: 55px 0 25px;
  font-family: var(--font-display);
  font-size: clamp(30px, 3vw, 43px);
  font-weight: 600;
  letter-spacing: -.055em;
  line-height: .95;
}

.legacy-price {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 6px 12px;
  margin: 0 0 35px;
}

.legacy-price s {
  color: var(--text-soft);
  font-size: 13px;
}

.legacy-price strong {
  font-family: var(--font-display);
  font-size: 48px;
  font-weight: 600;
  letter-spacing: -.06em;
}

.legacy-price small {
  color: var(--text-soft);
  font-size: 9px;
  font-weight: 700;
  text-transform: uppercase;
}

.is-featured .legacy-price small,
.is-featured .plan-number {
  color: rgba(255, 255, 255, .65);
}

.portal-purchase-grid .button {
  width: 100%;
  margin-top: auto;
}

.is-featured .button-primary {
  background: #fff;
  color: var(--ink);
}

.purchase-footnote {
  display: flex;
  min-height: 75px;
  align-items: center;
  gap: 26px;
  padding: 15px 5px;
  color: var(--text-soft);
  font-size: 9px;
}

.purchase-footnote p {
  margin: 0 auto 0 0;
}

.purchase-footnote > a {
  color: var(--text);
  font-weight: 750;
}

.payment-marks {
  display: flex;
  align-items: center;
  gap: 5px;
}

.payment-marks img {
  width: 39px;
  height: auto;
  border-radius: 4px;
  filter: saturate(.75);
}

/* Account */
.account-grid {
  display: grid;
  align-items: start;
  gap: 18px;
  grid-template-columns: minmax(0, 1.3fr) minmax(350px, .7fr);
}

.portal-form {
  padding-bottom: 32px;
}

.portal-form > :not(.portal-panel-heading) {
  margin-right: 30px;
  margin-left: 30px;
}

.portal-field-grid {
  display: grid;
  gap: 0 18px;
  padding-top: 31px;
  grid-template-columns: repeat(2, 1fr);
}

.portal-field-span {
  grid-column: 1 / -1;
}

.portal-form label {
  margin-bottom: 24px;
}

.portal-form label > span {
  color: var(--text-soft);
}

.portal-form input,
.portal-form select,
.referral-copy input {
  height: 46px;
  border-bottom-color: var(--line-strong);
  color: var(--text);
}

.portal-form input::placeholder {
  color: color-mix(in srgb, var(--text-soft) 55%, transparent);
}

.portal-form select {
  appearance: none;
  background-image: linear-gradient(45deg, transparent 50%, var(--text-soft) 50%), linear-gradient(135deg, var(--text-soft) 50%, transparent 50%);
  background-position: calc(100% - 14px) 20px, calc(100% - 9px) 20px;
  background-repeat: no-repeat;
  background-size: 5px 5px, 5px 5px;
}

.portal-form option {
  background: var(--surface);
  color: var(--text);
}

.portal-form > .button {
  width: calc(100% - 60px);
}

.account-security {
  grid-column: 2;
}

.portal-form-note {
  margin-top: 25px;
  color: var(--text-soft);
  font-size: 10px;
  line-height: 1.55;
}

.account-referral,
.account-referrals {
  overflow: hidden;
}

.account-referral {
  padding-bottom: 28px;
}

.account-referral > p {
  margin: 25px 29px 20px;
  color: var(--text-soft);
  font-size: 11px;
  line-height: 1.6;
}

.referral-copy {
  display: grid;
  gap: 10px;
  margin: 0 29px;
  grid-template-columns: 1fr auto;
}

.referral-copy input {
  width: 100%;
  padding: 0 13px;
  border: 1px solid var(--line);
  border-radius: 11px;
  outline: 0;
  background: var(--surface-soft);
  font-size: 10px;
}

.referral-copy button {
  padding: 0 16px;
  border-radius: 11px;
  background: var(--text);
  color: var(--page);
  font-size: 9px;
  font-weight: 800;
}

.account-referrals {
  grid-column: 1 / -1;
}

.account-referrals .empty-table-row td {
  height: 140px;
}

.portal-footer {
  display: flex;
  min-height: 78px;
  align-items: center;
  gap: 30px;
  padding: 0 4vw;
  border-top: 1px solid var(--line);
  color: var(--text-soft);
  font-size: 8px;
}

.portal-footer p {
  margin: 0 auto 0 0;
}

.portal-footer a:hover {
  color: var(--text);
}

@media (max-width: 1180px) {
  :root {
    --portal-sidebar: 245px;
  }

  .portal-main {
    width: calc(100% - 50px);
  }

  .portal-page-header {
    display: block;
  }

  .portal-page-header > p {
    max-width: 620px;
    margin-top: 24px;
  }

  .purchase-showcase {
    grid-template-columns: 1fr;
  }

  .purchase-carousel {
    min-height: 570px;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .purchase-intro-card {
    min-height: 350px;
  }

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

  .account-security {
    grid-column: auto;
  }
}

@media (max-width: 980px) {
  :root {
    --portal-sidebar: 290px;
  }

  .portal-sidebar {
    transform: translateX(-105%);
    transition: transform 450ms var(--ease-out);
  }

  .portal-sidebar.is-open {
    transform: none;
  }

  .portal-sidebar-close,
  .portal-menu-button {
    display: grid;
  }

  .portal-layout {
    margin-left: 0;
  }

  .portal-topbar {
    padding: 0 25px;
  }

  .portal-menu-button {
    display: flex;
  }

  .portal-status {
    margin-right: auto;
    margin-left: 13px;
  }

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

  .portal-metric-card {
    min-height: 165px;
  }

  .portal-quick-actions {
    grid-template-columns: 1fr;
  }

  .portal-quick-actions a {
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .portal-quick-actions a:last-child {
    border-bottom: 0;
  }

  .license-layout {
    grid-template-columns: 1fr;
  }

  .portal-purchase-grid {
    grid-template-columns: 1fr;
  }

  .portal-purchase-grid article {
    min-height: 330px;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .portal-purchase-grid article:last-child {
    border-bottom: 0;
  }
}

@media (max-width: 680px) {
  :root {
    --portal-topbar: 66px;
  }

  .portal-main {
    width: calc(100% - 28px);
    padding-top: 25px;
  }

  .portal-topbar {
    padding: 0 14px;
  }

  .portal-status span {
    display: none;
  }

  .portal-avatar {
    width: 42px;
    justify-content: center;
    padding: 0;
    border: 0;
    background: transparent;
  }

  .portal-avatar > span {
    display: none;
  }

  .portal-page-header h1 {
    font-size: clamp(48px, 16vw, 72px);
  }

  .portal-notice {
    align-items: start;
  }

  .portal-panel-heading {
    min-height: 65px;
    padding: 0 20px;
  }

  .portal-metric-card {
    padding: 23px;
  }

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

  .empty-table-row td {
    position: sticky;
    left: 0;
    width: calc(100vw - 28px);
  }

  .license-empty {
    min-height: 470px;
    padding: 30px 22px;
  }

  .license-anatomy {
    min-height: 470px;
  }

  .purchase-carousel {
    min-height: 410px;
  }

  .purchase-carousel img {
    padding: 15px;
  }

  .purchase-intro-card {
    min-height: 360px;
    padding: 35px 25px;
  }

  .purchase-footnote {
    align-items: flex-start;
    flex-direction: column;
    gap: 13px;
  }

  .payment-marks {
    flex-wrap: wrap;
  }

  .portal-field-grid {
    grid-template-columns: 1fr;
  }

  .portal-field-span {
    grid-column: auto;
  }

  .portal-form > :not(.portal-panel-heading) {
    margin-right: 20px;
    margin-left: 20px;
  }

  .portal-form > .button {
    width: calc(100% - 40px);
  }

  .referral-copy {
    grid-template-columns: 1fr;
  }

  .referral-copy button {
    min-height: 42px;
  }

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

  .portal-footer p {
    margin: 0;
  }
}

@media (max-width: 410px) {
  .portal-topbar .language-toggle {
    display: none;
  }
}
