/* Magna Bureau — Factbook CE2 entry experience (Conversion Engine 2.0, Track B).
   Linked ONLY from factbook.html and fr/factbook.html.
   Reuses the site's design tokens and the existing map/search/profile components.
   No shared stylesheet is modified by this file. */

/* ---------------- Hero ---------------- */
.fbce2-hero {
  text-align: center;
  max-width: 880px;
  margin: 0 auto;
  padding: 2.4rem 0 1.8rem;
}
.fbce2-eyebrow {
  display: inline-block;
  font-family: var(--font-display, "Rajdhani", sans-serif);
  font-weight: 700;
  font-size: 0.72rem;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: #B80000;
  margin-bottom: 1.05rem;
}
.fbce2-h1 {
  font-family: "Playfair Display", Georgia, serif;
  font-weight: 800;
  font-size: clamp(2.05rem, 5.4vw, 3.4rem);
  line-height: 1.12;
  margin: 0 0 1rem;
}
.fbce2-sub {
  font-family: var(--font-serif, "Source Serif 4", Georgia, serif);
  font-size: clamp(1.05rem, 2.2vw, 1.28rem);
  line-height: 1.6;
  max-width: 650px;
  margin: 0 auto 1.15rem;
}
.fbce2-line {
  font-family: var(--font-display, "Rajdhani", sans-serif);
  font-weight: 600;
  font-size: 0.85rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  opacity: 0.85;
  margin: 0 0 1.5rem;
}
.fbce2-actions {
  display: flex;
  gap: 0.8rem;
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: 1.35rem;
}
.fbce2-btn {
  font-family: var(--font-display, "Rajdhani", sans-serif);
  font-weight: 700;
  font-size: 0.88rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  min-height: 48px;
  padding: 0.8rem 1.6rem;
  border-radius: 0.45rem;
  border: 1px solid #0F1B33;
  background: transparent;
  color: #0F1B33;
  cursor: pointer;
}
.fbce2-btn-primary {
  background: #0F1B33;
  color: #ffffff;
}
.fbce2-btn:hover {
  border-color: #B80000;
}
.fbce2-btn-primary:hover {
  background: #B80000;
}
.fbce2-trust {
  font-size: 0.82rem;
  letter-spacing: 0.05em;
  opacity: 0.72;
  margin: 0;
}

/* ---------------- Entry grid: search + preview beside the map ---------------- */
.fbce2-entry {
  display: grid;
  grid-template-columns: 1fr;
  gap: 26px;
  margin-top: 1.7rem;
  align-items: start;
}
@media (min-width: 1000px) {
  .fbce2-entry {
    grid-template-columns: minmax(310px, 390px) 1fr;
  }
}
.fbce2-find .fb-search {
  max-width: none;
  margin: 0;
}
.fbce2-find .fb-search input {
  width: 100%;
  box-sizing: border-box;
  padding: 0.85rem 1rem;
  font-size: 1rem;
  border-width: 1px;
  border-style: solid;
  border-color: var(--line-strong, #c9c2b2);
  border-radius: 0.5rem;
  background: var(--card, #ffffff);
  color: inherit;
}
.fbce2-searchwrap {
  position: relative;
}
.fbce2-find .search-results {
  position: absolute;
  left: 0;
  right: 0;
  top: calc(100% + 6px);
  z-index: 40;
  background: var(--card, #ffffff);
  border-width: 1px;
  border-style: solid;
  border-color: var(--line-strong, #c9c2b2);
  border-radius: 0.5rem;
  box-shadow: 0 14px 34px rgba(12, 17, 29, 0.14);
  overflow: hidden;
  max-height: 342px;
  overflow-y: auto;
}
.fbce2-find .search-results button {
  display: block;
  width: 100%;
  box-sizing: border-box;
  text-align: left;
  padding: 0.7rem 1rem;
  font-size: 0.95rem;
  background: transparent;
  border: 0;
  border-bottom-width: 1px;
  border-bottom-style: solid;
  border-bottom-color: var(--line, #e6e1d3);
  color: inherit;
  cursor: pointer;
}
.fbce2-find .search-results button:last-child {
  border-bottom: 0;
}
.fbce2-find .search-results button:hover {
  background: var(--gold-soft, rgba(200, 162, 74, 0.12));
}
.fbce2-find .search-results button.fbce2-active {
  background: #0F1B33;
  color: #ffffff;
}

/* ---------------- Preview panel (space reserved: no layout shift) ---------------- */
.fbce2-preview {
  background: var(--card, #ffffff);
  border-width: 1px;
  border-style: solid;
  border-color: var(--line, #d8d2c4);
  border-top-width: 3px;
  border-top-color: var(--gold, #B80000);
  border-radius: 0.6rem;
  padding: 22px 22px 18px;
  min-height: 258px;
  box-sizing: border-box;
  margin-top: 14px;
}
.fbce2-pv-empty {
  text-align: center;
  opacity: 0.62;
  font-size: 0.98rem;
  line-height: 1.6;
  max-width: 30ch;
  margin: 3.2rem auto 0;
}
.fbce2-pv-name {
  font-family: "Playfair Display", Georgia, serif;
  font-weight: 700;
  font-size: 1.55rem;
  line-height: 1.2;
  margin: 0 0 0.2rem;
}
.fbce2-pv-region {
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  opacity: 0.62;
  margin: 0 0 1.05rem;
}
.fbce2-pv-stats {
  display: grid;
  gap: 0.5rem;
  margin: 0 0 1.05rem;
}
.fbce2-pv-stat {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 1rem;
  border-bottom-width: 1px;
  border-bottom-style: dashed;
  border-bottom-color: var(--line, #e0dacb);
  padding-bottom: 0.45rem;
  font-size: 0.95rem;
}
.fbce2-pv-stat dt {
  opacity: 0.62;
  flex: none;
}
.fbce2-pv-stat dd {
  margin: 0;
  font-weight: 600;
  text-align: right;
}
.fbce2-pv-stat dd.fbce2-pv-wide {
  text-align: left;
  font-weight: 500;
}
.fbce2-pv-score {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
  margin: 0 0 1.1rem;
}
.fbce2-pv-score-label {
  font-family: var(--font-display, "Rajdhani", sans-serif);
  font-weight: 700;
  font-size: 0.72rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}
.fbce2-pv-badge {
  display: inline-block;
  background: #0f172a;
  color: #f5c518;
  font-weight: 700;
  font-size: 0.95rem;
  letter-spacing: 0.06em;
  padding: 4px 12px;
  border-radius: 0.35rem;
}
.fbce2-pv-cta {
  font-family: var(--font-display, "Rajdhani", sans-serif);
  font-weight: 700;
  font-size: 0.86rem;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: #B80000;
  text-decoration: none;
}
.fbce2-pv-cta:hover {
  text-decoration: underline;
}

/* ---------------- Below the entry: region selectors + full profile ---------------- */
.fbce2-entry ~ .region-chips {
  margin-top: 26px;
}
.fbce2-entry ~ .profile {
  margin-top: 26px;
}

/* ---------------- Focus visibility ---------------- */
.fbce2-btn:focus-visible,
.fbce2-pv-cta:focus-visible,
.fbce2-find .fb-search input:focus-visible {
  outline: 3px solid #F2A900;
  outline-offset: 2px;
}
.fbce2-find .search-results button:focus-visible {
  outline: 3px solid #F2A900;
  outline-offset: -3px;
}

/* ---------------- Motion: restrained, reduced-motion safe ---------------- */
@media (prefers-reduced-motion: no-preference) {
  .fbce2-btn {
    transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease;
  }
  .fbce2-pv-in {
    animation: fbce2fade 0.28s ease;
  }
  @keyframes fbce2fade {
    from { opacity: 0; transform: translateY(4px); }
    to { opacity: 1; transform: none; }
  }
}
