/* CogAT practice. Builds on adaptive.css. */

.cg-notice { border: 1px solid #f0d189; background: #fff8e8; color: var(--ink); padding: 10px 14px; border-radius: 8px; }
.cg-kind { margin: 0 0 4px; color: var(--muted); font-size: .9rem; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; }

/* Start options */
.cg-options { border: 0; margin: 0 0 16px; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 12px; }
.cg-options legend { font-weight: 600; margin-bottom: 8px; }
.cg-options .choice { font-size: 1.05rem; }
.cg-timer-option { display: flex; align-items: center; gap: 10px; min-height: 44px; font-weight: 600; cursor: pointer; }
.cg-timer-option input { width: 22px; height: 22px; }

/* Header timer */
.cg-timer { display: inline-block; margin-top: 4px; padding: 2px 12px; border-radius: 99px; background: rgba(255, 255, 255, .16); font-weight: 600; font-variant-numeric: tabular-nums; }
.cg-timer.low { background: #ffe1a8; color: #5a3100; }

/* Question */
.cg-prompt-row { display: flex; align-items: flex-start; gap: 16px; }
.cg-prompt-row .prompt { flex: 1; }
.cg-read { flex: none; margin-top: 8px; }
.cg-stem { display: flex; justify-content: center; margin: 0 0 24px; padding: 20px; border: 1px solid var(--line); border-radius: 12px; background: #f8fbfe; overflow-x: auto; }
.cg-stem:empty { display: none; }

.cg-choices { grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); }
.cg-choice { justify-content: flex-start; min-height: 72px; }
.cg-letter { flex: none; font-weight: 700; color: var(--muted); min-width: 1.2em; }
.cg-choice-body { flex: 1; display: flex; justify-content: center; align-items: center; min-width: 0; overflow-wrap: anywhere; }
.cg-few { grid-template-columns: repeat(3, 1fr); gap: 20px; }
.cg-few .cg-choice { flex-direction: column; justify-content: center; min-height: 140px; padding: 16px; }
.cg-few .bubble { order: 2; }

.cg-feedback { margin-top: 20px; padding: 14px 18px; border-radius: 12px; font-size: 1.1rem; }
.cg-feedback.good { background: var(--right-bg); color: var(--right); }
.cg-feedback.try { background: var(--try-bg); color: var(--try); }
.cg-nav { gap: 12px; flex-wrap: wrap; }

/* Question number buttons */
.cg-strip { display: flex; flex-wrap: wrap; gap: 6px; margin: 16px 0 0; }
.cg-dot { width: 34px; height: 34px; border: 2px solid var(--line); border-radius: 50%; background: #fff; color: var(--muted); font: inherit; font-size: .85rem; font-variant-numeric: tabular-nums; cursor: pointer; }
.cg-dot:hover { border-color: var(--accent); }
.cg-dot.done { background: var(--selected); border-color: var(--accent); color: var(--accent-dark); }
.cg-dot.here { outline: 3px solid var(--focus); outline-offset: 1px; }
.cg-strip.big { gap: 10px; margin: 0 0 20px; }
.cg-strip.big .cg-dot { width: 48px; height: 48px; font-size: 1rem; }
.cg-strip.big .cg-dot:not(.done) { border-style: dashed; border-color: var(--try); color: var(--try); }

/* Pictures and words */
.cg-text { font-size: 1.4rem; font-weight: 600; font-variant-numeric: tabular-nums; }
.cg-pics { font-size: 3rem; line-height: 1.2; }
.cg-dots { display: inline-flex; flex-wrap: wrap; justify-content: center; gap: 2px; max-width: 160px; font-size: 1.6rem; line-height: 1.1; }
.cg-word { display: inline-block; padding: 4px 12px; border: 1px solid var(--line); border-radius: 8px; background: #fff; font-size: 1.25rem; font-weight: 600; }
.cg-words { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; }
.cg-arrow { color: var(--muted); font-size: 1.5rem; padding: 0 6px; }
.cg-blank { display: inline-grid; place-items: center; min-width: 56px; min-height: 48px; border: 2px dashed var(--accent); border-radius: 8px; color: var(--accent-dark); font-size: 1.4rem; font-weight: 700; }

/* Two-by-two boxes */
.cg-grid { display: grid; gap: 14px; }
.cg-row { display: flex; align-items: center; justify-content: center; gap: 8px; }
.cg-cell { display: grid; place-items: center; min-width: 96px; min-height: 84px; padding: 8px; border: 2px solid var(--line); border-radius: 10px; background: #fff; }
.cg-cell .cg-blank { border: 0; }
.cg-pairs { display: grid; gap: 10px; }

/* Number trains */
.cg-trains { display: grid; gap: 12px; }
.cg-train { display: flex; align-items: center; flex-wrap: wrap; gap: 6px; }
.cg-train-name { min-width: 7em; color: var(--muted); font-weight: 600; }
.cg-car { display: grid; place-items: center; min-width: 64px; min-height: 56px; padding: 4px 8px; border: 2px solid var(--bar); border-radius: 8px 8px 4px 4px; background: #fff; }
.cg-car .cg-blank { border: 0; min-height: 0; }

/* Shapes */
.cg-beads { position: relative; display: inline-flex; align-items: center; gap: 10px; padding: 0 8px; }
.cg-beads::before { content: ""; position: absolute; left: 0; right: 0; top: 50%; border-top: 2px solid var(--muted); z-index: 0; }
.cg-beads svg { position: relative; z-index: 1; }
.cg-fig { display: inline-flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 4px; }
.cg-figs { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; }
.cg-paper { width: 120px; height: 120px; }
.cg-paper-steps { display: flex; flex-wrap: wrap; justify-content: center; gap: 16px; }
.cg-step { margin: 0; text-align: center; }
.cg-step figcaption { color: var(--muted); font-weight: 600; }
.cg-choice-body .cg-paper { width: 96px; height: 96px; }

/* Review after the check */
.cg-review { list-style: none; padding: 0; margin: 0; display: grid; gap: 16px; }
.cg-review-item { border: 1px solid var(--line); border-radius: 10px; padding: 14px 18px; }
.cg-review-item.good { border-color: #b9dcc5; }
.cg-review-item.try { border-color: #efcf9f; background: #fffbf5; }
.cg-review-item .cg-stem { justify-content: flex-start; padding: 12px; margin-bottom: 12px; }
.cg-review-choices { display: grid; gap: 6px; margin: 0; padding-left: 28px; }
.cg-review-choices li { padding: 4px 8px; border-radius: 8px; }
.cg-review-choices li > * { vertical-align: middle; }
.cg-review-choices li.right { background: var(--right-bg); }
.cg-review-choices li.wrong { background: var(--try-bg); }
.cg-tag { display: inline-block; margin-left: 8px; padding: 0 8px; border-radius: 99px; background: #fff; border: 1px solid currentColor; font-size: .8rem; font-weight: 600; }
.cg-review-choices li.right .cg-tag { color: var(--right); }
.cg-review-choices li.wrong .cg-tag { color: var(--try); }

@media (max-width: 640px) {
  .cg-prompt-row { flex-direction: column; gap: 0; }
  .cg-read { margin: 0 0 16px; }
  .cg-few { grid-template-columns: 1fr; }
  .cg-few .cg-choice { flex-direction: row; min-height: 96px; }
  .cg-pics { font-size: 2.4rem; }
  .cg-train-name { min-width: 100%; }
  .cg-stem { padding: 12px; }
}
