/* Shared look for every static subpage (/fde, guides, case studies).
   Values mirror the homepage: src/index.css and the section components. */
@import url("https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@400;500;600;700&family=Inter:wght@400;500;600;700&display=swap");

:root {
  --ink: #051a24;
  --head: #0d212c;
  --muted: rgba(5, 26, 36, .62);
  --faint: rgba(5, 26, 36, .42);
  --line: rgba(5, 26, 36, .1);
  --soft: rgba(5, 26, 36, .04);
  --red: #b42318;
  --amber: #b54708;
  --green: #067647;
  --display: "Plus Jakarta Sans", "Inter", system-ui, sans-serif;
  --body: "Inter", system-ui, -apple-system, sans-serif;
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  --shadow: 0 1px 2px rgba(5, 26, 36, .05), 0 4px 12px rgba(5, 26, 36, .03), 0 12px 24px rgba(5, 26, 36, .02);
}

* { box-sizing: border-box; }
body {
  margin: 0;
  padding-bottom: 96px;
  background: #fff;
  color: var(--ink);
  font-family: var(--body);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
a { color: inherit; text-underline-offset: 3px; text-decoration-thickness: 1px; }
h1, h2, h3, p { margin-top: 0; }
img { max-width: 100%; }

.shell { width: min(100% - 48px, 1080px); margin: 0 auto; }
.narrow { max-width: 760px; margin-left: auto; margin-right: auto; }

/* Top row and breadcrumb */
.site-top { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 28px 0 0; }
.mark { font-family: var(--display); font-size: 26px; font-weight: 600; text-decoration: none; color: var(--ink); }
.crumb { color: var(--faint); font-size: 13px; }
.crumb a { text-decoration: none; }
.crumb a:hover { color: var(--ink); }

/* Hero, centred like the homepage */
.hero {
  padding: clamp(56px, 10vw, 112px) 0 clamp(40px, 6vw, 72px);
  text-align: center;
  background: radial-gradient(circle at 10% 20%, rgba(124, 58, 237, .03) 0%, transparent 50%);
}
.hero h1 {
  max-width: 820px;
  margin: 0 auto 22px;
  color: var(--head);
  font-size: clamp(36px, 6.2vw, 60px);
  font-weight: 600;
  line-height: 1.1;
  letter-spacing: -.025em;
}
.lede { max-width: 660px; margin: 0 auto; color: var(--muted); font-size: clamp(16px, 2.2vw, 18px); line-height: 1.7; }
.hero .lede + .lede { margin-top: 14px; }
.meta { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin-top: 24px; }
.tag { border: 1px solid var(--line); border-radius: 999px; padding: 4px 12px; color: var(--muted); font-size: 12px; background: #fff; }
.links { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; margin-top: 32px; }

/* Labels and headings */
.eyebrow { display: block; margin: 0 0 16px; color: var(--faint); font-family: var(--mono); font-size: 11px; letter-spacing: .2em; text-transform: uppercase; }
.section { padding: clamp(48px, 8vw, 88px) 0; border-top: 1px solid var(--soft); }
.section > .shell > h2, .section-head h2 {
  max-width: 760px;
  margin-bottom: 16px;
  color: var(--ink);
  font-family: var(--display);
  font-size: clamp(30px, 4.6vw, 46px);
  font-weight: 500;
  line-height: 1.12;
  letter-spacing: -.02em;
}
.section-head { margin-bottom: clamp(28px, 4vw, 48px); }
.section-head p, .intro { max-width: 680px; color: var(--muted); font-size: 17px; }
.section p, .section li { color: var(--muted); }
.section strong { color: var(--ink); font-weight: 600; }

/* Buttons, same as the homepage Button component */
.button {
  display: inline-flex; align-items: center; justify-content: center;
  border-radius: 999px; padding: 12px 28px;
  font-size: 14px; font-weight: 500; text-decoration: none; white-space: nowrap;
  color: var(--ink); background: #fff;
  box-shadow: 0 0 0 1px rgba(0, 0, 0, .05), 0 4px 12px rgba(0, 0, 0, .08);
  transition: transform .3s ease, box-shadow .3s ease, background .3s ease;
}
.button:hover { transform: translateY(-1px); box-shadow: 0 0 0 1px rgba(0, 0, 0, .05), 0 12px 24px rgba(0, 0, 0, .1); }
.button.primary { background: var(--ink); color: #fff; box-shadow: 0 10px 20px -6px rgba(5, 26, 36, .35); }
.button.primary:hover { background: var(--head); }

/* Cards */
.grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
.grid.three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid.four { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.panel { border: 1px solid var(--line); border-radius: 24px; padding: 28px; background: #fff; }
.panel h2, .panel h3 { margin-bottom: 10px; color: var(--ink); font-family: var(--display); font-size: 21px; font-weight: 500; line-height: 1.3; letter-spacing: -.01em; }
.panel p, .panel li { font-size: 15px; }
.panel p:last-child, .panel ul:last-child, .panel ol:last-child { margin-bottom: 0; }
.panel ul, .panel ol { padding-left: 20px; margin-bottom: 0; }
.panel li + li { margin-top: 8px; }
.panel .num { display: block; margin-bottom: 18px; color: rgba(5, 26, 36, .25); font-family: var(--mono); font-size: 12px; }
.panel.dark { background: var(--ink); border-color: var(--ink); }
.panel.dark h3, .panel.dark strong { color: #fff; }
.panel.dark p, .panel.dark li { color: rgba(255, 255, 255, .72); }
.panel.dark .num, .panel.dark .eyebrow { color: rgba(255, 255, 255, .45); }
.wide { grid-column: 1 / -1; }
.pill { display: inline-block; margin-top: 18px; border: 1px solid var(--line); border-radius: 6px; padding: 3px 9px; background: var(--soft); color: var(--faint); font-family: var(--mono); font-size: 10px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; }

/* Flow of steps: a → b → c */
.flow { display: flex; flex-wrap: wrap; align-items: stretch; gap: 10px; margin: 0; padding: 0; list-style: none; }
.flow li { flex: 1 1 150px; position: relative; border: 1px solid var(--line); border-radius: 16px; padding: 16px; background: #fff; color: var(--ink); font-size: 14px; font-weight: 500; }
.flow li small { display: block; margin-top: 6px; color: var(--faint); font-size: 12px; font-weight: 400; }
.flow li.extra { border-color: rgba(180, 35, 24, .35); background: rgba(180, 35, 24, .03); }
.flow li.extra small { color: var(--red); }
.flow-label { margin: 26px 0 10px; color: var(--faint); font-family: var(--mono); font-size: 11px; letter-spacing: .16em; text-transform: uppercase; }

/* Big numbers */
.stat { font-family: var(--display); font-size: clamp(38px, 6vw, 56px); font-weight: 600; line-height: 1; letter-spacing: -.03em; color: var(--ink); }
.stat.bad { color: var(--red); }

/* Tables */
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: 20px; background: #fff; }
table { width: 100%; border-collapse: collapse; font-size: 14px; }
th, td { padding: 13px 16px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; color: var(--muted); }
th { color: var(--faint); font-family: var(--mono); font-size: 11px; font-weight: 500; letter-spacing: .12em; text-transform: uppercase; background: var(--soft); }
tr:last-child td { border-bottom: 0; }
td strong { color: var(--ink); }
.ok { color: var(--green); font-weight: 600; }
.ask { color: var(--amber); font-weight: 600; }
.no { color: var(--red); font-weight: 600; }

/* Code-like rule block */
.rule { margin: 0; overflow-x: auto; border-radius: 20px; padding: 22px 24px; background: var(--ink); color: rgba(255, 255, 255, .85); font-family: var(--mono); font-size: 13px; line-height: 1.75; white-space: pre; }
.rule b { color: #fff; font-weight: 600; }

/* FAQ */
.faq details { border: 1px solid var(--line); border-radius: 4px; transition: border-color .3s; }
.faq details + details { margin-top: 12px; }
.faq details:hover { border-color: rgba(5, 26, 36, .2); }
.faq summary { cursor: pointer; list-style: none; display: flex; justify-content: space-between; gap: 16px; padding: 22px 26px; color: var(--ink); font-size: 17px; font-weight: 600; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; color: var(--faint); font-weight: 400; }
.faq details[open] summary::after { content: "−"; }
.faq details p { margin: 0; padding: 0 26px 22px; font-size: 15px; }

/* Figures and notes (case studies) */
.figure { margin: 18px 0 0; overflow: hidden; border: 1px solid var(--line); border-radius: 16px; background: var(--soft); }
.figure img { display: block; width: 100%; height: auto; }
.figure figcaption { padding: 10px 14px; color: var(--faint); font-size: 12px; }
.notice { margin-top: 18px; border-left: 2px solid var(--line); padding-left: 14px; color: var(--faint) !important; font-size: 14px !important; }
.page-note { margin: 40px auto 0; color: var(--faint); font-size: 13px; text-align: center; }

/* Floating menu, same pill as the homepage BottomNav */
.pill-nav {
  position: fixed; left: 50%; bottom: 24px; z-index: 50; transform: translateX(-50%);
  display: flex; align-items: center; gap: 20px; max-width: calc(100% - 24px);
  padding: 8px 8px 8px 22px; border: 1px solid rgba(255, 255, 255, .4); border-radius: 999px;
  background: rgba(255, 255, 255, .8); backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px);
  box-shadow: var(--shadow);
}
.pill-nav a:not(.button) { color: rgba(5, 26, 36, .6); font-size: 12px; font-weight: 500; text-decoration: none; white-space: nowrap; }
.pill-nav a:not(.button):hover, .pill-nav a[aria-current="page"] { color: var(--ink); }
.pill-nav .button { padding: 9px 22px; font-size: 12px; }

/* Footer, same layout as the homepage Footer */
.site-footer { margin-top: clamp(48px, 8vw, 88px); border-top: 1px solid rgba(5, 26, 36, .05); }
.site-footer .shell { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-start; gap: 40px; padding: clamp(48px, 8vw, 88px) 0; }
.site-footer .mark { font-size: 30px; }
.site-footer .tagline { max-width: 280px; margin-top: 20px; color: rgba(5, 26, 36, .5); font-size: 14px; }
.footer-cols { display: grid; grid-template-columns: repeat(3, auto); gap: 64px; }
.footer-cols div { display: flex; flex-direction: column; gap: 14px; }
.footer-cols span { color: var(--faint); font-size: 10px; font-weight: 700; letter-spacing: .2em; text-transform: uppercase; }
.footer-cols a { font-size: 15px; text-decoration: none; }
.footer-cols a:hover { opacity: .5; }
.copy { margin: 0; color: rgba(5, 26, 36, .5); font-size: 12px; }

@media (max-width: 900px) {
  .grid.three, .grid.four { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 640px) {
  .shell { width: min(100% - 32px, 1080px); }
  .grid, .grid.three, .grid.four { grid-template-columns: 1fr; }
  .wide { grid-column: auto; }
  .panel { padding: 22px; border-radius: 20px; }
  .pill-nav { gap: 12px; padding-left: 16px; bottom: 16px; }
  .pill-nav .hide-sm { display: none; }
  .footer-cols { grid-template-columns: repeat(2, auto); gap: 36px; }
  .faq summary { padding: 18px 20px; font-size: 15px; }
  .faq details p { padding: 0 20px 18px; }
}
