/* =====================================================================
   Madhyamik 2027 pages (routine and syllabus, pattern analysis, model papers).
   Linked through $styles on those pages. Uses the tokens from main.css.
   ===================================================================== */
.m27 .head h1 { font-size: clamp(26px, 5vw, 38px); font-weight: 800; line-height: 1.15; }
.m27 section { padding-block: 36px; }
.m27 section + section { padding-top: 0; }
.m27 h2 { font-size: clamp(21px, 3.6vw, 27px); font-weight: 800; margin-bottom: 12px; }
.m27 h3 { font-size: 18px; font-weight: 800; margin: 18px 0 8px; }
.m27 p + p { margin-top: 10px; }
.m27 .m27-lead { font-size: 16.5px; color: var(--body); max-width: 44em; }

/* "Check the board's PDF" notice */
.m27-note { background: var(--white); border: var(--line); border-left: 4px solid var(--blue2); border-radius: var(--r-sm); padding: 12px 16px; font-size: 14.5px; color: var(--body); margin: 14px 0; }
.m27-note b { color: var(--navy); }

/* small print at the bottom of a page */
.m27-fine { font-size: 11.5px; font-style: italic; color: var(--muted); margin-top: 28px; }
.m27-fine a { color: inherit; }

/* chip links: one design for every link and button on these pages. Chips alternate blue and purple
   (the 1st, 3rd, 5th ... blue; the 2nd, 4th ... purple) within each list or row. */
.m27-jump { display: flex; flex-wrap: wrap; gap: 8px; list-style: none; margin: 14px 0 0; padding: 0; }
.m27-chiprow { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.m27-chip {
  --k: #1d4ed8; --kd: #1e3a8a; display: inline-flex; align-items: center; gap: 6px; padding: 6px 8px 6px 14px;
  background: var(--k); border: 1.5px solid var(--k); border-radius: 999px; color: #fff;
  font: 700 13.5px/1.4 var(--text); text-decoration: none; cursor: pointer;
  transition: background .15s ease, border-color .15s ease, transform .15s ease;
}
.m27-chip::after { content: "\203A"; font-size: 19px; line-height: 1; transition: transform .15s ease; }
.m27-chip:hover, .m27-chip:focus-visible { background: var(--kd); border-color: var(--kd); color: #fff; }
.m27-chip:hover::after, .m27-chip:focus-visible::after { transform: translateX(3px); }
.m27-chip:active { transform: scale(.97); }
.m27-jump li:nth-child(even) > .m27-chip, .m27-chiprow > a:nth-of-type(even) { --k: #7c3aed; --kd: #5b21b6; }
/* the sentence + chips on the Maths, Science and Hindi pages */
.m27-onpage { margin-top: 18px; }
.m27-onpage > span { font-weight: 800; font-size: 14.5px; color: var(--navy); margin-right: 4px; }

/* tables */
/* One table style for every Madhyamik 2027 table: compact, wrapping, fits a phone screen */
.m27-tablewrap { overflow-x: auto; background: var(--white); border: var(--line); border-radius: var(--r-sm); margin: 14px 0 6px; }
.m27-table { width: 100%; border-collapse: collapse; font-size: 13.5px; line-height: 1.4; color: var(--body); }
.m27-table th, .m27-table td { text-align: left; padding: 7px 12px; border-bottom: 1px solid var(--wash); vertical-align: top; }
.m27-table th { background: var(--mist); color: var(--navy); font-size: 10.5px; font-weight: 800; letter-spacing: .07em; text-transform: uppercase; white-space: nowrap; }
.m27-table tr:last-child td { border-bottom: 0; }
.m27-table .n { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.m27-table td:first-child { font-weight: 800; color: var(--navy); white-space: nowrap; }
.m27-table tbody tr:hover td { background: #F7FAFF; }

/* a subject block on the routine page */
.m27-subject { background: var(--white); border: var(--line); border-radius: var(--r-md); padding: 18px 20px; margin: 0 0 16px; scroll-margin-top: 80px; }
.m27-subject h2 { margin-bottom: 4px; }
.m27-when { color: var(--blue); font-weight: 800; margin-bottom: 8px; }
.m27-facts { list-style: none; margin: 8px 0; padding: 0; display: grid; gap: 6px; font-size: 14.5px; color: var(--body); }
.m27-facts b { color: var(--navy); }

/* more-for-2027 cards: a link each, alternating blue and purple like the chips */
.m27-related h2 { margin-bottom: 14px; }
.m27-related ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
.m27-related li { --k: #1d4ed8; --kd: #1e3a8a; }
.m27-related li:nth-child(even) { --k: #7c3aed; --kd: #5b21b6; }
.m27-related a.card { position: relative; display: grid; gap: 4px; padding: 14px 44px 14px 16px; text-decoration: none; height: 100%; border: 1.5px solid var(--k); transition: background .15s ease, border-color .15s ease; }
.m27-related a.card::after { content: "\203A"; position: absolute; right: 14px; top: 50%; transform: translateY(-50%); display: grid; place-items: center; width: 24px; height: 24px; border-radius: 50%; background: var(--k); color: #fff; font-size: 18px; line-height: 1; transition: transform .15s ease; }
.m27-related a.card:hover, .m27-related a.card:focus-visible { background: var(--kd); border-color: var(--kd); }
.m27-related a.card:hover b, .m27-related a.card:hover span, .m27-related a.card:focus-visible b, .m27-related a.card:focus-visible span { color: #fff; }
.m27-related a.card:hover::after, .m27-related a.card:focus-visible::after { transform: translate(3px, -50%); }
.m27-related b { color: var(--k); }
.m27-related span { font-size: 13.5px; color: var(--body); }

/* "coming in December" badge */
.m27-soon { display: inline-flex; align-items: center; gap: 8px; background: var(--white); border: 1.5px solid var(--sky); color: var(--navy); font-weight: 800; font-size: 13px; padding: 5px 14px; border-radius: 999px; }
.m27-soon::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--blue2); }

/* sign-up form */
.m27-sub { color: var(--body); font-size: 14.5px; }

@media (max-width: 600px) {
  .m27-subject { padding: 14px 14px; }
  .m27-table { font-size: 12.5px; }
  .m27-table th, .m27-table td { padding: 6px 8px; }
  .m27-table th { font-size: 9.5px; letter-spacing: .04em; white-space: normal; }
}
@media print { .m27-related, .m27-jump, .m27-chiprow { display: none; } }

/* Paper format table: compact, so the whole table fits the screen without scrolling,
   with a "Detailed analysis" column (animated arrow link, or a lock until the page exists) */
.m27-format td { vertical-align: middle; }
.m27-format tr.m27-has td { background: var(--mist); }
.m27-format tr.m27-total td { font-weight: 800; color: var(--navy); border-top: 2px solid var(--pale); }
.m27-format .m27-da { text-align: center; white-space: nowrap; width: 1%; }
.m27-format th.m27-da { color: var(--blue); }
.m27-format svg { width: 18px; height: 18px; vertical-align: middle; fill: none; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.m27-format th svg { width: 14px; height: 14px; }
.m27-format .m27-go { stroke: var(--blue2); animation: m27-nudge 1.4s ease-in-out infinite; }
.m27-format .m27-lock { stroke: var(--muted); opacity: .55; }
.m27-format td.m27-da a { display: inline-grid; place-items: center; width: 32px; height: 28px; border-radius: 999px; background: var(--white); border: 1.5px solid var(--blue2); }
.m27-format td.m27-da a:hover, .m27-format td.m27-da a:focus-visible { background: var(--blue2); }
.m27-format td.m27-da a:hover .m27-go, .m27-format td.m27-da a:focus-visible .m27-go { stroke: var(--white); }
@keyframes m27-nudge { 0%, 100% { transform: translateX(-2px); } 50% { transform: translateX(3px); } }
@media (prefers-reduced-motion: reduce) { .m27-format .m27-go { animation: none; } }
@media (max-width: 600px) { .m27-format th.m27-da { white-space: normal; } }
/* phones: "To answer" moves under the question type, so five columns become four */
.m27-format .m27-subline { display: none; }
@media (max-width: 600px) {
  .m27-format .m27-ans { display: none; }
  .m27-format .m27-subline { display: block; font-size: 11px; color: var(--muted); font-weight: 600; }
}


/* ---------------------------------------------------------------------
   Pattern analysis pages (.m27-pattern): clean, spacious sections,
   each with an icon heading; a light subject scene beside the title
   --------------------------------------------------------------------- */
.m27-pattern { font-size: 15px; }
.m27-pattern section.m27-hero { padding-block: 28px 8px; }
.m27-pattern section.m27-part { padding-block: 0; }
.m27-pattern section.m27-part + section.m27-part { padding-top: 0; }
.m27-pattern .m27-part .wrap { padding-block: 26px 30px; border-top: 1px solid rgba(37, 99, 235, .12); }
.m27-pattern .m27-part:first-of-type .wrap { border-top: 0; }
.m27-pattern .head h1 { font-size: clamp(24px, 4.2vw, 32px); line-height: 1.18; letter-spacing: -.01em; }
.m27-pattern .m27-lead { font-size: 15px; line-height: 1.6; max-width: 40em; margin-top: 10px; }
.m27-pattern p { font-size: 14.5px; line-height: 1.6; color: var(--body); }
.m27-pattern p + p { margin-top: 8px; }

.m27-herogrid { display: grid; grid-template-columns: minmax(0, 1fr) 260px; gap: 28px; align-items: center; }
.m27-heroart { display: flex; justify-content: center; }
.m27-scene { width: 100%; max-width: 260px; height: auto; }

.m27-facts-row { list-style: none; margin: 18px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 10px; }
.m27-facts-row li { display: flex; align-items: center; gap: 10px; background: var(--white); border: var(--line); border-radius: 12px; padding: 8px 14px 8px 8px; font-size: 13px; color: var(--body); }
.m27-facts-row li b { display: block; font-size: 10.5px; letter-spacing: .07em; text-transform: uppercase; color: var(--navy); }

/* section heading with icon */
.m27 .m27-h { display: flex; align-items: center; gap: 12px; font-size: clamp(18px, 3vw, 21px); line-height: 1.25; margin: 0 0 12px; }
.m27-ico { flex: none; display: inline-grid; place-items: center; width: 36px; height: 36px; border-radius: 10px; background: var(--wash); }
.m27-ico svg { width: 20px; height: 20px; fill: none; stroke: var(--blue); stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.m27-facts-row .m27-ico { width: 32px; height: 32px; border-radius: 8px; }
.m27-facts-row .m27-ico svg { width: 17px; height: 17px; }

/* notes, lists and chips inside the parts */
.m27-pattern .m27-note { font-size: 13.5px; margin: 12px 0 0; padding: 10px 14px; }
.m27-pattern .ticks { margin-top: 4px; }
.m27-pattern .ticks li { font-size: 14.5px; line-height: 1.6; }
.m27-pattern .m27-jump { margin-top: 12px; }
.m27-pattern .faq summary { font-size: 15px; padding: 14px 16px; }
.m27-pattern .faq details p { font-size: 14px; padding: 0 16px 16px; }

/* "What each question asked": one line per year */
.m27-slots .m27-topic { font-weight: 700; color: var(--ink); min-width: 9em; }
.m27-years { list-style: none; margin: 0; padding: 0; display: grid; gap: 3px; }
.m27-years li { line-height: 1.45; padding-left: 3.3em; text-indent: -3.3em; }   /* wrapped lines start after the year */
.m27-years b { color: var(--blue); font-variant-numeric: tabular-nums; white-space: nowrap; }

@media (max-width: 760px) {
  .m27-herogrid { grid-template-columns: 1fr; gap: 6px; }
  .m27-heroart { order: -1; justify-content: flex-start; }
  .m27-scene { max-width: 150px; }
}
@media (max-width: 600px) {
  .m27-pattern .m27-part .wrap { padding-block: 22px 24px; }
  .m27-slots .m27-topic { min-width: 0; }
  .m27-ico { width: 32px; height: 32px; }
}
