/* Free 3-minute math facts check (/homeschool/math-facts-check/). Loaded after hub.css. */

.fc-app {
  margin: 1.5rem 0 2.5rem;
  padding: 1.5rem;
  background: #fff;
  border: 1.5px solid var(--hearth-border);
  border-radius: 16px;
  box-shadow: var(--card-shadow);
}

.fc-app h2 {
  margin: 0 0 0.5rem;
  font-size: 1.35rem;
}

.fc-field {
  display: block;
  margin: 0 0 1rem;
}
.fc-field span {
  display: block;
  font-weight: 600;
  margin-bottom: 0.3rem;
}
.fc-field small {
  display: block;
  font-size: 0.85rem;
  opacity: 0.8;
  margin-top: 0.25rem;
}
.fc-field input,
.fc-field select {
  width: 100%;
  max-width: 420px;
  box-sizing: border-box;
  font: inherit;
  padding: 0.6rem 0.75rem;
  border: 1.5px solid var(--hearth-border);
  border-radius: 10px;
  background: #fff;
  color: inherit;
}

.fc-btn {
  display: inline-block;
  background: #b85c2f;
  color: #fff !important;
  text-decoration: none !important;
  border: 0;
  border-radius: 10px;
  font: 600 1rem var(--font-body);
  padding: 0.75rem 1.4rem;
  cursor: pointer;
}
.fc-btn:hover {
  filter: brightness(1.08);
}
.fc-btn-quiet {
  background: none;
  color: #b85c2f !important;
  border: 1.5px solid #e6c7ad;
}
.fc-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  align-items: center;
  margin-top: 1rem;
}
.fc-error {
  color: #b3261e;
  min-height: 1.2em;
  margin: 0.25rem 0 0;
}

.fc-rules {
  padding-left: 1.2rem;
}
.fc-rules li {
  margin-bottom: 0.35rem;
}

/* Countdown */
.fc-count {
  text-align: center;
  padding: 2.5rem 0;
}
.fc-count-num {
  font-family: var(--font-display);
  font-size: 5rem;
  font-weight: 700;
  color: #b85c2f;
}

/* Timed screen */
.fc-test {
  max-width: 420px;
  margin: 0 auto;
  text-align: center;
}
.fc-timebar {
  height: 10px;
  background: #f3e6d8;
  border-radius: 999px;
  overflow: hidden;
}
.fc-timebar div {
  height: 100%;
  width: 100%;
  background: var(--hearth-amber);
  transition: width 0.25s linear;
}
.fc-test-meta {
  display: flex;
  justify-content: space-between;
  font-size: 0.9rem;
  opacity: 0.8;
  margin: 0.4rem 0 1rem;
}
.fc-problem {
  font-family: var(--font-display);
  font-size: clamp(2.6rem, 11vw, 3.6rem);
  font-weight: 700;
  margin: 0.25rem 0 0.75rem;
  line-height: 1.1;
}
.fc-test-form {
  display: flex;
  gap: 0.5rem;
  justify-content: center;
}
.fc-answer {
  width: 6.5rem;
  font: 700 2rem var(--font-body);
  text-align: center;
  padding: 0.35rem 0.5rem;
  border: 2px solid #b85c2f;
  border-radius: 12px;
  color: inherit;
}
.fc-keypad {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.5rem;
  margin: 1rem auto 0.75rem;
  max-width: 300px;
}
.fc-keypad button {
  font: 600 1.4rem var(--font-body);
  padding: 0.7rem 0;
  border-radius: 12px;
  border: 1.5px solid var(--hearth-border);
  background: var(--hearth-warm-white);
  color: inherit;
  cursor: pointer;
  touch-action: manipulation;
}
.fc-keypad button[data-key='enter'] {
  background: #b85c2f;
  color: #fff;
  border-color: #b85c2f;
}
.fc-skip {
  background: none;
  border: 0;
  color: #7a6855;
  text-decoration: underline;
  font: inherit;
  cursor: pointer;
}
/* A physical keyboard doesn't need the on-screen keypad. */
@media (hover: hover) and (pointer: fine) {
  .fc-keypad {
    display: none;
  }
}

/* Results */
.fc-res-sub {
  margin: 0 0 1rem;
  opacity: 0.8;
}
.fc-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
  gap: 0.75rem;
  margin: 0 0 1rem;
}
.fc-stat {
  background: var(--hearth-warm-white);
  border-radius: 12px;
  padding: 0.8rem 0.9rem;
}
.fc-stat b {
  display: block;
  font-family: var(--font-display);
  font-size: 1.8rem;
  line-height: 1.1;
}
.fc-stat span {
  font-size: 0.88rem;
  opacity: 0.85;
}
.fc-compare {
  background: #eef5f0;
  border-radius: 10px;
  padding: 0.6rem 0.9rem;
}
.fc-results h3 {
  font-size: 1.1rem;
  margin: 1.5rem 0 0.5rem;
}
.fc-slow-list,
.fc-missed-list {
  list-style: none;
  padding: 0;
  margin: 0 0 0.5rem;
}
.fc-slow-list li,
.fc-missed-list li {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.25rem 1rem;
  padding: 0.45rem 0;
  border-bottom: 1px solid var(--hearth-border);
}
.fc-slow-list span,
.fc-given {
  opacity: 0.8;
  font-size: 0.92rem;
}
.fc-fact {
  font-weight: 600;
}
.fc-note {
  font-size: 0.92rem;
  opacity: 0.85;
}
.fc-plan-list {
  padding-left: 1.2rem;
}
.fc-plan-list li {
  margin-bottom: 0.4rem;
}
.fc-results .hub-cta {
  margin: 1.75rem 0 1rem;
}

@media (max-width: 520px) {
  .fc-app {
    padding: 1.1rem;
  }
}

/* Nickname "?" explainer */
.fc-label-row {
  display: flex !important;
  align-items: center;
  gap: 0.4rem;
}
.fc-why {
  width: 1.4rem;
  height: 1.4rem;
  border-radius: 50%;
  border: 1.5px solid #b85c2f;
  background: #fff;
  color: #b85c2f;
  font: 700 0.8rem var(--font-body);
  line-height: 1;
  padding: 0;
  cursor: pointer;
}
.fc-why[aria-expanded='true'] {
  background: #b85c2f;
  color: #fff;
}
.fc-why-box {
  max-width: 420px;
  margin: 0 0 0.5rem;
  padding: 0.6rem 0.8rem;
  background: var(--hearth-warm-white);
  border: 1px solid var(--hearth-border);
  border-radius: 10px;
  font-size: 0.9rem;
}

/* Signed-in check (/apps/facts-check/) */
.fc-saved {
  margin-top: 1.25rem;
}
.fc-drill {
  text-decoration: none;
}
