/* Specialty Compass AU : stylesheet */
:root {
  --navy: #0d2137;
  --navy-2: #123152;
  --ink: #1c2b38;
  --teal: #0e7c7b;
  --teal-dark: #0a5f5e;
  --teal-soft: #e3f2f1;
  --gold: #c9972c;
  --bg: #f4f7f9;
  --card: #ffffff;
  --line: #dbe4ea;
  --muted: #5a6b78;
  --red: #b3432b;
  --amber: #b97f10;
  --green: #2e7d4f;
  --radius: 12px;
  --shadow: 0 1px 3px rgba(13, 33, 55, 0.08), 0 4px 14px rgba(13, 33, 55, 0.06);
}
* { box-sizing: border-box; }
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.55;
  font-size: 16px;
}
a { color: var(--teal-dark); text-decoration: none; }
a:hover { text-decoration: underline; }
code { background: #eef2f5; padding: 0.1em 0.35em; border-radius: 4px; font-size: 0.9em; }

/* ---------- Header / nav ---------- */
.site-header {
  background: var(--navy);
  color: #fff;
  position: sticky;
  top: 0;
  z-index: 50;
  box-shadow: 0 2px 8px rgba(0,0,0,0.18);
}
.site-header .inner {
  max-width: 1160px; margin: 0 auto; padding: 0.6rem 1.2rem;
  display: flex; align-items: center; gap: 1rem; flex-wrap: wrap;
}
.brand { display: flex; align-items: center; gap: 0.6rem; color: #fff; font-weight: 700; font-size: 1.05rem; white-space: nowrap; }
.brand:hover { text-decoration: none; }
.brand .mark {
  width: 34px; height: 34px; border-radius: 9px; flex: 0 0 34px;
  background: linear-gradient(135deg, var(--teal) 0%, #15a3a1 100%);
  display: grid; place-items: center; font-size: 1.05rem; font-weight: 800; color: #fff;
}
.brand small { display: block; font-weight: 400; font-size: 0.7rem; opacity: 0.75; letter-spacing: 0.02em; }
.site-nav { margin-left: auto; display: flex; gap: 0.15rem; flex-wrap: wrap; }
.site-nav a {
  color: #d7e3ee; padding: 0.45rem 0.7rem; border-radius: 8px; font-size: 0.92rem; font-weight: 500;
}
.site-nav a:hover { background: rgba(255,255,255,0.1); color: #fff; text-decoration: none; }
.site-nav a.active { background: var(--teal); color: #fff; }

/* ---------- Hero ---------- */
.hero {
  background: linear-gradient(150deg, var(--navy) 0%, var(--navy-2) 55%, #0e4f5e 100%);
  color: #fff; padding: 3.2rem 1.2rem 2.8rem;
}
.hero .inner { max-width: 1160px; margin: 0 auto; }
.hero h1 { font-size: clamp(1.7rem, 4vw, 2.6rem); margin: 0 0 0.7rem; line-height: 1.2; letter-spacing: -0.01em; }
.hero p.lede { font-size: 1.08rem; max-width: 46rem; color: #cfdde9; margin: 0 0 1.4rem; }
.hero .search-wrap { max-width: 34rem; position: relative; }
.hero input[type="search"], .toolbar input[type="search"] {
  width: 100%; padding: 0.85rem 1.1rem; font-size: 1rem; border-radius: 10px; border: none;
  box-shadow: var(--shadow); color: var(--ink);
}
.hero .quick-links { margin-top: 1.1rem; display: flex; gap: 0.5rem; flex-wrap: wrap; }
.hero .quick-links a {
  color: #fff; border: 1px solid rgba(255,255,255,0.35); padding: 0.4rem 0.85rem; border-radius: 999px;
  font-size: 0.88rem;
}
.hero .quick-links a:hover { background: rgba(255,255,255,0.12); text-decoration: none; }

/* ---------- Layout ---------- */
.container { max-width: 1160px; margin: 0 auto; padding: 1.6rem 1.2rem 3rem; }
.stat-strip { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 0.8rem; margin: -2.6rem auto 2rem; max-width: 1160px; padding: 0 1.2rem; }
.stat-strip .stat {
  background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); padding: 0.9rem 1rem;
  border-top: 3px solid var(--teal);
}
.stat-strip .stat b { display: block; font-size: 1.25rem; color: var(--navy); }
.stat-strip .stat span { font-size: 0.8rem; color: var(--muted); }

/* ---------- Toolbar / filters ---------- */
.toolbar { display: flex; gap: 0.7rem; flex-wrap: wrap; align-items: center; margin: 1.2rem 0; }
.toolbar input[type="search"] { max-width: 22rem; border: 1px solid var(--line); }
.chips { display: flex; gap: 0.4rem; flex-wrap: wrap; }
.chip {
  border: 1px solid var(--line); background: var(--card); padding: 0.32rem 0.75rem; border-radius: 999px;
  font-size: 0.84rem; cursor: pointer; color: var(--ink); user-select: none;
}
.chip:hover { border-color: var(--teal); }
.chip.on { background: var(--teal); border-color: var(--teal); color: #fff; }

/* ---------- Cards ---------- */
.group-block { margin: 2rem 0 0.6rem; }
.group-block h2 { font-size: 1.25rem; color: var(--navy); border-bottom: 2px solid var(--line); padding-bottom: 0.4rem; }
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(270px, 1fr)); gap: 0.9rem; }
.card {
  background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); padding: 1rem 1.1rem;
  display: flex; flex-direction: column; gap: 0.45rem; border: 1px solid transparent; position: relative;
}
.card:hover { border-color: var(--teal); }
.card h3 { margin: 0; font-size: 1.02rem; line-height: 1.3; }
.card h3 a { color: var(--navy); }
.card h3 a::after { content: ""; position: absolute; inset: 0; }
.card .college { font-size: 0.78rem; color: var(--muted); text-transform: uppercase; letter-spacing: 0.04em; }
.card p.blurb { font-size: 0.86rem; color: var(--muted); margin: 0; flex-grow: 1; }
.card .meta-row { display: flex; gap: 0.7rem; flex-wrap: wrap; font-size: 0.8rem; color: var(--ink); align-items: center; }
.card .meta-row .m { background: #eef4f7; border-radius: 6px; padding: 0.15rem 0.5rem; }

/* competitiveness dots */
.comp { display: inline-flex; gap: 3px; align-items: center; }
.comp i { width: 9px; height: 9px; border-radius: 50%; background: #d8e1e8; display: inline-block; }
.comp[data-level="1"] i:nth-child(-n+1), .comp[data-level="2"] i:nth-child(-n+2) { background: var(--green); }
.comp[data-level="3"] i:nth-child(-n+3) { background: var(--amber); }
.comp[data-level="4"] i:nth-child(-n+4) { background: #c26a1b; }
.comp[data-level="5"] i:nth-child(-n+5) { background: var(--red); }
.comp .lbl { font-size: 0.78rem; color: var(--muted); margin-left: 4px; }

/* ---------- Specialty page ---------- */
.page-head { background: linear-gradient(150deg, var(--navy) 0%, var(--navy-2) 70%); color: #fff; padding: 2.2rem 1.2rem 1.8rem; }
.page-head .inner { max-width: 1160px; margin: 0 auto; }
.page-head .crumbs { font-size: 0.83rem; color: #9fb6c9; margin-bottom: 0.5rem; }
.page-head .crumbs a { color: #cadeee; }
.page-head h1 { margin: 0 0 0.3rem; font-size: clamp(1.5rem, 3.5vw, 2.2rem); }
.page-head .sub { color: #c3d4e2; font-size: 0.98rem; max-width: 52rem; }
.page-head .badge-row { margin-top: 0.8rem; display: flex; gap: 0.45rem; flex-wrap: wrap; }
.badge {
  font-size: 0.78rem; padding: 0.25rem 0.7rem; border-radius: 999px; background: rgba(255,255,255,0.12);
  border: 1px solid rgba(255,255,255,0.25); color: #eaf2f8;
}
.badge.teal { background: var(--teal); border-color: var(--teal); }

.snapshot { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 0.8rem; margin: 1.4rem 0; }
.snapshot .tile { background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); padding: 0.8rem 0.95rem; border-top: 3px solid var(--teal); }
.snapshot .tile .k { font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.05em; color: var(--muted); }
.snapshot .tile .v { font-weight: 700; color: var(--navy); font-size: 0.98rem; margin-top: 0.15rem; line-height: 1.35; }

.layout { display: grid; grid-template-columns: 230px minmax(0, 1fr); gap: 2rem; }
.toc { position: sticky; top: 70px; align-self: start; font-size: 0.87rem; max-height: calc(100vh - 90px); overflow: auto; padding-right: 0.4rem; }
.toc ul { list-style: none; margin: 0; padding: 0; border-left: 2px solid var(--line); }
.toc li a { display: block; padding: 0.32rem 0.8rem; color: var(--muted); border-left: 2px solid transparent; margin-left: -2px; }
.toc li a:hover { color: var(--teal-dark); text-decoration: none; }
.toc li a.here { color: var(--teal-dark); border-left-color: var(--teal); font-weight: 600; }

article.content section { margin: 0 0 2.2rem; }
article.content h2 {
  font-size: 1.28rem; color: var(--navy); margin: 0 0 0.8rem; padding-left: 0.7rem;
  border-left: 4px solid var(--teal); scroll-margin-top: 80px;
}
article.content h3 { font-size: 1.02rem; color: var(--navy); margin: 1.1rem 0 0.4rem; }
article.content ul { padding-left: 1.25rem; margin: 0.4rem 0; }
article.content li { margin: 0.3rem 0; }
article.content p { margin: 0.5rem 0 0.9rem; }

.callout { border-radius: 10px; padding: 0.85rem 1.05rem; margin: 0.9rem 0; font-size: 0.93rem; border: 1px solid; }
.callout.info { background: var(--teal-soft); border-color: #bfe0de; }
.callout.warn { background: #fdf4e3; border-color: #ecd9ae; }
.callout.real { background: #eef1f6; border-color: #d4dce8; }
.callout .tag { display: block; font-size: 0.72rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em; margin-bottom: 0.3rem; color: var(--muted); }

/* pathway steps */
.steps { list-style: none; margin: 0; padding: 0; counter-reset: step; }
.steps li { position: relative; padding: 0 0 1.1rem 2.6rem; counter-increment: step; }
.steps li::before {
  content: counter(step); position: absolute; left: 0; top: 0;
  width: 1.7rem; height: 1.7rem; border-radius: 50%; background: var(--teal); color: #fff;
  font-weight: 700; font-size: 0.85rem; display: grid; place-items: center;
}
.steps li::after { content: ""; position: absolute; left: 0.8rem; top: 1.9rem; bottom: 0.1rem; width: 2px; background: var(--line); }
.steps li:last-child::after { display: none; }
.steps li b { display: block; color: var(--navy); }
.steps li span { font-size: 0.92rem; color: var(--ink); }

/* tables */
table.data { width: 100%; border-collapse: collapse; background: var(--card); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); font-size: 0.9rem; }
table.data th { background: var(--navy); color: #fff; text-align: left; padding: 0.55rem 0.7rem; font-weight: 600; white-space: nowrap; }
table.data td { padding: 0.55rem 0.7rem; border-top: 1px solid var(--line); vertical-align: top; }
table.data tr:nth-child(even) td { background: #f8fbfc; }
table.data th.sortable { cursor: pointer; user-select: none; }
table.data th.sortable::after { content: " ↕"; opacity: 0.55; font-size: 0.8em; }
table.data th.sorted-asc::after { content: " ↑"; opacity: 1; }
table.data th.sorted-desc::after { content: " ↓"; opacity: 1; }
.table-scroll { overflow-x: auto; margin: 0.6rem 0 1rem; -webkit-overflow-scrolling: touch; }

/* stage advice */
details.stage { background: var(--card); border: 1px solid var(--line); border-radius: 10px; margin: 0.55rem 0; box-shadow: var(--shadow); }
details.stage summary {
  cursor: pointer; padding: 0.75rem 1rem; font-weight: 600; color: var(--navy); list-style: none;
  display: flex; align-items: center; gap: 0.6rem;
}
details.stage summary::-webkit-details-marker { display: none; }
details.stage summary::before { content: "▸"; color: var(--teal); transition: transform 0.15s; }
details.stage[open] summary::before { transform: rotate(90deg); }
details.stage .body { padding: 0 1.1rem 0.9rem; }
details.stage summary .stage-tag { font-size: 0.72rem; background: var(--teal-soft); color: var(--teal-dark); padding: 0.12rem 0.5rem; border-radius: 999px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.04em; }

/* subspecialty chips / link lists */
.pill-list { display: flex; flex-wrap: wrap; gap: 0.4rem; padding: 0; margin: 0.5rem 0; list-style: none; }
.pill-list li { background: var(--card); border: 1px solid var(--line); border-radius: 999px; padding: 0.3rem 0.8rem; font-size: 0.85rem; }
.links-list { padding-left: 1.2rem; }
.links-list li { margin: 0.35rem 0; }

/* quiz */
.quiz { background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); padding: 1.2rem 1.3rem; margin: 1rem 0 2rem; }
.quiz h2 { margin-top: 0; }
.quiz .q { margin: 0.9rem 0; }
.quiz .q p { font-weight: 600; margin: 0 0 0.4rem; }
.quiz .opts { display: flex; flex-wrap: wrap; gap: 0.4rem; }
.quiz .opts label {
  border: 1px solid var(--line); border-radius: 999px; padding: 0.35rem 0.85rem; cursor: pointer; font-size: 0.88rem; background: #fff;
}
.quiz .opts input { display: none; }
.quiz .opts input:checked + span { color: #fff; }
.quiz .opts label:has(input:checked) { background: var(--teal); border-color: var(--teal); color: #fff; }
.quiz button {
  background: var(--navy); color: #fff; font-size: 1rem; font-weight: 600; border: none; border-radius: 9px;
  padding: 0.65rem 1.4rem; cursor: pointer; margin-top: 0.6rem;
}
.quiz button:hover { background: var(--teal-dark); }
.quiz-results { margin-top: 1.2rem; }
.quiz-results .res { display: flex; align-items: center; gap: 0.8rem; margin: 0.45rem 0; }
.quiz-results .res a { flex: 0 0 220px; font-weight: 600; }
.quiz-results .bar { flex: 1; height: 12px; background: #e6edf2; border-radius: 999px; overflow: hidden; }
.quiz-results .bar i { display: block; height: 100%; background: linear-gradient(90deg, var(--teal), #15a3a1); border-radius: 999px; }
.quiz-results .why { font-size: 0.78rem; color: var(--muted); flex-basis: 100%; margin-left: 236px; margin-top: -0.3rem; }

/* footer */
.site-footer { background: var(--navy); color: #b9c9d6; font-size: 0.84rem; margin-top: 3rem; }
.site-footer .inner { max-width: 1160px; margin: 0 auto; padding: 1.6rem 1.2rem; }
.site-footer a { color: #cfe0ee; }
.review-banner { font-size: 0.82rem; color: var(--muted); border-top: 1px dashed var(--line); margin-top: 2rem; padding-top: 0.8rem; }

/* generic page prose */
.prose { max-width: 56rem; }
.prose h2 { font-size: 1.3rem; color: var(--navy); margin-top: 2rem; scroll-margin-top: 80px; }
.prose h3 { font-size: 1.05rem; color: var(--navy); }

.backtop { position: fixed; right: 1rem; bottom: 1rem; background: var(--navy); color: #fff; border-radius: 999px; width: 42px; height: 42px; display: none; place-items: center; font-size: 1.2rem; box-shadow: var(--shadow); z-index: 40; }
.backtop.show { display: grid; }
.backtop:hover { background: var(--teal-dark); text-decoration: none; }

mark { background: #ffe9a8; padding: 0 2px; border-radius: 3px; }
.muted { color: var(--muted); }
.small { font-size: 0.85rem; }
.nowrap { white-space: nowrap; }

@media (max-width: 960px) {
  .layout { grid-template-columns: 1fr; }
  .toc { display: none; }
  .quiz-results .res a { flex-basis: 150px; }
  .quiz-results .why { margin-left: 0; }
}
/* ---------- brand logo ---------- */
.brand .mark-img { width: 34px; height: 34px; display: block; flex: 0 0 34px; }

/* ---------- auth button ---------- */
#sc-auth-btn { border: 1px solid rgba(255,255,255,0.4); border-radius: 999px; margin-left: 0.35rem; }
#sc-auth-btn.signed-in { background: var(--teal); color: #fff; border-color: var(--teal); }

/* ---------- community section ---------- */
.comm-block { margin: 1.4rem 0 2rem; }
.comm-block h3 { font-size: 1.05rem; color: var(--navy); margin-bottom: 0.5rem; }
.sc-comment { background: var(--card); border: 1px solid var(--line); border-radius: 10px; padding: 0.7rem 0.95rem; margin: 0.55rem 0; box-shadow: var(--shadow); }
.sc-comment.reply { margin-left: 2.2rem; background: #f8fbfc; }
.sc-head { font-size: 0.82rem; margin-bottom: 0.25rem; }
.sc-author { font-weight: 700; color: var(--navy); }
.sc-authmeta { color: var(--teal-dark); background: var(--teal-soft); border-radius: 999px; padding: 0.05rem 0.55rem; font-size: 0.75rem; }
.sc-time { color: var(--muted); font-size: 0.75rem; margin-left: 0.3rem; }
.sc-body { white-space: pre-wrap; font-size: 0.93rem; overflow-wrap: break-word; }
.sc-actions { margin-top: 0.35rem; display: flex; gap: 0.9rem; font-size: 0.8rem; }
.sc-actions a { color: var(--muted); }
.sc-actions a:hover { color: var(--teal-dark); }
.comm-composer, .sc-replybox { margin-top: 0.6rem; }
.comm-composer textarea, .sc-replybox textarea, .sc-modal input, .sc-modal select {
  width: 100%; padding: 0.65rem 0.8rem; border: 1px solid var(--line); border-radius: 9px;
  font: inherit; color: var(--ink); background: #fff; margin: 0.25rem 0 0.55rem;
}
.comm-composer textarea, .sc-replybox textarea { min-height: 84px; resize: vertical; }
.sc-btn {
  background: var(--navy); color: #fff; border: none; border-radius: 9px; padding: 0.55rem 1.15rem;
  font-size: 0.92rem; font-weight: 600; cursor: pointer;
}
.sc-btn:hover { background: var(--teal-dark); }
.sc-btn.ghost { background: #fff; color: var(--navy); border: 1.5px solid var(--navy); }
.sc-btn.ghost:hover { border-color: var(--teal-dark); color: var(--teal-dark); background: #fff; }
.sc-btn.small-btn { padding: 0.4rem 0.9rem; font-size: 0.85rem; }
.sc-btn + .sc-btn { margin-left: 0.5rem; }
.sc-empty { padding: 0.4rem 0; }

/* ---------- modal ---------- */
.sc-modal-overlay {
  position: fixed; inset: 0; background: rgba(13,33,55,0.55); z-index: 100;
  display: none; align-items: center; justify-content: center; padding: 1rem;
}
.sc-modal-overlay.show { display: flex; }
.sc-modal { background: #fff; border-radius: 14px; max-width: 430px; width: 100%; padding: 1.4rem 1.5rem; position: relative; box-shadow: 0 18px 60px rgba(0,0,0,0.3); max-height: 90vh; overflow: auto; }
.sc-modal h3 { margin: 0 0 0.5rem; color: var(--navy); }
.sc-modal label { display: block; font-size: 0.85rem; font-weight: 600; color: var(--navy); margin-top: 0.5rem; }
.sc-modal-close { position: absolute; top: 0.5rem; right: 0.7rem; background: none; border: none; font-size: 1.5rem; color: var(--muted); cursor: pointer; }
.sc-privacy { border-top: 1px dashed var(--line); margin-top: 1rem; padding-top: 0.7rem; }

@media print {
  .site-header, .site-nav, .toc, .backtop, .quiz, .toolbar { display: none !important; }
  body { background: #fff; }
  .page-head { background: none; color: #000; }
  .page-head .sub, .page-head .crumbs { color: #333; }
  .badge { border-color: #999; color: #000; background: none; }
  details.stage { break-inside: avoid; }
  details.stage:not([open]) .body { display: block; }
  a { color: inherit; }
}
