:root {
  --ink: #f7f3e8;
  --muted: #b9c4d0;
  --gold: #ffbf1f;
  --gold-soft: #ffe08a;
  --navy-0: #06111d;
  --navy-1: #081a2e;
  --navy-2: #0a2440;
  --navy-3: #0f3153;
  --line: rgba(255, 255, 255, 0.12);
  --gold-line: rgba(255, 191, 31, 0.28);
  --success: #7ce0a3;
  --surface: rgba(9, 25, 44, 0.84);
  --surface-strong: rgba(10, 30, 52, 0.96);
  --shadow: 0 24px 64px rgba(0, 0, 0, 0.24);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  overflow-x: hidden;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: "Inter", Arial, sans-serif;
  color: var(--ink);
  background:
    linear-gradient(180deg, rgba(255, 191, 31, 0.08), transparent 18rem),
    linear-gradient(135deg, var(--navy-3), var(--navy-0));
  overflow-x: hidden;
}

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

button,
input {
  font: inherit;
}

.portal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.1rem clamp(1rem, 4vw, 3rem);
  border-bottom: 1px solid var(--line);
  background: rgba(4, 14, 24, 0.72);
  backdrop-filter: blur(18px);
  min-width: 0;
}

.portal-brand {
  display: inline-flex;
  align-items: center;
  gap: 0.8rem;
  font-weight: 800;
}

.portal-brand img {
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 0.35rem;
}

.portal-header-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.9rem;
  min-width: 0;
}

.quiet-link {
  color: var(--muted);
  font-weight: 600;
}

.status-pill,
.mini-tag {
  display: inline-flex;
  align-items: center;
  min-height: 2rem;
  padding: 0.42rem 0.72rem;
  border-radius: 999px;
  border: 1px solid var(--gold-line);
  color: var(--gold-soft);
  background: rgba(255, 191, 31, 0.1);
  font-size: 0.76rem;
  font-weight: 800;
  text-transform: uppercase;
}

.status-pill.live::before {
  content: "";
  width: 0.48rem;
  height: 0.48rem;
  margin-right: 0.45rem;
  border-radius: 50%;
  background: var(--success);
}

.portal-shell {
  width: min(1320px, calc(100% - 2rem));
  margin: 0 auto;
  padding: clamp(1.4rem, 3vw, 2.4rem) 0 3rem;
  min-width: 0;
}

.portal-hero {
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 2rem;
  margin-bottom: 1.5rem;
  min-width: 0;
}

.portal-hero > div {
  min-width: 0;
  max-width: 100%;
}

.eyebrow {
  margin: 0 0 0.55rem;
  color: var(--gold-soft);
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  margin-bottom: 0.7rem;
  font-size: clamp(2rem, 4vw, 3.25rem);
  line-height: 1.05;
  letter-spacing: 0;
  overflow-wrap: anywhere;
}

h2 {
  margin-bottom: 0;
  font-size: 1.25rem;
}

h3 {
  margin-bottom: 0.28rem;
  font-size: 1rem;
}

p {
  color: var(--muted);
  line-height: 1.6;
  overflow-wrap: anywhere;
}

.portal-hero p:last-child {
  max-width: 44rem;
  margin-bottom: 0;
}

.hero-summary {
  display: grid;
  grid-template-columns: repeat(3, minmax(8rem, 1fr));
  min-width: min(32rem, 100%);
  border: 1px solid var(--line);
  border-radius: 0.5rem;
  background: rgba(255, 255, 255, 0.04);
  overflow: hidden;
}

.hero-summary div {
  padding: 1rem 1.1rem;
}

.hero-summary div + div {
  border-left: 1px solid var(--line);
}

.hero-summary span,
.download-list span,
.detail-list dt {
  display: block;
  margin-bottom: 0.34rem;
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 700;
  text-transform: uppercase;
}

.hero-summary strong {
  font-size: 1rem;
}

.portal-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 24rem;
  gap: 1rem;
  min-width: 0;
}

.main-column,
.side-column {
  display: grid;
  gap: 1rem;
  align-content: start;
  min-width: 0;
}

.surface {
  border: 1px solid var(--line);
  border-radius: 0.5rem;
  background: var(--surface);
  box-shadow: var(--shadow);
  min-width: 0;
}

.section-head {
  display: flex;
  align-items: start;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
  margin-bottom: 1.25rem;
  min-width: 0;
}

.section-head.compact {
  margin-bottom: 1rem;
}

.setup-flow,
.downloads,
.walkthrough,
.license-setup,
.account-panel,
.checklist-panel,
.founder-panel {
  padding: 1.25rem;
}

.step-list {
  display: grid;
  gap: 0.9rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.step-list li {
  display: grid;
  grid-template-columns: 2rem minmax(0, 1fr);
  gap: 0.8rem;
  align-items: start;
  padding-top: 0.9rem;
  border-top: 1px solid var(--line);
}

.step-list li:first-child {
  padding-top: 0;
  border-top: 0;
}

.step-number {
  display: grid;
  place-items: center;
  width: 2rem;
  height: 2rem;
  border-radius: 0.4rem;
  color: #161004;
  background: linear-gradient(135deg, var(--gold-soft), var(--gold));
  font-weight: 800;
}

.step-list p {
  margin-bottom: 0;
}

.download-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.75rem;
}

.download-list a,
.download-placeholder {
  display: block;
  width: 100%;
  min-height: 5rem;
  padding: 0.9rem;
  border: 1px solid var(--line);
  border-radius: 0.45rem;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.03);
  text-align: left;
}

.download-placeholder {
  cursor: default;
}

.download-list strong {
  display: block;
  overflow-wrap: anywhere;
}

.video-frame {
  display: grid;
  min-height: 16rem;
  place-items: center;
  border: 1px dashed var(--gold-line);
  border-radius: 0.45rem;
  background:
    linear-gradient(135deg, rgba(255, 191, 31, 0.08), transparent),
    rgba(255, 255, 255, 0.03);
  text-align: center;
}

.video-frame video {
  display: block;
  width: 100%;
  max-height: 32rem;
  border-radius: 0.45rem;
  background: #05070b;
}

.video-frame span {
  display: block;
  margin-bottom: 0.4rem;
  color: var(--gold-soft);
  font-size: 0.75rem;
  font-weight: 800;
  text-transform: uppercase;
}

.video-frame strong {
  display: block;
  margin-bottom: 0.4rem;
}

.video-frame p {
  margin-bottom: 0;
}

.license-setup p {
  margin-bottom: 1rem;
}

.copy-field {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 0.6rem;
  align-items: center;
  padding: 0.65rem;
  border: 1px solid var(--line);
  border-radius: 0.45rem;
  background: rgba(255, 255, 255, 0.04);
}

.copy-field code {
  min-width: 0;
  color: var(--ink);
  font-size: 0.92rem;
  overflow-wrap: anywhere;
}

.copy-field button {
  min-height: 2.3rem;
  padding: 0 0.85rem;
  border: 1px solid var(--gold-line);
  border-radius: 0.35rem;
  color: var(--gold-soft);
  background: rgba(255, 191, 31, 0.08);
  font-weight: 800;
}

.account-panel label {
  display: block;
  margin-bottom: 0.45rem;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 700;
}

.field-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 0.6rem;
  margin-bottom: 1rem;
}

.field-row input {
  width: 100%;
  min-width: 0;
  min-height: 2.8rem;
  padding: 0 0.8rem;
  border: 1px solid var(--line);
  border-radius: 0.4rem;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.04);
}

.field-row button,
.portal-button {
  min-height: 2.8rem;
  padding: 0 1rem;
  border: 0;
  border-radius: 0.4rem;
  color: #161004;
  background: linear-gradient(135deg, var(--gold-soft), var(--gold));
  font-weight: 800;
}

.detail-list {
  display: grid;
  gap: 0.8rem;
  margin: 0;
}

.detail-list div {
  padding-top: 0.8rem;
  border-top: 1px solid var(--line);
}

.detail-list dd {
  margin: 0;
  font-weight: 700;
}

.status-dot {
  display: inline-block;
  width: 0.52rem;
  height: 0.52rem;
  margin-right: 0.42rem;
  border-radius: 50%;
  background: var(--success);
}

.checklist {
  display: grid;
  gap: 0.7rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.checklist li {
  position: relative;
  padding-left: 1.5rem;
  color: var(--muted);
}

.checklist li::before {
  content: "";
  position: absolute;
  top: 0.38rem;
  left: 0;
  width: 0.7rem;
  height: 0.7rem;
  border: 1px solid var(--gold-line);
  border-radius: 0.2rem;
}

.founder-panel {
  border-color: var(--gold-line);
  background:
    linear-gradient(135deg, rgba(255, 191, 31, 0.12), transparent 60%),
    var(--surface-strong);
}

.portal-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

@media (max-width: 960px) {
  .portal-hero {
    display: grid;
  }

  .hero-summary {
    min-width: 0;
  }

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

@media (max-width: 700px) {
  .portal-header {
    align-items: flex-start;
    flex-direction: column;
    padding: 1rem 0.8rem;
  }

  .portal-shell {
    width: min(calc(100% - 1rem), 1320px);
  }

  h1 {
    font-size: clamp(1.75rem, 8.6vw, 2.35rem);
  }

  .setup-flow,
  .downloads,
  .walkthrough,
  .license-setup,
  .account-panel,
  .checklist-panel,
  .founder-panel {
    padding: 1rem;
  }

  .mini-tag {
    width: fit-content;
    max-width: 100%;
    white-space: normal;
    overflow-wrap: anywhere;
  }

  .hero-summary,
  .download-list {
    grid-template-columns: 1fr;
  }

  .hero-summary div + div {
    border-top: 1px solid var(--line);
    border-left: 0;
  }

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

  .copy-field {
    grid-template-columns: 1fr;
  }

  .copy-field button,
  .portal-button {
    width: 100%;
  }
}
