/* Class 8 Maths Mastery Workbook — loads after tracing.css. Same building blocks, the book's own navy + gold. */
body.mt { --tp-teal: #1D3E7A; --tp-orange: #E7B649; --tp-ink: #172036; --tp-muted: #4E5873; --tp-line: #DCE2EE; --tp-green: #2F7D57;
  --mt-navy: #0E2147; --mt-night: #091633; --mt-blue: #2E6BD6; --mt-gold: #E7B649; --mt-paper: #F4F6FA; }

/* gold buttons with navy text (as on the cover) */
.mt .tp-btn { background: var(--mt-gold); color: var(--mt-navy) !important; box-shadow: 0 6px 18px rgba(231,182,73,.35); }
.mt .tp-btn--ghost { background: transparent; color: var(--mt-navy) !important; border: 1.5px solid var(--mt-navy); box-shadow: none; }

/* header */
.mt .tp-head { background: rgba(9,22,51,.96); border-bottom-color: rgba(255,255,255,.08); }
.mt-brand { display: flex; align-items: center; gap: .5rem; color: #fff !important; font-weight: 700; font-size: .98rem; text-decoration: none; }
.mt-brand b { display: inline-grid; place-items: center; width: 30px; height: 30px; border-radius: 8px; background: var(--mt-gold); color: var(--mt-navy); font-size: .95rem; }

/* hero */
.mt-hero { background: radial-gradient(120% 90% at 85% 10%, #1B3A78 0%, var(--mt-navy) 45%, var(--mt-night) 100%); color: #fff; padding: 1.4rem 0 2.2rem; }
.mt-hero__grid { display: grid; gap: 1.3rem; }
.mt-hero__cover { justify-self: center; width: min(44vw, 178px); }
.mt-hero__cover img { display: block; width: 100%; height: auto; border-radius: 6px; box-shadow: 0 22px 50px rgba(0,0,0,.45); }
.mt-hero__syl { margin: 0 0 .5rem; color: #C9D6F2; font-size: .9rem; }
.mt-hero h1 { margin: 0 0 .7rem; font-size: clamp(1.75rem, 7.4vw, 2.9rem); line-height: 1.08; font-weight: 700; letter-spacing: -.01em; }
.mt-hero__lead { margin: 0 0 1.1rem; color: #DCE5F7; font-size: 1.02rem; line-height: 1.55; max-width: 34em; }
.mt-facts { list-style: none; margin: 0 0 1.2rem; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .5rem 1rem; }
.mt-facts li { font-size: .9rem; color: #DCE5F7; line-height: 1.35; padding-left: .9rem; border-left: 2px solid var(--mt-gold); }
.mt-facts b { display: block; color: #fff; font-size: 1.15rem; }
.mt-buyrow { display: flex; align-items: center; gap: 1rem; flex-wrap: wrap; }
.mt-buyrow .mt-price { font-size: 2.2rem; font-weight: 700; color: var(--mt-gold); line-height: 1; }
.mt-buyrow .tp-btn { flex: 1 1 200px; }
.mt-hero__note { margin: .8rem 0 0; font-size: .84rem; color: #AFC0E4; }
@media (min-width: 760px) {
  .mt-hero { padding: 2.6rem 0 3.2rem; }
  .mt-hero__grid { grid-template-columns: 1.25fr .75fr; align-items: center; gap: 2.4rem; }
  .mt-hero__cover { order: 2; width: 100%; max-width: 330px; }
}

/* who it's for */
.mt-who { display: grid; gap: .8rem; margin-top: 1.1rem; }
.mt-who article { background: #fff; border: 1px solid var(--tp-line); border-radius: 14px; padding: 1rem 1.1rem; }
.mt-who h3 { margin: 0 0 .3rem; font-size: 1.05rem; color: var(--mt-navy); }
.mt-who p { margin: 0; font-size: .93rem; color: var(--tp-muted); line-height: 1.55; }
@media (min-width: 700px) { .mt-who { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* the ladder: how every chapter climbs (a real sequence, taken from the book) */
.mt-ladder { list-style: none; margin: 1.2rem 0 0; padding: 0; counter-reset: rung; display: grid; gap: .5rem; }
.mt-ladder li { counter-increment: rung; display: grid; grid-template-columns: 2.1rem 1fr auto; align-items: center; gap: .7rem; background: #fff;
  border: 1px solid var(--tp-line); border-radius: 12px; padding: .7rem .9rem; }
.mt-ladder li::before { content: counter(rung); display: grid; place-items: center; width: 2.1rem; height: 2.1rem; border-radius: 50%;
  background: var(--mt-navy); color: #fff; font-weight: 700; font-size: .9rem; }
.mt-ladder strong { display: block; font-size: .98rem; color: var(--mt-navy); }
.mt-ladder span { display: block; font-size: .85rem; color: var(--tp-muted); line-height: 1.4; }
.mt-ladder em { font-style: normal; font-size: .82rem; font-weight: 700; color: #9A6B00; background: #FFF4D8; border-radius: 99px; padding: .2rem .55rem; white-space: nowrap; }
.mt-ladder li:nth-last-child(-n+2) { border-color: var(--mt-gold); }

/* chapters */
.mt-chapters { list-style: none; margin: 1rem 0 0; padding: 0; columns: 1; column-gap: 1.6rem; counter-reset: ch; }
.mt-chapters li { counter-increment: ch; break-inside: avoid; padding: .48rem 0 .48rem 2.4rem; position: relative; border-bottom: 1px dashed var(--tp-line); font-size: .95rem; }
.mt-chapters li::before { content: counter(ch); position: absolute; left: 0; top: .42rem; width: 1.8rem; text-align: right; font-weight: 700; color: var(--mt-blue); }
@media (min-width: 700px) { .mt-chapters { columns: 2; } }
.mt-after { display: grid; gap: .6rem; margin-top: 1.4rem; }
.mt-after div { background: var(--mt-navy); color: #fff; border-radius: 14px; padding: .9rem 1rem; }
.mt-after b { display: block; color: var(--mt-gold); font-size: 1rem; margin-bottom: .15rem; }
.mt-after span { font-size: .88rem; color: #DCE5F7; line-height: 1.45; }
@media (min-width: 700px) { .mt-after { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* buy box, preview, final, sticky in the book's colours */
.mt .tp-box { border-color: var(--mt-navy); }
.mt .tp-price b { color: var(--mt-navy); }
.mt .tp-flipsec { background: linear-gradient(180deg, #E9EEF8 0%, #fff 70%); }
.mt .tp-final { background: var(--mt-navy); }
.mt .tp-sec--soft { background: var(--mt-paper); }
.mt-disclaimer { font-size: .8rem; color: var(--tp-muted); max-width: 40em; margin: .6rem auto 0; }
.mt [data-eb-note] { color: #fff; }
.mt-was:not(:empty) { color: #AFC0E4; font-size: 1.15rem; margin-left: -.4rem; }
.mt .tp-sticky__p s:empty { display: none; }
