/* ============================================================
   UBeLong — Phase 6: Safety & Mission styles
   Shared by guidelines.html, resources.html, safety-center.html
   Builds on design-system.css tokens + home.css (header/footer).
   ============================================================ */

/* ---- Crisis strip (top of resources + safety center) ---- */
.crisis-strip {
  background: var(--teal-900);
  color: var(--text-on-deep);
  border-bottom: 3px solid var(--amber-400);
  padding: 18px 0;
}
.crisis-strip__inner { display: flex; flex-wrap: wrap; gap: 10px 28px; align-items: center; justify-content: center; }
.crisis-strip__title { font-family: var(--font-head); font-weight: 600; font-size: 1rem; color: var(--amber-300); white-space: nowrap; }
.crisis-strip__link {
  display: inline-flex; align-items: center; gap: 8px; text-decoration: none; color: #fff;
  background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.25);
  border-radius: var(--r-full); padding: 7px 16px; font-weight: 600; font-size: .9rem;
  transition: background .18s, border-color .18s;
}
.crisis-strip__link:hover { background: rgba(255,255,255,.18); border-color: rgba(255,255,255,.5); text-decoration: none; }
.crisis-strip__link b { color: var(--amber-300); font-variant-numeric: tabular-nums; }
.crisis-strip__note { flex-basis: 100%; text-align: center; font-size: .82rem; color: var(--text-on-deep-muted); margin: 2px 0 0; }

/* ---- Public page hero (guidelines/resources) ---- */
.page-hero { padding: clamp(44px, 7vw, 84px) 0 clamp(24px, 3vw, 40px); }
.page-hero h1 { margin-bottom: .3em; }
.page-hero .lead { margin-inline: auto; }

/* ---- Section header inside pages ---- */
.subhead { display: flex; align-items: center; gap: 12px; margin: clamp(44px, 6vw, 64px) 0 18px; }
.subhead .ic { width: 44px; height: 44px; flex: 0 0 auto; border-radius: var(--r-md); background: var(--teal-100); color: var(--teal-800); display: flex; align-items: center; justify-content: center; font-size: 1.3rem; }
.section--deep .subhead .ic { background: rgba(255,255,255,.1); color: var(--amber-300); }
.subhead h2 { margin: 0; }
.subhead p { margin: 2px 0 0; color: var(--text-muted); font-size: .92rem; }
.section--deep .subhead p { color: var(--text-on-deep-muted); }

/* ---- Resource cards ---- */
.res-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 18px; }
.res-card {
  background: var(--bg-alt); border: 1px solid var(--border); border-radius: var(--r-lg);
  padding: 22px 24px; box-shadow: var(--sh-sm); display: flex; flex-direction: column; gap: 8px;
}
.res-card h3 { margin: 0; font-size: 1.06rem; }
.res-card__meta { display: flex; flex-wrap: wrap; gap: 6px; }
.res-tag {
  font-size: .72rem; font-weight: 700; letter-spacing: .04em; text-transform: uppercase;
  background: var(--teal-100); color: var(--teal-800); border-radius: var(--r-full); padding: 3px 10px;
}
.res-tag--amber { background: var(--amber-100); color: var(--amber-600); }
.res-tag--danger { background: #f7e5e3; color: var(--danger); }
.res-card p { margin: 0; color: var(--text-soft); font-size: .93rem; line-height: 1.55; }
.res-card__contact { margin-top: auto; padding-top: 10px; display: flex; flex-wrap: wrap; gap: 8px 18px; border-top: 1px dashed var(--border); }
.res-card__contact a, .res-card__contact span.tel {
  font-weight: 700; color: var(--teal-700); text-decoration: none; font-size: .92rem;
  font-variant-numeric: tabular-nums; display: inline-flex; align-items: center; gap: 6px;
}
.res-card__contact a:hover { text-decoration: underline; }

/* ---- Guidelines: rule cards ---- */
.rule-list { display: flex; flex-direction: column; gap: 14px; counter-reset: rule; }
.rule {
  display: grid; grid-template-columns: 52px 1fr; gap: 18px; align-items: start;
  background: var(--bg-alt); border: 1px solid var(--border); border-left: 4px solid var(--teal-500);
  border-radius: var(--r-md); padding: 20px 24px; counter-increment: rule;
  height: auto; min-height: 0; /* override design-system .rule divider (1px height) */
}
.rule--serious { border-left-color: var(--danger); }
/* serious cards live inside .section--deep (dark teal): readable glass treatment */
.section--deep .rule { background: rgba(255,255,255,.06); height: auto; }
.section--deep .rule h3 { color: #fff; }
.section--deep .rule p { color: var(--text-on-deep-muted); }
.section--deep .rule p b { color: var(--amber-300); }
.rule__num {
  width: 44px; height: 44px; border-radius: var(--r-full); background: var(--teal-100); color: var(--teal-800);
  font-family: var(--font-head); font-weight: 600; font-size: 1.25rem;
  display: flex; align-items: center; justify-content: center;
}
.rule--serious .rule__num { background: #f7e5e3; color: var(--danger); }
.rule h3 { margin: 0 0 6px; font-size: 1.05rem; }
.rule p { margin: 0; color: var(--text-soft); font-size: .95rem; line-height: 1.6; }
.rule p b { color: var(--teal-800); }
@media (max-width: 640px) { .rule { grid-template-columns: 1fr; gap: 10px; } }

/* ---- Enforcement ladder ---- */
.ladder { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 12px; margin-top: 20px; }
.ladder__step { background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.14); border-radius: var(--r-md); padding: 16px 18px; }
.ladder__step small { color: var(--amber-300); font-weight: 700; letter-spacing: .05em; text-transform: uppercase; font-size: .72rem; display: block; margin-bottom: 6px; }
.ladder__step b { display: block; margin-bottom: 6px; }
.ladder__step p { margin: 0; font-size: .87rem; color: var(--text-on-deep-muted); line-height: 1.5; }

/* ---- Safety center (members area) ---- */
.safety-course { display: flex; flex-direction: column; gap: 12px; }
.course-progress { display: flex; align-items: center; gap: 14px; margin-bottom: 6px; }
.course-progress__bar { flex: 1; height: 10px; border-radius: var(--r-full); background: var(--cream-deep); overflow: hidden; border: 1px solid var(--border); }
.course-progress__fill { height: 100%; width: 0%; background: linear-gradient(90deg, var(--teal-600), var(--teal-400, var(--teal-500))); border-radius: var(--r-full); transition: width .4s ease; }
.course-progress__label { font-weight: 700; font-size: .9rem; color: var(--teal-800); white-space: nowrap; }

.lesson { background: var(--bg-alt); border: 1px solid var(--border); border-radius: var(--r-md); overflow: hidden; }
.lesson__head {
  display: flex; align-items: center; gap: 14px; width: 100%; text-align: left; cursor: pointer;
  background: none; border: 0; padding: 18px 20px; font-family: var(--font-body);
}
.lesson__head:hover { background: var(--cream); }
.lesson__badge {
  width: 34px; height: 34px; flex: 0 0 auto; border-radius: var(--r-full);
  background: var(--cream-deep); color: var(--text-muted); font-weight: 800; font-size: .95rem;
  display: flex; align-items: center; justify-content: center; border: 1px solid var(--border);
}
.lesson__title { flex: 1; }
.lesson__title b { display: block; font-size: .98rem; color: var(--ink); }
.lesson__title small { color: var(--text-muted); font-size: .8rem; }
.lesson__state { font-size: .78rem; font-weight: 700; color: var(--text-muted); white-space: nowrap; }
.lesson--done .lesson__badge { background: #e3f0e8; color: var(--success); border-color: #bcdcc8; }
.lesson--done .lesson__state { color: var(--success); }
.lesson__caret { transition: transform .2s; color: var(--text-muted); font-size: .7rem; }
.lesson--open .lesson__caret { transform: rotate(180deg); }
.lesson__body { padding: 0 20px 20px 68px; display: none; }
.lesson--open .lesson__body { display: block; }
.lesson__body p { color: var(--text-soft); line-height: 1.65; margin: 0 0 .9em; font-size: .95rem; }
.lesson__body p:last-child { margin-bottom: 0; }
.lesson__body b { color: var(--teal-800); }
.lesson__flags { list-style: none; margin: 0 0 1em; padding: 0; }
.lesson__flags li {
  display: flex; gap: 10px; padding: 7px 0; border-top: 1px dashed var(--border);
  color: var(--text-soft); font-size: .92rem; line-height: 1.5;
}
.lesson__flags li::before { content: "🚩"; flex: 0 0 auto; }
.lesson__actionbox {
  background: var(--teal-100); border: 1px solid #b8dad6; border-radius: var(--r-sm);
  padding: 14px 16px; font-size: .92rem; color: var(--teal-900); line-height: 1.55; margin-bottom: 1em;
}
.lesson__actionbox b { display: block; margin-bottom: 4px; }
.lesson__btn-row { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 16px; }
@media (max-width: 640px) { .lesson__body { padding-left: 20px; } }

.course-done {
  background: #e3f0e8; border: 1px solid #bcdcc8; border-radius: var(--r-md);
  padding: 18px 20px; display: none; align-items: center; gap: 14px; margin-top: 6px;
}
.course-done--show { display: flex; }
.course-done .ic { font-size: 1.6rem; }
.course-done b { color: var(--success); }
.course-done p { margin: 0; font-size: .9rem; color: var(--ink-soft); }

/* ---- Report / block (demo UI) ---- */
.safety-form { background: var(--bg-alt); border: 1px solid var(--border); border-radius: var(--r-md); padding: 22px 24px; }
.safety-form label { display: block; font-weight: 700; font-size: .85rem; color: var(--teal-900); margin: 14px 0 5px; }
.safety-form label:first-child { margin-top: 0; }
.safety-form select, .safety-form textarea {
  width: 100%; font-family: var(--font-body); font-size: .95rem; color: var(--ink);
  background: var(--cream); border: 1px solid var(--border); border-radius: var(--r-sm); padding: 10px 12px;
}
.safety-form textarea { min-height: 96px; resize: vertical; }
.safety-form .hint { font-size: .78rem; color: var(--text-muted); margin-top: 4px; }
.form-ok {
  display: none; margin-top: 14px; background: #e3f0e8; border: 1px solid #bcdcc8; color: var(--success);
  border-radius: var(--r-sm); padding: 12px 14px; font-size: .9rem; font-weight: 600; line-height: 1.5;
}
.form-ok--show { display: block; }

.block-list { display: flex; flex-direction: column; gap: 8px; margin-top: 12px; }
.block-row {
  display: flex; align-items: center; gap: 12px; background: var(--cream);
  border: 1px solid var(--border); border-radius: var(--r-sm); padding: 10px 14px;
}
.block-row b { flex: 1; font-size: .92rem; }
.block-row button { font-size: .8rem; padding: 6px 12px; }

.report-log { margin-top: 10px; display: flex; flex-direction: column; gap: 8px; }
.report-row {
  background: var(--cream); border: 1px solid var(--border); border-left: 3px solid var(--amber-400);
  border-radius: var(--r-sm); padding: 10px 14px; font-size: .88rem; color: var(--text-soft); line-height: 1.5;
}
.report-row b { color: var(--ink); }
.report-row small { color: var(--text-muted); display: block; }

/* ---- Quick exit ----
   Bottom-right so it never fights the sticky members nav (top,
   z-index 100) or the toast (bottom-center). z-index 300 sits
   above modals but below the photo viewer (2000). */
.quick-exit {
  position: fixed; bottom: 20px; right: 20px; z-index: 300;
  background: var(--danger); color: #fff; border: none; border-radius: var(--r-full);
  font-family: var(--font-body); font-weight: 800; font-size: .8rem; letter-spacing: .03em;
  padding: 12px 20px; cursor: pointer; box-shadow: var(--sh-lg);
  display: inline-flex; align-items: center; gap: 7px;
}
.quick-exit:hover { background: #992a23; }
.quick-exit__hint {
  position: fixed; bottom: 68px; right: 20px; z-index: 300; max-width: 230px;
  background: var(--teal-900); color: var(--text-on-deep); border-radius: var(--r-sm);
  font-size: .74rem; line-height: 1.45; padding: 8px 12px; box-shadow: var(--sh-lg); display: none;
}
.quick-exit__hint--show { display: block; }
@media (max-width: 720px) {
  .quick-exit { bottom: 14px; right: 14px; padding: 10px 16px; }
  .quick-exit__hint { bottom: 60px; right: 14px; }
}

/* ---- Cross-link cards (bottom of pages) ---- */
.crosslinks { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 16px; margin-top: 20px; }
.crosslink { display: flex; flex-direction: column; gap: 8px; align-items: flex-start; }
.crosslink .ic { font-size: 1.5rem; }
.crosslink b { font-size: 1rem; }
.crosslink p { margin: 0; color: var(--text-soft); font-size: .9rem; line-height: 1.5; }

/* ---- Print friendliness ---- */
@media print {
  .site-header, .site-footer, .members-nav, .quick-exit, .quick-exit__hint, .crisis-strip__link { display: none !important; }
  .crisis-strip { background: #fff; color: #000; border-bottom: 2px solid #000; }
  .crisis-strip__title { color: #000; }
  body { background: #fff; }
  .res-card, .rule, .lesson, .safety-form { box-shadow: none; border: 1px solid #999; break-inside: avoid; }
}
