/* DegreeMapper — design system
 * Palette: deep navy + teal with warm amber accents.
 * Typography: Inter (sans) + Merriweather (serif).
 */

:root {
  --navy:        #0e1f3a;
  --navy-deep:   #06122a;
  --navy-soft:   #1d3358;
  --teal:        #1a7e7e;
  --teal-deep:   #115d5d;
  --teal-soft:   #d4ebe9;
  --amber:       #f0a830;
  --amber-deep:  #c47e0a;
  --amber-soft:  #fff1d6;

  --ink:         #0e1f3a;
  --ink-soft:    #3a4761;
  --muted:       #717b94;
  --line:        #e6e8ee;
  --line-strong: #d3d8e4;
  --bg:          #f7f7f4;
  --card:        #ffffff;

  --shadow-sm: 0 1px 2px rgba(14,31,58,.05);
  --shadow:    0 1px 2px rgba(14,31,58,.05), 0 8px 24px rgba(14,31,58,.06);
  --shadow-lg: 0 4px 12px rgba(14,31,58,.08), 0 20px 48px rgba(14,31,58,.10);

  --radius-sm: 6px;
  --radius:    10px;
  --radius-lg: 16px;

  --max:    1180px;
  --max-text: 760px;

  --serif: "Merriweather", "Iowan Old Style", "Charter", Georgia, serif;
  --sans:  "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--sans);
  color: var(--ink);
  background: var(--bg);
  line-height: 1.62;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img { max-width: 100%; display: block; }
a { color: var(--teal-deep); text-decoration: none; transition: color .15s; }
a:hover { color: var(--amber-deep); text-decoration: underline; text-underline-offset: 2px; }

.container { max-width: var(--max); margin: 0 auto; padding: 0 24px; }
.container-narrow { max-width: 880px; margin: 0 auto; padding: 0 24px; }

.muted { color: var(--muted); }
.eyebrow {
  display: inline-block;
  font-size: .8rem; font-weight: 600; letter-spacing: .08em;
  text-transform: uppercase; color: var(--teal-deep);
  margin-bottom: .6em;
}

h1, h2, h3, h4 {
  font-family: var(--serif);
  color: var(--ink);
  line-height: 1.18;
  letter-spacing: -.01em;
  margin: 0 0 .55em;
}
h1 { font-size: clamp(2rem, 4.4vw, 2.8rem); font-weight: 900; }
h2 { font-size: 1.55rem; margin-top: 2em; font-weight: 700; }
h3 { font-size: 1.18rem; margin-top: 1.4em; font-weight: 700; }
h4 { font-size: 1rem; font-family: var(--sans); font-weight: 600; letter-spacing: .02em; }
p { margin: 0 0 1.05em; }

.skip-link {
  position: absolute; left: -1000px; top: 0;
  background: var(--navy); color: #fff; padding: 10px 14px; z-index: 100;
}
.skip-link:focus { left: 12px; top: 12px; }

/* -----------------------------------------------------------
   Header
----------------------------------------------------------- */
.site-header {
  background: #fff;
  border-bottom: 1px solid var(--line);
  position: sticky; top: 0; z-index: 60;
  backdrop-filter: saturate(140%) blur(10px);
}
.header-inner {
  display: flex; align-items: center; justify-content: space-between;
  padding: 16px 24px; gap: 28px;
}
.brand {
  display: inline-flex; align-items: center; gap: 12px;
  color: var(--ink); font-weight: 800;
  font-family: var(--serif); font-size: 1.18rem; letter-spacing: -.01em;
}
.brand:hover { text-decoration: none; color: var(--ink); }
.brand-mark {
  width: 28px; height: 28px; border-radius: 6px;
  background: linear-gradient(135deg, var(--teal) 0%, var(--navy) 60%, var(--amber) 100%);
  display: inline-flex; align-items: center; justify-content: center;
  color: #fff; font-weight: 800; font-size: .82rem; font-family: var(--sans);
  box-shadow: 0 2px 6px rgba(14,31,58,.18);
}
.brand.small .brand-mark { width: 22px; height: 22px; font-size: .7rem; }
.brand.small { font-size: 1rem; margin-bottom: .8em; }

.primary-nav { display: flex; gap: 26px; align-items: center; flex-wrap: wrap; }
.primary-nav a {
  color: var(--ink-soft); font-weight: 500; font-size: .96rem;
  padding: 6px 0; border-bottom: 2px solid transparent;
}
.primary-nav a:hover { color: var(--navy); border-color: var(--amber); text-decoration: none; }

/* Mobile nav (no JS, uses <details>) */
.nav-toggle { display: none; }
@media (max-width: 820px) {
  .primary-nav { display: none; }
  .nav-toggle { display: block; position: relative; }
  .nav-toggle summary {
    list-style: none; cursor: pointer;
    font-size: 1.4rem; line-height: 1; padding: 4px 10px;
    border: 1px solid var(--line-strong); border-radius: var(--radius-sm);
    color: var(--navy);
  }
  .nav-toggle summary::-webkit-details-marker { display: none; }
  .nav-toggle[open] > nav {
    position: absolute; right: 0; top: calc(100% + 10px);
    background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
    box-shadow: var(--shadow-lg); padding: 12px 0; min-width: 220px;
    display: flex; flex-direction: column;
  }
  .nav-toggle nav a {
    display: block; padding: 10px 18px; color: var(--ink-soft);
  }
  .nav-toggle nav a:hover { background: var(--teal-soft); color: var(--navy); text-decoration: none; }
}

/* -----------------------------------------------------------
   Hero
----------------------------------------------------------- */
.hero {
  background:
    radial-gradient(1200px 480px at 80% -40%, rgba(240,168,48,.18), transparent 60%),
    radial-gradient(900px 420px at -10% 110%, rgba(26,126,126,.30), transparent 60%),
    linear-gradient(160deg, var(--navy-deep) 0%, var(--navy) 40%, var(--navy-soft) 100%);
  color: #f4f6fb;
  padding: 78px 0 88px;
  margin-bottom: 56px;
  position: relative; overflow: hidden;
  border-bottom: 1px solid rgba(255,255,255,.05);
}
.hero::before {
  content: ""; position: absolute; inset: 0;
  background-image: url('/img/hero.png');
  background-size: cover; background-position: center;
  opacity: .12; mix-blend-mode: screen; pointer-events: none;
}
.hero .inner { position: relative; max-width: 820px; }
.hero .eyebrow { color: var(--amber); }
.hero h1 {
  color: #fff;
  font-size: clamp(2.2rem, 5.2vw, 3.4rem);
  letter-spacing: -.02em;
}
.hero p.lede {
  color: #c8d2e4; font-size: clamp(1.05rem, 1.7vw, 1.22rem);
  max-width: 64ch; margin-top: .4em;
}

.cta-row { display: flex; gap: 14px; flex-wrap: wrap; margin-top: 28px; }
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  background: var(--amber); color: var(--navy-deep);
  padding: 13px 24px; border-radius: var(--radius);
  font-weight: 700; font-size: .98rem; line-height: 1;
  border: 1px solid transparent; transition: transform .12s, box-shadow .15s, background .15s;
  box-shadow: 0 4px 14px rgba(240,168,48,.28);
}
.btn:hover { background: #ffb946; color: var(--navy-deep); text-decoration: none; transform: translateY(-1px); box-shadow: 0 6px 18px rgba(240,168,48,.36); }
.btn.ghost {
  background: transparent; color: #fff;
  border: 1px solid rgba(255,255,255,.35); box-shadow: none;
}
.btn.ghost:hover { background: rgba(255,255,255,.08); border-color: rgba(255,255,255,.6); }
.btn.teal { background: var(--teal); color: #fff; box-shadow: 0 4px 14px rgba(26,126,126,.28); }
.btn.teal:hover { background: var(--teal-deep); color: #fff; }
.btn.sm { padding: 9px 16px; font-size: .88rem; }

/* Hero search box */
.hero-search {
  position: relative; margin-top: 30px;
  background: rgba(255,255,255,.97); border-radius: var(--radius-lg);
  padding: 14px; display: grid; grid-template-columns: 1fr 1fr auto; gap: 10px;
  box-shadow: 0 12px 40px rgba(6,18,42,.32);
  max-width: 720px;
}
.hero-search input,
.hero-search select {
  width: 100%; border: 1px solid var(--line-strong); border-radius: var(--radius-sm);
  padding: 12px 14px; font-size: 1rem; font-family: inherit; color: var(--ink);
  background: #fff;
}
.hero-search input:focus, .hero-search select:focus {
  outline: 2px solid var(--teal); outline-offset: 1px; border-color: var(--teal);
}
.hero-search button {
  background: var(--navy); color: #fff; border: none; border-radius: var(--radius-sm);
  padding: 12px 22px; font-weight: 600; cursor: pointer; font-family: inherit; font-size: .96rem;
}
.hero-search button:hover { background: var(--teal-deep); }
@media (max-width: 720px) {
  .hero-search { grid-template-columns: 1fr; }
}

/* -----------------------------------------------------------
   Section / cards / grids
----------------------------------------------------------- */
.section { margin: 56px 0; }
.section h2 { margin-top: 0; }
.section .lede { color: var(--ink-soft); max-width: 70ch; font-size: 1.05rem; }

.grid { display: grid; gap: 18px; }
.grid.cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid.cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid.cols-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
@media (max-width: 980px) { .grid.cols-4 { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 820px) { .grid.cols-3, .grid.cols-4 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .grid.cols-2, .grid.cols-3, .grid.cols-4 { grid-template-columns: 1fr; } }

.card {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 22px; box-shadow: var(--shadow-sm); transition: transform .15s, box-shadow .15s, border-color .15s;
  display: block; color: var(--ink);
}
a.card:hover {
  transform: translateY(-2px); box-shadow: var(--shadow);
  border-color: var(--teal); text-decoration: none; color: var(--ink);
}
.card h3 { margin: 0 0 .35em; font-size: 1.08rem; color: var(--navy); }
.card .meta { color: var(--muted); font-size: .9rem; }
.card.feature {
  background: linear-gradient(150deg, var(--teal-soft) 0%, #eef7f5 100%);
  border-color: var(--teal-soft);
}

/* Stats */
.stat-row { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin: 28px 0; }
@media (max-width: 720px) { .stat-row { grid-template-columns: repeat(2, 1fr); } }
.stat {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  padding: 20px; position: relative; overflow: hidden;
}
.stat::before {
  content: ""; position: absolute; top: 0; left: 0; right: 0; height: 3px;
  background: linear-gradient(90deg, var(--teal), var(--amber));
}
.stat .num { font-family: var(--serif); font-size: 1.85rem; color: var(--navy); font-weight: 900; line-height: 1.1; }
.stat .lbl { color: var(--muted); font-size: .88rem; margin-top: 4px; }

/* -----------------------------------------------------------
   Article + sidebar
----------------------------------------------------------- */
.article-layout {
  display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 48px; align-items: start;
}
@media (max-width: 1000px) { .article-layout { grid-template-columns: 1fr; } }

.article {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius-lg);
  padding: 40px; box-shadow: var(--shadow-sm);
}
@media (max-width: 720px) { .article { padding: 24px; } }
.article > h1:first-child, .article > .tag + h1 { margin-top: .2em; }
.article p, .article ul, .article ol { color: var(--ink-soft); font-size: 1.02rem; }
.article ul, .article ol { padding-left: 1.4em; }
.article li { margin-bottom: .35em; }
.article blockquote {
  border-left: 4px solid var(--amber);
  padding: .35em 1.1em; margin: 1.6em 0;
  background: var(--amber-soft); color: var(--ink);
  border-radius: 0 var(--radius) var(--radius) 0;
  font-family: var(--serif); font-style: italic;
}

.sidebar { display: flex; flex-direction: column; gap: 18px; position: sticky; top: 88px; }
.sidebar .card { padding: 20px; }
.sidebar .card h4 {
  margin: 0 0 .8em; padding-bottom: .55em; border-bottom: 1px solid var(--line);
  color: var(--navy); font-weight: 700; letter-spacing: .02em;
}
.sidebar ul { padding-left: 0; list-style: none; margin: 0; }
.sidebar ul li { margin: 0 0 .5em; padding-left: 14px; position: relative; }
.sidebar ul li::before {
  content: ""; position: absolute; left: 0; top: .65em;
  width: 5px; height: 5px; border-radius: 50%; background: var(--teal);
}

/* Related / recommended editorial block (PBN slot styling) */
.related-block { padding: 22px; }
.related-block h4 {
  display: flex; align-items: center; gap: 8px;
  font-size: .82rem; text-transform: uppercase; letter-spacing: .08em;
  color: var(--teal-deep);
}
.related-block .related-list { list-style: none; padding: 0; margin: 0; }
.related-block .related-list li {
  padding: 10px 0; border-bottom: 1px solid var(--line); font-size: .94rem;
  padding-left: 0;
}
.related-block .related-list li::before { display: none; }
.related-block .related-list li:last-child { border-bottom: none; }
.related-block .related-list a,
.related-block .related-list .related-resource { color: var(--navy); font-weight: 500; line-height: 1.4; display: block; }
.related-block .related-list a:hover { color: var(--amber-deep); }
.related-block .related-list .src { display: block; color: var(--muted); font-size: .78rem; margin-top: 2px; font-weight: 400; }

/* Inline editorial recommendation */
.inline-rec {
  display: block; margin: 1.4em 0; padding: 14px 18px;
  background: var(--teal-soft); border-left: 3px solid var(--teal);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  font-size: .96rem; color: var(--ink-soft);
}
.inline-rec strong { color: var(--navy); }
.inline-rec a { font-weight: 600; }

/* AdSense placeholder */
.adsense-slot {
  background: repeating-linear-gradient(45deg, #f4f1e6, #f4f1e6 8px, #ece7d2 8px, #ece7d2 16px);
  border: 1px dashed #d4caa7; color: #8a7d5a;
  text-align: center; padding: 18px; border-radius: var(--radius);
  font-size: .82rem; letter-spacing: .04em; text-transform: uppercase;
}

/* -----------------------------------------------------------
   Lists, tags, breadcrumbs, tables
----------------------------------------------------------- */
.linklist { list-style: none; padding: 0; margin: .4em 0 0; columns: 2; column-gap: 32px; }
.linklist li { margin: 0 0 9px; break-inside: avoid; padding-left: 0; }
.linklist li::before { display: none; }
.linklist a { color: var(--navy); }
.linklist a:hover { color: var(--amber-deep); }
@media (max-width: 720px) { .linklist { columns: 1; } }

.tag {
  display: inline-block; padding: 4px 11px;
  background: var(--teal-soft); color: var(--teal-deep);
  font-size: .78rem; font-weight: 600; border-radius: 99px;
  margin-right: 6px; letter-spacing: .02em;
}
.tag.amber { background: var(--amber-soft); color: var(--amber-deep); }

.breadcrumbs { font-size: .88rem; color: var(--muted); margin: 0 0 22px; }
.breadcrumbs ol { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.breadcrumbs li + li::before { content: "›"; padding-right: 6px; color: var(--muted); }
.breadcrumbs a { color: var(--ink-soft); }

.table {
  width: 100%; border-collapse: collapse; background: #fff;
  border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden;
  margin: 1.2em 0;
}
.table th, .table td { padding: 12px 16px; text-align: left; border-bottom: 1px solid var(--line); font-size: .95rem; }
.table th { background: var(--teal-soft); color: var(--navy); font-weight: 700; }
.table tr:last-child td { border-bottom: none; }
.table tr:hover td { background: #fafbfd; }

/* -----------------------------------------------------------
   Footer
----------------------------------------------------------- */
.site-footer {
  background: var(--navy-deep);
  background-image:
    radial-gradient(900px 360px at 90% -10%, rgba(26,126,126,.18), transparent 60%);
  color: #b9c2d6; margin-top: 80px; padding: 56px 0 28px;
}
.site-footer h4 { color: #fff; font-size: .88rem; margin-bottom: 1em; letter-spacing: .08em; text-transform: uppercase; }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 40px; }
@media (max-width: 820px) { .footer-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 480px) { .footer-grid { grid-template-columns: 1fr; } }
.site-footer ul { list-style: none; padding: 0; margin: 0; }
.site-footer ul li { margin: 0 0 .55em; font-size: .92rem; }
.site-footer a { color: #b9c2d6; }
.site-footer a:hover { color: var(--amber); }
.site-footer .brand { color: #fff; }
.site-footer .brand-mark { box-shadow: 0 0 0 1px rgba(255,255,255,.1); }
.site-footer .muted { color: #7e88a3; }
.footer-meta { margin-top: 36px; padding-top: 22px; border-top: 1px solid #1d2c4a; color: #7e88a3; font-size: .85rem; }

/* Footer recommended (PBN) */
.footer-recommend {
  background: rgba(255,255,255,.03);
  border: 1px solid rgba(255,255,255,.06);
  border-radius: var(--radius); padding: 22px;
  margin-bottom: 36px;
}
.footer-recommend h4 { color: var(--amber); margin-bottom: .8em; }
.footer-recommend .grid { gap: 14px; }
.footer-recommend a,
.footer-recommend .footer-resource {
  display: block; padding: 10px 14px;
  background: rgba(255,255,255,.04); border: 1px solid rgba(255,255,255,.05);
  border-radius: var(--radius-sm); color: #d6dceb; font-size: .9rem; line-height: 1.4;
}
.footer-recommend a:hover { background: rgba(240,168,48,.10); border-color: rgba(240,168,48,.35); color: #fff; text-decoration: none; }
.footer-recommend a small,
.footer-recommend .footer-resource small { display: block; color: #7e88a3; margin-top: 2px; font-size: .76rem; }

/* -----------------------------------------------------------
   Misc utilities
----------------------------------------------------------- */
.divider { border: none; border-top: 1px solid var(--line); margin: 2.4em 0; }
.center { text-align: center; }
.stack > * + * { margin-top: 1.05em; }
.kbd-pill { font-family: var(--sans); font-size: .82rem; padding: 2px 8px; border-radius: 99px; background: var(--amber-soft); color: var(--amber-deep); font-weight: 600; }

/* Visited/focus states for a11y */
:focus-visible { outline: 2px solid var(--teal); outline-offset: 3px; border-radius: 4px; }

/* Print niceness */
@media print {
  .site-header, .site-footer, .sidebar, .adsense-slot, .hero-search { display: none !important; }
  .article { box-shadow: none; border: none; padding: 0; }
}
