:root {
  --bg: #080b13;
  --bg-soft: #0d111d;
  --panel: rgba(18, 23, 38, 0.82);
  --panel-solid: #121726;
  --panel-raised: #171d2e;
  --line: rgba(175, 185, 218, 0.14);
  --line-strong: rgba(175, 185, 218, 0.26);
  --text: #f5f7ff;
  --text-soft: #c3c9dc;
  --muted: #858da5;
  --violet: #8275ff;
  --violet-light: #b1a9ff;
  --cyan: #42d5ca;
  --amber: #e7ba66;
  --rose: #f07f9e;
  --green: #61d6ae;
  --shadow: 0 30px 80px rgba(0, 0, 0, 0.34);
  --radius-xl: 28px;
  --radius-lg: 22px;
  --radius-md: 16px;
  --radius-sm: 12px;
  --shell: 1160px;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  color-scheme: dark;
  scroll-behavior: smooth;
  scroll-padding-top: 92px;
}

body {
  min-width: 320px;
  margin: 0;
  color: var(--text);
  background:
    radial-gradient(circle at 18% -10%, rgba(103, 86, 255, 0.2), transparent 34rem),
    radial-gradient(circle at 92% 32%, rgba(44, 195, 188, 0.08), transparent 30rem),
    var(--bg);
  font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  -webkit-font-smoothing: antialiased;
}

body::before {
  position: fixed;
  z-index: -1;
  inset: 0;
  pointer-events: none;
  content: "";
  opacity: 0.15;
  background-image:
    linear-gradient(rgba(143, 152, 187, 0.07) 1px, transparent 1px),
    linear-gradient(90deg, rgba(143, 152, 187, 0.07) 1px, transparent 1px);
  background-size: 64px 64px;
  mask-image: linear-gradient(to bottom, black, transparent 84%);
}

button,
input {
  font: inherit;
}

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

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

button {
  color: inherit;
}

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

[hidden] {
  display: none !important;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: fixed;
  z-index: 1000;
  top: 12px;
  left: 12px;
  padding: 10px 16px;
  border-radius: 10px;
  color: #080b13;
  background: #fff;
  transform: translateY(-180%);
  transition: transform 160ms ease;
}

.skip-link:focus {
  transform: translateY(0);
}

.shell {
  width: min(calc(100% - 48px), var(--shell));
  margin-inline: auto;
}

.portal-header {
  position: sticky;
  z-index: 40;
  top: 0;
  border-bottom: 1px solid var(--line);
  background: rgba(8, 11, 19, 0.86);
  backdrop-filter: blur(22px) saturate(130%);
}

.portal-header-inner {
  display: flex;
  align-items: center;
  min-height: 72px;
  gap: 28px;
}

.brand {
  display: inline-flex;
  align-items: center;
  flex: 0 0 auto;
  gap: 10px;
}

.brand img {
  width: 38px;
  height: 38px;
  border-radius: 11px;
  box-shadow: 0 8px 28px rgba(94, 84, 255, 0.22);
}

.brand-copy {
  display: grid;
  gap: 3px;
}

.brand-copy strong {
  font-size: 18px;
  line-height: 1;
  letter-spacing: -0.02em;
}

.brand-copy small {
  color: var(--muted);
  font-size: 8px;
  font-weight: 700;
  letter-spacing: 0.17em;
}

.portal-nav {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-left: auto;
}

.portal-nav a {
  padding: 10px 13px;
  border-radius: 10px;
  color: var(--muted);
  font-size: 13px;
  transition: color 150ms ease, background 150ms ease;
}

.portal-nav a:hover,
.portal-nav a:focus-visible,
.portal-nav a[aria-current="page"] {
  color: var(--text);
  background: rgba(126, 113, 255, 0.1);
}

.account-link {
  border: 1px solid var(--line-strong);
  color: var(--text-soft) !important;
}

.service-strip {
  border-bottom: 1px solid var(--line);
  background: rgba(13, 17, 29, 0.76);
}

.service-state {
  display: flex;
  align-items: center;
  min-height: 46px;
  gap: 10px;
  color: var(--muted);
  font-size: 12px;
}

.service-state::before {
  width: 7px;
  height: 7px;
  flex: 0 0 auto;
  border-radius: 50%;
  content: "";
  background: var(--amber);
  box-shadow: 0 0 10px rgba(231, 186, 102, 0.45);
}

.service-state[data-state="connected"]::before {
  background: var(--green);
  box-shadow: 0 0 10px rgba(97, 214, 174, 0.55);
}

.service-state[data-state="disconnected"] {
  color: #d7b0bb;
}

.service-state[data-state="disconnected"]::before {
  background: var(--rose);
  box-shadow: 0 0 10px rgba(240, 127, 158, 0.42);
}

.portal-main {
  min-height: calc(100vh - 260px);
  padding-block: 58px 110px;
}

.page-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
  gap: 36px;
  margin-bottom: 36px;
}

.eyebrow {
  margin: 0 0 13px;
  color: var(--violet-light);
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.18em;
}

.page-hero h1 {
  margin: 0;
  font-size: clamp(38px, 5.3vw, 64px);
  line-height: 1.08;
  letter-spacing: -0.05em;
}

.page-hero-copy {
  max-width: 690px;
  margin: 18px 0 0;
  color: var(--text-soft);
  font-size: 16px;
  line-height: 1.8;
}

.hero-mark {
  display: grid;
  width: 112px;
  height: 112px;
  place-items: center;
  border: 1px solid rgba(173, 163, 255, 0.24);
  border-radius: 34px;
  color: var(--violet-light);
  background:
    radial-gradient(circle at 30% 25%, rgba(255, 255, 255, 0.16), transparent 28%),
    linear-gradient(145deg, rgba(128, 112, 255, 0.18), rgba(66, 213, 202, 0.06));
  box-shadow: var(--shadow);
  font-size: 39px;
  font-weight: 700;
}

.panel {
  border: 1px solid var(--line);
  border-radius: var(--radius-xl);
  background: linear-gradient(145deg, rgba(20, 25, 42, 0.9), rgba(13, 17, 29, 0.88));
  box-shadow: 0 22px 65px rgba(0, 0, 0, 0.2), inset 0 1px rgba(255, 255, 255, 0.03);
}

.panel-pad {
  padding: 28px;
}

.stacked-panel {
  margin-top: 18px;
}

.auth-callout {
  align-items: center;
  justify-content: space-between;
  margin-bottom: 18px;
}

.auth-callout .button {
  flex: 0 0 auto;
}

.panel-heading {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 24px;
}

.panel-heading h2,
.panel-heading h3 {
  margin: 0;
  line-height: 1.28;
  letter-spacing: -0.025em;
}

.panel-heading h2 {
  font-size: 24px;
}

.panel-heading h3 {
  font-size: 18px;
}

.panel-heading p {
  margin: 7px 0 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.65;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  padding: 0 9px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  color: var(--muted);
  white-space: nowrap;
  font-size: 10px;
  font-weight: 700;
}

.status-pill.beta {
  border-color: rgba(168, 159, 255, 0.25);
  color: var(--violet-light);
  background: rgba(126, 113, 255, 0.1);
}

.status-pill.research {
  border-color: rgba(231, 186, 102, 0.24);
  color: var(--amber);
  background: rgba(231, 186, 102, 0.07);
}

.status-pill.ready {
  border-color: rgba(97, 214, 174, 0.24);
  color: var(--green);
  background: rgba(97, 214, 174, 0.07);
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 47px;
  padding: 0 20px;
  border: 1px solid transparent;
  border-radius: 13px;
  cursor: pointer;
  font-size: 14px;
  font-weight: 700;
  line-height: 1;
  transition: transform 150ms ease, border-color 150ms ease, background 150ms ease, box-shadow 150ms ease;
}

.button:hover:not(:disabled) {
  transform: translateY(-2px);
}

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

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

.button-primary {
  color: #fff;
  background: linear-gradient(135deg, #7568ff, #8a74ff 58%, #7771ff);
  box-shadow: 0 14px 34px rgba(102, 88, 255, 0.25), inset 0 1px rgba(255, 255, 255, 0.17);
}

.button-secondary {
  border-color: var(--line-strong);
  background: rgba(19, 24, 40, 0.86);
}

.button-quiet {
  min-height: 39px;
  padding-inline: 13px;
  border-color: var(--line);
  color: var(--text-soft);
  background: rgba(255, 255, 255, 0.025);
  font-size: 12px;
}

.button-danger {
  border-color: rgba(240, 127, 158, 0.25);
  color: #ffb3c6;
  background: rgba(240, 127, 158, 0.08);
}

.button-full {
  width: 100%;
}

.button:focus-visible,
.portal-nav a:focus-visible,
input:focus-visible,
.asset-choice:focus-visible,
.tab-button:focus-visible,
.text-link:focus-visible,
summary:focus-visible {
  outline: 2px solid var(--violet-light);
  outline-offset: 3px;
}

.text-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--violet-light);
  font-size: 13px;
  font-weight: 700;
}

.notice {
  display: flex;
  align-items: start;
  gap: 12px;
  padding: 15px 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  color: var(--text-soft);
  background: rgba(255, 255, 255, 0.025);
  font-size: 12px;
  line-height: 1.7;
}

.notice-icon {
  display: grid;
  width: 24px;
  height: 24px;
  flex: 0 0 auto;
  place-items: center;
  border-radius: 8px;
  color: var(--violet-light);
  background: rgba(126, 113, 255, 0.12);
  font-size: 12px;
}

.notice.warning {
  border-color: rgba(231, 186, 102, 0.2);
  background: rgba(231, 186, 102, 0.05);
}

.notice.warning .notice-icon {
  color: var(--amber);
  background: rgba(231, 186, 102, 0.1);
}

.notice.error {
  border-color: rgba(240, 127, 158, 0.22);
  color: #e0bac5;
  background: rgba(240, 127, 158, 0.06);
}

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

.form-field label,
.form-label {
  color: var(--text-soft);
  font-size: 12px;
  font-weight: 700;
}

.form-field input {
  width: 100%;
  min-height: 49px;
  padding: 0 14px;
  border: 1px solid var(--line-strong);
  border-radius: 12px;
  color: var(--text);
  outline: none;
  background: rgba(7, 10, 18, 0.66);
}

.form-field input::placeholder {
  color: #666e84;
}

.form-field input:disabled {
  opacity: 0.54;
}

.form-hint {
  margin: 0;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.55;
}

.form-error {
  min-height: 18px;
  margin: 0;
  color: #ff9eb7;
  font-size: 11px;
  line-height: 1.55;
}

.checkout-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(330px, 0.85fr);
  align-items: start;
  gap: 18px;
}

.checkout-flow {
  display: grid;
  gap: 16px;
}

.checkout-step {
  position: relative;
  padding: 26px 26px 26px 76px;
}

.step-index {
  position: absolute;
  top: 25px;
  left: 26px;
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border: 1px solid rgba(168, 159, 255, 0.24);
  border-radius: 11px;
  color: var(--violet-light);
  background: rgba(126, 113, 255, 0.08);
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 10px;
  font-weight: 700;
}

.checkout-step h2 {
  margin: 2px 0 5px;
  font-size: 18px;
  letter-spacing: -0.02em;
}

.checkout-step > p {
  margin: 0 0 20px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.65;
}

.asset-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 9px;
}

.asset-choice {
  display: grid;
  min-height: 84px;
  padding: 13px;
  border: 1px solid var(--line);
  border-radius: 13px;
  cursor: pointer;
  text-align: left;
  background: rgba(255, 255, 255, 0.02);
}

.asset-choice:hover:not(:disabled),
.asset-choice[aria-pressed="true"] {
  border-color: rgba(168, 159, 255, 0.48);
  background: rgba(126, 113, 255, 0.1);
}

.asset-choice:disabled {
  cursor: not-allowed;
  opacity: 0.46;
}

.asset-choice strong {
  font-size: 14px;
}

.asset-choice span {
  margin-top: 4px;
  color: var(--muted);
  font-size: 9px;
  line-height: 1.45;
}

.form-grid {
  display: grid;
  grid-template-columns: 1fr 0.62fr;
  gap: 12px;
}

.checkout-action {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 20px;
}

.checkout-action small {
  color: var(--muted);
  font-size: 10px;
  line-height: 1.5;
}

.order-result {
  display: grid;
  gap: 14px;
  margin-top: 20px;
  padding-top: 20px;
  border-top: 1px solid var(--line);
}

.payment-instruction {
  display: grid;
  gap: 7px;
  padding: 14px;
  border: 1px solid rgba(97, 214, 174, 0.2);
  border-radius: 13px;
  background: rgba(97, 214, 174, 0.05);
}

.payment-instruction span {
  color: var(--muted);
  font-size: 10px;
}

.payment-instruction strong,
.payment-instruction code {
  overflow-wrap: anywhere;
  color: var(--text);
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 12px;
}

.payment-copy-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 9px;
}

.summary-card {
  position: sticky;
  top: 136px;
  overflow: hidden;
}

.product-summary-head {
  display: flex;
  align-items: center;
  gap: 13px;
  padding-bottom: 22px;
  border-bottom: 1px solid var(--line);
}

.product-icon {
  display: grid;
  width: 49px;
  height: 49px;
  flex: 0 0 auto;
  place-items: center;
  border-radius: 15px;
  background: linear-gradient(145deg, #9688ff, #615aff 60%, #36bfb8);
  box-shadow: 0 12px 30px rgba(100, 86, 255, 0.25);
  font-weight: 800;
}

.product-summary-head div {
  display: grid;
  gap: 4px;
}

.product-summary-head small {
  color: var(--muted);
  font-size: 9px;
  letter-spacing: 0.12em;
}

.product-summary-head strong {
  font-size: 17px;
}

.price-lock {
  padding: 24px 0;
  border-bottom: 1px solid var(--line);
}

.price-lock small {
  color: var(--muted);
  font-size: 10px;
}

.price-lock strong {
  display: block;
  margin-top: 7px;
  font-size: 36px;
  letter-spacing: -0.045em;
}

.price-lock strong span {
  color: var(--muted);
  font-size: 11px;
  letter-spacing: 0;
}

.summary-list {
  display: grid;
  gap: 13px;
  padding: 22px 0;
  margin: 0;
  list-style: none;
}

.summary-list li {
  display: flex;
  align-items: start;
  gap: 9px;
  color: var(--text-soft);
  font-size: 11px;
  line-height: 1.55;
}

.summary-list li::before {
  color: var(--cyan);
  content: "✓";
}

.summary-boundary {
  margin: 0;
  padding-top: 17px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 10px;
  line-height: 1.65;
}

.account-grid {
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
  align-items: start;
  gap: 18px;
}

.account-sidebar {
  position: sticky;
  top: 136px;
  display: grid;
  padding: 13px;
  gap: 5px;
}

.account-sidebar a,
.account-sidebar button {
  display: flex;
  align-items: center;
  width: 100%;
  min-height: 43px;
  padding: 0 13px;
  border: 0;
  border-radius: 11px;
  color: var(--muted);
  cursor: pointer;
  text-align: left;
  background: transparent;
  font-size: 12px;
}

.account-sidebar a:hover,
.account-sidebar a.active,
.account-sidebar button:hover {
  color: var(--text);
  background: rgba(126, 113, 255, 0.1);
}

.account-sidebar .sidebar-danger {
  margin-top: 9px;
  border-top: 1px solid var(--line);
  border-radius: 0 0 11px 11px;
  color: #d39baa;
}

.account-content {
  display: grid;
  gap: 18px;
}

.overview-cards,
.metric-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.overview-card,
.metric-card {
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.023);
}

.overview-card span,
.metric-card span {
  color: var(--muted);
  font-size: 10px;
}

.overview-card strong,
.metric-card strong {
  display: block;
  margin-top: 9px;
  font-size: 23px;
  letter-spacing: -0.03em;
}

.overview-card small,
.metric-card small {
  display: block;
  margin-top: 5px;
  color: var(--muted);
  font-size: 9px;
  line-height: 1.5;
}

.data-list {
  display: grid;
  gap: 10px;
}

.data-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  min-height: 82px;
  padding: 15px 17px;
  border: 1px solid var(--line);
  border-radius: 14px;
  gap: 18px;
  background: rgba(255, 255, 255, 0.018);
}

.data-row-main {
  min-width: 0;
}

.data-row-main strong {
  display: block;
  overflow: hidden;
  margin-bottom: 5px;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 13px;
}

.data-row-main p {
  margin: 0;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.55;
}

.data-row-meta {
  display: flex;
  align-items: center;
  gap: 9px;
}

.empty-state {
  display: grid;
  min-height: 150px;
  padding: 28px;
  place-items: center;
  border: 1px dashed var(--line-strong);
  border-radius: var(--radius-md);
  color: var(--muted);
  text-align: center;
}

.empty-state strong {
  display: block;
  margin-bottom: 7px;
  color: var(--text-soft);
  font-size: 13px;
}

.empty-state p {
  max-width: 410px;
  margin: 0;
  font-size: 11px;
  line-height: 1.65;
}

.referral-overview {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(300px, 0.9fr);
  gap: 18px;
}

.share-code-card {
  overflow: hidden;
  background:
    radial-gradient(circle at 90% 12%, rgba(66, 213, 202, 0.12), transparent 16rem),
    linear-gradient(145deg, rgba(31, 35, 61, 0.95), rgba(14, 18, 31, 0.94));
}

.share-code {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 76px;
  padding: 0 18px;
  border: 1px solid rgba(168, 159, 255, 0.22);
  border-radius: 15px;
  background: rgba(7, 10, 18, 0.48);
  gap: 14px;
}

.share-code div {
  min-width: 0;
}

.share-code small {
  display: block;
  margin-bottom: 5px;
  color: var(--muted);
  font-size: 9px;
}

.share-code strong {
  display: block;
  overflow: hidden;
  color: var(--violet-light);
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 17px;
  letter-spacing: 0.08em;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.share-link {
  display: grid;
  gap: 8px;
  margin-top: 12px;
}

.share-link-output {
  min-height: 48px;
  padding: 14px;
  overflow-wrap: anywhere;
  border: 1px solid var(--line);
  border-radius: 12px;
  color: var(--text-soft);
  background: rgba(7, 10, 18, 0.42);
  font-size: 10px;
  line-height: 1.55;
}

.share-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 9px;
  margin-top: 12px;
}

.share-qr {
  display: grid;
  grid-template-columns: 116px 1fr;
  align-items: center;
  gap: 16px;
  margin-top: 12px;
  padding: 14px;
  border: 1px solid rgba(66, 213, 202, 0.2);
  border-radius: 14px;
  background: rgba(7, 10, 18, 0.5);
}

.share-qr[hidden] {
  display: none;
}

.share-qr svg {
  display: block;
  width: 116px;
  height: 116px;
  border-radius: 9px;
  background: #ffffff;
  image-rendering: pixelated;
}

.share-qr strong {
  color: var(--text);
  font-size: 12px;
}

.share-qr p {
  margin: 7px 0 0;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.65;
}

.rate-stack {
  display: grid;
  gap: 12px;
}

.rate-card {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  min-height: 112px;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.024);
}

.rate-card small {
  color: var(--muted);
  font-size: 10px;
}

.rate-card p {
  margin: 6px 0 0;
  color: var(--text-soft);
  font-size: 11px;
  line-height: 1.55;
}

.rate-card strong {
  color: var(--violet-light);
  font-size: 34px;
  letter-spacing: -0.04em;
}

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

.ledger-table th,
.ledger-table td {
  padding: 14px 10px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  font-size: 11px;
}

.ledger-table th {
  color: var(--muted);
  font-size: 9px;
  font-weight: 600;
  letter-spacing: 0.06em;
}

.ledger-table td {
  color: var(--text-soft);
}

.ledger-table td:last-child,
.ledger-table th:last-child {
  text-align: right;
}

.tutorial-layout {
  display: grid;
  grid-template-columns: 240px minmax(0, 1fr);
  align-items: start;
  gap: 18px;
}

.tutorial-toc {
  position: sticky;
  top: 136px;
  padding: 16px;
}

.tutorial-toc strong {
  display: block;
  padding: 8px 10px 12px;
  color: var(--text-soft);
  font-size: 11px;
}

.tutorial-toc a {
  display: grid;
  grid-template-columns: 23px minmax(0, 1fr);
  align-items: center;
  min-height: 42px;
  padding: 0 10px;
  border-radius: 10px;
  color: var(--muted);
  gap: 7px;
  font-size: 11px;
}

.tutorial-toc a:hover,
.tutorial-toc a:focus-visible {
  color: var(--text);
  background: rgba(126, 113, 255, 0.08);
}

.tutorial-toc a span {
  color: var(--violet-light);
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 9px;
}

.tutorial-content {
  display: grid;
  gap: 18px;
}

.tutorial-section {
  padding: 31px;
  scroll-margin-top: 132px;
}

.tutorial-section > header {
  display: flex;
  align-items: start;
  justify-content: space-between;
  padding-bottom: 21px;
  border-bottom: 1px solid var(--line);
  gap: 20px;
}

.tutorial-section h2 {
  margin: 0;
  font-size: 22px;
  letter-spacing: -0.03em;
}

.tutorial-section header p {
  margin: 7px 0 0;
  color: var(--muted);
  font-size: 11px;
}

.numbered-list {
  display: grid;
  padding: 0;
  margin: 22px 0 0;
  list-style: none;
  counter-reset: guide;
  gap: 17px;
}

.numbered-list li {
  position: relative;
  min-height: 38px;
  padding-left: 49px;
  counter-increment: guide;
}

.numbered-list li::before {
  position: absolute;
  top: 0;
  left: 0;
  display: grid;
  width: 31px;
  height: 31px;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 10px;
  color: var(--violet-light);
  content: counter(guide, decimal-leading-zero);
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 9px;
}

.numbered-list strong {
  display: block;
  margin-bottom: 5px;
  color: var(--text-soft);
  font-size: 12px;
}

.numbered-list p {
  margin: 0;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.7;
}

.boundary-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-top: 22px;
}

.boundary-card {
  min-height: 130px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.02);
}

.boundary-card strong {
  display: block;
  margin-bottom: 9px;
  font-size: 12px;
}

.boundary-card p {
  margin: 0;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.68;
}

.boundary-card.local strong {
  color: var(--cyan);
}

.boundary-card.cloud strong {
  color: var(--violet-light);
}

.maturity-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-top: 22px;
}

.maturity-card {
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.02);
}

.maturity-card h3 {
  margin: 14px 0 7px;
  font-size: 14px;
}

.maturity-card p {
  margin: 0;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.6;
}

.faq-stack {
  display: grid;
  gap: 8px;
  margin-top: 22px;
}

.faq-stack details {
  padding: 0 16px;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: rgba(255, 255, 255, 0.018);
}

.faq-stack summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 52px;
  cursor: pointer;
  color: var(--text-soft);
  gap: 18px;
  font-size: 12px;
  font-weight: 700;
  list-style: none;
}

.faq-stack summary::-webkit-details-marker {
  display: none;
}

.faq-stack summary span {
  color: var(--violet-light);
  font-size: 17px;
  font-weight: 400;
}

.faq-stack details[open] summary span {
  transform: rotate(45deg);
}

.faq-stack details p {
  padding: 0 0 17px;
  margin: 0;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.7;
}

.auth-main {
  display: grid;
  align-items: center;
  padding-block: 48px 86px;
}

.auth-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(420px, 510px);
  align-items: center;
  min-height: 650px;
  gap: clamp(44px, 7vw, 96px);
}

.auth-intro h1 {
  max-width: 660px;
  margin: 0;
  font-size: clamp(45px, 6vw, 74px);
  line-height: 1.04;
  letter-spacing: -0.055em;
}

.auth-intro h1 span {
  color: var(--violet-light);
}

.auth-intro > p:not(.eyebrow) {
  max-width: 610px;
  margin: 24px 0 0;
  color: var(--text-soft);
  font-size: 15px;
  line-height: 1.85;
}

.auth-trust-list {
  display: grid;
  max-width: 620px;
  margin-top: 34px;
  gap: 10px;
}

.auth-trust-list article {
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr);
  align-items: start;
  min-height: 76px;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: 15px;
  background: rgba(255, 255, 255, 0.018);
  gap: 13px;
}

.auth-trust-list article > span {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border: 1px solid rgba(168, 159, 255, 0.22);
  border-radius: 10px;
  color: var(--violet-light);
  background: rgba(126, 113, 255, 0.08);
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 9px;
}

.auth-trust-list strong {
  display: block;
  margin: 1px 0 5px;
  color: var(--text-soft);
  font-size: 12px;
}

.auth-trust-list p {
  margin: 0;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.6;
}

.auth-panel {
  position: relative;
  min-height: 610px;
  padding: 34px;
  overflow: hidden;
  background:
    radial-gradient(circle at 88% 5%, rgba(66, 213, 202, 0.1), transparent 18rem),
    radial-gradient(circle at 12% 96%, rgba(126, 113, 255, 0.13), transparent 20rem),
    linear-gradient(145deg, rgba(23, 29, 49, 0.98), rgba(12, 16, 28, 0.96));
}

.auth-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(6, 9, 16, 0.5);
  gap: 4px;
}

.tab-button {
  min-height: 43px;
  border: 0;
  border-radius: 10px;
  color: var(--muted);
  cursor: pointer;
  background: transparent;
  font-size: 12px;
  font-weight: 700;
}

.tab-button:hover,
.tab-button.active {
  color: var(--text);
  background: rgba(126, 113, 255, 0.12);
}

.auth-form-head {
  margin-block: 29px 24px;
}

.auth-form-head h2,
.auth-signed-in h2,
.auth-pending h2,
.auth-recovery h2,
.auth-reset h2 {
  margin: 0;
  font-size: 28px;
  letter-spacing: -0.035em;
}

.auth-form-head > p:last-child,
.auth-signed-in > p:not(.eyebrow),
.auth-pending > p:not(.eyebrow):not(.form-hint),
.auth-recovery > p:not(.eyebrow):not(.auth-error):not(.auth-recovery-status),
.auth-reset > p:not(.eyebrow):not(.auth-error):not(.auth-recovery-status) {
  margin: 9px 0 0;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.65;
}

.auth-form {
  display: grid;
  gap: 15px;
}

.auth-form .button {
  margin-top: 4px;
}

.auth-error {
  min-height: 19px;
  margin: 14px 0 0;
  color: #ff9eb7;
  font-size: 11px;
  line-height: 1.6;
}

.auth-text-button {
  appearance: none;
  border: 0;
  background: transparent;
  color: var(--violet-light);
  cursor: pointer;
  font: inherit;
  padding: 0.4rem;
  text-align: center;
  text-decoration: underline;
  text-underline-offset: 0.22em;
}

.auth-text-button:disabled {
  cursor: not-allowed;
  opacity: 0.45;
}

.auth-recovery,
.auth-reset {
  padding: 0.4rem 0;
}

.auth-recovery-status {
  color: var(--green);
  min-height: 1.4em;
  margin: 1rem 0 0;
}

.auth-boundary {
  padding-top: 17px;
  margin: 0;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 9px;
  line-height: 1.65;
}

.auth-verification {
  margin-bottom: 22px;
}

.auth-offline {
  align-items: center;
  margin-bottom: 22px;
}

.auth-offline > div,
.auth-verification > div {
  min-width: 0;
  flex: 1;
}

.auth-offline .button,
.auth-verification .button {
  min-height: 35px;
  flex: 0 0 auto;
}

.auth-verification[data-state="success"] {
  border-color: rgba(97, 214, 174, 0.24);
  color: #bdebd9;
  background: rgba(97, 214, 174, 0.06);
}

.auth-verification[data-state="success"] .notice-icon {
  color: var(--green);
  background: rgba(97, 214, 174, 0.11);
}

.auth-verification[data-state="error"] {
  border-color: rgba(240, 127, 158, 0.22);
  color: #e0bac5;
  background: rgba(240, 127, 158, 0.06);
}

.auth-verification[data-state="error"] .notice-icon {
  color: var(--rose);
  background: rgba(240, 127, 158, 0.1);
}

.auth-signed-in,
.auth-pending {
  display: grid;
  min-height: 530px;
  align-content: center;
  justify-items: start;
}

.auth-orbit,
.auth-mail-icon {
  display: grid;
  width: 74px;
  height: 74px;
  margin-bottom: 27px;
  place-items: center;
  border: 1px solid rgba(168, 159, 255, 0.28);
  border-radius: 24px;
  color: var(--violet-light);
  background: linear-gradient(145deg, rgba(126, 113, 255, 0.18), rgba(66, 213, 202, 0.07));
  box-shadow: 0 18px 48px rgba(66, 54, 185, 0.2);
  font-size: 27px;
}

.auth-mail-icon {
  color: var(--cyan);
}

.auth-actions {
  display: flex;
  width: 100%;
  margin-top: 25px;
  gap: 9px;
}

.auth-actions .button {
  flex: 1;
}

.legal-gate-strip {
  border-bottom: 1px solid rgba(240, 127, 158, 0.24);
  background: rgba(240, 127, 158, 0.065);
}

.legal-gate-state {
  display: flex;
  align-items: center;
  min-height: 58px;
  gap: 12px;
}

.legal-gate-state > span {
  display: grid;
  width: 26px;
  height: 26px;
  flex: 0 0 auto;
  place-items: center;
  border-radius: 9px;
  color: var(--rose);
  background: rgba(240, 127, 158, 0.11);
  font-size: 12px;
  font-weight: 800;
}

.legal-gate-state p {
  margin: 0;
  color: #d9b8c1;
  font-size: 11px;
  line-height: 1.65;
}

.legal-gate-state strong {
  margin-right: 7px;
  color: #ffc0d0;
}

.legal-hero {
  margin-bottom: 28px;
}

.legal-launch-gate {
  margin-bottom: 18px;
  border-color: rgba(240, 127, 158, 0.2);
  background:
    radial-gradient(circle at 100% 0, rgba(240, 127, 158, 0.1), transparent 24rem),
    linear-gradient(145deg, rgba(23, 24, 40, 0.94), rgba(13, 17, 29, 0.9));
}

.legal-config-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  padding: 0;
  margin: 0;
  gap: 10px;
}

.legal-config-grid > div {
  min-width: 0;
  padding: 17px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.02);
}

.legal-config-grid dt {
  color: var(--muted);
  font-size: 9px;
  letter-spacing: 0.06em;
}

.legal-config-grid dd {
  margin: 8px 0;
  color: var(--rose);
  font-size: 13px;
  font-weight: 750;
}

.legal-config-grid small {
  color: var(--muted);
  font-size: 9px;
  line-height: 1.6;
}

.legal-gate-notice {
  margin-top: 12px;
}

.legal-layout {
  display: grid;
  grid-template-columns: 240px minmax(0, 1fr);
  align-items: start;
  gap: 18px;
}

.legal-toc {
  position: sticky;
  top: 88px;
  padding: 16px;
}

.legal-toc strong {
  display: block;
  padding: 8px 10px 12px;
  color: var(--text-soft);
  font-size: 11px;
}

.legal-toc a {
  display: grid;
  grid-template-columns: 23px minmax(0, 1fr);
  align-items: center;
  min-height: 42px;
  padding: 0 10px;
  border-radius: 10px;
  color: var(--muted);
  gap: 7px;
  font-size: 11px;
}

.legal-toc a:hover,
.legal-toc a:focus-visible {
  color: var(--text);
  background: rgba(126, 113, 255, 0.08);
}

.legal-toc a span {
  color: var(--violet-light);
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 9px;
}

.legal-content {
  display: grid;
  gap: 18px;
}

.legal-section {
  padding: 31px;
  scroll-margin-top: 88px;
}

.legal-section > header {
  display: flex;
  align-items: start;
  justify-content: space-between;
  padding-bottom: 21px;
  border-bottom: 1px solid var(--line);
  gap: 20px;
}

.legal-section h2 {
  margin: 0;
  font-size: 22px;
  letter-spacing: -0.03em;
}

.legal-section header p:not(.eyebrow) {
  margin: 7px 0 0;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.65;
}

.legal-points {
  display: grid;
  padding: 0;
  margin: 22px 0 0;
  list-style: none;
  gap: 1px;
}

.legal-points li {
  position: relative;
  padding: 17px 16px 17px 34px;
  border-bottom: 1px solid var(--line);
}

.legal-points li:last-child {
  border-bottom: 0;
}

.legal-points li::before {
  position: absolute;
  top: 21px;
  left: 11px;
  width: 7px;
  height: 7px;
  border: 2px solid var(--violet-light);
  border-radius: 50%;
  content: "";
}

.legal-points strong,
.legal-flow strong,
.legal-data-map strong,
.legal-risk-grid strong {
  display: block;
  color: var(--text-soft);
  font-size: 12px;
}

.legal-points p,
.legal-flow p,
.legal-data-map p,
.legal-risk-grid p {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.75;
}

.legal-points.compact {
  margin-top: 13px;
}

.legal-data-map,
.legal-risk-grid,
.legal-maturity-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin: 22px 0 14px;
}

.legal-data-map article,
.legal-risk-grid article,
.legal-maturity-grid article {
  min-height: 148px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.02);
}

.legal-data-map article > span,
.legal-risk-grid article > span {
  display: inline-block;
  margin-bottom: 12px;
  color: var(--violet-light);
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 9px;
  letter-spacing: 0.08em;
}

.legal-flow {
  display: grid;
  padding: 0;
  margin: 22px 0;
  list-style: none;
  gap: 10px;
}

.legal-flow li {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr);
  align-items: start;
  padding: 15px;
  border: 1px solid var(--line);
  border-radius: 13px;
  gap: 12px;
  background: rgba(255, 255, 255, 0.018);
}

.legal-flow li > span {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border: 1px solid rgba(168, 159, 255, 0.2);
  border-radius: 11px;
  color: var(--violet-light);
  background: rgba(126, 113, 255, 0.07);
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 9px;
}

.legal-rate-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-top: 22px;
}

.legal-rate-grid article {
  padding: 20px;
  border: 1px solid rgba(168, 159, 255, 0.18);
  border-radius: 15px;
  background: linear-gradient(145deg, rgba(126, 113, 255, 0.08), rgba(66, 213, 202, 0.025));
}

.legal-rate-grid small {
  color: var(--muted);
  font-size: 9px;
  letter-spacing: 0.08em;
}

.legal-rate-grid strong {
  display: block;
  margin: 10px 0 7px;
  color: var(--violet-light);
  font-size: 34px;
  letter-spacing: -0.04em;
}

.legal-rate-grid p,
.legal-maturity-grid p {
  margin: 0;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.65;
}

.legal-risk-grid article > span {
  color: var(--amber);
}

.legal-disclaimer {
  margin: 14px 0 0;
  padding: 15px 16px;
  border-left: 2px solid var(--amber);
  color: var(--text-soft);
  background: rgba(231, 186, 102, 0.04);
  font-size: 10px;
  line-height: 1.7;
}

.legal-maturity-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-bottom: 0;
}

.legal-maturity-grid article {
  min-height: 165px;
}

.legal-maturity-grid h3 {
  margin: 16px 0 8px;
  font-size: 14px;
}

.portal-footer {
  border-top: 1px solid var(--line);
  background: rgba(6, 9, 15, 0.52);
}

.portal-footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 118px;
  gap: 24px;
}

.portal-footer p {
  margin: 0;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.6;
}

.portal-footer-links {
  display: flex;
  gap: 20px;
}

.portal-footer-links a {
  color: var(--text-soft);
  font-size: 11px;
}

.toast {
  position: fixed;
  z-index: 100;
  right: 20px;
  bottom: 20px;
  max-width: min(360px, calc(100% - 40px));
  padding: 13px 16px;
  border: 1px solid var(--line-strong);
  border-radius: 13px;
  color: var(--text-soft);
  background: rgba(20, 25, 42, 0.96);
  box-shadow: var(--shadow);
  font-size: 11px;
  line-height: 1.55;
}

.noscript {
  padding: 12px 16px;
  color: #f0c4cf;
  background: rgba(240, 127, 158, 0.12);
  text-align: center;
  font-size: 12px;
}

@media (max-width: 900px) {
  .portal-header-inner {
    flex-wrap: wrap;
    padding-block: 14px;
    gap: 13px;
  }

  .portal-nav {
    order: 2;
    width: 100%;
    margin: 0;
    overflow-x: auto;
    scrollbar-width: none;
  }

  .portal-nav::-webkit-scrollbar {
    display: none;
  }

  .portal-nav a {
    flex: 0 0 auto;
  }

  .account-link {
    margin-left: auto;
  }

  .checkout-layout,
  .referral-overview,
  .auth-layout {
    grid-template-columns: 1fr;
  }

  .auth-layout {
    min-height: 0;
    gap: 34px;
  }

  .auth-intro {
    max-width: 720px;
  }

  .auth-panel {
    width: min(100%, 620px);
    min-height: 0;
  }

  .summary-card {
    position: static;
    grid-row: 1;
  }

  .account-grid,
  .tutorial-layout,
  .legal-layout {
    grid-template-columns: 1fr;
  }

  .account-sidebar,
  .tutorial-toc,
  .legal-toc {
    position: static;
    display: flex;
    overflow-x: auto;
    scrollbar-width: none;
  }

  .account-sidebar::-webkit-scrollbar,
  .tutorial-toc::-webkit-scrollbar,
  .legal-toc::-webkit-scrollbar {
    display: none;
  }

  .account-sidebar a,
  .account-sidebar button,
  .tutorial-toc a,
  .legal-toc a {
    width: auto;
    flex: 0 0 auto;
  }

  .tutorial-toc strong,
  .legal-toc strong {
    display: flex;
    align-items: center;
    flex: 0 0 auto;
    white-space: nowrap;
  }

  .account-sidebar .sidebar-danger {
    margin: 0 0 0 auto;
    border: 0;
    border-radius: 11px;
  }
}

@media (max-width: 640px) {
  .shell {
    width: min(calc(100% - 28px), var(--shell));
  }

  .portal-header-inner {
    min-height: 64px;
  }

  .brand-copy small {
    display: none;
  }

  .portal-nav {
    margin-inline: -4px;
  }

  .portal-nav a {
    padding: 9px 10px;
    font-size: 11px;
  }

  .portal-main {
    padding-block: 38px 72px;
  }

  .page-hero {
    grid-template-columns: 1fr;
    gap: 22px;
    margin-bottom: 24px;
  }

  .page-hero h1 {
    font-size: 38px;
  }

  .auth-intro h1 {
    font-size: 42px;
  }

  .auth-main {
    padding-block: 34px 66px;
  }

  .auth-panel {
    padding: 23px 20px;
  }

  .auth-signed-in,
  .auth-pending {
    min-height: 430px;
  }

  .auth-actions {
    display: grid;
  }

  .auth-offline,
  .auth-verification {
    display: grid;
  }

  .auth-offline .button,
  .auth-verification .button {
    width: 100%;
  }

  .page-hero-copy {
    font-size: 14px;
  }

  .hero-mark {
    display: none;
  }

  .panel {
    border-radius: 21px;
  }

  .panel-pad {
    padding: 20px;
  }

  .panel-heading {
    display: grid;
    gap: 12px;
  }

  .checkout-step {
    padding: 20px;
  }

  .step-index {
    position: static;
    margin-bottom: 14px;
  }

  .asset-grid,
  .overview-cards,
  .metric-grid,
  .maturity-grid,
  .legal-config-grid,
  .legal-data-map,
  .legal-risk-grid,
  .legal-maturity-grid,
  .legal-rate-grid {
    grid-template-columns: 1fr;
  }

  .form-grid,
  .share-actions,
  .payment-copy-actions,
  .boundary-grid {
    grid-template-columns: 1fr;
  }

  .share-qr {
    grid-template-columns: 96px 1fr;
  }

  .share-qr svg {
    width: 96px;
    height: 96px;
  }

  .checkout-action {
    display: grid;
  }

  .auth-callout {
    display: grid;
  }

  .checkout-action .button {
    width: 100%;
  }

  .price-lock strong {
    font-size: 31px;
  }

  .account-sidebar,
  .tutorial-toc,
  .legal-toc {
    margin-inline: -14px;
    border-right: 0;
    border-left: 0;
    border-radius: 0;
  }

  .data-row {
    grid-template-columns: 1fr;
  }

  .data-row-meta {
    justify-content: space-between;
  }

  .tutorial-section {
    padding: 23px 20px;
  }

  .legal-section {
    padding: 23px 20px;
  }

  .tutorial-section > header,
  .legal-section > header {
    display: grid;
  }

  .legal-gate-state {
    align-items: start;
    padding-block: 13px;
  }

  .ledger-wrap {
    overflow-x: auto;
  }

  .ledger-table {
    min-width: 580px;
  }

  .portal-footer-inner {
    display: grid;
    padding-block: 30px;
  }

  .portal-footer-links {
    flex-wrap: wrap;
  }

  .toast {
    right: 14px;
    bottom: 14px;
    max-width: calc(100% - 28px);
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
  }
}
