/* The native identity HTML uses the same brand and display settings as checkout. */
.identity-page {
  --identity-bg: #0a1f18;
  --identity-panel: #123025;
  --identity-field: #0d261e;
  --identity-text: #f4f7f4;
  --identity-muted: #b7c7bf;
  --identity-border: #365d4c;
  --identity-accent: #a8e4c8;
  --identity-button-text: #13241e;
  --identity-warning: #f1cc8c;
  --identity-glow: #a8e4c80d;
  margin: 0;
  min-height: 100vh;
  min-height: 100dvh;
  background: var(--identity-bg);
  color: var(--identity-text);
  font-family: Aptos, "Segoe UI", "Helvetica Neue", Arial, sans-serif;
  font-size: 1rem;
  line-height: 1.6;
  isolation: isolate;
  -webkit-text-size-adjust: 100%;
}
html[data-theme] .identity-page { background: var(--identity-bg); color: var(--identity-text); }
.identity-page *, .identity-page *::before, .identity-page *::after { box-sizing: border-box; }
.identity-page :is(a, button, input, select, textarea, summary):focus-visible { outline: 3px solid var(--identity-accent); outline-offset: 4px; }
.identity-header { position: relative; z-index: 20; border-bottom: 1px solid var(--identity-border); }
.identity-header-inner {
  width: min(1180px, calc(100% - 48px));
  min-height: 92px;
  margin-inline: auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}
.identity-brand { display: inline-flex; max-width: 100%; flex-shrink: 0; }
.identity-brand img { display: block; width: 176px; max-width: 100%; height: auto; }
.identity-header-actions { display: flex; align-items: center; gap: 28px; min-width: 0; }
.identity-back { display: inline-flex; align-items: center; gap: 10px; min-height: 44px; font-size: .875rem; font-weight: 650; color: var(--identity-muted); text-decoration: none; }
.identity-back:hover { color: var(--identity-accent); }
.identity-back > span { font-size: 1.2rem; }
.identity-header .language-menu > summary { padding: 8px 13px; }
.identity-header .language-menu-panel { z-index: 30; max-width: calc(100vw - 32px); }
.identity-main {
  width: min(600px, calc(100% - 48px));
  margin-inline: auto;
  padding: clamp(36px, 7vw, 80px) 0 120px;
  overflow-wrap: anywhere;
}
.identity-main::before {
  content: "";
  position: fixed;
  z-index: -1;
  inset: 92px 0 auto;
  height: min(620px, 75vh);
  background: radial-gradient(ellipse at 50% 0, var(--identity-glow), transparent 70%);
  pointer-events: none;
}
.identity-card {
  padding: clamp(26px, 5vw, 44px);
  border: 1px solid var(--identity-border);
  border-radius: 28px;
  background: var(--identity-panel);
  box-shadow: 0 22px 64px #00000014;
}
.identity-card-mark { display: grid; place-items: center; width: 52px; height: 52px; margin: 0 0 26px; border: 1px solid var(--identity-border); border-radius: 16px; color: var(--identity-accent); background: var(--identity-field); }
.identity-card-heading { display: flex; align-items: center; gap: 16px; margin-bottom: 26px; }
.identity-card-heading .identity-card-mark { flex-shrink: 0; margin: 0; }
.identity-content { min-width: 0; }
.identity-content :is(h1, h2), .identity-card-heading h1 { margin: 0 0 26px; font-size: clamp(1.7rem, 4.5vw, 2rem); font-weight: 650; line-height: 1.15; letter-spacing: -.04em; color: var(--identity-text); }
.identity-card-heading h1 { margin: 0; }
.identity-content h3 { margin: 24px 0 12px; font-size: 1.15rem; line-height: 1.35; font-weight: 650; }
.identity-content p { margin: 0 0 18px; }
.identity-content > :last-child { margin-bottom: 0; }
.identity-content form { margin: 0; }
.identity-content .identity-recovery { margin: 18px 0 0; font-size: .875rem; }
.identity-content form + form { margin-top: 24px; padding-top: 24px; border-top: 1px solid var(--identity-border); }
.identity-content label { display: block; margin: 0 0 20px; color: var(--identity-muted); font-size: .875rem; font-weight: 650; line-height: 1.5; }
.identity-content :is(input:not([type="hidden"]):not([type="checkbox"]):not([type="radio"]), select, textarea) {
  display: block;
  width: 100%;
  min-width: 0;
  min-height: 54px;
  margin: 8px 0 0;
  padding: 13px 16px;
  border: 1px solid var(--identity-border);
  border-radius: 14px;
  background: var(--identity-field);
  color: var(--identity-text);
  font: inherit;
  font-size: 1rem;
  font-weight: 400;
  line-height: 1.5;
  box-shadow: none;
}
.identity-content :is(input, select, textarea):hover { border-color: var(--identity-accent); }
.identity-content :is(input, select, textarea):focus { border-color: var(--identity-accent); }
.identity-content input[type="hidden"] { display: none; }
.identity-content input:is([type="checkbox"], [type="radio"]) { display: inline-block; width: 19px; height: 19px; margin: 0 10px 0 0; vertical-align: -.2em; accent-color: var(--identity-accent); }
.identity-content label:has(input[type="checkbox"]) { display: flex; gap: 11px; align-items: flex-start; margin: 22px 0 26px; font-weight: 400; }
.identity-content label:has(input[type="checkbox"]) > input { flex-shrink: 0; margin: .1em 0 0; }
.identity-content button {
  display: flex;
  justify-content: center;
  align-items: center;
  width: 100%;
  max-width: 100%;
  min-height: 54px;
  margin: 20px 0 0;
  padding: 14px 22px;
  border: 1px solid var(--identity-accent);
  border-radius: 999px;
  background: var(--identity-accent);
  color: var(--identity-button-text);
  font: inherit;
  font-size: .9375rem;
  font-weight: 750;
  line-height: 1.4;
  text-align: center;
  cursor: pointer;
}
.identity-content button:hover { filter: brightness(1.06); }
.identity-content button:disabled { opacity: .65; cursor: default; filter: none; }
.identity-content button[name="command"][value="create"] { margin-top: 12px; background: transparent; color: var(--identity-accent); }
.identity-content a { color: var(--identity-accent); text-decoration: underline; text-underline-offset: .2em; overflow-wrap: anywhere; }
.identity-content a:hover { text-decoration-thickness: 2px; }
.identity-content form[action$="/cancel"] { margin-top: 24px; padding-top: 0; border-top: 0; }
.identity-content form[action$="/cancel"] h2 { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0; }
.identity-content form[action$="/cancel"] button { min-height: 44px; margin: 0; padding: 10px 18px; border-color: transparent; background: transparent; color: var(--identity-muted); font-size: .875rem; font-weight: 600; }
.identity-content form[action$="/cancel"] button:hover { color: var(--identity-accent); text-decoration: underline; text-underline-offset: .2em; filter: none; }
.identity-content section { margin-bottom: 26px; padding-bottom: 26px; border-bottom: 1px solid var(--identity-border); }
.identity-content section > h2 { font-size: 1.6rem; }
.identity-content section > :last-child { margin-bottom: 0; }
.identity-content dl { display: grid; grid-template-columns: minmax(0, .8fr) minmax(0, 1.2fr); gap: 8px 18px; margin: 22px 0; font-size: .875rem; }
.identity-content dt { color: var(--identity-muted); font-weight: 400; }
.identity-content dd { min-width: 0; margin: 0; font-weight: 650; color: var(--identity-text); }
.identity-content p:has(> button[name="target"]) { margin: 14px 0 0; }
.identity-content button[name="target"] { justify-content: flex-start; margin: 0; padding: 16px 20px; border-radius: 16px; background: var(--identity-field); color: var(--identity-accent); text-align: left; }
.identity-content button[name="target"]:hover { background: var(--identity-glow); filter: none; }
.identity-content button[name="target"] + span { display: block; margin: 8px 0 0; padding-inline: 8px; color: var(--identity-muted); font-size: .8125rem; line-height: 1.5; }
.identity-content [role="alert"] { padding: 16px 18px; border: 1px solid var(--identity-warning); border-radius: 14px; color: var(--identity-warning); font-size: .9375rem; }
.identity-content pre { max-width: 100%; margin: 22px 0; padding: 20px; border: 1px solid var(--identity-border); border-radius: 14px; background: var(--identity-field); color: var(--identity-text); font-family: Consolas, "Cascadia Code", monospace; font-size: 1rem; line-height: 1.7; white-space: pre-wrap; overflow-wrap: anywhere; user-select: all; }
html[data-theme="light"] .identity-page { --identity-bg: #f4f7f4; --identity-panel: #fff; --identity-field: #f6faf7; --identity-text: #13241e; --identity-muted: #52655c; --identity-border: #c7d2cc; --identity-accent: #176c4d; --identity-button-text: #fff; --identity-warning: #75550b; --identity-glow: #176c4d08; }
html[data-theme="light"] .identity-card { box-shadow: 0 22px 64px #193e2b09; }
html[data-theme="contrast"] .identity-page { --identity-bg: #000; --identity-panel: #000; --identity-field: #000; --identity-text: #fff; --identity-muted: #fff; --identity-border: #fff; --identity-accent: #ffe600; --identity-button-text: #000; --identity-warning: #ffe600; --identity-glow: transparent; }
html[data-theme="contrast"] .identity-card { border-width: 2px; box-shadow: none; }
html[data-theme="contrast"] .identity-content :is(input:not([type="hidden"]), button, pre, [role="alert"]) { border-width: 2px; }
@media (max-width: 600px) {
  .identity-main { width: calc(100% - 32px); padding-top: 32px; }
  .identity-card { padding: 26px 22px; border-radius: 22px; }
  .identity-card-mark { width: 46px; height: 46px; margin-bottom: 22px; border-radius: 14px; }
  .identity-content dl { grid-template-columns: 1fr; gap: 4px; }
  .identity-content dd { margin-bottom: 10px; }
}
@media (max-width: 520px) {
  .identity-header-inner { width: calc(100% - 32px); display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 2px 16px; padding-block: 18px; }
  .identity-brand { grid-column: 1; }
  .identity-brand img { width: 150px; }
  .identity-header-actions { display: contents; }
  .identity-header .language-menu { grid-column: 2; grid-row: 1 / 3; align-self: center; }
  .identity-back { grid-column: 1; font-size: .8125rem; }
}
@media (prefers-reduced-motion: reduce) {
  .identity-page *, .identity-page *::before, .identity-page *::after { scroll-behavior: auto; transition: none; animation: none; }
}

/* Append after identity.css. Only the authenticated portal opts into this layout. */
.identity-main:has(.identity-portal-nav) { width: min(1060px, calc(100% - 48px)); }
.identity-card:has(.identity-portal-nav) { padding: clamp(24px, 4vw, 40px); }
.identity-card:has(.identity-portal-nav) > .identity-card-mark { display: none; }
.identity-portal-nav { margin: 0 0 34px; padding: 0 0 8px; border-bottom: 1px solid var(--identity-border); }
.identity-portal-nav-list { display: flex; flex-wrap: wrap; gap: 8px; }
.identity-content .identity-portal-tab {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
  min-width: 0;
  min-height: 48px;
  padding: 10px 17px;
  border: 1px solid transparent;
  border-radius: 12px;
  color: var(--identity-muted);
  font-size: .875rem;
  font-weight: 650;
  line-height: 1.45;
  text-align: center;
  text-decoration: none;
}
.identity-content .identity-portal-tab:hover { border-color: var(--identity-border); color: var(--identity-text); background: var(--identity-field); text-decoration: none; }
.identity-content .identity-portal-tab[aria-current="page"] { border-color: var(--identity-accent); background: var(--identity-accent); color: var(--identity-button-text); }
.identity-content .identity-portal-tab svg { flex-shrink: 0; width: 18px; height: 18px; }
.identity-content .identity-portal-accounts { margin: 0; padding: 0; border: 0; }
.identity-portal-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; margin-bottom: 28px; }
.identity-content .identity-portal-heading h2 { margin: 0 0 12px; font-size: clamp(1.7rem, 4vw, 2rem); }
.identity-content .identity-portal-description { max-width: 58ch; margin: 0; color: var(--identity-muted); font-size: .9375rem; }
.identity-portal-count { flex-shrink: 0; margin-top: 5px; padding: 5px 11px; border: 1px solid var(--identity-border); border-radius: 999px; color: var(--identity-muted); font-size: .8125rem; font-weight: 650; white-space: nowrap; }
.identity-portal-accounts-list { display: grid; gap: 14px; padding: 0; margin: 0; list-style: none; }
.identity-portal-account {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 20px;
  min-width: 0;
  padding: 22px 24px;
  border: 1px solid var(--identity-border);
  border-radius: 20px;
  background: var(--identity-field);
}
.identity-portal-account-copy { min-width: 0; }
.identity-content .identity-portal-account h3 { margin: 0; font-size: 1.0625rem; font-weight: 650; line-height: 1.55; letter-spacing: -.015em; overflow-wrap: anywhere; }
.identity-portal-service { display: block; margin-top: 3px; color: var(--identity-muted); font-size: .875rem; font-weight: 400; }
.identity-hub-links { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 12px 20px; }
.identity-portal-accounts-list + .identity-hub-links { margin-top: 24px; }
.identity-portal-url-part { color: var(--identity-muted); font-size: .875rem; font-weight: 400; }
.identity-portal-action { display: grid; gap: 8px; min-width: 140px; max-width: 220px; }
.identity-service-paid-until { display: block; margin-top: 9px; font-size: .875rem; }
.identity-content .identity-portal-action form { margin: 0; padding: 0; border: 0; }
.identity-content .identity-portal-action h2,
.identity-content .identity-portal-footer h2 { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0; }
.identity-content .identity-portal-action button,
.identity-content .identity-portal-action a { min-height: 46px; margin: 0; padding: 11px 20px; font-size: .875rem; }
.identity-content .identity-portal-action a { display: grid; place-items: center; border: 1px solid var(--identity-accent); border-radius: 999px; background: var(--identity-accent); color: var(--identity-button-text); font-weight: 750; text-align: center; text-decoration: none; }
.identity-content .identity-portal-action a:hover { filter: brightness(1.06); }
.identity-content .identity-portal-action .identity-service-renew { background: transparent; color: var(--identity-accent); }
.identity-content .identity-portal-action .identity-service-renew:hover { text-decoration: underline; }
.identity-payment-order { grid-template-columns: minmax(0, .85fr) minmax(0, 1.15fr); align-items: start; }
.identity-payment-movements { display: grid; gap: 8px; margin: 0; padding: 0; list-style: none; }
.identity-payment-movement { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: 6px 20px; padding: 10px 0; }
.identity-payment-movement + .identity-payment-movement { border-top: 1px solid var(--identity-border); }
.identity-payment-movement strong { font-variant-numeric: tabular-nums; }
.identity-billing-amount { display: block; margin-top: 7px; font-variant-numeric: tabular-nums; }
.identity-billing-documents { display: grid; gap: 6px; }
.identity-content .identity-billing-document { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 6px 14px; min-height: 44px; padding: 8px 14px; border: 1px solid var(--identity-border); border-radius: 12px; font-weight: 650; text-decoration: none; overflow-wrap: anywhere; }
.identity-content .identity-billing-document:hover { border-color: var(--identity-accent); text-decoration: underline; }
.identity-billing-document small { color: var(--identity-muted); font-size: .75rem; font-weight: 600; }
.identity-billing-pagination { display: flex; flex-wrap: wrap; gap: 14px 24px; margin-top: 20px; }
.identity-content .identity-portal-empty { margin: 0; padding: 28px; border: 1px dashed var(--identity-border); border-radius: 20px; color: var(--identity-muted); font-size: .9375rem; }
.identity-card:has(.identity-portal-nav) .identity-content > form { max-width: 520px; }
.identity-portal-footer { margin-top: 30px; padding-top: 22px; border-top: 1px solid var(--identity-border); }
.identity-content .identity-portal-footer form { margin: 0; padding: 0; border: 0; }
.identity-content .identity-portal-footer button { width: auto; min-height: 44px; margin: 0; padding: 10px 18px; border-color: var(--identity-border); background: transparent; color: var(--identity-muted); font-size: .875rem; font-weight: 650; }
.identity-content .identity-portal-footer button:hover { border-color: var(--identity-accent); color: var(--identity-accent); filter: none; }
html[data-theme="contrast"] .identity-portal-tab { border-color: var(--identity-border); }
html[data-theme="contrast"] .identity-portal-account { border-width: 2px; }
html[data-theme="contrast"] .identity-portal-empty { border: 2px solid var(--identity-border); }
@media (max-width: 740px) {
  .identity-portal-nav-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .identity-content .identity-portal-tab { justify-content: flex-start; text-align: left; }
  .identity-portal-account { grid-template-columns: minmax(0, 1fr); gap: 18px; padding: 20px; }
  .identity-portal-action { width: 100%; min-width: 0; max-width: none; }
}
@media (max-width: 520px) {
  .identity-main:has(.identity-portal-nav) { width: calc(100% - 32px); }
  .identity-card:has(.identity-portal-nav) { padding: 24px 20px; }
  .identity-portal-nav { margin-bottom: 28px; }
  .identity-content .identity-portal-tab { gap: 7px; padding: 10px; font-size: .8125rem; }
  .identity-portal-heading { flex-direction: column; gap: 14px; margin-bottom: 22px; }
  .identity-portal-count { margin-top: 0; }
  .identity-portal-account { padding: 18px; border-radius: 16px; }
}
@media (max-width: 350px) {
  .identity-portal-nav-list { grid-template-columns: minmax(0, 1fr); }
}
