.pg-catalog { --cc-ink: #111610; --cc-muted: #394239; --cc-edge: #526352; --cc-green: #154828; --cc-tint: #edf4ec; color: var(--cc-ink); }
[data-theme="dark"] .pg-catalog { --cc-ink: #f4f5f0; --cc-muted: #ccd4c9; --cc-edge: #94a18f; --cc-green: #b2d7b6; --cc-tint: #152018; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .pg-catalog { --cc-ink: #f4f5f0; --cc-muted: #ccd4c9; --cc-edge: #94a18f; --cc-green: #b2d7b6; --cc-tint: #152018; } }
.pg-catalog .lay { display: block; max-width: 1240px; margin: 0 auto; padding: 32px 28px 80px; }
.cc-catalog { font: 18px/1.55 var(--ui); min-width: 0; }
.cc-catalog h1 { font: 700 36px/1.15 var(--ui); margin: 0 0 16px; }
.cc-catalog h2 { font: 700 28px/1.25 var(--ui); margin: 0 0 20px; }
.cc-catalog h3 { font: 650 22px/1.35 var(--ui); margin: 0 0 8px; }
.cc-catalog h4 { font: 650 18px/1.4 var(--ui); margin: 0 0 8px; }
.cc-catalog p { margin: 8px 0 16px; max-width: 75ch; }
.cc-catalog a { color: inherit; text-underline-offset: 3px; }
.cc-catalog :is(input,select,button,summary) { font: 15px/1.4 var(--ui); }
.cc-catalog :is(a,button,input,select,summary,[tabindex]):focus-visible { outline: 3px solid var(--cc-green); outline-offset: 3px; }
.cc-filters { margin: 20px 0 12px; }
.cc-filters label { font: 15px/1.4 var(--ui); color: var(--cc-ink); }
.cc-search { display: grid; gap: 8px; max-width: 850px; }
.cc-catalog input[type="search"] { width: 100%; min-width: 0; font-size: 18px; padding: 13px 14px; }
.cc-catalog :is(input[type="search"],select,button) { border: 1px solid var(--cc-edge); border-radius: 6px; color: var(--cc-ink); background: var(--bg); min-height: 44px; }
.cc-filter-row { display: flex; gap: 20px; margin: 16px 0; }
.cc-filter-row label { display: grid; gap: 6px; min-width: 0; }
.cc-filter-row select { padding: 8px; width: 100%; }
.cc-action-row { display: flex; flex-wrap: nowrap; align-items: center; gap: 24px; overflow-x: auto; padding: 4px 22px 10px 2px; }
.cc-action-row > * { flex: 0 0 auto; white-space: nowrap; }
.cc-action-row label { display: flex; align-items: center; gap: 8px; min-height: 44px; }
.cc-action-row input { width: 20px; height: 20px; accent-color: var(--cc-green); }
.cc-action-row button { padding: 8px 14px; cursor: pointer; }
.cc-catalog :is(.cc-results,.cc-active-tag,.cc-measures,.cc-written,.cc-status,.cc-node-kind,.cc-progress label) { font-size: 15px; color: var(--cc-muted); }
.cc-subject { margin-top: 28px; }
.cc-course { padding: 18px 0; border-top: 1px solid var(--cc-edge); }
.cc-course > p { max-width: 75ch; }
.cc-catalog summary { cursor: pointer; min-height: 44px; padding: 10px 2px; color: var(--cc-ink); font-weight: 650; }
.cc-catalog :is(ol,ul) { padding-left: 24px; }
.cc-units { list-style: none; padding-left: 24px; margin: 0; border-left: 2px solid var(--cc-edge); }
.cc-unit { border-top: 1px solid var(--cc-edge); padding: 20px 0; min-width: 0; }
.cc-unit:first-child { border-top: 0; }
.cc-lesson { padding: 14px 0; }
.cc-progress { max-width: 500px; margin: 12px 0; }
.cc-progress label { display: grid; gap: 6px; }
.cc-progress progress { width: 100%; height: 10px; accent-color: var(--cc-green); }
.cc-map { margin-top: 48px; border-top: 1px solid var(--cc-edge); padding-top: 32px; }
.cc-map-scroll { max-height: 600px; overflow: auto; border: 1px solid var(--cc-edge); border-radius: 6px; padding: 20px; }
.cc-map-drawing { display: flex; position: relative; width: max-content; min-width: 100%; gap: 72px; align-items: flex-start; }
.cc-map .cc-map-layer { list-style: none; padding: 0; margin: 0; width: 240px; flex: 0 0 240px; display: grid; gap: 28px; z-index: 1; }
.cc-map-layer li { border: 1px solid var(--cc-edge); border-left: 4px solid var(--cc-green); background: var(--bg); border-radius: 6px; padding: 14px; }
.cc-node-kind { display: block; margin-bottom: 6px; }
.cc-node-link { display: block; font-weight: 650; }
.cc-map-layer li p { font-size: 15px; color: var(--cc-muted); margin-bottom: 0; }
.cc-map-edges { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; overflow: visible; }
.cc-map-edges path { fill: none; stroke: var(--cc-green); stroke-width: 2; }
.cc-estimates { margin-top: 32px; }
.cc-catalog [hidden] { display: none !important; }
@media (max-width: 600px) {
  .pg-catalog .lay { padding: 24px 18px 64px; }
  .cc-filter-row { gap: 12px; }
  .cc-filter-row > label { flex: 1; }
  .cc-units { padding-left: 14px !important; }
  .cc-map-scroll { max-height: none; padding: 14px; overflow: visible; }
  .cc-map-drawing { display: block; width: auto; }
  .cc-map .cc-map-layer { width: auto; margin: 0 0 24px; gap: 16px; padding-left: 12px; border-left: 2px solid var(--cc-edge); }
  .cc-map-edges { display: none; }
}
@media (prefers-reduced-motion: reduce) { .cc-catalog *, .cc-catalog { scroll-behavior: auto !important; animation: none !important; transition: none !important; } }
@media (forced-colors: active) { .cc-map-edges path { stroke: CanvasText; } .cc-map-layer li { border-color: CanvasText; } .cc-progress progress { forced-color-adjust: auto; } }

/* First capture pass: compact controls, honest edge cues, quieter phone map. */
.cc-catalog h2 { border: 0; padding-bottom: 0; }
.cc-action-row.cc-overflow { border-right: 3px solid var(--cc-edge); }
.cc-action-row input { outline: 1px solid var(--cc-edge); outline-offset: 0; }
.cc-course-map { margin-top: 28px; }
@media (min-width: 1000px) {
  .cc-filters { display: grid; grid-template-columns: 340px minmax(0, 1fr); column-gap: 24px; align-items: end; }
  .cc-search, .cc-active-tag { grid-column: 1 / -1; }
  .cc-filter-row { margin-bottom: 10px; }
  .cc-action-row { margin: 0; }
}
@media (max-width: 600px) {
  .cc-map-layer li { border: 0; border-bottom: 1px solid var(--cc-edge); border-radius: 0; padding: 8px 0 16px; }
}
