/* ============================================================================
   LearnSphere Scholars — Stylesheet
   Design system: "Admit Slip" — evokes the Pakistani board/entry-test roll
   number slip: perforated edges, serial numbers, stamped fields.
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Fraunces:opsz,wght@9..144,400;9..144,500;9..144,600;9..144,700&family=Inter:wght@400;500;600;700&family=IBM+Plex+Mono:wght@400;500;600&display=swap');

:root{
  --ink:        #16233F;
  --ink-soft:   #3B4A6B;
  --paper:      #F6F3EC;
  --paper-2:    #EFEADD;
  --line:       #D8D2C4;
  --gold:       #C89B3C;
  --gold-deep:  #A87E28;
  --green:      #2F6B4F;
  --maroon:     #8C2F39;
  --white:      #FFFFFF;

  --font-display: 'Fraunces', serif;
  --font-body: 'Inter', sans-serif;
  --font-mono: 'IBM Plex Mono', monospace;

  --radius: 4px;
  --shadow: 0 1px 2px rgba(22,35,63,0.06), 0 8px 24px -12px rgba(22,35,63,0.15);
}

*{ box-sizing:border-box; margin:0; padding:0; }

html{ scroll-behavior:smooth; }

body{
  font-family: var(--font-body);
  background: var(--paper);
  color: var(--ink);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

img{ max-width:100%; display:block; }
a{ color:inherit; text-decoration:none; }
ul{ list-style:none; }
button{ font-family:inherit; cursor:pointer; }

.container{
  width: 100%;
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 24px;
}

/* Focus visibility */
a:focus-visible, button:focus-visible{
  outline: 2px solid var(--gold-deep);
  outline-offset: 2px;
}
main:focus-visible{ outline: none; }

@media (prefers-reduced-motion: reduce){
  *{ animation-duration: 0.001ms !important; animation-iteration-count: 1 !important; transition-duration: 0.001ms !important; scroll-behavior:auto !important; }
}

/* Skip link — hidden until keyboard-focused, for screen reader / keyboard users */
.skip-link{
  position: absolute;
  top: -48px;
  left: 12px;
  z-index: 100;
  background: var(--ink);
  color: var(--paper);
  padding: 12px 18px;
  border-radius: var(--radius);
  font-size: 14px;
  font-weight: 600;
  transition: top .15s ease;
}
.skip-link:focus{ top: 12px; }

/* Gentle fade/rise-in for content as it enters the viewport */
.reveal{ opacity: 0; transform: translateY(14px); transition: opacity .5s ease, transform .5s ease; }
.reveal.in-view{ opacity: 1; transform: translateY(0); }
@media (prefers-reduced-motion: reduce){
  .reveal{ opacity: 1; transform: none; transition: none; }
}

/* Route-change fade so page swaps feel less abrupt */
#app{ animation: page-in .25s ease; }
@keyframes page-in{ from{ opacity: 0; transform: translateY(6px); } to{ opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce){
  #app{ animation: none; }
}

/* Skeleton loading placeholder for card grids awaiting live Sheet data */
.skeleton-card{
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 24px 22px;
  overflow: hidden;
  position: relative;
}
.skeleton-line{
  height: 12px;
  border-radius: 3px;
  background: var(--paper-2);
  margin-bottom: 10px;
  position: relative;
  overflow: hidden;
}
.skeleton-line::after{
  content:"";
  position:absolute; inset:0;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.7), transparent);
  animation: skeleton-shimmer 1.4s infinite;
}
.skeleton-line.short{ width: 45%; }
@keyframes skeleton-shimmer{ from{ transform: translateX(-100%); } to{ transform: translateX(100%); } }
@media (prefers-reduced-motion: reduce){
  .skeleton-line::after{ animation: none; }
}

/* ---------------------------------------------------------------------------
   Eyebrow / labels / mono utility text
   ------------------------------------------------------------------------- */
.eyebrow{
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--gold-deep);
}

.mono{ font-family: var(--font-mono); }

/* ---------------------------------------------------------------------------
   Header / Nav
   ------------------------------------------------------------------------- */
.site-header{
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(246,243,236,0.92);
  backdrop-filter: blur(6px);
  border-bottom: 1px solid var(--line);
}

.nav{
  display:flex;
  align-items:center;
  justify-content:space-between;
  height: 72px;
  gap: 16px;
}

.brand{
  display:flex;
  align-items:center;
  gap:10px;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 20px;
  color: var(--ink);
  white-space: nowrap;
}

.brand-mark{
  width: 34px; height: 34px;
  border: 1.5px solid var(--ink);
  border-radius: 50%;
  object-fit: cover;
  background: var(--white);
  flex-shrink: 0;
}

.footer-brand-row{
  display:flex;
  align-items:center;
  gap: 10px;
  margin-bottom: 4px;
}

.footer-mark{
  width: 40px; height: 40px;
  border-radius: 50%;
  border: 1.5px solid rgba(255,255,255,0.35);
  object-fit: cover;
  background: var(--white);
  flex-shrink: 0;
}

.nav-links{
  display:flex;
  align-items:center;
  gap: 28px;
}

.nav-links a{
  font-size: 14.5px;
  font-weight: 500;
  color: var(--ink-soft);
  padding: 6px 2px;
  border-bottom: 2px solid transparent;
  transition: color .15s, border-color .15s;
}
.nav-links a:hover, .nav-links a.active{
  color: var(--ink);
  border-bottom-color: var(--gold);
}

.nav-cta{
  background: var(--ink);
  color: var(--paper) !important;
  padding: 10px 18px;
  border-radius: var(--radius);
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.01em;
  transition: background .15s;
}
.nav-cta:hover{ background: var(--ink-soft); }

.nav-toggle{
  display:none;
  background:none; border:none;
  width: 40px; height: 40px;
  flex-direction:column; align-items:center; justify-content:center; gap:5px;
}
.nav-toggle span{ display:block; width: 22px; height: 2px; background: var(--ink); }

@media (max-width: 860px){
  .nav-links{
    position: absolute;
    top: 72px; left:0; right:0;
    background: var(--paper);
    border-bottom: 1px solid var(--line);
    flex-direction: column;
    align-items: flex-start;
    padding: 8px 24px 20px;
    gap: 14px;
    display: none;
  }
  .nav-links.open{ display:flex; }
  .nav-toggle{ display:flex; }
}

/* ---------------------------------------------------------------------------
   Hero — "Admit Slip"
   ------------------------------------------------------------------------- */
.hero{
  padding: 64px 0 56px;
}

.slip{
  position: relative;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 6px;
  box-shadow: var(--shadow);
  padding: 40px 40px 32px;
  overflow: hidden;
}

.slip::before{
  content:"";
  position:absolute;
  left:0; right:0; top:128px;
  border-top: 2px dashed var(--line);
}

@media (max-width: 700px){
  .slip::before{ display:none; }
}

.slip-top{
  display:flex;
  justify-content:space-between;
  align-items:flex-start;
  gap: 24px;
  padding-bottom: 28px;
  flex-wrap: wrap;
}

.slip-serial{
  font-family: var(--font-mono);
  font-size: 12.5px;
  color: var(--ink-soft);
  text-align:right;
}
.slip-serial b{ color: var(--ink); display:block; font-size:13px; letter-spacing:0.04em; }

.hero-eyebrow{
  font-family: var(--font-mono);
  font-size: 12.5px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--maroon);
  margin-bottom: 14px;
  display:inline-block;
}

.hero h1{
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(32px, 5vw, 52px);
  line-height: 1.08;
  letter-spacing: -0.01em;
  max-width: 760px;
  margin-bottom: 18px;
}

.hero h1 em{
  font-style: italic;
  color: var(--gold-deep);
}

.hero p.lede{
  font-size: 17px;
  color: var(--ink-soft);
  max-width: 560px;
  margin-bottom: 28px;
}

.hero-actions{
  display:flex;
  gap: 14px;
  flex-wrap: wrap;
  margin-bottom: 8px;
}

.btn{
  display:inline-flex;
  align-items:center;
  gap: 8px;
  padding: 13px 22px;
  border-radius: var(--radius);
  font-size: 14.5px;
  font-weight: 600;
  border: 1px solid transparent;
  transition: transform .12s ease, background .15s, border-color .15s;
}
.btn:active{ transform: translateY(1px); }
.btn-block{ display: flex; justify-content: center; width: 100%; margin-top: 4px; }

.btn-primary{
  background: var(--ink);
  color: var(--paper);
}
.btn-primary:hover{ background: var(--ink-soft); }

.btn-outline{
  background: transparent;
  border-color: var(--ink);
  color: var(--ink);
}
.btn-outline:hover{ background: var(--ink); color: var(--paper); }

.btn-gold{
  background: var(--gold);
  color: var(--ink);
}
.btn-gold:hover{ background: var(--gold-deep); color: var(--white); }

/* ---------------------------------------------------------------------------
   Upload Log banner — compact dismissible strip shown site-wide on load,
   announcing what's newly live. Closing it hides it for the rest of this
   browser session (sessionStorage) — it comes back next time they visit.
   ------------------------------------------------------------------------- */
.ad-slot{
  margin: 8px 0 28px;
  text-align: center;
}
.ad-slot-label{
  display: block;
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-soft);
  opacity: .6;
  margin-bottom: 6px;
}
.ad-slot .adsbygoogle{ min-height: 90px; }

.upload-log{
  --ul-margin-red: #b4483c;
  --ul-highlight: #f2c94c;
  --ul-done: #3a8f68;
  position: relative;
  background: var(--ink);
  color: var(--paper);
  border-bottom: 1px solid rgba(255,255,255,0.1);
}
.upload-log-inner{
  max-width: 1180px;
  margin: 0 auto;
  padding: 10px 44px 10px 20px;
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
  font-size: 13px;
}
.upload-log-dot{
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--ul-highlight);
  flex-shrink: 0;
  animation: ulPulse 2.2s infinite;
}
@keyframes ulPulse{ 0%,100%{ opacity: 1; } 50%{ opacity: .35; } }
.upload-log-text{ flex: 1; min-width: 200px; }
.upload-log-text strong{ color: var(--gold); font-weight: 600; }
.upload-log-text .upload-log-status{ color: rgba(246,243,236,0.65); margin-left: 6px; }
.upload-log-cta{
  flex-shrink: 0;
  font-family: var(--font-mono);
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: 0.03em;
  color: var(--paper);
  border: 1px solid rgba(255,255,255,0.35);
  border-radius: 5px;
  padding: 5px 12px;
  white-space: nowrap;
}
.upload-log-cta:hover{ border-color: var(--gold); color: var(--gold); }
.upload-log-close{
  position: absolute;
  right: 14px; top: 50%;
  transform: translateY(-50%);
  width: 26px; height: 26px;
  display: flex; align-items: center; justify-content: center;
  color: rgba(246,243,236,0.6);
  background: none;
  border: none;
  cursor: pointer;
  border-radius: 5px;
  flex-shrink: 0;
}
.upload-log-close:hover{ color: var(--paper); background: rgba(255,255,255,0.1); }
.upload-log-close svg{ width: 15px; height: 15px; }

@media (max-width: 600px){
  .upload-log-inner{ padding: 10px 40px 10px 14px; font-size: 12.5px; }
}


.hero-top{
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 40px;
  margin-bottom: 32px;
  flex-wrap: wrap;
}
.hero-copy{ flex: 1; min-width: 280px; }

.hero-big{
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(38px, 6vw, 62px);
  line-height: 1.06;
  letter-spacing: -0.01em;
  color: var(--ink);
  margin-bottom: 18px;
}

.id-card{
  display: flex;
  width: 320px;
  max-width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
  background: var(--white);
  box-shadow: var(--shadow);
  flex-shrink: 0;
}
.id-card-stripe{
  width: 76px;
  background: linear-gradient(180deg, var(--ink), #0e1730);
  color: var(--gold);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.id-card-stripe svg{ width: 34px; height: 34px; }
.id-card-body{ padding: 20px 20px 22px; flex: 1; min-width: 0; }
.id-card-title{
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 20px;
  color: var(--ink);
  margin-bottom: 10px;
}
.id-card-rule{ height: 2px; width: 36px; background: var(--gold); margin-bottom: 14px; }
.id-card-row{
  display: flex;
  align-items: flex-start;
  gap: 8px;
  font-size: 12.5px;
  color: var(--ink-soft);
  margin-bottom: 8px;
  line-height: 1.4;
}
.id-card-row:last-child{ margin-bottom: 0; }
.id-card-row svg{ width: 15px; height: 15px; flex-shrink: 0; margin-top: 1px; color: var(--gold-deep); }

@media (max-width: 700px){
  .hero-top{ flex-direction: column; }
  .id-card{ width: 100%; }
}

.site-search{
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 6px 6px 6px 16px;
  margin-bottom: 8px;
  box-shadow: var(--shadow);
}
.site-search-icon{ color: var(--ink-soft); display: flex; flex-shrink: 0; }
.site-search input{
  flex: 1;
  min-width: 0;
  border: none;
  outline: none;
  background: transparent;
  font-family: var(--font-body);
  font-size: 15px;
  color: var(--ink);
  padding: 10px 0;
}
.site-search input::placeholder{ color: var(--ink-soft); opacity: .7; }
.site-search .btn{ flex-shrink: 0; padding: 11px 20px; }

.search-suggestions{
  position: relative;
  display: none;
  flex-direction: column;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  margin-top: -2px;
  margin-bottom: 22px;
  overflow: hidden;
  box-shadow: var(--shadow);
}
.search-suggestions.open{ display: flex; }
.search-suggestion{
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  text-align: left;
  padding: 12px 16px;
  background: none;
  border: none;
  border-bottom: 1px solid var(--line);
  font-family: var(--font-body);
  font-size: 14.5px;
  color: var(--ink);
  cursor: pointer;
}
.search-suggestion:last-child{ border-bottom: none; }
.search-suggestion:hover, .search-suggestion:focus{ background: var(--paper); }
.search-suggestion-kind{
  flex-shrink: 0;
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--gold-deep);
  border: 1px solid var(--line);
  border-radius: 4px;
  padding: 2px 6px;
}
.search-suggestion-name{ font-weight: 600; }


  font-size: 12.5px;
  color: var(--ink-soft);
  min-height: 16px;
  margin: 4px 0 24px 4px;
}
.home-search-hint.error{ color: var(--maroon); }

@media (max-width: 520px){
  .site-search{ flex-wrap: wrap; padding: 14px; }
  .site-search-icon{ order: 0; }
  .site-search input{ order: 1; width: 100%; padding: 8px 0; }
  .site-search .btn{ order: 2; width: 100%; justify-content: center; margin-top: 8px; }
}

.section-row-list{
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin-bottom: 32px;
}
.section-row{
  display: flex;
  align-items: center;
  gap: 20px;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 20px 24px;
  transition: border-color .15s, transform .15s, box-shadow .15s;
}
.section-row:hover{ border-color: var(--ink); transform: translateY(-2px); box-shadow: var(--shadow); }
.section-row-icon{
  flex-shrink: 0;
  width: 56px; height: 56px;
  border-radius: 50%;
  background: var(--ink);
  color: var(--gold);
  display: flex;
  align-items: center;
  justify-content: center;
}
.section-row-icon svg{ width: 26px; height: 26px; }
.section-row-body{ flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.section-row-eyebrow{
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--gold-deep);
  font-weight: 600;
}
.section-row-title{ font-family: var(--font-display); font-weight: 700; font-size: 22px; color: var(--ink); }
.section-row-desc{ font-size: 13.5px; color: var(--ink-soft); }
.section-row-arrow{ flex-shrink: 0; color: var(--gold-deep); transition: transform .15s; }
.section-row:hover .section-row-arrow{ transform: translateX(4px); }

@media (max-width: 520px){
  .section-row{ padding: 16px 18px; gap: 14px; }
  .section-row-icon{ width: 44px; height: 44px; }
  .section-row-icon svg{ width: 20px; height: 20px; }
  .section-row-title{ font-size: 18px; }
}


  display:grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0;
  margin-top: 28px;
  border-top: 1px solid var(--line);
}

.slip-field{
  padding: 20px 18px;
  border-right: 1px solid var(--line);
  transition: background .15s;
}
.slip-field:last-child{ border-right:none; }
.slip-field:hover{ background: var(--paper); }

.slip-field .field-label{
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-soft);
  display:block;
  margin-bottom: 6px;
}

.slip-field .field-value{
  font-family: var(--font-display);
  font-size: 19px;
  font-weight: 600;
  color: var(--ink);
  display:flex;
  align-items:center;
  justify-content:space-between;
}

.slip-field .field-value-inner{
  display: flex;
  align-items: center;
  gap: 10px;
}

.slip-field .field-arrow{
  color: var(--gold-deep);
  transition: transform .15s;
}
.slip-field:hover .field-arrow{ transform: translateX(3px); }

@media (max-width: 700px){
  .slip-fields{ grid-template-columns: 1fr; }
  .slip-field{ border-right:none; border-bottom: 1px solid var(--line); }
  .slip-field:last-child{ border-bottom:none; }
}

/* ---------------------------------------------------------------------------
   Sections / generic page structure
   ------------------------------------------------------------------------- */
.section{ padding: 56px 0; }
.section-tight{ padding: 32px 0; }

.section-head{
  display:flex;
  justify-content:space-between;
  align-items:flex-end;
  gap: 20px;
  margin-bottom: 30px;
  flex-wrap: wrap;
}

.section-head h2{
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(24px, 3.4vw, 34px);
  letter-spacing: -0.01em;
}

.section-head p{
  color: var(--ink-soft);
  max-width: 480px;
  font-size: 15px;
}

.breadcrumb{
  font-family: var(--font-mono);
  font-size: 12.5px;
  color: var(--ink-soft);
  margin-bottom: 18px;
}
.breadcrumb a{ color: var(--ink-soft); border-bottom: 1px dotted var(--ink-soft); }
.breadcrumb a:hover{ color: var(--ink); }
.breadcrumb .sep{ margin: 0 6px; opacity:.5; }
.breadcrumb .current{ color: var(--ink); }

/* Divider — torn-edge motif */
.torn-divider{
  height: 1px;
  background-image: linear-gradient(to right, var(--line) 60%, transparent 0%);
  background-size: 10px 1px;
  background-repeat: repeat-x;
  margin: 8px 0 0;
}

/* ---------------------------------------------------------------------------
   Card grids
   ------------------------------------------------------------------------- */
.grid{
  display:grid;
  gap: 18px;
}
.grid-3{ grid-template-columns: repeat(3, 1fr); }
.grid-5{ grid-template-columns: repeat(5, 1fr); }
.grid-2{ grid-template-columns: repeat(2, 1fr); }

@media (max-width: 960px){
  .grid-3, .grid-5{ grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 600px){
  .grid-3, .grid-5, .grid-2{ grid-template-columns: 1fr; }
}

.card{
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 24px 22px;
  transition: border-color .15s, transform .15s, box-shadow .15s;
  display:block;
  position:relative;
}
.card:hover{ border-color: var(--ink); transform: translateY(-2px); box-shadow: var(--shadow); }

.card .card-code{
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--gold-deep);
  letter-spacing: 0.08em;
  display:block;
  margin-bottom: 10px;
}

.card h3{
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 600;
  margin-bottom: 6px;
}

.card p{
  font-size: 14px;
  color: var(--ink-soft);
}

.card .card-foot{
  margin-top: 16px;
  font-size: 13px;
  font-weight: 600;
  color: var(--ink);
  display:flex;
  align-items:center;
  gap: 6px;
}

/* Tag pill */
.tag{
  display:inline-block;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.04em;
  padding: 3px 9px;
  border-radius: 100px;
  border: 1px solid currentColor;
}
.tag-green{ color: var(--green); }
.tag-maroon{ color: var(--maroon); }
.tag-gold{ color: var(--gold-deep); }

/* ---------------------------------------------------------------------------
   Home — "why us" / how it works
   ------------------------------------------------------------------------- */
.stat-row{
  display:grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 18px;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  padding: 28px 0;
  margin: 8px 0 0;
}
.stat{ text-align:left; }
.stat .num{
  font-family: var(--font-display);
  font-size: 30px;
  font-weight: 600;
  color: var(--ink);
}
.stat .label{
  font-size: 13px;
  color: var(--ink-soft);
  margin-top: 2px;
}
@media (max-width: 700px){
  .stat-row{ grid-template-columns: repeat(2, 1fr); }
}

/* ---------------------------------------------------------------------------
   Resource list (notes / textbooks / past papers / past tests)
   ------------------------------------------------------------------------- */
.resource-tabs{
  display:flex;
  gap: 6px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 22px;
  overflow-x:auto;
}
.resource-tab{
  background:none; border:none;
  padding: 12px 4px;
  margin-right: 22px;
  font-size: 14.5px;
  font-weight: 600;
  color: var(--ink-soft);
  border-bottom: 2px solid transparent;
  white-space: nowrap;
}
.resource-tab.active{
  color: var(--ink);
  border-bottom-color: var(--gold);
}

.resource-list{ display:flex; flex-direction:column; gap: 0; }

.resource-row{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap: 16px;
  padding: 16px 4px;
  border-bottom: 1px solid var(--line);
  flex-wrap: wrap;
}
.resource-row:hover{ background: rgba(200,155,60,0.06); }

.resource-info h4{
  font-family: var(--font-body);
  font-size: 15px;
  font-weight: 600;
  color: var(--ink);
}
.resource-meta{
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--ink-soft);
  margin-top: 3px;
}

.subject-group{ margin-bottom: 22px; }
.subject-group:last-child{ margin-bottom: 0; }

.subject-heading{
  font-family: var(--font-mono);
  font-size: 11.5px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--gold-deep);
  padding: 10px 4px 8px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 2px;
}

.resource-row-locked{
  background: rgba(140,47,57,0.05);
}
.resource-row-locked:hover{ background: rgba(140,47,57,0.1); }
.resource-row-locked h4{ color: var(--maroon); display:flex; align-items:center; gap:6px; }

.resource-empty{
  padding: 32px 4px;
  color: var(--ink-soft);
  font-size: 14px;
  font-style: italic;
}

/* Quick facts / test date slips */
.fact-grid{
  display:grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow:hidden;
  margin-bottom: 8px;
}
.fact{
  background: var(--white);
  padding: 16px 18px;
}
.fact .field-label{
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-soft);
  display:block;
  margin-bottom: 4px;
}
.fact .field-value{ font-size: 14.5px; font-weight: 600; color: var(--ink); }
@media (max-width:600px){ .fact-grid{ grid-template-columns: 1fr; } }

.date-slip{
  display:flex;
  justify-content:space-between;
  align-items:center;
  gap: 16px;
  background: var(--white);
  border: 1px solid var(--line);
  border-left: 3px solid var(--maroon);
  border-radius: var(--radius);
  padding: 16px 18px;
  margin-bottom: 10px;
  flex-wrap: wrap;
}
.date-slip .dl{ font-size: 14.5px; font-weight: 600; }
.date-slip .dn{ font-size: 12.5px; color: var(--ink-soft); margin-top: 2px; }
.date-slip .dd{ font-family: var(--font-mono); font-size: 14px; color: var(--maroon); font-weight: 600; white-space:nowrap; }

/* ---------------------------------------------------------------------------
   CTA banner
   ------------------------------------------------------------------------- */
.cta-band{
  background: var(--ink);
  color: var(--paper);
  border-radius: 6px;
  padding: 44px 40px;
  display:flex;
  justify-content:space-between;
  align-items:center;
  gap: 24px;
  flex-wrap: wrap;
}
.cta-band h3{
  font-family: var(--font-display);
  font-size: 26px;
  font-weight: 600;
  max-width: 460px;
}
.cta-band p{ color: #C7CEDE; margin-top: 8px; font-size: 14.5px; }

/* ---------------------------------------------------------------------------
   Footer
   ------------------------------------------------------------------------- */
.site-footer{
  background: var(--ink);
  color: var(--paper);
  margin-top: 64px;
  padding: 56px 0 28px;
}
.footer-grid{
  display:grid;
  grid-template-columns: 1.2fr 1fr 1fr 1fr;
  gap: 32px;
  padding-bottom: 36px;
  border-bottom: 1px solid rgba(246,243,236,0.15);
}
@media (max-width: 700px){
  .footer-grid{ grid-template-columns: 1fr; }
}
.footer-brand{
  font-family: var(--font-display);
  font-size: 21px;
  font-weight: 600;
  margin-bottom: 10px;
}
.footer-tagline{ color: #AEB7CC; font-size: 14px; max-width: 320px; }

.footer-col h5{
  font-family: var(--font-mono);
  font-size: 11.5px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 14px;
}
.footer-col a, .footer-col p{
  display:block;
  color: #C7CEDE;
  font-size: 14.5px;
  margin-bottom: 10px;
  transition: color .15s;
}
.footer-col a:hover{ color: var(--paper); }

.footer-bottom{
  display:flex;
  justify-content:space-between;
  align-items:center;
  gap: 12px;
  flex-wrap: wrap;
  padding-top: 22px;
  font-size: 12.5px;
  color: #8994AC;
  font-family: var(--font-mono);
}

/* ---------------------------------------------------------------------------
   How-to-post note box (shown on section pages to remind the owner)
   ------------------------------------------------------------------------- */
.owner-note{
  border: 1px dashed var(--gold-deep);
  background: rgba(200,155,60,0.08);
  border-radius: var(--radius);
  padding: 14px 18px;
  font-size: 13px;
  color: var(--ink-soft);
  margin-bottom: 28px;
}
.owner-note b{ color: var(--ink); }

/* Utility */
.mt-8{ margin-top:8px;} .mt-16{ margin-top:16px;} .mt-24{ margin-top:24px;} .mt-40{ margin-top:40px;}
.mb-24{ margin-bottom:24px; }
.text-center{ text-align:center; }

.sr-only{
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  white-space: nowrap;
  border: 0;
}

/* ---------------------------------------------------------------------------
   Reviews widget — star ratings + comments, bottom of every page
   ------------------------------------------------------------------------- */
.reviews-widget{
  background: var(--paper-2);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  padding: 40px 0;
}
.reviews-inner{ max-width: 640px; }
.reviews-heading{
  font-family: var(--font-display);
  font-size: 22px;
  margin-bottom: 14px;
}
.reviews-summary{
  display:flex;
  align-items:center;
  gap: 10px;
  margin-bottom: 18px;
}
.reviews-avg{
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 600;
}
.reviews-count{
  font-size: 13px;
  color: var(--ink-soft);
  font-family: var(--font-mono);
}
.star{ color: var(--line); font-size: 16px; }
.star.filled{ color: var(--gold); }

.review-form{
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 18px;
  margin-bottom: 24px;
}
.review-star-picker{ margin-bottom: 12px; }
.star-pick{
  font-size: 26px;
  color: var(--line);
  cursor: pointer;
  transition: color .1s ease;
  padding-right: 2px;
}
.star-pick.picked{ color: var(--gold); }
.review-input, .review-textarea{
  width: 100%;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 10px 12px;
  font-family: var(--font-body);
  font-size: 14px;
  margin-bottom: 10px;
  background: var(--paper);
  color: var(--ink);
}
.review-textarea{ resize: vertical; }
.review-msg{ font-size: 13px; margin-top: 8px; min-height: 16px; }
.review-msg-ok{ color: var(--green); }
.review-msg-error{ color: var(--maroon); }

.review-item{
  border-bottom: 1px solid var(--line);
  padding: 14px 0;
}
.review-item:last-child{ border-bottom: none; }
.review-item-top{
  display:flex;
  align-items:center;
  gap: 10px;
  margin-bottom: 4px;
}
.review-name{
  font-size: 13px;
  color: var(--ink-soft);
  font-family: var(--font-mono);
}
.review-comment{ font-size: 14.5px; color: var(--ink); }
.review-empty{ font-size: 14px; color: var(--ink-soft); font-style: italic; }
.review-item-mine{
  background: rgba(200, 155, 60, 0.08);
  border-radius: 8px;
  padding: 14px 10px;
  margin: 0 -10px;
}
.review-name em{ font-style: normal; color: var(--ink-soft); font-size: 12px; }
.review-delete-link{
  display: inline-block;
  margin-top: 6px;
  font-size: 12.5px;
  color: var(--maroon);
  text-decoration: underline;
  cursor: pointer;
}

/* ---------------------------------------------------------------------------
   AI Chat Assistant — floating button + slide-up panel
   ------------------------------------------------------------------------- */
.chat-toggle{
  position: fixed;
  bottom: 22px;
  right: 22px;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: var(--ink);
  color: var(--paper);
  border: none;
  box-shadow: var(--shadow);
  font-size: 24px;
  cursor: pointer;
  z-index: 60;
  transition: transform .15s ease, opacity .15s ease;
}
.chat-toggle:hover{ transform: scale(1.06); }
.chat-toggle.hidden{ opacity: 0; pointer-events: none; transform: scale(.8); }

.chat-panel{
  position: fixed;
  bottom: 22px;
  right: 22px;
  width: min(360px, calc(100vw - 32px));
  height: min(520px, calc(100vh - 100px));
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 12px;
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  z-index: 61;
  opacity: 0;
  transform: translateY(12px) scale(.98);
  pointer-events: none;
  transition: opacity .15s ease, transform .15s ease;
}
.chat-panel.open{ opacity: 1; transform: translateY(0) scale(1); pointer-events: auto; }

.chat-panel-header{
  background: var(--ink);
  color: var(--paper);
  padding: 14px 16px;
  display:flex;
  align-items:center;
  justify-content:space-between;
  font-family: var(--font-display);
  font-size: 16px;
}
.chat-close{
  background: none;
  border: none;
  color: var(--paper);
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
}

.chat-messages{
  flex: 1;
  overflow-y: auto;
  padding: 14px;
  display:flex;
  flex-direction: column;
  gap: 10px;
  background: var(--paper);
}
.chat-msg{
  max-width: 85%;
  padding: 9px 13px;
  border-radius: 12px;
  font-size: 14px;
  line-height: 1.45;
  white-space: pre-wrap;
}
.chat-msg-assistant{
  background: var(--white);
  border: 1px solid var(--line);
  align-self: flex-start;
  border-bottom-left-radius: 2px;
}
.chat-msg-user{
  background: var(--ink);
  color: var(--paper);
  align-self: flex-end;
  border-bottom-right-radius: 2px;
}

.chat-form{
  display:flex;
  border-top: 1px solid var(--line);
  background: var(--white);
}
.chat-form input{
  flex: 1;
  border: none;
  padding: 12px 14px;
  font-size: 14px;
  font-family: var(--font-body);
  background: transparent;
  color: var(--ink);
}
.chat-form input:focus{ outline: none; }
.chat-send{
  border: none;
  background: transparent;
  color: var(--ink);
  padding: 0 16px;
  cursor: pointer;
}
.chat-send:hover{ color: var(--gold-deep); }

@media (max-width: 480px){
  .chat-panel{ right: 16px; bottom: 86px; }
  .chat-toggle{ right: 16px; bottom: 16px; }
}

/* ---------------------------------------------------------------------------
   Embedded document viewer — modal overlay for notes/textbooks/past papers
   ------------------------------------------------------------------------- */
#doc-viewer{
  position: fixed;
  inset: 0;
  z-index: 80;
  display: none;
}
#doc-viewer.open{ display: block; }

.doc-viewer-backdrop{
  position: absolute;
  inset: 0;
  background: rgba(22,35,63,0.55);
}

.doc-viewer-panel{
  position: relative;
  margin: 3vh auto;
  width: min(900px, 94vw);
  height: 94vh;
  background: var(--white);
  border-radius: 10px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow);
}

.doc-viewer-header{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap: 12px;
  padding: 12px 16px;
  background: var(--ink);
  color: var(--paper);
}
.doc-viewer-title{
  font-family: var(--font-display);
  font-size: 15px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.doc-viewer-actions{
  display:flex;
  align-items:center;
  gap: 14px;
  flex-shrink: 0;
}
.doc-viewer-open{
  color: var(--paper);
  font-size: 13px;
  display:flex;
  align-items:center;
  gap: 5px;
  opacity: .85;
}
.doc-viewer-open:hover{ opacity: 1; }
.doc-viewer-close{
  background: none;
  border: none;
  color: var(--paper);
  font-size: 24px;
  line-height: 1;
  cursor: pointer;
}

.doc-viewer-frame{
  flex: 1;
  width: 100%;
  border: none;
  background: var(--paper-2);
}

@media (max-width: 600px){
  .doc-viewer-panel{ margin: 0; width: 100vw; height: 100vh; border-radius: 0; }
}

/* ---------------------------------------------------------------------------
   Cookie consent banner
   ------------------------------------------------------------------------- */
.cookie-banner{
  position: fixed;
  left: 16px; right: 16px; bottom: 16px;
  z-index: 500;
  background: var(--ink);
  color: var(--paper);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 20px 24px;
  display: flex;
  align-items: center;
  gap: 20px;
  max-width: 760px;
  margin: 0 auto;
}
.cookie-banner p{
  flex: 1;
  font-size: 14px;
  line-height: 1.5;
  color: var(--paper);
  opacity: 0.9;
}
.cookie-banner a{ color: var(--gold); text-decoration: underline; }
.cookie-banner-actions{ display: flex; gap: 10px; flex-shrink: 0; }
.cookie-banner-btn{
  padding: 10px 16px;
  border-radius: var(--radius);
  font-size: 13.5px;
  font-weight: 600;
  cursor: pointer;
  border: 1px solid rgba(246,243,236,0.35);
  background: transparent;
  color: var(--paper);
  white-space: nowrap;
}
.cookie-banner-btn.accept{
  background: var(--gold);
  border-color: var(--gold);
  color: var(--ink);
}
.cookie-banner-btn:hover{ opacity: 0.85; }

@media (max-width: 640px){
  .cookie-banner{
    flex-direction: column;
    align-items: stretch;
    text-align: left;
    left: 12px; right: 12px; bottom: 12px;
    padding: 18px;
  }
  .cookie-banner-actions{ justify-content: stretch; }
  .cookie-banner-btn{ flex: 1; }
}

/* ---------------------------------------------------------------------------
   Homepage poster banners — one big designed banner per section (Boards,
   Entry Tests, Scholarships). Decorative "seal" mark, not a photo — keeps
   things on-brand and avoids stock-photo licensing issues entirely.
   ------------------------------------------------------------------------- */
.test-poster-card{
  position: relative;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border-radius: var(--radius);
  padding: 28px 24px 22px;
  color: var(--white);
  min-height: 210px;
  background: linear-gradient(150deg, var(--accent) 0%, #16233F 100%);
  background: linear-gradient(150deg, var(--accent) 0%, color-mix(in srgb, var(--accent) 55%, #000 45%) 100%);
  transition: transform .15s, box-shadow .15s;
}
.test-poster-card:hover{ transform: translateY(-3px); box-shadow: var(--shadow); }
.test-poster-card-photo{ background: none; }
.test-poster-card-photo::before{
  content: "";
  position: absolute;
  inset: -6px;
  background-image: var(--photo-url);
  background-size: cover;
  background-position: center;
  filter: brightness(0.68);
  z-index: -1;
}
.test-poster-card-photo::after{
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(160deg, var(--scrim-1) 0%, var(--scrim-2) 100%);
  z-index: -1;
}
.test-poster-card-photo .test-poster-name,
.test-poster-card-photo .test-poster-full{ text-shadow: 0 1px 4px rgba(0,0,0,0.5); }
.test-poster-decor{
  position: absolute;
  right: -14px; bottom: -20px;
  color: rgba(255,255,255,0.14);
  pointer-events: none;
  line-height: 0;
}
.test-poster-decor svg{ width: 120px; height: 120px; }
.test-poster-logo{ position: relative; margin-bottom: 14px; }
.test-poster-logo .badge-logo{ background: var(--white); }
.test-poster-logo .badge-crest{ box-shadow: 0 2px 8px rgba(0,0,0,0.3); }
.test-poster-name{
  position: relative;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 26px;
  margin-bottom: 6px;
}
.test-poster-full{
  position: relative;
  font-size: 13.5px;
  color: rgba(255,255,255,0.85);
  margin-bottom: 18px;
  flex: 1;
}
.test-poster-foot{
  position: relative;
  font-size: 13px;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--gold);
}

.poster-photo{
  display: block;
  border-radius: var(--radius);
  overflow: hidden;
  margin-bottom: 22px;
  position: relative;
  transition: transform .15s, box-shadow .15s;
}
.poster-photo:hover{ transform: translateY(-2px); box-shadow: var(--shadow); }
.poster-photo img{
  display: block;
  width: 100%;
  height: auto;
}


  position: relative;
  display: flex;
  align-items: center;
  gap: 48px;
  padding: 52px 44px;
  border-radius: var(--radius);
  overflow: hidden;
  margin-bottom: 22px;
  color: var(--white);
  transition: transform .15s, box-shadow .15s;
}
.poster:hover{ transform: translateY(-2px); box-shadow: var(--shadow); }
.poster-reverse{ flex-direction: row-reverse; }
.poster-boards{ background: radial-gradient(circle at 15% 20%, #2e5090 0%, #16233F 55%, #0e1730 100%); }
.poster-tests{ background: radial-gradient(circle at 85% 20%, #2f8a63 0%, #1f6f3f 45%, #123a20 100%); }
.poster-scholarships{ background: radial-gradient(circle at 15% 20%, #a8577f 0%, #7a3b5e 50%, #4a2038 100%); }

/* Faint diagonal texture so the gradient doesn't read as flat */
.poster::before{
  content: "";
  position: absolute;
  inset: 0;
  background-image: repeating-linear-gradient(135deg, rgba(255,255,255,0.035) 0px, rgba(255,255,255,0.035) 1px, transparent 1px, transparent 10px);
  pointer-events: none;
}

.poster-seal{
  position: relative;
  flex-shrink: 0;
  width: 160px; height: 160px;
  border-radius: 50%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  gap: 6px;
  background: radial-gradient(circle at 32% 28%, rgba(255,255,255,0.32), rgba(255,255,255,0.05) 45%, rgba(0,0,0,0.18) 100%);
  border: 1px solid rgba(255,255,255,0.55);
  box-shadow:
    inset 0 2px 6px rgba(255,255,255,0.35),
    inset 0 -10px 18px rgba(0,0,0,0.28),
    0 14px 28px -10px rgba(0,0,0,0.45);
}
.poster-seal::before{
  content: "";
  position: absolute;
  inset: 8px;
  border-radius: 50%;
  border: 1px dashed rgba(255,255,255,0.5);
}
.poster-seal svg{ width: 32px; height: 32px; filter: drop-shadow(0 2px 3px rgba(0,0,0,0.35)); }
.poster-seal-text{
  position: relative;
  font-family: var(--font-mono);
  font-size: 10px;
  line-height: 1.5;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  opacity: .9;
  padding: 0 14px;
  text-shadow: 0 1px 2px rgba(0,0,0,0.3);
}

.poster-body{ flex: 1; min-width: 0; }
.poster-eyebrow{
  display: block;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  opacity: .8;
  margin-bottom: 10px;
}
.poster-title{
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(26px, 3.6vw, 38px);
  line-height: 1.12;
  margin-bottom: 14px;
}
.poster-desc{
  font-size: 15px;
  line-height: 1.65;
  opacity: .92;
  max-width: 540px;
  margin-bottom: 22px;
}
.poster-stats{
  display: flex;
  gap: 24px;
  flex-wrap: wrap;
  margin-bottom: 24px;
}
.poster-stat b{ display: block; font-family: var(--font-display); font-size: 24px; }
.poster-stat span{ display:block; font-size: 10.5px; opacity: .75; font-family: var(--font-mono); text-transform: uppercase; letter-spacing: 0.04em; margin-top: 2px; }
.poster .btn-outline{ border-color: rgba(255,255,255,0.6); color: #fff; }
.poster .btn-outline:hover{ background: rgba(255,255,255,0.12); }

@media (max-width: 760px){
  .poster, .poster-reverse{ flex-direction: column; text-align: center; padding: 40px 24px; }
  .poster-stats, .poster-desc{ margin-left: auto; margin-right: auto; justify-content: center; }
}


   Uses --accent (set inline per item) for the top stripe, eyebrow and stats.
   ------------------------------------------------------------------------- */
.detail-hero{
  position: relative;
  background: linear-gradient(180deg, var(--paper-2), var(--paper));
  border: 1px solid var(--line);
  border-top: 4px solid var(--accent, var(--gold));
  border-radius: var(--radius);
  padding: 32px 28px 28px;
  margin-bottom: 28px;
  overflow: hidden;
}
.detail-hero::after{
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: 1px;
  background-image: linear-gradient(to right, var(--line) 60%, transparent 0%);
  background-size: 10px 1px;
  background-repeat: repeat-x;
  opacity: .8;
}

/* Rich variant — full colored background per board/test, used on detail
   pages so each one feels distinct rather than a uniform paper card. */
.detail-hero-rich{
  background: linear-gradient(150deg, var(--accent) 0%, #16233F 100%);
  background: linear-gradient(150deg, var(--accent) 0%, color-mix(in srgb, var(--accent) 55%, #000 45%) 100%);
  border-color: transparent;
  color: var(--white);
}
.detail-hero-rich::after{ display: none; }
.detail-hero-rich .detail-hero-eyebrow{ color: var(--gold); opacity: .9; }
.detail-hero-rich .detail-hero-title{ color: var(--white); }
.detail-hero-rich .detail-hero-sub{ color: rgba(255,255,255,0.75); }
.detail-hero-rich .detail-hero-desc{ color: rgba(255,255,255,0.82); }
.detail-hero-rich .hero-logo{ box-shadow: 0 4px 14px rgba(0,0,0,0.35); }
.detail-hero-rich .hero-stat{ background: rgba(255,255,255,0.1); border-color: rgba(255,255,255,0.2); }
.detail-hero-rich .hero-stat-value{ color: var(--gold); }
.detail-hero-rich .hero-stat-label{ color: rgba(255,255,255,0.7); }
.detail-hero-rich .detail-hero-link{ color: var(--white); border-color: rgba(255,255,255,0.5); }

.detail-hero-decor{
  position: absolute;
  right: -10px; bottom: -18px;
  color: rgba(255,255,255,0.12);
  pointer-events: none;
  line-height: 0;
}
.detail-hero-decor svg{ width: 150px; height: 150px; }
@media (max-width: 600px){
  .detail-hero-decor svg{ width: 100px; height: 100px; }
}

.detail-hero-photo{ background: none; border-color: transparent; color: var(--white); }
.detail-hero-photo::before{
  content: "";
  position: absolute;
  inset: -10px;
  background-image: var(--photo-url);
  background-size: cover;
  background-position: center;
  filter: brightness(0.65);
  z-index: -1;
}
.detail-hero-photo::after{
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, var(--scrim-1) 0%, var(--scrim-2) 55%, var(--scrim-3) 100%);
  z-index: -1;
}
.detail-hero-photo .detail-hero-eyebrow{ color: var(--gold); opacity: .9; }
.detail-hero-photo .detail-hero-title{ color: var(--white); }
.detail-hero-photo .detail-hero-sub{ color: rgba(255,255,255,0.78); }
.detail-hero-photo .hero-stat{ background: rgba(255,255,255,0.1); border-color: rgba(255,255,255,0.2); }
.detail-hero-photo .hero-stat-value{ color: var(--gold); }
.detail-hero-photo .hero-stat-label{ color: rgba(255,255,255,0.7); }
.detail-hero-photo .detail-hero-link{ color: var(--white); border-color: rgba(255,255,255,0.5); }
.detail-hero-photo .detail-hero-title,
.detail-hero-photo .detail-hero-sub,
.detail-hero-photo .detail-hero-desc{ text-shadow: 0 1px 4px rgba(0,0,0,0.4); }

.detail-hero-top{
  position: relative;
  display: flex;
  align-items: center;
  gap: 20px;
  flex-wrap: wrap;
}

.hero-logo{
  width: 84px; height: 84px;
  border-radius: 14px;
  object-fit: contain;
  background: var(--white);
  border: 1px solid var(--line);
  padding: 8px;
  flex-shrink: 0;
  box-shadow: 0 3px 10px -4px rgba(22,35,63,0.25);
}
.hero-logo-crest{
  display: flex; align-items: center; justify-content: center;
  color: #fff;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 26px;
}

.detail-hero-text{ min-width: 0; }

.detail-hero-eyebrow{
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 11.5px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--accent, var(--gold-deep));
  font-weight: 600;
  margin-bottom: 4px;
}

.detail-hero-title{
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(28px, 4vw, 42px);
  line-height: 1.05;
  color: var(--ink);
}

.detail-hero-sub{
  color: var(--ink-soft);
  font-size: 14.5px;
  margin-top: 4px;
}

.detail-hero-desc{
  max-width: 680px;
  color: var(--ink-soft);
  font-size: 15px;
  line-height: 1.65;
  margin: 16px 0 2px;
}

.hero-stat-row{
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 18px;
}
.hero-stat{
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px 18px;
  min-width: 96px;
  text-align: center;
}
.hero-stat-value{
  display: block;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 22px;
  color: var(--accent, var(--ink));
}
.hero-stat-label{
  display: block;
  font-size: 11px;
  color: var(--ink-soft);
  font-family: var(--font-mono);
  margin-top: 2px;
}

.detail-hero-link{
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 16px;
  font-size: 13.5px;
  font-weight: 600;
  color: var(--ink);
  border-bottom: 1px dotted var(--ink);
}

@media (max-width: 600px){
  .detail-hero{ padding: 24px 18px 22px; }
  .detail-hero-top{ flex-direction: column; align-items: flex-start; gap: 14px; }
  .hero-logo{ width: 68px; height: 68px; }
}

/* Board/test overview cards (the grid on /boards, /entry-tests) — bordered
   card per item with a square logo ring, so each board/test is visually
   separated instead of running together as plain stacked text. */
.badge-card{
  display: block;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 22px 20px;
  transition: transform .15s, box-shadow .15s, border-color .15s;
}
.badge-card:hover{ transform: translateY(-2px); box-shadow: var(--shadow); border-color: var(--accent, var(--line)); }

.badge-card-ring{
  width: 68px; height: 68px;
  border-radius: 16px;
  border: 2px solid var(--accent, var(--line));
  padding: 4px;
  margin-bottom: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--paper);
}
.badge-card-ring .badge-logo{ width: 100%; height: 100%; border: none; padding: 2px; }
.badge-card-ring .badge-crest{ width: 100%; height: 100%; border-radius: 12px; font-size: 18px; }

.badge-card-name{
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 19px;
  margin-bottom: 8px;
}
.badge-card-underline{
  display: block;
  width: 28px; height: 2px;
  margin-bottom: 12px;
}
.badge-card-desc{
  font-size: 13px;
  color: var(--ink-soft);
  line-height: 1.5;
  margin-bottom: 14px;
}
.badge-card-foot{
  display: block;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--ink-soft);
  border-top: 1px dashed var(--line);
  padding-top: 12px;
}

.result-district-list{
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.result-district-link{
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 6px;
  font-size: 13px;
  color: var(--ink);
  transition: border-color .15s, background .15s;
}
.result-district-link:hover{ border-color: var(--ink); background: var(--paper); }
.result-district-link svg{ flex-shrink: 0; opacity: .6; }


.badge-crest{
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  color: #fff;
  font-family: var(--font-display);
  font-weight: 600;
  letter-spacing: 0.01em;
  flex-shrink: 0;
  line-height: 1;
}

.card-badge-row{
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
}
.card-badge-row .card-code{ margin-bottom: 0 !important; }

.section-head-badged{
  display: flex;
  align-items: center;
  gap: 16px;
}
.section-head-badged h2{ margin-bottom: 2px; }

.subject-heading{
  display: flex;
  align-items: center;
  gap: 10px;
}

.subject-icon-tile{
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  border-radius: 8px;
  flex-shrink: 0;
}

.subject-group-books .subject-heading{
  font-size: 13px;
  padding: 12px 4px 10px;
}

/* Real logo images (board/test badges) — object-fit contain so non-square
   logos don't stretch, subtle ring to match the crest's circular footprint */
.badge-logo{
  object-fit: contain;
  border-radius: 8px;
  background: var(--white);
  border: 1px solid var(--line);
  padding: 3px;
  flex-shrink: 0;
}

/* Entry-test FAQ / eligibility sections */
.faq-item{
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 12px 16px;
  margin-bottom: 8px;
  background: var(--white);
}
.faq-item summary{
  cursor: pointer;
  font-weight: 600;
  list-style: none;
}
.faq-item summary::-webkit-details-marker{ display: none; }
.faq-item summary::before{
  content: "+";
  display: inline-block;
  width: 16px;
  color: var(--ink-soft);
}
.faq-item[open] summary::before{ content: "−"; }
.faq-item p{
  margin: 8px 0 0 22px;
  color: var(--ink-soft);
  font-size: 14px;
  line-height: 1.6;
}

/* Entry-test videos tab */
.video-grid{
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 16px;
}
.video-card{
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 12px;
  overflow: hidden;
}
.video-embed{
  position: relative;
  width: 100%;
  padding-top: 56.25%; /* 16:9 */
}
.video-embed iframe{
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 100%;
  border: 0;
}
.video-title{
  padding: 10px 12px;
  font-size: 14px;
  font-weight: 600;
  color: var(--ink);
}
