:root {
  --bg: #07111f;
  --bg-2: #0b1830;
  --panel: rgba(255, 255, 255, 0.08);
  --panel-strong: rgba(255, 255, 255, 0.12);
  --line: rgba(185, 212, 255, 0.16);
  --text: #f7fbff;
  --muted: #aab8cf;
  --blue: #4f82ff;
  --cyan: #2ee7dc;
  --white: #ffffff;
  --radius: 8px;
  --shadow: 0 28px 80px rgba(0, 0, 0, 0.28);
}

* {
  box-sizing: border-box;
}

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

body {
  margin: 0;
  min-height: 100vh;
  overflow-x: hidden;
  background:
    linear-gradient(rgba(119, 165, 255, 0.045) 1px, transparent 1px) 0 0 / 36px 36px,
    linear-gradient(90deg, rgba(119, 165, 255, 0.045) 1px, transparent 1px) 0 0 / 36px 36px,
    radial-gradient(circle at 12% 8%, rgba(46, 231, 220, 0.22), transparent 28%),
    radial-gradient(circle at 86% 0, rgba(79, 130, 255, 0.24), transparent 28%),
    linear-gradient(180deg, var(--bg) 0%, var(--bg-2) 54%, #08101d 100%);
  color: var(--text);
  font-family: Inter, Arial, sans-serif;
}

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

.site-header,
main {
  width: min(1240px, calc(100% - 48px));
  margin: 0 auto;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 18px 0;
  backdrop-filter: blur(18px);
}

.site-header::before {
  content: "";
  position: absolute;
  inset: 8px -16px;
  z-index: -1;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 999px;
  background: rgba(7, 17, 31, 0.72);
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.18);
}

.brand {
  display: inline-flex;
  align-items: center;
  min-width: 0;
}

.brand-logo {
  display: block;
  width: clamp(190px, 22vw, 260px);
  height: auto;
  filter: brightness(1.2);
}

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

.header-actions a {
  min-height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.07);
  padding: 0 16px;
  color: var(--text);
  font-size: 14px;
  font-weight: 800;
}

main {
  padding: 46px 0 80px;
}

.portal-main {
  min-height: calc(100vh - 96px);
  display: grid;
  align-content: center;
  gap: clamp(28px, 4vw, 48px);
  padding-top: clamp(38px, 7vw, 96px);
}

.portal-hero {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(260px, 0.48fr);
  align-items: end;
  gap: clamp(24px, 5vw, 72px);
  padding: 18px 0 6px;
}

.portal-hero::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -14px;
  width: min(520px, 60vw);
  height: 1px;
  background: linear-gradient(90deg, var(--cyan), var(--blue), transparent);
}

.portal-summary {
  max-width: 390px;
  margin: 0;
  color: var(--muted);
  font-size: clamp(16px, 1.4vw, 18px);
  line-height: 1.55;
}

.stage-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(18px, 3vw, 28px);
}

.stage-card {
  position: relative;
  min-height: 330px;
  display: grid;
  align-content: space-between;
  gap: 36px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background:
    linear-gradient(rgba(119, 165, 255, 0.052) 1px, transparent 1px) 0 0 / 28px 28px,
    linear-gradient(90deg, rgba(119, 165, 255, 0.052) 1px, transparent 1px) 0 0 / 28px 28px,
    radial-gradient(circle at 88% 14%, rgba(79, 130, 255, 0.2), transparent 34%),
    linear-gradient(145deg, rgba(255, 255, 255, 0.13), rgba(255, 255, 255, 0.05));
  box-shadow: var(--shadow);
  padding: clamp(24px, 3vw, 34px);
  transition: transform 180ms ease, border-color 180ms ease, background 180ms ease;
}

.stage-card:hover {
  transform: translateY(-4px);
  border-color: rgba(46, 231, 220, 0.3);
}

.stage-card::after {
  content: "";
  position: absolute;
  right: -86px;
  bottom: -112px;
  width: 260px;
  height: 260px;
  border: 1px solid rgba(46, 231, 220, 0.16);
  border-radius: 50%;
}

.stage-card::before {
  content: "";
  position: absolute;
  inset: auto 34px 94px 34px;
  height: 1px;
  background: linear-gradient(90deg, rgba(46, 231, 220, 0.75), transparent);
  opacity: 0.55;
}

.stage-card.selected {
  border-color: rgba(46, 231, 220, 0.34);
  background:
    linear-gradient(rgba(46, 231, 220, 0.058) 1px, transparent 1px) 0 0 / 28px 28px,
    linear-gradient(90deg, rgba(46, 231, 220, 0.058) 1px, transparent 1px) 0 0 / 28px 28px,
    radial-gradient(circle at 84% 18%, rgba(46, 231, 220, 0.26), transparent 36%),
    linear-gradient(145deg, rgba(79, 130, 255, 0.17), rgba(255, 255, 255, 0.06));
}

.stage-card-copy {
  position: relative;
  z-index: 1;
}

.stage-number {
  position: absolute;
  right: clamp(24px, 3vw, 34px);
  top: clamp(22px, 3vw, 30px);
  color: rgba(255, 255, 255, 0.08);
  font-size: clamp(70px, 8vw, 112px);
  font-weight: 900;
  line-height: 0.8;
}

.stage-status {
  position: absolute;
  right: 24px;
  top: 24px;
  z-index: 2;
  min-height: 32px;
  display: inline-flex;
  align-items: center;
  border: 1px solid rgba(46, 231, 220, 0.34);
  border-radius: 999px;
  background: rgba(46, 231, 220, 0.12);
  padding: 0 12px;
  color: #dffffc;
  font-size: 12px;
  font-weight: 900;
}

.stage-kicker {
  display: inline-flex;
  margin-bottom: 16px;
  color: var(--cyan);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.stage-card h2 {
  max-width: 500px;
  margin: 0;
  font-size: clamp(36px, 5vw, 64px);
  letter-spacing: 0;
}

.stage-card p {
  max-width: 360px;
  margin: 20px 0 0;
  color: var(--muted);
  font-size: 16px;
  line-height: 1.55;
}

.stage-button {
  position: relative;
  z-index: 1;
  width: fit-content;
  min-height: 48px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(46, 231, 220, 0.3);
  border-radius: 999px;
  background: rgba(46, 231, 220, 0.12);
  padding: 0 20px;
  color: #dffffc;
  font-size: 14px;
  font-weight: 900;
  transition: background 180ms ease, color 180ms ease, transform 180ms ease;
}

.stage-button:hover,
.stage-button:focus-visible {
  background: var(--cyan);
  color: #03131b;
  transform: translateY(-1px);
}

.stage-button.primary {
  border-color: rgba(46, 231, 220, 0.62);
  background: linear-gradient(135deg, rgba(46, 231, 220, 0.95), rgba(79, 130, 255, 0.86));
  color: #03131b;
}

.hero {
  position: relative;
  display: grid;
  gap: 18px;
  padding: clamp(38px, 8vw, 86px) 0 42px;
}

.hero::after {
  content: "";
  position: absolute;
  right: 0;
  bottom: 18px;
  width: min(360px, 42vw);
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--cyan), var(--blue));
}

.eyebrow {
  display: block;
  margin: 0 0 12px;
  color: var(--cyan);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

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

h1 {
  max-width: 760px;
  margin-bottom: 16px;
  font-size: clamp(48px, 8vw, 96px);
  line-height: 0.92;
  letter-spacing: 0;
}

h2 {
  margin-bottom: 0;
  font-size: clamp(28px, 4vw, 46px);
  line-height: 1;
}

h3 {
  margin-bottom: 8px;
  font-size: clamp(18px, 2vw, 22px);
  line-height: 1.15;
}

.hero-text {
  max-width: 520px;
  margin-bottom: 0;
  color: var(--muted);
  font-size: 18px;
  line-height: 1.6;
}

.drafts-section {
  padding-top: 24px;
}

.review-notes {
  display: grid;
  grid-template-columns: 0.38fr 1fr;
  gap: 22px;
  align-items: stretch;
  margin-bottom: 34px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background:
    radial-gradient(circle at 94% 12%, rgba(46, 231, 220, 0.12), transparent 30%),
    linear-gradient(145deg, rgba(255, 255, 255, 0.12), rgba(255, 255, 255, 0.055));
  box-shadow: var(--shadow);
  padding: 22px;
}

.review-notes-heading {
  display: grid;
  align-content: start;
  gap: 8px;
}

.review-notes-heading h2 {
  margin: 0;
}

.section-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 22px;
}

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

.draft-card {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: linear-gradient(180deg, var(--panel-strong), rgba(255, 255, 255, 0.055));
  box-shadow: var(--shadow);
  transition: transform 180ms ease, border-color 180ms ease, background 180ms ease;
}

.draft-card:hover {
  transform: translateY(-4px);
  border-color: rgba(46, 231, 220, 0.36);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.14), rgba(255, 255, 255, 0.065));
}

.preview-link {
  display: block;
  min-width: 0;
  background: #091423;
}

.preview-link:focus-visible,
.open-button:focus-visible,
.header-actions a:focus-visible {
  outline: 3px solid rgba(46, 231, 220, 0.8);
  outline-offset: 3px;
}

.preview-frame {
  position: relative;
  display: block;
  overflow: hidden;
  aspect-ratio: 16 / 9.8;
  border-bottom: 1px solid var(--line);
  background:
    linear-gradient(135deg, rgba(79, 130, 255, 0.18), rgba(46, 231, 220, 0.1)),
    #0c1726;
}

.preview-frame::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.045);
}

.preview-frame::after {
  content: "Open";
  position: absolute;
  right: 14px;
  bottom: 14px;
  z-index: 3;
  min-height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 999px;
  background: rgba(7, 17, 31, 0.82);
  padding: 0 14px;
  color: var(--white);
  font-size: 12px;
  font-weight: 900;
  opacity: 0;
  transform: translateY(6px);
  transition: opacity 160ms ease, transform 160ms ease;
}

.preview-link:hover .preview-frame::after {
  opacity: 1;
  transform: translateY(0);
}

iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 1440px;
  height: 900px;
  border: 0;
  pointer-events: none;
  transform: scale(0.5);
  transform-origin: top left;
}

.draft-content {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: start;
  gap: 18px;
  padding: 20px;
}

.draft-info {
  min-width: 0;
}

.draft-info h3 {
  margin-bottom: 14px;
}

.note-copy,
.draft-description {
  border: 1px solid rgba(185, 212, 255, 0.14);
  border-radius: var(--radius);
  background: rgba(4, 11, 24, 0.38);
  color: var(--muted);
  line-height: 1.6;
}

.note-copy {
  padding: 18px;
  font-size: 15px;
}

.draft-description {
  max-width: 560px;
  padding: 14px 15px;
  font-size: 14px;
}

.open-button {
  min-height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(46, 231, 220, 0.28);
  border-radius: 999px;
  background: rgba(46, 231, 220, 0.12);
  padding: 0 16px;
  color: #dffffc;
  font-size: 14px;
  font-weight: 900;
  white-space: nowrap;
  transition: background 180ms ease, color 180ms ease, transform 180ms ease;
}

.open-button:hover {
  background: var(--cyan);
  color: #03131b;
  transform: translateY(-1px);
}

.baseline {
  opacity: 0.82;
}

@media (max-width: 940px) {
  .site-header,
  main {
    width: min(100% - 32px, 760px);
  }

  .site-header {
    position: static;
  }

  .site-header::before {
    inset: 8px -10px;
  }

  .hero {
    padding-top: 34px;
  }

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

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

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

  .review-notes {
    grid-template-columns: 1fr;
  }

  iframe {
    transform: scale(0.42);
  }

  .preview-frame {
    aspect-ratio: 16 / 10.5;
  }
}

@media (max-width: 560px) {
  .site-header {
    align-items: flex-start;
    flex-direction: column;
  }

  .header-actions,
  .header-actions a {
    width: 100%;
  }

  .brand-logo {
    max-width: 100%;
  }

  main {
    padding-top: 18px;
    padding-bottom: 44px;
  }

  h1 {
    font-size: 46px;
  }

  .hero-text {
    font-size: 16px;
  }

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

  .draft-content {
    grid-template-columns: 1fr;
    padding: 18px;
  }

  .review-notes {
    padding: 18px;
  }

  .open-button {
    width: 100%;
  }

  .stage-button {
    width: 100%;
  }

  .stage-card {
    min-height: 290px;
  }

  .stage-card h2 {
    padding-right: 48px;
  }

  iframe {
    transform: scale(0.28);
  }

  .preview-frame {
    aspect-ratio: 4 / 3;
  }

  .preview-frame::after {
    opacity: 1;
    transform: none;
  }
}
