/* ==========================================================================
   ContractLab — Shared Components
   ========================================================================== */

/* ---- Top nav ---- */
.nav {
  position: sticky;
  top: 0;
  z-index: 40;
  background: var(--navy);
  border-bottom: 1px solid rgba(255,255,255,0.08);
}

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--sp-3) var(--sp-6);
  max-width: 1180px;
  margin: 0 auto;
}

.brand {
  display: flex;
  align-items: center;
  gap: var(--sp-2);
  color: var(--white);
  font-family: var(--font-display);
  font-size: var(--fs-md);
  font-weight: 600;
}

.brand-mark {
  width: 22px; height: 28px;
  background: var(--tape);
  border-radius: 2px;
  position: relative;
  flex-shrink: 0;
}
.brand-mark::after {
  content: '';
  position: absolute;
  left: 0; right: 0; top: 42%;
  height: 3px;
  background: var(--brass-light);
}

.brand small {
  display: block;
  font-family: var(--font-mono);
  font-size: 0.65rem;
  letter-spacing: 0.1em;
  color: var(--brass-light);
  font-weight: 400;
  text-transform: uppercase;
}

.nav-links {
  display: flex;
  gap: var(--sp-5);
  list-style: none;
  margin: 0; padding: 0;
  font-size: var(--fs-sm);
}

.nav-links a {
  color: rgba(246,241,231,0.78);
  font-weight: 500;
}
.nav-links a:hover, .nav-links a.active {
  color: var(--white);
  text-decoration: none;
}

.nav-cta {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-2);
  background: var(--brass);
  color: var(--navy-deep);
  font-weight: 600;
  font-size: var(--fs-sm);
  padding: var(--sp-2) var(--sp-4);
  border-radius: var(--radius-sm);
  border: none;
}
.nav-cta:hover { background: var(--brass-light); text-decoration: none; }

/* ---- Session badge (demo login layer) ---- */
.session-badge {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  margin-left: var(--sp-4);
  padding-left: var(--sp-4);
  border-left: 1px solid rgba(255,255,255,0.15);
}
.session-info { display: flex; flex-direction: column; line-height: 1.2; }
.session-name { color: var(--white); font-size: var(--fs-sm); font-weight: 600; }
.session-role {
  font-family: var(--font-mono); font-size: 0.65rem; text-transform: uppercase;
  letter-spacing: 0.06em; color: var(--brass-light);
}
.demo-mode-tag {
  font-family: var(--font-mono); font-size: 0.65rem; font-weight: 700;
  letter-spacing: 0.08em; text-transform: uppercase;
  background: var(--tape); color: var(--white);
  padding: 3px 8px; border-radius: 999px; white-space: nowrap;
}
.session-switch { font-size: var(--fs-xs); color: rgba(246,241,231,0.7); white-space: nowrap; }
.session-switch:hover { color: var(--white); }
.session-switch-guest {
  font-weight: 600; color: var(--brass-light);
  background: rgba(255,255,255,0.08); padding: var(--sp-2) var(--sp-3);
  border-radius: var(--radius-sm); white-space: nowrap;
}
.session-switch-guest:hover { background: rgba(255,255,255,0.16); text-decoration: none; }

@media (max-width: 860px) {
  .session-badge { margin-left: var(--sp-2); padding-left: var(--sp-2); border-left: none; }
  .session-info, .session-switch:not(.session-switch-guest) { display: none; }
  /* the DEMO MODE tag (and the guest login CTA, when present) stay visible
     even on narrow viewports — the indicator must be persistent (review §3) */
}

/* ---- Buttons ---- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-2);
  font-size: var(--fs-sm);
  font-weight: 600;
  padding: var(--sp-3) var(--sp-5);
  border-radius: var(--radius-sm);
  border: 1px solid transparent;
  transition: all 0.15s var(--ease-standard);
}
.btn-primary {
  background: var(--navy);
  color: var(--white);
}
.btn-primary:hover { background: var(--navy-soft); text-decoration: none; }

.btn-tape {
  background: var(--tape);
  color: var(--white);
}
.btn-tape:hover { background: var(--tape-dark); text-decoration: none; }

.btn-ghost {
  background: transparent;
  border-color: var(--parchment-line);
  color: var(--navy);
}
.btn-ghost:hover { border-color: var(--navy); text-decoration: none; }

/* ---- Section scaffolding ---- */
.section { padding: var(--sp-9) 0; }
.section-tight { padding: var(--sp-7) 0; }

.section-head {
  max-width: 640px;
  margin: 0 0 var(--sp-7);
}

/* ---- Card base (a "file") ---- */
.file-card {
  background: var(--white);
  border: 1px solid var(--parchment-line);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-card);
  transition: transform 0.18s var(--ease-standard), box-shadow 0.18s var(--ease-standard);
}
.file-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-raised);
}

/* ---- Status badges ---- */
.badge {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-1);
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 3px 8px;
  border-radius: 999px;
  font-weight: 600;
}
.badge-verified  { background: var(--teal-tint); color: var(--teal-dark); }
.badge-review    { background: var(--brass-tint); color: #6E5424; }
.badge-teaching  { background: var(--tape-tint); color: var(--tape-dark); }

/* ---- Capability level chip ---- */
.level {
  font-family: var(--font-mono);
  font-size: var(--fs-xs);
  padding: 2px 8px;
  border-radius: var(--radius-sm);
  font-weight: 600;
}
.level-not        { background: #EDE7DA; color: var(--ink-faint); }
.level-developing { background: var(--brass-tint); color: #6E5424; }
.level-demonstrated { background: var(--teal-tint); color: var(--teal-dark); }
.level-competent  { background: #DCEBDF; color: var(--success); }
.level-strong     { background: var(--navy); color: var(--white); }

/* ---- Disclaimer strip ---- */
.disclaimer {
  background: var(--navy-deep);
  color: rgba(246,241,231,0.75);
  font-size: var(--fs-xs);
  text-align: center;
  padding: var(--sp-2) var(--sp-4);
  font-family: var(--font-mono);
}
.disclaimer strong { color: var(--brass-light); }

/* ---- Footer ---- */
.site-footer {
  background: var(--navy-deep);
  color: rgba(246,241,231,0.6);
  padding: var(--sp-7) 0 var(--sp-5);
  font-size: var(--fs-sm);
  margin-top: var(--sp-9);
}
.site-footer a { color: rgba(246,241,231,0.85); }

/* ---- Utility ---- */
.stack-v { display: flex; flex-direction: column; }
.gap-2 { gap: var(--sp-2); }
.gap-4 { gap: var(--sp-4); }
.gap-6 { gap: var(--sp-6); }
