:root {
  color-scheme: light;
  --ink: #17365f;
  --ink-strong: #0d2b50;
  --muted: #5d7795;
  --blue: #2874f0;
  --panel: #f5f9ff;
  --panel-strong: #eaf3ff;
  --line: #c7daf3;
  font-family: var(--bb-font-sans, "Avenir Next", Avenir, "Helvetica Neue", "Noto Sans Arabic", Tahoma, Arial, sans-serif);
}

* { box-sizing: border-box; }

body {
  margin: 0;
  min-height: 100vh;
  background: #ffffff;
  color: var(--ink);
}

button { font: inherit; }

.overview-shell {
  width: min(1180px, calc(100% - 40px));
  margin: 0 auto;
  padding: 24px 0 56px;
}

.topbar {
  display: flex;
  min-height: 68px;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  border-bottom: 1px solid var(--line);
  padding-bottom: 16px;
}

.brand,
.all-studies {
  color: var(--ink-strong);
  font-weight: 850;
  text-decoration: none;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 1.15rem;
}

.brand img { width: 32px; height: 32px; }

.topbar-actions {
  display: flex;
  align-items: center;
  gap: 16px;
}

.all-studies {
  min-height: 42px;
  display: inline-flex;
  align-items: center;
}

.public-locale-selector {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.public-locale-selector__label {
  color: var(--muted);
  font-size: .78rem;
  font-weight: 800;
}

.public-locale-selector__select {
  min-height: 40px;
  max-width: 150px;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 0 30px 0 10px;
  background: #ffffff;
  color: var(--ink-strong);
  font: inherit;
  font-size: .86rem;
  font-weight: 750;
}

.page-state {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  min-height: 220px;
  align-items: center;
  gap: 18px;
  margin-top: 48px;
  border: 1px solid var(--line);
  border-radius: 24px;
  padding: 32px;
  background: var(--panel);
}

.page-state h1 { margin: 0 0 6px; font-size: clamp(1.6rem, 4vw, 2.3rem); }
.page-state p { margin: 0; color: var(--muted); }

.spinner,
.state-mark {
  display: inline-grid;
  width: 38px;
  height: 38px;
  place-items: center;
  border-radius: 50%;
}

.spinner {
  border: 3px solid #d7e6f8;
  border-top-color: var(--blue);
  animation: spin 780ms linear infinite;
}

.state-mark {
  border: 1px solid var(--line);
  background: #ffffff;
  color: var(--blue);
  font-weight: 900;
}

@keyframes spin { to { transform: rotate(360deg); } }

.project-overview { padding-top: clamp(42px, 7vw, 82px); }

.overview-hero {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(300px, .65fr);
  gap: clamp(28px, 6vw, 72px);
  align-items: start;
}

.hero-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 9px;
  margin-bottom: 24px;
}

.project-status {
  display: inline-flex;
  min-height: 30px;
  align-items: center;
  border-radius: 999px;
  padding: 5px 11px;
  font-size: .74rem;
  font-weight: 850;
  gap: 7px;
  border: 1px solid #d9e3ef;
  background: #ffffff;
  color: var(--muted);
}

.project-status::before {
  width: 7px;
  height: 7px;
  flex: 0 0 7px;
  border-radius: 50%;
  background: currentColor;
  content: "";
}

.project-status.is-live { border-color: #bfe5d4; background: #edf9f3; color: #16764f; }
.project-status.is-upcoming { border-color: #ead9ac; background: #fff8e8; color: #8a6419; }
.project-status.is-paused,
.project-status.is-closed { background: #f4f6f9; color: #66778c; }

.eyebrow {
  margin: 0 0 10px;
  color: var(--muted);
  font-size: .76rem;
  font-weight: 900;
  letter-spacing: .02em;
  text-transform: uppercase;
}

.hero-copy h1 {
  max-width: 760px;
  margin: 0 0 18px;
  color: var(--ink-strong);
  font-size: clamp(2.65rem, 6vw, 5.4rem);
  font-weight: 520;
  letter-spacing: -.045em;
  line-height: .98;
  overflow-wrap: anywhere;
}

.hero-summary {
  max-width: 720px;
  margin: 0;
  font-size: clamp(1.05rem, 2vw, 1.28rem);
  line-height: 1.55;
  overflow-wrap: anywhere;
}

.hero-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 28px; }
/* The cards below keep the hero's distance whether or not the detail cards are shown. */
.overview-hero { margin-bottom: clamp(42px, 6vw, 72px); }

.glance-card,
.detail-card,
.next-step,
.payment-card {
  border: 1px solid var(--line);
  border-radius: 22px;
  background: var(--panel);
}

.glance-card { padding: 24px; }
.glance-card dl { display: grid; gap: 0; margin: 0; }
.glance-card dl div { padding: 15px 0; border-bottom: 1px solid #d8e5f5; }
.glance-card dl div:last-child { border-bottom: 0; padding-bottom: 0; }
.glance-card dt,
.timezone-facts dt { color: var(--muted); font-size: .8125rem; font-weight: 500; }
.glance-card dd,
.timezone-facts dd { margin: 4px 0 0; color: var(--ink-strong); font-weight: 850; overflow-wrap: anywhere; }

.detail-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
  margin-top: clamp(42px, 6vw, 72px);
}

.detail-card { padding: clamp(24px, 4vw, 34px); background: #ffffff; }
.detail-card h2,
.next-step h2 { margin: 0 0 10px; color: var(--ink-strong); font-size: clamp(1.55rem, 3vw, 2.1rem); line-height: 1.12; }
.detail-card > p:last-of-type,
.next-step p:last-child { margin: 0; line-height: 1.55; }

.timezone-facts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin: 24px 0 0; }
.timezone-facts div { min-width: 0; border: 1px solid #d8e5f5; border-radius: 14px; padding: 13px; background: var(--panel); }

.next-step {
  margin-top: 18px;
  padding: clamp(24px, 4vw, 34px);
}

.primary-action,
.secondary-action {
  display: inline-flex;
  min-height: 50px;
  align-items: center;
  justify-content: center;
  border: 1px solid transparent;
  border-radius: 999px;
  padding: 12px 22px;
  font-weight: 850;
  text-align: center;
  text-decoration: none;
}

.primary-action { background: var(--blue); color: #ffffff; box-shadow: 0 8px 18px rgba(40, 116, 240, .18); }
.secondary-action { background: #ffffff; border-color: var(--line); color: var(--ink-strong); }
.primary-action:hover { background: #1e67df; }
.secondary-action:hover { border-color: var(--blue); background: var(--panel-strong); }

.payment-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  margin-top: 18px;
  padding: 22px 26px;
  color: var(--ink-strong);
  text-decoration: none;
}

.payment-card[hidden] { display: none; }
.payment-card > span:first-child { display: grid; gap: 5px; }
.payment-card .eyebrow { margin: 0; }
.payment-card strong { font-size: 1.35rem; }
.payment-card small { color: var(--muted); line-height: 1.4; }
.payment-card > span:last-child { color: var(--blue); font-size: 1.5rem; }

.legal-footer { margin-top: 72px; border-top: 1px solid var(--line); padding-top: 24px; }
.legal-footer nav { display: flex; flex-wrap: wrap; gap: 12px 24px; }
.legal-footer a { color: var(--muted); font-size: .84rem; font-weight: 750; text-decoration: none; }
.legal-footer a:hover { color: var(--ink-strong); }

.brand:focus-visible,
.all-studies:focus-visible,
.primary-action:focus-visible,
.secondary-action:focus-visible,
.payment-card:focus-visible,
.legal-footer a:focus-visible,
.public-locale-selector__select:focus-visible {
  outline: 3px solid rgba(40, 116, 240, .28);
  outline-offset: 3px;
}

[hidden] { display: none !important; }

@media (max-width: 820px) {
  .overview-shell { width: min(100% - 30px, 1180px); }
  .overview-hero { grid-template-columns: 1fr; }
  .glance-card { display: grid; grid-template-columns: minmax(120px, .35fr) minmax(0, 1fr); gap: 20px; }
  .glance-card dl { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 18px; }
  .glance-card dl div:nth-last-child(2) { border-bottom: 0; padding-bottom: 0; }
  .detail-grid { grid-template-columns: 1fr; }
}

@media (max-width: 560px) {
  .overview-shell { width: min(100% - 24px, 1180px); padding-top: 14px; }
  .topbar { min-height: 58px; gap: 12px; padding-bottom: 12px; }
  .brand img { width: 28px; height: 28px; }
  .brand span { display: none; }
  .topbar-actions { gap: 10px; }
  .all-studies { font-size: .86rem; }
  .public-locale-selector__label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  .public-locale-selector__select { max-width: 124px; }
  .page-state { grid-template-columns: auto minmax(0, 1fr); margin-top: 30px; padding: 22px; }
  .page-state .secondary-action { grid-column: 1 / -1; width: 100%; }
  .project-overview { padding-top: 38px; }
  .hero-copy h1 { font-size: clamp(2.45rem, 14vw, 4rem); }
  .hero-meta { margin-bottom: 20px; }
  .hero-actions,
  .hero-actions .primary-action { width: 100%; }
  .glance-card { display: block; padding: 20px; }
  .glance-card dl { display: grid; grid-template-columns: 1fr; }
  .glance-card dl div:nth-last-child(2) { border-bottom: 1px solid #d8e5f5; padding-bottom: 15px; }
  .timezone-facts { grid-template-columns: 1fr; }
  .payment-card { align-items: flex-start; }
  .legal-footer { margin-top: 52px; }
}

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