/* MCS College & Guidance — shared styles */
:root {
  /* Official MCS colors: navy #1e2c5d (primary), carolina #b8ddf7 and yellow #f9d345 (secondary) */
  --navy: #1e2c5d;
  --navy-deep: #151f45;     /* darker shade of the official navy, for footer and hero depth */
  --carolina: #b8ddf7;
  --carolina-soft: #eaf5fd;
  --yellow: #f9d345;
  --cream: #f6f8fb;         /* page background */
  --ink: #1d2433;
  --muted: #566074;
  --line: #dde4ee;
  --card: #ffffff;
  --radius: 14px;
  --shadow: 0 1px 2px rgba(30, 44, 93, .06), 0 6px 20px rgba(30, 44, 93, .07);
  --serif: "Lora", Georgia, "Times New Roman", serif;
  --sans: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.6;
  color: var(--ink);
  background: var(--cream);
}
img { max-width: 100%; display: block; }
a { color: var(--navy); text-underline-offset: 3px; }
a:hover { color: var(--navy-deep); text-decoration-color: var(--yellow); text-decoration-thickness: 2px; }
h1, h2, h3 { font-family: var(--serif); color: var(--navy-deep); line-height: 1.25; margin: 0 0 .5em; }
h1 { font-size: clamp(2rem, 4.5vw, 3rem); }
h2 { font-size: clamp(1.5rem, 3vw, 2rem); }
h3 { font-size: 1.2rem; }
p { margin: 0 0 1em; }
.wrap { width: min(1100px, 92vw); margin: 0 auto; }
.narrow { width: min(820px, 92vw); margin: 0 auto; }
.skip { position: absolute; left: -999px; top: 0; background: #fff; padding: .5em 1em; z-index: 100; }
.skip:focus { left: 1em; }

/* ---------- Header / nav ---------- */
.site-header {
  background: var(--navy);
  color: #fff;
  position: sticky; top: 0; z-index: 50;
  border-bottom: 3px solid var(--yellow);
}
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: 1rem; min-height: 68px; }
.brand { display: flex; align-items: center; gap: .75rem; color: #fff; text-decoration: none; }
.brand:hover { color: #fff; }
.brand-logo { width: 52px; height: 52px; flex: none; }
.brand-text { line-height: 1.15; }
.brand-text strong { display: block; font-family: var(--serif); font-size: 1.1rem; letter-spacing: .01em; }
.brand-text span { font-size: .72rem; letter-spacing: .1em; white-space: nowrap; text-transform: uppercase; opacity: .8; }

.nav-toggle {
  display: none; background: none; border: 1px solid rgba(255,255,255,.35); color: #fff;
  border-radius: 8px; padding: .45rem .8rem; font: inherit; font-size: .9rem; cursor: pointer;
}
.main-nav > ul { list-style: none; display: flex; gap: .15rem; margin: 0; padding: 0; }
.main-nav li { position: relative; }
.main-nav a, .main-nav .nav-label {
  display: block; padding: .55rem .7rem; color: #fff; text-decoration: none;
  font-size: .9rem; font-weight: 500; border-radius: 8px; white-space: nowrap;
}
.main-nav > ul > li > a:hover, .main-nav > ul > li:hover > .nav-label,
.main-nav > ul > li:focus-within > .nav-label { background: rgba(255,255,255,.1); color: #fff; }
.main-nav .current > a, .main-nav .current > .nav-label { box-shadow: inset 0 -2px 0 var(--yellow); }
.has-sub > .nav-label::after { content: " ▾"; font-size: .7em; opacity: .8; }
.sub {
  list-style: none; margin: 0; padding: .4rem; position: absolute; left: 0; top: 100%;
  min-width: 230px; background: #fff; border-radius: 10px; box-shadow: var(--shadow);
  display: none; border: 1px solid var(--line);
}
.has-sub:hover > .sub, .has-sub:focus-within > .sub { display: block; }
.sub a { color: var(--ink); font-weight: 400; }
.sub a:hover { background: var(--carolina-soft); color: var(--navy-deep); }
.sub .here { font-weight: 600; color: var(--navy); }

@media (max-width: 960px) {
  .nav-toggle { display: inline-block; }
  .main-nav { display: none; position: absolute; left: 0; right: 0; top: 100%; background: var(--navy);
    max-height: calc(100vh - 70px); overflow-y: auto; border-bottom: 3px solid var(--yellow); }
  .main-nav.open { display: block; }
  .main-nav > ul { flex-direction: column; padding: .5rem 4vw 1rem; }
  .sub { position: static; display: block; background: transparent; box-shadow: none; border: 0; padding: 0 0 .3rem 1rem; }
  .sub a { color: rgba(255,255,255,.8); }
  .sub a:hover { background: rgba(255,255,255,.08); color: #fff; }
  .has-sub > .nav-label::after { content: ""; }
}

/* ---------- Hero ---------- */
.hero {
  background:
    radial-gradient(1200px 400px at 85% -10%, rgba(184,221,247,.20), transparent 60%),
    linear-gradient(160deg, var(--navy) 0%, var(--navy-deep) 100%);
  color: #fff; padding: 4.5rem 0 4rem;
}
.hero h1 { color: #fff; }
.hero .eyebrow { color: var(--yellow); }
.hero p.lead { font-size: 1.2rem; max-width: 46ch; opacity: .92; }
.eyebrow { display: inline-block; font-size: .78rem; font-weight: 600; letter-spacing: .16em; text-transform: uppercase; color: var(--navy); margin-bottom: .6rem; }
.eyebrow::before { content: ""; display: inline-block; width: 1.4rem; height: 3px; background: var(--yellow); vertical-align: middle; margin: -2px .55rem 0 0; border-radius: 2px; }
.hero-actions { display: flex; flex-wrap: wrap; gap: .75rem; margin-top: 1.5rem; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: .45rem;
  padding: .7rem 1.15rem; border-radius: 999px; font-weight: 600; font-size: .95rem;
  text-decoration: none; border: 2px solid transparent; transition: transform .12s ease, background .12s ease;
}
.btn:hover { transform: translateY(-1px); }
.btn-gold { background: var(--yellow); color: var(--navy); }
.btn-gold:hover { background: #fbe07a; color: var(--navy); }
.btn-navy { background: var(--navy); color: #fff; }
.btn-navy:hover { background: var(--navy-deep); color: #fff; }
.btn-ghost { border-color: rgba(255,255,255,.6); color: #fff; }
.btn-ghost:hover { background: rgba(255,255,255,.1); color: #fff; }
.btn-outline { border-color: var(--navy); color: var(--navy); background: #fff; }
.btn-outline:hover { background: var(--navy); color: #fff; }
.btn-row { display: flex; flex-wrap: wrap; gap: .6rem; margin: 1rem 0 0; }

/* ---------- Sections ---------- */
section { padding: 3.5rem 0; }
section.tint { background: #fff; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.section-head { margin-bottom: 1.75rem; }
.section-head p { color: var(--muted); max-width: 60ch; }

.grid { display: grid; gap: 1.25rem; }
.grid-2 { grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); }
.grid-3 { grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }
.grid-pairs { grid-template-columns: repeat(auto-fit, minmax(min(100%, 420px), 1fr)); }  /* two across on desktop, one on phones */
.grid-4 { grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }

.card {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 1.4rem 1.5rem; box-shadow: var(--shadow);
}
.card h3 { margin-bottom: .4rem; }
.card ul { margin: 0; padding-left: 1.1rem; }
.card li { margin: .25rem 0; }
.tag { display: inline-block; font-size: .72rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase;
  color: var(--navy); background: var(--carolina); padding: .2rem .55rem; border-radius: 6px; margin-bottom: .6rem; }

.grade-card { display: flex; flex-direction: column; text-decoration: none; color: inherit; transition: transform .15s ease, box-shadow .15s ease; }
.grade-card:hover { transform: translateY(-3px); color: inherit; box-shadow: 0 10px 30px rgba(30,44,93,.14); }
.grade-card .num { font-family: var(--serif); font-size: 2.4rem; color: var(--navy); line-height: 1; margin-bottom: .3rem; }
.grade-card .theme { font-family: var(--serif); font-size: 1.25rem; color: var(--navy-deep); font-weight: 600; }
.grade-card p { color: var(--muted); font-size: .95rem; margin: .5rem 0 1rem; flex: 1; }
.grade-card .go { font-weight: 600; color: var(--navy); font-size: .9rem; }

.mission { font-family: var(--serif); font-size: clamp(1.15rem, 2.2vw, 1.4rem); color: var(--navy-deep); line-height: 1.55; border-left: 5px solid var(--yellow); padding-left: 1.25rem; }

/* ---------- Dates ---------- */
.dates { list-style: none; margin: 0; padding: 0; }
.dates li { display: grid; grid-template-columns: 7.5rem 1fr; gap: 1rem; padding: .85rem 0; border-bottom: 1px solid var(--line); align-items: baseline; }
.dates li:last-child { border-bottom: 0; }
.dates .when { font-weight: 700; color: var(--navy); font-size: .92rem; }
.dates .when small { display: block; font-weight: 500; color: var(--muted); font-size: .8rem; }
.callout { background: var(--carolina-soft); border: 1px solid var(--carolina); border-radius: var(--radius); padding: 1.4rem 1.6rem; }
.callout h2, .callout h3 { margin-top: 0; }

/* ---------- Steps (junior page) ---------- */
.steps-nav { display: flex; flex-wrap: wrap; gap: .5rem; margin-top: 1.25rem; }
.steps-nav a { background: rgba(255,255,255,.1); color: #fff; padding: .4rem .8rem; border-radius: 999px; text-decoration: none; font-size: .88rem; border: 1px solid rgba(255,255,255,.25); }
.steps-nav a:hover { background: var(--yellow); color: var(--navy); border-color: var(--yellow); }
.step { scroll-margin-top: 90px; }
.step-head { display: flex; gap: 1rem; align-items: flex-start; margin-bottom: 1rem; }
.step-num { flex: none; width: 46px; height: 46px; border-radius: 50%; background: var(--navy); color: #fff; display: grid; place-items: center; font-family: var(--serif); font-weight: 700; font-size: 1.25rem; }
.step-head h2 { margin: .25rem 0 0; }

details {
  background: #fff; border: 1px solid var(--line); border-radius: 12px; margin: .75rem 0; overflow: hidden;
}
details > summary {
  cursor: pointer; list-style: none; padding: 1rem 3rem 1rem 1.25rem; font-weight: 600; color: var(--navy-deep); position: relative;
}
details > summary::-webkit-details-marker { display: none; }
details > summary::after { content: "+"; position: absolute; right: 1.2rem; top: 50%; transform: translateY(-50%); font-size: 1.4rem; color: var(--navy); font-weight: 400; }
details[open] > summary::after { content: "–"; }
details[open] > summary { border-bottom: 1px solid var(--line); }
details .inner { padding: 1rem 1.25rem 1.1rem; }
details .inner ul { padding-left: 1.2rem; margin: 0 0 .75rem; }
details .inner li { margin: .35rem 0; }

table.dates-table { width: 100%; border-collapse: collapse; font-size: .95rem; margin: .25rem 0 .75rem; }
.dates-table th, .dates-table td { text-align: left; padding: .55rem .6rem; border-bottom: 1px solid var(--line); }
.dates-table th { font-size: .78rem; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); font-weight: 600; }
.dates-table td:first-child { font-weight: 600; color: var(--navy-deep); }

.worksheets { counter-reset: ws; display: grid; gap: .75rem; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); margin: 1rem 0; }
.ws { display: flex; flex-direction: column; background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 1.1rem 1.2rem; }
.ws .n { font-family: var(--serif); background: var(--yellow); color: var(--navy); width: 2rem; height: 2rem; border-radius: 50%; display: grid; place-items: center; font-size: 1.1rem; font-weight: 700; line-height: 1; }
.ws h3 { font-size: 1.05rem; margin: .35rem 0 .3rem; }
.ws p { font-size: .92rem; color: var(--muted); flex: 1; margin-bottom: .8rem; }
.ws a { font-weight: 600; font-size: .9rem; }
.credit { font-size: .85rem; color: var(--muted); }

.checklist { list-style: none; padding: 0; margin: 0; }
.checklist li { display: flex; gap: .75rem; align-items: flex-start; padding: .6rem 0; border-bottom: 1px dashed var(--carolina); }
.checklist li:last-child { border-bottom: 0; }
.checklist input { width: 1.15rem; height: 1.15rem; margin-top: .3rem; accent-color: var(--navy); flex: none; }
.note { font-size: .85rem; color: var(--muted); }
.faith { font-family: var(--serif); font-style: italic; color: var(--navy-deep); font-size: 1.1rem; }

/* ---------- Footer ---------- */
.site-footer { background: var(--navy-deep); color: rgba(255,255,255,.85); padding: 2.5rem 0; font-size: .92rem; }
.site-footer a { color: #fff; }
.site-footer a:hover { color: var(--yellow); }
.footer-grid { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 1.5rem; }
.footer-grid strong { font-family: var(--serif); color: #fff; font-size: 1.05rem; }

@media print {
  .site-header, .site-footer, .btn-row, .steps-nav, .hero-actions { display: none !important; }
  .hero { background: none; color: var(--ink); padding: 1rem 0; }
  .hero h1, .hero p.lead { color: var(--ink); }
  details { border: 0; }
  details > summary::after { content: ""; }
  section { padding: 1rem 0; }
}

/* ---------- Time Commitment Estimator ---------- */
.est-row { display: flex; align-items: center; justify-content: space-between; gap: .75rem; padding: .4rem 0; border-bottom: 1px solid var(--line); font-size: .95rem; }
.est-row:last-of-type { border-bottom: 0; }
.est-row span { flex: 1; }
.est-row select, .est-row input { font: inherit; font-size: .92rem; padding: .35rem .5rem; border: 1px solid #c8d2e0; border-radius: 8px; background: #fff; color: var(--ink); }
.est-row select { max-width: 60%; }
.est-row input { width: 5rem; text-align: right; }
.est-row small { color: var(--muted); }
.est-results { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 1rem; margin-top: 1.25rem; }
.est-stat { background: var(--navy); color: #fff; border-radius: var(--radius); padding: 1.1rem 1.25rem; }
.est-num { display: block; font-family: var(--serif); font-size: 2.2rem; font-weight: 700; color: var(--yellow); line-height: 1.1; }
.est-label { font-size: .9rem; opacity: .9; }
.est-message { margin-top: 1rem; font-weight: 600; color: var(--navy); }

/* AP exam schedule tables */
.ap-schedule td { vertical-align: top; line-height: 1.45; }
.ap-schedule td:first-child { white-space: nowrap; }
.ap-schedule td:first-child small { display: block; font-weight: 400; color: var(--muted); font-size: .8rem; }
.ap-schedule .ap-exam { display: block; }
.ap-schedule .ap-exam + .ap-exam { margin-top: .45rem; }
@media (max-width: 600px) {
  .ap-schedule thead { display: none; }
  .ap-schedule, .ap-schedule tbody, .ap-schedule tr, .ap-schedule td { display: block; width: 100%; }
  .ap-schedule tr { padding: .75rem 0; border-bottom: 1px solid var(--line); }
  .ap-schedule td { border-bottom: 0; padding: .2rem 0; }
  .ap-schedule td:first-child { font-size: 1.05rem; }
  .ap-schedule td:first-child small { display: inline; margin-left: .4rem; }
  .ap-schedule td[data-label] { display: grid; grid-template-columns: 5.5rem 1fr; column-gap: .5rem; }
  .ap-schedule td[data-label]::before { content: attr(data-label); grid-row: 1 / span 10; font-size: .72rem; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); font-weight: 600; padding-top: .2rem; }
  .ap-schedule td[data-label] .ap-exam { grid-column: 2; }
  .ap-schedule .ap-exam + .ap-exam { margin-top: .25rem; }
}

/* Current page in Academy sub-navigation */
.steps-nav a[aria-current="page"] { background: var(--yellow); border-color: var(--yellow); color: var(--navy-deep); }
