:root {
  color-scheme: light;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: #ffffff;
  color: #172b4d;
  font-synthesis: none;
  text-rendering: optimizeLegibility;
  --background: #ffffff;
  --surface: #ffffff;
  --surface-soft: #eff6ff;
  --line: #e1e8f0;
  --line-strong: #b7cbee;
  --text: #172b4d;
  --muted: #526581;
  --subtle: #526581;
  --green: #0066e8;
  --green-strong: #0052bd;
  --gold: #946200;
  --danger: #b42318;
}

* {
  box-sizing: border-box;
}

html {
  min-width: 320px;
  min-height: 100%;
  background: #ffffff;
}

body {
  min-width: 320px;
  min-height: 100vh;
  margin: 0;
  background:
    #ffffff;
}

a {
  color: #0066e8;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

a:hover {
  color: #0052bd;
}

button,
input {
  font: inherit;
}

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

.site-shell {
  width: min(100% - 36px, 1120px);
  margin: 0 auto;
}

.site-header {
  display: flex;
  min-height: 82px;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: #172b4d;
  font-size: 1.02rem;
  font-weight: 800;
  letter-spacing: 0.01em;
  text-decoration: none;
}

.brand-mark {
  display: grid;
  width: 41px;
  height: 41px;
  place-items: center;
  border: 1px solid #b7cbee;
  border-radius: 13px;
  background: #0066e8;
  box-shadow: 0 11px 28px rgba(23, 43, 77, 0.08);
  color: #ffffff;
  font-weight: 900;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.text-link {
  padding: 10px 12px;
  color: #0066e8;
  font-size: 0.91rem;
  font-weight: 650;
  text-decoration: none;
}

.button,
.button-secondary,
.button-quiet {
  display: inline-flex;
  min-height: 46px;
  align-items: center;
  justify-content: center;
  padding: 11px 18px;
  border-radius: 12px;
  cursor: pointer;
  font-weight: 780;
  line-height: 1.1;
  text-decoration: none;
  transition: filter 150ms ease, transform 150ms ease, border-color 150ms ease;
}

.button {
  border: 0;
  background: #0066e8;
  box-shadow: 0 12px 30px rgba(23, 43, 77, 0.08);
  color: #ffffff;
}

.button-secondary,
.button-quiet {
  border: 1px solid var(--line-strong);
  background: #ffffff;
  color: #0066e8;
}

.button-quiet {
  min-height: 40px;
  padding: 9px 14px;
  color: #0066e8;
}

.button:hover:not(:disabled),
.button-secondary:hover:not(:disabled),
.button-quiet:hover:not(:disabled) {
  filter: brightness(1.07);
  transform: translateY(-1px);
}

.button:focus-visible,
.button-secondary:focus-visible,
.button-quiet:focus-visible,
input:focus-visible,
a:focus-visible {
  outline: 3px solid #0066e8;
  outline-offset: 3px;
}

.button:disabled,
.button-secondary:disabled,
.button-quiet:disabled {
  cursor: wait;
  filter: saturate(0.55);
  opacity: 0.62;
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(300px, 0.85fr);
  gap: clamp(42px, 8vw, 92px);
  align-items: center;
  padding: clamp(70px, 10vw, 122px) 0 78px;
}

.eyebrow {
  margin: 0 0 14px;
  color: #0066e8;
  font-size: 0.77rem;
  font-weight: 850;
  letter-spacing: 0.15em;
  text-transform: none;
}

h1,
h2,
h3,
p {
  overflow-wrap: anywhere;
}

h1 {
  max-width: 780px;
  margin: 0;
  color: #172b4d;
  font-size: clamp(2.55rem, 7vw, 5.2rem);
  line-height: 0.98;
  letter-spacing: -0.058em;
}

.auth-card h1,
.legal-card h1,
.portal-heading h1 {
  font-size: clamp(2.15rem, 6vw, 3.65rem);
  line-height: 1.02;
}

.lead {
  max-width: 680px;
  margin: 24px 0 0;
  color: #526581;
  font-size: clamp(1rem, 2vw, 1.14rem);
  line-height: 1.75;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 32px;
}

.safety-note {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  margin-top: 25px;
  color: #526581;
  font-size: 0.86rem;
  line-height: 1.55;
}

.safety-dot {
  width: 8px;
  height: 8px;
  flex: 0 0 auto;
  margin-top: 6px;
  border-radius: 50%;
  background: #16794a;
  box-shadow: 0 0 0 5px rgba(23, 43, 77, 0.08);
}

.preview-panel,
.auth-card,
.legal-card,
.portal-card {
  border: 1px solid var(--line);
  background: #ffffff;
  box-shadow: 0 30px 90px rgba(23, 43, 77, 0.08);
}

.preview-panel {
  padding: 26px;
  border-radius: 26px;
}

.preview-topline {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 15px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--line);
}

.preview-label {
  color: #172b4d;
  font-size: 0.86rem;
  font-weight: 750;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 6px 10px;
  border: 1px solid #b7ddc8;
  border-radius: 999px;
  background: #edf8f1;
  color: #16794a;
  font-size: 0.73rem;
  font-weight: 800;
  text-transform: none;
}

.status-pill::before {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #16794a;
  content: "";
}

.preview-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-top: 20px;
}

.metric {
  min-height: 102px;
  padding: 16px;
  border: 1px solid #e1e8f0;
  border-radius: 16px;
  background: #eff6ff;
}

.metric-wide {
  grid-column: 1 / -1;
}

.metric-label {
  display: block;
  color: #526581;
  font-size: 0.76rem;
  font-weight: 720;
  letter-spacing: 0.05em;
  text-transform: none;
}

.metric strong {
  display: block;
  margin-top: 10px;
  color: #172b4d;
  font-size: 1.08rem;
}

.metric span:last-child {
  display: block;
  margin-top: 5px;
  color: #526581;
  font-size: 0.8rem;
}

.feature-section {
  padding: 34px 0 95px;
}

.feature-section h2 {
  max-width: 640px;
  margin: 0;
  color: #172b4d;
  font-size: clamp(1.85rem, 4vw, 3rem);
  letter-spacing: -0.04em;
}

.feature-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  margin-top: 34px;
}

.feature-card {
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: 19px;
  background: #eff6ff;
}

.feature-index {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border: 1px solid #b7cbee;
  border-radius: 10px;
  color: #0066e8;
  font-size: 0.78rem;
  font-weight: 850;
}

.feature-card h3 {
  margin: 20px 0 9px;
  color: #172b4d;
  font-size: 1.05rem;
}

.feature-card p {
  margin: 0;
  color: #526581;
  font-size: 0.91rem;
  line-height: 1.65;
}

.auth-layout,
.legal-layout,
.portal-layout {
  padding: 42px 0 78px;
}

.auth-card {
  width: min(100%, 620px);
  margin: 0 auto;
  padding: clamp(27px, 6vw, 48px);
  border-radius: 26px;
}

.auth-command-grid {
  display: grid;
  width: min(100%, 1080px);
  margin: 0 auto;
  grid-template-columns: minmax(280px, 0.82fr) minmax(440px, 1.18fr);
  gap: 18px;
  align-items: stretch;
}

.auth-command-grid .auth-card {
  width: 100%;
  margin: 0;
}

.auth-vision {
  position: relative;
  display: flex;
  min-height: 650px;
  flex-direction: column;
  justify-content: flex-end;
  overflow: hidden;
  padding: clamp(27px, 4.8vw, 44px);
  border: 1px solid #e1e8f0;
  border-radius: 26px;
  background:
    linear-gradient(145deg, #ffffff, #eff6ff);
  box-shadow: 0 30px 90px rgba(23, 43, 77, 0.08);
}

.auth-vision::before,
.auth-vision::after {
  position: absolute;
  width: 310px;
  height: 310px;
  border: 1px solid #e1e8f0;
  border-radius: 50%;
  content: "";
  pointer-events: none;
}

.auth-vision::before {
  top: -104px;
  right: -128px;
}

.auth-vision::after {
  top: -48px;
  right: -72px;
}

.auth-orbit {
  position: absolute;
  top: clamp(56px, 7vw, 84px);
  left: 50%;
  display: grid;
  width: 190px;
  height: 190px;
  place-items: center;
  border: 1px solid #e1e8f0;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(0, 102, 232, 0.12), rgba(0, 102, 232, 0.02) 58%, transparent 60%);
  box-shadow: 0 0 70px rgba(23, 43, 77, 0.08);
  transform: translateX(-50%);
}

.auth-orbit::before,
.auth-orbit::after {
  position: absolute;
  border: 1px solid #e1e8f0;
  border-radius: 50%;
  content: "";
}

.auth-orbit::before {
  width: 134px;
  height: 134px;
}

.auth-orbit::after {
  width: 88px;
  height: 88px;
  border-color: #b7cbee;
  background: #0066e8;
}

.auth-orbit span {
  position: relative;
  z-index: 1;
  color: #ffffff;
  font-size: 2.2rem;
  font-weight: 950;
}

.auth-vision .eyebrow {
  position: relative;
  z-index: 1;
}

.auth-vision h2 {
  position: relative;
  z-index: 1;
  margin: 0;
  color: #172b4d;
  font-size: clamp(2.15rem, 4.2vw, 3.4rem);
  line-height: 0.98;
  letter-spacing: -0.055em;
}

.auth-vision > p:not(.eyebrow) {
  position: relative;
  z-index: 1;
  margin: 18px 0 0;
  color: #526581;
  font-size: 0.92rem;
  line-height: 1.65;
}

.identity-route {
  position: relative;
  z-index: 1;
  display: grid;
  margin-top: 24px;
  grid-template-columns: auto 1fr auto 1fr auto;
  gap: 9px;
  align-items: center;
  color: #526581;
  font-size: 0.66rem;
  font-weight: 850;
  letter-spacing: 0.1em;
}

.identity-route strong {
  padding: 7px 9px;
  border: 1px solid #b7cbee;
  border-radius: 999px;
  color: #0066e8;
  font-size: 0.64rem;
  text-align: center;
}

.identity-route i {
  height: 1px;
  background: linear-gradient(90deg, #e1e8f0, #0066e8);
}

.auth-trust-grid {
  position: relative;
  z-index: 1;
  display: grid;
  margin-top: 24px;
  grid-template-columns: repeat(3, 1fr);
  gap: 7px;
}

.auth-trust-grid div {
  min-height: 76px;
  padding: 11px;
  border: 1px solid #e1e8f0;
  border-radius: 13px;
  background: #eff6ff;
}

.auth-trust-grid strong,
.auth-trust-grid span {
  display: block;
}

.auth-trust-grid strong {
  color: #0066e8;
  font-size: 0.68rem;
  letter-spacing: 0.08em;
}

.auth-trust-grid span {
  margin-top: 11px;
  color: #526581;
  font-size: 0.72rem;
  line-height: 1.35;
}

.identity-badge {
  display: inline-flex;
  gap: 8px;
  align-items: center;
  margin-bottom: 20px;
  padding: 7px 10px;
  border: 1px solid #b7cbee;
  border-radius: 999px;
  background: #eff6ff;
  color: #0066e8;
  font-size: 0.72rem;
  font-weight: 750;
}

.identity-badge span {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #0066e8;
  box-shadow: 0 0 0 4px rgba(23, 43, 77, 0.08);
}

.auth-card .lead,
.legal-card .lead {
  margin-top: 17px;
  font-size: 0.99rem;
}

.form {
  margin-top: 28px;
}

.form[hidden],
[hidden] {
  display: none !important;
}

.field {
  margin-bottom: 18px;
}

.field-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

label {
  display: block;
  margin-bottom: 8px;
  color: #172b4d;
  font-size: 0.9rem;
  font-weight: 690;
}

input[type="text"],
input[type="email"],
input[type="password"],
input[type="number"],
input[type="file"],
input[type="search"],
select,
textarea {
  width: 100%;
  min-height: 50px;
  padding: 12px 14px;
  border: 1px solid #e1e8f0;
  border-radius: 11px;
  outline: none;
  background: #ffffff;
  color: #172b4d;
  transition: border-color 140ms ease, box-shadow 140ms ease;
}

textarea {
  min-height: 96px;
  resize: vertical;
  font: inherit;
}

select {
  font: inherit;
}

input[type="file"] {
  padding: 11px;
}

input[type="file"]::file-selector-button {
  margin-right: 12px;
  padding: 8px 11px;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  background: #ffffff;
  color: var(--text);
  cursor: pointer;
}

input:focus,
select:focus,
textarea:focus {
  border-color: #b7cbee;
  box-shadow: 0 0 0 3px rgba(23, 43, 77, 0.08);
}

input:disabled,
select:disabled,
textarea:disabled,
button:disabled {
  cursor: not-allowed;
  opacity: 0.58;
}

.field-hint {
  margin: 7px 0 0;
  color: #526581;
  font-size: 0.79rem;
  line-height: 1.5;
}

.checkbox-row {
  display: grid;
  grid-template-columns: 20px 1fr;
  gap: 10px;
  align-items: start;
  margin: 14px 0;
  color: #526581;
  font-size: 0.86rem;
  line-height: 1.5;
}

.checkbox-row input {
  width: 17px;
  height: 17px;
  margin: 3px 0 0;
  accent-color: #0066e8;
}

.form .button {
  width: 100%;
  margin-top: 10px;
}

.form-meta {
  display: flex;
  justify-content: flex-end;
  margin: -4px 0 20px;
  font-size: 0.85rem;
}

.status-message {
  margin-top: 22px;
  padding: 14px 16px;
  border: 1px solid #e1e8f0;
  border-radius: 13px;
  background: #ffffff;
  color: #172b4d;
  font-size: 0.91rem;
  line-height: 1.5;
}

.status-message[data-kind="success"] {
  border-color: #b7ddc8;
  background: #edf8f1;
  color: #16794a;
}

.status-message[data-kind="error"] {
  border-color: #f0b6b1;
  background: #fff1f0;
  color: #b42318;
}

.auth-switch,
.security-copy {
  color: #526581;
  font-size: 0.84rem;
  line-height: 1.55;
  text-align: center;
}

.auth-switch {
  margin: 25px 0 0;
}

.security-copy {
  max-width: 580px;
  margin: 19px auto 0;
}

.preview-banner {
  margin-bottom: 24px;
  padding: 13px 15px;
  border: 1px solid #e6d198;
  border-radius: 12px;
  background: #fff8e8;
  color: #946200;
  font-size: 0.84rem;
  line-height: 1.55;
}

.legal-card {
  width: min(100%, 820px);
  margin: 0 auto;
  padding: clamp(27px, 6vw, 54px);
  border-radius: 26px;
}

.legal-meta {
  margin-top: 14px;
  color: #946200;
  font-size: 0.8rem;
  font-weight: 750;
}

.legal-section {
  margin-top: 34px;
  padding-top: 28px;
  border-top: 1px solid var(--line);
}

.legal-section h2 {
  margin: 0 0 12px;
  color: #172b4d;
  font-size: 1.2rem;
}

.legal-section p,
.legal-section li {
  color: #526581;
  font-size: 0.92rem;
  line-height: 1.7;
}

.legal-section ul {
  padding-left: 20px;
}

.portal-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 22px;
  margin: 18px 0 28px;
}

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

.portal-card {
  grid-column: span 4;
  min-height: 190px;
  padding: 23px;
  border-radius: 19px;
}

.portal-card-wide {
  grid-column: span 8;
}

.portal-card-full {
  grid-column: 1 / -1;
  min-height: auto;
}

.card-kicker {
  margin: 0;
  color: #526581;
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: none;
}

.portal-card h2 {
  margin: 14px 0 9px;
  color: #172b4d;
  font-size: 1.18rem;
}

.portal-card p {
  margin: 0;
  color: #526581;
  font-size: 0.88rem;
  line-height: 1.6;
}

.availability {
  display: inline-flex;
  margin-top: 20px;
  padding: 6px 9px;
  border: 1px solid #e1e8f0;
  border-radius: 999px;
  color: #946200;
  font-size: 0.72rem;
  font-weight: 800;
}

.availability[data-state="verified"] {
  border-color: #b7ddc8;
  background: #edf8f1;
  color: #16794a;
}

.availability[data-state="error"] {
  border-color: #f0b6b1;
  background: #fff1f0;
  color: #b42318;
}

.connection-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
}

.connection-heading .availability {
  flex: 0 0 auto;
  margin-top: 13px;
}

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

.connection-meta div {
  min-width: 0;
  padding: 15px;
  border: 1px solid #e1e8f0;
  border-radius: 12px;
  background: #eff6ff;
}

.connection-meta span,
.connection-meta strong {
  display: block;
  overflow-wrap: anywhere;
}

.connection-meta span {
  color: #526581;
  font-size: 0.71rem;
  font-weight: 750;
  letter-spacing: 0.05em;
  text-transform: none;
}

.connection-meta strong {
  margin-top: 8px;
  color: #172b4d;
  font-size: 0.9rem;
}

.connection-form {
  padding-top: 22px;
  border-top: 1px solid var(--line);
}

.connection-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 20px;
}

.connection-secondary-actions {
  margin-top: 10px;
}

.danger-action {
  border-color: #f0b6b1;
  color: #b42318;
}

.account-lines {
  display: grid;
  gap: 8px;
  margin-top: 18px;
}

.account-lines span {
  color: #526581;
  font-size: 0.85rem;
}

.commercial-card {
  display: block;
}

.payment-instructions {
  display: grid;
  gap: 7px;
  margin-top: 22px;
  padding: 17px;
  border: 1px solid #e1e8f0;
  border-radius: 13px;
  background: #eff6ff;
}

.payment-instructions span {
  color: #0066e8;
  font-size: 0.73rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: none;
}

.payment-instructions strong {
  color: #172b4d;
  font-size: 1.12rem;
  overflow-wrap: anywhere;
}

.payment-instructions p {
  white-space: pre-line;
}

.compact-form {
  margin-top: 22px;
}

.commercial-fields {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.payment-history-block {
  margin-top: 28px;
  padding-top: 22px;
  border-top: 1px solid var(--line);
}

.payment-history-block h3 {
  margin: 0 0 12px;
  color: #172b4d;
  font-size: 0.95rem;
}

.commercial-list {
  display: grid;
  gap: 9px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.commercial-list li {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 15px;
  padding: 11px 13px;
  border: 1px solid #e1e8f0;
  border-radius: 10px;
  background: #eff6ff;
}

.commercial-list strong {
  color: #172b4d;
  font-size: 0.84rem;
}

.commercial-list span {
  color: var(--muted);
  font-size: 0.78rem;
  text-align: right;
}

.availability[data-state="active"] {
  border-color: #b7ddc8;
  color: #16794a;
}

.owner-layout,
.owner-list {
  display: grid;
  gap: 16px;
}

.owner-layout {
  margin-top: 16px;
}

.owner-list {
  margin-top: 24px;
}

.owner-item {
  padding: 18px;
  border: 1px solid #e1e8f0;
  border-radius: 14px;
  background: #eff6ff;
}

.choice-row,
.action-row,
.payment-review-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px;
}

.choice-row .checkbox-row {
  margin: 3px 12px 12px 0;
}

.payment-review-head {
  justify-content: space-between;
}

.payment-review-head > div {
  display: grid;
  gap: 5px;
}

.payment-review-head strong {
  color: #172b4d;
}

.payment-review-head span:not(.availability) {
  color: var(--muted);
  font-size: 0.8rem;
}

.payment-review-head .availability {
  margin-top: 0;
}

.payment-meta {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin: 18px 0;
}

.payment-meta div {
  min-width: 0;
  padding: 12px;
  border-radius: 10px;
  background: #eff6ff;
}

.payment-meta dt {
  color: var(--subtle);
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.07em;
  text-transform: none;
}

.payment-meta dd {
  margin: 6px 0 0;
  color: #172b4d;
  font-size: 0.82rem;
  overflow-wrap: anywhere;
}

.action-row {
  justify-content: flex-end;
}

.action-row .button,
.action-row .button-secondary,
.owner-plan-form .button-secondary {
  min-height: 42px;
  padding: 9px 14px;
}

.empty-state {
  margin: 0;
  color: var(--muted);
}

.site-footer {
  display: flex;
  min-height: 90px;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  border-top: 1px solid #e1e8f0;
  color: #526581;
  font-size: 0.79rem;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 15px;
}

.footer-links a {
  color: #526581;
}

@media (max-width: 860px) {
  .hero {
    grid-template-columns: 1fr;
  }

  .preview-panel {
    width: min(100%, 600px);
  }

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

  .auth-command-grid {
    max-width: 660px;
    grid-template-columns: 1fr;
  }

  .auth-vision {
    min-height: 560px;
  }

  .portal-card,
  .portal-card-wide {
    grid-column: span 6;
  }

  .portal-card-full {
    grid-column: 1 / -1;
  }
}

@media (max-width: 620px) {
  .site-shell {
    width: min(100% - 22px, 1120px);
  }

  .site-header {
    min-height: 72px;
  }

  .header-actions .text-link {
    display: none;
  }

  .hero {
    padding-top: 48px;
  }

  .field-row {
    grid-template-columns: 1fr;
    gap: 0;
  }

  .auth-layout {
    padding-top: 20px;
  }

  .auth-vision {
    min-height: 500px;
  }

  .auth-orbit {
    top: 48px;
    width: 158px;
    height: 158px;
  }

  .auth-orbit::before {
    width: 112px;
    height: 112px;
  }

  .auth-orbit::after {
    width: 72px;
    height: 72px;
  }

  .commercial-fields,
  .payment-meta,
  .connection-meta {
    grid-template-columns: 1fr;
  }

  .connection-heading {
    flex-direction: column;
  }

  .connection-heading .availability {
    margin-top: 0;
  }

  .commercial-list li {
    align-items: flex-start;
    flex-direction: column;
  }

  .commercial-list span {
    text-align: left;
  }

  .portal-heading {
    align-items: flex-start;
    flex-direction: column;
  }

  .portal-card,
  .portal-card-wide,
  .portal-card-full {
    grid-column: 1 / -1;
  }

  .site-footer {
    align-items: flex-start;
    flex-direction: column;
    justify-content: center;
    padding: 24px 0;
  }
}

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

/* Foundation 12 — Orbit Command Deck
   Portal-only rules are namespaced so the public, identity and owner pages
   retain their proven layouts and security behavior. */

.portal-body {
  min-height: 100vh;
  overflow-x: hidden;
  background:
    #ffffff;
  background-size: 48px 48px, 48px 48px, auto, auto, auto;
}

.skip-link {
  position: fixed;
  z-index: 100;
  top: 12px;
  left: 12px;
  padding: 10px 14px;
  border-radius: 10px;
  background: #0066e8;
  color: #ffffff;
  font-weight: 800;
  transform: translateY(-150%);
}

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

.command-shell {
  display: grid;
  width: min(100%, 1720px);
  min-height: 100vh;
  grid-template-columns: 274px minmax(0, 1fr);
  margin: 0 auto;
}

.command-sidebar {
  position: sticky;
  z-index: 20;
  top: 0;
  display: flex;
  height: 100vh;
  flex-direction: column;
  padding: 28px 20px 22px;
  border-right: 1px solid #e1e8f0;
  background:
    #ffffff;
  box-shadow: 20px 0 70px rgba(23, 43, 77, 0.08);
}

.command-sidebar::after {
  position: absolute;
  inset: 0 0 auto;
  height: 3px;
  background: linear-gradient(90deg, #0066e8, transparent);
  content: "";
}

.command-brand {
  display: flex;
  align-items: center;
  gap: 13px;
  color: #172b4d;
  text-decoration: none;
}

.orbit-emblem {
  position: relative;
  display: grid;
  width: 48px;
  height: 48px;
  flex: 0 0 auto;
  place-items: center;
  border: 1px solid #b7cbee;
  border-radius: 15px;
  background: #0066e8;
  box-shadow: 0 14px 36px rgba(23, 43, 77, 0.08), inset 0 0 22px rgba(23, 43, 77, 0.08);
  color: #ffffff;
  font-size: 1.03rem;
  font-weight: 900;
}

.orbit-emblem::before,
.orbit-emblem::after {
  position: absolute;
  border: 1px solid #e1e8f0;
  border-radius: 50%;
  content: "";
  transform: rotate(-28deg);
}

.orbit-emblem::before {
  width: 34px;
  height: 13px;
}

.orbit-emblem::after {
  width: 27px;
  height: 9px;
  border-color: #e1e8f0;
  transform: rotate(31deg);
}

.orbit-emblem span {
  position: relative;
  z-index: 1;
}

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

.command-brand-copy strong {
  color: #172b4d;
  font-size: 1.02rem;
  letter-spacing: 0.01em;
}

.command-brand-copy small {
  color: #526581;
  font-size: 0.68rem;
  font-weight: 750;
  letter-spacing: 0.11em;
  text-transform: none;
}

.workspace-identity {
  display: grid;
  gap: 5px;
  margin: 32px 5px 14px;
  padding: 0 9px 15px;
  border-bottom: 1px solid #e1e8f0;
}

.workspace-identity span {
  color: #526581;
  font-size: 0.65rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: none;
}

.workspace-identity strong {
  color: #172b4d;
  font-size: 0.84rem;
}

.command-nav {
  display: grid;
  gap: 6px;
}

.command-nav-item {
  display: grid;
  width: 100%;
  min-height: 50px;
  grid-template-columns: 32px 1fr;
  align-items: center;
  padding: 8px 12px;
  border: 1px solid transparent;
  border-radius: 13px;
  background: transparent;
  color: #0066e8;
  cursor: pointer;
  font: inherit;
  font-size: 0.82rem;
  font-weight: 750;
  text-align: left;
  transition: background 160ms ease, border-color 160ms ease, color 160ms ease, transform 160ms ease;
}

.command-nav-item:hover {
  border-color: #e1e8f0;
  background: #eff6ff;
  color: #172b4d;
  transform: translateX(2px);
}

.command-nav-item[aria-selected="true"] {
  border-color: #b7cbee;
  background: #0066e8;
  box-shadow: inset 3px 0 0 #0066e8;
  color: #ffffff;
}

.nav-symbol {
  display: grid;
  width: 26px;
  height: 26px;
  place-items: center;
  border: 1px solid #b7cbee;
  border-radius: 8px;
  background: #eff6ff;
  color: #0066e8;
  font-size: 0.67rem;
  font-weight: 900;
}

.command-nav-item[aria-selected="true"] .nav-symbol {
  border-color: #e1e8f0;
  background: #0052bd;
  color: #ffffff;
}

.sidebar-safety {
  display: flex;
  align-items: center;
  gap: 11px;
  margin-top: auto;
  padding: 14px;
  border: 1px solid #e1e8f0;
  border-radius: 14px;
  background: #eff6ff;
}

.pulse-dot {
  position: relative;
  width: 9px;
  height: 9px;
  flex: 0 0 auto;
  border-radius: 50%;
  background: #16794a;
  box-shadow: 0 0 0 5px rgba(23, 43, 77, 0.08);
}

.sidebar-safety div {
  display: grid;
  gap: 3px;
}

.sidebar-safety strong {
  color: #172b4d;
  font-size: 0.73rem;
}

.sidebar-safety div span {
  color: #526581;
  font-size: 0.66rem;
}

.sidebar-footer {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  margin-top: 16px;
  padding: 0 4px;
  color: #526581;
  font-size: 0.58rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: none;
}

.command-main {
  display: flex;
  min-width: 0;
  min-height: 100vh;
  flex-direction: column;
}

.command-topbar {
  position: sticky;
  z-index: 10;
  top: 0;
  display: flex;
  min-height: 106px;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 22px clamp(24px, 4vw, 56px);
  border-bottom: 1px solid #e1e8f0;
  background: #ffffff;
  backdrop-filter: blur(20px);
}

.topbar-title {
  display: grid;
  min-width: 0;
  gap: 3px;
}

.topbar-title p {
  margin: 0;
  color: #0066e8;
  font-size: 0.63rem;
  font-weight: 850;
  letter-spacing: 0.14em;
  text-transform: none;
}

.topbar-title h1 {
  margin: 0;
  color: #172b4d;
  font-size: clamp(1.45rem, 3vw, 2rem);
  letter-spacing: -0.035em;
  line-height: 1.1;
}

.topbar-title > span {
  overflow: hidden;
  max-width: 680px;
  color: #526581;
  font-size: 0.75rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.topbar-actions {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 12px;
}

.secure-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 11px;
  border: 1px solid #e1e8f0;
  border-radius: 999px;
  background: #eff6ff;
  color: #526581;
  font-size: 0.68rem;
  font-weight: 760;
}

.secure-chip > span {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #16794a;
  box-shadow: 0 0 12px rgba(23, 43, 77, 0.08);
}

.command-workspace {
  width: 100%;
  max-width: 1446px;
  flex: 1;
  margin: 0 auto;
  padding: 26px clamp(24px, 4vw, 56px) 56px;
}

.global-status {
  margin: 0 0 18px;
  border-radius: 13px;
}

.portal-command-content,
.portal-view {
  min-width: 0;
}

.portal-view[hidden] {
  display: none !important;
}

.portal-view:not([hidden]) {
  animation: command-view-in 220ms ease-out;
}

@keyframes command-view-in {
  from { opacity: 0; transform: translateY(7px); }
  to { opacity: 1; transform: translateY(0); }
}

.command-hero {
  position: relative;
  display: grid;
  min-height: 340px;
  grid-template-columns: minmax(0, 1.25fr) minmax(280px, 0.75fr);
  gap: clamp(30px, 6vw, 86px);
  align-items: center;
  overflow: hidden;
  padding: clamp(30px, 5vw, 58px);
  border: 1px solid #e1e8f0;
  border-radius: 28px;
  background:
    #eff6ff;
  box-shadow: 0 30px 90px rgba(23, 43, 77, 0.08);
}

.command-hero::before {
  position: absolute;
  top: 0;
  left: 0;
  width: 42%;
  height: 3px;
  background: linear-gradient(90deg, #0066e8, transparent);
  content: "";
}

.command-hero-copy {
  position: relative;
  z-index: 1;
}

.command-hero-copy h2 {
  max-width: 700px;
  margin: 0;
  color: #172b4d;
  font-size: clamp(2.35rem, 5.2vw, 4.85rem);
  letter-spacing: -0.064em;
  line-height: 0.98;
}

.command-hero-copy h2 span {
  color: #0066e8;
}

.command-hero-copy > p:last-of-type {
  max-width: 650px;
  margin: 22px 0 0;
  color: #526581;
  font-size: clamp(0.93rem, 1.5vw, 1.05rem);
  line-height: 1.7;
}

.orbit-visual {
  position: relative;
  display: grid;
  width: min(28vw, 310px);
  min-width: 250px;
  aspect-ratio: 1;
  place-items: center;
  justify-self: center;
}

.orbit-ring {
  position: absolute;
  border: 1px solid #e1e8f0;
  border-radius: 50%;
}

.orbit-ring-one {
  inset: 9%;
  border-style: dashed;
  transform: rotate(-18deg) scaleY(0.63);
}

.orbit-ring-two {
  inset: 20%;
  border-color: #e1e8f0;
  transform: rotate(42deg) scaleY(0.68);
}

.orbit-core {
  display: grid;
  width: 82px;
  height: 82px;
  place-items: center;
  border: 1px solid #b7cbee;
  border-radius: 26px;
  background: #0066e8;
  box-shadow: 0 0 70px rgba(23, 43, 77, 0.08), inset 0 0 25px rgba(23, 43, 77, 0.08);
  color: #ffffff;
  font-size: 1.75rem;
  font-weight: 900;
}

.orbit-caption {
  position: absolute;
  bottom: 16%;
  display: grid;
  min-width: 155px;
  gap: 3px;
  padding: 11px 15px;
  border: 1px solid #e1e8f0;
  border-radius: 13px;
  background: #eff6ff;
  box-shadow: 0 13px 34px rgba(23, 43, 77, 0.08);
  text-align: center;
}

.orbit-caption strong {
  color: #0066e8;
  font-size: 0.79rem;
  text-transform: none;
}

.orbit-caption small {
  color: #526581;
  font-size: 0.64rem;
}

.overview-grid {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: 14px;
  margin-top: 16px;
}

.overview-card {
  position: relative;
  min-height: 248px;
  grid-column: span 3;
  overflow: hidden;
  padding: 24px;
}

.overview-card::after {
  position: absolute;
  right: -36px;
  bottom: -48px;
  width: 130px;
  height: 130px;
  border: 1px solid #e1e8f0;
  border-radius: 50%;
  content: "";
}

.overview-card h2 {
  max-width: calc(100% - 44px);
}

.card-icon {
  position: absolute;
  top: 20px;
  right: 20px;
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  border: 1px solid #b7cbee;
  border-radius: 12px;
  background: #eff6ff;
  color: #0066e8;
  font-size: 0.7rem;
  font-weight: 900;
}

.card-icon-gold {
  border-color: #b7cbee;
  background: #eff6ff;
  color: #0066e8;
}

.card-icon-safe {
  border-color: #b7cbee;
  background: #eff6ff;
  color: #0066e8;
}

.module-launcher {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin-top: 16px;
}

.module-tile {
  position: relative;
  display: grid;
  min-height: 120px;
  grid-template-columns: 42px 1fr auto;
  grid-template-rows: auto auto;
  gap: 3px 12px;
  align-items: center;
  padding: 20px;
  border: 1px solid #e1e8f0;
  border-radius: 17px;
  background: #eff6ff;
  color: var(--text);
  cursor: pointer;
  font: inherit;
  text-align: left;
  transition: border-color 160ms ease, transform 160ms ease, box-shadow 160ms ease;
}

.module-tile:hover {
  border-color: #e1e8f0;
  box-shadow: 0 18px 40px rgba(23, 43, 77, 0.08);
  transform: translateY(-2px);
}

.module-index {
  display: grid;
  width: 42px;
  height: 42px;
  grid-row: 1 / span 2;
  place-items: center;
  border: 1px solid #b7cbee;
  border-radius: 12px;
  color: #0066e8;
  font-size: 0.7rem;
  font-weight: 900;
}

.module-tile strong {
  color: #172b4d;
  font-size: 0.94rem;
}

.module-tile small {
  grid-column: 2;
  color: #526581;
  font-size: 0.7rem;
  line-height: 1.35;
}

.module-arrow {
  grid-column: 3;
  grid-row: 1 / span 2;
  color: #0066e8;
  font-size: 1.15rem;
}

.section-intro {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 30px;
  margin: 12px 0 24px;
}

.section-intro > div {
  max-width: 780px;
}

.section-intro h2 {
  margin: 0;
  color: #172b4d;
  font-size: clamp(2.1rem, 5vw, 4.2rem);
  letter-spacing: -0.055em;
  line-height: 1;
}

.section-intro > div > p:last-child {
  margin: 16px 0 0;
  color: #526581;
  font-size: 0.93rem;
  line-height: 1.65;
}

.section-code {
  flex: 0 0 auto;
  padding: 9px 12px;
  border: 1px solid #b7cbee;
  border-radius: 10px;
  color: #0066e8;
  font-size: 0.67rem;
  font-weight: 850;
  letter-spacing: 0.09em;
}

.section-code-gold {
  border-color: #b7cbee;
  color: #0066e8;
}

.section-card-heading,
.history-heading,
.locked-module-head,
.future-console-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
}

.section-card-heading .availability,
.future-console-head .lock-chip {
  flex: 0 0 auto;
  margin-top: 0;
}

.history-heading {
  align-items: center;
}

.history-heading h3 {
  margin: 0;
}

.history-heading span {
  color: #526581;
  font-size: 0.7rem;
  font-weight: 750;
}

.control-preview-grid,
.security-grid,
.device-layout {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin-top: 14px;
}

.control-preview-grid.three-up {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.locked-module {
  min-height: 230px;
}

.locked-module .button-secondary {
  margin-top: 18px;
}

.lock-chip {
  display: inline-flex;
  padding: 7px 10px;
  border: 1px solid #e6d198;
  border-radius: 999px;
  color: #946200;
  font-size: 0.65rem;
  font-weight: 850;
  letter-spacing: 0.05em;
  text-transform: none;
}

.signal-line {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 15px;
  margin-top: 20px;
  padding: 13px 0 0;
  border-top: 1px solid var(--line);
  color: #526581;
  font-size: 0.75rem;
}

.signal-line strong {
  color: #172b4d;
}

.app-control-form {
  display: grid;
  gap: 18px;
}

.app-option-list {
  display: grid;
  gap: 10px;
  margin: 0;
  padding: 0;
  border: 0;
}

.app-option-list legend {
  margin-bottom: 2px;
  color: #526581;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.app-option-list label {
  display: flex;
  align-items: flex-start;
  gap: 11px;
  margin: 0;
  padding: 13px 14px;
  border: 1px solid #e1e8f0;
  border-radius: 12px;
  background: #eff6ff;
  color: #172b4d;
  cursor: pointer;
}

.app-option-list input {
  width: 17px;
  height: 17px;
  margin: 2px 0 0;
  accent-color: #0066e8;
}

.app-option-list span {
  min-width: 0;
  line-height: 1.45;
}

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

.app-setting-grid label {
  margin: 0;
}

.app-warning {
  color: #946200 !important;
  font-size: 0.78rem !important;
}

.pending-trade-card {
  display: grid;
  gap: 9px;
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
}

.pending-trade-card h4,
.pending-trade-card p {
  margin: 0;
}

.pending-countdown {
  color: #946200;
  font-size: 0.86rem;
}

.confirmation-phrase {
  display: grid;
  gap: 8px;
  margin-top: 16px;
  color: #946200;
  font-weight: 800;
}

.coin-selector-modes {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 18px 0 0;
  padding: 0;
  border: 0;
}

.coin-selector-modes legend {
  width: 100%;
  margin-bottom: 2px;
  color: #526581;
  font-size: 0.72rem;
  font-weight: 800;
}

.coin-selector-modes label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0;
  padding: 9px 13px;
  border: 1px solid #e1e8f0;
  border-radius: 999px;
  background: #eff6ff;
  color: #172b4d;
  cursor: pointer;
  font-size: 0.78rem;
}

.coin-selector-modes input {
  width: 16px;
  height: 16px;
  margin: 0;
  accent-color: #0066e8;
}

[data-live-coin-selector][data-selection-mode="ALL_96"] .coin-selector-options {
  opacity: 0.55;
}

.coin-selector-head,
.coin-selector-footer {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  margin-top: 20px;
}

.coin-selector-head > label {
  width: min(100%, 420px);
  margin: 0;
}

.coin-selector-head > div,
.coin-selector-footer > div {
  display: grid;
  gap: 8px;
}

.coin-selector-head > div {
  justify-items: end;
}

.coin-selector-head strong,
.coin-selector-footer strong {
  color: #0066e8;
  font-size: 0.82rem;
}

.coin-selector-options {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  max-height: 390px;
  margin-top: 16px;
  overflow: auto;
  border: 1px solid #e1e8f0;
  border-radius: 14px;
  background: #ffffff;
}

.coin-option {
  display: flex;
  align-items: center;
  gap: 9px;
  min-width: 0;
  margin: 0;
  padding: 12px;
  border-right: 1px solid #e1e8f0;
  border-bottom: 1px solid #e1e8f0;
  color: #172b4d;
  cursor: pointer;
  font-size: 0.8rem;
}

.coin-option:hover {
  background: #eff6ff;
}

.coin-option input {
  width: 17px;
  height: 17px;
  flex: 0 0 auto;
  margin: 0;
  accent-color: #0066e8;
}

.coin-option span {
  min-width: 0;
  overflow-wrap: anywhere;
}

.coin-selector-empty {
  grid-column: 1 / -1;
  padding: 22px;
  text-align: center;
}

.coin-selector-message {
  min-height: 24px;
  margin-top: 12px !important;
}

.coin-selector-message[data-kind="error"] {
  color: #b42318;
}

.coin-selector-footer {
  align-items: center;
  padding-top: 16px;
  border-top: 1px solid var(--line);
}

.coin-selector-footer span {
  color: #526581;
  font-size: 0.72rem;
  font-weight: 800;
}

.market-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 18px 20px;
  border: 1px solid #e1e8f0;
  border-radius: 17px;
  background: #eff6ff;
}

.market-banner > div {
  display: flex;
  align-items: center;
  gap: 14px;
}

.market-banner > div > div {
  display: grid;
  gap: 3px;
}

.market-banner strong {
  color: #172b4d;
  font-size: 0.88rem;
}

.market-banner small {
  color: #526581;
  font-size: 0.7rem;
}

.market-banner-gold {
  border-color: #e1e8f0;
  background: #eff6ff;
}

.market-symbol {
  display: grid;
  width: 46px;
  height: 46px;
  place-items: center;
  border: 1px solid #b7cbee;
  border-radius: 13px;
  background: #eff6ff;
  color: #0066e8;
  font-size: 0.7rem;
  font-weight: 900;
}

.future-console {
  margin-top: 14px;
}

.future-control-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-top: 24px;
}

.future-control-grid label {
  display: grid;
  gap: 8px;
}

.future-control-grid label span {
  color: #526581;
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: none;
}

.future-control-grid select,
.future-control-grid input {
  width: 100%;
  min-height: 44px;
  padding: 10px 12px;
  border: 1px solid #e1e8f0;
  border-radius: 10px;
  background: #eff6ff;
  color: #526581;
  font: inherit;
}

.empty-console {
  display: grid;
  min-height: 430px;
  place-items: center;
  align-content: center;
  padding: 50px;
  text-align: center;
}

.empty-console h2 {
  margin-top: 22px;
  font-size: 1.5rem;
}

.empty-console > p {
  max-width: 660px;
}

.empty-orbit {
  position: relative;
  display: grid;
  width: 92px;
  height: 92px;
  place-items: center;
  border: 1px dashed #e1e8f0;
  border-radius: 50%;
}

.empty-orbit::before {
  width: 62px;
  height: 28px;
  border: 1px solid #e1e8f0;
  border-radius: 50%;
  content: "";
  transform: rotate(-32deg);
}

.empty-orbit span {
  position: absolute;
  width: 18px;
  height: 18px;
  border-radius: 7px;
  background: #0066e8;
  box-shadow: 0 0 28px rgba(23, 43, 77, 0.08);
}

.empty-console-meta {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 9px;
  margin-top: 22px;
}

.empty-console-meta span {
  padding: 8px 10px;
  border: 1px solid #e1e8f0;
  border-radius: 9px;
  color: #526581;
  font-size: 0.69rem;
}

.empty-console-meta strong {
  margin-left: 4px;
  color: #526581;
}

.device-card {
  display: grid;
  min-height: 410px;
  grid-template-columns: 180px 1fr;
  gap: 28px;
  align-items: center;
}

.phone-preview {
  position: relative;
  width: 150px;
  height: 292px;
  padding: 11px;
  border: 1px solid #e1e8f0;
  border-radius: 29px;
  background: #ffffff;
  box-shadow: 0 24px 50px rgba(23, 43, 77, 0.08), inset 0 0 0 4px rgba(23, 43, 77, 0.08);
}

.phone-speaker {
  position: absolute;
  z-index: 2;
  top: 9px;
  left: 50%;
  width: 38px;
  height: 4px;
  border-radius: 4px;
  background: #172b4d;
  transform: translateX(-50%);
}

.phone-screen {
  display: grid;
  height: 100%;
  align-content: start;
  justify-items: start;
  gap: 8px;
  padding: 28px 12px 14px;
  border-radius: 20px;
  background: #ffffff;
}

.phone-screen > span {
  display: grid;
  width: 32px;
  height: 32px;
  place-items: center;
  border: 1px solid #b7cbee;
  border-radius: 10px;
  color: #0066e8;
  font-size: 0.75rem;
  font-weight: 900;
}

.phone-screen strong {
  color: #172b4d;
  font-size: 0.75rem;
}

.phone-screen small {
  color: #0066e8;
  font-size: 0.55rem;
  text-transform: none;
}

.phone-screen i {
  width: 100%;
  height: 44px;
  margin-top: 4px;
  border: 1px solid #e1e8f0;
  border-radius: 9px;
  background: #eff6ff;
}

.slot-card {
  min-height: 410px;
}

.device-slot {
  display: grid;
  grid-template-columns: 42px 1fr auto;
  gap: 12px;
  align-items: center;
  margin-top: 13px;
  padding: 14px;
  border: 1px solid #e1e8f0;
  border-radius: 13px;
  background: #eff6ff;
}

.device-slot > span {
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  border: 1px solid #b7cbee;
  border-radius: 11px;
  color: #0066e8;
  font-size: 0.65rem;
  font-weight: 900;
}

.device-slot > div {
  display: grid;
  gap: 3px;
}

.device-slot strong {
  color: #172b4d;
  font-size: 0.78rem;
}

.device-slot small {
  color: #526581;
  font-size: 0.66rem;
}

.device-slot b {
  color: #526581;
  font-size: 0.66rem;
}

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

.security-card {
  position: relative;
  min-height: 260px;
  overflow: hidden;
}

.security-number {
  position: absolute;
  top: 14px;
  right: 20px;
  color: rgba(0, 102, 232, 0.18);
  font-size: 3.2rem;
  font-weight: 900;
  letter-spacing: -0.08em;
}

.security-card h2 {
  max-width: 75%;
  margin-top: 24px;
}

.command-footer {
  display: flex;
  min-height: 76px;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin: 0 clamp(24px, 4vw, 56px);
  border-top: 1px solid #e1e8f0;
  color: #526581;
  font-size: 0.7rem;
}

.command-footer > span:last-child {
  display: flex;
  gap: 18px;
}

@media (max-width: 1260px) {
  .command-shell {
    grid-template-columns: 232px minmax(0, 1fr);
  }

  .overview-card {
    grid-column: span 6;
  }

  .module-launcher {
    grid-template-columns: 1fr;
  }

  .control-preview-grid.three-up,
  .future-control-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 920px) {
  .command-hero {
    grid-template-columns: 1fr;
  }

  .orbit-visual {
    display: none;
  }

  .device-card {
    grid-template-columns: 1fr;
  }

  .phone-preview {
    display: none;
  }
}

@media (max-width: 780px) {
  .portal-body {
    padding-bottom: 78px;
  }

  .command-shell {
    display: block;
  }

  .command-sidebar {
    position: fixed;
    z-index: 50;
    top: auto;
    right: 0;
    bottom: 0;
    left: 0;
    display: block;
    width: 100%;
    height: 74px;
    padding: 8px 10px calc(8px + env(safe-area-inset-bottom));
    border-top: 1px solid #e1e8f0;
    border-right: 0;
    background: #ffffff;
    box-shadow: 0 -18px 50px rgba(23, 43, 77, 0.08);
    backdrop-filter: blur(18px);
  }

  .command-sidebar::after,
  .command-brand,
  .workspace-identity,
  .sidebar-safety,
  .sidebar-footer {
    display: none;
  }

  .command-nav {
    display: flex;
    overflow-x: auto;
    gap: 5px;
    scrollbar-width: none;
  }

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

  .command-nav-item {
    min-width: 76px;
    min-height: 56px;
    flex: 1 0 76px;
    grid-template-columns: 1fr;
    justify-items: center;
    gap: 3px;
    padding: 4px 7px;
    border-radius: 11px;
    font-size: 0.58rem;
    text-align: center;
  }

  .command-nav-item:hover {
    transform: none;
  }

  .command-nav-item[aria-selected="true"] {
    box-shadow: inset 0 2px 0 #0066e8;
  }

  .nav-symbol {
    width: 25px;
    height: 25px;
    font-size: 0.62rem;
  }

  .command-topbar {
    min-height: 91px;
    padding: 16px 17px;
  }

  .topbar-title > span,
  .secure-chip {
    display: none;
  }

  .topbar-actions .button-quiet {
    min-height: 38px;
    padding: 8px 11px;
    font-size: 0.7rem;
  }

  .command-workspace {
    padding: 16px 12px 36px;
  }

  .command-hero {
    min-height: 0;
    padding: 27px 22px;
    border-radius: 21px;
  }

  .command-hero-copy h2 {
    font-size: clamp(2.15rem, 12vw, 3.4rem);
  }

  .overview-card,
  .control-preview-grid > *,
  .security-grid > *,
  .device-layout > * {
    grid-column: 1 / -1;
  }

  .overview-grid,
  .control-preview-grid,
  .control-preview-grid.three-up,
  .security-grid,
  .device-layout,
  .future-control-grid {
    grid-template-columns: 1fr;
  }

  .overview-card {
    min-height: 220px;
  }

  .section-intro {
    margin-top: 3px;
  }

  .section-intro h2 {
    font-size: clamp(2.1rem, 12vw, 3.35rem);
  }

  .section-code {
    display: none;
  }

  .section-card-heading,
  .future-console-head {
    flex-direction: column;
  }

  .empty-console {
    min-height: 360px;
    padding: 35px 21px;
  }

  .command-footer {
    align-items: flex-start;
    flex-direction: column;
    margin: 0 14px;
    padding: 22px 0;
  }
}

@media (max-width: 480px) {
  .topbar-title h1 {
    max-width: 210px;
    overflow: hidden;
    font-size: 1.3rem;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .hero-actions {
    display: grid;
  }

  .hero-actions .button,
  .hero-actions .button-secondary {
    width: 100%;
  }

  .module-tile {
    grid-template-columns: 38px 1fr auto;
    padding: 16px;
  }

  .market-banner {
    align-items: flex-start;
    flex-direction: column;
  }

  .device-slot {
    grid-template-columns: 38px 1fr;
  }

  .device-slot b {
    grid-column: 2;
  }
}

/* Foundation 14: horizontal native-style tabs, without shrinking phone labels. */
[data-bot-front] { display: grid; gap: 1rem; margin-bottom: 1.5rem; min-width: 0; }
.bot-tabs { display: flex; gap: .5rem; overflow-x: auto; padding: .5rem 0 1rem; scrollbar-width: thin; }
.bot-tabs button { flex: 0 0 auto; min-height: 44px; padding: .7rem 1rem; border: 1px solid #e1e8f0; border-radius: 12px; background: #ffffff; color: #0066e8; cursor: pointer; }
.bot-tabs button[aria-selected="true"] { background: #0066e8; color: #ffffff; }
.bot-tabs button:focus-visible { outline: 2px solid #0066e8; outline-offset: 2px; }
[data-bot-panel][hidden] { display: none; }
[data-bot-panel] { display: grid; gap: 1rem; min-width: 0; }
.bot-metrics { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: .75rem; margin: 0; }
.bot-metrics > div { background: #eff6ff; padding: 1rem; border: 1px solid #e1e8f0; border-radius: 16px; overflow-wrap: anywhere; }
.bot-metrics dt { color: #526581; font-size: .8rem; }
.bot-metrics dd { margin: .7rem 0 0; color: #172b4d; font-weight: 700; }
@media (max-width: 900px) { .bot-metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 420px) { .bot-metrics { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 860px) { .coin-selector-options { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 620px) {
  .app-setting-grid { grid-template-columns: minmax(0, 1fr); }
  .coin-selector-head,
  .coin-selector-footer { align-items: stretch; flex-direction: column; }
  .coin-selector-head > label { width: 100%; }
  .coin-selector-head > div { justify-items: start; }
  .coin-selector-options { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .coin-selector-footer .button { width: 100%; }
}

/* White / blue site appearance; layout and form behavior remain unchanged. */
.button:hover:not(:disabled),
.skip-link:focus {
  background: #0052bd;
  color: #ffffff;
}

.button-secondary:hover:not(:disabled),
.button-quiet:hover:not(:disabled) {
  border-color: #0066e8;
  background: #eff6ff;
  color: #0052bd;
}

.button-quiet.danger-action:hover:not(:disabled) {
  border-color: #b42318;
  background: #fff1f0;
  color: #b42318;
}
