/* ==========================================================================
   Free Course Access Guide — stylesheet
   Design language: "Catalog Card" — a study-hall / library-index aesthetic
   ========================================================================== */

:root {
  /* Color tokens */
  --paper: #f2efe6;
  --paper-dim: #eae5d6;
  --card: #fffdf8;
  --ink: #1b2a3d;
  --ink-soft: #47566b;
  --mustard: #d9a441;
  --mustard-dark: #b8842b;
  --teal: #2f6f63;
  --teal-dark: #234f46;
  --line: #d8d2bd;
  --line-strong: #b9b19a;
  --red-flag: #b5502f;

  /* Type */
  --font-display: "Zilla Slab", Georgia, "Times New Roman", serif;
  --font-body: "Karla", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --font-mono: "IBM Plex Mono", "Courier New", monospace;

  /* Layout */
  --maxw: 1120px;
  --radius: 3px;
  --shadow-card: 0 1px 0 rgba(27, 42, 61, 0.06), 0 8px 20px -12px rgba(27, 42, 61, 0.25);
  --shadow-card-hover: 0 1px 0 rgba(27, 42, 61, 0.08), 0 16px 32px -14px rgba(27, 42, 61, 0.32);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--paper);
  background-image:
    linear-gradient(var(--line) 1px, transparent 1px);
  background-size: 100% 42px;
  background-attachment: local;
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }
a { color: var(--teal-dark); text-decoration-thickness: 1.5px; text-underline-offset: 3px; }
a:hover { color: var(--mustard-dark); }

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 700;
  line-height: 1.15;
  color: var(--ink);
  margin: 0 0 0.5em;
}

h1 { font-size: clamp(2.1rem, 4.5vw, 3.4rem); }
h2 { font-size: clamp(1.5rem, 3vw, 2.1rem); }
h3 { font-size: 1.3rem; }

p { margin: 0 0 1.1em; }

.eyebrow {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--teal-dark);
  background: rgba(47, 111, 99, 0.09);
  border: 1px solid rgba(47, 111, 99, 0.25);
  padding: 0.3em 0.7em;
  border-radius: 2px;
  display: inline-block;
}

.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 24px; }
.prose-wrap { max-width: 720px; margin: 0 auto; padding: 0 24px; }

/* Skip link */
.skip-link {
  position: absolute; left: -9999px; top: 0;
  background: var(--ink); color: #fff; padding: 10px 16px; z-index: 200;
}
.skip-link:focus { left: 16px; top: 16px; }

/* Focus states */
a:focus-visible, button:focus-visible, .btn:focus-visible {
  outline: 3px solid var(--mustard);
  outline-offset: 2px;
}

/* ==========================================================================
   Header / Nav
   ========================================================================== */

.site-header {
  background: var(--paper);
  border-bottom: 2px solid var(--ink);
  position: sticky;
  top: 0;
  z-index: 100;
}

.site-header .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 16px;
  padding-bottom: 16px;
  gap: 16px;
}

.brand {
  display: flex;
  align-items: baseline;
  gap: 10px;
  text-decoration: none;
  color: var(--ink);
}
.brand-mark {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  letter-spacing: 0.08em;
  background: var(--ink);
  color: var(--paper);
  padding: 3px 6px;
  border-radius: 2px;
}
.brand-name {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.25rem;
}
.brand:hover { color: var(--ink); }
.brand:hover .brand-name { color: var(--teal-dark); }

.main-nav ul {
  list-style: none;
  display: flex;
  gap: 22px;
  margin: 0;
  padding: 0;
  flex-wrap: wrap;
}
.main-nav a {
  color: var(--ink-soft);
  text-decoration: none;
  font-size: 0.92rem;
  font-weight: 700;
  padding: 6px 2px;
  border-bottom: 2px solid transparent;
}
.main-nav a:hover,
.main-nav a[aria-current="page"] {
  color: var(--ink);
  border-bottom-color: var(--mustard);
}

.nav-toggle {
  display: none;
  background: none;
  border: 2px solid var(--ink);
  border-radius: 3px;
  padding: 7px 10px;
  font-family: var(--font-mono);
  font-size: 0.85rem;
  cursor: pointer;
}

@media (max-width: 760px) {
  .nav-toggle { display: inline-flex; align-items: center; gap: 6px; }
  .main-nav {
    display: none;
    width: 100%;
    order: 3;
  }
  .main-nav.is-open { display: block; }
  .main-nav ul { flex-direction: column; gap: 4px; padding: 10px 0 4px; }
  .site-header .wrap { flex-wrap: wrap; }
}

/* ==========================================================================
   Buttons
   ========================================================================== */

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 0.98rem;
  padding: 13px 24px;
  border-radius: 3px;
  text-decoration: none;
  border: 2px solid var(--ink);
  cursor: pointer;
  transition: transform 0.12s ease, box-shadow 0.12s ease;
}
.btn:hover { transform: translateY(-2px); }
.btn-primary {
  background: var(--mustard);
  color: var(--ink);
  box-shadow: 3px 3px 0 var(--ink);
}
.btn-primary:hover { color: var(--ink); box-shadow: 5px 5px 0 var(--ink); }
.btn-ghost {
  background: transparent;
  color: var(--ink);
}
.btn-ghost:hover { color: var(--ink); background: rgba(27,42,61,0.05); }
.btn-block { width: 100%; justify-content: center; }

/* ==========================================================================
   Hero
   ========================================================================== */

.hero {
  padding: 56px 0 64px;
  border-bottom: 1px dashed var(--line-strong);
}
.hero .wrap {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 48px;
  align-items: center;
}
.hero-copy .eyebrow { margin-bottom: 18px; }
.hero-copy h1 { margin-bottom: 18px; }
.hero-copy .lede {
  font-size: 1.13rem;
  color: var(--ink-soft);
  max-width: 46ch;
}
.hero-actions {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  margin-top: 26px;
}
.hero-note {
  margin-top: 16px;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--ink-soft);
}
.hero-art { position: relative; }

@media (max-width: 860px) {
  .hero .wrap { grid-template-columns: 1fr; }
  .hero-art { order: -1; max-width: 320px; margin: 0 auto; }
}

/* ==========================================================================
   Catalog Card component (signature element)
   ========================================================================== */

.catalog-card {
  background: var(--card);
  border: 1.5px solid var(--ink);
  border-radius: var(--radius);
  box-shadow: var(--shadow-card);
  padding: 22px 22px 20px;
  position: relative;
  transition: box-shadow 0.15s ease, transform 0.15s ease;
}
.catalog-card::before {
  content: "";
  position: absolute;
  top: 14px;
  left: -1.5px;
  width: 10px;
  height: 10px;
  background: var(--paper);
  border: 1.5px solid var(--ink);
  border-radius: 50%;
  box-shadow: 0 26px 0 0 var(--paper), 0 26px 0 1.5px var(--ink);
}
a.catalog-card { display: block; text-decoration: none; color: inherit; }
a.catalog-card:hover { box-shadow: var(--shadow-card-hover); transform: translateY(-3px); }

.catalog-card .call-number {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--teal-dark);
  letter-spacing: 0.06em;
  display: block;
  margin-bottom: 10px;
}
.catalog-card h3 {
  border-bottom: 1px dotted var(--line-strong);
  padding-bottom: 10px;
  margin-bottom: 10px;
}
.catalog-card p { color: var(--ink-soft); font-size: 0.95rem; margin-bottom: 0.6em; }
.catalog-card .card-cta {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--ink);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.card-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 22px;
  margin: 34px 0;
}
@media (max-width: 860px) {
  .card-grid { grid-template-columns: 1fr; }
}

/* Flag badges used inside cards/tables */
.flag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 3px 8px;
  border-radius: 2px;
  margin: 2px 6px 2px 0;
}
.flag-good { background: rgba(47,111,99,0.12); color: var(--teal-dark); border: 1px solid rgba(47,111,99,0.3); }
.flag-warn { background: rgba(217,164,65,0.18); color: var(--mustard-dark); border: 1px solid rgba(217,164,65,0.4); }
.flag-bad { background: rgba(181,80,47,0.1); color: var(--red-flag); border: 1px solid rgba(181,80,47,0.3); }

/* ==========================================================================
   Sections / prose
   ========================================================================== */

section { padding: 56px 0; }
section.tight { padding: 36px 0; }
.section-head { max-width: 640px; margin-bottom: 30px; }
.section-head h2 { margin-bottom: 10px; }
.section-head p { color: var(--ink-soft); }

.divider {
  border: none;
  border-top: 1px dashed var(--line-strong);
  margin: 0;
}

article.prose h2 {
  margin-top: 1.6em;
  padding-top: 0.2em;
}
article.prose h3 { margin-top: 1.4em; }
article.prose ul, article.prose ol { padding-left: 1.3em; }
article.prose li { margin-bottom: 0.5em; }
article.prose blockquote {
  margin: 1.6em 0;
  padding: 16px 20px;
  border-left: 3px solid var(--mustard);
  background: var(--card);
  border-radius: 0 3px 3px 0;
  font-style: italic;
  color: var(--ink-soft);
}

.byline {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--ink-soft);
  margin-bottom: 30px;
}
.byline .dot { width: 4px; height: 4px; border-radius: 50%; background: var(--line-strong); }

.article-header { padding: 44px 0 8px; }
.article-header .eyebrow { margin-bottom: 16px; }

/* Checklist */
.checklist { list-style: none; padding: 0; margin: 1.4em 0; }
.checklist li {
  display: flex;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px dotted var(--line);
}
.checklist li::before {
  content: "☐";
  font-size: 1.2rem;
  color: var(--teal-dark);
  line-height: 1;
}

/* Internal link callout */
.callout {
  background: var(--card);
  border: 1.5px solid var(--ink);
  border-radius: 3px;
  padding: 20px 22px;
  margin: 2em 0;
  box-shadow: var(--shadow-card);
}
.callout .eyebrow { margin-bottom: 10px; }
.callout p:last-child { margin-bottom: 0; }

/* CTA band */
.cta-band {
  background: var(--ink);
  color: var(--paper);
  padding: 54px 0;
}
.cta-band h2 { color: var(--paper); }
.cta-band p { color: #c7cfda; max-width: 56ch; }
.cta-band .btn-primary { box-shadow: 3px 3px 0 var(--mustard-dark); }
.cta-band .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 30px;
  flex-wrap: wrap;
}

/* ==========================================================================
   Download page — locker
   ========================================================================== */

.steps { counter-reset: step; margin: 40px 0; }
.step {
  display: grid;
  grid-template-columns: 56px 1fr;
  gap: 18px;
  padding: 22px 0;
  border-bottom: 1px dashed var(--line-strong);
}
.step:first-child { padding-top: 0; }
.step-num {
  counter-increment: step;
  font-family: var(--font-display);
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--mustard-dark);
}
.step-num::before { content: counter(step, decimal-leading-zero); }

.locker-card {
  background: var(--card);
  border: 2px solid var(--ink);
  border-radius: 4px;
  padding: 28px;
  box-shadow: var(--shadow-card);
  margin: 12px 0 8px;
}
.locker-card .eyebrow { margin-bottom: 14px; }
#cpa-locker {
  margin-top: 18px;
  padding: 26px 18px;
  border: 2px dashed var(--teal);
  border-radius: 3px;
  background: rgba(47,111,99,0.06);
  text-align: center;
  color: var(--teal-dark);
  font-family: var(--font-mono);
  font-size: 0.85rem;
}
.trust-row {
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
  margin-top: 22px;
  font-size: 0.85rem;
  color: var(--ink-soft);
}
.trust-row span { display: flex; align-items: center; gap: 6px; }

.guide-contents { background: var(--paper-dim); border-radius: 4px; padding: 24px 26px; margin: 2em 0; }
.guide-contents h3 { margin-bottom: 14px; }

/* ==========================================================================
   Pinnable image blocks
   ========================================================================== */

.pin-block {
  display: block;
  border-radius: 4px;
  overflow: hidden;
  box-shadow: var(--shadow-card);
  border: 1.5px solid var(--ink);
}
.pin-strip {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  margin: 30px 0;
}
@media (max-width: 860px) {
  .pin-strip { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 560px) {
  .pin-strip { grid-template-columns: 1fr; }
}

/* ==========================================================================
   Footer
   ========================================================================== */

.site-footer {
  border-top: 2px solid var(--ink);
  background: var(--paper-dim);
  padding: 44px 0 30px;
  margin-top: 60px;
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 32px;
  margin-bottom: 28px;
}
.footer-grid h4 {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-soft);
  margin-bottom: 12px;
}
.footer-grid ul { list-style: none; margin: 0; padding: 0; }
.footer-grid li { margin-bottom: 8px; }
.footer-grid a { color: var(--ink-soft); text-decoration: none; font-size: 0.92rem; }
.footer-grid a:hover { color: var(--teal-dark); }
.footer-brand p { color: var(--ink-soft); font-size: 0.9rem; max-width: 40ch; }
.footer-bottom {
  border-top: 1px dashed var(--line-strong);
  padding-top: 20px;
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
  font-size: 0.8rem;
  color: var(--ink-soft);
  font-family: var(--font-mono);
}
@media (max-width: 700px) {
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .footer-brand { grid-column: 1 / -1; }
}

/* Legal / simple content pages */
.legal main .prose-wrap { padding-top: 20px; padding-bottom: 60px; }

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .btn, .catalog-card { transition: none; }
}
