/* Suave Website — professional slate / coral theme */

:root {
  --color-bg: #f4f5f7;
  --color-surface: #ffffff;
  --color-text: #2c3338;
  --color-text-muted: #5c6b73;
  --color-heading: #1a7a7a;
  --color-link: #0b6e99;
  --color-link-hover: #085478;
  --color-accent: #39bebe;
  --color-accent-dark: #2a9a9a;
  --color-coral: #e85d1c;
  --color-coral-dark: #c94e14;
  --color-border: #dde1e6;
  --color-code-bg: #f0f2f5;
  --color-code-text: #1e252b;
  --color-pre-bg: #1e252b;
  --color-pre-text: #e8ecef;
  --font-sans: "IBM Plex Sans", "Segoe UI", Helvetica, Arial, sans-serif;
  --font-serif: "Source Serif 4", "Iowan Old Style", "Palatino Linotype", Palatino, serif;
  --font-mono: "IBM Plex Mono", "SF Mono", Menlo, Consolas, monospace;
  --header-height: 64px;
  --sidebar-width: 240px;
  --content-measure: 72ch;
  --radius: 6px;
  --shadow-sm: 0 1px 2px rgba(28, 40, 48, 0.06);
  --shadow-md: 0 4px 16px rgba(28, 40, 48, 0.08);
}

html.dark {
  --color-bg: #121417;
  --color-surface: #1c2128;
  --color-text: #e6eaed;
  --color-text-muted: #a0adb6;
  --color-heading: #5ecfd0;
  --color-link: #6ec8e8;
  --color-link-hover: #9ad9f0;
  --color-accent: #5ecfd0;
  --color-accent-dark: #7ed9da;
  --color-coral: #e85d1c;
  --color-coral-dark: #f07a3d;
  --color-border: #2f383f;
  --color-code-bg: #262d34;
  --color-code-text: #5ecfd0;
  --color-pre-bg: #0d1014;
  --color-pre-text: #c8d0d6;
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.3);
  --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.4);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-height) + 1rem);
}

html, body {
  margin: 0;
  padding: 0;
}

body {
  color: var(--color-text);
  font-size: 17px;
  font-family: var(--font-sans);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  background-color: var(--color-bg);
}

h1, h2, h3, h4, h5, h6 {
  margin: 1.4em 0 0.5em;
  font-weight: 650;
  color: var(--color-heading);
  font-family: var(--font-serif);
  letter-spacing: -0.02em;
  line-height: 1.25;
}

h1 { font-size: 2.25rem; margin-top: 0; }
h2 {
  font-size: 1.65rem;
  padding-bottom: 0.4rem;
  border-bottom: 1px solid var(--color-border);
}
h3 { font-size: 1.3rem; }
h4 { font-size: 1.15rem; }
h5, h6 { font-size: 1rem; }

p { margin: 0 0 1rem; }

a {
  color: var(--color-link);
  text-decoration: none;
  transition: color 0.15s ease;
}

a:hover {
  color: var(--color-link-hover);
  text-decoration: underline;
}

img {
  max-width: 100%;
  height: auto;
}

ul, ol { margin: 0 0 1.25rem; padding-left: 1.4rem; }
li { margin-bottom: 0.35rem; }

blockquote {
  color: var(--color-text-muted);
  margin: 0 0 1.25rem;
  padding: 0.25rem 0 0.25rem 1.1rem;
  border-left: 3px solid var(--color-accent);
}

hr {
  border: none;
  height: 1px;
  background: var(--color-border);
  margin: 2rem 0;
}

table {
  border-collapse: collapse;
  width: 100%;
  margin-bottom: 1.5rem;
  font-size: 0.95rem;
}

th, td {
  padding: 0.65rem 0.85rem;
  border: 1px solid var(--color-border);
  text-align: left;
}

th {
  background: var(--color-code-bg);
  font-weight: 600;
  color: var(--color-text);
}

code {
  font-family: var(--font-mono);
  font-size: 0.88em;
  background: var(--color-code-bg);
  color: var(--color-code-text);
  padding: 0.15em 0.4em;
  border-radius: 3px;
}

pre {
  font-family: var(--font-mono);
  font-size: 0.875rem;
  line-height: 1.55;
  background: var(--color-pre-bg);
  color: var(--color-pre-text);
  padding: 1rem 1.15rem;
  border-radius: var(--radius);
  overflow-x: auto;
  margin: 0;
  border: 1px solid var(--color-border);
}

pre code {
  background: transparent;
  color: inherit;
  padding: 0;
  font-size: inherit;
  border-radius: 0;
}

/* —— Header —— */
header {
  background: linear-gradient(135deg, var(--color-coral) 0%, var(--color-coral-dark) 100%);
  border-bottom: 3px solid var(--color-accent);
  box-shadow: var(--shadow-sm);
  position: sticky;
  top: 0;
  z-index: 100;
  min-height: var(--header-height);
}

header .container {
  display: flex;
  align-items: center;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0.75rem 1.5rem;
}

header nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
  gap: 1.5rem;
}

header .logo {
  font-size: 1.35rem;
  font-weight: 700;
  font-family: var(--font-serif);
  color: #fff;
  display: flex;
  align-items: center;
  white-space: nowrap;
  text-decoration: none;
}

header .logo:hover {
  text-decoration: none;
  color: #fff;
  opacity: 0.92;
}

header .logo img {
  margin-right: 0.65rem;
  background: #fff;
  padding: 2px;
  border-radius: 4px;
}

header .nav-links {
  display: flex;
  list-style: none;
  margin: 0;
  padding: 0;
  gap: 0.25rem 1.15rem;
  align-items: center;
  flex-wrap: wrap;
  justify-content: flex-end;
}

header .nav-links a {
  color: #fff;
  font-weight: 500;
  font-size: 0.95rem;
}

header .nav-links a:hover {
  opacity: 0.85;
  text-decoration: none;
}

.theme-toggle {
  background: rgba(255, 255, 255, 0.15);
  border: 1.5px solid rgba(255, 255, 255, 0.85);
  color: #fff;
  padding: 0.35rem 0.6rem;
  border-radius: 4px;
  cursor: pointer;
  font-size: 1rem;
  line-height: 1;
}

.theme-toggle:hover {
  background: rgba(255, 255, 255, 0.28);
}

.hamburger {
  display: none;
  flex-direction: column;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.4rem;
}

.hamburger span {
  width: 22px;
  height: 2px;
  background: #fff;
  margin: 3px 0;
  border-radius: 1px;
}

/* —— Layout —— */
.container {
  max-width: 960px;
  margin: 0 auto;
  padding: 2rem 1.5rem;
}

main {
  background: var(--color-surface);
  min-height: calc(100vh - 220px);
  padding: 0;
}

/* Docs layout with sidebar */
.docs-layout {
  display: grid;
  grid-template-columns: var(--sidebar-width) minmax(0, 1fr);
  gap: 0;
  max-width: 1200px;
  margin: 0 auto;
  min-height: calc(100vh - var(--header-height) - 160px);
}

.docs-sidebar {
  padding: 1.75rem 1.25rem 2.5rem;
  border-right: 1px solid var(--color-border);
  background: var(--color-bg);
  position: sticky;
  top: var(--header-height);
  height: calc(100vh - var(--header-height));
  overflow-y: auto;
  font-size: 0.92rem;
}

.docs-sidebar h2 {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--color-text-muted);
  border: none;
  padding: 0;
  margin: 1.35rem 0 0.5rem;
  font-family: var(--font-sans);
  font-weight: 650;
}

.docs-sidebar h2:first-child {
  margin-top: 0;
}

.docs-sidebar ul {
  list-style: none;
  margin: 0 0 0.25rem;
  padding: 0;
}

.docs-sidebar li {
  margin: 0;
}

.docs-sidebar a {
  display: block;
  padding: 0.3rem 0.5rem;
  border-radius: 4px;
  color: var(--color-text);
  text-decoration: none;
}

.docs-sidebar a:hover {
  background: var(--color-code-bg);
  color: var(--color-link);
  text-decoration: none;
}

.docs-sidebar a.active {
  background: color-mix(in srgb, var(--color-accent) 18%, transparent);
  color: var(--color-heading);
  font-weight: 600;
}

.docs-content {
  padding: 2rem 2.25rem 3.5rem;
  max-width: calc(var(--content-measure) + 4.5rem);
}

.docs-content > h1:first-child {
  margin-top: 0;
}

/* Page TOC (in-page) */
.table-of-contents {
  background: var(--color-bg);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 1rem 1.25rem;
  margin: 0 0 2rem;
  font-size: 0.9rem;
}

.table-of-contents h3 {
  margin: 0 0 0.5rem;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-family: var(--font-sans);
  color: var(--color-text-muted);
  border: none;
}

.table-of-contents ul {
  margin: 0;
  padding-left: 1.1rem;
}

.table-of-contents li {
  margin-bottom: 0.25rem;
}

/* Hero */
.hero {
  text-align: left;
  margin-bottom: 2.5rem;
  padding: 2.5rem 2rem;
  background:
    linear-gradient(155deg, color-mix(in srgb, var(--color-accent) 12%, var(--color-surface)) 0%, var(--color-surface) 55%),
    radial-gradient(ellipse at 100% 0%, color-mix(in srgb, var(--color-coral) 10%, transparent) 0%, transparent 55%);
  border-radius: var(--radius);
  border: 1px solid var(--color-border);
  border-top: 4px solid var(--color-accent);
}

.hero h1 {
  font-size: 2.5rem;
  margin-bottom: 0.75rem;
  color: var(--color-heading);
}

.hero .brand {
  display: block;
  font-family: var(--font-serif);
  font-size: 1.05rem;
  font-weight: 650;
  color: var(--color-coral);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  margin-bottom: 0.5rem;
}

.hero p {
  font-size: 1.15rem;
  color: var(--color-text-muted);
  margin-bottom: 1.75rem;
  max-width: 40rem;
  line-height: 1.6;
}

.cta-buttons {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.btn {
  display: inline-block;
  padding: 0.7rem 1.35rem;
  border-radius: var(--radius);
  font-weight: 600;
  font-family: var(--font-sans);
  font-size: 0.95rem;
  border: 2px solid;
  cursor: pointer;
  text-decoration: none;
  transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}

.btn:hover {
  text-decoration: none;
}

.btn-primary {
  background: var(--color-accent);
  color: #fff;
  border-color: var(--color-accent);
}

.btn-primary:hover {
  background: var(--color-accent-dark);
  border-color: var(--color-accent-dark);
  color: #fff;
}

.btn-secondary {
  background: transparent;
  color: var(--color-heading);
  border-color: var(--color-accent);
}

.btn-secondary:hover {
  background: color-mix(in srgb, var(--color-accent) 12%, transparent);
  color: var(--color-heading);
}

/* Feature cards */
.features {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.25rem;
  margin: 1.5rem 0 2.5rem;
}

.feature-card {
  background: var(--color-bg);
  padding: 1.35rem 1.4rem;
  border-radius: var(--radius);
  border: 1px solid var(--color-border);
  border-left: 3px solid var(--color-accent);
  transition: box-shadow 0.2s ease;
}

.feature-card:hover {
  box-shadow: var(--shadow-md);
}

.feature-card h3 {
  margin-top: 0;
  font-size: 1.15rem;
}

.feature-card h3 a {
  color: inherit;
}

.feature-card h3 a:hover {
  color: var(--color-link);
}

.feature-card p {
  color: var(--color-text-muted);
  font-size: 0.95rem;
  margin-bottom: 0;
}

.feature-icon {
  display: none;
}

/* Code blocks */
.code-block {
  position: relative;
  margin: 1rem 0 1.5rem;
  border-radius: var(--radius);
  overflow: hidden;
}

.code-block pre {
  box-shadow: none;
}

.code-block button,
.copy-button {
  position: absolute;
  top: 0.5rem;
  right: 0.5rem;
  background: var(--color-accent);
  color: #fff;
  border: none;
  padding: 0.35rem 0.65rem;
  border-radius: 4px;
  cursor: pointer;
  font-size: 0.75rem;
  font-family: var(--font-sans);
  font-weight: 600;
  opacity: 0.9;
  z-index: 2;
}

.code-block button:hover,
.copy-button:hover {
  opacity: 1;
}

.copy-button.copied {
  background: var(--color-accent-dark);
}

/* Recipe / FAQ helpers */
.recipe-meta,
.callout {
  background: var(--color-bg);
  border: 1px solid var(--color-border);
  border-left: 3px solid var(--color-accent);
  border-radius: var(--radius);
  padding: 1rem 1.15rem;
  margin: 0 0 1.5rem;
  font-size: 0.95rem;
}

.callout.warn {
  border-left-color: var(--color-coral);
}

.callout p:last-child {
  margin-bottom: 0;
}

.faq-item {
  margin-bottom: 2rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid var(--color-border);
}

.faq-item:last-child {
  border-bottom: none;
}

.faq-item h3 {
  margin-top: 0;
}

/* Footer */
footer {
  background: #2c3338;
  color: #d8dee3;
  padding: 2rem 1.5rem;
  text-align: center;
  border-top: 3px solid var(--color-accent);
  font-size: 0.9rem;
}

html.dark footer {
  background: #0d1014;
}

footer a {
  color: #fff;
  text-decoration: underline;
  text-underline-offset: 2px;
}

footer a:hover {
  color: var(--color-accent);
}

.footer-links {
  margin-bottom: 1rem;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.5rem 1.25rem;
}

footer p {
  margin: 0.35rem 0;
  color: #a8b2ba;
}

/* fsdocs API pages — scoped styles (do not load stock fsdocs-default.css) */
.fsdocs-namespace-nav {
  list-style: none;
  margin: 0;
  padding: 0;
}

.fsdocs-namespace-nav .nav-header {
  list-style: none;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--color-text-muted);
  padding: 0.35rem 0.5rem 0.15rem;
}

.fsdocs-namespace-nav .nav-item {
  list-style: none;
}

.fsdocs-content table {
  font-size: 0.9rem;
  width: 100%;
  border-collapse: collapse;
  margin: 1rem 0 1.5rem;
}

.fsdocs-content td,
.fsdocs-content th {
  padding: 0.55rem 0.75rem;
  border: 1px solid var(--color-border);
  vertical-align: top;
}

.fsdocs-content .fsdocs-member-list-header,
.fsdocs-content thead td {
  font-weight: 600;
  background: var(--color-code-bg);
}

.fsdocs-content .fsdocs-xmldoc,
.fsdocs-content .fsdocs-summary {
  margin: 0.5rem 0 1rem;
  color: var(--color-text-muted);
}

.fsdocs-content .fsdocs-source-link {
  font-size: 0.85rem;
  margin-left: 0.35rem;
}

.fsdocs-content pre,
.fsdocs-content table.pre {
  margin: 0.75rem 0 1.25rem;
  max-width: 100%;
  overflow-x: auto;
}

.fsdocs-content .fsdocs-param-name,
.fsdocs-content .fsdocs-return-name {
  font-family: var(--font-mono);
  font-size: 0.88em;
}

div.fsdocs-tip {
  position: absolute;
  display: none;
  max-width: min(32rem, 90vw);
  padding: 0.75rem 1rem;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-md);
  z-index: 200;
  font-size: 0.9rem;
}

/* Home page wider container */
.home main > .container {
  max-width: 1000px;
}

.section-lead {
  color: var(--color-text-muted);
  font-size: 1.05rem;
  max-width: 40rem;
}

.use-cases {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 0.75rem 1.5rem;
  list-style: none;
  padding: 0;
  margin: 0 0 2rem;
}

.use-cases li {
  padding: 0.75rem 0;
  border-bottom: 1px solid var(--color-border);
  margin: 0;
  color: var(--color-text-muted);
}

.use-cases strong {
  color: var(--color-text);
  display: block;
  margin-bottom: 0.15rem;
}

/* fsdocs reference tweaks when embedded */
.fsdocs-content {
  max-width: none;
}

/* Responsive */
@media (max-width: 900px) {
  .docs-layout {
    grid-template-columns: 1fr;
  }

  .docs-sidebar {
    position: relative;
    top: 0;
    height: auto;
    border-right: none;
    border-bottom: 1px solid var(--color-border);
    max-height: none;
  }
}

@media (max-width: 768px) {
  .hamburger {
    display: flex;
  }

  header .nav-links {
    display: none;
    flex-direction: column;
    width: 100%;
    align-items: flex-start;
    gap: 0.35rem;
    padding-top: 0.5rem;
  }

  header .nav-links.active {
    display: flex;
  }

  header nav {
    flex-wrap: wrap;
  }

  .hero {
    padding: 1.75rem 1.25rem;
  }

  .hero h1 {
    font-size: 1.85rem;
  }

  .docs-content {
    padding: 1.5rem 1.15rem 2.5rem;
  }
}

@media (max-width: 480px) {
  body { font-size: 16px; }
  h1 { font-size: 1.75rem; }
  h2 { font-size: 1.4rem; }
  .btn { width: 100%; text-align: center; }
  .cta-buttons { flex-direction: column; }
}
