:root {
  --navy: #152c4b;
  --ink: #202020;
  --red: #713936;
  --paper: #f2eddf;
  --gold: #b89852;
  --line: #b6ad98;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: #d8d3c6;
  color: var(--ink);
  font-family: Georgia, "Times New Roman", serif;
  line-height: 1.55;
}

.page-frame {
  max-width: 1080px;
  margin: 22px auto;
  background: #e9e3d5;
  border: 1px solid #76716a;
  box-shadow: 0 4px 0 #9d988c, 0 9px 22px #0003;
}

.site-header {
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 24px 28px 20px;
  background: linear-gradient(#f7f3e9, #ded6c6);
  border-bottom: 4px double var(--navy);
}

.crest {
  width: 64px;
  height: 72px;
  display: grid;
  place-items: center;
  color: #f6f0df;
  background: var(--navy);
  border: 4px double var(--gold);
  font: 700 22px Georgia;
  clip-path: polygon(0 0, 100% 0, 100% 78%, 50% 100%, 0 78%);
}

.eyebrow,
.section-label {
  margin: 0;
  color: var(--red);
  font: 700 11px Arial, sans-serif;
  letter-spacing: 2px;
  text-transform: uppercase;
}

.site-header h1 {
  margin: 0;
  color: var(--navy);
  font-size: clamp(34px, 6vw, 60px);
  line-height: 1;
}
.site-header h1 span { font-weight: normal; }
.motto { margin: 7px 0 0; color: #625b50; font-style: italic; }
.header-meta {
  margin-left: auto;
  color: #665f54;
  text-align: right;
  font: 12px/1.8 Arial, sans-serif;
}

.nav-bar {
  display: flex;
  flex-wrap: wrap;
  padding: 0 20px;
  background: var(--navy);
  border-bottom: 4px solid var(--gold);
}
.nav-bar a {
  padding: 10px 13px;
  color: #f7f0df;
  text-decoration: none;
  font: bold 12px Arial, sans-serif;
}
.nav-bar a:hover,
.nav-bar a:focus,
.nav-bar .active {
  background: var(--red);
  text-decoration: underline;
}

.announcement {
  margin: 18px 26px;
  padding: 10px 14px;
  background: #eee5bf;
  border: 1px solid #a89a69;
  box-shadow: inset 0 0 0 2px #f7f1d9;
  color: #493d2d;
  font-size: 14px;
}
.announcement span { font-size: 12px; }

.utility-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 18px;
  margin: 0 26px 20px;
  padding: 10px 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  font: 12px Arial, sans-serif;
}
.utility-links a {
  color: var(--navy);
  text-decoration: underline;
}
.utility-links a:hover,
.utility-links a:focus {
  color: var(--red);
}

.content-grid {
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 22px;
  margin: 0 26px;
}
.paper {
  background: var(--paper);
  border: 1px solid var(--line);
  box-shadow: inset 0 0 0 3px #e4ddcc;
}
.hero-panel,
.section { padding: 24px; }
.section { margin: 22px 26px; }
.hero-panel h2,
.section h2 {
  margin: 4px 0 10px;
  color: var(--navy);
  font-size: 30px;
  line-height: 1.1;
}
.signature { margin-top: 24px; color: #5d5549; }

.button {
  padding: 8px 12px;
  border: 2px outset #ddd8ca;
  background: #ddd8ca;
  color: var(--navy);
  font: 12px Georgia;
  cursor: pointer;
}
.button:active { border-style: inset; }
.hidden-note {
  display: none;
  margin: 16px 0 0;
  padding: 10px;
  background: #fffbea;
  border-left: 4px solid var(--red);
  font-size: 13px;
}
.hidden-note.visible { display: block; }

.notice-board {
  padding: 0 12px 12px;
  background: #d3c6a7;
  border: 5px ridge #a49473;
  transform: rotate(.3deg);
}
.board-heading {
  margin: 0 -12px 10px;
  padding: 8px;
  color: #fff;
  background: var(--red);
  text-align: center;
  font-weight: bold;
}
.notice-board article {
  display: flex;
  gap: 10px;
  padding: 12px 3px;
  border-bottom: 1px dashed #897d68;
}
.notice-board time { color: var(--red); font: bold 12px Arial; }
.notice-board p { margin: 3px 0 0; font-size: 13px; }
.board-footer { text-align: center; font-size: 12px; }
.notice-board a,
.site-footer a { color: inherit; }

.columns { display: grid; grid-template-columns: 1fr 1fr; gap: 28px; }
.faculty-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.faculty-card {
  padding: 15px;
  background: #dbd4c5;
  border: 1px solid #aaa18e;
  border-top: 4px solid var(--navy);
}
.portrait {
  width: 62px;
  height: 62px;
  display: grid;
  place-items: center;
  margin-bottom: 9px;
  background: #7f8e8b;
  color: #f7f0df;
  border: 3px double #f7f0df;
  font-weight: bold;
  font-size: 19px;
}
.portrait-image {
  object-fit: cover;
  object-position: center top;
  padding: 0;
  background: #7f8e8b;
}
.portrait-red { background: #844d49; }
.portrait-gold { background: #9c8250; }
.faculty-card h3 { margin: 0; color: var(--navy); font-size: 18px; }
.faculty-card p { margin: 2px 0 10px; font-size: 13px; }
.faculty-card small { font-style: italic; }

.directory { display: grid; grid-template-columns: 1fr 1fr; border-top: 1px solid var(--line); }
.directory div { padding: 12px; border-bottom: 1px solid var(--line); }
.directory span { display: block; color: #635b4f; font-size: 13px; }
.directory .missing { background: #e7dfce; color: #6d3935; }
.tiny-note { margin-bottom: 0; color: #6f6658; font-size: 12px; }
.construction { padding: 9px; border: 1px dashed var(--red); color: var(--red); font-style: italic; }
.campus-map { margin: 16px 0 22px; padding: 10px; background: #d7cfbd; border: 1px solid var(--line); box-shadow: 2px 2px 0 rgba(44, 58, 73, .18); }
.campus-map img { display: block; width: 100%; height: auto; border: 3px double #8b806e; }
.campus-map figcaption { padding: 7px 2px 0; color: #665e52; font-size: 12px; font-style: italic; }

.breadcrumbs {
  margin: 18px 26px 0;
  color: #6a6256;
  font: 12px Arial, sans-serif;
}
.breadcrumbs a { color: var(--navy); }
.page-intro { margin: 8px 26px 22px; }
.page-intro h2 { margin: 5px 0; color: var(--navy); font-size: 34px; }

.record-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.record-card {
  padding: 16px;
  background: #dbd4c5;
  border: 1px solid #aaa18e;
  border-top: 4px solid var(--navy);
}
.record-card h3 { margin: 0 0 5px; color: var(--navy); font-size: 20px; }
.record-card p { margin: 4px 0; font-size: 14px; }
.record-card a { color: var(--navy); }

.forum-thread {
  padding: 18px;
  background: #f8f3e7;
  border: 1px solid var(--line);
  border-top: 4px solid var(--navy);
}
.board-toolbar {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 14px;
  color: #f7f0df;
  background: var(--navy);
  font: 12px Arial, sans-serif;
}
.board-toolbar span { color: #d6b96b; }
.forum-board { border: 1px solid var(--line); border-top: 0; }
.forum-topic-card {
  display: grid;
  grid-template-columns: 1.1fr .9fr;
  gap: 18px;
  padding: 17px;
  background: #f8f3e7;
  border-bottom: 1px solid var(--line);
}
.forum-topic-card:last-child { border-bottom: 0; }
.topic-main h3 { margin: 4px 0 6px; color: var(--navy); font-size: 20px; }
.topic-main h3 a { color: var(--navy); }
.topic-main p { margin: 4px 0; font-size: 14px; }
.topic-main small,
.topic-answer small { color: #6f6658; font-size: 12px; }
.topic-answer {
  padding: 12px;
  background: #eee5bf;
  border-left: 3px solid #a89a69;
  font-size: 13px;
}
.topic-answer p { margin: 7px 0; }
.forum-thread + .forum-thread { margin-top: 18px; }
.forum-thread h3 { margin: 4px 0 14px; color: var(--navy); font-size: 22px; }
.forum-post {
  margin: 10px 0;
  padding: 11px 14px;
  background: #e9e1d1;
  border-left: 3px solid #aaa18e;
  font-size: 14px;
}
.forum-post p { margin: 3px 0; }
.forum-original { background: #ded5c3; border-left-color: var(--red); }
.accepted-answer {
  margin: 14px 0;
  padding: 13px 15px;
  background: #eee5bf;
  border: 2px solid #a89a69;
  box-shadow: inset 0 0 0 2px #f7f1d9;
  font-size: 14px;
}
.accepted-answer p { margin: 3px 0; }
.forum-replies { margin-top: 16px; }
.accepted-response { border-left-color: #a89a69; }

.data-table { width: 100%; border-collapse: collapse; background: #f8f3e7; font-size: 14px; }
.data-table th,
.data-table td { padding: 10px; border: 1px solid var(--line); text-align: left; vertical-align: top; }
.data-table th {
  background: #ded5c3;
  color: var(--navy);
  font-size: 12px;
  letter-spacing: .5px;
  text-transform: uppercase;
}
.notice-box { padding: 14px; background: #eee5bf; border: 1px solid #a89a69; }
.status-tag {
  display: inline-block;
  padding: 2px 6px;
  background: #d3c6a7;
  color: #493d2d;
  font: 11px Arial, sans-serif;
  text-transform: uppercase;
}

.lab-masthead {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: flex-start;
  padding-bottom: 15px;
  border-bottom: 1px solid var(--line);
}
.lab-masthead p { margin: 3px 0 0; }
.lab-stamp {
  padding: 7px 9px;
  border: 2px solid var(--red);
  color: var(--red);
  font: bold 10px Arial, sans-serif;
  letter-spacing: 1px;
  transform: rotate(2deg);
  white-space: nowrap;
}
.practice-selector {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 16px 0;
  padding: 7px;
  background: #d3c6a7;
  border: 1px solid #a49473;
}
.practice-tab {
  padding: 8px 10px;
  border: 1px outset #eee8d9;
  background: #e9e1d1;
  color: var(--navy);
  font: 12px Arial, sans-serif;
  cursor: pointer;
}
.practice-tab:hover,
.practice-tab:focus,
.practice-tab.active { background: var(--red); color: #fff; text-decoration: underline; }
.practice-workbench { padding: 18px; background: #f8f3e7; border: 1px solid var(--line); }
.practice-heading { display: flex; justify-content: space-between; gap: 18px; align-items: flex-start; }
.practice-heading h3 { margin: 3px 0 5px; color: var(--navy); font-size: 26px; }
.practice-heading p:last-child { margin: 0; font-size: 14px; }
.practice-score {
  min-width: 68px;
  padding: 8px;
  background: #eee5bf;
  border: 1px solid #a89a69;
  color: var(--red);
  text-align: center;
  font: bold 28px Georgia, serif;
}
.practice-score small { display: block; color: #6f6658; font: 10px Arial, sans-serif; text-transform: uppercase; }
.practice-stage {
  position: relative;
  min-height: 205px;
  display: grid;
  align-content: center;
  gap: 15px;
  margin: 18px 0 12px;
  padding: 28px;
  overflow: hidden;
  background: #dbe0d8;
  border: 5px ridge #9da399;
  text-align: center;
}
.stage-caption { color: var(--navy); font: bold 16px Arial, sans-serif; letter-spacing: 1px; text-transform: uppercase; }
.practice-meter {
  position: relative;
  height: 28px;
  max-width: 640px;
  margin: 0 auto;
  overflow: hidden;
  background: #f7f0df;
  border: 2px solid #71796d;
  text-align: left;
}
.practice-meter-fill { width: 0; height: 100%; background: repeating-linear-gradient(135deg, #718c79 0 8px, #91aa91 8px 16px); transition: width .12s linear; }
.practice-meter span { position: absolute; inset: 2px 8px; color: #27362b; font: 11px/22px Arial, sans-serif; text-align: center; }
.stage-rule { min-height: 22px; color: #4c544b; font-style: italic; }
.stage-bubble { position: absolute; top: 12px; right: 18px; color: #a78645; font-size: 25px; opacity: .45; }
.stage-bubble.cracked { transform: rotate(20deg) scale(1.4); opacity: 1; }
.practice-readout { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px; padding: 9px 11px; background: #e9e1d1; border: 1px solid #aaa18e; font: 12px Arial, sans-serif; }
.practice-controls { display: flex; justify-content: center; gap: 10px; margin: 16px 0 10px; }
.response-button { min-width: 112px; padding: 10px; border: 3px outset #ddd8ca; background: #ddd8ca; color: var(--navy); font: bold 12px Arial, sans-serif; cursor: pointer; }
.response-button span { display: inline-block; margin-right: 5px; color: var(--red); font: bold 16px Georgia, serif; }
.response-button:hover:not(:disabled), .response-button:focus:not(:disabled) { background: #eee5bf; }
.response-button:active:not(:disabled) { border-style: inset; }
.response-button:disabled { cursor: not-allowed; opacity: .45; }
.practice-answers { display: flex; justify-content: center; flex-wrap: wrap; gap: 8px; margin: 16px 0 10px; }
.practice-answers[hidden] { display: none; }
.answer-button { padding: 9px 13px; border: 2px outset #ddd8ca; background: #e9e1d1; color: var(--navy); font: 12px Arial, sans-serif; cursor: pointer; }
.answer-button:hover, .answer-button:focus { background: #eee5bf; }
.practice-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; margin-top: 12px; }
.practice-key-help { color: #6f6658; font: 11px Arial, sans-serif; }
.practice-feedback { min-height: 24px; margin: 12px 0 0; color: var(--red); font-weight: bold; }
.practice-feedback.success { color: #456b4e; }
.practice-feedback.error { color: var(--red); }
.practice-hidden { display: none; }
.route-notice { margin-bottom: 18px; padding: 12px 14px; background: #eee5bf; border: 1px solid #a89a69; }
.route-list { display: grid; gap: 12px; }
.route-step { display: grid; grid-template-columns: 58px 1fr; gap: 15px; padding: 16px; background: #dbd4c5; border: 1px solid #aaa18e; border-left: 5px solid var(--navy); }
.route-number { color: var(--red); font: bold 28px Georgia, serif; }
.route-step h3 { margin: 3px 0 6px; color: var(--navy); font-size: 22px; }
.route-step p { margin: 4px 0; font-size: 14px; }
.route-note { padding: 8px 10px; background: #eee5bf; border-left: 3px solid #a89a69; }
.route-details { margin-top: 12px; padding-top: 10px; border-top: 1px dotted #aaa18e; }
.route-details summary { color: var(--navy); cursor: pointer; font: bold 13px Arial, sans-serif; text-decoration: underline; }
.route-details summary:focus-visible { outline: 2px solid var(--red); outline-offset: 3px; }
.route-details div { padding: 7px 10px 0; border-left: 3px solid var(--red); }
.route-details p { margin: 6px 0; }
.guide-list { display: grid; gap: 12px; }
.guide-layout { display: grid; grid-template-columns: 190px minmax(0, 1fr); gap: 22px; align-items: start; }
.guide-sidebar { position: sticky; top: 14px; align-self: start; color: #5e564b; font-size: 12px; }
.document-meta { padding: 12px; background: #dbd4c5; border: 1px solid #aaa18e; border-top: 4px solid var(--navy); }
.document-meta dl { margin: 8px 0 0; }
.document-meta dl > div { padding: 5px 0; border-top: 1px dotted #aaa18e; }
.document-meta dt { color: #6f6658; font: 10px Arial, sans-serif; text-transform: uppercase; }
.document-meta dd { margin: 1px 0 0; color: var(--navy); font-size: 12px; }
.local-index { padding: 12px; background: #eee5bf; border: 1px solid #a89a69; }
.local-index ol { margin: 8px 0 0; padding: 0; list-style: none; }
.local-index li + li { border-top: 1px dotted #c2b78f; }
.local-index a { display: block; padding: 5px 0; color: var(--navy); }
.local-index a:hover, .local-index a:focus { color: var(--red); }
.local-index a span { color: var(--red); font-weight: bold; }
.desktop-index { margin-top: 12px; }
.mobile-index { display: none; }
.course-paths, .guide-sidebar-links { margin-top: 14px; padding: 12px; border-top: 1px solid var(--line); }
.course-paths p, .guide-sidebar-links p { margin: 7px 0; }
.course-paths a, .guide-sidebar-links a { color: var(--navy); }
.course-paths span { color: #6f6658; font-size: 12px; }
.guide-main { min-width: 0; }
.participant-masthead { display: flex; align-items: center; gap: 18px; margin-bottom: 18px; padding: 14px; background: #dbd4c5; border: 1px solid #aaa18e; }
.participant-masthead .portrait { flex: 0 0 110px; width: 110px; height: 138px; margin: 0; }
.participant-masthead h2 { margin: 0 0 4px; color: var(--navy); font-size: 28px; }
.participant-masthead p { margin: 4px 0; }
.guide-index { margin: 18px 0; padding: 14px 18px; background: #dbd4c5; border: 1px solid #aaa18e; }
.guide-index ol { columns: 2; margin: 8px 0 0; padding-left: 24px; }
.guide-index li { padding: 3px 0; font-size: 14px; }
.guide-index a { color: var(--navy); }
.guide-reference { margin: 18px 0; }
.guide-reference > p:not(.section-label) { font-size: 14px; }
.guide-section { display: grid; grid-template-columns: 58px 1fr; gap: 15px; padding: 16px; background: #dbd4c5; border: 1px solid #aaa18e; border-left: 5px solid var(--navy); }
.guide-section h3 { margin: 3px 0 6px; color: var(--navy); font-size: 22px; }
.guide-section > div:last-child > p { margin: 4px 0; font-size: 14px; }
.guide-brief { padding: 8px 10px; background: #eee5bf; border-left: 3px solid #a89a69; }
.guide-copy { margin-top: 10px; padding: 2px 12px; border-left: 3px solid var(--red); }
.guide-copy p { margin: 8px 0; font-size: 14px; }
.guide-practice { margin-top: 12px !important; padding: 8px 10px; background: #eee5bf; border-left: 3px solid #a89a69; }

.site-footer {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  padding: 16px 26px;
  background: var(--navy);
  color: #eee7d7;
  font: 11px Arial, sans-serif;
}
.visitor-counter { color: #d6b96b; }

@media (max-width: 700px) {
  .participant-masthead { align-items: flex-start; }
  .participant-masthead .portrait { flex-basis: 90px; width: 90px; height: 112px; }
  .page-frame { margin: 0; border-width: 0; }
  .site-header { padding: 18px 15px; }
  .header-meta { display: none; }
  .nav-bar { padding: 0; }
  .nav-bar a { flex: 1 1 50%; text-align: center; }
  .content-grid { grid-template-columns: 1fr; margin: 0 14px; }
  .section { margin: 18px 14px; padding: 18px; }
  .columns,
  .directory { grid-template-columns: 1fr; }
  .faculty-grid,
  .record-grid { grid-template-columns: 1fr 1fr; }
  .announcement,
  .utility-links { margin-left: 14px; margin-right: 14px; }
  .breadcrumbs,
  .page-intro { margin-left: 14px; margin-right: 14px; }
  .data-table { font-size: 13px; }
  .forum-topic-card { grid-template-columns: 1fr; gap: 10px; }
  .practice-controls { flex-wrap: wrap; }
  .practice-heading { flex-direction: column; }
  .practice-score { align-self: flex-start; }
  .practice-stage { padding: 20px 10px; }
  .lab-masthead { flex-direction: column; }
  .route-step { grid-template-columns: 1fr; gap: 4px; }
  .guide-section { grid-template-columns: 1fr; gap: 4px; }
  .guide-index ol { columns: 1; }
  .guide-layout { display: block; }
  .guide-sidebar { position: static; margin-bottom: 18px; }
  .desktop-index { display: none; }
  .mobile-index { display: block; margin-top: 12px; }
  .mobile-index summary { padding: 9px 12px; background: #eee5bf; border: 1px solid #a89a69; color: var(--navy); cursor: pointer; font: bold 12px Arial, sans-serif; }
  .mobile-index summary:focus-visible { outline: 2px solid var(--red); outline-offset: 3px; }
  .mobile-index .local-index { margin-top: 6px; }
  .site-header h1 { font-size: 34px; }
}

@media (max-width: 430px) {
  .faculty-grid,
  .record-grid { grid-template-columns: 1fr; }
  .site-footer { padding: 16px 14px; }
}
