/* ═══════════════════════════════════════════════
   FIDEOGRAPH FORMATION LAYER — Stylesheet v1.0.0
   Parchment · Gold · Ink palette
   ═══════════════════════════════════════════════ */

:root {
  --fg-parchment:  #F8F4EC;
  --fg-parchment2: #EFE9DA;
  --fg-gold:       #B8922A;
  --fg-gold-light: #D4AC4A;
  --fg-ink:        #1C1A14;
  --fg-ink-2:      #3A3528;
  --fg-ink-muted:  #6B6454;
  --fg-border:     #DDD5C0;
  --fg-purple:     #7F77DD;
  --fg-teal:       #1D9E75;
  --fg-coral:      #C8512A;
  --fg-amber:      #BA7517;
  --fg-green:      #2D6A4F;
  --fg-red:        #9B2C2C;
  --fg-font-display: 'Playfair Display', Georgia, serif;
  --fg-font-body:    'Source Serif 4', serif;
  --fg-radius:     6px;
  --fg-shadow:     0 1px 4px rgba(28,26,20,0.08);
}

/* ── Shared utilities ─────────────────────────── */
.fg-btn {
  display: inline-block;
  padding: 10px 22px;
  background: var(--fg-ink);
  color: var(--fg-parchment) !important;
  font-family: var(--fg-font-body);
  font-size: 0.9rem;
  border-radius: var(--fg-radius);
  text-decoration: none;
  transition: background 0.2s;
  border: none;
  cursor: pointer;
}
.fg-btn:hover { background: #2a2018; }
.fg-btn-primary { background: var(--fg-gold); color: var(--fg-ink) !important; }
.fg-btn-primary:hover { background: var(--fg-gold-light); }
.fg-label { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.5px; color: var(--fg-ink-muted); margin-right: 6px; }
.fg-link-subtle { font-size: 12px; color: var(--fg-ink-muted); text-decoration: underline; text-underline-offset: 2px; }
.fg-vector-row { display: flex; align-items: center; gap: 8px; margin-bottom: 10px; }
.fg-vector-label { width: 150px; font-size: 13px; color: var(--fg-ink-2); flex-shrink: 0; }
.fg-bar-track { flex: 1; background: var(--fg-parchment2); height: 7px; border-radius: 4px; overflow: hidden; max-width: 200px; }
.fg-bar-fill { height: 100%; border-radius: 4px; min-width: 2px; transition: width 0.6s ease; }
.fg-bar-purple { background: var(--fg-purple); }
.fg-bar-teal   { background: var(--fg-teal); }
.fg-bar-gold   { background: var(--fg-gold); }
.fg-vector-val { font-size: 12px; font-family: monospace; color: var(--fg-ink-muted); width: 38px; text-align: right; }
.fg-vector-level { font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.4px; padding: 2px 6px; border-radius: 20px; }
.fg-level-low         { background: #FEF2F2; color: #991B1B; }
.fg-level-developing  { background: #FFFBEB; color: #92400E; }
.fg-level-strong      { background: #F0FDF4; color: #14532D; }
.fg-section-title { font-family: var(--fg-font-display); font-size: 1.4rem; font-weight: 700; color: var(--fg-ink); margin: 0 0 6px; }
.fg-section-desc  { font-size: 13px; color: var(--fg-ink-muted); margin: 0 0 16px; }

/* ═══════════════════════════════════════════════
   ASSESSMENT
   ═══════════════════════════════════════════════ */

.fg-assess-wrap { max-width: 700px; margin: 0 auto; font-family: var(--fg-font-body); }

.fg-assess-header { background: var(--fg-parchment); border-bottom: 1px solid var(--fg-border); padding: 28px 0 0; margin-bottom: 32px; }
.fg-assess-header__inner { max-width: 700px; margin: 0 auto; padding: 0 24px 24px; }
.fg-assess-title { font-family: var(--fg-font-display); font-size: 2rem; font-weight: 700; color: var(--fg-ink); margin: 0 0 6px; letter-spacing: -0.3px; }
.fg-assess-subtitle { font-size: 14px; color: var(--fg-ink-muted); margin: 0 0 20px; }

.fg-assess-progress-bar { height: 4px; background: var(--fg-parchment2); border-radius: 2px; overflow: hidden; margin-bottom: 8px; }
.fg-assess-progress-fill { height: 100%; background: var(--fg-gold); border-radius: 2px; width: 5.5%; transition: width 0.4s ease; }
.fg-assess-progress-label { font-size: 12px; color: var(--fg-ink-muted); margin: 0; }

.fg-assess-body { padding: 0 0 40px; }
.fg-assess-screen { display: none; }
.fg-assess-screen.active { display: block; }

.fg-assess-section-tag { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.6px; color: var(--fg-gold); margin-bottom: 14px; }
.fg-assess-question { font-family: var(--fg-font-display); font-size: 1.35rem; font-weight: 600; color: var(--fg-ink); line-height: 1.4; margin: 0 0 24px; }

.fg-assess-options { display: flex; flex-direction: column; gap: 10px; margin-bottom: 28px; }
.fg-assess-option {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 14px 16px;
  background: #fff;
  border: 1px solid var(--fg-border);
  border-radius: var(--fg-radius);
  cursor: pointer;
  text-align: left;
  font-family: var(--fg-font-body);
  font-size: 0.95rem;
  color: var(--fg-ink-2);
  line-height: 1.5;
  transition: border-color 0.15s, background 0.15s;
}
.fg-assess-option:hover { border-color: var(--fg-gold); background: var(--fg-parchment); }
.fg-assess-option.selected { border-color: var(--fg-gold); background: var(--fg-parchment); border-width: 2px; }
.fg-assess-option__marker {
  flex-shrink: 0;
  width: 18px; height: 18px;
  border: 2px solid var(--fg-border);
  border-radius: 50%;
  margin-top: 2px;
  transition: border-color 0.15s, background 0.15s;
}
.fg-assess-option.selected .fg-assess-option__marker { border-color: var(--fg-gold); background: var(--fg-gold); }

.fg-assess-nav { display: flex; align-items: center; gap: 12px; }
.fg-assess-next {
  padding: 11px 26px;
  background: var(--fg-ink);
  color: var(--fg-parchment);
  border: none;
  border-radius: var(--fg-radius);
  font-family: var(--fg-font-body);
  font-size: 0.9rem;
  cursor: pointer;
  transition: background 0.2s, opacity 0.2s;
}
.fg-assess-next:disabled { opacity: 0.4; cursor: not-allowed; }
.fg-assess-next:not(:disabled):hover { background: #2a2018; }
.fg-assess-back {
  background: none;
  border: 1px solid var(--fg-border);
  padding: 10px 18px;
  border-radius: var(--fg-radius);
  font-family: var(--fg-font-body);
  font-size: 0.88rem;
  color: var(--fg-ink-muted);
  cursor: pointer;
}
.fg-assess-back:hover { background: var(--fg-parchment); }

/* Completion screen */
.fg-assess-complete { text-align: center; padding: 60px 24px; }
.fg-assess-complete__icon { font-size: 3rem; color: var(--fg-gold); margin-bottom: 16px; }
.fg-assess-complete__title { font-family: var(--fg-font-display); font-size: 1.8rem; font-weight: 700; color: var(--fg-ink); margin: 0 0 10px; }
.fg-assess-complete__text { color: var(--fg-ink-muted); font-size: 14px; margin: 0 0 20px; }
.fg-assess-spinner { width: 32px; height: 32px; border: 3px solid var(--fg-parchment2); border-top-color: var(--fg-gold); border-radius: 50%; animation: fg-spin 0.8s linear infinite; margin: 0 auto; }
@keyframes fg-spin { to { transform: rotate(360deg); } }

/* Gates */
.fg-assess-done, .fg-assess-gate, .fg-profile-gate {
  background: var(--fg-parchment);
  border: 1px solid var(--fg-border);
  border-radius: var(--fg-radius);
  padding: 28px 24px;
  text-align: center;
  font-family: var(--fg-font-body);
}
.fg-profile-gate h2 { font-family: var(--fg-font-display); font-size: 1.5rem; margin: 0 0 10px; color: var(--fg-ink); }
.fg-profile-gate p  { color: var(--fg-ink-muted); margin: 0 0 18px; }

/* ═══════════════════════════════════════════════
   PROFILE
   ═══════════════════════════════════════════════ */

.fg-profile-wrap { max-width: 900px; margin: 0 auto; font-family: var(--fg-font-body); }

.fg-archetype-banner {
  display: flex;
  align-items: center;
  gap: 20px;
  background: var(--fg-parchment);
  border: 1px solid var(--fg-border);
  border-top: 4px solid var(--archetype-color, var(--fg-gold));
  border-radius: var(--fg-radius);
  padding: 24px 28px;
  margin-bottom: 16px;
}
.fg-archetype-banner__icon { font-size: 2.5rem; color: var(--archetype-color, var(--fg-gold)); flex-shrink: 0; }
.fg-archetype-banner__body { flex: 1; }
.fg-archetype-banner__greeting { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.5px; color: var(--fg-ink-muted); margin-bottom: 4px; }
.fg-archetype-banner__name    { font-family: var(--fg-font-display); font-size: 1.8rem; font-weight: 700; color: var(--fg-ink); margin: 0 0 4px; }
.fg-archetype-banner__tagline { font-size: 14px; color: var(--fg-ink-muted); margin: 0; font-style: italic; }
.fg-archetype-banner__date    { font-size: 11px; color: var(--fg-ink-muted); white-space: nowrap; }

.fg-profile-section { margin-bottom: 24px; }
.fg-archetype-desc { background: #fff; border: 1px solid var(--fg-border); border-radius: var(--fg-radius); padding: 20px 24px; }
.fg-archetype-desc__text { font-size: 14px; color: var(--fg-ink-2); line-height: 1.65; margin: 0 0 12px; }
.fg-archetype-focus { font-size: 13px; color: var(--fg-ink-2); padding: 10px 14px; background: var(--fg-parchment); border-radius: 4px; border-left: 3px solid var(--fg-gold); }

.fg-profile-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-bottom: 24px; }
.fg-profile-card { background: #fff; border: 1px solid var(--fg-border); border-radius: var(--fg-radius); padding: 18px 20px; box-shadow: var(--fg-shadow); }
.fg-profile-card--warning { border-color: #FECACA; background: #FFF5F5; }
.fg-profile-card__title { font-family: var(--fg-font-display); font-size: 1rem; font-weight: 700; color: var(--fg-ink); margin: 0 0 14px; padding-bottom: 10px; border-bottom: 1px solid var(--fg-parchment2); }

.fg-engage-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 14px; }
.fg-engage-stat { text-align: center; padding: 10px; background: var(--fg-parchment); border-radius: 4px; }
.fg-engage-num  { display: block; font-family: var(--fg-font-display); font-size: 1.6rem; font-weight: 700; color: var(--fg-gold); }
.fg-engage-stat span { font-size: 11px; color: var(--fg-ink-muted); }

.fg-profile-links { display: flex; flex-direction: column; gap: 6px; }
.fg-profile-link { font-size: 13px; color: var(--fg-ink-2); text-decoration: none; padding: 6px 0; border-bottom: 1px solid var(--fg-parchment2); }
.fg-profile-link:last-child { border-bottom: none; }
.fg-profile-link:hover { color: var(--fg-gold); }

.fg-contradiction-note { font-size: 13px; color: var(--fg-red); line-height: 1.55; margin: 0 0 10px; }

/* Rule preview on profile page */
.fg-rule-preview { display: flex; flex-direction: column; gap: 10px; margin-bottom: 16px; }
.fg-rule-task { display: flex; gap: 12px; align-items: flex-start; background: #fff; border: 1px solid var(--fg-border); border-radius: var(--fg-radius); padding: 12px 14px; }
.fg-rule-task__freq { font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.4px; padding: 3px 8px; border-radius: 20px; white-space: nowrap; flex-shrink: 0; }
.fg-freq-daily   { background: #EFF6FF; color: #1E40AF; }
.fg-freq-weekly  { background: #F0FDF4; color: #14532D; }
.fg-freq-monthly { background: #FFFBEB; color: #92400E; }
.fg-freq-once    { background: #F5F3FF; color: #4C1D95; }

.fg-rule-task__body { flex: 1; }
.fg-rule-task__title { font-weight: 600; font-size: 13px; color: var(--fg-ink); margin-bottom: 3px; }
.fg-rule-task__desc  { font-size: 12px; color: var(--fg-ink-muted); line-height: 1.5; margin: 0; }

.fg-profile-retake { text-align: center; padding: 16px 0; }

/* ═══════════════════════════════════════════════
   RULE OF LIFE
   ═══════════════════════════════════════════════ */

.fg-rule-wrap { max-width: 800px; margin: 0 auto; font-family: var(--fg-font-body); }

.fg-rule-header { text-align: center; padding: 32px 24px 24px; }
.fg-rule-header__archetype { font-size: 14px; font-weight: 600; letter-spacing: 0.3px; margin-bottom: 8px; }
.fg-rule-title    { font-family: var(--fg-font-display); font-size: 2.2rem; font-weight: 700; color: var(--fg-ink); margin: 0 0 6px; }
.fg-rule-subtitle { font-size: 13px; color: var(--fg-ink-muted); margin: 0; }

.fg-rule-focus-card { background: var(--fg-parchment); border: 1px solid var(--fg-border); border-left: 3px solid var(--fg-gold); border-radius: var(--fg-radius); padding: 14px 18px; margin-bottom: 28px; font-size: 14px; color: var(--fg-ink-2); }

.fg-rule-section { margin-bottom: 32px; }
.fg-rule-section-title { display: flex; align-items: center; gap: 10px; font-family: var(--fg-font-display); font-size: 1.2rem; font-weight: 700; color: var(--fg-ink); margin: 0 0 16px; padding-bottom: 10px; border-bottom: 1px solid var(--fg-border); }
.fg-rule-freq-dot { width: 10px; height: 10px; border-radius: 50%; flex-shrink: 0; }
.fg-freq-dot-daily   { background: #3B82F6; }
.fg-freq-dot-weekly  { background: #22C55E; }
.fg-freq-dot-monthly { background: #F59E0B; }
.fg-freq-dot-once    { background: #8B5CF6; }

.fg-rule-tasks { display: flex; flex-direction: column; gap: 10px; }
.fg-rule-task-card { background: #fff; border: 1px solid var(--fg-border); border-radius: var(--fg-radius); padding: 16px 18px; box-shadow: var(--fg-shadow); }
.fg-rule-task-card__header { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 6px; gap: 12px; }
.fg-rule-task-card__title  { font-weight: 600; font-size: 14px; color: var(--fg-ink); }
.fg-rule-task-card__vector { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.4px; white-space: nowrap; }
.fg-rule-task-card__desc   { font-size: 13px; color: var(--fg-ink-muted); line-height: 1.55; margin: 0 0 10px; }
.fg-rule-task-card__progress { display: flex; align-items: center; gap: 10px; }

.fg-rule-regen-note { background: var(--fg-parchment); border: 1px solid var(--fg-border); border-radius: var(--fg-radius); padding: 14px 18px; font-size: 13px; color: var(--fg-ink-muted); margin-top: 16px; }

/* ── Responsive ─────────────────────────────── */
@media (max-width: 700px) {
  .fg-profile-grid { grid-template-columns: 1fr; }
  .fg-archetype-banner { flex-direction: column; text-align: center; }
  .fg-archetype-banner__date { display: none; }
  .fg-assess-question { font-size: 1.1rem; }
}
