/* ═══════════════════════════════════════════════
   PLAYBOOK DESIGN SYSTEM · DARK EDITION
   Base: Neutral-900 · Accent: Teal/Mint
   Otimizado para: conforto visual + PDF + mobile
   ═══════════════════════════════════════════════ */

@import url('https://fonts.googleapis.com/css2?family=Space+Grotesk:wght@400;500;600;700&family=JetBrains+Mono:wght@400;500&display=swap');

:root {
  /* ── Neutral scale (dark-first) ── */
  --n-950: #0a0a0b;
  --n-900: #111113;
  --n-850: #18181b;
  --n-800: #1e1e22;
  --n-750: #252529;
  --n-700: #2c2c31;
  --n-600: #3f3f46;
  --n-500: #52525b;
  --n-400: #71717a;
  --n-300: #a1a1aa;
  --n-200: #d4d4d8;
  --n-100: #e4e4e7;
  --n-50:  #fafafa;

  /* ── Brand accent ── */
  --accent:     #32b9be;
  --accent-dim: #2a9a9e;
  --mint:       #5bcebf;
  --sage:       #a4dcb9;
  --yellow:     #fdf4b0;

  /* ── Semantic ── */
  --bg:         var(--n-900);
  --bg-raised:  var(--n-850);
  --bg-card:    var(--n-800);
  --bg-input:   var(--n-750);
  --border:     var(--n-700);
  --border-dim: var(--n-750);
  --text:       var(--n-100);
  --text-dim:   var(--n-400);
  --text-muted: var(--n-500);

  /* ── Typography ── */
  --font: 'Space Grotesk', system-ui, sans-serif;
  --mono: 'JetBrains Mono', monospace;

  /* ── Spacing ── */
  --s-4: 4px; --s-8: 8px; --s-12: 12px; --s-16: 16px;
  --s-20: 20px; --s-24: 24px; --s-32: 32px; --s-40: 40px;
  --s-48: 48px; --s-64: 64px;

  /* ── Radius ── */
  --r-sm: 6px; --r-md: 10px; --r-lg: 14px; --r-xl: 20px;
}

/* ── RESET ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; font-size: 16px; -webkit-font-smoothing: antialiased; }
body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.65;
}
img { max-width: 100%; display: block; }
a { color: var(--accent); }

/* ── LAYOUT ── */
.container { max-width: 820px; margin: 0 auto; padding: 0 var(--s-24); }

/* ═══════════════════════════════════════════════
   HEADER — Hero 95vh
   ═══════════════════════════════════════════════ */
.pb-header {
  background: var(--n-950);
  color: var(--n-50);
  min-height: 95vh;
  padding: var(--s-64) var(--s-24);
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
}
.pb-header::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse at 70% 40%, rgba(50,185,190,.12) 0%, transparent 55%),
    radial-gradient(ellipse at 20% 80%, rgba(91,206,191,.06) 0%, transparent 50%);
}
.pb-header::after {
  content: '';
  position: absolute;
  bottom: 0; left: 0; right: 0;
  height: 120px;
  background: linear-gradient(transparent, var(--n-950));
}
.pb-header .container { position: relative; z-index: 1; }

.pb-header__logo {
  height: 52px;
  margin-bottom: var(--s-32);
  opacity: .9;
}
.pb-header__tag {
  display: inline-flex;
  align-items: center;
  background: rgba(50,185,190,.12);
  color: var(--accent);
  padding: 5px var(--s-16);
  border-radius: 6px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
  margin-bottom: var(--s-20);
  border: 1px solid rgba(50,185,190,.15);
}
.pb-header__title {
  font-size: clamp(34px, 5.5vw, 56px);
  font-weight: 700;
  letter-spacing: -.03em;
  line-height: 1.08;
  margin-bottom: var(--s-16);
  color: var(--n-50);
}
.pb-header__title span { color: var(--accent); }
.pb-header__subtitle {
  font-size: 17px;
  color: var(--n-400);
  max-width: 540px;
  margin-bottom: var(--s-32);
  line-height: 1.6;
}

/* ── Result Cards (header) ── */
.pb-results {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: var(--s-12);
  margin-top: var(--s-32);
}
.pb-result-card {
  background: rgba(255,255,255,.04);
  border: 1px solid var(--n-750);
  border-radius: var(--r-md);
  padding: var(--s-16);
}
.pb-result-card__label {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: .1em;
  color: var(--n-500);
  margin-bottom: var(--s-4);
  font-weight: 600;
}
.pb-result-card__value {
  font-size: 20px;
  font-weight: 700;
  color: var(--n-100);
  line-height: 1.2;
}
.pb-result-card__period {
  font-size: 11px;
  color: var(--n-500);
  margin-top: var(--s-4);
}

/* ═══════════════════════════════════════════════
   NAV — Sticky phase index
   ═══════════════════════════════════════════════ */
.pb-nav {
  background: var(--n-950);
  border-bottom: 1px solid var(--n-800);
  position: sticky;
  top: 0;
  z-index: 100;
  backdrop-filter: blur(12px);
}
.pb-nav__inner {
  display: flex;
  align-items: center;
  gap: var(--s-4);
  padding: var(--s-12) var(--s-24);
  overflow-x: auto;
  scrollbar-width: none;
}
.pb-nav__item {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px var(--s-12);
  border-radius: var(--r-sm);
  font-size: 12px;
  font-weight: 600;
  color: var(--n-500);
  text-decoration: none;
  white-space: nowrap;
  transition: all .2s;
  cursor: pointer;
  border: none;
  background: none;
  font-family: var(--font);
}
.pb-nav__item:hover { color: var(--n-300); background: var(--n-850); }
.pb-nav__item.active { color: var(--accent); background: rgba(50,185,190,.08); }
.pb-nav__dot {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--n-700);
  flex-shrink: 0;
}
.pb-nav__item.active .pb-nav__dot { background: var(--accent); }

/* ═══════════════════════════════════════════════
   CONTENT
   ═══════════════════════════════════════════════ */
.pb-content { padding: var(--s-48) var(--s-24); }

/* ── Phase / Section ── */
.pb-phase {
  margin-bottom: var(--s-64);
  scroll-margin-top: 72px;
}
.pb-phase__header {
  display: flex;
  align-items: center;
  gap: var(--s-16);
  margin-bottom: var(--s-32);
  padding-bottom: var(--s-20);
  border-bottom: 1px solid var(--n-800);
}
.pb-phase__number {
  width: 42px; height: 42px;
  border-radius: var(--r-md);
  background: rgba(50,185,190,.1);
  border: 1px solid rgba(50,185,190,.2);
  color: var(--accent);
  font-size: 16px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.pb-phase__title {
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -.02em;
  color: var(--n-100);
}
.pb-phase__timeline {
  font-size: 12px;
  color: var(--accent);
  font-weight: 600;
  margin-top: 2px;
}
.pb-phase__why {
  background: var(--n-850);
  border-left: 2px solid var(--accent);
  padding: var(--s-16) var(--s-20);
  border-radius: 0 var(--r-sm) var(--r-sm) 0;
  margin-bottom: var(--s-32);
  font-size: 14px;
  color: var(--n-400);
  line-height: 1.7;
}

/* ── Step Card ── */
.pb-step {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: var(--s-20) var(--s-24);
  margin-bottom: var(--s-12);
  transition: border-color .2s;
}
.pb-step:hover { border-color: var(--n-600); }
.pb-step.completed { border-color: rgba(164,220,185,.3); }

.pb-step__header {
  display: flex;
  align-items: flex-start;
  gap: var(--s-12);
  cursor: pointer;
}
.pb-step__check {
  width: 20px; height: 20px;
  border: 2px solid var(--n-600);
  border-radius: 50%;
  flex-shrink: 0;
  margin-top: 2px;
  display: flex; align-items: center; justify-content: center;
  transition: all .2s;
}
.pb-step.completed .pb-step__check {
  background: var(--sage);
  border-color: var(--sage);
}
.pb-step__check::after {
  content: '';
  width: 6px;
  height: 10px;
  border-right: 2px solid var(--n-900);
  border-bottom: 2px solid var(--n-900);
  transform: rotate(45deg) translate(-1px, -1px);
  display: none;
}
.pb-step.completed .pb-step__check::after { display: block; }
.pb-step__title {
  font-size: 15px;
  font-weight: 600;
  color: var(--n-200);
}
.pb-step__time {
  font-size: 11px;
  color: var(--accent);
  font-weight: 600;
  background: rgba(50,185,190,.08);
  padding: 3px 8px;
  border-radius: 4px;
  white-space: nowrap;
}

.pb-step__body {
  padding-top: var(--s-16);
  padding-left: 32px;
}
.pb-step__body p {
  color: var(--n-400);
  font-size: 14px;
  line-height: 1.7;
  margin-bottom: var(--s-12);
}
.pb-step__body ul {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.pb-step__body li {
  display: flex;
  gap: 8px;
  font-size: 14px;
  color: var(--n-300);
}
.pb-step__body li::before {
  content: '';
  width: 5px;
  height: 5px;
  border-right: 1.5px solid var(--accent-dim);
  border-top: 1.5px solid var(--accent-dim);
  transform: rotate(45deg);
  flex-shrink: 0;
  margin-top: 7px;
}

/* ── Checkpoint ── */
.pb-checkpoint {
  background: var(--n-850);
  border: 1px solid var(--n-750);
  border-radius: var(--r-lg);
  padding: var(--s-24);
  margin: var(--s-20) 0;
}
.pb-checkpoint__title {
  font-size: 12px;
  font-weight: 700;
  color: var(--accent);
  margin-bottom: var(--s-16);
  text-transform: uppercase;
  letter-spacing: .08em;
}
.pb-checkpoint__items { display: flex; flex-direction: column; gap: 8px; }
.pb-checkpoint__item {
  display: flex;
  align-items: center;
  gap: var(--s-12);
  font-size: 14px;
  color: var(--n-300);
  cursor: pointer;
}
.pb-checkpoint__item input[type="checkbox"] {
  width: 16px; height: 16px;
  accent-color: var(--accent);
  cursor: pointer;
}

/* ── Script / Template (code block) ── */
.pb-script {
  background: var(--n-950);
  border: 1px solid var(--n-800);
  border-radius: var(--r-lg);
  padding: var(--s-20) var(--s-24);
  margin: var(--s-16) 0;
  position: relative;
}
.pb-script__label {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: .1em;
  color: var(--accent);
  margin-bottom: var(--s-12);
  font-weight: 600;
}
.pb-script__text {
  font-family: var(--mono);
  font-size: 13px;
  line-height: 1.7;
  white-space: pre-wrap;
  color: var(--n-300);
}
.pb-script__copy {
  position: absolute;
  top: var(--s-12);
  right: var(--s-12);
  background: var(--n-800);
  color: var(--n-400);
  border: 1px solid var(--n-700);
  padding: 4px 12px;
  border-radius: var(--r-sm);
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
  font-family: var(--font);
  transition: all .2s;
}
.pb-script__copy:hover { background: var(--n-750); color: var(--n-200); }
.pb-script__copy.copied { background: rgba(164,220,185,.15); color: var(--sage); border-color: rgba(164,220,185,.3); }

/* ── Metrics Table ── */
.pb-metrics { overflow-x: auto; margin: var(--s-20) 0; }
.pb-metrics table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}
.pb-metrics th {
  background: var(--n-850);
  color: var(--n-400);
  padding: var(--s-12) var(--s-16);
  text-align: left;
  font-weight: 600;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: .06em;
  border-bottom: 1px solid var(--n-750);
}
.pb-metrics td {
  padding: var(--s-12) var(--s-16);
  border-bottom: 1px solid var(--n-800);
  color: var(--n-300);
}
.pb-metrics tr:last-child td { border-bottom: none; }
.pb-metrics tr:hover td { background: var(--n-850); }
.pb-metrics td:not(:first-child) { text-align: center; font-weight: 600; color: var(--accent); }

/* ── Progress Bar ── */
.pb-progress-bar {
  position: fixed;
  bottom: 0;
  left: 0; right: 0;
  background: var(--n-950);
  border-top: 1px solid var(--n-800);
  padding: var(--s-12) var(--s-24);
  display: flex;
  align-items: center;
  gap: var(--s-16);
  z-index: 200;
}
.pb-progress-bar__track {
  flex: 1;
  height: 4px;
  background: var(--n-800);
  border-radius: 2px;
  overflow: hidden;
}
.pb-progress-bar__fill {
  height: 100%;
  background: var(--accent);
  border-radius: 2px;
  transition: width .4s ease;
}
.pb-progress-bar__label {
  font-size: 12px;
  font-weight: 600;
  color: var(--accent);
  white-space: nowrap;
  font-family: var(--mono);
}

/* ── Success ── */
.pb-step__success {
  margin-top: var(--s-12);
  padding: var(--s-12) var(--s-16);
  background: rgba(164,220,185,.08);
  border: 1px solid rgba(164,220,185,.15);
  border-radius: var(--r-sm);
  font-size: 13px;
  color: var(--sage);
  font-weight: 500;
}
.pb-step__success::before {
  content: '';
  display: inline-block;
  width: 5px;
  height: 9px;
  border-right: 1.5px solid var(--sage);
  border-bottom: 1.5px solid var(--sage);
  transform: rotate(45deg);
  margin-right: 8px;
  vertical-align: middle;
}

/* ═══════════════════════════════════════════════
   HUB INDEX
   ═══════════════════════════════════════════════ */
.hub-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: var(--s-16);
  margin-top: var(--s-32);
}
.hub-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: var(--s-24);
  transition: all .25s ease;
  display: block;
  text-decoration: none;
  color: inherit;
}
.hub-card:hover {
  border-color: var(--n-600);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(0,0,0,.3);
}
.hub-card--ready { border-color: rgba(50,185,190,.25); }
.hub-card--ready:hover { border-color: var(--accent); }

.hub-card__number {
  width: 36px; height: 36px;
  border-radius: var(--r-md);
  background: rgba(50,185,190,.1);
  color: var(--accent);
  font-size: 14px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: var(--s-12);
}
.hub-card__title {
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 6px;
  color: var(--n-100);
  letter-spacing: -.01em;
}
.hub-card__desc {
  font-size: 13px;
  color: var(--n-500);
  line-height: 1.5;
  margin-bottom: var(--s-16);
}
.hub-card__meta {
  display: flex;
  align-items: center;
  gap: var(--s-8);
  flex-wrap: wrap;
}
.hub-card__status {
  padding: 3px 10px;
  border-radius: 4px;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .06em;
}
.hub-card__status--pending {
  background: rgba(253,244,176,.08);
  color: #c4b44a;
  border: 1px solid rgba(253,244,176,.15);
}
.hub-card__status--active,
.hub-card__status--ready {
  background: rgba(164,220,185,.1);
  color: var(--sage);
  border: 1px solid rgba(164,220,185,.2);
}
.hub-card__result {
  font-size: 11px;
  color: var(--n-500);
  font-weight: 500;
}

/* Hub header stats */
.hub-stats { display: flex; gap: var(--s-24); margin-top: var(--s-24); }
.hub-stat { text-align: center; }
.hub-stat__value {
  font-size: 32px;
  font-weight: 700;
  color: var(--n-100);
  line-height: 1;
  font-family: var(--mono);
}
.hub-stat__label {
  font-size: 11px;
  color: var(--n-500);
  text-transform: uppercase;
  letter-spacing: .08em;
  margin-top: 4px;
}
.hub-divider {
  width: 1px;
  background: var(--n-800);
  align-self: stretch;
}

/* Workflow banner */
.hub-workflow {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: var(--s-20) var(--s-24);
  margin-top: var(--s-40);
  display: flex;
  align-items: center;
  gap: var(--s-20);
}
.hub-workflow__icon {
  width: 40px; height: 40px;
  border-radius: var(--r-md);
  background: rgba(253,244,176,.08);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  flex-shrink: 0;
}
.hub-workflow__text {
  font-size: 13px;
  color: var(--n-400);
  line-height: 1.5;
}
.hub-workflow__text strong { color: var(--n-200); }

/* ═══════════════════════════════════════════════
   MOBILE
   ═══════════════════════════════════════════════ */
@media (max-width: 640px) {
  .pb-header { min-height: 85vh; padding: var(--s-40) var(--s-16); }
  .pb-results { grid-template-columns: 1fr 1fr; }
  .pb-step { padding: var(--s-16); }
  .pb-step__body { padding-left: var(--s-16); }
  .pb-script { padding: var(--s-16); }
  .hub-grid { grid-template-columns: 1fr; }
  .hub-stats { flex-direction: row; gap: var(--s-16); }
  .hub-divider { width: 1px; }
  .hub-workflow { flex-direction: column; text-align: center; }
}

/* ═══════════════════════════════════════════════
   PRINT / PDF
   ═══════════════════════════════════════════════ */
@media print {
  body { background: var(--n-900); }
  .pb-nav, .pb-progress-bar { display: none; }
  .pb-header { min-height: auto; page-break-after: always; }
  .pb-phase { page-break-inside: avoid; }
  .pb-step { page-break-inside: avoid; }
}
