/* ═══════════════════════════════════════════════════════════════════════════
   IB SEHS 独家模拟卷 · Paper 1A / 1B — additive layer
   ---------------------------------------------------------------------------
   All colours come from the site skin's custom properties (via .mk-root /
   .mk-focus-veil), so light & dark mode are free. NO webfonts: this file only
   adds layout/components and inherits the site font stack.
   ═══════════════════════════════════════════════════════════════════════ */

/* ── page shell (minimal: back link, title, language toggle) ─────────── */
body.ibp-page {
  margin: 0;
  background: var(--bg, #eef1f6);
  color: var(--text, #16233a);
  min-height: 100vh;
}
/* The site header's own recipe: canvas colour (not a white panel floating on
   ivory), a single hairline, 73px tall. */
.ibp-top {
  position: sticky; top: 0; z-index: 20;
  display: flex; align-items: center; gap: .8rem;
  padding: .6rem .9rem;
  min-height: 73px;
  background: var(--bg, #F6F4EE);
  border-bottom: 1px solid var(--line, #DCDDD6);
  /* gold-blue-theme's bare `header{…}` paints a translucent glass card with a
     drop shadow on every <header>. This bar is the same surface as the page, so
     it keeps only the hairline. */
  -webkit-backdrop-filter: none;
          backdrop-filter: none;
  box-shadow: none;
}
.ibp-back {
  font-size: .85rem; font-weight: 600; text-decoration: none;
  color: var(--text, #16233a); white-space: nowrap;
}
.ibp-title {
  flex: 1 1 auto; font-weight: 700; font-size: .95rem;
  text-align: center; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.ibp-toggle {
  font: inherit; font-size: .72rem; font-weight: 600;
  letter-spacing: .089em; text-transform: uppercase;
  min-height: 40px; padding: 0 .9rem; border-radius: 0;
  border: 1px solid var(--line-2, #C7CBC3); background: transparent;
  color: var(--text2, #3E5566); cursor: pointer; white-space: nowrap;
}
.ibp-toggle:hover { border-color: var(--accent, #b8860b); }
.ibp-main {
  max-width: 920px; margin: 0 auto; padding: 1rem .9rem 3rem;
}

.ibp-extra {
  margin-top: 1.4rem;
  padding-top: 1.1rem;
  border-top: 2px dashed var(--mk-line, var(--border, #d8dde6));
}
.ibp-extra h3 { margin: 0 0 .6rem; font-size: 1.12rem; }
.ibp-extra h4 { margin: 1.1rem 0 .45rem; font-size: .96rem; }
.ibp-note {
  color: var(--mk-dim, var(--text2, #4a5568));
  font-size: .85rem;
  line-height: 1.6;
}

/* ── IB band banner ──────────────────────────────────────────────────── */
.ibp-band {
  display: flex;
  align-items: center;
  gap: .9rem;
  padding: .8rem 1rem;
  border: 1px solid var(--mk-line, var(--border, #d8dde6));
  border-left: 4px solid var(--mk-key, var(--accent, #b8860b));
  border-radius: 12px;
  background: var(--mk-soft, var(--surface2, #f2f4f8));
  margin: .4rem 0 .6rem;
}
.ibp-band__num {
  flex: 0 0 auto;
  width: 3.4rem;
  height: 3.4rem;
  display: grid;
  place-items: center;
  border-radius: 12px;
  background: var(--mk-key, var(--accent, #b8860b));
  color: #fff;
  font-size: 1.7rem;
  font-weight: 800;
}
.ibp-band > div { min-width: 0; }

/* ── wrong-item cards ────────────────────────────────────────────────── */
.ibp-wrong {
  border: 1px solid var(--mk-line, var(--border, #d8dde6));
  border-left: 3px solid var(--mk-no, #b3261e);
  border-radius: 10px;
  background: var(--surface, #fff);
  padding: .8rem .95rem;
  margin: .55rem 0;
}
.ibp-wrong .q { font-size: .92rem; line-height: 1.55; margin: 0 0 .45rem; }
.ibp-line { font-size: .86rem; color: var(--mk-dim, var(--text2, #4a5568)); margin: .25rem 0; }
.ibp-line b { color: var(--text, #16233a); }
.ibp-ex {
  font-size: .85rem; line-height: 1.6; color: var(--mk-dim, var(--text2, #4a5568));
  margin: .5rem 0 0; padding-top: .5rem; border-top: 1px dashed var(--mk-line, var(--border, #d8dde6));
}
.ibp-ex b { color: var(--text, #16233a); }

/* ── re-do this attempt's misses ────────────────────────────────────── */
.ibp-redo { margin-top: .6rem; }
.ibp-redo__q {
  border: 1px solid var(--mk-line, var(--border, #d8dde6));
  border-radius: 10px; padding: .7rem .85rem; margin: .5rem 0; background: var(--surface, #fff);
}
.ibp-redo__q .q { font-size: .92rem; line-height: 1.55; margin: 0 0 .5rem; }
.ibp-redo__opts { display: grid; gap: .45rem; }
.ibp-redo .ibp-ex { margin-top: .6rem; }

/* ── 1B data stimulus injection ─────────────────────────────────────── */
.ibp1b-caption {
  font-size: .8rem; font-weight: 700; text-transform: uppercase; letter-spacing: .03em;
  color: var(--mk-dim, var(--text2, #4a5568)); margin: .9rem 0 .3rem;
}
.ibp1b-table {
  width: 100%; border-collapse: collapse; font-size: .86rem; margin: 0 0 .4rem;
  display: table; /* allow horizontal scroll wrapper on tiny screens */
}
.ibp1b-table th, .ibp1b-table td {
  text-align: left; padding: .4rem .55rem; border-bottom: 1px solid var(--mk-line, var(--border, #d8dde6));
}
.ibp1b-table th { font-size: .74rem; text-transform: uppercase; color: var(--mk-dim, var(--text2, #4a5568)); }

.ibp1b-sub { margin: .8rem 0; }
.ibp1b-substem { font-size: .93rem; line-height: 1.55; margin: 0 0 .4rem; }
.ibp1b-marks {
  font-size: .74rem; color: var(--mk-key, var(--accent, #b8860b)); font-weight: 700;
}
.ibp1b-input {
  width: 100%;
  min-height: 60px;
  padding: .55rem .7rem;
  border: 1px solid var(--mk-line, var(--border, #d8dde6));
  border-radius: 10px;
  background: var(--surface, #fff);
  color: var(--text, #16233a);
  font: inherit;
  font-size: .92rem;
  line-height: 1.5;
  resize: vertical;
  box-sizing: border-box;
}
.ibp1b-input:focus { outline: 2px solid var(--mk-key, var(--accent, #b8860b)); }

/* self-assessment */
.ibp1b-self { margin: .6rem 0; padding: .6rem .7rem; border-left: 3px solid var(--mk-key, var(--accent, #b8860b)); background: var(--mk-soft, var(--surface2, #f2f4f8)); border-radius: 8px; }
.ibp1b-kp { margin: .4rem 0 0; padding-left: 1.1rem; }
.ibp1b-kp li { margin: .25rem 0; font-size: .86rem; line-height: 1.5; list-style: disc; }
.ibp1b-kp label { display: flex; gap: .5rem; align-items: flex-start; cursor: pointer; }
.ibp1b-kp input[type=checkbox] { margin-top: .25rem; width: 16px; height: 16px; flex: 0 0 auto; }
.ibp-selfout {
  margin-top: 1rem; font-size: 1.1rem; font-weight: 800;
  padding: .6rem .9rem; border-radius: 10px;
  background: var(--mk-key, var(--accent, #b8860b)); color: #fff;
}

/* ── waiting / "bank under review" ───────────────────────────────────── */
.ibp-wait .mk-body { padding: 1.4rem 1.2rem; }
.ibp-wait .mk-btn { margin-top: .6rem; }

/* ── narrow screens (390px): no horizontal overflow ─────────────────── */
@media (max-width: 640px) {
  .ibp-band { flex-direction: row; gap: .6rem; padding: .6rem .7rem; }
  .ibp-band__num { width: 2.8rem; height: 2.8rem; font-size: 1.3rem; }
  .ibp-extra { padding-top: .9rem; }
  .ibp-wrong, .ibp-redo__q { padding: .6rem .65rem; }
  .ibp1b-table { font-size: .78rem; display: block; overflow-x: auto; -webkit-overflow-scrolling: touch; }
  .ibp1b-input { font-size: .9rem; }
}
