/* ============================================================
   My Council Framework — Documentation site
   Built on the MCF design tokens (tokens.css / components.css).
   Layout: fixed navy sidebar + scrollable content (docs pattern).
   ============================================================ */

:root {
  /* Mirror the key brand tokens so docs.css stands alone if needed. */
  --darkblue: #011A39;
  --lightblue: #0049A5;
  --darkteal: #006A7A;
  --lightteal: #009BA8;
  --darkgreen: #008C36;
  --lightgreen: #4EB00F;
  --purple: #7C3AED;
  --paper: #FBFBF8;
  --paper2: #F4F4F0;
  --ink: #011A39;
  --muted: #586472;
  --faint: #8A93A0;
  --line: #E2E6EA;
  --line2: #D2D8DE;
  --white: #fff;
  --action: #0049A5;
  --action-hover: #003A85;
  --success: #008C36;
  --success-bg: #EAF7EE;
  --info: #006A7A;
  --info-bg: #E6F4F6;
  --warning: #9A6400;
  --warning-bg: #FFF3E0;
  --error: #B42318;
  --error-bg: #FCEBEA;
  --sans: 'Outfit', system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
  --mono: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, monospace;
  --r-sm: 6px;
  --r: 10px;
  --r-lg: 16px;
  --pill: 100px;
  --sh-sm: 0 1px 2px rgba(1, 26, 57, .06);
  --sh: 0 8px 30px rgba(1, 26, 57, .10);
  --sh-lg: 0 16px 50px rgba(1, 26, 57, .16);
  --focus: 3px solid var(--purple);
  --sidebar-w: 288px;
  --content-max: 1180px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; scroll-padding-top: 90px; }

body {
  margin: 0;
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.65;
  color: var(--ink);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
}

:where(a, button, input, select, textarea, [tabindex], summary):focus-visible {
  outline: var(--focus);
  outline-offset: 2px;
  border-radius: 3px;
}

img { max-width: 100%; }

/* ============ LAYOUT ============ */
.layout { display: flex; align-items: flex-start; }

.sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  width: var(--sidebar-w);
  min-width: var(--sidebar-w);
  background: var(--darkblue);
  color: #fff;
  display: flex;
  flex-direction: column;
  z-index: 40;
}

.sidebar__brand {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 24px 24px 18px;
  text-decoration: none;
  color: #fff;
}
.sidebar__brand img { width: 36px; height: 36px; }
.sidebar__brand b { font-weight: 600; font-size: 15px; line-height: 1.1; display: block; }
.sidebar__brand span {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: #7e8aa0;
  display: block;
  margin-top: 4px;
}

.sidebar__search { padding: 0 18px 10px; }
.sidebar__search input {
  width: 100%;
  background: rgba(255, 255, 255, .07);
  border: 1px solid rgba(255, 255, 255, .12);
  border-radius: var(--r-sm);
  color: #fff;
  font-family: var(--sans);
  font-size: 13px;
  padding: 9px 12px;
}
.sidebar__search input::placeholder { color: #8794a6; }

.sidebar__nav { flex: 1; overflow-y: auto; padding: 8px 12px 30px; }
.sidebar__nav::-webkit-scrollbar { width: 8px; }
.sidebar__nav::-webkit-scrollbar-thumb { background: rgba(255, 255, 255, .12); border-radius: 8px; }

.nav-group {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: #6b7890;
  padding: 18px 12px 6px;
}
.sidebar__nav a {
  display: block;
  padding: 7px 12px;
  border-radius: var(--r-sm);
  color: #aeb8c6;
  text-decoration: none;
  font-size: 13.5px;
  font-weight: 500;
}
.sidebar__nav a:hover { background: rgba(255, 255, 255, .06); color: #fff; }
.sidebar__nav a.is-active {
  background: var(--lightblue);
  color: #fff;
  box-shadow: inset 3px 0 0 var(--lightteal);
}
.nav-hidden { display: none !important; }

.content { flex: 1; min-width: 0; }
.content__inner { max-width: var(--content-max); padding: 40px 56px 120px; }

/* ============ TOPBAR (mobile) ============ */
.topbar {
  display: none;
  position: sticky;
  top: 0;
  z-index: 35;
  align-items: center;
  gap: 14px;
  padding: 12px 18px;
  background: var(--darkblue);
  color: #fff;
}
.topbar img { width: 28px; height: 28px; }
.topbar b { font-size: 14px; font-weight: 600; }
.menu-toggle {
  margin-left: auto;
  background: rgba(255, 255, 255, .1);
  border: 0;
  color: #fff;
  font-size: 20px;
  width: 40px;
  height: 38px;
  border-radius: var(--r-sm);
  cursor: pointer;
}

/* ============ BREADCRUMB ============ */
.breadcrumb {
  font-size: 13px;
  color: var(--muted);
  margin-bottom: 18px;
}
.breadcrumb a { color: var(--action); text-decoration: none; }
.breadcrumb a:hover { text-decoration: underline; }

/* ============ TYPOGRAPHY ============ */
.content h1 {
  font-weight: 700;
  font-size: 40px;
  letter-spacing: -.02em;
  line-height: 1.1;
  margin: 0 0 14px;
}
.content h2 {
  font-weight: 600;
  font-size: 28px;
  letter-spacing: -.01em;
  margin: 52px 0 16px;
  padding-top: 8px;
}
.content h3 { font-weight: 600; font-size: 21px; margin: 34px 0 12px; }
.content h4 { font-weight: 600; font-size: 17px; margin: 26px 0 8px; }
.content p { margin: 0 0 16px; max-width: 74ch; }
.content ul, .content ol { max-width: 74ch; margin: 0 0 16px; padding-left: 24px; }
.content li { margin: 6px 0; }
.lead { font-size: 18px; color: var(--muted); line-height: 1.6; max-width: 70ch; }
.content a { color: var(--action); }
.content strong { font-weight: 600; }

hr { border: 0; border-top: 1px solid var(--line); margin: 40px 0; }

/* ============ CALLOUTS ============ */
.callout {
  border: 1px solid var(--line);
  border-left: 4px solid var(--muted);
  background: var(--white);
  border-radius: var(--r);
  padding: 14px 18px;
  margin: 22px 0;
  box-shadow: var(--sh-sm);
}
.callout p:last-child { margin-bottom: 0; }
.callout__label {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: .08em;
  text-transform: uppercase;
  font-weight: 600;
  margin-bottom: 6px;
  display: block;
}
.callout--note { border-left-color: var(--info); background: var(--info-bg); }
.callout--note .callout__label { color: var(--info); }
.callout--tip { border-left-color: var(--success); background: var(--success-bg); }
.callout--tip .callout__label { color: var(--success); }
.callout--warning { border-left-color: var(--warning); background: var(--warning-bg); }
.callout--warning .callout__label { color: var(--warning); }
.callout--important { border-left-color: var(--purple); background: #F5F0FE; }
.callout--important .callout__label { color: var(--purple); }

/* ============ SCREENSHOT FRAME ============ */
figure.shot {
  margin: 26px 0;
  border: 1px solid var(--line2);
  border-radius: var(--r-lg);
  overflow: hidden;
  box-shadow: var(--sh);
  background: var(--paper2);
}
figure.shot img { display: block; width: 100%; }
figure.shot figcaption {
  font-size: 13px;
  color: var(--muted);
  padding: 10px 16px;
  border-top: 1px solid var(--line);
  background: var(--white);
}
.shot--placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 220px;
  color: var(--faint);
  font-family: var(--mono);
  font-size: 13px;
  text-align: center;
  padding: 30px;
  background: repeating-linear-gradient(45deg, var(--paper2), var(--paper2) 12px, #eef0ec 12px, #eef0ec 24px);
}

/* ============ VIDEO TUTORIAL EMBED ============ */
/* Mirrors figure.shot, framed for a player. Sits at the top of guide pages
   that have a recorded walkthrough. preload="none" + poster means the MP4
   only loads on play — kind to bandwidth, and to the auth-gated stream. */
figure.video {
  margin: 26px 0;
  border: 1px solid var(--line2);
  border-radius: var(--r-lg);
  overflow: hidden;
  box-shadow: var(--sh);
  background: #000;
}
figure.video video {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 9;
  background: #000;
}
figure.video figcaption {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 13px;
  color: var(--muted);
  padding: 10px 16px;
  border-top: 1px solid var(--line);
  background: var(--white);
}
figure.video figcaption .video__badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  flex: none;
  font-weight: 600;
  font-size: 12px;
  color: var(--white);
  background: var(--action);
  border-radius: var(--pill);
  padding: 3px 9px;
  letter-spacing: .02em;
}
.video__fallback {
  margin: 0;
  padding: 14px 16px;
  color: #cdd6e0;
  font-size: 14px;
}
.video__fallback a { color: #fff; }

/* ============ STEPS ============ */
ol.steps { list-style: none; counter-reset: step; padding-left: 0; }
ol.steps > li {
  counter-increment: step;
  position: relative;
  padding-left: 46px;
  margin: 16px 0;
}
ol.steps > li::before {
  content: counter(step);
  position: absolute;
  left: 0;
  top: -2px;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: var(--lightblue);
  color: #fff;
  font-family: var(--mono);
  font-weight: 600;
  font-size: 13px;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* ============ BADGES / PILLS ============ */
.badge {
  display: inline-block;
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .03em;
  padding: 3px 9px;
  border-radius: var(--pill);
  vertical-align: middle;
}
.badge--role { background: var(--info-bg); color: var(--info); }
.badge--new { background: var(--success-bg); color: var(--success); }
.badge--super { background: #F5F0FE; color: var(--purple); }
kbd {
  font-family: var(--mono);
  font-size: 12px;
  background: var(--paper2);
  border: 1px solid var(--line2);
  border-bottom-width: 2px;
  border-radius: 5px;
  padding: 2px 7px;
}

/* ============ TABLES ============ */
.content table {
  width: 100%;
  border-collapse: collapse;
  margin: 22px 0;
  font-size: 14.5px;
}
.content th, .content td {
  text-align: left;
  padding: 10px 14px;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
}
.content thead th {
  background: var(--paper2);
  font-weight: 600;
  font-size: 13px;
  border-bottom: 2px solid var(--line2);
}

/* ============ CODE ============ */
code {
  font-family: var(--mono);
  font-size: .88em;
  background: var(--paper2);
  border: 1px solid var(--line);
  border-radius: 5px;
  padding: 1px 6px;
}
pre {
  background: var(--darkblue);
  color: #d6e0ee;
  border-radius: var(--r);
  padding: 16px 18px;
  overflow-x: auto;
  font-family: var(--mono);
  font-size: 13px;
  line-height: 1.6;
}
pre code { background: none; border: 0; color: inherit; padding: 0; }

/* ============ FEATURE CARDS (landing + section index) ============ */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 18px;
  margin: 28px 0;
}
.card {
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: 20px;
  text-decoration: none;
  color: var(--ink);
  background: var(--white);
  box-shadow: var(--sh-sm);
  transition: transform .12s ease, box-shadow .12s ease, border-color .12s ease;
  display: block;
}
.card:hover { transform: translateY(-2px); box-shadow: var(--sh); border-color: var(--lightteal); }
.card h3 { margin: 0 0 6px; font-size: 17px; }
.card p { margin: 0; font-size: 14px; color: var(--muted); }
.card__tag {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--lightteal);
  display: block;
  margin-bottom: 10px;
}

/* ============ PREV / NEXT ============ */
.pager {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  margin-top: 60px;
  padding-top: 28px;
  border-top: 1px solid var(--line);
}
.pager a {
  flex: 1;
  border: 1px solid var(--line);
  border-radius: var(--r);
  padding: 14px 18px;
  text-decoration: none;
  color: var(--ink);
  background: var(--white);
}
.pager a:hover { border-color: var(--lightteal); box-shadow: var(--sh-sm); }
.pager .next { text-align: right; }
.pager small { color: var(--faint); font-family: var(--mono); font-size: 11px; letter-spacing: .08em; text-transform: uppercase; }
.pager b { display: block; color: var(--action); font-size: 15px; margin-top: 3px; }

/* ============ HERO (landing) ============ */
.hero {
  background: radial-gradient(120% 140% at 0% 0%, #03255a 0%, var(--darkblue) 55%);
  color: #fff;
  padding: 64px 56px 56px;
  border-radius: 0 0 var(--r-lg) 0;
}
.hero .pill {
  display: inline-block;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: .1em;
  text-transform: uppercase;
  background: rgba(78, 176, 15, .16);
  color: var(--lightgreen);
  border: 1px solid rgba(78, 176, 15, .3);
  padding: 5px 12px;
  border-radius: var(--pill);
}
.hero h1 { font-size: 46px; margin: 18px 0 12px; letter-spacing: -.02em; color: #fff; }
.hero p { font-size: 19px; color: #b9c4d4; max-width: 64ch; }
.footer {
  border-top: 1px solid var(--line);
  padding: 28px 56px;
  color: var(--faint);
  font-size: 13px;
  display: flex;
  align-items: center;
  gap: 14px;
}
.footer img { height: 26px; opacity: .9; }

/* ============ RESPONSIVE ============ */
@media (max-width: 920px) {
  .topbar { display: flex; }
  .sidebar {
    position: fixed;
    top: 0; left: 0;
    transform: translateX(-100%);
    transition: transform .2s ease;
    box-shadow: var(--sh-lg);
  }
  .sidebar.is-open { transform: translateX(0); }
  .content__inner { padding: 28px 22px 90px; }
  .hero { padding: 44px 24px; }
  .footer { padding: 24px; }
  .content h1 { font-size: 32px; }
}

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; scroll-behavior: auto !important; }
}
