
:root{
  --ink:#192029;
  --slate:#23292F;
  --red:#B4232C;
  --white:#FFFFFF;
  --black:#000000;
  --soft:#F4F6F8;
  --line:#D9DEE3;
  --muted:#66717B;
  --shadow:0 16px 42px rgba(25,32,41,.14);
}
*{box-sizing:border-box}
html{scroll-behavior:smooth}
body{
  margin:0;
  padding-bottom:94px;
  background:var(--white);
  color:var(--ink);
  font-family:Aptos,"Segoe UI",Arial,sans-serif;
  font-size:13px;
  line-height:1.45;
}
button,input,a{font:inherit}
button{cursor:pointer}
a{color:inherit}
img{max-width:100%}

/* Sticky finder */
.finder{
  position:sticky;
  top:0;
  z-index:1000;
  background:rgba(255,255,255,.98);
  border-bottom:1px solid var(--line);
  box-shadow:0 8px 24px rgba(25,32,41,.11);
  backdrop-filter:blur(12px);
  -webkit-backdrop-filter:blur(12px);
}
.finder-inner{max-width:1120px;margin:auto;padding:10px 18px}
.finder-top{display:flex;justify-content:space-between;gap:14px;align-items:center;margin-bottom:7px}
.finder-title{font-size:14px;font-weight:900;color:var(--ink)}
.finder-subtitle{font-size:12px;color:var(--muted);font-weight:700}
.search-row{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:8px}
.search-box{
  display:flex;align-items:center;gap:9px;height:52px;padding:0 9px 0 13px;
  border:2px solid var(--ink);border-radius:12px;background:#fff;
}
.search-box img{width:21px;height:21px}
.search-box input{
  min-width:0;width:100%;height:46px;border:0;outline:0;background:transparent;
  color:#000;font-size:16px;font-weight:800;
}
.clear-btn{display:none;width:36px;height:36px;border:0;border-radius:9px;background:#EEF1F3;font-size:22px}
.clear-btn.show{display:block}
.search-btn{
  min-width:102px;border:0;border-radius:12px;background:var(--red);color:#fff;
  font-weight:900;padding:0 18px;box-shadow:0 8px 20px rgba(180,35,44,.24)
}
.feedback{min-height:18px;margin-top:7px;color:var(--muted);font-size:12px;font-weight:750}
.quick-search{display:flex;align-items:center;gap:7px;margin-top:7px;overflow-x:auto;scrollbar-width:none}
.quick-search::-webkit-scrollbar{display:none}
.quick-search span{flex:0 0 auto;color:var(--muted);font-size:12px;font-weight:700}
.quick-chip{flex:0 0 auto;border:1px solid #CBD1D6;border-radius:999px;background:#fff;padding:5px 10px;font-size:12px;font-weight:850}

/* Results */
.results{
  display:none;max-width:1120px;max-height:65vh;margin:auto;padding:0 18px 14px;
  overflow:auto;overscroll-behavior:contain;background:#fff;border-top:1px solid var(--line);
}
.results.show{display:block}
.results-head{
  position:sticky;top:0;z-index:2;display:flex;justify-content:space-between;gap:12px;
  padding:11px 0 9px;background:#fff;border-bottom:1px solid #E4E7EA;
}
.results-head strong{font-size:14px}
.results-head span{font-size:12px;color:var(--muted);text-align:right}
.result-card{margin-top:11px;border:1px solid var(--line);border-radius:14px;overflow:hidden;background:#fff}
.programme-banner{
  display:flex;justify-content:space-between;gap:12px;padding:12px 14px;background:var(--ink);color:#fff
}
.programme-banner strong{font-size:15px}
.programme-banner span{font-size:12px;color:#D9DEE3}
.course-result{
  display:grid;grid-template-columns:105px minmax(0,1fr) auto;gap:12px;align-items:center;
  padding:12px 14px;border-top:1px solid #E7EAED;
}
.course-code{
  min-height:36px;display:flex;align-items:center;justify-content:center;padding:7px 9px;
  border-radius:8px;background:#EEF1F3;color:#000;font-weight:900;text-align:center;
}
.course-title{font-size:14px;font-weight:900;color:#111;line-height:1.3}
.course-meta{margin-top:4px;color:var(--muted);font-size:12px}
.product-tags{display:flex;flex-wrap:wrap;gap:5px;margin-top:7px}
.product-tag{padding:3px 7px;border-radius:999px;background:#F2F4F6;color:#3D4851;font-size:11px;font-weight:750}
.course-actions{display:flex;gap:7px}
.course-action{
  min-height:38px;display:inline-flex;align-items:center;justify-content:center;gap:6px;
  border-radius:8px;padding:8px 11px;text-decoration:none;font-size:12px;font-weight:900;white-space:nowrap
}
.course-action.primary{background:var(--red);color:#fff}
.course-action.secondary{border:1px solid #CBD1D6;background:#fff;color:var(--ink)}
.course-action img{width:17px;height:17px}
.empty{
  margin-top:12px;padding:24px 14px;border:1px dashed #C8CED4;border-radius:12px;
  text-align:center;color:#4F5A64;background:#F8F9FA
}
.empty strong{display:block;margin-bottom:5px;color:var(--ink);font-size:16px}

/* Homepage */
.page{max-width:1120px;margin:auto;padding:24px}
.cover{
  border:1px solid var(--line);border-radius:20px;padding:30px;
  background:linear-gradient(145deg,#fff 0%,#fff 62%,#f1f3f5 100%);
}
.brand{display:flex;align-items:center;gap:14px}
.brand img{width:76px;height:76px;object-fit:contain}
.brand-name{font-size:29px;font-weight:900;color:#000;letter-spacing:.02em}
.brand-tagline{font-size:12px;font-weight:800;letter-spacing:.15em;color:var(--slate)}
.hero{margin:32px 0 20px}
.eyebrow{font-size:12px;font-weight:900;letter-spacing:.14em;text-transform:uppercase;color:var(--slate)}
h1{font-size:42px;line-height:1.05;letter-spacing:-.035em;margin:10px 0;color:#000}
.hero p{max-width:760px;margin:0;color:#46515A;font-size:17px}
.highlight{display:inline-block;margin-top:16px;padding:10px 14px;border-radius:8px;background:var(--ink);color:#fff;font-size:15px;font-weight:900}
.products{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:18px;max-width:940px;margin-top:25px}
.product-card{border:1px solid var(--line);border-radius:15px;padding:12px;background:#fff}
.product-image{
  height:300px;display:flex;align-items:center;justify-content:center;overflow:hidden;
  border:1px solid #E8EBEE;border-radius:11px;background:#fff
}
.product-image img{width:100%;height:100%;object-fit:contain}
.product-card h2{margin:14px 0 4px;color:#000;font-size:17px}
.price{font-size:18px;font-weight:900}
.product-card p{margin:5px 0 0;color:var(--muted)}
.stats{display:flex;flex-wrap:wrap;gap:12px;margin-top:25px}
.stat{padding:7px 13px;border-left:4px solid var(--ink)}
.stat strong{display:block;color:#000;font-size:20px}
.stat span{color:var(--muted);font-size:12px}

/* Fixed PDF CTA */
.pdf-cta{
  position:fixed;left:50%;bottom:calc(10px + env(safe-area-inset-bottom,0px));transform:translateX(-50%);
  z-index:2000;width:min(450px,calc(100% - 18px));min-height:58px;
  display:flex;align-items:center;justify-content:center;gap:10px;padding:10px 17px;
  border-radius:15px;background:var(--red);color:#fff;text-decoration:none;
  font-size:15px;font-weight:900;box-shadow:0 14px 35px rgba(25,32,41,.30);
}
.pdf-cta img{width:30px;height:30px}
.pdf-cta small{display:block;font-size:11px;color:rgba(255,255,255,.86)}

/* Loading and error */
.loading{display:none;margin-top:9px;color:var(--muted);font-weight:750}
.loading.show{display:block}
.error-banner{
  display:none;max-width:1120px;margin:12px auto;padding:12px 14px;border-radius:10px;
  background:#FFF1F2;color:#851D26;border:1px solid #F2C7CA;font-weight:750
}
.error-banner.show{display:block}

@media(max-width:700px){
  body{padding-bottom:90px}
  .finder-inner{padding:8px 10px}
  .finder-top{margin-bottom:6px}.finder-subtitle{display:none}
  .search-row{grid-template-columns:minmax(0,1fr) 78px;gap:6px}
  .search-box{height:50px;padding-left:10px}.search-btn{min-width:0;padding:0 8px}
  .results{max-height:calc(100dvh - 137px);padding:0 10px 14px}
  .course-result{grid-template-columns:82px minmax(0,1fr);gap:9px;align-items:start;padding:11px 10px}
  .course-actions{grid-column:1/-1;padding-left:91px}
  .course-action{flex:1}
  .page{padding:12px}.cover{padding:18px}
  .brand img{width:62px;height:62px}.brand-name{font-size:23px}.brand-tagline{font-size:10px}
  h1{font-size:32px}.hero p{font-size:15px}
  .products{gap:8px}.product-card{padding:8px}
  .product-image{height:180px}
  .product-card h2{font-size:13px;line-height:1.2;margin-top:11px}
  .product-card p{display:none}.price{font-size:15px}
}
@media(max-width:390px){
  .course-actions{padding-left:0}.course-action.secondary{display:none}
}
@media print{
  .finder,.pdf-cta{display:none!important}body{padding-bottom:0}
}


/* Full catalogue directory */
.catalogue-section{
  margin-top:26px;
}
.catalogue-heading{
  display:flex;
  align-items:flex-end;
  justify-content:space-between;
  gap:18px;
  margin-bottom:14px;
  padding:20px;
  border-radius:14px;
  background:var(--ink);
  color:#fff;
}
.catalogue-heading h2{
  margin:4px 0 4px;
  color:#fff;
  font-size:26px;
}
.catalogue-heading p{
  margin:0;
  color:#D7DDE2;
  font-size:14px;
}
.catalogue-heading .eyebrow{
  color:#D7DDE2;
}
.catalogue-toggle{
  flex:0 0 auto;
  min-height:40px;
  padding:8px 13px;
  border:1px solid rgba(255,255,255,.35);
  border-radius:9px;
  background:#fff;
  color:var(--ink);
  font-weight:900;
}
.catalogue-directory{
  display:block;
}
.catalogue-directory.hidden{
  display:none;
}
.catalogue-loading{
  padding:24px;
  text-align:center;
  color:var(--muted);
  font-weight:800;
}
.programme-block{
  margin:0 0 18px;
  border:1px solid var(--line);
  border-radius:13px;
  overflow:hidden;
  background:#fff;
}
.programme-headline{
  display:flex;
  justify-content:space-between;
  gap:12px;
  align-items:center;
  padding:13px 15px;
  background:var(--ink);
  color:#fff;
}
.programme-headline h3{
  margin:0;
  color:#fff;
  font-size:17px;
  line-height:1.25;
}
.programme-headline span{
  flex:0 0 auto;
  font-size:12px;
  font-weight:800;
  color:#D9DEE3;
}
.catalogue-table{
  width:100%;
  border-collapse:collapse;
  table-layout:fixed;
}
.catalogue-table th{
  background:#EEF1F3;
  color:#000;
  text-align:left;
  font-size:12px;
  padding:8px 10px;
  border-bottom:1px solid var(--line);
}
.catalogue-table th:nth-child(1){width:20%}
.catalogue-table th:nth-child(2){width:55%}
.catalogue-table th:nth-child(3){width:25%}
.catalogue-table td{
  padding:8px 10px;
  border-bottom:1px solid #E9ECEF;
  vertical-align:top;
  font-size:12px;
}
.catalogue-table tr:last-child td{
  border-bottom:0;
}
.catalogue-code{
  font-weight:900;
  color:#000;
  white-space:nowrap;
}
.catalogue-course-title{
  color:#111;
  font-weight:750;
}
.catalogue-section-label td{
  background:#F7F8F9;
  color:var(--slate);
  font-weight:900;
  text-transform:uppercase;
  letter-spacing:.03em;
}
@media(max-width:700px){
  .catalogue-heading{
    align-items:flex-start;
    flex-direction:column;
    padding:15px;
  }
  .catalogue-heading h2{
    font-size:21px;
  }
  .catalogue-toggle{
    width:100%;
  }
  .programme-headline{
    align-items:flex-start;
  }
  .programme-headline h3{
    font-size:14px;
  }
  .catalogue-table th,
  .catalogue-table td{
    padding:7px 7px;
    font-size:11px;
  }
  .catalogue-table th:nth-child(1){width:28%}
  .catalogue-table th:nth-child(2){width:47%}
  .catalogue-table th:nth-child(3){width:25%}
}

.catalogue-loading{
  min-height:90px;
  display:flex;
  align-items:center;
  justify-content:center;
  padding:24px;
  border:1px dashed #C8CED4;
  border-radius:12px;
  background:#F8F9FA;
}
.catalogue-loading b{color:#B4232C}
