/* Navy, white, light blue, teal. Always light. */
:root {
  --navy: #0b2a4a;
  --navy-2: #12395f;
  --blue-soft: #eaf2fb;
  --blue-line: #cfe0f3;
  --teal: #0e9f8e;
  --teal-dark: #0a7d70;
  --bg: #ffffff;
  --text: #16212e;
  --muted: #6b7785;
  --line: #e3e8ee;
  --warn-bg: #fff7e6;
  --warn-text: #7a5200;
  --err: #c0392b;
}

* { box-sizing: border-box; }
html { color-scheme: light; scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 16px/1.65 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}
.wrap { max-width: 960px; margin: 0 auto; padding: 0 16px; }
main.wrap { max-width: 800px; }
a { color: var(--navy-2); text-decoration-color: var(--teal); text-underline-offset: 2px; }
a:hover { color: var(--teal-dark); }
h1, h2, h3 { color: var(--navy); }
h1 { font-size: 28px; line-height: 1.25; margin: 20px 0 8px; }
h2 { font-size: 21px; margin: 32px 0 8px; line-height: 1.3; }
.lede { color: var(--muted); margin-top: 0; font-size: 17px; }
.crumbs { font-size: 14px; color: var(--muted); margin-top: 16px; }
.more-soon { color: var(--muted); font-size: 14px; }

/* header */
.top { background: var(--navy); color: #fff; position: sticky; top: 0; z-index: 10; }
.top .wrap { padding-top: 10px; padding-bottom: 10px; display: flex; flex-wrap: wrap; align-items: center; gap: 8px 20px; }
.brand { color: #fff; text-decoration: none; font-weight: 800; font-size: 18px; display: flex; align-items: center; gap: 8px; }
.brand span { font-weight: 600; opacity: 0.85; }
.brand .brand-name { font-weight: 800; white-space: nowrap; }
.brand .logo {
  opacity: 1; display: inline-grid; place-items: center; width: 30px; height: 30px; border-radius: 8px;
  background: var(--teal); font-size: 13px; font-weight: 800; letter-spacing: 0.5px;
}
.brand:hover { color: #fff; }
.top nav { display: flex; gap: 4px; overflow-x: auto; white-space: nowrap; margin-left: auto; scrollbar-width: none; }
.top nav a { color: #dbe7f5; text-decoration: none; font-size: 14px; font-weight: 600; padding: 6px 12px; border-radius: 8px; }
.top nav a:hover { background: var(--navy-2); color: #fff; }

/* home hero: navy text panel + photo */
.hero { background: var(--navy); color: #fff; }
/* photo runs to the right edge; text lines up with the page content on wide screens */
.hero-inner { display: grid; grid-template-columns: 46% 54%; min-height: 400px; }
.hero-text {
  padding: 40px 36px 40px max(24px, calc((100vw - 960px) / 2 + 16px));
  display: flex; flex-direction: column; justify-content: center;
}
.hero-text .eyebrow { color: #7fd6cb; }
.hero h1 { color: #fff; font-size: clamp(30px, 3vw, 40px); line-height: 1.15; margin: 4px 0 12px; }
.hero-text p { color: #cfdcec; font-size: 17px; margin: 0 0 20px; }
.hero-btns { display: flex; flex-wrap: wrap; gap: 10px; }
.hero-img { display: block; position: relative; }
.hero-img img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: center 35%; display: block; }
.hero-img::before {  /* soft fade from the navy panel into the photo */
  content: ""; position: absolute; inset: 0 auto 0 0; width: 60px;
  background: linear-gradient(90deg, var(--navy), rgba(11, 42, 74, 0));
}
@media (max-width: 760px) {
  .hero-inner { grid-template-columns: 1fr; min-height: 0; }
  .hero-img { order: -1; aspect-ratio: 16 / 9; }
  #calculate { padding-top: 24px; }
  .hero-img::before { inset: auto 0 0 0; width: auto; height: 40px; background: linear-gradient(0deg, var(--navy), rgba(11, 42, 74, 0)); }
  .hero-text { padding: 20px 16px 28px; }
  .hero h1 { font-size: 29px; }
}

/* buttons */
.btn, .btn-ghost, .btn-outline, .btn-secondary {
  display: inline-block; padding: 11px 20px; border-radius: 10px; font-weight: 700; text-decoration: none;
  font-size: 15px; cursor: pointer; font-family: inherit;
}
.btn { background: var(--teal); color: #fff; }
.btn:hover { background: var(--teal-dark); color: #fff; }
.btn-ghost { border: 2px solid rgba(255, 255, 255, 0.6); color: #fff; }
.btn-ghost:hover { background: rgba(255, 255, 255, 0.12); color: #fff; }
.btn-outline { border: 2px solid var(--navy); color: var(--navy); }
.btn-outline:hover { background: var(--navy); color: #fff; }
.btn-secondary { border: 2px solid var(--navy); background: #fff; color: var(--navy); width: auto; }

/* home sections */
.eyebrow { text-transform: uppercase; letter-spacing: 1.5px; font-size: 13px; font-weight: 800; color: var(--teal); margin: 0; }
.home-section { padding: 8px 0; }
#calculate { padding-top: 32px; }
.home-section h2 { margin-top: 2px; font-size: 25px; }
.band { background: var(--blue-soft); margin: 24px -16px; padding: 24px 16px; border-radius: 16px; }
.feature {
  display: flex; gap: 14px; align-items: center; background: var(--navy); color: #fff; text-decoration: none;
  border-radius: 14px; padding: 18px; margin: 12px 0 16px;
}
.feature:hover { background: var(--navy-2); color: #fff; }
.feature strong { display: block; font-size: 18px; color: #fff; }
.feature span span { color: #cfdcec; font-size: 15px; }
.feature-icon { font-size: 30px; line-height: 1; }

/* cards & lists */
.card {
  background: var(--bg); border: 1px solid var(--line); border-top: 4px solid var(--teal);
  border-radius: 12px; padding: 16px; margin: 16px 0; box-shadow: 0 2px 8px rgba(11, 42, 74, 0.06);
}
.card-title { margin-top: 0; }
.schools, .guide-cards, .link-list { list-style: none; padding: 0; display: grid; gap: 10px; }
.schools { grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); }
.guide-cards { grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); }
.schools a, .guide-cards a, .link-list a {
  display: block; height: 100%; background: var(--bg); border: 1px solid var(--line); border-radius: 12px;
  padding: 14px 16px; text-decoration: none; color: var(--text);
  box-shadow: 0 1px 3px rgba(11, 42, 74, 0.05); transition: border-color 0.15s, transform 0.15s;
}
.schools a:hover, .guide-cards a:hover, .link-list a:hover { border-color: var(--teal); transform: translateY(-1px); }
.schools strong, .guide-cards strong, .link-list strong { color: var(--navy); display: block; font-size: 17px; }
.schools span, .guide-cards span, .link-list span { color: var(--muted); font-size: 14px; }
.schools strong::after { content: " \2192"; color: var(--teal); }

.chips { list-style: none; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.chips a {
  display: inline-block; padding: 6px 14px; border-radius: 99px; text-decoration: none;
  background: var(--blue-soft); color: var(--navy); font-weight: 600; font-size: 15px; border: 1px solid var(--blue-line);
}
.chips a:hover { background: var(--navy); color: #fff; }

.callout { background: var(--navy); color: #fff; border-radius: 16px; padding: 24px; margin: 32px 0; }
.callout h2 { margin-top: 0; color: #fff; }
.callout p { color: #cfdcec; }

/* forms */
.field { margin-bottom: 14px; }
.field label, .field legend { display: block; font-weight: 600; margin-bottom: 4px; color: var(--navy); }
.field small { color: var(--muted); display: block; margin-top: 4px; }
input[type=number], input[type=search], input[type=date], input[type=time], select {
  width: 100%; font: inherit; padding: 10px 12px; border: 1px solid #cdd6e0; border-radius: 8px;
  background: #fff; color: var(--text);
}
input:focus, select:focus { outline: 2px solid var(--teal); outline-offset: 1px; border-color: var(--teal); }
fieldset { border: 0; padding: 0; margin: 0 0 14px; }
.grades { display: grid; grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); gap: 8px; }
.radio { display: inline-flex; gap: 6px; align-items: center; margin-right: 16px; font-weight: 400; color: var(--text); }
input[type=radio], input[type=checkbox] { accent-color: var(--teal); }
button[type=submit] {
  width: 100%; font: inherit; font-weight: 700; padding: 13px; border: 0; border-radius: 10px;
  background: var(--teal); color: #fff; cursor: pointer;
}
button[type=submit]:hover { background: var(--teal-dark); }
.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.subject-row { display: flex; gap: 10px; align-items: center; margin-bottom: 8px; }
.subject-row select, .subject-row .fixed { flex: 1; }
.subject-row .fixed { padding: 10px 12px; background: var(--blue-soft); border-radius: 8px; font-weight: 600; }
.hard { display: inline-flex !important; gap: 6px; align-items: center; font-weight: 400 !important; font-size: 14px; white-space: nowrap; color: var(--text) !important; margin: 0 !important; }

/* calculator result */
.result { margin-top: 16px; padding: 16px; background: var(--blue-soft); border-radius: 10px; }
.result.error { color: var(--err); font-weight: 600; }
.share-wa { display: inline-block; margin-top: 14px; padding: 10px 16px; background: #25D366; color: #fff; font-weight: 700;
  border-radius: 8px; text-decoration: none; }
.share-wa:hover { background: #1EBE5A; color: #fff; }
.score { font-size: 44px; font-weight: 800; line-height: 1; color: var(--navy); }
.score span { font-size: 20px; color: var(--muted); font-weight: 600; }
.pct { color: var(--muted); margin-top: 4px; }
.result table { width: 100%; margin-top: 12px; border-collapse: collapse; }
.result td { padding: 6px 0; border-bottom: 1px solid var(--blue-line); }
.result td:last-child { text-align: right; font-variant-numeric: tabular-nums; }

/* timetable result */
.plan { margin-top: 8px; }
.plan-head { display: flex; gap: 16px; align-items: center; background: var(--navy); color: #fff; border-radius: 14px; padding: 16px; }
.plan-head p { margin: 0; color: #cfdcec; }
.plan-head .phase { color: #7fd6cb; font-weight: 800; }
.days-left { font-size: 44px; font-weight: 800; line-height: 1; text-align: center; min-width: 90px; }
.days-left span { display: block; font-size: 12px; font-weight: 600; color: #cfdcec; }
.per-subject { list-style: none; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; margin: 12px 0; }
.per-subject li { background: var(--blue-soft); border-radius: 99px; padding: 4px 12px; font-size: 14px; }
.week { display: grid; gap: 10px; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); }
.day { border: 1px solid var(--line); border-radius: 12px; padding: 12px; }
.day h3 { margin: 0 0 6px; font-size: 16px; }
.day ul { list-style: none; padding: 0; margin: 0; }
.day li { padding: 5px 0; border-bottom: 1px solid var(--line); font-size: 15px; }
.day li:last-child { border-bottom: 0; }
.day li span { color: var(--muted); font-size: 13px; display: block; font-variant-numeric: tabular-nums; }
.day li.practice { color: var(--teal-dark); font-weight: 700; }
.day .rest { color: var(--muted); margin: 0; }
.tip { color: var(--muted); }

/* content */
.formula { font-weight: 700; font-size: 18px; }
.steps li, .timeline li { margin-bottom: 8px; }
.timeline { padding-left: 22px; }
.timeline li::marker { color: var(--teal); font-weight: 800; }
.subjects { list-style: none; padding: 0; margin: 0; }
.subjects li { padding: 8px 0; border-bottom: 1px solid var(--line); font-size: 17px; }
.subjects li:last-child { border-bottom: 0; }
.subjects .tag { font-size: 12px; font-weight: 700; color: var(--navy); background: var(--blue-soft); padding: 2px 8px; border-radius: 99px; margin-left: 6px; }
.checklist { list-style: none; padding: 0; }
.checklist li { padding-left: 28px; position: relative; margin-bottom: 8px; }
.checklist li::before { content: "\2713"; position: absolute; left: 0; color: var(--teal); font-weight: 800; }
.banned li::marker { content: "\2715  "; color: var(--err); font-weight: 800; }
.badge { display: inline-block; font-size: 13px; font-weight: 700; padding: 2px 8px; border-radius: 99px; margin-right: 6px; }
.badge.official { background: var(--teal); color: #fff; }
.badge.reported, .badge.unverified { background: var(--warn-bg); color: var(--warn-text); }
.warn { background: var(--warn-bg); color: var(--warn-text); padding: 10px 12px; border-radius: 8px; }
.warn small { display: block; margin-top: 6px; }
.sources li { word-break: break-all; font-size: 14px; }
.others { columns: 2; }
.course-group h2 { font-size: 17px; margin-bottom: 4px; }
.course-list { columns: 2; padding-left: 18px; margin-top: 4px; }
.course-list li { margin-bottom: 4px; }
#no-match { color: var(--muted); }

/* subject checker results */
.match-list { list-style: none; padding: 0; margin: 8px 0; display: grid; gap: 6px; }
.match-list li { background: #fff; border-radius: 8px; padding: 8px 12px; display: flex; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.match-list a { font-weight: 700; }
.match-list span { color: var(--muted); font-size: 13px; }

/* Updates button in the menu (right end) + red "new" dot */
.top nav a.nav-updates { background: var(--teal); color: #fff; position: relative; }
.top nav a.nav-updates:hover { background: var(--teal-dark); }
.new-dot {
  display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: #ff4d4f;
  margin-left: 6px; vertical-align: middle; box-shadow: 0 0 0 2px var(--teal);
}

@media (max-width: 760px) {
  /* phones: pin Updates to the top-right corner beside the logo instead of the end of the scrolling menu */
  .top .wrap { position: relative; }
  .top nav a.nav-updates { position: absolute; top: 10px; right: 16px; padding: 5px 10px; font-size: 13px; }
  .brand { font-size: 16px; max-width: calc(100% - 110px); }
}

/* home: latest updates strip under the photo */
.latest-strip { background: var(--blue-soft); border-bottom: 1px solid var(--blue-line); }
.latest-strip .wrap { padding-top: 14px; padding-bottom: 14px; }
.latest-strip ul { list-style: none; padding: 0; margin: 6px 0; display: grid; gap: 6px; }
.latest-strip li a { font-weight: 700; color: var(--navy); }
.latest-strip li span { color: var(--muted); font-size: 13px; margin-left: 8px; }
.latest-strip .see-all { font-weight: 700; font-size: 14px; }

/* updates */
.update-meta { color: var(--muted); }
.post-date { display: inline-block; margin: 16px 0 0; background: var(--blue-soft); color: var(--navy);
  font-weight: 700; font-size: 14px; padding: 3px 10px; border-radius: 99px; }
.facts { width: 100%; border-collapse: collapse; margin: 12px 0; }
.facts th, .facts td { text-align: left; vertical-align: top; padding: 8px 0; border-top: 1px solid var(--line); }
.facts th { width: 34%; padding-right: 12px; color: var(--navy); font-weight: 700; }
.facts .quote { display: block; color: var(--muted); font-size: 13px; font-style: italic; margin-top: 2px; }
.badge.closed { background: #fde2e1; color: #9b1c1c; font-size: 14px; vertical-align: middle; }

/* message of the day */
.motd { background: linear-gradient(135deg, var(--teal) 0%, var(--teal-dark) 100%); color: #fff; border-radius: 16px; padding: 20px 22px; margin: 28px 0; }
.motd .eyebrow { color: #d6f5f0; }
.motd-text { font-size: 21px; font-weight: 700; line-height: 1.4; margin: 6px 0 10px; color: #fff; }
.motd a { color: #fff; font-weight: 700; }

/* university directory */
.uni-cards { list-style: none; padding: 0; display: grid; gap: 10px; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); }
.uni-card { border: 1px solid var(--line); border-radius: 12px; padding: 14px 16px; display: flex; flex-direction: column; gap: 2px; box-shadow: 0 1px 3px rgba(11, 42, 74, 0.05); }
.uni-card strong { color: var(--navy); font-size: 18px; }
.uni-card > span:nth-of-type(1) { color: var(--text); font-size: 14px; }
.uni-meta { color: var(--muted); font-size: 13px; }
.uni-actions { display: flex; flex-wrap: wrap; gap: 6px 12px; margin-top: 8px; font-size: 14px; font-weight: 600; }
.calc-link { color: var(--teal-dark); }
.soon, .no-site { color: var(--muted); font-weight: 400; font-size: 13px; }
.filters { display: flex; flex-wrap: wrap; gap: 6px; margin: 10px 0 4px; }
.filter-btn {
  font: inherit; font-size: 14px; font-weight: 600; padding: 6px 12px; border-radius: 99px; cursor: pointer;
  background: var(--blue-soft); color: var(--navy); border: 1px solid var(--blue-line);
}
.filter-btn[aria-pressed="true"] { background: var(--navy); color: #fff; border-color: var(--navy); }
.uni-count { color: var(--muted); font-size: 14px; margin: 4px 0; }
.uni-list { list-style: none; padding: 0; margin: 0; border-top: 1px solid var(--line); }
.uni-list li { display: grid; grid-template-columns: 1fr auto; gap: 0 12px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.uni-list .uni-name { font-weight: 600; }
.uni-list .uni-meta { grid-column: 1; }
.uni-list li > a, .uni-list li > .no-site { grid-column: 2; grid-row: 1 / span 2; align-self: center; font-size: 14px; white-space: nowrap; }
.uni-list li[hidden] { display: none; }

/* footer */
footer { background: var(--navy); color: #b9c8da; font-size: 14px; margin-top: 56px; }
footer .wrap { padding-top: 28px; padding-bottom: 28px; }
.foot-cols { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 20px; }
.foot-cols a { display: block; color: #dbe7f5; text-decoration: none; margin-bottom: 6px; }
.foot-cols a:hover { color: #7fd6cb; }
.foot-brand { color: #fff; font-weight: 800; font-size: 17px; margin: 0 0 4px; }
.foot-head { color: #fff; font-weight: 700; margin: 0 0 8px; }
.disclaimer { border-top: 1px solid var(--navy-2); padding-top: 16px; margin-top: 20px; }
.disclaimer strong { color: #fff; }
.copy { margin-bottom: 0; }

@media (max-width: 600px) {
  .others, .course-list { columns: 1; }
  .foot-cols { grid-template-columns: 1fr 1fr; }
  .foot-cols > div:first-child { grid-column: 1 / -1; }
  .two-col { grid-template-columns: 1fr; }
  .top nav { margin-left: 0; width: 100%; }
}

@media print {
  .top, footer, form, .hero, #timetable ~ section, .btn-secondary, .crumbs, .lede { display: none !important; }
  .day { break-inside: avoid; }
}
