/* FuturnFlow role manuals — shared styles (matches manual.html design language) */
:root {
  --canvas: #f7f6f3;
  --surface: #ffffff;
  --raised: #f0eee8;
  --ink: #1c2130;
  --ink-soft: #4b5165;
  --ink-faint: #8288a0;
  --line: #e4e1d8;
  --brand: #0e7490;
  --brand-strong: #0a5c72;
  --brand-soft: #e3f1f4;
  --accent: #7360e0;
  --accent-soft: #efecfd;
  --warn: #b45309;
  --warn-soft: #fdf1e2;
  --ok: #047857;
  --ok-soft: #e2f5ec;
  --code-bg: #eef0e9;
  --shadow: 0 1px 2px rgba(20, 20, 10, 0.04), 0 8px 24px rgba(20, 20, 10, 0.05);
}
:root[data-theme="dark"] {
  --canvas: #0c0f16;
  --surface: #12151e;
  --raised: #191d28;
  --ink: #e7e6e1;
  --ink-soft: #a8adc0;
  --ink-faint: #6b7186;
  --line: #262b3a;
  --brand: #4dc4dd;
  --brand-strong: #7fd6e8;
  --brand-soft: #113038;
  --accent: #a597f0;
  --accent-soft: #241f3d;
  --warn: #e0a350;
  --warn-soft: #362510;
  --ok: #34d399;
  --ok-soft: #0c2b20;
  --code-bg: #1a1e28;
  --shadow: 0 1px 2px rgba(0, 0, 0, 0.3), 0 8px 24px rgba(0, 0, 0, 0.35);
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --canvas: #0c0f16;
    --surface: #12151e;
    --raised: #191d28;
    --ink: #e7e6e1;
    --ink-soft: #a8adc0;
    --ink-faint: #6b7186;
    --line: #262b3a;
    --brand: #4dc4dd;
    --brand-strong: #7fd6e8;
    --brand-soft: #113038;
    --accent: #a597f0;
    --accent-soft: #241f3d;
    --warn: #e0a350;
    --warn-soft: #362510;
    --ok: #34d399;
    --ok-soft: #0c2b20;
    --code-bg: #1a1e28;
    --shadow: 0 1px 2px rgba(0, 0, 0, 0.3), 0 8px 24px rgba(0, 0, 0, 0.35);
  }
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: var(--canvas);
  color: var(--ink);
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  font-size: 15.5px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4 {
  font-family: 'Source Serif 4', 'Source Serif Pro', Georgia, serif;
  color: var(--ink);
  font-weight: 600;
  line-height: 1.22;
  text-wrap: balance;
}

a { color: var(--brand); text-decoration: none; }
a:hover { text-decoration: underline; }
a:focus-visible, button:focus-visible {
  outline: 2px solid var(--brand);
  outline-offset: 2px;
}

code, .kbd {
  font-family: 'JetBrains Mono', 'SFMono-Regular', Consolas, monospace;
  font-size: 0.86em;
  background: var(--code-bg);
  border: 1px solid var(--line);
  border-radius: 5px;
  padding: 0.1em 0.42em;
  color: var(--ink);
}

.page {
  max-width: 780px;
  margin: 0 auto;
  padding: 40px 24px 120px;
}

/* top bar with back-links + theme toggle */
.top-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  font-size: 13px;
  margin-bottom: 36px;
  color: var(--ink-faint);
}
.top-nav .crumbs { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.top-nav button {
  background: var(--raised);
  border: 1px solid var(--line);
  color: var(--ink-soft);
  border-radius: 6px;
  padding: 4px 10px;
  font-size: 12px;
  cursor: pointer;
  font-family: inherit;
}
.top-nav button:hover { color: var(--ink); }

.doc-header { margin-bottom: 40px; }
.doc-header .eyebrow {
  font-size: 12px; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase;
  color: var(--brand); margin-bottom: 10px;
}
.doc-header h1 { font-size: 34px; margin: 0 0 12px; letter-spacing: -0.01em; }
.doc-header p.lead { font-size: 16.5px; color: var(--ink-soft); max-width: 60ch; margin: 0; }

.role-chip {
  display: inline-flex; align-items: center; gap: 7px;
  background: var(--accent-soft); color: var(--accent);
  font-size: 12.5px; font-weight: 700;
  border-radius: 999px; padding: 4px 14px; margin-bottom: 14px;
}

section.chapter { margin-bottom: 52px; scroll-margin-top: 24px; }
section.chapter > h2 {
  font-size: 23px;
  padding-bottom: 10px;
  margin: 0 0 16px;
  border-bottom: 1px solid var(--line);
}
h3.sub { font-size: 16px; font-weight: 700; color: var(--ink); margin: 26px 0 10px; }

p { color: var(--ink-soft); max-width: 68ch; }
p.lead { color: var(--ink); font-size: 16px; }
ul, ol { color: var(--ink-soft); max-width: 68ch; padding-left: 22px; }
li { margin-bottom: 6px; }
li::marker { color: var(--ink-faint); }
strong { color: var(--ink); font-weight: 650; }

.callout {
  border-radius: 10px;
  padding: 14px 16px;
  margin: 18px 0;
  font-size: 14px;
  border: 1px solid var(--line);
  background: var(--surface);
  box-shadow: var(--shadow);
}
.callout .callout-label {
  font-weight: 700; font-size: 11.5px; text-transform: uppercase; letter-spacing: 0.05em;
  margin-bottom: 6px;
}
.callout.tip { border-color: color-mix(in srgb, var(--brand) 30%, var(--line)); }
.callout.tip .callout-label { color: var(--brand); }
.callout.warn { background: var(--warn-soft); border-color: color-mix(in srgb, var(--warn) 35%, var(--line)); }
.callout.warn .callout-label { color: var(--warn); }
.callout.note { background: var(--raised); }
.callout.note .callout-label { color: var(--ink-faint); }
.callout p, .callout ul { margin: 0; max-width: none; font-size: 13.6px; }
.callout ul { margin-top: 6px; }

table.ref { width: 100%; border-collapse: collapse; margin: 16px 0 24px; font-size: 13.6px; }
table.ref th {
  text-align: left; font-size: 11px; text-transform: uppercase; letter-spacing: 0.04em;
  color: var(--ink-faint); font-weight: 700;
  padding: 0 12px 8px; border-bottom: 1px solid var(--line);
}
table.ref td { padding: 10px 12px; border-bottom: 1px solid var(--line); color: var(--ink-soft); vertical-align: top; }
table.ref tr:last-child td { border-bottom: none; }
table.ref td.term { color: var(--ink); font-weight: 600; white-space: nowrap; }
.table-scroll { overflow-x: auto; }

ol.steps { list-style: none; padding: 0; counter-reset: step; margin: 18px 0; }
ol.steps li {
  counter-increment: step;
  position: relative;
  padding-left: 40px;
  margin-bottom: 16px;
  color: var(--ink-soft);
}
ol.steps li::before {
  content: counter(step);
  position: absolute; left: 0; top: -1px;
  width: 26px; height: 26px; border-radius: 50%;
  background: var(--brand-soft); color: var(--brand-strong);
  font-family: 'Source Serif 4', Georgia, serif; font-weight: 700; font-size: 13px;
  display: grid; place-items: center;
}
ol.steps li > strong:first-child { display: block; color: var(--ink); font-size: 14.6px; margin-bottom: 2px; }

.can-grid {
  display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin: 18px 0;
}
@media (max-width: 640px) { .can-grid { grid-template-columns: 1fr; } }
.can-card {
  border: 1px solid var(--line); border-radius: 10px; padding: 14px 16px;
  background: var(--surface); box-shadow: var(--shadow);
}
.can-card h4 { font-size: 13px; margin: 0 0 8px; font-family: 'Inter', sans-serif; font-weight: 700; }
.can-card.yes h4 { color: var(--ok); }
.can-card.no h4 { color: var(--ink-faint); }
.can-card ul { margin: 0; padding-left: 18px; font-size: 13px; }
.can-card li { margin-bottom: 4px; }

footer.manual-footer {
  margin-top: 70px; padding-top: 22px; border-top: 1px solid var(--line);
  font-size: 12.5px; color: var(--ink-faint);
}
footer.manual-footer .links { display: flex; gap: 16px; flex-wrap: wrap; margin-top: 8px; }

/* index (hub) page cards */
.role-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 14px; margin: 24px 0; }
.role-card-link {
  display: block;
  border: 1px solid var(--line); border-radius: 12px;
  background: var(--surface);
  padding: 18px;
  box-shadow: var(--shadow);
  color: var(--ink);
  transition: border-color 0.15s ease, transform 0.15s ease;
}
.role-card-link:hover { border-color: var(--brand); text-decoration: none; transform: translateY(-2px); }
.role-card-link .emoji { font-size: 22px; }
.role-card-link h3 { margin: 8px 0 4px; font-size: 16px; }
.role-card-link p { font-size: 12.8px; margin: 0; color: var(--ink-soft); }
