/*
 * TheraQuiz quiz-first RC3
 * Successor presentation layer. RC2 remains intact in source history; this file
 * removes yellow surfaces and gives Build a Quiz a single, stable visual center.
 */

:root {
  --yellow-soft: #f3f5fa;
}

body { background: var(--canvas); }

.owner-review-banner {
  border-bottom-color: #cbd6ff;
  color: #2946bc;
  background: var(--blue-soft);
}

/* Account entry: communicate the product before asking for credentials. */
.auth-card {
  width: min(100%, 980px);
  max-width: 980px;
  min-height: 548px;
  margin: 28px auto 10px;
  padding: 0;
  display: grid;
  grid-template-columns: minmax(0, 1.04fr) minmax(380px, 0.96fr);
  grid-template-rows: minmax(0, 1fr);
  overflow: hidden;
  border-radius: 24px;
  background: #fff;
}

.auth-card::before { content: none; }

.auth-story { grid-column: 1; grid-row: 1; }
.auth-entry { grid-column: 2; grid-row: 1; }

.auth-story,
.auth-entry {
  min-width: 0;
  padding: 48px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.auth-story {
  position: relative;
  border-right: 1px solid var(--line);
  background: #f4f6fb;
}

.auth-story::before {
  content: "";
  width: 64px;
  height: 5px;
  margin-bottom: 26px;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--blue) 0 42%, var(--coral) 42% 72%, var(--green) 72% 100%);
}

.auth-story h1 {
  margin: 8px 0 16px;
  font-size: clamp(42px, 5vw, 60px);
  line-height: 0.98;
}

.auth-story .lede {
  margin: 0;
  font-size: 16px;
  line-height: 1.55;
}

.auth-benefits {
  margin: 26px 0 0;
  padding: 0;
  display: grid;
  gap: 12px;
  list-style: none;
}

.auth-benefits li {
  position: relative;
  min-height: 24px;
  padding-left: 30px;
  color: #4f5b72;
  font-weight: 650;
}

.auth-benefits li::before {
  content: "";
  position: absolute;
  top: 4px;
  left: 0;
  width: 17px;
  height: 17px;
  border: 5px solid var(--green);
  border-radius: 50%;
  background: #fff;
}

.auth-entry .auth-tabs { margin: 0 0 18px; }
.auth-entry label { margin: 0 0 14px; }
.auth-entry input,
.auth-entry .wide { min-height: 48px; }
.auth-entry .fineprint { margin-top: 16px; line-height: 1.55; }

/* Returning learner: orient quickly, then put the builder first. */
.welcome-row {
  min-height: 142px;
  margin-bottom: 18px;
  padding: 26px 28px;
  border-radius: 20px;
  background: #fff;
}

.welcome-row::before {
  width: 5px;
  background: var(--blue);
}

.welcome-row h1 {
  margin: 5px 0 8px;
  font-size: clamp(34px, 4vw, 46px);
}

.dashboard-grid,
#app[data-access="free"] .dashboard-grid {
  grid-template-columns: minmax(0, 1fr);
  grid-template-areas:
    "build"
    "progress";
  gap: 18px;
}

.build-card,
#app[data-access="free"] .build-card {
  min-height: 0;
  padding: 28px;
}

.progress-card,
#app[data-access="free"] .progress-card {
  min-height: 0;
  padding: 24px 28px;
}

.build-card:hover { transform: none; }

.build-card > .primary {
  width: min(220px, 100%);
  min-height: 50px;
  margin-top: 2px;
  align-self: flex-end;
}

.filter-tray {
  margin: 22px 0 18px;
  padding: 20px;
  background: #f4f6fb;
}

.builder { gap: 16px; }
.library-grid .card { min-height: 190px; }

/* Study Guide: real curriculum architecture, with publication state explicit. */
.study-hero {
  min-height: 154px;
  background: linear-gradient(104deg, #fff 0 76%, var(--blue-soft) 76% 100%);
}

.study-summary {
  border-color: #cbd6ff;
  color: #2946bc;
}

.study-summary strong { color: #2946bc; }

.study-outline-panel {
  margin: 0 0 18px;
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: #fff;
}

.study-outline-header {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 18px;
}

.study-outline-header h2 { margin: 4px 0 0; }

.library-label {
  flex: 0 0 auto;
  padding: 7px 10px;
  border: 1px solid #cbd6ff;
  border-radius: 999px;
  color: #2946bc;
  background: var(--blue-soft);
  font-size: 12px;
  font-weight: 750;
}

#study-outline-copy {
  max-width: 780px;
  margin: 10px 0 18px;
}

.study-outline-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.study-outline-card {
  min-width: 0;
  min-height: 148px;
  padding: 16px;
  display: grid;
  grid-template-rows: auto auto 1fr;
  align-content: start;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #f7f8fb;
}

.study-outline-index {
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  border-radius: 9px;
  color: #2946bc;
  background: var(--blue-soft);
  font-size: 11px;
  font-weight: 850;
}

.study-outline-card:nth-child(3n + 2) .study-outline-index {
  color: #a42c32;
  background: var(--coral-soft);
}

.study-outline-card:nth-child(3n) .study-outline-index {
  color: #0d6b48;
  background: var(--green-soft);
}

.study-outline-card h3 {
  margin: 12px 0 6px;
  color: var(--ink-strong);
  font-size: 16px;
  line-height: 1.25;
}

.study-outline-card p {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

.review-gate-note {
  margin: 16px 0 0;
  padding: 12px 14px;
  border-left: 3px solid var(--blue);
  color: #58647a;
  background: #f4f6fb;
  font-size: 12px;
}

#study-empty {
  border-style: dashed;
  background: #f7f8fb;
}

@media (max-width: 980px) {
  .dashboard-grid,
  #app[data-access="free"] .dashboard-grid {
    grid-template-areas: "build" "progress";
  }

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

@media (max-width: 780px) {
  .auth-card {
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: auto auto;
    min-height: 0;
  }

  .auth-story,
  .auth-entry { grid-column: 1; padding: 30px 26px; }
  .auth-story { grid-row: 1; }
  .auth-entry { grid-row: 2; }
  .auth-story { border-right: 0; border-bottom: 1px solid var(--line); }
  .auth-story h1 { font-size: clamp(38px, 12vw, 52px); }
  .welcome-row { background: #fff; }
  .study-outline-header { align-items: start; flex-direction: column; }
  .library-label { align-self: start; }
}

@media (max-width: 560px) {
  .build-card,
  #app[data-access="free"] .build-card,
  .progress-card,
  #app[data-access="free"] .progress-card { padding: 20px; }

  .build-card > .primary { width: 100%; }
  .study-outline-panel { padding: 20px; }
  .study-outline-grid { grid-template-columns: minmax(0, 1fr); }
  .study-outline-card { min-height: 0; }
}
