/* Course-specific editorial layout. Core controls, practice and print styles are shared. */
.brc-page {
  --as-ink: #0b202c;
  --as-rule: #28414e;
  --as-mint: #80e0c8;
  --as-amber: #edbe77;
}
.brc-page [id] {
  scroll-margin-top: 18px;
}
.as-hero .brc-hero-copy {
  max-width: 650px;
}
.as-hero h1 {
  font-size: clamp(2.55rem, 4.2vw, 4.75rem);
  line-height: 1.01;
  letter-spacing: -0.055em;
}
.as-hero h1 span {
  color: var(--as-mint);
  display: block;
}
.as-hero .brc-hero-copy > p {
  max-width: 48ch;
}
.as-meta {
  margin-top: 1.35rem;
  color: #c0d5d8;
  font-size: 0.91rem;
}
.as-trace {
  align-self: center;
  background: linear-gradient(138deg, #142d36, #081721);
  border: 1px solid #345761;
  border-radius: 8px;
  min-width: 0;
  margin: clamp(18px, 2.6vw, 40px);
  box-shadow: 0 14px 42px #01091140;
  overflow: hidden;
}
.as-figure-title {
  display: grid;
  gap: 4px;
  padding: clamp(15px, 2vw, 29px) clamp(14px, 2vw, 30px) 8px;
}
.as-figure-title > span {
  font: 600 0.79rem var(--mono);
  color: var(--as-mint);
  letter-spacing: 0.07em;
  text-transform: uppercase;
}
.as-figure-title > b {
  font-size: clamp(1.25rem, 2vw, 1.8rem);
  color: #e7f5f2;
  letter-spacing: -0.04em;
}
.as-trace svg {
  width: 100%;
  height: auto;
  display: block;
}
.as-legend {
  display: flex;
  gap: 0.6rem 1.3rem;
  flex-wrap: wrap;
  padding: 10px 5%;
  font-size: 0.86rem;
  color: #c5d5de;
}
.as-legend span:before {
  content: '';
  display: inline-block;
  width: 24px;
  border-bottom: 3px solid #73ecd0;
  margin: 0 6px 3px 0;
}
.as-legend span:nth-child(2):before {
  border-bottom: 3px dashed #f4bf70;
}
.as-trace figcaption {
  display: flex;
  justify-content: space-between;
  gap: 0.4rem 1rem;
  flex-wrap: wrap;
  border-top: 1px solid var(--as-rule);
  padding: 12px 5%;
  font-size: 0.88rem;
}
.as-audience {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(1rem, 4vw, 5rem);
  padding: 2rem 0;
  border-bottom: 1px solid var(--as-rule);
}
.as-audience h2 {
  font-size: 1.25rem;
}
.as-audience p,
.as-faq p {
  margin-top: 0.5rem;
}
.as-outline,
.as-faq,
.as-next {
  margin: 2.1rem 0;
}
.as-grid {
  margin-top: 1rem;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}
.brc-page .as-card {
  color: inherit;
  text-decoration: none;
  display: flex;
  flex-direction: column;
  background: #091726;
  border: 1px solid var(--border);
  border-radius: 9px;
  overflow: hidden;
}
.as-card:hover {
  border-color: var(--as-mint);
}
.as-thumbnail {
  height: 105px;
  background-color: #0d2530;
  background-image:
    linear-gradient(#18343f 1px, transparent 1px),
    linear-gradient(90deg, #18343f 1px, transparent 1px);
  background-size: 21px 21px;
  border-bottom: 1px solid var(--border);
  display: grid;
  place-items: center;
}
.as-module-art {
  height: 100%;
  color: var(--as-mint);
  max-width: 100%;
}
.as-card:nth-child(3n + 2) .as-module-art {
  color: var(--as-amber);
}
.as-card .brc-cardbody {
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: 8px;
  padding: 19px;
}
.as-card .ck-ring-row {
  margin-top: auto;
  padding-top: 10px;
}
.as-faq details {
  border-bottom: 1px solid var(--border);
  padding: 1rem 0;
}
.as-faq summary {
  cursor: pointer;
  font-weight: 650;
  color: var(--heading);
}
.brc-page .as-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
}
.as-head-art {
  height: 100px;
  min-width: 90px;
  flex: none;
}
.as-head > div:first-child {
  max-width: 850px;
}
.as-layout {
  display: grid;
  grid-template-columns: minmax(145px, 0.21fr) minmax(0, 1fr);
  gap: clamp(16px, 2.5vw, 38px);
  align-items: start;
}
.as-rail {
  position: sticky;
  top: 16px;
  border-left: 2px solid var(--as-rule);
  padding-left: 1rem;
}
.as-rail h2 {
  font-size: 1rem;
}
.as-rail a {
  display: block;
  padding: 0.45rem 0;
  font-size: 0.92rem;
  text-decoration: none;
}
.as-rail a:hover,
.as-faq summary:hover {
  text-decoration: underline;
}
.as-content {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 1.3rem;
  min-width: 0;
}
.as-panel {
  position: relative;
  min-width: 0;
  padding: clamp(16px, 2.4vw, 36px);
}
.as-panel > p {
  max-width: 82ch;
  margin: 0.75rem 0 1.2rem;
}
.as-panel > [data-lab],
.as-panel > [data-sheet],
.as-panel > [data-calc] {
  margin: 16px 0;
  min-width: 0;
}
.as-panel :is(input, select, canvas, svg) {
  max-width: 100%;
}
.as-panel :is(button, label, summary, td, th) {
  overflow-wrap: break-word;
}
.as-record {
  background: #0c202c;
  border: 1px solid var(--as-rule);
  padding: clamp(14px, 2vw, 25px);
  border-radius: 8px;
}
.as-record p {
  margin: 0.55rem 0;
}
.as-record-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 1rem 0;
}
.as-record-reading {
  border-left: 3px solid var(--as-mint);
  padding: 0.4rem 0.95rem;
  background: #0a1923;
}
.as-record-reading strong {
  color: #edfaf8;
}
.as-record-reading p {
  margin: 0.2rem 0;
}
.as-reading h3 {
  font-size: 1rem;
  margin: 1.4rem 0 0.5rem;
}
.as-reading li {
  margin: 0.45rem 0;
}
.as-reading ul {
  padding-left: 1.2rem;
}
.as-next {
  display: flex;
  gap: 1rem;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
}
.as-next [data-complete]:disabled {
  opacity: 1;
}
.as-panel h3 {
  line-height: 1.25;
}
.ck-opening,
.ck-end,
.ck-hub {
  min-width: 0;
}
.ck-end details {
  margin: 1rem 0;
}
.as-panel .ck-visit {
  position: absolute;
  top: 0;
  left: 0;
}
@media (max-width: 900px) {
  .as-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .as-layout {
    grid-template-columns: minmax(0, 1fr);
  }
  .as-rail {
    position: static;
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 3px 18px;
  }
  .as-rail h2 {
    width: 100%;
  }
  .as-rail a {
    padding: 0.2rem 0;
  }
}
@media (max-width: 720px) {
  .brc-page .as-hero,
  .as-audience {
    grid-template-columns: minmax(0, 1fr);
  }
  .as-trace {
    margin: 0 18px 18px;
  }
  .as-head-art {
    display: none;
  }
  .as-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
@media (max-width: 520px) {
  .as-grid {
    grid-template-columns: minmax(0, 1fr);
  }
  .as-thumbnail {
    height: 78px;
  }
  .as-hero .brc-hero-copy {
    padding: 22px 18px;
  }
  .as-hero h1 {
    font-size: 2.35rem;
  }
  .as-hero .brc-actions {
    gap: 12px;
  }
  .as-legend {
    font-size: 0.82rem;
  }
  .as-audience {
    gap: 1.3rem;
  }
  .as-rail a {
    width: 100%;
  }
  .as-panel {
    padding: 14px;
  }
  .as-next {
    justify-content: flex-start;
  }
}
@media print {
  .as-next {
    display: none !important;
  }
}
@media print {
  html.ck-print-module body :has(main.brc-page) > :not(main.brc-page):not(:has(main.brc-page)) {
    display: none !important;
  }
}

.as-record-reading fieldset {
  min-width: 0;
  margin: .8rem 0;
  padding: 0;
  border: 0;
}
.as-record-reading legend { font-weight: 600; }
.as-record-reading label {
  display: flex;
  align-items: baseline;
  gap: .6rem;
  padding: .4rem .2rem;
}
.as-record-reading input { flex: none; }
.as-record-reading [role=status] { margin-top: .6rem; }
.as-study-guide { margin-bottom: 1rem; }
.as-study-guide summary { cursor:pointer; font-weight:600; }

/* Two views of the same observation, with the correction hidden until requested. */
.as-mistakes {
  margin: 1.5rem 0;
  padding: clamp(.95rem, 2.2vw, 1.6rem);
  border: 1px solid #42606a;
  border-radius: .65rem;
  background: #0d222b;
  color: #e4f0f1;
}
.as-mistakes h3 { margin: 0 0 .85rem; }
.as-mistake-nav { display: flex; flex-wrap: wrap; align-items: end; gap: .5rem; margin-bottom: 1rem; }
.as-mistake-nav label { flex: 1 1 18rem; min-width: 0; }
.as-mistakes select, .as-mistakes button {
  background: #17333d; color: #eaf3f3; border: 1px solid #52747d; border-radius: .35rem;
  padding: .55rem .7rem; min-height: 44px; font: inherit;
}
.as-mistakes select { display: block; width: 100%; margin-top: .3rem; }
.as-mistakes button { cursor: pointer; }
.as-mistakes button:hover { background: #23474c; }
.as-mistake-panels { display: grid; grid-template-columns: repeat(auto-fit,minmax(min(100%,15rem),1fr)); gap: .8rem; }
.as-mistake-panels figure { margin: 0 0 .7rem; padding: .7rem; border: 1px solid #3e5b66; border-radius: .4rem; }
.as-mistake-art { width: 100%; aspect-ratio: 294 / 116; max-height: 9rem; margin: .3rem auto; }
.as-mistake-art svg { display: block; width: 100%; height: 100%; }
.as-mistake-panels figcaption { font-size: 1rem; }
.as-mistakes .as-mistake-note { margin: .65rem 0 0; color: #bce6da; }
.as-stations { padding: 1rem 0 1.4rem; }
.as-stations ul { margin: .65rem 0 0; padding: 0; display: grid; gap: .4rem 1rem; grid-template-columns: repeat(auto-fit,minmax(min(100%,15rem),1fr)); }
.as-stations li { list-style: none; min-width: 0; }
.as-stations a { color: #a0e1d1; display: inline-flex; align-items: center; min-height: 44px; text-decoration: underline; text-underline-offset: .23em; }


/* Site integration: global.css gives every heading Instrument Serif (400 only).
   Keep that for the page title so the course matches the rest of the site, and
   use DM Sans for the compact panel headings, where a light serif reads poorly. */
.brc-page h1 {
  font-family: 'Instrument Serif', Georgia, serif;
  font-weight: 400;
  letter-spacing: 0;
}
.brc-page :where(h2, h3, h4) {
  font-family: 'DM Sans', Arial, sans-serif;
  font-weight: 650;
  letter-spacing: -0.01em;
}
