:root {
  --ink: #15201d;
  --muted: #52635e;
  --paper: #f8faf7;
  --paper-deep: #edf4ef;
  --panel: #ffffff;
  --line: #dce5df;
  --green: #1e6f5c;
  --green-dark: #114a3f;
  --blue: #2e65a6;
  --gold: #c98923;
  --rose: #b65a5a;
  --steel: #61738a;
  --shadow: 0 24px 70px rgba(26, 40, 37, 0.16);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--ink);
  background: var(--paper);
  font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.5;
}

a {
  color: inherit;
}

.site-header {
  position: fixed;
  z-index: 20;
  top: 0;
  left: 0;
  right: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  min-height: 72px;
  padding: 14px clamp(20px, 5vw, 72px);
  background: rgba(248, 250, 247, 0.88);
  border-bottom: 1px solid rgba(220, 229, 223, 0.8);
  backdrop-filter: blur(18px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: var(--ink);
  font-weight: 800;
  letter-spacing: 0;
  text-decoration: none;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  color: white;
  background: var(--green);
  border-radius: 8px;
  font-size: 0.82rem;
}

nav {
  display: flex;
  align-items: center;
  gap: clamp(14px, 3vw, 32px);
  color: var(--muted);
  font-size: 0.94rem;
  font-weight: 600;
}

nav a,
.site-footer a,
.nav-button {
  text-decoration: none;
}

nav a:hover,
.site-footer a:hover,
.nav-button:hover {
  color: var(--green-dark);
}

.nav-cta,
.nav-button {
  display: inline-flex;
  align-items: center;
  min-height: 38px;
  padding: 0 14px;
  color: white;
  background: var(--green-dark);
  border: 1px solid var(--green-dark);
  border-radius: 8px;
  font: inherit;
  font-weight: 800;
  cursor: pointer;
}

.nav-cta:hover,
.nav-button:hover {
  color: white;
  background: var(--green);
}

.home {
  min-height: 100vh;
  padding: 108px clamp(20px, 5vw, 72px) 42px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.78), rgba(237, 244, 239, 0.92)),
    var(--paper-deep);
}

.eyebrow,
.section-kicker {
  margin: 0 0 14px;
  color: var(--green);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

h2,
h3,
p {
  overflow-wrap: break-word;
}

.hero-title {
  display: block;
  grid-column: 1 / -1;
  margin: 0;
  width: 100%;
  max-width: 100%;
  font-size: clamp(1.75rem, 8.5vw, 7.6rem);
  line-height: 0.86;
  letter-spacing: 0;
  white-space: nowrap !important;
  word-break: keep-all !important;
  overflow-wrap: normal !important;
  hyphens: manual;
}

.hero-copy {
  max-width: 780px;
  margin: 28px 0 0;
  color: #263834;
  font-size: clamp(1.08rem, 2vw, 1.34rem);
}

.button,
.product-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 48px;
  padding: 0 18px;
  border-radius: 8px;
  font-weight: 800;
  text-decoration: none;
}

.button svg,
.product-link svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2.3;
}

.button-primary {
  color: white;
  background: var(--green-dark);
  box-shadow: 0 16px 34px rgba(17, 74, 63, 0.24);
}

.button-secondary {
  color: var(--green-dark);
  background: rgba(255, 255, 255, 0.74);
  border: 1px solid rgba(30, 111, 92, 0.22);
}

.button:disabled {
  cursor: wait;
  opacity: 0.68;
}

.home-header {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: clamp(24px, 6vw, 84px);
  align-items: start;
  max-width: 1280px;
  margin: 0 auto 30px;
}

.home-header .eyebrow {
  margin-bottom: -12px;
}

.home-header .hero-copy {
  max-width: 640px;
  margin-bottom: 8px;
}

.home-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
  max-width: 1180px;
  margin: 34px auto 0;
}

.home-card {
  min-height: 265px;
  padding: 24px;
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 16px 40px rgba(26, 40, 37, 0.08);
}

.product-card {
  display: flex;
  flex-direction: column;
}

.muted-card {
  background: rgba(255, 255, 255, 0.68);
}

.card-topline {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.product-card h2 {
  margin: 44px 0 0;
  font-size: clamp(1.45rem, 2vw, 2.05rem);
  line-height: 1;
}

.product-card p {
  margin: 14px 0 0;
  color: var(--muted);
}

.analytics-panel {
  display: grid;
  grid-template-columns: minmax(0, 0.85fr) minmax(420px, 1.15fr);
  gap: 24px;
  max-width: 1280px;
  margin: 18px auto 0;
  padding: 22px;
  background: rgba(21, 32, 29, 0.92);
  color: white;
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.analytics-panel .section-kicker {
  color: #9bd8c8;
}

.analytics-panel h2 {
  max-width: 540px;
  font-size: clamp(1.55rem, 2.6vw, 2.8rem);
}

.metric-label {
  color: rgba(255, 255, 255, 0.72);
  font-size: 0.88rem;
  font-weight: 700;
}

.analytics-board {
  display: grid;
  gap: 14px;
}

.accuracy-main,
.accuracy-card,
.accuracy-details {
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 8px;
}

.accuracy-main {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 18px;
  padding: 18px;
}

.accuracy-main p {
  margin: 8px 0 0;
  color: rgba(255, 255, 255, 0.72);
}

.accuracy-card {
  min-height: 158px;
  padding: 16px;
  display: grid;
  justify-items: center;
  align-content: center;
  gap: 12px;
  text-align: center;
}

.accuracy-ring {
  --ring-size: 92px;
  --ring-width: 10px;
  display: grid;
  place-items: center;
  width: var(--ring-size);
  height: var(--ring-size);
  border-radius: 50%;
  background:
    radial-gradient(circle, #15201d 0 58%, transparent 59%),
    conic-gradient(#9bd8c8 calc(var(--value) * 1%), rgba(255, 255, 255, 0.16) 0);
}

.large-ring {
  --ring-size: 142px;
  --ring-width: 14px;
}

.accuracy-ring span {
  font-size: 1.3rem;
  font-weight: 800;
}

.large-ring span {
  font-size: 2.15rem;
}

.accuracy-details {
  padding: 0;
  overflow: hidden;
}

.accuracy-details summary {
  min-height: 48px;
  padding: 14px 16px;
  cursor: pointer;
  color: white;
  font-weight: 800;
}

.detail-grid {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 12px 18px;
  padding: 0 16px 16px;
  color: rgba(255, 255, 255, 0.76);
}

.detail-grid strong {
  color: white;
}

.science-bowl-detail {
  display: grid;
  gap: 14px;
  padding: 0 16px 16px;
}

.science-bowl-summary {
  display: grid;
  grid-template-columns: minmax(0, 0.7fr) minmax(0, 1fr);
  gap: 12px;
  align-items: end;
  padding: 14px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 8px;
}

.science-bowl-summary strong {
  display: block;
  margin-top: 6px;
  color: white;
  font-size: clamp(2rem, 4vw, 3rem);
  line-height: 0.95;
}

.science-bowl-summary p,
.detail-empty {
  margin: 0;
  color: rgba(255, 255, 255, 0.72);
  font-weight: 700;
}

.subject-list {
  display: grid;
  gap: 8px;
}

.subject-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 16px;
  align-items: center;
  min-height: 58px;
  padding: 10px 12px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 8px;
}

.subject-row span,
.subject-row strong {
  color: white;
  font-weight: 800;
}

.subject-row small {
  display: block;
  margin-top: 2px;
  color: rgba(255, 255, 255, 0.62);
  font-size: 0.78rem;
  font-weight: 700;
}

.stats-detail-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 0 14px;
  color: #15201d;
  background: #9bd8c8;
  border-radius: 8px;
  font-weight: 800;
  text-decoration: none;
}

.stats-detail-link:hover {
  background: white;
}

.stats-shell {
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.8), rgba(237, 244, 239, 0.94)),
    var(--paper-deep);
}

.stats-page {
  display: grid;
  gap: 18px;
  max-width: 1120px;
  margin: 32px auto 0;
}

.stats-overview-panel,
.subject-panel {
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 18px 46px rgba(26, 40, 37, 0.1);
}

.stats-overview-panel {
  display: grid;
  grid-template-columns: minmax(0, 0.7fr) minmax(0, 1fr);
  gap: 18px;
  align-items: end;
  padding: 24px;
}

.stats-overview-panel strong {
  display: block;
  margin-top: 12px;
  font-size: clamp(3rem, 8vw, 5.5rem);
  line-height: 0.9;
}

.stats-overview-panel p {
  margin: 0;
  color: var(--muted);
  font-weight: 800;
}

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

.subject-panel {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 18px;
  align-items: center;
  min-height: 142px;
  padding: 20px;
}

.subject-name {
  display: block;
  color: var(--ink);
  font-size: 1.2rem;
  font-weight: 800;
}

.subject-panel p {
  margin: 8px 0 0;
  color: var(--muted);
}

.subject-metrics {
  display: grid;
  justify-items: end;
  gap: 6px;
  text-align: right;
}

.subject-metrics strong {
  color: var(--green-dark);
  font-size: 2.4rem;
  line-height: 0.95;
}

.subject-metrics span {
  color: var(--ink);
  font-weight: 800;
}

.subject-metrics small,
.page-empty {
  color: var(--muted);
  font-weight: 700;
}

.page-empty {
  margin: 0;
  padding: 24px;
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.band {
  background: #eef5f0;
  border-block: 1px solid var(--line);
}

section:not(.home) {
  padding: clamp(72px, 9vw, 126px) clamp(20px, 6vw, 90px);
}

.section-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.95fr) minmax(320px, 1.05fr);
  gap: clamp(28px, 6vw, 82px);
  max-width: 1180px;
  margin: 0 auto;
  align-items: start;
}

.section-heading {
  max-width: 820px;
  margin: 0 auto 34px;
  text-align: center;
}

h2 {
  margin: 0;
  font-size: clamp(2rem, 4.4vw, 4rem);
  line-height: 1;
  letter-spacing: 0;
}

.about-copy,
.section-grid > p {
  margin: 0;
  color: var(--muted);
  font-size: clamp(1rem, 1.5vw, 1.17rem);
}

.product-label,
.status {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.status {
  color: var(--green-dark);
}

.planned {
  color: var(--steel);
}

.pipeline-step p {
  margin: 0;
  color: var(--muted);
}

.product-link {
  justify-content: flex-start;
  width: fit-content;
  margin-top: auto;
  padding: 24px 0 0;
  color: var(--green-dark);
}

.pipeline-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
  max-width: 1180px;
  margin: 0 auto;
}

.pipeline-step {
  min-height: 260px;
  padding: 24px;
  background: rgba(255, 255, 255, 0.74);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.pipeline-step span {
  display: inline-block;
  margin-bottom: 44px;
  color: var(--gold);
  font-weight: 800;
}

.pipeline-step h3 {
  margin: 0 0 12px;
  font-size: 1.22rem;
  line-height: 1.16;
}

.about-copy {
  display: grid;
  gap: 18px;
}

.about-copy p {
  margin: 0;
  padding-left: 18px;
  border-left: 4px solid var(--rose);
}

.about-copy p:nth-child(2) {
  border-left-color: var(--blue);
}

.site-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 28px clamp(20px, 6vw, 90px);
  color: var(--muted);
  border-top: 1px solid var(--line);
}

.site-footer span {
  color: var(--ink);
  font-weight: 800;
}

.auth-page {
  min-height: 100vh;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.84), rgba(237, 244, 239, 0.94)),
    var(--paper-deep);
}

.auth-shell {
  display: grid;
  align-content: center;
  gap: 28px;
  min-height: 100vh;
  width: min(100% - 40px, 460px);
  margin: 0 auto;
  padding: 42px 0;
}

.auth-brand {
  width: fit-content;
}

.auth-panel,
.dashboard-panel {
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 18px 46px rgba(26, 40, 37, 0.1);
}

.auth-panel {
  padding: clamp(24px, 5vw, 34px);
}

.auth-panel h1,
.dashboard-hero h1 {
  margin: 0;
  font-size: clamp(2.1rem, 6vw, 3.7rem);
  line-height: 0.95;
}

.auth-form {
  display: grid;
  gap: 18px;
  margin-top: 28px;
}

.auth-form label {
  display: grid;
  gap: 8px;
  color: var(--ink);
  font-weight: 800;
}

.auth-form input {
  width: 100%;
  min-height: 48px;
  padding: 0 14px;
  color: var(--ink);
  background: white;
  border: 1px solid var(--line);
  border-radius: 8px;
  font: inherit;
}

.auth-form input:focus {
  outline: 3px solid rgba(30, 111, 92, 0.18);
  border-color: var(--green);
}

.form-message {
  min-height: 24px;
  margin: 0;
  color: var(--rose);
  font-weight: 700;
}

.form-message:empty {
  display: none;
}

.form-message[data-type="success"] {
  color: var(--green-dark);
}

.auth-divider {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 12px;
  align-items: center;
  margin: 22px 0;
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 800;
}

.auth-divider::before,
.auth-divider::after {
  content: "";
  height: 1px;
  background: var(--line);
}

.button-google {
  width: 100%;
  color: var(--ink);
  background: #fff;
  border: 1px solid var(--line);
  box-shadow: 0 12px 26px rgba(26, 40, 37, 0.08);
}

.button-google:hover {
  border-color: rgba(30, 111, 92, 0.38);
}

.google-mark {
  display: inline-grid;
  place-items: center;
  width: 22px;
  height: 22px;
  color: #1a73e8;
  border: 1px solid #dadce0;
  border-radius: 50%;
  font-family: Arial, sans-serif;
  font-size: 0.88rem;
  font-weight: 700;
}

.auth-switch {
  margin: 20px 0 0;
  color: var(--muted);
}

.auth-switch a {
  color: var(--green-dark);
  font-weight: 800;
}

.dashboard-shell {
  min-height: 100vh;
  padding: 124px clamp(20px, 6vw, 90px) 56px;
  background: var(--paper);
}

.dashboard-hero,
.dashboard-grid {
  max-width: 1120px;
  margin: 0 auto;
}

.dashboard-hero p:last-child {
  max-width: 680px;
  color: var(--muted);
  font-size: 1.08rem;
}

.dashboard-grid {
  display: grid;
  grid-template-columns: minmax(220px, 0.55fr) minmax(0, 1.45fr);
  gap: 18px;
  margin-top: 32px;
}

.dashboard-panel {
  min-height: 220px;
  padding: 24px;
}

.dashboard-panel strong {
  display: block;
  margin-top: 24px;
  font-size: clamp(3rem, 8vw, 5.5rem);
  line-height: 0.9;
}

.dashboard-panel p {
  margin: 16px 0 0;
  color: var(--muted);
}

.dark-label {
  color: var(--green-dark);
}

.dashboard-panel pre {
  min-height: 140px;
  margin: 18px 0 0;
  padding: 16px;
  overflow: auto;
  white-space: pre-wrap;
  color: var(--muted);
  background: var(--paper-deep);
  border: 1px solid var(--line);
  border-radius: 8px;
  font: 0.92rem/1.45 ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
}

.account-home {
  display: grid;
  gap: 52px;
}

.account-home section,
.about-page section {
  padding: 0;
}

.compact-hero {
  width: 100%;
}

.account-section {
  width: 100%;
  max-width: 1180px;
  margin: 0 auto;
  scroll-margin-top: 96px;
}

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

.section-label {
  width: fit-content;
  margin: 0;
  padding: 7px 11px;
  color: var(--green-dark);
  background: rgba(30, 111, 92, 0.12);
  border: 1px solid rgba(30, 111, 92, 0.2);
  border-radius: 6px;
  font-size: 0.84rem;
  font-weight: 800;
  letter-spacing: 0.11em;
  line-height: 1;
  text-transform: uppercase;
}

.analytics-panel .section-label {
  color: #c4eee3;
  background: rgba(155, 216, 200, 0.12);
  border-color: rgba(155, 216, 200, 0.25);
}

.account-product-grid {
  margin-top: 0;
}

.account-product-grid .home-card {
  min-height: 235px;
}

.account-product-grid .product-card h2 {
  font-size: clamp(1.35rem, 2vw, 1.85rem);
}

.account-analytics {
  width: 100%;
  margin-top: 0;
  scroll-margin-top: 96px;
}

.analytics-intro {
  align-self: start;
  padding: 8px 4px;
}

.analytics-intro .section-label {
  margin-bottom: 18px;
}

.account-analytics h2 {
  max-width: 320px;
}

.about-page {
  min-height: calc(100vh - 82px);
  padding: 150px clamp(20px, 6vw, 90px) 76px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.78), rgba(237, 244, 239, 0.92)),
    var(--paper-deep);
}

.about-hero,
.compact-pipeline {
  max-width: 980px;
  margin: 0 auto;
}

.about-hero h1 {
  max-width: 820px;
  margin: 0;
  font-size: clamp(2.6rem, 6vw, 5.8rem);
  line-height: 0.95;
}

.about-hero > p:last-child {
  max-width: 650px;
  margin: 24px 0 0;
  color: var(--muted);
  font-size: 1.08rem;
}

.compact-pipeline {
  display: grid;
  grid-template-columns: minmax(220px, 0.7fr) minmax(0, 1.3fr);
  gap: clamp(30px, 7vw, 86px);
  margin-top: 72px;
  padding-top: 42px !important;
  border-top: 1px solid var(--line);
}

.compact-heading h2 {
  font-size: clamp(1.8rem, 3vw, 2.8rem);
}

.pipeline-list {
  display: grid;
  gap: 0;
  margin: 0;
  padding: 0;
  list-style: none;
}

.pipeline-list li {
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr);
  gap: 14px;
  padding: 17px 0;
  border-bottom: 1px solid var(--line);
}

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

.pipeline-list span {
  color: var(--gold);
  font-size: 0.8rem;
  font-weight: 800;
}

.pipeline-list h3,
.pipeline-list p {
  margin: 0;
}

.pipeline-list h3 {
  font-size: 1.05rem;
}

.pipeline-list p {
  margin-top: 4px;
  color: var(--muted);
}

@media (max-width: 920px) {
  .site-header {
    position: absolute;
  }

  .home-header,
  .analytics-panel,
  .section-grid,
  .compact-pipeline {
    grid-template-columns: 1fr;
  }

  .home-grid,
  .pipeline-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .accuracy-row {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

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

  nav {
    width: 100%;
    justify-content: space-between;
    gap: 10px;
    font-size: 0.86rem;
    flex-wrap: wrap;
  }

  .home {
    padding-top: 168px;
  }

  .hero-title {
    font-size: clamp(1.55rem, 8.2vw, 5.2rem);
  }

  .home-grid,
  .accuracy-row {
    grid-template-columns: 1fr;
  }

  .home-card {
    min-height: auto;
  }

  .accuracy-main {
    grid-template-columns: 1fr;
    justify-items: center;
    text-align: center;
  }

  .product-card h2 {
    margin-top: 32px;
  }

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

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

  .dashboard-shell {
    padding-top: 174px;
  }

  .account-home {
    gap: 42px;
  }

  .about-page {
    padding-top: 190px;
  }

  .stats-overview-panel,
  .subject-page-grid,
  .subject-panel {
    grid-template-columns: 1fr;
  }

  .subject-metrics {
    justify-items: start;
    text-align: left;
  }

  .pipeline-step {
    min-height: auto;
  }

  .pipeline-step span {
    margin-bottom: 26px;
  }

  .site-footer {
    align-items: flex-start;
    flex-direction: column;
  }
}
