/* Mustang Counselor Library — brand styles
   Colors pulled from Mustang branding: green #1a6635, orange #f07820 */
:root {
  --green: #1a6635;
  --green-dark: #0f3d1f;
  --green-light: #e8f5ec;
  --orange: #f07820;
  --orange-dark: #af560f;
  --orange-hover: #f5964d;
  --orange-light: #fef3e8;
  --ink: #1c2620;
  --muted: #5b6b61;
  --line: #dfe7e1;
  --bg: #f6f9f7;
  --white: #ffffff;
  --shadow: 0 2px 4px rgba(15, 61, 31, .06), 0 8px 24px rgba(15, 61, 31, .08);
  --radius: 14px;
}

* { box-sizing: border-box; }

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 999;
  background: var(--green-dark);
  color: #fff;
  font-weight: 700;
  text-decoration: none;
  padding: 12px 18px;
  border-radius: 0 0 8px 0;
}
.skip-link:focus {
  left: 0;
}

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  color: var(--ink);
  background: var(--bg);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--green); }

img { max-width: 100%; }

.container { width: min(1100px, 92%); margin: 0 auto; }

/* ---------- Header ---------- */
tr[id] { scroll-margin-top: 90px; }
tr[id]:target { background: var(--green-light); }

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--white);
  border-bottom: 3px solid var(--green);
  box-shadow: 0 1px 0 rgba(0,0,0,.02);
}
.site-header .container {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px 0;
}
.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: var(--ink);
}
.brand img { width: 44px; height: 44px; object-fit: contain; }
.brand-text { display: flex; flex-direction: column; line-height: 1.15; }
.brand-title { font-weight: 800; font-size: 1.02rem; letter-spacing: .2px; }
.brand-sub { font-size: .74rem; color: var(--muted); font-weight: 600; text-transform: uppercase; letter-spacing: .6px; }
.year-badge {
  flex-shrink: 0;
  font-size: .72rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .5px;
  color: var(--green-dark);
  background: var(--green-light);
  border: 1.5px solid #cde0d2;
  padding: 5px 12px;
  border-radius: 999px;
  white-space: nowrap;
}
.header-spacer { flex: 1; }
.translate-widget {
  flex-shrink: 0;
  min-width: 130px;
  font-size: .8rem;
}
.header-nav a {
  text-decoration: none;
  font-weight: 700;
  font-size: .92rem;
  color: var(--green-dark);
  padding: 8px 12px;
  border-radius: 8px;
}
.header-nav a:hover { background: var(--green-light); }

/* ---------- Hero ---------- */
.hero {
  background: linear-gradient(135deg, var(--green) 0%, var(--green-dark) 100%);
  color: #fff;
  padding: 54px 0 60px;
  position: relative;
  overflow: hidden;
}
.hero::after {
  content: "";
  position: absolute;
  right: -60px; top: -60px;
  width: 320px; height: 320px;
  background: radial-gradient(circle, rgba(240,120,32,.28), transparent 70%);
  pointer-events: none;
}
.hero-logo { width: 84px; height: 84px; margin-bottom: 14px; filter: drop-shadow(0 4px 10px rgba(0,0,0,.25)); }
.hero h1 { margin: 0 0 8px; font-size: clamp(1.8rem, 4.5vw, 2.7rem); font-weight: 800; letter-spacing: -.5px; }
.hero p { margin: 0; font-size: 1.08rem; max-width: 640px; color: rgba(255,255,255,.92); }
.hero .accent-bar { width: 72px; height: 5px; background: var(--orange); border-radius: 3px; margin: 18px 0 0; }

/* ---------- Search ---------- */
.search-wrap { margin: 26px 0 6px; }
.search-box {
  width: 100%;
  padding: 15px 18px;
  font-size: 1rem;
  border: 2px solid var(--line);
  border-radius: 12px;
  background: #fff;
  box-shadow: var(--shadow);
  transition: border-color .15s;
}
.search-box:focus { outline: none; border-color: var(--orange-dark); }
.section-label {
  text-transform: uppercase;
  letter-spacing: .8px;
  font-size: .78rem;
  font-weight: 800;
  color: var(--orange-dark);
  margin: 34px 0 4px;
}

/* ---------- Card grid ---------- */
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 18px;
  margin: 18px 0 10px;
}
.card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 20px 20px 18px;
  text-decoration: none;
  color: var(--ink);
  box-shadow: var(--shadow);
  transition: transform .12s ease, box-shadow .12s ease, border-color .12s;
  display: flex;
  flex-direction: column;
  gap: 8px;
  position: relative;
  overflow: hidden;
}
.card::before {
  content: "";
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 5px;
  background: var(--orange);
  opacity: 0;
  transition: opacity .12s;
}
.card:hover { transform: translateY(-3px); box-shadow: 0 6px 12px rgba(15,61,31,.1), 0 16px 34px rgba(15,61,31,.12); border-color: #cfe0d5; }
.card:hover::before { opacity: 1; }
.card-icon { font-size: 1.7rem; }
.card-title { font-weight: 800; font-size: 1.08rem; color: var(--green-dark); }
.card-desc { font-size: .9rem; color: var(--muted); flex: 1; }
.card-tag {
  align-self: flex-start;
  font-size: .7rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .5px;
  color: var(--green-dark);
  background: var(--green-light);
  padding: 4px 10px;
  border-radius: 999px;
}
.card-tag.tag-forms { color: var(--orange-dark); background: var(--orange-light); }
.no-results { color: var(--muted); padding: 20px 0; display: none; }

/* ---------- Detail pages ---------- */
.page-hero {
  background: linear-gradient(135deg, var(--green) 0%, var(--green-dark) 100%);
  color: #fff;
  padding: 30px 0 34px;
}
.breadcrumb { font-size: .85rem; margin-bottom: 10px; }
.breadcrumb a { color: rgba(255,255,255,.85); text-decoration: none; font-weight: 600; }
.breadcrumb a:hover { text-decoration: underline; }
.breadcrumb span { color: rgba(255,255,255,.8); }
.page-hero h1 { margin: 0; font-size: clamp(1.5rem, 4vw, 2.1rem); font-weight: 800; }
.page-hero .lede { margin: 8px 0 0; color: rgba(255,255,255,.9); max-width: 680px; }

.content { padding: 34px 0 20px; }
.content h2 {
  font-size: 1.3rem;
  color: var(--green-dark);
  margin: 30px 0 10px;
  padding-bottom: 6px;
  border-bottom: 2px solid var(--green-light);
}
.content h3 { font-size: 1.05rem; color: var(--green-dark); margin: 20px 0 6px; }
.content p, .content li { font-size: 1rem; }
.content ul, .content ol { padding-left: 22px; }
.content li { margin: 6px 0; }

.card-panel {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 22px 24px;
  box-shadow: var(--shadow);
  margin: 18px 0;
}

/* Callout / official link boxes */
.callout {
  border-left: 5px solid var(--orange);
  background: var(--orange-light);
  border-radius: 10px;
  padding: 16px 18px;
  margin: 18px 0;
}
.callout.info { border-left-color: var(--green); background: var(--green-light); }
.callout strong { color: var(--green-dark); }

.btn {
  display: inline-block;
  background: var(--orange);
  color: var(--ink);
  text-decoration: none;
  font-weight: 800;
  padding: 11px 18px;
  border-radius: 10px;
  box-shadow: 0 3px 8px rgba(240,120,32,.3);
  transition: background .12s, transform .1s;
}
.btn:hover { background: var(--orange-hover); transform: translateY(-1px); }
.btn.green { background: var(--green); color: #fff; box-shadow: 0 3px 8px rgba(26,102,53,.3); }
.btn.green:hover { background: var(--green-dark); }
.btn-row { display: flex; flex-wrap: wrap; gap: 12px; margin: 16px 0; }

/* Quick facts table */
.facts { width: 100%; border-collapse: collapse; margin: 12px 0; }
.facts th, .facts td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--line); font-size: .95rem; vertical-align: top; }
.facts th { background: var(--green-light); color: var(--green-dark); font-weight: 800; width: 42%; }
.facts-tight th { width: 1%; white-space: nowrap; }
.facts tr:last-child td, .facts tr:last-child th { border-bottom: none; }

.cal-dot { display: inline-block; width: 9px; height: 9px; border-radius: 50%; margin-right: 8px; vertical-align: middle; }
.cal-dot.dot-first-last { background: var(--orange); }
.cal-dot.dot-planning { background: #2a6ebd; }
.cal-dot.dot-closed { background: var(--green); }
.cal-dot.dot-break { background: #7c4daa; }
.cal-dot.dot-weather { background: #7a5c00; }

.progression-table { table-layout: fixed; }
.progression-table th { width: auto; }
.progression-table thead th {
  text-align: center; background: var(--green-dark); color: #fff;
  font-size: .82rem; letter-spacing: .3px;
}
.progression-table th[scope="row"] {
  text-align: center; vertical-align: middle; font-size: .88rem;
}
.progression-table tr.track-standard th[scope="row"] { background: var(--green-light); color: var(--green-dark); }
.progression-table tr.track-honors th[scope="row"] { background: var(--orange-light); color: var(--orange-dark); }
.progression-table tr.track-ap th[scope="row"] { background: #e8f0fa; color: #1d4b80; }
.progression-table td { vertical-align: top; padding: 12px 10px; border-left: 1px solid var(--line); }
.progression-table td ul.course-cell {
  margin: 0; padding: 0; list-style: none;
  display: flex; flex-direction: column; gap: 6px;
}
.progression-table td ul.course-cell li {
  padding: 5px 12px; border-radius: 999px;
  background: var(--bg); border: 1px solid var(--line); border-left-width: 3px;
  font-size: .86rem; line-height: 1.3; white-space: normal;
}
.progression-table tr.track-standard td ul.course-cell li { border-left-color: var(--green); }
.progression-table tr.track-honors td ul.course-cell li { border-left-color: var(--orange-dark); }
.progression-table tr.track-ap td ul.course-cell li { border-left-color: #2a6ebd; }

.checklist { list-style: none; padding-left: 0; }
.checklist li { position: relative; padding-left: 30px; margin: 8px 0; }
.checklist li::before {
  content: "✓";
  position: absolute; left: 0; top: 0;
  color: var(--white); background: var(--green);
  width: 20px; height: 20px; border-radius: 50%;
  font-size: .72rem; font-weight: 900;
  display: flex; align-items: center; justify-content: center;
}

.pill-note { font-size: .82rem; color: var(--muted); font-style: italic; }

/* ---------- Footer ---------- */
.site-footer {
  background: var(--green-dark);
  color: rgba(255,255,255,.85);
  margin-top: 40px;
  padding: 30px 0 26px;
  font-size: .9rem;
}
.site-footer .container { display: flex; flex-wrap: wrap; gap: 24px; justify-content: space-between; }
.site-footer h4 { color: #fff; margin: 0 0 8px; font-size: .95rem; }
.site-footer a { color: var(--orange-light); }
.footer-note { font-size: .8rem; color: rgba(255,255,255,.6); margin-top: 18px; border-top: 1px solid rgba(255,255,255,.15); padding-top: 14px; }

/* ===== MOBILE RESPONSIVE ===== */

@media (max-width: 640px) {
  /* Header — collapse nav into a scrollable strip below logo */
  .site-header .container { flex-wrap: wrap; padding: 10px 0 0; gap: 0; }
  .brand { flex: 1; padding-bottom: 10px; }
  .year-badge { font-size: .64rem; padding: 4px 9px; margin-bottom: 10px; }
  .header-spacer { display: none; }
  .translate-widget { margin-bottom: 10px; }
  .header-nav {
    order: 3; width: 100%;
    display: flex; overflow-x: auto; gap: 2px;
    padding: 0 0 8px; scrollbar-width: none;
    border-top: 1px solid var(--line);
  }
  .header-nav::-webkit-scrollbar { display: none; }
  .header-nav a {
    flex-shrink: 0; font-size: .78rem;
    padding: 6px 10px; white-space: nowrap;
  }
  .brand-sub { display: none; }

  /* Hero — tighter on small screens */
  .hero { padding: 28px 0 32px; }
  .hero-logo { width: 58px; height: 58px; margin-bottom: 10px; }
  .hero h1 { font-size: 1.6rem; }
  .hero p { font-size: .95rem; }

  /* Grid — always single column on phone */
  .grid { grid-template-columns: 1fr; gap: 12px; margin: 12px 0 6px; }
  .card { padding: 16px 16px 14px; gap: 6px; }
  .card-icon { font-size: 1.4rem; }
  .card-title { font-size: 1rem; }
  .card-desc { font-size: .86rem; }

  /* Section headers — tighter */
  .cat-section { margin: 30px 0 6px; }
  .cat-header { padding: 12px 14px; gap: 10px; }
  .cat-title { font-size: 1.08rem; margin-bottom: 3px; }
  .cat-desc { font-size: .78rem; }
  .cat-icon { font-size: 1.5rem; }

  /* Search */
  .search-wrap { margin: 16px 0 4px; }
  .search-box { padding: 12px 14px; font-size: .95rem; }

  /* Detail page hero */
  .page-hero { padding: 20px 0 24px; }
  .page-hero h1 { font-size: 1.45rem; }

  /* Buttons */
  .btn-row { flex-direction: column; }
  .btn { text-align: center; }

  /* Content */
  .content { padding: 20px 0 12px; }
  .content h2 { font-size: 1.15rem; }
  .card-panel { padding: 16px 14px; }

  /* Definition tables — stack label above value instead of squeezing into a narrow column.
     Tables with a <thead> use column headers instead of row labels, so they scroll
     horizontally (via their min-width + overflow-x:auto wrapper) instead of stacking. */
  .facts:not(.course-table):not(.progression-table):not(:has(thead)) th[scope="row"] { display: block; width: 100%; white-space: normal; border-bottom: none; padding-bottom: 4px; }
  .facts:not(.course-table):not(.progression-table):not(:has(thead)) td { display: block; width: 100%; padding-top: 0; }

  /* Footer */
  .site-footer .container { flex-direction: column; gap: 14px; }
}

/* ---------- Compact hero (home page) ---------- */
.hero-compact {
  background: linear-gradient(135deg, var(--green) 0%, var(--green-dark) 100%);
  color: #fff;
  padding: 30px 0 34px;
  position: relative;
  overflow: hidden;
}
.hero-compact::after {
  content: "";
  position: absolute;
  right: -40px; top: -40px;
  width: 240px; height: 240px;
  background: radial-gradient(circle, rgba(240,120,32,.22), transparent 70%);
  pointer-events: none;
}
.hero-compact .container { position: relative; z-index: 1; }
.hero-brand { display: flex; align-items: center; gap: 14px; margin-bottom: 14px; }
.hero-brand img { width: 60px; filter: drop-shadow(0 3px 8px rgba(0,0,0,.22)); }
.hero-brand-text h1 { margin: 0; font-size: clamp(1.5rem, 4vw, 2rem); font-weight: 800; line-height: 1.1; }
.hero-brand-text p { margin: 4px 0 0; font-size: .92rem; color: rgba(255,255,255,.88); }
.hero-search-wrap { max-width: 580px; display: flex; background: #fff; border-radius: 12px; overflow: hidden; box-shadow: 0 4px 18px rgba(0,0,0,.22); margin-top: 18px; }
.hero-search-wrap:focus-within { box-shadow: 0 0 0 3px var(--orange-dark), 0 4px 18px rgba(0,0,0,.22); }
.hero-search-wrap input { flex: 1; border: none; padding: 14px 18px; font-size: .98rem; color: var(--ink); background: transparent; }
.hero-search-wrap input::placeholder { color: #aaa; }
.hero-search-wrap input:focus { outline: none; }
.hero-search-btn { background: var(--orange); color: var(--ink); border: none; padding: 0 22px; font-weight: 800; font-size: .92rem; cursor: pointer; transition: background .12s; white-space: nowrap; }
.hero-search-btn:hover { background: var(--orange-hover); }

/* ---------- Quick Access bar ---------- */
.quick-access {
  background: var(--white);
  border-bottom: 2px solid var(--line);
  padding: 12px 0;
}
.qa-row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.qa-label { font-size: .72rem; font-weight: 800; text-transform: uppercase; letter-spacing: .6px; color: var(--muted); white-space: nowrap; margin-right: 2px; }
.qa-link {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 6px 14px; border-radius: 999px;
  font-size: .82rem; font-weight: 700;
  text-decoration: none;
  background: var(--green-light); color: var(--green-dark);
  border: 1.5px solid #cde0d2;
  transition: background .12s, border-color .12s;
  white-space: nowrap;
}
.qa-link:hover { background: #c6dccb; border-color: var(--green); color: var(--green-dark); }
.qa-link.ext::after { content: " ↗"; font-size: .7rem; opacity: .65; }

/* ---------- Filter tab strip ---------- */
.filter-strip {
  background: var(--white);
  border-bottom: 2px solid var(--line);
  position: sticky; top: 69px; z-index: 30;
}
.filter-tabs { display: flex; gap: 4px; overflow-x: auto; padding: 10px 0; scrollbar-width: none; }
.filter-tabs::-webkit-scrollbar { display: none; }
.filter-tab {
  flex-shrink: 0; padding: 7px 18px; border-radius: 999px;
  font-size: .84rem; font-weight: 700; cursor: pointer;
  background: var(--bg); color: var(--muted);
  border: 1.5px solid var(--line);
  transition: background .12s, color .12s, border-color .12s;
  white-space: nowrap; user-select: none;
}
.filter-tab:hover { background: var(--green-light); color: var(--green-dark); border-color: var(--green-light); }
.filter-tab.active { background: var(--green); color: #fff; border-color: var(--green); }

/* ---------- Category sections ---------- */
.cat-section { margin: 48px 0 8px; }
.cat-header {
  display: flex;
  align-items: center;
  gap: 16px;
  background: var(--green);
  border-radius: var(--radius);
  padding: 16px 22px;
  margin-bottom: 18px;
  position: relative;
  overflow: hidden;
}
.cat-header::after {
  content: "";
  position: absolute;
  right: -20px; top: -20px;
  width: 120px; height: 120px;
  background: rgba(255,255,255,.06);
  border-radius: 50%;
  pointer-events: none;
}
.cat-header::before {
  content: "";
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 6px;
  background: var(--orange);
  border-radius: var(--radius) 0 0 var(--radius);
}
.cat-header.cat-orange { background: var(--orange-dark); }
.cat-header.cat-blue { background: #2a6ebd; }
.cat-header.cat-purple { background: #7c4daa; }
.cat-header.cat-gold { background: #7a5c00; }
.cat-header.cat-maroon { background: #7a2f3d; }
.cat-header.cat-teal { background: #0f6e6e; }
.cat-header.cat-navy { background: #1c3f6e; }
.cat-icon { font-size: 1.8rem; line-height: 1; flex-shrink: 0; filter: drop-shadow(0 1px 2px rgba(0,0,0,.2)); }
.cat-title { font-size: 1.25rem; font-weight: 800; color: #fff; margin: 0 0 5px; letter-spacing: .1px; }
.cat-desc { font-size: .84rem; font-style: italic; color: rgba(255,255,255,.95); margin: 0; padding-top: 4px; border-top: 1px solid rgba(255,255,255,.2); }
.no-results { color: var(--muted); padding: 20px 0; display: none; }

/* ---------- Print utilities ---------- */
@media print {
  .no-print { display: none !important; }
  .print-form { margin-top: 0 !important; }
  body { background: #fff; color: #000; font-size: 11pt; }
  a { color: #000; text-decoration: none; }
  .card-panel, .callout { box-shadow: none; border: 1px solid #ccc; }
  /* Key dates: keep color for readability */
  .kd-dot { print-color-adjust: exact; -webkit-print-color-adjust: exact; }
}

/* ---------- Key dates calendar ---------- */
.kd-year-strip {
  display: flex;
  overflow-x: auto;
  gap: 0;
  margin: 22px 0;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: #fff;
  box-shadow: var(--shadow);
}
.kd-month {
  flex: 1;
  min-width: 130px;
  border-right: 1px solid var(--line);
  padding: 14px 12px;
}
.kd-month:last-child { border-right: none; }
.kd-month-name {
  font-size: .72rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .7px;
  color: var(--green-dark);
  margin-bottom: 10px;
  padding-bottom: 6px;
  border-bottom: 2px solid var(--green-light);
}
.kd-item { display: flex; align-items: flex-start; gap: 7px; margin: 7px 0; }
.kd-dot {
  flex-shrink: 0;
  width: 10px; height: 10px;
  border-radius: 50%;
  margin-top: 4px;
  print-color-adjust: exact;
  -webkit-print-color-adjust: exact;
}
.kd-dot.green { background: var(--green); }
.kd-dot.orange { background: var(--orange-dark); }
.kd-dot.blue { background: #2a6ebd; }
.kd-dot.purple { background: #7c4daa; }
.kd-text { font-size: .8rem; line-height: 1.35; color: var(--ink); }
.kd-text strong { color: var(--green-dark); }

.kd-legend {
  display: flex; flex-wrap: wrap; gap: 14px;
  margin: 0 0 18px;
  font-size: .82rem;
}
.kd-legend-item { display: flex; align-items: center; gap: 6px; }

/* ---------- Senior checklist print ---------- */
.cl-section { margin: 0 0 16px; }
#main-content .cl-section-title {
  margin: 0;
  font-size: .78rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .7px;
  color: #fff;
  background: var(--green);
  padding: 5px 12px;
  border-radius: 6px 6px 0 0;
  border-bottom: none;
  print-color-adjust: exact;
  -webkit-print-color-adjust: exact;
}
.cl-items { border: 1px solid #ccc; border-top: none; border-radius: 0 0 6px 6px; padding: 8px 12px; }
.cl-item {
  display: flex; align-items: flex-start; gap: 10px;
  padding: 6px 0;
  border-bottom: 1px solid #eee;
  font-size: .9rem;
}
.cl-item:last-child { border-bottom: none; }
.cl-box {
  flex-shrink: 0;
  width: 18px; height: 18px;
  border: 2px solid #aaa;
  border-radius: 3px;
  margin-top: 1px;
}
.cl-label { flex: 1; line-height: 1.4; }
.cl-label small { color: var(--muted); font-size: .82rem; display: block; }
.cl-two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
@media (max-width: 700px) { .cl-two-col { grid-template-columns: 1fr; } .kd-year-strip { flex-direction: column; } .kd-month { border-right: none; border-bottom: 1px solid var(--line); min-width: 0; } }
