/* AI in Chief - "Toppers Notebook" design system (ported from design/AI in Chief v2.2.dc.html)
   Palette: cream #faf6ec, ink #1a2b4a, turmeric CTA #e8a020, red-pen #c73e2e,
   highlighter #ffe97a, marks-green #2e9e5b. Fonts: Bricolage Grotesque + Newsreader.
   Section markup keeps inline styles for fidelity; this file holds base + interactions
   (hover/focus states the artifact expressed via non-standard style-hover attrs). */

:root {
  --nb-cream: #faf6ec;
  --nb-ink: #1a2b4a;
  --nb-paper: #fffdf6;
  --nb-turmeric: #e8a020;
  --nb-turmeric-hover: #f2ad33;
  --nb-red: #c73e2e;
  --nb-highlight: #ffe97a;
  --nb-green: #2e9e5b;
  --nb-muted: #3d4a63;
  --nb-faint: #6b7280;
  --nb-rule: #e8e0cc;
}

/* Base - override Casper screen.css (loaded before this) */
html, body {
  margin: 0;
  padding: 0;
  background: var(--nb-cream);
  color: var(--nb-ink);
  font-family: 'Bricolage Grotesque', system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
}
body a { color: var(--nb-ink); text-decoration: none; }
body a:hover { color: var(--nb-red); }
.nb-serif { font-family: 'Newsreader', Georgia, serif; }

/* P-4: legacy assets/css/aic.css (old teal enterprise brand) sets
   `h1,h2,h3,h4,h5,h6 { color:#13585d }` and a system font-family, and it loads
   before this file - so headings rendered teal in the wrong typeface. Override
   with one extra level of specificity. Retire aic.css entirely once every
   template is ported off the old enterprise styles. */
body h1, body h2, body h3, body h4, body h5, body h6 {
  color: var(--nb-ink);
  font-family: 'Bricolage Grotesque', system-ui, sans-serif;
}

/* Marigold CTA */
.nb-cta {
  background: var(--nb-turmeric); color: #241a05; font-weight: 800;
  border: none; border-radius: 6px; box-shadow: 3px 3px 0 var(--nb-ink);
  cursor: pointer; display: inline-block; transition: box-shadow .1s, background .12s;
}
.nb-cta:hover { background: var(--nb-turmeric-hover); color: #241a05; }
.nb-cta:active { box-shadow: 1px 1px 0 var(--nb-ink); }

/* Outline button */
.nb-btn-outline {
  background: none; border: 2px solid var(--nb-ink); color: var(--nb-ink);
  font-family: 'Bricolage Grotesque', sans-serif; font-weight: 800;
  border-radius: 6px; cursor: pointer; transition: background .12s;
}
.nb-btn-outline:hover { background: var(--nb-highlight); }

/* Cards that lift on hover (doors, kits) */
.nb-card {
  background: var(--nb-paper); border: 2px solid var(--nb-ink); border-radius: 8px;
  box-shadow: 3px 3px 0 var(--nb-ink); transition: transform .12s, box-shadow .12s;
  color: inherit;
}
.nb-card:hover {
  transform: translate(-2px, -2px); box-shadow: 5px 5px 0 var(--nb-ink);
  text-decoration: none; color: inherit;
}

/* Highlighter underline link */
.nb-underline { border-bottom: 3px solid var(--nb-highlight); }
.nb-navlink { color: var(--nb-muted); white-space: nowrap; }
.nb-navlink:hover { color: var(--nb-red); }

/* Latest-posts rows */
.nb-post { transition: background .12s; color: inherit; }
.nb-post:hover { background: var(--nb-paper); color: inherit; text-decoration: none; }

/* Currency spans swap textContent via aic-geo.js; nothing to style */
.stake { white-space: nowrap; }

/* Ghost members inline signup: success line hidden until Ghost adds .success to the form */
[data-members-success] { display: none; }
[data-members-form].success ~ [data-members-success] { display: block; }
[data-members-form].success { display: none; }

/* --- Header / nav --- */
.nb-head {
  position: sticky; top: 0; z-index: 50;
  background: rgba(250, 246, 236, .95); backdrop-filter: blur(8px);
  border-bottom: 2px solid var(--nb-ink);
}
.nb-head-inner {
  max-width: 1140px; margin: 0 auto; padding: 0 24px;
  display: flex; align-items: center; gap: 28px; height: 64px;
}
.nb-logo { font-weight: 800; font-size: 21px; letter-spacing: -0.02em; white-space: nowrap; color: var(--nb-ink); }
.nb-nav { display: flex; gap: 26px; flex: 1; font-size: 14.5px; font-weight: 600; align-items: center; }
.nb-read { position: relative; }
.nb-read-btn {
  display: inline-flex; align-items: center; gap: 5px; background: none; border: none;
  font-family: 'Bricolage Grotesque', sans-serif; font-size: 14.5px; font-weight: 600;
  color: var(--nb-muted); cursor: pointer; padding: 0;
}
.nb-read-btn:hover { color: var(--nb-red); }
.nb-read-menu {
  position: absolute; top: 100%; left: -14px; padding-top: 14px; min-width: 210px; z-index: 60;
  display: none;
}
.nb-read:hover .nb-read-menu,
.nb-read:focus-within .nb-read-menu,
.nb-read-menu.open { display: block; }
.nb-read-panel {
  background: var(--nb-paper); border: 2px solid var(--nb-ink); border-radius: 8px;
  box-shadow: 4px 4px 0 var(--nb-ink); padding: 6px;
}
.nb-read-item { display: block; padding: 10px 14px; border-radius: 5px; color: var(--nb-ink); font-weight: 700; font-size: 14px; }
.nb-read-item:hover { background: var(--nb-highlight); color: var(--nb-ink); text-decoration: none; }
.nb-read-item small { display: block; font-family: 'Newsreader', serif; font-weight: 400; font-style: italic; font-size: 12px; color: var(--nb-faint); }
.nb-pill {
  background: var(--nb-turmeric); color: #241a05; font-weight: 800; font-size: 14px;
  padding: 10px 20px; border-radius: 6px; white-space: nowrap; box-shadow: 2px 2px 0 var(--nb-ink);
}
.nb-pill:hover { background: var(--nb-turmeric-hover); color: #241a05; }
.nb-burger { display: none; background: var(--nb-paper); border: 2px solid var(--nb-ink); border-radius: 6px; padding: 7px 11px; font-size: 18px; line-height: 1; color: var(--nb-ink); cursor: pointer; box-shadow: 2px 2px 0 var(--nb-ink); }
.nb-icon-btn { background: none; border: none; cursor: pointer; color: var(--nb-ink); display: inline-flex; align-items: center; padding: 6px; }
.nb-mobile-menu { display: none; border-top: 2px solid var(--nb-ink); background: var(--nb-paper); padding: 8px 16px 16px; }
.nb-mobile-menu.open { display: block; }
.nb-mobile-menu a { display: block; padding: 13px 8px; border-bottom: 1px solid var(--nb-rule); font-weight: 800; font-size: 16px; color: var(--nb-ink); }
.nb-mobile-menu a:hover { color: var(--nb-red); }

@media (max-width: 860px) {
  .nb-nav { display: none; }
  .nb-burger { display: inline-flex; }
}

/* P-6: at 360px the header measured 408px and pushed the "Join free" pill off
   screen (48px of body h-scroll). The audience is phone-first and that pill is
   the primary CTA, so it must always be visible. Tighten the header chrome and
   the marks-sheet cells on small phones; the body must never scroll sideways. */
@media (max-width: 420px) {
  .nb-head-inner { gap: 8px; padding: 0 12px; }
  .nb-logo { font-size: 17px; }
  .nb-pill { padding: 8px 12px; font-size: 13px; box-shadow: 2px 2px 0 var(--nb-ink); }
  .nb-icon-btn { padding: 2px; }
  .nb-burger { padding: 6px 9px; font-size: 16px; }
}
@media (max-width: 560px) {
  .nb-invoice > div > div { padding: 10px 8px !important; font-size: 12.5px !important; }
  .nb-invoice > div > div span { font-size: 12.5px !important; }
  /* Buttons must never out-measure their column. Measured with a classic
     scrollbar (clientWidth 345 at a 360 viewport), these still overran by 4px. */
  .nb-btn-outline, .nb-cta { max-width: 100%; box-sizing: border-box; }
  .nb-foot-inner { padding: 32px 16px; }
}

/* --- Reviews index (custom-reviews.hbs) --- */
.rv-chip {
  font-family: 'Bricolage Grotesque', sans-serif; font-size: 13px; font-weight: 800;
  padding: 8px 16px; border-radius: 6px; cursor: pointer;
  border: 2px solid var(--nb-ink); background: var(--nb-paper); color: var(--nb-ink);
}
.rv-chip:hover { background: var(--nb-highlight); color: var(--nb-ink); }
.rv-chip.is-on { background: var(--nb-ink); color: var(--nb-cream); }
.rv-row { transition: background .12s; }
.rv-row:hover { background: var(--nb-cream); text-decoration: none; color: inherit; }
.rv-score {
  width: 52px; height: 52px; border-radius: 999px; border: 3px solid var(--nb-ink);
  display: flex; align-items: center; justify-content: center;
  font-weight: 800; font-size: 16px; color: var(--nb-ink); transform: rotate(-4deg);
}
@media (max-width: 560px) {
  .rv-row { grid-template-columns: 44px 1fr !important; gap: 12px !important; padding: 14px 12px !important; }
  .rv-row > div:last-child { grid-column: 2; text-align: left !important; margin-top: 4px; }
  .rv-score { width: 44px; height: 44px; font-size: 14px; }
}

/* --- Path detail (custom-path.hbs): stage progress dots (localStorage, D-W12) --- */
.pt-dot {
  width: 42px; height: 42px; border-radius: 999px;
  border: 2px solid var(--nb-ink); background: var(--nb-paper); color: var(--nb-ink);
  font-family: 'Bricolage Grotesque', sans-serif; font-weight: 800; font-size: 16px;
  cursor: pointer; flex-shrink: 0; transition: border-color .12s, background .12s;
}
.pt-dot:hover { border-color: var(--nb-turmeric); }
.pt-dot.is-done { background: var(--nb-green); border-color: var(--nb-green); color: var(--nb-paper); }

/* --- Article body (post.hbs). Ghost emits {{content}} as one blob, so the
       editorial look is applied here rather than in markup. --- */
.nb-article {
  font-family: 'Newsreader', Georgia, serif;
  font-size: 18.5px; line-height: 1.8; color: #2b3532;
}
.nb-article > p { margin: 0 0 22px; }
.nb-article h2, .nb-article h3 {
  font-family: 'Bricolage Grotesque', system-ui, sans-serif;
  font-weight: 800; letter-spacing: -0.01em; color: var(--nb-ink);
  line-height: 1.25; margin: 36px 0 6px;
}
.nb-article h2 { font-size: 26px; }
.nb-article h3 { font-size: 21px; }
/* the amber rule under section headers */
.nb-article h2::after {
  content: ""; display: block; width: 64px; height: 3px;
  background: var(--nb-turmeric); margin: 12px 0 6px;
}
.nb-article blockquote {
  margin: 32px 0; padding: 8px 0 8px 24px; border-left: 4px solid var(--nb-red);
}
.nb-article blockquote p {
  font-family: 'Bricolage Grotesque', system-ui, sans-serif;
  font-weight: 800; font-size: 22px; line-height: 1.35;
  letter-spacing: -0.01em; color: var(--nb-ink); margin: 0;
}
.nb-article a { color: var(--nb-ink); border-bottom: 3px solid var(--nb-highlight); }
.nb-article a:hover { color: var(--nb-red); }
.nb-article img { max-width: 100%; height: auto; border: 2px solid var(--nb-ink); border-radius: 8px; box-shadow: 4px 4px 0 var(--nb-ink); }
.nb-article figcaption {
  font-family: 'Newsreader', serif; font-style: italic;
  font-size: 13px; color: #9aa0ad; text-align: center; margin-top: 10px;
}
.nb-article ul, .nb-article ol { margin: 0 0 22px; padding-left: 22px; }
.nb-article li { margin-bottom: 8px; }
.nb-article hr { border: none; height: 2px; background: var(--nb-rule); margin: 40px 0; }
.nb-article code { font-family: ui-monospace, monospace; font-size: .86em; background: var(--nb-cream); border: 1px solid var(--nb-rule); border-radius: 4px; padding: 1px 5px; }
.nb-article pre {
  background: var(--nb-ink); color: #dfe6f5; border-radius: 8px;
  padding: 20px 24px; overflow-x: auto; font-size: 14.5px; line-height: 1.7;
}
.nb-article pre code { background: none; border: none; color: inherit; padding: 0; }
/* tables: wide content scrolls in its own container, never the page body */
.nb-article table {
  width: 100%; border-collapse: collapse; font-family: 'Bricolage Grotesque', sans-serif;
  font-size: 14.5px; border: 2px solid var(--nb-ink); border-radius: 8px; overflow: hidden;
  margin: 0 0 14px; background: var(--nb-paper);
}
.nb-article thead { background: var(--nb-ink); color: var(--nb-cream); }
.nb-article th { padding: 11px 16px; text-align: left; font-size: 12px; font-weight: 800; text-transform: uppercase; letter-spacing: .05em; }
.nb-article td { padding: 12px 16px; border-top: 1px solid var(--nb-rule); }
.nb-article .kg-card, .nb-article figure { margin: 0 0 28px; }
.nb-article iframe, .nb-article video { max-width: 100%; border-radius: 8px; }

/* share buttons */
.nb-share {
  background: var(--nb-paper); border: 2px solid var(--nb-ink); color: var(--nb-ink);
  font-family: 'Bricolage Grotesque', sans-serif; font-weight: 800; font-size: 12px;
  padding: 6px 11px; border-radius: 6px; cursor: pointer;
}
.nb-share:hover { background: var(--nb-highlight); }

/* --- Kits --- */
.kit-chip { font-size: 11px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; padding: 4px 10px; border-radius: 4px; }
.kit-starter { background: var(--nb-green); color: var(--nb-paper); }
.kit-builder { background: var(--nb-turmeric); color: #241a05; }
.kit-advanced { background: var(--nb-ink); color: var(--nb-cream); }

/* --- News --- */
.nw-chip {
  font-family: 'Bricolage Grotesque', sans-serif; font-size: 12.5px; font-weight: 800;
  padding: 7px 14px; border-radius: 6px; cursor: pointer;
  border: 2px solid var(--nb-ink); background: var(--nb-paper); color: var(--nb-ink);
}
.nw-chip:hover { background: var(--nb-highlight); }
.nw-chip.is-on { background: var(--nb-ink); color: var(--nb-cream); }
.nw-row { transition: background .12s; }
.nw-row:hover { background: var(--nb-paper); text-decoration: none; color: inherit; }
.nw-day { display: flex; align-items: center; gap: 14px; margin: 34px 0 8px; }
.nw-chip-tag { font-size: 10px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; padding: 3px 8px; border-radius: 4px; white-space: nowrap; }
/* signal chip colours (HANDOFF tokens) */
.nw-big-deal { background: #1a2b4a; color: #faf6ec; }
.nw-hype     { background: #c73e2e; color: #fffdf6; }
.nw-india    { background: #fdf3d8; color: #8a6117; }
.nw-research { background: #e4e9f5; color: #1a2b4a; }
.nw-tools    { background: #2e9e5b; color: #fffdf6; }
.nw-jobs     { background: #e8e0cc; color: #3d4a63; }

@media (max-width: 560px) {
  .nw-row { grid-template-columns: 1fr auto !important; gap: 10px !important; }
  .nw-row > span:first-child { grid-column: 1; justify-content: flex-start !important; }
}

/* --- Newsletter --- */
.nl-ch {
  font-weight: 800; font-size: 14px; padding: 10px 18px;
  border: 2px solid var(--nb-cream); border-radius: 6px;
  color: var(--nb-cream); background: transparent; display: inline-block;
}
.nl-ch:hover { background: var(--nb-green); border-color: var(--nb-green); color: var(--nb-paper); }
.nl-row { transition: background .12s; }
.nl-row:hover { background: var(--nb-cream); text-decoration: none; color: inherit; }

/* --- Footer --- */
.nb-foot { border-top: 2px solid var(--nb-ink); background: var(--nb-ink); color: var(--nb-cream); }
.nb-foot-inner { max-width: 1140px; margin: 0 auto; padding: 48px 24px; display: flex; flex-wrap: wrap; gap: 24px 48px; justify-content: space-between; align-items: flex-start; }
.nb-foot a { color: var(--nb-cream); }
.nb-foot a:hover { color: var(--nb-highlight); }
.nb-foot-nav { display: flex; flex-wrap: wrap; gap: 18px; font-weight: 700; font-size: 14.5px; }
.nb-foot-tag { font-weight: 800; font-size: 16px; letter-spacing: -0.01em; }
.nb-foot-social { display: flex; flex-wrap: wrap; gap: 16px; font-weight: 700; font-size: 14px; }
