/* school.w9w6.com: Saudi school occasion packs. Layout from product.css; the
   product's line is mud ochre. The preview shows four pieces from the packs, drawn
   in HTML and SVG after the built files: a certificate, a plan page, a contest-game
   slide and a square greeting. They keep their paper colours in both schemes, as
   they print. The Sadu band, the gold teeth and the palm are SVG in the page's defs. */

:root {
  --line: #a8481b;
  --bar: #7f3613;
  --paper: #f8f3e8;
  --sand: #f2e3c9;
  --ochre: #a8551f;
  --green: #2d5e48;
  --navy: #1f2448;
  --gold: #b8913a;
  --gold-ink: #8a6a1f;
  --rust: #a3592a;
  --brown: #7d4526;
  --paper-ink: #2a2118;
  --paper-ink-2: #5d4f40;
}
@media (prefers-color-scheme: dark) {
  :root {
    --line: #f0a273;
  }
}

/* The bar names the file of the piece on show. */
.book-bar .f {
  display: none;
}
#tab-1:checked ~ .book-bar .f-1,
#tab-2:checked ~ .book-bar .f-2,
#tab-3:checked ~ .book-bar .f-3,
#tab-4:checked ~ .book-bar .f-4 {
  display: inline;
}

.stage .sheet {
  padding: clamp(0.75rem, 2.5vw, 1.5rem);
  background: var(--cell-head);
}
.stage .frame {
  display: grid;
  place-items: center;
  aspect-ratio: 16 / 10;
  container-type: inline-size;
  color: var(--paper-ink);
}
.piece {
  position: relative;
  container-type: inline-size;
  overflow: hidden;
  background: var(--paper);
  box-shadow: 0 0.4rem 1.4rem rgb(14 26 38 / 0.14);
}
.ph {
  color: var(--ochre);
  font-weight: 600;
}
.piece .band {
  position: absolute;
  inset-inline: 0;
  display: block;
  inline-size: 100%;
}
.piece .teeth {
  display: block;
  block-size: auto;
}
.piece .logo-box {
  display: grid;
  place-items: center;
  border: 0.15cqi dashed var(--gold);
  color: var(--gold-ink);
  text-align: center;
  line-height: 1.3;
}

/* certificate: A4 landscape, as certificate 1 of the set */
.cert {
  inline-size: 74cqi;
  aspect-ratio: 297 / 210;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 13.5cqi 8cqi 10cqi;
  text-align: center;
}
.cert .band {
  block-size: 7cqi;
}
.cert .band-top {
  inset-block-start: 0;
}
.cert .band-bottom {
  inset-block-end: 0;
}
.cert::after {
  content: "";
  position: absolute;
  inset: 9.4cqi 3.3cqi;
  border: 0.15cqi solid var(--gold);
  pointer-events: none;
}
.cert .who {
  position: absolute;
  inset-block-start: 10.6cqi;
  inset-inline-start: 7cqi;
  text-align: start;
  font-size: 1.7cqi;
  line-height: 1.5;
}
.cert .logo-box {
  position: absolute;
  inset-block-start: 10.4cqi;
  inset-inline-end: 6.5cqi;
  inline-size: 10.2cqi;
  block-size: 7.4cqi;
  font-size: 1.5cqi;
}
.cert .title {
  font-family: var(--font-display);
  font-size: 5.6cqi;
  font-weight: 700;
  line-height: 1.25;
  color: var(--green);
}
.cert .sub {
  font-size: 2.2cqi;
  font-weight: 600;
  color: var(--gold-ink);
}
.cert .teeth {
  inline-size: 20cqi;
  margin-block: 0.6cqi 1.4cqi;
}
.cert .line {
  font-size: 1.9cqi;
  line-height: 1.7;
}
.cert .name {
  display: block;
  min-inline-size: 40cqi;
  margin-block: 0.4cqi 0.8cqi;
  border-block-end: 0.12cqi solid var(--gold);
  font-family: var(--font-display);
  font-size: 3.6cqi;
  font-weight: 600;
  line-height: 1.35;
  color: var(--green);
}
.cert .reason {
  max-inline-size: 58cqi;
  font-size: 1.8cqi;
  line-height: 1.6;
}
.cert .signs {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: end;
  gap: 3cqi;
  inline-size: 100%;
  margin-block-start: auto;
  font-size: 1.3cqi;
  line-height: 1.8;
}
.cert .signs b {
  display: block;
  font-size: 1.7cqi;
  color: var(--green);
}

/* plan page: the top of an A4 page, in real type so it reads at any width */
.page {
  align-self: start;
  inline-size: 100%;
  block-size: 100%;
  padding: clamp(0.9rem, 3cqi, 1.75rem) clamp(0.9rem, 4cqi, 2.25rem) 0;
  background: #ffffff;
  font-size: clamp(0.72rem, 1.6cqi, 0.9rem);
  line-height: 1.6;
  -webkit-mask-image: linear-gradient(to bottom, #000 72%, transparent);
  mask-image: linear-gradient(to bottom, #000 72%, transparent);
}
.page .run {
  margin: 0;
  padding-block-end: 0.5rem;
  border-block-end: 1px solid var(--gold);
  color: var(--navy);
  font-size: 0.85em;
  text-align: center;
}
.page h3 {
  margin-block: 0.8rem 0.2rem;
  padding: 0.45rem 0.75rem;
  background: var(--navy);
  font-family: var(--font-display);
  font-size: 1.3em;
  font-weight: 700;
  color: #ffffff;
  text-align: center;
}
.page p {
  margin-block: 0 0.4rem;
  color: var(--paper-ink-2);
}
.page h4 {
  margin-block: 0.6rem 0.5rem;
  padding-block-end: 0.25rem;
  border-block-end: 2px solid var(--gold);
  font-size: 1em;
  font-weight: 700;
  color: var(--navy);
}
.page table {
  inline-size: 100%;
  border-collapse: collapse;
}
.book .page th,
.book .page td {
  padding: 0.35rem 0.5rem;
  border: 1px solid #d9cdb8;
  text-align: start;
  vertical-align: top;
  white-space: normal;
  color: var(--paper-ink);
}
.book .page th {
  background: var(--navy);
  color: #ffffff;
  font-weight: 600;
}
.book .page tbody tr:nth-child(even) td {
  background: #f3ece0;
}

/* contest-game question slide: 16:9 */
.quiz {
  inline-size: 94cqi;
  aspect-ratio: 16 / 9;
  display: grid;
  align-content: center;
  justify-items: center;
  gap: 3cqi;
  padding: 8cqi 5.5cqi 7cqi;
  background: #f6eee2;
  color: #3b2a1e;
}
.quiz .band {
  inset-block-start: 0;
  block-size: 2.9cqi;
}
.quiz .cat {
  position: absolute;
  inset-block-start: 4.6cqi;
  inset-inline-start: 6.3cqi;
  font-size: 2.3cqi;
  font-weight: 700;
  color: var(--rust);
}
.quiz .q {
  font-family: var(--font-display);
  font-size: 3.6cqi;
  font-weight: 700;
  line-height: 1.4;
  text-align: center;
}
.quiz .options {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.7cqi;
  inline-size: 100%;
  margin: 0;
  padding: 0;
  list-style: none;
}
.quiz .options li {
  display: grid;
  place-items: center;
  block-size: 8.9cqi;
  border: 0.15cqi solid var(--gold);
  border-radius: 1.2cqi;
  background: #ffffff;
  font-size: 2.6cqi;
  font-weight: 700;
  color: var(--green);
}
.quiz .answer {
  display: grid;
  justify-items: center;
  inline-size: 70cqi;
  padding-block: 1.6cqi;
  border-radius: 1.6cqi;
  background: var(--green);
  color: #f6eee2;
  font-size: 3cqi;
  font-weight: 700;
  line-height: 1.3;
}
.quiz .answer small {
  font-size: 1.5cqi;
  font-weight: 400;
  color: #e6cf98;
}
.quiz .board {
  position: absolute;
  inset-block-end: 2.4cqi;
  inset-inline-end: 3cqi;
  padding: 0.7cqi 3.9cqi;
  border-radius: 1cqi;
  background: var(--gold);
  font-size: 1.8cqi;
  font-weight: 700;
  color: #2f2416;
}

/* square greeting: 1080 x 1080 */
.greet {
  inline-size: 52cqi;
  aspect-ratio: 1;
  background: var(--green);
  text-align: center;
}
.greet .band {
  block-size: 7cqi;
}
.greet .band-top {
  inset-block-start: 0;
}
.greet .band-bottom {
  inset-block-end: 0;
}
.greet .arch {
  position: absolute;
  inset: 0;
  inline-size: 100%;
  block-size: 100%;
}
.greet .words {
  position: absolute;
  inset-block-start: 32%;
  inset-inline: 20%;
  display: grid;
  justify-items: center;
}
/* The words sit on the arch; the same cream behind each line keeps the colours honest. */
.greet .words span {
  background: #f6efe3;
}
.greet .kicker {
  font-size: 4.4cqi;
  font-weight: 700;
  color: var(--rust);
}
.greet .slogan {
  font-family: var(--font-display);
  font-size: 7.4cqi;
  font-weight: 700;
  line-height: 1.35;
  color: var(--green);
}
.greet .years {
  margin-block-start: 1cqi;
  font-size: 3.1cqi;
  font-weight: 700;
  color: var(--brown);
}
.greet .teeth {
  inline-size: 30cqi;
  margin-block: 3cqi 1.4cqi;
}
.greet .from {
  font-size: 2.9cqi;
  line-height: 1.5;
  color: var(--paper-ink);
}
.greet .logo-box {
  position: absolute;
  inset-block-start: 75%;
  inset-inline-start: 44%;
  inline-size: 12%;
  block-size: 8%;
  border-color: var(--rust);
  background: #f6efe3;
  color: var(--brown);
  font-size: 2cqi;
}

/* ---------- phone ---------- */

@media (max-width: 34rem) {
  .stage .frame {
    aspect-ratio: 1 / 0.82;
  }
  /* The plan's four-column table wraps tall on a phone: its page gets the height. */
  .stage .sheet-2 .frame {
    aspect-ratio: 3 / 4;
  }
  .stage .cert {
    inline-size: 98cqi;
  }
  .stage .quiz {
    inline-size: 100cqi;
  }
  .stage .greet {
    inline-size: 76cqi;
  }
  /* On a phone the slide gets larger type and the room for it. */
  .stage .quiz {
    aspect-ratio: auto;
    gap: 3.4cqi;
    padding: 10cqi 4cqi 12cqi;
  }
  .quiz .cat {
    font-size: 3.4cqi;
  }
  .quiz .q {
    font-size: 5.2cqi;
  }
  .quiz .options li {
    block-size: 11cqi;
    font-size: 3.8cqi;
  }
  .quiz .answer {
    inline-size: 80cqi;
    font-size: 4.4cqi;
  }
  .quiz .answer small {
    font-size: 2.6cqi;
  }
  .quiz .board {
    font-size: 3cqi;
  }
}
