:root {
  font-family:
    Inter,
    ui-sans-serif,
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    sans-serif;
  color: #111111;
  background: white;
  --accent: #e04b4b;
  --action: #c62828;
  --link: #a3161b;
  --charcoal: #111111;
  --gunmetal: #292929;
  --sub: #555555;
  --line: #d6d6d6;
  --soft: #f9f9f9;
  --green: #2e7d57;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
  font-size: 1rem;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}
a {
  color: var(--link);
  text-decoration: none;
}
a:hover {
  text-decoration: underline;
}
button,
input,
textarea {
  font: inherit;
}
button,
a,
input,
textarea {
  touch-action: manipulation;
}
button {
  cursor: pointer;
}
button:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}
a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible,
summary:focus-visible {
  outline: 3px solid #c62828;
  outline-offset: 3px;
}
.skip {
  position: fixed;
  top: -4rem;
  left: 0.5rem;
  z-index: 20;
  padding: 0.6rem;
  background: white;
}
.skip:focus {
  top: 0.5rem;
}
.shell {
  display: grid;
  grid-template-columns: 15.25rem minmax(0, 1fr);
  min-height: 100vh;
}
.sidebar {
  background: var(--charcoal);
  color: #cccccc;
  position: sticky;
  height: 100dvh;
  top: 0;
  display: flex;
  flex-direction: column;
}
.brand {
  display: flex;
  padding: 1.15rem 1.25rem;
  min-height: 5.4rem;
  align-items: center;
  border-bottom: 1px solid #383838;
}
.brand img {
  display: block;
  width: 100%;
  max-width: 12.1rem;
  height: auto;
}
.sidebar nav {
  padding: 1.25rem 0.65rem;
  display: grid;
  gap: 0.25rem;
}
.side-link,
.home-link {
  color: #dddddd;
  border-radius: 0.375rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.62rem 0.8rem;
  font-size: 0.94rem;
  font-weight: 500;
}
.side-link svg,
.button svg,
.text-button svg,
.source svg,
.empty-icon svg,
.list-icon svg {
  width: 1.15rem;
  height: 1.15rem;
  flex: none;
}
.side-link:hover,
.side-link.active,
.home-link:hover {
  background: var(--gunmetal);
  color: white;
  text-decoration: none;
}
.side-link.active {
  box-shadow: inset 3px 0 var(--accent);
}
.side-link.active svg {
  color: var(--accent);
}
#side-menu {
  display: flex;
  flex: 1;
  flex-direction: column;
}
.home-link {
  margin: auto 0.65rem 1rem;
}
.mobile-menu {
  display: none;
}
.content {
  min-width: 0;
}
.workspace-footer {
  max-width: 66rem;
  margin: 0 auto;
  padding: 0 1.25rem 1.5rem;
  font-size: 0.875rem;
}
.workspace-footer a,
.privacy-note a {
  text-decoration: underline;
  text-underline-offset: 0.15em;
}
.privacy-details {
  max-width: 43rem;
  font-size: 0.9375rem;
  line-height: 1.65;
}
.privacy-details p {
  margin-top: 0.5rem;
  color: var(--sub);
}
main:focus {
  outline: none;
}
.page-head {
  padding: 2.1rem clamp(1.25rem, 4vw, 3.4rem) 1.55rem;
  border-bottom: 1px solid var(--line);
  background: #fff;
}
.page-inner,
.stack {
  max-width: 66rem;
  margin: auto;
}
.stack {
  padding: 1.6rem clamp(1.25rem, 4vw, 3.4rem) 3.5rem;
  display: grid;
  gap: 1.15rem;
  box-sizing: content-box;
}
.page-head h1 {
  font-size: clamp(1.65rem, 3vw, 2.15rem);
  font-weight: 650;
  line-height: 1.22;
  letter-spacing: -0.04em;
  margin: 0;
  overflow-wrap: anywhere;
}
.page-head p {
  margin: 0.45rem 0 0;
  color: var(--sub);
}
h2,
h3,
p {
  margin: 0;
  overflow-wrap: anywhere;
}
h2 {
  font-size: 1.14rem;
  letter-spacing: -0.025em;
  line-height: 1.35;
}
h3 {
  font-size: 1rem;
  line-height: 1.4;
}
svg {
  display: block;
}
.crumbs {
  display: flex;
  gap: 0.5rem;
  align-items: center;
  flex-wrap: wrap;
  font-size: 0.85rem;
  margin: 0 0 0.7rem;
  color: var(--sub);
}
.crumbs a {
  color: var(--link);
}
.card {
  border: 1px solid var(--line);
  background: #fff;
  border-radius: 0.5rem;
  min-width: 0;
  overflow: hidden;
}
.card-accent {
  border-left: 3px solid var(--action);
}
.card-pad,
.card-head {
  padding: 1.2rem 1.35rem;
}
.card-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.85rem;
  flex-wrap: wrap;
  border-bottom: 1px solid var(--line);
}
.card-head p,
.muted,
.record-detail,
.help,
.source {
  color: var(--sub);
}
.card-head p {
  margin-top: 0.25rem;
}
.row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.65rem;
}
.spaced {
  justify-content: space-between;
}
.button,
.text-button {
  display: inline-flex;
  min-height: 2.6rem;
  align-items: center;
  justify-content: center;
  gap: 0.48rem;
  border: 1px solid #aaaaaa;
  border-radius: 0.4rem;
  background: white;
  color: var(--charcoal);
  padding: 0.5rem 0.9rem;
  font-weight: 600;
  font-size: 0.91rem;
  line-height: 1.35;
  text-align: center;
  text-decoration: none;
}
.button:hover,
.text-button:hover {
  background: #f5f5f5;
  text-decoration: none;
}
.button.primary {
  border-color: var(--action);
  background: var(--action);
  color: white;
}
.button.primary:hover {
  background: #a91f1f;
  border-color: #a91f1f;
}
.text-button {
  border: 0;
  color: var(--link);
  font-weight: 550;
  padding: 0.45rem 0.6rem;
}
.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.28rem;
  padding: 0.18rem 0.55rem;
  border: 1px solid var(--line);
  border-radius: 1rem;
  background: #f5f5f5;
  color: #505050;
  font-size: 0.76rem;
  font-weight: 600;
  white-space: nowrap;
}
.badge.complete {
  color: #225c41;
  background: #eaf4ef;
  border-color: #bdd9c9;
}
.label,
.meta-label {
  display: block;
  color: var(--sub);
  font-size: 0.76rem;
  text-transform: uppercase;
  font-weight: 650;
  letter-spacing: 0.055em;
}
.record {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.05rem 1.35rem;
  border-top: 1px solid var(--line);
}
.record:first-child {
  border: 0;
}
.record-main {
  min-width: 0;
}
.record-title {
  color: var(--charcoal);
  font-weight: 650;
}
.record-detail,
.help,
.source {
  font-size: 0.9rem;
  margin-top: 0.25rem;
  overflow-wrap: anywhere;
}
.record .button {
  min-height: 2.3rem;
}
.record-title-group {
  display: flex;
  align-items: center;
  gap: 0.7rem;
}
.list-icon,
.empty-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: none;
  color: var(--link);
  width: 2.4rem;
  height: 2.4rem;
  border-radius: 0.42rem;
  background: #fcecec;
}
.empty-icon {
  width: 2.7rem;
  height: 2.7rem;
}
.hero-content {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  flex-wrap: wrap;
}
.hero-content h2 {
  font-size: 1.23rem;
}
.facts {
  display: flex;
  gap: 1.6rem;
  flex-wrap: wrap;
  margin: 0.65rem 0 0;
}
.facts dd,
.facts dt {
  margin: 0;
}
.facts dd {
  font-size: 1rem;
  font-weight: 600;
}
.facts dt {
  font-size: 0.83rem;
  color: var(--sub);
}
.meter {
  width: 6.8rem;
  height: 6.8rem;
  flex: none;
  display: grid;
  place-items: center;
  position: relative;
}
.meter svg {
  width: 100%;
  height: 100%;
  transform: rotate(-90deg);
}
.meter-text {
  position: absolute;
  display: grid;
  justify-items: center;
  line-height: 1.22;
}
.meter-text b {
  font-size: 1.35rem;
  letter-spacing: -0.04em;
}
.meter-text small {
  color: var(--sub);
  font-size: 0.75rem;
}
.empty {
  display: grid;
  justify-items: start;
  gap: 0.65rem;
}
.empty h2 {
  font-size: 1.17rem;
}
.empty p {
  max-width: 49rem;
}
.section-intro {
  display: grid;
  gap: 0.3rem;
}
.stack.narrow {
  max-width: 52rem;
  margin-left: auto;
  margin-right: auto;
}
.detail-cols {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(15rem, 0.47fr);
  gap: 1.1rem;
  align-items: start;
}
.detail-body {
  display: grid;
  gap: 1rem;
}
.source {
  display: flex;
  gap: 0.5rem;
  align-items: flex-start;
}
.source svg {
  height: 1.05rem;
  margin-top: 0.15rem;
}
.reader {
  padding: clamp(1.2rem, 3.3vw, 2.1rem);
  display: grid;
  gap: 1rem;
}
.reader p {
  line-height: 1.72;
  white-space: pre-line;
}
.reader .source {
  line-height: 1.45;
}
.reader h2 {
  font-size: 1.35rem;
}
.lesson-sections {
  display: grid;
  gap: 1.1rem;
  min-width: 0;
}
.lesson-section {
  border-top: 1px solid #e8e2e2;
  padding-top: 0.8rem;
  overflow-wrap: anywhere;
}
.lesson-section h3 {
  margin: 0 0 0.4rem;
  font-size: 1.07rem;
  color: var(--charcoal);
}
.lesson-section p,
.lesson-section li {
  margin: 0;
  white-space: pre-wrap;
  line-height: 1.6;
}
.lesson-section ul,
.lesson-section ol {
  margin: 0;
  padding-inline-start: 1.35rem;
}
.lesson-section li + li {
  margin-top: 0.45rem;
}
.lesson-section > :is(p, ul, ol) + :is(p, ul, ol) {
  margin-top: 0.65rem;
}
.lesson-section li::marker {
  color: var(--link);
  font-weight: 650;
}
.reader-actions {
  padding: 1rem 1.35rem;
  border-top: 1px solid var(--line);
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
  justify-content: space-between;
}
.lesson-nav {
  list-style: none;
  margin: 0;
  padding: 0;
}
.lesson-nav a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.6rem;
  padding: 0.75rem 1rem;
  font-size: 0.9rem;
  color: var(--charcoal);
  border-bottom: 1px solid var(--line);
  overflow-wrap: anywhere;
}
.lesson-nav a:hover,
.lesson-nav a.current {
  background: #f6f6f6;
}
.lesson-nav a.current {
  font-weight: 600;
  box-shadow: inset 3px 0 var(--action);
}
.lesson-nav li:last-child a {
  border-bottom: 0;
}
.tick {
  color: var(--green);
  font-weight: 750;
}
.form-grid {
  display: grid;
  gap: 1.1rem;
}
.field-label {
  display: block;
  margin: 0 0 0.35rem;
  color: var(--charcoal);
  font-weight: 600;
}
.optional {
  color: var(--sub);
  font-size: 0.85rem;
  font-weight: 400;
}
.input,
textarea {
  color: var(--charcoal);
  border: 1px solid #a3a3a3;
  border-radius: 0.38rem;
  padding: 0.58rem 0.7rem;
  width: 100%;
  background: #fff;
}
.input {
  min-height: 2.65rem;
}
textarea {
  min-height: 10rem;
  resize: vertical;
}
.switcher {
  display: inline-flex;
  flex-wrap: wrap;
  background: #f2f2f2;
  padding: 0.2rem;
  gap: 0.2rem;
  border: 1px solid var(--line);
  border-radius: 0.45rem;
  max-width: 100%;
}
.switcher button {
  background: none;
  border: 1px solid transparent;
  padding: 0.45rem 0.8rem;
  border-radius: 0.32rem;
  font-weight: 550;
  color: var(--sub);
}
.switcher button[aria-pressed="true"] {
  background: white;
  color: var(--charcoal);
  border-color: var(--line);
}
.file-zone {
  padding: 1rem;
  border: 1px dashed #a3a3a3;
  border-radius: 0.45rem;
  background: var(--soft);
}
input[type="file"] {
  max-width: 100%;
  color: var(--sub);
}
input::file-selector-button {
  padding: 0.48rem 0.65rem;
  border: 1px solid #b4b4b4;
  border-radius: 0.3rem;
  background: #fff;
  color: var(--charcoal);
  cursor: pointer;
}
.file-zone .help {
  margin-top: 0.6rem;
}
.alert,
#storage-notice {
  border-left: 3px solid #b42324;
  background: #fff1f1;
  color: #7f1d1d;
  padding: 0.7rem 0.9rem;
  border-radius: 0.25rem;
}
.alert:empty {
  display: none;
}
.generate-note {
  font-size: 0.9rem;
  color: var(--sub);
  min-height: 0.1rem;
}
.question-card {
  padding: clamp(1.2rem, 3.5vw, 2rem);
}
.question-card fieldset {
  margin: 0;
  padding: 0;
  border: 0;
  min-width: 0;
}
.question-card legend {
  font-size: clamp(1.18rem, 2.3vw, 1.44rem);
  font-weight: 620;
  letter-spacing: -0.027em;
  line-height: 1.4;
  margin: 0 0 1rem;
  overflow-wrap: anywhere;
}
.choices {
  display: grid;
  gap: 0.5rem;
}
.choice {
  display: flex;
  align-items: flex-start;
  gap: 0.67rem;
  padding: 0.7rem 0.85rem;
  min-height: 2.85rem;
  border-radius: 0.4rem;
  border: 1px solid var(--line);
  line-height: 1.55;
  cursor: pointer;
  overflow-wrap: anywhere;
}
.choice input {
  margin: 0.33rem 0 0;
  accent-color: var(--action);
  flex: none;
}
.choice:has(input:checked) {
  border-color: var(--action);
  background: #fff2f2;
}
.choice:has(input:focus-visible) {
  outline: 2px solid var(--action);
  outline-offset: 1px;
}
.choice.locked {
  cursor: default;
}
.choice.correct {
  border-color: var(--green);
  background: #eef6f1;
}
.choice.wrong {
  border-color: #bb4b4b;
  background: #fff1f1;
}
.feedback {
  margin-top: 1rem;
  padding: 1rem;
  border-left: 3px solid #929292;
  background: var(--soft);
}
.feedback p {
  margin-top: 0.35rem;
}
.feedback .source {
  margin-top: 0.55rem;
}
.separator {
  border: 0;
  border-top: 1px solid var(--line);
  margin: 1rem 0;
}
.quiz-count {
  margin-bottom: 0.55rem;
}
.bar {
  height: 0.36rem;
  background: #e7e7e7;
  border-radius: 1rem;
  overflow: hidden;
}
.bar span {
  display: block;
  height: 100%;
  background: var(--action);
}
.card-head .bar {
  margin-top: 0.5rem;
}
.result-score {
  font-size: 2.1rem;
  line-height: 1.15;
  letter-spacing: -0.05em;
}
.results details {
  border-top: 1px solid var(--line);
  padding: 0.8rem 1.2rem;
}
.results summary {
  cursor: pointer;
  font-weight: 550;
  overflow-wrap: anywhere;
}
.results details p {
  margin: 0.4rem 0 0;
}
.loading {
  padding: 2rem;
  color: var(--sub);
}
.footnote {
  font-size: 0.85rem;
  color: var(--sub);
}
[hidden] {
  display: none !important;
}
#storage-notice {
  margin: 0.5rem;
}
.tabular {
  font-variant-numeric: tabular-nums;
}
@media (max-width: 900px) {
  .shell {
    grid-template-columns: 13.5rem minmax(0, 1fr);
  }
  .detail-cols {
    grid-template-columns: 1fr;
  }
  .page-head {
    padding-top: 1.5rem;
  }
  .hero-content {
    gap: 0.9rem;
  }
}
@media (max-width: 680px) {
  .shell {
    display: block;
  }
  .sidebar {
    position: relative;
    height: auto;
    display: grid;
    grid-template-columns: 1fr auto;
    align-items: center;
  }
  .brand {
    border: none;
    min-height: auto;
    padding: 0.65rem 1rem;
  }
  .brand img {
    max-width: 10.3rem;
    max-height: 3.5rem;
  }
  .mobile-menu {
    display: block;
    background: transparent;
    border: 1px solid #555555;
    color: #ededed;
    border-radius: 0.35rem;
    padding: 0.48rem;
    margin-right: 1rem;
  }
  .mobile-menu svg {
    width: 1.35rem;
    height: 1.35rem;
  }
  #side-menu {
    display: none;
    grid-column: 1/-1;
  }
  .sidebar.menu-open #side-menu {
    display: flex;
  }
  .sidebar nav {
    padding: 0.15rem 0.6rem 0.65rem;
  }
  .home-link {
    margin: 0.1rem 0.6rem 0.65rem;
  }
  .page-head,
  .stack {
    padding-left: 1.05rem;
    padding-right: 1.05rem;
  }
  .stack {
    padding-top: 1rem;
    gap: 0.85rem;
  }
  .card-head,
  .card-pad,
  .record {
    padding: 0.95rem 1rem;
  }
  .record {
    flex-wrap: wrap;
    gap: 0.65rem;
  }
  .button {
    min-height: 2.65rem;
  }
  .hero-content {
    align-items: center;
  }
  .meter {
    width: 5.5rem;
    height: 5.5rem;
  }
  .facts {
    gap: 1rem;
  }
  .reader-actions {
    padding: 1rem;
  }
  .card-head .button {
    min-height: 2.4rem;
  }
  .row.spaced {
    align-items: flex-start;
  }
}
.shell {
  grid-template-columns: 15rem minmax(0, 1fr);
}
.brand {
  min-height: 4.25rem;
  padding: 0.5rem 1rem;
}
.brand img {
  max-height: 3.2rem;
  max-width: 12rem;
  object-fit: contain;
  object-position: left center;
}
.side-context {
  display: grid;
  gap: 0.2rem;
  border-bottom: 1px solid #333333;
  padding: 0.95rem 1rem;
}
.side-context small {
  font-size: 0.78rem;
  color: #cccccc;
}
.side-context strong {
  font-size: 0.91rem;
  color: white;
  font-weight: 550;
}
.workspace-bar {
  min-height: 4.25rem;
  border-bottom: 1px solid var(--line);
  padding: 0.65rem 2rem;
  display: flex;
  align-items: center;
  gap: 1rem;
  justify-content: space-between;
}
.workspace-bar form {
  border: 1px solid var(--line);
  background: var(--soft);
  border-radius: 0.4rem;
  padding: 0.18rem 0.35rem 0.18rem 0.6rem;
  min-width: 0;
  display: flex;
  gap: 0.5rem;
  align-items: center;
}
.workspace-bar svg {
  width: 1rem;
  height: 1rem;
  color: var(--sub);
  flex: none;
}
.workspace-bar input {
  padding: 0.28rem 0;
  border: 0;
  background: transparent;
  min-width: 0;
  width: clamp(7rem, 20vw, 18rem);
  font-size: 0.92rem;
}
.workspace-bar button {
  border: 0;
  background: transparent;
  color: var(--link);
  padding: 0.25rem 0.35rem;
  font-size: 0.84rem;
  font-weight: 600;
}
.student-role {
  font-size: 0.86rem;
  color: var(--sub);
}
.page-head {
  background: #0b0b0b;
  border: 0;
  padding: 1.35rem 2rem;
}
.page-head h1 {
  color: white;
  font-weight: 550;
  font-size: clamp(1.4rem, 2.5vw, 1.65rem);
  letter-spacing: -0.027em;
}
.page-head p {
  color: #bbbbbb;
  margin-top: 0.25rem;
  font-size: 0.95rem;
}
.page-head .crumbs,
.page-head .crumbs a {
  color: #d6d6d6;
}
.page-head .crumbs {
  margin-bottom: 0.45rem;
  font-size: 0.8rem;
}
.stack {
  padding: 1.5rem 2rem 3.5rem;
}
.meter {
  width: 5.65rem;
  height: 5.65rem;
}
.meter-text b {
  font-size: 1.2rem;
}
.meter-text small {
  font-size: 0.72rem;
}
@media (max-width: 780px) {
  .shell {
    display: block;
  }
  .sidebar {
    position: relative;
    height: auto;
    display: grid;
    grid-template-columns: 1fr auto;
    align-items: center;
  }
  .brand {
    min-height: auto;
    border: none;
    padding: 0.6rem 1rem;
  }
  .brand img {
    max-width: 10.3rem;
    max-height: 3.15rem;
  }
  .mobile-menu {
    display: block;
    background: transparent;
    border: 1px solid #555555;
    color: #ededed;
    border-radius: 0.35rem;
    padding: 0.48rem;
    margin-right: 1rem;
  }
  .mobile-menu svg {
    width: 1.35rem;
    height: 1.35rem;
  }
  #side-menu {
    display: none;
    grid-column: 1/-1;
  }
  .sidebar.menu-open #side-menu {
    display: flex;
  }
  .sidebar nav {
    padding: 0.15rem 0.6rem 0.65rem;
  }
  .home-link {
    margin: 0.1rem 0.6rem 0.65rem;
  }
  .side-context {
    display: none;
  }
  .workspace-bar {
    padding: 0.5rem 1rem;
    min-height: 3rem;
  }
  .workspace-bar input {
    width: clamp(6rem, 41vw, 14rem);
  }
  .page-head {
    padding: 1.15rem 1.05rem;
  }
  .stack {
    padding: 1rem 1.05rem 2.8rem;
  }
  .student-role {
    font-size: 0.8rem;
  }
}
@font-face {
  font-family: Inter;
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url("./fonts/inter-variable.woff2") format("woff2");
}

.quote-panel {
  display: grid;
  gap: 1rem;
  padding: clamp(0.9rem, 3vw, 1.3rem);
  background: #f8f8f8;
  border: 1px solid #d5d5d5;
  border-left: 3px solid var(--action);
  border-radius: 0.5rem;
  scroll-margin-block: 1rem;
}
.quote-panel[hidden] {
  display: none;
}
.quote-panel h3 {
  font-size: 1.2rem;
  letter-spacing: -0.025em;
}
.quote-panel p {
  color: var(--sub);
  line-height: 1.55;
}
.quote-layout {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 14rem), 1fr));
  gap: 1rem;
}
.quote-inputs,
.quote-decision {
  display: grid;
  align-content: start;
  gap: 1rem;
  min-width: 0;
}
.delivery-details {
  list-style: none;
  margin: 0.65rem 0;
  padding: 0;
}
.delivery-details li + li {
  margin-top: 0.3rem;
}
.quote-decision {
  gap: 0.65rem;
  padding: 1rem;
  border: 1px solid #ecd4d4;
  border-radius: 0.4rem;
  background: #fff7f7;
}
.privacy-note {
  color: var(--sub);
  font-size: 0.875rem;
}
.quote-panel .quote-label {
  color: var(--charcoal);
  font-size: 0.9rem;
  font-weight: 650;
}
.quote-panel .quote-price {
  color: var(--charcoal);
  font-size: clamp(1.9rem, 4vw, 2.4rem);
  font-weight: 750;
  line-height: 1.18;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.04em;
}
.quote-payment-note {
  margin-top: 0.35rem;
  font-size: 0.875rem;
}
.quote-decision .button {
  min-height: 2.75rem;
}
.quote-facts {
  display: grid;
  margin: 0;
  border-block: 1px solid var(--line);
}
.quote-facts div {
  display: flex;
  flex-wrap: wrap;
  padding: 0.5rem 0;
  gap: 0.3rem 1rem;
  justify-content: space-between;
}
.quote-facts div + div {
  border-top: 1px solid var(--line);
}
.quote-facts dt {
  color: var(--sub);
}
.quote-facts dd {
  margin: 0;
  color: var(--charcoal);
  font-weight: 600;
}

.chapter-row {
  display: flex;
  align-items: center;
  gap: 0.9rem;
  padding: 1rem 1.35rem;
  border-top: 1px solid var(--line);
}
summary.chapter-row {
  list-style: none;
  cursor: pointer;
}
.chapter-row::-webkit-details-marker { display: none; }
summary.chapter-row:hover { background: var(--soft); }
.chapter-name {
  flex: 1;
  min-width: 0;
  display: grid;
  gap: 0.14rem;
  overflow-wrap: anywhere;
}
.chapter-name small, .chapter-row.is-locked { color: var(--sub); }
.chapter-symbol {
  display: grid;
  width: 2.25rem;
  height: 2.25rem;
  flex: none;
  place-items: center;
  border-radius: 0.4rem;
  background: #f3f3f3;
}
.chapter-symbol svg { width: 1.15rem; height: 1.15rem; }
.chapter-caret { font-size: 1rem; line-height: 1; }
.chapter-panel[open] .chapter-caret { transform: rotate(180deg); }
.chapter-lessons {
  padding-left: 1rem;
  border-top: 1px solid var(--line);
  border-left: 3px solid var(--action);
}
.source-action { flex-wrap: wrap; }
.source-action .button { min-height: 2.5rem; }
.source-action .button svg { margin: 0; }
@media (max-width: 680px) {
  .chapter-row { gap: 0.55rem; padding: 0.85rem 0.7rem; }
  .chapter-lessons { padding-left: 0; }
}

.pdf-page-detail { font-size: .83em; font-weight: normal; }

@media (max-width: 420px) {
  .mobile-menu { min-width: 44px; min-height: 44px; }
  .workspace-bar { gap: .6rem; }
  .workspace-bar form { flex: 1; }
  .workspace-bar input { flex: 1; width: 0; }
  .workspace-bar button { min-height: 2.65rem; }
  .reader-actions { flex-wrap: wrap; }
}
