/* ==========================================================================
   apiwords — Shared Stylesheet
   A restrained, established reference design: deep navy, warm paper,
   serif headings and hairline rules. No gradients, glows or novelty motion.
   ========================================================================== */

/* ---------- Design tokens ---------- */
:root {
  --color-bg: #faf8f3;
  --color-bg-soft: #f4f0e6;
  --color-bg-alt: #ece6d8;
  --color-surface: #fffdf8;
  --color-border: #ddd5c4;
  --color-border-strong: #c3b9a4;

  --color-text: #30302b;
  --color-text-muted: #6a6559;
  --color-text-subtle: #928a7a;
  --color-heading: #1b2a41;

  --color-primary: #1b2a41;
  --color-primary-dark: #12203a;
  --color-primary-soft: #ebe7dc;
  --color-accent: #8a6d3b;
  --color-accent-soft: #f2ead9;
  --color-warn: #9a5b3b;
  --color-warn-soft: #f6ece4;

  --font-serif: Georgia, "Times New Roman", Times, serif;
  --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif;
  --font-mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Monaco, Consolas, "Liberation Mono", monospace;

  --shadow-sm: none;
  --shadow-md: 0 2px 10px rgba(27, 42, 65, 0.07);
  --shadow-lg: 0 6px 22px rgba(27, 42, 65, 0.12);

  --radius-sm: 2px;
  --radius-md: 3px;
  --radius-lg: 4px;
  --radius-pill: 2px;

  --container: 1140px;
  --header-h: 72px;
  --transition: 150ms ease;
}

/* ---------- Reset & base ---------- */
*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 18px);
}

body {
  margin: 0;
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.7;
  color: var(--color-text);
  background: var(--color-bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

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

a {
  color: var(--color-primary);
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: color var(--transition), border-color var(--transition);
}

a:hover {
  color: var(--color-accent);
  border-bottom-color: var(--color-accent);
}

h1, h2, h3, h4 {
  margin: 0 0 0.55em;
  line-height: 1.22;
  color: var(--color-heading);
  font-family: var(--font-serif);
  font-weight: 600;
  letter-spacing: 0;
}

h1 { font-size: clamp(2.1rem, 4.6vw, 3.05rem); }
h2 { font-size: clamp(1.6rem, 3.2vw, 2.15rem); }
h3 { font-size: 1.22rem; }
h4 { font-size: 1.04rem; }

p { margin: 0 0 1rem; }

ul, ol {
  margin: 0 0 1rem;
  padding-left: 1.25rem;
}

code, pre, .mono {
  font-family: var(--font-mono);
}

:focus-visible {
  outline: 2px solid var(--color-accent);
  outline-offset: 3px;
}

/* ---------- Layout helpers ---------- */
.container {
  width: min(100% - 44px, var(--container));
  margin-inline: auto;
}

.section {
  padding: clamp(52px, 8vw, 84px) 0;
}

.section--soft {
  background: var(--color-bg-soft);
  border-top: 1px solid var(--color-border);
  border-bottom: 1px solid var(--color-border);
}

.section--alt {
  background: var(--color-bg-alt);
  border-top: 1px solid var(--color-border);
  border-bottom: 1px solid var(--color-border);
}

.section-head {
  max-width: 720px;
  margin: 0 auto clamp(30px, 4.6vw, 46px);
  text-align: center;
}

.section-head p {
  color: var(--color-text-muted);
  font-size: 1.02rem;
  margin-bottom: 0;
}

.eyebrow {
  display: inline-block;
  font-family: var(--font-sans);
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--color-accent);
  padding-bottom: 6px;
  border-bottom: 1px solid var(--color-accent);
  margin-bottom: 18px;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 11px 22px;
  font-family: var(--font-sans);
  font-size: 0.9rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  line-height: 1.2;
  border: 1px solid var(--color-primary);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: background var(--transition), color var(--transition), border-color var(--transition);
  text-align: center;
}

.btn:hover {
  transform: none;
  border-bottom-width: 1px;
}

.btn:active {
  transform: none;
}

.btn--primary {
  background: var(--color-primary);
  color: #ffffff;
  box-shadow: none;
}

.btn--primary:hover {
  background: var(--color-primary-dark);
  border-color: var(--color-primary-dark);
  color: #ffffff;
}

.btn--accent {
  background: var(--color-accent);
  color: #ffffff;
  border-color: var(--color-accent);
  box-shadow: none;
}

.btn--accent:hover {
  background: #745a30;
  border-color: #745a30;
  color: #ffffff;
}

.btn--ghost {
  background: transparent;
  color: var(--color-primary);
  border-color: var(--color-border-strong);
}

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

.btn--light {
  background: transparent;
  color: #f4ead7;
  border-color: rgba(238, 224, 197, 0.55);
}

.btn--light:hover {
  background: rgba(255, 255, 255, 0.08);
  color: #ffffff;
  border-color: #f4ead7;
}

.btn--sm {
  padding: 7px 13px;
  font-size: 0.82rem;
}

.btn-group {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

/* ---------- Site header (masthead) ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  height: var(--header-h);
  background: var(--color-bg);
  border-top: 4px solid var(--color-primary);
  border-bottom: 1px solid var(--color-border-strong);
}

.site-header__inner {
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  font-family: var(--font-serif);
  font-weight: 600;
  font-size: 1.32rem;
  color: var(--color-heading);
  letter-spacing: 0;
  white-space: nowrap;
  border-bottom: none;
}

.brand:hover {
  color: var(--color-heading);
  border-bottom: none;
}

.brand__mark {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  background: var(--color-primary);
  color: #f1e7d2;
  border: 1px solid var(--color-primary-dark);
  border-radius: var(--radius-sm);
  font-family: var(--font-serif);
  font-weight: 600;
  box-shadow: none;
}

.brand__mark::before {
  content: "{ }";
  font-size: 0.86rem;
  letter-spacing: -0.04em;
}

.brand__name span {
  color: var(--color-accent);
}

.site-header .brand__name::after {
  content: "EST. 2008";
  display: inline-block;
  margin-left: 12px;
  padding-left: 12px;
  border-left: 1px solid var(--color-border-strong);
  font-family: var(--font-sans);
  font-size: 0.6rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  color: var(--color-text-subtle);
  vertical-align: 2px;
}

.nav {
  display: flex;
  align-items: center;
  gap: 2px;
}

.nav a {
  padding: 8px 13px;
  font-size: 0.87rem;
  font-weight: 600;
  letter-spacing: 0.03em;
  color: var(--color-text-muted);
  border: 1px solid transparent;
  border-bottom: 1px solid transparent;
  border-radius: var(--radius-sm);
  transition: color var(--transition), background var(--transition), border-color var(--transition);
}

.nav a:hover {
  color: var(--color-primary);
  background: var(--color-bg-soft);
  border-bottom-color: transparent;
}

.nav a[aria-current="page"] {
  color: var(--color-primary);
  border-color: var(--color-border-strong);
  border-bottom-color: var(--color-border-strong);
  background: var(--color-bg-soft);
  font-weight: 700;
}

.nav__cta {
  margin-left: 8px;
}

.menu-toggle {
  display: none;
  width: 42px;
  height: 42px;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 5px;
  background: transparent;
  border: 1px solid var(--color-border-strong);
  border-radius: var(--radius-sm);
  cursor: pointer;
}

.menu-toggle span {
  width: 20px;
  height: 2px;
  background: var(--color-primary);
  border-radius: 0;
  transition: transform var(--transition), opacity var(--transition);
}

/* ---------- Hero ---------- */
.hero {
  position: relative;
  overflow: hidden;
  background: var(--color-bg-soft);
  border-bottom: 1px solid var(--color-border-strong);
}

.hero::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 3px;
  background: var(--color-accent);
  pointer-events: none;
}

.hero__inner {
  position: relative;
  z-index: 1;
  padding: clamp(60px, 9vw, 100px) 0 clamp(54px, 8vw, 86px);
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: clamp(32px, 6vw, 72px);
  align-items: center;
}

.hero__content {
  min-width: 0;
}

.hero h1 {
  margin-bottom: 20px;
}

.hero h1 .grad {
  color: var(--color-accent);
}

.hero__lead {
  font-size: clamp(1.02rem, 1.9vw, 1.14rem);
  color: var(--color-text-muted);
  max-width: 560px;
  margin-bottom: 30px;
}

.hero__visual {
  display: flex;
  justify-content: center;
}

.code-card {
  width: 100%;
  max-width: 460px;
  background: #17243a;
  color: #d9d3c4;
  border: 1px solid #0e1829;
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-lg);
  overflow: hidden;
  font-family: var(--font-mono);
  font-size: 0.85rem;
  transform: none;
  transition: none;
}

.code-card:hover {
  transform: none;
}

.code-card__bar {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 12px 16px;
  background: #101b2e;
  border-bottom: 1px solid #0a1120;
}

.code-card__bar span {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #6f5a35;
}

.code-card__bar span:nth-child(2) { background: #574936; }
.code-card__bar span:nth-child(3) { background: #3f3a32; }
.code-card__bar em {
  margin-left: 8px;
  font-family: var(--font-sans);
  font-style: normal;
  color: #b8ad97;
  font-size: 0.76rem;
  letter-spacing: 0.04em;
}

.code-card pre {
  margin: 0;
  padding: 22px 20px 26px;
  line-height: 1.8;
  overflow-x: auto;
}

.tok-key { color: #a9bcdc; }
.tok-str { color: #cbb98e; }
.tok-num { color: #c8a76a; }
.tok-com { color: #8e8676; font-style: italic; }
.tok-fn  { color: #d3b6c4; }

/* ---------- Generic page hero (inner pages) ---------- */
.page-hero {
  background: var(--color-bg-soft);
  border-bottom: 1px solid var(--color-border-strong);
  padding: clamp(46px, 7vw, 74px) 0;
}

.page-hero h1 {
  margin-bottom: 14px;
}

.page-hero p {
  font-size: clamp(1rem, 1.9vw, 1.12rem);
  color: var(--color-text-muted);
  max-width: 660px;
  margin-bottom: 0;
}

/* ---------- Cards & grids ---------- */
.grid {
  display: grid;
  gap: 22px;
}

.grid--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid--4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }

.card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  padding: 28px;
  box-shadow: none;
  transition: border-color var(--transition), background var(--transition);
}

.card--hover:hover {
  transform: none;
  box-shadow: none;
  border-color: var(--color-accent);
  background: #fffefa;
}

.card__icon {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border: 1px solid var(--color-accent);
  border-radius: var(--radius-sm);
  background: transparent;
  color: var(--color-accent);
  font-family: var(--font-serif);
  font-size: 1.05rem;
  margin-bottom: 18px;
}

.card__icon--accent {
  background: var(--color-accent-soft);
  color: var(--color-accent);
}

.card h3 { margin-bottom: 8px; }

.card p {
  color: var(--color-text-muted);
  margin-bottom: 0;
  font-size: 0.95rem;
}

.card__link {
  display: inline-block;
  margin-top: 14px;
  font-weight: 700;
  font-size: 0.88rem;
  letter-spacing: 0.02em;
}

/* Stat strip */
.stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0;
  text-align: center;
  border-top: 1px solid var(--color-border);
  border-bottom: 1px solid var(--color-border);
}

.stat {
  padding: 26px 12px;
  border-right: 1px solid var(--color-border);
}

.stat:last-child { border-right: none; }

.stat__num {
  font-family: var(--font-serif);
  font-size: clamp(1.9rem, 3.6vw, 2.5rem);
  font-weight: 600;
  color: var(--color-primary);
  letter-spacing: 0;
  line-height: 1.1;
}

.stat__label {
  color: var(--color-text-muted);
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

/* ---------- Glossary ---------- */
.glossary-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 26px;
}

.search-box {
  position: relative;
  flex: 1 1 320px;
  max-width: 460px;
}

.search-box input {
  width: 100%;
  padding: 12px 16px 12px 42px;
  font-size: 0.94rem;
  font-family: inherit;
  color: var(--color-text);
  background: var(--color-surface);
  border: 1px solid var(--color-border-strong);
  border-radius: var(--radius-sm);
  transition: border-color var(--transition), box-shadow var(--transition);
}

.search-box input:focus {
  outline: none;
  border-color: var(--color-primary);
  box-shadow: none;
}

.search-box::before {
  content: "";
  position: absolute;
  left: 15px;
  top: 50%;
  width: 15px;
  height: 15px;
  transform: translateY(-50%);
  border: 2px solid var(--color-text-subtle);
  border-radius: 50%;
}

.search-box::after {
  content: "";
  position: absolute;
  left: 27px;
  top: calc(50% + 5px);
  width: 7px;
  height: 2px;
  background: var(--color-text-subtle);
  transform: rotate(45deg);
  border-radius: 0;
}

.filters {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.filter-btn {
  padding: 7px 14px;
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.03em;
  font-family: inherit;
  color: var(--color-text-muted);
  background: var(--color-surface);
  border: 1px solid var(--color-border-strong);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all var(--transition);
}

.filter-btn:hover {
  color: var(--color-primary);
  border-color: var(--color-primary);
}

.filter-btn.active {
  color: #fff;
  background: var(--color-primary);
  border-color: var(--color-primary);
}

.glossary-count {
  color: var(--color-text-subtle);
  font-size: 0.85rem;
  margin-bottom: 18px;
  font-family: var(--font-mono);
}

.term-list {
  display: grid;
  gap: 12px;
}

.term {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-left: 3px solid var(--color-accent);
  border-radius: var(--radius-sm);
  padding: 18px 24px;
  box-shadow: none;
  transition: background var(--transition), border-color var(--transition);
}

.term:hover {
  box-shadow: none;
  transform: none;
  background: #fffefa;
  border-color: var(--color-border-strong);
  border-left-color: var(--color-accent);
}

.term__head {
  display: flex;
  align-items: baseline;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 6px;
}

.term__name {
  font-family: var(--font-mono);
  font-size: 1.06rem;
  font-weight: 700;
  color: var(--color-heading);
}

.term__tag {
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--color-accent);
  border: 1px solid var(--color-border-strong);
  background: var(--color-accent-soft);
  padding: 2px 8px;
  border-radius: var(--radius-sm);
}

.term p {
  color: var(--color-text-muted);
  font-size: 0.94rem;
  margin: 0;
}

.term__empty {
  text-align: center;
  padding: 60px 20px;
  color: var(--color-text-subtle);
  border: 1px dashed var(--color-border-strong);
  border-radius: var(--radius-sm);
}

/* ---------- Docs layout ---------- */
.docs-layout {
  display: grid;
  grid-template-columns: 240px minmax(0, 1fr);
  gap: 44px;
  align-items: start;
}

.docs-sidebar {
  position: sticky;
  top: calc(var(--header-h) + 22px);
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-top: 3px solid var(--color-primary);
  border-radius: var(--radius-sm);
  padding: 20px;
}

.docs-sidebar h4 {
  font-family: var(--font-sans);
  font-size: 0.74rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--color-text-subtle);
  margin-bottom: 12px;
}

.docs-sidebar a {
  display: block;
  padding: 8px 12px;
  font-size: 0.89rem;
  color: var(--color-text-muted);
  border-radius: var(--radius-sm);
  border: 1px solid transparent;
  border-left: 2px solid transparent;
}

.docs-sidebar a:hover {
  background: var(--color-bg-soft);
  color: var(--color-primary);
  border-bottom-color: transparent;
}

.docs-sidebar a.active {
  background: var(--color-bg-soft);
  color: var(--color-primary);
  border-left-color: var(--color-accent);
  font-weight: 700;
}

.docs-content { min-width: 0; }

.docs-block {
  padding-bottom: 40px;
  margin-bottom: 40px;
  border-bottom: 1px solid var(--color-border);
}

.docs-block:last-child {
  border-bottom: none;
  margin-bottom: 0;
  padding-bottom: 0;
}

.docs-block h2 { margin-bottom: 14px; }

.docs-block p,
.docs-block li {
  color: var(--color-text-muted);
}

.code-block {
  position: relative;
  background: #17243a;
  color: #d9d3c4;
  border: 1px solid #0e1829;
  border-radius: var(--radius-sm);
  padding: 20px 22px;
  margin: 18px 0;
  overflow-x: auto;
  font-family: var(--font-mono);
  font-size: 0.85rem;
  line-height: 1.75;
}

.code-block__label {
  position: absolute;
  top: 10px;
  right: 14px;
  font-family: var(--font-mono);
  font-size: 0.68rem;
  color: #8e8676;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.callout {
  display: flex;
  gap: 14px;
  padding: 16px 20px;
  background: var(--color-accent-soft);
  border: 1px solid var(--color-border);
  border-left: 3px solid var(--color-accent);
  border-radius: var(--radius-sm);
  margin: 18px 0;
  color: #5a4a2e;
  font-size: 0.93rem;
}

.callout strong { color: #46381f; }

/* ---------- Use cases ---------- */
.use-card {
  position: relative;
  overflow: hidden;
}

.use-card__num {
  position: absolute;
  top: 14px;
  right: 22px;
  font-family: var(--font-serif);
  font-size: 2.3rem;
  font-weight: 600;
  color: #e3dac7;
  line-height: 1;
}

.use-card h3 { position: relative; }

.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 16px;
}

.tag {
  font-size: 0.74rem;
  font-family: var(--font-mono);
  color: var(--color-accent);
  background: var(--color-accent-soft);
  border: 1px solid var(--color-border);
  padding: 3px 9px;
  border-radius: var(--radius-sm);
}

/* ---------- About ---------- */
.principle {
  display: flex;
  gap: 18px;
  align-items: flex-start;
}

.principle__icon {
  flex: 0 0 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border: 1px solid var(--color-accent);
  border-radius: var(--radius-sm);
  background: var(--color-accent-soft);
  color: var(--color-accent);
  font-family: var(--font-serif);
  font-size: 1.1rem;
}

.timeline {
  position: relative;
  padding-left: 32px;
}

.timeline::before {
  content: "";
  position: absolute;
  left: 7px;
  top: 8px;
  bottom: 8px;
  width: 1px;
  background: var(--color-border-strong);
}

.timeline__item {
  position: relative;
  padding-bottom: 28px;
}

.timeline__item:last-child { padding-bottom: 0; }

.timeline__item::before {
  content: "";
  position: absolute;
  left: -29px;
  top: 7px;
  width: 9px;
  height: 9px;
  border-radius: 0;
  background: var(--color-accent);
  box-shadow: 0 0 0 3px var(--color-bg);
}

.timeline__year {
  font-family: var(--font-serif);
  font-weight: 600;
  color: var(--color-accent);
  font-size: 1rem;
}

.timeline__item h3 { margin: 4px 0 6px; }
.timeline__item p { color: var(--color-text-muted); margin: 0; }

/* ---------- Contact & forms ---------- */
.contact-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 44px;
  align-items: start;
}

.form-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-top: 3px solid var(--color-primary);
  border-radius: var(--radius-sm);
  padding: clamp(24px, 4vw, 38px);
  box-shadow: none;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.field {
  margin-bottom: 18px;
}

.field label {
  display: block;
  font-size: 0.86rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: var(--color-text);
  margin-bottom: 7px;
}

.field label .req { color: var(--color-warn); }

.field input,
.field textarea,
.field select {
  width: 100%;
  font-family: inherit;
  font-size: 0.94rem;
  color: var(--color-text);
  background: #fffefb;
  border: 1px solid var(--color-border-strong);
  border-radius: var(--radius-sm);
  padding: 11px 13px;
  transition: border-color var(--transition), box-shadow var(--transition);
}

.field textarea { resize: vertical; min-height: 130px; }

.field input:focus,
.field textarea:focus,
.field select:focus {
  outline: none;
  border-color: var(--color-primary);
  box-shadow: none;
}

.field input.invalid,
.field textarea.invalid {
  border-color: var(--color-warn);
}

.field__error {
  display: none;
  color: var(--color-warn);
  font-size: 0.8rem;
  margin-top: 5px;
}

.field__error.show { display: block; }

.form-note {
  font-size: 0.81rem;
  color: var(--color-text-subtle);
  margin: 4px 0 0;
}

.form-status {
  display: none;
  margin-top: 18px;
  padding: 14px 16px;
  background: var(--color-accent-soft);
  border: 1px solid var(--color-border);
  border-left: 3px solid var(--color-accent);
  color: #4d4029;
  border-radius: var(--radius-sm);
  font-size: 0.92rem;
}

.form-status.show { display: block; }

.contact-info {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.info-item {
  display: flex;
  gap: 14px;
  align-items: flex-start;
}

.info-item__icon {
  flex: 0 0 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border: 1px solid var(--color-accent);
  border-radius: var(--radius-sm);
  background: var(--color-accent-soft);
  color: var(--color-accent);
  font-size: 1.05rem;
}

.info-item h4 { margin-bottom: 2px; }
.info-item p { margin: 0; color: var(--color-text-muted); font-size: 0.92rem; }

.faq details {
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  padding: 0;
  margin-bottom: 12px;
  background: var(--color-surface);
}

.faq summary {
  cursor: pointer;
  padding: 15px 18px;
  font-family: var(--font-serif);
  font-weight: 600;
  font-size: 1.02rem;
  color: var(--color-heading);
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.faq summary::-webkit-details-marker { display: none; }

.faq summary::after {
  content: "+";
  font-family: var(--font-sans);
  font-size: 1.15rem;
  color: var(--color-accent);
  line-height: 1;
}

.faq details[open] summary::after { content: "\2212"; }

.faq details p {
  padding: 0 18px 16px;
  margin: 0;
  color: var(--color-text-muted);
  font-size: 0.93rem;
}

/* ---------- CTA band ---------- */
.cta-band {
  background: var(--color-primary);
  color: #f2e9d7;
  border: 1px solid var(--color-primary-dark);
  border-top: 3px solid var(--color-accent);
  border-radius: var(--radius-sm);
  padding: clamp(34px, 5.5vw, 56px);
  text-align: center;
  box-shadow: none;
}

.cta-band h2 { color: #fbf6ea; margin-bottom: 12px; }
.cta-band p { color: #d8cfba; max-width: 560px; margin: 0 auto 26px; }

/* ---------- Footer ---------- */
.site-footer {
  background: #142137;
  color: #c8c0ae;
  border-top: 3px solid var(--color-accent);
  padding: 58px 0 0;
  margin-top: 0;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.6fr repeat(3, 1fr);
  gap: 40px;
  padding-bottom: 42px;
}

.footer-brand .brand { color: #fbf6ea; font-size: 1.28rem; margin-bottom: 14px; }
.footer-brand .brand:hover { color: #fbf6ea; }
.footer-brand .brand__mark { background: transparent; border-color: #8f7b55; color: #d8c9a6; }
.footer-brand p { font-size: 0.89rem; max-width: 300px; color: #b9b1a0; }

.footer-col h4 {
  color: #f1e7d2;
  font-family: var(--font-sans);
  font-size: 0.74rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  margin-bottom: 16px;
}

.footer-col a {
  display: block;
  color: #c8c0ae;
  font-size: 0.88rem;
  padding: 5px 0;
  border-bottom-color: transparent;
}

.footer-col a:hover { color: #f1e7d2; border-bottom-color: #f1e7d2; }

.footer-bottom {
  border-top: 1px solid rgba(216, 201, 166, 0.22);
  padding: 22px 0;
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  font-size: 0.83rem;
}

.footer-bottom a { color: #c8c0ae; border-bottom-color: transparent; }
.footer-bottom a:hover { color: #f1e7d2; border-bottom-color: #f1e7d2; }

/* ---------- Breadcrumb ---------- */
.breadcrumb {
  font-size: 0.84rem;
  color: var(--color-text-subtle);
  margin-bottom: 18px;
}

.breadcrumb a { color: var(--color-text-muted); }
.breadcrumb span { margin: 0 8px; }

/* ---------- Responsive ---------- */
@media (max-width: 980px) {
  .hero__inner { grid-template-columns: 1fr; }
  .hero__visual { order: -1; }
  .code-card { transform: none; max-width: 560px; }
  .grid--4 { grid-template-columns: repeat(2, 1fr); }
  .stats { grid-template-columns: repeat(2, 1fr); }
  .stat:nth-child(2) { border-right: none; }
  .stat:nth-child(-n+2) { border-bottom: 1px solid var(--color-border); }
  .docs-layout { grid-template-columns: 1fr; }
  .docs-sidebar { position: static; }
  .docs-sidebar nav { display: flex; flex-wrap: wrap; gap: 6px; }
  .docs-sidebar a { border-left: 1px solid transparent; }
  .docs-sidebar a.active { border-left-color: var(--color-accent); }
  .contact-layout { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 760px) {
  .site-header .brand__name::after { display: none; }
  .menu-toggle { display: flex; }
  .nav {
    position: absolute;
    top: var(--header-h);
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 2px;
    background: var(--color-bg);
    border-bottom: 1px solid var(--color-border-strong);
    padding: 12px 22px 18px;
    box-shadow: var(--shadow-md);
    transform-origin: top;
    transform: scaleY(0);
    opacity: 0;
    visibility: hidden;
    transition: transform var(--transition), opacity var(--transition), visibility var(--transition);
  }
  .nav.open {
    transform: scaleY(1);
    opacity: 1;
    visibility: visible;
  }
  .nav a { padding: 11px 14px; font-size: 0.98rem; border-color: transparent; }
  .nav a[aria-current="page"] { border-color: var(--color-border-strong); }
  .nav__cta { margin: 8px 0 0; }
  .menu-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
  .menu-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
  .menu-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

  .grid--2, .grid--3, .grid--4 { grid-template-columns: 1fr; }
  .form-row { grid-template-columns: 1fr; }
}

@media (max-width: 480px) {
  .stats { grid-template-columns: 1fr 1fr; }
  .footer-grid { grid-template-columns: 1fr; }
  .btn-group .btn { flex: 1 1 100%; }
}

/* ---------- Utility ---------- */
.text-center { text-align: center; }
.mt-0 { margin-top: 0; }
.visually-hidden {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
