:root {
  color-scheme: dark;
  --bg: #050505;
  --panel: #0a0a0a;
  --panel-2: #0e0e0e;
  --panel-hover: #121212;
  --text: #f4f4f2;
  --muted: #9d9d98;
  --quiet: #6e6e69;
  --line: #252525;
  --line-strong: #464646;
  --white: #f3f3f0;
  --black: #060606;
  --green: #67d498;
  --red: #ff7c7c;
  --radius: 8px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --shadow: 0 28px 88px rgba(0, 0, 0, 0.55);
}

* {
  box-sizing: border-box;
}

html {
  min-width: 320px;
  background: var(--bg);
}

body {
  margin: 0;
  color: var(--text);
  font-family: "Segoe UI Variable Display", "Segoe UI Variable", "Segoe UI", Arial, sans-serif;
  font-size: 15px;
  line-height: 1.55;
  letter-spacing: 0;
  -webkit-font-smoothing: antialiased;
}

.portal-body {
  min-height: 100vh;
  background:
    linear-gradient(rgba(255, 255, 255, 0.016) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.016) 1px, transparent 1px),
    var(--bg);
  background-size: 64px 64px;
}

button,
input,
textarea {
  font: inherit;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

a {
  color: inherit;
  text-decoration: none;
}

img {
  display: block;
  max-width: 100%;
}

[hidden] {
  display: none !important;
}

:focus-visible {
  outline: 2px solid var(--white);
  outline-offset: 3px;
}

.portal-site-link {
  position: fixed;
  top: 20px;
  right: 24px;
  z-index: 30;
  display: inline-flex;
  align-items: center;
  min-height: 38px;
  padding: 0 13px;
  border: 1px solid var(--line);
  border-radius: 6px;
  color: var(--muted);
  background: rgba(7, 7, 7, 0.9);
  font-size: 12px;
  font-weight: 680;
  transition: color 160ms ease, border-color 160ms ease;
}

.portal-site-link:hover {
  color: var(--text);
  border-color: var(--line-strong);
}

.portal-shell {
  display: grid;
  grid-template-columns: minmax(300px, 0.72fr) minmax(560px, 1.45fr);
  width: min(calc(100% - 48px), 1440px);
  min-height: calc(100vh - 48px);
  margin: 24px auto;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
  box-shadow: var(--shadow);
}

.portal-side {
  position: relative;
  display: flex;
  min-width: 0;
  padding: 34px;
  flex-direction: column;
  border-right: 1px solid var(--line);
  background: #080808;
}

.portal-side::after {
  position: absolute;
  right: -1px;
  bottom: 0;
  left: 0;
  height: 36%;
  content: "";
  pointer-events: none;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.02) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.02) 1px, transparent 1px);
  background-size: 40px 40px;
  mask-image: linear-gradient(to bottom, transparent, #000);
}

.portal-side > * {
  position: relative;
  z-index: 1;
}

.portal-brand {
  display: inline-flex;
  align-items: center;
  width: max-content;
  gap: 14px;
}

.portal-brand-mark {
  display: grid;
  width: 58px;
  height: 52px;
  place-items: center;
}

.portal-brand img,
.portal-brand-mark img {
  width: 56px;
  height: 48px;
  object-fit: contain;
}

.portal-brand > span:last-child {
  display: grid;
  gap: 2px;
}

.portal-brand strong {
  font-size: 17px;
  font-weight: 760;
  line-height: 1.1;
}

.portal-brand small,
.portal-brand > span:last-child > span {
  color: var(--quiet);
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
}

.portal-side-copy {
  max-width: 360px;
  margin: auto 0;
  padding: 72px 0;
}

.eyebrow,
.release-kicker,
.profile-label {
  display: flex;
  align-items: center;
  gap: 9px;
  margin: 0;
  color: var(--muted);
  font-size: 10px;
  font-weight: 760;
  text-transform: uppercase;
}

.status-dot,
.portal-side-footer i {
  display: inline-block;
  width: 7px;
  height: 7px;
  flex: 0 0 auto;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 0 4px rgba(103, 212, 152, 0.1);
}

.portal-side-copy h1 {
  margin: 22px 0;
  font-size: 56px;
  font-weight: 650;
  line-height: 0.98;
}

.portal-side-copy > p:last-child {
  margin: 0;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.75;
}

.account-nav {
  display: grid;
  margin: 76px -14px auto;
  gap: 3px;
}

.account-nav > p {
  margin: 0 14px 12px;
  color: var(--quiet);
  font-size: 9px;
  font-weight: 760;
  text-transform: uppercase;
}

.account-nav button {
  position: relative;
  display: grid;
  grid-template-columns: 28px 1fr;
  align-items: center;
  width: 100%;
  min-height: 46px;
  padding: 0 14px;
  gap: 8px;
  border: 0;
  border-radius: 6px;
  color: var(--muted);
  background: transparent;
  cursor: pointer;
  text-align: left;
  font-size: 13px;
  font-weight: 680;
  transition: color 160ms ease, background 160ms ease;
}

.account-nav button span {
  color: var(--quiet);
  font-size: 9px;
}

.account-nav button::after {
  position: absolute;
  top: 11px;
  bottom: 11px;
  left: 0;
  width: 2px;
  content: "";
  background: var(--white);
  transform: scaleY(0);
  transition: transform 180ms var(--ease);
}

.account-nav button:hover {
  color: var(--text);
  background: rgba(255, 255, 255, 0.025);
}

.account-nav button.is-active {
  color: var(--text);
  background: rgba(255, 255, 255, 0.045);
}

.account-nav button.is-active::after {
  transform: scaleY(1);
}

.portal-side-footer {
  display: grid;
  padding-top: 24px;
  gap: 12px;
  border-top: 1px solid var(--line);
}

.portal-side-footer span,
.portal-side-footer a {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--quiet);
  font-size: 11px;
  font-weight: 650;
}

.portal-side-footer a {
  justify-content: space-between;
  transition: color 160ms ease;
}

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

.portal-main {
  display: grid;
  min-width: 0;
  min-height: 100%;
  padding: 70px clamp(34px, 5vw, 78px);
  place-items: center;
  background: var(--panel);
}

.auth-panel,
.account-panel {
  width: min(100%, 980px);
}

.auth-panel {
  max-width: 560px;
}

.auth-heading h2,
.account-intro h2,
.section-title-row h2 {
  margin: 16px 0 13px;
  font-size: 46px;
  font-weight: 650;
  line-height: 1.02;
}

.auth-heading > p:last-child,
.account-intro > div > p:last-child,
.section-title-row > div > p:last-child {
  max-width: 600px;
  margin: 0;
  color: var(--muted);
  line-height: 1.7;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  gap: 14px;
  padding: 0 18px;
  border: 1px solid var(--line-strong);
  border-radius: 6px;
  color: var(--text);
  background: transparent;
  cursor: pointer;
  font-size: 13px;
  font-weight: 720;
  transition: color 170ms ease, background 170ms ease, border-color 170ms ease, transform 170ms var(--ease), opacity 170ms ease;
}

.button:hover:not(:disabled) {
  border-color: #686864;
  background: rgba(255, 255, 255, 0.035);
  transform: translateY(-1px);
}

.button:active:not(:disabled) {
  transform: translateY(0);
}

.button:disabled {
  cursor: not-allowed;
  opacity: 0.4;
}

.button-light {
  color: var(--black);
  border-color: var(--white);
  background: var(--white);
}

.button-light:hover:not(:disabled) {
  border-color: #fff;
  background: #fff;
}

.button-ghost {
  color: var(--muted);
}

.button-secondary {
  color: var(--text);
  background: var(--panel-2);
}

.button-small {
  min-height: 38px;
  padding-inline: 13px;
  font-size: 11px;
}

.discord-login {
  display: grid;
  grid-template-columns: 42px 1fr auto;
  width: 100%;
  margin-top: 34px;
  padding: 12px 16px;
  text-align: left;
}

.discord-login > span:nth-child(2) {
  display: grid;
  gap: 2px;
}

.discord-login strong,
.discord-login small {
  display: block;
}

.discord-login small {
  color: var(--quiet);
  font-size: 11px;
  font-weight: 600;
}

.discord-mark {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border: 1px solid var(--line-strong);
  border-radius: 50%;
  font-size: 12px;
  font-weight: 800;
}

.auth-divider {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  margin: 28px 0;
  gap: 14px;
  color: var(--quiet);
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
}

.auth-divider::before,
.auth-divider::after {
  height: 1px;
  content: "";
  background: var(--line);
}

.form-stack {
  display: grid;
  gap: 14px;
}

.field {
  display: grid;
  gap: 8px;
}

.field > span {
  color: var(--muted);
  font-size: 10px;
  font-weight: 750;
}

.field input,
.field textarea {
  width: 100%;
  border: 1px solid var(--line-strong);
  border-radius: 6px;
  color: var(--text);
  background: #080808;
  outline: none;
  transition: border-color 160ms ease, background 160ms ease;
}

.field input {
  height: 52px;
  padding: 0 15px;
}

.field textarea {
  min-height: 180px;
  padding: 14px 15px;
  resize: vertical;
}

.field input::placeholder,
.field textarea::placeholder {
  color: #5e5e5a;
}

.field input:focus,
.field textarea:focus {
  border-color: #787873;
  background: #0b0b0b;
}

.form-message,
.diagnostic-message {
  min-height: 22px;
  margin: 12px 0 0;
  color: var(--muted);
  font-size: 12px;
}

.is-error,
.form-message.is-error {
  color: var(--red);
}

.is-success,
.form-message.is-success {
  color: var(--green);
}

.auth-trust {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin: 32px 0 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.auth-trust > div {
  padding: 14px 12px;
  border-left: 1px solid var(--line);
}

.auth-trust > div:first-child {
  padding-left: 0;
  border-left: 0;
}

.auth-trust dt {
  color: var(--quiet);
  font-size: 9px;
  font-weight: 720;
  text-transform: uppercase;
}

.auth-trust dd {
  margin: 3px 0 0;
  font-size: 10px;
  font-weight: 660;
}

.portal-shell.is-authenticated {
  grid-template-columns: 240px minmax(0, 1fr);
}

.portal-shell.is-authenticated .portal-main {
  padding: 34px clamp(28px, 4vw, 62px) 54px;
  place-items: stretch center;
}

.portal-shell.is-authenticated .account-panel {
  width: 100%;
}

.account-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 70px;
  margin-bottom: 42px;
  gap: 24px;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--line);
}

.profile-line,
.account-header-actions,
.profile-copy {
  display: flex;
  align-items: center;
}

.profile-line {
  gap: 12px;
}

.profile-copy {
  align-items: flex-start;
  flex-direction: column;
}

.profile-copy strong {
  font-size: 15px;
  font-weight: 740;
}

.profile-copy > span:last-child {
  color: var(--quiet);
  font-size: 10px;
}

.profile-avatar {
  display: grid;
  width: 42px;
  height: 42px;
  flex: 0 0 auto;
  overflow: hidden;
  place-items: center;
  border: 1px solid var(--line-strong);
  border-radius: 50%;
  background: var(--panel-2);
  font-size: 13px;
  font-weight: 760;
}

.profile-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.account-header-actions {
  gap: 10px;
}

.account-live {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  color: var(--muted);
  font-size: 10px;
  font-weight: 680;
}

.account-live .status-dot {
  width: 6px;
  height: 6px;
}

.account-mobile-nav {
  display: none;
}

.portal-section {
  width: 100%;
  animation: section-in 260ms var(--ease) both;
}

@keyframes section-in {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

.account-intro,
.section-title-row {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  margin-bottom: 34px;
  gap: 32px;
}

.account-intro h2,
.section-title-row h2 {
  font-size: 38px;
}

.release-mark {
  display: grid;
  min-width: 180px;
  padding-left: 22px;
  gap: 2px;
  border-left: 1px solid var(--line);
}

.release-mark span,
.release-mark small {
  color: var(--quiet);
  font-size: 9px;
  font-weight: 700;
  text-transform: uppercase;
}

.release-mark strong {
  font-size: 24px;
  font-weight: 680;
}

.account-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin-bottom: 16px;
  border: 1px solid var(--line);
  background: var(--panel-2);
}

.account-stat {
  display: grid;
  min-height: 112px;
  padding: 22px;
  align-content: center;
  border-left: 1px solid var(--line);
}

.account-stat:first-child {
  border-left: 0;
}

.account-stat > span {
  color: var(--quiet);
  font-size: 9px;
  font-weight: 720;
  text-transform: uppercase;
}

.account-stat strong {
  max-width: 100%;
  margin-top: 7px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 18px;
  font-weight: 700;
}

.account-stat small {
  margin-top: 2px;
  color: var(--quiet);
  font-size: 9px;
}

.overview-grid,
.device-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(250px, 0.65fr);
  gap: 16px;
}

.release-panel,
.quick-panel,
.license-vault,
.security-panel,
.customer-setup-list,
.setup-warning,
.support-actions,
.support-grid article,
.changelog-list {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel-2);
}

.release-panel {
  padding: 28px;
}

.release-primary {
  display: flex;
  min-height: 330px;
  flex-direction: column;
}

.release-copy header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 22px;
}

.release-copy header > div {
  display: grid;
  gap: 5px;
}

.release-copy header strong {
  font-size: 21px;
  font-weight: 710;
}

.release-date {
  color: var(--quiet);
  font-size: 10px;
  font-weight: 680;
}

.release-copy > p {
  max-width: 640px;
  margin: 22px 0 0;
  color: var(--muted);
  white-space: pre-line;
}

.download-row,
.reset-actions,
.support-actions {
  display: flex;
  align-items: center;
  margin-top: auto;
  gap: 10px;
}

.quick-panel {
  padding: 22px;
}

.quick-panel > button {
  position: relative;
  display: grid;
  width: 100%;
  padding: 16px 22px 16px 0;
  gap: 2px;
  border: 0;
  border-bottom: 1px solid var(--line);
  color: var(--text);
  background: transparent;
  cursor: pointer;
  text-align: left;
}

.quick-panel > button::after {
  position: absolute;
  top: 50%;
  right: 2px;
  content: "\2192";
  color: var(--quiet);
  transform: translateY(-50%);
}

.quick-panel > button:last-child {
  border-bottom: 0;
}

.quick-panel > button:hover span {
  color: #fff;
}

.quick-panel small {
  color: var(--quiet);
  font-size: 10px;
}

.license-count,
.setup-progress,
.changelog-current {
  display: inline-flex;
  align-items: center;
  min-height: 36px;
  padding: 0 12px;
  gap: 8px;
  border: 1px solid var(--line);
  border-radius: 6px;
  color: var(--muted);
  font-size: 10px;
  font-weight: 700;
}

.license-vault {
  padding: 24px;
}

.license-vault > header h3 {
  margin: 4px 0 0;
  font-size: 20px;
}

.license-list {
  display: grid;
  margin-top: 20px;
  gap: 10px;
}

.license-card {
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #090909;
  cursor: pointer;
  transition: border-color 160ms ease, background 160ms ease;
}

.license-card:hover {
  border-color: var(--line-strong);
}

.license-card.is-selected {
  border-color: #6d6d68;
  background: #0d0d0d;
}

.license-card.is-inactive {
  opacity: 0.56;
}

.license-card-top,
.license-key-line,
.license-card-details {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.license-status,
.license-source {
  color: var(--quiet);
  font-size: 9px;
  font-weight: 750;
  text-transform: uppercase;
}

.license-status.is-active {
  color: var(--green);
}

.license-key-line {
  margin-top: 14px;
}

.license-key-line code {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 13px;
}

.license-key-line > div {
  display: flex;
  gap: 5px;
}

.license-mini-action {
  min-height: 30px;
  padding: 0 9px;
  border: 1px solid var(--line);
  border-radius: 5px;
  color: var(--muted);
  background: transparent;
  cursor: pointer;
  font-size: 9px;
  font-weight: 700;
}

.license-mini-action:hover {
  color: var(--text);
  border-color: var(--line-strong);
}

.license-card-details {
  margin-top: 18px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
}

.license-card-details > span {
  display: grid;
  flex: 1;
  gap: 2px;
}

.license-card-details small {
  color: var(--quiet);
  font-size: 8px;
  font-weight: 700;
  text-transform: uppercase;
}

.license-card-details strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 11px;
}

.license-empty {
  margin: 20px 0 0;
  padding: 18px;
  color: var(--muted);
  border: 1px dashed var(--line-strong);
  font-size: 13px;
}

.information-strip {
  display: grid;
  grid-template-columns: 130px minmax(140px, 0.4fr) minmax(0, 1fr);
  align-items: center;
  margin-top: 14px;
  padding: 15px 18px;
  gap: 16px;
  border: 1px solid var(--line);
  background: #080808;
}

.information-strip span,
.information-strip small {
  color: var(--quiet);
  font-size: 9px;
}

.information-strip strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 11px;
}

.device-reset-panel {
  display: flex;
  min-height: 310px;
  flex-direction: column;
}

.device-reset-panel h3 {
  margin: 8px 0;
  font-size: 28px;
}

.device-reset-panel p {
  margin: 0;
  color: var(--muted);
}

.reset-actions {
  align-items: flex-start;
  flex-direction: column;
}

.security-panel {
  padding: 22px;
}

.security-panel ul {
  margin: 16px 0 0;
  padding: 0;
  list-style: none;
}

.security-panel li {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 0;
  gap: 16px;
  border-bottom: 1px solid var(--line);
}

.security-panel li:last-child {
  border-bottom: 0;
}

.security-panel li span {
  color: var(--muted);
  font-size: 11px;
}

.security-panel li strong {
  font-size: 10px;
  text-align: right;
}

.customer-setup-list {
  margin: 0;
  padding: 0 22px;
  list-style: none;
}

.customer-setup-list li + li {
  border-top: 1px solid var(--line);
}

.customer-setup-list button {
  display: grid;
  grid-template-columns: 42px 1fr 22px;
  align-items: center;
  width: 100%;
  min-height: 92px;
  padding: 14px 0;
  gap: 16px;
  border: 0;
  color: var(--text);
  background: transparent;
  cursor: pointer;
  text-align: left;
}

.customer-setup-list button > span {
  color: var(--quiet);
  font-size: 10px;
  font-weight: 760;
}

.customer-setup-list button > div {
  display: grid;
  gap: 3px;
}

.customer-setup-list button strong {
  font-size: 14px;
}

.customer-setup-list button p {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
}

.customer-setup-list button i {
  position: relative;
  width: 20px;
  height: 20px;
  border: 1px solid var(--line-strong);
  border-radius: 50%;
}

.customer-setup-list button[aria-pressed="true"] i {
  border-color: var(--white);
  background: var(--white);
}

.customer-setup-list button[aria-pressed="true"] i::after {
  position: absolute;
  top: 5px;
  left: 5px;
  width: 7px;
  height: 4px;
  content: "";
  border-bottom: 1px solid var(--black);
  border-left: 1px solid var(--black);
  transform: rotate(-45deg);
}

.customer-setup-list li.is-complete {
  opacity: 0.7;
}

.setup-warning {
  display: flex;
  margin-top: 14px;
  padding: 17px 20px;
  gap: 18px;
}

.setup-warning strong {
  flex: 0 0 auto;
}

.setup-warning p {
  margin: 0;
  color: var(--muted);
}

.support-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.support-grid article {
  min-height: 180px;
  padding: 22px;
}

.support-grid article > span {
  color: var(--quiet);
  font-size: 9px;
  font-weight: 760;
}

.support-grid h3 {
  margin: 24px 0 7px;
  font-size: 16px;
}

.support-grid p {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
}

.support-actions {
  margin-top: 14px;
  padding: 18px;
}

.changelog-list {
  position: relative;
  overflow: hidden;
}

.changelog-entry {
  display: grid;
  grid-template-columns: 90px minmax(0, 1fr);
  border-bottom: 1px solid var(--line);
}

.changelog-entry:last-child {
  border-bottom: 0;
}

.changelog-marker {
  position: relative;
  padding: 25px 16px;
  border-right: 1px solid var(--line);
  color: var(--quiet);
  font-size: 9px;
  font-weight: 750;
}

.changelog-marker i {
  position: absolute;
  top: 30px;
  right: -4px;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #787874;
}

.changelog-entry.is-current .changelog-marker i {
  background: var(--green);
}

.changelog-body {
  padding: 24px 28px 28px;
}

.changelog-entry-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
}

.changelog-entry-header h3 {
  margin: 5px 0 0;
  font-size: 18px;
}

.changelog-entry-header time {
  color: var(--quiet);
  font-size: 10px;
}

.changelog-release-notes {
  color: var(--muted);
  white-space: pre-line;
}

.changelog-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.changelog-tags span {
  padding: 5px 8px;
  border: 1px solid var(--line);
  color: var(--muted);
  font-size: 9px;
  font-weight: 700;
}

.changelog-points {
  display: grid;
  margin: 18px 0 0;
  padding: 0;
  gap: 8px;
  color: var(--muted);
  list-style: none;
}

.changelog-points li {
  position: relative;
  padding-left: 16px;
}

.changelog-points li::before {
  position: absolute;
  top: 0.75em;
  left: 0;
  width: 4px;
  height: 4px;
  content: "";
  border-radius: 50%;
  background: #777773;
}

.is-loading {
  position: relative;
  pointer-events: none;
}

.is-loading::after {
  width: 13px;
  height: 13px;
  content: "";
  border: 2px solid currentColor;
  border-right-color: transparent;
  border-radius: 50%;
  animation: spin 700ms linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

@media (max-width: 1080px) {
  .portal-shell,
  .portal-shell.is-authenticated {
    grid-template-columns: 220px minmax(0, 1fr);
    width: min(calc(100% - 28px), 1440px);
    margin: 14px auto;
  }

  .portal-side {
    padding: 24px;
  }

  .portal-side-copy h1 {
    font-size: 44px;
  }

  .portal-main,
  .portal-shell.is-authenticated .portal-main {
    padding: 34px;
  }

  .account-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .account-stat:nth-child(3) {
    border-top: 1px solid var(--line);
    border-left: 0;
  }

  .account-stat:nth-child(4) {
    border-top: 1px solid var(--line);
  }

  .overview-grid,
  .device-layout {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 760px) {
  .portal-site-link {
    top: 14px;
    right: 14px;
  }

  .portal-shell,
  .portal-shell.is-authenticated {
    display: block;
    width: 100%;
    min-height: 100vh;
    margin: 0;
    border: 0;
    border-radius: 0;
  }

  .portal-side {
    min-height: auto;
    padding: 20px;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .portal-side-copy {
    margin: 54px 0 12px;
    padding: 30px 0;
  }

  .portal-side-copy h1 {
    font-size: 40px;
  }

  .portal-side-footer,
  .portal-shell.is-authenticated .portal-side-footer,
  .portal-shell.is-authenticated .account-nav,
  .portal-shell.is-authenticated .portal-side-copy {
    display: none;
  }

  .portal-main,
  .portal-shell.is-authenticated .portal-main {
    min-height: 0;
    padding: 34px 20px 52px;
  }

  .auth-heading h2,
  .account-intro h2,
  .section-title-row h2 {
    font-size: 36px;
  }

  .account-header {
    align-items: flex-start;
    flex-direction: column;
  }

  .account-header-actions {
    width: 100%;
    justify-content: space-between;
  }

  .account-mobile-nav {
    display: flex;
    margin: -20px -20px 32px;
    padding: 0 20px 12px;
    gap: 6px;
    overflow-x: auto;
    border-bottom: 1px solid var(--line);
    scrollbar-width: none;
  }

  .account-mobile-nav::-webkit-scrollbar {
    display: none;
  }

  .account-mobile-nav button {
    min-height: 36px;
    padding: 0 12px;
    flex: 0 0 auto;
    border: 1px solid var(--line);
    border-radius: 5px;
    color: var(--muted);
    background: transparent;
    font-size: 10px;
    font-weight: 680;
  }

  .account-mobile-nav button.is-active {
    color: var(--black);
    border-color: var(--white);
    background: var(--white);
  }

  .account-intro,
  .section-title-row {
    align-items: flex-start;
    flex-direction: column;
  }

  .release-mark {
    width: 100%;
    padding: 14px 0 0;
    border-top: 1px solid var(--line);
    border-left: 0;
  }

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

@media (max-width: 520px) {
  .portal-brand strong {
    font-size: 15px;
  }

  .portal-brand img,
  .portal-brand-mark,
  .portal-brand-mark img {
    width: 48px;
    height: 42px;
  }

  .portal-site-link {
    width: 40px;
    padding: 0;
    justify-content: center;
    overflow: hidden;
    color: var(--text);
    font-size: 0;
  }

  .portal-site-link::before {
    content: "\2190";
    color: var(--text);
    font-size: 17px;
    line-height: 1;
  }

  .auth-trust {
    grid-template-columns: 1fr;
  }

  .auth-trust > div,
  .auth-trust > div:first-child {
    padding: 10px 0;
    border-top: 1px solid var(--line);
    border-left: 0;
  }

  .auth-trust > div:first-child {
    border-top: 0;
  }

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

  .account-stat,
  .account-stat:nth-child(2),
  .account-stat:nth-child(3),
  .account-stat:nth-child(4) {
    border-top: 1px solid var(--line);
    border-left: 0;
  }

  .account-stat:first-child {
    border-top: 0;
  }

  .release-panel,
  .quick-panel,
  .license-vault,
  .security-panel {
    padding: 18px;
  }

  .download-row,
  .reset-actions,
  .support-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .download-row .button,
  .reset-actions .button,
  .support-actions .button {
    width: 100%;
  }

  .license-card-details {
    align-items: flex-start;
    flex-direction: column;
  }

  .information-strip {
    grid-template-columns: 1fr;
    gap: 4px;
  }

  .changelog-entry {
    grid-template-columns: 1fr;
  }

  .changelog-marker {
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .changelog-marker i {
    top: 29px;
    right: 18px;
  }

  .changelog-entry-header {
    flex-direction: column;
    gap: 8px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* ===== License recovery (Discord verified, no linked license) ===== */
.account-notice {
  margin: 0 0 22px;
  padding: 14px 18px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.05);
  color: rgba(255, 255, 255, 0.82);
  font-size: 0.92rem;
  line-height: 1.5;
}

.license-recovery {
  margin-top: 18px;
  padding: 20px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 18px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.06), rgba(255, 255, 255, 0.02));
  display: grid;
  gap: 14px;
}

.license-recovery-copy h3 {
  margin: 6px 0 6px;
  font-size: 1.05rem;
}

.license-recovery-copy p {
  margin: 0;
  color: rgba(255, 255, 255, 0.66);
  font-size: 0.88rem;
  line-height: 1.5;
}

.license-recovery-row {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.license-recovery-row input {
  flex: 1 1 240px;
  min-width: 0;
  padding: 13px 16px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  background: rgba(0, 0, 0, 0.45);
  color: #fff;
  font: inherit;
  letter-spacing: 0.02em;
}

.license-recovery-row input::placeholder { color: rgba(255, 255, 255, 0.38); }

.license-recovery-row input:focus-visible {
  outline: none;
  border-color: rgba(255, 255, 255, 0.55);
  box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.12);
}

.license-recovery-row button[data-recovery-button] { flex: 0 0 auto; }

.license-recovery .form-message { margin: 0; min-height: 1em; font-size: 0.86rem; }
.license-recovery .form-message.is-loading { color: rgba(255, 255, 255, 0.7); }
.license-recovery .form-message.is-success { color: #7ef0b2; }
.license-recovery .form-message.is-error { color: #ff8f8f; }

.license-recovery button.is-loading { opacity: 0.65; pointer-events: none; }

@media (max-width: 560px) {
  .license-recovery { padding: 16px; }
  .license-recovery-row { flex-direction: column; }
  .license-recovery-row button[data-recovery-button] { width: 100%; }
}

.owned-products {
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding: 24px;
  border: 1px solid var(--line, #242424);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.014);
}

.owned-products header {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.owned-product-list {
  display: grid;
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.owned-product-list li {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 14px;
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 6px;
}

.owned-product-list small {
  color: var(--quiet, #8a8a86);
}

.license-products {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
}

.license-product-chip {
  padding: 4px 10px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 999px;
  font-size: 12px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
