/* =============================================================
   FHC Developer Portal - shared styles
   Loaded by every page. Header is byte-identical across pages.
   ============================================================= */

:root {
  --paper:    #faf8f3;
  --paper-2:  #f2ede0;
  --ink:      #0f172a;
  --muted:    #64748b;
  --rule:     #d9d2bf;
  --rule-2:   #c7bfa6;
  --accent:   #0e7c7b;
  --accent-dk:#0a5a5a;
  --ok:       #065f46;
  --err:      #9a3412;
  --warn:     #854d0e;
  --code-bg:  #0f172a;
  --code-fg:  #f1f5f9;
  --code-dim: #94a3b8;
  --code-kw:  #7dd3fc;
  --code-str: #fde68a;
  --code-num: #fca5a5;

  --sans:  "IBM Plex Sans", ui-sans-serif, system-ui, sans-serif;
  --serif: "Fraunces", ui-serif, Georgia, serif;
  --mono:  "IBM Plex Mono", ui-monospace, SFMono-Regular, Menlo, monospace;

  --container: 1160px;
  --header-h:  68px;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  font-family: var(--sans);
  color: var(--ink);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
}

a {
  color: var(--accent);
  text-decoration: none;
  transition: color .15s ease;
}
a:hover { color: var(--accent-dk); }

/* =============================================================
   HEADER - IDENTICAL MARKUP ACROSS ALL PAGES
   ============================================================= */

header.portal-top {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(250, 248, 243, 0.94);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--rule);
  height: var(--header-h);
}

header.portal-top .inner {
  max-width: var(--container);
  height: 100%;
  margin: 0 auto;
  padding: 0 32px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 40px;
}

/* Brand - fixed-width visual anchor so layout never shifts */
header.portal-top .brand {
  display: inline-flex;
  align-items: baseline;
  gap: 10px;
  font-family: var(--serif);
  font-weight: 600;
  font-size: 19px;
  letter-spacing: -0.01em;
  color: var(--ink);
  text-decoration: none;
  white-space: nowrap;
}
header.portal-top .brand:hover { color: var(--accent-dk); }
header.portal-top .brand .dot {
  display: inline-block;
  width: 9px;
  height: 9px;
  background: var(--accent);
  transform: rotate(45deg);
  flex: 0 0 auto;
  position: relative;
  top: 1px;
}
header.portal-top .brand .ver {
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.1em;
  color: var(--muted);
  text-transform: uppercase;
  padding: 2px 6px;
  background: var(--paper-2);
  border: 1px solid var(--rule);
  border-radius: 2px;
  position: relative;
  top: -1px;
}

/* Nav - equal-weight items, no CTA */
header.portal-top nav.portal-nav {
  display: flex;
  align-items: center;
  gap: 2px;
}
header.portal-top nav.portal-nav a {
  font-family: var(--mono);
  font-size: 12.5px;
  font-weight: 500;
  letter-spacing: 0.04em;
  color: var(--ink);
  padding: 8px 14px;
  border-radius: 2px;
  text-decoration: none;
  position: relative;
  transition: color .15s ease, background .15s ease;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
header.portal-top nav.portal-nav a:hover {
  color: var(--accent);
  background: var(--paper-2);
}
header.portal-top nav.portal-nav a.current {
  color: var(--accent-dk);
}
header.portal-top nav.portal-nav a.current::after {
  content: "";
  position: absolute;
  bottom: -1px;
  left: 14px;
  right: 14px;
  height: 2px;
  background: var(--accent);
}

/* Subtle divider between API group and Reference group */
header.portal-top nav.portal-nav .divider {
  width: 1px;
  height: 16px;
  background: var(--rule-2);
  margin: 0 10px;
}

/* "Soon" badge for coming endpoints */
header.portal-top nav.portal-nav .soon {
  font-family: var(--mono);
  font-size: 9px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--warn);
  background: rgba(133, 77, 14, 0.08);
  padding: 1px 5px;
  border-radius: 2px;
  line-height: 1.4;
}

/* Mobile - collapse nav to icon-ish compact list */
@media (max-width: 780px) {
  header.portal-top .inner {
    padding: 0 18px;
    gap: 16px;
  }
  header.portal-top .brand .ver { display: none; }
  header.portal-top nav.portal-nav { gap: 0; }
  header.portal-top nav.portal-nav a {
    padding: 8px 10px;
    font-size: 11.5px;
  }
  header.portal-top nav.portal-nav .divider { display: none; }
  header.portal-top nav.portal-nav .soon { display: none; }
}

/* =============================================================
   SHARED CODE INLINE
   ============================================================= */

code.inline {
  font-family: var(--mono);
  font-size: 0.88em;
  background: var(--paper-2);
  border: 1px solid var(--rule);
  padding: 1px 6px;
  border-radius: 2px;
  color: var(--ink);
}
