/* ─────────────────────────────────────────────────────────────────
   MO(MEN)TUM — The OS · Portal Styles
   ───────────────────────────────────────────────────────────────── */

/* ── CRISIS FAB ──────────────────────────────────────────────────── */
.crisis-fab {
  position: fixed;
  bottom: max(1.5rem, var(--safe-b, 0px));
  right: max(1.5rem, var(--safe-r, 0px));
  z-index: 500;
}
.crisis-fab-btn {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.65rem 1rem;
  background: rgba(255,61,90,0.15);
  border: 1px solid rgba(255,61,90,0.4);
  border-radius: 999px;
  color: var(--white);
  font-family: var(--display);
  font-size: 0.9rem;
  letter-spacing: 0.08em;
  cursor: pointer;
  backdrop-filter: blur(12px);
  transition: all 0.2s ease;
  animation: crisisPulse 3s ease-in-out infinite;
}
.crisis-fab-btn:hover { background: rgba(255,61,90,0.25); border-color: var(--red); }
@keyframes crisisPulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(255,61,90,0.3); }
  50% { box-shadow: 0 0 0 8px rgba(255,61,90,0); }
}
.crisis-fab-icon { font-size: 1.1rem; }
.crisis-fab-label { font-size: 0.85rem; }
.crisis-panel {
  position: absolute;
  bottom: calc(100% + 0.75rem);
  right: 0;
  width: 280px;
  background: var(--bg-3);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 1.25rem;
  box-shadow: 0 12px 40px rgba(0,0,0,0.5);
}
.crisis-title {
  font-family: var(--display);
  font-size: 1.2rem;
  letter-spacing: 0.06em;
  color: var(--white);
  margin-bottom: 0.75rem;
}
.crisis-line {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  padding: 0.5rem 0;
  border-bottom: 1px solid var(--border);
  font-size: 0.88rem;
  color: var(--muted);
  transition: color 0.2s ease;
}
.crisis-line:hover { color: var(--white); }
.crisis-line:last-of-type { border-bottom: none; }
.crisis-line strong { color: var(--white); }
.crisis-tag {
  font-size: 0.7rem;
  background: rgba(228,195,74,0.12);
  color: var(--gold);
  padding: 0.15rem 0.4rem;
  border-radius: 4px;
  font-family: var(--display);
  letter-spacing: 0.08em;
  flex-shrink: 0;
}
.crisis-note {
  font-size: 0.75rem;
  color: var(--muted);
  margin-top: 0.5rem;
  opacity: 0.7;
}

/* ── PORTAL HERO ─────────────────────────────────────────────────── */
.portal-hero {
  background: radial-gradient(ellipse 80% 50% at 50% 20%, rgba(122,92,255,0.06) 0%, transparent 60%), var(--bg);
  min-height: 100svh;
  padding-top: calc(var(--nav-h) + 40px);
}
.portal-hero-inner { max-width: 1200px; margin: 0 auto; width: 100%; padding: 0 2rem; }
.portal-hero-layout {
  display: flex;
  flex-direction: column;
  gap: 2rem;
}
.portal-hero-text { flex: 1; }
.portal-hero-title { font-size: clamp(2.8rem, 8vw, 5.5rem); line-height: 0.94; margin-bottom: 1.25rem; }
.portal-hero-image {
  width: 100%;
  border-radius: 10px;
  overflow: hidden;
}
.portal-hero-image img {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 10px;
  border: 2px solid rgba(228,196,74,0.2);
}
@media (min-width: 768px) {
  .portal-hero-layout {
    flex-direction: row;
    gap: 3rem;
    align-items: flex-start;
  }
  .portal-hero-text { flex: 1.2; }
  .portal-hero-image {
    flex: 0.8;
    position: sticky;
    top: 80px;
    max-width: 420px;
    z-index: 1;
  }
}
@media (min-width: 1024px) {
  .portal-hero-image { max-width: 480px; }
}
.portal-hero-sub {
  font-size: clamp(1rem, 1.4vw, 1.15rem);
  color: var(--muted);
  line-height: 1.65;
  max-width: 100%;
  margin-bottom: 1.5rem;
}

/* Disclaimer aside */
.portal-disclaimer {
  padding: 1rem 1.25rem;
  border-left: 2px solid rgba(255,61,90,0.3);
  background: rgba(255,61,90,0.03);
  border-radius: 0 8px 8px 0;
  margin-bottom: 2.5rem;
  max-width: 100%;
}
.portal-disclaimer p {
  font-size: 0.88rem;
  color: var(--muted);
  line-height: 1.6;
  font-style: italic;
}

.portal-hero-cards { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1rem; }
.portal-card {
  display: flex; flex-direction: column; gap: 0.5rem; padding: 1.5rem;
  border: 1px solid var(--border); border-radius: 12px; background: rgba(255,255,255,0.02);
  transition: border-color 0.25s ease, background 0.25s ease, transform 0.2s ease; cursor: pointer; text-decoration: none;
}
.portal-card:hover { border-color: var(--gold); background: rgba(228,195,74,0.04); transform: translateY(-4px); }
.portal-card--checkin { border-color: rgba(255,61,90,0.3); }
.portal-card--checkin:hover { border-color: var(--red); background: rgba(255,61,90,0.04); }
.portal-card-icon { font-size: 1.8rem; }
.portal-card-title { font-family: var(--display); font-size: 1.2rem; letter-spacing: 0.06em; color: var(--white); }
.portal-card-desc { font-size: 0.82rem; color: var(--muted); line-height: 1.4; }

@media (max-width: 900px) { .portal-hero-cards { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 480px) { .portal-hero-cards { grid-template-columns: 1fr; } }

/* ── PORTAL SECTION (shared) ─────────────────────────────────────── */
.portal-section { min-height: auto; padding-top: calc(var(--nav-h) + 60px); padding-bottom: 80px; }
.portal-section--diagram { padding-top: 60px; }
.nav-back { color: var(--muted) !important; font-size: 0.9rem !important; }
.nav-back:hover { color: var(--gold) !important; }

/* ── SIGNAL MODEL DIAGRAM ──────────────────────────────────────── */
.diagram-inner { max-width: 1100px; margin: 0 auto; width: 100%; }
.diagram-heading { font-size: clamp(2.5rem, 6vw, 4.5rem); line-height: 0.95; margin-bottom: 0.75rem; }
.diagram-lead { font-size: 1.05rem; color: var(--muted); line-height: 1.6; max-width: 55ch; margin-bottom: 3rem; }

.signal-model {
  padding: 2.5rem 1.5rem;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: rgba(255,255,255,0.015);
  margin-bottom: 3rem;
  overflow: visible;
}

.signal-flow {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.signal-node {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.25rem;
  padding: 1rem 1.2rem;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: rgba(255,255,255,0.02);
  text-align: center;
  min-width: 100px;
  position: relative;
  transition: all 0.3s ease;
}
.signal-node-label {
  font-family: var(--display);
  font-size: 0.85rem;
  letter-spacing: 0.14em;
  color: var(--white);
}
.signal-node-sub {
  font-size: 0.72rem;
  color: var(--muted);
}
.signal-node--highlight {
  border-color: var(--gold);
  background: rgba(228,195,74,0.06);
  padding-bottom: 2rem;
}
.signal-node--highlight .signal-node-label { color: var(--gold); }
.signal-node-badge {
  position: absolute;
  bottom: -12px;
  left: 50%;
  transform: translateX(-50%);
  white-space: nowrap;
  font-family: var(--display);
  font-size: 0.6rem;
  letter-spacing: 0.14em;
  color: var(--bg);
  background: var(--gold);
  padding: 0.2rem 0.6rem;
  border-radius: 4px;
}

.signal-arrow {
  color: var(--muted);
  opacity: 0.4;
  flex-shrink: 0;
}

.signal-caption {
  text-align: center;
  font-size: 0.95rem;
  color: var(--muted);
  margin-top: 2rem;
  line-height: 1.6;
  max-width: 55ch;
  margin-left: auto;
  margin-right: auto;
}

/* ── LOOPS DIAGRAM ──────────────────────────────────────────────── */
.loops-diagram {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 1.5rem;
  align-items: start;
  margin-bottom: 2rem;
}
.loop-col { display: flex; flex-direction: column; align-items: center; }
.loop-title {
  font-family: var(--display);
  font-size: 1.1rem;
  letter-spacing: 0.14em;
  margin-bottom: 1.25rem;
  text-align: center;
}
.loop-title--old { color: var(--red); }
.loop-title--new { color: var(--gold); }

.loop-ring {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0;
  padding: 1.5rem;
  border-radius: 12px;
  width: 100%;
  max-width: 260px;
}
.loop-ring--old {
  border: 1px solid rgba(255,61,90,0.2);
  background: rgba(255,61,90,0.02);
}
.loop-ring--new {
  border: 1px solid rgba(228,195,74,0.2);
  background: rgba(228,195,74,0.02);
}

.loop-step {
  font-family: var(--display);
  font-size: 0.88rem;
  letter-spacing: 0.08em;
  color: var(--white);
  text-align: center;
  padding: 0.5rem 0.75rem;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: rgba(255,255,255,0.02);
  width: 100%;
}
.loop-step--growth {
  border-color: rgba(228,195,74,0.4);
  background: rgba(228,195,74,0.08);
  color: var(--gold);
}

.loop-arrow-down {
  color: var(--muted);
  opacity: 0.3;
  padding: 0.3rem 0;
}
.loop-arrow-curve {
  display: flex;
  align-items: center;
  gap: 0.3rem;
  color: var(--red);
  opacity: 0.5;
  padding-top: 0.5rem;
}
.loop-repeat {
  font-family: var(--display);
  font-size: 0.65rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.loop-vs {
  font-family: var(--display);
  font-size: 1.5rem;
  letter-spacing: 0.1em;
  color: var(--muted);
  opacity: 0.3;
  align-self: center;
  margin-top: 3rem;
}

@media (max-width: 700px) {
  .loops-diagram { grid-template-columns: 1fr; gap: 2rem; }
  .loop-vs { margin-top: 0; }
  .loop-ring { max-width: 100%; }
  .signal-flow { flex-wrap: nowrap; }
}

/* ── DAILY CHECK-IN ──────────────────────────────────────────────── */
#checkin {
  background: radial-gradient(ellipse 60% 40% at 50% 40%, rgba(255,61,90,0.04) 0%, transparent 60%), var(--bg-2);
}
.checkin-inner { max-width: 640px; margin: 0 auto; width: 100%; }
.checkin-heading { font-size: clamp(2.5rem, 6vw, 4.5rem); line-height: 0.95; margin-bottom: 0.75rem; }
.checkin-lead { font-size: 1.05rem; color: var(--muted); line-height: 1.6; margin-bottom: 2rem; }

.checkin-tool { display: flex; flex-direction: column; gap: 1.5rem; }

.checkin-slider-wrap { text-align: center; }
.checkin-slider-label { display: flex; flex-direction: column; align-items: center; gap: 0.2rem; margin-bottom: 1rem; }
.checkin-score {
  font-family: var(--display); font-size: clamp(5rem, 15vw, 8rem);
  color: var(--gold); line-height: 1; letter-spacing: 0.02em;
  transition: color 0.3s ease;
}
.checkin-score.is-low { color: var(--red); }
.checkin-score.is-high { color: #4ade80; }
.checkin-score-word { font-family: var(--display); font-size: 1.2rem; letter-spacing: 0.14em; color: var(--muted); text-transform: uppercase; }

.checkin-range {
  width: 100%; height: 8px; -webkit-appearance: none; appearance: none;
  background: linear-gradient(90deg, var(--red), var(--gold), #4ade80);
  border-radius: 4px; outline: none; cursor: pointer;
}
.checkin-range::-webkit-slider-thumb {
  -webkit-appearance: none; width: 28px; height: 28px; border-radius: 50%;
  background: var(--white); border: 3px solid var(--bg); cursor: pointer;
  box-shadow: 0 2px 8px rgba(0,0,0,0.4);
}
.checkin-range::-moz-range-thumb {
  width: 28px; height: 28px; border-radius: 50%; background: var(--white);
  border: 3px solid var(--bg); cursor: pointer;
}
.checkin-range-labels { display: flex; justify-content: space-between; font-size: 0.75rem; color: var(--muted); margin-top: 0.4rem; }

.checkin-emotion-label { font-family: var(--display); font-size: 1rem; letter-spacing: 0.1em; color: var(--muted); margin-bottom: 0.5rem; }
.checkin-emotion-hint { font-size: 0.85rem; opacity: 0.6; }
.checkin-emotions { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.checkin-emotion-btn {
  padding: 0.4rem 0.8rem; border: 1px solid var(--border); border-radius: 20px;
  background: transparent; color: var(--muted); font-family: var(--body); font-size: 0.9rem;
  cursor: pointer; transition: all 0.2s ease;
}
.checkin-emotion-btn:hover { border-color: rgba(228,195,74,0.4); color: var(--white); }
.checkin-emotion-btn.is-selected { background: rgba(228,195,74,0.12); border-color: var(--gold); color: var(--gold); }

.checkin-submit { align-self: center; margin-top: 0.5rem; }

/* Check-in result */
.checkin-result { display: flex; flex-direction: column; align-items: center; gap: 1.5rem; }
.checkin-result-card {
  text-align: center; padding: 2rem; border: 1px solid var(--border); border-radius: 16px;
  background: rgba(255,255,255,0.02); max-width: 480px; width: 100%;
}
.checkin-result-emoji { font-size: 3rem; margin-bottom: 0.5rem; }
.checkin-result-msg { font-size: 1.1rem; color: var(--muted); line-height: 1.5; margin-bottom: 1rem; }
.checkin-reframe {
  padding: 1.25rem; border: 1px solid rgba(228,195,74,0.2); border-radius: 10px;
  background: rgba(228,195,74,0.04); margin-bottom: 1rem; text-align: left;
}
.checkin-reframe-label { font-family: var(--display); font-size: 0.8rem; letter-spacing: 0.18em; color: var(--gold); margin-bottom: 0.4rem; }
.checkin-reframe-text { font-size: 1.1rem; color: var(--white); font-weight: 600; margin-bottom: 0.5rem; }
.checkin-reframe-move { font-size: 0.95rem; color: var(--muted); line-height: 1.5; }

.checkin-streak {
  display: flex; align-items: center; gap: 0.5rem;
  padding: 0.6rem 1.2rem; border: 1px solid var(--border); border-radius: 999px;
  background: rgba(255,255,255,0.03);
}
.checkin-streak-fire { font-size: 1.2rem; }
.checkin-streak-num { font-family: var(--display); font-size: 1.4rem; color: var(--gold); }
.checkin-streak-label { font-size: 0.85rem; color: var(--muted); }

.checkin-history-chart {
  display: flex; align-items: flex-end; gap: 3px; height: 60px; max-width: 300px; width: 100%;
}
.checkin-bar {
  flex: 1; border-radius: 2px 2px 0 0; min-width: 8px;
  background: var(--gold); opacity: 0.6; transition: height 0.3s ease;
}
.checkin-bar:last-child { opacity: 1; }

/* ── EMOTION MAP ──────────────────────────────────────────────────── */
.emotion-map {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
  margin-bottom: 3rem;
}
.emotion-map-group {
  padding: 1.5rem;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: rgba(255,255,255,0.015);
}
.emotion-map-group-title {
  font-family: var(--display);
  font-size: 0.85rem;
  letter-spacing: 0.16em;
  margin-bottom: 0.25rem;
}
.emotion-map-group-title--pain { color: var(--red); }
.emotion-map-group-title--power { color: var(--gold); }
.emotion-map-group-title--action { color: #4ade80; }
.emotion-map-group-sub {
  font-size: 0.75rem;
  color: var(--muted);
  opacity: 0.7;
  margin-bottom: 1rem;
}
.emotion-map-items { display: flex; flex-wrap: wrap; gap: 0.4rem; }
.emap-btn {
  padding: 0.4rem 0.75rem;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: transparent;
  color: var(--muted);
  font-family: var(--display);
  font-size: 0.88rem;
  letter-spacing: 0.06em;
  cursor: pointer;
  transition: all 0.25s ease;
}
.emap-btn:hover {
  border-color: var(--gold);
  color: var(--gold);
  background: rgba(228,195,74,0.06);
  transform: translateY(-2px);
}
.emap-btn--pain:hover { border-color: var(--red); color: var(--red); background: rgba(255,61,90,0.06); }
.emap-btn--power:hover { border-color: var(--gold); color: var(--gold); background: rgba(228,195,74,0.06); }
.emap-btn--action:hover { border-color: #4ade80; color: #4ade80; background: rgba(74,222,128,0.06); }

@media (max-width: 768px) {
  .emotion-map { grid-template-columns: 1fr; }
}

/* ── BEHAVIOURAL DICTIONARY ──────────────────────────────────────── */
#dictionary { background: radial-gradient(ellipse 60% 40% at 30% 50%, rgba(228,195,74,0.03) 0%, transparent 60%), var(--bg-2); }
.dict-inner { max-width: 1100px; margin: 0 auto; width: 100%; }
.dict-heading { font-size: clamp(2.5rem, 6vw, 4.5rem); line-height: 0.95; margin-bottom: 0.75rem; }
.dict-lead { font-size: 1.05rem; color: var(--muted); line-height: 1.6; max-width: 60ch; margin-bottom: 2rem; }

.dict-filter { display: flex; gap: 0.5rem; margin-bottom: 2rem; flex-wrap: wrap; }
.dict-filter-btn {
  font-family: var(--display); font-size: 0.95rem; letter-spacing: 0.1em;
  padding: 0.5rem 1rem; border: 1px solid var(--border); border-radius: 6px;
  background: transparent; color: var(--muted); cursor: pointer; transition: all 0.2s ease;
}
.dict-filter-btn:hover { border-color: rgba(228,195,74,0.4); color: var(--white); }
.dict-filter-btn.is-active { background: rgba(228,195,74,0.1); border-color: var(--gold); color: var(--gold); }

.dict-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 1rem; }
.dict-card {
  position: relative; padding: 1.5rem; border: 1px solid var(--border); border-radius: 12px;
  background: rgba(255,255,255,0.015); cursor: pointer; transition: all 0.3s ease; overflow: hidden;
}
.dict-card::before {
  content: ""; position: absolute; top: 0; left: 0; right: 0; height: 3px;
  background: var(--gold); transform: scaleX(0); transform-origin: left; transition: transform 0.3s ease;
}
.dict-card:hover::before { transform: scaleX(1); }
.dict-card:hover { border-color: rgba(228,195,74,0.3); background: rgba(228,195,74,0.03); transform: translateY(-2px); }
.dict-card-category { font-family: var(--display); font-size: 0.7rem; letter-spacing: 0.18em; text-transform: uppercase; color: var(--gold); opacity: 0.7; margin-bottom: 0.4rem; }
.dict-card-word { font-family: var(--display); font-size: clamp(1.6rem, 3vw, 2.2rem); letter-spacing: 0.04em; color: var(--white); margin-bottom: 0.3rem; line-height: 1.1; }
.dict-card-conventional { font-size: 0.82rem; color: rgba(138,148,168,0.5); font-style: italic; text-decoration: line-through; margin-bottom: 0.6rem; }
.dict-card-definition { font-size: 0.95rem; color: var(--muted); line-height: 1.45; font-weight: 600; }
.dict-card-arrow { position: absolute; bottom: 1rem; right: 1rem; font-size: 1.2rem; color: var(--muted); opacity: 0; transition: opacity 0.2s ease, transform 0.2s ease; }
.dict-card:hover .dict-card-arrow { opacity: 1; transform: translateX(4px); }

/* Detail panel (slide-in from right) */
.dict-detail-panel {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  z-index: 300;
  width: 100%;
  max-width: 560px;
  background: var(--bg-3);
  border-left: 1px solid var(--border);
  box-shadow: -12px 0 40px rgba(0,0,0,0.5);
  transform: translateX(100%);
  transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1);
  overflow-y: auto;
}
.dict-detail-panel.is-open { transform: translateX(0); }
.dict-detail-panel-backdrop {
  position: fixed;
  inset: 0;
  z-index: 299;
  background: rgba(6,7,11,0.6);
  backdrop-filter: blur(4px);
  opacity: 0;
  transition: opacity 0.3s ease;
  pointer-events: none;
}
.dict-detail-panel-backdrop.is-open { opacity: 1; pointer-events: auto; }

.dict-detail-card {
  position: relative;
  padding: 2.5rem 2rem;
  min-height: 100%;
}
.dict-detail-close {
  position: absolute; top: 1rem; right: 1rem; background: none; border: none;
  color: var(--muted); font-size: 1.4rem; cursor: pointer; width: 44px; height: 44px;
  display: flex; align-items: center; justify-content: center; transition: color 0.2s ease;
}
.dict-detail-close:hover { color: var(--white); }
.dict-detail-header { margin-bottom: 1.5rem; }
.dict-detail-category { font-family: var(--display); font-size: 0.8rem; letter-spacing: 0.18em; text-transform: uppercase; color: var(--gold); }
.dict-detail-word { font-family: var(--display); font-size: clamp(3rem, 8vw, 4.5rem); line-height: 0.92; margin: 0.3rem 0; letter-spacing: 0.02em; }
.dict-detail-conventional { font-size: 1rem; color: rgba(138,148,168,0.5); font-style: italic; text-decoration: line-through; }
.dict-detail-reframe {
  padding: 1.5rem; margin-bottom: 1.5rem; border: 1px solid rgba(228,195,74,0.2);
  border-radius: 10px; background: rgba(228,195,74,0.04);
}
.dict-detail-arrow { font-family: var(--display); font-size: 0.8rem; letter-spacing: 0.18em; color: var(--gold); margin-bottom: 0.5rem; }
.dict-detail-definition { font-size: clamp(1.2rem, 2.5vw, 1.5rem); color: var(--white); font-weight: 600; line-height: 1.4; }
.dict-detail-body { display: flex; flex-direction: column; gap: 1.25rem; margin-bottom: 1.5rem; }
.dict-detail-section h4 { font-family: var(--display); font-size: 0.85rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--gold); margin-bottom: 0.4rem; }
.dict-detail-section p { font-size: 1rem; color: var(--muted); line-height: 1.6; }
.dict-detail-quote { font-style: italic; font-size: 0.95rem; color: rgba(228,195,74,0.6); border-left: 2px solid rgba(228,195,74,0.3); padding-left: 1rem; line-height: 1.5; margin-bottom: 1rem; }
.dict-detail-quote:empty { display: none; }
.dict-detail-book-note {
  font-size: 0.82rem;
  color: var(--muted);
  opacity: 0.6;
  font-style: italic;
}

@media (max-width: 600px) {
  .dict-detail-panel { max-width: 100%; }
}

/* ── 5 B'S ILLUSTRATION ────────────────────────────────────────── */
.fiveb-illustration {
  margin-bottom: 3rem;
}
.fiveb-ring {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 1rem;
}
.fiveb-item {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  padding: 1.25rem 1rem;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: rgba(255,255,255,0.015);
  text-align: center;
  transition: border-color 0.25s ease;
}
.fiveb-item:hover { border-color: rgba(228,195,74,0.3); }
.fiveb-letter {
  font-family: var(--display);
  font-size: 2.2rem;
  color: var(--gold);
  line-height: 1;
}
.fiveb-word {
  font-family: var(--display);
  font-size: 1.3rem;
  letter-spacing: 0.04em;
  color: var(--white);
  line-height: 1;
  margin-top: -0.3rem;
}
.fiveb-desc {
  font-size: 0.75rem;
  color: var(--muted);
  line-height: 1.4;
  margin-top: 0.3rem;
}

@media (max-width: 768px) { .fiveb-ring { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 480px) { .fiveb-ring { grid-template-columns: repeat(2, 1fr); } }

/* ── 5 B's ASSESSMENT ────────────────────────────────────────────── */
#assessment { background: radial-gradient(ellipse 60% 40% at 70% 50%, rgba(122,92,255,0.04) 0%, transparent 60%), var(--bg-2); }
.assess-inner { max-width: 1100px; margin: 0 auto; width: 100%; }
.assess-heading { font-size: clamp(2.5rem, 6vw, 4.5rem); line-height: 0.95; margin-bottom: 0.75rem; }
.assess-lead { font-size: 1.05rem; color: var(--muted); line-height: 1.6; max-width: 55ch; margin-bottom: 2rem; }
.assess-layout { display: grid; grid-template-columns: 1fr 380px; gap: 3rem; align-items: start; }
.assess-sliders { display: flex; flex-direction: column; gap: 1.5rem; }
.assess-slider-group {
  padding: 1rem 1.25rem; border: 1px solid var(--border); border-radius: 10px;
  background: rgba(255,255,255,0.015); transition: border-color 0.2s ease;
}
.assess-slider-group:hover { border-color: rgba(228,195,74,0.2); }
.assess-label {
  font-family: var(--display); font-size: 1.3rem; letter-spacing: 0.06em; color: var(--white);
  display: flex; align-items: baseline; gap: 0.5rem; margin-bottom: 0.5rem;
}
.assess-b-letter { color: var(--gold); }
.assess-val { margin-left: auto; font-size: 1.5rem; color: var(--gold); min-width: 2ch; text-align: right; }
.assess-range {
  width: 100%; height: 6px; -webkit-appearance: none; appearance: none;
  background: rgba(255,255,255,0.08); border-radius: 3px; outline: none; cursor: pointer;
}
.assess-range::-webkit-slider-thumb { -webkit-appearance: none; width: 22px; height: 22px; border-radius: 50%; background: var(--gold); border: 2px solid var(--bg); cursor: pointer; box-shadow: 0 2px 8px rgba(228,195,74,0.4); }
.assess-range::-moz-range-thumb { width: 22px; height: 22px; border-radius: 50%; background: var(--gold); border: 2px solid var(--bg); cursor: pointer; }
.assess-hint { font-size: 0.78rem; color: var(--muted); margin-top: 0.4rem; opacity: 0.7; }
.assess-visual { display: flex; flex-direction: column; align-items: center; gap: 1rem; position: sticky; top: calc(var(--nav-h) + 2rem); z-index: 1; }
#radar-chart { max-width: 340px; width: 100%; }
.assess-score-label { font-family: var(--display); font-size: 1.1rem; letter-spacing: 0.1em; color: var(--muted); }
.assess-score-num { color: var(--gold); font-size: 1.4rem; }
.assess-history { width: 100%; max-height: 200px; overflow-y: auto; display: flex; flex-direction: column; gap: 0.5rem; margin-top: 0.5rem; }
.assess-history-item { display: flex; justify-content: space-between; align-items: center; padding: 0.5rem 0.75rem; background: rgba(255,255,255,0.03); border: 1px solid var(--border); border-radius: 6px; font-size: 0.8rem; color: var(--muted); }
.assess-history-score { font-family: var(--display); color: var(--gold); font-size: 1rem; }
@media (max-width: 900px) { .assess-layout { grid-template-columns: 1fr; } .assess-visual { position: static; } }

/* ── RESOURCE DIRECTORY ──────────────────────────────────────────── */
#resources { background: var(--bg); }
.resource-inner { max-width: 1100px; margin: 0 auto; width: 100%; }
.resource-heading { font-size: clamp(2.5rem, 6vw, 4.5rem); line-height: 0.95; margin-bottom: 0.75rem; }
.resource-lead { font-size: 1.05rem; color: var(--muted); line-height: 1.6; max-width: 55ch; margin-bottom: 2rem; }
.resource-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 1rem; }
.resource-card {
  padding: 1.5rem; border: 1px solid var(--border); border-radius: 12px;
  background: rgba(255,255,255,0.02); transition: all 0.2s ease; text-decoration: none;
}
.resource-card:hover { border-color: rgba(228,195,74,0.3); background: rgba(228,195,74,0.03); transform: translateY(-2px); }
.resource-name { font-family: var(--display); font-size: 1.4rem; color: var(--white); letter-spacing: 0.04em; margin-bottom: 0.5rem; }
.resource-desc { font-size: 0.95rem; color: var(--muted); line-height: 1.5; margin-bottom: 0.75rem; }
.resource-meta {
  font-family: var(--display); font-size: 0.75rem; letter-spacing: 0.12em;
  color: var(--gold); opacity: 0.7;
}

/* ── EMPTY STATE ──────────────────────────────────────────────────── */
.empty-state { grid-column: 1 / -1; text-align: center; padding: 3rem 2rem; border: 1px dashed var(--border); border-radius: 12px; }
.empty-state-text { font-size: 1rem; color: var(--muted); font-style: italic; }

/* ── SCROLL REVEAL ───────────────────────────────────────────────── */
.portal-body .reveal { opacity: 0; transform: translateY(36px); transition: opacity 0.75s ease, transform 0.75s ease; }
.portal-body .reveal.is-visible { opacity: 1; transform: none; }

/* ── FEATURE 1: EMOTION COLOUR SHIFTS ──────────────────────────── */
.portal-body { transition: background-color 0.8s ease; }
.portal-body.mood--pain { background-color: rgba(255,61,90,0.03); }
.portal-body.mood--power { background-color: rgba(228,196,74,0.03); }
.portal-body.mood--action { background-color: rgba(74,222,128,0.03); }
.dict-detail-reframe {
  opacity: 0;
  transition: opacity 0.3s ease 0.3s;
}
.dict-detail-panel.is-open .dict-detail-reframe {
  opacity: 1;
}

/* ── FEATURE 2: "TYPE WHAT YOU'RE FEELING" ─────────────────────── */
.feel-input-wrap {
  margin-bottom: 2.5rem;
  text-align: center;
}
.feel-label {
  display: block;
  font-family: var(--display);
  font-size: 1.2rem;
  letter-spacing: 0.08em;
  color: var(--muted);
  margin-bottom: 0.75rem;
}
.feel-input {
  width: 100%;
  max-width: 480px;
  padding: 1rem 1.25rem;
  font-family: var(--body);
  font-size: 1.15rem;
  color: var(--white);
  background: rgba(255,255,255,0.03);
  border: 1px solid var(--border);
  border-radius: 12px;
  outline: none;
  transition: border-color 0.3s ease, box-shadow 0.3s ease;
}
.feel-input::placeholder { color: rgba(138,148,168,0.4); }
.feel-input:focus {
  border-color: var(--gold);
  box-shadow: 0 0 0 3px rgba(228,195,74,0.12);
}
.feel-hint {
  margin-top: 0.75rem;
  font-size: 0.95rem;
  color: var(--muted);
  line-height: 1.5;
  min-height: 1.5em;
  transition: opacity 0.3s ease;
}
.feel-hint strong { color: var(--gold); }

/* ── FEATURE 3: CHECK-IN TRAJECTORY ────────────────────────────── */
.checkin-trajectory {
  font-style: italic;
  font-size: 0.92rem;
  color: rgba(138,148,168,0.7);
  line-height: 1.5;
  max-width: 340px;
  text-align: center;
  margin-top: 0.75rem;
}
.checkin-trajectory:empty { display: none; }

/* ── FEATURE 4: DAILY THOUGHT ─────────────────────────────────── */
.portal-section--daily {
  padding-top: 40px;
  padding-bottom: 40px;
  min-height: auto !important;
}
.daily-thought {
  max-width: 700px;
  margin: 0 auto;
  text-align: center;
  padding: 2.5rem 2rem;
}
.daily-thought-label {
  font-family: var(--display);
  font-size: 0.75rem;
  letter-spacing: 0.22em;
  color: var(--gold);
  opacity: 0.6;
  margin-bottom: 1rem;
}
.daily-thought-text {
  font-size: clamp(1.2rem, 2.5vw, 1.6rem);
  font-style: italic;
  color: var(--white);
  line-height: 1.55;
  margin-bottom: 1rem;
}
.daily-thought-attr {
  font-family: var(--display);
  font-size: 0.85rem;
  letter-spacing: 0.08em;
  color: var(--gold);
  opacity: 0.5;
}

/* ── FEATURE 5: 5 B'S LOWEST-SCORE LEVER CARD ─────────────────── */
.assess-lever-card {
  width: 100%;
  padding: 1.25rem 1.5rem;
  border-left: 3px solid var(--gold);
  border-radius: 0 10px 10px 0;
  background: rgba(255,255,255,0.03);
  text-align: left;
}
.assess-lever-card .lever-title {
  font-family: var(--display);
  font-size: 0.8rem;
  letter-spacing: 0.16em;
  color: var(--gold);
  margin-bottom: 0.5rem;
}
.assess-lever-card .lever-b-name {
  font-family: var(--display);
  font-size: 1.2rem;
  letter-spacing: 0.04em;
  margin-bottom: 0.4rem;
}
.assess-lever-card .lever-action {
  font-size: 0.95rem;
  color: var(--muted);
  line-height: 1.5;
}

/* ── FEATURE 6: AMBIENT + FOCUS TOGGLES ────────────────────────── */
.portal-toggles {
  position: fixed;
  top: calc(var(--nav-h) + 12px);
  right: max(1.5rem, var(--safe-r, 0px));
  z-index: 200;
  display: flex;
  gap: 0.4rem;
}
.portal-toggle-btn {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: rgba(6,7,11,0.8);
  backdrop-filter: blur(12px);
  color: var(--muted);
  font-size: 1.1rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
}
.portal-toggle-btn:hover { border-color: var(--gold); color: var(--gold); }
.portal-toggle-btn.is-active { background: rgba(228,195,74,0.12); border-color: var(--gold); color: var(--gold); }

/* ── FEATURE 7: SHAREABLE SCORE CARD ───────────────────────────── */
.share-score-btn {
  margin-top: 0.5rem;
  font-size: 0.85rem !important;
}

/* ── FEATURE 8: SIGNAL MODEL TOOLTIPS ─────────────────────────── */
.signal-node[data-signal-node] { cursor: pointer; }
.signal-node[data-signal-node]:hover {
  border-color: rgba(228,195,74,0.4);
  background: rgba(228,195,74,0.04);
}
.signal-tooltip {
  position: absolute;
  bottom: calc(100% + 12px);
  left: 50%;
  transform: translateX(-50%);
  width: max-content;
  max-width: 260px;
  padding: 0.75rem 1rem;
  background: var(--bg-3);
  border: 1px solid var(--gold);
  border-radius: 8px;
  color: var(--muted);
  font-size: 0.85rem;
  line-height: 1.45;
  box-shadow: 0 8px 24px rgba(0,0,0,0.5);
  z-index: 50;
  pointer-events: auto;
}
.signal-tooltip::after {
  content: "";
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  border: 6px solid transparent;
  border-top-color: var(--gold);
}

/* ── FEATURE 9: FOCUS MODE ─────────────────────────────────────── */
body.focus-mode .chapter { opacity: 0.05; transition: opacity 0.5s ease; }
body.focus-mode .chapter.is-focused { opacity: 1; }
body.focus-mode .portal-section--daily { opacity: 0.05; }
body.focus-mode .portal-section--daily.is-focused { opacity: 1; }
.focus-indicator {
  font-family: var(--display);
  font-size: 0.6rem;
  letter-spacing: 0.16em;
  color: var(--gold);
  opacity: 0.7;
  margin-left: 0.5rem;
}

/* ── FEATURE 10: PROGRESS STRIP ────────────────────────────────── */
.progress-strip {
  position: fixed;
  top: var(--nav-h);
  left: 0;
  right: 0;
  z-index: 99;
  background: rgba(12,14,20,0.85);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid rgba(255,255,255,0.04);
}
.progress-strip-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0.35rem var(--px);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  font-size: 0.72rem;
  color: var(--muted);
}
.progress-dot { opacity: 0.3; }
.progress-item span,
.progress-strip-inner strong { color: var(--gold); }

@media (max-width: 600px) {
  .portal-toggles { top: auto; bottom: calc(max(1.5rem, var(--safe-b, 0px)) + 52px); right: max(1rem, var(--safe-r, 0px)); flex-direction: column; }
}

/* ── FOOTER ─────────────────────────────────────────────────────── */
.footer {
  padding: 3rem 1.5rem 2rem;
  text-align: center;
  border-top: 1px solid var(--border);
  margin-top: 2rem;
}
.footer-brand {
  font-family: var(--display);
  font-size: 1.5rem;
  color: var(--gold);
  margin: 0 0 0.5rem 0;
  letter-spacing: 2px;
}
.footer-line {
  color: var(--muted);
  font-size: 0.95rem;
  margin: 0 0 0.25rem 0;
}
.footer-line--sub {
  font-size: 0.85rem;
  color: var(--dim);
  margin-bottom: 1.5rem;
}
.footer-links {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin-bottom: 1.5rem;
}
.footer-links a {
  color: var(--muted);
  text-decoration: none;
  font-family: var(--display);
  font-size: 0.85rem;
  letter-spacing: 1.5px;
  text-transform: uppercase;
}
.footer-links a:hover { color: var(--gold); }
.footer-dot { color: var(--border); font-size: 0.7rem; }
.footer-legal {
  font-size: 0.75rem;
  color: var(--dim);
  margin: 0 0 0.5rem 0;
}
.footer-tag {
  font-size: 0.9rem;
  color: var(--muted);
  margin: 0;
  font-style: italic;
}
