/* ═══════════════════════════════════════════════════════════════
   Smicee Documentation — Shared Stylesheet
   Aesthetic: Editorial / technical. Serif + mono + clean sans.
   ═══════════════════════════════════════════════════════════════ */

:root {
  --bg: #fafaf7;
  --bg-elev: #ffffff;
  --bg-code: #f4f2ec;
  --ink: #0f1115;
  --ink-soft: #3a3f47;
  --ink-muted: #6b7280;
  --ink-faint: #9ca3af;
  --line: #e8e6df;
  --line-soft: #f0eee8;
  --accent: #c8402c;
  --accent-soft: #fae7e2;
  --accent-ink: #9c2f20;
  --tag-hr: #2d5f3f;
  --tag-hr-bg: #e4efe8;
  --tag-ops: #8b5a00;
  --tag-ops-bg: #f7ecd4;
  --tag-ws: #1e4b7a;
  --tag-ws-bg: #dfeaf5;
  --max-width: 1280px;
  --sidebar-width: 260px;
  --toc-width: 220px;
  --shadow-sm: 0 1px 2px rgba(15, 17, 21, 0.04);
  --shadow-md: 0 2px 8px rgba(15, 17, 21, 0.06);
  --shadow-lg: 0 8px 30px rgba(15, 17, 21, 0.08);
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--ink);
  font-family: 'IBM Plex Sans', -apple-system, BlinkMacSystemFont, sans-serif;
  font-size: 15px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  min-height: 100vh;
}

a { color: var(--accent); text-decoration: none; transition: color 0.15s; }
a:hover { color: var(--accent-ink); }

code {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 0.88em;
  background: var(--bg-code);
  padding: 1px 6px;
  border-radius: 3px;
  color: var(--ink);
}

img { max-width: 100%; display: block; }

/* ─── Top Navigation ─────────────────────────────────────── */
.topnav {
  border-bottom: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.88);
  backdrop-filter: saturate(1.4) blur(10px);
  -webkit-backdrop-filter: saturate(1.4) blur(10px);
  position: sticky;
  top: 0;
  z-index: 100;
}

.topnav-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 14px 32px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 32px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: var(--ink);
}

.brand img {
  height: 26px;
  width: auto;
}

.brand-sub {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 11px;
  color: var(--ink-muted);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  padding-left: 12px;
  border-left: 1px solid var(--line);
}

.nav-links {
  display: flex;
  gap: 28px;
  align-items: center;
  font-size: 14px;
}

.nav-links a {
  color: var(--ink-soft);
}

.nav-links a:hover { color: var(--accent); }

.nav-links a.cta {
  background: var(--ink);
  color: var(--bg);
  padding: 8px 16px;
  border-radius: 3px;
  font-family: 'IBM Plex Mono', monospace;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  transition: background 0.15s;
}

.nav-links a.cta:hover { background: var(--accent); color: var(--bg); }

/* ─── Footer ─────────────────────────────────────────────── */
footer {
  border-top: 1px solid var(--line);
  background: var(--bg-elev);
  margin-top: 80px;
}

.footer-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 40px 32px 32px;
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 48px;
}

.footer-brand p {
  color: var(--ink-muted);
  font-size: 13.5px;
  max-width: 320px;
  margin-top: 12px;
  line-height: 1.6;
}

.footer-col h4 {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--ink-muted);
  margin-bottom: 14px;
}

.footer-col ul {
  list-style: none;
}

.footer-col li {
  margin-bottom: 8px;
}

.footer-col a {
  color: var(--ink-soft);
  font-size: 13.5px;
}

.footer-col a:hover { color: var(--accent); }

.footer-bottom {
  border-top: 1px solid var(--line);
  padding: 20px 32px;
  text-align: center;
  font-family: 'IBM Plex Mono', monospace;
  font-size: 11px;
  color: var(--ink-muted);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

/* ─── Buttons ────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 12px 22px;
  font-family: 'IBM Plex Mono', monospace;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  border: 1px solid var(--line);
  background: var(--bg-elev);
  color: var(--ink);
  border-radius: 3px;
  cursor: pointer;
  transition: all 0.15s;
  font-weight: 500;
}

.btn:hover {
  border-color: var(--ink-soft);
  color: var(--ink);
}

.btn-primary {
  background: var(--ink);
  border-color: var(--ink);
  color: var(--bg);
}

.btn-primary:hover {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--bg);
}

.btn-accent {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}

.btn-accent:hover {
  background: var(--accent-ink);
  border-color: var(--accent-ink);
  color: #fff;
}

/* ─── Tags ───────────────────────────────────────────────── */
.tag {
  display: inline-block;
  font-family: 'IBM Plex Mono', monospace;
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  padding: 3px 9px;
  border-radius: 2px;
  font-weight: 500;
}

.tag-hr { background: var(--tag-hr-bg); color: var(--tag-hr); }
.tag-ops { background: var(--tag-ops-bg); color: var(--tag-ops); }
.tag-ws { background: var(--tag-ws-bg); color: var(--tag-ws); }

/* Eyebrow label used above titles */
.eyebrow {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 11px;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 0.18em;
  margin-bottom: 16px;
  font-weight: 500;
}

/* ═══════════════════════════════════════════════════════════
   LANDING PAGE (index.html)
   ═══════════════════════════════════════════════════════════ */

/* Hero */
.hero {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 96px 32px 64px;
}

.hero-inner {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 64px;
  align-items: center;
}

h1.hero-title {
  font-family: 'Fraunces', serif;
  font-weight: 500;
  font-size: clamp(42px, 6vw, 76px);
  line-height: 1.02;
  letter-spacing: -0.03em;
  color: var(--ink);
  margin-bottom: 24px;
}

h1.hero-title em {
  font-style: italic;
  font-weight: 400;
  color: var(--accent);
}

.hero-lede {
  font-size: 18px;
  color: var(--ink-soft);
  max-width: 500px;
  line-height: 1.55;
  margin-bottom: 32px;
}

.hero-ctas {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.hero-visual {
  position: relative;
  padding: 24px;
  background: linear-gradient(135deg, #fff 0%, #f5f3ee 100%);
  border: 1px solid var(--line);
  border-radius: 6px;
  box-shadow: var(--shadow-lg);
}

.hero-visual img {
  border-radius: 3px;
  border: 1px solid var(--line);
}

.hero-visual::before {
  content: "";
  position: absolute;
  top: -12px;
  right: -12px;
  width: 60%;
  height: 60%;
  background: var(--accent);
  opacity: 0.04;
  border-radius: 6px;
  z-index: -1;
}

/* Stats strip */
.stats {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 32px 80px;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 32px;
  border-top: 1px solid var(--line);
  padding-top: 48px;
}

.stat-number {
  font-family: 'Fraunces', serif;
  font-size: 48px;
  font-weight: 500;
  letter-spacing: -0.02em;
  color: var(--ink);
  line-height: 1;
}

.stat-label {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--ink-muted);
  margin-top: 10px;
}

/* Section */
.section {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 64px 32px;
}

.section-lead {
  max-width: 720px;
  margin-bottom: 48px;
}

h2.section-title {
  font-family: 'Fraunces', serif;
  font-size: clamp(30px, 4vw, 44px);
  font-weight: 500;
  letter-spacing: -0.02em;
  line-height: 1.1;
  color: var(--ink);
  margin-bottom: 16px;
}

h2.section-title em {
  font-style: italic;
  font-weight: 400;
  color: var(--accent);
}

.section-desc {
  font-size: 17px;
  color: var(--ink-soft);
  line-height: 1.55;
}

/* Role cards on home */
.roles {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.role-card {
  background: var(--bg-elev);
  border: 1px solid var(--line);
  padding: 32px 28px 28px;
  border-radius: 4px;
  position: relative;
  overflow: hidden;
  transition: all 0.2s;
  text-decoration: none;
  color: inherit;
  display: flex;
  flex-direction: column;
}

.role-card::before {
  content: "";
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 3px;
  background: var(--accent);
  transform: scaleY(0);
  transform-origin: top;
  transition: transform 0.3s ease;
}

.role-card:hover {
  border-color: var(--ink-soft);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.role-card:hover::before { transform: scaleY(1); }

.role-num {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 11px;
  color: var(--ink-muted);
  letter-spacing: 0.1em;
  margin-bottom: 8px;
}

.role-card h3 {
  font-family: 'Fraunces', serif;
  font-size: 26px;
  font-weight: 500;
  letter-spacing: -0.01em;
  margin-bottom: 12px;
  line-height: 1.15;
}

.role-card p {
  font-size: 14.5px;
  color: var(--ink-soft);
  line-height: 1.55;
  flex: 1;
  margin-bottom: 20px;
}

.role-cta {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--accent);
  font-weight: 500;
}

/* Feature grid (modules overview) */
.features {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
  border-radius: 4px;
  overflow: hidden;
}

.feature {
  background: var(--bg-elev);
  padding: 32px 28px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-height: 180px;
  transition: background 0.15s;
  text-decoration: none;
  color: inherit;
}

.feature:hover { background: #fff; color: inherit; }

.feature-num {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 11px;
  color: var(--ink-muted);
  letter-spacing: 0.1em;
  margin-bottom: 4px;
}

.feature h3 {
  font-family: 'Fraunces', serif;
  font-size: 22px;
  font-weight: 500;
  letter-spacing: -0.01em;
  line-height: 1.15;
  color: var(--ink);
}

.feature p {
  font-size: 13.5px;
  color: var(--ink-soft);
  line-height: 1.55;
  flex: 1;
}

.feature-tag {
  margin-top: 12px;
  font-family: 'IBM Plex Mono', monospace;
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--ink-muted);
}

/* Pipeline visualization (Sales flow callout on home) */
.pipeline-block {
  background: var(--ink);
  color: var(--bg);
  border-radius: 6px;
  padding: 56px 48px;
  margin: 80px 0;
}

.pipeline-block h2 {
  font-family: 'Fraunces', serif;
  font-size: 40px;
  font-weight: 500;
  letter-spacing: -0.02em;
  margin-bottom: 12px;
}

.pipeline-block h2 em { color: #f5a896; font-style: italic; }

.pipeline-block p {
  color: #cbd0d6;
  max-width: 560px;
  margin-bottom: 40px;
  font-size: 15px;
}

.pipeline-flow {
  display: flex;
  gap: 0;
  align-items: stretch;
  flex-wrap: wrap;
  font-family: 'IBM Plex Mono', monospace;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.pipeline-step {
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.1);
  padding: 14px 18px;
  border-radius: 2px;
  color: #fff;
}

.pipeline-arrow {
  display: flex;
  align-items: center;
  padding: 0 10px;
  color: var(--accent);
  font-size: 14px;
}

/* CTA banner */
.cta-banner {
  background: var(--bg-elev);
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 56px 48px;
  text-align: center;
  margin: 40px 0;
}

.cta-banner h2 {
  font-family: 'Fraunces', serif;
  font-size: 36px;
  font-weight: 500;
  letter-spacing: -0.02em;
  margin-bottom: 16px;
}

.cta-banner p {
  color: var(--ink-soft);
  max-width: 480px;
  margin: 0 auto 32px;
}

/* ═══════════════════════════════════════════════════════════
   DOCS PAGE (docs.html)
   ═══════════════════════════════════════════════════════════ */

.docs-layout {
  max-width: var(--max-width);
  margin: 0 auto;
  display: grid;
  grid-template-columns: var(--sidebar-width) 1fr var(--toc-width);
  gap: 48px;
  padding: 0 32px;
  min-height: calc(100vh - 56px);
}

/* Sidebar */
.docs-sidebar {
  position: sticky;
  top: 56px;
  height: calc(100vh - 56px);
  overflow-y: auto;
  padding: 32px 0 32px;
  border-right: 1px solid var(--line);
  padding-right: 24px;
  font-size: 14px;
  scrollbar-width: thin;
}

.docs-sidebar::-webkit-scrollbar { width: 6px; }
.docs-sidebar::-webkit-scrollbar-thumb { background: var(--line); border-radius: 3px; }

.sidebar-search {
  width: 100%;
  padding: 9px 12px;
  font-family: inherit;
  font-size: 13px;
  background: var(--bg-elev);
  border: 1px solid var(--line);
  border-radius: 3px;
  color: var(--ink);
  margin-bottom: 20px;
  transition: border-color 0.15s;
}

.sidebar-search:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 2px var(--accent-soft);
}

.sidebar-group {
  margin-bottom: 24px;
}

.sidebar-group-title {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--ink-muted);
  padding: 6px 0;
  margin-bottom: 4px;
  font-weight: 600;
}

.sidebar-group ul {
  list-style: none;
}

.sidebar-group li a {
  display: block;
  padding: 5px 10px;
  color: var(--ink-soft);
  font-size: 13.5px;
  border-radius: 2px;
  border-left: 2px solid transparent;
  margin-left: -2px;
  transition: all 0.1s;
}

.sidebar-group li a:hover {
  color: var(--ink);
  background: var(--bg-code);
}

.sidebar-group li a.active {
  color: var(--accent);
  border-left-color: var(--accent);
  font-weight: 500;
}

/* Main content */
.docs-main {
  padding: 40px 0 80px;
  min-width: 0;
  max-width: 780px;
}

.docs-main > section {
  scroll-margin-top: 80px;
  padding-bottom: 48px;
  margin-bottom: 48px;
  border-bottom: 1px solid var(--line);
}

.docs-main > section:last-child { border-bottom: none; }

.docs-breadcrumb {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 11px;
  color: var(--ink-muted);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 12px;
}

.docs-main h1 {
  font-family: 'Fraunces', serif;
  font-size: 42px;
  font-weight: 500;
  letter-spacing: -0.025em;
  line-height: 1.1;
  color: var(--ink);
  margin-bottom: 14px;
}

.docs-main h2 {
  font-family: 'Fraunces', serif;
  font-size: 30px;
  font-weight: 500;
  letter-spacing: -0.02em;
  line-height: 1.15;
  margin-bottom: 12px;
  color: var(--ink);
}

.docs-main h3 {
  font-family: 'IBM Plex Sans', sans-serif;
  font-size: 17px;
  font-weight: 600;
  color: var(--ink);
  margin: 28px 0 10px;
}

.docs-main > section > .lead {
  font-size: 17px;
  color: var(--ink-soft);
  line-height: 1.55;
  margin-bottom: 24px;
}

.docs-main p {
  color: var(--ink-soft);
  margin-bottom: 14px;
  font-size: 15px;
  line-height: 1.65;
}

.docs-main ol, .docs-main ul {
  margin-bottom: 16px;
  padding-left: 24px;
  color: var(--ink-soft);
}

.docs-main li {
  margin-bottom: 6px;
  font-size: 15px;
  line-height: 1.6;
}

.docs-main strong {
  color: var(--ink);
  font-weight: 600;
}

/* Module hero — shown at top of each major module section */
.module-hero {
  background: linear-gradient(135deg, var(--bg-elev), var(--line-soft));
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 32px;
  margin-bottom: 28px;
}

.module-hero .tag { margin-bottom: 14px; }

/* Screenshot block */
.screenshot {
  margin: 28px 0;
  padding: 14px;
  background: var(--bg-elev);
  border: 1px solid var(--line);
  border-radius: 5px;
  box-shadow: var(--shadow-sm);
}

.screenshot img {
  width: 100%;
  height: auto;
  border-radius: 2px;
  border: 1px solid var(--line-soft);
}

.screenshot-caption {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--ink-muted);
  margin-top: 10px;
  padding-left: 2px;
}

/* Callout boxes */
.callout {
  margin: 20px 0;
  padding: 16px 20px;
  background: var(--accent-soft);
  border-left: 3px solid var(--accent);
  border-radius: 0 3px 3px 0;
}

.callout p { color: var(--accent-ink); margin-bottom: 0; }
.callout strong { color: var(--accent-ink); }

.callout.neutral {
  background: var(--bg-code);
  border-left-color: var(--ink-muted);
}

.callout.neutral p { color: var(--ink); }
.callout.neutral strong { color: var(--ink); }

/* Flow diagram container */
.diagram {
  margin: 24px 0;
  padding: 24px;
  background: var(--bg-elev);
  border: 1px solid var(--line);
  border-radius: 5px;
  overflow-x: auto;
  text-align: center;
}

.diagram .mermaid { display: inline-block; }

/* Step list (for workflows) */
.steps {
  counter-reset: step;
  list-style: none;
  padding-left: 0;
}

.steps li {
  counter-increment: step;
  position: relative;
  padding-left: 40px;
  margin-bottom: 14px;
  min-height: 28px;
  color: var(--ink-soft);
}

.steps li::before {
  content: counter(step);
  position: absolute;
  left: 0;
  top: 0;
  width: 26px;
  height: 26px;
  background: var(--ink);
  color: var(--bg);
  font-family: 'IBM Plex Mono', monospace;
  font-size: 12px;
  font-weight: 600;
  border-radius: 3px;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Right TOC */
.docs-toc {
  position: sticky;
  top: 56px;
  height: calc(100vh - 56px);
  padding: 40px 0 32px;
  font-size: 12.5px;
  overflow-y: auto;
}

.toc-title {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--ink-muted);
  margin-bottom: 12px;
  font-weight: 600;
}

.docs-toc ul {
  list-style: none;
  border-left: 1px solid var(--line);
}

.docs-toc li a {
  display: block;
  padding: 5px 12px;
  color: var(--ink-muted);
  font-size: 12.5px;
  line-height: 1.4;
  margin-left: -1px;
  border-left: 1px solid transparent;
  transition: all 0.1s;
}

.docs-toc li a:hover { color: var(--ink); }
.docs-toc li a.active { color: var(--accent); border-left-color: var(--accent); }

/* ─── Responsive ─────────────────────────────────────────── */
@media (max-width: 1100px) {
  .docs-layout {
    grid-template-columns: var(--sidebar-width) 1fr;
    gap: 32px;
  }
  .docs-toc { display: none; }
}

@media (max-width: 820px) {
  .topnav-inner { padding: 12px 20px; }
  .brand-sub { display: none; }
  .nav-links { gap: 16px; font-size: 13px; }
  .nav-links a:not(.cta) { display: none; }
  .hero, .section { padding-left: 20px; padding-right: 20px; }
  .hero { padding-top: 56px; }
  .hero-inner { grid-template-columns: 1fr; gap: 40px; }
  h1.hero-title { font-size: 40px; }
  .stats { grid-template-columns: repeat(2, 1fr); padding: 32px 20px 48px; }
  .stat-number { font-size: 36px; }
  .roles, .features { grid-template-columns: 1fr; }
  .pipeline-block, .cta-banner { padding: 32px 24px; }
  .pipeline-flow { flex-direction: column; align-items: stretch; }
  .pipeline-arrow { transform: rotate(90deg); padding: 4px 0; justify-content: center; }
  .footer-inner { grid-template-columns: 1fr 1fr; gap: 32px; padding: 32px 20px; }

  /* Docs: collapse sidebar behind a button */
  .docs-layout {
    grid-template-columns: 1fr;
    padding: 0 20px;
    gap: 0;
  }
  .docs-sidebar {
    position: static;
    height: auto;
    border-right: none;
    border-bottom: 1px solid var(--line);
    padding: 20px 0;
    margin-bottom: 20px;
  }
  .docs-main { padding: 20px 0 60px; }
  .docs-main h1 { font-size: 32px; }
  .module-hero { padding: 20px; }
}
