/* exam27 "bright" theme (18 Oct 2026): Testbook-style layout in exam27's own colours.
   Loaded after ui.css/student.css (and plans.css where linked) only when the theme is bright (UI_THEME, or ?theme=bright per browser);
   with UI_THEME=classic this file is not loaded and the earlier design is back unchanged. Markup is not touched.
   What it changes: a flat cool-grey page with alternating full-width bands, open sections (headings sit on the page,
   only items are cards), a narrower column, lighter type in Mukta, soft 6–12 px cards with pastel tops, a bright blue
   for card buttons (the orange Mock Test CTA stays), a navy wedge behind the home hero, a dark footer and swipe rows
   on phones. The test screen (.exam-root, body.exam-focus) keeps the classic CBT look. */

/* Text paints before Mukta arrives (it loads without blocking render), so the first frame uses Arial (or Liberation Sans,
   Roboto) scaled to Mukta's measured metrics: 0.90x width, 1.130/0.532 em ascent/descent. The swap barely moves text. */
@font-face{font-family:"Mukta fallback";src:local("Arial"),local("ArialMT"),local("Liberation Sans"),local("Roboto");
  size-adjust:90%;ascent-override:125.6%;descent-override:59.1%;line-gap-override:0%}

body.portal:not(.exam-focus){
  --canvas:#f6f8f9;--page-bg:#f6f8f9;--band:#ffffff;--soft:#f6f8f9;
  --line:#e8edf2;--line-strong:#d5dde6;
  --radius-sm:6px;--radius:8px;--radius-lg:12px;
  --shadow-card:-1px 1px 4px rgba(117,138,172,.12);
  --shadow-sm:-1px 1px 4px rgba(117,138,172,.12);
  --shadow-lift:0 6px 18px rgba(54,57,64,.10);
  --container:1100px;
  --section-gap:clamp(36px,4.6vw,64px);
  --card-pad:clamp(18px,2vw,24px);--card-pad-sm:16px;
  --fs-display:clamp(26px,2.6vw,34px);--fs-page:clamp(24px,2.3vw,30px);--fs-section:clamp(20px,1.9vw,24px);
  --fs-card:16px;--fs-body:15.5px;--fs-meta:13.5px;--fs-small:12.5px;
  --font:"Mukta","Mukta fallback",system-ui,-apple-system,"Segoe UI",Roboto,"Noto Sans","Nirmala UI","Noto Sans Devanagari",Mangal,Arial,sans-serif;
  background:var(--page-bg);overflow-x:clip;line-height:1.55;
}
/* The test screen keeps the classic shapes and type. */
.exam-root{--radius-sm:12px;--radius:16px;--radius-lg:20px;--shadow-card:0 8px 28px rgba(16,42,75,.08);--shadow-sm:0 2px 8px rgba(16,42,75,.06);
  --font:system-ui,-apple-system,"Segoe UI",Roboto,"Noto Sans","Nirmala UI","Noto Sans Devanagari",Mangal,Arial,sans-serif;font-family:var(--font)}

/* ---------- type: lighter, Testbook-like weights ---------- */
.portal h1:where(:not(.exam-root *)){font-weight:700;letter-spacing:-.01em}
.portal h2:where(:not(.exam-root *)){font-weight:600;letter-spacing:-.005em}
.portal h3:where(:not(.exam-root *)){font-weight:600}
.eyebrow:where(:not(.exam-root *)),.study-eyebrow:where(:not(.exam-root *)){font-weight:600;letter-spacing:.06em;color:var(--blue)}

/* ---------- header: flat, 64 px, quiet nav, coloured current link ---------- */
.masthead{background:#fff;backdrop-filter:none;box-shadow:0 1px 0 var(--line),0 2px 10px rgba(54,57,64,.04);border-bottom:0}
.masthead-inner{min-height:64px}
.portal-nav a{font-size:15px;font-weight:500;color:#5f6b7a;border-radius:0;padding:0 12px}
.portal-nav a:hover{background:transparent;color:var(--blue)}
.portal-nav a[aria-current=page]{color:var(--blue);box-shadow:inset 0 -2px 0 var(--blue)}
.masthead-study{font-weight:500;font-size:15px}
.masthead-signin{border-radius:6px;font-weight:600;font-size:15px}
.lang-toggle:where(:not(.exam-root *)){border-radius:6px}
/* At 16px/600 the text is not "large", so white needs 4.5:1: the deeper orange (5.2:1) instead of --cta (3.6:1). */
.masthead-practice,.portal .home-practice .actions .btn-ai{border-radius:6px;box-shadow:none;font-size:16px;font-weight:600;
  background:var(--cta-hover)!important;border-color:var(--cta-hover)!important}
.masthead-practice:hover,.portal .home-practice .actions .btn-ai:hover{background:#9a3412!important;border-color:#9a3412!important}
@media(max-width:640px){.masthead-practice,.portal .home-practice .actions .btn-ai{font-size:15px}}

/* ---------- buttons, chips, inputs ---------- */
.portal .btn:where(:not(.exam-root .btn)),.portal :where(button:not(.text-button,.menu-toggle,.chip-button,.nav-more-toggle):not(.exam-root button)){
  background:var(--blue);border-color:var(--blue);border-radius:6px;font-weight:600;font-size:15px}
.portal .btn:where(:not(.exam-root .btn)):hover,.portal :where(button:not(.text-button,.menu-toggle,.chip-button,.nav-more-toggle):not(.exam-root button)):hover{
  background:var(--blue-ink);border-color:var(--blue-ink)}
.portal .btn-ghost:where(:not(.exam-root .btn)){color:var(--blue)!important;border-color:var(--blue-line)!important}
.portal .btn-ghost:where(:not(.exam-root .btn)):hover{background:var(--blue-wash)!important;color:var(--blue-ink)!important;border-color:var(--blue)!important}
.portal .btn-sm{font-size:14px!important}
.chip:where(:not(.exam-root *)){font-weight:500}
.chip-links-label{font-weight:500;color:var(--muted)}
.chip-links a,.chip-row a.chip,.exam-filters .chip,.syl-jump .chip{border-color:var(--line);font-weight:500;color:#4a5767}
.chip-links a:hover,.chip-row a.chip:hover,.exam-filters .chip:hover,.syl-jump .chip:hover{background:var(--blue-wash);border-color:var(--blue-line);color:var(--blue-ink)}
.home-hero .chip-links a:first-of-type,.exam-filters .chip-primary{background:var(--blue-wash);border-color:var(--blue-line);color:var(--blue-ink)}
.search-wrap{border-radius:8px;border-color:var(--line);box-shadow:-1px 1px 4px rgba(117,138,172,.16);padding:6px 6px 6px 16px}
.search-wrap:focus-within{border-color:var(--blue);box-shadow:0 0 0 1px var(--blue),0 0 0 4px var(--blue-wash)}
.portal :is(input,select,textarea):focus{border-color:var(--blue);box-shadow:0 0 0 1px var(--blue),0 0 0 4px var(--blue-wash)}
.tile-icon:where(:not(.exam-root *)){border-radius:10px}

/* ---------- page furniture: open hero, open sections, "View all" pill ---------- */
.page{padding-top:28px}
.breadcrumb{padding:0;border:0;background:transparent;box-shadow:none}
.page-head{background:transparent;border:0;box-shadow:none;padding:4px 0 8px;border-radius:0}
.page-head p{font-size:16.5px}
.section-panel{background:transparent;border:0;box-shadow:none;padding:0;border-radius:0}
.section:not(.section-panel)>.section-head,.section:not(.section-panel)>h2{padding:0;border:0;background:transparent;box-shadow:none}
/* Compact study pages (.dense) open up the same way. */
.dense .page-head{padding:4px 0 8px;box-shadow:none}
.dense .section-panel{padding:0;box-shadow:none}
.dense .section:not(.section-panel)>.section-head{padding:0}
/* Items are the only cards, so they keep their own soft shadow inside an (open) panel. */
.section-panel :is(.card,.surface,.stat):where(:not(.exam-root *)){box-shadow:var(--shadow-card)}
.section-head{margin-bottom:20px}
.section-head h2{font-size:var(--fs-section)}
.section-head h2 .tile-icon{display:none}
.section-lead{color:var(--muted);margin:4px 0 0}
.section-head>a,.section-head>div+a{min-height:36px;padding:0 18px;border-radius:999px;background:var(--blue-wash);color:var(--blue)!important;font-weight:500;font-size:14.5px}
.section-head>a:hover,.section-head>div+a:hover{background:#dce9fb;text-decoration:none}

/* ---------- cards: white, soft, pastel top ---------- */
.card:where(:not(.exam-root *)),.surface:where(:not(.exam-root *)){border-color:#edf1f5;border-radius:8px}
.card-link:hover{border-color:var(--blue-line);transform:translateY(-2px)}
.card-head:where(:not(.exam-root *)){background:#fff}
.stat:where(:not(.exam-root *)){border-radius:8px;border-color:#edf1f5}
.stat:where(:not(.exam-root *)) strong{font-weight:700}

/* ---------- home ---------- */
/* Hero: no box. Text on white at the left; a navy-to-blue wedge with a faint grid at the right carries the
   practice panel like an illustration. Both layers are full-bleed pseudo-elements behind the hero. */
.home-hero{position:relative;isolation:isolate;padding:48px 0 56px;grid-template-columns:minmax(0,1.55fr) minmax(0,1fr);gap:48px;align-items:center}
.home-hero::after,.home-hero::before{content:"";position:absolute;top:0;bottom:0;left:calc(50% - 50vw);right:calc(50% - 50vw);pointer-events:none}
.home-hero::after{z-index:-2;background:#fff}
.home-hero::before{z-index:-1;
  background:repeating-linear-gradient(0deg,rgba(255,255,255,.07) 0 1px,transparent 1px 32px),
             repeating-linear-gradient(90deg,rgba(255,255,255,.07) 0 1px,transparent 1px 32px),
             linear-gradient(135deg,var(--primary) 0%,var(--blue) 58%,#58a6ff 100%);
  clip-path:polygon(calc(50% + 250px) 0,100% 0,100% 100%,calc(50% + 150px) 100%)}
.hero-card{background:transparent;border:0;box-shadow:none;padding:0;border-radius:0;overflow:visible;grid-template-columns:minmax(0,1fr);grid-template-areas:"copy" "search" "chips";gap:22px}
.hero-card::before,.hero-art{display:none}
.home-hero h1{font-weight:700;letter-spacing:-.015em;line-height:1.2;margin-bottom:12px}
.hero-lead{font-size:18px;line-height:1.55;color:var(--muted)}
.home-search{min-height:58px}
.home-practice.feature-panel{background:#fff;border:0;border-top:3px solid var(--accent);border-radius:12px;box-shadow:0 22px 50px rgba(11,35,64,.30)}
.home-practice h2{font-weight:600}
.home-practice .stat{box-shadow:none;background:var(--soft)}
.home-account .save-card{border-radius:8px}
.home-hero+*{margin-top:24px}
.callout-link{border-radius:8px}

/* Alternating full-width bands (white / page grey) without wrapper markup. */
.popular-exams,.why-band{background:var(--band);box-shadow:0 0 0 100vmax var(--band);clip-path:inset(0 -100vmax)}
.popular-exams,.prep-strip,.why-band{margin-top:var(--section-gap);padding-block:var(--section-gap)}
.popular-exams+.prep-strip,.prep-strip+.why-band{margin-top:0}
.home-account+.promo-slot+.popular-exams{margin-top:32px}
.why-band+.section{margin-top:0;padding-top:var(--section-gap)}

/* Popular exams: pill tabs and compact row cards (ui.css); the bright theme only softens the card edge. */
.portal .exam-tab[aria-selected=true]{background:var(--blue);border-color:var(--blue)}
.exam-card{border-color:#edf1f5;border-radius:8px;box-shadow:var(--shadow-card)}

/* Previous-year paper cards: pastel tops in rotating brand washes, white chips, full-width buttons. */
.paper-card,.mock-card{border-color:#edf1f5;border-radius:8px;padding:16px;gap:12px;box-shadow:var(--shadow-card);
  background:linear-gradient(180deg,rgba(31,99,198,.16) 0%,rgba(255,255,255,.6) 34%,#fff 100%)}
.paper-card:hover,.mock-card:hover{border-color:var(--blue-line);box-shadow:var(--shadow-lift)}
.paper-grid>.paper-card:nth-child(4n+2),.mock-grid>.mock-card:nth-child(4n+2){background-image:linear-gradient(180deg,rgba(20,147,95,.16) 0%,rgba(255,255,255,.6) 34%,#fff 100%)}
.paper-grid>.paper-card:nth-child(4n+3),.mock-grid>.mock-card:nth-child(4n+3){background-image:linear-gradient(180deg,rgba(242,113,28,.16) 0%,rgba(255,255,255,.6) 34%,#fff 100%)}
.paper-grid>.paper-card:nth-child(4n+4),.mock-grid>.mock-card:nth-child(4n+4){background-image:linear-gradient(180deg,rgba(109,79,194,.16) 0%,rgba(255,255,255,.6) 34%,#fff 100%)}
.paper-card-head .tile-icon,.mock-card-head .tile-icon{width:44px;height:44px;background:#fff!important;box-shadow:0 1px 4px rgba(54,57,64,.12)}
.portal .paper-year{font-weight:700;font-size:20px}
.paper-card .paper-meta{padding-bottom:12px;border-bottom:1px solid var(--line)}
.paper-actions{grid-template-columns:1fr 1fr;gap:8px}
.paper-actions .btn{min-height:38px!important}
.prep-strip .paper-grid{gap:20px}

/* Why band: big centred cards, each on its own pastel. */
.why-grid{gap:20px}
.why-card{flex-direction:column;align-items:center;text-align:center;gap:14px;padding:28px 20px;border:0;box-shadow:none!important;background:var(--green-wash)}
.why-grid>.why-card:nth-child(4n+2){background:var(--blue-wash)}
.why-grid>.why-card:nth-child(4n+3){background:var(--accent-wash)}
.why-grid>.why-card:nth-child(4n+4){background:var(--violet-wash)}
.why-card .tile-icon{width:68px;height:68px;border-radius:16px;background:#fff;color:var(--green-ink);box-shadow:0 4px 14px rgba(54,57,64,.08)}
.why-card .tile-icon .icon{width:30px;height:30px}
.why-grid>.why-card:nth-child(4n+2) .tile-icon{color:var(--blue)}
.why-grid>.why-card:nth-child(4n+3) .tile-icon{color:var(--accent-ink)}
.why-grid>.why-card:nth-child(4n+4) .tile-icon{color:var(--violet)}
.why-card strong{font-size:18px;font-weight:600;margin-bottom:6px}
.why-card small{font-size:14px;color:var(--muted)}

/* Notice board: flat 8 px columns, lighter headings. */
.board-column{border-radius:8px;border-color:#edf1f5}
.portal .column-heading h3{font-size:18px;font-weight:600}
.column-heading .tile-icon{width:40px;height:40px;border-radius:8px}
.column-link{font-weight:500}
.board-row a{font-weight:500}
.board-column .view-all{border-radius:6px;font-weight:500}
.source-disclaimer,.study-note,.notice-history-hint{border-radius:6px;box-shadow:none}

/* ---------- footer: dark navy band ---------- */
.portal-footer{background:var(--primary-ink);border-top:0;color:#9fb0c6}
.footer-inner{padding:40px 0 32px;color:#9fb0c6}
.footer-brand strong,.portal .footer-title,.footer-social span{color:#fff}
.footer-links a,.footer-social a{color:#b5c3d4}
.footer-links a:hover,.footer-social a:hover{color:#fff}

/* ---------- tablets and phones ---------- */
@media(max-width:980px){
  .home-hero{grid-template-columns:1fr;gap:28px;padding:32px 0 36px}
  .home-hero::before{clip-path:polygon(0 72%,100% 52%,100% 100%,0 100%)}
}
@media(max-width:640px){
  .home-hero{padding-top:24px}
  .hero-lead{font-size:16px}
  .popular-exams,.prep-strip,.why-band{padding-block:32px}
  /* Card rows swipe sideways, as on Testbook's phone page. position:relative keeps abs-positioned children (the
     .sr-only year label) inside the scroller, or they widen the page. */
  .paper-grid,.mock-grid,.why-grid{display:grid;grid-template-columns:none;grid-auto-flow:column;grid-auto-columns:82%;
    overflow-x:auto;scroll-snap-type:x mandatory;scroll-padding-inline:var(--gutter);overscroll-behavior-x:contain;
    padding:4px 2px 12px;gap:14px;scrollbar-width:none;position:relative}
  /* On the home page the rows run edge to edge, so the next card peeks in from the screen edge. */
  :is(.prep-strip .paper-grid,.why-band .why-grid){margin-inline:calc(-1*var(--gutter));
    width:calc(100% + 2*var(--gutter));max-width:none;padding-inline:var(--gutter)}
  .paper-grid::-webkit-scrollbar,.mock-grid::-webkit-scrollbar,.why-grid::-webkit-scrollbar{display:none}
  .paper-grid>*,.mock-grid>*,.why-grid>*{scroll-snap-align:start}
  .footer-inner{padding:28px 0 24px}
}
@media(prefers-reduced-motion:reduce){.paper-grid,.mock-grid,.why-grid{scroll-behavior:auto}}


/* ---------- My Study shell: the navy sidebar lives in student.css (owner, 19 Oct 2026) ---------- */
body.portal .ms-pane-head{background:transparent;border:0;box-shadow:none;padding:4px 0 8px;border-radius:0}
body.portal .ms-pane-head .tile-icon{display:none}
body.portal .ms-card,body.portal .ms-test,body.portal .ms-subject{border-color:#edf1f5;border-radius:8px;box-shadow:var(--shadow-card)}
/* Home's small cards: the same pastel tops as the paper and mock cards. */
body.portal .ms-mini{border-color:#edf1f5;border-radius:8px;box-shadow:var(--shadow-card);
  background:linear-gradient(180deg,rgba(31,99,198,.12) 0%,rgba(255,255,255,.6) 34%,#fff 100%)}
body.portal .ms-grid-3>.ms-mini:nth-child(4n+2){background-image:linear-gradient(180deg,rgba(20,147,95,.12) 0%,rgba(255,255,255,.6) 34%,#fff 100%)}
body.portal .ms-grid-3>.ms-mini:nth-child(4n+3){background-image:linear-gradient(180deg,rgba(242,113,28,.12) 0%,rgba(255,255,255,.6) 34%,#fff 100%)}
body.portal .ms-grid-3>.ms-mini:nth-child(4n+4){background-image:linear-gradient(180deg,rgba(109,79,194,.12) 0%,rgba(255,255,255,.6) 34%,#fff 100%)}
body.portal .ms-continue{border-left:0;border-top:3px solid var(--accent)}
body.portal .ms-menu{border-radius:6px}

/* ---------- test series cards: the same card as previous-year papers and mocks ---------- */
body.portal .ts-card{border-color:#edf1f5;border-radius:8px;padding:16px;gap:10px;box-shadow:var(--shadow-card);transform:none;
  background:linear-gradient(180deg,rgba(31,99,198,.16) 0%,rgba(255,255,255,.6) 34%,#fff 100%)}
body.portal .ts-card:hover{border-color:var(--blue-line);box-shadow:var(--shadow-lift);transform:none}
body.portal .ts-grid>.ts-card:nth-child(4n+2){background-image:linear-gradient(180deg,rgba(20,147,95,.16) 0%,rgba(255,255,255,.6) 34%,#fff 100%)}
body.portal .ts-grid>.ts-card:nth-child(4n+3){background-image:linear-gradient(180deg,rgba(242,113,28,.16) 0%,rgba(255,255,255,.6) 34%,#fff 100%)}
body.portal .ts-grid>.ts-card:nth-child(4n+4){background-image:linear-gradient(180deg,rgba(109,79,194,.16) 0%,rgba(255,255,255,.6) 34%,#fff 100%)}
body.portal .ts-badge{width:44px;height:44px;border:0;box-shadow:0 1px 4px rgba(54,57,64,.12);color:var(--blue-ink);font-weight:700}
body.portal .ts-badge-lg{width:56px;height:56px}
body.portal .ts-card h3{font-weight:600;font-size:16px}
body.portal .ts-count{padding-bottom:10px;border-bottom:1px solid var(--line);font-size:13.5px}
body.portal .ts-count strong{font-weight:600}
body.portal .ts-lang{color:#5f6b7a}
body.portal .ts-view{min-height:40px;border-radius:6px;box-shadow:none}
body.portal .ts-test{border-color:#edf1f5;border-radius:8px;box-shadow:var(--shadow-card)}
body.portal .ts-test h3{font-weight:600}
body.portal .ts-tabs a{border-radius:6px;font-weight:500}
body.portal .ts-tabs a[aria-current=page]{background:var(--blue);border-color:var(--blue)}
body.portal .ts-tabs a[aria-current=page] .chip-count{color:var(--blue)}
@media(max-width:640px){
  body.portal .ts-grid{display:grid;grid-template-columns:none;grid-auto-flow:column;grid-auto-columns:82%;overflow-x:auto;scroll-snap-type:x mandatory;
    overscroll-behavior-x:contain;padding:4px 2px 12px;gap:14px;scrollbar-width:none;position:relative}
  body.portal .ts-grid::-webkit-scrollbar{display:none}
  body.portal .ts-grid>*{scroll-snap-align:start}
}

/* ---------- share strip (WhatsApp + Telegram) ---------- */
body.portal .share-strip .share-wa{border-radius:6px}
