/* Round 3: network entry panel, investor footer, unit cards, investor gate.
   Loaded last so it wins over older layers. */

/* ── Network entry panel ─────────────────────────────────────────────── */
#orbital-ui {
  flex-direction: column !important;
  align-items: flex-start !important;
  justify-content: center !important;
  gap: 14px;
}
#orbital-ui .orb-inner {
  width: min(400px, 100%) !important;
  max-width: 400px !important;
  margin: 0 !important;
  padding: 16px !important;
  border-radius: 22px !important;
  background: linear-gradient(180deg, rgba(8,14,28,.78), rgba(8,14,28,.52)) !important;
  border: 1px solid rgba(255,255,255,.08) !important;
  backdrop-filter: blur(6px) saturate(140%);
  -webkit-backdrop-filter: blur(6px) saturate(140%);
  box-shadow: 0 24px 60px rgba(0,0,0,.45);
}
#orbital-ui .orb-head { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; }
#orbital-ui .orb-head-mark { width: 28px; height: auto; filter: drop-shadow(0 0 10px rgba(80,160,255,.45)); }
#orbital-ui .orb-head-copy { flex: 1; min-width: 0; }
#orbital-ui .orb-kicker { font-size: 11px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: rgba(255,255,255,.55); }
#orbital-ui .orb-title { font-size: 22px; font-weight: 800; color: #fff; letter-spacing: -.01em; line-height: 1.15; }
#orbital-ui .orb-live { display: inline-flex; align-items: center; gap: 6px; font-size: 11px; font-weight: 700; color: #7ee2a8; padding: 5px 9px; border-radius: 999px; background: rgba(48,209,88,.12); }
#orbital-ui .orb-live i { width: 7px; height: 7px; border-radius: 50%; background: #30d158; box-shadow: 0 0 0 0 rgba(48,209,88,.6); animation: r3-pulse 2.2s ease-out infinite; }
#orbital-ui .orb-entry-label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

#orbital-ui .orb-entries {
  display: grid !important;
  grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
  gap: 8px !important;
  max-height: none !important;
  overflow: visible !important;
  margin: 0 0 12px !important;
}
#orbital-ui .orb-entry {
  position: relative;
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 6px !important;
  min-height: 78px !important;
  padding: 10px 6px !important;
  border-radius: 14px !important;
  background: rgba(255,255,255,.045) !important;
  border: 1px solid rgba(255,255,255,.07) !important;
  overflow: hidden;
  opacity: 0;
  animation: r3-rise .6s cubic-bezier(.16,1,.3,1) forwards;
  transition: transform .2s ease, background .2s ease, border-color .2s ease;
}
#orbital-ui .orb-entry:nth-child(1) { animation-delay: .05s; }
#orbital-ui .orb-entry:nth-child(2) { animation-delay: .10s; }
#orbital-ui .orb-entry:nth-child(3) { animation-delay: .15s; }
#orbital-ui .orb-entry:nth-child(4) { animation-delay: .20s; }
#orbital-ui .orb-entry:nth-child(5) { animation-delay: .25s; }
#orbital-ui .orb-entry:nth-child(6) { animation-delay: .30s; }
#orbital-ui .orb-entry::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: radial-gradient(80% 60% at 50% 0%, rgba(90,170,255,.18), transparent 70%);
  opacity: 0; transition: opacity .25s ease;
}
#orbital-ui .orb-entry:hover, #orbital-ui .orb-entry:focus-visible { transform: translateY(-2px); background: rgba(255,255,255,.08) !important; border-color: rgba(120,180,255,.35) !important; }
#orbital-ui .orb-entry:hover::after, #orbital-ui .orb-entry:focus-visible::after { opacity: 1; }
#orbital-ui .orb-entry-state { width: 34px !important; height: 26px !important; object-fit: contain; animation: r3-float 6s ease-in-out infinite; filter: drop-shadow(0 4px 10px rgba(60,150,255,.35)); }
#orbital-ui .orb-entry:nth-child(even) .orb-entry-state { animation-delay: -3s; }
#orbital-ui .orb-entry-copy { display: flex; flex-direction: column; align-items: center; }
#orbital-ui .orb-entry-name { font-size: 12.5px !important; font-weight: 700 !important; color: #fff !important; white-space: nowrap; }
#orbital-ui .orb-entry-tag { display: none !important; }

#orbital-ui .orb-actions { display: flex !important; flex-direction: column !important; gap: 8px !important; margin: 0 !important; }
#orbital-ui .orb-actions-row { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
#orbital-ui .orb-select { min-height: 44px !important; border-radius: 14px !important; font-size: 14px !important; }
#orbital-ui .orb-select { padding: 0 12px !important; background: rgba(255,255,255,.05) !important; border: 1px solid rgba(255,255,255,.1) !important; color: #fff !important; font-weight: 600; }
#orbital-ui .orb-btn-primary { position: relative; overflow: hidden; min-height: 50px !important; font-size: 16px !important; font-weight: 700 !important; }
#orbital-ui .orb-btn-primary::after {
  content: ""; position: absolute; top: 0; bottom: 0; width: 40%; left: -60%;
  background: linear-gradient(100deg, transparent, rgba(255,255,255,.28), transparent);
  animation: r3-sheen 4.5s ease-in-out infinite 1.2s;
}
#orbital-ui .orb-hint { display: block !important; margin-top: 10px !important; font-size: 12px !important; color: rgba(255,255,255,.5) !important; text-align: center; }

/* Footer: brand art + investor button */
#orbital-ui .orb-footer {
  pointer-events: auto;
  width: min(400px, 100%);
  border-radius: 20px;
  overflow: hidden;
  background: #0a1a36;
  border: 1px solid rgba(120,170,255,.18);
  box-shadow: 0 24px 60px rgba(0,0,0,.5);
  opacity: 0;
  animation: r3-rise .8s cubic-bezier(.16,1,.3,1) .35s forwards;
}
#orbital-ui:not(.visible) .orb-footer { pointer-events: none; }
#orbital-ui .orb-footer-art { display: block; overflow: hidden; aspect-ratio: 2144 / 928; background: #0b1424; }
#orbital-ui .orb-footer-art img { display: block; width: 100%; height: 100%; object-fit: contain; }
#orbital-ui .orb-invest-btn {
  position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center;
  width: 100%; min-height: 56px; border: 0; cursor: pointer;
  font: 700 16px/1.2 Inter, system-ui, sans-serif; color: #0a1a36;
  background: linear-gradient(90deg, #f5c66c, #ffd98e, #f5c66c);
  background-size: 200% 100%;
  animation: r3-gold 6s linear infinite;
}
#orbital-ui .orb-invest-btn span { font-size: 11px; font-weight: 600; opacity: .7; margin-top: 2px; }
#orbital-ui .orb-invest-btn:focus-visible { outline: 3px solid #fff; outline-offset: -3px; }

@media (max-width: 720px) {
  #orbital-ui {
    justify-content: flex-end !important;
    align-items: center !important;
    overflow-y: auto !important;
    padding: calc(env(safe-area-inset-top) + 64px) 14px calc(14px + env(safe-area-inset-bottom)) !important;
    gap: 10px;
  }
  #orbital-ui .orb-inner, #orbital-ui .orb-footer { width: 100% !important; max-width: 440px !important; }
  #orbital-ui .orb-inner { padding: 14px !important; }
  #orbital-ui .orb-title { font-size: 20px; }
  #orbital-ui .orb-entry { min-height: 70px !important; }
  #orbital-ui .orb-hint { display: none !important; }
}
@media (min-width: 721px) {
  #orbital-ui .orb-footer { position: absolute; right: clamp(20px, 4vw, 48px); bottom: 28px; width: 320px; }
}

/* ── Unit drawer: hero and gate ─────────────────────────────────────── */
#unit-drawer .us-hero2 { position: relative; margin: 0 0 8px; border-radius: 20px; overflow: hidden; background: #0a1a36; }
#unit-drawer .us-hero2-brand { display: block; aspect-ratio: 2144 / 928; overflow: hidden; background: #0b1424; }
#unit-drawer .us-hero2-brand img { display: block; width: 100%; height: 100%; object-fit: contain; }
#unit-drawer .us-hero2-copy { padding: 16px 18px 18px; }
#unit-drawer .us-hero2-title { margin: 4px 0 6px; font-size: 26px; font-weight: 800; color: #fff; letter-spacing: -.01em; }
#unit-drawer .us-hero2-sub { margin: 0 0 14px; font-size: 15px; line-height: 1.45; color: rgba(255,255,255,.75); }
#unit-drawer .us-hero-actions { display: grid; grid-template-columns: 1fr; gap: 8px; }
@media (min-width: 560px) { #unit-drawer .us-hero-actions { grid-template-columns: 1fr 1fr; } }
#unit-drawer .us-hero-actions .dw-btn { min-height: 48px; width: 100%; justify-content: center; }
#unit-drawer .inv-steps { display: grid; gap: 12px; }
#unit-drawer .inv-card { padding: 16px; border-radius: 16px; background: rgba(255,255,255,.04); border: 1px solid rgba(255,255,255,.08); }
#unit-drawer .inv-card h4 { margin: 0 0 6px; font-size: 17px; font-weight: 700; color: #fff; letter-spacing: 0; }
#unit-drawer .inv-card p { margin: 0 0 10px; font-size: 14px; color: rgba(255,255,255,.7); }
#unit-drawer .inv-card-code { border-color: rgba(245,198,108,.35); background: linear-gradient(180deg, rgba(245,198,108,.08), rgba(255,255,255,.02)); }
#unit-drawer .inv-card .dw-btn { width: 100%; min-height: 48px; justify-content: center; }
#unit-drawer #inv-f-code { letter-spacing: .12em; text-transform: uppercase; }
#unit-drawer .investor-code-status, #unit-drawer .inv-apply-status { margin-top: 8px; font-size: 14px; color: #ffd98e; min-height: 1em; }
#unit-drawer .inv-nda-note { font-size: 13px; color: rgba(255,255,255,.55); margin: 10px 2px 0; }
body.investor-locked #us-investor-content { display: none !important; }

/* ── Unit drawer: market pills, site summary, cards ─────────────────── */
#us-unit-grid { display: block !important; }
#us-unit-grid .us-loc-pills { display: flex; gap: 8px; overflow-x: auto; padding: 2px 2px 10px; scrollbar-width: none; }
#us-unit-grid .us-loc-pills::-webkit-scrollbar { display: none; }
#us-unit-grid .us-loc-pill { flex: 0 0 auto; min-height: 40px; padding: 0 14px; border-radius: 999px; border: 1px solid rgba(255,255,255,.16); background: rgba(255,255,255,.05); color: #fff; font-size: 13px; font-weight: 700; cursor: pointer; transition: background .2s, border-color .2s; }
#us-unit-grid .us-loc-pill.is-active { background: #f5c66c; border-color: #f5c66c; color: #0a1a36; }
#us-unit-grid .us-site-sum { position: relative; overflow: hidden; margin: 2px 0 14px; padding: 14px 16px; border-radius: 16px; background: linear-gradient(135deg, rgba(20,40,80,.65), rgba(10,20,40,.6)); border: 1px solid rgba(120,170,255,.2); animation: r3-rise .5s cubic-bezier(.16,1,.3,1); }
#us-unit-grid .us-site-sum-head b { display: block; font-size: 18px; color: #fff; }
#us-unit-grid .us-site-sum-head span { font-size: 13px; color: rgba(255,255,255,.6); }
#us-unit-grid .us-site-sum-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin: 12px 0 8px; }
#us-unit-grid .us-site-sum-stats b { display: block; font-size: 28px; font-weight: 800; color: #f5c66c; font-variant-numeric: tabular-nums; }
#us-unit-grid .us-site-sum-stats span { font-size: 11.5px; line-height: 1.3; color: rgba(255,255,255,.7); }
#us-unit-grid .us-site-sum p { margin: 0; font-size: 13px; color: rgba(255,255,255,.7); }
#us-unit-grid .us-unit2-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
@media (min-width: 900px) { #us-unit-grid .us-unit2-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
#us-unit-grid .us-unit2 { position: relative; display: flex; flex-direction: column; text-align: left; padding: 0; border-radius: 16px; overflow: hidden; border: 1px solid rgba(255,255,255,.1); background: #0e131d; color: #fff; cursor: pointer; animation: r3-rise .5s cubic-bezier(.16,1,.3,1) both; transition: transform .2s ease, border-color .2s ease; }
#us-unit-grid .us-unit2:nth-child(2n) { animation-delay: .05s; }
#us-unit-grid .us-unit2:nth-child(3n) { animation-delay: .1s; }
#us-unit-grid .us-unit2:hover { transform: translateY(-2px); }
#us-unit-grid .us-unit2.is-selected { border-color: #f5c66c; box-shadow: 0 0 0 1px #f5c66c inset, 0 10px 30px rgba(245,198,108,.15); }
#us-unit-grid .us-unit2[aria-disabled="true"] { opacity: .55; cursor: not-allowed; }
#us-unit-grid .us-unit2-media { position: relative; display: block; aspect-ratio: 4 / 3; overflow: hidden; background: #1a2230; }
#us-unit-grid .us-unit2-media picture img { display: block; width: 100%; height: 100%; object-fit: cover; }
#us-unit-grid .us-unit2-svg { position: absolute; left: 8px; bottom: 6px; height: 46%; width: auto; filter: drop-shadow(0 4px 8px rgba(0,0,0,.6)); }
#us-unit-grid .us-unit2-status { position: absolute; top: 8px; right: 8px; padding: 4px 8px; border-radius: 999px; font-size: 11px; font-weight: 700; color: var(--st); background: rgba(0,0,0,.6); backdrop-filter: blur(6px); }
#us-unit-grid .us-unit2-body { position: relative; display: flex; flex-direction: column; gap: 3px; padding: 10px 12px 14px; }
#us-unit-grid .us-unit2-id { font-size: 11px; font-weight: 700; letter-spacing: .08em; color: rgba(255,255,255,.5); }
#us-unit-grid .us-unit2-name { font-size: 14.5px; font-weight: 700; }
#us-unit-grid .us-unit2-name small { font-weight: 600; color: rgba(255,255,255,.55); font-size: 12px; }
#us-unit-grid .us-unit2-spec { font-size: 12px; color: rgba(255,255,255,.6); }
#us-unit-grid .us-unit2-cash { display: flex; align-items: baseline; justify-content: space-between; gap: 6px; margin-top: 6px; }
#us-unit-grid .us-cash-label { font-size: 11px; color: rgba(255,255,255,.55); }
#us-unit-grid .us-cash-val { font-size: 18px; font-weight: 800; color: #7ee2a8; font-variant-numeric: tabular-nums; }
#us-unit-grid .us-cash-ask { font-size: 13px; color: #f5c66c; }

/* Money flow: small dots running along the card base */
.us-flow { position: absolute; left: 12px; right: 12px; bottom: 6px; height: 2px; border-radius: 2px; background: rgba(126,226,168,.12); overflow: hidden; }
.us-flow i { position: absolute; top: 0; width: 18px; height: 2px; border-radius: 2px; background: linear-gradient(90deg, transparent, #7ee2a8); animation: r3-flow 2.6s linear infinite; }
.us-flow i:nth-child(2) { animation-delay: -.9s; }
.us-flow i:nth-child(3) { animation-delay: -1.8s; }
.us-flow i:nth-child(4) { animation-delay: -1.3s; }
.us-flow-wide { left: 16px; right: 16px; bottom: 8px; }

@keyframes r3-rise { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
@keyframes r3-float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-3px); } }
@keyframes r3-pulse { 0% { box-shadow: 0 0 0 0 rgba(48,209,88,.55); } 80%, 100% { box-shadow: 0 0 0 8px rgba(48,209,88,0); } }
@keyframes r3-sheen { 0% { left: -60%; } 40%, 100% { left: 130%; } }
@keyframes r3-drift { from { transform: scale(1); } to { transform: scale(1.05); } }
@keyframes r3-gold { from { background-position: 0% 0; } to { background-position: 200% 0; } }
@keyframes r3-flow { from { left: -20px; } to { left: 100%; } }

@media (prefers-reduced-motion: reduce) {
  #orbital-ui *, #unit-drawer *, .us-flow i { animation: none !important; transition: none !important; }
  #orbital-ui .orb-entry, #orbital-ui .orb-footer { opacity: 1 !important; }
}

/* Tighten hero copy spacing over older .us-eye / dw rules */
#unit-drawer .us-hero2-copy .us-eye { margin: 0 !important; padding: 0 !important; font-size: 12px; letter-spacing: .14em; text-transform: uppercase; color: #f5c66c; }
#unit-drawer .us-hero2-copy > * + * { margin-top: 6px; }
#unit-drawer .us-hero2-title { margin: 6px 0 4px !important; line-height: 1.1; }
#unit-drawer .us-hero2 + .dw-section { padding-top: 8px !important; }
#orbital-ui .orb-hint { text-transform: none !important; letter-spacing: 0 !important; }
/* hero kicker: drop the legacy grid eyebrow box */
#unit-drawer .us-hero2-copy .us-eye { display: block !important; aspect-ratio: auto !important; min-width: 0 !important; min-height: 0 !important; height: auto !important; grid-template-columns: none !important; background: none !important; border: 0 !important; box-shadow: none !important; }
#unit-drawer .us-hero2-copy .us-eye::before, #unit-drawer .us-hero2-copy .us-eye::after { content: none !important; display: none !important; }
/* section titles reuse .us-eye; keep them text, not round icon buttons */
#unit-drawer .dw-section-title.us-eye { display: block !important; aspect-ratio: auto !important; min-width: 0 !important; min-height: 0 !important; place-items: initial; }

/* ── Round 4: one investor gate ───────────────────────────────────────
   The form keeps its ios27 glass sheet look; we only lay out the inside. */
#unit-drawer .inv-gate { display: grid; gap: 12px; }
#unit-drawer #investor-code-form-drawer { padding: 16px; }
#unit-drawer .inv-gate h4 { margin: 0; font-size: 17px; font-weight: 700; color: #fff; }
#unit-drawer .inv-request { border-radius: 14px; padding: 4px 14px; background: rgba(255,255,255,.04); }
#unit-drawer .inv-request summary { min-height: 44px; display: flex; align-items: center; cursor: pointer; font-size: 15px; font-weight: 600; color: rgba(255,255,255,.85); list-style: none; }
#unit-drawer .inv-request summary::-webkit-details-marker { display: none; }
#unit-drawer .inv-request summary::after { content: "+"; margin-left: auto; font-size: 20px; color: rgba(255,255,255,.6); }
#unit-drawer .inv-request[open] summary::after { content: "\2212"; }
#unit-drawer .inv-request form { padding-bottom: 12px; }
body.investor-locked #us-scroll-reserve, body.investor-locked #us-mobile-reserve { display: none !important; }

/* ── Round 4: compact buttons, sized like the DREV Assist landing
   (pill, 15px/700, ~48-50px tall, 24-26px side padding, content width).
   Radius and font come from ios27; only width and padding are set here. */
#unit-drawer .us-hero-actions { display: flex !important; flex-wrap: wrap; gap: 10px; }
#unit-drawer .us-hero-actions .dw-btn,
#unit-drawer .inv-gate .dw-btn,
#unit-drawer .inv-active .dw-btn,
#unit-drawer .us-form-foot .dw-submit-btn {
  width: auto !important; flex: 0 0 auto !important; min-width: 0 !important;
  min-height: 48px; padding: 13px 24px !important; font-size: 15px !important; font-weight: 700 !important;
  display: inline-flex; align-items: center; justify-content: center;
}
#unit-drawer #investor-code-form-drawer .dw-btn, #unit-drawer #inv-apply-submit { margin-top: 10px; }
#orbital-ui .orb-actions { flex-direction: row !important; flex-wrap: wrap; align-items: center; gap: 10px !important; }
#orbital-ui .orb-actions-row { display: flex; flex-wrap: wrap; gap: 10px; }
#orbital-ui .orb-btn { width: auto !important; flex: 0 0 auto; min-height: 48px !important; padding: 0 24px !important; font-size: 15px !important; }
#orbital-ui .orb-select { width: auto; min-height: 48px !important; }
#orbital-ui .orb-invest-btn {
  width: auto; margin: 12px auto 14px; padding: 8px 26px; min-height: 48px;
  border-radius: var(--r-pill, 9999px); font-size: 15px;
}
#orbital-ui .orb-footer { display: flex; flex-direction: column; }
@media (max-width: 720px) {
  .us-mobile-bar { display: flex !important; justify-content: center; gap: 10px !important; }
  .us-mobile-bar button {
    flex: 0 0 auto; width: auto; min-height: 48px !important; padding: 0 24px;
    border-radius: var(--r-pill, 9999px) !important; font: 700 15px/1 var(--font-ui, -apple-system, sans-serif) !important; letter-spacing: 0 !important;
  }
}
.biz-hero-actions { display: flex !important; flex-wrap: wrap; gap: 10px; }
.biz-hero-actions .biz-btn { flex: 0 0 auto !important; width: auto !important; padding-left: 24px !important; padding-right: 24px !important; min-height: 48px; }
#tesla-drawer .sv-request-btn, .sv-request-btn { width: auto !important; padding: 13px 26px !important; border-radius: var(--r-pill, 9999px) !important; align-self: flex-start; }
.czwiz-nav .dw-submit-btn, .czwiz-nav .dw-submit-btn.dw-submit-tesla, .czwiz-nav .dw-submit-btn.dw-submit-v2h, .czwiz-next-btn {
  flex: 0 0 auto !important; width: auto !important; max-width: none !important; padding: 13px 24px !important; min-height: 48px; border-radius: var(--r-pill, 9999px) !important;
}
.czwiz-nav { justify-content: space-between; }
#orbital-ui .orb-actions-row { flex: 1 1 100%; align-items: center; }
#orbital-ui .orb-actions-row .orb-select { width: auto !important; flex: 0 1 auto; max-width: 170px; }
/* 7 Palms investor card: one button that opens the investor gate */
.sp-investor-card [data-open-investor-gate] {
  margin-top: 8px; min-height: 44px; padding: 0 20px; border: 0; cursor: pointer;
  border-radius: var(--r-pill, 9999px); font: 700 14px/1 var(--font-ui, -apple-system, sans-serif);
  color: #1a1206; background: linear-gradient(135deg, #ffc65d, #d88a00);
}
