:root {
  --bg: #ffffff;
  --ink: #17181a;
  --muted: #6b7280;
  --line: #e7e5df;
  --line-strong: #d6d3ca;
  --usf-green: #00543c;
  --usf-green-dark: #003b2a;
  --usf-gold: #fdbb30;
  --accent-soft: #eef3f0;
  --gold-soft: #fff6df;
  --max-width: 900px;
  --measure: 760px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

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

.skip-link {
  position: fixed;
  top: 12px;
  left: 12px;
  z-index: 100;
  padding: 9px 13px;
  border-radius: 8px;
  background: var(--usf-green);
  color: #ffffff;
  font-weight: 800;
  text-decoration: none;
  transform: translateY(-160%);
  transition: transform 0.16s ease;
}

.skip-link:focus {
  color: #ffffff;
  transform: translateY(0);
}

a {
  color: var(--usf-green);
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

a:hover {
  color: var(--usf-green-dark);
}

a:focus-visible,
button:focus-visible {
  outline: 3px solid rgba(0, 84, 60, 0.3);
  outline-offset: 3px;
}

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

.page {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 24px 24px 48px;
}

/* Brand lockup */
.topline {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding-bottom: 26px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--muted);
}

.brand:hover {
  color: var(--usf-green);
}

.brand-logo {
  display: block;
  border-radius: 6px;
}

.brand-name {
  font-size: 0.88rem;
  font-weight: 700;
  letter-spacing: 0.01em;
}

.term {
  color: var(--usf-green);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  white-space: nowrap;
}

/* Course header */
.site-header {
  max-width: var(--measure);
  margin-right: auto;
  margin-left: auto;
  padding: 8px 0 20px;
}

.route-internal .topline {
  padding-bottom: 14px;
}

.route-internal .site-header {
  padding: 0 0 12px;
}

.route-internal .site-header h1 {
  font-size: 1.45rem;
  letter-spacing: -0.01em;
}

.route-internal .site-header .subtitle {
  display: none;
}

h1,
h2,
h3,
h4 {
  color: var(--ink);
  line-height: 1.12;
}

h1 {
  margin: 0;
  font-size: clamp(2rem, 5vw, 3.15rem);
  font-weight: 800;
  letter-spacing: -0.02em;
}

.subtitle {
  margin: 8px 0 0;
  max-width: var(--measure);
  color: var(--muted);
  font-size: 1.04rem;
}

/* Navigation */
.nav {
  position: sticky;
  top: 0;
  z-index: 5;
  display: flex;
  justify-content: center;
  gap: 8px;
  flex-wrap: nowrap;
  padding: 7px 0 8px;
  border-bottom: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(8px);
  overflow-x: auto;
  scrollbar-width: none;
}

.nav::-webkit-scrollbar {
  display: none;
}

.nav a {
  position: relative;
  display: inline-flex;
  align-items: center;
  min-height: 38px;
  padding: 0 14px;
  border-radius: 999px;
  color: #48515c;
  font-size: 0.92rem;
  font-weight: 800;
  text-decoration: none;
  border: 1px solid transparent;
  white-space: nowrap;
  flex: 0 0 auto;
}

.nav a:hover {
  border-color: var(--line-strong);
  background: var(--accent-soft);
  color: var(--usf-green-dark);
}

.nav a.active {
  border-color: var(--usf-green);
  background: var(--usf-green);
  color: #ffffff;
  box-shadow: inset 0 -3px 0 var(--usf-gold);
}

/* Content */
.content {
  max-width: var(--measure);
  margin: 0 auto;
  padding: 40px 0 56px;
}

.content.wide {
  max-width: var(--max-width);
}

.content:focus {
  outline: none;
}

.content:focus-visible {
  outline: 3px solid rgba(0, 84, 60, 0.25);
  outline-offset: 8px;
}

.route-internal .content {
  padding-top: 30px;
}

.content h2 {
  margin: 0 0 20px;
  font-size: clamp(1.75rem, 4vw, 2.35rem);
  font-weight: 800;
  letter-spacing: -0.02em;
}

.content h3 {
  margin: 38px 0 10px;
  font-size: 1.16rem;
  font-weight: 800;
}

.content p {
  margin: 0 0 16px;
}

.content ul {
  margin: 0 0 18px;
  padding-left: 22px;
}

.content li {
  margin: 7px 0;
}

.lede {
  color: #3f4550;
  font-size: 1.1rem;
}

.notice {
  margin: 24px 0;
  padding: 14px 18px;
  border-left: 3px solid var(--usf-gold);
  background: #fdf7e8;
  color: #5a4a1f;
}

/* Definition-style rows */
.meta-list {
  display: grid;
  margin: 22px 0 0;
  border-top: 1px solid var(--line);
}

.meta-row {
  display: grid;
  grid-template-columns: 190px 1fr;
  gap: 18px;
  padding: 13px 2px;
  border-bottom: 1px solid var(--line);
}

.meta-row strong {
  font-weight: 600;
  color: #3f4550;
}

/* Tables */
.table-wrap {
  margin: 22px 0 30px;
  overflow-x: auto;
}

table {
  width: 100%;
  border-collapse: collapse;
  min-width: 0;
}

.schedule-table {
  min-width: 780px;
  table-layout: fixed;
}

.schedule-table th:nth-child(1) { width: 5%; }
.schedule-table th:nth-child(2) { width: 17%; }
.schedule-table th:nth-child(3) { width: 18%; }
.schedule-table th:nth-child(4) { width: 25%; }
.schedule-table th:nth-child(5) { width: 35%; }

.table-wrap:focus-visible {
  outline: 3px solid rgba(0, 84, 60, 0.25);
  outline-offset: 4px;
}

.table-secondary {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 0.76rem;
  line-height: 1.35;
}

th,
td {
  padding: 12px 13px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
}

th {
  color: var(--muted);
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  border-bottom: 1.5px solid var(--line-strong);
}

tbody tr:hover {
  background: #fafaf8;
}

/* Tags */
.tag {
  display: inline-flex;
  align-items: center;
  min-height: 22px;
  padding: 0 9px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  color: var(--usf-green-dark);
  font-size: 0.74rem;
  font-weight: 800;
  white-space: nowrap;
}

.tag.zoom {
  border-color: #b7d3c6;
  background: var(--accent-soft);
}

.tag.in-person {
  border-color: #efd58b;
  background: var(--gold-soft);
}

/* Cards */
.staff-grid,
.assignment-list {
  display: grid;
  gap: 14px;
  margin-top: 22px;
}

.staff-grid {
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.staff-card,
.assignment-card {
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  transition: border-color 0.16s ease, box-shadow 0.16s ease, transform 0.16s ease;
}

.staff-card:focus-within,
.assignment-card:focus-within {
  border-color: var(--usf-green);
  box-shadow: 0 0 0 3px rgba(0, 84, 60, 0.12);
}

.staff-card h3,
.assignment-card h3 {
  margin-top: 0;
}

.assignment-card .tag {
  min-height: 0;
  padding-top: 3px;
  padding-bottom: 3px;
  line-height: 1.4;
  white-space: normal;
}

.milestone-list {
  display: grid;
  gap: 8px;
  margin-top: 14px;
}

.milestone-list div {
  display: grid;
  grid-template-columns: 115px 1fr;
  gap: 12px;
  padding-top: 8px;
  border-top: 1px solid var(--line);
}

.milestone-list strong {
  color: #3f4550;
  font-size: 0.9rem;
  font-weight: 800;
}

.milestone-list span {
  color: var(--ink);
}

.staff-card p:last-child,
.assignment-card p:last-child {
  margin-bottom: 0;
}

/* Handouts */
.handout-sections {
  margin-top: 24px;
}

.handout-section {
  padding: 2px 0 24px;
}

.handout-section + .handout-section {
  padding-top: 24px;
  border-top: 1px solid var(--line);
}

.handout-section-head {
  display: grid;
  grid-template-columns: 104px minmax(0, 1fr);
  gap: 16px;
  align-items: start;
}

.handout-section-label {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 32px;
  padding: 3px 11px;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--usf-green-dark);
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.handout-section-head h3 {
  margin: 0;
  font-size: 1.2rem;
}

.handout-section-head p {
  margin: 5px 0 0;
  color: var(--muted);
  font-size: 0.92rem;
}

.handout-list {
  display: grid;
  gap: 8px;
  margin: 14px 0 0;
  padding: 0;
  list-style: none;
}

.handout-card {
  min-width: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #ffffff;
  transition: border-color 0.16s ease, box-shadow 0.16s ease, transform 0.16s ease;
}

.handout-card-link {
  display: grid;
  grid-template-columns: 94px minmax(0, 1fr) auto;
  gap: 16px;
  align-items: center;
  min-height: 80px;
  padding: 13px 16px;
  color: inherit;
  text-decoration: none;
}

.handout-card-link:hover {
  color: inherit;
}

.handout-card-link:focus-visible {
  outline: none;
}

.handout-type {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 28px;
  padding: 3px 9px;
  border: 1px solid #b7d3c6;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--usf-green-dark);
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.05em;
  line-height: 1.2;
  text-transform: uppercase;
  white-space: nowrap;
}

.handout-copy {
  min-width: 0;
}

.handout-title {
  display: block;
  margin: 0;
  color: var(--ink);
  font-size: 1rem;
  font-weight: 800;
  line-height: 1.28;
  overflow-wrap: anywhere;
}

.handout-summary {
  display: block;
  min-width: 0;
  margin-top: 3px;
  overflow: hidden;
  color: #59616b;
  font-size: 0.86rem;
  line-height: 1.35;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.handout-tail {
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
  min-width: 0;
}

.handout-updated {
  color: var(--muted);
  font-size: 0.76rem;
  white-space: nowrap;
}

.handout-arrow {
  color: var(--usf-green);
  font-size: 1.2rem;
  font-weight: 800;
  line-height: 1;
  transition: transform 0.16s ease;
}

.handout-card:focus-within {
  border-color: var(--usf-green);
  box-shadow: 0 0 0 3px rgba(0, 84, 60, 0.14);
}

.handout-meta {
  color: var(--muted);
  font-size: 0.84rem;
}

.handout-meta span {
  display: block;
}

@media (hover: hover) {
  .staff-card:hover,
  .assignment-card:hover {
    border-color: #a9c7ba;
    box-shadow: 0 7px 20px rgba(22, 24, 29, 0.06);
    transform: translateY(-1px);
  }

  .handout-card:hover {
    border-color: #8db9a6;
    background: #fbfdfc;
    box-shadow: 0 8px 22px rgba(22, 24, 29, 0.08);
    transform: translateY(-1px);
  }

  .handout-card:hover .handout-arrow {
    transform: translateX(3px);
  }
}

.download-link {
  display: inline-flex;
  align-items: center;
  min-height: 36px;
  padding: 0 14px;
  border: 1px solid var(--usf-green);
  border-radius: 999px;
  background: var(--usf-green);
  color: #ffffff;
  font-size: 0.88rem;
  font-weight: 800;
  text-decoration: none;
  box-shadow: inset 0 -3px 0 var(--usf-gold);
}

.download-link:hover {
  border-color: var(--usf-green-dark);
  background: var(--usf-green-dark);
  color: #ffffff;
}

.back-link {
  margin: 0 0 22px;
  font-size: 0.9rem;
}

.handout {
  max-width: var(--measure);
}

.handout h1 {
  font-size: clamp(1.9rem, 4.5vw, 2.7rem);
  font-weight: 800;
  margin: 0 0 16px;
  letter-spacing: -0.01em;
}

.handout h1,
.handout h2,
.handout h3,
.handout h4 {
  scroll-margin-top: 82px;
}

.handout [tabindex="-1"]:focus {
  outline: 3px solid rgba(0, 84, 60, 0.22);
  outline-offset: 5px;
}

.handout h2 {
  margin: 34px 0 12px;
  font-size: 1.5rem;
  font-weight: 800;
}

.handout h3 {
  margin: 26px 0 8px;
  font-size: 1.14rem;
}

.handout p {
  margin: 0 0 15px;
}

.handout ul,
.handout ol {
  margin: 0 0 16px;
  padding-left: 22px;
}

.handout li {
  margin: 6px 0;
}

.handout blockquote {
  margin: 20px 0;
  padding: 4px 18px;
  border-left: 3px solid var(--usf-gold);
  color: var(--muted);
}

.handout img {
  max-width: 100%;
  height: auto;
}

.handout table {
  min-width: 0;
}

.handout code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
  font-size: 0.88em;
}

.handout :not(pre) > code {
  padding: 1px 6px;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: #f6f6f3;
  color: var(--usf-green-dark);
}

.handout pre {
  position: relative;
  margin: 0 0 18px;
  padding: 16px 18px;
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfbf9;
  line-height: 1.5;
}

.handout pre code {
  padding: 0;
  border: 0;
  background: none;
  font-size: 0.86rem;
}

.copy-code-button {
  position: absolute;
  top: 8px;
  right: 8px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #ffffff;
  color: var(--usf-green-dark);
  font: 700 0.74rem Inter, system-ui, sans-serif;
  padding: 5px 8px;
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(22, 24, 29, .08);
}

.copy-code-button:hover {
  border-color: var(--usf-green);
  background: #f7faf7;
}

.handout-wide {
  max-width: var(--max-width);
}

.standalone-handout-shell {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.standalone-handout-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}

.standalone-handout-bar h2 {
  margin: 0;
}

.standalone-meta {
  margin: 8px 0 0;
}

.standalone-handout-bar a {
  flex: 0 0 auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 9px 12px;
  background: #ffffff;
  color: var(--usf-green-dark);
  font-weight: 800;
  text-decoration: none;
}

.standalone-handout-bar a:hover {
  border-color: var(--usf-green);
  background: #f7faf7;
}

.standalone-handout-frame {
  width: 100%;
  height: min(1080px, calc(100vh - 180px));
  min-height: 720px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f4f4f2;
}

.concept-slide {
  margin-top: 8px;
  padding: 26px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: linear-gradient(180deg, #ffffff 0%, #fbfbf8 100%);
}

.concept-slide-header {
  margin-bottom: 22px;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--line);
}

.concept-slide-header .eyebrow {
  margin: 0 0 8px;
  color: var(--usf-green);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.concept-slide-header h2 {
  margin: 0 0 8px;
  font-size: clamp(2rem, 5vw, 3rem);
}

.concept-slide-header p:last-child {
  max-width: 740px;
  margin: 0;
  color: #3f4550;
  font-size: 1.1rem;
}

.concept-compare {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 18px;
  margin-bottom: 18px;
}

.concept-panel {
  min-width: 0;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
}

.concept-panel h3 {
  margin: 0 0 14px;
  font-size: 1.32rem;
}

.table-panel h3 {
  color: var(--usf-green);
}

.topic-panel h3 {
  color: #8a5b00;
}

.mini-data-table {
  display: grid;
  overflow: hidden;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  font-size: 0.9rem;
}

.mini-data-table .table-row {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr 1fr;
}

.mini-data-table span {
  min-width: 0;
  padding: 10px 9px;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  overflow-wrap: anywhere;
}

.mini-data-table span:last-child {
  border-right: 0;
}

.mini-data-table .table-row:last-child span {
  border-bottom: 0;
}

.mini-data-table .table-head span {
  background: var(--accent-soft);
  color: var(--usf-green-dark);
  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.concept-note {
  margin: 14px 0 0;
  color: #3f4550;
}

.partition-card {
  margin-bottom: 10px;
  padding: 12px;
  border: 1px solid #efd58b;
  border-radius: 8px;
  background: var(--gold-soft);
}

.partition-card > strong {
  display: block;
  margin-bottom: 9px;
  color: #6f4b00;
  font-size: 0.92rem;
}

.event-row {
  display: grid;
  grid-template-columns: 80px minmax(0, 1fr) 56px;
  gap: 8px;
  align-items: center;
  margin-top: 7px;
  padding: 8px;
  border: 1px solid #ead79c;
  border-radius: 6px;
  background: #fffdf7;
  color: #31363d;
  font-size: 0.86rem;
}

.event-row span {
  min-width: 0;
  overflow-wrap: anywhere;
}

.event-row span:first-child,
.event-row span:last-child {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 800;
}

.topic-parts {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  margin-top: 12px;
}

.topic-parts span {
  min-width: 0;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  color: #3f4550;
  font-size: 0.82rem;
}

.topic-parts strong {
  display: block;
  color: var(--usf-green-dark);
  font-size: 0.76rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.concept-takeaways {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.concept-takeaways article {
  min-width: 0;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
}

.concept-takeaways h3 {
  margin: 0 0 8px;
  color: var(--usf-green-dark);
  font-size: 1rem;
}

.concept-takeaways p {
  margin: 0;
  color: #3f4550;
  font-size: 0.94rem;
  line-height: 1.5;
}

/* Footer */
.footer {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  max-width: var(--measure);
  margin-top: 20px;
  margin-right: auto;
  margin-left: auto;
  padding-top: 20px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.82rem;
}

@media (max-width: 700px) {
  .page {
    padding: 20px 14px 44px;
  }

  .topline {
    align-items: flex-start;
    gap: 8px;
    padding-bottom: 24px;
    flex-direction: column;
  }

  .site-header {
    padding: 4px 0 18px;
  }

  .brand-name {
    font-size: 0.86rem;
  }

  .nav {
    justify-content: flex-start;
    gap: 8px;
    flex-wrap: wrap;
    overflow-x: visible;
    padding: 7px 0 8px;
  }

  .nav a {
    min-height: 36px;
    padding: 0 11px;
    font-size: 0.84rem;
  }

  .meta-row {
    grid-template-columns: 1fr;
    gap: 2px;
  }

  .handout-section-head {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .handout-section-label {
    justify-self: start;
  }

  .standalone-handout-bar {
    align-items: flex-start;
    flex-direction: column;
  }

  .standalone-handout-frame {
    height: min(900px, calc(100vh - 210px));
    min-height: 520px;
  }

  .handout-card-link {
    grid-template-columns: 82px minmax(0, 1fr);
    gap: 10px 12px;
    min-height: 0;
    padding: 13px 14px;
  }

  .handout-type {
    align-self: start;
  }

  .handout-summary {
    display: -webkit-box;
    white-space: normal;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
  }

  .handout-tail {
    grid-column: 2;
    justify-content: space-between;
  }

  .concept-slide {
    padding: 18px;
  }

  .concept-compare,
  .concept-takeaways {
    grid-template-columns: 1fr;
  }

  .topic-parts {
    grid-template-columns: 1fr 1fr;
  }

  .event-row {
    grid-template-columns: 1fr;
  }

  .mini-data-table {
    overflow-x: auto;
  }

  .mini-data-table .table-row {
    min-width: 560px;
  }

  .footer {
    flex-direction: column;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
  }
}
