/* Blue Team course section. Matches the site's dark glass look; every
   selector is scoped under .bt-* so existing pages are untouched. */

.bt-root {
  --bt-panel: rgba(5, 12, 28, .72);
  --bt-panel-strong: rgba(3, 9, 22, .9);
  --bt-border: rgba(34, 211, 238, .22);
  --bt-text: #d1fae5;
  --bt-heading: #ecfeff;
  --bt-muted: #94b8b0;
  --bt-accent: #22c55e;
  --bt-accent-soft: #86efac;
  --bt-cyan: #22d3ee;
  --bt-warn: #fbbf24;
  --bt-bad: #f87171;
  --bt-radius: 18px;
  color: var(--bt-text);
  font-size: 17px;
  line-height: 1.6;
}

.card[hidden] {
  display: none !important;
}

/* Lets the course sidebar stick: hidden would make .main a scroll container. */
.main:has(#blueTeam.active) {
  overflow-x: clip;
}

#btCourseCard {
  --card-mini-bg: url("securitymini.jpg");
}

#btCourseCard h3 {
  overflow-wrap: normal;
  word-break: normal;
  hyphens: auto;
}

.bt-card-progress {
  display: grid;
  gap: 8px;
  margin: 14px 0 10px;
  font-size: 14px;
  color: #a7f3d0;
}

.bt-card-progress .bt-bar {
  height: 6px;
}

.bt-readbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  height: 3px;
  pointer-events: none;
}

.bt-readbar span {
  display: block;
  width: 0;
  height: 100%;
  background: linear-gradient(90deg, #22c55e, #22d3ee);
  box-shadow: 0 0 10px rgba(34, 211, 238, .6);
  transition: width .1s linear;
}

.bt-root a {
  color: var(--bt-cyan);
}

.bt-root code {
  font-family: "Cascadia Code", Consolas, "Courier New", monospace;
  font-size: .9em;
  padding: 1px 5px;
  border-radius: 6px;
  background: rgba(148, 163, 184, .16);
  color: #e0f2fe;
  overflow-wrap: anywhere;
}

/* ---------- header ---------- */

.bt-header {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px 20px;
  margin-bottom: 20px;
  padding: 14px 20px;
  border-radius: var(--bt-radius);
  background: var(--bt-panel);
  border: 1px solid var(--bt-border);
  backdrop-filter: blur(10px);
}

.bt-header-title {
  color: var(--bt-heading) !important;
  font-size: 20px;
  font-weight: 800;
  text-decoration: none;
  text-shadow: 0 0 14px rgba(34, 211, 238, .35);
}

.bt-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-left: auto;
}

.bt-tabs a {
  padding: 7px 12px;
  border-radius: 999px;
  color: var(--bt-text) !important;
  text-decoration: none;
  font-weight: 600;
  font-size: 14.5px;
}

.bt-tabs a:hover {
  background: rgba(34, 197, 94, .14);
}

.bt-tabs a.bt-active {
  background: #fff;
  color: #15803d !important;
}

.bt-nav-toggle {
  display: none;
}

/* ---------- layout & navigation ---------- */

.bt-layout {
  display: grid;
  grid-template-columns: 320px minmax(0, 1fr);
  gap: 20px;
  align-items: start;
}

.bt-nav {
  position: sticky;
  top: 16px;
  max-height: calc(100vh - 32px);
  overflow-y: auto;
  padding: 14px;
  border-radius: var(--bt-radius);
  background: var(--bt-panel);
  border: 1px solid var(--bt-border);
  backdrop-filter: blur(10px);
  scrollbar-width: thin;
}

.bt-nav-search input,
.bt-input {
  width: 100%;
  padding: 10px 14px;
  border-radius: 12px;
  border: 1px solid var(--bt-border);
  background: rgba(2, 18, 28, .8);
  color: var(--bt-heading);
  font-size: 16px;
}

.bt-nav-search {
  margin-bottom: 10px;
}

.bt-nav-month {
  border-top: 1px solid rgba(34, 211, 238, .12);
}

.bt-nav-month summary {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 6px 10px;
  padding: 12px 6px;
  cursor: pointer;
  color: var(--bt-heading);
  font-weight: 700;
  font-size: 15px;
  list-style: none;
}

.bt-nav-month summary::-webkit-details-marker {
  display: none;
}

.bt-nav-month-title {
  display: grid;
  line-height: 1.3;
}

.bt-nav-month-title small {
  color: var(--bt-muted);
  font-size: 11.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .05em;
}

.bt-nav-month-bar {
  grid-column: 1 / -1;
  height: 3px;
  border-radius: 999px;
  background: rgba(148, 163, 184, .16);
  overflow: hidden;
}

.bt-nav-month-bar span {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, var(--bt-accent), var(--bt-cyan));
}

.bt-nav-count {
  flex: none;
  color: var(--bt-accent-soft);
  font-variant-numeric: tabular-nums;
}

.bt-nav-week {
  margin: 4px 0 10px;
}

.bt-nav-week-title {
  padding: 4px 6px;
  color: var(--bt-accent-soft);
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .03em;
}

.bt-nav-module-title {
  padding: 0 6px 2px;
  color: var(--bt-muted);
  font-size: 13px;
}

.bt-nav-lesson {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  padding: 7px 8px;
  border-radius: 10px;
  color: var(--bt-text) !important;
  text-decoration: none;
}

.bt-nav-lesson:hover {
  background: rgba(34, 197, 94, .1);
}

.bt-nav-lesson.bt-active {
  background: rgba(34, 211, 238, .16);
  box-shadow: inset 3px 0 0 var(--bt-cyan);
}

.bt-nav-lesson-text {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.bt-nav-lesson-title {
  font-size: 14.5px;
  line-height: 1.35;
}

.bt-nav-lesson-meta {
  color: var(--bt-muted);
  font-size: 12.5px;
}

.bt-status {
  flex: none;
  width: 1.1em;
  text-align: center;
  font-size: 15px;
  line-height: 1.35;
}

.bt-status-not_started { color: var(--bt-muted); }
.bt-status-in_progress { color: var(--bt-warn); }
.bt-status-completed { color: var(--bt-accent); }

.bt-backdrop {
  display: none;
}

/* ---------- common blocks ---------- */

.bt-main {
  display: grid;
  gap: 18px;
  min-width: 0;
}

.bt-panel,
.bt-block {
  padding: 24px 28px;
  border-radius: var(--bt-radius);
  background: var(--bt-panel);
  border: 1px solid var(--bt-border);
  backdrop-filter: blur(10px);
  min-width: 0;
}

.bt-root h2 {
  color: var(--bt-heading);
  font-size: 28px;
  line-height: 1.25;
  margin-bottom: 10px;
  text-shadow: 0 0 14px rgba(34, 211, 238, .3);
}

.bt-root h3 {
  color: var(--bt-heading);
  font-size: 22px;
  line-height: 1.3;
  margin-bottom: 12px;
}

.bt-root h4 {
  color: var(--bt-accent-soft);
  font-size: 17px;
  margin: 18px 0 8px;
}

.bt-muted {
  color: var(--bt-muted);
  font-size: 15px;
}

.bt-kicker {
  color: var(--bt-accent-soft);
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .04em;
  margin-bottom: 6px;
}

.bt-warning {
  margin: 12px 0;
  padding: 10px 14px;
  border-radius: 12px;
  border: 1px solid rgba(251, 191, 36, .4);
  background: rgba(251, 191, 36, .1);
  color: #fde68a;
  font-size: 15px;
}

.bt-badge {
  display: inline-block;
  padding: 2px 10px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 600;
  background: rgba(148, 163, 184, .16);
  color: var(--bt-text);
  white-space: nowrap;
}

.bt-badge-required { background: rgba(34, 197, 94, .18); color: var(--bt-accent-soft); }
.bt-badge-optional { background: rgba(168, 85, 247, .2); color: #d8b4fe; }
.bt-badge-outline { background: rgba(251, 191, 36, .16); color: #fde68a; }

.bt-meta-line {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 8px;
  margin: 6px 0 12px;
  font-size: 15px;
}

.bt-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  padding: 10px 20px;
  border: none;
  border-radius: 12px;
  background: linear-gradient(135deg, #16a34a, #0891b2);
  color: #fff !important;
  font-size: 16px;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
  box-shadow: 0 10px 24px rgba(8, 145, 178, .25);
}

.bt-button:hover {
  filter: brightness(1.1);
}

.bt-button:disabled {
  opacity: .45;
  cursor: default;
  filter: none;
}

.bt-button-secondary {
  background: rgba(2, 18, 28, .8);
  border: 1px solid var(--bt-border);
  box-shadow: none;
  color: var(--bt-heading) !important;
}

.bt-link-button {
  border: none;
  background: none;
  color: var(--bt-cyan);
  text-decoration: underline;
  cursor: pointer;
  font: inherit;
}

.bt-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 12px;
}

.bt-upload {
  position: relative;
}

.bt-bar {
  height: 10px;
  border-radius: 999px;
  background: rgba(148, 163, 184, .18);
  overflow: hidden;
}

.bt-bar span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--bt-accent), var(--bt-cyan));
}

.bt-segmented {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 4px;
  padding: 4px;
  border-radius: 12px;
  background: rgba(2, 18, 28, .7);
  border: 1px solid var(--bt-border);
}

.bt-segmented button {
  padding: 7px 12px;
  border: none;
  border-radius: 9px;
  background: transparent;
  color: var(--bt-text);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
}

.bt-segmented button[aria-pressed="true"] {
  background: #fff;
  color: #15803d;
}

.bt-checklist {
  list-style: none;
  display: grid;
  gap: 6px;
}

.bt-checklist label,
.bt-inline-check {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  cursor: pointer;
}

.bt-checklist input,
.bt-inline-check input {
  flex: none;
  width: 18px;
  height: 18px;
  margin-top: 4px;
  accent-color: var(--bt-accent);
}

.bt-checklist input:checked + span {
  color: var(--bt-accent-soft);
}

.bt-list {
  padding-left: 22px;
}

.bt-list li {
  margin-bottom: 4px;
}

.bt-root :focus-visible {
  outline: 2px solid var(--bt-cyan);
  outline-offset: 2px;
}

/* ---------- home ---------- */

.bt-home {
  display: grid;
  gap: 18px;
}

.bt-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 24px;
  align-items: center;
  background:
    radial-gradient(circle at 92% 20%, rgba(34, 211, 238, .16), transparent 42%),
    radial-gradient(circle at 0% 100%, rgba(34, 197, 94, .14), transparent 45%),
    var(--bt-panel);
}

.bt-hero h2 {
  font-size: 32px;
}

.bt-subtitle {
  color: var(--bt-text);
  margin-bottom: 18px;
  max-width: 60ch;
}

.bt-hero-ring {
  display: grid;
  justify-items: center;
  gap: 6px;
  color: var(--bt-muted);
  font-size: 13px;
}

.bt-ring-track {
  fill: none;
  stroke: rgba(148, 163, 184, .18);
  stroke-width: 9;
}

.bt-ring-value {
  fill: none;
  stroke: url(#btRingGrad);
  stroke-width: 9;
  stroke-linecap: round;
  transform: rotate(-90deg);
  transform-origin: 50% 50%;
  transition: stroke-dashoffset .6s ease;
}

.bt-ring text {
  fill: var(--bt-heading);
  font-size: 22px;
  font-weight: 800;
}

.bt-hero-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 16px;
}

.bt-stat {
  display: flex;
  flex-direction: column;
  padding: 12px 14px;
  border-radius: 14px;
  background: rgba(2, 18, 28, .6);
}

.bt-stat b {
  color: var(--bt-heading);
  font-size: 28px;
  font-variant-numeric: tabular-nums;
}

.bt-stat small {
  color: var(--bt-muted);
  font-size: 16px;
  font-weight: 600;
}

.bt-stat span {
  color: var(--bt-muted);
  font-size: 14px;
}

.bt-continue .bt-button {
  margin-top: 4px;
}

.bt-upcoming {
  display: grid;
  gap: 6px;
  margin-top: 18px;
}

.bt-upcoming a {
  display: flex;
  gap: 8px;
  color: var(--bt-text) !important;
  text-decoration: none;
}

.bt-upcoming a:hover {
  color: var(--bt-heading) !important;
}

.bt-months {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: 12px;
}

.bt-month-card {
  display: grid;
  gap: 8px;
  align-content: start;
  padding: 16px;
  border-radius: 14px;
  background: rgba(2, 18, 28, .6);
  border: 1px solid rgba(148, 163, 184, .14);
  color: var(--bt-text) !important;
  text-decoration: none;
  transition: transform .2s ease, border-color .2s ease, background .2s ease;
}

.bt-month-card:hover {
  transform: translateY(-2px);
  border-color: rgba(34, 197, 94, .5);
  background: rgba(3, 32, 24, .6);
}

.bt-month-active { border-color: rgba(34, 211, 238, .4); }
.bt-month-done { border-color: rgba(34, 197, 94, .5); }

.bt-month-num {
  color: var(--bt-cyan);
  font-size: 22px;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
}

.bt-month-title {
  color: var(--bt-heading);
  font-size: 16px;
  line-height: 1.35;
}

.bt-month-card .bt-muted {
  font-size: 13.5px;
  line-height: 1.45;
}

.bt-month-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 10px;
  color: var(--bt-heading);
}

.bt-month-head span {
  color: var(--bt-accent-soft);
  font-variant-numeric: tabular-nums;
}

.bt-rules summary {
  cursor: pointer;
  color: var(--bt-heading);
  font-weight: 700;
}

.bt-rules ul {
  margin-top: 10px;
  padding-left: 22px;
}

/* ---------- lesson ---------- */

.bt-lesson {
  display: grid;
  gap: 18px;
  min-width: 0;
}

.bt-goal {
  margin: 8px 0;
}

.bt-prereq {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  margin: 10px 0;
  font-size: 15px;
}

.bt-prereq > span:first-child {
  color: var(--bt-muted);
}

.bt-chip {
  display: inline-flex;
  gap: 6px;
  align-items: center;
  padding: 3px 10px;
  border-radius: 999px;
  border: 1px solid var(--bt-border);
  background: rgba(2, 18, 28, .6);
  color: var(--bt-text) !important;
  text-decoration: none;
  font-size: 14px;
}

.bt-chip-plain {
  border-style: dashed;
}

.bt-toc {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 14px;
}

.bt-toc button {
  padding: 6px 12px;
  border-radius: 999px;
  border: 1px solid var(--bt-border);
  background: rgba(2, 18, 28, .6);
  color: var(--bt-text);
  font-size: 14px;
  cursor: pointer;
}

.bt-toc button:hover {
  border-color: var(--bt-accent);
  color: var(--bt-heading);
}

.bt-block {
  scroll-margin-top: 16px;
}

.bt-block > h3 {
  display: flex;
  align-items: center;
  gap: 12px;
  padding-bottom: 12px;
  margin-bottom: 16px;
  border-bottom: 1px solid rgba(148, 163, 184, .14);
}

.bt-block-num {
  display: inline-grid;
  place-items: center;
  min-width: 36px;
  height: 28px;
  padding: 0 8px;
  border-radius: 8px;
  background: rgba(34, 211, 238, .12);
  color: var(--bt-cyan);
  font-size: 14px;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
}

.bt-lesson-foot {
  display: grid;
  gap: 16px;
  justify-items: start;
}

.bt-done {
  color: var(--bt-accent-soft);
  font-weight: 700;
}

.bt-pager {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  width: 100%;
  font-size: 15px;
}

.bt-pager a {
  display: grid;
  gap: 4px;
  flex: 1 1 0;
  max-width: 48%;
  padding: 12px 16px;
  border-radius: 12px;
  border: 1px solid rgba(148, 163, 184, .18);
  background: rgba(2, 18, 28, .55);
  color: var(--bt-heading) !important;
  text-decoration: none;
  transition: border-color .2s ease, background .2s ease;
}

.bt-pager a:hover {
  border-color: rgba(34, 197, 94, .55);
  background: rgba(3, 32, 24, .6);
}

.bt-pager small {
  color: var(--bt-muted);
  font-size: 12.5px;
  text-transform: uppercase;
  letter-spacing: .04em;
}

.bt-pager-next {
  margin-left: auto;
  text-align: right;
}

/* Long-form Markdown text */

.bt-md {
  max-width: 76ch;
  overflow-wrap: break-word;
  line-height: 1.72;
}

.bt-md ul > li::marker {
  color: var(--bt-accent);
}

.bt-md ol > li::marker {
  color: var(--bt-cyan);
  font-weight: 700;
}

.bt-md h3,
.bt-md h4 {
  padding-left: 12px;
  border-left: 3px solid var(--bt-accent);
}

.bt-md hr {
  border: none;
  border-top: 1px solid rgba(148, 163, 184, .2);
  margin: 24px 0;
}

.bt-md em {
  color: #bae6fd;
}

.bt-md > * + * {
  margin-top: 12px;
}

.bt-md h1,
.bt-md h2,
.bt-md h3,
.bt-md h4,
.bt-md h5 {
  color: var(--bt-heading);
  font-size: 19px;
  margin-top: 26px;
  margin-bottom: 4px;
  text-shadow: none;
}

.bt-md p,
.bt-md li {
  color: var(--bt-text);
}

.bt-md ul,
.bt-md ol {
  padding-left: 24px;
}

.bt-md li + li {
  margin-top: 4px;
}

.bt-md strong {
  color: var(--bt-heading);
}

.bt-md blockquote {
  padding: 8px 14px;
  border-left: 3px solid var(--bt-cyan);
  background: rgba(34, 211, 238, .06);
  border-radius: 0 10px 10px 0;
}

.bt-code {
  max-width: 100%;
  border-radius: 12px;
  border: 1px solid rgba(148, 163, 184, .2);
  background: var(--bt-panel-strong);
  overflow: hidden;
}

.bt-code-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 6px 8px 6px 14px;
  border-bottom: 1px solid rgba(148, 163, 184, .14);
  background: rgba(148, 163, 184, .06);
  color: var(--bt-muted);
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .05em;
}

.bt-copy {
  padding: 4px 10px;
  border-radius: 7px;
  border: 1px solid rgba(148, 163, 184, .25);
  background: transparent;
  color: var(--bt-text);
  font-size: 12px;
  cursor: pointer;
  text-transform: none;
  letter-spacing: 0;
}

.bt-copy:hover {
  border-color: var(--bt-accent);
  color: var(--bt-heading);
}

.bt-md pre {
  max-width: 100%;
  margin: 0;
  overflow-x: auto;
  padding: 14px 16px;
  background: transparent !important;
  font-size: 14px;
  line-height: 1.55;
}

.bt-md .bt-code + *,
.bt-md * + .bt-code {
  margin-top: 14px;
}

.bt-md pre code,
.bt-md pre code.hljs {
  padding: 0;
  background: transparent;
  font-size: inherit;
  overflow-wrap: normal;
  white-space: pre;
}

.bt-table-wrap {
  max-width: 100%;
  overflow-x: auto;
  border-radius: 12px;
  border: 1px solid rgba(148, 163, 184, .2);
}

.bt-root table {
  width: 100%;
  border-collapse: collapse;
  font-size: 15px;
}

.bt-root th,
.bt-root td {
  padding: 9px 12px;
  border-bottom: 1px solid rgba(148, 163, 184, .16);
  color: var(--bt-text);
  font-size: 15px;
  vertical-align: top;
  text-align: left;
}

.bt-root th {
  color: var(--bt-heading);
  background: rgba(2, 18, 28, .85);
  font-size: 13.5px;
  text-transform: uppercase;
  letter-spacing: .03em;
}

.bt-root tbody tr:nth-child(even) td {
  background: rgba(148, 163, 184, .05);
}

.bt-root tbody tr:hover td {
  background: rgba(34, 211, 238, .06);
}

.bt-plain {
  white-space: pre-wrap;
  font-family: inherit;
}

/* ---------- quiz ---------- */

.bt-quiz-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 14px;
}

.bt-question {
  padding: 16px;
  border-radius: 14px;
  background: rgba(2, 18, 28, .55);
  border: 1px solid rgba(148, 163, 184, .16);
}

.bt-question.bt-right { border-color: rgba(34, 197, 94, .5); }
.bt-question.bt-wrong { border-color: rgba(248, 113, 113, .5); }

.bt-question-text {
  margin-bottom: 10px;
  color: var(--bt-heading) !important;
}

.bt-options {
  display: grid;
  gap: 8px;
}

.bt-option {
  display: flex;
  gap: 8px;
  align-items: flex-start;
  width: 100%;
  min-height: 44px;
  padding: 10px 14px;
  border-radius: 10px;
  border: 1px solid var(--bt-border);
  background: rgba(2, 18, 28, .7);
  color: var(--bt-text);
  font-size: 15.5px;
  text-align: left;
  cursor: pointer;
}

.bt-option:hover:not(:disabled) {
  border-color: var(--bt-accent);
  background: rgba(34, 197, 94, .1);
}

.bt-option:disabled {
  cursor: default;
}

.bt-option-letter {
  flex: none;
  color: var(--bt-muted);
  font-weight: 700;
}

.bt-option-correct {
  border-color: var(--bt-accent);
  background: rgba(34, 197, 94, .18);
  color: #dcfce7;
}

.bt-option-wrong {
  border-color: var(--bt-bad);
  background: rgba(248, 113, 113, .16);
  color: #fee2e2;
}

.bt-explanation {
  margin-top: 10px;
  padding: 10px 12px;
  border-radius: 10px;
  background: rgba(34, 211, 238, .08);
  font-size: 15px;
}

.bt-right .bt-explanation b { color: var(--bt-accent-soft); }
.bt-wrong .bt-explanation b { color: #fca5a5; }

.bt-quiz-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: 12px;
  color: var(--bt-muted);
  font-size: 15px;
}

.bt-quiz-result {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 16px;
  margin-top: 14px;
  padding: 14px 16px;
  border-radius: 14px;
  background: rgba(34, 197, 94, .12);
  border: 1px solid rgba(34, 197, 94, .4);
}

.bt-quiz-result b {
  color: var(--bt-heading);
  font-size: 18px;
}

.bt-attempts {
  margin-top: 12px;
  font-size: 15px;
}

.bt-attempts summary {
  cursor: pointer;
  color: var(--bt-muted);
}

.bt-attempts ul {
  margin-top: 6px;
  padding-left: 22px;
}

.bt-md .bt-question + .bt-question {
  margin-top: 12px;
}

/* ---------- assignments & portfolio ---------- */

.bt-assignment-form {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px 20px;
  margin-top: 18px;
  padding-top: 16px;
  border-top: 1px solid rgba(148, 163, 184, .16);
}

.bt-assignment-form label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 15px;
}

.bt-assignment-form .bt-wide {
  flex: 1 1 100%;
  flex-direction: column;
  align-items: stretch;
  gap: 6px;
}

.bt-root select,
.bt-assignment-form input[type="url"],
.bt-assignment-form textarea {
  padding: 8px 12px;
  border-radius: 10px;
  border: 1px solid var(--bt-border);
  background: rgba(2, 18, 28, .85);
  color: var(--bt-heading);
  font-size: 15px;
  font-family: inherit;
}

.bt-assignment-form textarea {
  resize: vertical;
  min-height: 120px;
  line-height: 1.5;
}

.bt-note-preview {
  flex: 1 1 100%;
}

.bt-note-preview summary {
  cursor: pointer;
  color: var(--bt-muted);
  font-size: 14px;
}

.bt-note-preview .bt-md {
  margin-top: 8px;
  padding: 12px;
  border-radius: 10px;
  background: rgba(2, 18, 28, .55);
}

.bt-assignment-list {
  list-style: none;
  margin-top: 16px;
  display: grid;
  gap: 8px;
}

.bt-assignment-list > li {
  padding: 12px 14px;
  border-radius: 12px;
  background: rgba(2, 18, 28, .55);
}

.bt-assignment-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 8px 14px;
}

.bt-assignment-row > a {
  color: var(--bt-text) !important;
  text-decoration: none;
  min-width: 0;
}

.bt-assignment-row > a:hover {
  color: var(--bt-heading) !important;
}

.bt-assignment-controls {
  display: flex;
  align-items: center;
  gap: 12px;
}

.bt-assignment-list .bt-muted {
  margin-top: 6px;
  overflow-wrap: anywhere;
}

.bt-portfolio-item h3 a {
  color: var(--bt-heading) !important;
}

/* ---------- glossary & search ---------- */

.bt-glossary {
  margin-top: 14px;
}

.bt-glossary td:first-child {
  white-space: nowrap;
}

.bt-search-results {
  list-style: none;
  display: grid;
  gap: 10px;
  margin-top: 10px;
}

.bt-search-results li {
  padding: 12px 14px;
  border-radius: 12px;
  background: rgba(2, 18, 28, .55);
}

.bt-search-results a {
  display: flex;
  gap: 8px;
  text-decoration: none;
}

.bt-search-results p {
  margin-top: 4px;
  color: var(--bt-muted);
  font-size: 14.5px;
  overflow-wrap: anywhere;
}

.bt-search-results mark {
  background: rgba(251, 191, 36, .35);
  color: inherit;
  border-radius: 3px;
}

#btSearchInput,
#btGlossarySearch {
  margin: 6px 0 10px;
}

/* ---------- toast ---------- */

.bt-toast {
  position: fixed;
  left: 50%;
  bottom: 24px;
  z-index: 1000;
  max-width: calc(100vw - 32px);
  padding: 12px 18px;
  border-radius: 12px;
  background: rgba(3, 32, 24, .95);
  border: 1px solid rgba(34, 197, 94, .5);
  color: #dcfce7;
  font-size: 15px;
  transform: translate(-50%, 140%);
  opacity: 0;
  transition: transform .25s ease, opacity .25s ease;
  pointer-events: none;
}

.bt-toast-show {
  transform: translate(-50%, 0);
  opacity: 1;
}

.bt-toast-error {
  background: rgba(60, 10, 10, .95);
  border-color: rgba(248, 113, 113, .6);
  color: #fee2e2;
}

/* ---------- responsive ---------- */

@media (max-width: 1200px) {
  .bt-layout {
    grid-template-columns: 270px minmax(0, 1fr);
  }
}

@media (max-width: 900px) {
  .bt-layout {
    grid-template-columns: minmax(0, 1fr);
  }

  /* Floats so the lesson list is reachable from the middle of a long
     lesson (the site's .main has overflow-x: hidden, so sticky won't work). */
  .bt-nav-toggle {
    position: fixed;
    left: 16px;
    bottom: 16px;
    z-index: 880;
    display: inline-flex;
    align-items: center;
    min-height: 48px;
    padding: 10px 18px;
    border-radius: 999px;
    border: 1px solid rgba(34, 197, 94, .6);
    background: rgba(3, 32, 24, .95);
    color: var(--bt-heading);
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
    box-shadow: 0 10px 30px rgba(0, 0, 0, .45);
  }

  .bt-lesson-foot {
    padding-bottom: 76px;
  }

  /* backdrop-filter would turn the header into the containing block of
     the fixed toggle button. */
  .bt-header {
    backdrop-filter: none;
    background: var(--bt-panel-strong);
  }

  .bt-tabs {
    margin-left: 0;
    width: 100%;
  }


  .bt-nav {
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    z-index: 900;
    width: min(86vw, 340px);
    max-height: none;
    border-radius: 0 var(--bt-radius) var(--bt-radius) 0;
    background: rgba(3, 9, 22, .97);
    transform: translateX(-105%);
    transition: transform .25s ease;
  }

  .bt-nav-open .bt-nav {
    transform: translateX(0);
  }

  .bt-nav-open .bt-backdrop {
    display: block;
    position: fixed;
    inset: 0;
    z-index: 899;
    background: rgba(0, 0, 0, .5);
  }
}

@media (max-width: 600px) {
  .bt-root {
    font-size: 16px;
  }

  .bt-header {
    padding: 12px;
  }

  .bt-header-title {
    font-size: 17px;
  }

  .bt-tabs {
    flex-wrap: nowrap;
    overflow-x: auto;
    scrollbar-width: none;
  }

  .bt-tabs a {
    flex: none;
    padding: 7px 11px;
    font-size: 14px;
  }

  .bt-panel,
  .bt-block {
    padding: 16px;
  }

  .bt-root h2 {
    font-size: 22px;
  }

  .bt-root h3 {
    font-size: 19px;
  }

  .bt-hero-stats {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
  }

  .bt-stat {
    padding: 10px;
  }

  .bt-stat b {
    font-size: 20px;
  }

  .bt-stat small {
    font-size: 13px;
  }

  .bt-stat span {
    font-size: 12.5px;
    line-height: 1.3;
  }

  .bt-ring {
    width: 104px;
    height: 104px;
  }

  .bt-pager {
    flex-direction: column;
  }

  .bt-pager a {
    max-width: none;
  }

  .bt-pager-next {
    text-align: left;
  }

  .bt-hero {
    grid-template-columns: minmax(0, 1fr);
  }

  .bt-hero-ring {
    order: -1;
    justify-self: start;
  }

  .bt-hero h2 {
    font-size: 24px;
  }

  .bt-question {
    padding: 12px;
  }

  .bt-quiz-nav .bt-button {
    padding: 8px 12px;
  }

  /* Glossary turns into stacked cards instead of a wide table. */
  .bt-glossary thead {
    display: none;
  }

  .bt-glossary,
  .bt-glossary tbody,
  .bt-glossary tr,
  .bt-glossary td {
    display: block;
    width: 100%;
  }

  .bt-glossary tr {
    padding: 10px 0;
    border-bottom: 1px solid rgba(148, 163, 184, .16);
  }

  .bt-glossary td {
    padding: 2px 0;
    border: none;
    white-space: normal !important;
  }
}

@media (prefers-reduced-motion: reduce) {
  .bt-nav,
  .bt-toast {
    transition: none;
  }
}
