@import url('https://fonts.googleapis.com/css2?family=Space+Grotesk:wght@500;600;700&family=IBM+Plex+Sans:wght@400;500;600&family=IBM+Plex+Mono:wght@400;500&display=swap');

.quiz-spec {
  --ink: #111318;
  --muted: #5B6472;
  --rule: #E4E7EB;
  --rule-strong: #CBD1D8;
  --bg: #FAFAFA;
  --panel: #FFFFFF;
  --blue: #1D4ED8;
  --blue-tint: #EAF0FD;
  --black: #111318;
  --good: #198754;
  --cfg: #0A4D8C;
  --ing: #1A75C5;
  --gov: #198754;
  --ins: #FFC107;
  --csdm: #6F42C1;
  --cross: #20C997;

  box-sizing: border-box;
  background: var(--bg);
  color: var(--ink);
  font-family: 'IBM Plex Sans', sans-serif;
  line-height: 1.5;
  font-size: 14px;
}

.quiz-spec *,
.quiz-spec *::before,
.quiz-spec *::after {
  box-sizing: border-box;
}

.quiz-spec h1,
.quiz-spec h2,
.quiz-spec h3 {
  font-family: 'Space Grotesk', sans-serif;
  letter-spacing: -0.01em;
}

.quiz-spec .mono {
  font-family: 'IBM Plex Mono', monospace;
}

.quiz-spec a {
  color: var(--blue);
  text-decoration: none;
}

.quiz-spec a:hover {
  text-decoration: underline;
}

.quiz-spec button {
  font-family: inherit;
}

.quiz-spec .layout {
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 24px 60px;
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 32px;
}

.quiz-spec .title-block {
  grid-column: 1 / -1;
  padding: 30px 0 18px;
  border-bottom: 2px solid var(--ink);
}

.quiz-spec .title-eyebrow {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 11.5px;
  color: var(--blue);
  letter-spacing: .08em;
  text-transform: uppercase;
  margin-bottom: 6px;
}

.quiz-spec .title-block h1 {
  font-size: 32px;
  margin: 0 0 6px;
  font-weight: 700;
}

.quiz-spec .title-block .sub {
  font-size: 13.5px;
  color: var(--muted);
}

.quiz-spec .title-block .sub b {
  color: var(--ink);
  font-weight: 600;
}

.quiz-spec .title-block .sub a {
  color: var(--muted);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.quiz-spec .title-block .sub a:hover {
  color: var(--blue);
}

.quiz-spec .main-col {
  min-width: 0;
}

.quiz-spec .spec-table {
  width: 100%;
  border-collapse: collapse;
  margin: 24px 0 0;
}

.quiz-spec .spec-table tr {
  border-bottom: 1px solid var(--rule);
}

.quiz-spec .spec-table tr:first-child {
  border-top: 1px solid var(--rule);
}

.quiz-spec .spec-table td {
  padding: 9px 4px;
  font-size: 13px;
}

.quiz-spec .spec-table td.k {
  color: var(--muted);
  width: 38%;
  font-weight: 500;
}

.quiz-spec .spec-table td.v {
  font-family: 'IBM Plex Mono', monospace;
  font-weight: 500;
  color: var(--ink);
}

.quiz-spec .spec-table td.v.hl {
  color: var(--blue);
  font-weight: 600;
}

.quiz-spec .spec-table td.v.user {
  color: var(--ink);
  font-weight: 600;
}

.quiz-spec .section {
  margin-top: 30px;
}

.quiz-spec .section-title {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  border-bottom: 1px solid var(--ink);
  padding-bottom: 6px;
  margin-bottom: 12px;
  gap: 12px;
}

.quiz-spec .section-title h2 {
  font-size: 16.5px;
  margin: 0;
  text-transform: uppercase;
  letter-spacing: .03em;
}

.quiz-spec .section-title .note {
  font-size: 11.5px;
  color: var(--muted);
  font-family: 'IBM Plex Mono', monospace;
}

/* Topics covered — mockup .topic-* and production .quiz-hub-topic-* */
.quiz-spec .topic-bars,
.quiz-spec .quiz-hub-topic-bars {
  display: grid;
  gap: 1.5rem;
}

@media (min-width: 640px) {
  .quiz-spec .topic-bars,
  .quiz-spec .quiz-hub-topic-bars {
    grid-template-columns: 1fr 1fr;
  }
}

.quiz-spec .topic-group-title,
.quiz-spec .quiz-hub-topic-group-title {
  font-size: .78rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .05em;
  color: var(--muted);
  margin: 0 0 .75rem;
}

.quiz-spec .topic-row,
.quiz-spec .quiz-hub-topic-row {
  margin-bottom: .65rem;
}

.quiz-spec .topic-row-head,
.quiz-spec .quiz-hub-topic-row-head {
  display: flex;
  align-items: center;
  gap: .5rem;
  font-size: .83rem;
  margin-bottom: .25rem;
}

.quiz-spec .topic-swatch,
.quiz-spec .quiz-hub-topic-swatch {
  width: 10px;
  height: 10px;
  border-radius: 3px;
  flex-shrink: 0;
}

.quiz-spec .topic-name,
.quiz-spec .quiz-hub-topic-name {
  flex: 1;
  min-width: 0;
  color: var(--ink);
  font-weight: 500;
}

.quiz-spec .topic-pct,
.quiz-spec .quiz-hub-topic-pct {
  color: var(--muted);
  font-size: .78rem;
  white-space: nowrap;
}

.quiz-spec .topic-track,
.quiz-spec .quiz-hub-topic-track {
  height: 5px;
  background: #EEF1F5;
  border-radius: 99px;
  overflow: hidden;
}

.quiz-spec .topic-fill,
.quiz-spec .quiz-hub-topic-fill {
  height: 100%;
  border-radius: 99px;
  width: 0;
  transition: width .55s cubic-bezier(.4, 0, .2, 1);
}

/* RIGHT RAIL */
.quiz-spec .rail {
  position: sticky;
  top: 16px;
  align-self: start;
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding-top: 30px;
}

.quiz-spec .rail-card {
  background: var(--panel);
  border: 1px solid var(--rule);
  border-radius: 9px;
  padding: 14px 16px;
}

.quiz-spec .rail-card h4 {
  margin: 0 0 10px;
  font-size: 11.5px;
  text-transform: uppercase;
  letter-spacing: .05em;
  color: var(--muted);
  font-weight: 600;
}

/* Last 30 days — highest score per day */
.quiz-spec .score30-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 8px;
  margin-bottom: 4px;
}

.quiz-spec .score30-head h4 {
  margin: 0;
}

.quiz-spec .score30-sub {
  font-size: 11px;
  color: var(--muted);
  margin: 0 0 8px;
  line-height: 1.35;
}

.quiz-spec .score30-meta {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 10.5px;
  color: var(--muted);
  white-space: nowrap;
}

.quiz-spec .score30-chart {
  position: relative;
  width: 100%;
  height: 120px;
  border: 1px solid #F1F5F9;
  border-radius: 6px;
  background: #F8FAFC;
  padding: 8px 6px 4px;
}

.quiz-spec .score30-chart--locked {
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 16px 12px;
}

.quiz-spec .score30-lock {
  margin: 0;
  font-size: 12.5px;
  color: var(--muted);
  line-height: 1.45;
}

.quiz-spec .score30-chart svg {
  width: 100%;
  height: 100%;
  display: block;
}

.quiz-spec .score30-axis {
  display: flex;
  justify-content: space-between;
  margin-top: 4px;
  font-size: 10px;
  color: #94A3B8;
  font-weight: 500;
}

/* Start Exam CTA */
.quiz-spec .cta-card {
  background: var(--ink);
  border: 1px solid var(--ink);
  border-radius: 10px;
  padding: 18px 16px;
  color: #F5F5F5;
  box-shadow: 0 10px 26px -12px rgba(17, 19, 24, .55);
}

.quiz-spec .cta-mode {
  display: flex;
  gap: 0;
  margin-bottom: 12px;
  border: 1px solid #454A54;
  border-radius: 7px;
  overflow: hidden;
}

.quiz-spec .cta-mode-btn {
  flex: 1;
  background: transparent;
  border: none;
  color: #9AA3AF;
  font-size: 12.5px;
  font-weight: 600;
  padding: 9px 8px;
  cursor: pointer;
  font-family: 'Space Grotesk', sans-serif;
}

.quiz-spec .cta-mode-btn.is-active {
  background: #fff;
  color: var(--ink);
}

.quiz-spec .cta-conditions {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 11px;
  color: #C7CCD4;
  margin: 0 0 14px;
  line-height: 1.55;
}

.quiz-spec .cta-conditions b {
  color: #F5F5F5;
  font-weight: 600;
}

.quiz-spec .cta-actions {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.quiz-spec .cta-btn {
  font-size: 14px;
  font-weight: 700;
  border-radius: 7px;
  padding: 12px 14px;
  cursor: pointer;
  text-align: center;
  transition: opacity .15s ease, background .15s ease, border-color .15s ease;
  font-family: 'Space Grotesk', sans-serif;
  border: 1px solid transparent;
}

.quiz-spec .cta-btn.primary {
  background: #fff;
  color: var(--ink);
  border-color: #fff;
}

.quiz-spec .cta-btn.primary:hover {
  opacity: .9;
}

/* Activity Feed */
.quiz-spec .feed-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.quiz-spec .feed-item {
  display: grid;
  grid-template-columns: 28px 1fr;
  gap: 8px;
  padding: 9px 0;
  border-top: 1px solid var(--rule);
  font-size: 12px;
  line-height: 1.35;
}

.quiz-spec .feed-item:first-child {
  border-top: none;
  padding-top: 2px;
}

.quiz-spec .feed-avatar {
  width: 28px;
  height: 28px;
  border-radius: 4px;
  background: var(--blue-tint);
  color: var(--blue);
  font-weight: 700;
  font-size: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.quiz-spec .feed-avatar.g {
  background: #F0FAF4;
  color: var(--good);
}

.quiz-spec .feed-avatar.p {
  background: #F3EEFA;
  color: var(--csdm);
}

.quiz-spec .feed-avatar.y {
  background: #FFF8E6;
  color: #B8860B;
}

.quiz-spec .feed-body strong {
  font-weight: 600;
  color: var(--ink);
}

.quiz-spec .feed-body span {
  color: var(--muted);
}

.quiz-spec .feed-time {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 10px;
  color: var(--muted);
  margin-top: 2px;
}

/* Discussion */
.quiz-spec .discussion {
  margin-top: 30px;
}

.quiz-spec .comment {
  display: flex;
  gap: 9px;
  padding: 10px 0;
  font-size: 12.5px;
  border-top: 1px solid var(--rule);
}

.quiz-spec .comment:first-of-type {
  border-top: none;
  padding-top: 0;
}

.quiz-spec .avatar {
  width: 22px;
  height: 22px;
  border-radius: 3px;
  background: var(--blue-tint);
  color: var(--blue);
  font-weight: 700;
  font-size: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.quiz-spec .comment .who {
  font-weight: 600;
}

.quiz-spec .disc-cta {
  margin-top: 10px;
  font-size: 12px;
  font-weight: 600;
  display: inline-block;
}

@media (max-width: 920px) {
  .quiz-spec .layout {
    display: flex;
    flex-direction: column;
    gap: 16px;
  }

  /* Flatten the rail so we can place Start Exam under the title */
  .quiz-spec .rail {
    display: contents;
    position: static;
    padding-top: 0;
  }

  .quiz-spec .title-block {
    order: 1;
    padding: 22px 0 10px;
  }

  .quiz-spec .cta-card {
    order: 2;
  }

  .quiz-spec .main-col {
    order: 3;
  }

  /* Must not use .layout > .rail-card — with display:contents the cards
     stay DOM children of .rail, so the child combinator never matches and
     they keep order:0 (above the title). */
  .quiz-spec .rail-card {
    order: 4;
  }

  .quiz-spec .spec-table {
    margin-top: 8px;
  }
}

@media (max-width: 600px) {
  .quiz-spec .title-block h1 {
    font-size: 24px;
  }

  .quiz-spec .layout {
    padding-left: 16px;
    padding-right: 16px;
  }
}
