/* Practice-problem cards for /guides/oxbridge-maths-physics-interview-questions/.
   Markup: article.ip-problem > .ip-statement, p.ip-tests, details.ip-reveal (hint, solution),
   .ip-followup > details.ip-reveal. Works without JS: <details> is native.
   Uses the colour tokens from styles.css; the site has a single light theme. */

.ip-list { display: grid; gap: clamp(18px, 2.4vw, 26px); margin: 22px 0 0; max-width: 78ch; }
.policy.prose > .ip-list { max-width: 78ch; }

.ip-problem {
  min-width: 0;
  padding: clamp(18px, 2.6vw, 28px);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  scroll-margin-top: calc(var(--nav-h) + 68px);
}
.prose .ip-problem h3 { margin: 0 0 6px; font-size: 21px; line-height: 1.3; }
.ip-kicker {
  display: inline-block; margin: 0 0 10px; padding: 3px 12px; border-radius: 999px;
  background: var(--gold-wash); color: var(--ink); font-size: 15px; font-weight: 700; letter-spacing: 0.01em;
}

.ip-statement {
  margin: 12px 0 0; padding: 16px 18px; border-radius: 16px; background: var(--tint);
  border-left: 4px solid var(--gold);
}
.prose .ip-statement p { margin: 0; color: var(--ink); }
.prose .ip-statement p + p { margin-top: 10px; }

.prose p.ip-tests { margin: 14px 0 0; }
.ip-tests strong, .ip-followup > p strong { color: var(--ink); }

.ip-eq {
  display: block; margin: 10px 0; padding: 10px 14px; border-radius: 12px; background: var(--tint);
  color: var(--ink); font-size: 18px; line-height: 1.6; overflow-x: auto; white-space: nowrap;
  -webkit-overflow-scrolling: touch;
}
.ip-problem var, .ip-eq var { font-style: italic; font-family: Georgia, "Times New Roman", serif; font-size: 1.05em; }
.ip-frac { white-space: nowrap; }

.ip-reveal { margin: 14px 0 0; border-radius: 16px; border: 1px solid var(--line); background: var(--bg); }
.ip-reveal > summary {
  display: flex; align-items: center; gap: 10px; min-height: 48px; padding: 10px 16px;
  cursor: pointer; list-style: none; font-size: 17px; font-weight: 700; color: var(--ink);
  border-radius: 16px;
}
.ip-reveal > summary::-webkit-details-marker { display: none; }
.ip-reveal > summary::before {
  content: "+"; flex: none; display: grid; place-items: center; width: 26px; height: 26px; border-radius: 50%;
  background: var(--gold-wash); color: var(--ink); font-weight: 700; line-height: 1;
}
.ip-reveal[open] > summary::before { content: "\2212"; }
.ip-reveal > summary:hover { background: var(--tint); }
.ip-reveal > summary:focus-visible { outline: 3px solid var(--ink); outline-offset: 2px; }
.ip-reveal > .ip-reveal-body { padding: 2px 16px 14px; min-width: 0; }
.prose .ip-reveal-body p:first-child { margin-top: 4px; }
.prose .ip-reveal-body ol, .prose .ip-reveal-body ul { padding-left: 22px; }

.ip-followup { margin: 18px 0 0; padding-top: 14px; border-top: 1px dashed var(--line-strong); }
.prose .ip-followup > p { margin: 0; }

.ip-dates { margin: 0; padding: 0; list-style: none; display: grid; gap: 12px; }
.ip-dates li { margin: 0; }

@media (max-width: 480px) {
  .ip-problem { padding: 16px 14px; }
  .ip-statement { padding: 14px 14px; }
  .ip-reveal > summary { padding: 10px 12px; }
  .ip-reveal > .ip-reveal-body { padding: 2px 12px 12px; }
  .ip-eq { font-size: 17px; padding: 10px 12px; }
}

@media print {
  .ip-reveal > summary::before { display: none; }
  .ip-problem { break-inside: avoid; page-break-inside: avoid; }
}
