/* ============================================================
   Base / shared styles (formerly playbooks-common.css)
   ============================================================ */

/* SSO: hide page until authentication is confirmed */
[data-auth-pending] { visibility: hidden; }

:root {
  --bg: #08111f;
  --bg-2: #0c1731;
  --bg-strong: #0d1a34;
  --surface: rgba(255, 255, 255, 0.82);
  --surface-strong: rgba(12, 22, 40, 0.88);
  --panel-soft: rgba(255, 255, 255, 0.84);
  --line: rgba(10, 24, 46, 0.1);
  --text: #102035;
  --muted: #5a6d87;
  --text-soft: #5a6d87;
  --white: #f7f9fd;
  --text-inverse: #f7f9fd;
  --blue: #008bf7;
  --accent: #c833b6;
  --accent-dark: #a52ca0;
  --success-bg: #dff2e4;
  --success-text: #1d7a47;
  --warning-bg: #f8edd4;
  --warning-text: #87611a;
  --info-bg: #deebfb;
  --info-text: #2858b8;
  --shadow: 0 32px 90px rgba(0, 0, 0, 0.18);
  --radius-xl: 28px;
  --radius-lg: 22px;
  --radius-md: 16px;
  --sidebar: 290px;
  --sidebar-width: 290px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: "Avenir Next", "Segoe UI", "Helvetica Neue", Arial, sans-serif;
  color: var(--text);
  line-height: 1.6;
  background: linear-gradient(180deg, #eef4fb 0%, #f8fbff 42%, #edf2f8 100%);
}

a {
  color: inherit;
  text-decoration: none;
}

.layout {
  display: grid;
  grid-template-columns: var(--sidebar) minmax(0, 1fr);
  min-height: 100vh;
}

.sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  padding: 24px 18px;
  overflow: auto;
  background: linear-gradient(180deg, #09111f 0%, #0d1a34 100%);
  color: var(--white);
  border-right: 1px solid rgba(255, 255, 255, 0.08);
}

.sidebar-top {
  display: flex;
  margin-bottom: 18px;
}

.xebia-logo {
  display: block;
  width: 108px;
}

.xebia-logo svg {
  width: 50%;
  height: auto;
  display: block;
}

.brand {
  display: flex;
  align-items: flex-start;
  margin-bottom: 18px;
}

.brand strong,
.hero h1,
h2,
h3,
.stage-number {
  font-family: "Poppins", "Avenir Next", "Segoe UI", sans-serif;
  letter-spacing: -0.03em;
}

.brand strong {
  display: block;
  font-size: 1rem;
}

.brand-home-link {
  display: inline-block;
  color: var(--white) !important;
  font-family: "Poppins", "Avenir Next", "Segoe UI", sans-serif;
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: -0.03em;
  text-decoration-color: rgba(247, 249, 253, 0.38);
  text-underline-offset: 4px;
  transition: opacity 0.18s ease, text-decoration-color 0.18s ease;
}

.brand-home-link:hover {
  opacity: 0.8;
  text-decoration-color: rgba(247, 249, 253, 0.78);
}

.brand span {
  display: block;
  color: rgba(247, 249, 253, 0.68);
  font-size: 0.76rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.playbook-switcher {
  position: relative;
  margin-top: 8px;
}

.playbook-switcher summary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 34px;
  padding: 0 12px;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(255, 255, 255, 0.05);
  color: rgba(247, 249, 253, 0.88);
  font-size: 0.82rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  cursor: pointer;
  list-style: none;
  transition: background 0.18s ease, border-color 0.18s ease, transform 0.18s ease;
}

.playbook-switcher summary::-webkit-details-marker {
  display: none;
}

.playbook-switcher summary::after {
  content: "";
  width: 8px;
  height: 8px;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: translateY(-1px) rotate(45deg);
  transition: transform 0.18s ease;
}

.playbook-switcher summary:hover,
.playbook-switcher[open] summary {
  background: rgba(255, 255, 255, 0.09);
  border-color: rgba(255, 255, 255, 0.24);
}

.playbook-switcher[open] summary::after {
  transform: translateY(2px) rotate(-135deg);
}

.playbook-switcher-menu {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  min-width: 180px;
  padding: 8px;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(10, 20, 38, 0.98);
  box-shadow: 0 18px 36px rgba(0, 0, 0, 0.24);
}

.playbook-switcher-item {
  display: block;
  padding: 9px 11px;
  border-radius: 10px;
  color: rgba(247, 249, 253, 0.84) !important;
  font-size: 0.88rem;
  transition: background 0.18s ease, color 0.18s ease;
}

.playbook-switcher-item:hover {
  background: rgba(255, 255, 255, 0.08);
  color: var(--white) !important;
}

.nav-label,
.sidebar h2 {
  margin: 0 0 12px;
  font-size: 0.8rem;
  color: rgba(247, 249, 253, 0.62);
  text-transform: uppercase;
  letter-spacing: 0.18em;
}

.toc {
  display: grid;
  gap: 8px;
}

.toc a {
  display: block;
  padding: 10px 12px;
  border-radius: 12px;
  color: rgba(247, 249, 253, 0.82);
  transition: 0.18s ease;
  font-size: 0.95rem;
  line-height: 1.35;
}

.toc a:hover,
.toc a.is-active {
  background: rgba(255, 255, 255, 0.08);
  text-decoration: none;
}

.toc a.is-active {
  color: var(--white) !important;
  box-shadow: inset 3px 0 0 var(--blue);
}

.main {
  min-width: 0;
}

.mobile-topbar {
  display: none;
  position: sticky;
  top: 0;
  z-index: 40;
  padding: 14px 18px;
  backdrop-filter: blur(16px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  justify-content: space-between;
  align-items: center;
}

.mobile-topbar-title {
  color: inherit !important;
  text-decoration: underline;
  text-decoration-color: rgba(247, 249, 253, 0.36);
  text-underline-offset: 4px;
}

@media (max-width: 1100px) {
  .layout {
    grid-template-columns: 1fr;
  }

  .sidebar {
    display: none;
  }

  .mobile-topbar {
    display: flex;
  }
}

/* ============================================================
   index.html — Portal page styles
   ============================================================ */

.sidebar-note {
  margin-top: 22px;
  padding: 16px;
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: rgba(247, 249, 253, 0.76);
  font-size: 0.92rem;
}

.hero {
  position: relative;
  overflow: hidden;
  padding: 76px 48px 62px;
  background: linear-gradient(180deg, #08111f 0%, #0c1731 58%, #102240 100%);
  color: var(--white);
}

.hero::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 4px;
  background: var(--blue);
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 18px;
  color: rgba(247, 249, 253, 0.78);
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.18em;
}

.eyebrow::before {
  content: "";
  width: 42px;
  height: 2px;
  border-radius: 999px;
  background: var(--accent);
}

.hero h1 {
  margin: 0;
  max-width: 20ch;
  font-size: clamp(2.8rem, 5.2vw, 4.9rem);
  line-height: 1.02;
}

.hero p {
  max-width: 72ch;
  margin: 20px 0 0;
  font-size: 1.06rem;
  color: rgba(247, 249, 253, 0.76);
}

.hero-badges {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 28px;
}

.badge {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  padding: 0 14px;
  border-radius: 999px;
  color: rgba(247, 249, 253, 0.82);
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.1);
  font-size: 0.9rem;
}

.content {
  padding: 34px 32px 60px;
}

.panel {
  max-width: 1180px;
  margin: 0 auto;
  padding: 32px;
  border-radius: var(--radius-xl);
  background: rgba(255, 255, 255, 0.82);
  backdrop-filter: blur(14px);
  border: 1px solid rgba(9, 17, 31, 0.08);
  box-shadow: var(--shadow);
}

.hero-content {
  max-width: 1180px;
  margin: 0 auto;
}

.section + .section {
  margin-top: 42px;
}

.section-title {
  margin: 0 0 10px;
  font-size: clamp(1.8rem, 3vw, 2.5rem);
}

.section-lead {
  margin: 0 0 20px 0;
  max-width: 74ch;
  color: var(--muted);
  font-size: 1rem;
}

.how-grid,
.stage-grid,
.common-grid,
.links-grid {
  display: grid;
  gap: 18px;
  margin-top: 24px;
}

.how-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.common-grid {
  grid-template-columns: 1.2fr 1fr;
}

.stage-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.links-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.card,
.common-card,
.process-map,
.link-card {
  border-radius: var(--radius-lg);
  background: rgba(255, 255, 255, 0.78);
  border: 1px solid rgba(9, 17, 31, 0.08);
  box-shadow: 0 16px 36px rgba(18, 35, 61, 0.08);
}

.card,
.common-card,
.link-card {
  padding: 24px;
}

.process-map {
  padding: 28px;
  margin-top: 24px;
  background: rgba(255, 255, 255, 0.84);
}

.step-tag,
.card-tag {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
  font-size: 0.76rem;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  color: var(--indigo);
}

.step-tag::before,
.card-tag::before {
  content: "";
  width: 24px;
  height: 2px;
  border-radius: 999px;
  background: var(--accent);
}

.card h3,
.common-card h3,
.link-card h3 {
  margin: 0 0 10px;
  font-size: 1.18rem;
}

.card p,
.common-card p,
.link-card p,
.common-card li,
.stage-card li {
  color: var(--muted);
}

.stage-flow {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
}

.stage-card {
  position: relative;
  overflow: hidden;
  padding: 24px 24px 22px;
  border-radius: var(--radius-lg);
  background: rgba(255, 255, 255, 0.82);
  border: 1px solid rgba(9, 17, 31, 0.08);
  box-shadow: 0 18px 40px rgba(20, 37, 63, 0.08);
}

.stage-card::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  width: 100%;
  height: 4px;
  background: var(--accent);
}

.stage-head {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 14px;
}

.stage-number {
  width: 48px;
  height: 48px;
  flex: 0 0 48px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  background: var(--accent);
  color: var(--white);
  font-size: 1rem;
  font-weight: 700;
}

.status {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  padding: 0 12px;
  border-radius: 999px;
  font-size: 0.82rem;
  font-weight: 600;
  white-space: nowrap;
}

.status-live {
  color: var(--success-text);
  background: var(--success-bg);
}

.status-planned {
  color: var(--warning-text);
  background: var(--warning-bg);
}

.status-foundation {
  color: var(--info-text);
  background: var(--info-bg);
}

.stage-card ul,
.common-card ul {
  margin: 14px 0 0;
  padding-left: 18px;
}

.common-stack {
  display: grid;
  gap: 14px;
}

.common-pill {
  padding: 16px 18px;
  border-radius: var(--radius-md);
  background: rgba(9, 17, 31, 0.04);
  border: 1px solid rgba(9, 17, 31, 0.06);
}

.common-pill strong {
  display: block;
  margin-bottom: 6px;
}

.action-row {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 18px;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 18px;
  border-radius: 999px;
  font-weight: 600;
  transition: 0.18s ease;
}

.button-primary {
  color: var(--white);
  background: var(--accent);
  box-shadow: 0 12px 26px rgba(200, 51, 182, 0.22);
}

.button-secondary {
  color: var(--text);
  background: rgba(9, 17, 31, 0.05);
  border: 1px solid rgba(9, 17, 31, 0.1);
}

.button-primary:hover {
  background: var(--accent-dark);
}

.button-disabled {
  color: var(--muted);
  background: rgba(9, 17, 31, 0.04);
  border: 1px dashed rgba(9, 17, 31, 0.12);
  cursor: default;
}

.button:hover {
  transform: translateY(-1px);
}

.lane-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 14px;
}

.lane-title h3 {
  margin: 0;
  font-size: 1.22rem;
}

.footer-note {
  margin-top: 34px;
  padding-top: 18px;
  border-top: 1px solid rgba(9, 17, 31, 0.08);
  color: var(--muted);
  font-size: 0.94rem;
}

.mobile-topbar {
  background: rgba(8, 17, 31, 0.92);
  color: var(--white);
}

@media (max-width: 1100px) {
  .hero {
    padding: 58px 22px 46px;
  }

  .hero h1 {
    max-width: none;
  }

  .content {
    padding: 22px 14px 44px;
  }

  .panel {
    padding: 22px 18px;
  }

  .how-grid,
  .common-grid,
  .stage-grid,
  .links-grid {
    grid-template-columns: 1fr;
  }
}

/* ============================================================
   development.html — Development playbook page styles
   ============================================================ */

a { color: #2145c2; text-decoration: none; }

code {
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace;
  background: rgba(9, 17, 31, 0.06);
  padding: 0.16rem 0.38rem;
  border-radius: 8px;
  font-size: 0.92em;
}

pre {
  overflow-x: auto;
  padding: 20px;
  border-radius: var(--radius-md);
  background: #091321;
  color: #e9f0fa;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.06);
}

pre code {
  background: transparent;
  padding: 0;
  color: inherit;
}

blockquote {
  margin: 24px 0;
  padding: 2px 0 2px 22px;
  border-left: 4px solid var(--accent);
  color: #314663;
  background: rgba(255, 255, 255, 0.45);
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
}

hr {
  border: 0;
  height: 1px;
  margin: 38px 0;
  background: linear-gradient(90deg, rgba(9, 17, 31, 0.06), rgba(9, 17, 31, 0.18), rgba(9, 17, 31, 0.06));
}

.sidebar h2 {
  margin-bottom: 10px;
}

.toc {
  gap: 6px;
}

.toc a {
  padding: 8px 12px;
  font-size: 0.94rem;
}

.toc-level-1 { font-weight: 700; margin-top: 8px; }
.toc-level-2 { padding-left: 16px !important; }
.toc-level-3 {
  padding-left: 28px !important;
  color: rgba(245, 248, 255, 0.64) !important;
  font-size: 0.88rem !important;
}

.top-ribbon {
  position: sticky;
  top: 0;
  z-index: 20;
  height: 6px;
  background: linear-gradient(90deg, #3b82f6, #7c3aed, #cb2eba, #f97316, #facc15);
}

.content-wrap {
  padding: 24px 32px 56px;
}

.content h1,
.content h2,
.content h3,
.content h4 {
  scroll-margin-top: 24px;
  color: #0d1a2c;
  font-family: "Poppins", "Avenir Next", sans-serif;
  letter-spacing: -0.03em;
}

.content h1 {
  font-size: 2.2rem;
  margin: 42px 0 14px;
}

.content h2 {
  font-size: 1.7rem;
  margin: 38px 0 12px;
  padding-top: 10px;
  border-top: 1px solid rgba(9, 17, 31, 0.08);
}

.content h3 {
  font-size: 1.28rem;
  margin: 28px 0 10px;
}

.content h4 {
  font-size: 1.05rem;
  margin: 22px 0 8px;
}

.content h1[id],
.content h2[id],
.content h3[id],
.content h4[id] {
  scroll-margin-top: 90px;
}

.content > h1:first-child {
  margin-top: 0;
}

.content p,
.content li {
  color: var(--text-soft);
  font-size: 1rem;
}

.content ul,
.content ol {
  padding-left: 24px;
}

.table-wrap {
  overflow-x: auto;
  margin: 22px 0;
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.75);
  border: 1px solid rgba(9, 17, 31, 0.08);
}

table {
  width: 100%;
  border-collapse: collapse;
  min-width: 640px;
}

th, td {
  padding: 14px 16px;
  border-bottom: 1px solid rgba(9, 17, 31, 0.08);
  text-align: left;
  vertical-align: top;
  color: var(--text-soft);
}

th {
  background: rgba(9, 17, 31, 0.04);
  color: #14253a;
  font-size: 0.92rem;
}

.mobile-topbar a {
  color: inherit;
}

.back-to-top {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 45;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 52px;
  height: 52px;
  border-radius: 999px;
  background: #09111f;
  color: var(--white);
  font-size: 1.5rem;
  box-shadow: 0 18px 36px rgba(9, 17, 31, 0.24);
  opacity: 0;
  pointer-events: none;
  transform: translateY(10px);
  transition: opacity 0.18s ease, transform 0.18s ease, background 0.18s ease;
}

.back-to-top:hover {
  background: #122341;
}

.back-to-top.is-visible {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

@media (max-width: 1080px) {
  .content-wrap {
    padding: 22px 14px 46px;
  }

  .content {
    padding: 22px 18px 32px;
  }

  .back-to-top {
    right: 16px;
    bottom: 16px;
    width: 48px;
    height: 48px;
  }

  table {
    min-width: 560px;
  }
}
