/* =====================================================================
   Gun safety classes — communityservices.cc module styles

   GUI skin (GUI.md): tokens come from assets/gui.css — one accent,
   hairline rules, pills instead of panels. This sheet adds the class
   module: course listings, the schedule, the registration note, and the
   safety curriculum.

   Every rule here derives its colours from the card's own --fg / --bg /
   --accent (set inline per card), so a card can wear either the dark
   steel band or the light paper band without a second set of rules.
   Nothing here is decorative colour: the green/amber chips come from
   the shared badge vocabulary (gui.css), never from this file.
   ===================================================================== */

/* ---------- the page column inside a fullscreen card ---------- */
.cls-page {
  flex: 1;
  min-height: 0;
  width: 100%;
  max-width: 46rem;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: .8rem;
}

/* ---------- scroll region: a long list must never be clipped ---------- */
.cls-scroll {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
  padding-right: .45rem;
}
.cls-scroll::-webkit-scrollbar { width: 6px; }
.cls-scroll::-webkit-scrollbar-thumb {
  background: color-mix(in srgb, var(--fg) 22%, transparent);
  border-radius: 999px;
}

/* ---------- soft panel: the inner "paper card" of the deck ---------- */
.cls-panel {
  border: 1px solid color-mix(in srgb, var(--fg) 18%, transparent);
  background: color-mix(in srgb, var(--fg) 6%, transparent);
  border-radius: 16px;
  padding: 1rem 1.1rem;
  margin: 0 0 1rem;
}
.cls-panel > :last-child { margin-bottom: 0; }

/* ---------- the list: one row per course, session or rule ---------- */
.cls-row {
  display: flex;
  gap: .85rem;
  align-items: flex-start;
  padding: .85rem 0;
  border-top: 1px solid color-mix(in srgb, var(--fg) 15%, transparent);
  text-decoration: none;
  color: inherit;
}
.cls-row:first-child { border-top: 0; }
a.cls-row:hover { background: color-mix(in srgb, var(--fg) 7%, transparent); }
.cls-row .cls-ic {
  flex: 0 0 42px;
  height: 42px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: color-mix(in srgb, var(--accent) 20%, transparent);
  color: var(--accent);
}
.cls-row .cls-ic svg { width: 1.15rem; height: 1.15rem; }
.cls-row .cls-body { flex: 1; min-width: 0; }
.cls-row .cls-title {
  font-weight: 800;
  font-size: 1.08rem;
  line-height: 1.3;
  margin: 0 0 .15rem;
}
.cls-row .cls-meta {
  margin: 0 0 .25rem;
  font-size: .82rem;
  letter-spacing: .04em;
  color: color-mix(in srgb, var(--fg) 62%, transparent);
}
.cls-row .cls-text {
  margin: 0;
  font-size: .96rem;
  line-height: 1.55;
  color: color-mix(in srgb, var(--fg) 80%, transparent);
}
.cls-row .cls-go {
  flex-shrink: 0;
  align-self: center;
  font-weight: 800;
  color: var(--accent);
  font-size: .9rem;
}

/* ---------- key/value rows: the schedule table ---------- */
.cls-kv {
  display: flex;
  gap: .8rem;
  align-items: baseline;
  padding: .6rem 0;
  border-top: 1px solid color-mix(in srgb, var(--fg) 15%, transparent);
  font-size: .97rem;
}
.cls-kv:first-child { border-top: 0; }
.cls-kv .cls-k {
  flex: 0 0 8.5rem;
  font-weight: 800;
  color: var(--accent);
  font-size: .88rem;
  letter-spacing: .04em;
}
.cls-kv .cls-v { flex: 1; min-width: 0; }
.cls-kv .cls-v small {
  display: block;
  color: color-mix(in srgb, var(--fg) 62%, transparent);
  font-size: .85rem;
  margin-top: .15rem;
}

/* ---------- numbered steps: registration, curriculum order ---------- */
.cls-step {
  display: flex;
  gap: .85rem;
  align-items: flex-start;
  padding: .8rem 0;
  border-top: 1px solid color-mix(in srgb, var(--fg) 15%, transparent);
}
.cls-step:first-child { border-top: 0; }
.cls-step .cls-n {
  flex: 0 0 30px;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  border: 1px solid color-mix(in srgb, var(--fg) 22%, transparent);
  color: var(--accent);
  font-weight: 800;
  font-size: .88rem;
}
.cls-step .cls-body { flex: 1; min-width: 0; }
.cls-step h3 { margin: .1rem 0 .2rem; font-size: 1.05rem; font-weight: 800; }
.cls-step p { margin: 0; font-size: .95rem; line-height: 1.55; color: color-mix(in srgb, var(--fg) 80%, transparent); }

/* ---------- the four rules: the spine of the curriculum ---------- */
.cls-rules { counter-reset: clsrule; }
.cls-rule {
  display: flex;
  gap: .85rem;
  align-items: flex-start;
  padding: .85rem 0;
  border-top: 1px solid color-mix(in srgb, var(--fg) 15%, transparent);
}
.cls-rule:first-child { border-top: 0; }
.cls-rule .cls-n {
  flex: 0 0 30px;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: color-mix(in srgb, var(--accent) 20%, transparent);
  color: var(--accent);
  font-weight: 800;
  font-size: .88rem;
}
.cls-rule .cls-body { flex: 1; min-width: 0; }
.cls-rule h3 { margin: .1rem 0 .2rem; font-size: 1.05rem; font-weight: 800; }
.cls-rule p { margin: 0; font-size: .95rem; line-height: 1.55; color: color-mix(in srgb, var(--fg) 80%, transparent); }

/* ---------- prose: a plain list of things, and a fine print ---------- */
.cls-list { margin: 0 0 .8rem; padding-left: 1.15rem; }
.cls-list li { margin: 0 0 .5rem; font-size: .97rem; line-height: 1.6; }
.cls-list li:last-child { margin-bottom: 0; }
.cls-list strong { font-weight: 800; }
.cls-note {
  margin: .6rem 0 0;
  font-size: .88rem;
  line-height: 1.55;
  color: color-mix(in srgb, var(--fg) 62%, transparent);
}
.cls-note code {
  font-family: ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;
  font-size: .82rem;
}

/* ---------- a lesson: number, title, minutes, then the steps ---------- */
.cls-lesson {
  padding: .85rem 0;
  border-top: 1px solid color-mix(in srgb, var(--fg) 15%, transparent);
}
.cls-lesson:first-child { border-top: 0; }
.cls-lesson-head {
  display: flex;
  gap: .7rem;
  align-items: baseline;
  flex-wrap: wrap;
  margin-bottom: .35rem;
}
.cls-lesson-head .cls-chip {
  flex: 0 0 auto;
  font-family: ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;
  font-size: .74rem;
  font-weight: 800;
  letter-spacing: .04em;
  color: var(--accent);
  border: 1px solid color-mix(in srgb, var(--accent) 45%, transparent);
  border-radius: 999px;
  padding: .1rem .5rem;
}
.cls-lesson-head h3 {
  flex: 1 1 12rem;
  margin: 0;
  font-size: 1.04rem;
  font-weight: 800;
  line-height: 1.3;
}
.cls-lesson-head .cls-time {
  flex: 0 0 auto;
  font-size: .78rem;
  font-weight: 800;
  letter-spacing: .05em;
  text-transform: uppercase;
  color: color-mix(in srgb, var(--fg) 58%, transparent);
  white-space: nowrap;
}
.cls-ol {
  margin: .2rem 0 0;
  padding-left: 1.35rem;
  font-size: .95rem;
  line-height: 1.6;
  color: color-mix(in srgb, var(--fg) 80%, transparent);
}
.cls-ol li { margin: 0 0 .35rem; }
.cls-ol li:last-child { margin-bottom: 0; }
.cls-ol strong { font-weight: 800; color: var(--fg); }
.cls-say {
  margin: .35rem 0 0;
  font-size: .9rem;
  font-style: italic;
  line-height: 1.55;
  color: color-mix(in srgb, var(--fg) 70%, transparent);
}
.cls-say::before { content: "\201C"; }
.cls-say::after { content: "\201D"; }

/* ---------- a drill: what you need, what you do, how you know ---------- */
.cls-drill {
  border-left: 3px solid var(--accent);
  padding: .1rem 0 .1rem .85rem;
  margin: .9rem 0 0;
}
.cls-drill-head {
  display: flex;
  gap: .6rem;
  align-items: baseline;
  flex-wrap: wrap;
  margin-bottom: .3rem;
}
.cls-drill-head .cls-chip {
  font-family: ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;
  font-size: .74rem;
  font-weight: 800;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--accent);
}
.cls-drill-head h3 { margin: 0; font-size: 1rem; font-weight: 800; }
.cls-drill dl { margin: 0; }
.cls-drill dt {
  font-size: .78rem;
  font-weight: 800;
  letter-spacing: .05em;
  text-transform: uppercase;
  color: color-mix(in srgb, var(--fg) 55%, transparent);
  margin-top: .4rem;
}
.cls-drill dd {
  margin: .1rem 0 0;
  font-size: .93rem;
  line-height: 1.55;
  color: color-mix(in srgb, var(--fg) 80%, transparent);
}

/* ---------- instructor notes: for the person at the front of the room ---------- */
.cls-instr {
  border: 1px dashed color-mix(in srgb, var(--fg) 28%, transparent);
  border-radius: 14px;
  padding: .8rem .95rem;
  margin: 1rem 0 0;
  background: color-mix(in srgb, var(--fg) 4%, transparent);
}
.cls-instr > .cls-title {
  margin: 0 0 .4rem;
  font-size: .78rem;
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--accent);
}
.cls-instr ul { margin: 0; padding-left: 1.1rem; }
.cls-instr li {
  margin: 0 0 .3rem;
  font-size: .92rem;
  line-height: 1.55;
  color: color-mix(in srgb, var(--fg) 80%, transparent);
}
.cls-instr li:last-child { margin-bottom: 0; }

/* ---------- a checklist: tick boxes you can read in the doorway ---------- */
.cls-check { margin: 0 0 1rem; }
.cls-check > .cls-title {
  margin: 0 0 .35rem;
  font-size: 1rem;
  font-weight: 800;
}
.cls-check ul { margin: 0; padding: 0; list-style: none; }
.cls-check li {
  position: relative;
  padding: .28rem 0 .28rem 1.6rem;
  font-size: .95rem;
  line-height: 1.55;
  color: color-mix(in srgb, var(--fg) 82%, transparent);
}
.cls-check li::before {
  content: "";
  position: absolute;
  left: 0;
  top: .52rem;
  width: .78rem;
  height: .78rem;
  border: 1px solid color-mix(in srgb, var(--fg) 40%, transparent);
  border-radius: 4px;
}
.cls-check li strong { font-weight: 800; color: var(--fg); }

/* ---------- the glossary: the words, and what they mean here ---------- */
.cls-gloss { margin: 0; }
.cls-gloss dt {
  margin: .7rem 0 .1rem;
  font-size: .98rem;
  font-weight: 800;
}
.cls-gloss dt:first-child { margin-top: 0; }
.cls-gloss dd {
  margin: 0;
  font-size: .93rem;
  line-height: 1.55;
  color: color-mix(in srgb, var(--fg) 78%, transparent);
}

/* ---------- the timing table: minutes are the point ---------- */
.cls-table {
  width: 100%;
  border-collapse: collapse;
  font-size: .9rem;
  margin: 0 0 .8rem;
}
.cls-table th,
.cls-table td {
  text-align: left;
  padding: .4rem .5rem;
  border-bottom: 1px solid color-mix(in srgb, var(--fg) 12%, transparent);
  vertical-align: top;
}
.cls-table th {
  font-size: .74rem;
  letter-spacing: .07em;
  text-transform: uppercase;
  color: color-mix(in srgb, var(--fg) 55%, transparent);
  font-weight: 800;
}
.cls-table td:last-child,
.cls-table th:last-child {
  text-align: right;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}
.cls-table tr[data-subtotal] td,
.cls-table tr[data-grand-total] td {
  font-weight: 800;
  color: var(--fg);
  border-top: 1px solid color-mix(in srgb, var(--fg) 28%, transparent);
}
.cls-table tr[data-grand-total] td {
  font-size: 1rem;
  color: var(--accent);
}
.cls-table .cls-mod {
  font-family: ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;
  font-size: .8rem;
  color: var(--accent);
}

/* ---------- the registration note: local only, never sent anywhere ---------- */
.cls-form { margin: 0; }
.cls-field { display: block; margin-bottom: .9rem; }
.cls-field > span {
  display: block;
  font-weight: 700;
  margin-bottom: .3rem;
  font-size: .92rem;
}
.cls-field .cls-hint {
  font-size: .8rem;
  font-weight: 400;
  color: color-mix(in srgb, var(--fg) 60%, transparent);
}
.cls-field input, .cls-field select {
  width: 100%;
  padding: .75rem 1rem;
  border-radius: 10px;
  border: 1px solid color-mix(in srgb, var(--fg) 22%, transparent);
  background: color-mix(in srgb, var(--fg) 8%, transparent);
  color: var(--fg);
  font-family: inherit;
  font-size: 1rem;
  min-height: 48px;
}
.cls-field input:focus, .cls-field select:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 22%, transparent);
}
.cls-out {
  white-space: pre-wrap;
  word-break: break-word;
  border: 1px dashed color-mix(in srgb, var(--fg) 25%, transparent);
  border-radius: 12px;
  background: color-mix(in srgb, var(--fg) 8%, transparent);
  color: var(--fg);
  padding: .9rem 1rem;
  margin: 0;
  font-family: ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;
  font-size: .82rem;
  line-height: 1.5;
  min-height: 132px;
}
.cls-actions { display: flex; flex-wrap: wrap; gap: .6rem; margin-top: .9rem; }
.cls-btn {
  display: inline-flex;
  align-items: center;
  gap: .45rem;
  border: 1px solid color-mix(in srgb, var(--fg) 26%, transparent);
  border-radius: 10px;
  background: transparent;
  color: var(--fg);
  padding: .65rem 1.15rem;
  font-family: inherit;
  font-weight: 700;
  font-size: .95rem;
  min-height: 48px;
  cursor: pointer;
}
.cls-btn:hover { border-color: var(--accent); color: var(--accent); }
.cls-btn-primary {
  background: var(--accent);
  border-color: var(--accent);
  color: #0d1a17;
}
.cls-btn-primary:hover { color: #0d1a17; filter: brightness(1.06); }

/* ---------- the honest footnote ---------- */
.cls-fine {
  margin: 0;
  font-size: .84rem;
  line-height: 1.6;
  color: color-mix(in srgb, var(--fg) 60%, transparent);
}

/* ---------- printing: the registration note is the only thing on paper ---------- */
@media print {
  .cls-print-hide { display: none !important; }
  .cls-out {
    border: 1px solid #999;
    background: #fff;
    color: #000;
    min-height: 0;
  }
}
