/* Crimson Tutor free guide. A4 pages on screen and in print. Same type and colour as the landing page. */
@page { size: A4; margin: 0; }
:root {
  --white: #fff; --mist: #F3F2F3; --ink: #141012; --maroon: #3A0407; --maroon-2: #4E080D;
  --crimson: #B3182F; --crimson-deep: linear-gradient(150deg, #B3182F 0%, #8A1124 55%, #560A12 100%);
  --gold: #FBBC04; --text: #19141A; --text-2: #4B4448; --line: #E1DEE0; --on-dark-2: #F4D9DC;
  --serif: "Source Serif 4", Georgia, serif; --sans: "Instrument Sans", system-ui, sans-serif;
}
* { box-sizing: border-box; }
html { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
body { margin: 0; background: #2A2226; color: var(--text); font-family: var(--sans); font-size: 17px; line-height: 1.65; -webkit-font-smoothing: antialiased; }
.book { display: grid; gap: 28px; justify-content: center; padding: 32px 16px; }
.page { position: relative; width: 210mm; height: 297mm; overflow: hidden; background: var(--white); padding: 22mm 20mm 24mm; display: flex; flex-direction: column; box-shadow: 0 14px 40px rgba(0,0,0,.35); }
h1, h2 { font-family: var(--serif); font-weight: 800; letter-spacing: -.015em; line-height: 1.06; margin: 0; text-wrap: balance; }
h2 { font-size: 39px; margin-bottom: 18px; }
p { margin: 0 0 14px; }
a { color: var(--crimson); font-weight: 600; text-underline-offset: 3px; }
.foot { position: absolute; left: 20mm; right: 20mm; bottom: 10mm; display: flex; justify-content: space-between; font-size: 12.5px; color: var(--text-2); }
.dark .foot, .deep .foot { color: var(--on-dark-2); }
.dark { background: var(--maroon); color: var(--white); }
.deep { background: var(--crimson-deep); color: var(--white); }
.dark a, .deep a { color: var(--white); }

/* Cover */
.cover { padding: 0; background: var(--maroon); }
.cover-img { flex: 1 1 auto; min-height: 0; background: url(../img/hero-gate.jpg) 50% 40% / cover no-repeat; }
.cover-panel { background: var(--crimson-deep); color: var(--white); padding: 15mm 18mm 15mm; }
.cover-word { position: absolute; top: 12mm; left: 18mm; font-family: var(--serif); font-weight: 800; font-size: 22px; color: var(--white); text-shadow: 0 1px 12px rgba(0,0,0,.45); }
.cover h1 { font-size: 66px; line-height: 1; margin-bottom: 16px; }
.cover .sub { font-size: 23px; line-height: 1.3; color: #FFE7E9; margin-bottom: 26px; max-width: 30ch; }
.cover-by { display: flex; align-items: center; justify-content: space-between; gap: 18px; font-size: 15.5px; color: #FFE7E9; }
.cover-by b { color: var(--white); }
.marks { display: inline-flex; align-items: center; gap: 9px; flex: none; }
.marks .stars { width: 104px; height: 20px; display: block; }
.gchip { display: inline-grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; background: #fff; }
.gchip svg { width: 17px; height: 17px; }

/* Opening letter */
.open-top { display: grid; grid-template-columns: 1fr 76mm; gap: 12mm; align-items: end; margin-bottom: 12mm; }
.open-lead { font-family: var(--serif); font-weight: 800; font-size: 50px; line-height: 1.04; letter-spacing: -.015em; margin: 0; color: var(--crimson); }
.open-photo { width: 100%; height: 100mm; object-fit: cover; object-position: 50% 0; border-radius: 12px; display: block; }
.open-lead2 { font-family: var(--serif); font-weight: 700; font-size: 28px; line-height: 1.22; margin-bottom: 22px; }

/* Sections */
.sec + .sec { margin-top: 12mm; padding-top: 11mm; border-top: 1px solid var(--line); }
.sec { display: flex; flex-direction: column; }
.todo { background: var(--crimson-deep); color: var(--white); border-radius: 12px; padding: 18px 22px; margin-top: 8px; }
.todo p { margin: 0; }
.todo b { font-family: var(--serif); font-weight: 800; font-size: 19px; display: block; margin-bottom: 3px; }
.todo a { color: var(--white); }
.bleed-top { margin: -22mm -20mm 16mm; height: 122mm; background: url(../img/desk-practice.jpg) 50% 55% / cover no-repeat; flex: none; }

/* Quote with face */
.q { display: grid; grid-template-columns: 58px 1fr; gap: 16px; align-items: start; margin: 12px 0 18px; }
.q img { width: 58px; height: 58px; border-radius: 50%; display: block; }
.q blockquote { margin: 0; font-family: var(--serif); font-weight: 700; font-size: 22px; line-height: 1.25; letter-spacing: -.005em; color: var(--maroon); }
.q .who { display: flex; align-items: center; gap: 10px; margin-top: 8px; font-size: 14.5px; color: var(--text-2); }
.q .stars { width: 83px; height: 16px; }
.q .g { width: 16px; height: 16px; }
.dark .q blockquote, .deep .q blockquote { color: var(--white); }
.dark .q .who, .deep .q .who { color: var(--on-dark-2); }

/* Adaptive diagram */
.flow { width: 100%; height: auto; display: block; margin: 8px 0 22px; }

/* Score scale */
.split { padding: 0; }
.split-top { background: var(--maroon); color: var(--white); padding: 18mm 20mm 11mm; }
.split-top a { color: var(--white); }
.split-top .todo { background: var(--white); color: var(--text); }
.split-top .todo a { color: var(--crimson); }
.split-bot { padding: 10mm 20mm 20mm; flex: 1; }
.split h2 { font-size: 34px; margin-bottom: 12px; }
.split .q { margin: 8px 0 12px; }
.bigq { margin-top: 12mm; }
.bigq .q { grid-template-columns: 76px 1fr; gap: 20px; }
.bigq .q img { width: 76px; height: 76px; }
.bigq .q blockquote { font-size: 37px; line-height: 1.16; }
.scale { width: 100%; height: auto; display: block; margin: 4px 0 16px; }

/* Tutor questions */
.ask { display: grid; gap: 0; margin-top: 8px; }
.ask div { padding: 22px 0; border-top: 1px solid rgba(255,255,255,.22); }
.ask dt, .ask b { display: block; font-family: var(--serif); font-weight: 700; font-size: 26px; line-height: 1.18; margin-bottom: 7px; }
.ask p { margin: 0; color: var(--on-dark-2); }

/* The check */
.steps { list-style: none; counter-reset: s; margin: 6px 0 20px; padding: 0; display: grid; gap: 9px; }
.steps li { counter-increment: s; display: grid; grid-template-columns: 34px 1fr; gap: 12px; align-items: start; }
.steps li::before { content: counter(s); width: 34px; height: 34px; border-radius: 50%; background: var(--crimson); color: #fff; font-weight: 700; display: grid; place-items: center; font-size: 16px; line-height: 1; }
.piles { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 12px; margin: 6px 0 20px; flex: 1; min-height: 0; }
.pile { border: 1.5px solid var(--crimson); border-radius: 12px; padding: 14px 16px; position: relative; background-image: repeating-linear-gradient(to bottom, transparent 0 33px, var(--line) 33px 34px); background-position: 0 92px; background-repeat: no-repeat; background-size: 100% calc(100% - 104px); }
.pile b { display: block; font-family: var(--serif); font-weight: 800; font-size: 44px; line-height: 1; color: var(--crimson); }
.pile span { display: block; font-size: 15px; line-height: 1.3; font-weight: 600; margin-top: 4px; }

/* Close */
.close { padding: 0; }
.close-img { height: 128mm; background: url(../img/acceptance.jpg) 50% 40% / cover no-repeat; flex: none; }
.close-body { padding: 15mm 20mm 24mm; flex: 1; display: flex; flex-direction: column; }
.cta { display: inline-flex; align-self: flex-start; align-items: center; min-height: 56px; padding: 0 28px; border-radius: 9px; background: var(--white); color: var(--crimson) !important; font-weight: 700; font-size: 18px; text-decoration: none; margin: 10px 0 22px; }
.sign { font-family: var(--serif); font-weight: 700; font-size: 20px; margin: 0; }

/* Phones: pages flow to the width of the screen. Print and PDF stay A4. */
@media screen and (max-width: 830px) {
  body { font-size: 17px; background: var(--white); }
  .book { display: block; padding: 0; }
  .page { width: 100%; height: auto; min-height: 0; box-shadow: none; padding: 40px 16px 56px; overflow: visible; }
  .foot { display: none; }
  h2 { font-size: 31px; }
  .cover, .close, .split { padding: 0; }
  .cover-img { height: 58vw; flex: none; }
  .cover-panel { padding: 28px 16px 32px; }
  .cover-word { top: 14px; left: 16px; }
  .cover h1 { font-size: 44px; }
  .cover .sub { font-size: 20px; }
  .cover-by { flex-direction: column; align-items: flex-start; }
  .open-top { grid-template-columns: 1fr; gap: 24px; margin-bottom: 24px; }
  .open-lead { font-size: 36px; }
  .open-lead2 { font-size: 24px; }
  .open-photo { height: 100vw; }
  .bigq { margin-top: 24px; }
  .bigq .q { grid-template-columns: 48px 1fr; gap: 12px; }
  .bigq .q img { width: 48px; height: 48px; }
  .bigq .q blockquote { font-size: 25px; }
  .bleed-top { margin: -40px -16px 28px; height: 56vw; }
  .ask b { font-size: 22px; }
  .sec + .sec { margin-top: 36px; padding-top: 32px; }
  .split-top { padding: 40px 16px 36px; }
  .split-bot { padding: 36px 16px 48px; }
  .q { grid-template-columns: 48px 1fr; gap: 12px; }
  .q img { width: 48px; height: 48px; }
  .q blockquote { font-size: 20px; }
  .piles { grid-template-columns: 1fr; }
  .pile { min-height: 150px; }
  .close-img { height: 56vw; }
  .close-body { padding: 32px 16px 48px; }
  .cta { width: 100%; justify-content: center; text-align: center; padding: 10px 18px; }
}
@media print {
  body { background: #fff; }
  .book { display: block; padding: 0; }
  .page { box-shadow: none; break-after: page; }
  .page:last-child { break-after: auto; }
}

/* v3: John's illustrations, charts and tables */
.ill { width: 100%; height: auto; display: block; margin: 6px 0 16px; }
.chart { width: 100%; height: auto; display: block; margin: 10px 0 20px; }
.big { font-family: var(--serif); font-weight: 700; font-size: 25px; line-height: 1.25; color: var(--maroon); margin: 6px 0 16px; }
.months { display: grid; grid-template-columns: repeat(5, 1fr); gap: 10px; margin: 8px 0 22px; }
.months div { border: 1.5px solid var(--line); border-radius: 12px; padding: 16px 6px; text-align: center; }
.months b { display: block; font-family: var(--serif); font-weight: 800; font-size: 28px; line-height: 1.1; color: var(--crimson); }
.months span { display: block; font-size: 14.5px; color: var(--text-2); margin-top: 4px; }
.months .on { background: var(--crimson); border-color: var(--crimson); }
.months .on b, .months .on span { color: var(--white); }
.ss { width: 100%; border-collapse: collapse; margin: 8px 0 0; font-size: 16px; }
.ss th, .ss td { padding: 9px 6px; text-align: center; border-bottom: 1px solid var(--line); font-weight: 500; }
.ss thead th { font-weight: 600; color: var(--text-2); font-size: 14.5px; }
.ss tbody th { text-align: left; font-weight: 600; }
.ss .tot th, .ss .tot td { font-weight: 700; border-bottom: 0; }
.ss mark { background: var(--crimson); color: var(--white); padding: 3px 10px; border-radius: 6px; font-weight: 700; }
.ssres { display: flex; align-items: center; justify-content: space-between; gap: 12px; background: var(--maroon); color: var(--white); border-radius: 10px; padding: 11px 18px; margin-top: 6px; }
.ssres b { font-family: var(--serif); font-weight: 800; font-size: 25px; }
.ssres span { font-size: 15px; color: var(--on-dark-2); }
.cap { font-size: 14px; color: var(--text-2); margin: 7px 0 8px; }
@media screen and (max-width: 830px) {
  .months { gap: 5px; }
  .months b { font-size: 19px; }
  .months span { font-size: 12px; }
  .months div { padding: 12px 2px; }
  .big { font-size: 21px; }
  .ss { font-size: 14px; }
  .ss th, .ss td { padding: 8px 3px; }
  .ssres { flex-direction: column; align-items: flex-start; gap: 2px; }
}
