:root {
  --ink: #11100e;
  --muted: #5e5a52;
  --paper: #f6f3ea;
  --paper-deep: #ece7db;
  --gold: #ffcd00;
  --gold-soft: #ffe788;
  --blue: #163f5c;
  --line: rgba(17, 16, 14, 0.16);
  --max: 1200px;
  --radius: 18px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  color: var(--ink);
  background: var(--paper);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.55;
}
a { color: inherit; }
.skip-link {
  position: fixed;
  left: 1rem;
  top: -5rem;
  z-index: 20;
  padding: .7rem 1rem;
  background: white;
}
.skip-link:focus { top: 1rem; }

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 74px;
  padding: 0 max(24px, calc((100vw - var(--max)) / 2));
  color: white;
  background: rgba(17, 16, 14, .96);
  backdrop-filter: blur(14px);
}
.course-mark {
  display: flex;
  align-items: baseline;
  gap: .75rem;
  color: white;
  text-decoration: none;
  font-size: .78rem;
  letter-spacing: .08em;
  text-transform: uppercase;
}
.course-code { color: var(--gold); font-weight: 800; font-size: 1rem; }
nav { display: flex; gap: 1.6rem; }
nav a { color: white; text-decoration: none; font-size: .9rem; }
nav a:hover, nav a:focus-visible { color: var(--gold); }

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.55fr) minmax(300px, .7fr);
  gap: clamp(2rem, 6vw, 7rem);
  align-items: end;
  min-height: 720px;
  padding: clamp(5rem, 10vw, 9rem) max(24px, calc((100vw - var(--max)) / 2));
  color: white;
  background:
    linear-gradient(110deg, rgba(17,16,14,.96) 0%, rgba(17,16,14,.91) 50%, rgba(17,16,14,.72) 100%),
    radial-gradient(circle at 85% 15%, rgba(255,205,0,.35), transparent 32%),
    var(--ink);
}
.eyebrow {
  margin: 0 0 1rem;
  color: #766f61;
  font-size: .76rem;
  font-weight: 800;
  letter-spacing: .16em;
  text-transform: uppercase;
}
.hero .eyebrow { color: var(--gold); }
.hero h1 {
  max-width: 880px;
  margin: 0;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(3.3rem, 7vw, 6.7rem);
  font-weight: 400;
  letter-spacing: -.055em;
  line-height: .94;
}
.hero h1 span { color: var(--gold); }
.hero-summary { max-width: 700px; margin: 2rem 0 0; color: #d8d4cb; font-size: 1.12rem; }
.hero-actions { display: flex; flex-wrap: wrap; gap: .8rem; margin-top: 2.3rem; }
.button { display: inline-block; padding: .85rem 1.2rem; border: 1px solid var(--gold); text-decoration: none; font-weight: 750; }
.button.primary { background: var(--gold); color: var(--ink); }
.button.secondary { color: white; }
.button:hover, .button:focus-visible { transform: translateY(-2px); }
.hero-panel { padding: 1.4rem; border: 1px solid rgba(255,255,255,.22); background: rgba(255,255,255,.06); }
.panel-label { margin: 0 0 .5rem; color: var(--gold); font-size: .76rem; font-weight: 800; letter-spacing: .15em; text-transform: uppercase; }
.rhythm-row { display: grid; grid-template-columns: 64px 1fr; gap: .8rem; padding: 1rem 0; border-top: 1px solid rgba(255,255,255,.18); }
.rhythm-row .day { color: var(--gold); font-size: .8rem; font-weight: 800; letter-spacing: .12em; }
.rhythm-row strong, .rhythm-row small { display: block; }
.rhythm-row small { margin-top: .15rem; color: #aaa69d; }

.section { max-width: var(--max); margin: 0 auto; padding: clamp(5rem, 8vw, 8rem) 24px; }
.section + .section { border-top: 1px solid var(--line); }
.section-heading { max-width: 730px; margin-bottom: 2.5rem; }
.section-heading h2, .setup-copy h2 {
  margin: 0;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(2.5rem, 5vw, 4.4rem);
  font-weight: 400;
  letter-spacing: -.045em;
  line-height: 1;
}
.section-heading > p:last-child { color: var(--muted); }
.split-heading { display: flex; align-items: end; justify-content: space-between; gap: 2rem; max-width: none; }
.split-heading > p { max-width: 360px; margin: 0; }

.learning-grid { display: grid; grid-template-columns: repeat(4, 1fr); border-top: 1px solid var(--ink); }
.learning-grid article { padding: 1.5rem 1.5rem 1rem 0; }
.learning-grid article + article { padding-left: 1.5rem; border-left: 1px solid var(--line); }
.learning-grid span { display: block; color: var(--blue); font-size: .78rem; font-weight: 800; }
.learning-grid h3 { margin: 2.5rem 0 .6rem; font-size: 1.05rem; }
.learning-grid p { margin: 0; color: var(--muted); font-size: .93rem; }

.schedule-wrap { overflow-x: auto; border-top: 3px solid var(--ink); }
table { width: 100%; border-collapse: collapse; min-width: 880px; }
th, td { padding: .95rem .75rem; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
th { color: var(--muted); font-size: .72rem; letter-spacing: .1em; text-transform: uppercase; }
td:first-child { color: var(--blue); font-weight: 800; }
td a { color: var(--blue); font-weight: 750; text-underline-offset: 3px; }
.break-row { background: var(--paper-deep); }

.materials-section { max-width: none; padding-left: max(24px, calc((100vw - var(--max)) / 2)); padding-right: max(24px, calc((100vw - var(--max)) / 2)); background: var(--ink); color: white; }
.materials-section .eyebrow, .group-heading > span { color: var(--gold); }
.materials-section .section-heading > p:last-child, .group-heading p { color: #aaa69d; }
.material-group { padding: 2rem 0 4rem; border-top: 1px solid rgba(255,255,255,.2); }
.group-heading { display: grid; grid-template-columns: 55px 1fr; gap: 1rem; margin-bottom: 1.4rem; }
.group-heading > span { font-size: .8rem; font-weight: 800; }
.group-heading h3 { margin: 0; font-size: 1.55rem; }
.group-heading p { margin: .2rem 0 0; }
.card-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; background: rgba(255,255,255,.18); border: 1px solid rgba(255,255,255,.18); }
.material-card { min-height: 170px; padding: 1.3rem; background: #171613; text-decoration: none; transition: background .2s ease, color .2s ease; }
.material-card span, .material-card strong, .material-card em { display: block; }
.material-card span { color: var(--gold); font-size: .72rem; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; }
.material-card strong { margin-top: 1.3rem; font-family: Georgia, "Times New Roman", serif; font-size: 1.2rem; font-weight: 400; line-height: 1.25; }
.material-card em { margin-top: 1rem; color: #aaa69d; font-size: .78rem; font-style: normal; }
.material-card:hover, .material-card:focus-visible { background: var(--gold); color: var(--ink); outline: none; }
.material-card:hover span, .material-card:hover em, .material-card:focus-visible span, .material-card:focus-visible em { color: var(--ink); }
.project-steps { display: grid; grid-template-columns: repeat(5, 1fr); gap: .8rem; }
.project-steps a { display: flex; flex-direction: column; min-height: 125px; padding: 1rem; border: 1px solid rgba(255,255,255,.25); text-decoration: none; }
.project-steps a:hover, .project-steps a:focus-visible { border-color: var(--gold); background: rgba(255,205,0,.08); }
.project-steps span { margin-bottom: auto; color: var(--gold); font-weight: 800; }

.setup-section { display: grid; grid-template-columns: .8fr 1.2fr; gap: clamp(2rem, 7vw, 7rem); align-items: center; }
.setup-copy p:not(.eyebrow) { color: var(--muted); }
.text-link { color: var(--blue); font-weight: 750; text-underline-offset: 4px; }
.terminal { overflow: hidden; color: #e9e7e0; background: #191919; border-radius: var(--radius); box-shadow: 0 24px 50px rgba(17,16,14,.18); }
.terminal-bar { display: flex; align-items: center; gap: .45rem; padding: .8rem 1rem; background: #292929; }
.terminal-bar span { width: 10px; height: 10px; border-radius: 50%; background: #676767; }
.terminal-bar span:first-child { background: #ff605c; }
.terminal-bar span:nth-child(2) { background: #ffbd44; }
.terminal-bar span:nth-child(3) { background: #00ca4e; }
.terminal-bar strong { margin-left: .4rem; color: #aaa; font-size: .75rem; font-weight: 500; }
pre { margin: 0; padding: 2rem; overflow-x: auto; font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: .9rem; line-height: 1.9; }
pre code { font-family: inherit; }
code span { color: var(--gold); }

.policy-grid { display: grid; grid-template-columns: 1.2fr 1fr 1fr; gap: 1rem; }
.grade-card, .policy-card { padding: 1.5rem; border: 1px solid var(--line); background: rgba(255,255,255,.35); }
.grade-card h3, .policy-card h3 { margin: 0 0 1.4rem; font-size: 1.2rem; }
.grade-card dl { margin: 0; }
.grade-card dl div { display: flex; justify-content: space-between; gap: 2rem; padding: .7rem 0; border-top: 1px solid var(--line); }
.grade-card dd { margin: 0; color: var(--blue); font-weight: 800; }
.policy-number { display: inline-grid; place-items: center; width: 42px; height: 42px; margin-bottom: 2.2rem; color: var(--ink); background: var(--gold); border-radius: 50%; font-size: .78rem; font-weight: 900; }
.policy-card p { color: var(--muted); font-size: .92rem; }

footer { display: flex; justify-content: space-between; gap: 2rem; padding: 2.5rem max(24px, calc((100vw - var(--max)) / 2)); color: #a9a59c; background: var(--ink); }
footer strong, footer span { display: block; }
footer strong { color: var(--gold); }
footer p { margin: 0; }

.sr-only { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }

.guide-link { display: block; margin-top: 1.8rem; padding: 1rem 1.2rem; border: 1px solid var(--line); border-left: 4px solid var(--gold); background: rgba(255,255,255,.45); text-decoration: none; }
.guide-link span, .guide-link strong { display: block; }
.guide-link span { color: var(--muted); font-size: .72rem; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; }
.guide-link strong { margin-top: .3rem; color: var(--blue); }
.guide-link:hover, .guide-link:focus-visible { background: var(--gold-soft); }

.guide-hero {
  padding: clamp(4rem, 8vw, 6.5rem) max(24px, calc((100vw - var(--max)) / 2));
  color: white;
  background:
    linear-gradient(110deg, rgba(17,16,14,.96) 0%, rgba(17,16,14,.91) 55%, rgba(17,16,14,.74) 100%),
    radial-gradient(circle at 88% 18%, rgba(255,205,0,.32), transparent 34%),
    var(--ink);
}
.guide-hero .eyebrow { color: var(--gold); }
.guide-hero h1 {
  max-width: 900px;
  margin: 0;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(2.8rem, 6.4vw, 5.4rem);
  font-weight: 400;
  letter-spacing: -.05em;
  line-height: .98;
}
.guide-hero h1 span { display: block; color: var(--gold); }
.guide-needs { display: flex; flex-wrap: wrap; gap: .6rem; margin: 2rem 0 0; padding: 0; list-style: none; }
.guide-needs li { padding: .45rem .85rem; border: 1px solid rgba(255,255,255,.28); color: #e9e7e0; font-size: .86rem; }
.guide-needs li::before { content: "✓"; content: "✓" / ""; margin-right: .45rem; color: var(--gold); font-weight: 800; }

.guide-section { max-width: 980px; margin: 0 auto; padding: clamp(4rem, 7vw, 6rem) 24px; }
.guide-section + .guide-section { border-top: 1px solid var(--line); }
.guide-phase { max-width: 720px; margin-bottom: 2rem; }
.guide-phase h2 {
  margin: 0;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(2.2rem, 4.6vw, 3.6rem);
  font-weight: 400;
  letter-spacing: -.045em;
  line-height: 1;
}
.guide-phase > p:not(.eyebrow) { margin: 1rem 0 0; color: var(--muted); }
.guide-section :not(pre) > code { padding: .1em .35em; border-radius: 4px; background: var(--paper-deep); color: var(--ink); font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: .86em; }
.guide-section .terminal { box-shadow: 0 12px 28px rgba(17,16,14,.14); }
.guide-section .terminal pre { padding: 1.2rem 1.5rem; line-height: 1.8; }
.guide-section > .terminal { margin: 0 0 1.5rem; }
kbd { display: inline-block; min-width: 1.7em; padding: .05em .4em; border: 1px solid rgba(17,16,14,.28); border-bottom-width: 2px; border-radius: 5px; background: white; color: var(--ink); font-family: inherit; font-size: .8em; font-weight: 700; line-height: 1.5; text-align: center; }

.guide-steps { margin: 0; padding: 0; list-style: none; border-top: 3px solid var(--ink); }
.guide-step { display: grid; grid-template-columns: 56px minmax(0, 1fr); gap: 1.4rem; padding: 2rem 0; border-bottom: 1px solid var(--line); overflow-wrap: break-word; }
.step-number { display: grid; place-items: center; width: 46px; height: 46px; color: var(--ink); background: var(--gold); border-radius: 50%; font-weight: 900; }
.guide-step h3 { margin: .45rem 0 .8rem; font-size: 1.3rem; line-height: 1.3; }
.guide-step p { margin: 0 0 .9rem; color: var(--muted); }
.guide-step p strong, .trouble-card p strong, .guide-closing strong { color: var(--ink); }
.guide-step .terminal { margin: 1.2rem 0; }
.guide-step .guide-note { margin: 1.1rem 0 0; padding: .85rem 1.05rem; border-left: 4px solid var(--gold); background: rgba(255,205,0,.13); color: var(--ink); font-size: .94rem; }
.guide-step > div > :last-child { margin-bottom: 0; }

.trouble-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; }
.trouble-card { padding: 1.4rem; border: 1px solid var(--line); background: rgba(255,255,255,.35); overflow-wrap: break-word; }
.trouble-card h3 { margin: 0 0 .7rem; font-size: 1.02rem; line-height: 1.4; }
.trouble-card p { margin: 0; color: var(--muted); font-size: .93rem; }
.trouble-card.wide { grid-column: 1 / -1; }
.trouble-steps { margin: 1rem 0; padding-left: 1.4rem; }
.trouble-steps li { color: var(--muted); font-size: .93rem; }
.trouble-steps li + li { margin-top: .9rem; }
.trouble-steps li::marker { color: var(--ink); font-weight: 700; }
.trouble-steps p strong { color: var(--ink); }
.trouble-card .terminal { margin: .75rem 0; box-shadow: none; }
.trouble-card .terminal pre { padding: .9rem 1.1rem; font-size: .82rem; line-height: 1.7; }
.guide-closing { max-width: 720px; margin: 0 0 1.5rem; color: var(--muted); }

@media (max-width: 900px) {
  .hero { grid-template-columns: 1fr; min-height: auto; }
  .learning-grid { grid-template-columns: repeat(2, 1fr); }
  .learning-grid article:nth-child(3) { border-left: 0; }
  .card-grid { grid-template-columns: repeat(2, 1fr); }
  .project-steps { grid-template-columns: repeat(3, 1fr); }
  .setup-section { grid-template-columns: 1fr; }
  .policy-grid { grid-template-columns: 1fr 1fr; }
  .grade-card { grid-row: span 2; }
}

@media (max-width: 640px) {
  .site-header { position: static; align-items: flex-start; padding-top: 1rem; padding-bottom: 1rem; }
  .course-mark span:last-child { display: none; }
  nav { gap: .8rem; flex-wrap: wrap; justify-content: flex-end; }
  nav a { font-size: .78rem; }
  .hero { padding-top: 5rem; }
  .hero h1 { font-size: clamp(2.9rem, 15vw, 4.3rem); }
  .split-heading { display: block; }
  .split-heading > p { margin-top: 1rem; }
  .learning-grid, .card-grid, .policy-grid { grid-template-columns: 1fr; }
  .learning-grid article + article { padding-left: 0; border-left: 0; border-top: 1px solid var(--line); }
  .project-steps { grid-template-columns: 1fr 1fr; }
  .grade-card { grid-row: auto; }
  .guide-step { grid-template-columns: minmax(0, 1fr); gap: .8rem; }
  .trouble-grid { grid-template-columns: minmax(0, 1fr); }
  footer { display: block; }
  footer p { margin-top: 1rem; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition-duration: .01ms !important; }
}
