:root {
  --background: #0d0d0d;
  --foreground: #0d0d0d;
  --panel: #ffffff;
  --panel-border: #4e8ad929;
  --brand: #7471d9;
  --brand-dark: #4e8ad9;
  --brand-soft: #d8e6ff;
  --accent: #05c7f2;
  --muted: #334155;
  --danger: #d96a7f;
  --soft: #f7fbff;
  --soft-2: #f3f7ff;
  --white: #ffffff;
  --shadow-shell: 0 20px 80px rgba(48, 31, 12, 0.08);
  --shadow-card: 0 14px 30px rgba(15, 28, 58, 0.08);
  --shadow-glow: 0 18px 42px rgba(5, 199, 242, 0.24), inset 0 1px 0 rgba(255, 255, 255, 0.18);
  --radius-xl: 22px;
  --radius-lg: 16px;
  --radius-md: 12px;
  --max: 1220px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--foreground);
  background:
    radial-gradient(circle at 12% 2%, rgba(5, 199, 242, 0.22), transparent 19rem),
    radial-gradient(circle at 88% 4%, rgba(116, 113, 217, 0.2), transparent 18rem),
    linear-gradient(145deg, #10141f 0%, #151b2c 42%, #0d0d0d 100%);
  font-family: "Segoe UI", Aptos, Arial, Helvetica, sans-serif;
}

button,
input,
textarea {
  font: inherit;
}

button {
  cursor: pointer;
}

.page-shell {
  width: min(100% - 20px, var(--max));
  margin: 0 auto;
  padding: 10px 0 32px;
}

.site-header {
  position: sticky;
  z-index: 10;
  top: 10px;
  display: flex;
  justify-content: center;
  padding: 12px 14px;
  border: 1px solid var(--panel-border);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: var(--shadow-card);
  backdrop-filter: blur(18px);
}

.brand-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.brand-link img {
  display: block;
  width: min(260px, 76vw);
  height: auto;
}

.cta-row,
.coach-actions {
  display: flex;
  align-items: center;
  gap: 9px;
  flex-wrap: wrap;
}

.secondary-button,
.primary-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  border: 0;
  border-radius: 999px;
  font-weight: 800;
  letter-spacing: 0;
  text-align: center;
  text-decoration: none;
  transition: transform 160ms ease, box-shadow 160ms ease, background 160ms ease;
  cursor: pointer;
}

.primary-button {
  padding: 13px 18px;
  color: var(--white);
  background: linear-gradient(135deg, var(--accent), var(--brand));
  box-shadow: var(--shadow-glow);
}

.secondary-button {
  padding: 12px 16px;
  color: #111a35;
  background: var(--white);
  border: 1px solid rgba(78, 138, 217, 0.24);
  box-shadow: 0 10px 20px rgba(15, 28, 58, 0.06);
}

.primary-button:hover,
.secondary-button:hover {
  transform: translateY(-1px);
}

.full {
  width: 100%;
}

.hero-section {
  display: grid;
  gap: 10px;
  padding: 10px 0 0;
}

.hero-copy {
  color: var(--white);
  padding: 0;
}

.kicker {
  margin: 0 0 10px;
  color: var(--accent);
  font-size: 11px;
  font-weight: 850;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

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

h1 {
  margin-bottom: 12px;
  font-size: 44px;
  line-height: 0.98;
  font-weight: 800;
}

h2 {
  margin-bottom: 12px;
  color: var(--brand-dark);
  font-size: 29px;
  line-height: 1.06;
  font-weight: 780;
}

h3 {
  margin-bottom: 10px;
  color: #111a35;
  font-size: 22px;
  line-height: 1.16;
  font-weight: 760;
}

.limit-pill,
.status-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 34px;
  padding: 8px 12px;
  border-radius: 999px;
  color: #172858;
  background: rgba(216, 230, 255, 0.94);
  font-size: 13px;
  font-weight: 800;
}

.leader-strip {
  margin: 0 -1px 0;
  padding: 11px 12px;
  color: #0d0d0d;
  border: 1px solid rgba(78, 138, 217, 0.32);
  border-radius: 9px;
  background: #f3fbff;
  font-size: 15px;
  line-height: 1.25;
}

.leader-strip strong {
  font-weight: 850;
}

.intro-copy {
  margin-top: 20px;
  color: var(--white);
}

.intro-copy p {
  margin-bottom: 18px;
  color: var(--white);
  font-size: 17px;
  line-height: 1.15;
  font-weight: 500;
}

.intro-copy .prove-line {
  font-weight: 850;
}

.intro-copy p:last-child {
  margin-bottom: 0;
}

.prompt-panel,
.contact-panel,
.score-hero,
.dimension-panel,
.personalization-panel,
.workspace-panel,
.question-panel,
.teaser-card,
.results-header,
.next-step-band {
  border: 1px solid var(--panel-border);
  border-radius: var(--radius-xl);
  background: var(--panel);
  box-shadow: var(--shadow-shell);
}

.prompt-panel,
.contact-panel,
.score-hero,
.dimension-panel,
.personalization-panel,
.workspace-panel,
.question-panel,
.teaser-card,
.results-header,
.next-step-band,
.coach-header {
  padding: 18px;
}

.panel-heading,
.section-heading,
.results-header,
.next-step-band,
.coach-header {
  display: grid;
  gap: 14px;
}

textarea {
  width: 100%;
  min-height: 260px;
  resize: vertical;
  padding: 16px;
  color: #10141f;
  border: 1px solid rgba(78, 138, 217, 0.26);
  border-radius: var(--radius-lg);
  outline: none;
  background: linear-gradient(180deg, #f8faff, #eef5ff);
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
  font-size: 14px;
  line-height: 1.55;
}

#prompt-input {
  min-height: 130px;
  margin-top: 12px;
}

textarea:focus,
input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 4px rgba(5, 199, 242, 0.12);
}

.form-footer {
  display: grid;
  gap: 12px;
  margin-top: 14px;
}

.form-footer p,
.muted {
  color: var(--muted);
  line-height: 1.45;
}

.duplicate-entry-notice {
  display: grid;
  gap: 10px;
  margin-top: 16px;
  padding: 14px;
  border: 1px solid rgba(78, 138, 217, 0.26);
  border-radius: var(--radius-lg);
  background: linear-gradient(180deg, #f8faff, #eef5ff);
}

.duplicate-entry-notice h3,
.duplicate-entry-notice p {
  margin: 0;
}

.duplicate-entry-notice p:not(.kicker) {
  color: var(--muted);
  line-height: 1.45;
}

.screen {
  padding-top: 28px;
  scroll-margin-top: 110px;
}

.hidden {
  display: none;
}

.score-stack,
.dimension-layout,
.coach-layout,
.metric-grid,
.field-grid,
.coach-side {
  display: grid;
  gap: 14px;
}

.score-stack {
  max-width: 720px;
  margin: 0 auto;
}

.score-left,
.score-right {
  display: grid;
  gap: 14px;
}

.score-hero {
  color: var(--white);
  padding-top: 42px;
  background: linear-gradient(145deg, #111a35, #172858 52%, #1b376c);
}

.score-hero h2,
.score-hero .kicker {
  color: var(--white);
}

.score-hero .kicker {
  display: block;
  margin-bottom: 12px;
}

.score-hero p {
  color: rgba(255, 255, 255, 0.8);
  font-size: 16px;
  line-height: 1.58;
}

.score-ring {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 148px;
  height: 148px;
  margin: 8px auto 20px;
  border: 10px solid rgba(5, 199, 242, 0.84);
  border-left-color: rgba(116, 113, 217, 0.9);
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.08);
}

.score-ring span {
  font-size: 54px;
  font-weight: 850;
  line-height: 1;
}

.score-ring small {
  margin-left: 2px;
  font-size: 16px;
  color: rgba(255, 255, 255, 0.72);
}

label {
  display: grid;
  gap: 8px;
  color: #111a35;
  font-size: 13px;
  font-weight: 800;
}

input {
  width: 100%;
  min-height: 50px;
  padding: 0 14px;
  border: 1px solid rgba(78, 138, 217, 0.28);
  border-radius: 14px;
  color: #10141f;
  outline: none;
  background: var(--soft);
}

.checkbox-row {
  display: grid;
  grid-template-columns: 20px 1fr;
  align-items: start;
  margin: 4px 0 16px;
  color: var(--muted);
  font-weight: 650;
  line-height: 1.45;
}

.checkbox-row input {
  min-height: auto;
  margin-top: 2px;
}

.results-header,
.next-step-band {
  margin-bottom: 14px;
}

.results-header p,
.coach-header p,
.next-step-band p,
.metric-panel p,
.dimension-panel p,
.personalization-panel p,
.question-panel p,
.teaser-card p {
  color: var(--muted);
  line-height: 1.55;
}

.access-link {
  padding: 14px;
  border-radius: var(--radius-lg);
  background: var(--brand-soft);
}

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

.access-link span,
.metric-panel span {
  display: block;
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.14em;
}

.access-link strong {
  display: block;
  margin-top: 8px;
  color: #111a35;
  overflow-wrap: anywhere;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
}

.metric-panel {
  padding: 16px;
  border-radius: var(--radius-lg);
  background: var(--panel);
  border: 1px solid var(--panel-border);
  box-shadow: var(--shadow-card);
  text-align: center;
}

.metric-panel strong {
  display: block;
  margin: 8px 0;
  color: var(--brand-dark);
  font-size: 34px;
  line-height: 1;
}

.dimension-list {
  display: grid;
  gap: 15px;
}

.score-heading {
  display: grid;
  grid-template-columns: 1fr auto;
  column-gap: 12px;
  align-items: start;
}

.score-heading h3 {
  grid-column: 1 / -1;
}

.total-score-label {
  margin: 0;
  color: #111a35;
  font-size: 11px;
  font-weight: 850;
  line-height: 1.2;
  text-align: right;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  white-space: nowrap;
}

.total-score-label strong {
  color: var(--brand-dark);
  font-size: 14px;
}

.dimension-row {
  display: grid;
  grid-template-columns: 62px 1fr 38px;
  gap: 10px;
  align-items: center;
}

.dimension-row span,
.dimension-row strong {
  font-weight: 850;
  color: #111a35;
}

.bar {
  height: 12px;
  overflow: hidden;
  border-radius: 999px;
  background: #e8eefb;
}

.bar i {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(
    90deg,
    #d96a7f 0%,
    #ef4444 50%,
    #fbbf24 51%,
    #f59e0b 79%,
    #22c55e 80%,
    #16a34a 100%
  );
  background-size: calc(10000% / var(--score-width, 100)) 100%;
  background-position: left center;
}

.personalization-panel {
  color: var(--white);
  background: linear-gradient(145deg, #09243e, #173f7e 46%, #5630c8);
}

.personalization-panel h3,
.personalization-panel .kicker {
  color: var(--white);
}

.personalization-panel p {
  color: rgba(255, 255, 255, 0.82);
}

.stat-callout {
  padding: 14px;
  border-radius: var(--radius-lg);
  background: rgba(255, 255, 255, 0.12);
}

.stat-callout strong {
  color: var(--white);
  font-size: 25px;
}

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

.contact-panel .email-field {
  grid-column: 1 / -1;
}

.next-step-band {
  background: linear-gradient(90deg, var(--panel), var(--soft));
}

.coach-header {
  margin-bottom: 14px;
  color: var(--white);
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: var(--radius-xl);
}

.coach-header h2,
.coach-header .kicker {
  color: var(--white);
}

.coach-header p {
  color: rgba(255, 255, 255, 0.78);
}

.coach-header a {
  color: #9bd7e5;
  font-weight: 850;
  text-decoration-thickness: 2px;
  text-underline-offset: 4px;
}

#draft-input {
  min-height: 330px;
  margin-top: 14px;
}

.coach-actions {
  display: grid;
  grid-template-columns: 1fr;
  margin-top: 14px;
}

.question-panel input {
  margin-top: 4px;
}

.suggestion-output {
  margin-top: 10px;
  padding: 14px;
  border: 1px solid rgba(78, 138, 217, 0.28);
  border-radius: 14px;
  color: #111a35;
  background: linear-gradient(180deg, #f8faff, #eef5ff);
  line-height: 1.45;
  font-weight: 700;
}

.question-panel {
  padding-bottom: 18px;
}

.teaser-card {
  background: var(--brand-soft);
}

.toast {
  position: fixed;
  right: 14px;
  bottom: 14px;
  left: 14px;
  transform: translateY(140%);
  padding: 12px 16px;
  border-radius: 999px;
  color: var(--white);
  text-align: center;
  background: #111a35;
  box-shadow: var(--shadow-card);
  transition: transform 180ms ease;
}

.toast.visible {
  transform: translateY(0);
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

@media (min-width: 560px) {
  .page-shell {
    width: min(100% - 32px, var(--max));
    padding-top: 16px;
  }

  .site-header {
    align-items: center;
    justify-content: center;
    min-height: 78px;
    padding: 12px 18px;
    border-radius: 22px;
  }

  .brand-link img {
    width: min(360px, 68vw);
  }

  .field-grid,
  .coach-actions {
    grid-template-columns: 1fr 1fr;
  }

  .prompt-panel,
  .contact-panel,
  .score-hero,
  .dimension-panel,
  .personalization-panel,
  .workspace-panel,
  .question-panel,
  .teaser-card,
  .results-header,
  .next-step-band,
  .coach-header {
    padding: 22px;
  }

  h1 {
    font-size: clamp(48px, 10vw, 66px);
  }

  .leader-strip {
    font-size: 17px;
  }

  .intro-copy p {
    font-size: 19px;
  }
}

@media (min-width: 860px) {
  :root {
    --radius-xl: 28px;
    --radius-lg: 18px;
  }

  .hero-section {
    grid-template-columns: 0.9fr 1.1fr;
    gap: 22px;
    align-items: start;
    min-height: 0;
    padding-top: 16px;
  }

  .hero-copy {
    padding: 10px 8px 0;
  }

  h1 {
    font-size: clamp(58px, 7vw, 76px);
  }

  h2 {
    font-size: clamp(34px, 4vw, 46px);
  }

  textarea {
    min-height: 310px;
  }

  .brand-link img {
    width: min(470px, 44vw);
  }

  .coach-layout {
    grid-template-columns: 0.95fr 1.05fr;
    gap: 22px;
  }

  .score-stack {
    max-width: none;
    grid-template-columns: 1fr 1fr;
    gap: 22px;
    align-items: stretch;
    padding-top: 0;
  }

  .score-left,
  .score-right {
    grid-template-rows: auto auto 1fr;
    align-content: stretch;
    gap: 14px;
  }

  .score-right {
    grid-template-rows: auto 1fr;
  }

  .score-hero {
    min-height: 374px;
    display: grid;
    align-content: start;
    padding: 22px;
  }

  .score-hero .score-ring {
    width: 156px;
    height: 156px;
    margin: 6px 0 20px;
  }

  .score-hero h2 {
    max-width: 560px;
    margin-bottom: 16px;
    font-size: clamp(34px, 3.1vw, 42px);
    line-height: 1.02;
  }

  .score-hero p {
    max-width: 580px;
    font-size: 15px;
    line-height: 1.5;
  }

  .score-left .metric-grid {
    min-height: 80px;
  }

  .score-left .metric-panel {
    display: grid;
    align-content: center;
    min-height: 80px;
    padding: 12px 16px;
  }

  .score-left .personalization-panel {
    display: grid;
    align-content: start;
    min-height: 214px;
    padding: 22px;
  }

  .score-right .dimension-panel {
    min-height: 244px;
    padding: 24px 26px;
  }

  .contact-panel {
    display: grid;
    align-content: start;
    min-height: 474px;
    padding: 28px 26px;
  }

  .contact-panel h2 {
    margin-bottom: 14px;
    font-size: clamp(42px, 4vw, 54px);
    line-height: 0.98;
  }

  .contact-panel .muted {
    margin-bottom: 18px;
  }

  .results-header,
  .next-step-band,
  .coach-header,
  .panel-heading {
    grid-template-columns: 1fr auto;
    align-items: start;
  }

  .score-ring {
    width: 180px;
    height: 180px;
    margin-left: 0;
  }

  .score-ring span {
    font-size: 62px;
  }

  #draft-input {
    min-height: 360px;
  }
}
