/* The lesson body reads like a printed handout, while web controls keep their own type. */
.toeic-lesson main {
  --paper-ink: #211e19;
  --paper-muted: #4e4b46;
  --paper-rule: #b9b6ae;
  --paper-fill: #f3f2ef;
  --mcb-font-family: "Times New Roman", Georgia, serif;
  --mcb-size-h2: 1.125rem;
  padding: 1.5rem var(--toeic-gutter) 2.25rem;
  background: #eeedea;
  color: var(--paper-ink);
  line-height: 1.58;
}

.toeic-lesson main > .wrap {
  max-inline-size: 69rem;
  padding: 2.5rem 3.25rem;
  background: #fff;
  border: 1px solid #d4d1ca;
  box-shadow: 0 2px 8px #332a1a0f;
}

.toeic-lesson main > .wrap > section {
  --study-hue: #4b4943 !important;
  --study-ink: var(--paper-ink);
  --study-paper: #faf9f7;
  --study-wash: var(--paper-fill);
  --study-border: var(--paper-rule);
  margin: 0 !important;
  padding: 0 !important;
  border: 0 !important;
  border-radius: 0;
  background: transparent !important;
  box-shadow: none !important;
}

.toeic-lesson main :is(.phead, .s-master-hero, .part-header) {
  display: block;
  margin: 0 0 1.375rem !important;
  padding: 0 0 1.25rem !important;
  border: 0 !important;
  border-block-end: 2px solid var(--paper-ink) !important;
  border-radius: 0;
  background: transparent !important;
  box-shadow: none;
  text-align: center !important;
}

.toeic-lesson main .study-header-art {
  display: none;
}

.toeic-lesson main .phead > .pbadge {
  --mcb-size-h2: 0.9375rem;
  margin: 0 0 0.5rem !important;
  padding: 0 !important;
  border: 0 !important;
  background: transparent !important;
  color: var(--paper-muted) !important;
  letter-spacing: 0.12em !important;
}

.toeic-lesson main :is(.s-master-hero, .part-header) .s-badge-strip {
  justify-content: center;
}

.toeic-lesson main .s-master-hero .s-badge {
  border-radius: 0;
  background: var(--paper-fill);
  backdrop-filter: none;
}

.toeic-lesson main h1 {
  --mcb-size-h1: 2.125rem;
  max-inline-size: 35ch;
  margin-inline: auto !important;
  color: var(--paper-ink) !important;
  letter-spacing: 0 !important;
}

.toeic-lesson main :is(.phead, .s-master-hero, .part-header) :is(p, .sub) {
  --mcb-size-h2: 1.0625rem;
  max-inline-size: 67ch;
  margin: 0.5rem auto 0 !important;
  color: var(--paper-muted) !important;
  font-style: italic;
}

.toeic-lesson main :is(.part, .advice, .vocab) > h2 {
  padding-block-end: 0.375rem;
  border-block-end: 1px solid var(--paper-rule);
}

.toeic-lesson main h2.sub::before {
  content: none;
}

.toeic-lesson main :is(.part-pro-guide, .s-master-card) {
  padding: 0;
  border: 0;
  border-radius: 0 !important;
  background: transparent;
  box-shadow: none !important;
}

.toeic-lesson main .ppg-head {
  margin-block-end: 1rem;
  padding-block-end: 0.375rem;
  border-block-end: 1px solid var(--paper-rule);
}

.toeic-lesson main :is(.card, .ppg-box, .special-q-card, .yn-col, .s-box, .cp-card, .s30-item-card, .s-quiz-item, .s-explain-box, .timebox .tb, .pvstats .st) {
  border-radius: 0 !important;
  box-shadow: none !important;
}

.toeic-lesson main :is(.card, .ppg-box, .s-quiz-item) {
  border: 1px solid var(--paper-rule) !important;
  background: #fff !important;
}

.toeic-lesson main .timebox .tb {
  background: var(--paper-fill) !important;
}

.toeic-lesson main :is(.timebox .tb small, .pvstats .st small) {
  color: var(--paper-muted);
}

.toeic-lesson main :is(.card .tag, .ppg-badge, .wh-tag, .yn-q-demo, .note, .callout, .tip, .eg, .sq-eg, .cp-ex-box, .s30-item-ex-box) {
  border-radius: 0 !important;
  box-shadow: none !important;
}

.toeic-lesson main :is(.eg, .sq-eg, .cp-ex-box, .s30-item-ex-box, .wh-tag, .yn-q-demo) {
  background: var(--paper-fill) !important;
}

.toeic-lesson main :is(.card .tag, .ppg-badge) {
  padding: 0 !important;
  border: 0 !important;
  background: transparent !important;
}

.toeic-lesson main .card .tag i {
  border-radius: 0 !important;
}

.toeic-lesson main :is(.mcb-table-scroll, .vwrap, .s-table-wrap) {
  border: 0;
  border-radius: 0 !important;
}

.toeic-lesson main :is(.tbl, .vt, .s-table) {
  border-collapse: collapse;
  border-radius: 0 !important;
  margin-block: 0 !important;
}

.toeic-lesson main :is(.tbl, .vt, .s-table) :is(th, td) {
  border: 1px solid var(--paper-rule) !important;
}

.toeic-lesson main :is(.tbl, .vt, .s-table) th {
  background: var(--paper-fill) !important;
  color: var(--paper-ink) !important;
  letter-spacing: 0 !important;
}

.toeic-lesson main :is(.tbl, .vt, .s-table) tbody tr:nth-child(even) td {
  background: #fafaf9 !important;
}

.toeic-lesson main :is(button, input, select, textarea, [role="tablist"], label:has(input)) {
  --mcb-font-family: system-ui, sans-serif;
  --mcb-size-h2: 0.9375rem;
}

.toeic-lesson main :is([role="tablist"] button, input[type="search"], .s-quiz-opt, .s-quiz-audio-btn) {
  border-radius: 0.375rem;
}

@media (max-width: 900px) {
  .toeic-lesson main > .wrap {
    padding: 1.75rem 1.5rem;
  }
}

@media (max-width: 680px) {
  .toeic-lesson main {
    padding: 0;
    background: #fff;
  }

  .toeic-lesson main > .wrap {
    padding: 1.25rem var(--toeic-gutter) 1.75rem;
    border: 0;
    box-shadow: none;
  }

  .toeic-lesson main h1 { --mcb-size-h1: 1.625rem; }
  .toeic-lesson main :is(.card, .ppg-box, .s-quiz-item) { padding: 0.875rem !important; }
}

@media print {
  .toeic-lesson :is(main, main > .wrap) {
    max-inline-size: none;
    padding: 0;
    border: 0;
    background: #fff;
    box-shadow: none;
  }

  .toeic-lesson :is(main > .wrap > section, main .card, main .s-master-card) {
    break-inside: auto !important;
  }

  .toeic-lesson main :is(h1, h2, h3) { break-after: avoid; }
  .toeic-lesson main tr { break-inside: avoid; }
  .toeic-lesson > :is(footer, #astryx-reading-progress) { display: none; }
}
